Fix #7123 - getting abra ready to test
[Pman.Xtuple] / Pman.Xtuple.js
1
2
3
4
5 Pman.on('load', function() {Pman.Xtuple.load(); } );
6
7 Pman.Xtuple  = {
8     
9     offices : {
10         'hk' : 'Hong Kong',
11         'sg' : 'Singapore',
12         'my' : 'Malaysia',
13         'cn' : 'China',
14         'au' : 'Australia',
15         'zh' : 'China(Retail)'
16         
17         
18     },
19     
20     
21     load : function()
22     {
23             
24         if (typeof(Pman.Login) == 'undefined') {
25             return;
26         }
27         var logoel = Roo.get('headerInformation-company-logo');
28         
29         if (logoel && logoel.dom.parentNode) {
30             var div = document.createElement('span');
31             logoel.dom.parentNode.replaceChild( div,logoel.dom);
32             div = Roo.get(div);
33             
34             var db = baseURL.split('.php').shift().substr(-2,2);
35             
36             //var pstr = - switch to ";
37             var pstr = '';
38             for (var k in this.offices) {
39                 if (k == db) {
40                     continue;
41                 }
42                 if (uiConfig.xtuple_offices.indexOf(k) < 0) {
43                     continue;
44                 }
45                 
46                 
47                 pstr += ' : <a style="color:#999;" target="_blank" href="' + rootURL + '/' + k + '.php">' + this.offices[k] + '</a>';
48             }
49             var str = '<span style="font-family:arial;"><b>' + "Dragon" + '</B> - <b style="color:blue;">' + this.offices[db] + "</b> " +
50                 (pstr.length ? ("- switch to " + pstr) : '');
51              
52              
53             div.update( str) ;
54         }
55         
56         if(baseURL.match('/sandbox/')){
57             Roo.get('title').dom.style.backgroundColor = 'pink';
58         }
59     
60          
61         
62         
63     }
64     
65     
66 }