Implemented enhancement proposed in
http://sourceforge.net/forum/forum.php?thread_id=1617252&forum_id=610548 Management of Show Help option for processes and reports Y - Show Help N - Don't show help A - Ask User - for future implementation - created inactive
This commit is contained in:
parent
69758665c1
commit
3f09e9cc42
|
@ -0,0 +1,105 @@
|
|||
INSERT INTO ad_element
|
||||
(ad_element_id, ad_client_id, ad_org_id, isactive,
|
||||
created, createdby,
|
||||
updated, updatedby,
|
||||
columnname, entitytype, NAME, printname
|
||||
)
|
||||
VALUES (50038, 0, 0, 'Y',
|
||||
TO_DATE ('12/19/2006 03:57:24', 'MM/DD/YYYY HH24:MI:SS'), 0,
|
||||
TO_DATE ('12/19/2006 03:57:24', 'MM/DD/YYYY HH24:MI:SS'), 0,
|
||||
'ShowHelp', 'D', 'Show Help', 'Show Help'
|
||||
);
|
||||
|
||||
INSERT INTO ad_reference
|
||||
(ad_reference_id, ad_client_id, ad_org_id, isactive,
|
||||
created, createdby,
|
||||
updated, updatedby,
|
||||
NAME, validationtype, entitytype
|
||||
)
|
||||
VALUES (50007, 0, 0, 'Y',
|
||||
TO_DATE ('12/19/2006 04:00:42', 'MM/DD/YYYY HH24:MI:SS'), 0,
|
||||
TO_DATE ('12/19/2006 04:00:42', 'MM/DD/YYYY HH24:MI:SS'), 0,
|
||||
'ShowHelp List', 'L', 'D'
|
||||
);
|
||||
|
||||
INSERT INTO ad_ref_list
|
||||
(ad_ref_list_id, ad_client_id, ad_org_id, isactive,
|
||||
created, createdby,
|
||||
updated, updatedby,
|
||||
VALUE, NAME, ad_reference_id, entitytype
|
||||
)
|
||||
VALUES (50037, 0, 0, 'N',
|
||||
TO_DATE ('12/19/2006 04:01:20', 'MM/DD/YYYY HH24:MI:SS'), 0,
|
||||
TO_DATE ('12/19/2006 04:01:42', 'MM/DD/YYYY HH24:MI:SS'), 0,
|
||||
'A', 'Ask user (for future use)', 50007, 'D'
|
||||
);
|
||||
|
||||
INSERT INTO ad_ref_list
|
||||
(ad_ref_list_id, ad_client_id, ad_org_id, isactive,
|
||||
created, createdby,
|
||||
updated, updatedby,
|
||||
VALUE, NAME, ad_reference_id, entitytype
|
||||
)
|
||||
VALUES (50038, 0, 0, 'Y',
|
||||
TO_DATE ('12/19/2006 04:02:01', 'MM/DD/YYYY HH24:MI:SS'), 0,
|
||||
TO_DATE ('12/19/2006 04:02:01', 'MM/DD/YYYY HH24:MI:SS'), 0,
|
||||
'N', 'Don''t show help', 50007, 'D'
|
||||
);
|
||||
|
||||
INSERT INTO ad_ref_list
|
||||
(ad_ref_list_id, ad_client_id, ad_org_id, isactive,
|
||||
created, createdby,
|
||||
updated, updatedby,
|
||||
VALUE, NAME, ad_reference_id, entitytype
|
||||
)
|
||||
VALUES (50039, 0, 0, 'Y',
|
||||
TO_DATE ('12/19/2006 04:02:25', 'MM/DD/YYYY HH24:MI:SS'), 0,
|
||||
TO_DATE ('12/19/2006 04:02:25', 'MM/DD/YYYY HH24:MI:SS'), 0,
|
||||
'Y', 'Show Help', 50007, 'D'
|
||||
);
|
||||
|
||||
INSERT INTO ad_column
|
||||
(ad_column_id, ad_client_id, ad_org_id, isactive,
|
||||
created,
|
||||
updated, createdby, updatedby,
|
||||
NAME, description, VERSION,
|
||||
entitytype, columnname, ad_table_id, ad_reference_id,
|
||||
ad_reference_value_id, fieldlength, defaultvalue, iskey,
|
||||
isparent, ismandatory, isupdateable, isidentifier, seqno,
|
||||
istranslated, isencrypted, isselectioncolumn, ad_element_id,
|
||||
issyncdatabase, isalwaysupdateable
|
||||
)
|
||||
VALUES (50181, 0, 0, 'Y',
|
||||
TO_DATE ('12/19/2006 04:03:24', 'MM/DD/YYYY HH24:MI:SS'),
|
||||
TO_DATE ('12/19/2006 04:04:52', 'MM/DD/YYYY HH24:MI:SS'), 0, 0,
|
||||
'Show Help', 'To show or hide help for reports / processes', 0,
|
||||
'D', 'ShowHelp', 284, 17,
|
||||
50007, 1, 'Y', 'N',
|
||||
'N', 'N', 'Y', 'N', 0,
|
||||
'N', 'N', 'N', 50038,
|
||||
'N', 'N'
|
||||
);
|
||||
|
||||
INSERT INTO ad_field
|
||||
(ad_field_id, ad_client_id, ad_org_id, isactive,
|
||||
created, createdby,
|
||||
updated, updatedby,
|
||||
NAME, description,
|
||||
iscentrallymaintained, ad_tab_id, ad_column_id, isdisplayed,
|
||||
displaylength, isreadonly, seqno, issameline, isheading,
|
||||
isfieldonly, isencrypted, entitytype
|
||||
)
|
||||
VALUES (50155, 0, 0, 'Y',
|
||||
TO_DATE ('12/19/2006 04:05:56', 'MM/DD/YYYY HH24:MI:SS'), 0,
|
||||
TO_DATE ('12/19/2006 04:08:45', 'MM/DD/YYYY HH24:MI:SS'), 0,
|
||||
'Show Help', 'To show or hide help for reports / processes',
|
||||
'Y', 245, 50181, 'Y',
|
||||
1, 'N', 185, 'N', 'N',
|
||||
'N', 'N', 'D'
|
||||
);
|
||||
|
||||
COMMIT ;
|
||||
|
||||
ALTER TABLE ad_process ADD showhelp CHAR(1) DEFAULT 'Y';
|
||||
|
||||
-- run the sequence check after this
|
|
@ -1927,6 +1927,14 @@ public final class APanel extends CPanel
|
|||
if (!cmd_save(true))
|
||||
return;
|
||||
|
||||
// globalqss - Add support for Don't ShowHelp option in Process
|
||||
// this code must be changed if integrated the parameters and help in only one window
|
||||
MProcess pr = new MProcess(m_ctx, vButton.getProcess_ID(), null);
|
||||
if (pr.getShowHelp() != null && pr.getShowHelp().equals("N")) {
|
||||
startWOasking = true;
|
||||
}
|
||||
// end globalqss
|
||||
|
||||
// Ask user to start process, if Description and Help is not empty
|
||||
if (!startWOasking && !(vButton.getDescription().equals("") && vButton.getHelp().equals("")))
|
||||
if (!ADialog.ask(m_curWindowNo, this, "StartProcess?",
|
||||
|
|
|
@ -40,6 +40,8 @@ import org.compiere.util.*;
|
|||
* @version $Id: ProcessDialog.java,v 1.2 2006/07/30 00:51:27 jjanke Exp $
|
||||
* @author Low Heng Sin
|
||||
* - Merge process parameter dialog into process dialog.
|
||||
* @author arboleda - globalqss
|
||||
* - Implement ShowHelp option on processes and reports
|
||||
*/
|
||||
public class ProcessDialog extends CFrame
|
||||
implements ActionListener, ASyncProcess
|
||||
|
@ -75,6 +77,7 @@ public class ProcessDialog extends CFrame
|
|||
private int[] m_ids = null;
|
||||
private boolean m_isLocked = false;
|
||||
private StringBuffer m_messageText = new StringBuffer();
|
||||
private String m_ShowHelp = null; // Determine if a Help Process Window is shown
|
||||
/** Logger */
|
||||
private static CLogger log = CLogger.getCLogger(ProcessDialog.class);
|
||||
//
|
||||
|
@ -185,11 +188,11 @@ public class ProcessDialog extends CFrame
|
|||
log.config("");
|
||||
//
|
||||
boolean trl = !Env.isBaseLanguage(Env.getCtx(), "AD_Process");
|
||||
String sql = "SELECT Name, Description, Help, IsReport "
|
||||
String sql = "SELECT Name, Description, Help, IsReport, ShowHelp "
|
||||
+ "FROM AD_Process "
|
||||
+ "WHERE AD_Process_ID=?";
|
||||
if (trl)
|
||||
sql = "SELECT t.Name, t.Description, t.Help, p.IsReport "
|
||||
sql = "SELECT t.Name, t.Description, t.Help, p.IsReport, p.ShowHelp "
|
||||
+ "FROM AD_Process p, AD_Process_Trl t "
|
||||
+ "WHERE p.AD_Process_ID=t.AD_Process_ID"
|
||||
+ " AND p.AD_Process_ID=? AND t.AD_Language=?";
|
||||
|
@ -204,6 +207,7 @@ public class ProcessDialog extends CFrame
|
|||
{
|
||||
m_Name = rs.getString(1);
|
||||
m_IsReport = rs.getString(4).equals("Y");
|
||||
m_ShowHelp = rs.getString(5);
|
||||
//
|
||||
m_messageText.append("<b>");
|
||||
String s = rs.getString(2); // Description
|
||||
|
@ -233,13 +237,6 @@ public class ProcessDialog extends CFrame
|
|||
message.setText(m_messageText.toString());
|
||||
bOK.setText(Msg.getMsg(Env.getCtx(), "Start"));
|
||||
|
||||
/** Start Reports w/o asking
|
||||
if (m_IsReport)
|
||||
{
|
||||
bOK.doClick();
|
||||
return false; // don't show
|
||||
}
|
||||
**/
|
||||
// Similar to APanel.actionButton
|
||||
m_pi = new ProcessInfo(m_Name, m_AD_Process_ID);
|
||||
m_pi.setAD_User_ID (Env.getAD_User_ID(Env.getCtx()));
|
||||
|
@ -247,8 +244,14 @@ public class ProcessDialog extends CFrame
|
|||
parameterPanel = new ProcessParameterPanel(m_WindowNo, m_pi);
|
||||
centerPanel.removeAll();
|
||||
if (parameterPanel.init()) {
|
||||
// hasfields
|
||||
centerPanel.add(separator, BorderLayout.NORTH);
|
||||
centerPanel.add(parameterPanel, BorderLayout.CENTER);
|
||||
} else {
|
||||
if (m_ShowHelp != null && m_ShowHelp.equals("N")) {
|
||||
bOK.doClick(); // don't ask first click
|
||||
// anyway show resulting window
|
||||
}
|
||||
}
|
||||
dialog.revalidate();
|
||||
return true;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/******************************************************************************
|
||||
* Product: Compiere ERP & CRM Smart Business Solution *
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software;
|
||||
you can redistribute it and/or modify it *
|
||||
|
@ -26,7 +26,7 @@ import java.math.*;
|
|||
import org.compiere.util.*;
|
||||
/** Generated Model for AD_Process
|
||||
* @author Jorg Janke (generated)
|
||||
* @version Release 2.6.0a - $Id$ */
|
||||
* @version Release 3.1.2 - $Id$ */
|
||||
public class X_AD_Process extends PO
|
||||
{
|
||||
/** Standard Constructor
|
||||
|
@ -60,12 +60,12 @@ public X_AD_Process (Properties ctx, ResultSet rs, String trxName)
|
|||
super (ctx, rs, trxName);
|
||||
}
|
||||
/** AD_Table_ID=284 */
|
||||
public static final int Table_ID=284;
|
||||
public static final int Table_ID=MTable.getTable_ID("AD_Process");
|
||||
|
||||
/** TableName=AD_Process */
|
||||
public static final String Table_Name="AD_Process";
|
||||
|
||||
protected static KeyNamePair Model = new KeyNamePair(284,"AD_Process");
|
||||
protected static KeyNamePair Model = new KeyNamePair(Table_ID,"AD_Process");
|
||||
|
||||
protected BigDecimal accessLevel = new BigDecimal(4);
|
||||
/** AccessLevel
|
||||
|
@ -370,6 +370,34 @@ public String getProcedureName()
|
|||
{
|
||||
return (String)get_Value("ProcedureName");
|
||||
}
|
||||
|
||||
/** ShowHelp AD_Reference_ID=50007 */
|
||||
public static final int SHOWHELP_AD_Reference_ID=50007;
|
||||
/** Ask user (for future use) = A */
|
||||
public static final String SHOWHELP_AskUserForFutureUse = "A";
|
||||
/** Don't show help = N */
|
||||
public static final String SHOWHELP_DonTShowHelp = "N";
|
||||
/** Show Help = Y */
|
||||
public static final String SHOWHELP_ShowHelp = "Y";
|
||||
/** Set Show Help.
|
||||
@param ShowHelp To show or hide help for reports / processes */
|
||||
public void setShowHelp (String ShowHelp)
|
||||
{
|
||||
if (ShowHelp == null || ShowHelp.equals("A") || ShowHelp.equals("N") || ShowHelp.equals("Y"));
|
||||
else throw new IllegalArgumentException ("ShowHelp Invalid value - " + ShowHelp + " - Reference_ID=50007 - A - N - Y");
|
||||
if (ShowHelp != null && ShowHelp.length() > 1)
|
||||
{
|
||||
log.warning("Length > 1 - truncated");
|
||||
ShowHelp = ShowHelp.substring(0,0);
|
||||
}
|
||||
set_Value ("ShowHelp", ShowHelp);
|
||||
}
|
||||
/** Get Show Help.
|
||||
@return To show or hide help for reports / processes */
|
||||
public String getShowHelp()
|
||||
{
|
||||
return (String)get_Value("ShowHelp");
|
||||
}
|
||||
/** Set Statistic Count.
|
||||
@param Statistic_Count Internal statistics how often the entity was used */
|
||||
public void setStatistic_Count (int Statistic_Count)
|
||||
|
|
Loading…
Reference in New Issue