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 part : ["MTrackWeb","Layout"],
7 order : '001-MTrackWeb.Layout',
10 name : "unnamed module",
18 xtype: 'NestedLayoutPanel',
21 activate : function (_self)
26 getProjectId : function() {
30 xtype: 'BorderLayout',
34 xtype: 'ContentPanel',
37 content : '<div class="banner-username"></div>' +
39 '<a href="' + baseURL + '"><img style="float: left;margin-right: 10px;" src="' +
40 '/Roojscom/templates/images/roojsorg_logo-55.png" width="150" height="55"></a>' +
41 '<div class="banner-title">Project Tracker</div>'+
45 xtype: 'ContentPanel',
48 content : ' <div id="footer">' +
49 '<div class="navfoot">' +
50 'Powered by <a href="http://www.roojs.com/mtrack/index.php/Browse/default/web.mtrack">web.mtrack</a>' +
52 '<a href="http://bitbucket.org/wez/mtrack/">mtrack</a>' +
58 xtype: 'LayoutRegion',
64 xtype: 'LayoutRegion',
66 alwaysShowTabs : true,
85 beforeselect : function (combo, rec, index)
87 // this should post to the system, - to register active Project..
88 // it's not really needed in new version... but done for compat.
92 url : baseURL + '/Projects/' + rec.data.id,
93 success : function (data) {
94 // then, it should refresh the current active tab..
95 MTrack.ajaxLoad( MTrack.currentURL);
100 render : function (_self)
103 _this.projectCombo = _self;
105 MTrack.projectCombo = _self;
107 // set the default value to our current project..
116 displayField : 'name',
118 emptyText : "Select Project",
119 forceSelection : true,
121 loadingText : "Searching...",
123 qtip : "Select Project",
124 selectOnFocus : true,
125 tpl : '<div class="x-grid-cell-text x-btn">{name} - <b>{code}</b> </div>',
126 triggerAction : 'all',
134 beforeload : function (_self, o){
135 o.params = o.params || {};
140 sortInfo : { direction : 'ASC', field: 'name' },
145 url : baseURL + '/Roo/Projects.php'
152 totalProperty : 'total',
153 fields : [{"name":"id","type":"int"},"name","code"]
165 specialkey : function (_self, e)
167 if (e.getKey() == 13) {
172 emptyText : "Search (to be done..)",
179 icon : rootURL + '/Pman/templates/images/search.gif'
186 xtype: 'SplitButton',
189 click : function (_self, e)
192 if (!Pman.Login.authUser.id) {
193 Pman.Login.show(false, function() {
194 bt.setText('Logout');
195 Roo.select('.banner-username').first().update(
196 String.format('You are logged in as {0} <{1}>',
197 Pman.Login.authUser.name,
198 Pman.Login.authUser.email));
201 // set the default value to our current project..
202 MTrack.projectCombo.setFromData({
203 id : Pman.Login.authUser.project.id,
204 name : Pman.Login.authUser.project.name
207 MTrack.ajaxLoad( MTrack.currentURL);
208 //document.location = baseURL + '/Report/1?ts=' + Math.random();
209 // reload the project list!??
210 // reload the active page
213 Roo.MessageBox.confirm("Logout",
214 "Are you sure you want to Log out?",
223 // should for a reload..
226 render : function (_self)
228 if (typeof(Pman) == 'undefined') {
232 // if we are logged in.. change stuff..
233 if (!Pman.Login.authUser.id) {
238 this.el.child("button:first").setStyle(
239 'background-image', 'url(' + rootURL + '/Pman/templates/images/logout.gif)');
240 this.setText('Logout');
241 Roo.select('.banner-username').first().update(
242 String.format('You are logged in as {0} <{1}>',
243 Pman.Login.authUser.name,
244 Pman.Login.authUser.email));
249 cls : 'x-btn-text-icon',
251 icon : rootURL + '/Pman/templates/images/lock.gif',
259 text : "Request Account"
264 text : "Send Invite to a Friend"
274 render : function (_self)
276 _this.changePassword = _self;
279 text : "Change Password"
288 xtype: 'LayoutRegion',