diff --git a/vasl_templates/main_window.py b/vasl_templates/main_window.py index 8edafbe..f06ccbd 100644 --- a/vasl_templates/main_window.py +++ b/vasl_templates/main_window.py @@ -94,7 +94,7 @@ class MainWindow( QWidget ): self.restoreGeometry( val ) else : self.resize( 1000, 650 ) - self.setMinimumSize( 980, 630 ) + self.setMinimumSize( 1015, 630 ) # initialize the layout layout = QVBoxLayout( self ) diff --git a/vasl_templates/webapp/static/css/edit-vo-dialog.css b/vasl_templates/webapp/static/css/edit-vo-dialog.css index c253e5d..09c4774 100644 --- a/vasl_templates/webapp/static/css/edit-vo-dialog.css +++ b/vasl_templates/webapp/static/css/edit-vo-dialog.css @@ -24,7 +24,3 @@ .ui-dialog.edit-vo .fieldset .footer { margin-top: 0.25em ; display: flex ; align-items: center ; } .ui-dialog.edit-vo .fieldset .footer img.trash { margin: 3px 5px ; height: 24px ; } - -/* splitter */ -#edit-vo .gutter { position: relative ; margin: 12px 8em -12px 8em ; min-height: 3px ; background-color: #eee ; cursor: row-resize ; } -#edit-vo .gutter img { position: absolute ; left: 40% ; top: -2px ; } diff --git a/vasl_templates/webapp/static/css/lfa.css b/vasl_templates/webapp/static/css/lfa.css index 4abb710..8eed08b 100644 --- a/vasl_templates/webapp/static/css/lfa.css +++ b/vasl_templates/webapp/static/css/lfa.css @@ -23,8 +23,6 @@ #lfa .split.top-pane { display: flex ; min-height: 350px ; } #lfa .split.top-pane .right { position: relative ; } #lfa .split.bottom-pane { min-height: 200px ; position: relative ; } -#lfa .gutter { position: relative ; min-height: 3px ; background-color: #f0f0f0 ; cursor: row-resize ; z-index: 49 ; } -#lfa .gutter img { position: absolute ; left: 40% ; top: -2px ; } /* top pane: dr/DR distribution & pie charts */ #lfa .distrib { position: relative ; } diff --git a/vasl_templates/webapp/static/css/main.css b/vasl_templates/webapp/static/css/main.css index 72196cd..0720c25 100644 --- a/vasl_templates/webapp/static/css/main.css +++ b/vasl_templates/webapp/static/css/main.css @@ -37,7 +37,7 @@ label { height: 1.25em ; } .snippet-control .ui-selectmenu-button-closed { height: 26px ; } .snippet-control .ui-selectmenu-icon.ui-icon { margin-top: -8px ; } -button.edit-template { height: 28px ; padding: 4px 10px ; } +button.edit-template { height: 28px ; padding: 4px 10px ; margin-right: 0 ; } button.edit-template img { height: 18px ; vertical-align: middle ; margin: -2px 0.4em 0 0 ; } input.snippet-width { width: 3.75em ; } @@ -63,6 +63,12 @@ input.snippet-width { width: 3.75em ; } .growl .pre { font-family: monospace ; } .growl div.pre { margin: 0 0 1em 1em ; font-size: 80% ; } +.gutter { position: relative ; background-color: #ddd ; } +.gutter-vertical { cursor: row-resize ; } +.gutter-horizontal { cursor: col-resize ; } +img.vsplitter-gripper { position: absolute ; left: calc(50% - 15px) ; } +img.hsplitter-gripper { position: absolute ; top: calc(50% - 15px) ; } + /* -------------------------------------------------------------------- */ .small { font-size: 80% ; } diff --git a/vasl_templates/webapp/static/css/scenario-search-dialog.css b/vasl_templates/webapp/static/css/scenario-search-dialog.css index ba9ff13..b0cbaa2 100644 --- a/vasl_templates/webapp/static/css/scenario-search-dialog.css +++ b/vasl_templates/webapp/static/css/scenario-search-dialog.css @@ -6,10 +6,6 @@ #scenario-search .right { min-width: 400px ; flex: 1 ; display: flex ; flex-direction: column ; padding-left: 5px ; } #scenario-search .scenario-card { flex: 1 ; overflow-y: hidden ; } -/* splitter */ -#scenario-search .gutter { position: relative ; margin: 0 0.5em ; background-color: #ccc ; cursor: col-resize ; } -#scenario-search .gutter img { position: absolute ; top: 45% ; left: -2px ; } - /* search control */ #scenario-search .select2-container { top: 1em !important ; left: 1em !important ; } #scenario-search .select2-selection { display: none ; } diff --git a/vasl_templates/webapp/static/css/sortable.css b/vasl_templates/webapp/static/css/sortable.css index c044c2d..94c9a30 100644 --- a/vasl_templates/webapp/static/css/sortable.css +++ b/vasl_templates/webapp/static/css/sortable.css @@ -17,4 +17,4 @@ img.sortable-reset { height: 16px ; margin: -2px 0.4em 0 -2px ; } .sortable-hint .instructions { margin: 1em 0 0 1em ; font-size: 80% ; font-style: italic ; color: #888 ; } .sortable-hint .instructions li { margin: 0.5em 0 0 0.25em ; } -.sortable-trash { height: 22px ; margin-left: 6px ; } +.sortable-trash { height: 22px ; margin-left: 6px ; margin-right: 6px ; } diff --git a/vasl_templates/webapp/static/css/tabs-extras.css b/vasl_templates/webapp/static/css/tabs-extras.css index 666c6ac..ec57232 100644 --- a/vasl_templates/webapp/static/css/tabs-extras.css +++ b/vasl_templates/webapp/static/css/tabs-extras.css @@ -1,7 +1,7 @@ /* -------------------------------------------------------------------- */ #tabs-extras { height: 100% ; display: flex ; flex-direction: row ; overflow: hidden ; } -#tabs-extras .left-panel { flex: 0 0 auto ; overflow: hidden auto ; min-width: 13em ; border-right: 2px dotted #aaa; margin-right: 5px ; padding-right: 5px ; } +#tabs-extras .left-panel { flex: 0 0 auto ; overflow: hidden auto ; min-width: 13em ; max-width: 40% ; } #tabs-extras .right-panel { flex: 1 1 auto ; width: 100%; bottom: 0 ; } #tabs-extras .left-panel ul { list-style-type: none ; margin: 0 ; } @@ -17,6 +17,9 @@ #tabs-extras .right-panel div.caption { font-style: italic ; } #tabs-extras .right-panel div.description { margin-top: 0.5em ; } +#tabs-extras .right-panel button.generate { height: 30px ; } +#tabs-extras .right-panel .snippet-control .ui-selectmenu-button { height: 30px ; } + #tabs-extras .right-panel table { margin-top: 1em ; } #tabs-extras .right-panel td.caption { font-weight: bold ; padding-right: 0.25em ; } #tabs-extras .right-panel .snippet-control { margin-top: 0.5em ; } diff --git a/vasl_templates/webapp/static/css/tabs-ob.css b/vasl_templates/webapp/static/css/tabs-ob.css index b2234c9..ebc7675 100644 --- a/vasl_templates/webapp/static/css/tabs-ob.css +++ b/vasl_templates/webapp/static/css/tabs-ob.css @@ -2,13 +2,13 @@ .panel-ob_setups { height: 100% ; display: flex ; flex-direction: column ; } .panel-ob_setups .content { flex-grow: 1 ; } -.panel-ob_setups .footer { margin-top: 0.5em ; padding-bottom: 1px ; display: flex ; align-items: center ; } +.panel-ob_setups .footer { margin-top: 0.5em ; display: flex ; align-items: center ; } /* -------------------------------------------------------------------- */ .panel-ob_notes { height: 100% ; display: flex ; flex-direction: column ; } .panel-ob_notes .content { flex-grow: 1 ; } -.panel-ob_notes .footer { margin-top: 0.5em ; padding-bottom: 1px ; display: flex ; align-items: center ; } +.panel-ob_notes .footer { margin-top: 0.5em ; display: flex ; align-items: center ; } /* -------------------------------------------------------------------- */ diff --git a/vasl_templates/webapp/static/css/tabs-scenario.css b/vasl_templates/webapp/static/css/tabs-scenario.css index e3da179..5416024 100644 --- a/vasl_templates/webapp/static/css/tabs-scenario.css +++ b/vasl_templates/webapp/static/css/tabs-scenario.css @@ -1,6 +1,7 @@ /* -------------------------------------------------------------------- */ #panel-scenario { display: flex ; flex-direction: column ; } +fieldset[name='scenario'] { min-height: 91px ; max-height: 265px ; overflow: hidden ; } #panel-scenario .row { display: flex ; align-items: center ; margin-bottom: 2px ; } #panel-scenario input { flex-grow: 1 ; } diff --git a/vasl_templates/webapp/static/css/tabs.css b/vasl_templates/webapp/static/css/tabs.css index 8ca146e..e246537 100644 --- a/vasl_templates/webapp/static/css/tabs.css +++ b/vasl_templates/webapp/static/css/tabs.css @@ -21,29 +21,29 @@ #tabs-scenario { display: flex ; } #tabs-scenario .left { width: 29.25em ; min-width: 29.25em ; } -#tabs-scenario .right { flex-grow: 1 ; min-width: 25em ; } +#tabs-scenario .right { flex-grow: 1 ; min-width: 26em ; } #tabs-scenario .left { display: flex ; flex-direction: column ; } -#tabs-scenario .tl { flex-basis: content ; } #tabs-scenario .bl { height: 100% ; flex-grow: 1 ; } #tabs-scenario .right { display: flex ; flex-direction: column ; } #tabs-scenario .tr { height: 100% ; flex-grow: 1 ; } -#tabs-scenario .br { height: 100% ; flex-grow: 1 ; } +#tabs-scenario .br { height: 100% ; flex-grow: 1 ; min-height: 9em ; } /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ .ui-tabs-panel.tabs-ob { display: flex ; } -.ui-tabs-panel.tabs-ob .left { flex-grow: 1 ; min-width: 32em ; } -.ui-tabs-panel.tabs-ob .right { width: 28em ; min-width: 26em ; } +.ui-tabs-panel.tabs-ob .left { flex-grow: 1 ; min-width: 20em ; } +.ui-tabs-panel.tabs-ob .right { width: 28em ; min-width: 20em ; } .ui-tabs-panel.tabs-ob .left { display: flex ; flex-direction: column ; } -.ui-tabs-panel.tabs-ob .tl { height: 100% ; flex-grow: 1 } -.ui-tabs-panel.tabs-ob .bl { height: 100% ; flex-grow: 1 } +.ui-tabs-panel.tabs-ob .tl { height: 100% ; flex-grow: 1 ; min-height: 9em ; } +.ui-tabs-panel.tabs-ob .bl { height: 100% ; flex-grow: 1 ; min-height: 9em ; } .ui-tabs-panel.tabs-ob .right { display: flex ; flex-direction: column ; } -.ui-tabs-panel.tabs-ob .tr { height: 100% ; flex-grow: 1 } -.ui-tabs-panel.tabs-ob .br { height: 100% ; flex-grow: 1 } +/* NOTE: min-height for the vehicle/ordnance panels are set dynamically. */ +.ui-tabs-panel.tabs-ob .tr { height: 100% ; flex-grow: 1 ; } +.ui-tabs-panel.tabs-ob .br { height: 100% ; flex-grow: 1 ; } /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ diff --git a/vasl_templates/webapp/static/extras.js b/vasl_templates/webapp/static/extras.js index 43d0a9d..deb3b65 100644 --- a/vasl_templates/webapp/static/extras.js +++ b/vasl_templates/webapp/static/extras.js @@ -4,12 +4,13 @@ function init_extras() { // initialize the layout - $( "#tabs-extras .left-panel" ).resizable( { - resizeHeight: false, - handles: "e", - create: function( event, ui ) { - $( ".ui-resizable-e" ).css( "cursor", "ew-resize" ) ; - }, + Split( [ "#tabs-extras .left-panel", "#tabs-extras .right-panel" ], { + direction: "horizontal", + sizes: [ 1, 99 ], + gutterSize: 8, + } ) ; + addSplitterGripper( $( "#tabs-extras .left-panel + .gutter" ), true, 8, { + margin: "5px 2px", "background-color": "inherit" } ) ; // identify the extras templates diff --git a/vasl_templates/webapp/static/images/gripper-horz.png b/vasl_templates/webapp/static/images/gripper-horz.png deleted file mode 100644 index 615b6c4..0000000 Binary files a/vasl_templates/webapp/static/images/gripper-horz.png and /dev/null differ diff --git a/vasl_templates/webapp/static/images/gripper-vert.png b/vasl_templates/webapp/static/images/gripper-vert.png deleted file mode 100644 index 7c84d00..0000000 Binary files a/vasl_templates/webapp/static/images/gripper-vert.png and /dev/null differ diff --git a/vasl_templates/webapp/static/images/hsplitter-gripper.png b/vasl_templates/webapp/static/images/hsplitter-gripper.png new file mode 100644 index 0000000..79430ba Binary files /dev/null and b/vasl_templates/webapp/static/images/hsplitter-gripper.png differ diff --git a/vasl_templates/webapp/static/images/vsplitter-gripper.png b/vasl_templates/webapp/static/images/vsplitter-gripper.png new file mode 100644 index 0000000..b8ec585 Binary files /dev/null and b/vasl_templates/webapp/static/images/vsplitter-gripper.png differ diff --git a/vasl_templates/webapp/static/lfa.js b/vasl_templates/webapp/static/lfa.js index 6a08004..8abe799 100644 --- a/vasl_templates/webapp/static/lfa.js +++ b/vasl_templates/webapp/static/lfa.js @@ -147,11 +147,12 @@ window.show_lfa_dialog = function( resp ) direction: "vertical", sizes: [ 60, 40 ], minSize: [ 350, 200 ], /* nb: this needs to be set in the CSS as well */ - gutterSize: 3, + gutterSize: 1, onDrag: updateLayout, } ) ; - var $gripper = $( "" ) ; - $( "#lfa .gutter.gutter-vertical" ).append( $gripper ) ; + addSplitterGripper( $("#lfa .gutter"), false, 1, { + "margin-bottom": 3, "z-index": 49, + } ) ; // initialize other controls $(this).find( "select[name='roll-type']" ).selectmenu( { width: 70, diff --git a/vasl_templates/webapp/static/main.js b/vasl_templates/webapp/static/main.js index d568c5a..35e11d9 100644 --- a/vasl_templates/webapp/static/main.js +++ b/vasl_templates/webapp/static/main.js @@ -10,6 +10,7 @@ gOnlineCounterImages = {} ; gAslRulebook2VoNoteTargets = {} ; gWebChannelHandler = null ; +gPlayerOBSplitters = {} ; gEmSize = null ; var NATIONALITY_SPECIFIC_BUTTONS = { @@ -249,6 +250,9 @@ $(document).ready( function () { $sel.data( "select2" ).$results.css( "max-height", "15em" ) ; } + // initialize the splitters + initSplitters() ; + // get the application config $.getJSON( gAppConfigUrl, function(data) { gAppConfig = data ; @@ -422,7 +426,7 @@ $(document).ready( function () { // handle requests to edit the templates $("button.edit-template").click( function() { edit_template( $(this).data( "id" ) ) ; - } ).html( "