Advertisement
Guest User

Untitled

a guest
Nov 24th, 2020
30
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. News.combo.Repository = function (config) {
  2.     config = config || {};
  3.  
  4.     Ext.applyIf(config, {
  5.         name: 'gallery',
  6.         fieldLabel: _('news_item_gallery'),
  7.         hiddenName: 'gallery',
  8.         displayField: 'name',
  9.         valueField: 'id',
  10.         anchor: '99%',
  11.         fields: ['name', 'id'],
  12.         pageSize: 20,
  13.         url: News.config['connector_url'],
  14.         typeAhead: true,
  15.         editable: true,
  16.         allowBlank: true,
  17.         //emptyText: _('no'),
  18.         minChars: 1,
  19.         baseParams: {
  20.             action: 'mgr/gallery/getlist',
  21.             combo: true,
  22.             id: config.value,
  23.         }
  24.     });
  25.     News.combo.Repository.superclass.constructor.call(this, config);
  26.     this.on('expand', function () {
  27.         if (!!this.pageTb) {
  28.             this.pageTb.show();
  29.         }
  30.     });
  31. };
  32. Ext.extend(News.combo.Repository, MODx.combo.ComboBox);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement