Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/spreadsheet.js =================================================================== diff -u -r56d116683b7554e8ad3677cd0e12866ac3feb834 -r1186050b7296bc944e81e14f47b4aa7b3323ace3 --- lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/spreadsheet.js (.../spreadsheet.js) (revision 56d116683b7554e8ad3677cd0e12866ac3feb834) +++ lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/spreadsheet.js (.../spreadsheet.js) (revision 1186050b7296bc944e81e14f47b4aa7b3323ace3) @@ -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";