mirror of
https://github.com/janeczku/calibre-web
synced 2026-09-17 15:21:20 +00:00
Merge remote-tracking branch 'kobo_book_delete' into Develop
# Conflicts: # cps/kobo.py # cps/services/SyncToken.py # cps/templates/book_edit.html # cps/ub.py
This commit is contained in:
@@ -216,6 +216,8 @@ if ( $( 'body.book' ).length > 0 ) {
|
||||
.prependTo( '[aria-label^="Download, send"]' );
|
||||
$( '#have_read_cb' )
|
||||
.after( '<label class="block-label readLbl" for="#have_read_cb"></label>' );
|
||||
$( '#archived_cb' )
|
||||
.after( '<label class="block-label readLbl" for="#archived_cb"></label>' );
|
||||
$( '#shelf-actions' ).prependTo( '[aria-label^="Download, send"]' );
|
||||
|
||||
|
||||
@@ -586,6 +588,20 @@ $( '#have_read_cb:checked' ).attr({
|
||||
'data-viewport': '.btn-toolbar' })
|
||||
.addClass('readunread-btn-tooltip');
|
||||
|
||||
$( '#archived_cb' ).attr({
|
||||
'data-toggle': 'tooltip',
|
||||
'title': $( '#archived_cb').attr('data-unchecked'),
|
||||
'data-placement': 'bottom',
|
||||
'data-viewport': '.btn-toolbar' })
|
||||
.addClass('readunread-btn-tooltip');
|
||||
|
||||
$( '#archived_cb:checked' ).attr({
|
||||
'data-toggle': 'tooltip',
|
||||
'title': $( '#archived_cb').attr('data-checked'),
|
||||
'data-placement': 'bottom',
|
||||
'data-viewport': '.btn-toolbar' })
|
||||
.addClass('readunread-btn-tooltip');
|
||||
|
||||
$( 'button#delete' ).attr({
|
||||
'data-toggle-two': 'tooltip',
|
||||
'title': $( 'button#delete' ).text(), //'Delete'
|
||||
@@ -601,6 +617,14 @@ $( '#have_read_cb' ).click(function() {
|
||||
}
|
||||
});
|
||||
|
||||
$( '#archived_cb' ).click(function() {
|
||||
if ( $( '#archived_cb:checked' ).length > 0 ) {
|
||||
$( this ).attr('data-original-title', $('#archived_cb').attr('data-checked'));
|
||||
} else {
|
||||
$( this).attr('data-original-title', $('#archived_cb').attr('data-unchecked'));
|
||||
}
|
||||
});
|
||||
|
||||
$( '.btn-group[aria-label="Edit/Delete book"] a' ).attr({
|
||||
'data-toggle': 'tooltip',
|
||||
'title': $( '#edit_book' ).text(), // 'Edit'
|
||||
|
||||
@@ -25,6 +25,14 @@ $("#have_read_cb").on("change", function() {
|
||||
$(this).closest("form").submit();
|
||||
});
|
||||
|
||||
$(function() {
|
||||
$("#archived_form").ajaxForm();
|
||||
});
|
||||
|
||||
$("#archived_cb").on("change", function() {
|
||||
$(this).closest("form").submit();
|
||||
});
|
||||
|
||||
(function() {
|
||||
var templates = {
|
||||
add: _.template(
|
||||
|
||||
Reference in New Issue
Block a user