hg merge release-5.1 (merge release5.1 into default)
This commit is contained in:
commit
6d2700ac72
|
@ -0,0 +1,18 @@
|
||||||
|
SET SQLBLANKLINES ON
|
||||||
|
SET DEFINE OFF
|
||||||
|
|
||||||
|
-- IDEMPIERE-1052
|
||||||
|
-- Nov 23, 2017 3:40:33 PM CET
|
||||||
|
UPDATE AD_Column SET AD_Reference_ID=30, IsUpdateable='N',Updated=TO_DATE('2017-11-23 15:40:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=1638
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Nov 23, 2017 3:40:49 PM CET
|
||||||
|
UPDATE AD_Column SET AD_Reference_ID=30, IsUpdateable='N',Updated=TO_DATE('2017-11-23 15:40:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=1667
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Nov 23, 2017 3:41:06 PM CET
|
||||||
|
UPDATE AD_Column SET AD_Reference_ID=30, IsUpdateable='N',Updated=TO_DATE('2017-11-23 15:41:06','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=4934
|
||||||
|
;
|
||||||
|
|
||||||
|
SELECT register_migration_script('201711211700_IDEMPIERE-1052.sql') FROM dual
|
||||||
|
;
|
|
@ -0,0 +1,15 @@
|
||||||
|
-- IDEMPIERE-1052
|
||||||
|
-- Nov 23, 2017 3:40:33 PM CET
|
||||||
|
UPDATE AD_Column SET AD_Reference_ID=30, IsUpdateable='N',Updated=TO_TIMESTAMP('2017-11-23 15:40:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=1638
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Nov 23, 2017 3:40:49 PM CET
|
||||||
|
UPDATE AD_Column SET AD_Reference_ID=30, IsUpdateable='N',Updated=TO_TIMESTAMP('2017-11-23 15:40:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=1667
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Nov 23, 2017 3:41:06 PM CET
|
||||||
|
UPDATE AD_Column SET AD_Reference_ID=30, IsUpdateable='N',Updated=TO_TIMESTAMP('2017-11-23 15:41:06','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=4934
|
||||||
|
;
|
||||||
|
|
||||||
|
SELECT register_migration_script('201711211700_IDEMPIERE-1052.sql') FROM dual
|
||||||
|
;
|
|
@ -20,6 +20,7 @@ import java.math.BigDecimal;
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
|
|
||||||
|
import org.compiere.process.DocAction;
|
||||||
import org.compiere.util.DB;
|
import org.compiere.util.DB;
|
||||||
import org.compiere.util.Env;
|
import org.compiere.util.Env;
|
||||||
import org.compiere.util.Msg;
|
import org.compiere.util.Msg;
|
||||||
|
@ -329,7 +330,7 @@ public class MInventoryLine extends X_M_InventoryLine
|
||||||
log.saveError("Quantity", Msg.getElement(getCtx(), COLUMNNAME_QtyCount));
|
log.saveError("Quantity", Msg.getElement(getCtx(), COLUMNNAME_QtyCount));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (getQtyInternalUse().signum() == 0) {
|
if (getQtyInternalUse().signum() == 0 && !getParent().getDocAction().equals(DocAction.ACTION_Void)) {
|
||||||
log.saveError("FillMandatory", Msg.getElement(getCtx(), COLUMNNAME_QtyInternalUse));
|
log.saveError("FillMandatory", Msg.getElement(getCtx(), COLUMNNAME_QtyInternalUse));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1025,6 +1025,7 @@ public final class MSetup
|
||||||
no = DB.executeUpdateEx(sqlCmd.toString(), m_trx.getTrxName());
|
no = DB.executeUpdateEx(sqlCmd.toString(), m_trx.getTrxName());
|
||||||
if (no != 1)
|
if (no != 1)
|
||||||
log.log(Level.SEVERE, "Channel NOT inserted");
|
log.log(Level.SEVERE, "Channel NOT inserted");
|
||||||
|
|
||||||
int C_Campaign_ID = getNextID(getAD_Client_ID(), "C_Campaign");
|
int C_Campaign_ID = getNextID(getAD_Client_ID(), "C_Campaign");
|
||||||
sqlCmd = new StringBuffer("INSERT INTO C_Campaign ");
|
sqlCmd = new StringBuffer("INSERT INTO C_Campaign ");
|
||||||
sqlCmd.append("(C_Campaign_ID,C_Channel_ID,").append(m_stdColumns).append(",");
|
sqlCmd.append("(C_Campaign_ID,C_Channel_ID,").append(m_stdColumns).append(",");
|
||||||
|
@ -1047,6 +1048,14 @@ public final class MSetup
|
||||||
if (no != 1)
|
if (no != 1)
|
||||||
log.log(Level.SEVERE, "AcctSchema Element Campaign NOT updated");
|
log.log(Level.SEVERE, "AcctSchema Element Campaign NOT updated");
|
||||||
}
|
}
|
||||||
|
// Campaign Translation
|
||||||
|
sqlCmd = new StringBuffer ("INSERT INTO C_Campaign_Trl (AD_Language,C_Campaign_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,C_Campaign_Trl_UU)");
|
||||||
|
sqlCmd.append(" SELECT l.AD_Language,t.C_Campaign_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy, generate_uuid() FROM AD_Language l, C_Campaign t");
|
||||||
|
sqlCmd.append(" WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.C_Campaign_ID=").append(C_Campaign_ID);
|
||||||
|
sqlCmd.append(" AND NOT EXISTS (SELECT * FROM C_Campaign_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.C_Campaign_ID=t.C_Campaign_ID)");
|
||||||
|
no = DB.executeUpdateEx(sqlCmd.toString(), m_trx.getTrxName());
|
||||||
|
if (no < 0)
|
||||||
|
log.log(Level.SEVERE, "Campaign Translation NOT inserted");
|
||||||
|
|
||||||
// Create Sales Region
|
// Create Sales Region
|
||||||
int C_SalesRegion_ID = getNextID(getAD_Client_ID(), "C_SalesRegion");
|
int C_SalesRegion_ID = getNextID(getAD_Client_ID(), "C_SalesRegion");
|
||||||
|
@ -1071,6 +1080,14 @@ public final class MSetup
|
||||||
if (no != 1)
|
if (no != 1)
|
||||||
log.log(Level.SEVERE, "AcctSchema Element SalesRegion NOT updated");
|
log.log(Level.SEVERE, "AcctSchema Element SalesRegion NOT updated");
|
||||||
}
|
}
|
||||||
|
// Sales Region Translation
|
||||||
|
sqlCmd = new StringBuffer ("INSERT INTO C_SalesRegion_Trl (AD_Language,C_SalesRegion_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,C_SalesRegion_Trl_UU)");
|
||||||
|
sqlCmd.append(" SELECT l.AD_Language,t.C_SalesRegion_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy, generate_uuid() FROM AD_Language l, C_SalesRegion t");
|
||||||
|
sqlCmd.append(" WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.C_SalesRegion_ID=").append(C_SalesRegion_ID);
|
||||||
|
sqlCmd.append(" AND NOT EXISTS (SELECT * FROM C_SalesRegion_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.C_SalesRegion_ID=t.C_SalesRegion_ID)");
|
||||||
|
no = DB.executeUpdateEx(sqlCmd.toString(), m_trx.getTrxName());
|
||||||
|
if (no < 0)
|
||||||
|
log.log(Level.SEVERE, "Sales Region Translation NOT inserted");
|
||||||
|
|
||||||
// Create Activity
|
// Create Activity
|
||||||
int C_Activity_ID = getNextID(getAD_Client_ID(), "C_Activity");
|
int C_Activity_ID = getNextID(getAD_Client_ID(), "C_Activity");
|
||||||
|
@ -1095,6 +1112,14 @@ public final class MSetup
|
||||||
if (no != 1)
|
if (no != 1)
|
||||||
log.log(Level.SEVERE, "AcctSchema Element Activity NOT updated");
|
log.log(Level.SEVERE, "AcctSchema Element Activity NOT updated");
|
||||||
}
|
}
|
||||||
|
// Activity Translation
|
||||||
|
sqlCmd = new StringBuffer ("INSERT INTO C_Activity_Trl (AD_Language,C_Activity_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,C_Activity_Trl_UU)");
|
||||||
|
sqlCmd.append(" SELECT l.AD_Language,t.C_Activity_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy, generate_uuid() FROM AD_Language l, C_Activity t");
|
||||||
|
sqlCmd.append(" WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.C_Activity_ID=").append(C_Activity_ID);
|
||||||
|
sqlCmd.append(" AND NOT EXISTS (SELECT * FROM C_Activity_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.C_Activity_ID=t.C_Activity_ID)");
|
||||||
|
no = DB.executeUpdateEx(sqlCmd.toString(), m_trx.getTrxName());
|
||||||
|
if (no < 0)
|
||||||
|
log.log(Level.SEVERE, "Activity Translation NOT inserted");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Business Partner
|
* Business Partner
|
||||||
|
@ -1166,8 +1191,9 @@ public final class MSetup
|
||||||
if (no != 1)
|
if (no != 1)
|
||||||
log.log(Level.SEVERE, "TaxCategory NOT inserted");
|
log.log(Level.SEVERE, "TaxCategory NOT inserted");
|
||||||
|
|
||||||
sqlCmd = new StringBuffer ("INSERT INTO C_TaxCategory_Trl (AD_Language,C_TaxCategory_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy)");
|
// TaxCategory translation
|
||||||
sqlCmd.append(" SELECT l.AD_Language,t.C_TaxCategory_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, C_TaxCategory t");
|
sqlCmd = new StringBuffer ("INSERT INTO C_TaxCategory_Trl (AD_Language,C_TaxCategory_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,C_TaxCategory_Trl_UU)");
|
||||||
|
sqlCmd.append(" SELECT l.AD_Language,t.C_TaxCategory_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy, generate_uuid() FROM AD_Language l, C_TaxCategory t");
|
||||||
sqlCmd.append(" WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.C_TaxCategory_ID=").append(C_TaxCategory_ID);
|
sqlCmd.append(" WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.C_TaxCategory_ID=").append(C_TaxCategory_ID);
|
||||||
sqlCmd.append(" AND NOT EXISTS (SELECT * FROM C_TaxCategory_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.C_TaxCategory_ID=t.C_TaxCategory_ID)");
|
sqlCmd.append(" AND NOT EXISTS (SELECT * FROM C_TaxCategory_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.C_TaxCategory_ID=t.C_TaxCategory_ID)");
|
||||||
no = DB.executeUpdateEx(sqlCmd.toString(), m_trx.getTrxName());
|
no = DB.executeUpdateEx(sqlCmd.toString(), m_trx.getTrxName());
|
||||||
|
@ -1345,6 +1371,14 @@ public final class MSetup
|
||||||
no = DB.executeUpdateEx(sqlCmd.toString(), m_trx.getTrxName());
|
no = DB.executeUpdateEx(sqlCmd.toString(), m_trx.getTrxName());
|
||||||
if (no != 1)
|
if (no != 1)
|
||||||
log.log(Level.SEVERE, "PaymentTerm NOT inserted");
|
log.log(Level.SEVERE, "PaymentTerm NOT inserted");
|
||||||
|
// Payment Term Translation
|
||||||
|
sqlCmd = new StringBuffer ("INSERT INTO C_PaymentTerm_Trl (AD_Language,C_PaymentTerm_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,C_PaymentTerm_Trl_UU)");
|
||||||
|
sqlCmd.append(" SELECT l.AD_Language,t.C_PaymentTerm_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy, generate_uuid() FROM AD_Language l, C_PaymentTerm t");
|
||||||
|
sqlCmd.append(" WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.C_PaymentTerm_ID=").append(C_PaymentTerm_ID);
|
||||||
|
sqlCmd.append(" AND NOT EXISTS (SELECT * FROM C_PaymentTerm_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.C_PaymentTerm_ID=t.C_PaymentTerm_ID)");
|
||||||
|
no = DB.executeUpdateEx(sqlCmd.toString(), m_trx.getTrxName());
|
||||||
|
if (no < 0)
|
||||||
|
log.log(Level.SEVERE, "Payment Term Translation NOT inserted");
|
||||||
|
|
||||||
// Project Cycle
|
// Project Cycle
|
||||||
C_Cycle_ID = getNextID(getAD_Client_ID(), "C_Cycle");
|
C_Cycle_ID = getNextID(getAD_Client_ID(), "C_Cycle");
|
||||||
|
|
|
@ -1043,7 +1043,7 @@ public class MStorageOnHand extends X_M_StorageOnHand
|
||||||
if (M_Product_ID <= 0 || M_AttributeSetInstance_ID <= 0)
|
if (M_Product_ID <= 0 || M_AttributeSetInstance_ID <= 0)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
String sql = "SELECT dateMaterialPolicy FROM M_StorageOnHand WHERE M_Product_ID=? and M_AttributeSetInstance_ID=?";
|
String sql = "SELECT dateMaterialPolicy FROM M_StorageOnHand WHERE M_Product_ID=? and M_AttributeSetInstance_ID=? ORDER BY QtyOnHand DESC";
|
||||||
|
|
||||||
PreparedStatement pstmt = null;
|
PreparedStatement pstmt = null;
|
||||||
ResultSet rs = null;
|
ResultSet rs = null;
|
||||||
|
@ -1085,7 +1085,7 @@ public class MStorageOnHand extends X_M_StorageOnHand
|
||||||
if (M_Product_ID <= 0 || M_AttributeSetInstance_ID <= 0)
|
if (M_Product_ID <= 0 || M_AttributeSetInstance_ID <= 0)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
String sql = "SELECT dateMaterialPolicy FROM M_StorageOnHand WHERE M_Product_ID=? and M_AttributeSetInstance_ID=? AND M_Locator_ID=?";
|
String sql = "SELECT dateMaterialPolicy FROM M_StorageOnHand WHERE M_Product_ID=? and M_AttributeSetInstance_ID=? AND M_Locator_ID=? ORDER BY QtyOnHand DESC";
|
||||||
|
|
||||||
PreparedStatement pstmt = null;
|
PreparedStatement pstmt = null;
|
||||||
ResultSet rs = null;
|
ResultSet rs = null;
|
||||||
|
|
|
@ -125,6 +125,7 @@ public class SystemIDs
|
||||||
public final static int REFERENCE_PAYMENTRULE = 195;
|
public final static int REFERENCE_PAYMENTRULE = 195;
|
||||||
public final static int REFERENCE_POSTING_TYPE = 125;
|
public final static int REFERENCE_POSTING_TYPE = 125;
|
||||||
public final static int REFERENCE_POSTED = 234;
|
public final static int REFERENCE_POSTED = 234;
|
||||||
|
public final static int REFERENCE_SQLORDERBY = 53296;
|
||||||
public final static int REFERENCE_YESNO = 319;
|
public final static int REFERENCE_YESNO = 319;
|
||||||
public final static int REFERENCE_WIZARDSTATUS = 200003;
|
public final static int REFERENCE_WIZARDSTATUS = 200003;
|
||||||
public final static int REFERENCE_WFINSTANCE_STATE = 305;
|
public final static int REFERENCE_WFINSTANCE_STATE = 305;
|
||||||
|
|
|
@ -38,6 +38,7 @@
|
||||||
|
|
||||||
<configurations>
|
<configurations>
|
||||||
<plugin id="org.adempiere.eclipse.equinox.http.servlet" autoStart="true" startLevel="0" />
|
<plugin id="org.adempiere.eclipse.equinox.http.servlet" autoStart="true" startLevel="0" />
|
||||||
|
<plugin id="org.adempiere.pipo" autoStart="true" startLevel="0" />
|
||||||
<plugin id="org.adempiere.server" autoStart="true" startLevel="0" />
|
<plugin id="org.adempiere.server" autoStart="true" startLevel="0" />
|
||||||
<plugin id="org.adempiere.ui.zk" autoStart="true" startLevel="0" />
|
<plugin id="org.adempiere.ui.zk" autoStart="true" startLevel="0" />
|
||||||
<plugin id="org.apache.aries.spifly.dynamic.bundle" autoStart="true" startLevel="0" />
|
<plugin id="org.apache.aries.spifly.dynamic.bundle" autoStart="true" startLevel="0" />
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -580,7 +580,7 @@ public class CompositeADTabbox extends AbstractADTabbox
|
||||||
detailPane.setSelectedIndex(0);
|
detailPane.setSelectedIndex(0);
|
||||||
activateDetailIfVisible();
|
activateDetailIfVisible();
|
||||||
} else {
|
} else {
|
||||||
if (((ADTabpanel) headerTab).isDetailVisible()) {
|
if (((ADTabpanel) headerTab).isDetailVisible() && detailPane.getSelectedADTabpanel() != null) {
|
||||||
IADTabpanel selectDetailPanel = detailPane.getSelectedADTabpanel();
|
IADTabpanel selectDetailPanel = detailPane.getSelectedADTabpanel();
|
||||||
if (!selectDetailPanel.isVisible()) {
|
if (!selectDetailPanel.isVisible()) {
|
||||||
selectDetailPanel.setVisible(true);
|
selectDetailPanel.setVisible(true);
|
||||||
|
|
|
@ -87,7 +87,7 @@ public class ProcessModalDialog extends AbstractProcessDialog implements EventLi
|
||||||
if (mainParameterLayout != null)// when auto start it's null
|
if (mainParameterLayout != null)// when auto start it's null
|
||||||
{
|
{
|
||||||
mainParameterLayout.setStyle("max-height:" + ClientInfo.get().desktopHeight + "px");
|
mainParameterLayout.setStyle("max-height:" + ClientInfo.get().desktopHeight + "px");
|
||||||
ZKUpdateUtil.setVflex(mainParameterLayout, "min");
|
ZKUpdateUtil.setVflex(mainParameterLayout, "1");
|
||||||
}
|
}
|
||||||
if (topParameterLayout != null)
|
if (topParameterLayout != null)
|
||||||
{
|
{
|
||||||
|
|
|
@ -307,8 +307,8 @@ public class UserPanel implements EventListener<Event>, Composer<Component>
|
||||||
popup.detach();
|
popup.detach();
|
||||||
}
|
}
|
||||||
popup = new Popup();
|
popup = new Popup();
|
||||||
|
popup.setSclass("user-panel-popup");
|
||||||
Vlayout layout = new Vlayout();
|
Vlayout layout = new Vlayout();
|
||||||
layout.setStyle("padding: 8px 16px");
|
|
||||||
String email = getUserEmail();
|
String email = getUserEmail();
|
||||||
if (!Util.isEmpty(email))
|
if (!Util.isEmpty(email))
|
||||||
{
|
{
|
||||||
|
@ -330,6 +330,7 @@ public class UserPanel implements EventListener<Event>, Composer<Component>
|
||||||
popup.setPage(component.getPage());
|
popup.setPage(component.getPage());
|
||||||
popup.setVflex("min");
|
popup.setVflex("min");
|
||||||
popup.setHflex("min");
|
popup.setHflex("min");
|
||||||
|
popup.setStyle("max-width: " + ClientInfo.get().desktopWidth + "px");
|
||||||
popup.addEventListener(Events.ON_OPEN, (OpenEvent oe) -> {
|
popup.addEventListener(Events.ON_OPEN, (OpenEvent oe) -> {
|
||||||
if (!oe.isOpen())
|
if (!oe.isOpen())
|
||||||
popup.setAttribute(popup.getUuid(), System.currentTimeMillis());
|
popup.setAttribute(popup.getUuid(), System.currentTimeMillis());
|
||||||
|
|
|
@ -14,6 +14,8 @@
|
||||||
|
|
||||||
package org.adempiere.webui.panel;
|
package org.adempiere.webui.panel;
|
||||||
|
|
||||||
|
import static org.compiere.model.SystemIDs.REFERENCE_SQLORDERBY;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
@ -30,11 +32,13 @@ import org.adempiere.webui.component.Listbox;
|
||||||
import org.adempiere.webui.component.SimpleListModel;
|
import org.adempiere.webui.component.SimpleListModel;
|
||||||
import org.adempiere.webui.theme.ThemeManager;
|
import org.adempiere.webui.theme.ThemeManager;
|
||||||
import org.adempiere.webui.util.ZKUpdateUtil;
|
import org.adempiere.webui.util.ZKUpdateUtil;
|
||||||
|
import org.compiere.model.MRefList;
|
||||||
import org.compiere.print.MPrintFormatItem;
|
import org.compiere.print.MPrintFormatItem;
|
||||||
import org.compiere.util.Env;
|
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.compiere.util.NamePair;
|
import org.compiere.util.NamePair;
|
||||||
|
import org.compiere.util.Util;
|
||||||
import org.zkoss.zk.au.out.AuFocus;
|
import org.zkoss.zk.au.out.AuFocus;
|
||||||
import org.zkoss.zk.ui.event.DropEvent;
|
import org.zkoss.zk.ui.event.DropEvent;
|
||||||
import org.zkoss.zk.ui.event.Event;
|
import org.zkoss.zk.ui.event.Event;
|
||||||
|
@ -42,6 +46,8 @@ import org.zkoss.zk.ui.event.EventListener;
|
||||||
import org.zkoss.zk.ui.event.Events;
|
import org.zkoss.zk.ui.event.Events;
|
||||||
import org.zkoss.zk.ui.util.Clients;
|
import org.zkoss.zk.ui.util.Clients;
|
||||||
import org.zkoss.zul.Hlayout;
|
import org.zkoss.zul.Hlayout;
|
||||||
|
import org.zkoss.zul.Menuitem;
|
||||||
|
import org.zkoss.zul.Menupopup;
|
||||||
import org.zkoss.zul.Vbox;
|
import org.zkoss.zul.Vbox;
|
||||||
|
|
||||||
public class WRC3SortCriteriaPanel extends WRCTabPanel implements EventListener<Event>
|
public class WRC3SortCriteriaPanel extends WRCTabPanel implements EventListener<Event>
|
||||||
|
@ -49,8 +55,7 @@ public class WRC3SortCriteriaPanel extends WRCTabPanel implements EventListener
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private static final long serialVersionUID = -3178046711328450398L;
|
private static final long serialVersionUID = 6470498382547293013L;
|
||||||
|
|
||||||
// UI variables
|
// UI variables
|
||||||
private Label noLabel = new Label();
|
private Label noLabel = new Label();
|
||||||
private Label yesLabel = new Label();
|
private Label yesLabel = new Label();
|
||||||
|
@ -65,6 +70,7 @@ public class WRC3SortCriteriaPanel extends WRCTabPanel implements EventListener
|
||||||
Listbox yesList = new Listbox();
|
Listbox yesList = new Listbox();
|
||||||
ArrayList<MPrintFormatItem> yesItems =new ArrayList<MPrintFormatItem>();
|
ArrayList<MPrintFormatItem> yesItems =new ArrayList<MPrintFormatItem>();
|
||||||
ArrayList<MPrintFormatItem> noItems =new ArrayList<MPrintFormatItem>();
|
ArrayList<MPrintFormatItem> noItems =new ArrayList<MPrintFormatItem>();
|
||||||
|
private final String asc_desc = "asc_desc";
|
||||||
|
|
||||||
public WRC3SortCriteriaPanel() {
|
public WRC3SortCriteriaPanel() {
|
||||||
super();
|
super();
|
||||||
|
@ -99,6 +105,9 @@ public class WRC3SortCriteriaPanel extends WRCTabPanel implements EventListener
|
||||||
migrateValueAcrossLists(event);
|
migrateValueAcrossLists(event);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
yesList.addEventListener(Events.ON_RIGHT_CLICK, this);
|
||||||
|
|
||||||
yesList.setSeltype("multiple");
|
yesList.setSeltype("multiple");
|
||||||
noList.setSeltype("multiple");
|
noList.setSeltype("multiple");
|
||||||
|
|
||||||
|
@ -169,6 +178,27 @@ public class WRC3SortCriteriaPanel extends WRCTabPanel implements EventListener
|
||||||
@Override
|
@Override
|
||||||
public void onEvent(Event event) throws Exception {
|
public void onEvent(Event event) throws Exception {
|
||||||
|
|
||||||
|
if (event.getTarget() == yesList) {
|
||||||
|
if (yesList.getSelectedItems().size() > 1) // Only one item
|
||||||
|
return;
|
||||||
|
|
||||||
|
Menupopup m_popup = new Menupopup();
|
||||||
|
Menuitem menuItem = new Menuitem(yesItems.get(yesList.getSelectedIndex()).isDesc() ? (getOrderByDesc() + " -> " + getOrderByAsc()) : (getOrderByAsc() + " -> " + getOrderByDesc()));
|
||||||
|
menuItem.setValue(asc_desc);
|
||||||
|
menuItem.addEventListener(Events.ON_CLICK, this);
|
||||||
|
m_popup.appendChild(menuItem);
|
||||||
|
m_popup.setPage(yesList.getPage());
|
||||||
|
m_popup.open(yesList);
|
||||||
|
}
|
||||||
|
else if (event.getTarget() instanceof Menuitem) {
|
||||||
|
Menuitem menuItem = (Menuitem) event.getTarget();
|
||||||
|
if (!Util.isEmpty(menuItem.getValue()) && menuItem.getValue().equals(asc_desc)) {
|
||||||
|
MPrintFormatItem pfi = yesItems.get(yesList.getSelectedIndex());
|
||||||
|
pfi.setIsDesc(!pfi.isDesc());
|
||||||
|
pfi.saveEx();
|
||||||
|
refresh();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setListsColumns() {
|
public void setListsColumns() {
|
||||||
|
@ -203,7 +233,7 @@ public class WRC3SortCriteriaPanel extends WRCTabPanel implements EventListener
|
||||||
yesModel.removeAllElements();
|
yesModel.removeAllElements();
|
||||||
for (int i=0 ; i < yesItems.size() ; i++) {
|
for (int i=0 ; i < yesItems.size() ; i++) {
|
||||||
int ID= yesItems.get(i).get_ID();
|
int ID= yesItems.get(i).get_ID();
|
||||||
String name = yesItems.get(i).getPrintName()==null? yesItems.get(i).getName():yesItems.get(i).getPrintName();
|
String name = getName(yesItems.get(i));
|
||||||
yesList.addItem(new KeyNamePair(ID, name));
|
yesList.addItem(new KeyNamePair(ID, name));
|
||||||
yesModel.addElement(new ListElement(ID, name, yesItems.get(i).getSortNo(), true, yesItems.get(i).getAD_Client_ID(), yesItems.get(i).getAD_Org_ID()));
|
yesModel.addElement(new ListElement(ID, name, yesItems.get(i).getSortNo(), true, yesItems.get(i).getAD_Client_ID(), yesItems.get(i).getAD_Org_ID()));
|
||||||
}
|
}
|
||||||
|
@ -222,6 +252,20 @@ public class WRC3SortCriteriaPanel extends WRCTabPanel implements EventListener
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String getName(MPrintFormatItem pfi) {
|
||||||
|
StringBuilder name = new StringBuilder(Util.isEmpty(pfi.getPrintName()) ? pfi.getName() : pfi.getPrintName())
|
||||||
|
.append(" (").append(pfi.isDesc() ? getOrderByDesc() : getOrderByAsc()).append(")");
|
||||||
|
return name.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
String getOrderByAsc() {
|
||||||
|
return MRefList.getListName(Env.getCtx(), REFERENCE_SQLORDERBY, "A");
|
||||||
|
}
|
||||||
|
|
||||||
|
String getOrderByDesc() {
|
||||||
|
return MRefList.getListName(Env.getCtx(), REFERENCE_SQLORDERBY, "D");
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updatePFI() {
|
public void updatePFI() {
|
||||||
// pfi is being updated on every refresh
|
// pfi is being updated on every refresh
|
||||||
|
|
|
@ -33,7 +33,7 @@ public class WFieldSuggestion extends Window implements EventListener<Event> {
|
||||||
/**
|
/**
|
||||||
* generated serial id
|
* generated serial id
|
||||||
*/
|
*/
|
||||||
private static final long serialVersionUID = -6676085940275829510L;
|
private static final long serialVersionUID = 6696533431007741092L;
|
||||||
|
|
||||||
private ConfirmPanel confirmPanel;
|
private ConfirmPanel confirmPanel;
|
||||||
|
|
||||||
|
@ -81,7 +81,7 @@ public class WFieldSuggestion extends Window implements EventListener<Event> {
|
||||||
Rows rows = grid.newRows();
|
Rows rows = grid.newRows();
|
||||||
Row row = rows.newRow();
|
Row row = rows.newRow();
|
||||||
row.appendCellChild(new Label(Msg.getElement(Env.getCtx(), "AD_Field_ID")));
|
row.appendCellChild(new Label(Msg.getElement(Env.getCtx(), "AD_Field_ID")));
|
||||||
row.appendCellChild(new Label(field.getName()));
|
row.appendCellChild(new Label(field.get_Translation("Name")));
|
||||||
|
|
||||||
row = rows.newRow();
|
row = rows.newRow();
|
||||||
row.appendCellChild(new Label(Msg.getElement(Env.getCtx(), "Name")));
|
row.appendCellChild(new Label(Msg.getElement(Env.getCtx(), "Name")));
|
||||||
|
|
|
@ -253,3 +253,12 @@
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.user-panel-popup .z-popup-content {
|
||||||
|
padding-left: 0px;
|
||||||
|
padding-right: 0px;
|
||||||
|
}
|
||||||
|
.user-panel-popup .z-popup-content > .z-vlayout {
|
||||||
|
overflow-x: auto;
|
||||||
|
padding: 8px;
|
||||||
|
}
|
|
@ -76,12 +76,12 @@ when detect side effect, fix to only apply for parameter window*/
|
||||||
}
|
}
|
||||||
@media screen and (max-width: 700px) {
|
@media screen and (max-width: 700px) {
|
||||||
.input-paramenter-layout{
|
.input-paramenter-layout{
|
||||||
width: 90%;
|
width: 90% !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@media screen and (max-width: 500px) {
|
@media screen and (max-width: 500px) {
|
||||||
.input-paramenter-layout{
|
.input-paramenter-layout{
|
||||||
width: 100%;
|
width: 100% !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,12 +6,6 @@ set DESTINATION=%cd%
|
||||||
@echo %DESTINATION%
|
@echo %DESTINATION%
|
||||||
@echo %1%
|
@echo %1%
|
||||||
|
|
||||||
set INSTALL_UI=%2%
|
|
||||||
set UNINSTALL_UI=%2%
|
|
||||||
if [%3]==[] goto nothird
|
|
||||||
set UNINSTALL_UI=%3%
|
|
||||||
:nothird
|
|
||||||
|
|
||||||
FOR %%c in (plugins\org.eclipse.equinox.launcher_1.*.jar) DO set JARFILE=%%c
|
FOR %%c in (plugins\org.eclipse.equinox.launcher_1.*.jar) DO set JARFILE=%%c
|
||||||
java -Dorg.eclipse.ecf.provider.filetransfer.excludeContributors=org.eclipse.ecf.provider.filetransfer.httpclient4 -Djava.net.preferIPv4Stack=true -jar %JARFILE% -install director -configuration director/configuration -application org.eclipse.equinox.p2.director -consoleLog -profileProperties org.eclipse.update.install.features=true -destination %DESTINATION% -repository %1 -u %UNINSTALL_UI%
|
java -Dorg.eclipse.ecf.provider.filetransfer.excludeContributors=org.eclipse.ecf.provider.filetransfer.httpclient4 -Djava.net.preferIPv4Stack=true -jar %JARFILE% -install director -configuration director/configuration -application org.eclipse.equinox.p2.director -consoleLog -profileProperties org.eclipse.update.install.features=true -destination %DESTINATION% -repository %1% -u %2%
|
||||||
java -Dorg.eclipse.ecf.provider.filetransfer.excludeContributors=org.eclipse.ecf.provider.filetransfer.httpclient4 -Djava.net.preferIPv4Stack=true -jar %JARFILE% -install director -configuration director/configuration -application org.eclipse.equinox.p2.director -consoleLog -profileProperties org.eclipse.update.install.features=true -destination %DESTINATION% -repository %1 -i %INSTALL_UI%
|
java -Dorg.eclipse.ecf.provider.filetransfer.excludeContributors=org.eclipse.ecf.provider.filetransfer.httpclient4 -Djava.net.preferIPv4Stack=true -jar %JARFILE% -install director -configuration director/configuration -application org.eclipse.equinox.p2.director -consoleLog -profileProperties org.eclipse.update.install.features=true -destination %DESTINATION% -repository %1% -i %2%
|
||||||
|
|
|
@ -4,13 +4,6 @@
|
||||||
cd $(dirname "${0}")
|
cd $(dirname "${0}")
|
||||||
DESTINATION=$(pwd)
|
DESTINATION=$(pwd)
|
||||||
|
|
||||||
VMOPTS="-Declipse.log.level=ALL -Dorg.eclipse.ecf.provider.filetransfer.excludeContributors=org.eclipse.ecf.provider.filetransfer.httpclient4 -Djava.net.preferIPv4Stack=true"
|
VMOPTS="-Dorg.eclipse.ecf.provider.filetransfer.excludeContributors=org.eclipse.ecf.provider.filetransfer.httpclient4 -Djava.net.preferIPv4Stack=true"
|
||||||
|
java $VMOPTS -jar plugins/org.eclipse.equinox.launcher_1.*.jar -install director -configuration director/configuration -application org.eclipse.equinox.p2.director -consoleLog -profileProperties org.eclipse.update.install.features=true -destination $DESTINATION -repository $1 -u $2
|
||||||
INSTALL_UI="$2"
|
java $VMOPTS -jar plugins/org.eclipse.equinox.launcher_1.*.jar -install director -configuration director/configuration -application org.eclipse.equinox.p2.director -consoleLog -profileProperties org.eclipse.update.install.features=true -destination $DESTINATION -repository $1 -i $2
|
||||||
UNINSTALL_UI="$2"
|
|
||||||
if [ -n "$3" ]; then
|
|
||||||
# case update org.adempiere.server.product, install and un-install is difference
|
|
||||||
UNINSTALL_UI="$3"
|
|
||||||
fi
|
|
||||||
java $VMOPTS -jar plugins/org.eclipse.equinox.launcher_1.*.jar -install director -configuration director/configuration -application org.eclipse.equinox.p2.director -consoleLog -profileProperties org.eclipse.update.install.features=true -destination $DESTINATION -repository $1 -u "$UNINSTALL_UI"
|
|
||||||
java $VMOPTS -jar plugins/org.eclipse.equinox.launcher_1.*.jar -install director -configuration director/configuration -application org.eclipse.equinox.p2.director -consoleLog -profileProperties org.eclipse.update.install.features=true -destination $DESTINATION -repository $1 -i "$INSTALL_UI"
|
|
|
@ -23,9 +23,7 @@ if exist jettyhome\etc\jetty-selector.xml (
|
||||||
copy jettyhome\etc\jetty-selector.xml jetty-selector.xml.sav
|
copy jettyhome\etc\jetty-selector.xml jetty-selector.xml.sav
|
||||||
)
|
)
|
||||||
|
|
||||||
set UNINSTALL_UI="org.adempiere.server.product, org.idempiere.fitnesse.feature.group"
|
@call %DESTINATION%\update-prd %1% org.adempiere.server.product,org.idempiere.fitnesse.feature.group
|
||||||
set INSTALL_UI="org.adempiere.server.product, org.eclipse.equinox.p2.director, org.idempiere.fitnesse.feature.group, org.idempiere.equinox.p2.director.feature.group"
|
|
||||||
@call %DESTINATION%\update-prd %1 %INSTALL_UI% %UNINSTALL_UI%
|
|
||||||
|
|
||||||
copy idempiere.ini.sav idempiere.ini
|
copy idempiere.ini.sav idempiere.ini
|
||||||
|
|
||||||
|
|
|
@ -33,10 +33,7 @@ then
|
||||||
cp jettyhome/etc/jetty-selector.xml jetty-selector.xml.sav
|
cp jettyhome/etc/jetty-selector.xml jetty-selector.xml.sav
|
||||||
fi
|
fi
|
||||||
|
|
||||||
UNINSTALL_UI="org.adempiere.server.product, org.idempiere.fitnesse.feature.group"
|
$DESTINATION/update-prd.sh $1 org.adempiere.server.product,org.idempiere.fitnesse.feature.group
|
||||||
INSTALL_UI="org.adempiere.server.product, org.eclipse.equinox.p2.director, org.idempiere.fitnesse.feature.group, org.idempiere.equinox.p2.director.feature.group"
|
|
||||||
|
|
||||||
$DESTINATION/update-prd.sh $1 "$INSTALL_UI" "$UNINSTALL_UI"
|
|
||||||
|
|
||||||
cp idempiere.ini.sav idempiere.ini
|
cp idempiere.ini.sav idempiere.ini
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue