Merge branch 'master' into define

Conflicts:
	lib/ace/RenderLoop.js
This commit is contained in:
Fabian Jakobs 2010-11-09 08:54:34 +01:00
commit bb1fe29944
8 changed files with 136 additions and 40 deletions

6
Readme.md Normal file
View file

@ -0,0 +1,6 @@
ACE (Ajax.org Code Ediror)
==========================
ACE is a standalone code editor written in JavaScript. It can be easily embedded in any web page and JavaScript application. It is currently used as the editor component of the [Cloud9 IDE](http://cloud9ide.com).
Checkout the [demo](http://ajaxorg.github.com/ace/demo/editor-build.html)!

View file

@ -444,9 +444,9 @@ require.def("ace/conf/keybindings/default_mac", function() {
pagedown:"PageDown", selectpageup:"Shift-PageUp", pageup:"PageUp", selectlinestart:"Shift-Home", selectlineend:"Shift-End", del:"Delete", backspace:"Backspace", outdent:"Shift-Tab", indent:"Tab"}
});
require.def("ace/conf/keybindings/default_win", function() {
return{selectall:"Ctrl-A", removeline:"Ctrl-D", gotoline:"Ctrl-L", togglecomment:"Ctrl-7", findnext:"Ctrl-K", findprevious:"Ctrl-Shift-K", find:"Ctrl-F", replace:"Ctrl-R", undo:"Ctrl-Z", redo:"Ctrl-Shift-Z|Ctrl-Y", overwrite:"Insert", copylinesup:"Ctrl-Alt-Up", movelinesup:"Alt-Up", selecttostart:"Ctrl-Shift-Up", gotostart:"Ctrl-Home|Ctrl-Up", selectup:"Shift-Up", golineup:"Up", copylinesdown:"Ctrl-Alt-Down", movelinesdown:"Alt-Down", selecttoend:"Ctrl-Shift-Down", gotoend:"Ctrl-End|Ctrl-Down",
selectdown:"Shift-Down", godown:"Down", selectwordleft:"Alt-Shift-Left", gotowordleft:"Alt-Left", selecttolinestart:"Ctrl-Shift-Left", gotolinestart:"Ctrl-Left|Home", selectleft:"Shift-Left", gotoleft:"Left", selectwordright:"Alt-Shift-Right", gotowordright:"Alt-Right", selecttolineend:"Ctrl-Shift-Right", gotolineend:"Ctrl-Right|End", selectright:"Shift-Right", gotoright:"Right", selectpagedown:"Shift-PageDown", pagedown:"PageDown", selectpageup:"Shift-PageUp", pageup:"PageUp", selectlinestart:"Shift-Home",
selectlineend:"Shift-End", del:"Delete", backspace:"Backspace", outdent:"Shift-Tab", indent:"Tab"}
return{selectall:"Ctrl-A", removeline:"Ctrl-D", gotoline:"Ctrl-L", togglecomment:"Ctrl-7", findnext:"Ctrl-K", findprevious:"Ctrl-Shift-K", find:"Ctrl-F", replace:"Ctrl-R", undo:"Ctrl-Z", redo:"Ctrl-Shift-Z|Ctrl-Y", overwrite:"Insert", copylinesup:"Ctrl-Alt-Up", movelinesup:"Alt-Up", selecttostart:"Alt-Shift-Up", gotostart:"Ctrl-Home|Ctrl-Up", selectup:"Shift-Up", golineup:"Up", copylinesdown:"Ctrl-Alt-Down", movelinesdown:"Alt-Down", selecttoend:"Alt-Shift-Down", gotoend:"Ctrl-End|Ctrl-Down", selectdown:"Shift-Down",
godown:"Down", selectwordleft:"Ctrl-Shift-Left", gotowordleft:"Ctrl-Left", selecttolinestart:"Ctrl-Shift-Left", gotolinestart:"Alt-Left|Home", selectleft:"Shift-Left", gotoleft:"Left", selectwordright:"Ctrl-Shift-Right", gotowordright:"Ctrl-Right", selecttolineend:"Ctrl-Shift-Right", gotolineend:"Alt-Right|End", selectright:"Shift-Right", gotoright:"Right", selectpagedown:"Shift-PageDown", pagedown:"PageDown", selectpageup:"Shift-PageUp", pageup:"PageUp", selectlinestart:"Shift-Home", selectlineend:"Shift-End",
del:"Delete", backspace:"Backspace", outdent:"Shift-Tab", indent:"Tab"}
});
require.def("ace/PluginManager", [], function() {
return{commands:{}, registerCommand:function(k, f) {
@ -2899,47 +2899,47 @@ require.def("ace/ScrollBar", ["ace/lib/oop", "ace/lib/lang", "ace/lib/dom", "ace
}).call(e.prototype);
return e
});
require.def("ace/RenderLoop", function() {
var k = function(f) {
this.onRender = f;
require.def("ace/RenderLoop", ["ace/lib/event"], function(k) {
var f = function(a) {
this.onRender = a;
this.pending = false;
this.changes = 0
};
(function() {
this.schedule = function(f) {
this.changes |= f;
this.schedule = function(a) {
this.changes |= a;
if(!this.pending) {
this.pending = true;
var a = this;
var h = this;
this.setTimeoutZero(function() {
a.pending = false;
a.onRender(a.changes);
a.changes = 0
h.pending = false;
h.onRender(h.changes);
h.changes = 0
})
}
};
if(window.postMessage) {
this.messageName = "zero-timeout-message";
this.setTimeoutZero = function(f) {
this.setTimeoutZero = function(a) {
if(!this.attached) {
var a = this;
window.addEventListener("message", function(h) {
if(h.source == window && a.callback && h.data == a.messageName) {
h.stopPropagation();
a.callback()
var h = this;
k.addListener(window, "message", function(i) {
if(i.source == window && h.callback && i.data == h.messageName) {
i.stopPropagation();
h.callback()
}
}, false);
});
this.attached = true
}this.callback = f;
}this.callback = a;
window.postMessage(this.messageName, "*")
}
}else {
this.setTimeoutZero = function(f) {
setTimeout(f, 0)
this.setTimeoutZero = function(a) {
setTimeout(a, 0)
}
}
}).call(k.prototype);
return k
}).call(f.prototype);
return f
});
require.def("ace/VirtualRenderer", ["ace/lib/oop", "ace/lib/lang", "ace/lib/dom", "ace/lib/event", "ace/layer/Gutter", "ace/layer/Marker", "ace/layer/Text", "ace/layer/Cursor", "ace/ScrollBar", "ace/RenderLoop", "ace/MEventEmitter", 'text!ace/css/editor.css!.ace_editor {\n position: absolute;\n overflow: hidden;\n\n font-family: "Menlo", "Monaco", "Courier New", monospace;\n font-size: 12px; \n}\n\n.ace_scroller {\n position: absolute;\n overflow-x: scroll;\n overflow-y: hidden; \n}\n\n.ace_gutter {\n position: absolute;\n overflow-x: hidden;\n overflow-y: hidden;\n height: 100%;\n}\n\n.ace_editor .ace_sb {\n position: absolute;\n overflow-x: hidden;\n overflow-y: scroll;\n right: 0;\n}\n\n.ace_editor .ace_sb div {\n position: absolute;\n width: 1px;\n left: 0px;\n}\n\n.ace_editor .ace_printMargin {\n position: absolute;\n height: 100%;\n}\n\n.ace_layer {\n z-index: 0;\n position: absolute;\n overflow: hidden; \n white-space: nowrap;\n height: 100%;\n}\n\n.ace_text-layer {\n font-family: Monaco, "Courier New", monospace;\n color: black;\n}\n\n.ace_cursor-layer {\n cursor: text;\n}\n\n.ace_cursor {\n z-index: 3;\n position: absolute;\n}\n\n.ace_line {\n white-space: nowrap;\n}\n\n.ace_marker-layer {\n}\n\n.ace_marker-layer .ace_step {\n position: absolute;\n z-index: 2;\n}\n\n.ace_marker-layer .ace_selection {\n position: absolute;\n z-index: 3;\n}\n\n.ace_marker-layer .ace_bracket {\n position: absolute;\n z-index: 4;\n}\n\n.ace_marker-layer .ace_active_line {\n position: absolute;\n z-index: 1;\n}'],
function(k, f, a, h, i, e, j, c, g, l, m, b) {

View file

@ -1,7 +1,7 @@
/*
LGPLv3 <http://www.gnu.org/licenses/lgpl-3.0.txt>
*/
require.def("ace/RenderLoop", function() {
require.def("ace/RenderLoop", ["ace/lib/event"], function(e) {
var d = function(b) {
this.onRender = b;
this.pending = false;
@ -25,12 +25,12 @@ require.def("ace/RenderLoop", function() {
this.setTimeoutZero = function(b) {
if(!this.attached) {
var a = this;
window.addEventListener("message", function(c) {
e.addListener(window, "message", function(c) {
if(c.source == window && a.callback && c.data == a.messageName) {
c.stopPropagation();
a.callback()
}
}, false);
});
this.attached = true
}this.callback = b;
window.postMessage(this.messageName, "*")

View file

@ -2,7 +2,7 @@
LGPLv3 <http://www.gnu.org/licenses/lgpl-3.0.txt>
*/
require.def("ace/conf/keybindings/default_win", function() {
return{selectall:"Ctrl-A", removeline:"Ctrl-D", gotoline:"Ctrl-L", togglecomment:"Ctrl-7", findnext:"Ctrl-K", findprevious:"Ctrl-Shift-K", find:"Ctrl-F", replace:"Ctrl-R", undo:"Ctrl-Z", redo:"Ctrl-Shift-Z|Ctrl-Y", overwrite:"Insert", copylinesup:"Ctrl-Alt-Up", movelinesup:"Alt-Up", selecttostart:"Ctrl-Shift-Up", gotostart:"Ctrl-Home|Ctrl-Up", selectup:"Shift-Up", golineup:"Up", copylinesdown:"Ctrl-Alt-Down", movelinesdown:"Alt-Down", selecttoend:"Ctrl-Shift-Down", gotoend:"Ctrl-End|Ctrl-Down",
selectdown:"Shift-Down", godown:"Down", selectwordleft:"Alt-Shift-Left", gotowordleft:"Alt-Left", selecttolinestart:"Ctrl-Shift-Left", gotolinestart:"Ctrl-Left|Home", selectleft:"Shift-Left", gotoleft:"Left", selectwordright:"Alt-Shift-Right", gotowordright:"Alt-Right", selecttolineend:"Ctrl-Shift-Right", gotolineend:"Ctrl-Right|End", selectright:"Shift-Right", gotoright:"Right", selectpagedown:"Shift-PageDown", pagedown:"PageDown", selectpageup:"Shift-PageUp", pageup:"PageUp", selectlinestart:"Shift-Home",
selectlineend:"Shift-End", del:"Delete", backspace:"Backspace", outdent:"Shift-Tab", indent:"Tab"}
return{selectall:"Ctrl-A", removeline:"Ctrl-D", gotoline:"Ctrl-L", togglecomment:"Ctrl-7", findnext:"Ctrl-K", findprevious:"Ctrl-Shift-K", find:"Ctrl-F", replace:"Ctrl-R", undo:"Ctrl-Z", redo:"Ctrl-Shift-Z|Ctrl-Y", overwrite:"Insert", copylinesup:"Ctrl-Alt-Up", movelinesup:"Alt-Up", selecttostart:"Alt-Shift-Up", gotostart:"Ctrl-Home|Ctrl-Up", selectup:"Shift-Up", golineup:"Up", copylinesdown:"Ctrl-Alt-Down", movelinesdown:"Alt-Down", selecttoend:"Alt-Shift-Down", gotoend:"Ctrl-End|Ctrl-Down", selectdown:"Shift-Down",
godown:"Down", selectwordleft:"Ctrl-Shift-Left", gotowordleft:"Ctrl-Left", selecttolinestart:"Ctrl-Shift-Left", gotolinestart:"Alt-Left|Home", selectleft:"Shift-Left", gotoleft:"Left", selectwordright:"Ctrl-Shift-Right", gotowordright:"Ctrl-Right", selecttolineend:"Ctrl-Shift-Right", gotolineend:"Alt-Right|End", selectright:"Shift-Right", gotoright:"Right", selectpagedown:"Shift-PageDown", pagedown:"PageDown", selectpageup:"Shift-PageUp", pageup:"PageUp", selectlinestart:"Shift-Home", selectlineend:"Shift-End",
del:"Delete", backspace:"Backspace", outdent:"Shift-Tab", indent:"Tab"}
});

View file

@ -103,7 +103,7 @@
<script type="text/editor" id="jstext">function foo(items) {
for (var i=0; i<items.length; i++) {
alert(items[i] + "juhu";
alert(items[i] + "juhu");
}
}</script>

View file

@ -102,7 +102,7 @@
<script type="text/editor" id="jstext">function foo(items) {
for (var i=0; i<items.length; i++) {
alert(items[i] + "juhu";
alert(items[i] + "juhu");
}
}</script>

90
index.html Normal file
View file

@ -0,0 +1,90 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>ajaxorg/ace @ GitHub</title>
<style type="text/css">
body {
margin-top: 1.0em;
background-color: rgb(14, 98, 165);
font-family: "Helvetica,Arial,FreeSans";
color: #ffffff;
}
#container {
margin: 0 auto;
width: 700px;
}
h1 { font-size: 3.8em; color: #d5f1c8; margin-bottom: 3px; }
h1 .small { font-size: 0.4em; }
h1 a { text-decoration: none }
h2 { font-size: 1.5em; color: #d5f1c8; }
h3 { text-align: center; color: #d5f1c8; }
a { color: #d5f1c8; }
.description { font-size: 1.2em; margin-bottom: 30px; margin-top: 30px; font-style: italic;}
.download { float: right; }
pre { background: #000; color: #fff; padding: 15px;}
hr { border: 0; width: 80%; border-bottom: 1px solid #aaa}
.footer { text-align:center; padding-top:30px; font-style: italic; }
</style>
</head>
<body>
<a href="http://github.com/ajaxorg/ace"><img style="position: absolute; top: 0; right: 0; border: 0;" src="http://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub" /></a>
<div id="container">
<div class="download">
<a href="http://github.com/ajaxorg/ace/zipball/master">
<img border="0" width="90" src="http://github.com/images/modules/download/zip.png"></a>
<a href="http://github.com/ajaxorg/ace/tarball/master">
<img border="0" width="90" src="http://github.com/images/modules/download/tar.png"></a>
</div>
<h1><a href="http://github.com/ajaxorg/ace">ace</a>
<span class="small">by <a href="http://github.com/ajaxorg">ajax.org</a></span></h1>
<div class="description">
Ajax.org Code Editor
</div>
<h2>License</h2>
<p>LGPL</p>
<h2>Authors</h2>
<p>Fabian Jakobs (fabian.jakobs@web.de)
<br/>Mike de Boer (info@mikedeboer.nl)
<br/>Rik Arends (rik@ajax.org)
<br/>Ruben Daniels (ruben@ajax.org)
<br/>
<br/> </p>
<h2>Demo</h2>
Check out the <a href="demo/editor-build.html">demo</a>.
<h2>Contact</h2>
<p>Fabian Jakobs (fabian.jakobs@web.de)
<br/> </p>
<h2>Download</h2>
<p>
You can download this project in either
<a href="http://github.com/ajaxorg/ace/zipball/master">zip</a> or
<a href="http://github.com/ajaxorg/ace/tarball/master">tar</a> formats.
</p>
<p>You can also clone the project with <a href="http://git-scm.com">Git</a>
by running:
<pre>$ git clone git://github.com/ajaxorg/ace</pre>
</p>
<div class="footer">
get the source code on GitHub : <a href="http://github.com/ajaxorg/ace">ajaxorg/ace</a>
</div>
</div>
</body>
</html>

View file

@ -52,26 +52,26 @@ return {
"overwrite": "Insert",
"copylinesup": "Ctrl-Alt-Up",
"movelinesup": "Alt-Up",
"selecttostart": "Ctrl-Shift-Up",
"selecttostart": "Alt-Shift-Up",
"gotostart": "Ctrl-Home|Ctrl-Up",
"selectup": "Shift-Up",
"golineup": "Up",
"copylinesdown": "Ctrl-Alt-Down",
"movelinesdown": "Alt-Down",
"selecttoend": "Ctrl-Shift-Down",
"selecttoend": "Alt-Shift-Down",
"gotoend": "Ctrl-End|Ctrl-Down",
"selectdown": "Shift-Down",
"godown": "Down",
"selectwordleft": "Alt-Shift-Left",
"gotowordleft": "Alt-Left",
"selectwordleft": "Ctrl-Shift-Left",
"gotowordleft": "Ctrl-Left",
"selecttolinestart": "Ctrl-Shift-Left",
"gotolinestart": "Ctrl-Left|Home",
"gotolinestart": "Alt-Left|Home",
"selectleft": "Shift-Left",
"gotoleft": "Left",
"selectwordright": "Alt-Shift-Right",
"gotowordright": "Alt-Right",
"selectwordright": "Ctrl-Shift-Right",
"gotowordright": "Ctrl-Right",
"selecttolineend": "Ctrl-Shift-Right",
"gotolineend": "Ctrl-Right|End",
"gotolineend": "Alt-Right|End",
"selectright": "Shift-Right",
"gotoright": "Right",
"selectpagedown": "Shift-PageDown",