From: Alexander Ebert Date: Mon, 5 Mar 2012 18:55:09 +0000 (+0100) Subject: Sortables now rely on a button X-Git-Tag: 2.0.0_Beta_1~1251 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d1a6b448940e928d5660745497cd3be5c55dcd36;p=GitHub%2FWoltLab%2FWCF.git Sortables now rely on a button --- 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. *