summaryrefslogtreecommitdiffstats
path: root/chrome/browser/resources/policy.js
diff options
context:
space:
mode:
authorsimo@google.com <simo@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-30 09:16:54 +0000
committersimo@google.com <simo@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-30 09:16:54 +0000
commit9ac0f9985ac4412b43b66837d956fb3494e28570 (patch)
tree7ec67b022af4332af8e7550fe9febb5273eaec21 /chrome/browser/resources/policy.js
parentf8eeb7c1430fcd00043b30f32c9347094d5e3897 (diff)
downloadchromium_src-9ac0f9985ac4412b43b66837d956fb3494e28570.zip
chromium_src-9ac0f9985ac4412b43b66837d956fb3494e28570.tar.gz
chromium_src-9ac0f9985ac4412b43b66837d956fb3494e28570.tar.bz2
Policy: about:policy now hides unsent policies in such a way that the page isn't unnecessarily long.
BUG=20989 TEST= Review URL: http://codereview.chromium.org/8072028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103448 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/resources/policy.js')
-rw-r--r--chrome/browser/resources/policy.js14
1 files changed, 4 insertions, 10 deletions
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_);