-
+
diff --git a/node_modules/montage-google/feed-reader/feed-reader.reel/feed-reader.js b/node_modules/montage-google/feed-reader/feed-reader.reel/feed-reader.js
index 47a831eb..c066220e 100644
--- a/node_modules/montage-google/feed-reader/feed-reader.reel/feed-reader.js
+++ b/node_modules/montage-google/feed-reader/feed-reader.reel/feed-reader.js
@@ -8,6 +8,10 @@ var Montage = require("montage").Montage,
exports.FeedReader = Montage.create(Component, {
+ _apiLoaded: {
+ value: false
+ },
+
didCreate: {
value: function() {
var self = this;
@@ -17,6 +21,8 @@ exports.FeedReader = Montage.create(Component, {
google.load("feeds", "1", {
callback: function() {
console.log('google feeds api loaded');
+ self._apiLoaded = true;
+ self.feedURL = self._feedURL;
self.needsDraw = true;
window.initGoogleAPI = null;
}
@@ -30,13 +36,16 @@ exports.FeedReader = Montage.create(Component, {
_feedURL: {value: null},
feedURL: {
+ serializable: true,
get: function() {
return this._feedURL;
},
set: function(value) {
this._feedURL = value;
// execute the search and get the entries
- this._fetchFeed();
+ if (this._apiLoaded) {
+ this._fetchFeed();
+ }
}
},
@@ -49,6 +58,7 @@ exports.FeedReader = Montage.create(Component, {
_feedDisplayMode: {value: null},
feedDisplayMode: {
+ serializable: true,
get: function() {
return this._feedDisplayMode;
},
@@ -107,7 +117,7 @@ exports.FeedReader = Montage.create(Component, {
self.addEntryAnimation();
self.entries = result.feed.entries;
self.activeIndex = 0;
-
+
}
--
cgit v1.2.3
From 94190d38d659b05a0f071e88134651c2484629f6 Mon Sep 17 00:00:00 2001
From: Jose Antonio Marquez
Date: Fri, 1 Jun 2012 13:47:22 -0700
Subject: Fixing webGL helper
---
js/document/document-html.js | 2 ++
js/document/models/html.js | 10 +++++++++-
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/js/document/document-html.js b/js/document/document-html.js
index c60a12a2..b5684dc5 100755
--- a/js/document/document-html.js
+++ b/js/document/document-html.js
@@ -62,6 +62,8 @@ exports.HtmlDocument = Montage.create(Component, {
parentContainer: {value: document.getElementById("iframeContainer")}, //Saving reference to parent container of all views (should be changed to buckets approach
views: {value: {'design': DesignDocumentView.create(), 'code': null}} //TODO: Add code view logic
});
+ //Calling the any init routines in the model
+ this.model.init();
//Initiliazing views and hiding
if (this.model.views.design.initialize(this.model.parentContainer)) {
//Hiding iFrame, just initiliazing
diff --git a/js/document/models/html.js b/js/document/models/html.js
index fd42d4de..0fe33990 100755
--- a/js/document/models/html.js
+++ b/js/document/models/html.js
@@ -17,6 +17,14 @@ exports.HtmlDocumentModel = Montage.create(BaseDocumentModel, {
hasTemplate: {
value: false
},
+ ////////////////////////////////////////////////////////////////////
+ //Called by the document immidiately after the model is created
+ init: {
+ value:function() {
+ //Creating instance of the webGL helper for this model
+ this.webGlHelper = webGlDocumentHelper.create();
+ }
+ },
////////////////////////////////////////////////////////////////////
//
selection: {
@@ -57,7 +65,7 @@ exports.HtmlDocumentModel = Montage.create(BaseDocumentModel, {
////////////////////////////////////////////////////////////////////
//
webGlHelper: {
- value: webGlDocumentHelper
+ value: null
},
////////////////////////////////////////////////////////////////////
//
--
cgit v1.2.3