Fixed the jump-to feature in the cases List
This commit is contained in:
@@ -799,13 +799,15 @@ Ext.onReady ( function() {
|
|||||||
|
|
||||||
textJump = {
|
textJump = {
|
||||||
xtype: 'numberfield',
|
xtype: 'numberfield',
|
||||||
|
id : 'textJump',
|
||||||
allowBlank: true,
|
allowBlank: true,
|
||||||
width: 50,
|
width: 50,
|
||||||
emptyText: TRANSLATIONS.ID_CASESLIST_APP_UID,
|
emptyText: TRANSLATIONS.ID_CASESLIST_APP_UID,
|
||||||
listeners: {
|
listeners: {
|
||||||
specialkey: function(f,e){
|
specialkey: function(f,e){
|
||||||
if (e.getKey() == e.ENTER) {
|
if (e.getKey() == e.ENTER) {
|
||||||
caseNumber = parseFloat(Ext.util.Format.trim(textJump.getValue()));
|
// defining an id and using the Ext.getCmp method improves the accesibility of Ext components
|
||||||
|
caseNumber = parseFloat(Ext.util.Format.trim(Ext.getCmp('textJump').getValue()));
|
||||||
if( caseNumber )
|
if( caseNumber )
|
||||||
jumpToCase(caseNumber);
|
jumpToCase(caseNumber);
|
||||||
else
|
else
|
||||||
@@ -818,13 +820,13 @@ Ext.onReady ( function() {
|
|||||||
var btnJump = new Ext.Button ({
|
var btnJump = new Ext.Button ({
|
||||||
text: TRANSLATIONS.LABEL_OPT_JUMP,
|
text: TRANSLATIONS.LABEL_OPT_JUMP,
|
||||||
handler: function(){
|
handler: function(){
|
||||||
caseNumber = parseFloat(Ext.util.Format.trim(textJump.getValue()));
|
var caseNumber = parseFloat(Ext.util.Format.trim(Ext.getCmp('textJump').getValue()));
|
||||||
caseNumber = parseFloat(Ext.util.Format.trim(textJump.getValue()));
|
if (caseNumber){
|
||||||
if( caseNumber )
|
|
||||||
jumpToCase(caseNumber);
|
jumpToCase(caseNumber);
|
||||||
else
|
} else {
|
||||||
msgBox('Input Error', 'You have set a invalid Application Number', 'error');
|
msgBox('Input Error', 'You have set a invalid Application Number', 'error');
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
/*** menu and toolbars **/
|
/*** menu and toolbars **/
|
||||||
|
|||||||
Reference in New Issue
Block a user