aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/adm/style/ajax.js
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/adm/style/ajax.js')
-rw-r--r--phpBB/adm/style/ajax.js12
1 files changed, 10 insertions, 2 deletions
diff --git a/phpBB/adm/style/ajax.js b/phpBB/adm/style/ajax.js
index 78fcbd88fd..959580d6c2 100644
--- a/phpBB/adm/style/ajax.js
+++ b/phpBB/adm/style/ajax.js
@@ -8,7 +8,11 @@
* an item is moved up. It moves the row up or down, and deactivates /
* activates any up / down icons that require it (the ones at the top or bottom).
*/
-phpbb.addAjaxCallback('row_down', function() {
+phpbb.addAjaxCallback('row_down', function(res) {
+ if (typeof res.success === 'undefined' || !res.success) {
+ return;
+ }
+
var el = $(this),
tr = el.parents('tr'),
trSwap = tr.next();
@@ -16,7 +20,11 @@ phpbb.addAjaxCallback('row_down', function() {
tr.insertAfter(trSwap);
});
-phpbb.addAjaxCallback('row_up', function() {
+phpbb.addAjaxCallback('row_up', function(res) {
+ if (typeof res.success === 'undefined' || !res.success) {
+ return;
+ }
+
var el = $(this),
tr = el.parents('tr'),
trSwap = tr.prev();