combos.js 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /**
  2. * Context list combobox
  3. */
  4. GatewayManager.combo.ContextList = function(config) {
  5. config = config || {};
  6. Ext.applyIf(config, {
  7. name: 'context'
  8. ,hiddenName: 'context'
  9. ,displayField: 'key'
  10. ,valueField: 'key'
  11. ,fields: ['key']
  12. ,forceSelection: true
  13. ,typeAhead: true
  14. ,editable: true
  15. ,allowBlank: false
  16. ,autocomplete: true
  17. ,url: GatewayManager.config.connectorUrl
  18. ,baseParams: {
  19. action: 'mgr/contexts/getList'
  20. ,combo: true
  21. }
  22. });
  23. GatewayManager.combo.ContextList.superclass.constructor.call(this, config);
  24. };
  25. Ext.extend(GatewayManager.combo.ContextList, MODx.combo.ComboBox);
  26. Ext.reg('gatewaymanager-combo-contextlist', GatewayManager.combo.ContextList);
  27. /**
  28. * Resources autocompleter combobox
  29. */
  30. GatewayManager.combo.ResourcesList = function(config) {
  31. config = config || {};
  32. Ext.applyIf(config, {
  33. name: 'sitestart'
  34. ,hiddenName: 'sitestart'
  35. ,displayField: 'pagetitle'
  36. ,valueField: 'id'
  37. ,fields: ['id','pagetitle']
  38. ,forceSelection: true
  39. ,typeAhead: true
  40. ,editable: true
  41. ,allowBlank: true
  42. ,autocomplete: true
  43. ,queryParam: 'query'
  44. ,url: GatewayManager.config.connectorUrl
  45. ,baseParams: {
  46. action: 'mgr/resources/getList'
  47. ,combo: true
  48. }
  49. });
  50. GatewayManager.combo.ResourcesList.superclass.constructor.call(this, config);
  51. };
  52. Ext.extend(GatewayManager.combo.ResourcesList, MODx.combo.ComboBox);
  53. Ext.reg('gatewaymanager-combo-resourceslist', GatewayManager.combo.ResourcesList);