Custom ExtJS 3.4 components definitions for MODX Revolution.
var COEX = function(config) { | |
config = config || {}; | |
COEX.superclass.constructor.call(this, config); | |
}; | |
Ext.extend(COEX, Ext.Component, { | |
page: {}, | |
window: {}, | |
grid: {}, | |
tree: {}, | |
panel: {}, | |
combo: {}, | |
config: {} | |
}); | |
Ext.reg('coex', COEX); | |
COEX = new COEX(); | |
//============================================================================= | |
// Custom components definition | |
COEX.combo.Boolean = function(config) { | |
config = config || {}; | |
Ext.applyIf(config, { | |
store: new Ext.data.SimpleStore({ | |
fields: ['d', 'v'], | |
data: [ | |
[_('yes'), 1], | |
[_('no'), 0] | |
] | |
}), | |
displayField: 'd', | |
valueField: 'v', | |
mode: 'local', | |
triggerAction: 'all', | |
editable: false, | |
selectOnFocus: false, | |
preventRender: true, | |
forceSelection: true, | |
enableKeyEvents: true | |
}); | |
COEX.combo.Boolean.superclass.constructor.call(this,config); | |
}; | |
Ext.extend(COEX.combo.Boolean, MODx.combo.ComboBox); | |
Ext.reg('coex-combo-boolean', COEX.combo.Boolean); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment