diff options
Diffstat (limited to 'js/document')
-rwxr-xr-x | js/document/controllers/base-controller.js | 32 | ||||
-rwxr-xr-x | js/document/html-document.js (renamed from js/document/models/html-document.js) | 4 | ||||
-rwxr-xr-x | js/document/mediators/base-mediator.js | 32 | ||||
-rwxr-xr-x | js/document/models/base-document.js | 93 | ||||
-rwxr-xr-x | js/document/models/base-model.js | 32 | ||||
-rwxr-xr-x | js/document/models/text-document.js | 156 | ||||
-rwxr-xr-x | js/document/text-document.js | 204 | ||||
-rwxr-xr-x | js/document/views/base-view.js | 32 |
8 files changed, 334 insertions, 251 deletions
diff --git a/js/document/controllers/base-controller.js b/js/document/controllers/base-controller.js new file mode 100755 index 00000000..be441da2 --- /dev/null +++ b/js/document/controllers/base-controller.js | |||
@@ -0,0 +1,32 @@ | |||
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 | //////////////////////////////////////////////////////////////////////// | ||
8 | // | ||
9 | var Montage = require("montage/core/core").Montage, | ||
10 | Component = require("montage/ui/component").Component; | ||
11 | //////////////////////////////////////////////////////////////////////// | ||
12 | // | ||
13 | exports.ENTERNAME = Montage.create(Montage, { | ||
14 | //////////////////////////////////////////////////////////////////// | ||
15 | // | ||
16 | hasTemplate: { | ||
17 | enumerable: false, | ||
18 | value: false | ||
19 | }, | ||
20 | //////////////////////////////////////////////////////////////////// | ||
21 | // | ||
22 | deserializedFromTemplate: { | ||
23 | enumerable: false, | ||
24 | value: function () { | ||
25 | // | ||
26 | } | ||
27 | } | ||
28 | //////////////////////////////////////////////////////////////////// | ||
29 | //////////////////////////////////////////////////////////////////// | ||
30 | }); | ||
31 | //////////////////////////////////////////////////////////////////////// | ||
32 | //////////////////////////////////////////////////////////////////////// \ No newline at end of file | ||
diff --git a/js/document/models/html-document.js b/js/document/html-document.js index cb399f04..d0b63dcc 100755 --- a/js/document/models/html-document.js +++ b/js/document/html-document.js | |||
@@ -7,11 +7,11 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot | |||
7 | //////////////////////////////////////////////////////////////////////// | 7 | //////////////////////////////////////////////////////////////////////// |
8 | // | 8 | // |
9 | var Montage = require("montage/core/core").Montage, | 9 | var Montage = require("montage/core/core").Montage, |
10 | BaseDocument = require("js/document/models/base-document").BaseDocument, | 10 | TextDocument = require("js/document/text-document").TextDocument, |
11 | NJUtils = require("js/lib/NJUtils").NJUtils; | 11 | NJUtils = require("js/lib/NJUtils").NJUtils; |
12 | //////////////////////////////////////////////////////////////////////// | 12 | //////////////////////////////////////////////////////////////////////// |
13 | // | 13 | // |
14 | exports.HTMLDocument = Montage.create(BaseDocument, { | 14 | exports.HTMLDocument = Montage.create(TextDocument, { |
15 | // PRIVATE MEMBERS | 15 | // PRIVATE MEMBERS |
16 | _selectionExclude: { value: null, enumerable: false }, | 16 | _selectionExclude: { value: null, enumerable: false }, |
17 | _htmlTemplateUrl: { value: "user-document-templates/montage-application-cloud/index.html", enumerable: false}, | 17 | _htmlTemplateUrl: { value: "user-document-templates/montage-application-cloud/index.html", enumerable: false}, |
diff --git a/js/document/mediators/base-mediator.js b/js/document/mediators/base-mediator.js new file mode 100755 index 00000000..be441da2 --- /dev/null +++ b/js/document/mediators/base-mediator.js | |||
@@ -0,0 +1,32 @@ | |||
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 | //////////////////////////////////////////////////////////////////////// | ||
8 | // | ||
9 | var Montage = require("montage/core/core").Montage, | ||
10 | Component = require("montage/ui/component").Component; | ||
11 | //////////////////////////////////////////////////////////////////////// | ||
12 | // | ||
13 | exports.ENTERNAME = Montage.create(Montage, { | ||
14 | //////////////////////////////////////////////////////////////////// | ||
15 | // | ||
16 | hasTemplate: { | ||
17 | enumerable: false, | ||
18 | value: false | ||
19 | }, | ||
20 | //////////////////////////////////////////////////////////////////// | ||
21 | // | ||
22 | deserializedFromTemplate: { | ||
23 | enumerable: false, | ||
24 | value: function () { | ||
25 | // | ||
26 | } | ||
27 | } | ||
28 | //////////////////////////////////////////////////////////////////// | ||
29 | //////////////////////////////////////////////////////////////////// | ||
30 | }); | ||
31 | //////////////////////////////////////////////////////////////////////// | ||
32 | //////////////////////////////////////////////////////////////////////// \ No newline at end of file | ||
diff --git a/js/document/models/base-document.js b/js/document/models/base-document.js deleted file mode 100755 index 918b51ad..00000000 --- a/js/document/models/base-document.js +++ /dev/null | |||
@@ -1,93 +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 | |||
11 | var 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 | save:{ | ||
88 | value:function(){ | ||
89 | //base function - to be overridden | ||
90 | } | ||
91 | } | ||
92 | |||
93 | }); \ No newline at end of file | ||
diff --git a/js/document/models/base-model.js b/js/document/models/base-model.js new file mode 100755 index 00000000..be441da2 --- /dev/null +++ b/js/document/models/base-model.js | |||
@@ -0,0 +1,32 @@ | |||
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 | //////////////////////////////////////////////////////////////////////// | ||
8 | // | ||
9 | var Montage = require("montage/core/core").Montage, | ||
10 | Component = require("montage/ui/component").Component; | ||
11 | //////////////////////////////////////////////////////////////////////// | ||
12 | // | ||
13 | exports.ENTERNAME = Montage.create(Montage, { | ||
14 | //////////////////////////////////////////////////////////////////// | ||
15 | // | ||
16 | hasTemplate: { | ||
17 | enumerable: false, | ||
18 | value: false | ||
19 | }, | ||
20 | //////////////////////////////////////////////////////////////////// | ||
21 | // | ||
22 | deserializedFromTemplate: { | ||
23 | enumerable: false, | ||
24 | value: function () { | ||
25 | // | ||
26 | } | ||
27 | } | ||
28 | //////////////////////////////////////////////////////////////////// | ||
29 | //////////////////////////////////////////////////////////////////// | ||
30 | }); | ||
31 | //////////////////////////////////////////////////////////////////////// | ||
32 | //////////////////////////////////////////////////////////////////////// \ No newline at end of file | ||
diff --git a/js/document/models/text-document.js b/js/document/models/text-document.js deleted file mode 100755 index c0d4f256..00000000 --- a/js/document/models/text-document.js +++ /dev/null | |||
@@ -1,156 +0,0 @@ | |||
1 | /* <copyright> | ||