diff options
-rwxr-xr-x | js/components/layout/documents-tab.reel/documents-tab.html | 6 | ||||
-rwxr-xr-x | js/controllers/document-controller.js | 2 | ||||
-rwxr-xr-x | js/controllers/selection-controller.js | 1 | ||||
-rwxr-xr-x | js/data/menu-data.js | 16 | ||||
-rwxr-xr-x | js/document/document-html.js | 404 | ||||
-rwxr-xr-x | js/document/helpers/url-parser.js | 45 | ||||
-rwxr-xr-x | js/document/models/base.js | 77 | ||||
-rwxr-xr-x | js/document/models/html.js | 1 | ||||
-rwxr-xr-x | js/document/templates/montage-web/default_html.css | 28 | ||||
-rwxr-xr-x | js/document/templates/montage-web/index.html | 31 | ||||
-rw-r--r-- | js/document/templates/montage-web/main.js (renamed from js/document/templates/montage-web/main.reel/main.js) | 0 | ||||
-rwxr-xr-x | js/document/views/base.js | 46 | ||||
-rwxr-xr-x | js/document/views/design.js | 273 | ||||
-rwxr-xr-x | js/io/system/coreioapi.js | 64 | ||||
-rwxr-xr-x | js/io/system/fileio.js | 4 | ||||
-rw-r--r-- | js/io/system/ninjalibrary.js | 2 | ||||
-rw-r--r-- | js/mediators/io-mediator.js | 4 | ||||
-rwxr-xr-x | js/stage/stage.reel/stage.js | 4 |
18 files changed, 608 insertions, 400 deletions
diff --git a/js/components/layout/documents-tab.reel/documents-tab.html b/js/components/layout/documents-tab.reel/documents-tab.html index 4aed23d9..cf3dbbf5 100755 --- a/js/components/layout/documents-tab.reel/documents-tab.html +++ b/js/components/layout/documents-tab.reel/documents-tab.html | |||
@@ -33,17 +33,17 @@ | |||
33 | }, | 33 | }, |
34 | "name": { | 34 | "name": { |
35 | "boundObject": {"@": "repetition1"}, | 35 | "boundObject": {"@": "repetition1"}, |
36 | "boundObjectPropertyPath": "objectAtCurrentIteration.name", | 36 | "boundObjectPropertyPath": "objectAtCurrentIteration.model.file.name", |
37 | "oneway": true | 37 | "oneway": true |
38 | }, | 38 | }, |
39 | "saveFlag": { | 39 | "saveFlag": { |
40 | "boundObject": {"@": "repetition1"}, | 40 | "boundObject": {"@": "repetition1"}, |
41 | "boundObjectPropertyPath": "objectAtCurrentIteration.needsSave", | 41 | "boundObjectPropertyPath": "objectAtCurrentIteration.model.needsSave", |
42 | "oneway": true | 42 | "oneway": true |
43 | }, | 43 | }, |
44 | "active": { | 44 | "active": { |
45 | "boundObject": {"@": "repetition1"}, | 45 | "boundObject": {"@": "repetition1"}, |
46 | "boundObjectPropertyPath": "objectAtCurrentIteration.isActive", | 46 | "boundObjectPropertyPath": "objectAtCurrentIteration.model.isActive", |
47 | "oneway": true | 47 | "oneway": true |
48 | } | 48 | } |
49 | } | 49 | } |
diff --git a/js/controllers/document-controller.js b/js/controllers/document-controller.js index 6d11bd0e..803519a7 100755 --- a/js/controllers/document-controller.js +++ b/js/controllers/document-controller.js | |||
@@ -366,7 +366,7 @@ var DocumentController = exports.DocumentController = Montage.create(Component, | |||
366 | case 'html': | 366 | case 'html': |
367 | //Open in designer view | 367 | //Open in designer view |
368 | this._hackRootFlag = false; | 368 | this._hackRootFlag = false; |
369 | Montage.create(Document).init(doc, this, this._onOpenDocument); | 369 | Montage.create(Document).init(doc, this, this._onOpenDocument, 'design'); |
370 | break; | 370 | break; |
371 | default: | 371 | default: |
372 | //Open in code view | 372 | //Open in code view |
diff --git a/js/controllers/selection-controller.js b/js/controllers/selection-controller.js index 5665b09c..2bd774f5 100755 --- a/js/controllers/selection-controller.js +++ b/js/controllers/selection-controller.js | |||
@@ -152,7 +152,6 @@ exports.SelectionController = Montage.create(Component, { | |||
152 | 152 | ||
153 | selectElement: { | 153 | selectElement: { |
154 | value: function(element) { | 154 | value: function(element) { |
155 | |||
156 | if(this.findSelectedElement(element) === -1) { | 155 | if(this.findSelectedElement(element) === -1) { |
157 | 156 | ||
158 | if(this.application.ninja.currentDocument.inExclusion(element) !== -1){ | 157 | if(this.application.ninja.currentDocument.inExclusion(element) !== -1){ |
diff --git a/js/data/menu-data.js b/js/data/menu-data.js index 9e8bf945..1cde3e8d 100755 --- a/js/data/menu-data.js +++ b/js/data/menu-data.js | |||
@@ -22,13 +22,13 @@ exports.MenuData = Montage.create( Montage, { | |||
22 | "displayText" : "New File", | 22 | "displayText" : "New File", |
23 | "hasSubMenu" : false, | 23 | "hasSubMenu" : false, |
24 | "enabled": true, | 24 | "enabled": true, |
25 | "action": "executeNewFile" | 25 | "action": "executeNewWebpage" |
26 | }, | 26 | }, |
27 | { | 27 | { |
28 | "displayText" : "Open File", | 28 | "displayText" : "Open File", |
29 | "hasSubMenu" : false, | 29 | "hasSubMenu" : false, |
30 | "enabled": true, | 30 | "enabled": true, |
31 | "action": "executeFileOpen" | 31 | "action": "executeWebpageOpen" |
32 | }, | 32 | }, |
33 | { | 33 | { |
34 | "displayText" : "Close File", | 34 | "displayText" : "Close File", |
@@ -130,18 +130,6 @@ exports.MenuData = Montage.create( Montage, { | |||
130 | { | 130 | { |
131 | "displayText" : "", | 131 | "displayText" : "", |
132 | "separator": true | 132 | "separator": true |
133 | }, | ||
134 | { | ||
135 | "displayText" : "New Webpage", | ||
136 | "hasSubMenu" : false, | ||
137 | "enabled": true, | ||
138 | "action": "executeNewWebpage" | ||
139 | }, | ||
140 | { | ||
141 | "displayText" : "Open Webpage", | ||
142 | "hasSubMenu" : false, | ||
143 | "enabled": true, | ||
144 | "action": "executeWebpageOpen" | ||
145 | } | 133 | } |
146 | ] | 134 | ] |
147 | }, | 135 | }, |
diff --git a/js/document/document-html.js b/js/document/document-html.js index 89717dd6..deca9f83 100755 --- a/js/document/document-html.js +++ b/js/document/document-html.js | |||
@@ -7,360 +7,118 @@ 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 | Component = require("montage/ui/component").Component; | 10 | Component = require("montage/ui/component").Component, |
11 | HtmlDocumentModel = require("js/document/models/html").HtmlDocumentModel; | 11 | HtmlDocumentModel = require("js/document/models/html").HtmlDocumentModel, |
12 | DesignDocumentView = require("js/document/views/design").DesignDocumentView; | ||
12 | //////////////////////////////////////////////////////////////////////// | 13 | //////////////////////////////////////////////////////////////////////// |
13 | // | 14 | // |
14 | exports.HtmlDocument = Montage.create(Component, { | 15 | exports.HtmlDocument = Montage.create(Component, { |
15 | //////////////////////////////////////////////////////////////////// | 16 | //////////////////////////////////////////////////////////////////// |
16 | // | 17 | // |
17 | hasTemplate: { | 18 | hasTemplate: { |
18 | enumerable: false, | ||
19 | value: false | 19 | value: false |
20 | }, | 20 | }, |
21 | 21 | //////////////////////////////////////////////////////////////////// | |
22 | // | ||
22 | model: { | 23 | model: { |
23 | value: null | 24 | value: null |
24 | }, | 25 | }, |
25 | 26 | //////////////////////////////////////////////////////////////////// | |
26 | loadDelegate: { | 27 | // |
27 | value: null | 28 | loaded: { |
29 | value: {callback: null, context: null} | ||
28 | }, | 30 | }, |
29 | 31 | //////////////////////////////////////////////////////////////////// | |
30 | delegateContext: { | 32 | // |
33 | _observer: { | ||
31 | value: null | 34 | value: null |
32 | }, | 35 | }, |
33 | 36 | //////////////////////////////////////////////////////////////////// | |
34 | exclusionList: { | 37 | // |
35 | value: ["HTML", "BODY"] | 38 | _document: { |
36 | }, | 39 | value: null //TODO: Figure out if this will be needed, probably not |
37 | |||
38 | // Getters for the model. | ||
39 | // TODO: Change how these properties are accessed through Ninja | ||
40 | name: { | ||
41 | get: function() { | ||
42 | return this.model._name; | ||
43 | }, | ||
44 | set: function(value) { | ||
45 | this.model._name = value; | ||
46 | } | ||
47 | }, | ||
48 | |||
49 | isActive: { | ||
50 | get: function() { | ||
51 | return this.model._isActive; | ||
52 | }, | ||
53 | set: function(value) { | ||
54 | this.model._isActive = value; | ||
55 | } | ||
56 | }, | ||
57 | |||
58 | needsSave: { | ||
59 | get: function() { | ||
60 | return this.model._needsSave; | ||
61 | }, | ||
62 | set: function(value) { | ||
63 | this.model._needsSave = value; | ||
64 | } | ||
65 | }, | 40 | }, |
66 | 41 | //////////////////////////////////////////////////////////////////// | |
67 | // View Properties | 42 | // |
68 | // TODO: Move those into a view object - for now dump it here | 43 | exclusionList: { |
69 | iframe: { | 44 | value: [] //TODO: Update to correct list |
70 | value: null | ||
71 | }, | 45 | }, |
72 | 46 | //////////////////////////////////////////////////////////////////// | |
47 | // | ||
73 | uuid: { | 48 | uuid: { |
74 | get: function() { | 49 | get: function() { |
75 | return this._uuid; | 50 | return this._uuid; |
76 | } | 51 | } |
77 | }, | 52 | }, |
78 | 53 | //////////////////////////////////////////////////////////////////// | |
79 | currentView: { | 54 | // |
80 |