details:   /erp/devel/pi/rev/ca144f1b0849
changeset: 10231:ca144f1b0849
user:      Martin Taal <martin.taal <at> openbravo.com>
date:      Sat Jan 29 18:37:23 2011 +0100
summary:   Restored rowcount

details:   /erp/devel/pi/rev/87cc46bf3ec1
changeset: 10232:87cc46bf3ec1
user:      Martin Taal <martin.taal <at> openbravo.com>
date:      Sat Jan 29 18:38:01 2011 +0100
summary:   Added icon before new and saved state, added hover in linked item

diffstat:

 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-statusbar.js
                                                                            |   
39 ++++++---
 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-form.js
                                                                            |   
 4 +-
 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-grid.js
                                                                            |   
 4 -
 
modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/3.00/org.openbravo.client.application/images/form/ico-to-new-tab.png
   |    0 
 
modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/3.00/org.openbravo.client.application/images/statusbar/check-saved.png
 |    0 
 
modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/3.00/org.openbravo.client.application/ob-form-styles.css
               |   11 +-
 
modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/3.00/org.openbravo.client.application/ob-statusbar-styles.css
          |    1 -
 
modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/3.00/org.openbravo.client.application/ob-statusbar-styles.js
           |    7 +
 8 files changed, 41 insertions(+), 25 deletions(-)

diffs (175 lines):

diff -r 3139f4185b35 -r 87cc46bf3ec1 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-statusbar.js
--- 
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-statusbar.js
  Sat Jan 29 14:39:10 2011 +0100
+++ 
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-statusbar.js
  Sat Jan 29 18:38:01 2011 +0100
@@ -90,6 +90,7 @@
   nextButton: null,
   previousButton: null,
   newIcon: null,
+  showingIcon: false,
   
   initWidget: function(){
     this.stateLabel = isc.OBStatusBarTextLabel.create({
@@ -133,35 +134,47 @@
         
OB.TestRegistry.register('org.openbravo.client.application.statusbar.button.' + 
buttonBar.members[i].buttonType + '.' + this.view.tabId, buttonBar.members[i]); 
       
       }
     }
+
+    this.checkedIcon = isc.Img.create(this.checkedIconDefaults);
+    this.newIcon = isc.Img.create(this.newIconDefaults);
+    this.spacer = isc.LayoutSpacer.create({width: 14});
+    this.leftStatusBar.addMember(this.spacer, 0);
+
     this.addMembers([this.leftStatusBar, buttonBar]);
     return this.Super('initWidget', arguments);
   },
   
-//  setNewIcon: function(show) {
-//    if (show) {      
-//      if (!this.newIcon) {
-//        this.newIcon = isc.Img.create(this.newIconDefaults);
-//      }
-//      this.leftBar.addMember(this.newIcon, 0);
-//    } else if (this.newIcon) {
-//      this.leftBar.removeMember(this.newIcon);
-//    }
-//  },
+  addIcon: function(icon) {
+    // remove any existing icon or spacer
+    this.leftStatusBar.removeMember(this.leftStatusBar.members[0]);
+    this.leftStatusBar.addMember(icon, 0);    
+  },
+  
+  removeIcon: function() {
+    // remove any existing icon or spacer
+    this.leftStatusBar.removeMember(this.leftStatusBar.members[0]);
+    this.leftStatusBar.addMember(this.spacer, 0);
+  },
   
   setNewState: function(isNew) {
     this.previousButton.setDisabled(isNew);
     this.nextButton.setDisabled(isNew);
     if (isNew) {
-      this.setStateLabel('OBUIAPP_New');
+      this.setStateLabel('OBUIAPP_New', this.newIcon);
     }
   },
   
-  setStateLabel: function (labelCode) {
+  setStateLabel: function (labelCode, icon) {
     var msg = '&nbsp;';
     if (labelCode) {
       msg = OB.I18N.getLabel(labelCode);
     }
-    this.stateLabel.setContents(msg);    
+    this.stateLabel.setContents(msg);
+    if (icon) {
+      this.addIcon(icon);
+    } else {
+      this.removeIcon(icon);
+    }
   }
   
 });
diff -r 3139f4185b35 -r 87cc46bf3ec1 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-form.js
--- 
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-form.js
  Sat Jan 29 14:39:10 2011 +0100
+++ 
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-form.js
  Sat Jan 29 18:38:01 2011 +0100
@@ -113,7 +113,7 @@
     
     this.view.toolBar.updateButtonState();
 
-    this.view.statusBar.setStateLabel('OBUIAPP_New');
+    this.view.statusBar.setStateLabel('OBUIAPP_New', 
this.view.statusBar.newIcon);
     
     this.retrieveInitialValues(true);
     
@@ -529,7 +529,7 @@
         form.rememberValues();
         
         //view.messageBar.setMessage(isc.OBMessageBar.TYPE_SUCCESS, null, 
OB.I18N.getLabel('OBUIAPP_SaveSuccess'));
-        view.statusBar.setStateLabel('OBUIAPP_Saved');
+        view.statusBar.setStateLabel('OBUIAPP_Saved', 
view.statusBar.checkedIcon);
         
         // force a fetch to place the grid on the correct location
         view.viewGrid.targetRecordId = data.id;
diff -r 3139f4185b35 -r 87cc46bf3ec1 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-grid.js
--- 
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-grid.js
  Sat Jan 29 14:39:10 2011 +0100
+++ 
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-grid.js
  Sat Jan 29 18:38:01 2011 +0100
@@ -324,10 +324,6 @@
   },
   
   updateRowCountDisplay: function(){
-    // disable for now
-    if (true) {
-      return;
-    }
     var newValue = '';
     if (this.data.getLength() > this.dataPageSize) {
       newValue = '>' + this.dataPageSize;
diff -r 3139f4185b35 -r 87cc46bf3ec1 
modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/3.00/org.openbravo.client.application/images/form/ico-to-new-tab.png
Binary file 
modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/3.00/org.openbravo.client.application/images/form/ico-to-new-tab.png
 has changed
diff -r 3139f4185b35 -r 87cc46bf3ec1 
modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/3.00/org.openbravo.client.application/images/statusbar/check-saved.png
Binary file 
modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/3.00/org.openbravo.client.application/images/statusbar/check-saved.png
 has changed
diff -r 3139f4185b35 -r 87cc46bf3ec1 
modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/3.00/org.openbravo.client.application/ob-form-styles.css
--- 
a/modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/3.00/org.openbravo.client.application/ob-form-styles.css
     Sat Jan 29 14:39:10 2011 +0100
+++ 
b/modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/3.00/org.openbravo.client.application/ob-form-styles.css
     Sat Jan 29 18:38:01 2011 +0100
@@ -58,15 +58,11 @@
 }
 
 .OBFormFieldLabel,
-.OBFormFieldLabelError,
+.OBFormFieldLabelError
 .OBFormFieldLabelFocused {
   color: #333333;
 }
 
-.OBFormFieldLabelDisabled {
-  color: #acacac;
-}
-
 .OBFormFieldStatic,
 .OBFormFieldStaticDisabled,
 .OBFormFieldStaticFocused,
@@ -584,3 +580,8 @@
 .OBFormFieldLinkButton {
   cursor: pointer;
 }
+
+.OBFormFieldLinkButton:hover {
+  color: #58A618;
+}
+
diff -r 3139f4185b35 -r 87cc46bf3ec1 
modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/3.00/org.openbravo.client.application/ob-statusbar-styles.css
--- 
a/modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/3.00/org.openbravo.client.application/ob-statusbar-styles.css
        Sat Jan 29 14:39:10 2011 +0100
+++ 
b/modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/3.00/org.openbravo.client.application/ob-statusbar-styles.css
        Sat Jan 29 18:38:01 2011 +0100
@@ -29,7 +29,6 @@
   font-size: 11px;
   color: #333333;
   font-weight: bold;
-  padding-left: 20px;
 }
 
 .OBStatusBarLeftBar {
diff -r 3139f4185b35 -r 87cc46bf3ec1 
modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/3.00/org.openbravo.client.application/ob-statusbar-styles.js
--- 
a/modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/3.00/org.openbravo.client.application/ob-statusbar-styles.js
 Sat Jan 29 14:39:10 2011 +0100
+++ 
b/modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/3.00/org.openbravo.client.application/ob-statusbar-styles.js
 Sat Jan 29 18:38:01 2011 +0100
@@ -25,6 +25,12 @@
   leaveScrollbarGap: false,
   overflow: 'hidden',
 
+  checkedIconDefaults: {
+    height: 14,
+    width: 14,
+    src:  
'[SKINIMG]../../org.openbravo.client.application/images/statusbar/check-saved.png'
+  },
+
   newIconDefaults: {
     showHover: true,
     prompt: OB.I18N.getLabel('OBUIAPP_NewIconPrompt'),
@@ -39,6 +45,7 @@
 isc.OBStatusBarLeftBar.addProperties({
   baseStyle: 'OBStatusBarLeftBar',
   width: '*',
+  membersMargin: 5,
   layoutLeftMargin: 5,
   defaultLayoutAlign: 'center',
   align: 'left',

------------------------------------------------------------------------------
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