}
new Pman.Request({
- url : baseURL + '/Roo/Core_oauth_clients.php',
+ url : baseURL + '/Roo/Core_oauth_clients',
method : 'POST',
- params : record.data,
+ params : {
+ id : record.data.id,
+ client_id : record.data.client_id,
+ client_secret : record.data.client_secret,
+ redirect_uri : record.data.redirect_uri
+ },
success : function(res) {
- _this.gird.footer.onClick('refresh');
+ _this.grid.footer.onClick('refresh');
}
});
root : 'data',
totalProperty : 'total',
fields : [
+ {
+ 'name': 'id',
+ 'type': 'int'
+ },
{
'name': 'client_id',
'type': 'string'
{
var nr = _this.grid.ds.reader.newRow({
+ id : 0,
client_id : '',
client_secret : '',
redirect_uri : ''
_this.grid.stopEditing();
_this.grid.ds.insert(_this.grid.ds.getCount(), nr);
- _this.grid.startEditing(_this.grid.ds.getCount()-1, 1);
+ _this.grid.startEditing(_this.grid.ds.getCount()-1, 0);
}
},
cls : 'x-btn-text-icon',
var r = _this.grid.ds.getAt(cs[0]);
- _this.grid.ds.remove(r);
-
+ Roo.MessageBox.confirm("Confirm", "Are you sure you want to delete this client?", function (v){
+ if (v != 'yes') {
+ return;
+ }
+
+ new Pman.Request({
+ url : baseURL + '/Roo/Core_oauth_clients',
+ method : 'POST',
+ params : {
+ _delete : r.data.id
+ },
+ success : function(res) {
+ _this.grid.footer.onClick('refresh');
+ }
+ });
+ });
}
},
cls : 'x-btn-text-icon',