summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrandx <dmitriy.zaporozhets@gmail.com>2012-07-21 10:23:05 +0300
committerrandx <dmitriy.zaporozhets@gmail.com>2012-07-21 10:23:05 +0300
commita69fc5dd23bd502fd36892a80eec21a4c53891f8 (patch)
tree15c774c5367e48ac2ffc6ce5916ab6595da10e49
parent860fa1163a5fbdfec2bb01ff2d584351554dee29 (diff)
downloadgitlab-ce-a69fc5dd23bd502fd36892a80eec21a4c53891f8.tar.gz
Endless event loading for dsahboard
-rw-r--r--app/assets/stylesheets/header.scss3
-rw-r--r--app/assets/stylesheets/themes/ui_mars.scss3
-rw-r--r--app/controllers/dashboard_controller.rb3
-rw-r--r--app/views/dashboard/index.html.haml7
-rw-r--r--app/views/dashboard/index.js.haml2
5 files changed, 10 insertions, 8 deletions
diff --git a/app/assets/stylesheets/header.scss b/app/assets/stylesheets/header.scss
index c3a570036bb..07eba39b275 100644
--- a/app/assets/stylesheets/header.scss
+++ b/app/assets/stylesheets/header.scss
@@ -125,9 +125,6 @@ header {
display: block;
cursor: pointer;
img {
- -moz-box-shadow: 0 0 5px #ccc;
- -webkit-box-shadow: 0 0 5px #ccc;
- box-shadow: 0 0 5px #ccc;
border-radius: 4px;
right: 5px;
position: absolute;
diff --git a/app/assets/stylesheets/themes/ui_mars.scss b/app/assets/stylesheets/themes/ui_mars.scss
index 0fea6144431..39dcab1d085 100644
--- a/app/assets/stylesheets/themes/ui_mars.scss
+++ b/app/assets/stylesheets/themes/ui_mars.scss
@@ -70,8 +70,7 @@
}
}
.separator {
- border-color:#444;
- background:#31363E;
+ display:none;
}
}
diff --git a/app/controllers/dashboard_controller.rb b/app/controllers/dashboard_controller.rb
index 14f6ab1c31a..8508e2454d2 100644
--- a/app/controllers/dashboard_controller.rb
+++ b/app/controllers/dashboard_controller.rb
@@ -3,11 +3,12 @@ class DashboardController < ApplicationController
def index
@projects = current_user.projects_with_events.page(params[:page]).per(40)
- @events = Event.recent_for_user(current_user).limit(20)
+ @events = Event.recent_for_user(current_user).limit(20).offset(params[:offset] || 0)
@last_push = current_user.recent_push
respond_to do |format|
format.html
+ format.js
format.atom { render :layout => false }
end
end
diff --git a/app/views/dashboard/index.html.haml b/app/views/dashboard/index.html.haml
index b38544509b2..e1d7781927a 100644
--- a/app/views/dashboard/index.html.haml
+++ b/app/views/dashboard/index.html.haml
@@ -10,9 +10,10 @@
add new key
to your profile
- if @events.any?
- = render @events
+ .content_list= render @events
- else
%h4.nothing_here_message Projects activity will be displayed here
+ .loading.hide
.side
= render "events/event_last_push", :event => @last_push
.projects_box
@@ -54,3 +55,7 @@
New Project ยป
- else
If you will be added to project - it will be displayed here
+
+
+:javascript
+ $(function(){ Pager.init(20); });
diff --git a/app/views/dashboard/index.js.haml b/app/views/dashboard/index.js.haml
index aa038e75928..7e5a148e5ef 100644
--- a/app/views/dashboard/index.js.haml
+++ b/app/views/dashboard/index.js.haml
@@ -1,2 +1,2 @@
:plain
- $(".projects .activities").append("#{escape_javascript(render(@events))}");
+ Pager.append(#{@events.count}, "#{escape_javascript(render(@events))}");