aboutsummaryrefslogtreecommitdiff
path: root/js/components
diff options
context:
space:
mode:
authorArmen Kesablyan2012-03-12 13:39:58 -0700
committerArmen Kesablyan2012-03-12 13:39:58 -0700
commitac2db49e51f82f5a1cf52ec854b047e007ffbdd7 (patch)
treec51282b104328bf93eabc94ef1b837f0041d23bc /js/components
parent69d90467865a1384725b2301901be2180c5a841f (diff)
downloadninja-ac2db49e51f82f5a1cf52ec854b047e007ffbdd7.tar.gz
Committing Disabled states for tool-bar, tool-options, viewbar, breadcrumb
Signed-off-by: Armen Kesablyan <armen@motorola.com>
Diffstat (limited to 'js/components')
-rwxr-xr-xjs/components/layout/bread-crumb.reel/bread-crumb.css2
-rwxr-xr-xjs/components/layout/bread-crumb.reel/bread-crumb.html15
-rwxr-xr-xjs/components/layout/bread-crumb.reel/bread-crumb.js21
-rwxr-xr-xjs/components/layout/document-bar.reel/document-bar.css2
-rwxr-xr-xjs/components/layout/document-bar.reel/document-bar.html15
-rwxr-xr-xjs/components/layout/document-bar.reel/document-bar.js19
-rwxr-xr-xjs/components/layout/tools-list.reel/tools-list.html16
-rwxr-xr-xjs/components/layout/tools-list.reel/tools-list.js17
8 files changed, 104 insertions, 3 deletions
diff --git a/js/components/layout/bread-crumb.reel/bread-crumb.css b/js/components/layout/bread-crumb.reel/bread-crumb.css
index 67497e10..dcfd471c 100755
--- a/js/components/layout/bread-crumb.reel/bread-crumb.css
+++ b/js/components/layout/bread-crumb.reel/bread-crumb.css
@@ -8,7 +8,7 @@
8 background-color: #282828; 8 background-color: #282828;
9 border-style: double; 9 border-style: double;
10 height: 26px; 10 height: 26px;
11 11 position:relative;
12 -webkit-box-flex: 0; 12 -webkit-box-flex: 0;
13} 13}
14 14
diff --git a/js/components/layout/bread-crumb.reel/bread-crumb.html b/js/components/layout/bread-crumb.reel/bread-crumb.html
index f2368e9a..9f24cee5 100755
--- a/js/components/layout/bread-crumb.reel/bread-crumb.html
+++ b/js/components/layout/bread-crumb.reel/bread-crumb.html
@@ -60,6 +60,20 @@
60 "oneway": true 60 "oneway": true
61 } 61 }
62 } 62 }
63 },
64 "Disable": {
65 "module": "montage/ui/condition.reel",
66 "name": "Condition",
67 "properties": {
68 "element": {"#": "disabledCondition"}
69 },
70 "bindings": {
71 "condition": {
72 "boundObject": {"@": "owner"},
73 "boundObjectPropertyPath": "disabled",
74 "oneway": true
75 }
76 }
63 } 77 }
64 } 78 }
65 </script> 79 </script>
@@ -71,6 +85,7 @@
71 <div id="breadcrumb_container"> 85 <div id="breadcrumb_container">
72 <button id="breadcrumb_button" class="nj-skinned"></button> 86 <button id="breadcrumb_button" class="nj-skinned"></button>
73 </div> 87 </div>
88 <div id="disabledCondition" class="panelDisabled"></div>
74 </section> 89 </section>
75 90
76 </body> 91 </body>
diff --git a/js/components/layout/bread-crumb.reel/bread-crumb.js b/js/components/layout/bread-crumb.reel/bread-crumb.js
index b2fa42b1..ff1d1071 100755
--- a/js/components/layout/bread-crumb.reel/bread-crumb.js
+++ b/js/components/layout/bread-crumb.reel/bread-crumb.js
@@ -9,6 +9,25 @@ var Montage = require("montage/core/core").Montage,
9 9
10exports.Breadcrumb = Montage.create(Component, { 10exports.Breadcrumb = Montage.create(Component, {
11 11
12 disabled: {
13 value: true
14 },
15
16 handleOnOpenDocument: {
17 value: function(){
18 this.disabled = false;
19 }
20 },
21
22 handleCloseDocument: {
23 value: function(){
24 if(!this.application.ninja.documentController.activeDocument) {
25 this.disabled = true;
26 }
27 }
28 },
29
30
12 _container:{ 31 _container:{
13 value:null 32 value:null
14 }, 33 },
@@ -31,6 +50,8 @@ exports.Breadcrumb = Montage.create(Component, {
31 50
32 prepareForDraw: { 51 prepareForDraw: {
33 value: function() { 52 value: function() {
53 this.eventManager.addEventListener( "onOpenDocument", this, false);
54 this.eventManager.addEventListener( "closeDocument", this, false);
34 this.breadcrumbBt.addEventListener("action", this, false); 55 this.breadcrumbBt.addEventListener("action", this, false);
35 } 56 }
36 }, 57 },
diff --git a/js/components/layout/document-bar.reel/document-bar.css b/js/components/layout/document-bar.reel/document-bar.css
index 2a147964..f3e5de07 100755
--- a/js/components/layout/document-bar.reel/document-bar.css
+++ b/js/components/layout/document-bar.reel/document-bar.css
@@ -4,8 +4,6 @@
4 (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. 4 (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
5 </copyright> */ 5 </copyright> */
6.documentBar { 6.documentBar {
7 height: 25px;
8 width: 1000px;
9 position: relative; 7 position: relative;
10 overflow: hidden; 8 overflow: hidden;
11 color: white; 9 color: white;
diff --git a/js/components/layout/document-bar.reel/document-bar.html b/js/components/layout/document-bar.reel/document-bar.html
index 48f1423c..5a4ca2be 100755
--- a/js/components/layout/document-bar.reel/document-bar.html
+++ b/js/components/layout/document-bar.reel/document-bar.html
@@ -41,6 +41,20 @@
41 "codeView": {"#": "code"}, 41 "codeView": {"#": "code"},
42 "zoomControl": {"@": "hottext1"} 42 "zoomControl": {"@": "hottext1"}
43 } 43 }
44 },
45 "Disable": {
46 "module": "montage/ui/condition.reel",
47 "name": "Condition",
48 "properties": {
49 "element": {"#": "disabledCondition"}
50 },
51 "bindings": {
52 "condition": {
53 "boundObject": {"@": "owner"},
54 "boundObjectPropertyPath": "disabled",
55 "oneway": true
56 }
57 }
44 } 58 }
45 } 59 }
46 </script> 60 </script>
@@ -53,6 +67,7 @@
53 <input class="zoomHotText label" id="zoomControlHT"/> 67 <input class="zoomHotText label" id="zoomControlHT"/>
54 <span class="design-view disable" id="design">Design View</span> 68 <span class="design-view disable" id="design">Design View</span>
55 <span class="code-view disable" id="code">Code View</span> 69 <span class="code-view disable" id="code">Code View</span>
70 <div id="disabledCondition" class="panelDisabled"></div>
56 </div> 71 </div>
57</body> 72</body>
58</html> \ No newline at end of file 73</html> \ No newline at end of file
diff --git a/js/components/layout/document-bar.reel/document-bar.js b/js/components/layout/document-bar.reel/document-bar.js
index ea5e3280..1f2deb59 100755
--- a/js/components/layout/document-bar.reel/document-bar.js
+++ b/js/components/layout/document-bar.reel/document-bar.js
@@ -13,6 +13,9 @@ exports.DocumentBar = Montage.create(Component, {
13 codeView: { value: null, enumerable: false}, 13 codeView: { value: null, enumerable: false},
14 zoomControl: { value: null, enumerable: false }, 14 zoomControl: { value: null, enumerable: false },
15 _type: { enumerable: false, value: null }, 15 _type: { enumerable: false, value: null },
16 disabled: {value: true},
17
18
16 19
17 type: { 20 type: {
18 enumerable: false, 21 enumerable: false,
@@ -84,6 +87,8 @@ exports.DocumentBar = Montage.create(Component, {
84 87
85 prepareForDraw: { 88 prepareForDraw: {
86 value: function() { 89 value: function() {
90 this.eventManager.addEventListener( "onOpenDocument", this, false);
91 this.eventManager.addEventListener( "closeDocument", this, false);
87 this.designView.addEventListener("click", this, false); 92 this.designView.addEventListener("click", this, false);
88 this.codeView.addEventListener("click", this, false); 93 this.codeView.addEventListener("click", this, false);
89 94
@@ -99,6 +104,20 @@ exports.DocumentBar = Montage.create(Component, {
99 } 104 }
100 }, 105 },
101 106
107 handleOnOpenDocument: {
108 value: function(){
109 this.disabled = false;
110 }
111 },
112
113 handleCloseDocument: {
114 value: function(){
115 if(!this.application.ninja.documentController.activeDocument) {
116 this.disabled = true;
117 }
118 }
119 },
120
102 handleOnDocumentChanged:{ 121 handleOnDocumentChanged:{
103 value:function(event){ 122 value:function(event){
104 123
diff --git a/js/components/layout/tools-list.reel/tools-list.html b/js/components/layout/tools-list.reel/tools-list.html
index 2c5617e5..3e49a4f3 100755
--- a/js/components/layout/tools-list.reel/tools-list.html
+++ b/js/components/layout/tools-list.reel/tools-list.html
@@ -165,6 +165,21 @@
165 {"@": "repetition1"} 165 {"@": "repetition1"}
166 ] 166 ]
167 } 167 }
168 },
169
170 "disabledCondition": {
171 "module": "montage/ui/condition.reel",
172 "name": "Condition",
173 "properties": {