mirror of
https://github.com/icecoder/ICEcoder.git
synced 2026-03-06 16:46:48 +01:00
Show/hide text next to nest display
New array item for nestDisplayText Clear this to begin with then set with text if we have a nest, clear otherwise Only show the cursor position item if we have a nest
This commit is contained in:
@@ -35,7 +35,7 @@ var ICEcoder = {
|
||||
|
||||
// Set our aliases
|
||||
initAliases: function() {
|
||||
var aliasArray = ["header","files","account","fmLock","filesFrame","editor","tabsBar","findBar","content","footer","nestValid","nestDisplay","charDisplay"];
|
||||
var aliasArray = ["header","files","account","fmLock","filesFrame","editor","tabsBar","findBar","content","footer","nestValid","nestDisplayText","nestDisplay","charDisplay"];
|
||||
|
||||
// Create our ID aliases
|
||||
for (var i=0;i<aliasArray.length;i++) {
|
||||
@@ -1028,6 +1028,7 @@ var ICEcoder = {
|
||||
// Now we've built up our nest depth array, if we're due to show it in the display
|
||||
if (updateNestDisplay && !top.ICEcoder.dontUpdateNest) {
|
||||
// Clear the display
|
||||
ICEcoder.nestDisplayText.innerHTML = "";
|
||||
ICEcoder.nestDisplay.innerHTML = "";
|
||||
if ("undefined" != typeof ICEcoder.openFiles[ICEcoder.selectedTab-1]) {
|
||||
fileName = ICEcoder.openFiles[ICEcoder.selectedTab-1];
|
||||
@@ -1035,6 +1036,7 @@ var ICEcoder = {
|
||||
(nestCheck.indexOf("include(")==-1)&&(nestCheck.indexOf("include_once(")==-1)&&
|
||||
(nestCheck.indexOf("<html")>-1||nestCheck.indexOf("<body")>-1)) {
|
||||
|
||||
ICEcoder.nestDisplayText.innerHTML = ICEcoder.htmlTagArray.length > 0 ? "Cursor Position" : "";
|
||||
// Then for all the array items, output as the nest display
|
||||
for (var i=0;i<ICEcoder.htmlTagArray.length;i++) {
|
||||
events = 'onMouseover="top.ICEcoder.highlightBlock('+i+')" onMouseout="top.ICEcoder.highlightBlock('+i+',\'hide\')" onClick="top.ICEcoder.setPosition('+i+',top.ICEcoder.startPosLine,\''+ICEcoder.htmlTagArray[i]+'\')"';
|
||||
@@ -1044,7 +1046,7 @@ var ICEcoder = {
|
||||
? '<div '+events+' style="display: inline-block; width: 8px; margin-top: -5px; height: 30px; background-image: url(images/nest-tag-bg.gif); background-position: -7px 0; cursor: pointer"></div>'
|
||||
: '<div '+events+' style="display: inline-block; width: 7px; margin-top: -5px; height: 30px; background-image: url(images/nest-tag-bg.gif); background-position: -15px 0; cursor: pointer"></div>';
|
||||
}
|
||||
if ("undefined" != typeof state.curState) {
|
||||
if ("undefined" != typeof state.curState && ICEcoder.htmlTagArray.length > 0) {
|
||||
ICEcoder.nestDisplay.innerHTML += '<a style="display: inline-block; cursor: default; padding: 7px 2px 7px 7px; margin-top: -5px; height: 30px; color: #666">'+(state.curState.tagName ? state.curState.tagName : 'content')+'</a>';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user