Pman.Tab.bjs
[Pman.BAdmin] / Pman.Tab.js
1 //<script type="text/javascript">
2
3 // Auto generated file - created by app.Builder.js- do not edit directly (at present!)
4
5 Roo.namespace('Pman');
6
7 Pman.Tab = new Roo.XComponent({
8
9  _strings : {
10   '0323de4f66a1700e2173e9bcdce02715' :"Logout",
11   '617114bd6ef10884239510062dffa933' :"Your password has been changed",
12   '8f1e77e0d2be21da93cd4d9a939148f7' :"Change Password",
13   '24efa7ee4511563b16144f39706d594f' :"Notice"
14  },
15
16   part     :  ["BAdmin", "Tab" ],
17   order    : '001-Pman.Tab',
18   region   : 'center',
19   parent   : false,
20   name     : "unnamed module",
21   disabled : false, 
22   permname : '', 
23   _tree : function(_data)
24   {
25    var _this = this;
26    var MODULE = this;
27    return {
28    xtype : 'Border',
29    el : document.body,
30    is_root : true,
31    xns : Roo.bootstrap.layout,
32    '|xns' : 'Roo.bootstrap.layout',
33    center : {
34     xtype : 'Region',
35     alwaysShowTabs : true,
36     tabPosition : 'top',
37     xns : Roo.bootstrap.layout,
38     '|xns' : 'Roo.bootstrap.layout'
39    },
40    north : {
41     xtype : 'Region',
42     height : 50,
43     hideTabs : true,
44     overflow : 'visible',
45     xns : Roo.bootstrap.layout,
46     '|xns' : 'Roo.bootstrap.layout'
47    },
48    items  : [
49     {
50      xtype : 'Content',
51      fitContainer : true,
52      region : 'north',
53      xns : Roo.bootstrap.panel,
54      '|xns' : 'Roo.bootstrap.panel',
55      items  : [
56       {
57        xtype : 'NavHeaderbar',
58        autohide : true,
59        brand : '<img   cls="header-logo" src="' +    Roo.BLANK_IMAGE_URL + '">',
60        cls : 'headroom animated slideDown  no-srButton',
61        desktopCenter : false,
62        inverse : false,
63        position : 'fixed-top',
64        srButton : true,
65        style : 'padding-bottom:0px;',
66        xns : Roo.bootstrap,
67        '|xns' : 'Roo.bootstrap',
68        items  : [
69         {
70          xtype : 'NavGroup',
71          align : 'right',
72          style : 'margin-top:0px;margin-bottom:0px;',
73          type : 'nav',
74          xns : Roo.bootstrap,
75          '|xns' : 'Roo.bootstrap',
76          items  : [
77           {
78            xtype : 'NavItem',
79            html : Pman.Login.authUser.name + '<span style="margin-left: 5px;" class="badge badge-primary"></span>',
80            icon : 'fa fa-user',
81            preventDefault : true,
82            updateBadge : function() { },
83            listeners : {
84             render : function (_self)
85              {
86                  _this.user_box = this;
87                  
88                  this.el.setVisibilityMode(Roo.Element.DISPLAY);
89                  
90                  this.el.show();
91                  
92                  new Pman.Request({
93                      url: baseURL + '/Roo/Coba_investor_notes.php',
94                      method : 'GET',
95                      params : {
96                          _admin_badges : 1
97                      }, 
98                      success : function(res) {
99                          Roo.log(res);
100                      }
101                  });
102                  
103              }
104            },
105            xns : Roo.bootstrap,
106            '|xns' : 'Roo.bootstrap',
107            menu : {
108             xtype : 'Menu',
109             allowDomMove : false,
110             cls : 'user-menu',
111             listeners : {
112              show : function (_self)
113               {
114                   var width = Roo.lib.Dom.getViewWidth();
115                   
116                   var xy = this.el.getXY();
117                   this.el.setStyle('position', 'absolute');
118                   
119                   if(width < 480){
120                       xy[0] = 0;
121                       this.el.setXY(xy);
122                       this.el.setStyle('width', width + 'px');
123                   }
124               }
125             },
126             xns : Roo.bootstrap,
127             '|xns' : 'Roo.bootstrap',
128             items  : [
129              {
130               xtype : 'MenuItem',
131               cls : 'user-body',
132               isContainer : true,
133               preventDefault : true,
134               xns : Roo.bootstrap,
135               '|xns' : 'Roo.bootstrap',
136               items  : [
137                {
138                 xtype : 'Row',
139                 xns : Roo.bootstrap,
140                 '|xns' : 'Roo.bootstrap',
141                 items  : [
142                  {
143                   xtype : 'Column',
144                   md : 9,
145                   mdoff : 3,
146                   xns : Roo.bootstrap,
147                   '|xns' : 'Roo.bootstrap',
148                   items  : [
149                    {
150                     xtype : 'Row',
151                     xns : Roo.bootstrap,
152                     '|xns' : 'Roo.bootstrap',
153                     items  : [
154                      {
155                       xtype : 'Column',
156                       md : 12,
157                       style : 'color:#333;text-align:right',
158                       listeners : {
159                        render : function (_self)
160                         {
161                          
162                             this.el.dom.innerHTML = '<b>' + Pman.Login.authUser.name + '</b>';
163                             
164                         }
165                       },
166                       xns : Roo.bootstrap,
167                       '|xns' : 'Roo.bootstrap'
168                      },
169                      {
170                       xtype : 'Column',
171                       md : 12,
172                       style : 'color:#333;text-align:right',
173                       listeners : {
174                        render : function (_self)
175                         {
176                            
177                             this.el.dom.innerHTML = Pman.Login.authUser.email;
178                             
179                         }
180                       },
181                       xns : Roo.bootstrap,
182                       '|xns' : 'Roo.bootstrap'
183                      }
184                     ]
185                    }
186                   ]
187                  }
188                 ]
189                }
190               ]
191              },
192              {
193               xtype : 'MenuItem',
194               cls : 'user-footer',
195               isContainer : true,
196               preventDefault : true,
197               xns : Roo.bootstrap,
198               '|xns' : 'Roo.bootstrap',
199               items  : [
200                {
201                 xtype : 'Row',
202                 xns : Roo.bootstrap,
203                 '|xns' : 'Roo.bootstrap',
204                 items  : [
205                  {
206                   xtype : 'Column',
207                   md : 6,
208                   sm : 6,
209                   xs : 6,
210                   xns : Roo.bootstrap,
211                   '|xns' : 'Roo.bootstrap',
212                   items  : [
213                    {
214                     xtype : 'Button',
215                     _change_passwd_success_body : _this._strings['617114bd6ef10884239510062dffa933'] /* Your password has been changed */,
216                     _change_passwd_success_title : _this._strings['24efa7ee4511563b16144f39706d594f'] /* Notice */,
217                     html : _this._strings['8f1e77e0d2be21da93cd4d9a939148f7'] /* Change Password */,
218                     style : 'text-transform:none;',
219                     listeners : {
220                      click : function (e)
221                       {
222                       
223                           var _self = this;
224                           
225                           Pman.Dialog.BAdminPassword.show({ id : Pman.Login.authUser.id }, function(res) {
226                               Roo.bootstrap.MessageBox.alert(_self._change_passwd_success_title, _self._change_passwd_success_body);
227                           });
228                           
229                       }
230                     },
231                     xns : Roo.bootstrap,
232                     '|xns' : 'Roo.bootstrap'
233                    }
234                   ]
235                  },
236                  {
237                   xtype : 'Column',
238                   md : 6,
239                   sm : 6,
240                   style : 'text-align: right;',
241                   xs : 6,
242                   xns : Roo.bootstrap,
243                   '|xns' : 'Roo.bootstrap',
244                   items  : [
245                    {
246                     xtype : 'Button',
247                     html : _this._strings['0323de4f66a1700e2173e9bcdce02715'] /* Logout */,
248                     style : 'text-transform:none;',
249                     listeners : {
250                      click : function (e)
251                       {
252                           window.onbeforeunload = false;
253                           
254                           
255                           Roo.Ajax.request({
256                                   url : baseURL + '/Login',
257                                   method: 'POST',
258                                   params : { 
259                                       logout : 1
260                                   },
261                                   success : function()
262                                   {
263                                       location.href = baseURL;
264                                   }
265                               });
266                       
267                       }
268                     },
269                     xns : Roo.bootstrap,
270                     '|xns' : 'Roo.bootstrap'
271                    }
272                   ]
273                  }
274                 ]
275                }
276               ]
277              }
278             ]
279            }
280           }
281          ]
282         }
283        ]
284       }
285      ]
286     }
287    ]
288   };  }
289 });