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 getProjectName : function() {
27 return MTrack.projectCombo.el.dom.value;
29 getProjectId : function() {
30 return MTrack.projectCombo.getValue();
33 xtype: 'BorderLayout',
37 xtype: 'ContentPanel',
40 content : '<div class="banner-username"></div>' +
42 '<a href="' + baseURL + '"><img style="float: left;margin-right: 10px;" src="' +
43 '/Roojscom/templates/images/roojsorg_logo-55.png" width="150" height="55"></a>' +
44 '<div class="banner-title">Project Tracker</div>'+
48 xtype: 'ContentPanel',
51 content : ' <div id="footer">' +
52 '<div class="navfoot">' +
53 'Powered by <a href="http://www.roojs.com/mtrack/index.php/Browse/default/web.mtrack">web.mtrack</a>' +
55 '<a href="http://bitbucket.org/wez/mtrack/">mtrack</a>' +
61 xtype: 'LayoutRegion',
67 xtype: 'LayoutRegion',
69 alwaysShowTabs : true,
88 beforeselect : function (combo, rec, index)
90 // this should post to the system, - to register active Project..
91 // it's not really needed in new version... but done for compat.
95 url : baseURL + '/Projects/' + rec.data.id,
96 success : function (data) {
97 // then, it should refresh the current active tab..
98 MTrack.ajaxLoad( MTrack.currentURL);
103 render : function (_self)
106 _this.projectCombo = _self;
108 MTrack.projectCombo = _self;
110 // set the default value to our current project..
119 displayField : 'name',
121 emptyText : "Select Project",
122 forceSelection : true,
124 loadingText : "Searching...",
126 qtip : "Select Project",
127 selectOnFocus : true,
128 tpl : '<div class="x-grid-cell-text x-btn">{name} - <b>{code}</b> </div>',
129 triggerAction : 'all',
137 beforeload : function (_self, o){
138 o.params = o.params || {};
143 sortInfo : { direction : 'ASC', field: 'name' },
148 url : baseURL + '/Roo/core_project.php'
155 totalProperty : 'total',
156 fields : [{"name":"id","type":"int"},"name","code"]
168 specialkey : function (_self, e)
170 if (e.getKey() == 13) {
175 emptyText : "Search (to be done..)",
182 icon : rootURL + '/Pman/templates/images/search.gif'
189 xtype: 'SplitButton',
192 click : function (_self, e)
195 if (!Pman.Login.authUser.id) {
196 Pman.Login.show(false, function() {
197 bt.setText('Logout');
198 Roo.select('.banner-username').first().update(
199 String.format('You are logged in as {0} <{1}>',
200 Pman.Login.authUser.name,
201 Pman.Login.authUser.email));
204 // set the default value to our current project..
205 MTrack.projectCombo.setFromData({
206 id : Pman.Login.authUser.project.id,
207 name : Pman.Login.authUser.project.name
210 MTrack.ajaxLoad( MTrack.currentURL);
211 //document.location = baseURL + '/Report/1?ts=' + Math.random();
212 // reload the project list!??
213 // reload the active page
216 Roo.MessageBox.confirm("Logout",
217 "Are you sure you want to Log out?",
226 // should for a reload..
229 render : function (_self)
231 if (typeof(Pman) == 'undefined') {
235 // if we are logged in.. change stuff..
236 if (!Pman.Login.authUser.id) {
241 this.el.child("button:first").setStyle(
242 'background-image', 'url(' + rootURL + '/Pman/templates/images/logout.gif)');
243 this.setText('Logout');
244 Roo.select('.banner-username').first().update(
245 String.format('You are logged in as {0} <{1}>',
246 Pman.Login.authUser.name,
247 Pman.Login.authUser.email));
252 cls : 'x-btn-text-icon',
254 icon : rootURL + '/Pman/templates/images/lock.gif',
262 text : "Request Account"
267 text : "Send Invite to a Friend"
277 render : function (_self)
279 _this.changePassword = _self;
282 text : "Change Password"
291 xtype: 'LayoutRegion',