Fix #2265 (add book to shelf on popup for book details)

Updated testresults
This commit is contained in:
Ozzie Isaacs
2022-01-17 17:46:57 +01:00
parent 01090169a7
commit de1bc3f9af
4 changed files with 148 additions and 245 deletions

View File

@@ -40,7 +40,6 @@ from werkzeug.security import generate_password_hash
from markupsafe import escape
from urllib.parse import quote
try:
import unidecode
use_unidecode = True

View File

@@ -20,7 +20,6 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import sys
import datetime
from functools import wraps
@@ -35,8 +34,6 @@ from .pagination import Pagination
from .web import render_read_books
from .usermanagement import load_user_from_request
from flask_babel import gettext as _
from babel import Locale as LC
from babel.core import UnknownLocaleError
opds = Blueprint('opds', __name__)

View File

@@ -61,8 +61,11 @@ $("#archived_cb").on("change", function() {
$("#shelf-actions").on("click", "[data-shelf-action]", function (e) {
e.preventDefault();
$.post(this.href)
$.ajax({
url: this.href,
method:"post",
data: {csrf_token:$("input[name='csrf_token']").val()},
})
.done(function() {
var $this = $(this);
switch ($this.data("shelf-action")) {