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
This commit is contained in:
Matt Pass
2012-12-20 17:15:26 +00:00
parent 0328643c7c
commit 3937d733f0
3 changed files with 6 additions and 8 deletions

View File

@@ -211,8 +211,8 @@ function createNewCMInstance(num) {
};
// var top.ICEcoder.foldStyle = '<span style="position: absolute; display: inline-block; width: 13px; height: 13px; left: 0; background-color: #b00; color: #fff; text-align: center; cursor: pointer"><span style="position: relative; left: -1px">+</span></span> %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);
</script>
</body>

View File

@@ -1566,7 +1566,7 @@ var ICEcoder = {
closeTabLink = '<a nohref onClick="top.ICEcoder.closeTab('+(top.ICEcoder.openFiles.length)+')"><img src="images/nav-close.gif" id="closeTabButton'+(top.ICEcoder.openFiles.length)+'" class="closeTab" onMouseOver="prevBG=this.style.backgroundColor;this.style.backgroundColor=\'#333\'" onMouseOut="this.style.backgroundColor=prevBG"></a>';
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 = '<a nohref onClick="parent.ICEcoder.closeTab('+tabNum+')"><img src="images/nav-close.gif" id="closeTabButton'+tabNum+'" class="closeTab" onMouseOver="prevBG=this.style.backgroundColor;this.style.backgroundColor=\'#333\'" onMouseOut="this.style.backgroundColor=prevBG"></a>';
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;

View File

@@ -1,7 +1,7 @@
<?php include("settings.php");?>
<?php
if(isset($_GET['selectedFiles'])) {
$selectedFiles=explode(":",$_GET['selectedFiles']);
$selectedFiles=explode(":",strClean($_GET['selectedFiles']));
echo $selectedFiles[0].".....".$selectedFiles[1];
}
?>
@@ -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<count($selectedFiles);$i++) {
echo ";console.log('FIND: ".$findPath." in ".str_replace("|","/",$selectedFiles[$i])." : ".strpos($findPath,str_replace("|","/",$selectedFiles[$i]))."');";
if (strpos($findPath,str_replace("|","/",$selectedFiles[$i]))!==0) {
$bFile = true;
}