diff options
author | Kruti Shah | 2012-06-12 13:09:11 -0700 |
---|---|---|
committer | Kruti Shah | 2012-06-12 13:09:11 -0700 |
commit | d648c842905c7c53e0f89b943982493d2b79f56e (patch) | |
tree | eb5585f92061975215f6d19305a8d1b76262e2fc /js/document | |
parent | bedb38e14887b29eae3cdf1c8d435259c920257c (diff) | |
parent | cf3b96822665751dae7a64644db3cb3960733c3d (diff) | |
download | ninja-d648c842905c7c53e0f89b943982493d2b79f56e.tar.gz |
Merge branch 'refs/heads/TimelineUberjd' into TimelineUber
Conflicts:
js/controllers/elements/element-controller.js
js/document/_toDelete/html-document.js
js/panels/Timeline/Layer.reel/Layer.js
Signed-off-by: Kruti Shah <kruti.shah@motorola.com>
Diffstat (limited to 'js/document')
-rwxr-xr-x | js/document/_toDelete/text-document.js | 198 | ||||
-rwxr-xr-x | js/document/document-html.js | 37 | ||||
-rwxr-xr-x | js/document/helpers/webgl-helper.js | 14 | ||||
-rwxr-xr-x | js/document/mediators/template.js | 796 | ||||
-rwxr-xr-x | js/document/models/base.js | 99 | ||||
-rwxr-xr-x | js/document/models/html.js | 59 | ||||
-rwxr-xr-x | js/document/models/text.js | 3 | ||||
-rw-r--r-- | js/document/templates/app/main.js | 51 | ||||
-rwxr-xr-x | js/document/templates/banner/index.html | 24 | ||||
-rwxr-xr-x | js/document/templates/html/index.html | 27 | ||||
-rwxr-xr-x | js/document/views/code.js | 6 | ||||
-rwxr-xr-x | js/document/views/design.js | 115 |
12 files changed, 1088 insertions, 341 deletions
diff --git a/js/document/_toDelete/text-document.js b/js/document/_toDelete/text-document.js deleted file mode 100755 index 2574b67c..00000000 --- a/js/document/_toDelete/text-document.js +++ /dev/null | |||
@@ -1,198 +0,0 @@ | |||
1 | /* <copyright> | ||
2 | This file contains proprietary software owned by Motorola Mobility, Inc.<br/> | ||
3 | No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/> | ||
4 | (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. | ||
5 | </copyright> */ | ||
6 | |||
7 | //BaseDocument Object for all files types and base class for HTML documents. | ||
8 | |||
9 | var Montage = require("montage/core/core").Montage, | ||
10 | Component = require("montage/ui/component").Component; | ||
11 | |||
12 | var TextDocument = exports.TextDocument = Montage.create(Component, { | ||
13 | |||
14 | |||
15 | //TODO: Clean up, test | ||
16 | |||
17 | |||
18 | |||
19 | |||
20 | |||
21 | //////////////////////////////////////////////////////////////////// | ||
22 | //////////////////////////////////////////////////////////////////// | ||
23 | //////////////////////////////////////////////////////////////////// | ||
24 | //////////////////////////////////////////////////////////////////// | ||
25 | //Taken from text-document, which shouldn't be needed | ||
26 | |||
27 | // PRIVATE MEMBERS | ||
28 | _codeEditor: { | ||
29 | value: { | ||
30 | "editor": { value: null, enumerable: false } | ||
31 | |||
32 | } | ||
33 | }, | ||
34 | |||
35 | _editor: { value: null, enumerable: false }, | ||
36 | _hline: { value: null, enumerable: false }, | ||
37 | |||
38 | _textArea: {value: null, enumerable: false }, | ||
39 | |||
40 | _userDocument: {value: null, enumerable: false }, | ||
41 | |||
42 | _source: { value: null, enumerable: false}, | ||
43 | |||
44 | source: { | ||
45 | get: function() { return this._source;}, | ||
46 | set: function(value) { this._source = value;} | ||
47 | }, | ||
48 | |||
49 | // PUBLIC MEMBERS | ||
50 | |||
51 | _savedLeftScroll: {value:null}, | ||
52 | _savedTopScroll: {value:null}, | ||
53 | |||
54 | //****************************************// | ||
55 | //PUBLIC API | ||
56 | |||
57 | |||
58 | // GETTERS / SETTERS | ||
59 | |||
60 | savedLeftScroll:{ | ||
61 | get: function() { return this._savedLeftScroll; }, | ||
62 | set: function(value) { this._savedLeftScroll = value} | ||
63 | }, | ||
64 | |||
65 | savedTopScroll:{ | ||
66 | get: function() { return this._savedTopScroll; }, | ||
67 | set: function(value) { this._savedTopScroll = value} | ||
68 | }, | ||
69 | |||
70 | textArea: { | ||
71 | get: function() { return this._textArea; }, | ||
72 | set: function(value) { this._textArea = value; } | ||
73 | }, | ||
74 | editor: { | ||
75 | get: function() { return this._editor; }, | ||
76 | set: function(value) { this._editor = value} | ||
77 | }, | ||
78 | |||
79 | hline: { | ||
80 | get: function() { return this._hline; }, | ||
81 | set: function(value) {this._hline = value; } | ||
82 | }, | ||
83 | |||
84 | |||
85 | //////////////////////////////////////////////////////////////////// | ||
86 | // | ||
87 | initialize: { | ||
88 | value: function(file, uuid, textArea, container, callback) { | ||
89 | // | ||
90 | this._userDocument = file; | ||
91 | // | ||
92 | this.init(file.name, file.uri, file.extension, container, uuid, callback); | ||
93 | // | ||
94 | this.currentView = "code"; | ||
95 | this.textArea = textArea; | ||
96 | } | ||
97 | }, | ||
98 | //////////////////////////////////////////////////////////////////// | ||
99 | // | ||
100 | save: { | ||
101 | enumerable: false, | ||
102 | value: function () { | ||
103 | //TODO: Improve sequence | ||
104 | this.editor.save(); | ||
105 | return {mode: this._userDocument.extension, document: this._userDocument, content: this.textArea.value}; | ||
106 | } | ||
107 | }, | ||
108 | //////////////////////////////////////////////////////////////////// | ||
109 | //////////////////////////////////////////////////////////////////// | ||
110 | //////////////////////////////////////////////////////////////////// | ||
111 | //////////////////////////////////////////////////////////////////// | ||
112 | |||
113 | |||
114 | |||
115 | |||
116 | |||
117 | |||
118 | |||
119 | |||
120 | |||
121 | |||
122 | /** Private Members **/ | ||
123 | _name: { value: null, enumerable: false }, | ||
124 | _uri: { value: null, enumerable: false }, | ||
125 | _documentType: { value: null, enumerable: false }, | ||
126 | _container: { value: null, enumerable: false }, | ||
127 | _uuid: { value: null, enumerable: false }, | ||
128 | _isActive: { value: true, enumerable: false }, | ||
129 | _needsSave: { value: false, enumarable: false }, | ||
130 | _callback: { value: null, enumerable: false }, | ||
131 | _currentView: { value: null, enumerable: false}, | ||
132 | |||
133 | /** Getters/Setters **/ | ||
134 | name: { | ||
135 | get: function() { return this._name; }, | ||
136 | set: function(value) { this._name = value; } | ||
137 | }, | ||
138 | |||
139 | uri: { | ||
140 | get: function() { return this._uri; }, | ||
141 | set: function(value) { this._uri = value; } | ||
142 | }, | ||
143 | |||
144 | documentType: { | ||
145 | get: function() { return this._documentType; }, | ||
146 | set: function(value) { this._documentType = value; } | ||
147 | }, | ||
148 | |||
149 | container: { | ||
150 | get: function() { return this._container; }, | ||
151 | set: function(value) { this._container = value; } | ||
152 | }, | ||
153 | |||
154 | uuid: { | ||
155 | get: function() { return this._uuid; }, | ||
156 | set: function(value) { this._uuid = value; } | ||
157 | }, | ||
158 | |||
159 | isActive: { | ||
160 | get: function() { return this._isActive; }, | ||
161 | set: function(value) { this._isActive = value; } | ||
162 | }, | ||
163 | |||
164 | needsSave: { | ||
165 | get: function() { return this._needsSave; }, | ||
166 | set: function(value) { | ||
167 | this._needsSave = value; | ||
168 | } | ||
169 | }, | ||
170 | |||
171 | callback: { | ||
172 | get: function() { return this._callback; }, | ||
173 | set: function(value) { this._callback = value; } | ||
174 | }, | ||
175 | |||
176 | currentView: { | ||
177 | get: function() { return this._currentView; }, | ||
178 | set: function(value) { this._currentView = value } | ||
179 | }, | ||
180 | |||
181 | /** Base Methods **/ | ||
182 | init: { | ||
183 | value: function(name, uri, type, container, uuid, callback) { | ||
184 | this.name = name; | ||
185 | this.uri = uri; | ||
186 | this.documentType = type; | ||
187 | this.container = container; | ||
188 | this.uuid = uuid; | ||
189 | this.callback = callback; | ||
190 | } | ||
191 | }, | ||
192 | |||
193 | loadDocument: { | ||
194 | value: function() { | ||
195 | // Have the XHR here? | ||
196 | } | ||
197 | } | ||
198 | }); \ No newline at end of file | ||
diff --git a/js/document/document-html.js b/js/document/document-html.js index c60a12a2..04565753 100755 --- a/js/document/document-html.js +++ b/js/document/document-html.js | |||
@@ -62,10 +62,14 @@ exports.HtmlDocument = Montage.create(Component, { | |||
62 | parentContainer: {value: document.getElementById("iframeContainer")}, //Saving reference to parent container of all views (should be changed to buckets approach | 62 | parentContainer: {value: document.getElementById("iframeContainer")}, //Saving reference to parent container of all views (should be changed to buckets approach |
63 | views: {value: {'design': DesignDocumentView.create(), 'code': null}} //TODO: Add code view logic | 63 | views: {value: {'design': DesignDocumentView.create(), 'code': null}} //TODO: Add code view logic |
64 | }); | 64 | }); |
65 | //Calling the any init routines in the model | ||
66 | this.model.init(); | ||
65 | //Initiliazing views and hiding | 67 | //Initiliazing views and hiding |
66 | if (this.model.views.design.initialize(this.model.parentContainer)) { | 6 |