From fc31d6345b57bef1447d44a1585f4ca0a2721a11 Mon Sep 17 00:00:00 2001 From: Taka Date: Sat, 27 Oct 2018 14:53:06 +0000 Subject: [PATCH] Minor UI changes. --- vasl_templates/server_settings.py | 5 ++++- vasl_templates/ui/server_settings.ui | 2 +- vasl_templates/webapp/file_server/vasl_mod.py | 1 + vasl_templates/webapp/static/css/main.css | 4 ++-- .../webapp/static/css/user-settings-dialog.css | 4 +++- vasl_templates/webapp/static/images/hint.gif | Bin 0 -> 984 bytes vasl_templates/webapp/static/images/info.gif | Bin 0 -> 1114 bytes vasl_templates/webapp/static/simple_notes.js | 2 +- vasl_templates/webapp/static/user_settings.js | 17 ++--------------- .../webapp/templates/user-settings-dialog.html | 9 ++++++--- 10 files changed, 20 insertions(+), 24 deletions(-) create mode 100644 vasl_templates/webapp/static/images/hint.gif create mode 100644 vasl_templates/webapp/static/images/info.gif diff --git a/vasl_templates/server_settings.py b/vasl_templates/server_settings.py index 570e913..bd165f0 100644 --- a/vasl_templates/server_settings.py +++ b/vasl_templates/server_settings.py @@ -9,7 +9,7 @@ from PyQt5.QtGui import QIcon from vasl_templates.main import app_settings from vasl_templates.main_window import MainWindow from vasl_templates.webapp.config.constants import DATA_DIR -from vasl_templates.webapp.file_server.vasl_mod import VaslMod +from vasl_templates.webapp.file_server.vasl_mod import VaslMod, SUPPORTED_VASL_MOD_VERSIONS_DISPLAY from vasl_templates.webapp.files import install_vasl_mod # --------------------------------------------------------------------- @@ -38,6 +38,9 @@ class ServerSettingsDialog( QDialog ): # load the current server settings self.vasl_mod.setText( app_settings.value( "ServerSettings/vasl-mod" ) ) + self.vasl_mod.setToolTip( + "Supported versions: {}".format( SUPPORTED_VASL_MOD_VERSIONS_DISPLAY ) + ) def on_select_vasl_mod( self ): """Let the user select a VASL module.""" diff --git a/vasl_templates/ui/server_settings.ui b/vasl_templates/ui/server_settings.ui index 83b83b4..0e4a54d 100644 --- a/vasl_templates/ui/server_settings.ui +++ b/vasl_templates/ui/server_settings.ui @@ -9,7 +9,7 @@ 0 0 - 400 + 500 90 diff --git a/vasl_templates/webapp/file_server/vasl_mod.py b/vasl_templates/webapp/file_server/vasl_mod.py index 85916b0..7b30edd 100644 --- a/vasl_templates/webapp/file_server/vasl_mod.py +++ b/vasl_templates/webapp/file_server/vasl_mod.py @@ -12,6 +12,7 @@ _logger = logging.getLogger( "vasl_mod" ) from vasl_templates.webapp.file_server.utils import get_vo_gpids, get_effective_gpid SUPPORTED_VASL_MOD_VERSIONS = [ "6.3.3", "6.4.0", "6.4.1", "6.4.2", "6.4.3" ] +SUPPORTED_VASL_MOD_VERSIONS_DISPLAY = "6.3.3, 6.4.0-6.4.3" # --------------------------------------------------------------------- diff --git a/vasl_templates/webapp/static/css/main.css b/vasl_templates/webapp/static/css/main.css index bd0e77f..cb9ef4d 100644 --- a/vasl_templates/webapp/static/css/main.css +++ b/vasl_templates/webapp/static/css/main.css @@ -6,7 +6,7 @@ body { font-family: Arial, Helvetica, sans-serif ; font-size: 16px ; } ul, ol { margin: 0.5em 0 0 1.25em ; } -input[type="text"] { height: 20px ; border: 1px solid #c5c5c5 ; } +input[type="text"] { height: 20px ; border: 1px solid #c5c5c5 ; padding: 0 2px ; } label { height: 1.25em ; margin-top: -3px ; } /* -------------------------------------------------------------------- */ @@ -37,7 +37,7 @@ button.edit-template { height: 30px ; padding: 4px 10px ; } button.edit-template img { height: 18px ; vertical-align: middle ; margin-right: 0.25em ; } .ui-dialog-titlebar { padding: 0.2em 0.5em 0.2em 0.5em !important ; } -.ui-dialog-titlebar img.flag { height: 1em ; margin-right: 0.25em ; } +.ui-dialog-titlebar img.flag { height: 0.9em ; margin-right: 0.25em ; } .ui-dialog-titlebar-close { margin-top: -10px !important ; } .ui-dialog-content p { margin-bottom: 0.5em ; } .ui-dialog-buttonpane button.ok { background: #ddd ; } diff --git a/vasl_templates/webapp/static/css/user-settings-dialog.css b/vasl_templates/webapp/static/css/user-settings-dialog.css index e68fcb1..335685e 100644 --- a/vasl_templates/webapp/static/css/user-settings-dialog.css +++ b/vasl_templates/webapp/static/css/user-settings-dialog.css @@ -1,4 +1,6 @@ .ui-dialog.user-settings .ui-dialog-titlebar { background: #80d0ff ; } .ui-dialog.user-settings .ui-dialog-buttonpane { border: none ; padding: 0 ; font-size: 75% ; } -.ui-dialog.user-settings .note { font-size: 80% ; font-style: italic ; color: #666 ; } +.ui-dialog.user-settings fieldset { border-radius: 0 ; } +.ui-dialog.user-settings .run-as-server-note { margin-bottom: 0.5em ; font-size: 80% ; font-style: italic ; color: #666 ; } +.ui-dialog.user-settings .run-as-server-note img { float: left ; margin-right: 0.25em ; } diff --git a/vasl_templates/webapp/static/images/hint.gif b/vasl_templates/webapp/static/images/hint.gif new file mode 100644 index 0000000000000000000000000000000000000000..eb51b4e0f4a99881da574e91067bd56f650cc2d3 GIT binary patch literal 984 zcmeHGO-vI(7=6=r*|rp{V=#r7P?R8Qqu8P;(L)pe&~QM#5W=B|fu0m2WI1Tqf<2gc zAO@kJAsmPY1yV>LC15PZ@RwdZHQfd&S`H>XnI%#b*KfIb_3TT&Z{EK7-pn_Xoom;x zdTW{;aNtJ`G-&Z5MLIHpcPu;mu@~5WUT! zO<4B`%WiT0MBZnQu;LasJVNY@nDz*(ZgJBithq(}$G_eHS7fpd0+RZuG#Y5zM3}R%r$56&noTBwAsf?1MqtAwG<77U=BWW1S|hydtH9f(i*? zEKueNo(e?UQHfI0c_LzTp^iNUPpOU7lkJiw?P!{&Ms7_lNsM|RhvHW<`bbd((E3-p z_lUEwJsF1#9ok}B==lf5mcQO8uHwr+*}5+vQ9n4u}wPsYRy=wAf(S5*KX z@f8YA{BP)I)S)t#g%sZ3SN}F(lu`*wqwSie3k2d2;3URVnc)YXUa5@w$vg)eOI=1C z_0Lm)xh!Y0=;baw>2Ct&X)yDV+Q{f)ui5BqYN(PCvK`0^du3nnsr^`?%`eN##^Q7L z)LQ3QZIImH{WxGhezea!fY|(-5-Sc%j2S{Wg>zD6ZJrO)sXRuK7Fi%k%fw-xcqUWZyJj kN>4l~$UmHX(fehhqo%`a8w%cC>zi{ojGuL)>^Cm_0is{mrT_o{ literal 0 HcmV?d00001 diff --git a/vasl_templates/webapp/static/images/info.gif b/vasl_templates/webapp/static/images/info.gif new file mode 100644 index 0000000000000000000000000000000000000000..a8af546fb8c1d06d9797b66fb486066728d511f9 GIT binary patch literal 1114 zcmW-gYfMuI9L4*9wLDh}C@xGZx;Y6O8{2?o1T-S*1RoQPSs+8$R5Dy}!)(h~CQqrL zf`USAOF^(u1Y4ehNO{S_$$;``5mXRq3#HuKds|xQZT~Af`Q_w%Jm6t6voM+2Z9=Qt7yeY41if#D{Qm&G8T|>T! zQf{HtLe#DZwZDzhicwMtkU2mpu~IlzDi^3cu;W;1cP%uY$(|4Ilmfj3rSnaWT#FNz zaOM&&T*8${FnDG+zM084dzG%!1mI9^ajXER3UIy;o@LnPGR#c`ZZ*JsVBI2Ef4^+a ztKPb`!Rmio@p-XgSB3GTN~3S3@nfOUUufJd!au3O{i}>0G+IOMFNX=21B8ZvYGYuv z;mc~%S0Y1bts(TmYKRyQ6Pv@UmJZh}?X5HHufq>K)JKR72PK9`34XL5kCNyk8w^p6 zYbWX!PfIi>8?lp3_^B4t>1I5(75}~s|FKE^^J8s%n=YXZOK8V`XvfYz!OnH8#z`%S z?YhKvEU80xQHuO6RUPcKUg|>r>P0Sg>XN%xQ@V7&_vli4(bQgDdXFZfAIa)RvImfB zPnB1nA-T_x^ggs`NLx6x!Wn$adA?XOyuumQ@D-FbB17;GvCqki3EVd1!nKjSKL|h6-9$ z(58gPDzMdSSHlxENNp@akBaDBAo`RIP#Dv}I0_RO$T674ty6k z(AbCj=$|?!C94Z|9KOTaPw`;-P(!omyKnZgkNbrG;_Me47jcvqmLAFb&ZBBr5I|vW zLerJb-XSU9@UUC`*Y5_!QoMJvDjkdb;s>hO4dtTO=%&vqU! zUrCb4!X22qA~rE%7!_CMwua@TZohOjipdIf^>+(NPIK549PpFtCEvWW-a*kR0>9)v znNC|m3ilMm+gF{4ImTs;&UI(esE)4rm%EygBSL|x*=2i67uh{f-|Q0e=z=pdZ=3hA zGW#5t3rBeGRi^EuJIdUGT^VlkPjlW?$99Stp>w1yf#(N=#}gv{%%Wwg2MX>DWidth: ") ) ; + $btn_pane.prepend( $(" ") ) ; $width = $btn_pane.children( "input[name='width']" ) ; } // show/hide the width controls (nb: SSR's have a separate width setting that affects all of them) diff --git a/vasl_templates/webapp/static/user_settings.js b/vasl_templates/webapp/static/user_settings.js index 615da1c..e3dc8ec 100644 --- a/vasl_templates/webapp/static/user_settings.js +++ b/vasl_templates/webapp/static/user_settings.js @@ -37,33 +37,20 @@ function user_settings() unload_droplist: function( $elem ) { return $elem.children(":selected").val() ; }, } ; - function update_ui() { - // update the UI - var $dlg = $( ".ui-dialog.user-settings" ) ; - var is_server = $dlg.find( "input[name='include-vasl-images-in-snippets']" ).prop( "checked" ) || - $dlg.find( "input[name='include-flags-in-snippets']" ).prop( "checked" ) ; - $dlg.find( ".include-vasl-images-in-snippets-hint" ).css( - "color", is_server ? "#444" : "#aaa" - ) ; - } - // show the "user settings" dialog $( "#user-settings" ).dialog( { title: "User settings", dialogClass: "user-settings", modal: true, - width: 450, - height: 200, + width: 400, + height: 270, resizable: false, create: function() { init_dialog( $(this), "OK", false ) ; - $(this).find( "input[name='include-vasl-images-in-snippets']" ).change( update_ui ) ; - $(this).find( "input[name='include-flags-in-snippets']" ).change( update_ui ) ; }, open: function() { // load the current user settings load_settings( $(this) ) ; - update_ui() ; }, buttons: { OK: function() { diff --git a/vasl_templates/webapp/templates/user-settings-dialog.html b/vasl_templates/webapp/templates/user-settings-dialog.html index ef48b8a..df38bcb 100644 --- a/vasl_templates/webapp/templates/user-settings-dialog.html +++ b/vasl_templates/webapp/templates/user-settings-dialog.html @@ -9,10 +9,13 @@

-
+
Provide services to VASL +
+ + If you enable any of these options, this program must be running before you load the scenario in VASL. +
 Include VASL images in snippets
 Include flags in snippets -
This program must be running before you load the scenario in VASL.
-
+