1 //<script type="text/javascript">
3 // Auto generated file - created by app.Builder.js- do not edit directly (at present!)
7 Pman.Tab = new Roo.XComponent({
10 '7b7bc2512ee1fedcd76bdc68926d4f7b' :"Administrator",
11 '0323de4f66a1700e2173e9bcdce02715' :"Logout",
12 '8f1e77e0d2be21da93cd4d9a939148f7' :"Change Password",
13 '617114bd6ef10884239510062dffa933' :"Your password has been changed",
14 '24efa7ee4511563b16144f39706d594f' :"Notice"
17 part : ["BAdmin", "Tab" ],
18 order : '001-Pman.Tab',
21 name : "unnamed module",
24 _tree : function(_data)
34 render : function (_self)
39 xns : Roo.bootstrap.layout,
40 '|xns' : 'Roo.bootstrap.layout',
43 alwaysShowTabs : true,
45 xns : Roo.bootstrap.layout,
46 '|xns' : 'Roo.bootstrap.layout'
53 xns : Roo.bootstrap.layout,
54 '|xns' : 'Roo.bootstrap.layout'
61 xns : Roo.bootstrap.panel,
62 '|xns' : 'Roo.bootstrap.panel',
65 xtype : 'NavHeaderbar',
67 brand : '<img cls="header-logo" src="' + Roo.BLANK_IMAGE_URL + '">',
68 cls : 'headroom animated slideDown no-srButton pman-admin-header',
69 desktopCenter : false,
71 position : 'fixed-top',
74 '|xns' : 'Roo.bootstrap',
81 '|xns' : 'Roo.bootstrap',
85 html : Pman.Login.authUser.name + '<span style="margin-left: 5px;" class="badge badge-primary"></span>',
87 preventDefault : true,
88 updateBadge : function() { },
90 render : function (_self)
92 _this.user_box = this;
94 this.el.setVisibilityMode(Roo.Element.DISPLAY);
100 '|xns' : 'Roo.bootstrap',
103 allowDomMove : false,
106 show : function (_self)
108 var width = Roo.lib.Dom.getViewWidth();
110 var xy = this.el.getXY();
111 this.el.setStyle('position', 'absolute');
116 this.el.setStyle('width', width + 'px');
121 '|xns' : 'Roo.bootstrap',
127 preventDefault : true,
129 '|xns' : 'Roo.bootstrap',
134 '|xns' : 'Roo.bootstrap',
140 '|xns' : 'Roo.bootstrap',
145 '|xns' : 'Roo.bootstrap',
149 cls : 'text-primary',
152 render : function (_self)
154 this.el.dom.innerHTML = '<b>' + Pman.Login.authUser.name + '</b>';
159 '|xns' : 'Roo.bootstrap'
164 style : 'color:#777;',
166 render : function (_self)
169 this.el.dom.innerHTML = Pman.Login.authUser.email;
174 '|xns' : 'Roo.bootstrap'
180 '|xns' : 'Roo.bootstrap',
184 html : _this._strings['7b7bc2512ee1fedcd76bdc68926d4f7b'] /* Administrator */,
185 style : 'padding: 0px;text-decoration: none; color:#777;',
188 click : function (_self, e)
190 if(window.location.href.indexOf('_super_admin=1') * 1 != -1) {
191 window.open(baseURL,'_self');
195 window.open(baseURL + '?_super_admin=1','_self');
197 render : function (_self)
199 _this.super_admin_btn = this;
204 '|xns' : 'Roo.bootstrap'
220 preventDefault : true,
222 childrenrendered : function (_self)
224 _this.super_admin_btn.hide();
226 if(Pman.Login.authUser.groups.indexOf('Administrators') * 1 != -1) {
227 _this.super_admin_btn.show();
232 '|xns' : 'Roo.bootstrap',
237 '|xns' : 'Roo.bootstrap',
245 '|xns' : 'Roo.bootstrap',
249 _change_passwd_success_body : _this._strings['617114bd6ef10884239510062dffa933'] /* Your password has been changed */,
250 _change_passwd_success_title : _this._strings['24efa7ee4511563b16144f39706d594f'] /* Notice */,
251 html : _this._strings['8f1e77e0d2be21da93cd4d9a939148f7'] /* Change Password */,
252 style : 'text-transform:none;',
259 Pman.Dialog.BAdminPassword.show({ id : Pman.Login.authUser.id }, function(res) {
260 Roo.bootstrap.MessageBox.alert(_self._change_passwd_success_title, _self._change_passwd_success_body);
266 '|xns' : 'Roo.bootstrap'
274 style : 'text-align: right;',
277 '|xns' : 'Roo.bootstrap',
281 html : _this._strings['0323de4f66a1700e2173e9bcdce02715'] /* Logout */,
282 style : 'text-transform:none;',
286 window.onbeforeunload = false;
290 url : baseURL + '/Login',
297 location.href = baseURL;
304 '|xns' : 'Roo.bootstrap'