1 //<script type="text/javascript">
3 // Auto generated file - created by app.Builder.js- do not edit directly (at present!)
7 // register the module first
8 Pman.on('beforeload', function()
11 modKey : '001-Pman.Tab.AdminContactsGroup',
12 module : Pman.Tab.AdminContactsGroup,
14 parent : Pman.Tab.AdminContactsManager,
15 name : "Pman.Tab.AdminContactsGroup",
21 Pman.Tab.AdminContactsGroup = new Roo.util.Observable({
27 add : function(parentLayout, region)
31 this.parentLayout = parentLayout;
33 this.panel = parentLayout.addxtype({
43 activate : function() {
46 _this.grid.footer.onClick('first');
57 //_this.dialog = Pman.Dialog.FILL_IN
58 if (_this.panel.active) {
59 this.footer.onClick('first');
62 rowdblclick : function (_self, rowIndex, e)
64 if (!_this.dialog) return;
65 _this.dialog.show( this.getDataSource().getAt(rowIndex), function() {
66 _this.grid.footer.onClick('first');
70 autoExpandColumn : 'name',
78 beforeload : function (_self, o)
80 o.params = o.params || {};
85 sortInfo : { field : 'name', direction: 'ASC' },
90 url : baseURL + '/Roo/Groups.php'
95 totalProperty : 'total',
120 'name': 'leader_office_id',
124 'name': 'leader_name',
128 'name': 'leader_phone',
132 'name': 'leader_fax',
136 'name': 'leader_email',
140 'name': 'leader_company_id',
144 'name': 'leader_role',
148 'name': 'leader_active',
152 'name': 'leader_remarks',
156 'name': 'leader_passwd',
160 'name': 'leader_owner_id',
164 'name': 'leader_lang',
168 'name': 'leader_no_reset_sent',
172 'name': 'leader_action_type',
176 'name': 'leader_project_id',
189 text : "Manage Groups",
200 if (!_this.dialog) return;
201 _this.dialog.show( { id : 0 } , function() {
202 _this.grid.ds.load({});
206 cls : 'x-btn-text-icon',
208 icon : Roo.rootURL + 'images/default/dd/drop-add.gif'
216 var s = _this.grid.getSelectionModel().getSelections();
217 if (!s.length || (s.length > 1)) {
218 Roo.MessageBox.alert("Error", s.length ? "Select only one Row" : "Select a Row");
221 if (!_this.dialog) return;
222 _this.dialog.show(s[0].data, function() {
223 _this.grid.ds.load({});
228 cls : 'x-btn-text-icon',
230 icon : Roo.rootURL + 'images/default/tree/leaf.gif'
238 Pman.genericDelete(_this, 'Groups');
241 cls : 'x-btn-text-icon',
243 icon : rootURL + '/Pman/templates/images/trash.gif'
253 click : function (_self, e)
255 _this.grid.ds.load({});
267 xtype: 'ColumnModel',
272 renderer : function(v) { return String.format('{0}', v); }
277 this.layout = this.panel.layout;