diff --git a/lib/ice-coder.js b/lib/ice-coder.js
index eb088a1..b82c743 100644
--- a/lib/ice-coder.js
+++ b/lib/ice-coder.js
@@ -95,6 +95,7 @@ var ICEcoder = {
this.account.style.height = this.accountH + "px";
this.fmLock.style.marginLeft = (this.filesW-42) + "px";
this.filesFrame.style.height = (winH-headerH-accountH-footerH) + "px";
+ top.ICEcoder.setTabWidths();
// If we need to set the editor sizes
if (!dontSetEditor) {
@@ -566,7 +567,7 @@ var ICEcoder = {
// rename array item and the tab
top.ICEcoder.openFiles[i] = newName;
closeTabLink = '
';
- top.document.getElementById('tab'+(i+1)).innerHTML = top.ICEcoder.openFiles[i] + " " + closeTabLink;
+ top.document.getElementById('tab'+(i+1)).innerHTML = closeTabLink + " " + top.ICEcoder.openFiles[i].replace(/\//,"") + "/";
}
top.ICEcoder.serverQueue("add","lib/file-control.php?action=rename&file="+newName+"&oldFileName="+oldName.replace(/\|/g,"/"));
top.ICEcoder.serverMessage('Renaming to
'+newName);
@@ -749,9 +750,9 @@ var ICEcoder = {
top.ICEcoder.thisFileFolderType='file';
top.ICEcoder.openFile();
}
- if (action=="newFile") {top.ICEcoder.newFile();}
- if (action=="newFolder") {top.ICEcoder.newFolder();}
- if (action=="rename") {top.ICEcoder.renameFile(top.ICEcoder.rightClickedFile);}
+ else if (action=="newFile") {top.ICEcoder.newFile();}
+ else if (action=="newFolder") {top.ICEcoder.newFolder();}
+ else if (action=="rename") {top.ICEcoder.renameFile(top.ICEcoder.rightClickedFile);}
}
if (action=="delete" && ICEcoder.selectedFiles.length>0) {
@@ -1017,18 +1018,18 @@ var ICEcoder = {
cM = ICEcoder.getcMInstance();
caretLocType = "Unknown";
caretChunk = cM.getValue().substr(0,ICEcoder.caretPos+1);
- if (caretChunk.lastIndexOf("")&&caretLocType=="Unknown") {caretLocType = "JavaScript"};
- if (caretChunk.lastIndexOf("")>caretChunk.lastIndexOf("?>")&&caretLocType=="Unknown") {caretLocType = "PHP"};
- if (caretChunk.lastIndexOf("<%")>caretChunk.lastIndexOf("%>")&&caretLocType=="Unknown") {caretLocType = "Ruby"};
- if (caretChunk.lastIndexOf("<")>caretChunk.lastIndexOf(">")&&caretLocType=="Unknown") {caretLocType = "HTML"};
- if (caretLocType=="Unknown") {caretLocType = "Content"};
+ if (caretChunk.lastIndexOf("")&&caretLocType=="Unknown") {caretLocType = "JavaScript"}
+ else if (caretChunk.lastIndexOf("")>caretChunk.lastIndexOf("?>")&&caretLocType=="Unknown") {caretLocType = "PHP"}
+ else if (caretChunk.lastIndexOf("<%")>caretChunk.lastIndexOf("%>")&&caretLocType=="Unknown") {caretLocType = "Ruby"}
+ else if (caretChunk.lastIndexOf("<")>caretChunk.lastIndexOf(">")&&caretLocType=="Unknown") {caretLocType = "HTML"}
+ else if (caretLocType=="Unknown") {caretLocType = "Content"};
fileName = ICEcoder.openFiles[ICEcoder.selectedTab-1];
- if (fileName.indexOf(".js")>0) {caretLocType="JavaScript"};
- if (fileName.indexOf(".coffee")>0) {caretLocType="CoffeeScript"};
- if (fileName.indexOf(".rb")>0) {caretLocType="Ruby"};
- if (fileName.indexOf(".css")>0) {caretLocType="CSS"};
- if (fileName.indexOf(".less")>0) {caretLocType="LESS"};
+ if (fileName.indexOf(".js")>0) {caretLocType="JavaScript"}
+ else if (fileName.indexOf(".coffee")>0) {caretLocType="CoffeeScript"}
+ else if (fileName.indexOf(".rb")>0) {caretLocType="Ruby"}
+ else if (fileName.indexOf(".css")>0) {caretLocType="CSS"}
+ else if (fileName.indexOf(".less")>0) {caretLocType="LESS"};
ICEcoder.caretLocType = caretLocType;
},
@@ -1130,6 +1131,7 @@ var ICEcoder = {
newBlock.style.position = "absolute";
newBlock.style.display = "block";
newBlock.style.width = newBlock.style.height = "20px";
+ newBlock.style.zIndex = "1000";
newBlock.style.background = match ? match[0] : '';
if (newBlock.style.backgroundColor=="") {newBlock.style.display = "none"};
top.document.getElementById('header').appendChild(newBlock);
@@ -1259,8 +1261,7 @@ var ICEcoder = {
document.body.appendChild(txtArea);
document.getElementById('saveTemp'+nextSaveID).value = cM.getValue();
}
- }
- if (action=="del") {
+ } else if (action=="del") {
if (ICEcoder.serverQueueItems[0] && ICEcoder.serverQueueItems[0].indexOf('action=save')>0) {
topSaveID = nextSaveID-1;
for (var i=1;i
';
top.document.getElementById('tab'+(top.ICEcoder.openFiles.length)).style.display = "inline-block";
- top.document.getElementById('tab'+(top.ICEcoder.openFiles.length)).innerHTML = top.ICEcoder.openFiles[top.ICEcoder.openFiles.length-1] + " " + closeTabLink;
+ top.document.getElementById('tab'+(top.ICEcoder.openFiles.length)).innerHTML = closeTabLink + " " + top.ICEcoder.openFiles[top.ICEcoder.openFiles.length-1].replace(/\//,"") + "/";
+ top.document.getElementById('tab'+(top.ICEcoder.openFiles.length)).title = top.ICEcoder.openFiles[top.ICEcoder.openFiles.length-1];
+
+ // Set the widths
+ top.ICEcoder.setTabWidths();
// Highlight it and state it's selected
top.ICEcoder.redoTabHighlight(top.ICEcoder.openFiles.length);
@@ -1601,7 +1606,8 @@ var ICEcoder = {
// Setup a new tab
closeTabLink = '
';
- top.document.getElementById('tab'+tabNum).innerHTML = top.ICEcoder.openFiles[tabNum-1] + " " + closeTabLink;
+ top.document.getElementById('tab'+tabNum).innerHTML = closeTabLink + " " + top.ICEcoder.openFiles[tabNum-1].replace(/\//,"") + "/";
+ top.document.getElementById('tab'+tabNum).title = top.ICEcoder.openFiles[tabNum-1];
},
// Reset all tabs to be without a highlight and then highlight the selected
@@ -1642,6 +1648,7 @@ var ICEcoder = {
// recursively copy over all tabs & data from the tab to the right, if there is one
for (var i=closeTabNum;i availWidth ? thisWidth : 150;
+ top.document.getElementById('tab'+(i+1)).style.width = tabWidth + "px";
+ }
},
// ==============
@@ -1805,7 +1829,7 @@ var ICEcoder = {
key = evt.keyCode ? evt.keyCode : evt.which ? evt.which : evt.charCode;
if (key==17) {top.ICEcoder.ctrlKeyDown = false; top.ICEcoder.stickyTabMaybe = false}
- if (key==16) {top.ICEcoder.shiftKeyDown = false}
- if (key==46) {top.ICEcoder.delKeyDown = false}
+ else if (key==16) {top.ICEcoder.shiftKeyDown = false}
+ else if (key==46) {top.ICEcoder.delKeyDown = false}
}
};
\ No newline at end of file