Permalink
Browse files

BK-693 It is not possible to enable button in chapter deletion dialog…

… after dialog is closed for the first time
  • Loading branch information...
1 parent a63b579 commit 213ae435f6d63478c3d9512721911f46ec9bba7a @aerkalov aerkalov committed May 5, 2013
Showing with 5 additions and 5 deletions.
  1. +5 −5 lib/booki/site_static/js/editor.js
@@ -896,18 +896,18 @@ $(function() {
disp.dialog({modal: true,
width: 450,
- open: function(event, ui) {
+ create: function() {
var $dialog = $(this);
- $("#remove_chapter_button").button("disable");
+ $(".remove_chapter_button").button("disable");
$("INPUT[name=agree]", $dialog).change(function() {
var $elem = $(this);
if($elem.is(":checked")) {
- $("#remove_chapter_button").button("enable");
+ $(".remove_chapter_button").button("enable");
} else {
- $("#remove_chapter_button").button("disable");
+ $(".remove_chapter_button").button("disable");
}
});
},
@@ -918,7 +918,7 @@ $(function() {
},
},
{text: $.booki._('remove_chapter', 'Delete chapter'),
- id: 'remove_chapter_button',
+ class: 'remove_chapter_button',
disabled: true,
click: function() {
var $dialog = $(this);

0 comments on commit 213ae43

Please sign in to comment.