Confirm button in the support when closing or removing a ticket

pull/1/head
yflory 5 years ago
parent c9a0eef5f1
commit bd21953861

@ -52,6 +52,7 @@
} }
} }
.cp-support-list-actions { .cp-support-list-actions {
display: flex;
order: 3; order: 3;
.cp-support-hide { .cp-support-hide {
display: none; display: none;

@ -152,6 +152,7 @@ define([
actions actions
])); ]));
/*
$(close).click(function () { $(close).click(function () {
send(ctx, content.id, 'CLOSE', {}, content.sender); send(ctx, content.id, 'CLOSE', {}, content.sender);
}); });
@ -160,6 +161,20 @@ define([
if (typeof(onHide) !== "function") { return; } if (typeof(onHide) !== "function") { return; }
onHide(); onHide();
}); });
*/
UI.confirmButton(close, {
classes: 'btn-danger'
}, function() {
send(ctx, content.id, 'CLOSE', {}, content.sender);
$(close).hide();
});
UI.confirmButton(hide, {
classes: 'btn-danger'
}, function() {
if (typeof(onHide) !== "function") { return; }
onHide();
});
$(answer).click(function () { $(answer).click(function () {
$ticket.find('.cp-support-form-container').remove(); $ticket.find('.cp-support-form-container').remove();

Loading…
Cancel
Save