Permalink
Browse files

Close playlist edit form on ESC

  • Loading branch information...
1 parent a386025 commit a61b48f4b4e45714af354f525d03dc7af5f8bd32 @jwheare committed Dec 15, 2009
Showing with 5 additions and 1 deletion.
  1. +1 −1 public/playlick.css
  2. +4 −0 src/js/controllers/playlist.controller.js
View
@@ -367,7 +367,7 @@ form#playlistEditForm p {
line-height: 1.6;
}
form#playlistEditForm p.submit {
- margin-top: 10px;
+ margin: 10px 0 0 0;
}
form#playlistEditForm p.field input {
width: 510px;
@@ -260,6 +260,10 @@ Playlist.prototype = {
that.current.image = params.image;
that.current.copyright = params.copyright;
that.current.save();
+ }).keydown(function (e) {
+ if (e.keyCode == 27) {
+ that.toggleEditForm();
+ }
});
var editSave = $('<p class="submit">')
.append($('<input type="submit">').val('Save'))

0 comments on commit a61b48f

Please sign in to comment.