details: /erp/devel/pi/rev/381d6fa4457c
changeset: 10178:381d6fa4457c
user: Martin Taal <martin.taal <at> openbravo.com>
date: Thu Jan 27 19:42:48 2011 +0100
summary: Removed unnecessary code
details: /erp/devel/pi/rev/1235744fbd78
changeset: 10179:1235744fbd78
user: Martin Taal <martin.taal <at> openbravo.com>
date: Thu Jan 27 19:43:31 2011 +0100
summary: Changed filter icon messages
diffstat:
modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MESSAGE.xml
| 19 ++++-
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-grid.js
| 35 ++++------
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-standard-view.js
| 8 --
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-grid.js
| 6 +-
4 files changed, 32 insertions(+), 36 deletions(-)
diffs (142 lines):
diff -r 40b97deff689 -r 1235744fbd78
modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MESSAGE.xml
---
a/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MESSAGE.xml
Thu Jan 27 17:23:41 2011 +0100
+++
b/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MESSAGE.xml
Thu Jan 27 19:43:31 2011 +0100
@@ -766,8 +766,8 @@
<!--FF8081812D949EEF012D94A1A9060024-->
<AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
<!--FF8081812D949EEF012D94A1A9060024--> <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
<!--FF8081812D949EEF012D94A1A9060024--> <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--FF8081812D949EEF012D94A1A9060024-->
<VALUE><![CDATA[OBUIAPP_GridFilterIconToolTip]]></VALUE>
-<!--FF8081812D949EEF012D94A1A9060024--> <MSGTEXT><![CDATA[Grid is filtered.
Click to clear all filters]]></MSGTEXT>
+<!--FF8081812D949EEF012D94A1A9060024-->
<VALUE><![CDATA[OBUIAPP_GridFilterExplicitToolTip]]></VALUE>
+<!--FF8081812D949EEF012D94A1A9060024--> <MSGTEXT><![CDATA[Explicit (user)
filters applied. Click to clear.]]></MSGTEXT>
<!--FF8081812D949EEF012D94A1A9060024--> <MSGTYPE><![CDATA[I]]></MSGTYPE>
<!--FF8081812D949EEF012D94A1A9060024-->
<AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
<!--FF8081812D949EEF012D94A1A9060024--></AD_MESSAGE>
@@ -909,10 +909,21 @@
<!--FF8081812DC07B0C012DC082C76E0014-->
<AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
<!--FF8081812DC07B0C012DC082C76E0014--> <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
<!--FF8081812DC07B0C012DC082C76E0014--> <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--FF8081812DC07B0C012DC082C76E0014-->
<VALUE><![CDATA[OBUIAPP_GridImplicitFilterIconToolTip]]></VALUE>
-<!--FF8081812DC07B0C012DC082C76E0014--> <MSGTEXT><![CDATA[Grid is filtered
using an automatic filter expression, click to clear the filter or enter your
own filter criteria to override this automatic filtering.]]></MSGTEXT>
+<!--FF8081812DC07B0C012DC082C76E0014-->
<VALUE><![CDATA[OBUIAPP_GridFilterBothToolTip]]></VALUE>
+<!--FF8081812DC07B0C012DC082C76E0014--> <MSGTEXT><![CDATA[Filters applied.
Click to clear.]]></MSGTEXT>
<!--FF8081812DC07B0C012DC082C76E0014--> <MSGTYPE><![CDATA[I]]></MSGTYPE>
<!--FF8081812DC07B0C012DC082C76E0014-->
<AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
<!--FF8081812DC07B0C012DC082C76E0014--></AD_MESSAGE>
+<!--FF8081812DC813F3012DC82111700015--><AD_MESSAGE>
+<!--FF8081812DC813F3012DC82111700015-->
<AD_MESSAGE_ID><![CDATA[FF8081812DC813F3012DC82111700015]]></AD_MESSAGE_ID>
+<!--FF8081812DC813F3012DC82111700015-->
<AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--FF8081812DC813F3012DC82111700015--> <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--FF8081812DC813F3012DC82111700015--> <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--FF8081812DC813F3012DC82111700015-->
<VALUE><![CDATA[OBUIAPP_GridFilterImplicitToolTip]]></VALUE>
+<!--FF8081812DC813F3012DC82111700015--> <MSGTEXT><![CDATA[Implicit (system)
filters applied. Click to clear.]]></MSGTEXT>
+<!--FF8081812DC813F3012DC82111700015--> <MSGTYPE><![CDATA[I]]></MSGTYPE>
+<!--FF8081812DC813F3012DC82111700015-->
<AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--FF8081812DC813F3012DC82111700015--></AD_MESSAGE>
+
</data>
diff -r 40b97deff689 -r 1235744fbd78
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
Thu Jan 27 17:23:41 2011 +0100
+++
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-grid.js
Thu Jan 27 19:43:31 2011 +0100
@@ -141,15 +141,15 @@
initWidget: function(){
thisGrid.filterImage = this;
this.recordEditor.filterImage = this;
- if (thisGrid.implicitFilteringOn) {
- this.prompt =
OB.I18N.getLabel('OBUIAPP_GridImplicitFilterIconToolTip');
+ if (thisGrid.filterClause) {
+ this.prompt =
OB.I18N.getLabel('OBUIAPP_GridFilterImplicitToolTip');
this.visibility = 'inherit';
}
return this.Super('initWidget', arguments);
},
click: function(){
// get rid of the initial filter clause
- delete this.filterClause;
+ delete thisGrid.filterClause;
this.recordEditor.getEditForm().clearValues();
this.recordEditor.performAction();
}
@@ -189,32 +189,25 @@
// show or hide the filter button
filterEditorSubmit: function(criteria){
- // get rid of the initial filter clause
- delete this.filterClause;
-
- this.filterImage.prompt =
OB.I18N.getLabel('OBUIAPP_GridFilterIconToolTip');
-
this.checkShowFilterFunnelIcon(criteria);
},
-
- setImplicitFilteringIconOn: function(state, criteria) {
+
+ checkShowFilterFunnelIcon: function (criteria) {
if (!this.filterImage) {
- this.implicitFilteringOn = true;
return;
}
- if (state) {
- this.filterImage.prompt =
OB.I18N.getLabel('OBUIAPP_GridImplicitFilterIconToolTip');
+ var gridIsFiltered = this.isGridFiltered(criteria);
+ if (this.filterClause && gridIsFiltered) {
+ this.filterImage.prompt =
OB.I18N.getLabel('OBUIAPP_GridFilterBothToolTip');
+ this.filterImage.show(true);
+ } else if (this.filterClause) {
+ this.filterImage.prompt =
OB.I18N.getLabel('OBUIAPP_GridFilterImplicitToolTip');
+ this.filterImage.show(true);
+ } else if (gridIsFiltered) {
+ this.filterImage.prompt =
OB.I18N.getLabel('OBUIAPP_GridFilterExplicitToolTip');
this.filterImage.show(true);
} else {
this.filterImage.prompt =
OB.I18N.getLabel('OBUIAPP_GridFilterIconToolTip');
- this.checkShowFilterFunnelIcon(criteria);
- }
- },
-
- checkShowFilterFunnelIcon: function (criteria) {
- if (this.isGridFiltered(criteria)) {
- this.filterImage.show(true);
- } else {
this.filterImage.hide();
}
},
diff -r 40b97deff689 -r 1235744fbd78
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-standard-view.js
---
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-standard-view.js
Thu Jan 27 17:23:41 2011 +0100
+++
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-standard-view.js
Thu Jan 27 19:43:31 2011 +0100
@@ -421,14 +421,6 @@
return true;
},
- draw: function(){
- var result = this.Super('draw', arguments);
- if (!this.viewGrid || !this.viewGrid.filterEditor) {
- return result;
- }
- return result;
- },
-
// ** {{{ createViewStructure }}} **
// Is to be overridden, is called in initWidget.
createViewStructure: function(){
diff -r 40b97deff689 -r 1235744fbd78
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
Thu Jan 27 17:23:41 2011 +0100
+++
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-grid.js
Thu Jan 27 19:43:31 2011 +0100
@@ -554,13 +554,13 @@
} else {
criteria[OB.Constants.WHERE_PARAMETER] = this.filterClause;
}
- this.setImplicitFilteringIconOn(true, criteria);
+ this.checkShowFilterFunnelIcon(criteria);
} else if (this.whereClause) {
criteria[OB.Constants.WHERE_PARAMETER] = this.whereClause;
- this.setImplicitFilteringIconOn(false, criteria);
+ this.checkShowFilterFunnelIcon(criteria);
} else {
criteria[OB.Constants.WHERE_PARAMETER] = null;
- this.setImplicitFilteringIconOn(false, criteria);
+ this.checkShowFilterFunnelIcon(criteria);
}
// add all the new session properties context info to the criteria
------------------------------------------------------------------------------
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