From 4eb6ffc6188af5f71e9ca72f3ff48f20fa003f37 Mon Sep 17 00:00:00 2001 From: Matt Pass Date: Wed, 25 Jul 2012 17:43:35 +0100 Subject: [PATCH] openLastFiles triggering & cursor error catching openLastFiles function now triggered from: init (this is for reloads of the browser) and refreshFileManager (for logins) Also now only changing cursor if we have iFrames in DOM --- lib/coder.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/coder.js b/lib/coder.js index 54610c6..70a3125 100644 --- a/lib/coder.js +++ b/lib/coder.js @@ -51,6 +51,7 @@ var ICEcoder = { if (login) { top.document.getElementById('accountLogin').style.top = "-50px"; setTimeout(function() {top.document.getElementById('accountLoginContainer').style.display = "none";},300); + if (top.openLastFiles) {top.ICEcoder.autoOpenFiles()}; } else { top.document.getElementsByName('loginPassword')[0].focus(); } @@ -1160,7 +1161,9 @@ var ICEcoder = { cursorName = "auto"; } if (top.ICEcoder.content.contentWindow.document && top.ICEcoder.filesFrame.contentWindow) { - top.document.body.style.cursor = top.ICEcoder.content.contentWindow.document.body.style.cursor = top.ICEcoder.filesFrame.contentWindow.document.body.style.cursor = cursorName; + top.document.body.style.cursor = cursorName; + if (top.ICEcoder.content.contentWindow.document.body) {top.ICEcoder.content.contentWindow.document.body.style.cursor = cursorName}; + if (top.ICEcoder.filesFrame.contentWindow.document.body) {top.ICEcoder.filesFrame.contentWindow.document.body.style.cursor = cursorName}; } } }, @@ -1495,6 +1498,7 @@ var ICEcoder = { } top.document.getElementById('accountLogin').style.top = "-50px"; setTimeout(function() {top.document.getElementById('accountLoginContainer').style.display = "none";},300); + if (top.openLastFiles) {top.ICEcoder.autoOpenFiles()}; } else { top.ICEcoder.message('Sorry, that\'s not correct.'); }