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)
21 Roo.log("top activate");
25 xtype: 'BorderLayout',
29 xtype: 'ContentPanel',
32 content : '<div class="banner-username"></div>' +
34 '<a href="' + rootURL + '"><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, record, 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)
99 MTrack.projectCombo = _self;
101 // set the default value to our current project..
110 displayField : 'name',
112 emptyText : "Select Project",
113 forceSelection : true,
115 loadingText : "Searching...",
117 qtip : "Select Project",
118 selectOnFocus : true,
119 tpl : '<div class="x-grid-cell-text x-btn button"><b>{code}</b> {name} </div>',
120 triggerAction : 'all',
128 beforeload : function (_self, o){
129 o.params = o.params || {};
134 sortInfo : { direction : 'ASC', field: 'name' },
139 url : baseURL + '/Projects.php'
146 totalProperty : 'total',
147 fields : [{"name":"id","type":"int"},"name","code"]
159 specialkey : function (_self, e)
161 if (e.getKey() == 13) {
166 emptyText : "Search (to be done..)",
173 icon : rootURL + '/Pman/templates/images/search.gif'
180 xtype: 'SplitButton',
183 click : function (_self, e)
186 if (!Pman.Login.authUser.id) {
187 Pman.Login.show(false, function() {
188 bt.setText('Logout');
189 Roo.select('.banner-username').first().update(
190 String.format('You are logged in as {0} <{1}>',
191 Pman.Login.authUser.name,
192 Pman.Login.authUser.email));
195 // set the default value to our current project..
196 MTrack.projectCombo.setFromData({
197 id : Pman.Login.authUser.project.id,
198 name : Pman.Login.authUser.project.name
201 MTrack.ajaxLoad( MTrack.currentURL);
202 //document.location = baseURL + '/Report/1?ts=' + Math.random();
203 // reload the project list!??
204 // reload the active page
207 Roo.MessageBox.confirm("Logout",
208 "Are you sure you want to Log out?",
217 // should for a reload..
220 render : function (_self)
222 if (typeof(Pman) == 'undefined') {
226 // if we are logged in.. change stuff..
227 if (!Pman.Login.authUser.id) {
232 this.el.child("button:first").setStyle(
233 'background-image', 'url(' + rootURL + '/Pman/templates/images/logout.gif)');
234 this.setText('Logout');
235 Roo.select('.banner-username').first().update(
236 String.format('You are logged in as {0} <{1}>',
237 Pman.Login.authUser.name,
238 Pman.Login.authUser.email));
243 cls : 'x-btn-text-icon',
245 icon : rootURL + '/Pman/templates/images/lock.gif',
253 text : "Request Account"
258 text : "Send Invite to a Friend"
268 render : function (_self)
270 _this.changePassword = _self;
273 text : "Change Password"
282 xtype: 'LayoutRegion',