Commit 20b35886 authored by Bas Lijnse's avatar Bas Lijnse

Fixed small focus tracking bug

git-svn-id: https://svn.cs.ru.nl/repos/iTask-system/branches/fancyTasks@351 63da3aa8-80fd-4f01-9db8-e6ea747a3da2
parent 795bd280
......@@ -191,8 +191,8 @@ itasks.WorkTabPanel = Ext.extend(Ext.Panel, {
for(var i = 0; i < num; i++) {
var inputid = data.prefix + data.inputs[i].formid + '-' + data.inputs[i].inputid;
var inputname = data.inputs[i].formid + '-' + data.inputs[i].inputid;
var inputid = data.prefix + inputname;
var input = Ext.get(inputid);
//Record the formid
......@@ -241,7 +241,7 @@ itasks.WorkTabPanel = Ext.extend(Ext.Panel, {
},this);
}
input.on("focus", function (inp) {
this.lastFocus = inp.id;
this.lastFocus = inp.name;
},this);
break;
......@@ -274,7 +274,8 @@ itasks.WorkTabPanel = Ext.extend(Ext.Panel, {
},this);
}
input.on("focus", function (inp) {
this.lastFocus = inp.id;
alert("FOOCUSUUIS");
this.lastFocus = inp.name;
},this);
break;
......@@ -299,6 +300,9 @@ itasks.WorkTabPanel = Ext.extend(Ext.Panel, {
this.addUpdate(but.name, "click");
this.refresh();
},this);
input.on("focus", function(inp) {
this.lastFocus = inp.name;
},this);
break;
//Default: Attach event handlers
......@@ -328,13 +332,13 @@ itasks.WorkTabPanel = Ext.extend(Ext.Panel, {
}
//Attach focus tracking handler
input.on("focus", function (e) {
this.lastFocus = e.target.id;
this.lastFocus = e.target.name;
},this);
}
//Refocus
if(this.lastFocus == inputid) {
input.focus();
if(this.lastFocus == inputname) {
input.focus(true,100);
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment