aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose Antonio Marquez2012-02-16 23:10:15 -0800
committerJose Antonio Marquez2012-02-16 23:10:15 -0800
commitcfc2a432323d4620b1f4ca2061bbe57f46e7eaf7 (patch)
tree1e73304c49f3160ae6d4d93f66bb9a9090efa26e
parent7e5cbc9eac21b9799581c34bb99aa942d4f9ad10 (diff)
downloadninja-cfc2a432323d4620b1f4ca2061bbe57f46e7eaf7.tar.gz
Moving Ninja iFrame templates
-rwxr-xr-xjs/document/html-document.js11
-rwxr-xr-xjs/document/templates/montage-html/default_html.css (renamed from user-document-templates/montage-application-cloud/default_html.css)0
-rwxr-xr-xjs/document/templates/montage-html/index.html (renamed from user-document-templates/montage-application-cloud/index.html)2
-rw-r--r--js/document/templates/montage-html/main.reel/main.js (renamed from user-document-templates/montage-application-cloud/main.reel/main.js)0
-rwxr-xr-xjs/document/templates/montage-html/package.json (renamed from user-document-templates/montage-application-cloud/package.json)2
-rwxr-xr-xjs/document/templates/montage-html/styles.css (renamed from user-document-templates/montage-application-cloud/styles.css)0
6 files changed, 11 insertions, 4 deletions
diff --git a/js/document/html-document.js b/js/document/html-document.js
index 0c8695fb..a5483f40 100755
--- a/js/document/html-document.js
+++ b/js/document/html-document.js
@@ -14,7 +14,7 @@ var Montage = require("montage/core/core").Montage,
14exports.HTMLDocument = Montage.create(TextDocument, { 14exports.HTMLDocument = Montage.create(TextDocument, {
15 15
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: "js/document/templates/montage-html/index.html", enumerable: false},
18 _iframe: { value: null, enumerable: false }, 18 _iframe: { value: null, enumerable: false },
19 _server: { value: null, enumerable: false }, 19 _server: { value: null, enumerable: false },
20 _templateDocument: { value: null, enumerable: false }, 20 _templateDocument: { value: null, enumerable: false },
@@ -235,6 +235,7 @@ exports.HTMLDocument = Montage.create(TextDocument, {
235 // 235 //
236 initialize: { 236 initialize: {
237 value: function(file, uuid, iframe, callback) { 237 value: function(file, uuid, iframe, callback) {
238 //console.log('allow');
238 // 239 //
239 this._userDocument = file; 240 this._userDocument = file;
240 // 241 //
@@ -359,6 +360,8 @@ exports.HTMLDocument = Montage.create(TextDocument, {
359 // 360 //
360 handleEvent: { 361 handleEvent: {
361 value: function(event){ 362 value: function(event){
363 //console.log('end');
364 //console.log('file content start');
362 //TODO: Clean up, using for prototyping save 365 //TODO: Clean up, using for prototyping save
363 this._templateDocument = {}; 366 this._templateDocument = {};
364 this._templateDocument.head = this.iframe.contentWindow.document.getElementById("userHead");; 367 this._templateDocument.head = this.iframe.contentWindow.document.getElementById("userHead");;
@@ -389,6 +392,8 @@ exports.HTMLDocument = Montage.create(TextDocument, {
389 this._stylesheets = this._document.styleSheets; // Entire stlyesheets array 392 this._stylesheets = this._document.styleSheets; // Entire stlyesheets array
390 393
391 this.callback(this); 394 this.callback(this);
395
396 //console.log('file content end');
392 } 397 }
393 }.bind(this), 50); 398 }.bind(this), 50);
394 399
@@ -440,7 +445,9 @@ exports.HTMLDocument = Montage.create(TextDocument, {
440 } 445 }
441 446
442 // Remving this callback and using the callback from the css load 447 // Remving this callback and using the callback from the css load
443 // this.callback(this); 448 //this.callback(this);
449
450
444 451
445 } 452 }
446 }, 453 },
diff --git a/user-document-templates/montage-application-cloud/default_html.css b/js/document/templates/montage-html/default_html.css
index 68300edf..68300edf 100755
--- a/user-document-templates/montage-application-cloud/default_html.css
+++ b/js/document/templates/montage-html/default_html.css
diff --git a/user-document-templates/montage-application-cloud/index.html b/js/document/templates/montage-html/index.html
index 49931969..8b3d73bb 100755
--- a/user-document-templates/montage-application-cloud/index.html
+++ b/js/document/templates/montage-html/index.html
@@ -14,7 +14,7 @@
14 <link href="default_html.css" id="nj-stage-stylesheet" rel="stylesheet" type="text/css" media="screen"/> 14 <link href="default_html.css" id="nj-stage-stylesheet" rel="stylesheet" type="text/css" media="screen"/>
15 <link href="styles.css" id="nj-default-stylesheet" rel="stylesheet" type="text/css" media="screen"/> 15 <link href="styles.css" id="nj-default-stylesheet" rel="stylesheet" type="text/css" media="screen"/>
16 16
17 <script type="text/javascript" data-package="." src="../../node_modules/montage/montage.js"></script> 17 <script type="text/javascript" data-package="." src="../../../../node_modules/montage/montage.js"></script>
18 18
19 <script type="text/javascript"> 19 <script type="text/javascript">
20 function getElement(x,y) { 20 function getElement(x,y) {
diff --git a/user-document-templates/montage-application-cloud/main.reel/main.js b/js/document/templates/montage-html/main.reel/main.js
index 86871fd3..86871fd3 100644
--- a/user-document-templates/montage-application-cloud/main.reel/main.js
+++ b/js/document/templates/montage-html/main.reel/main.js
diff --git a/user-document-templates/montage-application-cloud/package.json b/js/document/templates/montage-html/package.json
index 5466b3d7..c8bc02fb 100755
--- a/user-document-templates/montage-application-cloud/package.json
+++ b/js/document/templates/montage-html/package.json
@@ -3,6 +3,6 @@
3 "lib": "" 3 "lib": ""
4 }, 4 },
5 "mappings": { 5 "mappings": {
6 "montage": "../../node_modules/montage/" 6 "montage": "../../../../node_modules/montage/"
7 } 7 }
8} \ No newline at end of file 8} \ No newline at end of file
diff --git a/user-document-templates/montage-application-cloud/styles.css b/js/document/templates/montage-html/styles.css
index 0441c1cf..0441c1cf 100755
--- a/user-document-templates/montage-application-cloud/styles.css
+++ b/js/document/templates/montage-html/styles.css