forked from ding2/ding_reservation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathding_reservation.js
34 lines (34 loc) · 974 Bytes
/
ding_reservation.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
(function ($) {
Drupal.ding_reservation = {};
Drupal.ding_reservation.delete_confirm = function (event, ready, del_id) {
event.preventDefault();
var id = "";
if(ready) {
id = "reservation-delete-confirm-ready-branch";
}
else {
id = "reservation-delete-confirm-not-ready-branch";
}
$('#' + id).attr('title', Drupal.t("Delete reservation"))
$('#' + id).html('<p>' + Drupal.t("Are you sure you want to remove this reservation?") + '</p>');
dialog_yes = Drupal.t("Yes");
dialog_no = Drupal.t("No");
$('#' + id).dialog({
modal: true,
buttons: [{
text: dialog_yes,
click: function() {
$(this).dialog('close');
$('input[name="delete-' + del_id + '"]').attr("onclick", "").trigger('click');
}
},
{
text: dialog_no,
click: function () {
$(this).dialog('close');
return false;
}
}]
});
}
})(jQuery);