// Auto generated file - created by app.Builder.js- do not edit directly (at present!)
-
-
-// register the module first
-Pman.on('beforeload', function()
-{
- Pman.register({
- modKey : '030-Pman.Tab.AdminCompanies',
- module : Pman.Tab.AdminCompanies,
- region : 'center',
- parent : Pman.Tab.Admin,
- name : "Pman.Tab.AdminCompanies",
- disabled : false,
- permname: ''
- });
-});
-
-Pman.Tab.AdminCompanies = new Roo.util.Observable({
-
- panel : false,
- disabled : false,
- parentLayout: false,
-
- add : function(parentLayout, region)
+Pman.Tab.AdminCompanies = new Roo.XComponent({
+ part : ["Admin","Companies"],
+ order : '030-Pman.Tab.AdminCompanies',
+ region : 'center',
+ parent : 'Pman.Tab.Admin',
+ name : "Pman.Tab.AdminCompanies",
+ disabled : false,
+ permname : 'Admin.Companies',
+ _tree : function()
{
-
var _this = this;
- this.parentLayout = parentLayout;
-
- this.panel = parentLayout.addxtype({
+ var MODULE = this;
+ return {
xtype: 'NestedLayoutPanel',
xns: Roo,
region : 'center',
rowdblclick : function (_self, rowIndex, e)
{
if (!_this.dialog) return;
- _this.dialog.show( this.getDataSource().getAt(rowIndex), function() {
+ _this.dialog.show( this.getDataSource().getAt(rowIndex).data, function() {
_this.grid.footer.onClick('first');
});
+
+
},
rowclick : function (_self, rowIndex, e)
{
- try { Pman.Tab.AdminOffice.paging.onClick('refresh'); } catch(e) {}
+ try { Pman.Tab.AdminOffice.grid.footer.onClick('refresh'); } catch(e) {}
}
},
autoExpandColumn : 'name',
beforeload : function (_self, o)
{
o.params = o.params || {};
- o.params['query[name]'] = _this.searchBox.getValue();
+ try {
+ o.params['query[name]'] = _this.searchBox.getValue();
+ } catch(e) { return false; }
}
},
remoteSort : true,
xns: Roo,
pageSize : 25,
displayInfo : true,
- displayMsg : 'Displaying Companies{0} - {1} of {2}',
- emptyMsg : 'No Companies found'
+ displayMsg : "Displaying Companies{0} - {1} of {2}",
+ emptyMsg : "No Companies found"
},
toolbar : {
xtype: 'Toolbar',
listeners : {
show : function (_self)
{
- _this.searchBox = _self;
+
},
specialkey : function (_self, e)
{
if (e.getKey() == 13) {
_this.grid.footer.onClick( 'first' );
}
+ },
+ render : function (_self)
+ {
+ _this.searchBox = _self;
}
}
},
{
xtype: 'Button',
xns: Roo.Toolbar,
- text : "Add",
- cls : 'x-btn-text-icon',
- icon : Roo.rootURL + 'images/default/dd/drop-add.gif',
listeners : {
click : function()
{
_this.grid.footer.onClick('first');
});
}
- }
+ },
+ cls : 'x-btn-text-icon',
+ text : "Add",
+ icon : Roo.rootURL + 'images/default/dd/drop-add.gif'
},
{
xtype: 'Button',
sortable : true,
width : 90,
renderer : function (v,x ,r) {
- return Pman.Dialog.Companies.comptypeListToString(r.data.isOwner ? 'OWNER' : v);
+ //return Pman.Dialog.Companies.comptypeListToString(r.data.isOwner ? 'OWNER' : v);
+ return v;
}
},
{
sortable : true,
width : 200,
renderer : function(v,x,r) {
- return String.format(r.data.isOwner ? '<B>{0}</B>' : '{0}',v);
+ return String.format(r.data.comptype == 'OWNER' ? '<B>{0}</B>' : '{0}',v);
}
},
{
},
south : {
xtype: 'LayoutRegion',
- xns: Roo
+ xns: Roo,
+ height : 150,
+ split : true,
+ titlebar : true
}
}
- });
- this.layout = this.panel.layout;
-
+ };
}
});