Skip to content

Commit

Permalink
Fix #2265 (add book to shelf on popup for book details)
Browse files Browse the repository at this point in the history
Updated testresults
  • Loading branch information
OzzieIsaacs committed Jan 17, 2022
1 parent 0109016 commit de1bc3f
Show file tree
Hide file tree
Showing 4 changed files with 147 additions and 244 deletions.
1 change: 0 additions & 1 deletion cps/helper.py
Expand Up @@ -40,7 +40,6 @@
from markupsafe import escape
from urllib.parse import quote


try:
import unidecode
use_unidecode = True
Expand Down
3 changes: 0 additions & 3 deletions cps/opds.py
Expand Up @@ -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

Expand All @@ -35,8 +34,6 @@
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__)

Expand Down
7 changes: 5 additions & 2 deletions cps/static/js/details.js
Expand Up @@ -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")) {
Expand Down

0 comments on commit de1bc3f

Please sign in to comment.