gabrielstuff
28 Oct 2010, 8:26 AM
Hello,
Where can we setup a language file ?
For example how to change the DONE button label that is setup deep into Select and in HARD :
donetext : "Done"...
All the picker stuff should be setupable ? right ?
Here is what I've done. I've overwritten the onMaskTap function for select field just to add this.picker.doneText = "OK".
Seems quiete slugish to me.
onMaskTap : function() {
if (Ext.is.Phone) {
this.picker = new Ext.Picker({
slots: [{
align: 'center',
name: this.name,
valueField: this.valueField,
displayField: this.displayField,
value: this.getValue(),
store: this.store
}],
listeners: {
change: this.onPickerChange,
hide: this.onPickerHide,
scope: this
}
});
this.picker.doneText = "OK";
this.picker.show();
}
else {
this.list = new Ext.List({
store: this.store,
tpl: [
'<tpl for=".">',
'<div class="x-list-item">',
'<span class="x-list-label">{' + this.displayField + '}</span>',
'<span class="x-list-selected"></span>',
'</div>',
'</tpl>'
],
itemSelector: '.x-list-item',
floating: true,
stopMaskTapEvent: true,
hideOnMaskTap: true,
singleSelect: true,
listeners: {
selectionchange: this.onListSelect,
scope: this
}
});
this.list.showBy(this.el, 'fade', false);
var index = this.store.find(this.valueField, this.value);
this.list.select(index != -1 ? index : 0, false, true);
}
}
}]
},
Thanks !
Where can we setup a language file ?
For example how to change the DONE button label that is setup deep into Select and in HARD :
donetext : "Done"...
All the picker stuff should be setupable ? right ?
Here is what I've done. I've overwritten the onMaskTap function for select field just to add this.picker.doneText = "OK".
Seems quiete slugish to me.
onMaskTap : function() {
if (Ext.is.Phone) {
this.picker = new Ext.Picker({
slots: [{
align: 'center',
name: this.name,
valueField: this.valueField,
displayField: this.displayField,
value: this.getValue(),
store: this.store
}],
listeners: {
change: this.onPickerChange,
hide: this.onPickerHide,
scope: this
}
});
this.picker.doneText = "OK";
this.picker.show();
}
else {
this.list = new Ext.List({
store: this.store,
tpl: [
'<tpl for=".">',
'<div class="x-list-item">',
'<span class="x-list-label">{' + this.displayField + '}</span>',
'<span class="x-list-selected"></span>',
'</div>',
'</tpl>'
],
itemSelector: '.x-list-item',
floating: true,
stopMaskTapEvent: true,
hideOnMaskTap: true,
singleSelect: true,
listeners: {
selectionchange: this.onListSelect,
scope: this
}
});
this.list.showBy(this.el, 'fade', false);
var index = this.store.find(this.valueField, this.value);
this.list.select(index != -1 ? index : 0, false, true);
}
}
}]
},
Thanks !