mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-07-27 05:52:32 +00:00
ext5migration: move afterRequest() declaration
and default values from constructor to class body, needed fix for "Cannot override method afterRequest on Ext.data.proxy.Ajax instance" error. See: https://fiddle.sencha.com/#fiddle/lpe for test fiddle http://bit.ly/1HJJ0Ej for background
This commit is contained in:
parent
64c42e0278
commit
3b4162189f
@ -2,12 +2,6 @@ Ext.define('PVE.RestProxy', {
|
||||
extend: 'Ext.data.RestProxy',
|
||||
alias : 'proxy.pve',
|
||||
|
||||
constructor: function(config) {
|
||||
var me = this;
|
||||
|
||||
config = config || {};
|
||||
|
||||
Ext.applyIf(config, {
|
||||
pageParam : null,
|
||||
startParam: null,
|
||||
limitParam: null,
|
||||
@ -15,17 +9,21 @@ Ext.define('PVE.RestProxy', {
|
||||
sortParam: null,
|
||||
filterParam: null,
|
||||
noCache : false,
|
||||
afterRequest: function(request, success) {
|
||||
this.fireEvent('afterload', this, request, success);
|
||||
return;
|
||||
},
|
||||
|
||||
constructor: function(config) {
|
||||
|
||||
Ext.applyIf(config, {
|
||||
reader: {
|
||||
type: 'json',
|
||||
root: config.root || 'data'
|
||||
},
|
||||
afterRequest: function(request, success) {
|
||||
me.fireEvent('afterload', me, request, success);
|
||||
return;
|
||||
}
|
||||
});
|
||||
|
||||
me.callParent([config]);
|
||||
this.callParent([config]);
|
||||
}
|
||||
|
||||
}, function() {
|
||||
|
Loading…
Reference in New Issue
Block a user