diff options
Diffstat (limited to 'js/codemirror')
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 | |||
58 | span.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 | ||
6 | var 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"> </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 |