[icinga-checkins] icinga.org: icingaweb2/master: js: Fix that the menu is not reloaded in case no search is available

git at icinga.org git at icinga.org
Thu Aug 25 08:54:10 CEST 2016


Module: icingaweb2
Branch: master
Commit: 1993ae2ed2ee8ec2bc53a57dec78d733bb921b9d
URL:    https://git.icinga.org/?p=icingaweb2.git;a=commit;h=1993ae2ed2ee8ec2bc53a57dec78d733bb921b9d

Author: Johannes Meyer <johannes.meyer at netways.de>
Date:   Thu Aug 25 08:54:04 2016 +0200

js: Fix that the menu is not reloaded in case no search is available

fixes #12541

---

 public/js/icinga/behavior/form.js |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/public/js/icinga/behavior/form.js b/public/js/icinga/behavior/form.js
index 750f022..eae7516 100644
--- a/public/js/icinga/behavior/form.js
+++ b/public/js/icinga/behavior/form.js
@@ -60,10 +60,9 @@
             if ($search[0] === document.activeElement) {
                 return null;
             }
-            var search = $container.find('#search').val();
-            if (search.length) {
+            if ($search.length) {
                 var $content = $('<div></div>').append(content);
-                $content.find('#search').attr('value', search).addClass('active');
+                $content.find('#search').attr('value', $search.val()).addClass('active');
                 return $content.html();
             }
             return content;



More information about the icinga-checkins mailing list