mirror of
https://github.com/janeczku/calibre-web
synced 2025-12-07 00:38:06 +00:00
Add button to force full kobo sync
This commit is contained in:
@@ -517,6 +517,7 @@ $(function() {
|
||||
.on("hidden.bs.modal", function() {
|
||||
$(this).find(".modal-body").html("...");
|
||||
$("#config_delete_kobo_token").show();
|
||||
$("#kobo_full_sync").show();
|
||||
});
|
||||
|
||||
$("#config_delete_kobo_token").click(function() {
|
||||
@@ -530,6 +531,7 @@ $(function() {
|
||||
url: getPath() + "/kobo_auth/deleteauthtoken/" + value,
|
||||
});
|
||||
$("#config_delete_kobo_token").hide();
|
||||
$("#kobo_full_sync").hide();
|
||||
}
|
||||
);
|
||||
});
|
||||
@@ -563,6 +565,33 @@ $(function() {
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
$("#kobo_full_sync").click(function() {
|
||||
confirmDialog(
|
||||
"btnfullsync",
|
||||
"GeneralDeleteModal",
|
||||
$(this).data('value'),
|
||||
function(value){
|
||||
path = getPath() + "/ajax/fullsync"
|
||||
$.ajax({
|
||||
method:"get",
|
||||
url: path,
|
||||
timeout: 900,
|
||||
success:function(data) {
|
||||
data.forEach(function(item) {
|
||||
if (!jQuery.isEmptyObject(item)) {
|
||||
$( ".navbar" ).after( '<div class="row-fluid text-center" >' +
|
||||
'<div id="flash_'+item.type+'" class="alert alert-'+item.type+'">'+item.message+'</div>' +
|
||||
'</div>');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
$("#user_submit").click(function() {
|
||||
this.closest("form").submit();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user