diff options
author | John Mayhew | 2012-07-09 17:28:24 -0700 |
---|---|---|
committer | John Mayhew | 2012-07-09 17:28:24 -0700 |
commit | 770bcb52422742ff741a88a75ecefbeb90bc9247 (patch) | |
tree | 64cb3e09a8daeb340261dd7f3869c73f7b90b643 /js/code-editor | |
parent | 8c5ecaf90062f9e030386f338bdc19fd62b826c8 (diff) | |
parent | 2b2b5fbb4b6a786daa4e9d4ee9eba9ac78924842 (diff) | |
download | ninja-770bcb52422742ff741a88a75ecefbeb90bc9247.tar.gz |
Merge branch 'master' of github.com:Motorola-Mobility/ninja-internal
Conflicts:
manifest.json
Diffstat (limited to 'js/code-editor')
8 files changed, 78 insertions, 231 deletions
diff --git a/js/code-editor/code-editor-wrapper.js b/js/code-editor/code-editor-wrapper.js index fcf7460a..07381244 100644 --- a/js/code-editor/code-editor-wrapper.js +++ b/js/code-editor/code-editor-wrapper.js | |||
@@ -1,24 +1,25 @@ | |||
1 | /* <copyright> | 1 | /* <copyright> |
2 | Copyright (c) 2012, Motorola Mobility, Inc | 2 | Copyright (c) 2012, Motorola Mobility LLC. |
3 | All Rights Reserved. | 3 | All Rights Reserved. |
4 | BSD License. | ||
5 | 4 | ||
6 | Redistribution and use in source and binary forms, with or without | 5 | Redistribution and use in source and binary forms, with or without |
7 | modification, are permitted provided that the following conditions are met: | 6 | modification, are permitted provided that the following conditions are met: |
8 | 7 | ||
9 | - Redistributions of source code must retain the above copyright notice, | 8 | * Redistributions of source code must retain the above copyright notice, |
10 | this list of conditions and the following disclaimer. | 9 | this list of conditions and the following disclaimer. |
11 | - Redistributions in binary form must reproduce the above copyright | 10 | |
12 | notice, this list of conditions and the following disclaimer in the | 11 | * Redistributions in binary form must reproduce the above copyright notice, |
13 | documentation and/or other materials provided with the distribution. | 12 | this list of conditions and the following disclaimer in the documentation |
14 | - Neither the name of Motorola Mobility nor the names of its contributors | 13 | and/or other materials provided with the distribution. |
15 | may be used to endorse or promote products derived from this software | 14 | |
16 | without specific prior written permission. | 15 | * Neither the name of Motorola Mobility LLC nor the names of its |
16 | contributors may be used to endorse or promote products derived from this | ||
17 | software without specific prior written permission. | ||
17 | 18 | ||
18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | 20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | 21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
21 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | 22 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE |
22 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | 23 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
23 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | 24 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
24 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | 25 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
@@ -30,8 +31,8 @@ POSSIBILITY OF SUCH DAMAGE. | |||
30 | 31 | ||
31 | //////////////////////////////////////////////////////////////////////// | 32 | //////////////////////////////////////////////////////////////////////// |
32 | // | 33 | // |
33 | var Montage = require("montage/core/core").Montage, | 34 | var Montage = require("montage/core/core").Montage, |
34 | Component = require("montage/ui/component").Component; | 35 | Component = require("montage/ui/component").Component; |
35 | 36 | ||
36 | exports.CodeEditorWrapper = Montage.create(Component, { | 37 | exports.CodeEditorWrapper = Montage.create(Component, { |
37 | hasTemplate: { | 38 | hasTemplate: { |
@@ -112,7 +113,6 @@ exports.CodeEditorWrapper = Montage.create(Component, { | |||
112 | 113 | ||
113 | deserializedFromTemplate: { | 114 | deserializedFromTemplate: { |
114 | value: function() { | 115 | value: function() { |
115 | //TODO:add logic to check some configuration file to load the right code editor | ||
116 | this.codeEditor = CodeMirror; | 116 | this.codeEditor = CodeMirror; |
117 | } | 117 | } |
118 | }, | 118 | }, |
diff --git a/js/code-editor/codemirror-ninja/lib/ninja-simple-hint.js b/js/code-editor/codemirror-ninja/lib/ninja-simple-hint.js index e484a981..804632da 100644 --- a/js/code-editor/codemirror-ninja/lib/ninja-simple-hint.js +++ b/js/code-editor/codemirror-ninja/lib/ninja-simple-hint.js | |||
@@ -1,24 +1,25 @@ | |||
1 | /* <copyright> | 1 | /* <copyright> |
2 | Copyright (c) 2012, Motorola Mobility, Inc | 2 | Copyright (c) 2012, Motorola Mobility LLC. |
3 | All Rights Reserved. | 3 | All Rights Reserved. |
4 | BSD License. | ||
5 | 4 | ||
6 | Redistribution and use in source and binary forms, with or without | 5 | Redistribution and use in source and binary forms, with or without |
7 | modification, are permitted provided that the following conditions are met: | 6 | modification, are permitted provided that the following conditions are met: |
8 | 7 | ||
9 | - Redistributions of source code must retain the above copyright notice, | 8 | * Redistributions of source code must retain the above copyright notice, |
10 | this list of conditions and the following disclaimer. | 9 | this list of conditions and the following disclaimer. |
11 | - Redistributions in binary form must reproduce the above copyright | 10 | |
12 | notice, this list of conditions and the following disclaimer in the | 11 | * Redistributions in binary form must reproduce the above copyright notice, |
13 | documentation and/or other materials provided with the distribution. | 12 | this list of conditions and the following disclaimer in the documentation |
14 | - Neither the name of Motorola Mobility nor the names of its contributors | 13 | and/or other materials provided with the distribution. |
15 | may be used to endorse or promote products derived from this software | 14 | |
16 | without specific prior written permission. | 15 | * Neither the name of Motorola Mobility LLC nor the names of its |
16 | contributors may be used to endorse or promote products derived from this | ||
17 | software without specific prior written permission. | ||
17 | 18 | ||
18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | 20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | 21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
21 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | 22 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE |
22 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | 23 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
23 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | 24 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
24 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | 25 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
diff --git a/js/code-editor/codemirror-ninja/theme/lesser-dark-ninja.css b/js/code-editor/codemirror-ninja/theme/lesser-dark-ninja.css deleted file mode 100644 index b185a924..00000000 --- a/js/code-editor/codemirror-ninja/theme/lesser-dark-ninja.css +++ /dev/null | |||
@@ -1,78 +0,0 @@ | |||
1 | /* <copyright> | ||
2 | Copyright (c) 2012, Motorola Mobility, Inc | ||
3 | All Rights Reserved. | ||
4 | BSD License. | ||
5 | |||
6 | Redistribution and use in source and binary forms, with or without | ||
7 | modification, are permitted provided that the following conditions are met: | ||
8 | |||
9 | - Redistributions of source code must retain the above copyright notice, | ||
10 | this list of conditions and the following disclaimer. | ||
11 | - Redistributions in binary form must reproduce the above copyright | ||
12 | notice, this list of conditions and the following disclaimer in the | ||
13 | documentation and/or other materials provided with the distribution. | ||
14 | - Neither the name of Motorola Mobility nor the names of its contributors | ||
15 | may be used to endorse or promote products derived from this software | ||
16 | without specific prior written permission. | ||
17 | |||
18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
21 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||
22 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
23 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
24 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
25 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||
26 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
27 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
28 | POSSIBILITY OF SUCH DAMAGE. | ||
29 | </copyright> */ | ||
30 | |||
31 | /* adopted from CodeMirror 2.23 (http://codemirror.net/) */ | ||
32 | |||
33 | /* | ||
34 | http://lesscss.org/ dark theme | ||
35 | Ported to CodeMirror by Peter Kroon | ||
36 | */ | ||
37 | |||
38 | .CodeMirror{ | ||
39 | line-height: 15px; | ||
40 | } | ||
41 | .cm-s-lesser-dark { | ||
42 | font-family: 'Bitstream Vera Sans Mono', 'DejaVu Sans Mono', 'Monaco', Courier, monospace !important; | ||
43 | /*font-size:12px;*/ | ||
44 | } | ||
45 | |||
46 | .cm-s-lesser-dark { background: #262626; color: #EBEFE7; text-shadow: 0 -1px 1px #262626; } | ||
47 | .cm-s-lesser-dark div.CodeMirror-selected {background: #45443B !important;} /* 33322B*/ | ||
48 | .cm-s-lesser-dark .CodeMirror-cursor { border-left: 1px solid white !important; } | ||
49 | .cm-s-lesser-dark .CodeMirror-lines { margin-left:3px; margin-right:3px; }/*editable code holder*/ | ||
50 | |||
51 | div.CodeMirror span.CodeMirror-matchingbracket { color: #7EFC7E; }/*65FC65*/ | ||
52 | |||
53 | .cm-s-lesser-dark .CodeMirror-gutter { background: #262626; border-right:1px solid #aaa; padding-right:3px; min-width:2.5em; } | ||
54 | .cm-s-lesser-dark .CodeMirror-gutter-text { color: #777; } | ||
55 | |||
56 | .cm-s-lesser-dark span.cm-keyword { color: #599eff; } | ||
57 | .cm-s-lesser-dark span.cm-atom { color: #C2B470; } | ||
58 | .cm-s-lesser-dark span.cm-number { color: #B35E4D; } | ||
59 | .cm-s-lesser-dark span.cm-def {color: color: white;} | ||
60 | .cm-s-lesser-dark span.cm-variable { color:#D9BF8C; } | ||
61 | .cm-s-lesser-dark span.cm-variable-2 { color: #669199; } | ||
62 | .cm-s-lesser-dark span.cm-variable-3 { color: white; } | ||
63 | .cm-s-lesser-dark span.cm-property {color: #92A75C;} | ||
64 | .cm-s-lesser-dark span.cm-operator {color: #92A75C;} | ||
65 | .cm-s-lesser-dark span.cm-comment { color: #666; } | ||
66 | .cm-s-lesser-dark span.cm-string { color: #BCD279; } | ||
67 | .cm-s-lesser-dark span.cm-string-2 {color: #f50;} | ||
68 | .cm-s-lesser-dark span.cm-meta { color: #738C73; } | ||
69 | .cm-s-lesser-dark span.cm-error { color: #9d1e15; } | ||
70 | .cm-s-lesser-dark span.cm-qualifier {color: #555;} | ||
71 | .cm-s-lesser-dark span.cm-builtin { color: #ff9e59; } | ||
72 | .cm-s-lesser-dark span.cm-bracket { color: #EBEFE7; } | ||
73 | .cm-s-lesser-dark span.cm-tag { color: #669199; } | ||
74 | .cm-s-lesser-dark span.cm-attribute {color: #00c;} | ||
75 | .cm-s-lesser-dark span.cm-header {color: #a0a;} | ||
76 | .cm-s-lesser-dark span.cm-quote {color: #090;} | ||
77 | .cm-s-lesser-dark span.cm-hr {color: #999;} | ||
78 | .cm-s-lesser-dark span.cm-link {color: #00c;} | ||
diff --git a/js/code-editor/codemirror-ninja/theme/rubyblue-ninja.css b/js/code-editor/codemirror-ninja/theme/rubyblue-ninja.css index c66311f0..b6c8e02d 100644 --- a/js/code-editor/codemirror-ninja/theme/rubyblue-ninja.css +++ b/js/code-editor/codemirror-ninja/theme/rubyblue-ninja.css | |||
@@ -1,24 +1,25 @@ | |||
1 | /* <copyright> | 1 | /* <copyright> |
2 | Copyright (c) 2012, Motorola Mobility, Inc |