diff --git a/website/source/_ember_templates.html.erb b/website/source/_ember_templates.html.erb
index 5301d08c95fc..33a97ad43b69 100644
--- a/website/source/_ember_templates.html.erb
+++ b/website/source/_ember_templates.html.erb
@@ -6,9 +6,11 @@
diff --git a/website/source/assets/javascripts/app/Sidebar.js b/website/source/assets/javascripts/app/Sidebar.js
index 67239be95b26..986f1bae924f 100644
--- a/website/source/assets/javascripts/app/Sidebar.js
+++ b/website/source/assets/javascripts/app/Sidebar.js
@@ -16,7 +16,7 @@ Sidebar = Base.extend({
this.$sidebarHeader = $('#sidebar .sidebar-header');
this.$toggleButton = $('.navbar-toggle');
- this.sidebarImg = this.$sidebarHeader.css('background-image');
+ this.sidebarImg = this.$sidebarHeader.css('background-image');
this.addEventListeners();
},
diff --git a/website/source/assets/javascripts/demo/controllers/crud.js b/website/source/assets/javascripts/demo/controllers/crud.js
index c7d1c5af61b0..0df00982618d 100644
--- a/website/source/assets/javascripts/demo/controllers/crud.js
+++ b/website/source/assets/javascripts/demo/controllers/crud.js
@@ -1,13 +1,15 @@
Demo.DemoCrudController = Ember.ObjectController.extend({
needs: ['demo'],
+ isLoading: Ember.computed.alias('controllers.demo.isLoading'),
currentText: Ember.computed.alias('controllers.demo.currentText'),
currentLog: Ember.computed.alias('controllers.demo.currentLog'),
logPrefix: Ember.computed.alias('controllers.demo.logPrefix'),
currentMarker: Ember.computed.alias('controllers.demo.currentMarker'),
notCleared: Ember.computed.alias('controllers.demo.notCleared'),
- actions: {
- submitText: function() {
+ sendCommand: function() {
+ // Request
+ Ember.run.later(this, function() {
var command = this.getWithDefault('currentText', '');
var currentLogs = this.get('currentLog').toArray();
@@ -28,6 +30,17 @@ Demo.DemoCrudController = Ember.ObjectController.extend({
default:
console.log("Submitting: ", command);
}
+
+ this.set('isLoading', false);
+ }, 1000);
+ },
+
+ actions: {
+ submitText: function() {
+ this.set('isLoading', true);
+
+ // Send the actual request (fake for now)
+ this.sendCommand();
}
}
});
diff --git a/website/source/assets/javascripts/demo/controllers/demo.js b/website/source/assets/javascripts/demo/controllers/demo.js
index 2b7fda5361a6..da477026e680 100644
--- a/website/source/assets/javascripts/demo/controllers/demo.js
+++ b/website/source/assets/javascripts/demo/controllers/demo.js
@@ -4,10 +4,17 @@ Demo.DemoController = Ember.ObjectController.extend({
logPrefix: "$ ",
cursor: 0,
notCleared: true,
+ isLoading: false,
setFromHistory: function() {
var index = this.get('currentLog.length') + this.get('cursor');
this.set('currentText', this.get('currentLog')[index]);
- }.observes('cursor')
+ }.observes('cursor'),
+
+ actions: {
+ close: function() {
+ this.transitionTo('index');
+ },
+ }
});
diff --git a/website/source/assets/javascripts/demo/views/demo.js b/website/source/assets/javascripts/demo/views/demo.js
index 91f380202daf..f7d9655d1f38 100644
--- a/website/source/assets/javascripts/demo/views/demo.js
+++ b/website/source/assets/javascripts/demo/views/demo.js
@@ -2,7 +2,15 @@ Demo.DemoView = Ember.View.extend({
classNames: ['demo-overlay'],
didInsertElement: function() {
- var element = this.$();
+ var controller = this.get('controller'),
+ overlay = $('.sidebar-overlay'),
+ element = this.$();
+
+ overlay.addClass('active');
+
+ overlay.on('click', function() {
+ controller.transitionTo('index');
+ });
element.hide().fadeIn(300);
@@ -44,6 +52,9 @@ Demo.DemoView = Ember.View.extend({
},
willDestroyElement: function() {
+ // Remove overlay
+ $('.sidebar-overlay').removeClass('active');
+
var element = this.$();
element.fadeOut(400);
@@ -62,8 +73,6 @@ Demo.DemoView = Ember.View.extend({
var cursor = this.get('controller.cursor'),
currentLength = this.get('controller.currentLog.length');
- console.log(ev);
-
switch(ev.keyCode) {
// Down arrow
case 40:
@@ -98,6 +107,16 @@ Demo.DemoView = Ember.View.extend({
}
},
+ deFocus: function() {
+ var element = this.$().find('input.shell');
+
+ // defocus while loading
+ if (this.get('controller.isLoading')) {
+ element.blur()
+ }
+
+ }.observes('controller.isLoading'),
+
submitted: function() {
var element = this.$();
diff --git a/website/source/assets/stylesheets/_demo.scss b/website/source/assets/stylesheets/_demo.scss
index d63c74ecfa67..72ef843c4701 100644
--- a/website/source/assets/stylesheets/_demo.scss
+++ b/website/source/assets/stylesheets/_demo.scss
@@ -32,6 +32,7 @@
font-size: 30px;
@include lato-light();
transition: all 250ms ease-in;
+ cursor: pointer;
&:hover{
text-decoration: none;
diff --git a/website/source/assets/stylesheets/_sidebar.scss b/website/source/assets/stylesheets/_sidebar.scss
index afc540d3ae2c..0398a8a1764f 100644
--- a/website/source/assets/stylesheets/_sidebar.scss
+++ b/website/source/assets/stylesheets/_sidebar.scss
@@ -1,4 +1,4 @@
-
+
// Base variables
// --------------------------------------------------
$screen-tablet: 768px;
@@ -460,7 +460,7 @@ $sidebar-font-weight: 300;
bottom: 0;
opacity: 0;
background: $white;
- z-index: $zindex-sidebar-fixed - 1;
+ z-index: 2;
-webkit-transition: visibility 0 linear .4s,opacity .4s cubic-bezier(.4,0,.2,1);
-moz-transition: visibility 0 linear .4s,opacity .4s cubic-bezier(.4,0,.2,1);
@@ -473,7 +473,7 @@ $sidebar-font-weight: 300;
}
.sidebar-overlay.active {
- opacity: 0.8;
+ opacity: 0.3;
visibility: visible;
-webkit-transition-delay: 0;
-moz-transition-delay: 0;
diff --git a/website/source/assets/stylesheets/_utilities.scss b/website/source/assets/stylesheets/_utilities.scss
index a29cb2efd675..9b4b8ad7d95c 100755
--- a/website/source/assets/stylesheets/_utilities.scss
+++ b/website/source/assets/stylesheets/_utilities.scss
@@ -96,13 +96,13 @@
}
}
-#demo-app.loading .loading-bar{
+#demo-app .loading-bar{
display: block;
- -webkit-animation: shift-rightwards 1s ease-in-out infinite;
- -moz-animation: shift-rightwards 1s ease-in-out infinite;
- -ms-animation: shift-rightwards 1s ease-in-out infinite;
- -o-animation: shift-rightwards 1s ease-in-out infinite;
- animation: shift-rightwards 1s ease-in-out infinite;
+ -webkit-animation: shift-rightwards 2s ease-in-out infinite;
+ -moz-animation: shift-rightwards 2s ease-in-out infinite;
+ -ms-animation: shift-rightwards 2s ease-in-out infinite;
+ -o-animation: shift-rightwards 2s ease-in-out infinite;
+ animation: shift-rightwards 2s ease-in-out infinite;
-webkit-animation-delay: .4s;
-moz-animation-delay: .4s;
-o-animation-delay: .4s;