Removed obsolete code
authorMarcel Werk <burntime@woltlab.com>
Sun, 2 Jun 2013 15:06:55 +0000 (17:06 +0200)
committerMarcel Werk <burntime@woltlab.com>
Sun, 2 Jun 2013 15:06:55 +0000 (17:06 +0200)
wcfsetup/install/files/acp/js/WCF.ACP.User.js [deleted file]
wcfsetup/install/files/acp/js/WCF.ACP.js
wcfsetup/install/files/acp/templates/userList.tpl

diff --git a/wcfsetup/install/files/acp/js/WCF.ACP.User.js b/wcfsetup/install/files/acp/js/WCF.ACP.User.js
deleted file mode 100644 (file)
index 7f597c6..0000000
+++ /dev/null
@@ -1,107 +0,0 @@
-/**
- * Generic implementation to enable users.
- */
-WCF.ACP.User.EnableHandler = {
-       /**
-        * action proxy
-        * @var WCF.Action.Proxy
-        */
-       _proxy: null,
-       
-       /**
-        * Initializes WCF.ACP.User.EnableHandler on first use.
-        */
-       init: function() {
-               this._proxy = new WCF.Action.Proxy({
-                       success: $.proxy(this._success, this)
-               });
-               
-               $('.jsEnableButton').click($.proxy(function(event) {
-                       var $button = $(event.currentTarget);
-                       if ($button.data('enabled')) {
-                               this.disable([ $button.data('objectID') ]);
-                       }
-                       else {
-                               this.enable([ $button.data('objectID') ]);
-                       }
-               }, this));
-               
-               // bind listener
-               $('.jsClipboardEditor').each($.proxy(function(index, container) {
-                       var $container = $(container);
-                       var $types = eval($container.data('types'));
-                       if (WCF.inArray('com.woltlab.wcf.user', $types)) {
-                               $container.on('clipboardAction', $.proxy(this._execute, this));
-                               return false;
-                       }
-               }, this));
-       },
-       
-       /**
-        * Handles clipboard actions.
-        * 
-        * @param       object          event
-        * @param       string          type
-        * @param       string          actionName
-        * @param       object          parameters
-        */
-       _execute: function(event, type, actionName, parameters) {
-               if (actionName == 'com.woltlab.wcf.user.enable') {
-                       this.enable(parameters.objectIDs);
-               }
-       },
-       
-       /**
-        * Disables users.
-        * 
-        * @param       array<integer>  userIDs
-        */
-       disable: function(userIDs) {
-               this._proxy.setOption('data', {
-                       actionName: 'disable',
-                       className: 'wcf\\data\\user\\UserAction',
-                       objectIDs: userIDs
-               });
-               this._proxy.sendRequest();
-       },
-       
-       /**
-        * Enables users.
-        * 
-        * @param       array<integer>  userIDs
-        */
-       enable: function(userIDs) {
-               this._proxy.setOption('data', {
-                       actionName: 'enable',
-                       className: 'wcf\\data\\user\\UserAction',
-                       objectIDs: userIDs
-               });
-               this._proxy.sendRequest();
-       },
-       
-       /**
-        * Handles successful AJAX calls.
-        * 
-        * @param       object          data
-        * @param       string          textStatus
-        * @param       jQuery          jqXHR
-        */
-       _success: function(data, textStatus, jqXHR) {
-               $('.jsEnableButton').each(function(index, button) {
-                       var $button = $(button);
-                       if (WCF.inArray($button.data('objectID'), data.objectIDs)) {
-                               if (data.actionName == 'disable') {
-                                       $button.data('enabled', false).data('tooltip', $button.data('enableMessage')).removeClass('icon-circle-blank').addClass('icon-off');
-                               }
-                               else {
-                                       $button.data('enabled', true).data('tooltip', $button.data('disableMessage')).removeClass('icon-off').addClass('icon-circle-blank');
-                               }
-                       }
-               });
-               
-               var $notification = new WCF.System.Notification();
-               $notification.show();
-               
-               WCF.Clipboard.reload();
-       }
-};
index e508dde145ab700b98cf4f137d25c8fadf815c2e..346d55c7b4b917b3cc9fe31346d8f3e60ed183b4 100644 (file)
@@ -2018,3 +2018,112 @@ WCF.ACP.User.BanHandler = {
                WCF.Clipboard.reload();
        }
 };
+
+/**
+ * Generic implementation to enable users.
+ */
+WCF.ACP.User.EnableHandler = {
+       /**
+        * action proxy
+        * @var WCF.Action.Proxy
+        */
+       _proxy: null,
+       
+       /**
+        * Initializes WCF.ACP.User.EnableHandler on first use.
+        */
+       init: function() {
+               this._proxy = new WCF.Action.Proxy({
+                       success: $.proxy(this._success, this)
+               });
+               
+               $('.jsEnableButton').click($.proxy(function(event) {
+                       var $button = $(event.currentTarget);
+                       if ($button.data('enabled')) {
+                               this.disable([ $button.data('objectID') ]);
+                       }
+                       else {
+                               this.enable([ $button.data('objectID') ]);
+                       }
+               }, this));
+               
+               // bind listener
+               $('.jsClipboardEditor').each($.proxy(function(index, container) {
+                       var $container = $(container);
+                       var $types = eval($container.data('types'));
+                       if (WCF.inArray('com.woltlab.wcf.user', $types)) {
+                               $container.on('clipboardAction', $.proxy(this._execute, this));
+                               return false;
+                       }
+               }, this));
+       },
+       
+       /**
+        * Handles clipboard actions.
+        * 
+        * @param       object          event
+        * @param       string          type
+        * @param       string          actionName
+        * @param       object          parameters
+        */
+       _execute: function(event, type, actionName, parameters) {
+               if (actionName == 'com.woltlab.wcf.user.enable') {
+                       this.enable(parameters.objectIDs);
+               }
+       },
+       
+       /**
+        * Disables users.
+        * 
+        * @param       array<integer>  userIDs
+        */
+       disable: function(userIDs) {
+               this._proxy.setOption('data', {
+                       actionName: 'disable',
+                       className: 'wcf\\data\\user\\UserAction',
+                       objectIDs: userIDs
+               });
+               this._proxy.sendRequest();
+       },
+       
+       /**
+        * Enables users.
+        * 
+        * @param       array<integer>  userIDs
+        */
+       enable: function(userIDs) {
+               this._proxy.setOption('data', {
+                       actionName: 'enable',
+                       className: 'wcf\\data\\user\\UserAction',
+                       objectIDs: userIDs
+               });
+               this._proxy.sendRequest();
+       },
+       
+       /**
+        * Handles successful AJAX calls.
+        * 
+        * @param       object          data
+        * @param       string          textStatus
+        * @param       jQuery          jqXHR
+        */
+       _success: function(data, textStatus, jqXHR) {
+               $('.jsEnableButton').each(function(index, button) {
+                       var $button = $(button);
+                       if (WCF.inArray($button.data('objectID'), data.objectIDs)) {
+                               if (data.actionName == 'disable') {
+                                       $button.data('enabled', false).data('tooltip', $button.data('enableMessage')).removeClass('icon-circle-blank').addClass('icon-off');
+                               }
+                               else {
+                                       $button.data('enabled', true).data('tooltip', $button.data('disableMessage')).removeClass('icon-off').addClass('icon-circle-blank');
+                               }
+                       }
+               });
+               
+               var $notification = new WCF.System.Notification();
+               $notification.show();
+               
+               WCF.Clipboard.reload();
+       }
+};
+
index 06807f0a7884a5424020520e4a21e4851da48fd9..ad4ca8ac9e05f30ab3f5a255c52d763fdeb1ebad 100644 (file)
@@ -7,7 +7,6 @@
 {include file='header'}
 
 {event name='javascriptInclude'}
-<script type="text/javascript" src="{@$__wcf->getPath()}acp/js/WCF.ACP.User.js?v={@$__wcfVersion}"></script>
 <script type="text/javascript">
        //<![CDATA[
        $(function() {