Fixed plugin card recycling breaking some filters.

Fixes #355.
This commit is contained in:
Oliver Hamlet
2014-12-12 18:40:18 +00:00
parent ff6d1c563a
commit 3e71509e05
3 changed files with 27 additions and 21 deletions
+11 -6
View File
@@ -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
},
});
</script>
</polymer-element>
</polymer-element>
+12 -7
View File
@@ -4,7 +4,7 @@ loot-editor-close
detail: boolean
True if the editor was closed using the Apply button.
--->
-->
<link rel="import" href="../bower_components/polymer/polymer.html">
<link rel="import" href="../bower_components/core-toolbar/core-toolbar.html">
@@ -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
<core-tooltip id="activeTick" label="Active Plugin" noarrow>
<core-icon icon="check"></core-icon>
</core-tooltip>
<h1>{{data.name}}</h1>
<span class="version">{{data.version}}</span>
<span class="crc" flex>{{data.computed.crc}}</span>
<div flex>
<h1>{{data.name}}</h1>
<span id="version">{{data.version}}</span>
<span id="crc">{{data.computed.crc}}</span>
</div>
<core-tooltip id="dummyPlugin" label="Dummy Plugin" noarrow>
<core-icon icon="visibility-off"></core-icon>
</core-tooltip>
+4 -8
View File
@@ -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);
}, false);