hg merge release-2.0 (merge release2 into development)
This commit is contained in:
commit
3ba236ebf4
|
@ -5,3 +5,6 @@ SET DEFINE OFF
|
||||||
UPDATE AD_Field SET SeqNo=70, IsDisplayed='Y', XPosition=1,Updated=TO_DATE('2013-11-07 21:30:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=60934
|
UPDATE AD_Field SET SeqNo=70, IsDisplayed='Y', XPosition=1,Updated=TO_DATE('2013-11-07 21:30:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=60934
|
||||||
;
|
;
|
||||||
|
|
||||||
|
SELECT register_migration_script('201311071604_IDEMPIERE-1514.sql') FROM dual
|
||||||
|
;
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
SET SQLBLANKLINES ON
|
||||||
|
SET DEFINE OFF
|
||||||
|
|
||||||
|
-- Nov 15, 2013 7:35:45 PM CET
|
||||||
|
-- IDEMPIERE-1533 Constraint Name shouldn't be copied
|
||||||
|
UPDATE AD_Column SET IsAllowCopy='N',Updated=TO_DATE('2013-11-15 19:35:45','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=210871
|
||||||
|
;
|
||||||
|
|
||||||
|
SELECT register_migration_script('201311151945_IDEMPIERE-1533.sql') FROM dual
|
||||||
|
;
|
|
@ -2,3 +2,6 @@
|
||||||
UPDATE AD_Field SET SeqNo=70, IsDisplayed='Y', XPosition=1,Updated=TO_TIMESTAMP('2013-11-07 21:30:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=60934
|
UPDATE AD_Field SET SeqNo=70, IsDisplayed='Y', XPosition=1,Updated=TO_TIMESTAMP('2013-11-07 21:30:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=60934
|
||||||
;
|
;
|
||||||
|
|
||||||
|
SELECT register_migration_script('201311071604_IDEMPIERE-1514.sql') FROM dual
|
||||||
|
;
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
-- Nov 15, 2013 7:35:45 PM CET
|
||||||
|
-- IDEMPIERE-1533 Constraint Name shouldn't be copied
|
||||||
|
UPDATE AD_Column SET IsAllowCopy='N',Updated=TO_TIMESTAMP('2013-11-15 19:35:45','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=210871
|
||||||
|
;
|
||||||
|
|
||||||
|
SELECT register_migration_script('201311151945_IDEMPIERE-1533.sql') FROM dual
|
||||||
|
;
|
|
@ -74,6 +74,7 @@ public class Callout_AD_Column extends CalloutEngine
|
||||||
+ " IsIdentifier, "
|
+ " IsIdentifier, "
|
||||||
+ " IsUpdateable, "
|
+ " IsUpdateable, "
|
||||||
+ " IsAlwaysUpdateable, "
|
+ " IsAlwaysUpdateable, "
|
||||||
|
+ " FKConstraintType,"
|
||||||
+ " COUNT(*) "
|
+ " COUNT(*) "
|
||||||
+ "FROM AD_Column "
|
+ "FROM AD_Column "
|
||||||
+ "WHERE ColumnName = ? "
|
+ "WHERE ColumnName = ? "
|
||||||
|
@ -86,7 +87,8 @@ public class Callout_AD_Column extends CalloutEngine
|
||||||
+ " ReadOnlyLogic, "
|
+ " ReadOnlyLogic, "
|
||||||
+ " IsIdentifier, "
|
+ " IsIdentifier, "
|
||||||
+ " IsUpdateable, "
|
+ " IsUpdateable, "
|
||||||
+ " IsAlwaysUpdateable "
|
+ " IsAlwaysUpdateable, "
|
||||||
|
+ " FKConstraintType "
|
||||||
+ "ORDER BY COUNT(*) DESC ";
|
+ "ORDER BY COUNT(*) DESC ";
|
||||||
PreparedStatement pstmt = null;
|
PreparedStatement pstmt = null;
|
||||||
ResultSet rs = null;
|
ResultSet rs = null;
|
||||||
|
@ -109,6 +111,7 @@ public class Callout_AD_Column extends CalloutEngine
|
||||||
column.setIsIdentifier("Y".equals(rs.getString(8)));
|
column.setIsIdentifier("Y".equals(rs.getString(8)));
|
||||||
column.setIsUpdateable("Y".equals(rs.getString(9)));
|
column.setIsUpdateable("Y".equals(rs.getString(9)));
|
||||||
column.setIsAlwaysUpdateable("Y".equals(rs.getString(10)));
|
column.setIsAlwaysUpdateable("Y".equals(rs.getString(10)));
|
||||||
|
column.setFKConstraintType(rs.getString(11));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (SQLException e)
|
catch (SQLException e)
|
||||||
|
|
|
@ -113,7 +113,8 @@ public class CopyOrder extends SvrProcess
|
||||||
// Env.setSOTrx(getCtx(), newOrder.isSOTrx());
|
// Env.setSOTrx(getCtx(), newOrder.isSOTrx());
|
||||||
// return "@C_Order_ID@ " + newOrder.getDocumentNo();
|
// return "@C_Order_ID@ " + newOrder.getDocumentNo();
|
||||||
StringBuilder msgreturn = new StringBuilder().append(dt.getName()).append(": ").append(newOrder.getDocumentNo());
|
StringBuilder msgreturn = new StringBuilder().append(dt.getName()).append(": ").append(newOrder.getDocumentNo());
|
||||||
return msgreturn.toString();
|
addLog(0, null, null, msgreturn.toString(), newOrder.get_Table_ID(), newOrder.getC_Order_ID());
|
||||||
|
return "@C_Order_ID@ @Created@";
|
||||||
} // doIt
|
} // doIt
|
||||||
|
|
||||||
} // CopyOrder
|
} // CopyOrder
|
|
@ -225,7 +225,7 @@ public class ExpenseAPInvoice extends SvrProcess
|
||||||
//
|
//
|
||||||
m_noInvoices++;
|
m_noInvoices++;
|
||||||
addLog(invoice.get_ID(), invoice.getDateInvoiced(),
|
addLog(invoice.get_ID(), invoice.getDateInvoiced(),
|
||||||
invoice.getGrandTotal(), invoice.getDocumentNo());
|
invoice.getGrandTotal(), invoice.getDocumentNo(), invoice.get_Table_ID(), invoice.getC_Invoice_ID());
|
||||||
} // completeInvoice
|
} // completeInvoice
|
||||||
|
|
||||||
} // ExpenseAPInvoice
|
} // ExpenseAPInvoice
|
||||||
|
|
|
@ -282,7 +282,7 @@ public class ExpenseSOrder extends SvrProcess
|
||||||
if (!m_order.save())
|
if (!m_order.save())
|
||||||
throw new IllegalStateException("Cannot save Order");
|
throw new IllegalStateException("Cannot save Order");
|
||||||
m_noOrders++;
|
m_noOrders++;
|
||||||
addLog (m_order.get_ID(), m_order.getDateOrdered(), m_order.getGrandTotal(), m_order.getDocumentNo());
|
addLog (m_order.get_ID(), m_order.getDateOrdered(), m_order.getGrandTotal(), m_order.getDocumentNo(), m_order.get_Table_ID(), m_order.getC_Order_ID());
|
||||||
m_order = null;
|
m_order = null;
|
||||||
} // completeOrder
|
} // completeOrder
|
||||||
|
|
||||||
|
|
|
@ -175,7 +175,7 @@ public class RfQCreatePO extends SvrProcess
|
||||||
order.setSalesRep_ID(rfq.getSalesRep_ID());
|
order.setSalesRep_ID(rfq.getSalesRep_ID());
|
||||||
order.saveEx();
|
order.saveEx();
|
||||||
noOrders++;
|
noOrders++;
|
||||||
addLog(0, null, null, order.getDocumentNo());
|
addLog(0, null, null, order.getDocumentNo(), order.get_Table_ID(), order.getC_Order_ID());
|
||||||
}
|
}
|
||||||
// For all Qtys
|
// For all Qtys
|
||||||
MRfQResponseLineQty[] qtys = line.getQtys(false);
|
MRfQResponseLineQty[] qtys = line.getQtys(false);
|
||||||
|
|
|
@ -1344,13 +1344,16 @@ public class MInOut extends X_M_InOut implements DocAction
|
||||||
{
|
{
|
||||||
if (!isReversal())
|
if (!isReversal())
|
||||||
{
|
{
|
||||||
BigDecimal toDelivered = oLine.getQtyOrdered().subtract(oLine.getQtyDelivered());
|
if (oLine != null)
|
||||||
if (sLine.getMovementQty().compareTo(toDelivered) > 0)
|
|
||||||
overReceipt = sLine.getMovementQty().subtract(toDelivered);
|
|
||||||
if (overReceipt.signum() != 0)
|
|
||||||
{
|
{
|
||||||
sLine.setQtyOverReceipt(overReceipt);
|
BigDecimal toDelivered = oLine.getQtyOrdered().subtract(oLine.getQtyDelivered());
|
||||||
sLine.saveEx();
|
if (sLine.getMovementQty().compareTo(toDelivered) > 0)
|
||||||
|
overReceipt = sLine.getMovementQty().subtract(toDelivered);
|
||||||
|
if (overReceipt.signum() != 0)
|
||||||
|
{
|
||||||
|
sLine.setQtyOverReceipt(overReceipt);
|
||||||
|
sLine.saveEx();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -25,6 +25,7 @@ import org.compiere.util.DisplayType;
|
||||||
import org.compiere.util.Env;
|
import org.compiere.util.Env;
|
||||||
import org.compiere.util.KeyNamePair;
|
import org.compiere.util.KeyNamePair;
|
||||||
import org.compiere.util.Language;
|
import org.compiere.util.Language;
|
||||||
|
import org.compiere.util.Msg;
|
||||||
import org.compiere.util.NamePair;
|
import org.compiere.util.NamePair;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -191,9 +192,15 @@ public class PrintDataElement implements Serializable
|
||||||
{
|
{
|
||||||
if (DisplayType.isNumeric(m_displayType)) {
|
if (DisplayType.isNumeric(m_displayType)) {
|
||||||
retValue = DisplayType.getNumberFormat(m_displayType, language, m_formatPattern).format(m_value);
|
retValue = DisplayType.getNumberFormat(m_displayType, language, m_formatPattern).format(m_value);
|
||||||
}
|
} else if (DisplayType.isDate(m_displayType)) {
|
||||||
else if (DisplayType.isDate(m_displayType))
|
|
||||||
retValue = DisplayType.getDateFormat(m_displayType, language, m_formatPattern).format(m_value);
|
retValue = DisplayType.getDateFormat(m_displayType, language, m_formatPattern).format(m_value);
|
||||||
|
} else if (m_value instanceof Boolean) {
|
||||||
|
if (m_value.toString().equals("true")) {
|
||||||
|
retValue = Msg.getMsg(Env.getCtx(), "Yes");
|
||||||
|
} else if (m_value.toString().equals("false")) {
|
||||||
|
retValue = Msg.getMsg(Env.getCtx(), "No");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return retValue;
|
return retValue;
|
||||||
} // getValueDisplay
|
} // getValueDisplay
|
||||||
|
|
|
@ -28,50 +28,51 @@ public class SetupRes_da extends ListResourceBundle
|
||||||
{
|
{
|
||||||
/** Translation Info */
|
/** Translation Info */
|
||||||
static final Object[][] contents = new String[][]{
|
static final Object[][] contents = new String[][]{
|
||||||
{ "AdempiereServerSetup", "iDempiere: Opsætning af server" },
|
{ "AdempiereServerSetup", "iDempiere: Ops\u00e6tning af Server" },
|
||||||
{ "Ok", "OK" },
|
{ "Ok", "OK" },
|
||||||
{ "File", "Fil" },
|
{ "File", "Fil" },
|
||||||
{ "Exit", "Afslut" },
|
{ "Exit", "Afslut" },
|
||||||
{ "Help", "Hjælp" },
|
{ "Help", "Hj\u00e6lp" },
|
||||||
{ "PleaseCheck", "Kontrollér" },
|
{ "PleaseCheck", "Kontroller" },
|
||||||
{ "UnableToConnect", "Kan ikke hente hjælp fra Adempieres web-sted" },
|
{ "UnableToConnect", "Kan ikke hente hj\u00e6lp fra iDempieres web-sted" },
|
||||||
|
|
||||||
{ "AdempiereHomeInfo", "iDempiere Home er hovedmappen" },
|
{ "AdempiereHomeInfo", "iDempiere Home er hovedmappen" },
|
||||||
{ "AdempiereHome", "iDempiere Home" },
|
{ "AdempiereHome", "iDempiere Home" },
|
||||||
{ "WebPortInfo", "Web (HTML)-port" },
|
{ "WebPortInfo", "Web (HTML) Port" },
|
||||||
{ "WebPort", "Web-port" },
|
{ "WebPort", "Program Server" },
|
||||||
{ "AppsServerInfo", "Programserverens navn" },
|
{ "AppsServerInfo", "Program Serverens Navn" },
|
||||||
{ "AppsServer", "Prog.-server" },
|
{ "AppsServer", "Program Server" },
|
||||||
{ "DatabaseTypeInfo", "Databasetype" },
|
{ "DbExists", "Database Er Oprettet" },
|
||||||
{ "DatabaseType", "Databasetype" },
|
{ "DatabaseTypeInfo", "Database Type" },
|
||||||
{ "DatabaseNameInfo", "Databasenavn " },
|
{ "DatabaseType", "Database Type" },
|
||||||
{ "DatabaseName", "Databasenavn (SID)" },
|
{ "DatabaseNameInfo", "Database Navn " },
|
||||||
|
{ "DatabaseName", "Database Navn (SID)" },
|
||||||
{ "DatabasePortInfo", "Database Listener Port" },
|
{ "DatabasePortInfo", "Database Listener Port" },
|
||||||
{ "DatabasePort", "Databaseport" },
|
{ "DatabasePort", "Database Port" },
|
||||||
{ "DatabaseUserInfo", "Database: Bruger-ID til Adempiere" },
|
{ "DatabaseUserInfo", "Database Bruger-ID til iDempiere" },
|
||||||
{ "DatabaseUser", "Database: Bruger" },
|
{ "DatabaseUser", "Database Bruger" },
|
||||||
{ "DatabasePasswordInfo", "Database: Brugeradgangskode til Adempiere" },
|
{ "DatabasePasswordInfo", "Database Brugeradgangskode til iDempiere" },
|
||||||
{ "DatabasePassword", "Database: Adgangskode" },
|
{ "DatabasePassword", "Database Adgangskode" },
|
||||||
{ "TNSNameInfo", "TNS eller Global Database Name" },
|
{ "TNSNameInfo", "TNS eller Global Database Name" },
|
||||||
{ "TNSName", "TNS-navn" },
|
{ "TNSName", "TNS Navn" },
|
||||||
{ "SystemPasswordInfo", "System: Brugeradgangskode" },
|
{ "SystemPasswordInfo", "System: Brugeradgangskode" },
|
||||||
{ "SystemPassword", "System-adgangskode" },
|
{ "SystemPassword", "System Adgangskode" },
|
||||||
{ "MailServerInfo", "Mail-server" },
|
{ "MailServerInfo", "Mail Server" },
|
||||||
{ "MailServer", "Mail-server" },
|
{ "MailServer", "Mail Server" },
|
||||||
{ "AdminEMailInfo", "Adempiere: Administrators e-mail" },
|
{ "AdminEMailInfo", "iDempiere: Administrators e-mail" },
|
||||||
{ "AdminEMail", "Admin. e-mail" },
|
{ "AdminEMail", "Admin. e-mail" },
|
||||||
{ "DatabaseServerInfo", "Databaseservers navn" },
|
{ "DatabaseServerInfo", "Database Servers Navn" },
|
||||||
{ "DatabaseServer", "Databaseserver" },
|
{ "DatabaseServer", "Database Server" },
|
||||||
{ "JavaHomeInfo", "Java Home-mappe" },
|
{ "JavaHomeInfo", "Java Home-mappe" },
|
||||||
{ "JavaHome", "Java Home" },
|
{ "JavaHome", "Java Home" },
|
||||||
{ "JNPPortInfo", "Programservers JNP-port" },
|
{ "JNPPortInfo", "Programs Srvers JNP-port" },
|
||||||
{ "JNPPort", "JNP-port" },
|
{ "JNPPort", "JNP-port" },
|
||||||
{ "MailUserInfo", "Adempiere: Mail-bruger" },
|
{ "MailUserInfo", "iDempiere: Mail Bruger" },
|
||||||
{ "MailUser", "Mail: Bruger" },
|
{ "MailUser", "Mail Bruger" },
|
||||||
{ "MailPasswordInfo", "Adempiere: Brugeradgangskode til mail" },
|
{ "MailPasswordInfo", "iDempiere: Bruger Adgangskode til mail" },
|
||||||
{ "MailPassword", "Adgangskode til mail" },
|
{ "MailPassword", "Adgangskode til mail" },
|
||||||
{ "KeyStorePassword", "Key Store Password" },
|
{ "KeyStorePassword", "Key Store Adgangskode" },
|
||||||
{ "KeyStorePasswordInfo", "Password for SSL Key Store" },
|
{ "KeyStorePasswordInfo", "Key Store Adgangskode" },
|
||||||
//
|
//
|
||||||
{ "JavaType", "Java VM"},
|
{ "JavaType", "Java VM"},
|
||||||
{ "JavaTypeInfo", "Java VM Vendor"},
|
{ "JavaTypeInfo", "Java VM Vendor"},
|
||||||
|
@ -81,15 +82,15 @@ public class SetupRes_da extends ListResourceBundle
|
||||||
{ "DeployDirInfo", "J2EE Deployment Directory"},
|
{ "DeployDirInfo", "J2EE Deployment Directory"},
|
||||||
{ "ErrorDeployDir", "Error Deployment Directory"},
|
{ "ErrorDeployDir", "Error Deployment Directory"},
|
||||||
//
|
//
|
||||||
{ "TestInfo", "Afprøv opsætning" },
|
{ "TestInfo", "Afpr\u00f8v ops\u00e6tning" },
|
||||||
{ "Test", "Afprøv" },
|
{ "Test", "Afpr\u00f8v" },
|
||||||
{ "SaveInfo", "Gem opsætning" },
|
{ "SaveInfo", "Gem ops\u00e6tning" },
|
||||||
{ "Save", "Gem" },
|
{ "Save", "Gem" },
|
||||||
{ "HelpInfo", "Hjælp" },
|
{ "HelpInfo", "Hj\u00e6lp" },
|
||||||
|
|
||||||
{ "ServerError", "Fejl: Serverops<EFBFBD>tning" },
|
{ "ServerError", "Fejl: Serverops\u00e6tning" },
|
||||||
{ "ErrorJavaHome", "Fejl: Java Home" },
|
{ "ErrorJavaHome", "Fejl: Java Home" },
|
||||||
{ "ErrorAdempiereHome", "Fejl: iDempiere Home" },
|
{ "ErrorAdempiereHome", "Fejl: iDempiere Home" },
|
||||||
{ "ErrorAppsServer", "Fejl: Prog.-server" },
|
{ "ErrorAppsServer", "Fejl: Prog.-server" },
|
||||||
{ "ErrorWebPort", "Fejl: Web-port" },
|
{ "ErrorWebPort", "Fejl: Web-port" },
|
||||||
{ "ErrorJNPPort", "Fejl: JNP-port" },
|
{ "ErrorJNPPort", "Fejl: JNP-port" },
|
||||||
|
@ -101,7 +102,7 @@ public class SetupRes_da extends ListResourceBundle
|
||||||
{ "ErrorMail", "Fejl: Mail" },
|
{ "ErrorMail", "Fejl: Mail" },
|
||||||
{ "ErrorSave", "Fejl: Swing-fil" },
|
{ "ErrorSave", "Fejl: Swing-fil" },
|
||||||
|
|
||||||
{ "EnvironmentSaved", "Miljøet er gemt\nGenstart serveren." },
|
{ "EnvironmentSaved", "Milj\u00f8et er gemt. Genstart serveren." },
|
||||||
{ "RMIoverHTTP", "Tunnel Objects via HTTP" },
|
{ "RMIoverHTTP", "Tunnel Objects via HTTP" },
|
||||||
{ "RMIoverHTTPInfo", "RMI over HTTP allows to go through firewalls" }
|
{ "RMIoverHTTPInfo", "RMI over HTTP allows to go through firewalls" }
|
||||||
};
|
};
|
||||||
|
|
|
@ -65,6 +65,19 @@ public class SessionContextListener implements ExecutionInit,
|
||||||
Session session = exec.getDesktop().getSession();
|
Session session = exec.getDesktop().getSession();
|
||||||
Properties ctx = (Properties)session.getAttribute(SESSION_CTX);
|
Properties ctx = (Properties)session.getAttribute(SESSION_CTX);
|
||||||
HttpSession httpSession = (HttpSession)session.getNativeSession();
|
HttpSession httpSession = (HttpSession)session.getNativeSession();
|
||||||
|
//create empty context if there's no valid native session
|
||||||
|
if (httpSession == null)
|
||||||
|
{
|
||||||
|
ctx = new Properties();
|
||||||
|
ctx.put(ServerContextURLHandler.SERVER_CONTEXT_URL_HANDLER, new ServerContextURLHandler() {
|
||||||
|
public void showURL(String url) {
|
||||||
|
SessionManager.getAppDesktop().showURL(url, true);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
ServerContext.setCurrentInstance(ctx);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (ctx != null)
|
if (ctx != null)
|
||||||
{
|
{
|
||||||
//verify ctx
|
//verify ctx
|
||||||
|
@ -283,7 +296,7 @@ public class SessionContextListener implements ExecutionInit,
|
||||||
HttpSession httpSession = (HttpSession)session.getNativeSession();
|
HttpSession httpSession = (HttpSession)session.getNativeSession();
|
||||||
//verify ctx
|
//verify ctx
|
||||||
String cacheId = ctx.getProperty(SERVLET_SESSION_ID);
|
String cacheId = ctx.getProperty(SERVLET_SESSION_ID);
|
||||||
if (cacheId == null || !cacheId.equals(httpSession.getId()) )
|
if (cacheId == null || httpSession == null || !cacheId.equals(httpSession.getId()) )
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,8 @@ import java.sql.PreparedStatement;
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.Comparator;
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
@ -61,13 +63,11 @@ import org.zkoss.zul.Vlayout;
|
||||||
* @author hengsin
|
* @author hengsin
|
||||||
*/
|
*/
|
||||||
public class WGadgets extends Window implements EventListener<Event>{
|
public class WGadgets extends Window implements EventListener<Event>{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private static final long serialVersionUID = 3652943562286386813L;
|
private static final long serialVersionUID = -4466888491090717617L;
|
||||||
|
|
||||||
|
|
||||||
// UI variables
|
// UI variables
|
||||||
protected Label noLabel = new Label();
|
protected Label noLabel = new Label();
|
||||||
protected Label yesLabel = new Label();
|
protected Label yesLabel = new Label();
|
||||||
|
@ -320,8 +320,17 @@ public class WGadgets extends Window implements EventListener<Event>{
|
||||||
else
|
else
|
||||||
noItems.add(content);
|
noItems.add(content);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Collections.sort(yesItems, new DashboardNameComparator());
|
||||||
|
Collections.sort(noItems, new DashboardNameComparator());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class DashboardNameComparator implements Comparator<MDashboardContent> {
|
||||||
|
public int compare(MDashboardContent dc1, MDashboardContent dc2) {
|
||||||
|
return dc1.get_Translation("Name").compareTo(dc2.get_Translation("Name"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param event
|
* @param event
|
||||||
*/
|
*/
|
||||||
|
@ -422,9 +431,9 @@ public class WGadgets extends Window implements EventListener<Event>{
|
||||||
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).getName();
|
String name = yesItems.get(i).get_Translation("Name");
|
||||||
yesList.addItem(new KeyNamePair(ID, name));
|
yesList.addItem(new KeyNamePair(ID, name));
|
||||||
yesModel.addElement(new ListElement(ID, name, yesItems.get(i).getName(), true, yesItems.get(i).getAD_Client_ID(), yesItems.get(i).getAD_Org_ID()));
|
yesModel.addElement(new ListElement(ID, name, yesItems.get(i).get_Translation("Name"), true, yesItems.get(i).getAD_Client_ID(), yesItems.get(i).getAD_Org_ID()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -432,9 +441,9 @@ public class WGadgets extends Window implements EventListener<Event>{
|
||||||
noModel.removeAllElements();
|
noModel.removeAllElements();
|
||||||
for (int i=0 ; i < noItems.size() ; i++) {
|
for (int i=0 ; i < noItems.size() ; i++) {
|
||||||
int ID= noItems.get(i).get_ID();
|
int ID= noItems.get(i).get_ID();
|
||||||
String name = noItems.get(i).getName();
|
String name = noItems.get(i).get_Translation("Name");
|
||||||
noList.addItem(new KeyNamePair(ID, name));
|
noList.addItem(new KeyNamePair(ID, name));
|
||||||
noModel.add(i,new ListElement(ID, name, noItems.get(i).getName(), false, noItems.get(i).getAD_Client_ID(), noItems.get(i).getAD_Org_ID()));
|
noModel.add(i,new ListElement(ID, name, noItems.get(i).get_Translation("Name"), false, noItems.get(i).getAD_Client_ID(), noItems.get(i).getAD_Org_ID()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue