From 075252ad893452df446566f01d0b26eeab08be3d Mon Sep 17 00:00:00 2001
From: Jose Antonio Marquez
Date: Wed, 15 Feb 2012 23:07:00 -0800
Subject: Setting up webGL library copy on save
---
js/document/html-document.js | 36 ++++++++----------------------------
1 file changed, 8 insertions(+), 28 deletions(-)
(limited to 'js/document')
diff --git a/js/document/html-document.js b/js/document/html-document.js
index bf9bba76..ad5417a9 100755
--- a/js/document/html-document.js
+++ b/js/document/html-document.js
@@ -12,7 +12,7 @@ var Montage = require("montage/core/core").Montage,
////////////////////////////////////////////////////////////////////////
//
exports.HTMLDocument = Montage.create(TextDocument, {
- // PRIVATE MEMBERS
+
_selectionExclude: { value: null, enumerable: false },
_htmlTemplateUrl: { value: "user-document-templates/montage-application-cloud/index.html", enumerable: false},
_iframe: { value: null, enumerable: false },
@@ -41,7 +41,6 @@ exports.HTMLDocument = Montage.create(TextDocument, {
_zoomFactor: { value: 100, enumerable: false },
- // PUBLIC MEMBERS
cssLoadInterval: { value: null, enumerable: false },
_savedLeftScroll: {value:null},
@@ -53,9 +52,7 @@ exports.HTMLDocument = Montage.create(TextDocument, {
value:null
},
- /*
- * PUBLIC API
- */
+
// GETTERS / SETTERS
@@ -231,9 +228,7 @@ exports.HTMLDocument = Montage.create(TextDocument, {
}
}
},
-
- //****************************************//
- // PUBLIC METHODS
+
////////////////////////////////////////////////////////////////////
@@ -357,19 +352,8 @@ exports.HTMLDocument = Montage.create(TextDocument, {
return this._window.getElement(x,y);
}
},
-
- /*
- // Private
- _loadDocument: {
- value: function(uri) {
- // Load the document into the Iframe
- this.iframe.src = uri;
- this.iframe.addEventListener("load", this, true);
- }
- },
-*/
-
-
+
+
////////////////////////////////////////////////////////////////////
//
@@ -475,11 +459,7 @@ exports.HTMLDocument = Montage.create(TextDocument, {
}
}
},
-
- /**
- * public method
- *
- */
+
////////////////////////////////////////////////////////////////////
//
save: {
@@ -487,12 +467,12 @@ exports.HTMLDocument = Montage.create(TextDocument, {
value: function () {
//TODO: Add code view logic and also styles for HTML
if (this.currentView === 'design') {
- return {mode: 'html', document: this._userDocument, style: this._styles, head: this._templateDocument.head.innerHTML, body: this._templateDocument.body.innerHTML};
+ return {mode: 'html', document: this._userDocument, webgl: this.glData, style: this._styles, head: this._templateDocument.head.innerHTML, body: this._templateDocument.body.innerHTML};
} else if (this.currentView === "code"){
//TODO: Would this get call when we are in code of HTML?
} else {
//Error
- }
+ }
}
}
////////////////////////////////////////////////////////////////////
--
cgit v1.2.3
From cfc2a432323d4620b1f4ca2061bbe57f46e7eaf7 Mon Sep 17 00:00:00 2001
From: Jose Antonio Marquez
Date: Thu, 16 Feb 2012 23:10:15 -0800
Subject: Moving Ninja iFrame templates
---
js/document/html-document.js | 11 +++-
.../templates/montage-html/default_html.css | 75 ++++++++++++++++++++++
js/document/templates/montage-html/index.html | 50 +++++++++++++++
.../templates/montage-html/main.reel/main.js | 55 ++++++++++++++++
js/document/templates/montage-html/package.json | 8 +++
js/document/templates/montage-html/styles.css | 5 ++
6 files changed, 202 insertions(+), 2 deletions(-)
create mode 100755 js/document/templates/montage-html/default_html.css
create mode 100755 js/document/templates/montage-html/index.html
create mode 100644 js/document/templates/montage-html/main.reel/main.js
create mode 100755 js/document/templates/montage-html/package.json
create mode 100755 js/document/templates/montage-html/styles.css
(limited to 'js/document')
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,
exports.HTMLDocument = Montage.create(TextDocument, {
_selectionExclude: { value: null, enumerable: false },
- _htmlTemplateUrl: { value: "user-document-templates/montage-application-cloud/index.html", enumerable: false},
+ _htmlTemplateUrl: { value: "js/document/templates/montage-html/index.html", enumerable: false},
_iframe: { value: null, enumerable: false },
_server: { value: null, enumerable: false },
_templateDocument: { value: null, enumerable: false },
@@ -235,6 +235,7 @@ exports.HTMLDocument = Montage.create(TextDocument, {
//
initialize: {
value: function(file, uuid, iframe, callback) {
+ //console.log('allow');
//
this._userDocument = file;
//
@@ -359,6 +360,8 @@ exports.HTMLDocument = Montage.create(TextDocument, {
//
handleEvent: {
value: function(event){
+ //console.log('end');
+ //console.log('file content start');
//TODO: Clean up, using for prototyping save
this._templateDocument = {};
this._templateDocument.head = this.iframe.contentWindow.document.getElementById("userHead");;
@@ -389,6 +392,8 @@ exports.HTMLDocument = Montage.create(TextDocument, {
this._stylesheets = this._document.styleSheets; // Entire stlyesheets array
this.callback(this);
+
+ //console.log('file content end');
}
}.bind(this), 50);
@@ -440,7 +445,9 @@ exports.HTMLDocument = Montage.create(TextDocument, {
}
// Remving this callback and using the callback from the css load
- // this.callback(this);
+ //this.callback(this);
+
+
}
},
diff --git a/js/document/templates/montage-html/default_html.css b/js/document/templates/montage-html/default_html.css
new file mode 100755
index 00000000..68300edf
--- /dev/null
+++ b/js/document/templates/montage-html/default_html.css
@@ -0,0 +1,75 @@
+/*
+No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.
+(c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
+