// 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 : '001-Pman.Tab.AdminOffice',
- module : Pman.Tab.AdminOffice,
- region : 'center',
- parent : Pman.Tab.AdminCompanies,
- name : "Pman.Tab.AdminOffice",
- disabled : false,
- permname: ''
- });
-});
-
-Pman.Tab.AdminOffice = new Roo.util.Observable({
-
- panel : false,
- disabled : false,
- parentLayout: false,
-
- add : function(parentLayout, region)
+Pman.Tab.AdminOffice = new Roo.XComponent({
+ part : ["Admin","Office"],
+ order : '001-Pman.Tab.AdminOffice',
+ region : 'center',
+ parent : 'Pman.Tab.AdminCompanies',
+ name : "Pman.Tab.AdminOffice",
+ disabled : false,
+ permname : '',
+ _tree : function()
{
-
var _this = this;
- this.parentLayout = parentLayout;
-
- this.panel = parentLayout.addxtype({
+ var MODULE = this;
+ return {
xtype: 'GridPanel',
xns: Roo,
listeners : {
background : true,
fitContainer : true,
fitToframe : true,
- region : 'center',
+ region : 'south',
tableName : 'Office',
title : "Offices / Departments / Sub-Companies",
grid : {
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');
});
}
return false;
}
+
}
},
remoteSort : true,
xns: Roo,
pageSize : 25,
displayInfo : true,
- displayMsg : 'Displaying Office{0} - {1} of {2}',
- emptyMsg : 'No Office found'
+ displayMsg : "Displaying Office{0} - {1} of {2}",
+ emptyMsg : "No Office found"
},
toolbar : {
xtype: 'Toolbar',
{
if (!_this.dialog) return;
- var cdata = Pman.Tab.AdminCompanies.grid.getSelectionModel().getSelected().data;
+ var cdata = Pman.Tab.AdminCompanies.grid.getSelectionModel().getSelected().data;
_dialog.show( {
id : 0 ,
company_name : cdata.name,
email : cdata.email
} , function() {
_this.grid.footer.onClick('first');
- });
+ });
}
},
cls : 'x-btn-text-icon',
{
xtype: 'Button',
xns: Roo.Toolbar,
- text : "Edit",
- cls : 'x-btn-text-icon',
- icon : Roo.rootURL + 'images/default/tree/leaf.gif',
listeners : {
click : function()
{
return;
}
if (!_this.dialog) return;
+ s[0].data.company_name = Pman.Tab.AdminCompanies.grid.getSelectionModel().getSelected().data.name;
_this.dialog.show(s[0].data, function() {
_this.grid.footer.onClick('first');
});
}
- }
+ },
+ cls : 'x-btn-text-icon',
+ text : "Edit",
+ icon : Roo.rootURL + 'images/default/tree/leaf.gif'
},
{
xtype: 'Button',
}
]
}
- });
- this.layout = this.panel.layout;
-
+ };
}
});