aboutsummaryrefslogtreecommitdiff
path: root/js/io/document/base-document.js
diff options
context:
space:
mode:
authorPierre Frisch2011-12-22 07:25:50 -0800
committerValerio Virgillito2012-01-27 11:18:17 -0800
commitb89a7ee8b956c96a1dcee995ea840feddc5d4b27 (patch)
tree0f3136ab0ecdbbbed6a83576581af0a53124d6f1 /js/io/document/base-document.js
parent2401f05d1f4b94d45e4568b81fc73e67b969d980 (diff)
downloadninja-b89a7ee8b956c96a1dcee995ea840feddc5d4b27.tar.gz
First commit of Ninja to ninja-internal
Signed-off-by: Valerio Virgillito <rmwh84@motorola.com>
Diffstat (limited to 'js/io/document/base-document.js')
-rw-r--r--js/io/document/base-document.js88
1 files changed, 88 insertions, 0 deletions
diff --git a/js/io/document/base-document.js b/js/io/document/base-document.js
new file mode 100644
index 00000000..44f54f78
--- /dev/null
+++ b/js/io/document/base-document.js
@@ -0,0 +1,88 @@
1/* <copyright>
2This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
3No 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
9var Montage = require("montage/core/core").Montage;
10
11var BaseDocument = exports.BaseDocument = Montage.create(Montage, {
12 /** Private Members **/
13 _name: { value: null, enumerable: false },
14 _uri: { value: null, enumerable: false },
15 _documentType: { value: null, enumerable: false },
16 _container: {value: null, enumerable: false },
17 _uuid: { value: null, enumerable: false },
18 _isActive: { value: true, enumerable: false },
19 _dirtyFlag: { value: false, enumerable: false },
20 _callback: { value: null, enumerable: false },
21 _currentView: { value: null, enumerable: false},
22
23 /** Getters/Setters **/
24 name: {
25 get: function() { return this._name; },
26 set: function(value) { this._name = value; }
27 },
28
29 uri: {
30 get: function() { return this._uri; },
31 set: function(value) { this._uri = value; }
32 },
33
34 documentType: {
35 get: function() { return this._documentType; },
36 set: function(value) { this._documentType = value; }
37 },
38
39 container: {
40 get: function() { return this._container; },
41 set: function(value) { this._container = value; }
42 },
43
44 uuid: {
45 get: function() { return this._uuid; },
46 set: function(value) { this._uuid = value; }
47 },
48
49 isActive: {
50 get: function() { return this._isActive; },
51 set: function(value) { this._isActive = value; }
52 },
53
54 dirtyFlag: {
55 get: function() { return this._dirtyFlag; },
56 set: function(value) { this._dirtyFlag = value; }
57 },
58
59 callback: {
60 get: function() { return this._callback; },
61 set: function(value) { this._callback = value; }
62 },
63
64 currentView: {
65 get: function() { return this._currentView; },
66 set: function(value) { this._currentView = value }
67 },
68
69 /** Base Methods **/
70 init: {
71 value: function(name, uri, type, container, uuid, callback) {
72 this.name = name;
73 this.uri = uri;
74 this.documentType = type;
75 this.container = container;
76 this.uuid = uuid;
77 this.callback = callback;
78 }
79 },
80
81 loadDocument: {
82 value: function() {
83 // Have the XHR here?
84 }
85 }
86
87
88}); \ No newline at end of file