Created
February 28, 2013 11:30
-
-
Save hansek/5056117 to your computer and use it in GitHub Desktop.
Custom ExtJS 3.4 components definitions for MODX Revolution.
This file contains 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
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