From 5ee9dfc9b11712ab0e71fbb1f05cd5617b6694e9 Mon Sep 17 00:00:00 2001 From: Heng Sin Low Date: Wed, 16 Oct 2013 17:24:48 +0800 Subject: [PATCH 1/9] IDEMPIERE-175 Atmosphere server push. 1) Timeout shouldn't increase failure count. 2) Use oncomplete event to schedule the next long polling call and eliminate the duplicate code in onError and onSuccess. 3) Reduce the delay between complete and next long polling call from 250ms to 10ms. 4) stop should immediately set active to false. --- .../src/web/js/jawwa/atmosphere/serverpush.js | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/org.adempiere.ui.zk/WEB-INF/src/web/js/jawwa/atmosphere/serverpush.js b/org.adempiere.ui.zk/WEB-INF/src/web/js/jawwa/atmosphere/serverpush.js index cce588be08..dd053a4db7 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/web/js/jawwa/atmosphere/serverpush.js +++ b/org.adempiere.ui.zk/WEB-INF/src/web/js/jawwa/atmosphere/serverpush.js @@ -15,7 +15,7 @@ jawwa.atmosphere.ServerPush = zk.$extends(zk.Object, { desktop: null, active: false, - delay: 250, + delay: 10, failures: 0, timeout: 0, ajaxOptions: { @@ -34,17 +34,20 @@ this.ajaxOptions.timeout = this.timeout; var me = this; this.ajaxOptions.error = function(jqxhr, textStatus, errorThrown) { - if (typeof console == "object") { - console.error(textStatus); - console.error(errorThrown); - } - me.failures += 1; - me._schedule(); + if (textStatus != "timeout") { + if (typeof console == "object") { + console.error(textStatus); + console.error(errorThrown); + } + me.failures += 1; + } }; this.ajaxOptions.success = function(data) { zAu.cmd0.echo(this.desktop); me.failures = 0; - me._schedule(); + }; + this.ajaxOptions.complete = function() { + me._schedule(); }; }, _schedule: function() { @@ -68,8 +71,8 @@ this._send(); }, stop: function() { - this.desktop._serverpush = null; this.active = false; + this.desktop._serverpush = null; if (this._req) { this._req.abort(); this._req = null; From f3352c88d69ba0525bc85e2a429af837d4426d79 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Thu, 17 Oct 2013 19:01:37 -0500 Subject: [PATCH 2/9] IDEMPIERE-1138 Fix wrong name on migration script as reported at https://www.facebook.com/groups/idempiere/permalink/631456976906219/ --- .../i1.0c-release/oracle/201307171647_IDEMPIERE-1138.sql | 7 +++++++ ...DEMPIERE-1138.sql => 20130717164800_IDEMPIERE-1138.sql} | 2 +- .../postgresql/201307171647_IDEMPIERE-1138.sql | 7 +++++++ ...DEMPIERE-1138.sql => 20130717164800_IDEMPIERE-1138.sql} | 2 +- 4 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 migration/i1.0c-release/oracle/201307171647_IDEMPIERE-1138.sql rename migration/i1.0c-release/oracle/{20131707164800_IDEMPIERE-1138.sql => 20130717164800_IDEMPIERE-1138.sql} (99%) create mode 100644 migration/i1.0c-release/postgresql/201307171647_IDEMPIERE-1138.sql rename migration/i1.0c-release/postgresql/{20131707164800_IDEMPIERE-1138.sql => 20130717164800_IDEMPIERE-1138.sql} (99%) diff --git a/migration/i1.0c-release/oracle/201307171647_IDEMPIERE-1138.sql b/migration/i1.0c-release/oracle/201307171647_IDEMPIERE-1138.sql new file mode 100644 index 0000000000..deacbd4a1d --- /dev/null +++ b/migration/i1.0c-release/oracle/201307171647_IDEMPIERE-1138.sql @@ -0,0 +1,7 @@ +-- Fix wrong name on migration script as reported at https://www.facebook.com/groups/idempiere/permalink/631456976906219/ +update ad_migrationscript set name = '20130717164800_IDEMPIERE-1138.sql', filename = 'oracle/20130717164800_IDEMPIERE-1138.sql' where name = '20131707164800_IDEMPIERE-1138.sql' +; + +SELECT register_migration_script('201307171647_IDEMPIERE-1138.sql') FROM dual +; + diff --git a/migration/i1.0c-release/oracle/20131707164800_IDEMPIERE-1138.sql b/migration/i1.0c-release/oracle/20130717164800_IDEMPIERE-1138.sql similarity index 99% rename from migration/i1.0c-release/oracle/20131707164800_IDEMPIERE-1138.sql rename to migration/i1.0c-release/oracle/20130717164800_IDEMPIERE-1138.sql index 1ff8ff0276..b297798d2b 100644 --- a/migration/i1.0c-release/oracle/20131707164800_IDEMPIERE-1138.sql +++ b/migration/i1.0c-release/oracle/20130717164800_IDEMPIERE-1138.sql @@ -93,6 +93,6 @@ UPDATE AD_Field SET Name='Broadcast Frequency', Description='How Many Times Mess ' WHERE AD_Column_ID=200984 AND IsCentrallyMaintained='Y' ; -SELECT register_migration_script('20131707164800_IDEMPIERE-1138.sql') FROM dual +SELECT register_migration_script('20130717164800_IDEMPIERE-1138.sql') FROM dual ; diff --git a/migration/i1.0c-release/postgresql/201307171647_IDEMPIERE-1138.sql b/migration/i1.0c-release/postgresql/201307171647_IDEMPIERE-1138.sql new file mode 100644 index 0000000000..82d54c95c2 --- /dev/null +++ b/migration/i1.0c-release/postgresql/201307171647_IDEMPIERE-1138.sql @@ -0,0 +1,7 @@ +-- Fix wrong name on migration script as reported at https://www.facebook.com/groups/idempiere/permalink/631456976906219/ +update ad_migrationscript set name = '20130717164800_IDEMPIERE-1138.sql', filename = 'postgresql/20130717164800_IDEMPIERE-1138.sql' where name = '20131707164800_IDEMPIERE-1138.sql' +; + +SELECT register_migration_script('201307171647_IDEMPIERE-1138.sql') FROM dual +; + diff --git a/migration/i1.0c-release/postgresql/20131707164800_IDEMPIERE-1138.sql b/migration/i1.0c-release/postgresql/20130717164800_IDEMPIERE-1138.sql similarity index 99% rename from migration/i1.0c-release/postgresql/20131707164800_IDEMPIERE-1138.sql rename to migration/i1.0c-release/postgresql/20130717164800_IDEMPIERE-1138.sql index 9328946efc..d46a35ef73 100644 --- a/migration/i1.0c-release/postgresql/20131707164800_IDEMPIERE-1138.sql +++ b/migration/i1.0c-release/postgresql/20130717164800_IDEMPIERE-1138.sql @@ -90,6 +90,6 @@ UPDATE AD_Field SET Name='Broadcast Frequency', Description='How Many Times Mess ' WHERE AD_Column_ID=200984 AND IsCentrallyMaintained='Y' ; -SELECT register_migration_script('20131707164800_IDEMPIERE-1138.sql') FROM dual +SELECT register_migration_script('20130717164800_IDEMPIERE-1138.sql') FROM dual ; From fb3e9c3732b48dab36e9333dd35292d3aa6d5cc5 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Fri, 18 Oct 2013 10:19:23 -0500 Subject: [PATCH 3/9] IDEMPIERE-1452 Translation Export doesnt export field Comment and Help --- org.adempiere.ui/src/org/compiere/install/Translation.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org.adempiere.ui/src/org/compiere/install/Translation.java b/org.adempiere.ui/src/org/compiere/install/Translation.java index e473f165c5..7d2a6ca4a7 100644 --- a/org.adempiere.ui/src/org/compiere/install/Translation.java +++ b/org.adempiere.ui/src/org/compiere/install/Translation.java @@ -335,7 +335,7 @@ public class Translation + " INNER JOIN AD_Table t ON (c.AD_Table_ID=t.AD_Table_ID) " + "WHERE t.TableName=?" + " AND c.ColumnName NOT LIKE ? " - + " AND c.AD_Reference_ID IN (10,14) " + + " AND c.AD_Reference_ID IN (10,14,36) " + "ORDER BY IsMandatory DESC, ColumnName"; ArrayList list = new ArrayList(); try From c057d1e7d6ca7368258336274d417912c894b02d Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Sat, 19 Oct 2013 08:25:17 -0500 Subject: [PATCH 4/9] IDEMPIERE-1454 Message starting webui -> Ingored. Use the library property called org.zkoss.util.logging.config.file instead --- org.adempiere.ui.zk/WEB-INF/zk.xml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/org.adempiere.ui.zk/WEB-INF/zk.xml b/org.adempiere.ui.zk/WEB-INF/zk.xml index 25b218dbd6..8c0f5193a6 100644 --- a/org.adempiere.ui.zk/WEB-INF/zk.xml +++ b/org.adempiere.ui.zk/WEB-INF/zk.xml @@ -17,12 +17,6 @@ org.adempiere.webui.util.LogEventInterceptor - - [Optional] Monitor i3-log.conf and register a - handler for the specified log-base - - - false From 8a8356f7530ecb9a0c017a781519f2526a4a8996 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Sat, 19 Oct 2013 08:53:20 -0500 Subject: [PATCH 5/9] IDEMPIERE-1389 Size Error in address 1 field --- .../src/org/compiere/model/MLocation.java | 11 ++++++++++- .../org/adempiere/webui/window/WLocationDialog.java | 8 ++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/org.adempiere.base/src/org/compiere/model/MLocation.java b/org.adempiere.base/src/org/compiere/model/MLocation.java index bc189f1dde..bdc1b1d211 100644 --- a/org.adempiere.base/src/org/compiere/model/MLocation.java +++ b/org.adempiere.base/src/org/compiere/model/MLocation.java @@ -49,7 +49,7 @@ public class MLocation extends X_C_Location implements Comparator /** * */ - private static final long serialVersionUID = 8332515185354248079L; + private static final long serialVersionUID = -2444279957930588863L; // http://jira.idempiere.com/browse/IDEMPIERE-147 public static String LOCATION_MAPS_URL_PREFIX = MSysConfig.getValue(MSysConfig.LOCATION_MAPS_URL_PREFIX); @@ -719,5 +719,14 @@ public class MLocation extends X_C_Location implements Comparator return address.toString().replace(" ", "+"); } + + public static int getFieldLength(String columnName) { + MTable loctable = MTable.get(Env.getCtx(), Table_ID); + MColumn column = loctable.getColumn(columnName); + if (column == null) + return -1; + else + return column.getFieldLength(); + } } // MLocation diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WLocationDialog.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WLocationDialog.java index 43ef6850e8..25b4010f4b 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WLocationDialog.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WLocationDialog.java @@ -223,16 +223,21 @@ public class WLocationDialog extends Window implements EventListener txtAddress1 = new Textbox(); txtAddress1.setCols(20); + txtAddress1.setMaxlength(MLocation.getFieldLength(MLocation.COLUMNNAME_Address1)); txtAddress2 = new Textbox(); txtAddress2.setCols(20); + txtAddress2.setMaxlength(MLocation.getFieldLength(MLocation.COLUMNNAME_Address2)); txtAddress3 = new Textbox(); txtAddress3.setCols(20); + txtAddress3.setMaxlength(MLocation.getFieldLength(MLocation.COLUMNNAME_Address3)); txtAddress4 = new Textbox(); txtAddress4.setCols(20); + txtAddress4.setMaxlength(MLocation.getFieldLength(MLocation.COLUMNNAME_Address4)); //autocomplete City txtCity = new WAutoCompleterCity(m_WindowNo); txtCity.setCols(20); + txtCity.setMaxlength(MLocation.getFieldLength(MLocation.COLUMNNAME_City)); txtCity.setAutodrop(true); txtCity.setAutocomplete(true); txtCity.addEventListener(Events.ON_CHANGING, this); @@ -240,8 +245,10 @@ public class WLocationDialog extends Window implements EventListener txtPostal = new Textbox(); txtPostal.setCols(20); + txtPostal.setMaxlength(MLocation.getFieldLength(MLocation.COLUMNNAME_Postal)); txtPostalAdd = new Textbox(); txtPostalAdd.setCols(20); + txtPostalAdd.setMaxlength(MLocation.getFieldLength(MLocation.COLUMNNAME_Postal_Add)); lstRegion = new Listbox(); lstRegion.setMold("select"); @@ -708,6 +715,7 @@ public class WLocationDialog extends Window implements EventListener m_location.setC_City_ID(txtCity.getC_City_ID()); m_location.setCity(txtCity.getValue()); m_location.setPostal(txtPostal.getValue()); + m_location.setPostal_Add(txtPostalAdd.getValue()); // Country/Region MCountry country = (MCountry)lstCountry.getSelectedItem().getValue(); m_location.setCountry(country); From 8fb85c42dac293abcf45d73316d9c93378540983 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Sat, 19 Oct 2013 09:28:01 -0500 Subject: [PATCH 6/9] IDEMPIERE-1415 Disable Cash Journal Line field in the Invoice/Allocation window --- .../oracle/201310190926_IDEMPIERE-1415.sql | 21 +++++++++++++++++++ .../201310190926_IDEMPIERE-1415.sql | 18 ++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 migration/i1.0c-release/oracle/201310190926_IDEMPIERE-1415.sql create mode 100644 migration/i1.0c-release/postgresql/201310190926_IDEMPIERE-1415.sql diff --git a/migration/i1.0c-release/oracle/201310190926_IDEMPIERE-1415.sql b/migration/i1.0c-release/oracle/201310190926_IDEMPIERE-1415.sql new file mode 100644 index 0000000000..9887511ab3 --- /dev/null +++ b/migration/i1.0c-release/oracle/201310190926_IDEMPIERE-1415.sql @@ -0,0 +1,21 @@ +SET SQLBLANKLINES ON +SET DEFINE OFF + +-- Oct 19, 2013 9:24:48 AM COT +-- IDEMPIERE-1415 Disable Cash Journal Line field in the Invoice/Allocation window +UPDATE AD_Field SET IsDisplayed='N', IsDisplayedGrid='N',Updated=TO_DATE('2013-10-19 09:24:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=4371 +; + +-- Oct 19, 2013 9:25:01 AM COT +-- IDEMPIERE-1415 Disable Cash Journal Line field in the Invoice/Allocation window +UPDATE AD_Field SET IsDisplayed='N', IsDisplayedGrid='N',Updated=TO_DATE('2013-10-19 09:25:01','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=11032 +; + +-- Oct 19, 2013 9:25:11 AM COT +-- IDEMPIERE-1415 Disable Cash Journal Line field in the Invoice/Allocation window +UPDATE AD_Field SET IsDisplayed='N', IsDisplayedGrid='N',Updated=TO_DATE('2013-10-19 09:25:11','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=11049 +; + +SELECT register_migration_script('201310190926_IDEMPIERE-1415.sql') FROM dual +; + diff --git a/migration/i1.0c-release/postgresql/201310190926_IDEMPIERE-1415.sql b/migration/i1.0c-release/postgresql/201310190926_IDEMPIERE-1415.sql new file mode 100644 index 0000000000..b6bcddf54a --- /dev/null +++ b/migration/i1.0c-release/postgresql/201310190926_IDEMPIERE-1415.sql @@ -0,0 +1,18 @@ +-- Oct 19, 2013 9:24:48 AM COT +-- IDEMPIERE-1415 Disable Cash Journal Line field in the Invoice/Allocation window +UPDATE AD_Field SET IsDisplayed='N', IsDisplayedGrid='N',Updated=TO_TIMESTAMP('2013-10-19 09:24:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=4371 +; + +-- Oct 19, 2013 9:25:01 AM COT +-- IDEMPIERE-1415 Disable Cash Journal Line field in the Invoice/Allocation window +UPDATE AD_Field SET IsDisplayed='N', IsDisplayedGrid='N',Updated=TO_TIMESTAMP('2013-10-19 09:25:01','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=11032 +; + +-- Oct 19, 2013 9:25:11 AM COT +-- IDEMPIERE-1415 Disable Cash Journal Line field in the Invoice/Allocation window +UPDATE AD_Field SET IsDisplayed='N', IsDisplayedGrid='N',Updated=TO_TIMESTAMP('2013-10-19 09:25:11','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=11049 +; + +SELECT register_migration_script('201310190926_IDEMPIERE-1415.sql') FROM dual +; + From 89e4dea16637af4b24dd9c3ba0250ff0d96ed619 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Sat, 19 Oct 2013 10:47:23 -0500 Subject: [PATCH 7/9] IDEMPIERE-1429 Report Wizard is able to change system templates from within client --- .../WEB-INF/src/org/adempiere/webui/window/ZkReportViewer.java | 1 + 1 file changed, 1 insertion(+) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkReportViewer.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkReportViewer.java index 2480fb4e38..6545a586c5 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkReportViewer.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkReportViewer.java @@ -671,6 +671,7 @@ public class ZkReportViewer extends Window implements EventListener, ITab .append(m_reportEngine.getRowCount()); statusBar.setStatusLine(sb.toString()); // + bWizard.setDisabled( (m_reportEngine.getPrintFormat() == null || m_reportEngine.getPrintFormat().getAD_Client_ID() == 0) ); } // revalidate /** From 852daf0224558241fa4eb3a733fc38aa13f1d91b Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Mon, 21 Oct 2013 10:38:30 -0500 Subject: [PATCH 8/9] IDEMPIERE-1138 Fix wrong name on migration script - one last loose end --- .../i1.0c-release/oracle/201310211037_IDEMPIERE-1138.sql | 6 ++++++ .../postgresql/201310211037_IDEMPIERE-1138.sql | 6 ++++++ 2 files changed, 12 insertions(+) create mode 100644 migration/i1.0c-release/oracle/201310211037_IDEMPIERE-1138.sql create mode 100644 migration/i1.0c-release/postgresql/201310211037_IDEMPIERE-1138.sql diff --git a/migration/i1.0c-release/oracle/201310211037_IDEMPIERE-1138.sql b/migration/i1.0c-release/oracle/201310211037_IDEMPIERE-1138.sql new file mode 100644 index 0000000000..2314dc3394 --- /dev/null +++ b/migration/i1.0c-release/oracle/201310211037_IDEMPIERE-1138.sql @@ -0,0 +1,6 @@ +-- Fix wrong name on migration script - one last loose end +update ad_system set lastmigrationscriptapplied='20130717164800_IDEMPIERE-1138.sql' where lastmigrationscriptapplied='20131707164800_IDEMPIERE-1138.sql' +; +SELECT register_migration_script('201310211037_IDEMPIERE-1138.sql') FROM dual +; + diff --git a/migration/i1.0c-release/postgresql/201310211037_IDEMPIERE-1138.sql b/migration/i1.0c-release/postgresql/201310211037_IDEMPIERE-1138.sql new file mode 100644 index 0000000000..2314dc3394 --- /dev/null +++ b/migration/i1.0c-release/postgresql/201310211037_IDEMPIERE-1138.sql @@ -0,0 +1,6 @@ +-- Fix wrong name on migration script - one last loose end +update ad_system set lastmigrationscriptapplied='20130717164800_IDEMPIERE-1138.sql' where lastmigrationscriptapplied='20131707164800_IDEMPIERE-1138.sql' +; +SELECT register_migration_script('201310211037_IDEMPIERE-1138.sql') FROM dual +; + From 08f6df1992b2cb6c447e5b7cc32021c170407a4d Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Mon, 21 Oct 2013 10:55:42 -0500 Subject: [PATCH 9/9] IDEMPIERE-1429 Report Wizard is able to change system templates from within client --- .../src/org/adempiere/webui/window/ZkReportViewer.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkReportViewer.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkReportViewer.java index 6545a586c5..35e3aa896b 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkReportViewer.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkReportViewer.java @@ -671,7 +671,10 @@ public class ZkReportViewer extends Window implements EventListener, ITab .append(m_reportEngine.getRowCount()); statusBar.setStatusLine(sb.toString()); // - bWizard.setDisabled( (m_reportEngine.getPrintFormat() == null || m_reportEngine.getPrintFormat().getAD_Client_ID() == 0) ); + bWizard.setDisabled( + ( m_reportEngine.getPrintFormat() == null + || (m_reportEngine.getPrintFormat().getAD_Client_ID() == 0 && Env.getAD_Client_ID(Env.getCtx()) != 0) + || m_reportEngine.getPrintFormat().isForm())); } // revalidate /**