1 //<script type="text/javascript">
3 // Auto generated file - created by app.Builder.js- do not edit directly (at present!)
5 MTrackWeb.Layout = new Roo.XComponent({
6 order : '001-MTrackWeb.Layout',
9 name : "unnamed module",
16 xtype: 'NestedLayoutPanel',
19 xtype: 'BorderLayout',
23 xtype: 'ContentPanel',
26 content : '<div class="banner-username"></div>' +
28 '<a href="' + rootURL + '"><img style="float: left;margin-right: 10px;" src="' +
29 rootURL + '/Roojscom/templates/images/roojsorg_logo-55.png" width="150" height="55"></a>' +
30 '<div class="banner-title">Project Tracker</div>'+
34 xtype: 'ContentPanel',
41 xtype: 'LayoutRegion',
47 xtype: 'LayoutRegion',
49 alwaysShowTabs : true,
68 beforeselect : function (combo, record, index)
70 // this should post to the system, - to register active Project..
71 // it's not really needed in new version... but done for compat.
75 url : baseURL + '/Projects/' + rec.data.id,
76 success : function (data) {
77 // then, it should refresh the current active tab..
78 MTrack.ajaxLoad( MTrack.currentURL);
83 render : function (_self)
87 MTrack.projectCombo = _self;
89 // set the default value to our current project..
98 displayField : 'name',
100 emptyText : "Select Project",
101 forceSelection : true,
103 loadingText : "Searching...",
105 qtip : "Select Project",
106 selectOnFocus : true,
107 tpl : '<div class="x-grid-cell-text x-btn button"><b>{code}</b> {name} </div>',
108 triggerAction : 'all',
116 beforeload : function (_self, o){
117 o.params = o.params || {};
122 sortInfo : { direction : 'ASC', field: 'name' },
127 url : baseURL + '/Projects.php'
134 totalProperty : 'total',
135 fields : [{"name":"id","type":"int"},"name","code"]
147 specialkey : function (_self, e)
149 if (e.getKey() == 13) {
154 emptyText : "Search (to be done..)",
161 icon : rootURL + '/Pman/templates/images/search.gif'
168 xtype: 'SplitButton',
171 click : function (_self, e)
174 if (!Pman.Login.authUser.id) {
175 Pman.Login.show(false, function() {
176 bt.setText('Logout');
177 Roo.select('.banner-username').first().update(
178 String.format('You are logged in as {0} <{1}>',
179 Pman.Login.authUser.name,
180 Pman.Login.authUser.email));
183 // set the default value to our current project..
184 MTrack.projectCombo.setFromData({
185 id : Pman.Login.authUser.project.id,
186 name : Pman.Login.authUser.project.name
189 MTrack.ajaxLoad( MTrack.currentURL);
190 //document.location = baseURL + '/Report/1?ts=' + Math.random();
191 // reload the project list!??
192 // reload the active page
196 // should for a reload..
199 render : function (_self)
201 if (typeof(Pman) == 'undefined') {
205 // if we are logged in.. change stuff..
206 if (!Pman.Login.authUser.id) {
211 this.el.child("button:first").setStyle(
212 'background-image', 'url(' + rootURL + '/Pman/templates/images/logout.gif)');
213 this.setText('Logout');
214 Roo.select('.banner-username').first().update(
215 String.format('You are logged in as {0} <{1}>',
216 Pman.Login.authUser.name,
217 Pman.Login.authUser.email));
222 cls : 'x-btn-text-icon',
224 icon : rootURL + '/Pman/templates/images/lock.gif',
233 render : function (_self)
235 _this.changePassword = _self;
238 text : "Change Password"
247 xtype: 'LayoutRegion',