From 238586be0df568c6804268d97bf9d3ef7cd33fda Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Thu, 26 Apr 2012 15:33:48 -0700 Subject: Simplifying the getElement method from stage and adding an exclusion list to the new template Signed-off-by: Valerio Virgillito --- js/document/document-html.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'js/document/document-html.js') diff --git a/js/document/document-html.js b/js/document/document-html.js index 24eb4f47..d9789cd2 100755 --- a/js/document/document-html.js +++ b/js/document/document-html.js @@ -31,6 +31,10 @@ exports.HtmlDocument = Montage.create(Component, { value: null }, + exclusionList: { + value: ["HTML"] + }, + // Getters for the model. // TODO: Change how these properties are accessed through Ninja name: { @@ -316,6 +320,17 @@ exports.HtmlDocument = Montage.create(Component, { } }, + inExclusion: { + value: function(element) { + if(this.exclusionList.indexOf(element.nodeName) === -1) { + return -1; + } + + return 1; + + } + }, + // Handler for user content main reel. Gets called once the main reel of the template // gets deserialized. // Setting up the currentSelectedContainer to the document body. -- cgit v1.2.3