From: Alexander Ebert Date: Tue, 29 Jan 2013 14:55:50 +0000 (+0100) Subject: Allowing more freedom for WCF.Sortable.List X-Git-Tag: 2.0.0_Beta_1~529^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a6e646a303daa589ce908c5db6f3c9b83f14299b;p=GitHub%2FWoltLab%2FWCF.git Allowing more freedom for WCF.Sortable.List --- diff --git a/wcfsetup/install/files/js/WCF.js b/wcfsetup/install/files/js/WCF.js index 3101760e05..d7b6b6ed25 100755 --- a/wcfsetup/install/files/js/WCF.js +++ b/wcfsetup/install/files/js/WCF.js @@ -6060,7 +6060,16 @@ WCF.Sortable.List = Class.extend({ } if (this._className) { - this._container.find('.formSubmit > button[data-type="submit"]').click($.proxy(this._submit, this)); + var $formSubmit = this._container.find('.formSubmit'); + if (!$formSubmit.length) { + $formSubmit = this._container.next('.formSubmit'); + if (!$formSubmit.length) { + console.debug("[WCF.Sortable.Simple] Unable to find form submit for saving, aborting."); + return; + } + } + + $formSubmit.children('button[data-type="submit"]').click($.proxy(this._submit, this)); } },