]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/DomainWhitelist/js/whitelistinvite.js
Merge branch 'page_title_showstream' into 'nightly'
[quix0rs-gnu-social.git] / plugins / DomainWhitelist / js / whitelistinvite.js
index 01e493fa6aaec12c622d4a42979e4dfe922d31d8..d8ef79d72afe5e8d112b881d9ff3de4ee7e4ddf1 100644 (file)
@@ -1,7 +1,7 @@
 // XXX: Should I do crazy SN.X.Y.Z.A namespace instead?
 var SN_WHITELIST = SN_WHITELIST || {};
 
-SN_WHITELIST.updateButtons = function() {
+SN_WHITELIST.updateButtons = function () {
    $("ul > li > a.remove_row").show();
    $("ul > li > a.add_row").hide();
 
@@ -14,36 +14,36 @@ SN_WHITELIST.updateButtons = function() {
     $("ul > li > a.add_row:last").show();
 };
 
-SN_WHITELIST.resetRow = function(row) {
+SN_WHITELIST.resetRow = function (row) {
     $("input", row).val('');
     // Make sure the default domain is the first selection
     $("select option:first", row).val();
     $("a.remove_row", row).show();
 };
 
-SN_WHITELIST.addRow = function() {
+SN_WHITELIST.addRow = function () {
     var row = $(this).closest("li");
     var newRow = row.clone();
     $(row).find('a.add_row').hide();
     SN_WHITELIST.resetRow(newRow);
-        $(newRow).insertAfter(row).show("blind", "fast", function() {
+        $(newRow).insertAfter(row).show("blind", "fast", function () {
             SN_WHITELIST.updateButtons();
         });
 };
 
-SN_WHITELIST.removeRow = function() {
+SN_WHITELIST.removeRow = function () {
     var that = this;
 
     $("#confirm-dialog").dialog({
         buttons : {
-            "Confirm" : function() {
+            "Confirm" : function () {
                 $(this).dialog("close");
-                $(that).closest("li").hide("blind", "fast", function() {
+                $(that).closest("li").hide("blind", "fast", function () {
                     $(this).remove();
                     SN_WHITELIST.updateButtons();
                 });
             },
-            "Cancel" : function() {
+            "Cancel" : function () {
                 $(this).dialog("close");
             }
         }
@@ -52,21 +52,21 @@ SN_WHITELIST.removeRow = function() {
     if ($(this).closest('li').find(':input[name^=username]').val()) {
         $("#confirm-dialog").dialog("open");
     } else {
-        $(that).closest("li").hide("blind", "fast", function() {
+        $(that).closest("li").hide("blind", "fast", function () {
             $(this).remove();
             SN_WHITELIST.updateButtons();
         });
     }
 };
 
-$(document).ready(function() {
+$(document).ready(function () {
     $("#confirm-dialog").dialog({
         autoOpen: false,
         modal: true
     });
 
-    $('.add_row').live('click', SN_WHITELIST.addRow);
-    $('.remove_row').live('click', SN_WHITELIST.removeRow);
+    $(document).on('click', '.add_row', SN_WHITELIST.addRow);
+    $(document).on('click', '.remove_row', SN_WHITELIST.removeRow);
 
     SN_WHITELIST.updateButtons();
 });