summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/resources/policy.html3
-rw-r--r--chrome/browser/resources/policy.js14
2 files changed, 5 insertions, 12 deletions
diff --git a/chrome/browser/resources/policy.html b/chrome/browser/resources/policy.html
index 05d38a9..f37f7f2 100644
--- a/chrome/browser/resources/policy.html
+++ b/chrome/browser/resources/policy.html
@@ -115,8 +115,7 @@
<tr jsselect="policies"
jsvalues=".className: $this.set ?
'policy-set': 'policy-unset';
- .style.visibility: Policy.shouldDisplayPolicy($this) ?
- 'visible': 'hidden'">
+ .hidden: !Policy.shouldDisplayPolicy($this)">
<td>
<span class="policy-type" jscontent="sourceType"></span>
</td>
diff --git a/chrome/browser/resources/policy.js b/chrome/browser/resources/policy.js
index c86611d..c439ff3 100644
--- a/chrome/browser/resources/policy.js
+++ b/chrome/browser/resources/policy.js
@@ -98,10 +98,8 @@ cr.define('policies', function() {
var nameCell = row.querySelector('.policy-name');
var cellContents = nameCell.textContent;
- if (cellContents.toLowerCase().indexOf(this.searchTerm_) >= 0)
- row.style.display = 'table-row';
- else
- row.style.display = 'none';
+ row.hidden =
+ !(cellContents.toLowerCase().indexOf(this.searchTerm_) >= 0);
}
},
@@ -116,12 +114,8 @@ cr.define('policies', function() {
$('policies').style.display = 'none';
var tableRows = document.getElementsByClassName('policy-unset');
- for (var i = 0; i < tableRows.length; i++) {
- if ($('toggle-unsent-policies').checked)
- tableRows[i].style.visibility = 'visible';
- else
- tableRows[i].style.visibility = 'hidden';
- }
+ for (var i = 0; i < tableRows.length; i++)
+ tableRows[i].hidden = !($('toggle-unsent-policies').checked);
// Filter table again in case a search was active.
this.filterTable(this.searchTerm_);