Fixes issue
15669 Replace default filter funnel icon with new one, Fixes issue
15670 add click on filtericon
--- a/.hgignore Sun Jan 16 21:28:40 2011 +0100
+++ b/.hgignore Sun Jan 16 21:29:31 2011 +0100
@@ -38,3 +38,6 @@
*.bak
*.swp
Thumbs.db
+
+sources
+scripts
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-grid.js Sun Jan 16 21:28:40 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;
}
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
--- a/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:28:40 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,