X-Git-Url: http://git.roojs.org/?p=Pman.Admin;a=blobdiff_plain;f=Pman.Tab.Group_Rights.js;h=875d0a6929d95b5235fc29893f8b24c2d76f4543;hp=d3e35c728b42e4c906cc0c964878030b123ffd65;hb=HEAD;hpb=23886b896d3c28f8302cc9f1139605826b02e413 diff --git a/Pman.Tab.Group_Rights.js b/Pman.Tab.Group_Rights.js index d3e35c7..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]", @@ -290,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: "", @@ -307,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); @@ -328,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', @@ -337,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"); } }); }