Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var params = Ext.applyIf(operation.params || {}, this.extraParams || {}), request;
- params = Ext.applyIf(params, this.getParams(params, operation));
- if (operation.id && !params.id) {
- params.id = operation.id;
- }
- Ext.define('Ext.ux.AspWebAjaxProxy', {
- extend: 'Ext.data.proxy.Ajax',
- require: 'Ext.data',
- buildRequest: function (operation) {
- var params = Ext.applyIf(operation.params || {}, this.extraParams || {}), request;
- params = Ext.applyIf(params, this.getParams(params, operation));
- if (operation.id && !params.id) {
- params.id = operation.id;
- }
- params = Ext.JSON.encode(params);
- request = Ext.create('Ext.data.Request', {
- params: params,
- action: operation.action,
- records: operation.records,
- operation: operation,
- url: operation.url
- });
- request.url = this.buildUrl(request);
- operation.request = request;
- return request;
- }
- });
- function foo(cfg) {
- cfg = cfg || {};
- console.log(cfg.x);
- }
- foo({x: 1});
- foo();
Add Comment
Please, Sign In to add comment