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 activate : function (_self)
25 xtype: 'BorderLayout',
29 xtype: 'ContentPanel',
32 content : '<div class="banner-username"></div>' +
34 '<a href="' + baseURL + '"><img style="float: left;margin-right: 10px;" src="' +
35 '/Roojscom/templates/images/roojsorg_logo-55.png" width="150" height="55"></a>' +
36 '<div class="banner-title">Project Tracker</div>'+
40 xtype: 'ContentPanel',
43 content : ' <div id="footer">' +
44 '<div class="navfoot">' +
45 'Powered by <a href="http://www.roojs.com/mtrack/index.php/Browse/default/web.mtrack">web.mtrack</a>' +
47 '<a href="http://bitbucket.org/wez/mtrack/">mtrack</a>' +
53 xtype: 'LayoutRegion',
59 xtype: 'LayoutRegion',
61 alwaysShowTabs : true,
80 beforeselect : function (combo, rec, index)
82 // this should post to the system, - to register active Project..
83 // it's not really needed in new version... but done for compat.
87 url : baseURL + '/Projects/' + rec.data.id,
88 success : function (data) {
89 // then, it should refresh the current active tab..
90 MTrack.ajaxLoad( MTrack.currentURL);
95 render : function (_self)
98 _this.projectCombo = _self;
100 MTrack.projectCombo = _self;
102 // set the default value to our current project..
111 displayField : 'name',
113 emptyText : "Select Project",
114 forceSelection : true,
116 loadingText : "Searching...",
118 qtip : "Select Project",
119 selectOnFocus : true,
120 tpl : '<div class="x-grid-cell-text x-btn">{name} - <b>{code}</b> </div>',
121 triggerAction : 'all',
129 beforeload : function (_self, o){
130 o.params = o.params || {};
135 sortInfo : { direction : 'ASC', field: 'name' },
140 url : baseURL + '/Roo/Projects.php'
147 totalProperty : 'total',
148 fields : [{"name":"id","type":"int"},"name","code"]
160 specialkey : function (_self, e)
162 if (e.getKey() == 13) {
167 emptyText : "Search (to be done..)",
174 icon : rootURL + '/Pman/templates/images/search.gif'
181 xtype: 'SplitButton',
184 click : function (_self, e)
187 if (!Pman.Login.authUser.id) {
188 Pman.Login.show(false, function() {
189 bt.setText('Logout');
190 Roo.select('.banner-username').first().update(
191 String.format('You are logged in as {0} <{1}>',
192 Pman.Login.authUser.name,
193 Pman.Login.authUser.email));
196 // set the default value to our current project..
197 MTrack.projectCombo.setFromData({
198 id : Pman.Login.authUser.project.id,
199 name : Pman.Login.authUser.project.name
202 MTrack.ajaxLoad( MTrack.currentURL);
203 //document.location = baseURL + '/Report/1?ts=' + Math.random();
204 // reload the project list!??
205 // reload the active page
208 Roo.MessageBox.confirm("Logout",
209 "Are you sure you want to Log out?",
218 // should for a reload..
221 render : function (_self)
223 if (typeof(Pman) == 'undefined') {
227 // if we are logged in.. change stuff..
228 if (!Pman.Login.authUser.id) {
233 this.el.child("button:first").setStyle(
234 'background-image', 'url(' + rootURL + '/Pman/templates/images/logout.gif)');
235 this.setText('Logout');
236 Roo.select('.banner-username').first().update(
237 String.format('You are logged in as {0} <{1}>',
238 Pman.Login.authUser.name,
239 Pman.Login.authUser.email));
244 cls : 'x-btn-text-icon',
246 icon : rootURL + '/Pman/templates/images/lock.gif',
254 text : "Request Account"
259 text : "Send Invite to a Friend"
269 render : function (_self)
271 _this.changePassword = _self;
274 text : "Change Password"
283 xtype: 'LayoutRegion',