Browse files

Focus the playlist name field when a user is creating a new playlist …

…and also fixed a bug with canceling and recreating a playlist.
  • Loading branch information...
1 parent 2ed6224 commit be8ce570efe6091f36c1fea5cff782ebeeb2b56e @cjstewart88 committed Apr 19, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 app/assets/javascripts/main.js
View
4 app/assets/javascripts/main.js
@@ -724,13 +724,13 @@ $(document).ready(function () {
}
$("#create-new-playlist-button").val('Create!');
- $("#new-playlist-name").toggle();
+ $("#new-playlist-name").toggle().focus();
$("#cancel-create-new-playlist-button").toggle();
});
$('#cancel-create-new-playlist-button').click(function () {
$("#create-new-playlist-button").val('Create New Playlist');
- $("#new-playlist-name").toggle();
+ $("#new-playlist-name").val('').toggle();
$("#cancel-create-new-playlist-button").toggle();
});

0 comments on commit be8ce57

Please sign in to comment.