Correctly move tickets after closing them

pull/1/head
yflory 4 years ago
parent 7e1c7c481e
commit 9f02df0b31

@ -89,10 +89,6 @@
.cp-support-list-actions {
margin: 10px 0px 10px 2px;
.cp-support-close {
order: 20;
margin-left: auto !important;
}
}
.cp-support-list-ticket {
@ -119,6 +115,12 @@
}
.cp-support-list-ticket:not(.cp-support-list-closed) {
.cp-support-list-actions {
.cp-button-confirm, .cp-support-close {
order: 20;
margin-left: auto !important;
}
}
.cp-support-list-message {
&:last-child:not(.cp-support-fromadmin) {
color: @colortheme_cp-red;

@ -767,6 +767,7 @@ define([
if (!$ticket.length) { return; }
$ticket.addClass('cp-support-list-closed');
$ticket.append(APP.support.makeCloseMessage(content, hash));
reorder();
return;
}
if (msg.type !== 'TICKET') { return; }
@ -787,7 +788,12 @@ define([
}));
});
}).nThen(function () {
if (!error) { return void $ticket.remove(); }
if (!error) {
$ticket.remove();
delete hashesById[id];
reorder();
return;
}
// if deletion failed then reactivate the button and warn
hideButton.removeAttribute('disabled');
// and show a generic error message

Loading…
Cancel
Save