Speedup dashboard via loading events with ajax
This commit is contained in:
parent
6c777ff823
commit
8d8c161a7f
4 changed files with 14 additions and 4 deletions
|
@ -4,9 +4,16 @@ var Pager = {
|
|||
disable:false,
|
||||
|
||||
init:
|
||||
function(limit) {
|
||||
function(limit, preload) {
|
||||
this.limit=limit;
|
||||
this.offset=limit;
|
||||
|
||||
if(preload) {
|
||||
this.offset = 0;
|
||||
this.getOld();
|
||||
} else {
|
||||
this.offset = limit;
|
||||
}
|
||||
|
||||
this.initLoadMore();
|
||||
},
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
= event_filter_link EventFilter.team, 'Team'
|
||||
|
||||
- if @events.any?
|
||||
.content_list= render @events
|
||||
.content_list
|
||||
- else
|
||||
%p.nothing_here_message Projects activity will be displayed here
|
||||
.loading.hide
|
||||
|
|
|
@ -8,4 +8,4 @@
|
|||
- else
|
||||
= render "zero_authorized_projects"
|
||||
:javascript
|
||||
$(function(){ Pager.init(20); });
|
||||
$(function(){ Pager.init(20, true); });
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue