IDEMPIERE-4946 : Add IsShowInDashboard, SeqNo and ImageURL on AD_User… (#866)
* IDEMPIERE-4946 : Add IsShowInDashboard, SeqNo and ImageURL on AD_UserDef_Info * IDEMPIERE-4946 : Add IsShowInDashboard, SeqNo and ImageURL on AD_UserDef_Info Use customized image from tenant level when opening the panel * IDEMPIERE-4946 : Add IsShowInDashboard, SeqNo and ImageURL on AD_UserDef_Info - fix migration scripts name
This commit is contained in:
parent
5979f65bbd
commit
a1da95cfff
|
@ -0,0 +1,62 @@
|
||||||
|
SET SQLBLANKLINES ON
|
||||||
|
SET DEFINE OFF
|
||||||
|
|
||||||
|
-- IDEMPIERE-4926
|
||||||
|
-- Sep 6, 2021, 2:41:16 PM CEST
|
||||||
|
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,AD_Table_ID,ColumnName,DefaultValue,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,IsHtml) VALUES (214582,0,'Show in Dashboard','Show the dashlet in the dashboard',200266,'IsShowInDashboard',NULL,1,'N','N','N','N','N',0,'N',20,0,0,'Y',TO_DATE('2021-09-06 14:41:16','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2021-09-06 14:41:16','YYYY-MM-DD HH24:MI:SS'),0,200074,'Y','N','D','N','N','N','Y','1a35ffc9-8410-4c49-a1f9-199b7f63ad43','Y',0,'N','N','N')
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Sep 6, 2021, 2:41:18 PM CEST
|
||||||
|
ALTER TABLE AD_UserDef_Info ADD IsShowInDashboard CHAR(1) DEFAULT NULL CHECK (IsShowInDashboard IN ('Y','N'))
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Sep 6, 2021, 2:41:32 PM CEST
|
||||||
|
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,DefaultValue,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,IsHtml) VALUES (214583,0,'Sequence','Method of ordering records; lowest number comes first','The Sequence indicates the order of records',200266,'SeqNo','0',22,'N','N','Y','N','N',0,'N',11,0,0,'Y',TO_DATE('2021-09-06 14:41:32','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2021-09-06 14:41:32','YYYY-MM-DD HH24:MI:SS'),0,566,'Y','N','D','N','N','N','Y','0fff6c69-6a1c-4a1f-94e7-ace7f8de2d67','Y',0,'N','N','N')
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Sep 6, 2021, 2:41:34 PM CEST
|
||||||
|
ALTER TABLE AD_UserDef_Info ADD SeqNo NUMBER(10) DEFAULT 0 NOT NULL
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Sep 6, 2021, 2:41:46 PM CEST
|
||||||
|
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,IsHtml) VALUES (214584,0,'Image URL','URL of image','URL of image; The image is not stored in the database, but retrieved at runtime. The image can be a gif, jpeg or png.',200266,'ImageURL',120,'N','N','N','N','N',0,'N',10,0,0,'Y',TO_DATE('2021-09-06 14:41:45','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2021-09-06 14:41:45','YYYY-MM-DD HH24:MI:SS'),0,1720,'Y','N','D','N','N','N','Y','3fbb45d7-e7e1-46b2-ab01-abd3a649a086','Y',0,'N','N','N')
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Sep 6, 2021, 2:41:47 PM CEST
|
||||||
|
ALTER TABLE AD_UserDef_Info ADD ImageURL VARCHAR2(120 CHAR) DEFAULT NULL
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Sep 6, 2021, 2:41:56 PM CEST
|
||||||
|
INSERT INTO AD_Field (AD_Field_ID,Name,Description,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan) VALUES (206744,'Show in Dashboard','Show the dashlet in the dashboard',200280,214582,'Y',1,110,'N','N','N','N',0,0,'Y',TO_DATE('2021-09-06 14:41:55','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2021-09-06 14:41:55','YYYY-MM-DD HH24:MI:SS'),0,'N','Y','D','d053c68b-e027-46a2-bf16-95f20bf0a5b9','Y',130,2,2)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Sep 6, 2021, 2:41:56 PM CEST
|
||||||
|
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (206745,'Sequence','Method of ordering records; lowest number comes first','The Sequence indicates the order of records',200280,214583,'Y',22,120,'N','N','N','N',0,0,'Y',TO_DATE('2021-09-06 14:41:56','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2021-09-06 14:41:56','YYYY-MM-DD HH24:MI:SS'),0,'N','Y','D','a13e5dcb-bd6a-495e-94c1-eb27e0a7b827','Y',140,2)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Sep 6, 2021, 2:41:57 PM CEST
|
||||||
|
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (206746,'Image URL','URL of image','URL of image; The image is not stored in the database, but retrieved at runtime. The image can be a gif, jpeg or png.',200280,214584,'Y',120,130,'N','N','N','N',0,0,'Y',TO_DATE('2021-09-06 14:41:56','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2021-09-06 14:41:56','YYYY-MM-DD HH24:MI:SS'),0,'N','Y','D','be2d702e-f1ec-4099-932e-fc4ce7fdf921','Y',150,5)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Sep 6, 2021, 3:19:23 PM CEST
|
||||||
|
UPDATE AD_Field SET AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=3, IsToolbarButton=NULL,Updated=TO_DATE('2021-09-06 15:19:23','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=206745
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Sep 6, 2021, 3:19:32 PM CEST
|
||||||
|
UPDATE AD_Field SET AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, ColumnSpan=2, IsToolbarButton=NULL,Updated=TO_DATE('2021-09-06 15:19:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=206746
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Sep 6, 2021, 3:19:58 PM CEST
|
||||||
|
UPDATE AD_Field SET AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=4, IsToolbarButton=NULL,Updated=TO_DATE('2021-09-06 15:19:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=206745
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Sep 6, 2021, 3:20:23 PM CEST
|
||||||
|
UPDATE AD_Column SET AD_Reference_ID=17, AD_Reference_Value_ID=319,Updated=TO_DATE('2021-09-06 15:20:23','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=214582
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Sep 6, 2021, 3:25:38 PM CEST
|
||||||
|
UPDATE AD_Field SET AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=1, IsToolbarButton=NULL,Updated=TO_DATE('2021-09-06 15:25:38','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=206744
|
||||||
|
;
|
||||||
|
|
||||||
|
SELECT register_migration_script('202109061500_IDEMPIERE-4946.sql') FROM dual
|
||||||
|
;
|
|
@ -0,0 +1,59 @@
|
||||||
|
-- IDEMPIERE-4926
|
||||||
|
-- Sep 6, 2021, 2:41:17 PM CEST
|
||||||
|
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,AD_Table_ID,ColumnName,DefaultValue,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,IsHtml) VALUES (214582,0,'Show in Dashboard','Show the dashlet in the dashboard',200266,'IsShowInDashboard',NULL,1,'N','N','N','N','N',0,'N',20,0,0,'Y',TO_TIMESTAMP('2021-09-06 14:41:16','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2021-09-06 14:41:16','YYYY-MM-DD HH24:MI:SS'),0,200074,'Y','N','D','N','N','N','Y','1a35ffc9-8410-4c49-a1f9-199b7f63ad43','Y',0,'N','N','N')
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Sep 6, 2021, 2:41:18 PM CEST
|
||||||
|
ALTER TABLE AD_UserDef_Info ADD COLUMN IsShowInDashboard CHAR(1) DEFAULT NULL CHECK (IsShowInDashboard IN ('Y','N'))
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Sep 6, 2021, 2:41:32 PM CEST
|
||||||
|
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,DefaultValue,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,IsHtml) VALUES (214583,0,'Sequence','Method of ordering records; lowest number comes first','The Sequence indicates the order of records',200266,'SeqNo','0',22,'N','N','Y','N','N',0,'N',11,0,0,'Y',TO_TIMESTAMP('2021-09-06 14:41:32','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2021-09-06 14:41:32','YYYY-MM-DD HH24:MI:SS'),0,566,'Y','N','D','N','N','N','Y','0fff6c69-6a1c-4a1f-94e7-ace7f8de2d67','Y',0,'N','N','N')
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Sep 6, 2021, 2:41:34 PM CEST
|
||||||
|
ALTER TABLE AD_UserDef_Info ADD COLUMN SeqNo NUMERIC(10) DEFAULT '0' NOT NULL
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Sep 6, 2021, 2:41:46 PM CEST
|
||||||
|
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,IsHtml) VALUES (214584,0,'Image URL','URL of image','URL of image; The image is not stored in the database, but retrieved at runtime. The image can be a gif, jpeg or png.',200266,'ImageURL',120,'N','N','N','N','N',0,'N',10,0,0,'Y',TO_TIMESTAMP('2021-09-06 14:41:45','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2021-09-06 14:41:45','YYYY-MM-DD HH24:MI:SS'),0,1720,'Y','N','D','N','N','N','Y','3fbb45d7-e7e1-46b2-ab01-abd3a649a086','Y',0,'N','N','N')
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Sep 6, 2021, 2:41:47 PM CEST
|
||||||
|
ALTER TABLE AD_UserDef_Info ADD COLUMN ImageURL VARCHAR(120) DEFAULT NULL
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Sep 6, 2021, 2:41:56 PM CEST
|
||||||
|
INSERT INTO AD_Field (AD_Field_ID,Name,Description,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan) VALUES (206744,'Show in Dashboard','Show the dashlet in the dashboard',200280,214582,'Y',1,110,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2021-09-06 14:41:55','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2021-09-06 14:41:55','YYYY-MM-DD HH24:MI:SS'),0,'N','Y','D','d053c68b-e027-46a2-bf16-95f20bf0a5b9','Y',130,2,2)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Sep 6, 2021, 2:41:56 PM CEST
|
||||||
|
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (206745,'Sequence','Method of ordering records; lowest number comes first','The Sequence indicates the order of records',200280,214583,'Y',22,120,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2021-09-06 14:41:56','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2021-09-06 14:41:56','YYYY-MM-DD HH24:MI:SS'),0,'N','Y','D','a13e5dcb-bd6a-495e-94c1-eb27e0a7b827','Y',140,2)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Sep 6, 2021, 2:41:57 PM CEST
|
||||||
|
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (206746,'Image URL','URL of image','URL of image; The image is not stored in the database, but retrieved at runtime. The image can be a gif, jpeg or png.',200280,214584,'Y',120,130,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2021-09-06 14:41:56','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2021-09-06 14:41:56','YYYY-MM-DD HH24:MI:SS'),0,'N','Y','D','be2d702e-f1ec-4099-932e-fc4ce7fdf921','Y',150,5)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Sep 6, 2021, 3:19:23 PM CEST
|
||||||
|
UPDATE AD_Field SET AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=3, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2021-09-06 15:19:23','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=206745
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Sep 6, 2021, 3:19:32 PM CEST
|
||||||
|
UPDATE AD_Field SET AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, ColumnSpan=2, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2021-09-06 15:19:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=206746
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Sep 6, 2021, 3:19:58 PM CEST
|
||||||
|
UPDATE AD_Field SET AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=4, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2021-09-06 15:19:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=206745
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Sep 6, 2021, 3:20:23 PM CEST
|
||||||
|
UPDATE AD_Column SET AD_Reference_ID=17, AD_Reference_Value_ID=319,Updated=TO_TIMESTAMP('2021-09-06 15:20:23','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=214582
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Sep 6, 2021, 3:25:38 PM CEST
|
||||||
|
UPDATE AD_Field SET AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=1, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2021-09-06 15:25:38','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=206744
|
||||||
|
;
|
||||||
|
|
||||||
|
SELECT register_migration_script('202109061500_IDEMPIERE-4946.sql') FROM dual
|
||||||
|
;
|
|
@ -180,6 +180,19 @@ public interface I_AD_UserDef_Info
|
||||||
*/
|
*/
|
||||||
public String getHelp();
|
public String getHelp();
|
||||||
|
|
||||||
|
/** Column name ImageURL */
|
||||||
|
public static final String COLUMNNAME_ImageURL = "ImageURL";
|
||||||
|
|
||||||
|
/** Set Image URL.
|
||||||
|
* URL of image
|
||||||
|
*/
|
||||||
|
public void setImageURL (String ImageURL);
|
||||||
|
|
||||||
|
/** Get Image URL.
|
||||||
|
* URL of image
|
||||||
|
*/
|
||||||
|
public String getImageURL();
|
||||||
|
|
||||||
/** Column name IsActive */
|
/** Column name IsActive */
|
||||||
public static final String COLUMNNAME_IsActive = "IsActive";
|
public static final String COLUMNNAME_IsActive = "IsActive";
|
||||||
|
|
||||||
|
@ -193,6 +206,19 @@ public interface I_AD_UserDef_Info
|
||||||
*/
|
*/
|
||||||
public boolean isActive();
|
public boolean isActive();
|
||||||
|
|
||||||
|
/** Column name IsShowInDashboard */
|
||||||
|
public static final String COLUMNNAME_IsShowInDashboard = "IsShowInDashboard";
|
||||||
|
|
||||||
|
/** Set Show in Dashboard.
|
||||||
|
* Show the dashlet in the dashboard
|
||||||
|
*/
|
||||||
|
public void setIsShowInDashboard (String IsShowInDashboard);
|
||||||
|
|
||||||
|
/** Get Show in Dashboard.
|
||||||
|
* Show the dashlet in the dashboard
|
||||||
|
*/
|
||||||
|
public String getIsShowInDashboard();
|
||||||
|
|
||||||
/** Column name Name */
|
/** Column name Name */
|
||||||
public static final String COLUMNNAME_Name = "Name";
|
public static final String COLUMNNAME_Name = "Name";
|
||||||
|
|
||||||
|
@ -206,6 +232,21 @@ public interface I_AD_UserDef_Info
|
||||||
*/
|
*/
|
||||||
public String getName();
|
public String getName();
|
||||||
|
|
||||||
|
/** Column name SeqNo */
|
||||||
|
public static final String COLUMNNAME_SeqNo = "SeqNo";
|
||||||
|
|
||||||
|
/** Set Sequence.
|
||||||
|
* Method of ordering records;
|
||||||
|
lowest number comes first
|
||||||
|
*/
|
||||||
|
public void setSeqNo (int SeqNo);
|
||||||
|
|
||||||
|
/** Get Sequence.
|
||||||
|
* Method of ordering records;
|
||||||
|
lowest number comes first
|
||||||
|
*/
|
||||||
|
public int getSeqNo();
|
||||||
|
|
||||||
/** Column name Updated */
|
/** Column name Updated */
|
||||||
public static final String COLUMNNAME_Updated = "Updated";
|
public static final String COLUMNNAME_Updated = "Updated";
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ public class X_AD_UserDef_Info extends PO implements I_AD_UserDef_Info, I_Persis
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private static final long serialVersionUID = 20201220L;
|
private static final long serialVersionUID = 20210906L;
|
||||||
|
|
||||||
/** Standard Constructor */
|
/** Standard Constructor */
|
||||||
public X_AD_UserDef_Info (Properties ctx, int AD_UserDef_Info_ID, String trxName)
|
public X_AD_UserDef_Info (Properties ctx, int AD_UserDef_Info_ID, String trxName)
|
||||||
|
@ -39,6 +39,8 @@ public class X_AD_UserDef_Info extends PO implements I_AD_UserDef_Info, I_Persis
|
||||||
{
|
{
|
||||||
setAD_InfoWindow_ID (0);
|
setAD_InfoWindow_ID (0);
|
||||||
setAD_UserDef_Info_ID (0);
|
setAD_UserDef_Info_ID (0);
|
||||||
|
setSeqNo (0);
|
||||||
|
// 0
|
||||||
} */
|
} */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -242,6 +244,47 @@ public class X_AD_UserDef_Info extends PO implements I_AD_UserDef_Info, I_Persis
|
||||||
return (String)get_Value(COLUMNNAME_Help);
|
return (String)get_Value(COLUMNNAME_Help);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Set Image URL.
|
||||||
|
@param ImageURL
|
||||||
|
URL of image
|
||||||
|
*/
|
||||||
|
public void setImageURL (String ImageURL)
|
||||||
|
{
|
||||||
|
set_ValueNoCheck (COLUMNNAME_ImageURL, ImageURL);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Get Image URL.
|
||||||
|
@return URL of image
|
||||||
|
*/
|
||||||
|
public String getImageURL ()
|
||||||
|
{
|
||||||
|
return (String)get_Value(COLUMNNAME_ImageURL);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** IsShowInDashboard AD_Reference_ID=319 */
|
||||||
|
public static final int ISSHOWINDASHBOARD_AD_Reference_ID=319;
|
||||||
|
/** Yes = Y */
|
||||||
|
public static final String ISSHOWINDASHBOARD_Yes = "Y";
|
||||||
|
/** No = N */
|
||||||
|
public static final String ISSHOWINDASHBOARD_No = "N";
|
||||||
|
/** Set Show in Dashboard.
|
||||||
|
@param IsShowInDashboard
|
||||||
|
Show the dashlet in the dashboard
|
||||||
|
*/
|
||||||
|
public void setIsShowInDashboard (String IsShowInDashboard)
|
||||||
|
{
|
||||||
|
|
||||||
|
set_Value (COLUMNNAME_IsShowInDashboard, IsShowInDashboard);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Get Show in Dashboard.
|
||||||
|
@return Show the dashlet in the dashboard
|
||||||
|
*/
|
||||||
|
public String getIsShowInDashboard ()
|
||||||
|
{
|
||||||
|
return (String)get_Value(COLUMNNAME_IsShowInDashboard);
|
||||||
|
}
|
||||||
|
|
||||||
/** Set Name.
|
/** Set Name.
|
||||||
@param Name
|
@param Name
|
||||||
Alphanumeric identifier of the entity
|
Alphanumeric identifier of the entity
|
||||||
|
@ -258,4 +301,24 @@ public class X_AD_UserDef_Info extends PO implements I_AD_UserDef_Info, I_Persis
|
||||||
{
|
{
|
||||||
return (String)get_Value(COLUMNNAME_Name);
|
return (String)get_Value(COLUMNNAME_Name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Set Sequence.
|
||||||
|
@param SeqNo
|
||||||
|
Method of ordering records; lowest number comes first
|
||||||
|
*/
|
||||||
|
public void setSeqNo (int SeqNo)
|
||||||
|
{
|
||||||
|
set_Value (COLUMNNAME_SeqNo, Integer.valueOf(SeqNo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Get Sequence.
|
||||||
|
@return Method of ordering records; lowest number comes first
|
||||||
|
*/
|
||||||
|
public int getSeqNo ()
|
||||||
|
{
|
||||||
|
Integer ii = (Integer)get_Value(COLUMNNAME_SeqNo);
|
||||||
|
if (ii == null)
|
||||||
|
return 0;
|
||||||
|
return ii.intValue();
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -25,6 +25,9 @@ import org.adempiere.webui.adwindow.ADWindow;
|
||||||
import org.adempiere.webui.util.ManageImageCache;
|
import org.adempiere.webui.util.ManageImageCache;
|
||||||
import org.compiere.model.MImage;
|
import org.compiere.model.MImage;
|
||||||
import org.compiere.model.MInfoWindow;
|
import org.compiere.model.MInfoWindow;
|
||||||
|
import org.compiere.model.MUserDefInfo;
|
||||||
|
import org.compiere.util.Env;
|
||||||
|
import org.compiere.util.Util;
|
||||||
import org.zkoss.image.Image;
|
import org.zkoss.image.Image;
|
||||||
import org.zkoss.zk.ui.Component;
|
import org.zkoss.zk.ui.Component;
|
||||||
import org.zkoss.zk.ui.event.Events;
|
import org.zkoss.zk.ui.event.Events;
|
||||||
|
@ -132,7 +135,16 @@ public class Tab extends org.zkoss.zul.Tab
|
||||||
}
|
}
|
||||||
|
|
||||||
public static DecorateInfo get (MInfoWindow mInfo){
|
public static DecorateInfo get (MInfoWindow mInfo){
|
||||||
return mInfo==null?null:new DecorateInfo(mInfo.getImageURL());
|
|
||||||
|
if (mInfo != null) {
|
||||||
|
String image = mInfo.getImageURL();
|
||||||
|
MUserDefInfo userDef = MUserDefInfo.getBestMatch(Env.getCtx(), mInfo.getAD_InfoWindow_ID());
|
||||||
|
if (userDef != null && !Util.isEmpty(userDef.getImageURL()))
|
||||||
|
image = userDef.getImageURL();
|
||||||
|
|
||||||
|
return new DecorateInfo(image);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,9 @@
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
package org.adempiere.webui.dashboard;
|
package org.adempiere.webui.dashboard;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.Comparator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.adempiere.webui.LayoutUtils;
|
import org.adempiere.webui.LayoutUtils;
|
||||||
|
@ -91,29 +94,56 @@ public class DPViews extends DashboardPanel implements EventListener<Event> {
|
||||||
LayoutUtils.addSclass("medium-toolbarbutton toolbarbutton-with-text", btnViewItem);
|
LayoutUtils.addSclass("medium-toolbarbutton toolbarbutton-with-text", btnViewItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
List<MInfoWindow> list = new Query(Env.getCtx(), MInfoWindow.Table_Name, "IsValid='Y' AND IsShowInDashboard='Y'", null)
|
List<MInfoWindow> listAll = new Query(Env.getCtx(), MInfoWindow.Table_Name, "IsValid='Y'", null)
|
||||||
.setOnlyActiveRecords(true)
|
.setOnlyActiveRecords(true)
|
||||||
.setOrderBy(MInfoWindow.COLUMNNAME_SeqNo)
|
|
||||||
.list();
|
.list();
|
||||||
|
|
||||||
MInfoWindow[] infos = list.toArray(new MInfoWindow[list.size()]);
|
MInfoWindow[] infosAll = listAll.toArray(new MInfoWindow[listAll.size()]);
|
||||||
|
|
||||||
for (int i = 0; i < infos.length; i++)
|
List<ListInfoWindow> selectedInfoWindows = new ArrayList<ListInfoWindow>();
|
||||||
|
|
||||||
|
for (int i = 0; i < infosAll.length; i++)
|
||||||
{
|
{
|
||||||
MInfoWindow info = infos[i];
|
MInfoWindow info = infosAll[i];
|
||||||
|
if (MInfoWindow.get(info.getAD_InfoWindow_ID(), null) != null)
|
||||||
|
{
|
||||||
|
MUserDefInfo userDef = MUserDefInfo.getBestMatch(Env.getCtx(), info.getAD_InfoWindow_ID());
|
||||||
|
|
||||||
|
if (userDef != null) {
|
||||||
|
|
||||||
|
if ((info.isShowInDashboard() && Util.isEmpty(userDef.getIsShowInDashboard())) || userDef.getIsShowInDashboard().equals(MUserDefInfo.ISSHOWINDASHBOARD_Yes)) {
|
||||||
|
int seqNo = userDef.getSeqNo() > 0 ? userDef.getSeqNo() : info.getSeqNo();
|
||||||
|
selectedInfoWindows.add(new ListInfoWindow(info, seqNo));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (info.isShowInDashboard())
|
||||||
|
selectedInfoWindows.add(new ListInfoWindow(info, info.getSeqNo()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Collections.sort(selectedInfoWindows, new SeqNoComparator());
|
||||||
|
|
||||||
|
for (ListInfoWindow so : selectedInfoWindows) {
|
||||||
|
MInfoWindow info = so.getInfoWindow();
|
||||||
if (MInfoWindow.get(info.getAD_InfoWindow_ID(), null) != null)
|
if (MInfoWindow.get(info.getAD_InfoWindow_ID(), null) != null)
|
||||||
{
|
{
|
||||||
// Load User Def
|
// Load User Def
|
||||||
String name = info.get_Translation("Name");
|
String name = info.get_Translation("Name");
|
||||||
|
String image = (Util.isEmpty(info.getImageURL()) ? "Info16.png" : info.getImageURL());
|
||||||
|
|
||||||
MUserDefInfo userDef = MUserDefInfo.getBestMatch(Env.getCtx(), info.getAD_InfoWindow_ID());
|
MUserDefInfo userDef = MUserDefInfo.getBestMatch(Env.getCtx(), info.getAD_InfoWindow_ID());
|
||||||
if(userDef != null && !Util.isEmpty(userDef.getName())) {
|
if(userDef != null) {
|
||||||
|
|
||||||
|
if (!Util.isEmpty(userDef.getName()))
|
||||||
name = userDef.getName();
|
name = userDef.getName();
|
||||||
|
if (!Util.isEmpty(userDef.getImageURL()))
|
||||||
|
image = userDef.getImageURL();
|
||||||
}
|
}
|
||||||
|
|
||||||
ToolBarButton btnViewItem = new ToolBarButton(info.getName());
|
ToolBarButton btnViewItem = new ToolBarButton(info.getName());
|
||||||
btnViewItem.setSclass("link");
|
btnViewItem.setSclass("link");
|
||||||
btnViewItem.setLabel(name);
|
btnViewItem.setLabel(name);
|
||||||
String image = (Util.isEmpty(info.getImageURL()) ? "Info16.png" : info.getImageURL());
|
|
||||||
if (ThemeManager.isUseFontIconForImage())
|
if (ThemeManager.isUseFontIconForImage())
|
||||||
{
|
{
|
||||||
image = image.replace("16.png", "");
|
image = image.replace("16.png", "");
|
||||||
|
@ -170,4 +200,38 @@ public class DPViews extends DashboardPanel implements EventListener<Event> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* List of Info Windows to be displayed in the panel
|
||||||
|
* @author nmicoud
|
||||||
|
*/
|
||||||
|
private class ListInfoWindow {
|
||||||
|
|
||||||
|
MInfoWindow iw = null;
|
||||||
|
int seqNo = 0;
|
||||||
|
|
||||||
|
public ListInfoWindow(MInfoWindow infoWindow, int seqNo) {
|
||||||
|
iw = infoWindow;
|
||||||
|
this.seqNo = seqNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getSeqNo() {
|
||||||
|
return seqNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MInfoWindow getInfoWindow() {
|
||||||
|
return iw;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author nmicoud
|
||||||
|
* IDEMPIERE-4946 Implement InfoWindow SeqNo customization
|
||||||
|
*/
|
||||||
|
public static class SeqNoComparator implements Comparator<ListInfoWindow> {
|
||||||
|
@Override
|
||||||
|
public int compare(ListInfoWindow iw1, ListInfoWindow iw2) {
|
||||||
|
return (Integer.valueOf(iw1.getSeqNo())).compareTo(Integer.valueOf(iw2.getSeqNo()));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue