IDEMPIERE-2896 UX: Doubleclick in text fields / Peer review
This commit is contained in:
parent
aeecc7cc23
commit
9d0d7f9b5f
|
@ -10,18 +10,10 @@ INSERT INTO AD_Element (AD_Element_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,Cr
|
|||
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,FKConstraintType) VALUES (212330,0,'Toggle on Double Click','Defines if double click in a field on grid mode switch to form view','Defines if double click in a field on grid mode switch to form view',200174,'ToggleOnDoubleClick','N',1,'N','N','N','N','N',0,'N',20,0,0,'Y',TO_DATE('2015-10-22 15:21:43','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2015-10-22 15:21:43','YYYY-MM-DD HH24:MI:SS'),0,202920,'Y','N','D','N','N','N','Y','82ce8855-972f-4673-bfe4-b2f74219a50b','Y',0,'N','N','N')
|
||||
;
|
||||
|
||||
-- Oct 22, 2015 3:21:49 PM CEST
|
||||
INSERT INTO AD_TreeNode (AD_Client_ID,AD_Org_ID, IsActive,Created,CreatedBy,Updated,UpdatedBy, AD_Tree_ID, Node_ID, Parent_ID, SeqNo, AD_TreeNode_UU) SELECT t.AD_Client_ID, 0, 'Y', SysDate, 0, SysDate, 0,t.AD_Tree_ID, 200000, 0, 999, Generate_UUID() FROM AD_Tree t WHERE t.AD_Client_ID=0 AND t.IsActive='Y' AND t.IsAllNodes='Y' AND t.TreeType='TL' AND t.AD_Table_ID=282 AND NOT EXISTS (SELECT * FROM AD_TreeNode e WHERE e.AD_Tree_ID=t.AD_Tree_ID AND Node_ID=200000)
|
||||
;
|
||||
|
||||
-- Oct 22, 2015 3:21:49 PM CEST
|
||||
ALTER TABLE AD_UserPreference ADD ToggleOnDoubleClick CHAR(1) DEFAULT 'N' CHECK (ToggleOnDoubleClick IN ('Y','N'))
|
||||
;
|
||||
|
||||
-- Oct 22, 2015 3:22:22 PM CEST
|
||||
INSERT INTO AD_TreeNode (AD_Client_ID,AD_Org_ID, IsActive,Created,CreatedBy,Updated,UpdatedBy, AD_Tree_ID, Node_ID, Parent_ID, SeqNo, AD_TreeNode_UU) SELECT t.AD_Client_ID, 0, 'Y', SysDate, 0, SysDate, 0,t.AD_Tree_ID, 200001, 0, 999, Generate_UUID() FROM AD_Tree t WHERE t.AD_Client_ID=0 AND t.IsActive='Y' AND t.IsAllNodes='Y' AND t.TreeType='TL' AND t.AD_Table_ID=282 AND NOT EXISTS (SELECT * FROM AD_TreeNode e WHERE e.AD_Tree_ID=t.AD_Tree_ID AND Node_ID=200001)
|
||||
;
|
||||
|
||||
-- Oct 22, 2015 3:22:22 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,XPosition,ColumnSpan) VALUES (203913,'Toggle on Double Click','Defines if double click in a field on grid mode switch to form view','Defines if double click in a field on grid mode switch to form view',200189,212330,'Y',1,80,'N','N','N','N',0,0,'Y',TO_DATE('2015-10-22 15:22:22','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2015-10-22 15:22:22','YYYY-MM-DD HH24:MI:SS'),0,'N','Y','D','606eb6b0-a10e-4807-af1b-a2f7c8519115','Y',80,2,2)
|
||||
;
|
||||
|
|
|
@ -7,18 +7,10 @@ INSERT INTO AD_Element (AD_Element_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,Cr
|
|||
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,FKConstraintType) VALUES (212330,0,'Toggle on Double Click','Defines if double click in a field on grid mode switch to form view','Defines if double click in a field on grid mode switch to form view',200174,'ToggleOnDoubleClick','N',1,'N','N','N','N','N',0,'N',20,0,0,'Y',TO_TIMESTAMP('2015-10-22 15:21:43','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2015-10-22 15:21:43','YYYY-MM-DD HH24:MI:SS'),0,202920,'Y','N','D','N','N','N','Y','82ce8855-972f-4673-bfe4-b2f74219a50b','Y',0,'N','N','N')
|
||||
;
|
||||
|
||||
-- Oct 22, 2015 3:21:49 PM CEST
|
||||
INSERT INTO AD_TreeNode (AD_Client_ID,AD_Org_ID, IsActive,Created,CreatedBy,Updated,UpdatedBy, AD_Tree_ID, Node_ID, Parent_ID, SeqNo, AD_TreeNode_UU) SELECT t.AD_Client_ID, 0, 'Y', statement_timestamp(), 0, statement_timestamp(), 0,t.AD_Tree_ID, 200000, 0, 999, Generate_UUID() FROM AD_Tree t WHERE t.AD_Client_ID=0 AND t.IsActive='Y' AND t.IsAllNodes='Y' AND t.TreeType='TL' AND t.AD_Table_ID=282 AND NOT EXISTS (SELECT * FROM AD_TreeNode e WHERE e.AD_Tree_ID=t.AD_Tree_ID AND Node_ID=200000)
|
||||
;
|
||||
|
||||
-- Oct 22, 2015 3:21:49 PM CEST
|
||||
ALTER TABLE AD_UserPreference ADD COLUMN ToggleOnDoubleClick CHAR(1) DEFAULT 'N' CHECK (ToggleOnDoubleClick IN ('Y','N'))
|
||||
;
|
||||
|
||||
-- Oct 22, 2015 3:22:22 PM CEST
|
||||
INSERT INTO AD_TreeNode (AD_Client_ID,AD_Org_ID, IsActive,Created,CreatedBy,Updated,UpdatedBy, AD_Tree_ID, Node_ID, Parent_ID, SeqNo, AD_TreeNode_UU) SELECT t.AD_Client_ID, 0, 'Y', statement_timestamp(), 0, statement_timestamp(), 0,t.AD_Tree_ID, 200001, 0, 999, Generate_UUID() FROM AD_Tree t WHERE t.AD_Client_ID=0 AND t.IsActive='Y' AND t.IsAllNodes='Y' AND t.TreeType='TL' AND t.AD_Table_ID=282 AND NOT EXISTS (SELECT * FROM AD_TreeNode e WHERE e.AD_Tree_ID=t.AD_Tree_ID AND Node_ID=200001)
|
||||
;
|
||||
|
||||
-- Oct 22, 2015 3:22:22 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,XPosition,ColumnSpan) VALUES (203913,'Toggle on Double Click','Defines if double click in a field on grid mode switch to form view','Defines if double click in a field on grid mode switch to form view',200189,212330,'Y',1,80,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2015-10-22 15:22:22','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2015-10-22 15:22:22','YYYY-MM-DD HH24:MI:SS'),0,'N','Y','D','606eb6b0-a10e-4807-af1b-a2f7c8519115','Y',80,2,2)
|
||||
;
|
||||
|
|
|
@ -155,6 +155,19 @@ public interface I_AD_UserPreference
|
|||
*/
|
||||
public boolean isActive();
|
||||
|
||||
/** Column name ToggleOnDoubleClick */
|
||||
public static final String COLUMNNAME_ToggleOnDoubleClick = "ToggleOnDoubleClick";
|
||||
|
||||
/** Set Toggle on Double Click.
|
||||
* Defines if double click in a field on grid mode switch to form view
|
||||
*/
|
||||
public void setToggleOnDoubleClick (boolean ToggleOnDoubleClick);
|
||||
|
||||
/** Get Toggle on Double Click.
|
||||
* Defines if double click in a field on grid mode switch to form view
|
||||
*/
|
||||
public boolean isToggleOnDoubleClick();
|
||||
|
||||
/** Column name Updated */
|
||||
public static final String COLUMNNAME_Updated = "Updated";
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ public class X_AD_UserPreference extends PO implements I_AD_UserPreference, I_Pe
|
|||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 20150427L;
|
||||
private static final long serialVersionUID = 20151022L;
|
||||
|
||||
/** Standard Constructor */
|
||||
public X_AD_UserPreference (Properties ctx, int AD_UserPreference_ID, String trxName)
|
||||
|
@ -193,4 +193,28 @@ public class X_AD_UserPreference extends PO implements I_AD_UserPreference, I_Pe
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/** Set Toggle on Double Click.
|
||||
@param ToggleOnDoubleClick
|
||||
Defines if double click in a field on grid mode switch to form view
|
||||
*/
|
||||
public void setToggleOnDoubleClick (boolean ToggleOnDoubleClick)
|
||||
{
|
||||
set_Value (COLUMNNAME_ToggleOnDoubleClick, Boolean.valueOf(ToggleOnDoubleClick));
|
||||
}
|
||||
|
||||
/** Get Toggle on Double Click.
|
||||
@return Defines if double click in a field on grid mode switch to form view
|
||||
*/
|
||||
public boolean isToggleOnDoubleClick ()
|
||||
{
|
||||
Object oo = get_Value(COLUMNNAME_ToggleOnDoubleClick);
|
||||
if (oo != null)
|
||||
{
|
||||
if (oo instanceof Boolean)
|
||||
return ((Boolean)oo).booleanValue();
|
||||
return "Y".equals(oo);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
|
@ -246,7 +246,7 @@ DataStatusListener, IADTabpanel, IdSpace, IFieldEditorContainer
|
|||
form.setWidgetAttribute(AdempiereWebUI.WIDGET_INSTANCE_NAME, "form");
|
||||
|
||||
listPanel = new GridView();
|
||||
if( "Y".equals(Env.getContext(Env.getCtx(), "ToggleOnDoubleClick")) )
|
||||
if( "Y".equals(Env.getContext(Env.getCtx(), "P|ToggleOnDoubleClick")) )
|
||||
listPanel.getListbox().addEventListener(Events.ON_DOUBLE_CLICK, this);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue