pull/829/head
Ozzieisaacs 6 years ago
parent 1a7052b287
commit 0facb8fffa

@ -490,19 +490,19 @@ if ( $( 'body.shelf' ).length > 0 ) {
.addClass( 'order-shelf-btn' );
$( '.delete-shelf-btn' ).attr({
'data-toggle-two': 'tooltip',
'title': 'Delete Shelf',
'title': $( '.delete-shelf-btn' ).text(), // 'Delete Shelf'
'data-placement': 'bottom' })
.addClass('delete-btn-tooltip');
$( '.edit-shelf-btn' ).attr({
'data-toggle-two': 'tooltip',
'title': 'Edit Shelf',
'title': $( '.edit-shelf-btn' ).text(), // 'Edit Shelf'
'data-placement': 'bottom' })
.addClass('edit-btn-tooltip');
$( '.order-shelf-btn' ).attr({
'data-toggle-two': 'tooltip',
'title': 'Reorder Shelf',
'title': $( '.order-shelf-btn' ).text(), //'Reorder Shelf'
'data-placement': 'bottom' })
.addClass('order-btn-tooltip');
}
@ -510,32 +510,32 @@ if ( $( 'body.shelf' ).length > 0 ) {
// Rest of Tooltips
$( '.home-btn > a' ).attr({
'data-toggle': 'tooltip',
'title': 'Home',
'title': $(document.body).attr('data-text'), // Home
'data-placement': 'bottom' })
.addClass('home-btn-tooltip');
$( '.plexBack > a' ).attr({
'data-toggle': 'tooltip',
'title': 'Back',
'title': $(document.body).attr('data-textback'), // Back
'data-placement': 'bottom' })
.addClass('back-btn-tooltip');
$( '#top_tasks' ).attr({
'data-toggle': 'tooltip',
'title': $( '#top_tasks' ).text(), //'Tasks',
'title': $( '#top_tasks' ).text(), // 'Tasks'
'data-placement': 'bottom',
'data-viewport': '#main-nav' })
.addClass('tasks-btn-tooltip');
$( '#top_admin' ).attr({
'data-toggle': 'tooltip',
'title': 'Settings',
'title': $( '#top_admin' ).attr('data-text'), // Settings
'data-placement': 'bottom',
'data-viewport': '#main-nav' })
.addClass('admin-btn-tooltip');
$( '.profileDrop' ).attr({
'title': 'Account',
'title': $( '#top_user' ).attr('data-text'), //Account
'data-placement': 'bottom',
'data-toggle-two': 'tooltip',
'data-viewport': '#main-nav' })
@ -543,78 +543,78 @@ $( '.profileDrop' ).attr({
$( '#btn-upload' ).attr({
'data-toggle': 'tooltip',
'title': $( '#btn-upload' ).parent().text() , // 'Upload',
'title': $( '#btn-upload' ).parent().text() , // 'Upload'
'data-placement': 'bottom',
'data-viewport': '#main-nav' })
.addClass('upload-btn-tooltip');
$( '#add-to-shelf' ).attr({
'data-toggle-two': 'tooltip',
'title': $( '#add-to-shelf' ).text() , // 'Add to Shelf',
'title': $( '#add-to-shelf' ).text() , // 'Add to Shelf'
'data-placement': 'bottom',
'data-viewport': '.btn-toolbar' })
.addClass('addtoshelf-btn-tooltip');
$( '#have_read_cb' ).attr({
'data-toggle': 'tooltip',
'title': 'Mark As Read',
'title': $( '#have_read_cb').attr('data-unchecked'),
'data-placement': 'bottom',
'data-viewport': '.btn-toolbar' })
.addClass('readunread-btn-tooltip');
$( '#have_read_cb:checked' ).attr({
'data-toggle': 'tooltip',
'title': 'Mark As Unread',
'title': $( '#have_read_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',
'title': $( 'button#delete' ).text(), //'Delete'
'data-placement': 'bottom',
'data-viewport': '.btn-toolbar' })
.addClass('delete-book-btn-tooltip');
$( '#have_read_cb' ).click(function() {
if ( $( '#have_read_cb:checked' ).length > 0 ) {
$( this ).attr('data-original-title', 'Mark as Unread');
$( this ).attr('data-original-title', $('#have_read_cb').attr('data-checked'));
} else {
$( this).attr('data-original-title', 'Mark as Read');
$( this).attr('data-original-title', $('#have_read_cb').attr('data-unchecked'));
}
});
$( '.btn-group[aria-label="Edit/Delete book"] a' ).attr({
'data-toggle': 'tooltip',
'title': $( '#edit_book' ).text(), // 'Edit',
'title': $( '#edit_book' ).text(), // 'Edit'
'data-placement': 'bottom',
'data-viewport': '.btn-toolbar' })
.addClass('edit-btn-tooltip');
$( '#sendbtn' ).attr({
'data-toggle': 'tooltip',
'title': 'Send to Kindle',
'title': $( '#sendbtn' ).attr('data-text'),
'data-placement': 'bottom',
'data-viewport': '.btn-toolbar' })
.addClass('send-btn-tooltip');
$( '#sendbtn2' ).attr({
'data-toggle-two': 'tooltip',
'title': 'Send to Kindle',
'title': $( '#sendbtn2' ).text(), // 'Send to Kindle',
'data-placement': 'bottom',
'data-viewport': '.btn-toolbar' })
.addClass('send-btn-tooltip');
$( '#read-in-browser' ).attr({
'data-toggle-two': 'tooltip',
'title': 'Read',
'title': $( '#read-in-browser' ).text(),
'data-placement': 'bottom',
'data-viewport': '.btn-toolbar'})
.addClass('send-btn-tooltip');
$( '#btnGroupDrop1' ).attr({
'data-toggle-two': 'tooltip',
'title': 'Download',
'title': $( '#btnGroupDrop1' ).text(),
'data-placement': 'bottom',
'data-viewport': '.btn-toolbar' });

@ -18,7 +18,7 @@
{% if entry.data|length %}
<div class="btn-group" role="group">
{% if entry.data|length < 2 %}
<button type="button" class="btn btn-primary">
<button id="Download" type="button" class="btn btn-primary">
{{_('Download')}} :
</button>
{% for format in entry.data %}
@ -42,7 +42,7 @@
{% endif %}
{% if g.user.kindle_mail and g.user.is_authenticated and kindle_list %}
{% if kindle_list.__len__() == 1 %}
<a href="{{url_for('send_to_kindle', book_id=entry.id, book_format=kindle_list[0]['format'], convert=kindle_list[0]['convert'])}}" id="sendbtn" class="btn btn-primary" role="button"><span class="glyphicon glyphicon-send"></span> {{kindle_list[0]['text']}}</a>
<a href="{{url_for('send_to_kindle', book_id=entry.id, book_format=kindle_list[0]['format'], convert=kindle_list[0]['convert'])}}" id="sendbtn" data-text="{{_('Send to Kindle')}}" class="btn btn-primary" role="button"><span class="glyphicon glyphicon-send"></span> {{kindle_list[0]['text']}}</a>
{% else %}
<div class="btn-group" role="group">
<button id="sendbtn2" type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
@ -182,7 +182,7 @@
<p>
<form id="have_read_form" action="{{ url_for('toggle_read', book_id=entry.id)}}" method="POST">
<label class="block-label">
<input id="have_read_cb" type="checkbox" {% if have_read %}checked{% endif %} >
<input id="have_read_cb" data-checked="{{_('Mark As Unread')}}" data-unchecked="{{_('Mark As Read')}}" type="checkbox" {% if have_read %}checked{% endif %} >
<span>{{_('Read')}}</span>
</label>
</form>

@ -25,7 +25,7 @@
{% block header %}{% endblock %}
</head>
<body class="{{ page }}">
<body class="{{ page }}" data-text="{{_('Home')}}" data-textback="{{_('Back')}}">
<!-- Static navbar -->
<div class="navbar navbar-default navbar-static-top" role="navigation">
<div class="container-fluid">
@ -72,9 +72,9 @@
<li><a id="top_tasks" href="{{url_for('get_tasks_status')}}"><span class="glyphicon glyphicon-tasks"></span><span class="hidden-sm">{{_('Tasks')}}</span></a></li>
{% endif %}
{% if g.user.role_admin() %}
<li><a id="top_admin" href="{{url_for('admin')}}"><span class="glyphicon glyphicon-dashboard"></span><span class="hidden-sm"> {{_('Admin')}}</span></a></li>
<li><a id="top_admin" data-text="{{_('Settings')}}" href="{{url_for('admin')}}"><span class="glyphicon glyphicon-dashboard"></span><span class="hidden-sm">{{_('Admin')}}</span></a></li>
{% endif %}
<li><a id="top_user" href="{{url_for('profile')}}"><span class="glyphicon glyphicon-user"></span><span class="hidden-sm"> {{g.user.nickname}}</span></a></li>
<li><a id="top_user" data-text="{{_('Account')}}" href="{{url_for('profile')}}"><span class="glyphicon glyphicon-user"></span><span class="hidden-sm">{{g.user.nickname}}</span></a></li>
{% if not g.user.is_anonymous %}
<li><a id="logout" href="{{url_for('logout')}}"><span class="glyphicon glyphicon-log-out"></span><span class="hidden-sm">{{_('Logout')}}</span></a></li>
{% endif %}

Loading…
Cancel
Save