details:   /erp/devel/pi/rev/2a2c6483ec7d
changeset: 11138:2a2c6483ec7d
user:      Martin Taal <martin.taal <at> openbravo.com>
date:      Wed Mar 09 12:16:47 2011 +0100
summary:   Added link button

details:   /erp/devel/pi/rev/a23df6e847ed
changeset: 11139:a23df6e847ed
user:      Martin Taal <martin.taal <at> openbravo.com>
date:      Wed Mar 09 12:17:41 2011 +0100
summary:   Quick launch now supports opening a view using a url

diffstat:

 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-quick-launch.js
                                                                           |   
11 ++++++++++
 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-utilities.js
                                                                              | 
   5 ++-
 
modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/3.00/org.openbravo.client.application/images/toolbar/iconButton-link.png
 |    0 
 3 files changed, 14 insertions(+), 2 deletions(-)

diffs (38 lines):

diff -r 1097ad23966d -r a23df6e847ed 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-quick-launch.js
--- 
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-quick-launch.js
       Wed Mar 09 12:05:01 2011 +0100
+++ 
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-quick-launch.js
       Wed Mar 09 12:17:41 2011 +0100
@@ -83,6 +83,17 @@
     }
   },
   
+  // handle the case that someone entered a url in the quick launch
+  doHide: function(){
+    if (this.members[1].getField('value').getValue() && 
this.members[1].getField('value').getValue().contains('?')) {
+      var params = 
OB.Utilities.getUrlParameters(this.members[1].getField('value').getValue());
+      if (params && params.tabId) {
+        OB.Utilities.openDirectTab(params.tabId, params.recordId, 
params.command);
+      }      
+    }
+    this.Super('doHide', arguments);
+  },
+  
   initWidget: function(){
     this.members = [isc.DynamicForm.create({
       visibility: 'hidden',
diff -r 1097ad23966d -r a23df6e847ed 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-utilities.js
--- 
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-utilities.js
  Wed Mar 09 12:05:01 2011 +0100
+++ 
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-utilities.js
  Wed Mar 09 12:17:41 2011 +0100
@@ -361,8 +361,9 @@
 // ** {{{OB.Utilities.getUrlParameters}}} **
 // Returns the url parameters as a javascript object. Note works for simple 
cases
 // where no & is used for character encoding, this is fine for most cases.
-OB.Utilities.getUrlParameters = function(){
-  var vars = {}, hash, href = window.location.href, hashes = 
href.slice(href.indexOf('?') + 1).split('&');
+OB.Utilities.getUrlParameters = function(href){
+  href = href || window.location.href;
+  var vars = {}, hash, hashes = href.slice(href.indexOf('?') + 1).split('&');
   
   for (var i = 0; i < hashes.length; i++) {
     hash = hashes[i].split('=');
diff -r 1097ad23966d -r a23df6e847ed 
modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/3.00/org.openbravo.client.application/images/toolbar/iconButton-link.png
Binary file 
modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/3.00/org.openbravo.client.application/images/toolbar/iconButton-link.png
 has changed

------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to