details:   /erp/devel/pi/rev/1eccbdb94c77
changeset: 9555:1eccbdb94c77
user:      Gorka Ion Damián <gorkaion.damian <at> openbravo.com>
date:      Wed Jan 05 16:51:42 2011 +0100
summary:   [OBKMO] Call to refresh widget moved to Query/List Module.

details:   /erp/devel/pi/rev/9edc4ca56c37
changeset: 9556:9edc4ca56c37
user:      Gorka Ion Damián <gorkaion.damian <at> openbravo.com>
date:      Wed Jan 05 16:52:12 2011 +0100
summary:   [OBCQL] Added Show All label to widget view.

diffstat:

 
modules/org.openbravo.client.myob/web/org.openbravo.client.myob/js/ob-widget.js 
                                                                               
|   7 +--
 
modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_MESSAGE.xml
                                                                               
|  14 +++++
 
modules/org.openbravo.client.querylist/src/org/openbravo/client/querylist/QueryListComponentProvider.java
                                                      |   9 +++-
 
modules/org.openbravo.client.querylist/web/org.openbravo.client.querylist/js/ob-querylist-widget.js
                                                            |  25 +++++++--
 
modules/org.openbravo.client.querylist/web/org.openbravo.userinterface.smartclient/openbravo/skins/3.00/org.openbravo.client.querylist/ob-querylist-styles.css
 |  26 ++++++++++
 5 files changed, 68 insertions(+), 13 deletions(-)

diffs (166 lines):

diff -r a0dfb08f14f0 -r 9edc4ca56c37 
modules/org.openbravo.client.myob/web/org.openbravo.client.myob/js/ob-widget.js
--- 
a/modules/org.openbravo.client.myob/web/org.openbravo.client.myob/js/ob-widget.js
   Wed Jan 05 16:36:11 2011 +0100
+++ 
b/modules/org.openbravo.client.myob/web/org.openbravo.client.myob/js/ob-widget.js
   Wed Jan 05 16:52:12 2011 +0100
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2010 Openbravo SLU
+ * All portions are Copyright (C) 2010-2011 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -232,11 +232,6 @@
     this.src = null;
     this.items = [this.windowContents, this.editFormLayout];
     this.Super('initWidget', arguments);
-    
-    // refresh if the dbInstanceId is set
-    if (this.dbInstanceId) {
-      this.refresh();
-    }
   },
 
   confirmedClosePortlet: function(ok){
diff -r a0dfb08f14f0 -r 9edc4ca56c37 
modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_MESSAGE.xml
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ 
b/modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_MESSAGE.xml
  Wed Jan 05 16:52:12 2011 +0100
@@ -0,0 +1,14 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<data>
+<!--5E5284441DF84DD9805D53C571E2D05E--><AD_MESSAGE>
+<!--5E5284441DF84DD9805D53C571E2D05E-->  
<AD_MESSAGE_ID><![CDATA[5E5284441DF84DD9805D53C571E2D05E]]></AD_MESSAGE_ID>
+<!--5E5284441DF84DD9805D53C571E2D05E-->  
<AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--5E5284441DF84DD9805D53C571E2D05E-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--5E5284441DF84DD9805D53C571E2D05E-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--5E5284441DF84DD9805D53C571E2D05E-->  
<VALUE><![CDATA[OBCQL_ShowAll]]></VALUE>
+<!--5E5284441DF84DD9805D53C571E2D05E-->  <MSGTEXT><![CDATA[Show 
all...]]></MSGTEXT>
+<!--5E5284441DF84DD9805D53C571E2D05E-->  <MSGTYPE><![CDATA[I]]></MSGTYPE>
+<!--5E5284441DF84DD9805D53C571E2D05E-->  
<AD_MODULE_ID><![CDATA[0A060B2AF1974E8EAA8DB61388E9AECC]]></AD_MODULE_ID>
+<!--5E5284441DF84DD9805D53C571E2D05E--></AD_MESSAGE>
+
+</data>
diff -r a0dfb08f14f0 -r 9edc4ca56c37 
modules/org.openbravo.client.querylist/src/org/openbravo/client/querylist/QueryListComponentProvider.java
--- 
a/modules/org.openbravo.client.querylist/src/org/openbravo/client/querylist/QueryListComponentProvider.java
 Wed Jan 05 16:36:11 2011 +0100
+++ 
b/modules/org.openbravo.client.querylist/src/org/openbravo/client/querylist/QueryListComponentProvider.java
 Wed Jan 05 16:52:12 2011 +0100
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2010 Openbravo SLU
+ * All portions are Copyright (C) 2010-2011 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -27,6 +27,7 @@
 import org.openbravo.client.kernel.BaseComponentProvider;
 import org.openbravo.client.kernel.Component;
 import org.openbravo.client.kernel.ComponentProvider;
+import org.openbravo.client.kernel.KernelConstants;
 
 /**
  * 
@@ -49,6 +50,12 @@
         "web/org.openbravo.client.querylist/js/ob-querylist-widget.js", 
false));
     globalResources.add(createStaticResource(
         "web/org.openbravo.client.querylist/js/ob-querylist-view.js", false));
+
+    globalResources.add(createStyleSheetResource(
+        "web/org.openbravo.userinterface.smartclient/openbravo/skins/"
+            + KernelConstants.SKIN_VERSION_PARAMETER
+            + "/org.openbravo.client.querylist/ob-querylist-styles.css", 
false));
+
     return globalResources;
   }
 
diff -r a0dfb08f14f0 -r 9edc4ca56c37 
modules/org.openbravo.client.querylist/web/org.openbravo.client.querylist/js/ob-querylist-widget.js
--- 
a/modules/org.openbravo.client.querylist/web/org.openbravo.client.querylist/js/ob-querylist-widget.js
       Wed Jan 05 16:36:11 2011 +0100
+++ 
b/modules/org.openbravo.client.querylist/web/org.openbravo.client.querylist/js/ob-querylist-widget.js
       Wed Jan 05 16:52:12 2011 +0100
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2010 Openbravo SLU
+ * All portions are Copyright (C) 2010-2011 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -30,12 +30,22 @@
   grid: null,
   gridProperties: {},
   viewMode: 'widget',
+  
+  showAllLabel: null,
 
   initWidget: function(){
+    this.showAllLabel = isc.Label.create({
+      contents: OB.I18N.getLabel('OBCQL_ShowAll'),
+      className: 'OBQueryListShowAllLabel',
+      height: '20px',
+      width: '100%',
+      widget: this,
+      action: function(){this.widget.maximize();}
+    });
     this.Super('initWidget', arguments);
-    // Calculate height only on widget view mode
-    if (this.viewMode === 'widget') {
-      this.setWidgetHeight();
+    // refresh if the dbInstanceId is set
+    if (this.dbInstanceId) {
+      this.refresh();
     }
   },
 
@@ -51,8 +61,9 @@
     newGridHeight = this.grid.headerHeight +
                   (this.grid.cellHeight * (this.parameters.RowsNumber ? 
this.parameters.RowsNumber : 10)) +
                   this.grid.summaryRowHeight + 2;
+    this.grid.setHeight(newGridHeight);
 
-    var newHeight = headerHeight + newGridHeight + 13;
+    var newHeight = headerHeight + newGridHeight + 13 +  
this.showAllLabel.height;
     this.setHeight(newHeight);
     if (this.parentElement) {
       var heightDiff = newHeight - currentHeight,
@@ -81,7 +92,9 @@
       fields: this.fields
     }, this.gridProperties));
     
-    layout.addMembers(this.grid);
+    layout.addMember(this.grid);
+    layout.addMember(this.showAllLabel);
+
     return layout;
   },
   
diff -r a0dfb08f14f0 -r 9edc4ca56c37 
modules/org.openbravo.client.querylist/web/org.openbravo.userinterface.smartclient/openbravo/skins/3.00/org.openbravo.client.querylist/ob-querylist-styles.css
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ 
b/modules/org.openbravo.client.querylist/web/org.openbravo.userinterface.smartclient/openbravo/skins/3.00/org.openbravo.client.querylist/ob-querylist-styles.css
    Wed Jan 05 16:52:12 2011 +0100
@@ -0,0 +1,26 @@
+/*
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo  Public  License
+ * Version  1.1  (the  "License"),  being  the  Mozilla  Public  License
+ * Version 1.1  with a permitted attribution clause; you may not  use this
+ * file except in compliance with the License. You  may  obtain  a copy of
+ * the License at http://www.openbravo.com/legal/license.html 
+ * Software distributed under the License  is  distributed  on  an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific  language  governing  rights  and  limitations
+ * under the License.
+ * The Original Code is Openbravo ERP.
+ * The Initial Developer of the Original Code is Openbravo SLU
+ * All portions are Copyright (C) 2011 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+ */ 
+ 
+/* QueryList */
+.OBQueryListShowAllLabel {
+  font-family: 'lucida sans', sans-serif;
+  vertical-align: middle;
+  text-align: right;
+  color: #00A651;
+}
\ No newline at end of file

------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to