details:   /erp/devel/pi/rev/72003d0cf144
changeset: 10127:72003d0cf144
user:      Martin Taal <martin.taal <at> openbravo.com>
date:      Tue Jan 25 23:48:36 2011 +0100
summary:   Do not show tabs without fields in the new ui

details:   /erp/devel/pi/rev/67117d6c25f3
changeset: 10128:67117d6c25f3
user:      Martin Taal <martin.taal <at> openbravo.com>
date:      Tue Jan 25 23:48:58 2011 +0100
summary:   Made recent utilities a bit more robust

diffstat:

 
modules/org.openbravo.client.application/src/org/openbravo/client/application/window/StandardWindowComponent.java
 |  3 ++-
 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-recent-utilities.js
           |  7 ++++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diffs (32 lines):

diff -r 157e1d81beb8 -r 67117d6c25f3 
modules/org.openbravo.client.application/src/org/openbravo/client/application/window/StandardWindowComponent.java
--- 
a/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/StandardWindowComponent.java
 Tue Jan 25 23:47:41 2011 +0100
+++ 
b/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/StandardWindowComponent.java
 Tue Jan 25 23:48:58 2011 +0100
@@ -153,7 +153,8 @@
 
     final List<OBViewTab> tempTabs = new ArrayList<OBViewTab>();
     for (Tab tab : getWindow().getADTabList()) {
-      if (!tab.isActive()) {
+      // NOTE: grid sequence and field sequence tabs do not have any fields 
defined!
+      if (!tab.isActive() || tab.getADFieldList().isEmpty()) {
         continue;
       }
       final OBViewTab tabComponent = createComponent(OBViewTab.class);
diff -r 157e1d81beb8 -r 67117d6c25f3 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-recent-utilities.js
--- 
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-recent-utilities.js
   Tue Jan 25 23:47:41 2011 +0100
+++ 
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-recent-utilities.js
   Tue Jan 25 23:48:58 2011 +0100
@@ -84,9 +84,14 @@
     //
     // Parameters:
     // * {{{propertyName}}}: the name under which the recent value is stored.
-    // * {{{choiceObject}}}: the object defining the last user choice.
+    // * {{{choiceObject}}}: the object defining the last user choice, can be 
null
+    //                        in this case the call returns without changing 
things.
     //
     addRecent: function(/* String */propertyName, /* Object */ choiceObject){
+      // in some cases the choiceobject is not set, just ignore those
+      if (!choiceObject) {
+        return;
+      }
       var currentRecentValue = this.getRecentValue(propertyName);
       var currentIndex = -1;
       for (var i = 0; i < currentRecentValue.length; i++) {

------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to