diff --git a/cps/helper.py b/cps/helper.py index 85d71122..9871af0c 100644 --- a/cps/helper.py +++ b/cps/helper.py @@ -172,10 +172,6 @@ def check_send_to_ereader(entry): book_formats.append({'format': 'Epub', 'convert': 0, 'text': _('Send %(format)s to eReader', format='Epub')}) - if 'MOBI' in formats: - book_formats.append({'format': 'Mobi', - 'convert': 0, - 'text': _('Send %(format)s to eReader', format='Mobi')}) if 'PDF' in formats: book_formats.append({'format': 'Pdf', 'convert': 0, @@ -205,8 +201,8 @@ def check_read_formats(entry): # Files are processed in the following order/priority: -# 1: If Mobi file is existing, it's directly send to eReader email, -# 2: If Epub file is existing, it's converted and send to eReader email, +# 1: If epub file is existing, it's directly send to eReader email, +# 2: If mobi file is existing, it's converted and send to eReader email, # 3: If Pdf file is existing, it's directly send to eReader email def send_mail(book_id, book_format, convert, ereader_mail, calibrepath, user_id): """Send email with attachments""" @@ -214,7 +210,7 @@ def send_mail(book_id, book_format, convert, ereader_mail, calibrepath, user_id) if convert == 1: # returns None if success, otherwise errormessage - return convert_book_format(book_id, calibrepath, 'epub', book_format.lower(), user_id, ereader_mail) + return convert_book_format(book_id, calibrepath, 'mobi', book_format.lower(), user_id, ereader_mail) if convert == 2: # returns None if success, otherwise errormessage return convert_book_format(book_id, calibrepath, 'azw3', book_format.lower(), user_id, ereader_mail) diff --git a/cps/static/js/caliBlur.js b/cps/static/js/caliBlur.js index ec394d0b..62d34e40 100755 --- a/cps/static/js/caliBlur.js +++ b/cps/static/js/caliBlur.js @@ -314,9 +314,6 @@ $(document).mouseup(function (e) { }); }); -// Split path name to array and remove blanks -url = window.location.pathname - // Move create shelf $("#nav_createshelf").prependTo(".your-shelves"); @@ -360,31 +357,6 @@ $(document).on("click", ".dropdown-toggle", function () { }); }); -// Fade out content on page unload -// delegate all clicks on "a" tag (links) -/*$(document).on("click", "a:not(.btn-toolbar a, a[href*='shelf/remove'], .identifiers a, .bookinfo , .btn-group > a, #add-to-shelves a, #book-list a, .stat.blur a )", function () { - - // get the href attribute - var newUrl = $(this).attr("href"); - - // veryfy if the new url exists or is a hash - if (!newUrl || newUrl[0] === "#") { - // set that hash - location.hash = newUrl; - return; - } - - now, fadeout the html (whole page) - $( '.blur-wrapper' ).fadeOut(250); - $(".row-fluid .col-sm-10").fadeOut(500,function () { - // when the animation is complete, set the new location - location = newUrl; - }); - - // prevent the default browser behavior. - return false; -});*/ - // Collapse long text into read-more $("div.comments").readmore({ collapsedHeight: 134, @@ -447,6 +419,8 @@ if ($("body.author").length > 0) { } } +// Split path name to array and remove blanks +url = window.location.pathname // Ereader Page - add class to iframe body on ereader page after it loads. backurl = "../../book/" + url[2] $("body.epub #title-controls") diff --git a/cps/static/js/details.js b/cps/static/js/details.js index f0259f8c..24b98437 100644 --- a/cps/static/js/details.js +++ b/cps/static/js/details.js @@ -1,5 +1,5 @@ /* This file is part of the Calibre-Web (https://github.com/janeczku/calibre-web) - * Copyright (C) 2018 jkrehm + * Copyright (C) 2018-2023 jkrehm, OzzieIsaacs * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -17,6 +17,35 @@ /* global _ */ +function handleResponse (data) { + $(".row-fluid.text-center").remove(); + $("#flash_danger").remove(); + $("#flash_success").remove(); + if (!jQuery.isEmptyObject(data)) { + if($("#bookDetailsModal").is(":visible")) { + data.forEach(function (item) { + $(".modal-header").after('
{{_('Description:')}}
- {{entry.comments[0].text|safe}} -