mirror of
https://github.com/icecoder/ICEcoder.git
synced 2026-03-07 00:56:48 +01:00
Lock icon moves with FM width change, setting serverMessages
File Manager lock now moves as the width changes (via setLayout) serverMessages block now displays message when creating, saving, deleting, loading and renaming Function to handle display of server messages incl fade in/out
This commit is contained in:
21
lib/coder.js
21
lib/coder.js
@@ -30,7 +30,7 @@ var ICEcoder = {
|
||||
|
||||
// On load, set aliases, set the layout and get the nest location
|
||||
init: function() {
|
||||
var aliasArray = ["header","files","account","filesFrame","editor","tabsBar","findBar","content","footer","nestValid","nestDisplay","charDisplay"];
|
||||
var aliasArray = ["header","files","account","fmLock","filesFrame","editor","tabsBar","findBar","content","footer","nestValid","nestDisplay","charDisplay"];
|
||||
ICEcoder.tD = top.document;
|
||||
|
||||
// Create our ID aliases
|
||||
@@ -63,6 +63,7 @@ var ICEcoder = {
|
||||
header.style.width = tabsBar.style.width = findBar.style.width = winW + "px";
|
||||
files.style.width = editor.style.left = this.filesW + "px";
|
||||
account.style.height = accountH + "px";
|
||||
fmLock.style.marginLeft = (this.filesW-27) + "px";
|
||||
filesFrame.style.height = (winH-headerH-accountH-footerH) + "px";
|
||||
|
||||
if (!dontSetEditor) {
|
||||
@@ -655,6 +656,7 @@ var ICEcoder = {
|
||||
if (newFolder) {
|
||||
newFolder = shortURL + "/" + newFolder;
|
||||
filesFrame.contentWindow.frames['fileControl'].location.href="lib/file-control.php?action=newFolder&file="+newFolder.replace(/\//g,"|");
|
||||
top.ICEcoder.serverMessage('<b>Creating Folder</b><br>'+newFolder);
|
||||
}
|
||||
},
|
||||
|
||||
@@ -694,6 +696,7 @@ var ICEcoder = {
|
||||
// replace forward slashes with pipes so it get be placed in a querystring
|
||||
top.ICEcoder.thisFileFolderLink = top.ICEcoder.thisFileFolderLink.replace(/\//g,"|");
|
||||
ICEcoder.filesFrame.contentWindow.frames['fileControl'].location.href = "lib/file-control.php?action=load&file="+top.ICEcoder.thisFileFolderLink;
|
||||
top.ICEcoder.serverMessage('<b>Opening File</b><br>'+top.ICEcoder.shortURL);
|
||||
} else {
|
||||
top.ICEcoder.createNewTab();
|
||||
}
|
||||
@@ -707,6 +710,7 @@ var ICEcoder = {
|
||||
|
||||
if (saveAs) {saveType = "saveAs"} else {saveType = "save"};
|
||||
filesFrame.contentWindow.frames['fileControl'].location.href="lib/file-control.php?action=save&file="+ICEcoder.openFiles[ICEcoder.selectedTab-1].replace(/\//g,"|")+"&saveType="+saveType;
|
||||
top.ICEcoder.serverMessage('<b>Saving</b><br>'+ICEcoder.openFiles[ICEcoder.selectedTab-1]);
|
||||
},
|
||||
|
||||
// Prompt a rename dialog on demand
|
||||
@@ -729,6 +733,7 @@ var ICEcoder = {
|
||||
}
|
||||
}
|
||||
ICEcoder.filesFrame.contentWindow.frames['fileControl'].location.href = "lib/file-control.php?action=rename&file="+renamedFile+"&oldFileName="+top.ICEcoder.rightClickedFile.replace(/\|/g,"/");
|
||||
top.ICEcoder.serverMessage('<b>Renaming to</b><br>'+renamedFile);
|
||||
}
|
||||
},
|
||||
|
||||
@@ -746,6 +751,7 @@ var ICEcoder = {
|
||||
if (i<top.ICEcoder.selectedFiles.length-1) {selectedFilesList+=";"}
|
||||
}
|
||||
ICEcoder.filesFrame.contentWindow.frames['fileControl'].location.href = "lib/file-control.php?action=delete&file="+selectedFilesList;
|
||||
top.ICEcoder.serverMessage('<b>Deleting File</b><br>'+top.ICEcoder.selectedFiles.toString().replace(/\|/g,"/").replace(/,/g,"\n"));
|
||||
};
|
||||
},
|
||||
|
||||
@@ -1088,5 +1094,18 @@ var ICEcoder = {
|
||||
// Turning on/off the Code Assist
|
||||
codeAssistToggle: function() {
|
||||
top.ICEcoder.codeAssist ? top.ICEcoder.codeAssist = false : top.ICEcoder.codeAssist = true;
|
||||
},
|
||||
|
||||
// Show or hide a server message
|
||||
serverMessage: function(message) {
|
||||
var serverMessage;
|
||||
|
||||
serverMessage = document.getElementById('serverMessage');
|
||||
if (message) {
|
||||
serverMessage.innerHTML = message;
|
||||
serverMessage.style.opacity = 1;
|
||||
} else {
|
||||
serverMessage.style.opacity = 0;
|
||||
}
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user