Highlight bottom bar when focused

// FREEBIE
This commit is contained in:
lilia 2016-03-20 23:15:21 -07:00
parent 8bb8ed8151
commit b094607e0d
3 changed files with 21 additions and 3 deletions

View file

@ -72,6 +72,9 @@
}.bind(this)); }.bind(this));
this.fetchMessages(); this.fetchMessages();
this.$('.send-message').focus(this.focusBottomBar.bind(this));
this.$('.send-message').blur(this.unfocusBottomBar.bind(this));
}, },
events: { events: {
@ -90,7 +93,16 @@
'select .message-list .entry': 'messageDetail', 'select .message-list .entry': 'messageDetail',
'force-resize': 'forceUpdateMessageFieldSize', 'force-resize': 'forceUpdateMessageFieldSize',
'click .choose-file': 'focusMessageField', 'click .choose-file': 'focusMessageField',
'loadMore .message-list': 'fetchMessages' 'loadMore .message-list': 'fetchMessages',
'focus .send-message': 'focusBottomBar',
'blur .send-message': 'unfocusBottomBar'
},
unfocusBottomBar: function() {
this.$('.bottom-bar form').removeClass('active');
},
focusBottomBar: function() {
this.$('.bottom-bar form').addClass('active');
}, },
onOpened: function() { onOpened: function() {

View file

@ -490,10 +490,14 @@
.bottom-bar { .bottom-bar {
$button-width: 36px; $button-width: 36px;
padding: 5px 0; padding: 5px 1px 5px 0;
height: 50px; height: 50px;
background: $grey_l; background: $grey_l;
form.active {
outline: solid 1px $blue;
}
form.send { form.send {
background: #ffffff; background: #ffffff;
} }

View file

@ -1001,9 +1001,11 @@ input.search {
margin-top: 5px; } margin-top: 5px; }
.bottom-bar { .bottom-bar {
padding: 5px 0; padding: 5px 1px 5px 0;
height: 50px; height: 50px;
background: #f3f3f3; } background: #f3f3f3; }
.bottom-bar form.active {
outline: solid 1px #2090ea; }
.bottom-bar form.send { .bottom-bar form.send {
background: #ffffff; } background: #ffffff; }
.bottom-bar button, .bottom-bar input, .bottom-bar textarea { .bottom-bar button, .bottom-bar input, .bottom-bar textarea {