From a6e646a303daa589ce908c5db6f3c9b83f14299b Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Tue, 29 Jan 2013 15:55:50 +0100 Subject: [PATCH] Allowing more freedom for WCF.Sortable.List --- wcfsetup/install/files/js/WCF.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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)); } }, -- 2.20.1