stickyTabWindow now stickyTab

Removed the flag variable stickyTab and stickyTabWindow now becomes this
Saves excess vars
This commit is contained in:
Matt Pass
2012-10-20 16:44:55 +01:00
parent 7cce0bf865
commit 70a69f1c3b
2 changed files with 3 additions and 5 deletions

View File

@@ -147,7 +147,7 @@ if ($_GET['action']=="save") {
echo 'top.ICEcoder.renameTab(top.ICEcoder.selectedTab,\''.$fileLoc."/".$fileName.'\');</script>';
}
// Reload stickytab window
echo '<script>if (top.ICEcoder.stickyTabWindow.location) {top.ICEcoder.stickyTabWindow.location.reload()};action="doneSave";</script>';
echo '<script>if (top.ICEcoder.stickyTab.location) {top.ICEcoder.stickyTab.location.reload()};action="doneSave";</script>';
} else {
$loadedFile = file_get_contents($file);
echo '<textarea name="loadedFile" id="loadedFile">'.str_replace("</textarea>","<ICEcoder:/:textarea>",htmlentities($loadedFile)).'</textarea>';

View File

@@ -26,8 +26,7 @@ var ICEcoder = {
mouseDown: false, // If the mouse is down or not
draggingFilesW: false, // If we're dragging the file manager width or not
serverQueueItems: [], // Array of URLs to call in order
stickyTab: false, // If we have a sticky tab open or not
stickyTabWindow: false, // Target variable for the sticky tab window
stickyTab: false, // Target variable for the sticky tab window
pluginIntervalRefs: [], // Array of plugin interval refs
dragSrcEl: null, // Tab element being dragged
ready: false, // Indicates if ICEcoder is ready for action
@@ -1685,8 +1684,7 @@ var ICEcoder = {
// CTRL+Enter (Open Webpage)
} else if(key==13 && top.ICEcoder.ctrlKeyDown==true && top.ICEcoder.openFiles[top.ICEcoder.selectedTab-1] != "/[NEW]") {
if (top.ICEcoder.stickyTabMaybe) {
top.ICEcoder.stickyTabWindow = window.open(top.ICEcoder.openFiles[top.ICEcoder.selectedTab-1],"stickyTab");
top.ICEcoder.stickyTab = true;
top.ICEcoder.stickyTab = window.open(top.ICEcoder.openFiles[top.ICEcoder.selectedTab-1],"stickyTab");
} else {
window.open(top.ICEcoder.openFiles[top.ICEcoder.selectedTab-1]);
}