Hi Jacques,

Right, I forgot it, thanks for this remind. I will try to do this afternoon

Nicolas


Le 30/07/2017 à 12:25, Jacques Le Roux a écrit :
Hi Nicolas,

Do we have an example of use at https://demo-trunk.ofbiz.apache.org/example/control/FormWidgetExamples ?

If not would be great to have

Thanks

Jacques


Le 22/07/2017 à 14:14, nma...@apache.org a écrit :
Author: nmalin
Date: Sat Jul 22 12:14:59 2017
New Revision: 1802682

URL: http://svn.apache.org/viewvc?rev=1802682&view=rev
Log:
Improved: set auto completion only in lookup field (OFBIZ-9378)
Add a new option presentation none for the lookup element to don't display the link for display the search form bu only use autocompletion. In the initial path from Pierre Gaudin the presentation name was autocompletion-only but I prefer change it to none because the link is just not preent.
Thanks Pierre Gaudin for this proposal and patch

Modified:
ofbiz/ofbiz-framework/trunk/framework/images/webapp/images/fieldlookup.js
ofbiz/ofbiz-framework/trunk/framework/widget/dtd/widget-form.xsd

Modified: ofbiz/ofbiz-framework/trunk/framework/images/webapp/images/fieldlookup.js URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/images/webapp/images/fieldlookup.js?rev=1802682&r1=1802681&r2=1802682&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/images/webapp/images/fieldlookup.js (original) +++ ofbiz/ofbiz-framework/trunk/framework/images/webapp/images/fieldlookup.js Sat Jul 22 12:14:59 2017
@@ -228,20 +228,22 @@ var Lookup = function(options) {
          _inputBox = document.getElementById(options.inputFieldId);
          _newInputBoxId = _lookupId + "_" + options.inputFieldId;
          _inputBox.id = _newInputBoxId;
-        var parent = _inputBox.parentNode;
+        if (options.presentation != "none") {
+            var parent = _inputBox.parentNode;
  -        var link = document.createElement('A');
-        link.href = "javascript:void(0);";
-        link.id = _lookupId + "_button";
+            var link = document.createElement('A');
+            link.href = "javascript:void(0);";
+            link.id = _lookupId + "_button";
  -        parent.appendChild(link);
+            parent.appendChild(link);
  -        var hiddenDiv = document.createElement("DIV");
-        hiddenDiv.id = _lookupId;
-        hiddenDiv.css = "{display: none;}";
-        hiddenDiv.title = "";
+            var hiddenDiv = document.createElement("DIV");
+            hiddenDiv.id = _lookupId;
+            hiddenDiv.css = "{display: none;}";
+            hiddenDiv.title = "";
  -        parent.appendChild(hiddenDiv);
+            parent.appendChild(hiddenDiv);
+        }
      }
        function _createAjaxAutoComplete() {

Modified: ofbiz/ofbiz-framework/trunk/framework/widget/dtd/widget-form.xsd URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/widget/dtd/widget-form.xsd?rev=1802682&r1=1802681&r2=1802682&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/widget/dtd/widget-form.xsd (original) +++ ofbiz/ofbiz-framework/trunk/framework/widget/dtd/widget-form.xsd Sat Jul 22 12:14:59 2017
@@ -1368,6 +1368,7 @@ under the License.
                  <xs:annotation>
                      <xs:documentation>
Shows the lookup as moveable and resizable layer or popup window. + if set to none only autocompletion is active (no lookup form would be call)
                          Default to layer.
                      </xs:documentation>
                  </xs:annotation>
@@ -1375,6 +1376,7 @@ under the License.
                      <xs:restriction base="xs:string">
                          <xs:enumeration value="layer" />
                          <xs:enumeration value="window" />
+                        <xs:enumeration value="none" />
                      </xs:restriction>
                  </xs:simpleType>
              </xs:attribute>






Reply via email to