[icinga-checkins] icinga.org: icingaweb2-module-director/feature/icinga1-config-12919: js: fix extensible set for mass edit

git at icinga.org git at icinga.org
Wed Oct 19 13:17:42 CEST 2016


Module: icingaweb2-module-director
Branch: feature/icinga1-config-12919
Commit: 856e574c26e55bcf2b8dd535188ade563571e0ef
URL:    https://git.icinga.org/?p=icingaweb2-module-director.git;a=commit;h=856e574c26e55bcf2b8dd535188ade563571e0ef

Author: Thomas Gelf <thomas at gelf.net>
Date:   Thu Oct 13 22:06:01 2016 +0000

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 76b1543..aaf3c76 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());



More information about the icinga-checkins mailing list