Improved pagination.
This commit is contained in:
parent
08d3d907f4
commit
2baa0dc10b
3 changed files with 34 additions and 18 deletions
|
@ -67,7 +67,7 @@ class App.DashboardTicket extends App.Controller
|
||||||
)
|
)
|
||||||
html = $(html)
|
html = $(html)
|
||||||
html.find('li').removeClass('active')
|
html.find('li').removeClass('active')
|
||||||
html.find("[data-id=\"#{@start_page}\"]").parents('li').addClass('active')
|
html.find(".page [data-id=\"#{@start_page}\"]").parents('li').addClass('active')
|
||||||
|
|
||||||
|
|
||||||
shown_all_attributes = @ticketTableAttributes( App.Overview.find(@overview.id).view.d.overview )
|
shown_all_attributes = @ticketTableAttributes( App.Overview.find(@overview.id).view.d.overview )
|
||||||
|
|
|
@ -1,22 +1,35 @@
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="span9">
|
<div class="span9">
|
||||||
<h2><%= @overview.meta.name %> <small><a href="#" data-type="settings" class="icon-edit"></a>
|
<div class="row">
|
||||||
</small></h2>
|
<div class="span4">
|
||||||
|
<h2><%= @overview.meta.name %> <small><a href="#" data-type="settings" class="icon-edit"></a></small></h2>
|
||||||
|
</div>
|
||||||
|
<div class="span5">
|
||||||
<div class="pagination">
|
<div class="pagination">
|
||||||
<ul>
|
<ul>
|
||||||
<% if @start_page != 1: %>
|
|
||||||
<li><a href="#" data-id="<%= @start_page - 1 %>" data-type="page">«</a></li>
|
|
||||||
<% end %>
|
|
||||||
<% for item in [1..@pages_total]: %>
|
|
||||||
<li>
|
<li>
|
||||||
|
<% if @start_page != 1: %>
|
||||||
|
<a href="#" data-id="<%= @start_page - 1 %>" data-type="page">«</a>
|
||||||
|
<% else: %>
|
||||||
|
<a href="#" data-id="<%= @start_page %>" data-type="page">«</a>
|
||||||
|
<% end %>
|
||||||
|
</li>
|
||||||
|
<% for item in [1..@pages_total]: %>
|
||||||
|
<li class="page">
|
||||||
<a href="#" data-id="<%= item %>" data-type="page"><%= item %></a>
|
<a href="#" data-id="<%= item %>" data-type="page"><%= item %></a>
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<li>
|
||||||
<% if @start_page != @pages_total: %>
|
<% if @start_page != @pages_total: %>
|
||||||
<li><a href="#" data-id="<%= @start_page + 1 %>" data-type="page">»</a></li>
|
<a href="#" data-id="<%= @start_page + 1 %>" data-type="page">»</a>
|
||||||
|
<% else: %>
|
||||||
|
<a href="#" data-id="<%= @start_page %>" data-type="page">»</a>
|
||||||
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="table-overview"></div>
|
<div class="table-overview"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
|
@ -24,7 +24,10 @@ body {
|
||||||
}
|
}
|
||||||
/* improved spacing */
|
/* improved spacing */
|
||||||
.pagination {
|
.pagination {
|
||||||
margin: 0px 0px;
|
padding-top: 2px;
|
||||||
|
margin: 0px 4px;
|
||||||
|
height: 30px;
|
||||||
|
float: right;
|
||||||
}
|
}
|
||||||
.pagination a {
|
.pagination a {
|
||||||
padding: 0px 10px;
|
padding: 0px 10px;
|
||||||
|
|
Loading…
Reference in a new issue