details: /erp/devel/main/rev/7c061d2468b9
changeset: 8988:7c061d2468b9
user: Iván Perdomo <ivan.perdomo <at> openbravo.com>
date: Fri Nov 19 11:17:42 2010 +0100
summary: Fixes issue 15207: Append logClick function when the buttons trigger
autosave
- At column level we have a flag if the button should trigger autosave or not.
When the button doesn't trigger autosave, a false is passed as
parameter to
openServletNewWindow(), we need also to remove the logClick() call,
since it
records the latest clicked button. If a button was clicked in the
window,
the autosave is launched when leaving the page.
details: /erp/devel/main/rev/2bed18e7f3af
changeset: 8989:2bed18e7f3af
user: Antonio Moreno <antonio.moreno <at> openbravo.com>
date: Fri Nov 19 13:32:46 2010 +0100
summary: Related to issue 15178. Now datasets of the proper accesslevel will
be taken into account in the check
details: /erp/devel/main/rev/4960cae97b54
changeset: 8990:4960cae97b54
user: RM packaging bot <staff.rm <at> openbravo.com>
date: Fri Nov 19 19:07:50 2010 +0000
summary: CI: promote changesets from pi to main
diffstat:
src-db/database/sourcedata/AD_MODULE.xml | 4 +-
src-wad/src/org/openbravo/wad/controls/WADButton.html | 4 +-
src-wad/src/org/openbravo/wad/controls/WADButton.java | 16
+++++++--
src-wad/src/org/openbravo/wad/controls/WADButton.xml | 3 +-
src/org/openbravo/erpCommon/modules/ModuleReferenceDataOrgTree.java | 13
+++++---
5 files changed, 25 insertions(+), 15 deletions(-)
diffs (152 lines):
diff -r 4324cfcf38ec -r 4960cae97b54 src-db/database/sourcedata/AD_MODULE.xml
--- a/src-db/database/sourcedata/AD_MODULE.xml Thu Nov 18 19:20:47 2010 +0100
+++ b/src-db/database/sourcedata/AD_MODULE.xml Fri Nov 19 19:07:50 2010 +0000
@@ -6,7 +6,7 @@
<!--0--> <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
<!--0--> <ISACTIVE><![CDATA[Y]]></ISACTIVE>
<!--0--> <NAME><![CDATA[Core]]></NAME>
-<!--0--> <VERSION><![CDATA[2.50.18840]]></VERSION>
+<!--0--> <VERSION><![CDATA[2.50.18989]]></VERSION>
<!--0--> <DESCRIPTION><![CDATA[Core module is the base one]]></DESCRIPTION>
<!--0--> <HELP><![CDATA[Core module is the base one, all developments in core
are included as part of the standard Openbravo ERP.]]></HELP>
<!--0--> <URL><![CDATA[www.openbravo.com]]></URL>
@@ -22,7 +22,7 @@
<!--0--> <ISTRANSLATIONMODULE><![CDATA[N]]></ISTRANSLATIONMODULE>
<!--0--> <HASREFERENCEDATA><![CDATA[Y]]></HASREFERENCEDATA>
<!--0--> <REFERENCEDATAINFO><![CDATA[Standard document types for orders,
invoices, etc. and settings]]></REFERENCEDATAINFO>
-<!--0--> <VERSION_LABEL><![CDATA[dev]]></VERSION_LABEL>
+<!--0--> <VERSION_LABEL><![CDATA[CI]]></VERSION_LABEL>
<!--0--> <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL>
<!--0--></AD_MODULE>
diff -r 4324cfcf38ec -r 4960cae97b54
src-wad/src/org/openbravo/wad/controls/WADButton.html
--- a/src-wad/src/org/openbravo/wad/controls/WADButton.html Thu Nov 18
19:20:47 2010 +0100
+++ b/src-wad/src/org/openbravo/wad/controls/WADButton.html Fri Nov 19
19:07:50 2010 +0000
@@ -12,7 +12,7 @@
* under the License.
* The Original Code is Openbravo ERP.
* The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2001-2008 Openbravo SLU
+ * All portions are Copyright (C) 2001-2010 Openbravo SLU
* All Rights Reserved.
* Contributor(s): ______________________________________.
************************************************************************
@@ -26,7 +26,7 @@
<button type="button"
id="xx_linkBTN"
class="ButtonLinkxx"
- onclick="logClick(document.getElementById('yy')); xx(); return false;"
+ onclick="xx(); return false;"
onfocus="buttonEvent('onfocus', this); window.status='xx'; return true;"
onblur="buttonEvent('onblur', this);"
onkeyup="buttonEvent('onkeyup', this);"
diff -r 4324cfcf38ec -r 4960cae97b54
src-wad/src/org/openbravo/wad/controls/WADButton.java
--- a/src-wad/src/org/openbravo/wad/controls/WADButton.java Thu Nov 18
19:20:47 2010 +0100
+++ b/src-wad/src/org/openbravo/wad/controls/WADButton.java Fri Nov 19
19:07:50 2010 +0000
@@ -11,7 +11,7 @@
* under the License.
* The Original Code is Openbravo ERP.
* The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2001-2010 Openbravo SLU
+ * All portions are Copyright (C) 2001-2010 Openbravo SLU
* All Rights Reserved.
* Contributor(s): ______________________________________.
************************************************************************
@@ -56,6 +56,9 @@
}
private StringBuffer getAction() {
+ final String logClickCode = "logClick(document.getElementById('" +
getData("ColumnName") + "'));";
+ final boolean triggersAutosave =
getData("IsAutosave").equalsIgnoreCase("Y");
+
StringBuffer text = new StringBuffer();
boolean isDisabled = (getData("IsReadOnly").equals("Y")
|| (getData("IsReadOnlyTab").equals("Y") &&
getData("isReadOnlyDefinedTab").equals("N")) || getData(
@@ -64,21 +67,27 @@
text.append("return true;");
} else {
if (getData("MappingName").equals("")) {
+ if (triggersAutosave) {
+ text.append(logClickCode);
+ }
text.append("openServletNewWindow('BUTTON").append(
FormatUtilities.replace(getData("ColumnName"))).append(getData("AD_Process_ID"));
text.append("', true, '").append(getData("TabName")).append(
- "_Edition.html', 'BUTTON', null,
").append(getData("IsAutosave").equals("Y"));
+ "_Edition.html', 'BUTTON', null, ").append(triggersAutosave);
if (getData("ColumnName").equalsIgnoreCase("CreateFrom"))
text.append(",600, 900");
else
text.append(", 600, 900");
text.append(");");
} else {
+ if (triggersAutosave) {
+ text.append(logClickCode);
+ }
text.append("openServletNewWindow('DEFAULT', true, '..");
if (!getData("MappingName").startsWith("/"))
text.append('/');
text.append(getData("MappingName")).append("', 'BUTTON', '").append(
- getData("AD_Process_ID")).append("',
").append(getData("IsAutosave").equals("Y"));
+ getData("AD_Process_ID")).append("', ").append(triggersAutosave);
text.append(",600, 900);");
}
}
@@ -95,7 +104,6 @@
xmlDocument.setParameter("name", getData("Name"));
xmlDocument.setParameter("callout", getOnChangeCode());
- xmlDocument.setParameter("inputId", getData("ColumnName"));
xmlDocument.setParameter("action", getAction().toString());
boolean isDisabled = (getData("IsReadOnly").equals("Y")
diff -r 4324cfcf38ec -r 4960cae97b54
src-wad/src/org/openbravo/wad/controls/WADButton.xml
--- a/src-wad/src/org/openbravo/wad/controls/WADButton.xml Thu Nov 18
19:20:47 2010 +0100
+++ b/src-wad/src/org/openbravo/wad/controls/WADButton.xml Fri Nov 19
19:07:50 2010 +0000
@@ -12,7 +12,7 @@
* under the License.
* The Original Code is Openbravo ERP.
* The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2001-2006 Openbravo SLU
+ * All portions are Copyright (C) 2001-2010 Openbravo SLU
* All Rights Reserved.
* Contributor(s): ______________________________________.
************************************************************************
@@ -25,7 +25,6 @@
<PARAMETER id="xx" name="callout" attribute="onchange" replace="xx();"/>
<PARAMETER id="xx_BTNname" name="columnName" attribute="id" replace="xx"/>
<PARAMETER id="xx_BTNname" name="nameHTML"/>
- <PARAMETER id="xx_linkBTN" name="inputId" attribute="onclick" replace="yy"/>
<PARAMETER id="xx_linkBTN" name="action" attribute="onclick"
replace="xx();"/>
<PARAMETER id="xx_linkBTN" name="columnName" attribute="id" replace="xx"/>
<PARAMETER id="xx_linkBTN" name="disabled" attribute="class" replace="xx"
default=""/>
diff -r 4324cfcf38ec -r 4960cae97b54
src/org/openbravo/erpCommon/modules/ModuleReferenceDataOrgTree.java
--- a/src/org/openbravo/erpCommon/modules/ModuleReferenceDataOrgTree.java
Thu Nov 18 19:20:47 2010 +0100
+++ b/src/org/openbravo/erpCommon/modules/ModuleReferenceDataOrgTree.java
Fri Nov 19 19:07:50 2010 +0000
@@ -33,6 +33,7 @@
import org.openbravo.dal.core.OBContext;
import org.openbravo.dal.service.OBCriteria;
import org.openbravo.dal.service.OBDal;
+import org.openbravo.dal.service.OBQuery;
import org.openbravo.data.FieldProvider;
import org.openbravo.erpCommon.utility.FieldProviderFactory;
import org.openbravo.erpCommon.utility.Utility;
@@ -186,11 +187,13 @@
}
private String calculateChecksum(String moduleId) {
- OBCriteria<DataSet> criteria =
OBDal.getInstance().createCriteria(DataSet.class);
- criteria.add(Expression.eq(DataSet.PROPERTY_MODULE,
OBDal.getInstance().get(Module.class,
- moduleId)));
- criteria.addOrderBy(DataSet.PROPERTY_ID, true);
- List<DataSet> datasets = criteria.list();
+ String hql = "as dataset where dataset.module.id=:moduleid ";
+ hql += " and (dataset.dataAccessLevel in ('3','1')";
+ hql += " or (dataset.module.id='0' and dataset.dataAccessLevel IN
('3','6')))";
+ hql += " order by dataset.id";
+ OBQuery<DataSet> query = OBDal.getInstance().createQuery(DataSet.class,
hql);
+ query.setNamedParameter("moduleid", moduleId);
+ List<DataSet> datasets = query.list();
String checksum = "";
for (DataSet ds : datasets) {
if (ds.getChecksum() != null) {
------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
Spend less time writing and rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits