IDEMPIERE-5743 Info Window: Add Optional Auto Collapsed Parameter Panel option (#1862)
This commit is contained in:
parent
8096d6e420
commit
cc831e41d8
|
@ -0,0 +1,10 @@
|
||||||
|
-- IDEMPIERE-5743 Info Window: Add Optional Auto Collapsed Parameter Panel option
|
||||||
|
SELECT register_migration_script('202305291035_IDEMPIERE-5743.sql') FROM dual;
|
||||||
|
|
||||||
|
SET SQLBLANKLINES ON
|
||||||
|
SET DEFINE OFF
|
||||||
|
|
||||||
|
-- May 29, 2023, 10:35:50 AM MYT
|
||||||
|
INSERT INTO AD_SysConfig (AD_SysConfig_ID,AD_Client_ID,AD_Org_ID,Created,Updated,CreatedBy,UpdatedBy,IsActive,Name,Value,Description,EntityType,ConfigurationLevel,AD_SysConfig_UU) VALUES (200229,0,0,TO_TIMESTAMP('2023-05-29 10:35:48','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2023-05-29 10:35:48','YYYY-MM-DD HH24:MI:SS'),100,100,'Y','ZK_INFO_AUTO_COLLAPSED_PARAMETER_PANEL','N','Y/N. When Set to Y, Info Window will auto collaped parameter panel after query execution return one or more records.','D','C','2dd62df4-feac-4f93-8299-a0798a4aed8d')
|
||||||
|
;
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
-- IDEMPIERE-5743 Info Window: Add Optional Auto Collapsed Parameter Panel option
|
||||||
|
SELECT register_migration_script('202305291035_IDEMPIERE-5743.sql') FROM dual;
|
||||||
|
|
||||||
|
-- May 29, 2023, 10:35:50 AM MYT
|
||||||
|
INSERT INTO AD_SysConfig (AD_SysConfig_ID,AD_Client_ID,AD_Org_ID,Created,Updated,CreatedBy,UpdatedBy,IsActive,Name,Value,Description,EntityType,ConfigurationLevel,AD_SysConfig_UU) VALUES (200229,0,0,TO_TIMESTAMP('2023-05-29 10:35:48','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2023-05-29 10:35:48','YYYY-MM-DD HH24:MI:SS'),100,100,'Y','ZK_INFO_AUTO_COLLAPSED_PARAMETER_PANEL','N','Y/N. When Set to Y, Info Window will auto collaped parameter panel after query execution return one or more records.','D','C','2dd62df4-feac-4f93-8299-a0798a4aed8d')
|
||||||
|
;
|
||||||
|
|
|
@ -222,6 +222,7 @@ public class MSysConfig extends X_AD_SysConfig
|
||||||
public static final String ZK_GRID_MOBILE_MAX_COLUMNS = "ZK_GRID_MOBILE_MAX_COLUMNS";
|
public static final String ZK_GRID_MOBILE_MAX_COLUMNS = "ZK_GRID_MOBILE_MAX_COLUMNS";
|
||||||
public static final String ZK_GRID_MOBILE_SHOW_CURRENT_ROW_INDICATOR = "ZK_GRID_MOBILE_SHOW_CURRENT_ROW_INDICATOR";
|
public static final String ZK_GRID_MOBILE_SHOW_CURRENT_ROW_INDICATOR = "ZK_GRID_MOBILE_SHOW_CURRENT_ROW_INDICATOR";
|
||||||
public static final String ZK_GRID_VIEW_USE_DEFER_RENDERING = "ZK_GRID_VIEW_USE_DEFER_RENDERING";
|
public static final String ZK_GRID_VIEW_USE_DEFER_RENDERING = "ZK_GRID_VIEW_USE_DEFER_RENDERING";
|
||||||
|
public static final String ZK_INFO_AUTO_COLLAPSED_PARAMETER_PANEL = "ZK_INFO_AUTO_COLLAPSED_PARAMETER_PANEL";
|
||||||
public static final String ZK_INFO_AUTO_HIDE_EMPTY_COLUMNS = "ZK_INFO_AUTO_HIDE_EMPTY_COLUMNS";
|
public static final String ZK_INFO_AUTO_HIDE_EMPTY_COLUMNS = "ZK_INFO_AUTO_HIDE_EMPTY_COLUMNS";
|
||||||
public static final String ZK_INFO_NUM_PAGE_PRELOAD = "ZK_INFO_NUM_PAGE_PRELOAD";
|
public static final String ZK_INFO_NUM_PAGE_PRELOAD = "ZK_INFO_NUM_PAGE_PRELOAD";
|
||||||
public static final String ZK_INFO_QUERY_TIME_OUT = "ZK_INFO_QUERY_TIME_OUT";
|
public static final String ZK_INFO_QUERY_TIME_OUT = "ZK_INFO_QUERY_TIME_OUT";
|
||||||
|
|
|
@ -160,9 +160,9 @@ import org.zkoss.zul.impl.InputElement;
|
||||||
*/
|
*/
|
||||||
public class InfoWindow extends InfoPanel implements ValueChangeListener, EventListener<Event> {
|
public class InfoWindow extends InfoPanel implements ValueChangeListener, EventListener<Event> {
|
||||||
/**
|
/**
|
||||||
*
|
* generated serial id
|
||||||
*/
|
*/
|
||||||
private static final long serialVersionUID = -2327249405074671115L;
|
private static final long serialVersionUID = 4004251745919433247L;
|
||||||
|
|
||||||
private static final String ON_QUERY_AFTER_CHANGE = "onQueryAfterChange";
|
private static final String ON_QUERY_AFTER_CHANGE = "onQueryAfterChange";
|
||||||
|
|
||||||
|
@ -212,6 +212,9 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
|
||||||
*/
|
*/
|
||||||
protected Menupopup ipMenu;
|
protected Menupopup ipMenu;
|
||||||
private int noOfParameterColumn;
|
private int noOfParameterColumn;
|
||||||
|
|
||||||
|
private boolean autoCollapsedParameterPanel = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param WindowNo
|
* @param WindowNo
|
||||||
* @param tableName
|
* @param tableName
|
||||||
|
@ -270,6 +273,7 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
|
||||||
super(WindowNo, tableName, keyColumn, multipleSelection, whereClause,
|
super(WindowNo, tableName, keyColumn, multipleSelection, whereClause,
|
||||||
lookup, AD_InfoWindow_ID, queryValue);
|
lookup, AD_InfoWindow_ID, queryValue);
|
||||||
this.m_gridfield = field;
|
this.m_gridfield = field;
|
||||||
|
this.autoCollapsedParameterPanel = MSysConfig.getBooleanValue(MSysConfig.ZK_INFO_AUTO_COLLAPSED_PARAMETER_PANEL, false, Env.getAD_Client_ID(Env.getCtx()));
|
||||||
|
|
||||||
addEventListener(ON_QUERY_AFTER_CHANGE, e -> postQueryAfterChangeEvent());
|
addEventListener(ON_QUERY_AFTER_CHANGE, e -> postQueryAfterChangeEvent());
|
||||||
|
|
||||||
|
@ -2079,6 +2083,9 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
|
||||||
layout.getNorth().setOpen(false);
|
layout.getNorth().setOpen(false);
|
||||||
LayoutUtils.addSclass("slide", layout.getNorth());
|
LayoutUtils.addSclass("slide", layout.getNorth());
|
||||||
}
|
}
|
||||||
|
if (autoCollapsedParameterPanel && m_count > 0) {
|
||||||
|
layout.getNorth().setOpen(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue