diff options
author | Nivesh Rajbhandari | 2012-05-04 14:54:35 -0700 |
---|---|---|
committer | Nivesh Rajbhandari | 2012-05-04 14:54:35 -0700 |
commit | ce2d581894f9e433a7b73e4b622352a657b6ddaa (patch) | |
tree | bbd4eb9f6d00ee9d3c0bcc53ce560cfc1e71127b /js/document/views/base.js | |
parent | 8f8f7f9a36fb9abadea2a9f25aef0084946bebc9 (diff) | |
parent | 8dcbac5d4c30e9dfbc543a5f997939111e9c9f89 (diff) | |
download | ninja-ce2d581894f9e433a7b73e4b622352a657b6ddaa.tar.gz |
Merge branch 'refs/heads/dom-architecture-master' into Dom-Architecture
Conflicts:
js/document/templates/montage-web/default_html.css
Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com>
Diffstat (limited to 'js/document/views/base.js')
-rwxr-xr-x | js/document/views/base.js | 46 |
1 files changed, 44 insertions, 2 deletions
diff --git a/js/document/views/base.js b/js/document/views/base.js index 50c0a78d..d1c65b5e 100755 --- a/js/document/views/base.js +++ b/js/document/views/base.js | |||
@@ -7,15 +7,57 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot | |||
7 | //////////////////////////////////////////////////////////////////////// | 7 | //////////////////////////////////////////////////////////////////////// |
8 | // | 8 | // |
9 | var Montage = require("montage/core/core").Montage, | 9 | var Montage = require("montage/core/core").Montage, |
10 | Component = require("montage/ui/component").Component; | 10 | Component = require("montage/ui/component").Component, |
11 | UrlParser = require("js/document/helpers/url-parser").UrlParser; | ||
11 | //////////////////////////////////////////////////////////////////////// | 12 | //////////////////////////////////////////////////////////////////////// |
12 | // | 13 | // |
13 | exports.BaseDocumentView = Montage.create(Component, { | 14 | exports.BaseDocumentView = Montage.create(Component, { |
14 | //////////////////////////////////////////////////////////////////// | 15 | //////////////////////////////////////////////////////////////////// |
15 | // | 16 | // |
16 | hasTemplate: { | 17 | hasTemplate: { |
17 | enumerable: false, | ||
18 | value: false | 18 | value: false |
19 | }, | ||
20 | //////////////////////////////////////////////////////////////////// | ||
21 | // | ||
22 | urlParser: { | ||
23 | value: UrlParser | ||
24 | }, | ||
25 | //////////////////////////////////////////////////////////////////// | ||
26 | // | ||
27 | _iframe: { | ||
28 | value: null | ||
29 | }, | ||
30 | //////////////////////////////////////////////////////////////////// | ||
31 | // | ||
32 | iframe: { | ||
33 | get: function() {return this._iframe;}, | ||
34 | set: function(value) {this._iframe= value;} | ||
35 | }, | ||
36 | //////////////////////////////////////////////////////////////////// | ||
37 | // | ||
38 | show: { | ||
39 | value: function (callback) { | ||
40 | if (this.iframe) { | ||
41 | this.iframe.style.display = 'block'; | ||
42 | } else { | ||
43 | console.log('Error: View has no iframe to show!'); | ||
44 | } | ||
45 | // | ||
46 | if (callback) callback(); | ||
47 | } | ||
48 | }, | ||
49 | //////////////////////////////////////////////////////////////////// | ||
50 | // | ||
51 | hide: { | ||
52 | value: function (callback) { | ||
53 | if (this.iframe) { | ||
54 | this.iframe.style.display = 'none'; | ||
55 | } else { | ||
56 | console.log('Error: View has no iframe to hide!'); | ||
57 | } | ||
58 | // | ||
59 | if (callback) callback(); | ||
60 | } | ||
19 | } | 61 | } |
20 | //////////////////////////////////////////////////////////////////// | 62 | //////////////////////////////////////////////////////////////////// |
21 | //////////////////////////////////////////////////////////////////// | 63 | //////////////////////////////////////////////////////////////////// |