Merge deb80b3b3124
This commit is contained in:
commit
b8851a6661
|
@ -0,0 +1,29 @@
|
||||||
|
-- Feb 13, 2013 7:08:02 PM COT
|
||||||
|
--
|
||||||
|
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('I','Zoom Action',200144,'D','8ba56d3a-1fff-4e6c-b1a6-34cbe8a50071','ZoomLabel','Y',TO_DATE('2013-02-13 19:08:01','YYYY-MM-DD HH24:MI:SS'),0,0,0,0,TO_DATE('2013-02-13 19:08:01','YYYY-MM-DD HH24:MI:SS'))
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Feb 13, 2013 7:08:02 PM COT
|
||||||
|
--
|
||||||
|
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) 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,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200144 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)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Feb 13, 2013 7:25:37 PM COT
|
||||||
|
--
|
||||||
|
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('I','Setup Task:',200145,'D','ed196c88-09f4-40a7-8959-e6747b890420','Setup Task','Y',TO_DATE('2013-02-13 19:25:37','YYYY-MM-DD HH24:MI:SS'),0,0,0,0,TO_DATE('2013-02-13 19:25:37','YYYY-MM-DD HH24:MI:SS'))
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Feb 13, 2013 7:25:37 PM COT
|
||||||
|
--
|
||||||
|
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) 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,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200145 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)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Feb 13, 2013 7:28:34 PM COT
|
||||||
|
--
|
||||||
|
UPDATE AD_Message SET Value='SetupTask',Updated=TO_DATE('2013-02-13 19:28:34','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Message_ID=200145
|
||||||
|
;
|
||||||
|
|
||||||
|
SELECT register_migration_script('201302190934_IDEMPIERE-393.sql') FROM dual
|
||||||
|
;
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
DROP INDEX ad_impformat_name
|
||||||
|
;
|
||||||
|
|
||||||
|
CREATE UNIQUE INDEX ad_impformat_name
|
||||||
|
ON ad_impformat (ad_client_id, name)
|
||||||
|
;
|
||||||
|
SELECT register_migration_script('201303010917_IDEMPIERE-671.sql') FROM dual
|
||||||
|
;
|
||||||
|
|
|
@ -0,0 +1,29 @@
|
||||||
|
-- Feb 13, 2013 7:08:02 PM COT
|
||||||
|
--
|
||||||
|
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('I','Zoom Action',200144,'D','8ba56d3a-1fff-4e6c-b1a6-34cbe8a50071','ZoomLabel','Y',TO_TIMESTAMP('2013-02-13 19:08:01','YYYY-MM-DD HH24:MI:SS'),0,0,0,0,TO_TIMESTAMP('2013-02-13 19:08:01','YYYY-MM-DD HH24:MI:SS'))
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Feb 13, 2013 7:08:02 PM COT
|
||||||
|
--
|
||||||
|
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) 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,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200144 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)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Feb 13, 2013 7:25:37 PM COT
|
||||||
|
--
|
||||||
|
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('I','Setup Task:',200145,'D','ed196c88-09f4-40a7-8959-e6747b890420','Setup Task','Y',TO_TIMESTAMP('2013-02-13 19:25:37','YYYY-MM-DD HH24:MI:SS'),0,0,0,0,TO_TIMESTAMP('2013-02-13 19:25:37','YYYY-MM-DD HH24:MI:SS'))
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Feb 13, 2013 7:25:37 PM COT
|
||||||
|
--
|
||||||
|
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) 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,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200145 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)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Feb 13, 2013 7:28:34 PM COT
|
||||||
|
--
|
||||||
|
UPDATE AD_Message SET Value='SetupTask',Updated=TO_TIMESTAMP('2013-02-13 19:28:34','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Message_ID=200145
|
||||||
|
;
|
||||||
|
|
||||||
|
SELECT register_migration_script('201302190934_IDEMPIERE-393.sql') FROM dual
|
||||||
|
;
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
DROP INDEX ad_impformat_name
|
||||||
|
;
|
||||||
|
|
||||||
|
CREATE UNIQUE INDEX ad_impformat_name
|
||||||
|
ON ad_impformat (ad_client_id, name)
|
||||||
|
;
|
||||||
|
SELECT register_migration_script('201303010917_IDEMPIERE-671.sql') FROM dual
|
||||||
|
;
|
||||||
|
|
|
@ -150,14 +150,7 @@ public final class ImpFormat
|
||||||
m_tableUniqueParent = "";
|
m_tableUniqueParent = "";
|
||||||
m_tableUniqueChild = "";
|
m_tableUniqueChild = "";
|
||||||
|
|
||||||
if (m_AD_Table_ID == 311) // I_061_SyncItem
|
if (m_AD_Table_ID == TABLE_I_PRODUCT) // I_Product
|
||||||
{
|
|
||||||
m_tableUnique1 = "H_UPC"; // UPC = unique
|
|
||||||
m_tableUnique2 = "Value";
|
|
||||||
m_tableUniqueChild = "H_Commodity1"; // Vendor No may not be unique !
|
|
||||||
m_tableUniqueParent = "H_PartnrID"; // Makes it unique
|
|
||||||
}
|
|
||||||
else if (m_AD_Table_ID == TABLE_I_PRODUCT) // I_Product
|
|
||||||
{
|
{
|
||||||
m_tableUnique1 = "UPC"; // UPC = unique
|
m_tableUnique1 = "UPC"; // UPC = unique
|
||||||
m_tableUnique2 = "Value";
|
m_tableUnique2 = "Value";
|
||||||
|
@ -266,26 +259,24 @@ public final class ImpFormat
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
* Factory load
|
* Factory load
|
||||||
* @param name name
|
* @param Id id
|
||||||
* @return Import Format
|
* @return Import Format
|
||||||
*/
|
*/
|
||||||
public static ImpFormat load (String name)
|
public static ImpFormat load (int Id)
|
||||||
{
|
{
|
||||||
log.config(name);
|
if (log.isLoggable(Level.CONFIG))log.config(String.valueOf(Id));
|
||||||
ImpFormat retValue = null;
|
ImpFormat retValue = null;
|
||||||
String sql = "SELECT * FROM AD_ImpFormat WHERE Name=?";
|
String sql = "SELECT * FROM AD_ImpFormat WHERE AD_Impformat_ID=?";
|
||||||
int ID = 0;
|
|
||||||
PreparedStatement pstmt = null;
|
PreparedStatement pstmt = null;
|
||||||
ResultSet rs = null;
|
ResultSet rs = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
pstmt = DB.prepareStatement(sql, null);
|
pstmt = DB.prepareStatement(sql, null);
|
||||||
pstmt.setString (1, name);
|
pstmt.setInt (1, Id);
|
||||||
rs = pstmt.executeQuery();
|
rs = pstmt.executeQuery();
|
||||||
if (rs.next())
|
if (rs.next())
|
||||||
{
|
{
|
||||||
retValue = new ImpFormat (name, rs.getInt("AD_Table_ID"), rs.getString("FormatType"));
|
retValue = new ImpFormat (rs.getString("Name"), rs.getInt("AD_Table_ID"), rs.getString("FormatType"));
|
||||||
ID = rs.getInt ("AD_ImpFormat_ID");
|
|
||||||
if (X_AD_ImpFormat.FORMATTYPE_CustomSeparatorChar.equals(rs.getString(I_AD_ImpFormat.COLUMNNAME_FormatType))) {
|
if (X_AD_ImpFormat.FORMATTYPE_CustomSeparatorChar.equals(rs.getString(I_AD_ImpFormat.COLUMNNAME_FormatType))) {
|
||||||
retValue.setSeparatorChar(rs.getString(I_AD_ImpFormat.COLUMNNAME_SeparatorChar));
|
retValue.setSeparatorChar(rs.getString(I_AD_ImpFormat.COLUMNNAME_SeparatorChar));
|
||||||
}
|
}
|
||||||
|
@ -302,7 +293,7 @@ public final class ImpFormat
|
||||||
rs = null;
|
rs = null;
|
||||||
pstmt = null;
|
pstmt = null;
|
||||||
}
|
}
|
||||||
loadRows (retValue, ID);
|
loadRows (retValue, Id);
|
||||||
return retValue;
|
return retValue;
|
||||||
} // getFormat
|
} // getFormat
|
||||||
|
|
||||||
|
|
|
@ -170,11 +170,22 @@ public class MRecentItem extends X_AD_RecentItem
|
||||||
ri.setAD_Table_ID(AD_Table_ID);
|
ri.setAD_Table_ID(AD_Table_ID);
|
||||||
ri.setRecord_ID(Record_ID);
|
ri.setRecord_ID(Record_ID);
|
||||||
ri.setAD_User_ID(AD_User_ID);
|
ri.setAD_User_ID(AD_User_ID);
|
||||||
|
ri.setAD_Role_ID(AD_Role_ID);
|
||||||
|
ri.setAD_Window_ID(AD_Window_ID);
|
||||||
|
ri.setAD_Tab_ID(AD_Tab_ID);
|
||||||
|
ri.saveEx();
|
||||||
|
} else {
|
||||||
|
if ( ri.getAD_Role_ID() != AD_Role_ID
|
||||||
|
|| ri.getAD_Window_ID() != AD_Window_ID
|
||||||
|
|| ri.getAD_Tab_ID() != AD_Tab_ID) {
|
||||||
|
ri.setAD_Role_ID(AD_Role_ID);
|
||||||
|
ri.setAD_Window_ID(AD_Window_ID);
|
||||||
|
ri.setAD_Tab_ID(AD_Tab_ID);
|
||||||
|
ri.saveEx();
|
||||||
|
} else {
|
||||||
|
DB.executeUpdateEx("UPDATE AD_RecentItem SET Updated=SYSDATE WHERE AD_RecentItem_ID=?", new Object[] {ri.getAD_RecentItem_ID()}, null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
ri.setAD_Role_ID(AD_Role_ID);
|
|
||||||
ri.setAD_Window_ID(AD_Window_ID);
|
|
||||||
ri.setAD_Tab_ID(AD_Tab_ID);
|
|
||||||
ri.saveEx();
|
|
||||||
publishChangedEvent(AD_User_ID);
|
publishChangedEvent(AD_User_ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,7 @@ import org.adempiere.base.IDictionaryService;
|
||||||
import org.adempiere.base.Service;
|
import org.adempiere.base.Service;
|
||||||
import org.compiere.model.Query;
|
import org.compiere.model.Query;
|
||||||
import org.compiere.model.X_AD_Package_Imp;
|
import org.compiere.model.X_AD_Package_Imp;
|
||||||
|
import org.compiere.util.AdempiereSystemError;
|
||||||
import org.compiere.util.Env;
|
import org.compiere.util.Env;
|
||||||
import org.compiere.util.Trx;
|
import org.compiere.util.Trx;
|
||||||
import org.osgi.framework.BundleActivator;
|
import org.osgi.framework.BundleActivator;
|
||||||
|
@ -97,6 +98,8 @@ public class AdempiereActivator implements BundleActivator {
|
||||||
IDictionaryService service = Service.locator().locate(IDictionaryService.class).getService();
|
IDictionaryService service = Service.locator().locate(IDictionaryService.class).getService();
|
||||||
FileOutputStream zipstream = null;
|
FileOutputStream zipstream = null;
|
||||||
try {
|
try {
|
||||||
|
if (service == null)
|
||||||
|
throw new AdempiereSystemError("Could not find/load OSGi service for packin");
|
||||||
// copy the resource to a temporary file to process it with 2pack
|
// copy the resource to a temporary file to process it with 2pack
|
||||||
InputStream stream = context.getBundle().getEntry("/META-INF/2Pack.zip").openStream();
|
InputStream stream = context.getBundle().getEntry("/META-INF/2Pack.zip").openStream();
|
||||||
File zipfile = File.createTempFile(getName(), ".zip");
|
File zipfile = File.createTempFile(getName(), ".zip");
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -56,6 +56,7 @@ import org.compiere.util.CLogger;
|
||||||
import org.compiere.util.DB;
|
import org.compiere.util.DB;
|
||||||
import org.compiere.util.Env;
|
import org.compiere.util.Env;
|
||||||
import org.compiere.util.Ini;
|
import org.compiere.util.Ini;
|
||||||
|
import org.compiere.util.KeyNamePair;
|
||||||
import org.compiere.util.Msg;
|
import org.compiere.util.Msg;
|
||||||
|
|
||||||
|
|
||||||
|
@ -205,8 +206,8 @@ public class VFileImport extends CPanel
|
||||||
private void dynInit()
|
private void dynInit()
|
||||||
{
|
{
|
||||||
// Load Formats
|
// Load Formats
|
||||||
pickFormat.addItem(s_none);
|
pickFormat.addItem(new KeyNamePair(-1,s_none));
|
||||||
String sql = MRole.getDefault().addAccessSQL("SELECT Name FROM AD_ImpFormat", "AD_ImpFormat",
|
String sql = MRole.getDefault().addAccessSQL("SELECT AD_Impformat_ID,Name FROM AD_ImpFormat WHERE isactive='Y'", "AD_ImpFormat",
|
||||||
MRole.SQL_FULLYQUALIFIED, MRole.SQL_RO);
|
MRole.SQL_FULLYQUALIFIED, MRole.SQL_RO);
|
||||||
PreparedStatement pstmt = null;
|
PreparedStatement pstmt = null;
|
||||||
ResultSet rs = null;
|
ResultSet rs = null;
|
||||||
|
@ -215,7 +216,7 @@ public class VFileImport extends CPanel
|
||||||
pstmt = DB.prepareStatement(sql, null);
|
pstmt = DB.prepareStatement(sql, null);
|
||||||
rs = pstmt.executeQuery();
|
rs = pstmt.executeQuery();
|
||||||
while (rs.next())
|
while (rs.next())
|
||||||
pickFormat.addItem(rs.getString(1));
|
pickFormat.addItem(new KeyNamePair(rs.getInt(1),rs.getString(2)));
|
||||||
}
|
}
|
||||||
catch (SQLException e)
|
catch (SQLException e)
|
||||||
{
|
{
|
||||||
|
@ -373,13 +374,13 @@ public class VFileImport extends CPanel
|
||||||
// clear panel
|
// clear panel
|
||||||
previewPanel.removeAll();
|
previewPanel.removeAll();
|
||||||
//
|
//
|
||||||
String formatName = pickFormat.getSelectedItem().toString();
|
KeyNamePair pickFormatKNPair = (KeyNamePair)pickFormat.getSelectedItem();
|
||||||
if (formatName.equals(s_none))
|
if (pickFormatKNPair.getName().equals(s_none))
|
||||||
return;
|
return;
|
||||||
m_format = ImpFormat.load (formatName);
|
m_format = ImpFormat.load (pickFormatKNPair.getKey());
|
||||||
if (m_format == null)
|
if (m_format == null)
|
||||||
{
|
{
|
||||||
ADialog.error(m_WindowNo, this, "FileImportNoFormat", formatName);
|
ADialog.error(m_WindowNo, this, "FileImportNoFormat", pickFormatKNPair.getName());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -158,6 +158,7 @@ public class WArchive implements EventListener<Event>
|
||||||
ADForm form = ADForm.openForm(AD_Form_ID);
|
ADForm form = ADForm.openForm(AD_Form_ID);
|
||||||
|
|
||||||
WArchiveViewer av = (WArchiveViewer) form.getICustomForm();
|
WArchiveViewer av = (WArchiveViewer) form.getICustomForm();
|
||||||
|
av.setShowQuery(false);
|
||||||
if (e.getTarget() == m_documents)
|
if (e.getTarget() == m_documents)
|
||||||
av.query(false, m_AD_Table_ID, m_Record_ID);
|
av.query(false, m_AD_Table_ID, m_Record_ID);
|
||||||
else if (e.getTarget() == m_reports)
|
else if (e.getTarget() == m_reports)
|
||||||
|
|
|
@ -59,6 +59,7 @@ import org.compiere.util.Env;
|
||||||
import org.compiere.util.KeyNamePair;
|
import org.compiere.util.KeyNamePair;
|
||||||
import org.compiere.util.Msg;
|
import org.compiere.util.Msg;
|
||||||
import org.zkoss.util.media.AMedia;
|
import org.zkoss.util.media.AMedia;
|
||||||
|
import org.zkoss.zk.ui.Page;
|
||||||
import org.zkoss.zk.ui.event.Event;
|
import org.zkoss.zk.ui.event.Event;
|
||||||
import org.zkoss.zk.ui.event.EventListener;
|
import org.zkoss.zk.ui.event.EventListener;
|
||||||
import org.zkoss.zk.ui.event.Events;
|
import org.zkoss.zk.ui.event.Events;
|
||||||
|
@ -122,20 +123,31 @@ public class WArchiveViewer extends Archive implements IFormController, EventLis
|
||||||
|
|
||||||
private Iframe iframe = new Iframe();
|
private Iframe iframe = new Iframe();
|
||||||
private Button bRefresh = new Button();
|
private Button bRefresh = new Button();
|
||||||
|
private boolean showQuery = true;
|
||||||
|
|
||||||
public WArchiveViewer()
|
public WArchiveViewer()
|
||||||
{
|
{
|
||||||
log.info("");
|
log.info("");
|
||||||
|
|
||||||
try
|
form = new CustomForm() {
|
||||||
{
|
private static final long serialVersionUID = 7226661630651936293L;
|
||||||
dynInit();
|
|
||||||
jbInit();
|
@Override
|
||||||
}
|
public void onPageAttached(Page newpage, Page oldpage) {
|
||||||
catch(Exception e)
|
super.onPageAttached(newpage, oldpage);
|
||||||
{
|
if (newpage != null)
|
||||||
log.log(Level.SEVERE, "init", e);
|
try {
|
||||||
}
|
dynInit();
|
||||||
|
jbInit();
|
||||||
|
}
|
||||||
|
catch(Exception e)
|
||||||
|
{
|
||||||
|
log.log(Level.SEVERE, "init", e);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -221,103 +233,108 @@ public class WArchiveViewer extends Archive implements IFormController, EventLis
|
||||||
reportField.setLabel(Msg.translate(Env.getCtx(), "IsReport"));
|
reportField.setLabel(Msg.translate(Env.getCtx(), "IsReport"));
|
||||||
reportField.addEventListener(Events.ON_CHECK, this);
|
reportField.addEventListener(Events.ON_CHECK, this);
|
||||||
|
|
||||||
Grid gridQuery = new Grid();
|
Rows rows;
|
||||||
gridQuery.setWidth("500px");
|
Row row;
|
||||||
gridQuery.setStyle("margin:0; padding:0;");
|
Div div;
|
||||||
gridQuery.makeNoStrip();
|
|
||||||
gridQuery.setOddRowSclass("even");
|
|
||||||
|
|
||||||
Rows rows = new Rows();
|
if(showQuery){
|
||||||
gridQuery.appendChild(rows);
|
Grid gridQuery = new Grid();
|
||||||
|
gridQuery.setWidth("500px");
|
||||||
|
gridQuery.setStyle("margin:0; padding:0;");
|
||||||
|
gridQuery.makeNoStrip();
|
||||||
|
gridQuery.setOddRowSclass("even");
|
||||||
|
|
||||||
Row row = new Row();
|
rows = new Rows();
|
||||||
rows.appendChild(row);
|
gridQuery.appendChild(rows);
|
||||||
row.setAlign("right");
|
|
||||||
row.appendCellChild(reportField, 3);
|
|
||||||
|
|
||||||
row = new Row();
|
row = new Row();
|
||||||
rows.appendChild(row);
|
rows.appendChild(row);
|
||||||
Div div = new Div();
|
row.setAlign("right");
|
||||||
div.setStyle("text-align: right;");
|
row.appendCellChild(reportField, 3);
|
||||||
div.appendChild(processLabel);
|
|
||||||
row.appendCellChild(div, 1);
|
|
||||||
row.appendCellChild(processField, 2);
|
|
||||||
processField.setWidth("100%");
|
|
||||||
|
|
||||||
row = new Row();
|
row = new Row();
|
||||||
rows.appendChild(row);
|
rows.appendChild(row);
|
||||||
div = new Div();
|
div = new Div();
|
||||||
div.setStyle("text-align: right;");
|
div.setStyle("text-align: right;");
|
||||||
div.appendChild(bPartnerLabel);
|
div.appendChild(processLabel);
|
||||||
row.appendCellChild(div, 1);
|
row.appendCellChild(div, 1);
|
||||||
row.appendCellChild(bPartnerField.getComponent(), 2);
|
row.appendCellChild(processField, 2);
|
||||||
|
processField.setWidth("100%");
|
||||||
|
|
||||||
row = new Row();
|
row = new Row();
|
||||||
rows.appendChild(row);
|
rows.appendChild(row);
|
||||||
div = new Div();
|
div = new Div();
|
||||||
div.setStyle("text-align: right;");
|
div.setStyle("text-align: right;");
|
||||||
div.appendChild(tableLabel);
|
div.appendChild(bPartnerLabel);
|
||||||
row.appendCellChild(div, 1);
|
row.appendCellChild(div, 1);
|
||||||
row.appendCellChild(tableField, 2);
|
row.appendCellChild(bPartnerField.getComponent(), 2);
|
||||||
tableField.setWidth("100%");
|
|
||||||
|
|
||||||
row = new Row();
|
row = new Row();
|
||||||
rows.appendChild(row);
|
rows.appendChild(row);
|
||||||
div = new Div();
|
div = new Div();
|
||||||
div.setStyle("text-align: right;");
|
div.setStyle("text-align: right;");
|
||||||
div.appendChild(nameQLabel);
|
div.appendChild(tableLabel);
|
||||||
row.appendCellChild(div, 1);
|
row.appendCellChild(div, 1);
|
||||||
row.appendCellChild(nameQField, 2);
|
row.appendCellChild(tableField, 2);
|
||||||
nameQField.setWidth("100%");
|
tableField.setWidth("100%");
|
||||||
|
|
||||||
row = new Row();
|
row = new Row();
|
||||||
rows.appendChild(row);
|
rows.appendChild(row);
|
||||||
div = new Div();
|
div = new Div();
|
||||||
div.setStyle("text-align: right;");
|
div.setStyle("text-align: right;");
|
||||||
div.appendChild(descriptionQLabel);
|
div.appendChild(nameQLabel);
|
||||||
row.appendCellChild(div, 1);
|
row.appendCellChild(div, 1);
|
||||||
row.appendCellChild(descriptionQField, 2);
|
row.appendCellChild(nameQField, 2);
|
||||||
descriptionQField.setWidth("100%");
|
nameQField.setWidth("100%");
|
||||||
|
|
||||||
row = new Row();
|
row = new Row();
|
||||||
rows.appendChild(row);
|
rows.appendChild(row);
|
||||||
div = new Div();
|
div = new Div();
|
||||||
div.setStyle("text-align: right;");
|
div.setStyle("text-align: right;");
|
||||||
div.appendChild(helpQLabel);
|
div.appendChild(descriptionQLabel);
|
||||||
row.appendCellChild(div, 1);
|
row.appendCellChild(div, 1);
|
||||||
row.appendCellChild(helpQField, 2);
|
row.appendCellChild(descriptionQField, 2);
|
||||||
helpQField.setWidth("100%");
|
descriptionQField.setWidth("100%");
|
||||||
|
|
||||||
row = new Row();
|
row = new Row();
|
||||||
rows.appendChild(row);
|
rows.appendChild(row);
|
||||||
div = new Div();
|
div = new Div();
|
||||||
div.setStyle("text-align: right;");
|
div.setStyle("text-align: right;");
|
||||||
div.appendChild(createdByQLabel);
|
div.appendChild(helpQLabel);
|
||||||
row.appendCellChild(div, 1);
|
row.appendCellChild(div, 1);
|
||||||
row.appendCellChild(createdByQField, 2);
|
row.appendCellChild(helpQField, 2);
|
||||||
createdByQField.setWidth("100%");
|
helpQField.setWidth("100%");
|
||||||
|
|
||||||
row = new Row();
|
row = new Row();
|
||||||
rows.appendChild(row);
|
rows.appendChild(row);
|
||||||
div = new Div();
|
div = new Div();
|
||||||
div.setStyle("text-align: right;");
|
div.setStyle("text-align: right;");
|
||||||
div.appendChild(createdQLabel);
|
div.appendChild(createdByQLabel);
|
||||||
row.appendChild(div);
|
row.appendCellChild(div, 1);
|
||||||
row.appendChild(createdQFrom);
|
row.appendCellChild(createdByQField, 2);
|
||||||
row.appendChild(createdQTo);
|
createdByQField.setWidth("100%");
|
||||||
|
|
||||||
div = new Div();
|
row = new Row();
|
||||||
div.setStyle("text-align: center;");
|
rows.appendChild(row);
|
||||||
div.appendChild(gridQuery);
|
div = new Div();
|
||||||
|
div.setStyle("text-align: right;");
|
||||||
|
div.appendChild(createdQLabel);
|
||||||
|
row.appendChild(div);
|
||||||
|
row.appendChild(createdQFrom);
|
||||||
|
row.appendChild(createdQTo);
|
||||||
|
|
||||||
Tabpanel tabQueryPanel = new Tabpanel();
|
div = new Div();
|
||||||
tabQueryPanel.appendChild(div);
|
div.setStyle("text-align: center;");
|
||||||
|
div.appendChild(gridQuery);
|
||||||
|
|
||||||
Tab tabQuery = new Tab(Msg.getMsg(Env.getCtx(), "ViewerQuery"));
|
Tabpanel tabQueryPanel = new Tabpanel();
|
||||||
|
tabQueryPanel.appendChild(div);
|
||||||
|
|
||||||
tabpanels.appendChild(tabQueryPanel);
|
Tab tabQuery = new Tab(Msg.getMsg(Env.getCtx(), "ViewerQuery"));
|
||||||
tabs.appendChild(tabQuery);
|
|
||||||
|
|
||||||
|
tabpanels.appendChild(tabQueryPanel);
|
||||||
|
tabs.appendChild(tabQuery);
|
||||||
|
}
|
||||||
Grid gridView = new Grid();
|
Grid gridView = new Grid();
|
||||||
gridView.setStyle("margin:0; padding:0;");
|
gridView.setStyle("margin:0; padding:0;");
|
||||||
gridView.makeNoStrip();
|
gridView.makeNoStrip();
|
||||||
|
@ -450,10 +467,10 @@ public class WArchiveViewer extends Archive implements IFormController, EventLis
|
||||||
SessionManager.getAppDesktop().closeActiveWindow();
|
SessionManager.getAppDesktop().closeActiveWindow();
|
||||||
else if (e.getTarget().getId().equals(ConfirmPanel.A_OK))
|
else if (e.getTarget().getId().equals(ConfirmPanel.A_OK))
|
||||||
{
|
{
|
||||||
if (tabbox.getSelectedIndex() == 1)
|
if (showQuery && tabbox.getSelectedIndex() == 0)
|
||||||
SessionManager.getAppDesktop().closeActiveWindow();
|
|
||||||
else
|
|
||||||
cmd_query();
|
cmd_query();
|
||||||
|
else
|
||||||
|
SessionManager.getAppDesktop().closeActiveWindow();
|
||||||
}
|
}
|
||||||
else if (e.getTarget() == reportField)
|
else if (e.getTarget() == reportField)
|
||||||
updateQDisplay();
|
updateQDisplay();
|
||||||
|
@ -465,7 +482,7 @@ public class WArchiveViewer extends Archive implements IFormController, EventLis
|
||||||
iframe.invalidate();
|
iframe.invalidate();
|
||||||
else if (e.getTarget() instanceof Tab)
|
else if (e.getTarget() instanceof Tab)
|
||||||
{
|
{
|
||||||
if(tabbox.getSelectedIndex() == 1)
|
if(tabbox.getSelectedIndex() == (showQuery ? 1 : 0))
|
||||||
iframe.invalidate();
|
iframe.invalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -504,6 +521,7 @@ public class WArchiveViewer extends Archive implements IFormController, EventLis
|
||||||
MArchive ar = m_archives[m_index];
|
MArchive ar = m_archives[m_index];
|
||||||
ar.delete(true);
|
ar.delete(true);
|
||||||
tabbox.setSelectedIndex(0);
|
tabbox.setSelectedIndex(0);
|
||||||
|
cmd_query();
|
||||||
dynInit();
|
dynInit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -639,51 +657,68 @@ public class WArchiveViewer extends Archive implements IFormController, EventLis
|
||||||
{
|
{
|
||||||
boolean reports = reportField.isChecked();
|
boolean reports = reportField.isChecked();
|
||||||
|
|
||||||
ListItem listitem = processField.getSelectedItem();
|
|
||||||
KeyNamePair process = null;
|
KeyNamePair process = null;
|
||||||
if (listitem != null)
|
Integer C_BPartner_ID = null;
|
||||||
process = (KeyNamePair)listitem.getValue();
|
String name = null;
|
||||||
|
String description = null;
|
||||||
listitem = tableField.getSelectedItem();
|
String help = null;
|
||||||
KeyNamePair table = null;
|
KeyNamePair table = null;
|
||||||
if (listitem != null)
|
|
||||||
table = (KeyNamePair)listitem.getValue();
|
|
||||||
|
|
||||||
Integer C_BPartner_ID = (Integer)bPartnerField.getValue();
|
|
||||||
String name = nameQField.getText();
|
|
||||||
String description = descriptionQField.getText();
|
|
||||||
String help = helpQField.getText();
|
|
||||||
|
|
||||||
listitem = createdByQField.getSelectedItem();
|
|
||||||
KeyNamePair createdBy = null;
|
KeyNamePair createdBy = null;
|
||||||
if (listitem != null)
|
|
||||||
createdBy = (KeyNamePair)listitem.getValue();
|
|
||||||
|
|
||||||
Date date = null;
|
|
||||||
Timestamp createdFrom = null;
|
Timestamp createdFrom = null;
|
||||||
if (createdQFrom.getValue() != null)
|
|
||||||
{
|
|
||||||
date = createdQFrom.getValue();
|
|
||||||
createdFrom = new Timestamp(date.getTime());
|
|
||||||
}
|
|
||||||
|
|
||||||
Timestamp createdTo = null;
|
Timestamp createdTo = null;
|
||||||
if (createdQTo.getValue() != null)
|
|
||||||
{
|
if (showQuery) {
|
||||||
date = createdQTo.getValue();
|
ListItem listitem = processField.getSelectedItem();
|
||||||
createdTo = new Timestamp(date.getTime());
|
process = null;
|
||||||
|
if (listitem != null)
|
||||||
|
process = (KeyNamePair)listitem.getValue();
|
||||||
|
|
||||||
|
listitem = tableField.getSelectedItem();
|
||||||
|
table = null;
|
||||||
|
if (listitem != null)
|
||||||
|
table = (KeyNamePair)listitem.getValue();
|
||||||
|
|
||||||
|
C_BPartner_ID = (Integer)bPartnerField.getValue();
|
||||||
|
name = nameQField.getText();
|
||||||
|
description = descriptionQField.getText();
|
||||||
|
help = helpQField.getText();
|
||||||
|
|
||||||
|
listitem = createdByQField.getSelectedItem();
|
||||||
|
createdBy = null;
|
||||||
|
if (listitem != null)
|
||||||
|
createdBy = (KeyNamePair)listitem.getValue();
|
||||||
|
|
||||||
|
Date date = null;
|
||||||
|
createdFrom = null;
|
||||||
|
if (createdQFrom.getValue() != null)
|
||||||
|
{
|
||||||
|
date = createdQFrom.getValue();
|
||||||
|
createdFrom = new Timestamp(date.getTime());
|
||||||
|
}
|
||||||
|
|
||||||
|
createdTo = null;
|
||||||
|
if (createdQTo.getValue() != null)
|
||||||
|
{
|
||||||
|
date = createdQTo.getValue();
|
||||||
|
createdTo = new Timestamp(date.getTime());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
cmd_query(reports, process, table, C_BPartner_ID, name, description, help,
|
cmd_query(reports, process, table, C_BPartner_ID, name, description, help,
|
||||||
createdBy, createdFrom, createdTo);
|
createdBy, createdFrom, createdTo);
|
||||||
|
|
||||||
// Display
|
|
||||||
tabbox.setSelectedIndex(1);
|
|
||||||
|
|
||||||
m_index = 1;
|
m_index = 1;
|
||||||
|
if (showQuery)
|
||||||
|
tabbox.setSelectedIndex(1);
|
||||||
|
|
||||||
updateVDisplay(false);
|
updateVDisplay(false);
|
||||||
} // cmd_query
|
} // cmd_query
|
||||||
|
|
||||||
|
public void setShowQuery(boolean showQuery) {
|
||||||
|
this.showQuery = showQuery;
|
||||||
|
}
|
||||||
|
|
||||||
public ADForm getForm() {
|
public ADForm getForm() {
|
||||||
return form;
|
return form;
|
||||||
}
|
}
|
||||||
|
|
|
@ -233,7 +233,7 @@ public class WFileImport extends ADForm implements EventListener<Event>
|
||||||
// Load Formats
|
// Load Formats
|
||||||
pickFormat.appendItem(s_none, s_none);
|
pickFormat.appendItem(s_none, s_none);
|
||||||
|
|
||||||
String sql = MRole.getDefault().addAccessSQL("SELECT Name FROM AD_ImpFormat", "AD_ImpFormat",
|
String sql = MRole.getDefault().addAccessSQL("SELECT Name,AD_Impformat_ID FROM AD_ImpFormat WHERE isactive='Y'", "AD_ImpFormat",
|
||||||
MRole.SQL_FULLYQUALIFIED, MRole.SQL_RO);
|
MRole.SQL_FULLYQUALIFIED, MRole.SQL_RO);
|
||||||
PreparedStatement pstmt = null;
|
PreparedStatement pstmt = null;
|
||||||
ResultSet rs = null;
|
ResultSet rs = null;
|
||||||
|
@ -243,7 +243,7 @@ public class WFileImport extends ADForm implements EventListener<Event>
|
||||||
rs = pstmt.executeQuery();
|
rs = pstmt.executeQuery();
|
||||||
|
|
||||||
while (rs.next())
|
while (rs.next())
|
||||||
pickFormat.appendItem(rs.getString(1), rs.getString(1));
|
pickFormat.appendItem(rs.getString(1), rs.getInt(2));
|
||||||
}
|
}
|
||||||
catch (SQLException e)
|
catch (SQLException e)
|
||||||
{
|
{
|
||||||
|
@ -451,12 +451,13 @@ public class WFileImport extends ADForm implements EventListener<Event>
|
||||||
|
|
||||||
ListItem listitem = pickFormat.getSelectedItem();
|
ListItem listitem = pickFormat.getSelectedItem();
|
||||||
|
|
||||||
String formatName = (String)listitem.getValue();
|
String formatName = (String)listitem.getLabel();
|
||||||
|
|
||||||
if (formatName.equals(s_none))
|
if (formatName.equals(s_none))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
m_format = ImpFormat.load (formatName);
|
int formatId = (Integer)listitem.getValue();
|
||||||
|
m_format = ImpFormat.load (formatId);
|
||||||
|
|
||||||
if (m_format == null)
|
if (m_format == null)
|
||||||
{
|
{
|
||||||
|
|
|
@ -27,11 +27,8 @@ import org.adempiere.webui.LayoutUtils;
|
||||||
import org.adempiere.webui.apps.AEnv;
|
import org.adempiere.webui.apps.AEnv;
|
||||||
import org.adempiere.webui.component.Button;
|
import org.adempiere.webui.component.Button;
|
||||||
import org.adempiere.webui.component.Checkbox;
|
import org.adempiere.webui.component.Checkbox;
|
||||||
import org.adempiere.webui.component.Grid;
|
|
||||||
import org.adempiere.webui.component.Label;
|
import org.adempiere.webui.component.Label;
|
||||||
import org.adempiere.webui.component.Panel;
|
import org.adempiere.webui.component.Panel;
|
||||||
import org.adempiere.webui.component.Row;
|
|
||||||
import org.adempiere.webui.component.Rows;
|
|
||||||
import org.adempiere.webui.component.Textbox;
|
import org.adempiere.webui.component.Textbox;
|
||||||
import org.adempiere.webui.component.Window;
|
import org.adempiere.webui.component.Window;
|
||||||
import org.adempiere.webui.editor.WSearchEditor;
|
import org.adempiere.webui.editor.WSearchEditor;
|
||||||
|
@ -54,11 +51,13 @@ import org.zkoss.zk.ui.event.Event;
|
||||||
import org.zkoss.zk.ui.event.EventListener;
|
import org.zkoss.zk.ui.event.EventListener;
|
||||||
import org.zkoss.zk.ui.event.Events;
|
import org.zkoss.zk.ui.event.Events;
|
||||||
import org.zkoss.zul.Borderlayout;
|
import org.zkoss.zul.Borderlayout;
|
||||||
|
import org.zkoss.zul.Center;
|
||||||
import org.zkoss.zul.Div;
|
import org.zkoss.zul.Div;
|
||||||
import org.zkoss.zul.East;
|
import org.zkoss.zul.East;
|
||||||
import org.zkoss.zul.Iframe;
|
import org.zkoss.zul.Iframe;
|
||||||
import org.zkoss.zul.North;
|
import org.zkoss.zul.North;
|
||||||
import org.zkoss.zul.Progressmeter;
|
import org.zkoss.zul.Progressmeter;
|
||||||
|
import org.zkoss.zul.Separator;
|
||||||
import org.zkoss.zul.Space;
|
import org.zkoss.zul.Space;
|
||||||
import org.zkoss.zul.Tree;
|
import org.zkoss.zul.Tree;
|
||||||
import org.zkoss.zul.Treecell;
|
import org.zkoss.zul.Treecell;
|
||||||
|
@ -66,8 +65,6 @@ import org.zkoss.zul.Treechildren;
|
||||||
import org.zkoss.zul.Treeitem;
|
import org.zkoss.zul.Treeitem;
|
||||||
import org.zkoss.zul.Treerow;
|
import org.zkoss.zul.Treerow;
|
||||||
import org.zkoss.zul.Vbox;
|
import org.zkoss.zul.Vbox;
|
||||||
import org.zkoss.zul.West;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* View for Setup Wizard
|
* View for Setup Wizard
|
||||||
*
|
*
|
||||||
|
@ -86,6 +83,7 @@ public class WSetupWizard extends SetupWizard implements IFormController, EventL
|
||||||
private Tree wfnodeTree;
|
private Tree wfnodeTree;
|
||||||
private Treeitem prevti = null;
|
private Treeitem prevti = null;
|
||||||
|
|
||||||
|
private Label pretitleLabel = new Label(Msg.getMsg(Env.getCtx(), "SetupTask"));
|
||||||
private Label titleLabel = new Label();
|
private Label titleLabel = new Label();
|
||||||
private Iframe helpFrame = new Iframe();
|
private Iframe helpFrame = new Iframe();
|
||||||
private Label notesLabel = new Label(Msg.getElement(Env.getCtx(), MWizardProcess.COLUMNNAME_Note));
|
private Label notesLabel = new Label(Msg.getElement(Env.getCtx(), MWizardProcess.COLUMNNAME_Note));
|
||||||
|
@ -97,6 +95,7 @@ public class WSetupWizard extends SetupWizard implements IFormController, EventL
|
||||||
private Label statusLabel = new Label();
|
private Label statusLabel = new Label();
|
||||||
private WTableDirEditor statusField;
|
private WTableDirEditor statusField;
|
||||||
|
|
||||||
|
private Label bZoomLabel = new Label(Msg.getMsg(Env.getCtx(), "ZoomLabel"));
|
||||||
private Button bRefresh = new Button();
|
private Button bRefresh = new Button();
|
||||||
private Button bOK = new Button();
|
private Button bOK = new Button();
|
||||||
private Button bNext = new Button();
|
private Button bNext = new Button();
|
||||||
|
@ -111,8 +110,9 @@ public class WSetupWizard extends SetupWizard implements IFormController, EventL
|
||||||
private static final String WIZARD_LABEL_STYLE = "font-weight: bold";
|
private static final String WIZARD_LABEL_STYLE = "font-weight: bold";
|
||||||
|
|
||||||
private boolean expandTree = false;
|
private boolean expandTree = false;
|
||||||
private Vbox east = new Vbox();
|
private boolean allFinished = true;
|
||||||
private Vbox eastdown = new Vbox();
|
private Vbox centerBox = new Vbox();
|
||||||
|
private Vbox centerBoxdown = new Vbox();
|
||||||
private Vbox westdown = new Vbox();
|
private Vbox westdown = new Vbox();
|
||||||
private ArrayList<Integer> openNodes = new ArrayList<Integer>();
|
private ArrayList<Integer> openNodes = new ArrayList<Integer>();
|
||||||
|
|
||||||
|
@ -163,6 +163,7 @@ public class WSetupWizard extends SetupWizard implements IFormController, EventL
|
||||||
|
|
||||||
protected void addWfEntry(MWorkflow wfwizard) {
|
protected void addWfEntry(MWorkflow wfwizard) {
|
||||||
/* TODO: Color of workflow according to wizard status */
|
/* TODO: Color of workflow according to wizard status */
|
||||||
|
allFinished = true;
|
||||||
Treechildren treeChildren = wfnodeTree.getTreechildren();
|
Treechildren treeChildren = wfnodeTree.getTreechildren();
|
||||||
Treeitem treeitemwf = new Treeitem();
|
Treeitem treeitemwf = new Treeitem();
|
||||||
treeChildren.appendChild(treeitemwf);
|
treeChildren.appendChild(treeitemwf);
|
||||||
|
@ -185,6 +186,10 @@ public class WSetupWizard extends SetupWizard implements IFormController, EventL
|
||||||
treeitemwf.setOpen(true);
|
treeitemwf.setOpen(true);
|
||||||
addNodes(wfwizard, treeitemwf);
|
addNodes(wfwizard, treeitemwf);
|
||||||
|
|
||||||
|
if(allFinished && showColors.isChecked()){
|
||||||
|
wizardLabel.setZclass("tree-wsetupwizard-finished-all");
|
||||||
|
}
|
||||||
|
|
||||||
treeitemwf.setAttribute("AD_Workflow_ID", wfwizard.getAD_Workflow_ID());
|
treeitemwf.setAttribute("AD_Workflow_ID", wfwizard.getAD_Workflow_ID());
|
||||||
if (prevti != null && prevti.getAttribute("AD_Workflow_ID") != null) {
|
if (prevti != null && prevti.getAttribute("AD_Workflow_ID") != null) {
|
||||||
if (prevti.getAttribute("AD_Workflow_ID").equals(treeitemwf.getAttribute("AD_Workflow_ID")))
|
if (prevti.getAttribute("AD_Workflow_ID").equals(treeitemwf.getAttribute("AD_Workflow_ID")))
|
||||||
|
@ -206,12 +211,27 @@ public class WSetupWizard extends SetupWizard implements IFormController, EventL
|
||||||
if (node != null && showColors.isChecked()) {
|
if (node != null && showColors.isChecked()) {
|
||||||
MWizardProcess wp = MWizardProcess.get(Env.getCtx(), node.getAD_WF_Node_ID(), Env.getAD_Client_ID(Env.getCtx()));
|
MWizardProcess wp = MWizardProcess.get(Env.getCtx(), node.getAD_WF_Node_ID(), Env.getAD_Client_ID(Env.getCtx()));
|
||||||
String status = wp.getWizardStatus();
|
String status = wp.getWizardStatus();
|
||||||
if ( MWizardProcess.WIZARDSTATUS_Finished.equals(status)
|
if (MWizardProcess.WIZARDSTATUS_Finished.equals(status)){
|
||||||
|| MWizardProcess.WIZARDSTATUS_Skipped.equals(status)) {
|
nodeLabel.setZclass("tree-wsetupwizard-finished");
|
||||||
nodeLabel.setStyle("background-color: #90EE90;margin-left:20px;");
|
allFinished = allFinished && true;
|
||||||
} else {
|
}else if (MWizardProcess.WIZARDSTATUS_Skipped.equals(status)) {
|
||||||
nodeLabel.setStyle("background-color: #FFFF00;margin-left:20px;");
|
nodeLabel.setZclass("tree-wsetupwizard-skipped");
|
||||||
|
allFinished = allFinished && true;
|
||||||
|
}else if (MWizardProcess.WIZARDSTATUS_Delayed.equals(status)) {
|
||||||
|
nodeLabel.setZclass("tree-wsetupwizard-delayed");
|
||||||
|
allFinished = allFinished && false;
|
||||||
|
}else if (MWizardProcess.WIZARDSTATUS_In_Progress.equals(status)) {
|
||||||
|
nodeLabel.setZclass("tree-wsetupwizard-in-progress");
|
||||||
|
allFinished = allFinished && false;
|
||||||
|
}else if (MWizardProcess.WIZARDSTATUS_Pending.equals(status)) {
|
||||||
|
nodeLabel.setZclass("tree-wsetupwizard-pending");
|
||||||
|
allFinished = allFinished && false;
|
||||||
|
}else {
|
||||||
|
nodeLabel.setZclass("tree-setupwizard-nostatus");
|
||||||
|
allFinished = false;
|
||||||
}
|
}
|
||||||
|
}else{
|
||||||
|
nodeLabel.setStyle("margin-left:20px;");
|
||||||
}
|
}
|
||||||
|
|
||||||
Div div = new Div();
|
Div div = new Div();
|
||||||
|
@ -245,6 +265,7 @@ public class WSetupWizard extends SetupWizard implements IFormController, EventL
|
||||||
* Static init
|
* Static init
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
private void jbInit () throws Exception
|
private void jbInit () throws Exception
|
||||||
{
|
{
|
||||||
form.setWidth("99%");
|
form.setWidth("99%");
|
||||||
|
@ -279,12 +300,10 @@ public class WSetupWizard extends SetupWizard implements IFormController, EventL
|
||||||
justmine.setTooltiptext(Msg.getMsg(Env.getCtx(), "JustMine"));
|
justmine.setTooltiptext(Msg.getMsg(Env.getCtx(), "JustMine"));
|
||||||
justmine.addEventListener(Events.ON_CHECK,this);
|
justmine.addEventListener(Events.ON_CHECK,this);
|
||||||
|
|
||||||
|
|
||||||
showColors.setLabel("Show Colors");
|
showColors.setLabel("Show Colors");
|
||||||
showColors.setTooltiptext(Msg.getMsg(Env.getCtx(), "ShowColors"));
|
showColors.setTooltiptext(Msg.getMsg(Env.getCtx(), "ShowColors"));
|
||||||
showColors.addEventListener(Events.ON_CHECK,this);
|
showColors.addEventListener(Events.ON_CHECK,this);
|
||||||
|
|
||||||
|
|
||||||
North north = new North();
|
North north = new North();
|
||||||
mainLayout.appendChild(north);
|
mainLayout.appendChild(north);
|
||||||
north.appendChild(northPanel);
|
north.appendChild(northPanel);
|
||||||
|
@ -292,6 +311,7 @@ public class WSetupWizard extends SetupWizard implements IFormController, EventL
|
||||||
//
|
//
|
||||||
northPanel.appendChild(progressbar);
|
northPanel.appendChild(progressbar);
|
||||||
progressbar.setWidth("100%");
|
progressbar.setWidth("100%");
|
||||||
|
progressbar.setZclass("progressmeter-setupwizard");
|
||||||
northPanel.appendChild(progressLabel);
|
northPanel.appendChild(progressLabel);
|
||||||
progressLabel.setWidth("100%");
|
progressLabel.setWidth("100%");
|
||||||
progressLabel.setStyle("margin:0; padding:0; position: absolute; align: center; valign: center; border:0; text-align: center; ");
|
progressLabel.setStyle("margin:0; padding:0; position: absolute; align: center; valign: center; border:0; text-align: center; ");
|
||||||
|
@ -304,62 +324,53 @@ public class WSetupWizard extends SetupWizard implements IFormController, EventL
|
||||||
statusField = new WTableDirEditor("WizardStatus", true, false, true,wizardL);
|
statusField = new WTableDirEditor("WizardStatus", true, false, true,wizardL);
|
||||||
statusField.setValue(MWizardProcess.WIZARDSTATUS_Pending);
|
statusField.setValue(MWizardProcess.WIZARDSTATUS_Pending);
|
||||||
|
|
||||||
east.setVflex("1");
|
centerBox.setVflex("1");
|
||||||
east.setHflex("1");
|
centerBox.setHflex("1");
|
||||||
West west = new West();
|
Center center = new Center();
|
||||||
mainLayout.appendChild(west);
|
mainLayout.appendChild(center);
|
||||||
west.appendChild(east);
|
center.appendChild(centerBox);
|
||||||
east.appendChild(wfnodeTree);
|
centerBox.appendChild(wfnodeTree);
|
||||||
|
centerBox.setWidth("100%");
|
||||||
wfnodeTree.setVflex("1");
|
wfnodeTree.setVflex("1");
|
||||||
wfnodeTree.setHflex("1");
|
centerBox.appendChild(centerBoxdown);
|
||||||
east.appendChild(eastdown);
|
centerBoxdown.setOrient("horizontal");
|
||||||
eastdown.setOrient("horizontal");
|
centerBoxdown.appendChild(bExpand);
|
||||||
eastdown.appendChild(bExpand);
|
centerBoxdown.appendChild(justmine);
|
||||||
eastdown.appendChild(justmine);
|
centerBoxdown.appendChild(showColors);
|
||||||
eastdown.appendChild(showColors);
|
center.setAutoscroll(true);
|
||||||
west.setAutoscroll(true);
|
|
||||||
west.setWidth("30%");
|
|
||||||
|
|
||||||
Grid gridView = new Grid();
|
Div div = new Div();
|
||||||
gridView.setStyle("margin:0; padding:0;");
|
div.setHeight("88%");
|
||||||
gridView.makeNoStrip();
|
div.setHflex("1");
|
||||||
gridView.setOddRowSclass("even");
|
|
||||||
|
|
||||||
Rows rows = new Rows();
|
div.setStyle("text-align:center ");
|
||||||
gridView.appendChild(rows);
|
pretitleLabel.setStyle("font-weight: bold; font-size: 14px");
|
||||||
|
div.appendChild(titleLabel);
|
||||||
Row row = new Row();
|
|
||||||
rows.appendChild(row);
|
|
||||||
row.setAlign("center");
|
|
||||||
row.appendChild(titleLabel);
|
|
||||||
titleLabel.setStyle("font-weight: bold; font-size: 14px");
|
titleLabel.setStyle("font-weight: bold; font-size: 14px");
|
||||||
|
titleLabel.setLeft("50%");
|
||||||
|
|
||||||
row = new Row();
|
div.appendChild(helpFrame);
|
||||||
rows.appendChild(row);
|
|
||||||
row.appendChild(helpFrame);
|
|
||||||
helpFrame.setWidth("99%");
|
helpFrame.setWidth("99%");
|
||||||
helpFrame.setHeight("90%");
|
helpFrame.setHeight("90%");
|
||||||
helpFrame.setStyle("min-height:300px; border: 1px solid lightgray; margin:auto");
|
helpFrame.setStyle("border: 1px solid lightgray; margin:auto");
|
||||||
|
|
||||||
row = new Row();
|
Div divNote = new Div();
|
||||||
rows.appendChild(row);
|
divNote.setStyle("text-align:left");
|
||||||
row.appendChild(notesLabel);
|
Separator separator = new Separator();
|
||||||
notesLabel.setWidth("100%");
|
divNote.appendChild(separator);
|
||||||
|
divNote.appendChild(notesLabel);
|
||||||
|
|
||||||
row = new Row();
|
divNote.appendChild(notesField);
|
||||||
rows.appendChild(row);
|
|
||||||
row.appendChild(notesField);
|
|
||||||
notesField.setRows(4);
|
notesField.setRows(4);
|
||||||
notesField.setWidth("100%");
|
notesField.setWidth("99%");
|
||||||
|
|
||||||
MLookup lookup = MLookupFactory.get(Env.getCtx(), form.getWindowNo(),
|
MLookup lookup = MLookupFactory.get(Env.getCtx(), form.getWindowNo(),
|
||||||
0, 200913, DisplayType.Search);
|
0, 200913, DisplayType.Search);
|
||||||
userField = new WSearchEditor(lookup, Msg.translate(
|
userField = new WSearchEditor(lookup, Msg.translate(
|
||||||
Env.getCtx(), "AD_User_ID"), "", false, false, true);
|
Env.getCtx(), "AD_User_ID"), "", false, false, true);
|
||||||
|
|
||||||
row = new Row();
|
|
||||||
rows.appendChild(row);
|
|
||||||
westdown.setOrient("horizontal");
|
westdown.setOrient("horizontal");
|
||||||
|
westdown.appendChild(bZoomLabel);
|
||||||
westdown.appendChild(bZoom);
|
westdown.appendChild(bZoom);
|
||||||
westdown.appendChild(userLabel);
|
westdown.appendChild(userLabel);
|
||||||
westdown.appendChild(userField.getComponent());
|
westdown.appendChild(userField.getComponent());
|
||||||
|
@ -370,17 +381,26 @@ public class WSetupWizard extends SetupWizard implements IFormController, EventL
|
||||||
westdown.appendChild(bRefresh);
|
westdown.appendChild(bRefresh);
|
||||||
westdown.appendChild(bOK);
|
westdown.appendChild(bOK);
|
||||||
westdown.appendChild(bNext);
|
westdown.appendChild(bNext);
|
||||||
row.appendChild(westdown);
|
Div divButton = new Div();
|
||||||
row.setAlign("right");
|
divButton.setAlign("right");
|
||||||
|
divButton.appendChild(westdown);
|
||||||
|
|
||||||
East east = new East();
|
East east = new East();
|
||||||
mainLayout.appendChild(east);
|
mainLayout.appendChild(east);
|
||||||
east.appendChild(gridView);
|
div.appendChild(divNote);
|
||||||
east.setCollapsible(false);
|
div.appendChild(divButton);
|
||||||
|
east.appendChild(div);
|
||||||
|
east.setCollapsible(true);
|
||||||
east.setSplittable(true);
|
east.setSplittable(true);
|
||||||
east.setWidth("70%");
|
east.setWidth("70%");
|
||||||
|
east.setAutoscroll(true);
|
||||||
|
|
||||||
setNotesPanelVisible(false);
|
setNotesPanelVisible(false);
|
||||||
|
|
||||||
|
MWorkflow wf = MWorkflow.get(Env.getCtx(), getWfWizards().get(0).get_ID());
|
||||||
|
showInRightPanel(wf.getAD_Workflow_ID(), 0);
|
||||||
|
|
||||||
|
|
||||||
} // jbInit
|
} // jbInit
|
||||||
|
|
||||||
private void refreshProgress() {
|
private void refreshProgress() {
|
||||||
|
@ -396,7 +416,6 @@ public class WSetupWizard extends SetupWizard implements IFormController, EventL
|
||||||
progressLabel.setText(msg);
|
progressLabel.setText(msg);
|
||||||
progressbar.setValue(percent);
|
progressbar.setValue(percent);
|
||||||
progressbar.setTooltiptext(msg);
|
progressbar.setTooltiptext(msg);
|
||||||
progressbar.setStyle("background: #BBC2DB;");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -419,6 +438,7 @@ public class WSetupWizard extends SetupWizard implements IFormController, EventL
|
||||||
showInRightPanel(0, m_node.getAD_WF_Node_ID());
|
showInRightPanel(0, m_node.getAD_WF_Node_ID());
|
||||||
} else if (e.getTarget() == bOK) {
|
} else if (e.getTarget() == bOK) {
|
||||||
int userid = 0;
|
int userid = 0;
|
||||||
|
allFinished=true;
|
||||||
if (!userField.isNullOrEmpty())
|
if (!userField.isNullOrEmpty())
|
||||||
userid = (Integer)userField.getValue();
|
userid = (Integer)userField.getValue();
|
||||||
if (save(notesField.getText(), (String) statusField.getValue(), userid))
|
if (save(notesField.getText(), (String) statusField.getValue(), userid))
|
||||||
|
@ -438,14 +458,8 @@ public class WSetupWizard extends SetupWizard implements IFormController, EventL
|
||||||
} // actionPerformed
|
} // actionPerformed
|
||||||
|
|
||||||
private void showColors() {
|
private void showColors() {
|
||||||
if (!showColors.isChecked()) {
|
if (showColors.isChecked())
|
||||||
for (Treeitem nextItem : nextItems){
|
allFinished = true;
|
||||||
Treeitem ti= nextItem;
|
|
||||||
if (ti.getLevel() != 0) {
|
|
||||||
ti.setStyle("background-color: #FFFFFF;");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
repaintTree();
|
repaintTree();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -496,10 +510,6 @@ public class WSetupWizard extends SetupWizard implements IFormController, EventL
|
||||||
}
|
}
|
||||||
|
|
||||||
private void repaintTree() {
|
private void repaintTree() {
|
||||||
east.removeChild(wfnodeTree);
|
|
||||||
east.removeChild(eastdown);
|
|
||||||
east.setVflex("1");
|
|
||||||
east.setHflex("1");
|
|
||||||
openNodes.removeAll(openNodes);
|
openNodes.removeAll(openNodes);
|
||||||
for (Treeitem nextItem : nextItems) {
|
for (Treeitem nextItem : nextItems) {
|
||||||
if (nextItem.isOpen() && nextItem.getAttribute("AD_Workflow_ID") != null) {
|
if (nextItem.isOpen() && nextItem.getAttribute("AD_Workflow_ID") != null) {
|
||||||
|
@ -509,8 +519,6 @@ public class WSetupWizard extends SetupWizard implements IFormController, EventL
|
||||||
prevti = wfnodeTree.getSelectedItem();
|
prevti = wfnodeTree.getSelectedItem();
|
||||||
wfnodeTree.clear();
|
wfnodeTree.clear();
|
||||||
loadWizardNodes();
|
loadWizardNodes();
|
||||||
east.appendChild(wfnodeTree);
|
|
||||||
east.appendChild(eastdown);
|
|
||||||
refreshProgress();
|
refreshProgress();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -580,7 +588,7 @@ public class WSetupWizard extends SetupWizard implements IFormController, EventL
|
||||||
setNotesPanelVisible(false);
|
setNotesPanelVisible(false);
|
||||||
m_node = null;
|
m_node = null;
|
||||||
}
|
}
|
||||||
titleLabel.setText(title);
|
titleLabel.setText(pretitleLabel.getValue() + title);
|
||||||
if (help != null) {
|
if (help != null) {
|
||||||
AMedia media = new AMedia("Help", "html", "text/html", help.getBytes());
|
AMedia media = new AMedia("Help", "html", "text/html", help.getBytes());
|
||||||
helpFrame.setContent(media);
|
helpFrame.setContent(media);
|
||||||
|
@ -600,6 +608,7 @@ public class WSetupWizard extends SetupWizard implements IFormController, EventL
|
||||||
statusField.setVisible(visible);
|
statusField.setVisible(visible);
|
||||||
userLabel.setVisible(visible);
|
userLabel.setVisible(visible);
|
||||||
userField.setVisible(visible);
|
userField.setVisible(visible);
|
||||||
|
bZoomLabel.setVisible(visible);
|
||||||
bZoom.setVisible(visible);
|
bZoom.setVisible(visible);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1220,6 +1220,57 @@ tbody.z-grid-empty-body td {
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
<%-- Tree nodes configurable on Setup Wizard --%>
|
||||||
|
.tree-wsetupwizard-finished {
|
||||||
|
background-color: #90EE90;
|
||||||
|
margin-left:20px
|
||||||
|
}
|
||||||
|
|
||||||
|
.tree-wsetupwizard-skipped {
|
||||||
|
background-color: #00FF00;
|
||||||
|
margin-left:20px
|
||||||
|
}
|
||||||
|
|
||||||
|
.tree-wsetupwizard-delayed {
|
||||||
|
background-color: #0080FF;
|
||||||
|
margin-left:20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tree-wsetupwizard-in-progress {
|
||||||
|
background-color: #FFFF33;
|
||||||
|
margin-left:20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tree-wsetupwizard-pending {
|
||||||
|
background-color: #FFFF00;
|
||||||
|
margin-left:20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tree-setupwizard-nostatus{
|
||||||
|
margin-left:20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tree-wsetupwizard-finished-all {
|
||||||
|
background-color: #90EE90;
|
||||||
|
}
|
||||||
|
|
||||||
|
.progressmeter-setupwizard {
|
||||||
|
background: #FFFF00 repeat-x 0 0 ;
|
||||||
|
background-image: none;
|
||||||
|
border: 1px solid #CFCFCF;
|
||||||
|
text-align: left;
|
||||||
|
height: 20px;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
.progressmeter-setupwizard-img {
|
||||||
|
display: inline-block;
|
||||||
|
background: #90EE90;
|
||||||
|
background-image: none;
|
||||||
|
height: 20px;
|
||||||
|
line-height: 0;
|
||||||
|
font-size: 0;
|
||||||
|
}
|
||||||
|
.
|
||||||
.menu-search-toggle-box {
|
.menu-search-toggle-box {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
border: 1px solid #ababab;
|
border: 1px solid #ababab;
|
||||||
|
|
Loading…
Reference in New Issue