|
|
@ -1258,27 +1258,24 @@ define([
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$(currentSize).html(Messages._getKey('trimHistory_currentSize', [UIElements.prettySize(size)]));
|
|
|
|
$(currentSize).html(Messages._getKey('trimHistory_currentSize', [UIElements.prettySize(size)]));
|
|
|
|
$button.click(function () {
|
|
|
|
$button.prop('disabled', '');
|
|
|
|
UI.confirmButton(button, {
|
|
|
|
UI.confirmButton(button, {
|
|
|
|
classes: 'btn-danger'
|
|
|
|
classes: 'btn-danger'
|
|
|
|
}, function (yes) {
|
|
|
|
}, function () {
|
|
|
|
if (!yes) { return; }
|
|
|
|
$button.remove();
|
|
|
|
|
|
|
|
spinner.spin();
|
|
|
|
$button.remove();
|
|
|
|
APP.history.execCommand('TRIM_HISTORY', {
|
|
|
|
spinner.spin();
|
|
|
|
channels: channels
|
|
|
|
APP.history.execCommand('TRIM_HISTORY', {
|
|
|
|
}, function (obj) {
|
|
|
|
channels: channels
|
|
|
|
if (obj && obj.error) {
|
|
|
|
}, function (obj) {
|
|
|
|
var error = h('div.alert.alert-danger', Messages.trimHistory_error);
|
|
|
|
if (obj && obj.error) {
|
|
|
|
$(content).empty().append(error);
|
|
|
|
var error = h('div.alert.alert-danger', Messages.trimHistory_error);
|
|
|
|
return;
|
|
|
|
$(content).empty().append(error);
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
spinner.hide();
|
|
|
|
}
|
|
|
|
redrawTrimHistory(cb, $div);
|
|
|
|
spinner.hide();
|
|
|
|
|
|
|
|
redrawTrimHistory(cb, $div);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}).prop('disabled', '');
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
$div.find('#cp-settings-trim-container').remove();
|
|
|
|
$div.find('#cp-settings-trim-container').remove();
|
|
|
|