partkeepr

fork of partkeepr
git clone https://git.e1e0.net/partkeepr.git
Log | Files | Refs | Submodules | README | LICENSE

OperatorComboBox.js (893B)


      1 Ext.define("PartKeepr.Widgets.Components.OperatorComboBox", {
      2     extend: "Ext.form.field.ComboBox",
      3 
      4     xtype: 'OperatorComboBox',
      5 
      6     displayField: 'operator',
      7     emptyText: i18n("Select an operator"),
      8     editable: false,
      9     forceSelection: true,
     10     valueField: 'operator',
     11     returnObject: true,
     12 
     13     tpl: Ext.create('Ext.XTemplate',
     14         '<ul class="x-list-plain"><tpl for=".">',
     15         '<li role="option" class="x-boundlist-item">',
     16         '<span style="display: inline-block; width: 20px; text-align: center; ">{symbol}</span> <small>{description}</small>',
     17         '</li>',
     18         '</tpl></ul>'
     19     ),
     20 
     21     displayTpl: Ext.create('Ext.XTemplate',
     22         '<tpl for=".">',
     23             '{symbol}',
     24         '</tpl>'
     25     ),
     26 
     27     initComponent: function () {
     28         this.callParent(arguments);
     29         this.setStore(Ext.create("PartKeepr.Data.store.OperatorStore"));
     30     }
     31 });