[Pkg-mozext-commits] [requestpolicy] 127/280: [refact] do not use jquery's hide() and show()

David Prévot taffit at moszumanska.debian.org
Sat May 2 20:30:10 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository requestpolicy.

commit 73eabfd66ebfe16925ac87dca02c367c0039ac48
Author: Martin Kimmerle <dev at 256k.de>
Date:   Tue Jan 6 17:16:37 2015 +0100

    [refact] do not use jquery's hide() and show()
---
 src/content/settings/oldrules.js   | 26 +++++++++++++-------------
 src/content/settings/yourpolicy.js |  2 +-
 2 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/src/content/settings/oldrules.js b/src/content/settings/oldrules.js
index 6138bf4..315fbec 100644
--- a/src/content/settings/oldrules.js
+++ b/src/content/settings/oldrules.js
@@ -69,16 +69,16 @@ function deleteOldRules() {
   common.clearPref('allowedOrigins');
   common.clearPref('allowedDestinations');
   common.clearPref('allowedOriginsToDestinations');
-  $('#doimport').hide();
-  $('#deletedone').show();
-  $('#showReimportOptions').hide();
-  $('#reimportOldRules').hide();
-  $('#deleteOldRules').hide();
+  $id("doimport").hidden = true;
+  $id("deletedone").hidden = false;
+  $id("showReimportOptions").hidden = true;
+  $id("reimportOldRules").hidden = true;
+  $id("deleteOldRules").hidden = true;
 }
 
 function showReimportOptions() {
-  $('#showReimportOptions').hide();
-  $('#reimportOldRules').show();
+  $id("showReimportOptions").hidden = true;
+  $id("reimportOldRules").hidden = false;
 }
 
 function importOldRules() {
@@ -86,10 +86,10 @@ function importOldRules() {
     throw 'rules is undefined or empty';
   }
   common.addAllowRules(rules);
-  $('#doimport').hide();
-  $('#policy').hide();
-  $('#importoptions').hide();
-  $('#importdone').show();
+  $id("doimport").hidden = true;
+  $id("policy").hidden = true;
+  $id("importoptions").hidden = true;
+  $id("importdone").hidden = false;
 }
 
 function handleAddHostWildcardsChange(event) {
@@ -101,8 +101,8 @@ function handleAddHostWildcardsChange(event) {
 function onload() {
   var oldRulesExist = Prefs.oldRulesExist();
   if (!oldRulesExist) {
-    $('#hasrules').hide();
-    $('#norules').show();
+    $id("hasrules").hidden = true;
+    $id("norules").hidden = false;
     return;
   }
   populateRuleTable();
diff --git a/src/content/settings/yourpolicy.js b/src/content/settings/yourpolicy.js
index e75f032..6af750a 100644
--- a/src/content/settings/yourpolicy.js
+++ b/src/content/settings/yourpolicy.js
@@ -226,7 +226,7 @@ function onload() {
   }, false);
   populateRuleTable(search.value);
   if (Prefs.oldRulesExist()) {
-    $('#oldrulesexist').show();
+    $id("oldrulesexist").hidden = false;
   }
 
   // observe rule changes and update the table then

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/requestpolicy.git



More information about the Pkg-mozext-commits mailing list