From c144c6921d42fe96c18045b1c2a9822a467b1253 Mon Sep 17 00:00:00 2001 From: Eric Guzman Date: Fri, 15 Jun 2012 18:34:22 -0700 Subject: Objects Tray - Moved to stage object from binding view --- js/stage/binding-view.reel/binding-view.css | 11 ----------- js/stage/binding-view.reel/binding-view.html | 10 +--------- js/stage/stage.reel/stage.css | 18 ++++++++++++++++++ js/stage/stage.reel/stage.html | 12 ++++++++++++ 4 files changed, 31 insertions(+), 20 deletions(-) (limited to 'js/stage') diff --git a/js/stage/binding-view.reel/binding-view.css b/js/stage/binding-view.reel/binding-view.css index a08def8a..37bc8318 100755 --- a/js/stage/binding-view.reel/binding-view.css +++ b/js/stage/binding-view.reel/binding-view.css @@ -5,7 +5,6 @@ */ .bindingView { - height: 100%; position: absolute; width:100%; z-index: 12; @@ -24,13 +23,3 @@ z-index: 1; } -.objects-tray-container { - bottom: 11px; - position: absolute; - width: 100%; - display: -webkit-box; - -webkit-box-orient: horizontal; - -webkit-box-pack: center; - -webkit-box-align: center; - z-index: 2; -} \ No newline at end of file diff --git a/js/stage/binding-view.reel/binding-view.html b/js/stage/binding-view.reel/binding-view.html index 9a127618..e0c42194 100755 --- a/js/stage/binding-view.reel/binding-view.html +++ b/js/stage/binding-view.reel/binding-view.html @@ -41,12 +41,6 @@ "listener": {"@": "owner"} } ] - }, - "objectsTray" : { - "prototype": "js/stage/objects-tray.reel", - "properties": { - "element": {"#": "objects-tray" } - } } } @@ -56,15 +50,13 @@
+
-
-
-
diff --git a/js/stage/stage.reel/stage.css b/js/stage/stage.reel/stage.css index 2271cd8a..bc20c4f3 100755 --- a/js/stage/stage.reel/stage.css +++ b/js/stage/stage.reel/stage.css @@ -48,6 +48,24 @@ width:2500px;/*to prevent scrolling of editor container in the middle of the page for short files*/ } +.stage-tray-container { + height: 100%; + position: absolute; + width: 100%; +} + +.objects-tray-container { + bottom: 10px; + position: absolute; + width: 100%; + display: -webkit-box; + -webkit-box-orient: horizontal; + -webkit-box-pack: center; + -webkit-box-align: center; + z-index: 2; +} + + span.CodeMirror-matchhighlight { background: #e9e9e9 } .CodeMirror-focused span.CodeMirror-matchhighlight { background: #e7e4ff; !important } div.CodeMirror span.CodeMirror-matchingbracket {color: #000 !important;background-color: #ffd500;} diff --git a/js/stage/stage.reel/stage.html b/js/stage/stage.reel/stage.html index 397af0b6..acab4b1b 100755 --- a/js/stage/stage.reel/stage.html +++ b/js/stage/stage.reel/stage.html @@ -47,6 +47,12 @@ "element": {"#": "bindingView" } } }, + "objectsTray" : { + "prototype": "js/stage/objects-tray.reel", + "properties": { + "element": {"#": "objects-tray" } + } + }, "owner": { "prototype": "js/stage/stage.reel", "properties": { @@ -83,6 +89,12 @@ +
+
+
+
+
+
-- cgit v1.2.3 From b7e739311d9ddeb99029313cae9395878c7f7706 Mon Sep 17 00:00:00 2001 From: Eric Guzman Date: Mon, 18 Jun 2012 13:23:05 -0700 Subject: Binding - Show tray when there are objects. Edit binding view css update. --- js/stage/objects-tray.reel/objects-tray.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'js/stage') diff --git a/js/stage/objects-tray.reel/objects-tray.js b/js/stage/objects-tray.reel/objects-tray.js index c046a3bb..190abf57 100644 --- a/js/stage/objects-tray.reel/objects-tray.js +++ b/js/stage/objects-tray.reel/objects-tray.js @@ -13,6 +13,7 @@ var Montage = require("montage/core/core").Montage, exports.ObjectsTray = Montage.create(Component, { hideClass : { value: 'hide-objects-tray'}, + _empty : { value: null }, _workspaceMode : { value: null }, workspaceMode : { get : function() { return this._workspaceMode; }, @@ -76,11 +77,17 @@ exports.ObjectsTray = Montage.create(Component, { "oneway": true }); + if(this.objects) { + this.empty = !this.objects.length; + } else { + this.empty = true; + } + } }, draw : { value: function() { - if(this.hide) { + if(this.hide || this._empty) { this.element.classList.add(this.hideClass); } else { this.element.classList.remove(this.hideClass); -- cgit v1.2.3 From e04903ed2d2e6754119550cb071e03878bb1b14b Mon Sep 17 00:00:00 2001 From: Eric Guzman Date: Mon, 18 Jun 2012 19:08:05 -0700 Subject: Objects Tray - Move back to binding view --- js/stage/binding-view.reel/binding-view.css | 11 +++++++++++ js/stage/binding-view.reel/binding-view.html | 10 ++++++++++ js/stage/stage.reel/stage.css | 18 ------------------ js/stage/stage.reel/stage.html | 12 ------------ 4 files changed, 21 insertions(+), 30 deletions(-) (limited to 'js/stage') diff --git a/js/stage/binding-view.reel/binding-view.css b/js/stage/binding-view.reel/binding-view.css index 37bc8318..543577d1 100755 --- a/js/stage/binding-view.reel/binding-view.css +++ b/js/stage/binding-view.reel/binding-view.css @@ -5,6 +5,7 @@ */ .bindingView { + height: 100%; position: absolute; width:100%; z-index: 12; @@ -23,3 +24,13 @@ z-index: 1; } +.objects-tray-container { + bottom: 10px; + position: absolute; + width: 100%; + display: -webkit-box; + -webkit-box-orient: horizontal; + -webkit-box-pack: center; + -webkit-box-align: center; + z-index: 2; +} \ No newline at end of file diff --git a/js/stage/binding-view.reel/binding-view.html b/js/stage/binding-view.reel/binding-view.html index e0c42194..91c9e397 100755 --- a/js/stage/binding-view.reel/binding-view.html +++ b/js/stage/binding-view.reel/binding-view.html @@ -27,6 +27,12 @@ "objects": {"<-": "@owner.bindables"} } }, + "objectsTray" : { + "prototype": "js/stage/objects-tray.reel", + "properties": { + "element": {"#": "objects-tray" } + } + }, "hud": { "prototype": "js/stage/binding-view.reel/binding-hud.reel", "properties": { @@ -57,6 +63,10 @@ +
+
+
+ diff --git a/js/stage/stage.reel/stage.css b/js/stage/stage.reel/stage.css index bc20c4f3..2271cd8a 100755 --- a/js/stage/stage.reel/stage.css +++ b/js/stage/stage.reel/stage.css @@ -48,24 +48,6 @@ width:2500px;/*to prevent scrolling of editor container in the middle of the page for short files*/ } -.stage-tray-container { - height: 100%; - position: absolute; - width: 100%; -} - -.objects-tray-container { - bottom: 10px; - position: absolute; - width: 100%; - display: -webkit-box; - -webkit-box-orient: horizontal; - -webkit-box-pack: center; - -webkit-box-align: center; - z-index: 2; -} - - span.CodeMirror-matchhighlight { background: #e9e9e9 } .CodeMirror-focused span.CodeMirror-matchhighlight { background: #e7e4ff; !important } div.CodeMirror span.CodeMirror-matchingbracket {color: #000 !important;background-color: #ffd500;} diff --git a/js/stage/stage.reel/stage.html b/js/stage/stage.reel/stage.html index acab4b1b..397af0b6 100755 --- a/js/stage/stage.reel/stage.html +++ b/js/stage/stage.reel/stage.html @@ -47,12 +47,6 @@ "element": {"#": "bindingView" } } }, - "objectsTray" : { - "prototype": "js/stage/objects-tray.reel", - "properties": { - "element": {"#": "objects-tray" } - } - }, "owner": { "prototype": "js/stage/stage.reel", "properties": { @@ -89,12 +83,6 @@ -
-
-
-
-
-
-- cgit v1.2.3