prefix all editor css classes

This commit is contained in:
Fabian Jakobs 2010-05-14 12:42:10 +02:00
commit d4e253ad14
9 changed files with 64 additions and 64 deletions

View file

@ -142,7 +142,7 @@ ace.Editor = function(renderer, doc) {
var pos = self.doc.findMatchingBracket(self.getCursorPosition());
if (pos) {
var range = new ace.Range(pos.row, pos.column, pos.row, pos.column+1);
self.$bracketHighlight = self.renderer.addMarker(range, "bracket");
self.$bracketHighlight = self.renderer.addMarker(range, "ace_bracket");
}
}, 10);
};
@ -195,7 +195,7 @@ ace.Editor = function(renderer, doc) {
if (this.getHighlightActiveLine() && !this.selection.isMultiLine()) {
var cursor = this.getCursorPosition();
var range = new ace.Range(cursor.row, 0, cursor.row+1, 0);
this.$highlightLineMarker = this.renderer.addMarker(range, "active_line", "line");
this.$highlightLineMarker = this.renderer.addMarker(range, "ace_active_line", "line");
}
};
@ -208,7 +208,7 @@ ace.Editor = function(renderer, doc) {
if (!this.selection.isEmpty()) {
var range = this.selection.getRange();
var style = this.getSelectionStyle();
this.$selectionMarker = this.renderer.addMarker(range, "selection", style);
this.$selectionMarker = this.renderer.addMarker(range, "ace_selection", style);
}
this.onCursorChange();

View file

@ -2,7 +2,7 @@ ace.provide("ace.ScrollBar");
ace.ScrollBar = function(parent) {
this.element = document.createElement("div");
this.element.className = "sb";
this.element.className = "ace_sb";
this.inner = document.createElement("div");
this.element.appendChild(this.inner);

View file

@ -2,14 +2,14 @@ ace.provide("ace.VirtualRenderer");
ace.VirtualRenderer = function(container) {
this.container = container;
ace.addCssClass(this.container, "editor");
ace.addCssClass(this.container, "ace_editor");
this.scroller = document.createElement("div");
this.scroller.className = "scroller";
this.scroller.className = "ace_scroller";
this.container.appendChild(this.scroller);
this.$gutter = document.createElement("div");
this.$gutter.className = "gutter";
this.$gutter.className = "ace_gutter";
this.container.appendChild(this.$gutter);
this.content = document.createElement("div");
@ -116,7 +116,7 @@ ace.VirtualRenderer = function(container) {
if (!this.$printMarginEl) {
this.$printMarginEl = document.createElement("div");
this.$printMarginEl.className = "printMargin";
this.$printMarginEl.className = "ace_printMargin";
this.content.insertBefore(this.$printMarginEl, this.$cursorLayer.element);
}
@ -374,11 +374,11 @@ ace.VirtualRenderer = function(container) {
};
this.visualizeFocus = function() {
ace.addCssClass(this.container, "focus");
ace.addCssClass(this.container, "ace_focus");
};
this.visualizeBlur = function() {
ace.removeCssClass(this.container, "focus");
ace.removeCssClass(this.container, "ace_focus");
};
this.showComposition = function(position) {

View file

@ -2,11 +2,11 @@ ace.provide("ace.layer.Cursor");
ace.layer.Cursor = function(parentEl) {
this.element = document.createElement("div");
this.element.className = "layer cursor-layer";
this.element.className = "ace_layer ace_cursor-layer";
parentEl.appendChild(this.element);
this.cursor = document.createElement("div");
this.cursor.className = "cursor";
this.cursor.className = "ace_cursor";
this.isVisible = false;
};
@ -19,9 +19,9 @@ ace.layer.Cursor = function(parentEl) {
column : position.column
};
if (overwrite) {
ace.addCssClass(this.cursor, "overwrite");
ace.addCssClass(this.cursor, "ace_overwrite");
} else {
ace.removeCssClass(this.cursor, "overwrite");
ace.removeCssClass(this.cursor, "ace_overwrite");
}
};

View file

@ -2,7 +2,7 @@ ace.provide("ace.layer.Gutter");
ace.layer.Gutter = function(parentEl) {
this.element = document.createElement("div");
this.element.className = "layer gutter-layer";
this.element.className = "ace_layer ace_gutter-layer";
parentEl.appendChild(this.element);
this.$breakpoints = [];
@ -22,8 +22,8 @@ ace.layer.Gutter = function(parentEl) {
var html = [];
for ( var i = config.firstRow; i <= config.lastRow; i++) {
html.push("<div class='gutter-cell",
this.$breakpoints[i] ? " breakpoint" : "",
html.push("<div class='ace_gutter-cell",
this.$breakpoints[i] ? " ace_breakpoint" : "",
"' style='height:", config.lineHeight, "px;'>", (i+1), "</div>");
html.push("</div>");
}

View file

@ -2,7 +2,7 @@ ace.provide("ace.layer.Marker");
ace.layer.Marker = function(parentEl) {
this.element = document.createElement("div");
this.element.className = "layer marker-layer";
this.element.className = "ace_layer ace_marker-layer";
parentEl.appendChild(this.element);
this.markers = {};

View file

@ -2,7 +2,7 @@ ace.provide("ace.layer.Text");
ace.layer.Text = function(parentEl) {
this.element = document.createElement("div");
this.element.className = "layer text-layer";
this.element.className = "ace_layer ace_text-layer";
parentEl.appendChild(this.element);
this.$characterSize = this.$measureSizes();
@ -92,7 +92,7 @@ ace.layer.Text = function(parentEl) {
var tabSize = this.doc.getTabSize();
if (this.$showInvisibles) {
var halfTab = (tabSize) / 2;
this.$tabString = "<span class='invisible'>"
this.$tabString = "<span class='ace_invisible'>"
+ new Array(Math.floor(halfTab)).join("&nbsp;")
+ this.TAB_CHAR
+ new Array(Math.ceil(halfTab)+1).join("&nbsp;")
@ -124,7 +124,7 @@ ace.layer.Text = function(parentEl) {
var html = [];
for ( var i = config.firstRow; i <= config.lastRow; i++) {
html.push("<div class='line' style='height:" + this.$characterSize.height + "px;", "width:",
html.push("<div class='ace_line' style='height:" + this.$characterSize.height + "px;", "width:",
config.width, "px'>");
this.renderLine(html, i), html.push("</div>");
}
@ -140,7 +140,7 @@ ace.layer.Text = function(parentEl) {
var spaceRe = /[\v\f \u00a0\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u2028\u2029\u3000]+/g;
var spaceReplace = function(space) {
var space = new Array(space.length+1).join(self.SPACE_CHAR);
return "<span class='invisible'>" + space + "</span>";
return "<span class='ace_invisible'>" + space + "</span>";
};
}
else {
@ -158,7 +158,7 @@ ace.layer.Text = function(parentEl) {
.replace(/\t/g, this.$tabString);
if (token.type !== "text") {
stringBuilder.push("<span class='", token.type, "'>", output, "</span>");
stringBuilder.push("<span class='ace_", token.type, "'>", output, "</span>");
}
else {
stringBuilder.push(output);
@ -167,9 +167,9 @@ ace.layer.Text = function(parentEl) {
if (this.$showInvisibles) {
if (row !== this.doc.getLength() - 1) {
stringBuilder.push("<span class='invisible'>" + this.EOL_CHAR + "</span>");
stringBuilder.push("<span class='ace_invisible'>" + this.EOL_CHAR + "</span>");
} else {
stringBuilder.push("<span class='invisible'>" + this.EOF_CHAR + "</span>");
stringBuilder.push("<span class='ace_invisible'>" + this.EOF_CHAR + "</span>");
}
}
};