fix some error
Fix TypeError: 'bool' object is not callable
This commit is contained in:
@@ -85,7 +85,7 @@
|
||||
{{entry.comments[0].text|safe}}
|
||||
{% endif %}
|
||||
|
||||
{% if g.user.is_authenticated() %}
|
||||
{% if g.user.is_authenticated %}
|
||||
<div class="more-stuff">
|
||||
<div class="btn-toolbar" role="toolbar">
|
||||
|
||||
@@ -104,8 +104,6 @@
|
||||
{% if g.user.kindle_mail %}
|
||||
<a href="{{url_for('send_to_kindle', book_id=entry.id)}}" id="sendbtn" class="btn btn-primary" role="button"><span class="glyphicon glyphicon-send"></span> Send to Kindle</a>
|
||||
{% endif %}
|
||||
{% for format in entry.data %}
|
||||
{%if format.format|lower == 'epub' or format.format|lower == 'txt' or format.format|lower == 'pdf' %}
|
||||
<div class="btn-group" role="group">
|
||||
<button id="btnGroupDrop2" type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<span class="glyphicon glyphicon-eye-open"></span>Read in browser
|
||||
@@ -119,11 +117,6 @@
|
||||
{%endfor%}
|
||||
</ul>
|
||||
</div>
|
||||
{% break %}
|
||||
{% endif %}
|
||||
{%endfor%}
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</br>
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
<li><a href="{{url_for('advanced_search')}}"><span class="glyphicon glyphicon-search"></span> Advanced Search</a></li>
|
||||
</ul>
|
||||
<ul class="nav navbar-nav navbar-right" id="main-nav">
|
||||
{% if g.user.is_authenticated() %}
|
||||
{% if g.user.is_authenticated %}
|
||||
{% if g.user.role_upload() or g.user.role_admin()%}
|
||||
{% if g.allow_upload %}
|
||||
<li>
|
||||
@@ -119,7 +119,7 @@
|
||||
<li><a href="{{url_for('category_list')}}"><span class="glyphicon glyphicon-inbox"></span> Categories</a></li>
|
||||
<li><a href="{{url_for('author_list')}}"><span class="glyphicon glyphicon-user"></span> Authors</a></li>
|
||||
|
||||
{% if g.user.is_authenticated() %}
|
||||
{% if g.user.is_authenticated %}
|
||||
<li class="nav-head hidden-xs">Public Shelves</li>
|
||||
{% for shelf in g.public_shelfes %}
|
||||
<li><a href="{{url_for('show_shelf', shelf_id=shelf.id)}}"><span class="glyphicon glyphicon-list"></span> {{shelf.name}}</a></li>
|
||||
|
||||
@@ -97,9 +97,9 @@
|
||||
</head>
|
||||
<body>
|
||||
<div id="main">
|
||||
<div id="prev" class="arrow" onclick="prevPage();">‹</div>
|
||||
<div id="prev" class="arrow" >‹</div>
|
||||
<div id="area"><pre id="content" class="content"></pre></div>
|
||||
<div id="next" class="arrow" onclick="nextPage();">›</div>
|
||||
<div id="next" class="arrow">›</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
@@ -122,9 +122,22 @@
|
||||
nextPage();
|
||||
}
|
||||
});
|
||||
//click
|
||||
$( "#prev" ).click(function() {
|
||||
prevPage();
|
||||
});
|
||||
$( "#next" ).click(function() {
|
||||
nextPage();
|
||||
});
|
||||
//bind mouse
|
||||
$(window).bind('mousewheel', function(event) {
|
||||
if (event.originalEvent.wheelDelta >= 0) {
|
||||
$(window).bind('DOMMouseScroll mousewheel', function(event) {
|
||||
var delta = 0;
|
||||
if (event.originalEvent.wheelDelta) {
|
||||
delta = event.originalEvent.wheelDelta;
|
||||
}else if (event.originalEvent.detail) {
|
||||
delta = event.originalEvent.detail*-1;
|
||||
}
|
||||
if (delta >= 0) {
|
||||
prevPage();
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user