mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-31 01:34:12 +02:00
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:
parent
69237b8ae9
commit
856e574c26
@ -99,15 +99,16 @@
|
|||||||
extensibleSetAction: function(ev)
|
extensibleSetAction: function(ev)
|
||||||
{
|
{
|
||||||
var el = ev.currentTarget;
|
var el = ev.currentTarget;
|
||||||
|
|
||||||
if (el.name.match(/__MOVE_UP$/)) {
|
if (el.name.match(/__MOVE_UP$/)) {
|
||||||
var $li = $(el).closest('li');
|
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 ($li.find('input[type=text].autosubmit')) {
|
||||||
if (iid = $prev.find('input[type=text]').attr('id')) {
|
if (iid = $prev.find('input[type=text]').attr('id')) {
|
||||||
$li.closest('.container').data('activeExtensibleEntry', iid);
|
$li.closest('.container').data('activeExtensibleEntry', iid);
|
||||||
|
} else {
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
if ($prev.length) {
|
if ($prev.length) {
|
||||||
$prev.before($li.detach());
|
$prev.before($li.detach());
|
||||||
@ -118,12 +119,14 @@
|
|||||||
return false;
|
return false;
|
||||||
} else if (el.name.match(/__MOVE_DOWN$/)) {
|
} else if (el.name.match(/__MOVE_DOWN$/)) {
|
||||||
var $li = $(el).closest('li');
|
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 ($li.find('input[type=text].autosubmit')) {
|
||||||
if (iid = $next.find('input[type=text]').attr('id')) {
|
if (iid = $next.find('input[type=text]').attr('id')) {
|
||||||
$li.closest('.container').data('activeExtensibleEntry', iid);
|
$li.closest('.container').data('activeExtensibleEntry', iid);
|
||||||
|
} else {
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
if ($next.length && ! $next.find('.extend-set').length) {
|
if ($next.length && ! $next.find('.extend-set').length) {
|
||||||
$next.after($li.detach());
|
$next.after($li.detach());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user