Fixed Issue 16288 : Added tool tip 'Instance Purpose' for Community branding widget
authorShankar Balachandran <shaanjus4u@gmail.com>
Fri, 19 Aug 2011 15:26:42 +0530
changeset 13565 17701f6b893e
parent 13564 105d6e580092
child 13566 3efde06ae9d8
Fixed Issue 16288 : Added tool tip 'Instance Purpose' for Community branding widget
modules/org.openbravo.client.myob/src-db/database/sourcedata/AD_MESSAGE.xml
modules/org.openbravo.client.myob/web/org.openbravo.client.myob/js/ob-community-branding-widget.js
modules/org.openbravo.client.myob/web/org.openbravo.userinterface.smartclient/openbravo/skins/Default/org.openbravo.client.myob/ob-widget-styles.css
--- a/modules/org.openbravo.client.myob/src-db/database/sourcedata/AD_MESSAGE.xml	Fri Aug 19 11:03:40 2011 +0200
+++ b/modules/org.openbravo.client.myob/src-db/database/sourcedata/AD_MESSAGE.xml	Fri Aug 19 15:26:42 2011 +0530
@@ -616,4 +616,16 @@
 <!--FF8081812E9F4334012E9F4645BF0007-->  <AD_MODULE_ID><![CDATA[2758CD25B2704AF6BBAD10365FC82C06]]></AD_MODULE_ID>
 <!--FF8081812E9F4334012E9F4645BF0007--></AD_MESSAGE>
 
+<!--FF80818131E162F30131E16910BF0003--><AD_MESSAGE>
+<!--FF80818131E162F30131E16910BF0003-->  <AD_MESSAGE_ID><![CDATA[FF80818131E162F30131E16910BF0003]]></AD_MESSAGE_ID>
+<!--FF80818131E162F30131E16910BF0003-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--FF80818131E162F30131E16910BF0003-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--FF80818131E162F30131E16910BF0003-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--FF80818131E162F30131E16910BF0003-->  <VALUE><![CDATA[OBKMO_InstancePurpose]]></VALUE>
+<!--FF80818131E162F30131E16910BF0003-->  <MSGTEXT><![CDATA[Instance Purpose]]></MSGTEXT>
+<!--FF80818131E162F30131E16910BF0003-->  <MSGTIP><![CDATA[Instance Purpose]]></MSGTIP>
+<!--FF80818131E162F30131E16910BF0003-->  <MSGTYPE><![CDATA[I]]></MSGTYPE>
+<!--FF80818131E162F30131E16910BF0003-->  <AD_MODULE_ID><![CDATA[2758CD25B2704AF6BBAD10365FC82C06]]></AD_MODULE_ID>
+<!--FF80818131E162F30131E16910BF0003--></AD_MESSAGE>
+
 </data>
--- a/modules/org.openbravo.client.myob/web/org.openbravo.client.myob/js/ob-community-branding-widget.js	Fri Aug 19 11:03:40 2011 +0200
+++ b/modules/org.openbravo.client.myob/web/org.openbravo.client.myob/js/ob-community-branding-widget.js	Fri Aug 19 15:26:42 2011 +0530
@@ -26,7 +26,19 @@
   headerLabel: null,
 
   createWindowContents: function(){
-    var layout = isc.VStack.create({height:'100%', width:'100%', styleName:''});
+    var layout = isc.VStack.create({
+      height:'100%',
+      width:'100%',
+      styleName:'',
+      resizeTo: function() {
+        var emptySize;
+        if (this.separator) {
+          emptySize = Math.round((this.width - 155) / 2);
+          this.separator.width = emptySize;
+        }
+        this.Super('resizeTo', arguments);
+      }
+    });
 
     if(!OB.Application.brandingWidget) {
       // set a global pointer to ourselves
@@ -71,7 +83,7 @@
   },
 
   setOBContent: function(haveInternet, communityBrandingUrl) {
-    var url, params = {};
+    var url, params = {}, emptySize, toolTip, purposeStack;
 
     if (haveInternet) {
       url = document.location.protocol + communityBrandingUrl;
@@ -86,9 +98,9 @@
     var loadingBar = layout.members[this.windowContents.members.length-1];
 
     this.versionLabel = isc.Label.create({contents: this.versionText,
-      height: '36px',
+      height: '22px',
       width:'100%',
-      styleName: this.getPurposeStyleClass(),
+      styleName: 'OBWidgetCommunityBranding',
       align: 'center'
     });
 
@@ -96,11 +108,31 @@
         contentsType: 'page',
         contentsURL: url,
         contentsURLParams: params,
-        height: '324px',
-        width: '100%'
+        height: '324px'
       });
 
+    toolTip = isc.Label.create({contents: '',
+      height: '5px',
+      width:'155px',
+      styleName: this.getPurposeStyleClass(),
+      prompt:OB.I18N.getLabel('OBKMO_InstancePurpose')
+    });
+
+    emptySize = (layout.width - 155) / 2;
+
+    layout.separator = isc.Label.create({contents: '',
+      height: '5px',
+      width: emptySize
+    });
+
+    purposeStack = isc.HStack.create({height:'24px', width:'100%'});
+    purposeStack.addMembers(layout.separator);
+    purposeStack.addMembers(toolTip);
+    purposeStack.addMembers(layout.separator);
+
     layout.removeMember(loadingBar);
+
+    layout.addMember(purposeStack);
     layout.addMember(this.versionLabel);
     layout.addMember(content);
   },
--- a/modules/org.openbravo.client.myob/web/org.openbravo.userinterface.smartclient/openbravo/skins/Default/org.openbravo.client.myob/ob-widget-styles.css	Fri Aug 19 11:03:40 2011 +0200
+++ b/modules/org.openbravo.client.myob/web/org.openbravo.userinterface.smartclient/openbravo/skins/Default/org.openbravo.client.myob/ob-widget-styles.css	Fri Aug 19 15:26:42 2011 +0530
@@ -242,6 +242,11 @@
 }
 
 /* Community branding widget */
+.OBWidgetCommunityBranding{
+  font-weight: bold;
+  font-size: 16px;
+}
+
 .OBWidgetCommunityBrandingUnknown {
   padding-top: 32px;
   font-weight: bold;