improvements for Workspace
This commit is contained in:
parent
54e8a799ac
commit
b805af2056
11 changed files with 30 additions and 33 deletions
|
|
@ -528,7 +528,7 @@ exports.DocCommentHighlightRules = DocCommentHighlightRules;
|
|||
|
||||
});
|
||||
/* vim:ts=4:sts=4:sw=4:
|
||||
/**
|
||||
*
|
||||
* Ajax.org Code Editor (ACE)
|
||||
*
|
||||
* @copyright 2010, Ajax.org Services B.V.
|
||||
|
|
|
|||
|
|
@ -451,7 +451,7 @@ exports.DocCommentHighlightRules = DocCommentHighlightRules;
|
|||
|
||||
});
|
||||
/* vim:ts=4:sts=4:sw=4:
|
||||
/**
|
||||
*
|
||||
* Ajax.org Code Editor (ACE)
|
||||
*
|
||||
* @copyright 2010, Ajax.org Services B.V.
|
||||
|
|
|
|||
|
|
@ -427,7 +427,7 @@ exports.DocCommentHighlightRules = DocCommentHighlightRules;
|
|||
|
||||
});
|
||||
/* vim:ts=4:sts=4:sw=4:
|
||||
/**
|
||||
*
|
||||
* Ajax.org Code Editor (ACE)
|
||||
*
|
||||
* @copyright 2010, Ajax.org Services B.V.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
/* vim:ts=4:sts=4:sw=4:
|
||||
* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
|
|
@ -39,11 +40,11 @@ define(function(require, exports, module) {
|
|||
|
||||
var event = require("pilot/event");
|
||||
var useragent = require("pilot/useragent");
|
||||
var XHTML_NS = "http://www.w3.org/1999/xhtml";
|
||||
var dom = require("pilot/dom");
|
||||
|
||||
var TextInput = function(parentNode, host) {
|
||||
|
||||
var text = document.createElementNS(XHTML_NS, "textarea");
|
||||
var text = dom.createElement("textarea");
|
||||
text.style.left = "-10000px";
|
||||
parentNode.appendChild(text);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
/* vim:ts=4:sts=4:sw=4:
|
||||
* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
|
|
@ -39,14 +40,13 @@
|
|||
define(function(require, exports, module) {
|
||||
|
||||
var dom = require("pilot/dom");
|
||||
var XHTML_NS = "http://www.w3.org/1999/xhtml";
|
||||
|
||||
var Cursor = function(parentEl) {
|
||||
this.element = document.createElementNS(XHTML_NS, "div");
|
||||
this.element = dom.createElement("div");
|
||||
this.element.className = "ace_layer ace_cursor-layer";
|
||||
parentEl.appendChild(this.element);
|
||||
|
||||
this.cursor = document.createElementNS(XHTML_NS, "div");
|
||||
this.cursor = dom.createElement("div");
|
||||
this.cursor.className = "ace_cursor";
|
||||
|
||||
this.isVisible = false;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
/* vim:ts=4:sts=4:sw=4:
|
||||
* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
|
|
@ -39,10 +40,9 @@
|
|||
define(function(require, exports, module) {
|
||||
|
||||
var dom = require("pilot/dom");
|
||||
var XHTML_NS = "http://www.w3.org/1999/xhtml";
|
||||
|
||||
var Gutter = function(parentEl) {
|
||||
this.element = document.createElementNS(XHTML_NS, "div");
|
||||
this.element = dom.createElement("div");
|
||||
this.element.className = "ace_layer ace_gutter-layer";
|
||||
parentEl.appendChild(this.element);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
/* vim:ts=4:sts=4:sw=4:
|
||||
* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
|
|
@ -40,10 +41,9 @@ define(function(require, exports, module) {
|
|||
|
||||
var Range = require("ace/range").Range;
|
||||
var dom = require("pilot/dom");
|
||||
var XHTML_NS = "http://www.w3.org/1999/xhtml";
|
||||
|
||||
var Marker = function(parentEl) {
|
||||
this.element = document.createElementNS(XHTML_NS, "div");
|
||||
this.element = dom.createElement("div");
|
||||
this.element.className = "ace_layer ace_marker-layer";
|
||||
parentEl.appendChild(this.element);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
* Contributor(s):
|
||||
* Fabian Jakobs <fabian AT ajax DOT org>
|
||||
* Julian Viereck <julian.viereck@gmail.com>
|
||||
* Mihai Sucan <mihai.sucan@gmail.com>
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
|
|
@ -44,10 +45,8 @@ var dom = require("pilot/dom");
|
|||
var lang = require("pilot/lang");
|
||||
var EventEmitter = require("pilot/event_emitter").EventEmitter;
|
||||
|
||||
var XHTML_NS = "http://www.w3.org/1999/xhtml";
|
||||
|
||||
var Text = function(parentEl) {
|
||||
this.element = document.createElementNS(XHTML_NS, "div");
|
||||
this.element = dom.createElement("div");
|
||||
this.element.className = "ace_layer ace_text-layer";
|
||||
parentEl.appendChild(this.element);
|
||||
|
||||
|
|
@ -98,7 +97,7 @@ var Text = function(parentEl) {
|
|||
this.$measureSizes = function() {
|
||||
var n = 1000;
|
||||
if (!this.$measureNode) {
|
||||
var measureNode = this.$measureNode = document.createElementNS(XHTML_NS, "div");
|
||||
var measureNode = this.$measureNode = dom.createElement("div");
|
||||
var style = measureNode.style;
|
||||
|
||||
style.width = style.height = "auto";
|
||||
|
|
@ -228,7 +227,7 @@ var Text = function(parentEl) {
|
|||
var fragment = document.createDocumentFragment();
|
||||
var tokens = this.tokenizer.getTokens(firstRow, lastRow);
|
||||
for (var row=firstRow; row<=lastRow; row++) {
|
||||
var lineEl = document.createElementNS(XHTML_NS, "div");
|
||||
var lineEl = dom.createElement("div");
|
||||
lineEl.className = "ace_line";
|
||||
var style = lineEl.style;
|
||||
style.height = this.session.getRowHeight(config, row) + "px";
|
||||
|
|
|
|||
|
|
@ -41,13 +41,12 @@ var oop = require("pilot/oop");
|
|||
var dom = require("pilot/dom");
|
||||
var event = require("pilot/event");
|
||||
var EventEmitter = require("pilot/event_emitter").EventEmitter;
|
||||
var XHTML_NS = "http://www.w3.org/1999/xhtml";
|
||||
|
||||
var ScrollBar = function(parent) {
|
||||
this.element = document.createElementNS(XHTML_NS, "div");
|
||||
this.element = dom.createElement("div");
|
||||
this.element.className = "ace_sb";
|
||||
|
||||
this.inner = document.createElementNS(XHTML_NS, "div");
|
||||
this.inner = dom.createElement("div");
|
||||
this.element.appendChild(this.inner);
|
||||
|
||||
parent.appendChild(this.element);
|
||||
|
|
|
|||
|
|
@ -53,8 +53,6 @@ var RenderLoop = require("ace/renderloop").RenderLoop;
|
|||
var EventEmitter = require("pilot/event_emitter").EventEmitter;
|
||||
var editorCss = require("text!ace/css/editor.css");
|
||||
|
||||
var XHTML_NS = "http://www.w3.org/1999/xhtml";
|
||||
|
||||
// import CSS once
|
||||
dom.importCssString(editorCss);
|
||||
|
||||
|
|
@ -64,15 +62,15 @@ var VirtualRenderer = function(container, theme) {
|
|||
|
||||
this.setTheme(theme);
|
||||
|
||||
this.$gutter = document.createElementNS(XHTML_NS, "div");
|
||||
this.$gutter = dom.createElement("div");
|
||||
this.$gutter.className = "ace_gutter";
|
||||
this.container.appendChild(this.$gutter);
|
||||
|
||||
this.scroller = document.createElementNS(XHTML_NS, "div");
|
||||
this.scroller = dom.createElement("div");
|
||||
this.scroller.className = "ace_scroller";
|
||||
this.container.appendChild(this.scroller);
|
||||
|
||||
this.content = document.createElementNS(XHTML_NS, "div");
|
||||
this.content = dom.createElement("div");
|
||||
this.content.className = "ace_content";
|
||||
this.scroller.appendChild(this.content);
|
||||
|
||||
|
|
@ -295,9 +293,9 @@ var VirtualRenderer = function(container, theme) {
|
|||
return;
|
||||
|
||||
if (!this.$printMarginEl) {
|
||||
containerEl = document.createElementNS(XHTML_NS, "div");
|
||||
containerEl = dom.createElement("div");
|
||||
containerEl.className = "ace_print_margin_layer";
|
||||
this.$printMarginEl = document.createElementNS(XHTML_NS, "div")
|
||||
this.$printMarginEl = dom.createElement("div")
|
||||
this.$printMarginEl.className = "ace_print_margin";
|
||||
containerEl.appendChild(this.$printMarginEl);
|
||||
this.content.insertBefore(containerEl, this.$textLayer.element);
|
||||
|
|
@ -703,7 +701,7 @@ var VirtualRenderer = function(container, theme) {
|
|||
|
||||
this.showComposition = function(position) {
|
||||
if (!this.$composition) {
|
||||
this.$composition = document.createElementNS(XHTML_NS, "div");
|
||||
this.$composition = dom.createElement("div");
|
||||
this.$composition.className = "ace_composition";
|
||||
this.content.appendChild(this.$composition);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/* vim:ts=4:sts=4:sw=4:
|
||||
/**
|
||||
*
|
||||
* Ajax.org Code Editor (ACE)
|
||||
*
|
||||
* @copyright 2010, Ajax.org Services B.V.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue