From f5a0756ca78e9657d1aaaabd150a54577003a3c8 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Mon, 10 Dec 2012 12:07:45 -0500 Subject: [PATCH] =?UTF-8?q?IDEMPIERE-523=20can=C2=B4t=20delete=20archive?= =?UTF-8?q?=20/=20Peer=20review?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../webui/apps/form/WArchiveViewer.java | 36 ++++--------------- 1 file changed, 6 insertions(+), 30 deletions(-) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WArchiveViewer.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WArchiveViewer.java index 6e956d9af0..8aaed1568d 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WArchiveViewer.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WArchiveViewer.java @@ -492,7 +492,6 @@ public class WArchiveViewer extends Archive implements IFormController, EventLis /** * Update Query Display */ - private void updateQDisplay() { boolean reports = reportField.isChecked(); @@ -507,16 +506,8 @@ public class WArchiveViewer extends Archive implements IFormController, EventLis bPartnerField.setVisible(!reports); } // updateQDisplay - -/* public void valueChange(ValueChangeEvent evt) - { - if (m_archives.length > 0) - updateArchive.setEnabled(true); - } -*/ - public void cmd_deleteArchive(){ - FDialog.ask(m_WindowNo, this.form, "ArchiveDelete?", new Callback() { + FDialog.ask(m_WindowNo, this.form, "DeleteRecord?", new Callback() { @Override public void onCallback(Boolean result) @@ -525,28 +516,12 @@ public class WArchiveViewer extends Archive implements IFormController, EventLis { MArchive ar = m_archives[m_index]; ar.delete(true); - } - tabbox.setSelectedIndex(0); - dynInit(); + tabbox.setSelectedIndex(0); + dynInit(); + } } }); } - /** - * Update Query Display - - private void updateQDisplay() - { - boolean reports = reportField.isChecked(); - log.config("Reports=" + reports); - - // Show - processLabel.setVisible(reports); - processField.setVisible(reports); - - // Hide - bPartnerLabel.setVisible(!reports); - bPartnerField.setVisible(!reports); - } // updateQDisplay /** * Update View Display @@ -571,13 +546,14 @@ public class WArchiveViewer extends Archive implements IFormController, EventLis bBack.setEnabled(m_index > 0); bNext.setEnabled(m_index < m_archives.length-1); + deleteArchive.setEnabled(m_archives.length > 0); updateArchive.setEnabled(false); log.info("Index=" + m_index + ", Length=" + m_archives.length); if (m_archives.length == 0) { - positionInfo.setValue("No Record Found"); + positionInfo.setValue(Msg.getMsg(Env.getCtx(), "NoRecordsFound")); createdByField.setText(""); createdField.setValue(null); nameField.setText("");