myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hno...@apache.org
Subject [myfaces-tobago] branch master updated: remove deprecated 'selector' method from tobago-suggest.js
Date Thu, 07 Jun 2018 12:22:45 GMT
This is an automated email from the ASF dual-hosted git repository.

hnoeth pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/myfaces-tobago.git


The following commit(s) were added to refs/heads/master by this push:
     new 0d2b782  remove deprecated 'selector' method from tobago-suggest.js
0d2b782 is described below

commit 0d2b782b84496dae3589c94df7fd7dec176793ec
Author: Henning Noeth <hnoeth@apache.org>
AuthorDate: Thu Jun 7 14:22:31 2018 +0200

    remove deprecated 'selector' method from tobago-suggest.js
    
    need to replace the selector method in tobago-suggest.js; otherwise
    with jQuery3 the dropdown menu is not append on the
    tobago-page-menuStore
---
 .../standard/tobago-bootstrap/_version/js/tobago-suggest.js       | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/resources/tobago/standard/tobago-bootstrap/_version/js/tobago-suggest.js
b/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/resources/tobago/standard/tobago-bootstrap/_version/js/tobago-suggest.js
index 81a1766..dbb6b0a 100644
--- a/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/resources/tobago/standard/tobago-bootstrap/_version/js/tobago-suggest.js
+++ b/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/resources/tobago/standard/tobago-bootstrap/_version/js/tobago-suggest.js
@@ -109,14 +109,18 @@ Tobago.Suggest.init = function (elements) {
         source = Tobago.Suggest.fromClient(data2);
       }
 
-      var $suggestPopup = jQuery(Tobago.Utils.escapeClientId(suggest.attr('id') + "::popup"));
+      function getSuggestPopup(suggest) {
+        return jQuery(Tobago.Utils.escapeClientId(suggest.attr('id') + "::popup"));
+      }
+
+      var $suggestPopup = getSuggestPopup(suggest);
       if ($suggestPopup.length > 0) {
         $suggestPopup.remove();
       }
 
       jQuery(".tobago-page-menuStore")
           .append("<div id='" + suggest.attr('id') + "::popup" + "' class='tt-menu tt-empty'/>");
-      $suggestPopup = jQuery($suggestPopup.selector);
+      $suggestPopup = getSuggestPopup(suggest);
 
       input.typeahead({
         menu: localMenu ? null : $suggestPopup,

-- 
To stop receiving notification emails like this one, please contact
hnoeth@apache.org.

Mime
View raw message