1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94
| initKeyboard : function(ct){
this.keyboardTarget.el.on('click', this.IESel, this);
this.keyboardTarget.el.on('keyup', this.IESel, this);
this.keyboardTarget.el.on('select', this.IESel, this);
this.keyboard = ct.createChild({
tag: 'div',
cls: 'x-keyboard x-panel'
});
this.keyboard.setStyle({width: this.width || 370});
var layouts = 0;
for (lang in this.Languages) if (typeof this.Languages[lang] == "object") layouts++;
var dh = Ext.DomHelper;
var ktbarItems = [];
if (this.languageSelection) {
var values = [];
for (ktype in this.Languages) {
if (typeof this.Languages[ktype] == "object") {
values.push([ktype, ktype]);
}
}
this.languageSelector = new Ext.form.ComboBox({
store: values,
forceSelection: true,
triggerAction: 'all',
editable: false,
readOnly: true,
height: 15,
width: 100,
value: this.language,
listeners: {
'select': function(combo, record) {
this.language = record.data.value;
this.buildKeys();
},
expand: function(){
this.selectingLanguage = true;
},
collapse: function(){
this.selectingLanguage = false;
},
scope: this
}
});
ktbarItems.push(this.languageSelector);
}
else{
ktbarItems.push(this.language);
}
ktbarItems.push('-', {
text: this.deadKeysButtonText,
//tooltip: this.deadKeysButtonTip,
enableToggle: true,
listeners: {
toggle: function(btn, pressed){
this.deadKeysOn = pressed;
this.keyModify("");
},
scope: this
}
});
this.ktbar = new Ext.Toolbar({
renderTo: this.keyboard,
items: ktbarItems
});
if (!this.languageSelection){
Ext.fly(this.ktbar.items.items[0].getEl()).setStyle({fontWeight: 'bold'});
}
var wrap = this.keyboard.createChild({
tag: 'div',
cls: 'x-panel-bwrap'
});
var mc = wrap.createChild({
tag: 'div',
cls: 'x-panel-body'
});
this.keysContainer = mc.createChild({
tag: 'div'
});
this.buildKeys();
}, |