diff options
author | Valerio Virgillito | 2012-04-26 15:33:48 -0700 |
---|---|---|
committer | Valerio Virgillito | 2012-04-26 15:33:48 -0700 |
commit | 238586be0df568c6804268d97bf9d3ef7cd33fda (patch) | |
tree | 582041d53a3d91ac50771849f3e4e26c85d69b81 /js/document/document-html.js | |
parent | 01e17da83667b6ad808721687b2dd9b67f1812e6 (diff) | |
download | ninja-238586be0df568c6804268d97bf9d3ef7cd33fda.tar.gz |
Simplifying the getElement method from stage and adding an exclusion list to the new template
Signed-off-by: Valerio Virgillito <valerio@motorola.com>
Diffstat (limited to 'js/document/document-html.js')
-rwxr-xr-x | js/document/document-html.js | 15 |
1 files changed, 15 insertions, 0 deletions
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, { | |||
31 | value: null | 31 | value: null |
32 | }, | 32 | }, |
33 | 33 | ||
34 | exclusionList: { | ||
35 | value: ["HTML"] | ||
36 | }, | ||
37 | |||
34 | // Getters for the model. | 38 | // Getters for the model. |
35 | // TODO: Change how these properties are accessed through Ninja | 39 | // TODO: Change how these properties are accessed through Ninja |
36 | name: { | 40 | name: { |
@@ -316,6 +320,17 @@ exports.HtmlDocument = Montage.create(Component, { | |||
316 | } | 320 | } |
317 | }, | 321 | }, |
318 | 322 | ||
323 | inExclusion: { | ||
324 | value: function(element) { | ||
325 | if(this.exclusionList.indexOf(element.nodeName) === -1) { | ||
326 | return -1; | ||
327 | } | ||
328 | |||
329 | return 1; | ||
330 | |||
331 | } | ||
332 | }, | ||
333 | |||
319 | // Handler for user content main reel. Gets called once the main reel of the template | 334 | // Handler for user content main reel. Gets called once the main reel of the template |
320 | // gets deserialized. | 335 | // gets deserialized. |
321 | // Setting up the currentSelectedContainer to the document body. | 336 | // Setting up the currentSelectedContainer to the document body. |