aboutsummaryrefslogtreecommitdiff
path: root/js/components
diff options
context:
space:
mode:
authorNivesh Rajbhandari2012-06-01 06:53:58 -0700
committerNivesh Rajbhandari2012-06-01 06:53:58 -0700
commit69ca67093bb53188dca5437e0bfbfb7f676ada85 (patch)
treecc2b387c796b0f34f1ab00a7c542c335d52005e9 /js/components
parentb7f048624c07a1186cca080bf4c9a87af7d53f35 (diff)
parent7fcb10270f9e19415f8452c261c2d0c86916a29a (diff)
downloadninja-69ca67093bb53188dca5437e0bfbfb7f676ada85.tar.gz
Merge branch 'refs/heads/valerio-document-bindings-fix' into document-bindings-fix
Conflicts: js/stage/stage.reel/stage.js Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com>
Diffstat (limited to 'js/components')
-rwxr-xr-xjs/components/layout/document-bar.reel/document-bar.js55
1 files changed, 49 insertions, 6 deletions
diff --git a/js/components/layout/document-bar.reel/document-bar.js b/js/components/layout/document-bar.reel/document-bar.js
index 90d3a207..1cb0bd90 100755
--- a/js/components/layout/document-bar.reel/document-bar.js
+++ b/js/components/layout/document-bar.reel/document-bar.js
@@ -28,13 +28,45 @@ exports.DocumentBar = Montage.create(Component, {
28 28
29 this.disabled = !this._currentDocument; 29 this.disabled = !this._currentDocument;
30 30
31 if(this._currentDocument && this._currentDocument.currentView === "design") {
32 this.visible = true;
33 } else if(this._currentDocument && this._currentDocument.currentView === "code") {
34 this.visible = false;
35 }
31 } 36 }
32 }, 37 },
33 38
34 designView: { value: null, enumerable: false}, 39 _visible: {
35 codeView: { value: null, enumerable: false}, 40 value: false
36 zoomControl: { value: null, enumerable: false }, 41 },
37 _type: { enumerable: false, value: null }, 42
43 visible: {
44 get: function() {
45 return this._visible;
46 },
47 set: function(value) {
48 if(this._visible !== value) {
49 this._visible = value;
50 this.needsDraw = true;
51 }
52 }
53 },
54
55 designView: {
56 value: null
57 },
58
59 codeView: {
60 value: null
61 },
62
63 zoomControl: {
64 value: null
65 },
66
67 _type: {
68 value: null
69 },
38 70
39 type: { 71 type: {
40 enumerable: false, 72 enumerable: false,
@@ -50,7 +82,9 @@ exports.DocumentBar = Montage.create(Component, {
50 } 82 }
51 }, 83 },
52 84
53 _currentView: { value: null, enumerable: false }, 85 _currentView: {
86 value: null
87 },
54 88
55 currentView: { 89 currentView: {
56 get: function() { return this._currentView}, 90 get: function() { return this._currentView},
@@ -64,7 +98,9 @@ exports.DocumentBar = Montage.create(Component, {
64 } 98 }
65 }, 99 },
66 100
67 _zoomFactor: { value: 100, enumerable: false }, 101 _zoomFactor: {
102 value: 100
103 },
68 104
69 zoomFactor: { 105 zoomFactor: {
70 get: function() { return this._zoomFactor; }, 106 get: function() { return this._zoomFactor; },
@@ -84,6 +120,7 @@ exports.DocumentBar = Montage.create(Component, {
84 120
85 draw: { 121 draw: {
86 value: function() { 122 value: function() {
123 /*
87 if(this.type === "htm" || this.type === "html") { 124 if(this.type === "htm" || this.type === "html") {
88 this.designView.classList.add("active"); 125 this.designView.classList.add("active");
89 this.codeView.classList.add("active"); 126 this.codeView.classList.add("active");
@@ -99,6 +136,12 @@ exports.DocumentBar = Montage.create(Component, {
99 } else if(this.type) { 136 } else if(this.type) {
100 this.designView.classList.remove("active"); 137 this.designView.classList.remove("active");
101 } 138 }
139 */
140 if(this.visible) {
141 this.element.style.display = "block";
142 } else {
143 this.element.style.display = "none";
144 }
102 145
103 } 146 }
104 }, 147 },