From 21cba6d7b5bfe903d20ea4eb51e4badce4e2eecf Mon Sep 17 00:00:00 2001 From: Nicolas Micoud Date: Wed, 4 Jul 2012 10:58:55 +0200 Subject: [PATCH] IDEMPIERE 85 - Add confirmation on TreeMaintenance when moving all nodes --- .../oracle/849_IDEMPIERE-85.sql | 20 +++++++++++++++++++ .../postgresql/849_IDEMPIERE-85.sql | 20 +++++++++++++++++++ .../compiere/apps/form/VTreeMaintenance.java | 4 ++-- .../webui/apps/form/WTreeMaintenance.java | 5 ++--- 4 files changed, 44 insertions(+), 5 deletions(-) create mode 100644 migration/360lts-release/oracle/849_IDEMPIERE-85.sql create mode 100644 migration/360lts-release/postgresql/849_IDEMPIERE-85.sql diff --git a/migration/360lts-release/oracle/849_IDEMPIERE-85.sql b/migration/360lts-release/oracle/849_IDEMPIERE-85.sql new file mode 100644 index 0000000000..711f314bf6 --- /dev/null +++ b/migration/360lts-release/oracle/849_IDEMPIERE-85.sql @@ -0,0 +1,20 @@ +-- Jul 4, 2012 10:38:00 AM CEST +-- IDEMPIERE-85 Add confirmation on TreeMaintenance when moving all nodes +INSERT INTO AD_Message (AD_Client_ID,AD_Message_ID,AD_Org_ID,Created,CreatedBy,EntityType,IsActive,MsgText,MsgType,Updated,UpdatedBy,Value) VALUES (0,200004,0,TO_DATE('2012-07-04 10:37:58','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Add all items on tree ?','I',TO_DATE('2012-07-04 10:37:58','YYYY-MM-DD HH24:MI:SS'),100,'TreeAddAllItems') +; + +-- Jul 4, 2012 10:38:00 AM CEST +-- IDEMPIERE-85 Add confirmation on TreeMaintenance when moving all nodes +INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200004 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID) +; + +-- Jul 4, 2012 10:38:19 AM CEST +-- IDEMPIERE-85 Add confirmation on TreeMaintenance when moving all nodes +INSERT INTO AD_Message (AD_Client_ID,AD_Message_ID,AD_Org_ID,Created,CreatedBy,EntityType,IsActive,MsgText,MsgType,Updated,UpdatedBy,Value) VALUES (0,200005,0,TO_DATE('2012-07-04 10:38:19','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Remove all items from tree ?','I',TO_DATE('2012-07-04 10:38:19','YYYY-MM-DD HH24:MI:SS'),100,'TreeRemoveAllItems') +; + +-- Jul 4, 2012 10:38:19 AM CEST +-- IDEMPIERE-85 Add confirmation on TreeMaintenance when moving all nodes +INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200005 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID) +; + diff --git a/migration/360lts-release/postgresql/849_IDEMPIERE-85.sql b/migration/360lts-release/postgresql/849_IDEMPIERE-85.sql new file mode 100644 index 0000000000..1b33ba9e09 --- /dev/null +++ b/migration/360lts-release/postgresql/849_IDEMPIERE-85.sql @@ -0,0 +1,20 @@ +-- Jul 4, 2012 10:38:00 AM CEST +-- IDEMPIERE-85 Add confirmation on TreeMaintenance when moving all nodes +INSERT INTO AD_Message (AD_Client_ID,AD_Message_ID,AD_Org_ID,Created,CreatedBy,EntityType,IsActive,MsgText,MsgType,Updated,UpdatedBy,Value) VALUES (0,200004,0,TO_TIMESTAMP('2012-07-04 10:37:58','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Add all items on tree ?','I',TO_TIMESTAMP('2012-07-04 10:37:58','YYYY-MM-DD HH24:MI:SS'),100,'TreeAddAllItems') +; + +-- Jul 4, 2012 10:38:01 AM CEST +-- IDEMPIERE-85 Add confirmation on TreeMaintenance when moving all nodes +INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200004 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID) +; + +-- Jul 4, 2012 10:38:19 AM CEST +-- IDEMPIERE-85 Add confirmation on TreeMaintenance when moving all nodes +INSERT INTO AD_Message (AD_Client_ID,AD_Message_ID,AD_Org_ID,Created,CreatedBy,EntityType,IsActive,MsgText,MsgType,Updated,UpdatedBy,Value) VALUES (0,200005,0,TO_TIMESTAMP('2012-07-04 10:38:19','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Remove all items from tree ?','I',TO_TIMESTAMP('2012-07-04 10:38:19','YYYY-MM-DD HH24:MI:SS'),100,'TreeRemoveAllItems') +; + +-- Jul 4, 2012 10:38:19 AM CEST +-- IDEMPIERE-85 Add confirmation on TreeMaintenance when moving all nodes +INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200005 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID) +; + diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/form/VTreeMaintenance.java b/org.adempiere.ui.swing/src/org/compiere/apps/form/VTreeMaintenance.java index 0dcca18f0f..f1390f36ee 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/form/VTreeMaintenance.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/form/VTreeMaintenance.java @@ -298,7 +298,7 @@ public class VTreeMaintenance extends TreeMaintenance */ private void action_treeAddAll() { - if (ADialog.ask(m_WindowNo, null, "Add all item(s) on tree?")) { // idempiere-85 + if (ADialog.ask(m_WindowNo, null, "TreeAddAllItems")) { // idempiere-85 log.info(""); ListModel model = centerList.getModel(); int size = model.getSize(); @@ -316,7 +316,7 @@ public class VTreeMaintenance extends TreeMaintenance */ private void action_treeDeleteAll() { - if (ADialog.ask(m_WindowNo, null, "Remove all item(s) from tree?")) { // idempiere-85 + if (ADialog.ask(m_WindowNo, null, "TreeRemoveAllItems")) { // idempiere-85 log.info(""); ListModel model = centerList.getModel(); int size = model.getSize(); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WTreeMaintenance.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WTreeMaintenance.java index 416121fc64..8faa85c5d1 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WTreeMaintenance.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WTreeMaintenance.java @@ -388,7 +388,7 @@ public class WTreeMaintenance extends TreeMaintenance implements IFormController */ private void action_treeAddAll() { - if (FDialog.ask(m_WindowNo, null, "Add all item(s) on tree?")) { + if (FDialog.ask(m_WindowNo, null, "TreeAddAllItems")) { // idempiere-85 log.info(""); ListModel model = centerList.getModel(); int size = model.getSize(); @@ -407,8 +407,7 @@ public class WTreeMaintenance extends TreeMaintenance implements IFormController private void action_treeDeleteAll() { log.info(""); - //TODO: translation - if (FDialog.ask(m_WindowNo, null, "Remove all item(s) from tree?")) { + if (FDialog.ask(m_WindowNo, null, "TreeRemoveAllItems")) { // idempiere-85 ListModel model = centerList.getModel(); int size = model.getSize(); int index = -1;