aboutsummaryrefslogtreecommitdiff
path: root/js/io
diff options
context:
space:
mode:
Diffstat (limited to 'js/io')
-rwxr-xr-xjs/io/document/base-document.js113
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
9var Montage = require("montage/core/core").Montage; 9var Montage = require("montage/core/core").Montage;
10 10
11var BaseDocument = exports.BaseDocument = Montage.create(Montage, { 11var 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