Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/spreadsheet.js =================================================================== RCS file: /usr/local/cvsroot/lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/spreadsheet.js,v diff -u -r1.2 -r1.3 --- lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/spreadsheet.js 13 Jul 2008 08:53:49 -0000 1.2 +++ lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/spreadsheet.js 19 Nov 2008 22:22:10 -0000 1.3 @@ -73,6 +73,8 @@ var tab = String.fromCharCode(9); var printstyle = "print.css"; +var isFirstTime = true; + function trans(key) { if (strings[key]) return strings[key]; else return "["+key+"]"; } @@ -275,8 +277,8 @@ scrollX = getObj("content").scrollLeft; scrollY = getObj("content").scrollTop; } - var out = "
"; - out += ""; + var out = "
"; + out += ""; out += " "; if (isWriteable) { out += ""+trans("New")+" - "; @@ -428,7 +430,12 @@ if (obj) obj.style.backgroundColor = color; } } - getObj("focus").focus(); + + if (isFirstTime) { + isFirstTime = false; + } else { + getObj("focus").focus(); + } } function previewValue() { @@ -626,8 +633,10 @@ active = "content"; getObj("source").style.display = "none"; getObj("data").style.display = "inline"; + display(); } + function cancelLoad() { active = "content"; getObj("source").style.display = "none";