You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by hn...@apache.org on 2017/04/06 07:15:15 UTC

svn commit: r1790348 - in /myfaces/tobago/trunk: tobago-example/tobago-example-demo/src/main/webapp/content/40-test/60000-manual/4500-suggest/ tobago-theme/tobago-theme-standard/src/main/resources/META-INF/resources/tobago/standard/tobago-bootstrap/_ve...

Author: hnoeth
Date: Thu Apr  6 07:15:15 2017
New Revision: 1790348

URL: http://svn.apache.org/viewvc?rev=1790348&view=rev
Log:
TOBAGO-1731 Input suggest-layer misplaced in combination with (after-)facet
* fix positioning of the suggest box

Modified:
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/60000-manual/4500-suggest/suggest.xhtml
    myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/resources/tobago/standard/tobago-bootstrap/_version/js/tobago-suggest.js

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/60000-manual/4500-suggest/suggest.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/60000-manual/4500-suggest/suggest.xhtml?rev=1790348&r1=1790347&r2=1790348&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/60000-manual/4500-suggest/suggest.xhtml (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/60000-manual/4500-suggest/suggest.xhtml Thu Apr  6 07:15:15 2017
@@ -45,4 +45,14 @@
       <tc:event/>
     </tc:in>
   </tc:section>
+
+  <tc:section label="Suggest inside an Input Group">
+    <tc:in id="withFacets" >
+      <f:facet name="before">Before</f:facet>
+      <tc:suggest totalCount="10" query="#{suggestController.query}">
+        <tc:selectItems value="#{suggestController.languages}" var="language" itemValue="#{language}"/>
+      </tc:suggest>
+      <f:facet name="after">After</f:facet>
+    </tc:in>
+  </tc:section>
 </ui:composition>

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/resources/tobago/standard/tobago-bootstrap/_version/js/tobago-suggest.js
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/resources/tobago/standard/tobago-bootstrap/_version/js/tobago-suggest.js?rev=1790348&r1=1790347&r2=1790348&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/resources/tobago/standard/tobago-bootstrap/_version/js/tobago-suggest.js (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/resources/tobago/standard/tobago-bootstrap/_version/js/tobago-suggest.js Thu Apr  6 07:15:15 2017
@@ -123,6 +123,9 @@ Tobago.Suggest.init = function(elements)
       input.bind('typeahead:open', function() {
         var $input = jQuery(this);
         var $suggest = $input.parent().siblings(".tobago-suggest");
+        if($suggest.length == 0) {
+          $suggest = $input.parent().parent().parent().siblings(".tobago-suggest");
+        }
         var $suggestPopup = jQuery(Tobago.Utils.escapeClientId($suggest.attr('id') + "::popup"));
         $suggestPopup.css("top", $input.offset().top + $input.outerHeight() + "px");
         $suggestPopup.css("left", $input.offset().left + "px");