diff --git a/lib/coder.js b/lib/coder.js index 5a8c170..4eec7f2 100644 --- a/lib/coder.js +++ b/lib/coder.js @@ -1,9 +1,3 @@ -// ICE coder by Matt Pass -// Free to use it for your own purposes, commercial or not, just let me know of any cool uses or customisations. :) -// No warranty or liability accepted for anything, all responsibility of use is your own. -// Latest version: https://github.com/mattpass/ICEcoder -// Twitter: @mattpass - var ICEcoder = { // Define settings filesW: 250, // Initial width of the files pane @@ -403,7 +397,6 @@ var ICEcoder = { cM = ICEcoder.getcMInstance('new'); ICEcoder.switchTab(ICEcoder.openFiles.length); - ICEcoder.content.style.visibility='visible'; cM.setLineClass(ICEcoder['cMActiveLine'+ICEcoder.selectedTab], null); ICEcoder['cMActiveLine'+ICEcoder.selectedTab] = cM.setLineClass(0, "cm-s-activeLine"); @@ -562,7 +555,6 @@ var ICEcoder = { // hide the content area if we have no tabs open if (ICEcoder.openFiles.length==0) { - top.document.getElementById('content').style.visibility = "hidden"; top.ICEcoder.fMIconVis('fMView',0.3); } else { // Switch the mode & the tab @@ -1004,7 +996,7 @@ var ICEcoder = { lockIcon = top.document.getElementById('fmLock'); ICEcoder.lockedNav ? ICEcoder.lockedNav = false : ICEcoder.lockedNav = true; - ICEcoder.lockedNav ? lockIcon.src="images/file-manager-icons/padlock.png" : lockIcon.src="images/file-manager-icons/padlock-disabled.png"; + ICEcoder.lockedNav ? lockIcon.src="images/padlock.png" : lockIcon.src="images/padlock-disabled.png"; }, // Determine the CodeMirror instance we're using on demand @@ -1096,11 +1088,11 @@ var ICEcoder = { var tempX, tempY, scrollTop, IE; IE = document.all ? true : false; - if (!IE) {document.captureEvents(Event.MOUSEMOVE)}; if (IE) { - top.ICEcoder.mouseX = event.clientX + document.body.scrollLeft; - top.ICEcoder.mouseY = event.clientY + document.body.scrollTop; + top.ICEcoder.mouseX = e.clientX + document.body.scrollLeft; + top.ICEcoder.mouseY = e.clientY + document.body.scrollTop; } else { + document.captureEvents(Event.MOUSEMOVE); top.ICEcoder.mouseX = e.pageX; top.ICEcoder.mouseY = e.pageY; } @@ -1440,6 +1432,10 @@ var ICEcoder = { top.document.getElementById('loadingMask').style.visibility = "hidden"; if (loginAttempt) { if (loginAttempt == "loginOK") { + if (top.ICEcoder.openFiles.length==0) { + top.ICEcoder.content.style.visibility='visible'; + top.ICEcoder.content.src = "editor.php"; + } top.document.getElementById('accountLogin').style.top = "-50px"; setTimeout(function() {top.document.getElementById('accountLoginContainer').style.display = "none";},300); } else {