svn commit: r987804 - in /ofbiz/branches/jquery/framework: images/webapp/images/fieldlookup.js widget/dtd/widget-form.xsd

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r987804 - in /ofbiz/branches/jquery/framework: images/webapp/images/fieldlookup.js widget/dtd/widget-form.xsd

jleroux@apache.org
Author: jleroux
Date: Sat Aug 21 17:41:42 2010
New Revision: 987804

URL: http://svn.apache.org/viewvc?rev=987804&view=rev
Log:
A patch from Sascha Rodekamp "jQuery Lookup Layer Transformation" (https://issues.apache.org/jira/browse/OFBIZ-3841) - OFBIZ-3841

Patch for fixing the positioning issue. Default: topleft!

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

Modified: ofbiz/branches/jquery/framework/images/webapp/images/fieldlookup.js
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/images/webapp/images/fieldlookup.js?rev=987804&r1=987803&r2=987804&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/images/webapp/images/fieldlookup.js (original)
+++ ofbiz/branches/jquery/framework/images/webapp/images/fieldlookup.js Sat Aug 21 17:41:42 2010
@@ -206,6 +206,23 @@ function ConstructLookup(requestUrl, inp
         new ajaxAutoCompleter(ajaxUrl, showDescription);
     }
     
+    var positioning = null;
+    if (position == "topleft") {
+        positioning = ['left', 'top'];
+    } else if (position == "topcenter") {
+        positioning = ['center', 'top'];
+    } else if (position == "topright") {
+        positioning = ['right', 'top'];
+    } else if (position == "center") {
+        positioning = 'center';
+    } else if (position == "left") {
+        positioning = 'left';
+    } else if (position == "right") {
+        positioning = 'right';
+    } else {
+        positioning = ['left', 'top'];
+    }
+    
     // Lookup Configuration
     var dialogOpts = {
         modal: (modal == "true") ? true : false,
@@ -213,6 +230,7 @@ function ConstructLookup(requestUrl, inp
         autoOpen: false,
         height: (height != "") ? parseInt(height) : 500,
         width: (width != "") ? parseInt(width) : 620,
+        position: positioning,
         draggable: true,
         resizeable: true,
         open: function() {

Modified: ofbiz/branches/jquery/framework/widget/dtd/widget-form.xsd
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/widget/dtd/widget-form.xsd?rev=987804&r1=987803&r2=987804&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/widget/dtd/widget-form.xsd (original)
+++ ofbiz/branches/jquery/framework/widget/dtd/widget-form.xsd Sat Aug 21 17:41:42 2010
@@ -961,10 +961,9 @@ under the License.
             <xs:annotation><xs:documentation>Only layer width. I.e. 250px, 12%</xs:documentation></xs:annotation>
         </xs:attribute>
         <xs:attribute name="position" default="topleft">
-            <xs:annotation><xs:documentation>Only for layer position. Default to topleft, normal sets the layer just under the target field, like for the calendar.</xs:documentation></xs:annotation>
+            <xs:annotation><xs:documentation>Only for layer positionining. Default to topleft corner.</xs:documentation></xs:annotation>
             <xs:simpleType>
                 <xs:restriction base="xs:string">
-                    <xs:enumeration value="normal"/>
                     <xs:enumeration value="center"/>
                     <xs:enumeration value="left"/>
                     <xs:enumeration value="right"/>