diff options
-rwxr-xr-x | index.html | 2 | ||||
-rw-r--r-- | js/clipboard/external-apps-clipboard-agent.js | 9 | ||||
-rw-r--r-- | js/clipboard/internal-ops/elements-clipboard-agent.js | 7 | ||||
-rw-r--r-- | js/code-editor/code-editor-wrapper.js | 1 | ||||
-rw-r--r-- | js/code-editor/codemirror-ninja/theme/lesser-dark-ninja.css | 79 | ||||
-rw-r--r-- | js/code-editor/codemirror-ninja/theme/xq-dark-ninja.css | 79 | ||||
-rw-r--r-- | js/code-editor/ui/code-editor-view-options.reel/code-editor-view-options.html | 2 |
7 files changed, 6 insertions, 173 deletions
@@ -54,8 +54,6 @@ POSSIBILITY OF SUCH DAMAGE. | |||
54 | <link rel="stylesheet" href="imports/codemirror/theme/cobalt.css"> | 54 | <link rel="stylesheet" href="imports/codemirror/theme/cobalt.css"> |
55 | <link rel="stylesheet" href="imports/codemirror/theme/eclipse.css"> | 55 | <link rel="stylesheet" href="imports/codemirror/theme/eclipse.css"> |
56 | <link rel="stylesheet" href="js/code-editor/codemirror-ninja/theme/rubyblue-ninja.css"> | 56 | <link rel="stylesheet" href="js/code-editor/codemirror-ninja/theme/rubyblue-ninja.css"> |
57 | <link rel="stylesheet" href="js/code-editor/codemirror-ninja/theme/lesser-dark-ninja.css"> | ||
58 | <link rel="stylesheet" href="js/code-editor/codemirror-ninja/theme/xq-dark-ninja.css"> | ||
59 | 57 | ||
60 | 58 | ||
61 | <style type="text/css"> | 59 | <style type="text/css"> |
diff --git a/js/clipboard/external-apps-clipboard-agent.js b/js/clipboard/external-apps-clipboard-agent.js index cd093d6f..6b9d8090 100644 --- a/js/clipboard/external-apps-clipboard-agent.js +++ b/js/clipboard/external-apps-clipboard-agent.js | |||
@@ -75,7 +75,6 @@ var ExternalAppsClipboardAgent = exports.ExternalAppsClipboardAgent = Montage.cr | |||
75 | } | 75 | } |
76 | }, | 76 | }, |
77 | 77 | ||
78 | //todo: this will be moved to a seperate api | ||
79 | pasteImageBinary:{ | 78 | pasteImageBinary:{ |
80 | value: function(imageBlob){ | 79 | value: function(imageBlob){ |
81 | var element, self = this, | 80 | var element, self = this, |
@@ -99,7 +98,7 @@ var ExternalAppsClipboardAgent = exports.ExternalAppsClipboardAgent = Montage.cr | |||
99 | if (save && save.success && save.status === 201) { | 98 | if (save && save.success && save.status === 201) { |
100 | // | 99 | // |
101 | if (fileType.indexOf('svg') !== -1) { | 100 | if (fileType.indexOf('svg') !== -1) { |
102 | element = document.application.njUtils.make('embed', null, this.application.ninja.currentDocument);//TODO: Verify this is proper | 101 | element = document.application.njUtils.make('embed', null, this.application.ninja.currentDocument); |
103 | element.type = 'image/svg+xml'; | 102 | element.type = 'image/svg+xml'; |
104 | element.src = url+'/'+fileName; | 103 | element.src = url+'/'+fileName; |
105 | } else { | 104 | } else { |
@@ -120,7 +119,7 @@ var ExternalAppsClipboardAgent = exports.ExternalAppsClipboardAgent = Montage.cr | |||
120 | // | 119 | // |
121 | self.application.ninja.elementMediator.addElements(element, rules, false); | 120 | self.application.ninja.elementMediator.addElements(element, rules, false); |
122 | } else { | 121 | } else { |
123 | //TODO: HANDLE ERROR ON SAVING FILE TO BE ADDED AS ELEMENT | 122 | //HANDLE ERROR ON SAVING FILE TO BE ADDED AS ELEMENT |
124 | } | 123 | } |
125 | 124 | ||
126 | return element; | 125 | return element; |
@@ -128,7 +127,7 @@ var ExternalAppsClipboardAgent = exports.ExternalAppsClipboardAgent = Montage.cr | |||
128 | }, | 127 | }, |
129 | 128 | ||
130 | //paste from external applicaitons | 129 | //paste from external applicaitons |
131 | pasteHtml:{//todo: change to pasteNinja, pasteHTML, etc | 130 | pasteHtml:{ |
132 | value: function(htmlData, textData){ | 131 | value: function(htmlData, textData){ |
133 | var i=0, j=0, | 132 | var i=0, j=0, |
134 | pasteDataObject=null, | 133 | pasteDataObject=null, |
@@ -142,7 +141,7 @@ var ExternalAppsClipboardAgent = exports.ExternalAppsClipboardAgent = Montage.cr | |||
142 | 141 | ||
143 | if(htmlData){ | 142 | if(htmlData){ |
144 | 143 | ||
145 | //TODO: cleanse HTML | 144 | //cleanse HTML |
146 | 145 | ||
147 | htmlData.replace(/[<script]/g," "); | 146 | htmlData.replace(/[<script]/g," "); |
148 | 147 | ||
diff --git a/js/clipboard/internal-ops/elements-clipboard-agent.js b/js/clipboard/internal-ops/elements-clipboard-agent.js index 3129b644..a6bce2ba 100644 --- a/js/clipboard/internal-ops/elements-clipboard-agent.js +++ b/js/clipboard/internal-ops/elements-clipboard-agent.js | |||
@@ -142,7 +142,7 @@ var ElementsClipboardAgent = exports.ElementsClipboardAgent = Montage.create(Com | |||
142 | } | 142 | } |
143 | }, | 143 | }, |
144 | 144 | ||
145 | pasteFromCopy:{//todo: change to appropriate name | 145 | pasteFromCopy:{ |
146 | value:function(){ | 146 | value:function(){ |
147 | var i=0, j=0, | 147 | var i=0, j=0, |
148 | pastedElements = [],//array of te pastes clones - for selection | 148 | pastedElements = [],//array of te pastes clones - for selection |
@@ -152,7 +152,7 @@ var ElementsClipboardAgent = exports.ElementsClipboardAgent = Montage.create(Com | |||
152 | 152 | ||
153 | this.pasteCounter++; | 153 | this.pasteCounter++; |
154 | 154 | ||
155 | //TODO: cleanse HTML | 155 | //cleanse HTML |
156 | 156 | ||
157 | for(j=0; j< this.copiedObjects.copy.length; j++){ | 157 | for(j=0; j< this.copiedObjects.copy.length; j++){ |
158 | copiedElement = this.copiedObjects.copy[j]; | 158 | copiedElement = this.copiedObjects.copy[j]; |
@@ -230,9 +230,6 @@ var ElementsClipboardAgent = exports.ElementsClipboardAgent = Montage.create(Com | |||
230 | //build the computed style attribute | 230 | //build the computed style attribute |
231 | computedStyles = elem.ownerDocument.defaultView.getComputedStyle(elem); | 231 | computedStyles = elem.ownerDocument.defaultView.getComputedStyle(elem); |
232 | 232 | ||
233 | //todo: consider cleaning up the position data [or making position:relative with 0,0] from the computed styles, | ||
234 | // so that the object is pasted onto expernal applicaitons [like gmail] with no offset | ||
235 | |||
236 | for (i = 0; i < computedStyles.length; i++) { | 233 | for (i = 0; i < computedStyles.length; i++) { |
237 | stylePropertyName = computedStyles[i]; | 234 | stylePropertyName = computedStyles[i]; |
238 | computedStylesStr = computedStylesStr + stylePropertyName + ":" + computedStyles.getPropertyValue(stylePropertyName) + ";"; | 235 | computedStylesStr = computedStylesStr + stylePropertyName + ":" + computedStyles.getPropertyValue(stylePropertyName) + ";"; |
diff --git a/js/code-editor/code-editor-wrapper.js b/js/code-editor/code-editor-wrapper.js index d9f74167..07381244 100644 --- a/js/code-editor/code-editor-wrapper.js +++ b/js/code-editor/code-editor-wrapper.js | |||
@@ -113,7 +113,6 @@ exports.CodeEditorWrapper = Montage.create(Component, { | |||
113 | 113 | ||
114 | deserializedFromTemplate: { | 114 | deserializedFromTemplate: { |
115 | value: function() { | 115 | value: function() { |
116 | //TODO:add logic to check some configuration file to load the right code editor | ||
117 | this.codeEditor = CodeMirror; | 116 | this.codeEditor = CodeMirror; |
118 | } | 117 | } |
119 | }, | 118 | }, |
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 0bac581e..00000000 --- a/js/code-editor/codemirror-ninja/theme/lesser-dark-ninja.css +++ /dev/null | |||
@@ -1,79 +0,0 @@ | |||
1 | /* <copyright> | ||
2 | Copyright (c) 2012, Motorola Mobility LLC. | ||
3 | All Rights Reserved. | ||
4 | |||
5 | Redistribution and use in source and binary forms, with or without | ||
6 | modification, are permitted provided that the following conditions are met: | ||
7 | |||
8 | * Redistributions of source code must retain the above copyright notice, | ||
9 | this list of conditions and the following disclaimer. | ||
10 | |||
11 | * Redistributions in binary form must reproduce the above copyright notice, | ||
12 | this list of conditions and the following disclaimer in the documentation | ||
13 | and/or other materials provided with the distribution. | ||
14 | |||
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. | ||
18 | |||
19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
22 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE | ||
23 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
24 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
25 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
26 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||
27 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
28 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
29 | POSSIBILITY OF SUCH DAMAGE. | ||
30 | </copyright> */ | ||
31 | |||
32 | /* adopted from CodeMirror 2.23 (http://codemirror.net/) */ | ||
33 | |||
34 | /* | ||
35 | http://lesscss.org/ dark theme | ||
36 | Ported to CodeMirror by Peter Kroon | ||
37 | */ | ||
38 | |||
39 | .CodeMirror{ | ||
40 | line-height: 15px; | ||
41 | } | ||
42 | .cm-s-lesser-dark { | ||
43 | font-family: 'Bitstream Vera Sans Mono', 'DejaVu Sans Mono', 'Monaco', Courier, monospace !important; | ||
44 | /*font-size:12px;*/ | ||
45 | } | ||
46 | |||
47 | .cm-s-lesser-dark { background: #262626; color: #EBEFE7; text-shadow: 0 -1px 1px #262626; } | ||
48 | .cm-s-lesser-dark div.CodeMirror-selected {background: #45443B !important;} /* 33322B*/ | ||
49 | .cm-s-lesser-dark .CodeMirror-cursor { border-left: 1px solid white !important; } | ||
50 | .cm-s-lesser-dark .CodeMirror-lines { margin-left:3px; margin-right:3px; }/*editable code holder*/ | ||
51 | |||
52 | div.CodeMirror span.CodeMirror-matchingbracket { color: #7EFC7E; }/*65FC65*/ | ||
53 | |||
54 | .cm-s-lesser-dark .CodeMirror-gutter { background: #262626; border-right:1px solid #aaa; padding-right:3px; min-width:2.5em; } | ||
55 | .cm-s-lesser-dark .CodeMirror-gutter-text { color: #777; } | ||
56 | |||
57 | .cm-s-lesser-dark span.cm-keyword { color: #599eff; } | ||
58 | .cm-s-lesser-dark span.cm-atom { color: #C2B470; } | ||
59 | .cm-s-lesser-dark span.cm-number { color: #B35E4D; } | ||
60 | .cm-s-lesser-dark span.cm-def {color: color: white;} | ||
61 | .cm-s-lesser-dark span.cm-variable { color:#D9BF8C; } | ||
62 | .cm-s-lesser-dark span.cm-variable-2 { color: #669199; } | ||
63 | .cm-s-lesser-dark span.cm-variable-3 { color: white; } | ||
64 | .cm-s-lesser-dark span.cm-property {color: #92A75C;} | ||
65 | .cm-s-lesser-dark span.cm-operator {color: #92A75C;} | ||
66 | .cm-s-lesser-dark span.cm-comment { color: #666; } | ||
67 | .cm-s-lesser-dark span.cm-string { color: #BCD279; } | ||
68 | .cm-s-lesser-dark span.cm-string-2 {color: #f50;} | ||
69 | .cm-s-lesser-dark span.cm-meta { color: #738C73; } | ||
70 | .cm-s-lesser-dark span.cm-error { color: #9d1e15; } | ||
71 | .cm-s-lesser-dark span.cm-qualifier {color: #555;} | ||
72 | .cm-s-lesser-dark span.cm-builtin { color: #ff9e59; } | ||
73 | .cm-s-lesser-dark span.cm-bracket { color: #EBEFE7; } | ||
74 | .cm-s-lesser-dark span.cm-tag { color: #669199; } | ||
75 | .cm-s-lesser-dark span.cm-attribute {color: #00c;} | ||
76 | .cm-s-lesser-dark span.cm-header {color: #a0a;} | ||
77 | .cm-s-lesser-dark span.cm-quote {color: #090;} | ||
78 | .cm-s-lesser-dark span.cm-hr {color: #999;} | ||
79 | .cm-s-lesser-dark span.cm-link {color: #00c;} | ||
diff --git a/js/code-editor/codemirror-ninja/theme/xq-dark-ninja.css b/js/code-editor/codemirror-ninja/theme/xq-dark-ninja.css deleted file mode 100644 index 60043953..00000000 --- a/js/code-editor/codemirror-ninja/theme/xq-dark-ninja.css +++ /dev/null | |||
@@ -1,79 +0,0 @@ | |||
1 | /* <copyright> | ||
2 | Copyright (c) 2012, Motorola Mobility LLC. |