X-Git-Url: http://git.roojs.org/?p=Pman.Admin;a=blobdiff_plain;f=Pman.Tab.Group_Rights.js;h=875d0a6929d95b5235fc29893f8b24c2d76f4543;hp=2a9261902dcf6d2db9a714ab30a154a260b5fbfe;hb=HEAD;hpb=5debf8f472a42375e36ba061d8653a1c3581869d diff --git a/Pman.Tab.Group_Rights.js b/Pman.Tab.Group_Rights.js index 2a92619..875d0a6 100644 --- a/Pman.Tab.Group_Rights.js +++ b/Pman.Tab.Group_Rights.js @@ -57,7 +57,7 @@ Pman.Tab.Group_Rights = { } var _this= this; /* - this.innerLayout = new Ext.BorderLayout( + this.innerLayout = new Roo.BorderLayout( parentLayout.getEl().createChild({tag:'div'}), { @@ -70,7 +70,7 @@ Pman.Tab.Group_Rights = { - this.tab = parentLayout.add(region, new Ext.NestedLayoutPanel( + this.tab = parentLayout.add(region, new Roo.NestedLayoutPanel( this.innerLayout, {title: "Rights", id: 'Group_Rights'})); */ @@ -78,16 +78,43 @@ Pman.Tab.Group_Rights = { var frm = parentLayout.getRegion(region).getEl().createChild({tag:'div', id: 'grid-group_rights'}); - //this.grid = new Ext.grid.EditorGrid(frm, { - this.grid = new Ext.grid.Grid(frm, { + //this.grid = new Roo.grid.EditorGrid(frm, { + this.grid = new Roo.grid.Grid(frm, { - ds: new Ext.data.Store({ + ds: new Roo.data.Store({ // load using HTTP - proxy: new Ext.data.HttpProxy({ + proxy: new Roo.data.HttpProxy({ url: baseURL + '/Admin/GroupRights.php', method: 'GET' }), - reader: Pman.Readers.Group_Rights, + reader: new Roo.data.JsonReader({}, + [ + { + 'name': 'FullMask', + 'type': 'string' + }, + { + 'name': 'accessmask', + 'type': 'string' + }, + { + 'name': 'descript', + 'type': 'string' + }, + { + 'name': 'group_id', + 'type': 'int' + }, + { + 'name': 'id', + 'type': 'int' + }, + { + 'name': 'rightname', + 'type': 'string' + } + ] + ), remoteSort: false, listeners : { beforeload : function(t,o) @@ -112,8 +139,8 @@ Pman.Tab.Group_Rights = { } }), - selModel: new Ext.grid.CellSelectionModel(), - cm: new Ext.grid.ColumnModel([ + selModel: new Roo.grid.CellSelectionModel(), + cm: new Roo.grid.ColumnModel([ { 'id' : 'aa', header : "[All]", @@ -131,8 +158,7 @@ Pman.Tab.Group_Rights = { 'width' : 50, renderer : function(v,x,r) { - return String.format('{0}', - v.split('.').shift(), v); + return String.format('{0}', v.split('.').shift(), v); } }, @@ -291,14 +317,14 @@ Pman.Tab.Group_Rights = { }); this.grid.getSelectionModel().lock(); - this.panel = parentLayout.add(region, new Ext.GridPanel(this.grid , + this.panel = parentLayout.add(region, new Roo.GridPanel(this.grid , { fitToframe: true,fitContainer: true, title: "Rights", id: 'group_rights', controller : this }) ); this.grid.render(); /* var gridFoot = this.grid.getView().getFooterPanel(true); - this.paging = new Ext.PagingToolbar(gridFoot, this.grid.getDataSource(), { + this.paging = new Roo.PagingToolbar(gridFoot, this.grid.getDataSource(), { pageSize: 25, displayInfo: true, displayMsg: "", @@ -308,7 +334,7 @@ Pman.Tab.Group_Rights = { var grid = this.grid; var gridHead = this.grid.getView().getHeaderPanel(true); - var tb = new Ext.Toolbar(gridHead); + var tb = new Roo.Toolbar(gridHead); @@ -329,7 +355,7 @@ Pman.Tab.Group_Rights = { }); data.group_id = grid.getDataSource().lastOptions.params.group_id; - Ext.Ajax.request({ + Roo.Ajax.request({ url: baseURL + '/Admin/GroupRights.php', params : data, method: 'POST', @@ -338,7 +364,7 @@ Pman.Tab.Group_Rights = { //Pman.Tab.Group_Rights.paging.onClick('first'); }, failure: function() { - Ext.MessageBox.alert("There was a problem saving the data"); + Roo.MessageBox.alert("There was a problem saving the data"); } }); }