From 3937d733f0bea12cd6df472c7ac143a21ebdbd0c Mon Sep 17 00:00:00 2001 From: Matt Pass Date: Thu, 20 Dec 2012 17:15:26 +0000 Subject: [PATCH] QS var cleaning, removing test logs and / strClean on GET var selectedFiles Remove 2 x console.logs Remove commented text 2 x areas need first slash removing and ending with a slash Need to var thisWidth to avoid global --- editor.php | 4 ++-- lib/ice-coder.js | 6 +++--- lib/multiple-results.php | 4 +--- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/editor.php b/editor.php index 1a461c0..b89e96b 100644 --- a/editor.php +++ b/editor.php @@ -211,8 +211,8 @@ function createNewCMInstance(num) { }; // var top.ICEcoder.foldStyle = '+ %N%'; - var codeFoldTag = CodeMirror.newFoldFunction(CodeMirror.tagRangeFinder); // did have 2nd arg of top.ICEcoder.foldStyle, 2nd arg is now placeholder between tags/braces - var codeFoldBrace = CodeMirror.newFoldFunction(CodeMirror.braceRangeFinder); // did have 2nd arg of top.ICEcoder.foldStyle, 2nd arg is now placeholder between tags/braces + var codeFoldTag = CodeMirror.newFoldFunction(CodeMirror.tagRangeFinder); + var codeFoldBrace = CodeMirror.newFoldFunction(CodeMirror.braceRangeFinder); diff --git a/lib/ice-coder.js b/lib/ice-coder.js index 731c4f5..c9e7daf 100644 --- a/lib/ice-coder.js +++ b/lib/ice-coder.js @@ -1566,7 +1566,7 @@ var ICEcoder = { closeTabLink = ''; top.document.getElementById('tab'+(top.ICEcoder.openFiles.length)).style.display = "inline-block"; 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]; + top.document.getElementById('tab'+(top.ICEcoder.openFiles.length)).title = top.ICEcoder.openFiles[top.ICEcoder.openFiles.length-1].replace(/\//,"") + "/"; // Set the widths top.ICEcoder.setTabWidths(); @@ -1607,7 +1607,7 @@ var ICEcoder = { // Setup a new tab 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]; + top.document.getElementById('tab'+tabNum).title = top.ICEcoder.openFiles[tabNum-1].replace(/\//,"") + "/"; }, // Reset all tabs to be without a highlight and then highlight the selected @@ -1695,7 +1695,7 @@ var ICEcoder = { // Set the tabs width setTabWidths: function() { - var availWidth, tabWidth; + var availWidth, tabWidth, thisWidth; availWidth = parseInt(top.ICEcoder.content.style.width,10)-41-24-10; // - left margin - new tab - right margin avgWidth = (availWidth/top.ICEcoder.openFiles.length)-18; diff --git a/lib/multiple-results.php b/lib/multiple-results.php index 0d36f69..7e4227a 100644 --- a/lib/multiple-results.php +++ b/lib/multiple-results.php @@ -1,7 +1,7 @@ @@ -112,7 +112,6 @@ if (startTab!=top.ICEcoder.selectedTab) { } else { $targetName = "file"; $r = 0; - echo ";console.log('HERE');"; function phpGrep($q, $path, $base) { $fp = opendir($path); global $r, $ICEcoder, $serverType, $selectedFiles; @@ -130,7 +129,6 @@ if (startTab!=top.ICEcoder.selectedTab) { } $findPath = str_replace($base,"",$fullPath); for ($i=0;$i