mirror of
https://github.com/janeczku/calibre-web
synced 2025-10-26 21:07:40 +00:00
Merge branch 'master' into Develop
# Conflicts: # cps/kobo_sync_status.py # test/Calibre-Web TestSummary_Linux.html
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
tinymce.addI18n('zh_CN',{
|
||||
tinymce.addI18n('zh_Hans_CN',{
|
||||
"Redo": "\u91cd\u505a",
|
||||
"Undo": "\u64a4\u9500",
|
||||
"Cut": "\u526a\u5207",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
tinymce.addI18n('zh_TW',{
|
||||
tinymce.addI18n('zh_Hant_TW',{
|
||||
"Redo": "\u91cd\u505a",
|
||||
"Undo": "\u64a4\u92b7",
|
||||
"Cut": "\u526a\u4e0b",
|
||||
@@ -416,4 +416,4 @@ tinymce.addI18n('zh_TW',{
|
||||
"Spellcheck": "\u62fc\u5b57\u6aa2\u67e5",
|
||||
"Caption": "\u8868\u683c\u6a19\u984c",
|
||||
"Insert template": "\u63d2\u5165\u6a23\u7248"
|
||||
});
|
||||
});
|
||||
|
||||
@@ -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();
|
||||
});
|
||||
|
||||
@@ -61,11 +61,14 @@ var reader;
|
||||
this.removeBookmark(bookmark);
|
||||
}.bind(this));
|
||||
}
|
||||
|
||||
var csrftoken = $("input[name='csrf_token']").val();
|
||||
|
||||
// Save to database
|
||||
$.ajax(calibre.bookmarkUrl, {
|
||||
method: "post",
|
||||
data: { bookmark: location || "" }
|
||||
data: { bookmark: location || "" },
|
||||
headers: { "X-CSRFToken": csrftoken }
|
||||
}).fail(function (xhr, status, error) {
|
||||
alert(error);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user