diff options
author | Jonathan Duran | 2012-05-31 08:54:48 -0700 |
---|---|---|
committer | Jonathan Duran | 2012-05-31 08:54:48 -0700 |
commit | f297093b5bfa62c9832829751a12f0e556bb5cc0 (patch) | |
tree | 6e04cdf142cb1b36e2197970c9dc2141017a2be7 /js/document/views/base.js | |
parent | 9253e2ce98d748edd8c3929f113a597923960387 (diff) | |
parent | d49c909cff7f0c5e5d0b127ad84a2fefc6677dc6 (diff) | |
download | ninja-f297093b5bfa62c9832829751a12f0e556bb5cc0.tar.gz |
Merge branch 'refs/heads/NINJAmaster' into TimelineUber
Conflicts:
js/panels/Timeline/Layer.reel/Layer.js
js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
js/panels/properties.reel/properties.js
Signed-off-by: Jonathan Duran <jduran@motorola.com>
Diffstat (limited to 'js/document/views/base.js')
-rwxr-xr-x | js/document/views/base.js | 48 |
1 files changed, 46 insertions, 2 deletions
diff --git a/js/document/views/base.js b/js/document/views/base.js index 50c0a78d..d13dce1a 100755 --- a/js/document/views/base.js +++ b/js/document/views/base.js | |||
@@ -7,15 +7,59 @@ 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 | //TODO: This should be renamed to better illustrate it's a container (iframe for design, div for code view) | ||
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 | this.iframe.style.opacity = 1; | ||
43 | } else { | ||
44 | console.log('Error: View has no iframe to show!'); | ||
45 | } | ||
46 | // | ||
47 | if (callback) callback(); | ||
48 | } | ||
49 | }, | ||
50 | //////////////////////////////////////////////////////////////////// | ||
51 | // | ||
52 | hide: { | ||
53 | value: function (callback) { | ||
54 | if (this.iframe) { | ||
55 | this.iframe.style.display = 'none'; | ||
56 | this.iframe.style.opacity = 0; | ||
57 | } else { | ||
58 | console.log('Error: View has no iframe to hide!'); | ||
59 | } | ||
60 | // | ||
61 | if (callback) callback(); | ||
62 | } | ||
19 | } | 63 | } |
20 | //////////////////////////////////////////////////////////////////// | 64 | //////////////////////////////////////////////////////////////////// |
21 | //////////////////////////////////////////////////////////////////// | 65 | //////////////////////////////////////////////////////////////////// |