From 856e574c26e55bcf2b8dd535188ade563571e0ef Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Thu, 13 Oct 2016 22:06:01 +0000 Subject: [PATCH] js: fix extensible set for mass edit Honestly, I have no idea why this check came in. Needs more investigation. One far day, works for now. --- public/js/module.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/public/js/module.js b/public/js/module.js index 76b1543d..aaf3c767 100644 --- a/public/js/module.js +++ b/public/js/module.js @@ -99,15 +99,16 @@ extensibleSetAction: function(ev) { var el = ev.currentTarget; - if (el.name.match(/__MOVE_UP$/)) { var $li = $(el).closest('li'); - var $prev = $li.prev() + var $prev = $li.prev(); + // TODO: document what's going on here. if ($li.find('input[type=text].autosubmit')) { if (iid = $prev.find('input[type=text]').attr('id')) { $li.closest('.container').data('activeExtensibleEntry', iid); + } else { + return true; } - return true; } if ($prev.length) { $prev.before($li.detach()); @@ -118,12 +119,14 @@ return false; } else if (el.name.match(/__MOVE_DOWN$/)) { var $li = $(el).closest('li'); - var $next = $li.next() + var $next = $li.next(); + // TODO: document what's going on here. if ($li.find('input[type=text].autosubmit')) { if (iid = $next.find('input[type=text]').attr('id')) { $li.closest('.container').data('activeExtensibleEntry', iid); + } else { + return true; } - return true; } if ($next.length && ! $next.find('.extend-set').length) { $next.after($li.detach());