Corrected copyright year, correct class name for logging, added ui personalization table to datasets, added identifier to ui personalization table
authorMartin Taal <martin.taal@openbravo.com>
Mon, 01 Aug 2011 16:48:15 +0200
changeset 13364 48ce4704f0dc
parent 13363 b6c381dc939e
child 13365 19135e59b532
Corrected copyright year, correct class name for logging, added ui personalization table to datasets, added identifier to ui personalization table
modules/org.openbravo.client.application/src-db/database/sourcedata/AD_COLUMN.xml
modules/org.openbravo.client.application/src-db/database/sourcedata/AD_DATASET_TABLE.xml
modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MESSAGE.xml
modules/org.openbravo.client.application/src/org/openbravo/client/application/WindowSettingsActionHandler.java
modules/org.openbravo.client.application/src/org/openbravo/client/application/personalization/PersonalizationActionHandler.java
modules/org.openbravo.client.application/src/org/openbravo/client/application/personalization/PersonalizationHandler.java
modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/Default/org.openbravo.client.application/ob-personalization-styles.js
--- a/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_COLUMN.xml	Mon Aug 01 16:04:40 2011 +0200
+++ b/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_COLUMN.xml	Mon Aug 01 16:48:15 2011 +0200
@@ -17,7 +17,7 @@
 <!--0060401C958644D4AA38E9226FBEE232-->  <ISPARENT><![CDATA[N]]></ISPARENT>
 <!--0060401C958644D4AA38E9226FBEE232-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
 <!--0060401C958644D4AA38E9226FBEE232-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
-<!--0060401C958644D4AA38E9226FBEE232-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--0060401C958644D4AA38E9226FBEE232-->  <ISIDENTIFIER><![CDATA[Y]]></ISIDENTIFIER>
 <!--0060401C958644D4AA38E9226FBEE232-->  <SEQNO><![CDATA[130]]></SEQNO>
 <!--0060401C958644D4AA38E9226FBEE232-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
 <!--0060401C958644D4AA38E9226FBEE232-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -3808,7 +3808,7 @@
 <!--B4FD9EC573F94B9096FF3A41284F338F-->  <ISPARENT><![CDATA[N]]></ISPARENT>
 <!--B4FD9EC573F94B9096FF3A41284F338F-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
 <!--B4FD9EC573F94B9096FF3A41284F338F-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
-<!--B4FD9EC573F94B9096FF3A41284F338F-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--B4FD9EC573F94B9096FF3A41284F338F-->  <ISIDENTIFIER><![CDATA[Y]]></ISIDENTIFIER>
 <!--B4FD9EC573F94B9096FF3A41284F338F-->  <SEQNO><![CDATA[110]]></SEQNO>
 <!--B4FD9EC573F94B9096FF3A41284F338F-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
 <!--B4FD9EC573F94B9096FF3A41284F338F-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -3875,7 +3875,7 @@
 <!--BB39498850B942A1B29086C89163F014-->  <ISPARENT><![CDATA[N]]></ISPARENT>
 <!--BB39498850B942A1B29086C89163F014-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
 <!--BB39498850B942A1B29086C89163F014-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
-<!--BB39498850B942A1B29086C89163F014-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--BB39498850B942A1B29086C89163F014-->  <ISIDENTIFIER><![CDATA[Y]]></ISIDENTIFIER>
 <!--BB39498850B942A1B29086C89163F014-->  <SEQNO><![CDATA[140]]></SEQNO>
 <!--BB39498850B942A1B29086C89163F014-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
 <!--BB39498850B942A1B29086C89163F014-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -3909,7 +3909,7 @@
 <!--BBA0362A5E424CDDBFA2A008A942F218-->  <ISPARENT><![CDATA[N]]></ISPARENT>
 <!--BBA0362A5E424CDDBFA2A008A942F218-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
 <!--BBA0362A5E424CDDBFA2A008A942F218-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
-<!--BBA0362A5E424CDDBFA2A008A942F218-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--BBA0362A5E424CDDBFA2A008A942F218-->  <ISIDENTIFIER><![CDATA[Y]]></ISIDENTIFIER>
 <!--BBA0362A5E424CDDBFA2A008A942F218-->  <SEQNO><![CDATA[170]]></SEQNO>
 <!--BBA0362A5E424CDDBFA2A008A942F218-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
 <!--BBA0362A5E424CDDBFA2A008A942F218-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
--- a/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_DATASET_TABLE.xml	Mon Aug 01 16:04:40 2011 +0200
+++ b/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_DATASET_TABLE.xml	Mon Aug 01 16:48:15 2011 +0200
@@ -42,6 +42,35 @@
 <!--74B0D35B8E54480ABBCBD0C930BA7399-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
 <!--74B0D35B8E54480ABBCBD0C930BA7399--></AD_DATASET_TABLE>
 
+<!--FF8081813185C265013185C8D7AE000E--><AD_DATASET_TABLE>
+<!--FF8081813185C265013185C8D7AE000E-->  <AD_DATASET_TABLE_ID><![CDATA[FF8081813185C265013185C8D7AE000E]]></AD_DATASET_TABLE_ID>
+<!--FF8081813185C265013185C8D7AE000E-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--FF8081813185C265013185C8D7AE000E-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--FF8081813185C265013185C8D7AE000E-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--FF8081813185C265013185C8D7AE000E-->  <AD_DATASET_ID><![CDATA[0]]></AD_DATASET_ID>
+<!--FF8081813185C265013185C8D7AE000E-->  <AD_TABLE_ID><![CDATA[FF8081813157AED2013157B1F75F0007]]></AD_TABLE_ID>
+<!--FF8081813185C265013185C8D7AE000E-->  <INCLUDEALLCOLUMNS><![CDATA[Y]]></INCLUDEALLCOLUMNS>
+<!--FF8081813185C265013185C8D7AE000E-->  <WHERECLAUSE><![CDATA[ad_module_id in (:moduleid)]]></WHERECLAUSE>
+<!--FF8081813185C265013185C8D7AE000E-->  <EXCLUDEAUDITINFO><![CDATA[Y]]></EXCLUDEAUDITINFO>
+<!--FF8081813185C265013185C8D7AE000E-->  <ISBUSINESSOBJECT><![CDATA[N]]></ISBUSINESSOBJECT>
+<!--FF8081813185C265013185C8D7AE000E-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--FF8081813185C265013185C8D7AE000E-->  <SECONDARYWHERECLAUSE><![CDATA[ad_module_id is not null]]></SECONDARYWHERECLAUSE>
+<!--FF8081813185C265013185C8D7AE000E--></AD_DATASET_TABLE>
+
+<!--FF8081813185C265013185CA5FE90015--><AD_DATASET_TABLE>
+<!--FF8081813185C265013185CA5FE90015-->  <AD_DATASET_TABLE_ID><![CDATA[FF8081813185C265013185CA5FE90015]]></AD_DATASET_TABLE_ID>
+<!--FF8081813185C265013185CA5FE90015-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--FF8081813185C265013185CA5FE90015-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--FF8081813185C265013185CA5FE90015-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--FF8081813185C265013185CA5FE90015-->  <AD_DATASET_ID><![CDATA[1]]></AD_DATASET_ID>
+<!--FF8081813185C265013185CA5FE90015-->  <AD_TABLE_ID><![CDATA[FF8081813157AED2013157B1F75F0007]]></AD_TABLE_ID>
+<!--FF8081813185C265013185CA5FE90015-->  <INCLUDEALLCOLUMNS><![CDATA[Y]]></INCLUDEALLCOLUMNS>
+<!--FF8081813185C265013185CA5FE90015-->  <WHERECLAUSE><![CDATA[ad_client_id='0' and ad_module_id is null]]></WHERECLAUSE>
+<!--FF8081813185C265013185CA5FE90015-->  <EXCLUDEAUDITINFO><![CDATA[N]]></EXCLUDEAUDITINFO>
+<!--FF8081813185C265013185CA5FE90015-->  <ISBUSINESSOBJECT><![CDATA[N]]></ISBUSINESSOBJECT>
+<!--FF8081813185C265013185CA5FE90015-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--FF8081813185C265013185CA5FE90015--></AD_DATASET_TABLE>
+
 <!--FF98CEB6C3BF4FEF8E3B098D8E23B2CF--><AD_DATASET_TABLE>
 <!--FF98CEB6C3BF4FEF8E3B098D8E23B2CF-->  <AD_DATASET_TABLE_ID><![CDATA[FF98CEB6C3BF4FEF8E3B098D8E23B2CF]]></AD_DATASET_TABLE_ID>
 <!--FF98CEB6C3BF4FEF8E3B098D8E23B2CF-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MESSAGE.xml	Mon Aug 01 16:04:40 2011 +0200
+++ b/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MESSAGE.xml	Mon Aug 01 16:48:15 2011 +0200
@@ -2893,4 +2893,15 @@
 <!--FF8081813185119C01318523CEE7001D-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
 <!--FF8081813185119C01318523CEE7001D--></AD_MESSAGE>
 
+<!--FF8081813185C265013185C79DBA0005--><AD_MESSAGE>
+<!--FF8081813185C265013185C79DBA0005-->  <AD_MESSAGE_ID><![CDATA[FF8081813185C265013185C79DBA0005]]></AD_MESSAGE_ID>
+<!--FF8081813185C265013185C79DBA0005-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--FF8081813185C265013185C79DBA0005-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--FF8081813185C265013185C79DBA0005-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--FF8081813185C265013185C79DBA0005-->  <VALUE><![CDATA[OBUIAPP_Personalization_Toolbar_Delete]]></VALUE>
+<!--FF8081813185C265013185C79DBA0005-->  <MSGTEXT><![CDATA[Delete the personalized layout, personalized layouts can only be deleted by the user themselves.]]></MSGTEXT>
+<!--FF8081813185C265013185C79DBA0005-->  <MSGTYPE><![CDATA[I]]></MSGTYPE>
+<!--FF8081813185C265013185C79DBA0005-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--FF8081813185C265013185C79DBA0005--></AD_MESSAGE>
+
 </data>
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/WindowSettingsActionHandler.java	Mon Aug 01 16:04:40 2011 +0200
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/WindowSettingsActionHandler.java	Mon Aug 01 16:48:15 2011 +0200
@@ -44,7 +44,7 @@
  */
 @ApplicationScoped
 public class WindowSettingsActionHandler extends BaseActionHandler {
-  private static final Logger log4j = Logger.getLogger(PersonalizationHandler.class);
+  private static final Logger log4j = Logger.getLogger(WindowSettingsActionHandler.class);
 
   @Inject
   private PersonalizationHandler personalizationHandler;
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/personalization/PersonalizationActionHandler.java	Mon Aug 01 16:04:40 2011 +0200
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/personalization/PersonalizationActionHandler.java	Mon Aug 01 16:48:15 2011 +0200
@@ -63,7 +63,7 @@
   protected JSONObject execute(Map<String, Object> parameters, String data) {
 
     try {
-      OBContext.setAdminMode();
+      OBContext.setAdminMode(false);
       if (!parameters.containsKey(ACTION)) {
         throw new IllegalStateException("Mandatory parameter " + ACTION + " not present");
       }
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/personalization/PersonalizationHandler.java	Mon Aug 01 16:04:40 2011 +0200
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/personalization/PersonalizationHandler.java	Mon Aug 01 16:48:15 2011 +0200
@@ -11,7 +11,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2010-2011 Openbravo SLU 
+ * All portions are Copyright (C) 2011 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -59,7 +59,7 @@
    * @return the personalization settings in a json object for a window.
    */
   public JSONObject getPersonalizationForWindow(Window window) {
-    OBContext.setAdminMode();
+    OBContext.setAdminMode(false);
     try {
       final JSONObject result = new JSONObject();
       for (Tab tab : window.getADTabList()) {
@@ -95,7 +95,7 @@
    * @return the personalization settings in a json object for this tab.
    */
   public UIPersonalization getPersonalizationForTab(Tab tab) {
-    OBContext.setAdminMode();
+    OBContext.setAdminMode(false);
     try {
       return getPersonalization(OBContext.getOBContext().getCurrentClient().getId(), OBContext
           .getOBContext().getCurrentOrganization().getId(), OBContext.getOBContext().getRole()
@@ -109,7 +109,7 @@
 
   public UIPersonalization getPersonalization(String clientId, String orgId, String roleId,
       String userId, String tabId, boolean exactMatch) {
-    OBContext.setAdminMode();
+    OBContext.setAdminMode(false);
     try {
       final List<UIPersonalization> pers = getPersonalizations(clientId, orgId, userId, roleId,
           tabId, exactMatch);
@@ -186,7 +186,7 @@
    */
   public UIPersonalization storePersonalization(String persId, String clientId, String orgId,
       String roleId, String userId, String tabId, String target, String value) {
-    OBContext.setAdminMode();
+    OBContext.setAdminMode(false);
     try {
       UIPersonalization uiPersonalization;
       if (persId != null) {
--- a/modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/Default/org.openbravo.client.application/ob-personalization-styles.js	Mon Aug 01 16:04:40 2011 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/Default/org.openbravo.client.application/ob-personalization-styles.js	Mon Aug 01 16:48:15 2011 +0200
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2010 Openbravo SLU
+ * All portions are Copyright (C) 2011 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************