details:   /erp/devel/pi/rev/dedb0498fda1
changeset: 9840:dedb0498fda1
user:      Martin Taal <martin.taal <at> openbravo.com>
date:      Sun Jan 16 21:28:40 2011 +0100
summary:   Solved NPE in FIC

details:   /erp/devel/pi/rev/696edfbba9d7
changeset: 9841:696edfbba9d7
user:      Martin Taal <martin.taal <at> openbravo.com>
date:      Sun Jan 16 21:29:31 2011 +0100
summary:   Fixes issue 15669 Replace default filter funnel icon with new one, 
Fixes issue 15670 add click on filtericon

diffstat:

 .hgignore                                                                      
                                                                                
        |    3 +
 
modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FormInitializationComponent.java
                                                  |   18 ++--
 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-grid.js
                                                                            |   
38 +++++++--
 
modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/3.00/org.openbravo.client.application/images/grid/funnel-icon.png
 |    0 
 
modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/3.00/org.openbravo.client.application/ob-grid-styles.css
          |   11 ++
 5 files changed, 53 insertions(+), 17 deletions(-)

diffs (135 lines):

diff -r 43b9ea3ec34b -r 696edfbba9d7 .hgignore
--- a/.hgignore Sat Jan 15 16:58:51 2011 +0100
+++ b/.hgignore Sun Jan 16 21:29:31 2011 +0100
@@ -38,3 +38,6 @@
 *.bak
 *.swp
 Thumbs.db
+
+sources
+scripts
diff -r 43b9ea3ec34b -r 696edfbba9d7 
modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FormInitializationComponent.java
--- 
a/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FormInitializationComponent.java
     Sat Jan 15 16:58:51 2011 +0100
+++ 
b/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FormInitializationComponent.java
     Sun Jan 16 21:29:31 2011 +0100
@@ -67,7 +67,7 @@
 public class FormInitializationComponent extends BaseActionHandler {
   private static final Logger log = 
Logger.getLogger(FormInitializationComponent.class);
 
-  private static final int MAX_CALLOUT_CALLS = 10;
+  private static final int MAX_CALLOUT_CALLS = 50;
 
   // @Override
   protected JSONObject execute(Map<String, Object> parameters, String content) 
{
@@ -240,14 +240,14 @@
               }
             }
             setRequestContextParameter(field, jsonobject);
-          }
-          // We also set the session value for the column in Edit or 
SetSession mode
-          if (mode.equals("EDIT") || mode.equals("SETSESSION")) {
-            if (field.getColumn().isStoredInSession() || 
field.getColumn().isKeyColumn()) {
-              setSessionValue(tab.getWindow().getId() + "|"
-                  + field.getColumn().getDBColumnName().toUpperCase(),
-                  jsonobject.has("value") ? 
uiDef.formatValueToSQL(jsonobject.get("value")
-                      .toString()) : null);
+            // We also set the session value for the column in Edit or 
SetSession mode
+            if (mode.equals("EDIT") || mode.equals("SETSESSION")) {
+              if (field.getColumn().isStoredInSession() || 
field.getColumn().isKeyColumn()) {
+                setSessionValue(tab.getWindow().getId() + "|"
+                    + field.getColumn().getDBColumnName().toUpperCase(),
+                    jsonobject.has("value") ? 
uiDef.formatValueToSQL(jsonobject.get("value")
+                        .toString()) : null);
+              }
             }
 
           }
diff -r 43b9ea3ec34b -r 696edfbba9d7 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-grid.js
--- 
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-grid.js
       Sat Jan 15 16:58:51 2011 +0100
+++ 
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-grid.js
       Sun Jan 16 21:29:31 2011 +0100
@@ -89,25 +89,47 @@
         field.formatCellValue = formatCellValueFunction;
       }
     }
-        
+    
     this.filterEditorProperties = {
       // is needed to display information in the checkbox field 
       // header in the filter editor row
-//      isCheckboxField: function(){
-//        return false;
-//      },
+      //      isCheckboxField: function(){
+      //        return false;
+      //      },
+      
+      filterImg: {
+        src: 
'[SKINIMG]../../org.openbravo.client.application/images/grid/funnel-icon.png'
+      },
+      
+      makeActionButton: function(){
+        var ret = this.Super('makeActionButton', arguments);
+        var layout = isc.HLayout.create({
+          styleName: 'OBGridFilterFunnelBackground',
+          width: '100%',
+          height: '100%',
+          left: this.getInnerWidth() - this.getScrollbarSize() - 2
+        });
+        this.addChild(layout);
+        return ret;
+      },
       
       actionButtonProperties: {
+        baseStyle: 'OBGridFilterFunnelIcon',
         visibility: 'hidden',
-        disabled: true,
+        showFocused: false,
         showDisabled: false,
-        initWidget: function() {
+        left: this.getInnerWidth() - this.getScrollbarSize() - 2,
+        initWidget: function(){
           thisGrid.filterImage = this;
           return this.Super('initWidget', arguments);
+        },
+        click: function(){
+          this.recordEditor.getEditForm().clearValues();
+          this.recordEditor.performAction();
         }
       }
     };
-
+    
     return this.Super('initWidget', arguments);
   },
   
@@ -153,7 +175,7 @@
     this.filterImage.hide();
   },
   
-  isValidFilterField: function(field) {
+  isValidFilterField: function(field){
     if (!field) {
       return false;
     }
diff -r 43b9ea3ec34b -r 696edfbba9d7 
modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/3.00/org.openbravo.client.application/images/grid/funnel-icon.png
Binary file 
modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/3.00/org.openbravo.client.application/images/grid/funnel-icon.png
 has changed
diff -r 43b9ea3ec34b -r 696edfbba9d7 
modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/3.00/org.openbravo.client.application/ob-grid-styles.css
--- 
a/modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/3.00/org.openbravo.client.application/ob-grid-styles.css
     Sat Jan 15 16:58:51 2011 +0100
+++ 
b/modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/3.00/org.openbravo.client.application/ob-grid-styles.css
     Sun Jan 16 21:29:31 2011 +0100
@@ -111,6 +111,17 @@
   border-top: 1px solid #b2b5b0;
 }
 
+.OBGridFilterFunnelBackground {
+  background-color: #c9d6ba;
+}
+
+.OBGridFilterFunnelIconDown,
+.OBGridFilterFunnelIconSelected,
+.OBGridFilterFunnelIconFocused,
+.OBGridFilterFunnelIcon {
+  background-color: #c9d6ba;
+  cursor: 'pointer';
+}
 
 .OBGridHeaderCellTitle,
 .OBGridHeaderCellTitleOver,

------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
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