diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADWindowContent.java.orig b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADWindowContent.java.orig deleted file mode 100644 index be59c63ca0..0000000000 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADWindowContent.java.orig +++ /dev/null @@ -1,2792 +0,0 @@ -/****************************************************************************** - * Product: Posterita Ajax UI * - * Copyright (C) 2007 Posterita Ltd. All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it * - * under the terms version 2 of the GNU General Public License as published * - * by the Free Software Foundation. This program is distributed in the hope * - * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * - * See the GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along * - * with this program; if not, write to the Free Software Foundation, Inc., * - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * - * For the text or an alternative of this public license, you may reach us * - * Posterita Ltd., 3, Draper Avenue, Quatre Bornes, Mauritius * - * or via info@posterita.org or http://www.posterita.org/ * - *****************************************************************************/ - -package org.adempiere.webui.adwindow; - -import static org.compiere.model.SystemIDs.PROCESS_AD_CHANGELOG_REDO; -import static org.compiere.model.SystemIDs.PROCESS_AD_CHANGELOG_UNDO; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Date; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Properties; -import java.util.Set; -import java.util.TreeMap; -import java.util.logging.Level; - -import org.adempiere.util.Callback; -import org.adempiere.webui.AdempiereIdGenerator; -import org.adempiere.webui.AdempiereWebUI; -import org.adempiere.webui.LayoutUtils; -import org.adempiere.webui.WArchive; -import org.adempiere.webui.WRequest; -import org.adempiere.webui.WZoomAcross; -import org.adempiere.webui.apps.AEnv; -import org.adempiere.webui.apps.BusyDialogTemplate; -import org.adempiere.webui.apps.ProcessModalDialog; -import org.adempiere.webui.apps.form.WCreateFromFactory; -import org.adempiere.webui.apps.form.WCreateFromWindow; -import org.adempiere.webui.component.Button; -import org.adempiere.webui.component.Listbox; -import org.adempiere.webui.component.ProcessInfoDialog; -import org.adempiere.webui.component.Window; -import org.adempiere.webui.component.ZkCssHelper; -import org.adempiere.webui.editor.IProcessButton; -import org.adempiere.webui.editor.WEditor; -import org.adempiere.webui.event.ActionEvent; -import org.adempiere.webui.event.ActionListener; -import org.adempiere.webui.event.DialogEvents; -import org.adempiere.webui.event.ToolbarListener; -import org.adempiere.webui.exception.ApplicationException; -import org.adempiere.webui.panel.ADForm; -import org.adempiere.webui.panel.InfoPanel; -import org.adempiere.webui.panel.WAttachment; -import org.adempiere.webui.panel.WDocActionPanel; -import org.adempiere.webui.panel.action.ExportAction; -import org.adempiere.webui.panel.action.FileImportAction; -import org.adempiere.webui.panel.action.ReportAction; -import org.adempiere.webui.part.AbstractUIPart; -import org.adempiere.webui.session.SessionManager; -import org.adempiere.webui.window.CustomizeGridViewDialog; -import org.adempiere.webui.window.FDialog; -import org.adempiere.webui.window.FindWindow; -import org.adempiere.webui.window.WChat; -import org.adempiere.webui.window.WRecordAccessDialog; -import org.compiere.grid.ICreateFrom; -import org.compiere.model.DataStatusEvent; -import org.compiere.model.DataStatusListener; -import org.compiere.model.GridField; -import org.compiere.model.GridTab; -import org.compiere.model.GridTable; -import org.compiere.model.GridWindow; -import org.compiere.model.GridWindowVO; -import org.compiere.model.Lookup; -import org.compiere.model.MImage; -import org.compiere.model.MProcess; -import org.compiere.model.MQuery; -import org.compiere.model.MRecentItem; -import org.compiere.model.MRole; -import org.compiere.process.DocAction; -import org.compiere.process.ProcessInfo; -import org.compiere.process.ProcessInfoLog; -import org.compiere.process.ProcessInfoUtil; -import org.compiere.util.CLogger; -import org.compiere.util.DB; -import org.compiere.util.DisplayType; -import org.compiere.util.Env; -import org.compiere.util.Msg; -import org.compiere.util.Util; -import org.compiere.util.WebDoc; -import org.zkoss.zk.ui.AbstractComponent; -import org.zkoss.zk.ui.Component; -import org.zkoss.zk.ui.Executions; -import org.zkoss.zk.ui.HtmlBasedComponent; -import org.zkoss.zk.ui.Session; -import org.zkoss.zk.ui.event.Event; -import org.zkoss.zk.ui.event.EventListener; -import org.zkoss.zk.ui.event.Events; -import org.zkoss.zk.ui.sys.ExecutionCtrl; -import org.zkoss.zk.ui.util.Clients; -import org.zkoss.zul.Column; -import org.zkoss.zul.Columns; -import org.zkoss.zul.Div; -import org.zkoss.zul.Hbox; -import org.zkoss.zul.Listitem; -import org.zkoss.zul.Menuitem; -import org.zkoss.zul.Menupopup; -import org.zkoss.zul.Window.Mode; - -/** - * - * This class is based on org.compiere.apps.APanel written by Jorg Janke. - * @author Jorg Janke - * - * @author Ashley G Ramdass - * @author Low Heng Sin - * @date Feb 25, 2007 - * @version $Revision: 0.10 $ - * - * @author Cristina Ghita, www.arhipac.ro - * @see FR [ 2877111 ] See identifiers columns when delete records https://sourceforge.net/tracker/?func=detail&atid=879335&aid=2877111&group_id=176962 - * - * @author hengsin, hengsin.low@idalica.com - * @see FR [2887701] https://sourceforge.net/tracker/?func=detail&atid=879335&aid=2887701&group_id=176962 - * @sponsor www.metas.de - * - * @author Teo Sarca, teo.sarca@gmail.com - *
- * The Callout is in the string of
- * "class.method;class.method;"
- * If there is no class name, i.e. only a method name, the class is regarded
- * as CalloutSystem.
- * The class needs to comply with the Interface Callout.
- *
- * @param field field
- * @return error message or ""
- * @see org.compiere.model.Callout
- */
- private String processButtonCallout (IProcessButton button)
- {
- IADTabpanel adtab = findADTabpanel(button);
- if (adtab != null) {
- GridField field = adtab.getGridTab().getField(button.getColumnName());
- if (field != null)
- return adtab.getGridTab().processCallout(field);
- else
- return "";
- } else {
- return "";
- }
- } // processButtonCallout
-
- public IADTabpanel findADTabpanel(IProcessButton button) {
- IADTabpanel adtab = null;
- if (button.getADTabpanel() != null)
- return button.getADTabpanel();
-
- Component c = button instanceof WEditor ? ((WEditor)button).getComponent() : (Component)button;
- while (c != null) {
- if (c instanceof IADTabpanel) {
- adtab = (IADTabpanel) c;
- break;
- }
- c = c.getParent();
- }
- return adtab;
- }
-
- /**
- *
- * @return IADTab
- */
- public IADTabbox getADTab() {
- return adTabbox;
- }
-
- /**
- * @param pi
- */
- public void executeASync(ProcessInfo pi) {
- }
-
- /**
- * @param pi
- */
- private void onModalClose(ProcessInfo pi) {
- boolean notPrint = pi != null
- && pi.getAD_Process_ID() != adTabbox.getSelectedGridTab().getAD_Process_ID()
- && pi.isReportingProcess() == false;
- //
- // Process Result
-
- if (Executions.getCurrent() != null)
- {
- if (notPrint) // refresh if not print
- {
- updateUI(pi);
- }
- }
- else
- {
- try {
- //acquire desktop, 2 second timeout
- Executions.activate(getComponent().getDesktop(), 2000);
- try {
- if (notPrint) // refresh if not print
- {
- updateUI(pi);
- }
- } catch(Error ex){
- throw ex;
- } finally{
- //release full control of desktop
- Executions.deactivate(getComponent().getDesktop());
- }
- } catch (Exception e) {
- logger.log(Level.WARNING, "Failed to update UI upon unlock.", e);
- }
- }
- }
-
- private void updateUI(ProcessInfo pi) {
- // Timeout
- if (pi.isTimeout()) // set temporarily to R/O
- Env.setContext(ctx, curWindowNo, "Processed", "Y");
- // Update Status Line
- String summary = pi.getSummary();
- if (summary != null && summary.indexOf('@') != -1)
- pi.setSummary(Msg.parseTranslation(Env.getCtx(), summary));
-
- // Get Log Info
- ProcessInfoUtil.setLogFromDB(pi);
- ProcessInfoLog m_logs[] = pi.getLogs();
- breadCrumb.setStatusLine(pi.getSummary(), pi.isError(),m_logs);
- if (m_logs != null) {
- ProcessInfoDialog dialog = new ProcessInfoDialog(AEnv.getDialogHeader(ctx, curWindowNo),Env.getHeader(ctx, curWindowNo), m_logs);
- dialog.addEventListener(DialogEvents.ON_WINDOW_CLOSE, new EventListener