diff --git a/resources/report/html/loot-plugin-card.html b/resources/report/html/loot-plugin-card.html index 660b41ab..e843d0da 100644 --- a/resources/report/html/loot-plugin-card.html +++ b/resources/report/html/loot-plugin-card.html @@ -86,27 +86,32 @@ loot-clear-metadata } /* Content styling. */ - ::content .tag, ::content ul { + content::content > .tag, + content::content > ul { display: block; padding: 0 1em 1em; } - ::content h1, h1 { + content::content > h1 { display: inline-block; font-weight: normal; font-size: 1em; margin: 0; } - ::content .version, .version { + content::content > .version { display: inline-block; margin-left: 1em; color:#6394F8; } - ::content .crc, .crc { + content::content > .crc { display: inline-block; margin-left: 1em; color:#BC8923; } - ::content .hidden, .hidden { + .hidden, + content::content > .hidden, + :host-context(#main[data-hide-crc]) content::content > .crc, + :host-context(#main[data-hide-tag]) content::content > .tag, + :host-context(#main[data-hide-version]) content::content > .version { display: none; } @@ -312,4 +317,4 @@ loot-clear-metadata }, }); - \ No newline at end of file + diff --git a/resources/report/html/loot-plugin-editor.html b/resources/report/html/loot-plugin-editor.html index 8e1b66aa..34128ec9 100644 --- a/resources/report/html/loot-plugin-editor.html +++ b/resources/report/html/loot-plugin-editor.html @@ -4,7 +4,7 @@ loot-editor-close detail: boolean True if the editor was closed using the Apply button. ----> +--> @@ -45,20 +45,23 @@ loot-editor-close /* Content styling. */ h1 { + display: inline-block; font-weight: normal; font-size: 1em; + margin: 0; } - .version { + #version { display: inline-block; margin-left: 1em; color:#6394F8; } - .crc { + #crc { display: inline-block; margin-left: 1em; color:#BC8923; } - .hidden { + :host-context(#main[data-hide-version]) #version, + :host-context(#main[data-hide-crc]) #crc { display: none; } @@ -149,9 +152,11 @@ loot-editor-close -

{{data.name}}

- {{data.version}} - {{data.computed.crc}} +
+

{{data.name}}

+ {{data.version}} + {{data.computed.crc}} +
diff --git a/resources/report/js/script.js b/resources/report/js/script.js index a90de494..81dbc031 100644 --- a/resources/report/js/script.js +++ b/resources/report/js/script.js @@ -362,15 +362,11 @@ function hideElement(element) { } } function toggleDisplayCSS(evt) { - var e = document.getElementsByClassName(evt.target.getAttribute('data-class')); + var attr = 'data-hide-' + evt.target.getAttribute('data-class'); if (evt.target.checked) { - for (var i = 0, z = e.length; i < z; i++) { - e[i].classList.toggle('hidden', true); - } + document.getElementById('main').setAttribute(attr, true); } else { - for (var i = 0, z = e.length; i < z; i++) { - e[i].classList.toggle('hidden', false); - } + document.getElementById('main').removeAttribute(attr); } } function toast(text) { @@ -1283,4 +1279,4 @@ window.addEventListener('polymer-ready', function(e) { setupEventHandlers(); initVars(); }); -}, false); \ No newline at end of file +}, false);