From 5ffc72b6fdd990db0312c72f379ae4a8c5a9cb59 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Mon, 21 May 2012 09:24:35 +0200 Subject: [PATCH] Makes it possible to extend JS delete/toggle action This is very helpful when you want to have a different effect which is especially needed when dealing with nested lists and deleting a list item with children. --- wcfsetup/install/files/js/WCF.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/wcfsetup/install/files/js/WCF.js b/wcfsetup/install/files/js/WCF.js index 93a9e3b3ef..b53e153749 100644 --- a/wcfsetup/install/files/js/WCF.js +++ b/wcfsetup/install/files/js/WCF.js @@ -1432,8 +1432,7 @@ WCF.Action.SimpleProxy.prototype = { * @param jQuery containerList * @param jQuery badgeList */ -WCF.Action.Delete = function(className, containerList, badgeList) { this.init(className, containerList, badgeList); }; -WCF.Action.Delete.prototype = { +WCF.Action.Delete = Class.extend({ /** * Initializes 'delete'-Proxy. * @@ -1534,7 +1533,7 @@ WCF.Action.Delete.prototype = { } }, this)); } -}; +}); /** * Basic implementation for AJAXProxy-based toggle actions. @@ -1543,8 +1542,7 @@ WCF.Action.Delete.prototype = { * @param jQuery containerList * @param string toggleButtonSelector */ -WCF.Action.Toggle = function(className, containerList, toggleButtonSelector) { this.init(className, containerList, toggleButtonSelector); }; -WCF.Action.Toggle.prototype = { +WCF.Action.Toggle = Class.extend({ /** * Initializes 'toggle'-Proxy * @@ -1643,7 +1641,7 @@ WCF.Action.Toggle.prototype = { } }, this)); } -}; +}); /** * Executes provided callback if scroll threshold is reached. Usuable to determine -- 2.20.1