From 64dfa6acf80be8baa8cc285588202ad3948a8ca2 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Mon, 16 Feb 2009 01:06:57 +0000 Subject: [PATCH] Fix [ adempiere-ZK Web Client-2603630 ] Rerunning process must be implemented as optional https://sourceforge.net/tracker2/?func=detail&atid=955896&aid=2603630&group_id=176962 --- .../adempiere/webui/apps/ProcessDialog.java | 30 ++++++------------- 1 file changed, 9 insertions(+), 21 deletions(-) diff --git a/zkwebui/WEB-INF/src/org/adempiere/webui/apps/ProcessDialog.java b/zkwebui/WEB-INF/src/org/adempiere/webui/apps/ProcessDialog.java index 615e5a7b12..3fb60515a7 100644 --- a/zkwebui/WEB-INF/src/org/adempiere/webui/apps/ProcessDialog.java +++ b/zkwebui/WEB-INF/src/org/adempiere/webui/apps/ProcessDialog.java @@ -305,10 +305,10 @@ public class ProcessDialog extends Window implements EventListener//, ASyncProce if (component instanceof Button) { Button element = (Button)component; if ("Ok".equalsIgnoreCase(element.getId())) { - if (!isResult) + if (element.getLabel().length() > 0) this.startProcess(); else - restart(); + this.dispose(); } else if ("Cancel".equalsIgnoreCase(element.getId())) { this.dispose(); } @@ -379,38 +379,26 @@ public class ProcessDialog extends Window implements EventListener//, ASyncProce m_messageText.append(pi.getLogInfo(true)); message.setContent(m_messageText.toString()); - bOK.setLabel(Msg.getMsg(Env.getCtx(), "Parameter")); - bOK.setImage("/images/Reset16.png"); - isResult = true; + bOK.setLabel(""); m_ids = pi.getIDs(); //no longer needed, hide to give more space to display log - centerPanel.setVisible(false); + centerPanel.detach(); invalidate(); Clients.response(new AuEcho(this, "onAfterProcess", null)); } - private void restart() { - m_messageText = new StringBuffer(initialMessage); - message.setContent(initialMessage); - - centerPanel.setVisible(true); - - isResult = false; - - bOK.setLabel(Msg.getMsg(Env.getCtx(), "Start")); - bOK.setImage("/images/Ok16.png"); - - invalidate(); - } - public void onAfterProcess() { // afterProcessTask(); - + + // Close automatically + if (m_IsReport && !m_pi.isError()) + this.dispose(); + // If the process is a silent one and no errors occured, close the dialog if(m_ShowHelp != null && m_ShowHelp.equals("S")) this.dispose();