diff --git a/resources/report/report.html b/resources/report/report.html index 21ff148c..c0957df5 100644 --- a/resources/report/report.html +++ b/resources/report/report.html @@ -32,38 +32,53 @@ - - + +
    -
  1. File - -
  2. Game - -
  3. Settings -
  4. Help - +
  5. File +
  6. Game +
  7. Settings +
  8. Help
  1. Update Masterlist
  2. Sort
  3. Filters
+ + +
@@ -163,5 +179,7 @@
+
+ \ No newline at end of file diff --git a/resources/report/script.js b/resources/report/script.js index 5328f4bc..c0507562 100644 --- a/resources/report/script.js +++ b/resources/report/script.js @@ -52,16 +52,19 @@ function loadSettings() { i--; } } +function isVisible(element) { + return (element.className.indexOf('hidden') == -1); +} function showElement(element) { if (element != null) { - if (element.className.indexOf('hidden') != -1) { + if (!isVisible(element)) { element.className = element.className.replace('hidden', ''); } } } function hideElement(element) { if (element != null) { - if (element.className.indexOf('hidden') == -1) { + if (isVisible(element)) { element.className += ' hidden'; } } @@ -341,4 +344,20 @@ function processURLParams() { }); } } -processURLParams(); \ No newline at end of file +processURLParams(); + +var menus = document.getElementsByTagName('header')[0].children[1].children; + +for (var i = 0; i < menus.length; ++i) { + menus[i].onclick = function(evt) { + var action = evt.target.getAttribute('data-action'); + var target = document.getElementById(evt.target.getAttribute('data-target')); + if (action == 'open-menu' || action == 'open-dialog') { + if (isVisible(target)) { + hideElement(target); + } else { + showElement(target); + } + } + } +} \ No newline at end of file diff --git a/resources/report/style.css b/resources/report/style.css index dcf27bcd..6f03347b 100644 --- a/resources/report/style.css +++ b/resources/report/style.css @@ -42,17 +42,18 @@ header { width:100%; height: 3em; } -header ol { +header > ol { display: inline-block; margin:0; padding:0; } -header li{ +header > ol > li{ display: inline-block; padding: 0.75em 1em; margin: 0; + cursor: pointer; } -header ol:last-child { +header > ol:last-child { position: fixed; right: 0; } @@ -66,22 +67,49 @@ header img { padding: 0 0.5em; } +#fileMenu, #gameMenu, #helpMenu { + background: #e3e3e3; + position: fixed; + z-index: 2; + box-shadow: 0 3px 3px 1px rgba(0,0,0,0.5); + list-style-type: none; + margin:0; + padding: 0.5em; + top: 3em; +} +#fileMenu { + left: 3.75em; +} +#gameMenu { + left: 98px; +} +#helpMenu { + left: 235px; +} + nav { position: fixed; top: 3em; width: 20em; height: calc(100% - 3em); } -nav ol { +nav > ol { list-style-type: none; height: calc(100% - 3em); } -nav ol li:last-child, nav ol li:last-child ol { - height: calc(100% - 3em); +nav > ol > li:nth-child(3), #pluginsNav { + height: calc(100% - 5em); overflow: auto; } nav ol li { - padding: 1em; + padding: 1em 0.5em; +} +#pluginsNav { + margin: 0; + padding: 0; +} +#pluginsNav li { + padding: 0; } #main { @@ -90,7 +118,7 @@ nav ol li { left: 20em; } -section { +section, #settings, #about { background:white; overflow:hidden; margin:1em;