Guest User

Untitled

a guest
Jan 20th, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. var params = Ext.applyIf(operation.params || {}, this.extraParams || {}), request;
  2. params = Ext.applyIf(params, this.getParams(params, operation));
  3. if (operation.id && !params.id) {
  4. params.id = operation.id;
  5. }
  6.  
  7. Ext.define('Ext.ux.AspWebAjaxProxy', {
  8. extend: 'Ext.data.proxy.Ajax',
  9. require: 'Ext.data',
  10.  
  11. buildRequest: function (operation) {
  12. var params = Ext.applyIf(operation.params || {}, this.extraParams || {}), request;
  13. params = Ext.applyIf(params, this.getParams(params, operation));
  14. if (operation.id && !params.id) {
  15. params.id = operation.id;
  16. }
  17.  
  18. params = Ext.JSON.encode(params);
  19.  
  20. request = Ext.create('Ext.data.Request', {
  21. params: params,
  22. action: operation.action,
  23. records: operation.records,
  24. operation: operation,
  25. url: operation.url
  26. });
  27. request.url = this.buildUrl(request);
  28. operation.request = request;
  29. return request;
  30. }
  31. });
  32.  
  33. function foo(cfg) {
  34. cfg = cfg || {};
  35. console.log(cfg.x);
  36. }
  37.  
  38. foo({x: 1});
  39. foo();
Add Comment
Please, Sign In to add comment