mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-18 05:51:26 +02:00
Modify the "change page buttons" in order to operate the links "next" and "previous"
This commit is contained in:
@@ -308,6 +308,7 @@ Webmail.prototype = {
|
||||
}
|
||||
if (response.navbar) {
|
||||
$("#bottom-bar-right").html(response.navbar);
|
||||
$("#pagination-responsive").html(response.navbar);
|
||||
}
|
||||
$("#listing").html(response.listing);
|
||||
$("#listing").css({
|
||||
|
||||
@@ -30,15 +30,6 @@ $(document).ready(function() {
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
{% block pagination_responsive %}
|
||||
<div class="display-less-1198 pull-right">
|
||||
<a href="{{ baseurl }}page={{ page.previous_page_number }}" class="btn btn-lg btn-link glyphicon glyphicon-chevron-left" type="button">
|
||||
</a>
|
||||
<a href="{{ baseurl }}page={{ page.next_page_number }}" class="btn btn-lg btn-link glyphicon glyphicon-chevron-right" type="button">
|
||||
</a>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block fixed_content %}
|
||||
<div class="row">
|
||||
<div id="leftcol" class="col-lg-2 col-md-3 col-ms-3 col-xs-0">
|
||||
|
||||
@@ -6,6 +6,7 @@ Listing.prototype = {
|
||||
constructor: Listing,
|
||||
|
||||
listing_defaults: {
|
||||
presp_container: '#pagination-responsive',
|
||||
pbar_container: '#bottom-bar-right',
|
||||
pbar_id: '#pagination_bar',
|
||||
sortable_selector: '.sortable'
|
||||
@@ -15,6 +16,8 @@ Listing.prototype = {
|
||||
this.options = $.extend({}, this.listing_defaults, options);
|
||||
$(document).on("click", this.options.pbar_container + " a",
|
||||
$.proxy(this.load_page, this));
|
||||
$(document).on("click", this.options.presp_container + " a",
|
||||
$.proxy(this.load_page, this));
|
||||
},
|
||||
|
||||
load_page: function(e) {
|
||||
@@ -26,6 +29,7 @@ Listing.prototype = {
|
||||
update_listing: function(data) {
|
||||
if (data.paginbar) {
|
||||
$(this.options.pbar_container).html(data.paginbar);
|
||||
$(this.options.presp_container).html(data.paginbar);
|
||||
$(this.options.pbar_id).find(".disabled a").click(function(e) {
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
@@ -1,27 +1,40 @@
|
||||
<div id="pagination_bar" class="simplepagination">
|
||||
<ul>
|
||||
<li>
|
||||
<li>
|
||||
{% if page.has_previous %}<a href="{{ baseurl }}page=1">
|
||||
<i class="glyphicon glyphicon-fast-backward"></i></a>{% else %}
|
||||
<i class="glyphicon glyphicon-fast-backward"></i>{% endif %}
|
||||
</li>
|
||||
<li>
|
||||
<li>
|
||||
{% if page.has_previous %}<a href="{{ baseurl }}page={{ page.previous_page_number }}">
|
||||
<i class="glyphicon glyphicon-step-backward icon-white"></i></a>{% else %}
|
||||
<i class="glyphicon glyphicon-step-backward icon-white"></i>{% endif %}
|
||||
<i class="glyphicon glyphicon-step-backward"></i></a>{% else %}
|
||||
<i class="glyphicon glyphicon-step-backward"></i>{% endif %}
|
||||
</li>
|
||||
<li class="disabled navbar-text">
|
||||
{{ page.number }}/{{ page.paginator.num_pages }}
|
||||
</li>
|
||||
<li>
|
||||
{% if page.has_next %}<a href="{{ baseurl }}page={{ page.next_page_number }}">
|
||||
<i class="glyphicon glyphicon-step-forward icon-white"></i></a>{% else %}
|
||||
<i class="glyphicon glyphicon-step-forward icon-white"></i>{% endif %}
|
||||
<i class="glyphicon glyphicon-step-forward"></i></a>{% else %}
|
||||
<i class="glyphicon glyphicon-step-forward"></i>{% endif %}
|
||||
</li>
|
||||
<li>
|
||||
{% if page.has_next %}<a href="{{ baseurl }}page={{ page.paginator.num_pages }}">
|
||||
<i class="glyphicon glyphicon-fast-forward icon-white"></i></a>{% else %}
|
||||
<i class="glyphicon glyphicon-fast-forward icon-white"></i>{% endif %}
|
||||
<i class="glyphicon glyphicon-fast-forward"></i></a>{% else %}
|
||||
<i class="glyphicon glyphicon-fast-forward"></i>{% endif %}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="display-less-1198 pull-right">
|
||||
{% if page.has_previous %}
|
||||
<a href="{{ baseurl }}page={{ page.previous_page_number }}" class="btn btn-lg btn-link glyphicon glyphicon-chevron-left" type="button"></a>
|
||||
{% else %}
|
||||
<a class="btn btn-lg btn-link glyphicon glyphicon-chevron-left" type="button"></a>
|
||||
{% endif %}
|
||||
{% if page.has_next %}
|
||||
<a href="{{ baseurl }}page={{ page.next_page_number }}" class="btn btn-lg btn-link glyphicon glyphicon-chevron-right" type="button"></a>
|
||||
{% else %}
|
||||
<a class="btn btn-lg btn-link glyphicon glyphicon-chevron-right" type="button"></a>
|
||||
{% endif %}
|
||||
</div>
|
||||
Reference in New Issue
Block a user