Remove caretLocType in nest & add/removeLineClass

Don't end the nestDisplay with the caretLocType, this is shown already
near the line/chr counter
For some reason, the array pos of the visible tabs is 4 not 5
Use new removeLineClass and addLineClass methods instead of setLineClass
This commit is contained in:
Matt Pass
2012-12-03 19:10:36 +00:00
parent f358cdea5b
commit b206f8ab78

View File

@@ -1023,11 +1023,6 @@ var ICEcoder = {
if (fileName.indexOf(".less")>0) {caretLocType="LESS"};
ICEcoder.caretLocType = caretLocType;
// If we're in a JS, CoffeeScript PHP or Ruby code block, add that to the nest display
if (["JavaScript","CoffeeScript","PHP","Ruby"].indexOf(caretLocType)>-1) {
ICEcoder.nestDisplay.innerHTML += " > " + caretLocType;
}
},
// Alter array indicating which files have changed
@@ -1308,7 +1303,7 @@ var ICEcoder = {
cMCSS = ICEcoder.content.contentWindow.document.styleSheets[2];
strCSS = cMCSS.rules ? 'rules' : 'cssRules';
cMCSS[strCSS][5].style['content'] = visibleTabs ? '"\\21e5"' : '" "';
cMCSS[strCSS][4].style['content'] = visibleTabs ? '"\\21e5"' : '" "';
cMCSS[strCSS][2].style.cssText = "background: " + activeLineBG + " !important";
top.ICEcoder.tabWidth = tabWidth;
@@ -1492,8 +1487,8 @@ var ICEcoder = {
cM = ICEcoder.getcMInstance('new');
ICEcoder.switchTab(ICEcoder.openFiles.length);
cM.setLineClass(ICEcoder['cMActiveLine'+ICEcoder.selectedTab], null);
ICEcoder['cMActiveLine'+ICEcoder.selectedTab] = cM.setLineClass(0, "cm-s-activeLine");
cM.removeLineClass(ICEcoder['cMActiveLine'+ICEcoder.selectedTab], "background", null);
ICEcoder['cMActiveLine'+ICEcoder.selectedTab] = cM.addLineClass(0, "background", "cm-s-activeLine");
ICEcoder.nextcMInstance++;
},