aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNivesh Rajbhandari2012-05-04 14:54:35 -0700
committerNivesh Rajbhandari2012-05-04 14:54:35 -0700
commitce2d581894f9e433a7b73e4b622352a657b6ddaa (patch)
treebbd4eb9f6d00ee9d3c0bcc53ce560cfc1e71127b
parent8f8f7f9a36fb9abadea2a9f25aef0084946bebc9 (diff)
parent8dcbac5d4c30e9dfbc543a5f997939111e9c9f89 (diff)
downloadninja-ce2d581894f9e433a7b73e4b622352a657b6ddaa.tar.gz
Merge branch 'refs/heads/dom-architecture-master' into Dom-Architecture
Conflicts: js/document/templates/montage-web/default_html.css Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com>
-rwxr-xr-xjs/components/layout/documents-tab.reel/documents-tab.html6
-rwxr-xr-xjs/controllers/document-controller.js2
-rwxr-xr-xjs/controllers/selection-controller.js1
-rwxr-xr-xjs/data/menu-data.js16
-rwxr-xr-xjs/document/document-html.js404
-rwxr-xr-xjs/document/helpers/url-parser.js45
-rwxr-xr-xjs/document/models/base.js77
-rwxr-xr-xjs/document/models/html.js1
-rwxr-xr-xjs/document/templates/montage-web/default_html.css31
-rwxr-xr-xjs/document/templates/montage-web/index.html31
-rw-r--r--js/document/templates/montage-web/main.js (renamed from js/document/templates/montage-web/main.reel/main.js)0
-rwxr-xr-xjs/document/views/base.js46
-rwxr-xr-xjs/document/views/design.js273
-rwxr-xr-xjs/io/system/coreioapi.js64
-rwxr-xr-xjs/io/system/fileio.js4
-rw-r--r--js/io/system/ninjalibrary.js2
-rw-r--r--js/mediators/io-mediator.js4
-rwxr-xr-xjs/stage/stage.reel/stage.js4
18 files changed, 608 insertions, 403 deletions
diff --git a/js/components/layout/documents-tab.reel/documents-tab.html b/js/components/layout/documents-tab.reel/documents-tab.html
index 1516a8ce..a2070471 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 77c065ae..a81cdf7f 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//
9var Montage = require("montage/core/core").Montage, 9var 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//
14exports.HtmlDocument = Montage.create(Component, { 15exports.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 //