aboutsummaryrefslogtreecommitdiff
path: root/js/codemirror
diff options
context:
space:
mode:
authorPushkar Joshi2012-02-24 12:08:49 -0800
committerPushkar Joshi2012-02-24 12:08:49 -0800
commit03ca7a5ed13c25faaa9100bb666e062fd15335e6 (patch)
treec51112223ceb9121cd595a60335eb2795215590f /js/codemirror
parentfcb12cc09eb3cd3b42bd215877ba18f449275b75 (diff)
parent053fc63a2950c7a5ee4ebf98033b64d474a3c46e (diff)
downloadninja-03ca7a5ed13c25faaa9100bb666e062fd15335e6.tar.gz
Merge branch 'pentool' into brushtool
Conflicts: imports/codemirror/mode/scheme/scheme.js js/tools/BrushTool.js
Diffstat (limited to 'js/codemirror')
-rw-r--r--js/codemirror/lib/codemirror.css67
-rw-r--r--js/codemirror/lib/codemirror.js2144
-rw-r--r--js/codemirror/lib/overlay.js51
-rw-r--r--js/codemirror/lib/runmode.js27
-rw-r--r--js/codemirror/mode/clike/clike.js247
-rw-r--r--js/codemirror/mode/clike/index.html102
-rw-r--r--js/codemirror/mode/css/css.js124
-rw-r--r--js/codemirror/mode/css/index.html56
-rw-r--r--js/codemirror/mode/diff/diff.css3
-rw-r--r--js/codemirror/mode/diff/diff.js13
-rw-r--r--js/codemirror/mode/diff/index.html99
-rw-r--r--js/codemirror/mode/haskell/haskell.js242
-rw-r--r--js/codemirror/mode/haskell/index.html60
-rw-r--r--js/codemirror/mode/htmlmixed/htmlmixed.js79
-rw-r--r--js/codemirror/mode/htmlmixed/index.html52
-rw-r--r--js/codemirror/mode/javascript/index.html78
-rw-r--r--js/codemirror/mode/javascript/javascript.js348
-rw-r--r--js/codemirror/mode/lua/index.html72
-rw-r--r--js/codemirror/mode/lua/lua.js138
-rw-r--r--js/codemirror/mode/php/index.html49
-rw-r--r--js/codemirror/mode/php/php.js110
-rw-r--r--js/codemirror/mode/plsql/index.html63
-rw-r--r--js/codemirror/mode/plsql/plsql.js217
-rw-r--r--js/codemirror/mode/python/LICENSE.txt21
-rw-r--r--js/codemirror/mode/python/index.html123
-rw-r--r--js/codemirror/mode/python/python.js321
-rw-r--r--js/codemirror/mode/rst/index.html526
-rw-r--r--js/codemirror/mode/rst/rst.css75
-rw-r--r--js/codemirror/mode/rst/rst.js333
-rw-r--r--js/codemirror/mode/scheme/index.html65
-rw-r--r--js/codemirror/mode/scheme/scheme.js181
-rw-r--r--js/codemirror/mode/smalltalk/index.html56
-rw-r--r--js/codemirror/mode/smalltalk/smalltalk.js122
-rw-r--r--js/codemirror/mode/sparql/index.html41
-rw-r--r--js/codemirror/mode/sparql/sparql.js143
-rw-r--r--js/codemirror/mode/stex/index.html96
-rw-r--r--js/codemirror/mode/stex/stex.js167
-rw-r--r--js/codemirror/mode/xml/index.html42
-rw-r--r--js/codemirror/mode/xml/xml.js231
-rw-r--r--js/codemirror/mode/yaml/index.html68
-rw-r--r--js/codemirror/mode/yaml/yaml.js95
-rw-r--r--js/codemirror/notice.txt4
-rw-r--r--js/codemirror/theme/default.css18
-rw-r--r--js/codemirror/theme/elegant.css9
-rw-r--r--js/codemirror/theme/neat.css8
-rw-r--r--js/codemirror/theme/night.css20
-rw-r--r--js/codemirror/version.txt1
47 files changed, 0 insertions, 7207 deletions
diff --git a/js/codemirror/lib/codemirror.css b/js/codemirror/lib/codemirror.css
deleted file mode 100644
index d93e72d7..00000000
--- a/js/codemirror/lib/codemirror.css
+++ /dev/null
@@ -1,67 +0,0 @@
1.CodeMirror {
2 line-height: 1em;
3 font-family: monospace;
4}
5
6.CodeMirror-scroll {
7 overflow: auto;
8 height: 300px;
9 /* This is needed to prevent an IE[67] bug where the scrolled content
10 is visible outside of the scrolling box. */
11 position: relative;
12}
13
14.CodeMirror-gutter {
15 position: absolute; left: 0; top: 0;
16 background-color: #f7f7f7;
17 border-right: 1px solid #eee;
18 min-width: 2em;
19 height: 100%;
20}
21.CodeMirror-gutter-text {
22 color: #aaa;
23 text-align: right;
24 padding: .4em .2em .4em .4em;
25}
26.CodeMirror-lines {
27 padding: .4em;
28}
29
30.CodeMirror pre {
31 -moz-border-radius: 0;
32 -webkit-border-radius: 0;
33 -o-border-radius: 0;
34 border-radius: 0;
35 border-width: 0; margin: 0; padding: 0; background: transparent;
36 font-family: inherit;
37 font-size: inherit;
38 padding: 0; margin: 0;
39 white-space: pre;
40 word-wrap: normal;
41}
42
43.CodeMirror textarea {
44 font-family: inherit !important;
45 font-size: inherit !important;
46}
47
48.CodeMirror-cursor {
49 z-index: 10;
50 position: absolute;
51 visibility: hidden;
52 border-left: 1px solid black !important;
53}
54.CodeMirror-focused .CodeMirror-cursor {
55 visibility: visible;
56}
57
58span.CodeMirror-selected {
59 background: #ccc !important;
60 color: HighlightText !important;
61}
62.CodeMirror-focused span.CodeMirror-selected {
63 background: Highlight !important;
64}
65
66.CodeMirror-matchingbracket {color: #0f0 !important;}
67.CodeMirror-nonmatchingbracket {color: #f22 !important;}
diff --git a/js/codemirror/lib/codemirror.js b/js/codemirror/lib/codemirror.js
deleted file mode 100644
index 27bec72f..00000000
--- a/js/codemirror/lib/codemirror.js
+++ /dev/null
@@ -1,2144 +0,0 @@
1// All functions that need access to the editor's state live inside
2// the CodeMirror function. Below that, at the bottom of the file,
3// some utilities are defined.
4
5// CodeMirror is the only global var we claim
6var CodeMirror = (function() {
7 // This is the function that produces an editor instance. It's
8 // closure is used to store the editor state.
9 function CodeMirror(place, givenOptions) {
10 // Determine effective options based on given values and defaults.
11 var options = {}, defaults = CodeMirror.defaults;
12 for (var opt in defaults)
13 if (defaults.hasOwnProperty(opt))
14 options[opt] = (givenOptions && givenOptions.hasOwnProperty(opt) ? givenOptions : defaults)[opt];
15
16 var targetDocument = options["document"];
17 // The element in which the editor lives.
18 var wrapper = targetDocument.createElement("div");
19 wrapper.className = "CodeMirror";
20 // This mess creates the base DOM structure for the editor.
21 wrapper.innerHTML =
22 '<div style="overflow: hidden; position: relative; width: 1px; height: 0px;">' + // Wraps and hides input textarea
23 '<textarea style="position: absolute; width: 2px;" wrap="off"></textarea></div>' +
24 '<div class="CodeMirror-scroll cm-s-' + options.theme + '">' +
25 '<div style="position: relative">' + // Set to the height of the text, causes scrolling
26 '<div style="position: absolute; height: 0; width: 0; overflow: hidden;"></div>' +
27 '<div style="position: relative">' + // Moved around its parent to cover visible view
28 '<div class="CodeMirror-gutter"><div class="CodeMirror-gutter-text"></div></div>' +
29 // Provides positioning relative to (visible) text origin
30 '<div class="CodeMirror-lines"><div style="position: relative">' +
31 '<pre class="CodeMirror-cursor">&#160;</pre>' + // Absolutely positioned blinky cursor
32 '<div></div>' + // This DIV contains the actual code
33 '</div></div></div></div></div>';
34 if (place.appendChild) place.appendChild(wrapper); else place(wrapper);
35 // I've never seen more elegant code in my life.
36 var inputDiv = wrapper.firstChild, input = inputDiv.firstChild,
37 scroller = wrapper.lastChild, code = scroller.firstChild,
38 measure = code.firstChild, mover = measure.nextSibling,
39 gutter = mover.firstChild, gutterText = gutter.firstChild,
40 lineSpace = gutter.nextSibling.firstChild,
41 cursor = lineSpace.firstChild, lineDiv = cursor.nextSibling;
42 if (options.tabindex != null) input.tabindex = options.tabindex;
43 if (!options.gutter && !options.lineNumbers) gutter.style.display = "none";
44
45 // Delayed object wrap timeouts, making sure only one is active. blinker holds an interval.
46 var poll = new Delayed(), highlight = new Delayed(), blinker;
47
48 // mode holds a mode API object. lines an array of Line objects
49 // (see Line constructor), work an array of lines that should be
50 // parsed, and history the undo history (instance of History
51 // constructor).
52 var mode, lines = [new Line("")], work, history = new History(), focused;
53 loadMode();
54 // The selection. These are always maintained to point at valid
55 // positions. Inverted is used to remember that the user is
56 // selecting bottom-to-top.
57 var sel = {from: {line: 0, ch: 0}, to: {line: 0, ch: 0}, inverted: false};
58 // Selection-related flags. shiftSelecting obviously tracks
59 // whether the user is holding shift. reducedSelection is a hack
60 // to get around the fact that we can't create inverted
61 // selections. See below.
62 var shiftSelecting, reducedSelection, lastDoubleClick;
63 // Variables used by startOperation/endOperation to track what
64 // happened during the operation.
65 var updateInput, changes, textChanged, selectionChanged, leaveInputAlone;
66 // Current visible range (may be bigger than the view window).
67 var showingFrom = 0, showingTo = 0, lastHeight = 0, curKeyId = null;
68 // editing will hold an object describing the things we put in the
69 // textarea, to help figure out whether something changed.
70 // bracketHighlighted is used to remember that a backet has been
71 // marked.
72 var editing, bracketHighlighted;
73 // Tracks the maximum line length so that the horizontal scrollbar
74 // can be kept static when scrolling.
75 var maxLine = "", maxWidth;
76
77 // Initialize the content.
78 operation(function(){setValue(options.value || ""); updateInput = false;})();
79