collections.js 846 B

1234567891011121314151617181920212223242526
  1. var Collections = function(config) {
  2. config = config || {};
  3. Collections.superclass.constructor.call(this,config);
  4. };
  5. Ext.extend(Collections,Ext.Component,{
  6. page:{},window:{},grid:{},tree:{},panel:{},combo:{},config: {},renderer: {},
  7. getPageUrl: function(action, parameters) {
  8. // Handles url, passed as first argument
  9. var parts = [];
  10. if (action) {
  11. if (isNaN(parseInt(action)) && (action.substr(0,1) == '?' || (action.substr(0, "index.php?".length) == 'index.php?'))) {
  12. parts.push(action);
  13. } else {
  14. parts.push('?a=' + action);
  15. }
  16. }
  17. if (parameters) {
  18. parts.push(parameters);
  19. }
  20. return parts.join('&');
  21. }
  22. });
  23. Ext.reg('collections',Collections);
  24. collections = new Collections();