hg merge release-1.0c (forward-porting)
This commit is contained in:
commit
975f7bb03c
|
@ -0,0 +1,7 @@
|
|||
-- Aug 21, 2013 1:44:20 PM COT
|
||||
-- IDEMPIERE-1290 Can't see/select the Label Printer in the window Print Label
|
||||
UPDATE AD_Column SET AD_Reference_ID=19,Updated=TO_DATE('2013-08-21 13:44:20','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=9875
|
||||
;
|
||||
|
||||
SELECT register_migration_script('201308211400_IDEMPIERE-1290.sql') FROM dual
|
||||
;
|
|
@ -0,0 +1,15 @@
|
|||
-- Aug 29, 2013 12:54:44 PM COT
|
||||
-- IDEMPIERE-1246 Implement Open in Grid Mode as user preference
|
||||
INSERT INTO AD_Column (SeqNoSelection,IsSyncDatabase,Version,AD_Table_ID,AD_Column_ID,AD_Reference_Value_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,DefaultValue,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,AD_Element_ID,IsSecure) VALUES (0,'N',0,200008,210850,319,'N','N','N',0,'N',1,'N',17,'N','N','Y','6326bd83-7b11-4da6-8407-26b186050943','Y','IsDisplayedGrid',NULL,'Show in Grid','Y',TO_DATE('2013-08-29 12:54:44','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_DATE('2013-08-29 12:54:44','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N',200083,'N')
|
||||
;
|
||||
|
||||
-- Aug 29, 2013 12:55:27 PM COT
|
||||
ALTER TABLE AD_Tab_Customization ADD IsDisplayedGrid CHAR(1) DEFAULT NULL
|
||||
;
|
||||
|
||||
-- Aug 22, 2013 2:45:25 PM COT
|
||||
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,Created,AD_Org_ID,AD_Client_ID,EntityType) VALUES ('I','Open in Grid Mode',200224,'4603f89b-78cf-4f1d-beeb-b33146aa91fa','OpenInGridMode','Y',TO_DATE('2013-08-22 14:45:25','YYYY-MM-DD HH24:MI:SS'),100,100,TO_DATE('2013-08-22 14:45:25','YYYY-MM-DD HH24:MI:SS'),0,0,'D')
|
||||
;
|
||||
|
||||
SELECT register_migration_script('201308281230_IDEMPIERE-1246.sql') FROM dual
|
||||
;
|
|
@ -0,0 +1,7 @@
|
|||
-- Aug 21, 2013 1:44:20 PM COT
|
||||
-- IDEMPIERE-1290 Can't see/select the Label Printer in the window Print Label
|
||||
UPDATE AD_Column SET AD_Reference_ID=19,Updated=TO_TIMESTAMP('2013-08-21 13:44:20','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=9875
|
||||
;
|
||||
|
||||
SELECT register_migration_script('201308211400_IDEMPIERE-1290.sql') FROM dual
|
||||
;
|
|
@ -0,0 +1,15 @@
|
|||
-- Aug 29, 2013 12:54:44 PM COT
|
||||
-- IDEMPIERE-1246 Implement "Open in Grid Mode" as user preference
|
||||
INSERT INTO AD_Column (SeqNoSelection,IsSyncDatabase,Version,AD_Table_ID,AD_Column_ID,AD_Reference_Value_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,DefaultValue,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,AD_Element_ID,IsSecure) VALUES (0,'N',0,200008,210850,319,'N','N','N',0,'N',1,'N',17,'N','N','Y','6326bd83-7b11-4da6-8407-26b186050943','Y','IsDisplayedGrid',NULL,'Show in Grid','Y',TO_TIMESTAMP('2013-08-29 12:54:44','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_TIMESTAMP('2013-08-29 12:54:44','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N',200083,'N')
|
||||
;
|
||||
|
||||
-- Aug 29, 2013 12:55:27 PM COT
|
||||
ALTER TABLE AD_Tab_Customization ADD COLUMN IsDisplayedGrid CHAR(1) DEFAULT NULL
|
||||
;
|
||||
|
||||
-- Aug 22, 2013 2:45:25 PM COT
|
||||
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,Created,AD_Org_ID,AD_Client_ID,EntityType) VALUES ('I','Open in Grid Mode',200224,'4603f89b-78cf-4f1d-beeb-b33146aa91fa','OpenInGridMode','Y',TO_TIMESTAMP('2013-08-22 14:45:25','YYYY-MM-DD HH24:MI:SS'),100,100,TO_TIMESTAMP('2013-08-22 14:45:25','YYYY-MM-DD HH24:MI:SS'),0,0,'D')
|
||||
;
|
||||
|
||||
SELECT register_migration_script('201308281230_IDEMPIERE-1246.sql') FROM dual
|
||||
;
|
|
@ -42,6 +42,7 @@ import org.adempiere.base.Core;
|
|||
import org.adempiere.base.IColumnCallout;
|
||||
import org.adempiere.base.ServiceQuery;
|
||||
import org.adempiere.base.equinox.EquinoxExtensionLocator;
|
||||
import org.adempiere.model.MTabCustomization;
|
||||
import org.adempiere.util.ContextRunnable;
|
||||
import org.compiere.Adempiere;
|
||||
import org.compiere.util.CLogMgt;
|
||||
|
@ -1634,6 +1635,9 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
|
|||
*/
|
||||
public boolean isSingleRow()
|
||||
{
|
||||
MTabCustomization tabcust = MTabCustomization.get(Env.getCtx(), Env.getAD_User_ID(Env.getCtx()), getAD_Tab_ID(), null);
|
||||
if (tabcust != null && tabcust.getIsDisplayedGrid() != null)
|
||||
return "N".equals(tabcust.getIsDisplayedGrid());
|
||||
return m_vo.IsSingleRow;
|
||||
} // isSingleRow;
|
||||
|
||||
|
|
|
@ -148,6 +148,15 @@ public interface I_AD_Tab_Customization
|
|||
*/
|
||||
public boolean isActive();
|
||||
|
||||
/** Column name IsDisplayedGrid */
|
||||
public static final String COLUMNNAME_IsDisplayedGrid = "IsDisplayedGrid";
|
||||
|
||||
/** Set Show in Grid */
|
||||
public void setIsDisplayedGrid (String IsDisplayedGrid);
|
||||
|
||||
/** Get Show in Grid */
|
||||
public String getIsDisplayedGrid();
|
||||
|
||||
/** Column name Updated */
|
||||
public static final String COLUMNNAME_Updated = "Updated";
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ public class X_AD_Tab_Customization extends PO implements I_AD_Tab_Customization
|
|||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 20130626L;
|
||||
private static final long serialVersionUID = 20130829L;
|
||||
|
||||
/** Standard Constructor */
|
||||
public X_AD_Tab_Customization (Properties ctx, int AD_Tab_Customization_ID, String trxName)
|
||||
|
@ -173,4 +173,25 @@ public class X_AD_Tab_Customization extends PO implements I_AD_Tab_Customization
|
|||
{
|
||||
return (String)get_Value(COLUMNNAME_Custom);
|
||||
}
|
||||
|
||||
/** IsDisplayedGrid AD_Reference_ID=319 */
|
||||
public static final int ISDISPLAYEDGRID_AD_Reference_ID=319;
|
||||
/** Yes = Y */
|
||||
public static final String ISDISPLAYEDGRID_Yes = "Y";
|
||||
/** No = N */
|
||||
public static final String ISDISPLAYEDGRID_No = "N";
|
||||
/** Set Show in Grid.
|
||||
@param IsDisplayedGrid Show in Grid */
|
||||
public void setIsDisplayedGrid (String IsDisplayedGrid)
|
||||
{
|
||||
|
||||
set_Value (COLUMNNAME_IsDisplayedGrid, IsDisplayedGrid);
|
||||
}
|
||||
|
||||
/** Get Show in Grid.
|
||||
@return Show in Grid */
|
||||
public String getIsDisplayedGrid ()
|
||||
{
|
||||
return (String)get_Value(COLUMNNAME_IsDisplayedGrid);
|
||||
}
|
||||
}
|
|
@ -1533,7 +1533,13 @@ public class FinReport extends SvrProcess
|
|||
String s = m_report.getWhereClause();
|
||||
if (s != null && s.length() > 0)
|
||||
insert.append(" AND ").append(s);
|
||||
insert.append(m_parameterWhere); // IDEMPIERE-130
|
||||
|
||||
// Exclude PA_ReportCube_ID parameter condition, PA_ReportCube_ID column does not exists in Fact_Acct table
|
||||
String whereClause = m_parameterWhere.toString();
|
||||
if (p_PA_ReportCube_ID > 0)
|
||||
whereClause = whereClause.replaceAll(" AND PA_ReportCube_ID=" + p_PA_ReportCube_ID, "");
|
||||
insert.append(whereClause); // IDEMPIERE-130
|
||||
|
||||
// Period restriction
|
||||
FinReportPeriod frp = getPeriod (0);
|
||||
insert.append(" AND TRUNC(DateAcct) ")
|
||||
|
|
|
@ -27,6 +27,7 @@ import org.adempiere.base.event.IEventManager;
|
|||
import org.adempiere.base.event.IEventTopics;
|
||||
import org.adempiere.model.MBroadcastMessage;
|
||||
import org.adempiere.util.ServerContext;
|
||||
import org.adempiere.webui.LayoutUtils;
|
||||
import org.adempiere.webui.adwindow.ADWindow;
|
||||
import org.adempiere.webui.apps.AEnv;
|
||||
import org.adempiere.webui.apps.BusyDialog;
|
||||
|
@ -71,6 +72,7 @@ import org.zkoss.zk.au.out.AuScript;
|
|||
import org.zkoss.zk.ui.Component;
|
||||
import org.zkoss.zk.ui.Desktop;
|
||||
import org.zkoss.zk.ui.Executions;
|
||||
import org.zkoss.zk.ui.HtmlBasedComponent;
|
||||
import org.zkoss.zk.ui.Page;
|
||||
import org.zkoss.zk.ui.event.Event;
|
||||
import org.zkoss.zk.ui.event.EventListener;
|
||||
|
@ -192,6 +194,14 @@ public class DefaultDesktop extends TabbedDesktop implements MenuListener, Seria
|
|||
public void onEvent(Event event) throws Exception {
|
||||
OpenEvent oe = (OpenEvent) event;
|
||||
updateHelpCollapsedPreference(!oe.isOpen());
|
||||
HtmlBasedComponent comp = windowContainer.getComponent();
|
||||
if (comp != null) {
|
||||
if (oe.isOpen()) {
|
||||
LayoutUtils.removeSclass("with-right-icon", comp);
|
||||
} else {
|
||||
LayoutUtils.addSclass("with-right-icon", comp);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -211,6 +221,9 @@ public class DefaultDesktop extends TabbedDesktop implements MenuListener, Seria
|
|||
|
||||
boolean helpCollapsed= pref.isPropertyBool(UserPreference.P_HELP_COLLAPSED);
|
||||
e.setOpen(!helpCollapsed);
|
||||
Clients.evalJavaScript("$('.desktop-layout > div > .z-east-colpsd > .z-borderlayout-icon').attr('title', '" +
|
||||
Msg.getElement(Env.getCtx(), "AD_CtxHelp_ID") + "');");
|
||||
|
||||
|
||||
helpController.render(e, this);
|
||||
|
||||
|
@ -267,6 +280,10 @@ public class DefaultDesktop extends TabbedDesktop implements MenuListener, Seria
|
|||
max.setSclass("window-container-toolbar-btn");
|
||||
max.setStyle("cursor: pointer; border: 1px solid transparent; padding: 2px;");
|
||||
|
||||
if (!e.isOpen()) {
|
||||
LayoutUtils.addSclass("with-right-icon", windowContainer.getComponent());
|
||||
}
|
||||
|
||||
return layout;
|
||||
}
|
||||
|
||||
|
|
|
@ -42,12 +42,13 @@ import org.adempiere.webui.component.SimpleListModel;
|
|||
import org.adempiere.webui.factory.ButtonFactory;
|
||||
import org.adempiere.webui.theme.ThemeManager;
|
||||
import org.adempiere.webui.window.FDialog;
|
||||
import org.compiere.model.GridTab;
|
||||
import org.compiere.model.MRefList;
|
||||
import org.compiere.util.CLogger;
|
||||
import org.compiere.util.DB;
|
||||
import org.compiere.util.Env;
|
||||
import org.compiere.util.Msg;
|
||||
import org.compiere.util.NamePair;
|
||||
import org.compiere.util.ValueNamePair;
|
||||
import org.zkoss.zhtml.Span;
|
||||
import org.zkoss.zk.au.out.AuFocus;
|
||||
import org.zkoss.zk.ui.event.DropEvent;
|
||||
|
@ -58,6 +59,7 @@ import org.zkoss.zk.ui.util.Clients;
|
|||
import org.zkoss.zul.Borderlayout;
|
||||
import org.zkoss.zul.Center;
|
||||
import org.zkoss.zul.Div;
|
||||
import org.zkoss.zul.Separator;
|
||||
import org.zkoss.zul.South;
|
||||
import org.zkoss.zul.Vbox;
|
||||
|
||||
|
@ -71,11 +73,13 @@ public class CustomizeGridViewPanel extends Panel
|
|||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -3190425241947591357L;
|
||||
private static final long serialVersionUID = 1592146462575454625L;
|
||||
|
||||
private Map<Integer, String> m_columnsWidth;
|
||||
ArrayList<Integer> tableSeqs;
|
||||
GridView gridPanel = null;
|
||||
MTabCustomization m_tabcust;
|
||||
|
||||
/**
|
||||
* Sort Tab Constructor
|
||||
*
|
||||
|
@ -91,7 +95,7 @@ public class CustomizeGridViewPanel extends Panel
|
|||
m_AD_User_ID = AD_User_ID;
|
||||
m_columnsWidth = columnsWidth;
|
||||
tableSeqs = gridFieldIds;
|
||||
this.setStyle("position : absolute;height: 460px; width:585px; margin: none; border: none;");
|
||||
this.setStyle("position : absolute;height: 460px; width:600px; margin: none; border: none;");
|
||||
} //
|
||||
|
||||
/** Logger */
|
||||
|
@ -108,17 +112,18 @@ public class CustomizeGridViewPanel extends Panel
|
|||
private Button bUp = new Button();
|
||||
private Button bDown = new Button();
|
||||
private Checkbox chkSaveWidth = new Checkbox();
|
||||
private Label lblGridMode = new Label();
|
||||
private Listbox lstGridMode = new Listbox();
|
||||
|
||||
//
|
||||
SimpleListModel noModel = new SimpleListModel();
|
||||
SimpleListModel yesModel = new SimpleListModel();
|
||||
Listbox noList = new Listbox();
|
||||
Listbox yesList = new Listbox();
|
||||
|
||||
private GridTab gridTab;
|
||||
private boolean uiCreated;
|
||||
private boolean m_saved = false;
|
||||
|
||||
|
||||
/**
|
||||
* Static Layout
|
||||
* @throws Exception
|
||||
|
@ -126,15 +131,13 @@ public class CustomizeGridViewPanel extends Panel
|
|||
private void init() throws Exception
|
||||
{
|
||||
Borderlayout layout = new Borderlayout();
|
||||
layout.setStyle("position: absolute; width: 584px; height: 100%; border: none; margin: none;");
|
||||
layout.setStyle("position: absolute; width: 600px; height: 100%; border: none; margin: none;");
|
||||
Panel centerPanel = new Panel();
|
||||
centerPanel.setStyle("border: none; margin: none");
|
||||
centerPanel.setHeight("100%");
|
||||
Center center = new Center();
|
||||
center.setStyle("border: none; margin: none");
|
||||
|
||||
noLabel.setValue("No");
|
||||
yesLabel.setValue("Yes");
|
||||
noLabel.setValue(Msg.getMsg(Env.getCtx(), "Available"));
|
||||
yesLabel.setValue(Msg.getMsg(Env.getCtx(), "Selected"));
|
||||
|
||||
|
@ -211,7 +214,7 @@ public class CustomizeGridViewPanel extends Panel
|
|||
vbox.appendChild(bRemove);
|
||||
span = new Span();
|
||||
span.setParent(centerPanel);
|
||||
span.setStyle("height: 90%; display: inline-block; width: 40px; border:none; margin: none;");
|
||||
span.setStyle("height: 90%; display: inline-block; width: 50px; border:none; margin: none;");
|
||||
span.appendChild(vbox);
|
||||
|
||||
span = new Span();
|
||||
|
@ -225,7 +228,7 @@ public class CustomizeGridViewPanel extends Panel
|
|||
vbox.setStyle("border: none; margin: none");
|
||||
span = new Span();
|
||||
span.setParent(centerPanel);
|
||||
span.setStyle("height: 90%; display: inline-block; width: 40px; border:none; margin: none;");
|
||||
span.setStyle("height: 90%; display: inline-block; width: 50px; border:none; margin: none;");
|
||||
span.appendChild(vbox);
|
||||
|
||||
Div div = new Div();
|
||||
|
@ -234,6 +237,15 @@ public class CustomizeGridViewPanel extends Panel
|
|||
chkSaveWidth.setLabel(Msg.getMsg(Env.getCtx(), "SaveColumnWidth"));
|
||||
centerPanel.appendChild(div);
|
||||
|
||||
Separator sep = new Separator("vertical");
|
||||
sep.setSpacing("200px");
|
||||
div.appendChild(sep);
|
||||
lblGridMode.setValue(Msg.getMsg(Env.getCtx(), "OpenInGridMode"));
|
||||
div.appendChild(lblGridMode);
|
||||
lstGridMode.setMold("select");
|
||||
div.appendChild(lstGridMode);
|
||||
centerPanel.appendChild(div);
|
||||
|
||||
center.appendChild(centerPanel);
|
||||
centerPanel.setVflex("1");
|
||||
centerPanel.setHflex("1");
|
||||
|
@ -245,8 +257,6 @@ public class CustomizeGridViewPanel extends Panel
|
|||
south.setHeight("35px");
|
||||
south.setStyle("text-align: right;");
|
||||
southPanel.setStyle("margin-top: 2px; margin-right: 4px");
|
||||
@SuppressWarnings("unused")
|
||||
String label = Msg.getMsg(Env.getCtx(), "save");
|
||||
Button bOK = ButtonFactory.createNamedButton(ConfirmPanel.A_OK);
|
||||
bOK.setId("Ok");
|
||||
EventListener<Event> onClickListener = new EventListener<Event>()
|
||||
|
@ -263,7 +273,6 @@ public class CustomizeGridViewPanel extends Panel
|
|||
};
|
||||
bOK.addActionListener(onClickListener);
|
||||
southPanel.appendChild(bOK);
|
||||
label = Msg.getMsg(Env.getCtx(), "Cancel");
|
||||
Button btn = ButtonFactory.createNamedButton(ConfirmPanel.A_CANCEL);
|
||||
btn.setId("Cancel");
|
||||
EventListener<Event> onClickCancelListener = new EventListener<Event>()
|
||||
|
@ -286,23 +295,21 @@ public class CustomizeGridViewPanel extends Panel
|
|||
|
||||
this.appendChild(layout);
|
||||
|
||||
} // Init
|
||||
} // init
|
||||
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.compiere.grid.APanelTab#loadData()
|
||||
*/
|
||||
public void loadData()
|
||||
{
|
||||
m_tabcust = MTabCustomization.get(Env.getCtx(), m_AD_User_ID, m_AD_Tab_ID, null);
|
||||
|
||||
yesModel.removeAllElements();
|
||||
noModel.removeAllElements();
|
||||
boolean baseLanguage = Env.isBaseLanguage(Env.getCtx(), "AD_Field");
|
||||
String sql;
|
||||
if (baseLanguage)
|
||||
sql = "SELECT t.AD_Field_ID,t.Name,t.SeqNoGrid,AD_Client_ID, AD_Org_ID FROM AD_Field t WHERE t.AD_Tab_ID=? AND t.IsDisplayedGrid ='Y' AND t.IsActive='Y' ORDER BY 3,2";
|
||||
sql = "SELECT f.AD_Field_ID,f.Name FROM AD_Field f WHERE f.AD_Tab_ID=? AND (f.IsDisplayed='Y' OR f.IsDisplayedGrid='Y') AND f.IsActive='Y' ORDER BY f.SeqNoGrid,f.Name,f.SeqNo";
|
||||
else
|
||||
sql = "SELECT t.AD_Field_ID,trl.Name,t.SeqNoGrid,t.AD_Client_ID, t.AD_Org_ID FROM AD_Field t JOIN AD_Field_Trl trl ON (t.AD_Field_ID = trl.AD_Field_ID)"
|
||||
+ " WHERE t.AD_Tab_ID=? AND t.IsDisplayedGrid ='Y' AND t.IsActive='Y' AND trl.AD_Language=? ORDER BY 3,2";
|
||||
sql = "SELECT f.AD_Field_ID,trl.Name FROM AD_Field f JOIN AD_Field_Trl trl ON (f.AD_Field_ID = trl.AD_Field_ID)"
|
||||
+ " WHERE f.AD_Tab_ID=? AND (f.IsDisplayed='Y' OR f.IsDisplayedGrid='Y') AND f.IsActive='Y' AND trl.AD_Language=? ORDER BY f.SeqNoGrid,f.Name,f.SeqNo";
|
||||
PreparedStatement pstmt = null;
|
||||
ResultSet rs = null;
|
||||
try
|
||||
|
@ -318,9 +325,7 @@ public class CustomizeGridViewPanel extends Panel
|
|||
{
|
||||
int key = rs.getInt(1);
|
||||
String name = rs.getString(2);
|
||||
int AD_Client_ID = rs.getInt(4);
|
||||
int AD_Org_ID = rs.getInt(5);
|
||||
ListElement pp = new ListElement(key, name, AD_Client_ID, AD_Org_ID);
|
||||
ListElement pp = new ListElement(key, name);
|
||||
if (tableSeqs != null && tableSeqs.size() > 0 ) {
|
||||
if (tableSeqs.contains(key)) {
|
||||
curTabSel.put(key, pp);
|
||||
|
@ -361,6 +366,18 @@ public class CustomizeGridViewPanel extends Panel
|
|||
yesList.setModel(yesModel);
|
||||
noList.setItemRenderer(noModel);
|
||||
noList.setModel(noModel);
|
||||
|
||||
ValueNamePair pp = new ValueNamePair(null, null);
|
||||
lstGridMode.addItem(pp);
|
||||
ValueNamePair[] list = MRefList.getList(Env.getCtx(), MTabCustomization.ISDISPLAYEDGRID_AD_Reference_ID, false);
|
||||
for (int i = 0;i < list.length; i++ ) {
|
||||
lstGridMode.addItem(list[i]);
|
||||
if (m_tabcust != null && list[i].getValue().equals(m_tabcust.getIsDisplayedGrid()))
|
||||
lstGridMode.setSelectedValueNamePair(list[i]);
|
||||
}
|
||||
|
||||
if (m_tabcust != null && m_tabcust.getCustom().indexOf("px") > 0)
|
||||
chkSaveWidth.setChecked(true);
|
||||
} // loadData
|
||||
|
||||
/**
|
||||
|
@ -425,6 +442,7 @@ public class CustomizeGridViewPanel extends Panel
|
|||
yesModel.add(endIndex, selObject);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Move within Yes List
|
||||
* @param event event
|
||||
|
@ -491,12 +509,6 @@ public class CustomizeGridViewPanel extends Panel
|
|||
}
|
||||
} // migrateValueWithinYesList
|
||||
|
||||
|
||||
|
||||
|
||||
/** (non-Javadoc)
|
||||
* @see org.compiere.grid.APanelTab#saveData()
|
||||
*/
|
||||
public void saveData()
|
||||
{
|
||||
log.fine("");
|
||||
|
@ -509,10 +521,10 @@ public class CustomizeGridViewPanel extends Panel
|
|||
ListElement pp = (ListElement)yesModel.getElementAt(i);
|
||||
if (!pp.isUpdateable())
|
||||
continue;
|
||||
//index += 10;
|
||||
|
||||
custom.append(pp.getKey());
|
||||
if (i > 0)
|
||||
custom.append(",");
|
||||
custom.append(pp.getKey());
|
||||
}
|
||||
|
||||
if (chkSaveWidth.isSelected() && m_columnsWidth != null && !m_columnsWidth.isEmpty())
|
||||
|
@ -532,18 +544,22 @@ public class CustomizeGridViewPanel extends Panel
|
|||
}
|
||||
}
|
||||
|
||||
MTabCustomization uc = MTabCustomization.get(Env.getCtx(), m_AD_User_ID, m_AD_Tab_ID, null);
|
||||
if (uc != null && uc.getAD_Tab_Customization_ID() > 0) {
|
||||
uc.setCustom(custom.toString());
|
||||
} else{
|
||||
uc = new MTabCustomization(Env.getCtx(), 0, null);
|
||||
uc.setAD_Tab_ID(m_AD_Tab_ID);
|
||||
uc.set_ValueOfColumn("AD_User_ID", m_AD_User_ID);
|
||||
uc.setCustom(custom.toString());
|
||||
String gridview = null;
|
||||
if (lstGridMode.getSelectedItem() != null && lstGridMode.getSelectedItem().toString().length() > 0)
|
||||
gridview = lstGridMode.getSelectedItem().toString();
|
||||
if (m_tabcust != null && m_tabcust.getAD_Tab_Customization_ID() > 0) {
|
||||
m_tabcust.setCustom(custom.toString());
|
||||
m_tabcust.setIsDisplayedGrid(gridview);
|
||||
} else {
|
||||
m_tabcust = new MTabCustomization(Env.getCtx(), 0, null);
|
||||
m_tabcust.setAD_Tab_ID(m_AD_Tab_ID);
|
||||
m_tabcust.set_ValueOfColumn("AD_User_ID", m_AD_User_ID);
|
||||
m_tabcust.setCustom(custom.toString());
|
||||
m_tabcust.setIsDisplayedGrid(gridview);
|
||||
}
|
||||
if (uc.getCustom() == null || uc.getCustom().trim().length() == 0)
|
||||
if (m_tabcust.getCustom() == null || m_tabcust.getCustom().trim().length() == 0)
|
||||
{
|
||||
if (uc.is_new())
|
||||
if (m_tabcust.is_new())
|
||||
{
|
||||
//no action needed
|
||||
getParent().detach();
|
||||
|
@ -551,12 +567,12 @@ public class CustomizeGridViewPanel extends Panel
|
|||
}
|
||||
else
|
||||
{
|
||||
ok = uc.delete(true);
|
||||
ok = m_tabcust.delete(true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ok = uc.save();
|
||||
ok = m_tabcust.save();
|
||||
}
|
||||
//
|
||||
if(ok) {
|
||||
|
@ -579,19 +595,15 @@ public class CustomizeGridViewPanel extends Panel
|
|||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -5645910649588308798L;
|
||||
private static final long serialVersionUID = -1717531470895073281L;
|
||||
|
||||
private int m_key;
|
||||
private int m_AD_Client_ID;
|
||||
private int m_AD_Org_ID;
|
||||
/** Initial selection flag */
|
||||
|
||||
private boolean m_updateable;
|
||||
|
||||
public ListElement(int key, String name, int AD_Client_ID, int AD_Org_ID) {
|
||||
public ListElement(int key, String name) {
|
||||
super(name);
|
||||
this.m_key = key;
|
||||
this.m_AD_Client_ID = AD_Client_ID;
|
||||
this.m_AD_Org_ID = AD_Org_ID;
|
||||
this.m_updateable = true;
|
||||
}
|
||||
|
||||
|
@ -599,14 +611,6 @@ public class CustomizeGridViewPanel extends Panel
|
|||
return m_key;
|
||||
}
|
||||
|
||||
public int getAD_Client_ID() {
|
||||
return m_AD_Client_ID;
|
||||
}
|
||||
|
||||
public int getAD_Org_ID() {
|
||||
return m_AD_Org_ID;
|
||||
}
|
||||
|
||||
public boolean isUpdateable() {
|
||||
return m_updateable;
|
||||
}
|
||||
|
@ -630,9 +634,7 @@ public class CustomizeGridViewPanel extends Panel
|
|||
return
|
||||
li.getKey() == m_key
|
||||
&& li.getName() != null
|
||||
&& li.getName().equals(getName())
|
||||
&& li.getAD_Client_ID() == m_AD_Client_ID
|
||||
&& li.getAD_Org_ID() == m_AD_Org_ID;
|
||||
&& li.getName().equals(getName());
|
||||
}
|
||||
return false;
|
||||
} // equals
|
||||
|
@ -713,63 +715,16 @@ public class CustomizeGridViewPanel extends Panel
|
|||
uiCreated = true;
|
||||
}
|
||||
|
||||
public void dynamicDisplay(int i) {
|
||||
}
|
||||
|
||||
public void editRecord(boolean b) {
|
||||
}
|
||||
|
||||
public String getDisplayLogic() {
|
||||
return gridTab.getDisplayLogic();
|
||||
}
|
||||
|
||||
public GridTab getGridTab() {
|
||||
return gridTab;
|
||||
}
|
||||
|
||||
public int getTabLevel() {
|
||||
return gridTab.getTabLevel();
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return gridTab.getName();
|
||||
}
|
||||
|
||||
public boolean isCurrent() {
|
||||
return gridTab != null ? gridTab.isCurrent() : false;
|
||||
}
|
||||
|
||||
public void query() {
|
||||
loadData();
|
||||
}
|
||||
|
||||
public void query(boolean currentRows, int currentDays, int i) {
|
||||
loadData();
|
||||
}
|
||||
|
||||
public void refresh() {
|
||||
loadData();
|
||||
}
|
||||
|
||||
public void switchRowPresentation() {
|
||||
}
|
||||
|
||||
public String get_ValueAsString(String variableName) {
|
||||
return Env.getContext(Env.getCtx(), m_WindowNo, variableName);
|
||||
}
|
||||
|
||||
public void afterSave(boolean onSaveEvent) {
|
||||
}
|
||||
|
||||
public boolean onEnterKey() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean isSaved() {
|
||||
return m_saved;
|
||||
}
|
||||
|
||||
public void setGridPanel(GridView gridPanel){
|
||||
this.gridPanel = gridPanel;
|
||||
}
|
||||
} //ADSortTab
|
||||
|
||||
} //CustomizeGridViewPanel
|
||||
|
|
|
@ -26,6 +26,7 @@ package org.adempiere.webui.panel;
|
|||
import java.sql.Timestamp;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.adempiere.util.Callback;
|
||||
import org.adempiere.webui.AdempiereIdGenerator;
|
||||
import org.adempiere.webui.LayoutUtils;
|
||||
import org.adempiere.webui.component.ComboItem;
|
||||
|
@ -38,6 +39,7 @@ import org.adempiere.webui.session.SessionManager;
|
|||
import org.adempiere.webui.theme.ITheme;
|
||||
import org.adempiere.webui.theme.ThemeManager;
|
||||
import org.adempiere.webui.util.UserPreference;
|
||||
import org.adempiere.webui.window.FDialog;
|
||||
import org.adempiere.webui.window.LoginWindow;
|
||||
import org.compiere.model.MRole;
|
||||
import org.compiere.model.MSysConfig;
|
||||
|
@ -47,6 +49,7 @@ import org.compiere.util.KeyNamePair;
|
|||
import org.compiere.util.Language;
|
||||
import org.compiere.util.Login;
|
||||
import org.compiere.util.Msg;
|
||||
import org.compiere.util.Util;
|
||||
import org.zkoss.zhtml.Table;
|
||||
import org.zkoss.zhtml.Td;
|
||||
import org.zkoss.zhtml.Tr;
|
||||
|
@ -97,6 +100,10 @@ public class RolePanel extends Window implements EventListener<Event>, Deferrabl
|
|||
|
||||
protected boolean m_show = true;
|
||||
|
||||
private RolePanel component;
|
||||
|
||||
private static final String ON_DEFER_LOGOUT = "onDeferLogout";
|
||||
|
||||
public RolePanel(Properties ctx, LoginWindow loginWindow, String userName, boolean show, KeyNamePair[] clientsKNPairs) {
|
||||
this.wndLogin = loginWindow;
|
||||
m_ctx = ctx;
|
||||
|
@ -349,6 +356,9 @@ public class RolePanel extends Window implements EventListener<Event>, Deferrabl
|
|||
}
|
||||
setUserID();
|
||||
updateRoleList();
|
||||
|
||||
this.component = this;
|
||||
component.addEventListener(ON_DEFER_LOGOUT, this);
|
||||
}
|
||||
|
||||
private void updateRoleList()
|
||||
|
@ -505,6 +515,11 @@ public class RolePanel extends Window implements EventListener<Event>, Deferrabl
|
|||
SessionManager.logoutSession();
|
||||
wndLogin.loginCancelled();
|
||||
}
|
||||
else if (ON_DEFER_LOGOUT.equals(event.getName()))
|
||||
{
|
||||
SessionManager.logoutSession();
|
||||
wndLogin.loginCancelled();
|
||||
}
|
||||
}
|
||||
|
||||
private void setUserID() {
|
||||
|
@ -572,16 +587,20 @@ public class RolePanel extends Window implements EventListener<Event>, Deferrabl
|
|||
Timestamp date = (Timestamp)lstDate.getValue();
|
||||
|
||||
String msg = login.loadPreferences(orgKNPair, warehouseKNPair, date, null);
|
||||
|
||||
if(!(msg == null || msg.length() == 0))
|
||||
if (Util.isEmpty(msg))
|
||||
{
|
||||
throw new WrongValueException(msg);
|
||||
}
|
||||
|
||||
msg = login.validateLogin(orgKNPair);
|
||||
if (msg != null && msg.length() > 0)
|
||||
}
|
||||
if (! Util.isEmpty(msg))
|
||||
{
|
||||
throw new WrongValueException(msg);
|
||||
Env.getCtx().clear();
|
||||
FDialog.error(0, this, "Error", msg, new Callback<Integer>() {
|
||||
@Override
|
||||
public void onCallback(Integer result) {
|
||||
Events.echoEvent(new Event(ON_DEFER_LOGOUT, component));
|
||||
}
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
wndLogin.loginCompleted();
|
||||
|
|
|
@ -61,6 +61,7 @@ import org.adempiere.webui.component.ToolBarButton;
|
|||
import org.adempiere.webui.component.Window;
|
||||
import org.adempiere.webui.editor.WEditor;
|
||||
import org.adempiere.webui.editor.WNumberEditor;
|
||||
import org.adempiere.webui.editor.WPaymentEditor;
|
||||
import org.adempiere.webui.editor.WStringEditor;
|
||||
import org.adempiere.webui.editor.WTableDirEditor;
|
||||
import org.adempiere.webui.editor.WebEditorFactory;
|
||||
|
@ -1707,6 +1708,9 @@ public class FindWindow extends Window implements EventListener<Event>, ValueCha
|
|||
editor.setReadWrite(enabled);
|
||||
editor.setVisible(enabled);
|
||||
editor.dynamicDisplay();
|
||||
if (editor instanceof WPaymentEditor) {
|
||||
((WPaymentEditor)editor).getComponent().setEnabled(true, false);
|
||||
}
|
||||
//
|
||||
return editor.getComponent();
|
||||
|
||||
|
|
|
@ -496,6 +496,10 @@ div.wc-modal, div.wc-modal-none, div.wc-highlighted, div.wc-highlighted-none {
|
|||
margin: 0px !important;
|
||||
}
|
||||
|
||||
.desktop-tabbox.with-right-icon .z-tabs .z-toolbar-tabs-body {
|
||||
margin-right: 12px !important;
|
||||
}
|
||||
|
||||
.desktop-tabbox .z-tabs .z-toolbar-tabs-body .z-toolbarbutton {
|
||||
padding: 0px !important;
|
||||
border: 1px solid transparent !important;
|
||||
|
@ -1504,8 +1508,8 @@ i.grid-combobox-editor {
|
|||
.z-west-splt-btn-over,
|
||||
.z-north-splt-btn-over,
|
||||
.z-south-splt-btn-over {
|
||||
-webkit-filter: brightness(-30%);
|
||||
filter: brightness(-30%);
|
||||
-webkit-filter: brightness(50%);
|
||||
filter: brightness(50%);
|
||||
}
|
||||
|
||||
.help-content
|
||||
|
@ -1911,3 +1915,36 @@ table.z-vbox > tbody > tr > td > table {
|
|||
border-radius: 0px;
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
<%-- Context Help --%>
|
||||
.desktop-layout > div > .z-east-colpsd {
|
||||
border: none;
|
||||
width: 0px !important;
|
||||
position: absolute;
|
||||
overflow: visible;
|
||||
padding: 0px !important;
|
||||
margin: 0px !important;
|
||||
}
|
||||
|
||||
.desktop-layout > div > .z-east-colpsd > .z-borderlayout-icon {
|
||||
background-image: url(${c:encodeURL('/theme/default/images/Help16.png')}) !important;
|
||||
background-position:center !important;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
position: relative;
|
||||
left: -20px;
|
||||
background-size: 16px 16px;
|
||||
margin-left: 0px !important;
|
||||
margin-right: 0px !important;
|
||||
margin-top: 4px !important;
|
||||
padding: 3px !important;
|
||||
}
|
||||
|
||||
.desktop-layout > div > .z-east-colpsd > .z-borderlayout-icon:hover {
|
||||
background-color:#DDD !important;
|
||||
-webkit-box-shadow:inset 0px 0px 3px #CCC;
|
||||
-moz-box-shadow:inset 0px 0px 3px #CCC;
|
||||
-o-box-shadow:inset 0px 0px 3px #CCC;
|
||||
-ms-box-shadow:inset 0px 0px 3px #CCC;
|
||||
box-shadow:inset 0px 0px 3px #CCC;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue