Skip to content

Commit

Permalink
focus on username select on new message
Browse files Browse the repository at this point in the history
  • Loading branch information
mstorus committed Apr 12, 2013
1 parent 705beff commit 8c0f6de
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
10 changes: 8 additions & 2 deletions static/js/messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -485,12 +485,18 @@
};

return Message;
}]).controller('MessageFormCtrl', ['$scope', '$element', '$routeParams', 'Message', '$location',
function ($scope, $element, $routeParams, Message, $location) {
}]).controller('MessageFormCtrl', ['$scope', '$element', '$routeParams', 'Message',
'$location', '$timeout',
function ($scope, $element, $routeParams, Message, $location, $timeout) {
$scope.message = new Message();

$element.find('input[name="text"]').focus();

$timeout(function () {
$('input.select2-input').focus();
}, 1, false);


$scope.submitMessage = function () {
if ($scope.upload_in_progress) {
return;
Expand Down
4 changes: 4 additions & 0 deletions static/scss/_ohe.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ html.omega {
}
}

.logged-in-block a {
outline: 0;
}

.hide {
display: none;
}
Expand Down

0 comments on commit 8c0f6de

Please sign in to comment.