diff options
author | Ananya Sen | 2012-02-15 10:01:59 -0800 |
---|---|---|
committer | Ananya Sen | 2012-02-15 10:01:59 -0800 |
commit | b8782f2e3dd106accbb0160a98e6b498f26752ea (patch) | |
tree | ca279bd78d65cf59249efd693c281c70a74c7b69 /js/io | |
parent | a90e3be8850b64e8e370aa8ff8cadaa448dd0c82 (diff) | |
download | ninja-b8782f2e3dd106accbb0160a98e6b498f26752ea.tar.gz |
Revert "Merging TextDocument into BaseDocument"
This reverts commit 93c8f327d662a7693d1d6ca050a0efd15ebc18ed.
Conflicts:
js/controllers/document-controller.js
Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com>
Diffstat (limited to 'js/io')
-rwxr-xr-x | js/io/document/base-document.js | 113 |
1 files changed, 1 insertions, 112 deletions
diff --git a/js/io/document/base-document.js b/js/io/document/base-document.js index 45c340ce..918b51ad 100755 --- a/js/io/document/base-document.js +++ b/js/io/document/base-document.js | |||
@@ -9,115 +9,6 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot | |||
9 | var Montage = require("montage/core/core").Montage; | 9 | var Montage = require("montage/core/core").Montage; |
10 | 10 | ||
11 | var BaseDocument = exports.BaseDocument = Montage.create(Montage, { | 11 | var BaseDocument = exports.BaseDocument = Montage.create(Montage, { |
12 | |||
13 | |||
14 | //TODO: Clean up, test | ||
15 | |||
16 | |||
17 | |||
18 | |||
19 | |||
20 | //////////////////////////////////////////////////////////////////// | ||
21 | //////////////////////////////////////////////////////////////////// | ||
22 | //////////////////////////////////////////////////////////////////// | ||
23 | //////////////////////////////////////////////////////////////////// | ||
24 | //Taken from text-document, which shouldn't be needed | ||
25 | |||
26 | // PRIVATE MEMBERS | ||
27 | _codeEditor: { | ||
28 | value: { | ||
29 | "editor": { value: null, enumerable: false }, | ||
30 | |||
31 | } | ||
32 | }, | ||
33 | |||
34 | _editor: { value: null, enumerable: false }, | ||
35 | _hline: { value: null, enumerable: false }, | ||
36 | |||
37 | _textArea: {value: null, enumerable: false }, | ||
38 | |||
39 | _userDocument: {value: null, enumerable: false }, | ||
40 | |||
41 | _source: { value: null, enumerable: false}, | ||
42 | |||
43 | source: { | ||
44 | get: function() { return this._source;}, | ||
45 | set: function(value) { this._source = value;} | ||
46 | }, | ||
47 | |||
48 | // PUBLIC MEMBERS | ||
49 | |||
50 | _savedLeftScroll: {value:null}, | ||
51 | _savedTopScroll: {value:null}, | ||
52 | |||
53 | //****************************************// | ||
54 | //PUBLIC API | ||
55 | |||
56 | |||
57 | // GETTERS / SETTERS | ||
58 | |||
59 | savedLeftScroll:{ | ||
60 | get: function() { return this._savedLeftScroll; }, | ||
61 | set: function(value) { this._savedLeftScroll = value} | ||
62 | }, | ||
63 | |||
64 | savedTopScroll:{ | ||
65 | get: function() { return this._savedTopScroll; }, | ||
66 | set: function(value) { this._savedTopScroll = value} | ||
67 | }, | ||
68 | |||
69 | textArea: { | ||
70 | get: function() { return this._textArea; }, | ||
71 | set: function(value) { this._textArea = value; } | ||
72 | }, | ||
73 | editor: { | ||
74 | get: function() { return this._editor; }, | ||
75 | set: function(value) { this._editor = value} | ||
76 | }, | ||
77 | |||
78 | hline: { | ||
79 | get: function() { return this._hline; }, | ||
80 | set: function(value) {this._hline = value; } | ||
81 | }, | ||
82 | |||
83 | |||
84 | //////////////////////////////////////////////////////////////////// | ||
85 | // | ||
86 | initialize: { | ||
87 | value: function(file, uuid, textArea, container, callback) { | ||
88 | // | ||
89 | this._userDocument = file; | ||
90 | // | ||
91 | this.init(file.name, file.uri, file.extension, container, uuid, callback); | ||
92 | // | ||
93 | this.currentView = "code"; | ||
94 | this.textArea = textArea; | ||
95 | } | ||
96 | }, | ||
97 | //////////////////////////////////////////////////////////////////// | ||
98 | // | ||
99 | save: { | ||
100 | enumerable: false, | ||
101 | value: function () { | ||
102 | //TODO: Improve sequence | ||
103 | this.editor.save(); | ||
104 | return {mode: this._userDocument.extension, document: this._userDocument, content: this.textArea.value}; | ||
105 | } | ||
106 | }, | ||
107 | //////////////////////////////////////////////////////////////////// | ||
108 | //////////////////////////////////////////////////////////////////// | ||
109 | //////////////////////////////////////////////////////////////////// | ||
110 | //////////////////////////////////////////////////////////////////// | ||
111 | |||
112 | |||
113 | |||
114 | |||
115 | |||
116 | |||
117 | |||
118 | |||
119 | |||
120 | |||
121 | /** Private Members **/ | 12 | /** Private Members **/ |
122 | _name: { value: null, enumerable: false }, | 13 | _name: { value: null, enumerable: false }, |
123 | _uri: { value: null, enumerable: false }, | 14 | _uri: { value: null, enumerable: false }, |
@@ -191,14 +82,12 @@ var BaseDocument = exports.BaseDocument = Montage.create(Montage, { | |||
191 | value: function() { | 82 | value: function() { |
192 | // Have the XHR here? | 83 | // Have the XHR here? |
193 | } | 84 | } |
194 | }/* | 85 | }, |
195 | , | ||
196 | 86 | ||
197 | save:{ | 87 | save:{ |
198 | value:function(){ | 88 | value:function(){ |
199 | //base function - to be overridden | 89 | //base function - to be overridden |
200 | } | 90 | } |
201 | } | 91 | } |
202 | */ | ||
203 | 92 | ||
204 | }); \ No newline at end of file | 93 | }); \ No newline at end of file |