Last active
May 18, 2018 11:54
-
-
Save srsad/a5942302063e0ca0c610e0911a379c96 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kosherMap.combo.Class = function (config) { | |
config = config || {}; | |
Ext.applyIf(config, { | |
name: 'class', | |
hiddenName: 'class', | |
editable: true, | |
store: new Ext.data.ArrayStore({ | |
id: 0, | |
fields: ['id','name','src'], | |
data: [[1, 'Stadium', 'ball_rus.png'], [2, 'Mikva', 'mikva.png'], [3, 'Shabbat', 'shabat.png'], [4, 'Shop', 'shop.png'], [5, 'Synagogue', 'sinagoga.png']] | |
}), | |
tpl: new Ext.XTemplate('<tpl for="."><div class="x-combo-list-item">' + | |
'<img src="' + kosherMap.config.img_url + '{src}" style="width: 22px"> {name}' + | |
'</div></tpl>'), | |
mode: 'local', | |
displayField: 'name', | |
valueField: 'id' | |
}); | |
kosherMap.combo.Class.superclass.constructor.call(this, config); | |
}; | |
Ext.extend(kosherMap.combo.Class, MODx.combo.ComboBox); | |
Ext.reg('superselectboxicon', kosherMap.combo.Class); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment