Skip to content

Commit

Permalink
Close playlist edit form on ESC
Browse files Browse the repository at this point in the history
  • Loading branch information
jwheare committed Dec 15, 2009
1 parent a386025 commit a61b48f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion public/playlick.css
Expand Up @@ -367,7 +367,7 @@ form#playlistEditForm p {
line-height: 1.6; line-height: 1.6;
} }
form#playlistEditForm p.submit { form#playlistEditForm p.submit {
margin-top: 10px; margin: 10px 0 0 0;
} }
form#playlistEditForm p.field input { form#playlistEditForm p.field input {
width: 510px; width: 510px;
Expand Down
4 changes: 4 additions & 0 deletions src/js/controllers/playlist.controller.js
Expand Up @@ -260,6 +260,10 @@ Playlist.prototype = {
that.current.image = params.image; that.current.image = params.image;
that.current.copyright = params.copyright; that.current.copyright = params.copyright;
that.current.save(); that.current.save();
}).keydown(function (e) {
if (e.keyCode == 27) {
that.toggleEditForm();
}
}); });
var editSave = $('<p class="submit">') var editSave = $('<p class="submit">')
.append($('<input type="submit">').val('Save')) .append($('<input type="submit">').val('Save'))
Expand Down

0 comments on commit a61b48f

Please sign in to comment.