mirror of
https://github.com/janeczku/calibre-web
synced 2026-10-12 02:51:40 +00:00
Split modal_dialogs
Fix positioning remove from shelf in search and other layout fixes for caliblur
This commit is contained in:
@@ -2262,6 +2262,20 @@ body.advsearch > div.container-fluid > div > div.col-sm-10 > div.col-md-10.col-l
|
||||
padding: 60px
|
||||
}
|
||||
|
||||
.modal .well,
|
||||
.modal-body .well {
|
||||
position: relative;
|
||||
top: auto;
|
||||
left: auto;
|
||||
right: auto;
|
||||
bottom: auto;
|
||||
min-width: 0;
|
||||
max-width: none;
|
||||
max-height: none;
|
||||
margin: 0;
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
.well > form {
|
||||
background: rgba(0, 0, 0, .4);
|
||||
color: hsla(0, 0%, 100%, .45);
|
||||
@@ -5530,6 +5544,12 @@ body.editbook > div.container-fluid > div.row-fluid > div.col-sm-10 > div.col-sm
|
||||
pointer-events: none
|
||||
}
|
||||
|
||||
#modal_kobo_token,
|
||||
#modal_kobo_token .modal-dialog,
|
||||
#modal_kobo_token .modal-content {
|
||||
z-index: 1060 !important;
|
||||
}
|
||||
|
||||
.modal-dialog {
|
||||
margin: 0 auto 60px
|
||||
}
|
||||
|
||||
@@ -48,6 +48,14 @@ input.datepicker:focus + input {color: #555}
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
body.blur .modal-footer .btn,
|
||||
body.blur .modal-body .btn,
|
||||
body.blur #GeneralDeleteModal .modal-body .btn,
|
||||
body.blur #GeneralChangeModal .modal-body .btn,
|
||||
body.blur #deleteModal .modal-footer .btn {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.advsearch-addtoshelf {
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
@@ -70,6 +70,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
{% block modal %}
|
||||
|
||||
@@ -237,8 +237,13 @@
|
||||
<p>
|
||||
<span class="glyphicon glyphicon-link"></span>
|
||||
{% for identifier in entry.identifiers %}
|
||||
<a href="{{ identifier|escape }}" target="_blank" class="btn btn-xs btn-success"
|
||||
role="button">{{ identifier.format_type() }}</a>
|
||||
{% set identifier_link = identifier.__repr__() %}
|
||||
{% if identifier_link != identifier.val %}
|
||||
<a href="{{ identifier_link|escape }}" target="_blank" class="btn btn-xs btn-success"
|
||||
role="button">{{ identifier.format_type() }}</a>
|
||||
{% else %}
|
||||
<span class="btn btn-xs btn-success" role="button">{{ identifier.format_type() }}</span>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
{% from 'modal_dialogs.html' import restrict_modal, delete_book, filechooser_modal, delete_confirm_modal, change_confirm_modal %}
|
||||
{% from theme('modal_dialogs.html') import restrict_modal, delete_book, filechooser_modal, delete_confirm_modal, change_confirm_modal %}
|
||||
{% import 'image.html' as image %}
|
||||
<html lang="{{ current_user.locale }}">
|
||||
<head>
|
||||
|
||||
@@ -25,11 +25,11 @@
|
||||
{% if g.allow_registration %}
|
||||
<a class="btn btn-default" id="register" href="{{url_for('web.register')}}"><span class="glyphicon glyphicon-user"></span> {{_('Register')}}</a>
|
||||
{% endif %}
|
||||
{% if g.allow_anonymous %}
|
||||
<a class="btn btn-default" href="{{url_for('web.index')}}">{{ _('Home') }}</a>
|
||||
{% endif %}
|
||||
{% if config.config_remote_login %}
|
||||
<a href="{{url_for('remotelogin.remote_login')}}" id="remote_login" class="pull-right">{{_('Log in with Magic Link')}}</a>
|
||||
<a class="btn btn-default" id="remote_login" href="{{url_for('remotelogin.remote_login')}}">{{_('Log in with Magic Link')}}</a>
|
||||
{% endif %}
|
||||
{% if g.allow_anonymous %}
|
||||
<a class="btn btn-default" href="{{url_for('web.index')}}">{{ _('Anonymous Browsing') }}</a>
|
||||
{% endif %}
|
||||
{% if config.config_login_type == 2 %}
|
||||
{% if 1 in oauth_check %}
|
||||
|
||||
@@ -0,0 +1,142 @@
|
||||
{% macro restrict_modal() %}
|
||||
<div class="modal fade" id="restrictModal" tabindex="-1" role="dialog" aria-labelledby="restrictModalLabel">
|
||||
<div class="modal-dialog modal-lg" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title hidden" id="h1">{{_('Select Allowed/Denied Tags')}}</h4>
|
||||
<h4 class="modal-title hidden" id="h2">{{_('Select Allowed/Denied Custom Column Values')}}</h4>
|
||||
<h4 class="modal-title hidden" id="h3">{{_('Select Allowed/Denied Tags of User')}}</h4>
|
||||
<h4 class="modal-title hidden" id="h4">{{_('Select Allowed/Denied Custom Column Values of User')}}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<table class="table table-no-bordered" id="restrict-elements-table" data-id-field="id" data-show-header="false" data-editable-mode="inline">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-field="Element" id="Element" data-escape="true" data-editable-type="text" data-editable="true" data-editable-title="{{_('Enter Tag')}}"></th>
|
||||
<th data-field="type" id="type" data-visible="true"></th>
|
||||
<th data-field="id" id="id" data-visible="false"></th>
|
||||
<th data-align="right" data-formatter="RestrictionActions"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
<form id="add_restriction" action="" method="POST">
|
||||
<div class="form-group required">
|
||||
<label for="add_element">{{_('Add View Restriction')}}</label>
|
||||
<input type="text" class="form-control" name="add_element" id="add_element">
|
||||
</div>
|
||||
<div class="form-group required">
|
||||
<input type="button" class="btn btn-default" value="{{_('Allow')}}" name="submit_allow" id="submit_allow" data-dismiss="static">
|
||||
<input type="button" class="btn btn-default" value="{{_('Deny')}}" name="submit_deny" id="submit_restrict" data-dismiss="static">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" id="restrict_close" class="btn btn-default" data-dismiss="modal">{{_('Close')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endmacro %}
|
||||
{% macro delete_book(allow) %}
|
||||
{% if allow %}
|
||||
<div class="modal fade" id="deleteModal" role="dialog" aria-labelledby="metaDeleteLabel">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header bg-danger text-center">
|
||||
<h4 class="modal-title">{{_('Delete Book')}}</h4>
|
||||
</div>
|
||||
<div class="modal-body text-center">
|
||||
<p>
|
||||
<span class="hidden" id="book_format">{{_('This book format will be permanently erased from database')}}</span>
|
||||
<span class="hidden" id="book_complete">{{_('This book will be permanently erased from database and hard disk')}}</span>
|
||||
</p>
|
||||
{% if config.config_kobo_sync %}
|
||||
<p>
|
||||
<span>{{_('Important Kobo Note: deleted books will remain on any paired Kobo device.')}}</span>
|
||||
<span>{{_('Books must first be archived and the device synced before a book can safely be deleted.')}}</span>
|
||||
</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-primary" data-dismiss="modal">{{_('Cancel')}}</button>
|
||||
<input type="button" class="btn btn-danger" value="{{_('Delete')}}" name="delete_confirm" id="delete_confirm" data-dismiss="modal">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
{% macro filechooser_modal() %}
|
||||
<div class="modal fade" id="fileModal" role="dialog" aria-labelledby="metafileLabel">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header bg-info text-center">
|
||||
<span>{{_('Choose File Location')}}</span>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div id="file_table_wrapper">
|
||||
<table id="file_table" class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{_('type')}}</th>
|
||||
<th>{{_('name')}}</th>
|
||||
<th>{{_('size')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="tbody">
|
||||
<tr class="tr-clickable hidden" id="parent" data-type="dir" data-path="..">
|
||||
<td><span class="glyphicon glyphicon-folder-close"></span></td>
|
||||
<td title="{{_('Parent Directory')}}"><span class="parentdir">..</span></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<div class="text-left" id="element_selected"></div>
|
||||
<button type="button" id="file_abort" class="btn btn-default" data-dismiss="modal">{{_('Cancel')}}</button>
|
||||
<input type="button" class="btn btn-primary" data-path="" data-link="" data-folderonly="" data-filefilter="" data-newfile="" value="{{_('Select')}}" name="file_confirm" id="file_confirm" data-dismiss="modal">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro delete_confirm_modal() %}
|
||||
<div id="GeneralDeleteModal" class="modal fade" role="Dialog">
|
||||
<div class="modal-dialog modal-sm">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header bg-danger text-center">
|
||||
<span id="header-GeneralDeleteModal"></span>
|
||||
</div>
|
||||
<div class="modal-body text-center">
|
||||
<span id="text-GeneralDeleteModal"></span>
|
||||
<p></p>
|
||||
<button id="btnConfirmNo-GeneralDeleteModal" type="button" class="btn btn-primary">{{_('Cancel')}}</button>
|
||||
<button id="btnConfirmYes-GeneralDeleteModal" type="button" class="btn btn btn-danger">{{_('Delete')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro change_confirm_modal() %}
|
||||
<div id="GeneralChangeModal" class="modal fade" role="Dialog">
|
||||
<div class="modal-dialog modal-sm">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header bg-info text-center">
|
||||
<span id="header-GeneralChangeModal"></span>
|
||||
</div>
|
||||
<div class="modal-body text-center">
|
||||
<span id="text-GeneralChangeModal"></span>
|
||||
<p></p>
|
||||
<button id="btnConfirmNo-GeneralChangeModal" type="button" class="btn btn-primary">{{_('Cancel')}}</button>
|
||||
<button id="btnConfirmYes-GeneralChangeModal" type="button" class="btn btn btn-default">{{_('Ok')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endmacro %}
|
||||
@@ -27,7 +27,7 @@
|
||||
{%endfor%}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="btn-group" role="group" aria-label="Remove from shelves">
|
||||
<div class="btn-group" role="group" aria-label="Remove from shelves" style="margin-right: 5px;">
|
||||
<button id="remove-from-shelf" type="button" class="btn btn-primary btn-sm dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<span class="glyphicon glyphicon-list"></span> {{_('Remove from shelf')}}
|
||||
<span class="caret"></span>
|
||||
|
||||
@@ -64,8 +64,8 @@
|
||||
{% if kobo_support and not new_user %}
|
||||
<label>{{ _('Kobo Sync Token')}}</label>
|
||||
<div class="form-group col">
|
||||
<a class="btn btn-default" id="config_create_kobo_token" data-toggle="modal" data-target="#modal_kobo_token" data-remote="false" href="{{ url_for('kobo_auth.generate_auth_token', user_id=content.id) }}">{{_('Create/View')}}</a>
|
||||
<div class="btn btn-danger" id="config_delete_kobo_token" data-value="{{ content.id }}" data-remote="false" {% if not content.remote_auth_token.first() %} style="display: none;" {% endif %}>{{_('Delete')}}</div>
|
||||
<a class="btn btn-default" id="config_create_kobo_token" style="margin-bottom: 10px;" data-toggle="modal" data-target="#modal_kobo_token" data-remote="false" href="{{ url_for('kobo_auth.generate_auth_token', user_id=content.id) }}">{{_('Create/View')}}</a>
|
||||
<div class="btn btn-danger" id="config_delete_kobo_token" style="margin-bottom: 10px;{% if not content.remote_auth_token.first() %} display: none;{% endif %}" data-value="{{ content.id }}" data-remote="false">{{_('Delete')}}</div>
|
||||
</div>
|
||||
<div class="form-group col">
|
||||
<div class="btn btn-default" id="kobo_full_sync" data-value="{% if current_user.role_admin() %}{{ content.id }}{% else %}0{% endif %}" {% if not content.remote_auth_token.first() %} style="display: none;" {% endif %}>{{_('Force full kobo sync')}}</div>
|
||||
|
||||
@@ -172,8 +172,13 @@
|
||||
<p>
|
||||
<span class="glyphicon glyphicon-link"></span>
|
||||
{% for identifier in entry.identifiers %}
|
||||
<a href="{{ identifier|escape }}" target="_blank" class="btn btn-xs btn-success"
|
||||
role="button">{{ identifier.format_type() }}</a>
|
||||
{% set identifier_link = identifier.__repr__() %}
|
||||
{% if identifier_link != identifier.val %}
|
||||
<a href="{{ identifier_link|escape }}" target="_blank" class="btn btn-xs btn-success"
|
||||
role="button">{{ identifier.format_type() }}</a>
|
||||
{% else %}
|
||||
<span class="btn btn-xs btn-success" role="button">{{ identifier.format_type() }}</span>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
{% from 'modal_dialogs.html' import restrict_modal, delete_book, filechooser_modal, delete_confirm_modal, change_confirm_modal %}
|
||||
{% from theme('modal_dialogs.html') import restrict_modal, delete_book, filechooser_modal, delete_confirm_modal, change_confirm_modal %}
|
||||
{% import 'image.html' as image %}
|
||||
<html lang="{{ current_user.locale }}">
|
||||
<head>
|
||||
|
||||
Reference in New Issue
Block a user