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.
This commit is contained in:
Thomas Gelf 2016-10-13 22:06:01 +00:00
parent 69237b8ae9
commit 856e574c26
1 changed files with 8 additions and 5 deletions

View File

@ -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());