Mercurial > repos > adam-novak > hexagram
changeset 10:61f6a1991ae3 draft
Uploaded
author | adam-novak |
---|---|
date | Fri, 18 Oct 2013 19:12:07 -0400 |
parents | b55713868635 |
children | 6ae12361157c |
files | hexagram/hexagram.css hexagram/hexagram.css~ hexagram/hexagram.js hexagram/hexagram.js~ |
diffstat | 4 files changed, 276 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/hexagram/hexagram.css Fri Oct 18 19:04:03 2013 -0400 +++ b/hexagram/hexagram.css Fri Oct 18 19:12:07 2013 -0400 @@ -186,6 +186,7 @@ } #inflate{ + display: none; } .recalculate-throbber {
--- a/hexagram/hexagram.css~ Fri Oct 18 19:04:03 2013 -0400 +++ b/hexagram/hexagram.css~ Fri Oct 18 19:12:07 2013 -0400 @@ -170,20 +170,103 @@ #browse-holder { margin-left: 0.5em; + width: 500px; } - #search { - width: 20em; + width: 322px; } #recalculate-statistics { padding: 0.2em; + margin-left: 10px; +} + +#calculate-set-operation { + padding: 0.2em; +} + +#inflate{ } .recalculate-throbber { display: none; } +/* Set Operation Menu */ + +#set-operation { + padding: 0.2em; +} + +.set-operation-col { + visibility:hidden; + width: 25em; + overflow: visible; +} + +.set-operation-panel-holder { + visibility:hidden; + margin-left:21em; + padding-top: 2em; + overflow: hidden; + top: 4em; + width: 25em; + z-index: 100; +} + +.set-operation-panel { + text-align: center; + visibility:hidden; + height: 160px; + position: relative; + top: 0; + border-radius: 10px; + border: 1px solid gray; + background: white; + z-index: 100; +} + +.set-operation-panel-title { + visibility:hidden; + text-align: center; +} + +.set-operation-panel-contents { + visibility:hidden; + overflow-y: auto; + overflow-x: hidden; + top: 1em; +} + +#set-operations-list { +} + +.set-operation-entry { + text-align: left; + position: relative; + height: auto; + width: auto; + padding: 5px; +} + +.set-operation-value { + visibility: hidden; + width: 15em; + margin-bottom: 10px; +} + +.set-operation-layer-value { + visibility: hidden; + width: 8em; + margin-left: 50px; +} + +.compute-button { + visibility: hidden; + text-align: center; + width: 190px; + margin-left: 25%; +} /* Do some custom styling of browse results */ .layer-entry { padding-right: 20px; @@ -201,11 +284,11 @@ /* Make the browse dropdown tall */ .results-dropdown.select2-container .select2-results { - max-height: 40em; + max-height: 30em; } .results-dropdown .select2-results { - max-height: 40em; + max-height: 30em; } .layer-metadata { @@ -231,6 +314,29 @@ top: 4em; } +/* Map Layout Selection Stuff */ + +#layout-holder{ + margin-left: 0.5em; +} + +#layout-search { + width: 22em; +} + +.layout-entry { + padding-right: 20px; +} + +layout-name { + /* Force silly underscore names into shape */ + word-wrap: break-word; +} +#current-layout { + padding-top: 2.5em; + width: 700px; +} + /* Shortlist UI stuff */ .shortlist-controls { @@ -311,13 +417,158 @@ margin-top: 0.5em; } +/*Shortlist holders*/ +#left-columns { + width: 33%; +} +#center-columns { + margin-left: 33%; +} +#right-columns { + margin-left: 66% +} + /* Filtering stuff */ + .filter { line-height: 1em; vertical-align: center; } +.filter-threshold, .filter-value { + display: none; + width: 5em; +} +.filter-holder { + float: left; + text-align: left; + width: 120px; +} -.filter-threshold, .filter-value { +.save-filter { + display: none; +} + +/* Intersection */ +.intersection { + line-height: 1em; + vertical-align: center; +} +.intersection-text { + width: 15px; + float: left; + text-align: center; +} +.intersection-checkbox { + float: left; + text-align: center; + margin-left: 2px; +} +.intersection-holder { + float: left; + text-align: center; +} +.intersection-threshold, .intersection-value { + display: none; + width: 5em; +} + +/*Union*/ +.union { + line-height: 1em; + vertical-align: center; +} +.union-text{ + width: 15px; + float: left; + text-align: center; +} +.union-checkbox { + float: left; + text-align: center; + margin-left: 2px; +} +.union-holder { + float: left; + text-align: center; + margin-left: 10px; +} +.union-threshold, .union-value { + display: none; + width: 5em; +} + +/*Set Difference*/ +.set-difference { + line-height: 1em; + vertical-align: center; +} +.set-difference-text{ + width: 15px; + float: left; + text-align: center; +} +.set-difference-checkbox { + float: left; + text-align: center; + margin-left: 2px; +} +.set-difference-holder { + float: left; + text-align: center; + margin-left: 10px; +} +.set-difference-threshold, .set-difference-value { + display: none; + width: 5em; +} + +/*Symmetric Difference*/ +.symmetric-difference { + line-height: 1em; + vertical-align: center; +} +.symmetric-difference-text{ + width: 15px; + float: left; + text-align: center; +} +.symmetric-difference-checkbox { + float: left; + text-align: center; + margin-left: 2px; +} +.symmetric-difference-holder { + float: left; + text-align: center; + margin-left: 10px; +} +.symmetric-difference-threshold, .symmetric-difference-value { + display: none; + width: 5em; +} + +/*Absolute Complement*/ +.absolute-complement { + line-height: 1em; + vertical-align: center; +} +.absolute-complement-text{ + width: 40px; + float: left; + text-align: center; +} +.absolute-complement-checkbox { + float: left; + text-align: center; + margin-left: 2px; +} +.absolute-complement-holder { + width: 65px; + float: left; + text-align: center; + margin-left: 10px +} +.absolute-complement-threshold, .absolute-complement-value { display: none; width: 5em; } @@ -439,3 +690,5 @@ */ font-size: 0.5em; } + +
--- a/hexagram/hexagram.js Fri Oct 18 19:04:03 2013 -0400 +++ b/hexagram/hexagram.js Fri Oct 18 19:12:07 2013 -0400 @@ -3748,6 +3748,17 @@ // This is the very first layout. Pull it up. $("#layout-search").select2("data", {id: layout_names[0], text: layout_names[0]}); + + // TODO: We ought to go through the normal change event here, + // but we aren't actually using change there. + var current_layout = "Current Layout: " + layout_names[0]; + + document.getElementById('current-layout').innerHTML=current_layout; + initialize_view (0); + recreate_map(layout_names[0], 1); + refresh (); + current_layout_name = layout_names[0]; + } } }, "text"); @@ -3811,7 +3822,7 @@ }); // Handle result selection - $("#layout-search").on("change", function(event) { + $("#layout-search").on("select2-selecting", function(event) { // The select2 id of the thing clicked (the layout's name) is event.val var layout_name = event.val; @@ -3821,6 +3832,9 @@ initialize_view (0); recreate_map(layout_name, 1); refresh (); + // Don't actually change the selection. + // This keeps the dropdown open when we click. + event.preventDefault(); current_layout_name = layout_name; });
--- a/hexagram/hexagram.js~ Fri Oct 18 19:04:03 2013 -0400 +++ b/hexagram/hexagram.js~ Fri Oct 18 19:12:07 2013 -0400 @@ -3746,8 +3746,8 @@ if(layout_names.length == 1) { // This is the very first layout. Pull it up. - $("#layout-search").select2("data", {id: default_layout, - text: default_layout}); + $("#layout-search").select2("data", {id: layout_names[0], + text: layout_names[0]}); } } }, "text");