From d1a6b448940e928d5660745497cd3be5c55dcd36 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Mon, 5 Mar 2012 19:55:09 +0100 Subject: [PATCH] Sortables now rely on a button --- wcfsetup/install/files/js/WCF.js | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/wcfsetup/install/files/js/WCF.js b/wcfsetup/install/files/js/WCF.js index e4223f95e2..dcf6e67ad0 100644 --- a/wcfsetup/install/files/js/WCF.js +++ b/wcfsetup/install/files/js/WCF.js @@ -4221,15 +4221,17 @@ WCF.Sortable.List.prototype = { $('#' + this._containerID + ' .wcf-sortableList').sortable({ connectWith: '#' + this._containerID + ' .wcf-sortableList', items: 'li', - placeholder: 'wcf-sortablePlaceholder', - stop: $.proxy(this._save, this) + placeholder: 'wcf-sortablePlaceholder' }); + + this._container.find('.wcf-formSubmit > button[data-type="submit"]').click($.proxy(this._submit, this)); + this._container.find('.wcf-formSubmit > button[data-type="reset"]').click($.proxy(this._reset, this)); }, /** * Saves object structure. */ - _save: function() { + _submit: function() { // build structure this._container.find('.wcf-sortableList').each($.proxy(function(index, list) { var $list = $(list); @@ -4259,6 +4261,13 @@ WCF.Sortable.List.prototype = { this._proxy.sendRequest(); }, + /** + * Reloads current page. + */ + _reset: function() { + window.location.reload(true); + }, + /** * Shows notification upon success. * -- 2.20.1