jinda 0.6.7 → 0.7.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/app/assets/config/manifest.js +4 -0
- data/app/assets/images/4dcity-old.ico +0 -0
- data/app/assets/images/4dcity.ico +0 -0
- data/app/assets/images/account.png +0 -0
- data/app/assets/images/add.png +0 -0
- data/app/assets/images/ajax-loader-circle.gif +0 -0
- data/app/assets/images/ajax-loader.gif +0 -0
- data/app/assets/images/anchor.png +0 -0
- data/app/assets/images/application_double.png +0 -0
- data/app/assets/images/application_form_edit.png +0 -0
- data/app/assets/images/arrow_left.png +0 -0
- data/app/assets/images/arrow_right.png +0 -0
- data/app/assets/images/arrow_turn_left.png +0 -0
- data/app/assets/images/arrow_turn_right.png +0 -0
- data/app/assets/images/calendar.png +0 -0
- data/app/assets/images/cancel.png +0 -0
- data/app/assets/images/chart_bar.png +0 -0
- data/app/assets/images/clock.png +0 -0
- data/app/assets/images/cog.png +0 -0
- data/app/assets/images/control_fastforward.png +0 -0
- data/app/assets/images/control_play.png +0 -0
- data/app/assets/images/cross.png +0 -0
- data/app/assets/images/delete.png +0 -0
- data/app/assets/images/external-link.png +0 -0
- data/app/assets/images/facebook-continue-button.png +0 -0
- data/app/assets/images/facebooksmall.png +0 -0
- data/app/assets/images/favicon.ico +0 -0
- data/app/assets/images/freemind(mm).png +0 -0
- data/app/assets/images/google-continue-button.png +0 -0
- data/app/assets/images/help.png +0 -0
- data/app/assets/images/highway-menu.png +0 -0
- data/app/assets/images/highway.png +0 -0
- data/app/assets/images/house.png +0 -0
- data/app/assets/images/icons-18-black.png +0 -0
- data/app/assets/images/icons-18-white.png +0 -0
- data/app/assets/images/icons-36-black.png +0 -0
- data/app/assets/images/icons-36-white.png +0 -0
- data/app/assets/images/logo.png +0 -0
- data/app/assets/images/logo_jinda.png +0 -0
- data/app/assets/images/logout.png +0 -0
- data/app/assets/images/new.gif +0 -0
- data/app/assets/images/new.png +0 -0
- data/app/assets/images/page.png +0 -0
- data/app/assets/images/page_attach.png +0 -0
- data/app/assets/images/page_green.png +0 -0
- data/app/assets/images/page_output.png +0 -0
- data/app/assets/images/page_pdf.png +0 -0
- data/app/assets/images/pencil.png +0 -0
- data/app/assets/images/printer.png +0 -0
- data/app/assets/images/refresh.png +0 -0
- data/app/assets/images/report.png +0 -0
- data/app/assets/images/rssmall.png +0 -0
- data/app/assets/images/tick.png +0 -0
- data/app/assets/images/twittersmall.png +0 -0
- data/app/assets/images/user.png +0 -0
- data/app/assets/images/user_admin_gear.png +0 -0
- data/app/assets/images/view_code.png +0 -0
- data/app/assets/javascripts/application.js-org +24 -0
- data/app/assets/javascripts/cable.js +13 -0
- data/app/assets/javascripts/disable_enter_key.js +10 -0
- data/app/assets/javascripts/iscroll-wrapper.js +32 -0
- data/app/assets/javascripts/iscroll.js +1084 -0
- data/app/assets/javascripts/jinda.js +14 -0
- data/app/assets/javascripts/jinda_jqm.js +24 -0
- data/app/assets/javascripts/jquery.mobile-1.2.1.js +9272 -0
- data/app/assets/javascripts/jquery.mobile.datebox.js +1778 -0
- data/app/assets/javascripts/jquery.mobile.splitview.js +695 -0
- data/app/assets/stylesheets/app.scss +90 -0
- data/app/assets/stylesheets/articles.scss +94 -0
- data/app/assets/stylesheets/fonts/sarabun.eot +0 -0
- data/app/assets/stylesheets/fonts/sarabun.ttf +0 -0
- data/app/assets/stylesheets/fonts/sarabun.woff +0 -0
- data/app/assets/stylesheets/fonts/sarabun_bold.ttf +0 -0
- data/app/assets/stylesheets/fonts/sarabun_bolditalic.ttf +0 -0
- data/app/assets/stylesheets/fonts/sarabun_italic.ttf +0 -0
- data/app/assets/stylesheets/fonts/thsarabunnew-webfont.eot +0 -0
- data/app/assets/stylesheets/fonts/thsarabunnew-webfont.ttf +0 -0
- data/app/assets/stylesheets/fonts/thsarabunnew-webfont.woff +0 -0
- data/app/assets/stylesheets/fonts/thsarabunnew.css +47 -0
- data/app/assets/stylesheets/fonts/thsarabunnew_bold-webfont.eot +0 -0
- data/app/assets/stylesheets/fonts/thsarabunnew_bold-webfont.ttf +0 -0
- data/app/assets/stylesheets/fonts/thsarabunnew_bold-webfont.woff +0 -0
- data/app/assets/stylesheets/fonts/thsarabunnew_bolditalic-webfont.eot +0 -0
- data/app/assets/stylesheets/fonts/thsarabunnew_bolditalic-webfont.ttf +0 -0
- data/app/assets/stylesheets/fonts/thsarabunnew_bolditalic-webfont.woff +0 -0
- data/app/assets/stylesheets/fonts/thsarabunnew_italic-webfont.eot +0 -0
- data/app/assets/stylesheets/fonts/thsarabunnew_italic-webfont.ttf +0 -0
- data/app/assets/stylesheets/fonts/thsarabunnew_italic-webfont.woff +0 -0
- data/app/assets/stylesheets/images/ajax-loader.gif +0 -0
- data/app/assets/stylesheets/images/button_black.png +0 -0
- data/app/assets/stylesheets/images/button_blue.png +0 -0
- data/app/assets/stylesheets/images/button_red.png +0 -0
- data/app/assets/stylesheets/images/icons-18-black.png +0 -0
- data/app/assets/stylesheets/images/icons-18-white.png +0 -0
- data/app/assets/stylesheets/images/icons-36-black.png +0 -0
- data/app/assets/stylesheets/images/icons-36-white.png +0 -0
- data/app/assets/stylesheets/images/indicator.gif +0 -0
- data/app/assets/stylesheets/jinda.scss +72 -0
- data/app/assets/stylesheets/jinda_jqm.css.scss +32 -0
- data/app/assets/stylesheets/jquery.mobile-1.2.1.css +2339 -0
- data/app/assets/stylesheets/jquery.mobile.datebox.css +65 -0
- data/app/assets/stylesheets/jquery.mobile.grids.collapsible.css +122 -0
- data/app/assets/stylesheets/jquery.mobile.splitview.css +128 -0
- data/app/assets/stylesheets/kul-4.2.css +1516 -0
- data/app/assets/stylesheets/kul-4.2.min.css +11 -0
- data/app/assets/stylesheets/modules.scss +84 -0
- data/app/assets/stylesheets/sarabun.css +37 -0
- data/app/assets/stylesheets/social.scss +133 -0
- data/app/controllers/concerns/jinda_general_concern.rb +179 -0
- data/app/controllers/concerns/jinda_run_concern.rb +365 -0
- data/app/controllers/jinda_controller.rb +66 -0
- data/app/jinda/index.mm +369 -0
- data/app/jinda/template/index.mm +366 -0
- data/app/jinda/template/linkview.haml +21 -0
- data/app/jinda/template/view.html.erb +26 -0
- data/app/views/jinda/_activity.md +10 -0
- data/app/views/jinda/_menu.haml +27 -0
- data/app/views/jinda/_menu_mm.haml +44 -0
- data/app/views/jinda/_model.md +5 -0
- data/app/views/jinda/_modul.md +9 -0
- data/app/views/jinda/_pending_home.haml +5 -0
- data/app/views/jinda/_pending_page.haml +24 -0
- data/app/views/jinda/_service.md +24 -0
- data/app/views/jinda/_static.haml +13 -0
- data/app/views/jinda/doc-thai.md +37 -0
- data/app/views/jinda/doc.md +36 -0
- data/app/views/jinda/error_logs.haml +22 -0
- data/app/views/jinda/feed.rss.builder +27 -0
- data/app/views/jinda/help.haml +20 -0
- data/app/views/jinda/index.html.haml +53 -0
- data/app/views/jinda/logs.haml +22 -0
- data/app/views/jinda/notice_logs.haml +18 -0
- data/app/views/jinda/pending.haml +1 -0
- data/app/views/jinda/run_form.haml +42 -0
- data/app/views/jinda/run_output.haml +38 -0
- data/app/views/jinda/search.haml +20 -0
- data/app/views/jinda/status.haml +61 -0
- data/config/routes.rb +44 -0
- data/lib/generators/jinda/config_generator.rb +7 -6
- data/lib/generators/jinda/install_generator.rb +2 -2
- data/lib/generators/jinda/templates/Dockerfile +4 -2
- data/lib/generators/jinda/templates/app/controllers/jinda_org/sessions_controller.rb +4 -3
- data/lib/generators/jinda/templates/app/views/articles/_report.haml +32 -0
- data/lib/generators/jinda/templates/app/views/articles/edit.haml +22 -11
- data/lib/generators/jinda/templates/app/views/articles/edit_article/edit_article.html.erb +14 -12
- data/lib/generators/jinda/templates/app/views/articles/index.haml +3 -21
- data/lib/generators/jinda/templates/app/views/articles/my.haml +1 -16
- data/lib/generators/jinda/templates/app/views/articles/new_article/form_article.html.erb +1 -1
- data/lib/generators/jinda/templates/app/views/articles/show.html.haml +37 -21
- data/lib/generators/jinda/templates/app/views/identities/new.html.erb +29 -24
- data/lib/generators/jinda/templates/app/views/password_resets/new.html.erb +13 -7
- data/lib/generators/jinda/templates/app/views/sessions/new.html.erb +27 -18
- data/lib/generators/jinda/templates/docker-compose.yml +3 -2
- data/lib/generators/jinda/templates/entrypoint.sh +2 -1
- data/lib/jinda/version.rb +1 -1
- metadata +142 -3
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* jQuery Mobile Framework Git Build: SHA1: 27e3c18acfebab2d47ee7ed37bd50fc4942c8838 <> Date: Fri Mar 22 08:50:04 2013 -0600
|
|
3
|
+
* http://jquerymobile.com
|
|
4
|
+
*
|
|
5
|
+
* Copyright 2010, 2013 jQuery Foundation, Inc. and other contributors
|
|
6
|
+
* Released under the MIT license.
|
|
7
|
+
* http://jquery.org/license
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
.ui-bar-a{border:1px solid #bcecff ;background:#bcecff ;color:#000000 ;font-weight:bold;text-shadow:0 1px 1px #eeeeee ;background-image:-webkit-gradient(linear,left top,left bottom,from( #bcecff ),to( #bcecff )); background-image:-webkit-linear-gradient( #bcecff,#bcecff ); background-image: -moz-linear-gradient( #bcecff,#bcecff ); background-image: -ms-linear-gradient( #bcecff,#bcecff ); background-image: -o-linear-gradient( #bcecff,#bcecff ); background-image: linear-gradient( #bcecff,#bcecff );}.ui-bar-a .ui-link-inherit{color:#000000 ;}.ui-bar-a a.ui-link{color:#7cc4e7 ;font-weight:bold;}.ui-bar-a a.ui-link:visited{ color:#2489ce ;}.ui-bar-a a.ui-link:hover{color:#2489ce ;}.ui-bar-a a.ui-link:active{color:#2489ce ;}.ui-bar-a,.ui-bar-a input,.ui-bar-a select,.ui-bar-a textarea,.ui-bar-a button{font-family:Helvetica,Arial,sans-serif ;}.ui-body-a,.ui-overlay-a{border:1px solid #657f67 ;color:#000000 ;text-shadow:0 1px 0 #eeeeee ;background:#b9e8bc ;background-image:-webkit-gradient(linear,left top,left bottom,from( #e7FFeb ),to( #8aae8d )); background-image:-webkit-linear-gradient( #e7FFeb,#8aae8d ); background-image: -moz-linear-gradient( #e7FFeb,#8aae8d ); background-image: -ms-linear-gradient( #e7FFeb,#8aae8d ); background-image: -o-linear-gradient( #e7FFeb,#8aae8d ); background-image: linear-gradient( #e7FFeb,#8aae8d );}.ui-overlay-a{background-image:none;border-width:0;}.ui-body-a,.ui-body-a input,.ui-body-a select,.ui-body-a textarea,.ui-body-a button{font-family:Helvetica,Arial,sans-serif ;}.ui-body-a .ui-link-inherit{color:#000000 ;}.ui-body-a .ui-link{color:#2489ce ;font-weight:bold;}.ui-body-a .ui-link:visited{ color:#2489ce ;}.ui-body-a .ui-link:hover{color:#2489ce ;}.ui-body-a .ui-link:active{color:#2489ce ;}.ui-btn-up-a{border:1px solid #e8e5b0 ;background:#e8e5b0 ;font-weight:bold;color:#000000 ;text-shadow:0 1px 0 #eeeeee ;background-image:-webkit-gradient(linear,left top,left bottom,from( #b4b289 ),to( #FFFFd6 )); background-image:-webkit-linear-gradient( #b4b289,#FFFFd6 ); background-image: -moz-linear-gradient( #b4b289,#FFFFd6 ); background-image: -ms-linear-gradient( #b4b289,#FFFFd6 ); background-image: -o-linear-gradient( #b4b289,#FFFFd6 ); background-image: linear-gradient( #b4b289,#FFFFd6 );}.ui-btn-up-a:visited,.ui-btn-up-a a.ui-link-inherit{color:#000000 ;}.ui-btn-hover-a{border:1px solid #ffcacf ;background:#FFFFca ;font-weight:bold;color:#000000 ;text-shadow:0 1px 0 #eeeeee ;background-image:-webkit-gradient(linear,left top,left bottom,from( #eaeab9 ),to( #FFFFda )); background-image:-webkit-linear-gradient( #eaeab9,#FFFFda ); background-image: -moz-linear-gradient( #eaeab9,#FFFFda ); background-image: -ms-linear-gradient( #eaeab9,#FFFFda ); background-image: -o-linear-gradient( #eaeab9,#FFFFda ); background-image: linear-gradient( #eaeab9,#FFFFda );}.ui-btn-hover-a:visited,.ui-btn-hover-a:hover,.ui-btn-hover-a a.ui-link-inherit{color:#000000 ;}.ui-btn-down-a{border:1px solid #FFFFca ;background:#FFFFca ;font-weight:bold;color:#000000 ;text-shadow:0 1px 0 #eeeeee ;background-image:-webkit-gradient(linear,left top,left bottom,from( #e5e5b5 ),to( #FFFFde )); background-image:-webkit-linear-gradient( #e5e5b5,#FFFFde ); background-image: -moz-linear-gradient( #e5e5b5,#FFFFde ); background-image: -ms-linear-gradient( #e5e5b5,#FFFFde ); background-image: -o-linear-gradient( #e5e5b5,#FFFFde ); background-image: linear-gradient( #e5e5b5,#FFFFde );}.ui-btn-down-a:visited,.ui-btn-down-a:hover,.ui-btn-down-a a.ui-link-inherit{color:#000000 ;}.ui-btn-up-a,.ui-btn-hover-a,.ui-btn-down-a{font-family:Helvetica,Arial,sans-serif ;text-decoration:none;}.ui-bar-b{border:1px solid #bcecff ;background:#bcecff ;color:#000000 ;font-weight:bold;text-shadow:0 1px 1px #eeeeee ;background-image:-webkit-gradient(linear,left top,left bottom,from( #ceFFFF ),to( #a9d4e5 )); background-image:-webkit-linear-gradient( #ceFFFF,#a9d4e5 ); background-image: -moz-linear-gradient( #ceFFFF,#a9d4e5 ); background-image: -ms-linear-gradient( #ceFFFF,#a9d4e5 ); background-image: -o-linear-gradient( #ceFFFF,#a9d4e5 ); background-image: linear-gradient( #ceFFFF,#a9d4e5 );}.ui-bar-b .ui-link-inherit{color:#000000 ;}.ui-bar-b a.ui-link{color:#7cc4e7 ;font-weight:bold;}.ui-bar-b a.ui-link:visited{ color:#2489ce ;}.ui-bar-b a.ui-link:hover{color:#2489ce ;}.ui-bar-b a.ui-link:active{color:#2489ce ;}.ui-bar-b,.ui-bar-b input,.ui-bar-b select,.ui-bar-b textarea,.ui-bar-b button{font-family:Helvetica,Arial,sans-serif ;}.ui-body-b,.ui-overlay-b{border:1px solid #7e7e7e ;color:#000000 ;text-shadow:0 1px 0 #eeeeee ;background:#e6e6e6 ;background-image:-webkit-gradient(linear,left top,left bottom,from( #fdfdfd ),to( #cfcfcf )); background-image:-webkit-linear-gradient( #fdfdfd,#cfcfcf ); background-image: -moz-linear-gradient( #fdfdfd,#cfcfcf ); background-image: -ms-linear-gradient( #fdfdfd,#cfcfcf ); background-image: -o-linear-gradient( #fdfdfd,#cfcfcf ); background-image: linear-gradient( #fdfdfd,#cfcfcf );}.ui-overlay-b{background-image:none;border-width:0;}.ui-body-b,.ui-body-b input,.ui-body-b select,.ui-body-b textarea,.ui-body-b button{font-family:Helvetica,Arial,sans-serif ;}.ui-body-b .ui-link-inherit{color:#000000 ;}.ui-body-b .ui-link{color:#2489ce ;font-weight:bold;}.ui-body-b .ui-link:visited{ color:#2489ce ;}.ui-body-b .ui-link:hover{color:#2489ce ;}.ui-body-b .ui-link:active{color:#2489ce ;}.ui-btn-up-b{border:1px solid #ffd7c6 ;background:#ffd7c6 ;font-weight:bold;color:#000000 ;text-shadow:0 1px 0 #eeeeee ;background-image:-webkit-gradient(linear,left top,left bottom,from( #FFecd9 ),to( #e5c1b2 )); background-image:-webkit-linear-gradient( #FFecd9,#e5c1b2 ); background-image: -moz-linear-gradient( #FFecd9,#e5c1b2 ); background-image: -ms-linear-gradient( #FFecd9,#e5c1b2 ); background-image: -o-linear-gradient( #FFecd9,#e5c1b2 ); background-image: linear-gradient( #FFecd9,#e5c1b2 );}.ui-btn-up-b:visited,.ui-btn-up-b a.ui-link-inherit{color:#000000 ;}.ui-btn-hover-b{border:1px solid #FFf7e3 ;background:#FFf7e3 ;font-weight:bold;color:#000000 ;text-shadow:0 1px 0 #eeeeee ;background-image:-webkit-gradient(linear,left top,left bottom,from( #FFFFf9 ),to( #e5decc )); background-image:-webkit-linear-gradient( #FFFFf9,#e5decc ); background-image: -moz-linear-gradient( #FFFFf9,#e5decc ); background-image: -ms-linear-gradient( #FFFFf9,#e5decc ); background-image: -o-linear-gradient( #FFFFf9,#e5decc ); background-image: linear-gradient( #FFFFf9,#e5decc );}.ui-btn-hover-b:visited,.ui-btn-hover-b:hover,.ui-btn-hover-b a.ui-link-inherit{color:#000000 ;}.ui-btn-down-b{border:1px solid #FFf7e3 ;background:#FFf7e3 ;font-weight:bold;color:#000000 ;text-shadow:0 1px 0 #eeeeee ;background-image:-webkit-gradient(linear,left top,left bottom,from( #e5decc ),to( #FFFFf9 )); background-image:-webkit-linear-gradient( #e5decc,#FFFFf9 ); background-image: -moz-linear-gradient( #e5decc,#FFFFf9 ); background-image: -ms-linear-gradient( #e5decc,#FFFFf9 ); background-image: -o-linear-gradient( #e5decc,#FFFFf9 ); background-image: linear-gradient( #e5decc,#FFFFf9 );}.ui-btn-down-b:visited,.ui-btn-down-b:hover,.ui-btn-down-b a.ui-link-inherit{color:#000000 ;}.ui-btn-up-b,.ui-btn-hover-b,.ui-btn-down-b{font-family:Helvetica,Arial,sans-serif ;text-decoration:none;}.ui-bar-c{border:1px solid #b3b3b3 ;background:#eeeeee ;color:#3e3e3e ;font-weight:bold;text-shadow:0 1px 1px #ffffff ;background-image:-webkit-gradient(linear,left top,left bottom,from( #f0f0f0 ),to( #dddddd )); background-image:-webkit-linear-gradient( #f0f0f0,#dddddd ); background-image: -moz-linear-gradient( #f0f0f0,#dddddd ); background-image: -ms-linear-gradient( #f0f0f0,#dddddd ); background-image: -o-linear-gradient( #f0f0f0,#dddddd ); background-image: linear-gradient( #f0f0f0,#dddddd );}.ui-bar-c .ui-link-inherit{color:#3e3e3e ;}.ui-bar-c a.ui-link{color:#7cc4e7 ;font-weight:bold;}.ui-bar-c a.ui-link:visited{ color:#2489ce ;}.ui-bar-c a.ui-link:hover{color:#2489ce ;}.ui-bar-c a.ui-link:active{color:#2489ce ;}.ui-bar-c,.ui-bar-c input,.ui-bar-c select,.ui-bar-c textarea,.ui-bar-c button{font-family:Helvetica,Arial,sans-serif ;}.ui-body-c,.ui-overlay-c{border:1px solid #aaaaaa ;color:#333333 ;text-shadow:0 1px 0 #ffffff ;background:#f9f9f9 ;background-image:-webkit-gradient(linear,left top,left bottom,from( #f9f9f9 ),to( #eeeeee )); background-image:-webkit-linear-gradient( #f9f9f9,#eeeeee ); background-image: -moz-linear-gradient( #f9f9f9,#eeeeee ); background-image: -ms-linear-gradient( #f9f9f9,#eeeeee ); background-image: -o-linear-gradient( #f9f9f9,#eeeeee ); background-image: linear-gradient( #f9f9f9,#eeeeee );}.ui-overlay-c{background-image:none;border-width:0;}.ui-body-c,.ui-body-c input,.ui-body-c select,.ui-body-c textarea,.ui-body-c button{font-family:Helvetica,Arial,sans-serif ;}.ui-body-c .ui-link-inherit{color:#333333 ;}.ui-body-c .ui-link{color:#2489ce ;font-weight:bold;}.ui-body-c .ui-link:visited{ color:#2489ce ;}.ui-body-c .ui-link:hover{color:#2489ce ;}.ui-body-c .ui-link:active{color:#2489ce ;}.ui-btn-up-c{border:1px solid #cccccc ;background:#eeeeee ;font-weight:bold;color:#2f3e46 ;text-shadow:0 1px 0 #ffffff ;background-image:-webkit-gradient(linear,left top,left bottom,from( #ffffff ),to( #f1f1f1 )); background-image:-webkit-linear-gradient( #ffffff,#f1f1f1 ); background-image: -moz-linear-gradient( #ffffff,#f1f1f1 ); background-image: -ms-linear-gradient( #ffffff,#f1f1f1 ); background-image: -o-linear-gradient( #ffffff,#f1f1f1 ); background-image: linear-gradient( #ffffff,#f1f1f1 );}.ui-btn-up-c:visited,.ui-btn-up-c a.ui-link-inherit{color:#2f3e46 ;}.ui-btn-hover-c{border:1px solid #bbbbbb ;background:#dfdfdf ;font-weight:bold;color:#2f3e46 ;text-shadow:0 1px 0 #ffffff ;background-image:-webkit-gradient(linear,left top,left bottom,from( #f6f6f6 ),to( #e0e0e0 )); background-image:-webkit-linear-gradient( #f6f6f6,#e0e0e0 ); background-image: -moz-linear-gradient( #f6f6f6,#e0e0e0 ); background-image: -ms-linear-gradient( #f6f6f6,#e0e0e0 ); background-image: -o-linear-gradient( #f6f6f6,#e0e0e0 ); background-image: linear-gradient( #f6f6f6,#e0e0e0 );}.ui-btn-hover-c:visited,.ui-btn-hover-c:hover,.ui-btn-hover-c a.ui-link-inherit{color:#2f3e46 ;}.ui-btn-down-c{border:1px solid #bbbbbb ;background:#d6d6d6 ;font-weight:bold;color:#2f3e46 ;text-shadow:0 1px 0 #ffffff ;background-image:-webkit-gradient(linear,left top,left bottom,from( #d0d0d0 ),to( #dfdfdf )); background-image:-webkit-linear-gradient( #d0d0d0,#dfdfdf ); background-image: -moz-linear-gradient( #d0d0d0,#dfdfdf ); background-image: -ms-linear-gradient( #d0d0d0,#dfdfdf ); background-image: -o-linear-gradient( #d0d0d0,#dfdfdf ); background-image: linear-gradient( #d0d0d0,#dfdfdf );}.ui-btn-down-c:visited,.ui-btn-down-c:hover,.ui-btn-down-c a.ui-link-inherit{color:#2f3e46 ;}.ui-btn-up-c,.ui-btn-hover-c,.ui-btn-down-c{font-family:Helvetica,Arial,sans-serif ;text-decoration:none;}.ui-bar-d{border:1px solid #b3b3b3 ;background:#eeeeee ;color:#3e3e3e ;font-weight:bold;text-shadow:0 1px 1px #ffffff ;background-image:-webkit-gradient(linear,left top,left bottom,from( #f0f0f0 ),to( #dddddd )); background-image:-webkit-linear-gradient( #f0f0f0,#dddddd ); background-image: -moz-linear-gradient( #f0f0f0,#dddddd ); background-image: -ms-linear-gradient( #f0f0f0,#dddddd ); background-image: -o-linear-gradient( #f0f0f0,#dddddd ); background-image: linear-gradient( #f0f0f0,#dddddd );}.ui-bar-d .ui-link-inherit{color:#3e3e3e ;}.ui-bar-d a.ui-link{color:#7cc4e7 ;font-weight:bold;}.ui-bar-d a.ui-link:visited{ color:#2489ce ;}.ui-bar-d a.ui-link:hover{color:#2489ce ;}.ui-bar-d a.ui-link:active{color:#2489ce ;}.ui-bar-d,.ui-bar-d input,.ui-bar-d select,.ui-bar-d textarea,.ui-bar-d button{font-family:Helvetica,Arial,sans-serif ;}.ui-body-d,.ui-overlay-d{border:1px solid #aaaaaa ;color:#333333 ;text-shadow:0 1px 0 #ffffff ;background:#f9f9f9 ;background-image:-webkit-gradient(linear,left top,left bottom,from( #f9f9f9 ),to( #eeeeee )); background-image:-webkit-linear-gradient( #f9f9f9,#eeeeee ); background-image: -moz-linear-gradient( #f9f9f9,#eeeeee ); background-image: -ms-linear-gradient( #f9f9f9,#eeeeee ); background-image: -o-linear-gradient( #f9f9f9,#eeeeee ); background-image: linear-gradient( #f9f9f9,#eeeeee );}.ui-overlay-d{background-image:none;border-width:0;}.ui-body-d,.ui-body-d input,.ui-body-d select,.ui-body-d textarea,.ui-body-d button{font-family:Helvetica,Arial,sans-serif ;}.ui-body-d .ui-link-inherit{color:#333333 ;}.ui-body-d .ui-link{color:#2489ce ;font-weight:bold;}.ui-body-d .ui-link:visited{ color:#2489ce ;}.ui-body-d .ui-link:hover{color:#2489ce ;}.ui-body-d .ui-link:active{color:#2489ce ;}.ui-btn-up-d{border:1px solid #cccccc ;background:#eeeeee ;font-weight:bold;color:#2f3e46 ;text-shadow:0 1px 0 #ffffff ;background-image:-webkit-gradient(linear,left top,left bottom,from( #ffffff ),to( #f1f1f1 )); background-image:-webkit-linear-gradient( #ffffff,#f1f1f1 ); background-image: -moz-linear-gradient( #ffffff,#f1f1f1 ); background-image: -ms-linear-gradient( #ffffff,#f1f1f1 ); background-image: -o-linear-gradient( #ffffff,#f1f1f1 ); background-image: linear-gradient( #ffffff,#f1f1f1 );}.ui-btn-up-d:visited,.ui-btn-up-d a.ui-link-inherit{color:#2f3e46 ;}.ui-btn-hover-d{border:1px solid #bbbbbb ;background:#dfdfdf ;font-weight:bold;color:#2f3e46 ;text-shadow:0 1px 0 #ffffff ;background-image:-webkit-gradient(linear,left top,left bottom,from( #f6f6f6 ),to( #e0e0e0 )); background-image:-webkit-linear-gradient( #f6f6f6,#e0e0e0 ); background-image: -moz-linear-gradient( #f6f6f6,#e0e0e0 ); background-image: -ms-linear-gradient( #f6f6f6,#e0e0e0 ); background-image: -o-linear-gradient( #f6f6f6,#e0e0e0 ); background-image: linear-gradient( #f6f6f6,#e0e0e0 );}.ui-btn-hover-d:visited,.ui-btn-hover-d:hover,.ui-btn-hover-d a.ui-link-inherit{color:#2f3e46 ;}.ui-btn-down-d{border:1px solid #bbbbbb ;background:#d6d6d6 ;font-weight:bold;color:#2f3e46 ;text-shadow:0 1px 0 #ffffff ;background-image:-webkit-gradient(linear,left top,left bottom,from( #d0d0d0 ),to( #dfdfdf )); background-image:-webkit-linear-gradient( #d0d0d0,#dfdfdf ); background-image: -moz-linear-gradient( #d0d0d0,#dfdfdf ); background-image: -ms-linear-gradient( #d0d0d0,#dfdfdf ); background-image: -o-linear-gradient( #d0d0d0,#dfdfdf ); background-image: linear-gradient( #d0d0d0,#dfdfdf );}.ui-btn-down-d:visited,.ui-btn-down-d:hover,.ui-btn-down-d a.ui-link-inherit{color:#2f3e46 ;}.ui-btn-up-d,.ui-btn-hover-d,.ui-btn-down-d{font-family:Helvetica,Arial,sans-serif ;text-decoration:none;}.ui-bar-e{border:1px solid #b3b3b3 ;background:#eeeeee ;color:#3e3e3e ;font-weight:bold;text-shadow:0 1px 1px #ffffff ;background-image:-webkit-gradient(linear,left top,left bottom,from( #f0f0f0 ),to( #dddddd )); background-image:-webkit-linear-gradient( #f0f0f0,#dddddd ); background-image: -moz-linear-gradient( #f0f0f0,#dddddd ); background-image: -ms-linear-gradient( #f0f0f0,#dddddd ); background-image: -o-linear-gradient( #f0f0f0,#dddddd ); background-image: linear-gradient( #f0f0f0,#dddddd );}.ui-bar-e .ui-link-inherit{color:#3e3e3e ;}.ui-bar-e a.ui-link{color:#7cc4e7 ;font-weight:bold;}.ui-bar-e a.ui-link:visited{ color:#2489ce ;}.ui-bar-e a.ui-link:hover{color:#2489ce ;}.ui-bar-e a.ui-link:active{color:#2489ce ;}.ui-bar-e,.ui-bar-e input,.ui-bar-e select,.ui-bar-e textarea,.ui-bar-e button{font-family:Helvetica,Arial,sans-serif ;}.ui-body-e,.ui-overlay-e{border:1px solid #aaaaaa ;color:#333333 ;text-shadow:0 1px 0 #ffffff ;background:#f9f9f9 ;background-image:-webkit-gradient(linear,left top,left bottom,from( #f9f9f9 ),to( #eeeeee )); background-image:-webkit-linear-gradient( #f9f9f9,#eeeeee ); background-image: -moz-linear-gradient( #f9f9f9,#eeeeee ); background-image: -ms-linear-gradient( #f9f9f9,#eeeeee ); background-image: -o-linear-gradient( #f9f9f9,#eeeeee ); background-image: linear-gradient( #f9f9f9,#eeeeee );}.ui-overlay-e{background-image:none;border-width:0;}.ui-body-e,.ui-body-e input,.ui-body-e select,.ui-body-e textarea,.ui-body-e button{font-family:Helvetica,Arial,sans-serif ;}.ui-body-e .ui-link-inherit{color:#333333 ;}.ui-body-e .ui-link{color:#2489ce ;font-weight:bold;}.ui-body-e .ui-link:visited{ color:#2489ce ;}.ui-body-e .ui-link:hover{color:#2489ce ;}.ui-body-e .ui-link:active{color:#2489ce ;}.ui-btn-up-e{border:1px solid #cccccc ;background:#eeeeee ;font-weight:bold;color:#2f3e46 ;text-shadow:0 1px 0 #ffffff ;background-image:-webkit-gradient(linear,left top,left bottom,from( #ffffff ),to( #f1f1f1 )); background-image:-webkit-linear-gradient( #ffffff,#f1f1f1 ); background-image: -moz-linear-gradient( #ffffff,#f1f1f1 ); background-image: -ms-linear-gradient( #ffffff,#f1f1f1 ); background-image: -o-linear-gradient( #ffffff,#f1f1f1 ); background-image: linear-gradient( #ffffff,#f1f1f1 );}.ui-btn-up-e:visited,.ui-btn-up-e a.ui-link-inherit{color:#2f3e46 ;}.ui-btn-hover-e{border:1px solid #bbbbbb ;background:#dfdfdf ;font-weight:bold;color:#2f3e46 ;text-shadow:0 1px 0 #ffffff ;background-image:-webkit-gradient(linear,left top,left bottom,from( #f6f6f6 ),to( #e0e0e0 )); background-image:-webkit-linear-gradient( #f6f6f6,#e0e0e0 ); background-image: -moz-linear-gradient( #f6f6f6,#e0e0e0 ); background-image: -ms-linear-gradient( #f6f6f6,#e0e0e0 ); background-image: -o-linear-gradient( #f6f6f6,#e0e0e0 ); background-image: linear-gradient( #f6f6f6,#e0e0e0 );}.ui-btn-hover-e:visited,.ui-btn-hover-e:hover,.ui-btn-hover-e a.ui-link-inherit{color:#2f3e46 ;}.ui-btn-down-e{border:1px solid #bbbbbb ;background:#d6d6d6 ;font-weight:bold;color:#2f3e46 ;text-shadow:0 1px 0 #ffffff ;background-image:-webkit-gradient(linear,left top,left bottom,from( #d0d0d0 ),to( #dfdfdf )); background-image:-webkit-linear-gradient( #d0d0d0,#dfdfdf ); background-image: -moz-linear-gradient( #d0d0d0,#dfdfdf ); background-image: -ms-linear-gradient( #d0d0d0,#dfdfdf ); background-image: -o-linear-gradient( #d0d0d0,#dfdfdf ); background-image: linear-gradient( #d0d0d0,#dfdfdf );}.ui-btn-down-e:visited,.ui-btn-down-e:hover,.ui-btn-down-e a.ui-link-inherit{color:#2f3e46 ;}.ui-btn-up-e,.ui-btn-hover-e,.ui-btn-down-e{font-family:Helvetica,Arial,sans-serif ;text-decoration:none;}.ui-bar-f{border:1px solid #b3b3b3 ;background:#eeeeee ;color:#3e3e3e ;font-weight:bold;text-shadow:0 1px 1px #ffffff ;background-image:-webkit-gradient(linear,left top,left bottom,from( #f0f0f0 ),to( #dddddd )); background-image:-webkit-linear-gradient( #f0f0f0,#dddddd ); background-image: -moz-linear-gradient( #f0f0f0,#dddddd ); background-image: -ms-linear-gradient( #f0f0f0,#dddddd ); background-image: -o-linear-gradient( #f0f0f0,#dddddd ); background-image: linear-gradient( #f0f0f0,#dddddd );}.ui-bar-f .ui-link-inherit{color:#3e3e3e ;}.ui-bar-f a.ui-link{color:#7cc4e7 ;font-weight:bold;}.ui-bar-f a.ui-link:visited{ color:#2489ce ;}.ui-bar-f a.ui-link:hover{color:#2489ce ;}.ui-bar-f a.ui-link:active{color:#2489ce ;}.ui-bar-f,.ui-bar-f input,.ui-bar-f select,.ui-bar-f textarea,.ui-bar-f button{font-family:Helvetica,Arial,sans-serif ;}.ui-body-f,.ui-overlay-f{border:1px solid #aaaaaa ;color:#333333 ;text-shadow:0 1px 0 #ffffff ;background:#f9f9f9 ;background-image:-webkit-gradient(linear,left top,left bottom,from( #f9f9f9 ),to( #eeeeee )); background-image:-webkit-linear-gradient( #f9f9f9,#eeeeee ); background-image: -moz-linear-gradient( #f9f9f9,#eeeeee ); background-image: -ms-linear-gradient( #f9f9f9,#eeeeee ); background-image: -o-linear-gradient( #f9f9f9,#eeeeee ); background-image: linear-gradient( #f9f9f9,#eeeeee );}.ui-overlay-f{background-image:none;border-width:0;}.ui-body-f,.ui-body-f input,.ui-body-f select,.ui-body-f textarea,.ui-body-f button{font-family:Helvetica,Arial,sans-serif ;}.ui-body-f .ui-link-inherit{color:#333333 ;}.ui-body-f .ui-link{color:#2489ce ;font-weight:bold;}.ui-body-f .ui-link:visited{ color:#2489ce ;}.ui-body-f .ui-link:hover{color:#2489ce ;}.ui-body-f .ui-link:active{color:#2489ce ;}.ui-btn-up-f{border:1px solid #cccccc ;background:#eeeeee ;font-weight:bold;color:#2f3e46 ;text-shadow:0 1px 0 #ffffff ;background-image:-webkit-gradient(linear,left top,left bottom,from( #ffffff ),to( #f1f1f1 )); background-image:-webkit-linear-gradient( #ffffff,#f1f1f1 ); background-image: -moz-linear-gradient( #ffffff,#f1f1f1 ); background-image: -ms-linear-gradient( #ffffff,#f1f1f1 ); background-image: -o-linear-gradient( #ffffff,#f1f1f1 ); background-image: linear-gradient( #ffffff,#f1f1f1 );}.ui-btn-up-f:visited,.ui-btn-up-f a.ui-link-inherit{color:#2f3e46 ;}.ui-btn-hover-f{border:1px solid #bbbbbb ;background:#dfdfdf ;font-weight:bold;color:#2f3e46 ;text-shadow:0 1px 0 #ffffff ;background-image:-webkit-gradient(linear,left top,left bottom,from( #f6f6f6 ),to( #e0e0e0 )); background-image:-webkit-linear-gradient( #f6f6f6,#e0e0e0 ); background-image: -moz-linear-gradient( #f6f6f6,#e0e0e0 ); background-image: -ms-linear-gradient( #f6f6f6,#e0e0e0 ); background-image: -o-linear-gradient( #f6f6f6,#e0e0e0 ); background-image: linear-gradient( #f6f6f6,#e0e0e0 );}.ui-btn-hover-f:visited,.ui-btn-hover-f:hover,.ui-btn-hover-f a.ui-link-inherit{color:#2f3e46 ;}.ui-btn-down-f{border:1px solid #bbbbbb ;background:#d6d6d6 ;font-weight:bold;color:#2f3e46 ;text-shadow:0 1px 0 #ffffff ;background-image:-webkit-gradient(linear,left top,left bottom,from( #d0d0d0 ),to( #dfdfdf )); background-image:-webkit-linear-gradient( #d0d0d0,#dfdfdf ); background-image: -moz-linear-gradient( #d0d0d0,#dfdfdf ); background-image: -ms-linear-gradient( #d0d0d0,#dfdfdf ); background-image: -o-linear-gradient( #d0d0d0,#dfdfdf ); background-image: linear-gradient( #d0d0d0,#dfdfdf );}.ui-btn-down-f:visited,.ui-btn-down-f:hover,.ui-btn-down-f a.ui-link-inherit{color:#2f3e46 ;}.ui-btn-up-f,.ui-btn-hover-f,.ui-btn-down-f{font-family:Helvetica,Arial,sans-serif ;text-decoration:none;}.ui-bar-g{border:1px solid #ed1c24 ;background:#ed1c24 ;color:#ffffff ;font-weight:bold;text-shadow:0 1px 1px #444444 ;background-image:-webkit-gradient(linear,left top,left bottom,from( #FF1e27 ),to( #d51920 )); background-image:-webkit-linear-gradient( #FF1e27,#d51920 ); background-image: -moz-linear-gradient( #FF1e27,#d51920 ); background-image: -ms-linear-gradient( #FF1e27,#d51920 ); background-image: -o-linear-gradient( #FF1e27,#d51920 ); background-image: linear-gradient( #FF1e27,#d51920 );}.ui-bar-g .ui-link-inherit{color:#ffffff ;}.ui-bar-g a.ui-link{color:#7cc4e7 ;font-weight:bold;}.ui-bar-g a.ui-link:visited{ color:#2489ce ;}.ui-bar-g a.ui-link:hover{color:#2489ce ;}.ui-bar-g a.ui-link:active{color:#2489ce ;}.ui-bar-g,.ui-bar-g input,.ui-bar-g select,.ui-bar-g textarea,.ui-bar-g button{font-family:Helvetica,Arial,sans-serif ;}.ui-body-g,.ui-overlay-g{border:1px solid #aaaaaa ;color:#333333 ;text-shadow:0 1px 0 #ffffff ;background:#f9f9f9 ;background-image:-webkit-gradient(linear,left top,left bottom,from( #f9f9f9 ),to( #eeeeee )); background-image:-webkit-linear-gradient( #f9f9f9,#eeeeee ); background-image: -moz-linear-gradient( #f9f9f9,#eeeeee ); background-image: -ms-linear-gradient( #f9f9f9,#eeeeee ); background-image: -o-linear-gradient( #f9f9f9,#eeeeee ); background-image: linear-gradient( #f9f9f9,#eeeeee );}.ui-overlay-g{background-image:none;border-width:0;}.ui-body-g,.ui-body-g input,.ui-body-g select,.ui-body-g textarea,.ui-body-g button{font-family:Helvetica,Arial,sans-serif ;}.ui-body-g .ui-link-inherit{color:#333333 ;}.ui-body-g .ui-link{color:#2489ce ;font-weight:bold;}.ui-body-g .ui-link:visited{ color:#2489ce ;}.ui-body-g .ui-link:hover{color:#2489ce ;}.ui-body-g .ui-link:active{color:#2489ce ;}.ui-btn-up-g{border:1px solid #cccccc ;background:#eeeeee ;font-weight:bold;color:#2f3e46 ;text-shadow:0 1px 0 #ffffff ;background-image:-webkit-gradient(linear,left top,left bottom,from( #ffffff ),to( #f1f1f1 )); background-image:-webkit-linear-gradient( #ffffff,#f1f1f1 ); background-image: -moz-linear-gradient( #ffffff,#f1f1f1 ); background-image: -ms-linear-gradient( #ffffff,#f1f1f1 ); background-image: -o-linear-gradient( #ffffff,#f1f1f1 ); background-image: linear-gradient( #ffffff,#f1f1f1 );}.ui-btn-up-g:visited,.ui-btn-up-g a.ui-link-inherit{color:#2f3e46 ;}.ui-btn-hover-g{border:1px solid #bbbbbb ;background:#dfdfdf ;font-weight:bold;color:#2f3e46 ;text-shadow:0 1px 0 #ffffff ;background-image:-webkit-gradient(linear,left top,left bottom,from( #f6f6f6 ),to( #e0e0e0 )); background-image:-webkit-linear-gradient( #f6f6f6,#e0e0e0 ); background-image: -moz-linear-gradient( #f6f6f6,#e0e0e0 ); background-image: -ms-linear-gradient( #f6f6f6,#e0e0e0 ); background-image: -o-linear-gradient( #f6f6f6,#e0e0e0 ); background-image: linear-gradient( #f6f6f6,#e0e0e0 );}.ui-btn-hover-g:visited,.ui-btn-hover-g:hover,.ui-btn-hover-g a.ui-link-inherit{color:#2f3e46 ;}.ui-btn-down-g{border:1px solid #bbbbbb ;background:#d6d6d6 ;font-weight:bold;color:#2f3e46 ;text-shadow:0 1px 0 #ffffff ;background-image:-webkit-gradient(linear,left top,left bottom,from( #d0d0d0 ),to( #dfdfdf )); background-image:-webkit-linear-gradient( #d0d0d0,#dfdfdf ); background-image: -moz-linear-gradient( #d0d0d0,#dfdfdf ); background-image: -ms-linear-gradient( #d0d0d0,#dfdfdf ); background-image: -o-linear-gradient( #d0d0d0,#dfdfdf ); background-image: linear-gradient( #d0d0d0,#dfdfdf );}.ui-btn-down-g:visited,.ui-btn-down-g:hover,.ui-btn-down-g a.ui-link-inherit{color:#2f3e46 ;}.ui-btn-up-g,.ui-btn-hover-g,.ui-btn-down-g{font-family:Helvetica,Arial,sans-serif ;text-decoration:none;}a.ui-link-inherit{text-decoration:none !important;}.ui-btn-active{border:1px solid #33cccc ;background:#bcecff ;font-weight:bold;color:#000000 ;cursor:pointer;text-shadow:0 1px 1px #eeeeee ;text-decoration:none;background-image:-webkit-gradient(linear,left top,left bottom,from( #ceFFFF ),to( #a9d4e5 )); background-image:-webkit-linear-gradient( #ceFFFF,#a9d4e5 ); background-image: -moz-linear-gradient( #ceFFFF,#a9d4e5 ); background-image: -ms-linear-gradient( #ceFFFF,#a9d4e5 ); background-image: -o-linear-gradient( #ceFFFF,#a9d4e5 ); background-image: linear-gradient( #ceFFFF,#a9d4e5 ); font-family:Helvetica,Arial,sans-serif ;}.ui-btn-active:visited,.ui-btn-active:hover,.ui-btn-active a.ui-link-inherit{color:#000000 ;}.ui-btn-inner{border-top:1px solid #fff;border-color:rgba(255,255,255,.3);}.ui-corner-tl{-moz-border-radius-topleft:.6em ;-webkit-border-top-left-radius:.6em ;border-top-left-radius:.6em ;}.ui-corner-tr{-moz-border-radius-topright:.6em ;-webkit-border-top-right-radius:.6em ;border-top-right-radius:.6em ;}.ui-corner-bl{-moz-border-radius-bottomleft:.6em ;-webkit-border-bottom-left-radius:.6em ;border-bottom-left-radius:.6em ;}.ui-corner-br{-moz-border-radius-bottomright:.6em ;-webkit-border-bottom-right-radius:.6em ;border-bottom-right-radius:.6em ;}.ui-corner-top{-moz-border-radius-topleft:.6em ;-webkit-border-top-left-radius:.6em ;border-top-left-radius:.6em ;-moz-border-radius-topright:.6em ;-webkit-border-top-right-radius:.6em ;border-top-right-radius:.6em ;}.ui-corner-bottom{-moz-border-radius-bottomleft:.6em ;-webkit-border-bottom-left-radius:.6em ;border-bottom-left-radius:.6em ;-moz-border-radius-bottomright:.6em ;-webkit-border-bottom-right-radius:.6em ;border-bottom-right-radius:.6em ;}.ui-corner-right{-moz-border-radius-topright:.6em ;-webkit-border-top-right-radius:.6em ;border-top-right-radius:.6em ;-moz-border-radius-bottomright:.6em ;-webkit-border-bottom-right-radius:.6em ;border-bottom-right-radius:.6em ;}.ui-corner-left{-moz-border-radius-topleft:.6em ;-webkit-border-top-left-radius:.6em ;border-top-left-radius:.6em ;-moz-border-radius-bottomleft:.6em ;-webkit-border-bottom-left-radius:.6em ;border-bottom-left-radius:.6em ;}.ui-corner-all{-moz-border-radius:.6em ;-webkit-border-radius:.6em ;border-radius:.6em ;}.ui-corner-none{-moz-border-radius: 0;-webkit-border-radius: 0;border-radius: 0;}.ui-br{border-bottom:rgb(130,130,130);border-bottom:rgba(130,130,130,.3);border-bottom-width:1px;border-bottom-style:solid;}.ui-disabled{filter:Alpha(Opacity=30);opacity:.3;zoom:1;}.ui-disabled,.ui-disabled a{cursor:default !important;pointer-events:none;}.ui-icon,.ui-icon-searchfield:after{background:#000000 ;background:rgba(0,0,0,0.4) ;background-image:url(images/icons-18-white.png) ;background-repeat:no-repeat;-moz-border-radius:9px;-webkit-border-radius:9px;border-radius:9px;}.ui-icon-alt{background:#fff;background:rgba(255,255,255,.3);background-image:url(images/icons-18-black.png);background-repeat:no-repeat;}@media only screen and (-webkit-min-device-pixel-ratio:1.5), only screen and (min--moz-device-pixel-ratio:1.5), only screen and (min-resolution:240dpi){.ui-icon-plus,.ui-icon-minus,.ui-icon-delete,.ui-icon-arrow-r,.ui-icon-arrow-l,.ui-icon-arrow-u,.ui-icon-arrow-d,.ui-icon-check,.ui-icon-gear,.ui-icon-refresh,.ui-icon-forward,.ui-icon-back,.ui-icon-grid,.ui-icon-star,.ui-icon-alert,.ui-icon-info,.ui-icon-home,.ui-icon-search,.ui-icon-searchfield:after,.ui-icon-checkbox-off,.ui-icon-checkbox-on,.ui-icon-radio-off,.ui-icon-radio-on{background-image:url(images/icons-36-white.png);-moz-background-size:776px 18px;-o-background-size:776px 18px;-webkit-background-size:776px 18px;background-size:776px 18px;}.ui-icon-alt{background-image:url(images/icons-36-black.png);}}.ui-icon-plus{background-position:-0 50%;}.ui-icon-minus{background-position:-36px 50%;}.ui-icon-delete{background-position:-72px 50%;}.ui-icon-arrow-r{background-position:-108px 50%;}.ui-icon-arrow-l{background-position:-144px 50%;}.ui-icon-arrow-u{background-position:-180px 50%;}.ui-icon-arrow-d{background-position:-216px 50%;}.ui-icon-check{background-position:-252px 50%;}.ui-icon-gear{background-position:-288px 50%;}.ui-icon-refresh{background-position:-324px 50%;}.ui-icon-forward{background-position:-360px 50%;}.ui-icon-back{background-position:-396px 50%;}.ui-icon-grid{background-position:-432px 50%;}.ui-icon-star{background-position:-468px 50%;}.ui-icon-alert{background-position:-504px 50%;}.ui-icon-info{background-position:-540px 50%;}.ui-icon-home{background-position:-576px 50%;}.ui-icon-search,.ui-icon-searchfield:after{background-position:-612px 50%;}.ui-icon-checkbox-off{background-position:-684px 50%;}.ui-icon-checkbox-on{background-position:-648px 50%;}.ui-icon-radio-off{background-position:-756px 50%;}.ui-icon-radio-on{background-position:-720px 50%;}.ui-checkbox .ui-icon,.ui-selectmenu-list .ui-icon{-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;}.ui-icon-checkbox-off,.ui-icon-radio-off{background-color:transparent;}.ui-checkbox-on .ui-icon,.ui-radio-on .ui-icon{background-color:#bcecff ; }.ui-icon-loading{background:url(images/ajax-loader.gif);background-size:46px 46px;}.ui-btn-corner-tl{-moz-border-radius-topleft:1em ;-webkit-border-top-left-radius:1em ;border-top-left-radius:1em ;}.ui-btn-corner-tr{-moz-border-radius-topright:1em ;-webkit-border-top-right-radius:1em ;border-top-right-radius:1em ;}.ui-btn-corner-bl{-moz-border-radius-bottomleft:1em ;-webkit-border-bottom-left-radius:1em ;border-bottom-left-radius:1em ;}.ui-btn-corner-br{-moz-border-radius-bottomright:1em ;-webkit-border-bottom-right-radius:1em ;border-bottom-right-radius:1em ;}.ui-btn-corner-top{-moz-border-radius-topleft:1em ;-webkit-border-top-left-radius:1em ;border-top-left-radius:1em ;-moz-border-radius-topright:1em ;-webkit-border-top-right-radius:1em ;border-top-right-radius:1em ;}.ui-btn-corner-bottom{-moz-border-radius-bottomleft:1em ;-webkit-border-bottom-left-radius:1em ;border-bottom-left-radius:1em ;-moz-border-radius-bottomright:1em ;-webkit-border-bottom-right-radius:1em ;border-bottom-right-radius:1em ;}.ui-btn-corner-right{-moz-border-radius-topright:1em ;-webkit-border-top-right-radius:1em ;border-top-right-radius:1em ;-moz-border-radius-bottomright:1em ;-webkit-border-bottom-right-radius:1em ;border-bottom-right-radius:1em ;}.ui-btn-corner-left{-moz-border-radius-topleft:1em ;-webkit-border-top-left-radius:1em ;border-top-left-radius:1em ;-moz-border-radius-bottomleft:1em ;-webkit-border-bottom-left-radius:1em ;border-bottom-left-radius:1em ;}.ui-btn-corner-all{-moz-border-radius:1em ;-webkit-border-radius:1em ;border-radius:1em ;}.ui-corner-tl,.ui-corner-tr,.ui-corner-bl,.ui-corner-br,.ui-corner-top,.ui-corner-bottom,.ui-corner-right,.ui-corner-left,.ui-corner-all,.ui-btn-corner-tl,.ui-btn-corner-tr,.ui-btn-corner-bl,.ui-btn-corner-br,.ui-btn-corner-top,.ui-btn-corner-bottom,.ui-btn-corner-right,.ui-btn-corner-left,.ui-btn-corner-all{ -webkit-background-clip:padding-box; -moz-background-clip:padding; background-clip:padding-box;}.ui-overlay{background:#666;filter:Alpha(Opacity=50);opacity:.5;position:absolute;width:100%;height:100%;}.ui-overlay-shadow{-moz-box-shadow:0px 0px 12px rgba(0,0,0,.6);-webkit-box-shadow:0px 0px 12px rgba(0,0,0,.6);box-shadow:0px 0px 12px rgba(0,0,0,.6);}.ui-shadow{-moz-box-shadow:0px 1px 4px rgba(0,0,0,.3) ;-webkit-box-shadow:0px 1px 4px rgba(0,0,0,.3) ;box-shadow:0px 1px 4px rgba(0,0,0,.3) ;}.ui-bar-a .ui-shadow,.ui-bar-b .ui-shadow,.ui-bar-c .ui-shadow {-moz-box-shadow:0px 1px 0 rgba(255,255,255,.3);-webkit-box-shadow:0px 1px 0 rgba(255,255,255,.3);box-shadow:0px 1px 0 rgba(255,255,255,.3);}.ui-shadow-inset{-moz-box-shadow:inset 0px 1px 4px rgba(0,0,0,.2);-webkit-box-shadow:inset 0px 1px 4px rgba(0,0,0,.2);box-shadow:inset 0px 1px 4px rgba(0,0,0,.2);}.ui-icon-shadow{-moz-box-shadow:0px 1px 0 rgba(255,255,255,.4) ;-webkit-box-shadow:0px 1px 0 rgba(255,255,255,.4) ;box-shadow:0px 1px 0 rgba(255,255,255,.4) ;}.ui-btn:focus,.ui-link-inherit:focus{outline:0;}.ui-btn.ui-focus{z-index:1;}.ui-focus,.ui-btn:focus{-moz-box-shadow:inset 0px 0px 3px #bcecff,0px 0px 9px #bcecff ;-webkit-box-shadow:inset 0px 0px 3px #bcecff,0px 0px 9px #bcecff ;box-shadow:inset 0px 0px 3px #bcecff,0px 0px 9px #bcecff ;}.ui-input-text.ui-focus,.ui-input-search.ui-focus{-moz-box-shadow:0px 0px 12px #bcecff ;-webkit-box-shadow:0px 0px 12px #bcecff ;box-shadow:0px 0px 12px #bcecff ;}.ui-mobile-nosupport-boxshadow *{-moz-box-shadow:none !important;-webkit-box-shadow:none !important;box-shadow:none !important;}.ui-mobile-nosupport-boxshadow .ui-focus,.ui-mobile-nosupport-boxshadow .ui-btn:focus,.ui-mobile-nosupport-boxshadow .ui-link-inherit:focus{outline-width:1px;outline-style:auto;}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
|
|
2
|
+
.module-title {
|
|
3
|
+
font-size: 14pt;
|
|
4
|
+
font-weight: bold;
|
|
5
|
+
text-align: center;
|
|
6
|
+
background: #d2f0ff;
|
|
7
|
+
font-family: 'TH SarabunPSK', Helvetica, Arial, sans-serif;
|
|
8
|
+
color:#333;
|
|
9
|
+
|
|
10
|
+
}
|
|
11
|
+
.module-text {
|
|
12
|
+
font-size: 14pt;
|
|
13
|
+
font-weight: bold;
|
|
14
|
+
text-align:left;
|
|
15
|
+
border:1px solid #c1c1c1;
|
|
16
|
+
background:#f7f7f7;
|
|
17
|
+
padding:2px 5px;
|
|
18
|
+
color:#333;
|
|
19
|
+
}
|
|
20
|
+
.module-comment {
|
|
21
|
+
font-size: 8pt;
|
|
22
|
+
text-align:left;
|
|
23
|
+
border:1px solid #c1c1c1;
|
|
24
|
+
background:#f7f7f7;
|
|
25
|
+
padding:2px 5px;
|
|
26
|
+
color:#333;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.comment-body {
|
|
30
|
+
font-size: 10pt;
|
|
31
|
+
font-weight: bold;
|
|
32
|
+
text-align:left;
|
|
33
|
+
color:#333;
|
|
34
|
+
}
|
|
35
|
+
.module-table {
|
|
36
|
+
width:100%;
|
|
37
|
+
font-family: 'TH SarabunPSK', Helvetica, Arial, sans-serif;
|
|
38
|
+
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.module-table th {
|
|
42
|
+
background-color: #bcecff;
|
|
43
|
+
color:#333;
|
|
44
|
+
;
|
|
45
|
+
width:100%;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.module-table td {
|
|
49
|
+
border: 1px;
|
|
50
|
+
padding: 8px;
|
|
51
|
+
witdth:100%;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
.ui-btn-inner { padding: 2px 25px; }
|
|
56
|
+
.ui-btn-up-c,
|
|
57
|
+
.ui-btn-hover-c,
|
|
58
|
+
.ui-btn-down-c {
|
|
59
|
+
font-family: 'TH SarabunPSK', Helvetica, Arial, sans-serif;
|
|
60
|
+
/*font-size: 110%;*/
|
|
61
|
+
}
|
|
62
|
+
.ui-li .ui-btn-inner a.ui-link-inherit, .ui-li-static.ui-li { padding: 7px 75px 7px 15px; display: block; }
|
|
63
|
+
.ui-link-inherit { font-family: 'TH SarabunPSK', Helvetica, Arial, sans-serif;}
|
|
64
|
+
label.ui-input-text {
|
|
65
|
+
font-family: 'TH SarabunPSK', Helvetica, Arial, sans-serif;
|
|
66
|
+
/*font-size: 110%;*/
|
|
67
|
+
text-shadow: none;
|
|
68
|
+
}
|
|
69
|
+
label.ui-select {
|
|
70
|
+
font-family: 'TH SarabunPSK', Helvetica, Arial, sans-serif;
|
|
71
|
+
/*font-size: 110%;*/
|
|
72
|
+
text-shadow: none;
|
|
73
|
+
}
|
|
74
|
+
.ui-body-c {
|
|
75
|
+
font-family: 'TH SarabunPSK', Helvetica, Arial, sans-serif;
|
|
76
|
+
/*font-size: 1.4em;*/
|
|
77
|
+
text-shadow: none;
|
|
78
|
+
}
|
|
79
|
+
.ui-header .ui-title, .ui-footer .ui-title { font-family: 'TH SarabunPSK'; text-align: center; display: block; margin: .2em 90px .3em; padding: 0; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; outline: 0 !important; }
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
@font-face {
|
|
2
|
+
font-family: 'TH SarabunPSK';
|
|
3
|
+
src: url('fonts/thsarabunnew-webfont.eot');
|
|
4
|
+
src: url('fonts/thsarabunnew-webfont.eot?#iefix') format('embedded-opentype'),
|
|
5
|
+
url('fonts/thsarabunnew-webfont.woff') format('woff'),
|
|
6
|
+
url('fonts/thsarabunnew-webfont.ttf') format('truetype');
|
|
7
|
+
font-weight: normal;
|
|
8
|
+
font-style: normal;
|
|
9
|
+
}
|
|
10
|
+
@font-face {
|
|
11
|
+
font-family: 'TH SarabunPSK';
|
|
12
|
+
font-style: normal;
|
|
13
|
+
font-weight: bold;
|
|
14
|
+
src: url('fonts/thsarabunnew_bold-webfont.eot');
|
|
15
|
+
src: url('fonts/thsarabunnew_bold-webfont.eot?#iefix') format('embedded-opentype'),
|
|
16
|
+
url('fonts/thsarabunnew_bold-webfont.woff') format('woff'),
|
|
17
|
+
url('fonts/thsarabunnew_bold-webfont.ttf') format('truetype');
|
|
18
|
+
}
|
|
19
|
+
@font-face {
|
|
20
|
+
font-family: 'TH SarabunPSK';
|
|
21
|
+
font-style: italic;
|
|
22
|
+
font-weight: bold;
|
|
23
|
+
src: url('fonts/thsarabunnew_bolditalic-webfont.eot');
|
|
24
|
+
src: url('fonts/thsarabunnew_bolditalic-webfont.eot?#iefix') format('embedded-opentype'),
|
|
25
|
+
url('fonts/thsarabunnew_bolditalic-webfont.woff') format('woff'),
|
|
26
|
+
url('fonts/thsarabunnew_bolditalic-webfont.ttf') format('truetype');
|
|
27
|
+
}
|
|
28
|
+
@font-face {
|
|
29
|
+
font-family: 'TH SarabunPSK';
|
|
30
|
+
font-style: italic;
|
|
31
|
+
font-weight: normal;
|
|
32
|
+
src: url('fonts/thsarabunnew_italic-webfont.eot');
|
|
33
|
+
src: url('fonts/thsarabunnew_italic-webfont.eot?#iefix') format('embedded-opentype'),
|
|
34
|
+
url('fonts/thsarabunnew_italic-webfont.woff') format('woff'),
|
|
35
|
+
url('fonts/thsarabunnew_italic-webfont.ttf') format('truetype');
|
|
36
|
+
}
|
|
37
|
+
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
html * {
|
|
2
|
+
font-family: 'Montserrat', sans-serif;
|
|
3
|
+
box-sizing: border-box;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
body {
|
|
7
|
+
background: #4688F1;
|
|
8
|
+
padding: 0;
|
|
9
|
+
margin: 0;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.login-box {
|
|
13
|
+
padding: 20px;
|
|
14
|
+
max-width: 480px;
|
|
15
|
+
margin: 5vh auto;
|
|
16
|
+
text-align: center;
|
|
17
|
+
letter-spacing: 1px;
|
|
18
|
+
position: relative;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.login-box:hover {
|
|
22
|
+
box-shadow: 0 8px 17px 0 rgba(0,0,0,0.2),0 6px 20px 0 rgba(0,0,0,0.19);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.login-box h2 {
|
|
26
|
+
margin: 20px 0 20px;
|
|
27
|
+
padding: 0;
|
|
28
|
+
text-transform: uppercase;
|
|
29
|
+
color: #4688F1;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.social-button {
|
|
33
|
+
background-position: 25px 0px;
|
|
34
|
+
box-sizing: border-box;
|
|
35
|
+
color: rgb(255, 255, 255);
|
|
36
|
+
cursor: pointer;
|
|
37
|
+
display: inline-block;
|
|
38
|
+
height: 50px;
|
|
39
|
+
line-height: 50px;
|
|
40
|
+
text-align: left;
|
|
41
|
+
text-decoration: none;
|
|
42
|
+
text-transform: uppercase;
|
|
43
|
+
vertical-align: middle;
|
|
44
|
+
width: 100%;
|
|
45
|
+
border-radius: 3px;
|
|
46
|
+
margin: 10px auto;
|
|
47
|
+
outline: rgb(255, 255, 255) none 0px;
|
|
48
|
+
padding-left: 20%;
|
|
49
|
+
transition: all 0.2s cubic-bezier(0.72, 0.01, 0.56, 1) 0s;
|
|
50
|
+
-webkit-transition: all .3s ease;
|
|
51
|
+
-moz-transition: all .3s ease;
|
|
52
|
+
-ms-transition: all .3s ease;
|
|
53
|
+
-o-transition: all .3s ease;
|
|
54
|
+
transition: all .3s ease;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
#facebook-connect {
|
|
58
|
+
background: rgb(255, 255, 255) url('https://eswarasai.com/projects/social-login/img/facebook.svg') no-repeat scroll 5px 0px / 30px 50px padding-box border-box;
|
|
59
|
+
border: 1px solid rgb(60, 90, 154);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
#facebook-connect:hover {
|
|
63
|
+
border-color: rgb(60, 90, 154);
|
|
64
|
+
background: rgb(60, 90, 154) url('https://eswarasai.com/projects/social-login/img/facebook-white.svg') no-repeat scroll 5px 0px / 30px 50px padding-box border-box;
|
|
65
|
+
-webkit-transition: all .8s ease-out;
|
|
66
|
+
-moz-transition: all .3s ease;
|
|
67
|
+
-ms-transition: all .3s ease;
|
|
68
|
+
-o-transition: all .3s ease;
|
|
69
|
+
transition: all .3s ease-out;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
#facebook-connect span {
|
|
73
|
+
box-sizing: border-box;
|
|
74
|
+
color: rgb(60, 90, 154);
|
|
75
|
+
cursor: pointer;
|
|
76
|
+
text-align: center;
|
|
77
|
+
text-transform: uppercase;
|
|
78
|
+
border: 0px none rgb(255, 255, 255);
|
|
79
|
+
outline: rgb(255, 255, 255) none 0px;
|
|
80
|
+
-webkit-transition: all .3s ease;
|
|
81
|
+
-moz-transition: all .3s ease;
|
|
82
|
+
-ms-transition: all .3s ease;
|
|
83
|
+
-o-transition: all .3s ease;
|
|
84
|
+
transition: all .3s ease;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
#facebook-connect:hover span {
|
|
88
|
+
color: #FFF;
|
|
89
|
+
-webkit-transition: all .3s ease;
|
|
90
|
+
-moz-transition: all .3s ease;
|
|
91
|
+
-ms-transition: all .3s ease;
|
|
92
|
+
-o-transition: all .3s ease;
|
|
93
|
+
transition: all .3s ease;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
#google-connect {
|
|
97
|
+
background: rgb(255, 255, 255) url('https://eswarasai.com/projects/social-login/img/google-plus.png') no-repeat scroll 5px 0px / 50px 50px padding-box border-box;
|
|
98
|
+
border: 1px solid rgb(220, 74, 61);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
#google-connect:hover {
|
|
102
|
+
border-color: rgb(220, 74, 61);
|
|
103
|
+
background: rgb(220, 74, 61) url('https://eswarasai.com/projects/social-login/img/google-plus-white.png') no-repeat scroll 5px 0px / 50px 50px padding-box border-box;
|
|
104
|
+
-webkit-transition: all .8s ease-out;
|
|
105
|
+
-moz-transition: all .3s ease;
|
|
106
|
+
-ms-transition: all .3s ease;
|
|
107
|
+
-o-transition: all .3s ease;
|
|
108
|
+
transition: all .3s ease-out;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
#google-connect span {
|
|
112
|
+
box-sizing: border-box;
|
|
113
|
+
color: rgb(220, 74, 61);
|
|
114
|
+
cursor: pointer;
|
|
115
|
+
text-align: center;
|
|
116
|
+
text-transform: uppercase;
|
|
117
|
+
border: 0px none rgb(220, 74, 61);
|
|
118
|
+
outline: rgb(255, 255, 255) none 0px;
|
|
119
|
+
-webkit-transition: all .3s ease;
|
|
120
|
+
-moz-transition: all .3s ease;
|
|
121
|
+
-ms-transition: all .3s ease;
|
|
122
|
+
-o-transition: all .3s ease;
|
|
123
|
+
transition: all .3s ease;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
#google-connect:hover span {
|
|
127
|
+
color: #FFF;
|
|
128
|
+
-webkit-transition: all .3s ease;
|
|
129
|
+
-moz-transition: all .3s ease;
|
|
130
|
+
-ms-transition: all .3s ease;
|
|
131
|
+
-o-transition: all .3s ease;
|
|
132
|
+
transition: all .3s ease;
|
|
133
|
+
}
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
module JindaGeneralConcern
|
|
2
|
+
extend ActiveSupport::Concern
|
|
3
|
+
|
|
4
|
+
def index
|
|
5
|
+
end
|
|
6
|
+
|
|
7
|
+
def logs
|
|
8
|
+
@xmains = Jinda::Xmain.all.desc(:created_at).page(params[:page]).per(10)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
def error_logs
|
|
12
|
+
@xmains = Jinda::Xmain.in(status:['E']).desc(:created_at).page(params[:page]).per(10)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def notice_logs
|
|
16
|
+
@notices= Jinda::Notice.desc(:created_at).page(params[:page]).per(10)
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def pending
|
|
20
|
+
@title= "Pending Tasks"
|
|
21
|
+
@xmains = Jinda::Xmain.in(status:['R','I']).asc(:created_at)
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def cancel
|
|
25
|
+
Jinda::Xmain.find(params[:id]).update_attributes :status=>'X'
|
|
26
|
+
if params[:return]
|
|
27
|
+
redirect_to params[:return]
|
|
28
|
+
else
|
|
29
|
+
redirect_to action:"pending"
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# process images from first level
|
|
34
|
+
def get_image(key, params)
|
|
35
|
+
doc = Jinda::Doc.create(
|
|
36
|
+
:name=> key.to_s,
|
|
37
|
+
:xmain=> @xmain.id,
|
|
38
|
+
:runseq=> @runseq.id,
|
|
39
|
+
:filename=> params.original_filename,
|
|
40
|
+
:content_type => params.content_type || 'application/zip',
|
|
41
|
+
:data_text=> '',
|
|
42
|
+
:ma_display=>true,
|
|
43
|
+
:ma_secured => @xmain.service.ma_secured )
|
|
44
|
+
if defined?(IMAGE_LOCATION)
|
|
45
|
+
filename = "#{IMAGE_LOCATION}/f#{Param.gen(:asset_id)}"
|
|
46
|
+
File.open(filename,"wb") { |f| f.write(params.read) }
|
|
47
|
+
# File.open(filename,"wb") { |f| f.puts(params.read) }
|
|
48
|
+
eval "@xvars[@runseq.code][key] = '#{url_for(:action=>'document', :id=>doc.id, :only_path => true )}' "
|
|
49
|
+
doc.update_attributes :url => filename, :basename => File.basename(filename), :cloudinary => false
|
|
50
|
+
else
|
|
51
|
+
result = Cloudinary::Uploader.upload(params)
|
|
52
|
+
eval %Q{ @xvars[@runseq.code][key] = '#{result["url"]}' }
|
|
53
|
+
doc.update_attributes :url => result["url"], :basename => File.basename(result["url"]), :cloudinary => true
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# process images from second level, e.g,, fields_for
|
|
58
|
+
# save uploaded file info to Doc
|
|
59
|
+
def get_image1(key, key1, params)
|
|
60
|
+
doc = Jinda::Doc.create(
|
|
61
|
+
:name=> "#{key}_#{key1}",
|
|
62
|
+
:xmain=> @xmain.id,
|
|
63
|
+
:runseq=> @runseq.id,
|
|
64
|
+
:filename=> params.original_filename,
|
|
65
|
+
:content_type => params.content_type || 'application/zip',
|
|
66
|
+
:data_text=> '',
|
|
67
|
+
:dscan=> '',
|
|
68
|
+
:description=>'',
|
|
69
|
+
:keywords=>'',
|
|
70
|
+
:category=>'',
|
|
71
|
+
:ma_display=>true, :ma_secured => @xmain.service.ma_secured )
|
|
72
|
+
if defined?(IMAGE_LOCATION)
|
|
73
|
+
filename = "#{IMAGE_LOCATION}/f#{Param.gen(:asset_id)}"
|
|
74
|
+
File.open(filename,"wb") { |f| f.write(params.read) }
|
|
75
|
+
eval "@xvars[@runseq.code][key][key1] = '#{url_for(:action=>'document', :id=>doc.id, :only_path => true)}' "
|
|
76
|
+
doc.update_attributes :url => filename,
|
|
77
|
+
:basename => File.basename(filename),
|
|
78
|
+
:cloudinary => false,
|
|
79
|
+
:dscan => @xvars[@runseq.code][key][key1],
|
|
80
|
+
:user_id => @xvars["user_id"]
|
|
81
|
+
else
|
|
82
|
+
result = Cloudinary::Uploader.upload(params)
|
|
83
|
+
eval %Q{ @xvars[@runseq.code][key][key1] = '#{result["url"]}' }
|
|
84
|
+
doc.update_attributes :url => result["url"], :basename => File.basename(result["url"]), :cloudinary => true, :dscan => @xvars[@runseq.code][key][key1]
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
def doc_print
|
|
89
|
+
render :file=>'public/doc.html', :layout=>'layouts/print'
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
# generate documentation for application
|
|
93
|
+
# search data from Doc
|
|
94
|
+
def document
|
|
95
|
+
doc = Jinda::Doc.find params[:id]
|
|
96
|
+
if doc.cloudinary
|
|
97
|
+
require 'net/http'
|
|
98
|
+
require "uri"
|
|
99
|
+
uri = URI.parse(doc.url)
|
|
100
|
+
data = Net::HTTP.get_response(uri)
|
|
101
|
+
send_data(data.body, :filename=>doc.filename, :type=>doc.content_type, :disposition=>"inline")
|
|
102
|
+
else
|
|
103
|
+
data= read_binary(doc.url)
|
|
104
|
+
send_data(data, :filename=>doc.filename, :type=>doc.content_type, :disposition=>"inline")
|
|
105
|
+
end
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
def doc
|
|
109
|
+
require 'rdoc'
|
|
110
|
+
@app= get_app
|
|
111
|
+
@intro = File.read('README.md')
|
|
112
|
+
@print= "<div align='right'><img src='/assets/printer.png'/> <a href='/jinda/doc_print' target='_blank'/>Print</a></div>"
|
|
113
|
+
doc= render_to_string 'doc.md', :layout => false
|
|
114
|
+
html= Maruku.new(doc).to_html
|
|
115
|
+
File.open('public/doc.html','w') {|f| f.puts html }
|
|
116
|
+
respond_to do |format|
|
|
117
|
+
format.html {
|
|
118
|
+
render :plain=> @print+html, :layout => 'layouts/jqm/_page'
|
|
119
|
+
# render :text=> Maruku.new(doc).to_html, :layout => false
|
|
120
|
+
# format.html {
|
|
121
|
+
# h = RDoc::Markup::ToHtml.new
|
|
122
|
+
# render :text=> h.convert(doc), :layout => 'layouts/_page'
|
|
123
|
+
}
|
|
124
|
+
format.pdf {
|
|
125
|
+
latex= Maruku.new(doc).to_latex
|
|
126
|
+
File.open('tmp/doc.md','w') {|f| f.puts doc}
|
|
127
|
+
File.open('tmp/doc.tex','w') {|f| f.puts latex}
|
|
128
|
+
# system('pdflatex tmp/doc.tex ')
|
|
129
|
+
# send_file( 'tmp/doc.pdf', :type => ‘application/pdf’,
|
|
130
|
+
# :disposition => ‘inline’, :filename => 'doc.pdf')
|
|
131
|
+
render :plain=>'done'
|
|
132
|
+
}
|
|
133
|
+
end
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
def status
|
|
137
|
+
@xmain= Jinda::Xmain.where(:xid=>params[:xid]).first
|
|
138
|
+
@title= "Task number #{params[:xid]} #{@xmain.name}"
|
|
139
|
+
@backbtn= true
|
|
140
|
+
@xvars= @xmain.xvars
|
|
141
|
+
# flash.now[:notice]= "รายการ #{@xmain.id} ได้ถูกยกเลิกแล้ว" if @xmain.status=='X'
|
|
142
|
+
ma_log "Task #{@xmain.id} is cancelled" if @xmain.status=='X'
|
|
143
|
+
# flash.now[:notice]= "transaction #{@xmain.id} was cancelled" if @xmain.status=='X'
|
|
144
|
+
rescue
|
|
145
|
+
refresh_to "/", :alert => "Could not find task number <b> #{params[:xid]} </b>"
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
def help
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
def search
|
|
152
|
+
@q = params[:q] || params[:ma_search][:q] || ""
|
|
153
|
+
@title = "Search Result #{@q}"
|
|
154
|
+
@backbtn= true
|
|
155
|
+
@cache= true
|
|
156
|
+
if @q.blank?
|
|
157
|
+
redirect_to "/"
|
|
158
|
+
else
|
|
159
|
+
s= GmaSearch.create :q=>@q, :ip=> request.env["REMOTE_ADDR"]
|
|
160
|
+
do_search
|
|
161
|
+
end
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
def err404
|
|
165
|
+
# ma_log 'ERROR', 'main/err404'
|
|
166
|
+
flash[:notice] = "We're sorry, but something went wrong. We've been notified about this issue and we'll take a look at it shortly."
|
|
167
|
+
ma_log "We're sorry, but something went wrong. We've been notified about this issue and we'll take a look at it shortly."
|
|
168
|
+
redirect_to '/'
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
def err500
|
|
172
|
+
# ma_log 'ERROR', 'main/err500'
|
|
173
|
+
flash[:notice] = "We're sorry, but something went wrong. We've been notified about this issue and we'll take a look at it shortly."
|
|
174
|
+
ma_log "We're sorry, but something went wrong. We've been notified about this issue and we'll take a look at it shortly."
|
|
175
|
+
redirect_to '/'
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
end
|
|
179
|
+
|
|
@@ -0,0 +1,365 @@
|
|
|
1
|
+
module JindaRunConcern
|
|
2
|
+
extend ActiveSupport::Concern
|
|
3
|
+
|
|
4
|
+
def run_form
|
|
5
|
+
init_vars(params[:id])
|
|
6
|
+
if authorize?
|
|
7
|
+
if ['F', 'X'].include? @xmain.status
|
|
8
|
+
redirect_to_root
|
|
9
|
+
else
|
|
10
|
+
service= @xmain.service
|
|
11
|
+
###############################################################################################
|
|
12
|
+
# Run View Form f created template by jinda rake follow freemind mm file
|
|
13
|
+
###############################################################################################
|
|
14
|
+
if service
|
|
15
|
+
@title= "Transaction ID #{@xmain.xid}: #{@xmain.name} / #{@runseq.name}"
|
|
16
|
+
fhelp= "app/views/#{service.module.code}/#{service.code}/#{@runseq.code}.md"
|
|
17
|
+
###############################################################################################
|
|
18
|
+
# Check if help file available for this form
|
|
19
|
+
###############################################################################################
|
|
20
|
+
@help = File.read(fhelp) if File.exists?(fhelp)
|
|
21
|
+
f= "app/views/#{service.module.code}/#{service.code}/#{@runseq.code}.html.erb"
|
|
22
|
+
if File.file?(f)
|
|
23
|
+
@ui= File.read(f)
|
|
24
|
+
else
|
|
25
|
+
# flash[:notice]= "Error: Can not find the view file for this controller"
|
|
26
|
+
ma_log "Error: Can not find the view file for this controller"
|
|
27
|
+
redirect_to_root
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
init_vars(params[:id])
|
|
31
|
+
end
|
|
32
|
+
else
|
|
33
|
+
redirect_to_root
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
def run_if
|
|
38
|
+
init_vars(params[:id])
|
|
39
|
+
condition= eval(@runseq.code).to_s
|
|
40
|
+
match_found= false
|
|
41
|
+
if condition
|
|
42
|
+
xml= REXML::Document.new(@runseq.xml).root
|
|
43
|
+
next_runseq= nil
|
|
44
|
+
text = xml.elements['//node/node'].attributes['TEXT']
|
|
45
|
+
match, name= text.split(':',2)
|
|
46
|
+
label= name2code(name.strip)
|
|
47
|
+
if condition==match
|
|
48
|
+
if label=="end"
|
|
49
|
+
@end_job= true
|
|
50
|
+
else
|
|
51
|
+
next_runseq= @xmain.runseqs.where(:code=> label, :action.ne=>'redirect').first
|
|
52
|
+
match_found= true if next_runseq
|
|
53
|
+
@runseq_not_f= false
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
unless match_found || @end_job
|
|
58
|
+
next_runseq= @xmain.runseqs.where( rstep:(@xvars['current_step']+1) ).first
|
|
59
|
+
end
|
|
60
|
+
end_action(next_runseq)
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# redirect when finish last runseq
|
|
64
|
+
# eg: http://localhost:3000/notes/my
|
|
65
|
+
def run_direct_to
|
|
66
|
+
init_vars(params[:id])
|
|
67
|
+
next_runseq= @xmain.runseqs.where(:id.ne=>@runseq.id, :code=>@runseq.code).first
|
|
68
|
+
if !@runseq.code.blank?
|
|
69
|
+
@xvars['p']['return'] = @runseq.code
|
|
70
|
+
else
|
|
71
|
+
flash[:notice]= "Error: missing required forward path in Freemind"
|
|
72
|
+
ma_log "Error: require forward path in Freemind"
|
|
73
|
+
end
|
|
74
|
+
end_action(next_runseq)
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
def run_redirect
|
|
78
|
+
init_vars(params[:id])
|
|
79
|
+
# next_runseq= @xmain.runseqs.first :conditions=>["id != ? AND code = ?",@runseq.id, @runseq.code]
|
|
80
|
+
next_runseq= @xmain.runseqs.where(:id.ne=>@runseq.id, :code=>@runseq.code).first
|
|
81
|
+
@xmain.current_runseq= next_runseq.id
|
|
82
|
+
end_action(next_runseq)
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# call controller to do the freemind task using Star symbol eg: Update
|
|
86
|
+
# not for run_form
|
|
87
|
+
def run_do
|
|
88
|
+
init_vars(params[:id])
|
|
89
|
+
@runseq.start ||= Time.now
|
|
90
|
+
@runseq.status= 'R' # running
|
|
91
|
+
$runseq_id= @runseq.id
|
|
92
|
+
$user_id= current_ma_user.try(:id)
|
|
93
|
+
# $xmain, $runseq, $user, $xvars, $ip from local
|
|
94
|
+
set_global
|
|
95
|
+
controller = Kernel.const_get(@xvars['custom_controller']).new
|
|
96
|
+
result = controller.send(@runseq.code)
|
|
97
|
+
# save local var to database
|
|
98
|
+
init_vars_by_runseq($runseq_id)
|
|
99
|
+
@xvars = $xvars
|
|
100
|
+
@xvars[@runseq.code.to_sym]= result.to_s
|
|
101
|
+
@xvars['current_step']= @runseq.rstep
|
|
102
|
+
@runseq.status= 'F' #finish
|
|
103
|
+
@runseq.stop= Time.now
|
|
104
|
+
@runseq.save
|
|
105
|
+
end_action
|
|
106
|
+
rescue => e
|
|
107
|
+
@xmain.status='E'
|
|
108
|
+
@xvars['error']= e.to_s+e.backtrace.to_s
|
|
109
|
+
@xmain.xvars= $xvars
|
|
110
|
+
@xmain.save
|
|
111
|
+
@runseq.status= 'F' #finish
|
|
112
|
+
@runseq.stop= Time.now
|
|
113
|
+
@runseq.save
|
|
114
|
+
refresh_to "/", :alert => "Sorry opeation error at #{@xmain.id} #{@xvars['error']}"
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
def run_list
|
|
118
|
+
init_vars(params[:id])
|
|
119
|
+
service= @xmain.service
|
|
120
|
+
# disp= get_option("display")
|
|
121
|
+
# disp = Nil or :"??????"
|
|
122
|
+
# get option from last node: rule, role, display
|
|
123
|
+
disp= get_option("display")
|
|
124
|
+
# change from Nil to false and string to true
|
|
125
|
+
ma_display = (disp && !affirm(disp)) ? false : true
|
|
126
|
+
# Todo check if file is available
|
|
127
|
+
# if service and file exist
|
|
128
|
+
# ma_display from disp of 3rd level node as rule, role, display
|
|
129
|
+
if service && !@runseq.code.blank?
|
|
130
|
+
f= "app/views/#{service.module.code}/#{service.code}/#{@runseq.code}.html.erb"
|
|
131
|
+
@ui= File.read(f)
|
|
132
|
+
if Jinda::Doc.where(:runseq_id=>@runseq.id).exists?
|
|
133
|
+
@doc= Jinda::Doc.where(:runseq_id=>@runseq.id).first
|
|
134
|
+
@doc.update_attributes :data_text=> render_to_string(:inline=>@ui, :layout=>"utf8"),
|
|
135
|
+
:xmain=>@xmain, :runseq=>@runseq, :user=>current_ma_user,
|
|
136
|
+
:ip=> get_ip, :service=>service, :ma_display=>ma_display,
|
|
137
|
+
:ma_secured => @xmain.service.ma_secured,
|
|
138
|
+
:filename => "#{@runseq.code}.html.erb"
|
|
139
|
+
else
|
|
140
|
+
@doc= Jinda::Doc.create :name=> @runseq.name,
|
|
141
|
+
:content_type=>"output", :data_text=> render_to_string(:inline=>@ui, :layout=>"utf8"),
|
|
142
|
+
:xmain=>@xmain, :runseq=>@runseq, :user=>current_ma_user,
|
|
143
|
+
:ip=> get_ip, :service=>service, :ma_display=>ma_display,
|
|
144
|
+
:ma_secured => @xmain.service.ma_secured,
|
|
145
|
+
:filename => "#{@runseq.code}.html.erb"
|
|
146
|
+
end
|
|
147
|
+
# @message = defined?(MSG_NEXT) ? MSG_NEXT : "Next >"
|
|
148
|
+
@message = defined?(MSG_NEXT) ? MSG_NEXT : "Next >>"
|
|
149
|
+
@message = "Finish" if @runseq.end
|
|
150
|
+
ma_log("Todo defined?(NSG_NEXT : Next >>)")
|
|
151
|
+
eval "@xvars[@runseq.code] = url_for(:controller=>'jinda', :action=>'document', :id=>@doc.id)"
|
|
152
|
+
else
|
|
153
|
+
flash[:notice]= "Error: Can not find the view file for this controller"
|
|
154
|
+
ma_log "Error: Can not find the view file for this controller"
|
|
155
|
+
redirect_to_root
|
|
156
|
+
end
|
|
157
|
+
# Check if ma_display available
|
|
158
|
+
# ma_display= get_option("display")
|
|
159
|
+
# if not ma_display then no display both controller-view and content then end back to root
|
|
160
|
+
unless ma_display
|
|
161
|
+
end_action
|
|
162
|
+
end
|
|
163
|
+
# controller display from @ui
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
def run_folder
|
|
167
|
+
init_vars(params[:id])
|
|
168
|
+
service= @xmain.service
|
|
169
|
+
# disp= get_option("display")
|
|
170
|
+
# disp = Nil or :"??????"
|
|
171
|
+
disp= get_option("display")
|
|
172
|
+
ma_display = (disp && !affirm(disp)) ? false : true
|
|
173
|
+
# Todo check if file is available
|
|
174
|
+
# if service and file exist
|
|
175
|
+
if service && !@runseq.code.blank?
|
|
176
|
+
f= "app/views/#{service.module.code}/#{service.code}/#{@runseq.code}.html.erb"
|
|
177
|
+
@ui= File.read(f)
|
|
178
|
+
if Jinda::Doc.where(:runseq_id=>@runseq.id).exists?
|
|
179
|
+
@doc= Jinda::Doc.where(:runseq_id=>@runseq.id).first
|
|
180
|
+
@doc.update_attributes :data_text=> render_to_string(:inline=>@ui, :layout=>"utf8"),
|
|
181
|
+
:xmain=>@xmain, :runseq=>@runseq, :user=>current_ma_user,
|
|
182
|
+
:ip=> get_ip, :service=>service, :ma_display=>ma_display,
|
|
183
|
+
:ma_secured => @xmain.service.ma_secured,
|
|
184
|
+
:filename => "#{@runseq.code}.html.erb"
|
|
185
|
+
else
|
|
186
|
+
@doc= Jinda::Doc.create :name=> @runseq.name,
|
|
187
|
+
:content_type=>"output", :data_text=> render_to_string(:inline=>@ui, :layout=>"utf8"),
|
|
188
|
+
:xmain=>@xmain, :runseq=>@runseq, :user=>current_ma_user,
|
|
189
|
+
:ip=> get_ip, :service=>service, :ma_display=>ma_display,
|
|
190
|
+
:ma_secured => @xmain.service.ma_secured,
|
|
191
|
+
:filename => "#{@runseq.code}.html.erb"
|
|
192
|
+
end
|
|
193
|
+
# @message = defined?(MSG_NEXT) ? MSG_NEXT : "Next >"
|
|
194
|
+
@message = defined?(MSG_NEXT) ? MSG_NEXT : "Next >>"
|
|
195
|
+
@message = "Finish" if @runseq.end
|
|
196
|
+
ma_log("Todo defined?(NSG_NEXT : Next >>)")
|
|
197
|
+
eval "@xvars[@runseq.code] = url_for(:controller=>'jinda', :action=>'document', :id=>@doc.id)"
|
|
198
|
+
else
|
|
199
|
+
flash[:notice]= "Error: Can not find the view file for this controller"
|
|
200
|
+
ma_log "Error: Can not find the view file for this controller"
|
|
201
|
+
redirect_to_root
|
|
202
|
+
end
|
|
203
|
+
# Check if ma_display available
|
|
204
|
+
# ma_display= get_option("display")
|
|
205
|
+
unless ma_display
|
|
206
|
+
end_action
|
|
207
|
+
end
|
|
208
|
+
# controller display from @ui
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
def run_output
|
|
212
|
+
init_vars(params[:id])
|
|
213
|
+
service= @xmain.service
|
|
214
|
+
# disp= get_option("display")
|
|
215
|
+
# disp = Nil or :"??????"
|
|
216
|
+
disp= get_option("display")
|
|
217
|
+
ma_display = (disp && !affirm(disp)) ? false : true
|
|
218
|
+
# Todo check if file is available
|
|
219
|
+
# if service and file exist
|
|
220
|
+
if service && !@runseq.code.blank?
|
|
221
|
+
f= "app/views/#{service.module.code}/#{service.code}/#{@runseq.code}.html.erb"
|
|
222
|
+
@ui= File.read(f)
|
|
223
|
+
if Jinda::Doc.where(:runseq_id=>@runseq.id).exists?
|
|
224
|
+
@doc= Jinda::Doc.where(:runseq_id=>@runseq.id).first
|
|
225
|
+
@doc.update_attributes :data_text=> render_to_string(:inline=>@ui, :layout=>"utf8"),
|
|
226
|
+
:xmain=>@xmain, :runseq=>@runseq, :user=>current_ma_user,
|
|
227
|
+
:ip=> get_ip, :service=>service, :ma_display=>ma_display,
|
|
228
|
+
:ma_secured => @xmain.service.ma_secured,
|
|
229
|
+
:filename => "#{@runseq.code}.html.erb"
|
|
230
|
+
else
|
|
231
|
+
@doc= Jinda::Doc.create :name=> @runseq.name,
|
|
232
|
+
:content_type=>"output", :data_text=> render_to_string(:inline=>@ui, :layout=>"utf8"),
|
|
233
|
+
:xmain=>@xmain, :runseq=>@runseq, :user=>current_ma_user,
|
|
234
|
+
:ip=> get_ip, :service=>service, :ma_display=>ma_display,
|
|
235
|
+
:ma_secured => @xmain.service.ma_secured,
|
|
236
|
+
:filename => "#{@runseq.code}.html.erb"
|
|
237
|
+
end
|
|
238
|
+
# @message = defined?(MSG_NEXT) ? MSG_NEXT : "Next >"
|
|
239
|
+
@message = defined?(MSG_NEXT) ? MSG_NEXT : "Next >>"
|
|
240
|
+
@message = "Finish" if @runseq.end
|
|
241
|
+
ma_log("Todo defined?(NSG_NEXT : Next >>)")
|
|
242
|
+
eval "@xvars[@runseq.code] = url_for(:controller=>'jinda', :action=>'document', :id=>@doc.id)"
|
|
243
|
+
else
|
|
244
|
+
flash[:notice]= "Error: Can not find the view file for this controller"
|
|
245
|
+
ma_log "Error: Can not find the view file for this controller"
|
|
246
|
+
redirect_to_root
|
|
247
|
+
end
|
|
248
|
+
# Check if ma_display available
|
|
249
|
+
# ma_display= get_option("display")
|
|
250
|
+
unless ma_display
|
|
251
|
+
end_action
|
|
252
|
+
end
|
|
253
|
+
# controller display from @ui
|
|
254
|
+
end
|
|
255
|
+
|
|
256
|
+
def run_mail
|
|
257
|
+
init_vars(params[:id])
|
|
258
|
+
service= @xmain.service
|
|
259
|
+
f= "app/views/#{service.module.code}/#{service.code}/#{@runseq.code}.html.erb"
|
|
260
|
+
@ui= File.read(f).html_safe
|
|
261
|
+
@doc= Jinda::Doc.create :name=> @runseq.name,
|
|
262
|
+
:content_type=>"mail", :data_text=> render_to_string(:inline=>@ui, :layout=>false),
|
|
263
|
+
:xmain=>@xmain, :runseq=>@runseq, :user=>current_ma_user,
|
|
264
|
+
:ip=> get_ip, :service=>service, :ma_display=>false,
|
|
265
|
+
:ma_secured => @xmain.service.ma_secured
|
|
266
|
+
eval "@xvars[:#{@runseq.code}] = url_for(:controller=>'jinda', :action=>'document', :id=>@doc.id)"
|
|
267
|
+
mail_from = get_option('from')
|
|
268
|
+
# sender= render_to_string(:inline=>mail_from) if mail_from
|
|
269
|
+
mail_to = get_option('to')
|
|
270
|
+
recipients= render_to_string(:inline=>mail_to) if mail_to
|
|
271
|
+
mail_subject = get_option('subject')
|
|
272
|
+
subject= render_to_string(:inline=>mail_subject) || "#{@runseq.name}"
|
|
273
|
+
JindaMailer.gmail(@doc.data_text, recipients, subject).deliver unless DONT_SEND_MAIL
|
|
274
|
+
end_action
|
|
275
|
+
end
|
|
276
|
+
|
|
277
|
+
def end_output
|
|
278
|
+
init_vars(params[:xmain_id])
|
|
279
|
+
end_action
|
|
280
|
+
end
|
|
281
|
+
|
|
282
|
+
# Store params to @xvars[@runseq]
|
|
283
|
+
# Perform task from the form input eg: attach file
|
|
284
|
+
# replace end_action (for form)
|
|
285
|
+
# Store params attach file to @xvars to use in get_image
|
|
286
|
+
def end_form
|
|
287
|
+
if params[:xmain_id]
|
|
288
|
+
init_vars(params[:xmain_id])
|
|
289
|
+
else
|
|
290
|
+
ma_log "Known Bug : repeated end_form "
|
|
291
|
+
redirect_to_root and return
|
|
292
|
+
end
|
|
293
|
+
eval "@xvars[@runseq.code] = {} unless @xvars[@runseq.code]"
|
|
294
|
+
# Search for uploaded file name if exist
|
|
295
|
+
params.each { |k,v|
|
|
296
|
+
if params[k].respond_to? :original_filename
|
|
297
|
+
get_image(k, params[k])
|
|
298
|
+
# check if params of array in form eg: edit_article
|
|
299
|
+
elsif params[k].is_a?(ActionController::Parameters)
|
|
300
|
+
eval "@xvars[@runseq.code][k] = {} unless @xvars[@runseq.code][k]"
|
|
301
|
+
params[k].each { |k1,v1|
|
|
302
|
+
# eval "@xvars[@runseq.code][k1] = params.require(k1).permit(k1)"
|
|
303
|
+
eval "@xvars[@runseq.code][k][k1] = v1"
|
|
304
|
+
next unless v1.respond_to?(:original_filename)
|
|
305
|
+
doc = {}
|
|
306
|
+
get_image1(k, k1, params[k][k1])
|
|
307
|
+
}
|
|
308
|
+
else
|
|
309
|
+
# No file attached
|
|
310
|
+
#
|
|
311
|
+
# https://stackoverflow.com/questions/34949505/rails-5-unable-to- retrieve-hash-values-from-parameter # bug in to_unsalfe_h rails 5.1.6 https://github.com/getsentry/raven-ruby/issues/799
|
|
312
|
+
# Solution:
|
|
313
|
+
# https://stackoverflow.com/questions/34949505/rails-5-unable-to-retrieve-hash-values-from-parameter
|
|
314
|
+
# v = v.to_unsafe_h unless v.class == String
|
|
315
|
+
# v = params.require[k] unless v.class == String
|
|
316
|
+
v = v.to_s unless v.class == String
|
|
317
|
+
# Create @xvars[@runseq.code]
|
|
318
|
+
eval "@xvars[@runseq.code][k] = v"
|
|
319
|
+
end
|
|
320
|
+
}
|
|
321
|
+
end_action
|
|
322
|
+
rescue => e
|
|
323
|
+
@xmain.status='E'
|
|
324
|
+
@xvars['error']= e.to_s+e.backtrace.to_s
|
|
325
|
+
@xmain.xvars= $xvars
|
|
326
|
+
@xmain.save
|
|
327
|
+
@runseq.status= 'F' #finish
|
|
328
|
+
@runseq.stop= Time.now
|
|
329
|
+
@runseq.save
|
|
330
|
+
ma_log "Error:end_form "
|
|
331
|
+
refresh_to "/", :alert => "Sorry opeation error at #{@xmain.id} #{@xvars['error']}"
|
|
332
|
+
end
|
|
333
|
+
|
|
334
|
+
def end_action(next_runseq = nil)
|
|
335
|
+
# not for form
|
|
336
|
+
# @runseq.status='F' unless @runseq_not_f
|
|
337
|
+
@xmain.xvars= @xvars
|
|
338
|
+
@xmain.status= 'R' # running
|
|
339
|
+
@xmain.save!
|
|
340
|
+
@runseq.status='F'
|
|
341
|
+
@runseq.user= current_ma_user
|
|
342
|
+
@runseq.stop= Time.now
|
|
343
|
+
@runseq.save
|
|
344
|
+
next_runseq= @xmain.runseqs.where(:rstep=> @runseq.rstep+1).first unless next_runseq
|
|
345
|
+
if @end_job || !next_runseq # job finish
|
|
346
|
+
@xmain.xvars= @xvars
|
|
347
|
+
@xmain.status= 'F' unless @xmain.status== 'E' # finish
|
|
348
|
+
@xmain.stop= Time.now
|
|
349
|
+
@xmain.save
|
|
350
|
+
if @xvars['p']['return']
|
|
351
|
+
redirect_to @xvars['p']['return'] and return
|
|
352
|
+
else
|
|
353
|
+
if @user
|
|
354
|
+
redirect_to :action=>'index' and return
|
|
355
|
+
else
|
|
356
|
+
redirect_to_root and return
|
|
357
|
+
end
|
|
358
|
+
end
|
|
359
|
+
else
|
|
360
|
+
@xmain.update_attribute :current_runseq, next_runseq.id
|
|
361
|
+
redirect_to :action=>'run', :id=>@xmain.id and return
|
|
362
|
+
end
|
|
363
|
+
end
|
|
364
|
+
|
|
365
|
+
end
|