* Allow user to control the dashboard panel to be static or collapsible
This commit is contained in:
parent
dceeb9d84a
commit
d9a35cc452
|
@ -1,31 +1,22 @@
|
||||||
/**********************************************************************
|
/******************************************************************************
|
||||||
* This file is part of Adempiere ERP Bazaar *
|
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||||
* http://www.adempiere.org *
|
* Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. *
|
||||||
* *
|
* This program is free software;
|
||||||
* Copyright (C) Trifon Trifonov. *
|
you can redistribute it and/or modify it *
|
||||||
* Copyright (C) Contributors *
|
* under the terms version 2 of the GNU General Public License as published *
|
||||||
* *
|
* by the Free Software Foundation. This program is distributed in the hope *
|
||||||
* This program is free software, you can redistribute it and/or *
|
* that it will be useful, but WITHOUT ANY WARRANTY;
|
||||||
* modify it under the terms of the GNU General Public License *
|
without even the implied *
|
||||||
* as published by the Free Software Foundation, either version 2 *
|
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||||
* of the License, or (at your option) any later version. *
|
* See the GNU General Public License for more details. *
|
||||||
* *
|
* You should have received a copy of the GNU General Public License along *
|
||||||
* This program is distributed in the hope that it will be useful, *
|
* with this program;
|
||||||
* but WITHOUT ANY WARRANTY, without even the implied warranty of *
|
if not, write to the Free Software Foundation, Inc., *
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||||
* GNU General Public License for more details. *
|
* For the text or an alternative of this public license, you may reach us *
|
||||||
* *
|
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||||
* You should have received a copy of the GNU General Public License *
|
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||||
* along with this program, if not, write to the Free Software *
|
*****************************************************************************/
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
|
|
||||||
* MA 02110-1301, USA. *
|
|
||||||
* *
|
|
||||||
* Contributors: *
|
|
||||||
* - Trifon Trifonov (trifonnt@users.sourceforge.net) *
|
|
||||||
* *
|
|
||||||
* Sponsors: *
|
|
||||||
* - Company (http://www.site.com) *
|
|
||||||
**********************************************************************/
|
|
||||||
package org.compiere.model;
|
package org.compiere.model;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
@ -52,6 +43,19 @@ public interface I_PA_DashboardContent
|
||||||
|
|
||||||
/** Load Meta Data */
|
/** Load Meta Data */
|
||||||
|
|
||||||
|
/** Column name AD_Org_ID */
|
||||||
|
public static final String COLUMNNAME_AD_Org_ID = "AD_Org_ID";
|
||||||
|
|
||||||
|
/** Set Organization.
|
||||||
|
* Organizational entity within client
|
||||||
|
*/
|
||||||
|
public void setAD_Org_ID (int AD_Org_ID);
|
||||||
|
|
||||||
|
/** Get Organization.
|
||||||
|
* Organizational entity within client
|
||||||
|
*/
|
||||||
|
public int getAD_Org_ID();
|
||||||
|
|
||||||
/** Column name AD_Window_ID */
|
/** Column name AD_Window_ID */
|
||||||
public static final String COLUMNNAME_AD_Window_ID = "AD_Window_ID";
|
public static final String COLUMNNAME_AD_Window_ID = "AD_Window_ID";
|
||||||
|
|
||||||
|
@ -102,6 +106,19 @@ public interface I_PA_DashboardContent
|
||||||
/** Get HTML */
|
/** Get HTML */
|
||||||
public String getHTML();
|
public String getHTML();
|
||||||
|
|
||||||
|
/** Column name IsCollapsable */
|
||||||
|
public static final String COLUMNNAME_IsCollapsable = "IsCollapsable";
|
||||||
|
|
||||||
|
/** Set Collapsable.
|
||||||
|
* Flag to indicate the state of dashboard panel (i.e. collapsable or static)
|
||||||
|
*/
|
||||||
|
public void setIsCollapsable (boolean IsCollapsable);
|
||||||
|
|
||||||
|
/** Get Collapsable.
|
||||||
|
* Flag to indicate the state of dashboard panel (i.e. collapsable or static)
|
||||||
|
*/
|
||||||
|
public boolean isCollapsable();
|
||||||
|
|
||||||
/** Column name Line */
|
/** Column name Line */
|
||||||
public static final String COLUMNNAME_Line = "Line";
|
public static final String COLUMNNAME_Line = "Line";
|
||||||
|
|
||||||
|
|
|
@ -42,6 +42,8 @@ public class X_PA_DashboardContent extends PO implements I_PA_DashboardContent,
|
||||||
super (ctx, PA_DashboardContent_ID, trxName);
|
super (ctx, PA_DashboardContent_ID, trxName);
|
||||||
/** if (PA_DashboardContent_ID == 0)
|
/** if (PA_DashboardContent_ID == 0)
|
||||||
{
|
{
|
||||||
|
setIsCollapsable (true);
|
||||||
|
// Y
|
||||||
setName (null);
|
setName (null);
|
||||||
setPA_DashboardContent_ID (0);
|
setPA_DashboardContent_ID (0);
|
||||||
} */
|
} */
|
||||||
|
@ -165,6 +167,30 @@ public class X_PA_DashboardContent extends PO implements I_PA_DashboardContent,
|
||||||
return (String)get_Value(COLUMNNAME_HTML);
|
return (String)get_Value(COLUMNNAME_HTML);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Set Collapsable.
|
||||||
|
@param IsCollapsable
|
||||||
|
Flag to indicate the state of dashboard panel (i.e. collapsable or static)
|
||||||
|
*/
|
||||||
|
public void setIsCollapsable (boolean IsCollapsable)
|
||||||
|
{
|
||||||
|
set_Value (COLUMNNAME_IsCollapsable, Boolean.valueOf(IsCollapsable));
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Get Collapsable.
|
||||||
|
@return Flag to indicate the state of dashboard panel (i.e. collapsable or static)
|
||||||
|
*/
|
||||||
|
public boolean isCollapsable ()
|
||||||
|
{
|
||||||
|
Object oo = get_Value(COLUMNNAME_IsCollapsable);
|
||||||
|
if (oo != null)
|
||||||
|
{
|
||||||
|
if (oo instanceof Boolean)
|
||||||
|
return ((Boolean)oo).booleanValue();
|
||||||
|
return "Y".equals(oo);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/** Set Line No.
|
/** Set Line No.
|
||||||
@param Line
|
@param Line
|
||||||
Unique line for this document
|
Unique line for this document
|
||||||
|
|
|
@ -0,0 +1,35 @@
|
||||||
|
-- Dec 10, 2008 3:05:18 PM SGT
|
||||||
|
-- Allow user to control the dashboard panel to be static or collapsible
|
||||||
|
INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,Help,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,53715,0,'IsCollapsible',TO_DATE('2008-12-10 15:05:17','YYYY-MM-DD HH24:MI:SS'),100,'Flag to indicate the state of the dashboard panel','D','Flag to indicate the state of the dashboard panel (i.e. collapsible or static)','Y','Collapsible','Collapsible',TO_DATE('2008-12-10 15:05:17','YYYY-MM-DD HH24:MI:SS'),100)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Dec 10, 2008 3:05:19 PM SGT
|
||||||
|
-- Allow user to control the dashboard panel to be static or collapsible
|
||||||
|
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=53715 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Dec 10, 2008 3:05:44 PM SGT
|
||||||
|
-- Allow user to control the dashboard panel to be static or collapsible
|
||||||
|
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56522,53715,0,20,50010,'IsCollapsible',TO_DATE('2008-12-10 15:05:40','YYYY-MM-DD HH24:MI:SS'),100,'Y','Flag to indicate the state of the dashboard panel','D',1,'Flag to indicate the state of the dashboard panel (i.e. collapsible or static)','Y','Y','N','N','N','N','N','Y','N','N','N','N','Y','Collapsible',0,TO_DATE('2008-12-10 15:05:40','YYYY-MM-DD HH24:MI:SS'),100,0)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Dec 10, 2008 3:05:44 PM SGT
|
||||||
|
-- Allow user to control the dashboard panel to be static or collapsible
|
||||||
|
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56522 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Dec 10, 2008 3:05:47 PM SGT
|
||||||
|
-- Allow user to control the dashboard panel to be static or collapsible
|
||||||
|
ALTER TABLE PA_DashboardContent ADD IsCollapsible CHAR(1) DEFAULT 'Y' CHECK (IsCollapsible IN ('Y','N')) NOT NULL
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Dec 10, 2008 3:06:04 PM SGT
|
||||||
|
-- Allow user to control the dashboard panel to be static or collapsible
|
||||||
|
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56522,56504,0,50010,TO_DATE('2008-12-10 15:06:00','YYYY-MM-DD HH24:MI:SS'),100,'Flag to indicate the state of the dashboard panel',1,'D','Flag to indicate the state of the dashboard panel (i.e. collapsible or static)','Y','Y','Y','N','N','N','N','N','Collapsible',TO_DATE('2008-12-10 15:06:00','YYYY-MM-DD HH24:MI:SS'),100)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Dec 10, 2008 3:06:04 PM SGT
|
||||||
|
-- Allow user to control the dashboard panel to be static or collapsible
|
||||||
|
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56504 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID)
|
||||||
|
;
|
||||||
|
|
|
@ -0,0 +1,35 @@
|
||||||
|
-- Dec 10, 2008 3:05:19 PM SGT
|
||||||
|
-- Allow user to control the dashboard panel to be static or collapsible
|
||||||
|
INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,Help,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,53715,0,'IsCollapsible',TO_TIMESTAMP('2008-12-10 15:05:17','YYYY-MM-DD HH24:MI:SS'),100,'Flag to indicate the state of the dashboard panel','D','Flag to indicate the state of the dashboard panel (i.e. collapsible or static)','Y','Collapsible','Collapsible',TO_TIMESTAMP('2008-12-10 15:05:17','YYYY-MM-DD HH24:MI:SS'),100)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Dec 10, 2008 3:05:19 PM SGT
|
||||||
|
-- Allow user to control the dashboard panel to be static or collapsible
|
||||||
|
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=53715 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Dec 10, 2008 3:05:44 PM SGT
|
||||||
|
-- Allow user to control the dashboard panel to be static or collapsible
|
||||||
|
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56522,53715,0,20,50010,'IsCollapsible',TO_TIMESTAMP('2008-12-10 15:05:40','YYYY-MM-DD HH24:MI:SS'),100,'Y','Flag to indicate the state of the dashboard panel','D',1,'Flag to indicate the state of the dashboard panel (i.e. collapsible or static)','Y','Y','N','N','N','N','N','Y','N','N','N','N','Y','Collapsible',0,TO_TIMESTAMP('2008-12-10 15:05:40','YYYY-MM-DD HH24:MI:SS'),100,0)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Dec 10, 2008 3:05:44 PM SGT
|
||||||
|
-- Allow user to control the dashboard panel to be static or collapsible
|
||||||
|
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56522 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Dec 10, 2008 3:05:47 PM SGT
|
||||||
|
-- Allow user to control the dashboard panel to be static or collapsible
|
||||||
|
ALTER TABLE PA_DashboardContent ADD COLUMN IsCollapsible CHAR(1) DEFAULT 'Y' CHECK (IsCollapsible IN ('Y','N')) NOT NULL
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Dec 10, 2008 3:06:04 PM SGT
|
||||||
|
-- Allow user to control the dashboard panel to be static or collapsible
|
||||||
|
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56522,56504,0,50010,TO_TIMESTAMP('2008-12-10 15:06:00','YYYY-MM-DD HH24:MI:SS'),100,'Flag to indicate the state of the dashboard panel',1,'D','Flag to indicate the state of the dashboard panel (i.e. collapsible or static)','Y','Y','Y','N','N','N','N','N','Collapsible',TO_TIMESTAMP('2008-12-10 15:06:00','YYYY-MM-DD HH24:MI:SS'),100)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Dec 10, 2008 3:06:04 PM SGT
|
||||||
|
-- Allow user to control the dashboard panel to be static or collapsible
|
||||||
|
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56504 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID)
|
||||||
|
;
|
||||||
|
|
|
@ -232,7 +232,9 @@ public class Desktop extends AbstractUIPart implements MenuListener, Serializabl
|
||||||
if(description != null)
|
if(description != null)
|
||||||
panel.setTooltiptext(description);
|
panel.setTooltiptext(description);
|
||||||
|
|
||||||
panel.setCollapsible(true);
|
boolean collapsible = rs.getString(X_PA_DashboardContent.COLUMNNAME_IsCollapsable).equals("Y");
|
||||||
|
panel.setCollapsible(collapsible);
|
||||||
|
|
||||||
panel.setBorder("normal");
|
panel.setBorder("normal");
|
||||||
portalchildren.appendChild(panel);
|
portalchildren.appendChild(panel);
|
||||||
Panelchildren content = new Panelchildren();
|
Panelchildren content = new Panelchildren();
|
||||||
|
|
Loading…
Reference in New Issue