Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
33aea417
Commit
33aea417
authored
Nov 28, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Drop rjs from Infinite scrolling
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
70c2e1d7
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
30 additions
and
21 deletions
+30
-21
app/assets/javascripts/commits.js.coffee
app/assets/javascripts/commits.js.coffee
+8
-6
app/assets/javascripts/pager.js.coffee
app/assets/javascripts/pager.js.coffee
+3
-2
app/controllers/application_controller.rb
app/controllers/application_controller.rb
+14
-0
app/controllers/dashboard_controller.rb
app/controllers/dashboard_controller.rb
+1
-1
app/controllers/groups_controller.rb
app/controllers/groups_controller.rb
+1
-1
app/controllers/projects/commits_controller.rb
app/controllers/projects/commits_controller.rb
+1
-1
app/controllers/projects_controller.rb
app/controllers/projects_controller.rb
+1
-1
app/views/dashboard/show.js.haml
app/views/dashboard/show.js.haml
+0
-2
app/views/events/_events.html.haml
app/views/events/_events.html.haml
+1
-0
app/views/groups/show.js.haml
app/views/groups/show.js.haml
+0
-2
app/views/projects/commits/show.js.haml
app/views/projects/commits/show.js.haml
+0
-3
app/views/projects/show.js.haml
app/views/projects/show.js.haml
+0
-2
No files found.
app/assets/javascripts/commits.js.coffee
View file @
33aea417
...
...
@@ -32,7 +32,9 @@ class CommitsList
url
:
location
.
href
data
:
@
data
complete
:
this
.
hideProgress
dataType
:
"script"
success
:
(
data
)
->
CommitsList
.
append
(
data
.
count
,
data
.
html
)
dataType
:
"json"
@
append
:
(
count
,
html
)
->
$
(
"#commits-list"
).
append
(
html
)
...
...
app/assets/javascripts/pager.js.coffee
View file @
33aea417
...
...
@@ -19,8 +19,9 @@
data
:
"limit="
+
@
limit
+
"&offset="
+
@
offset
complete
:
->
$
(
".loading"
).
hide
()
dataType
:
"script"
success
:
(
data
)
->
Pager
.
append
(
data
.
count
,
data
.
html
)
dataType
:
"json"
append
:
(
count
,
html
)
->
$
(
".content_list"
).
append
html
...
...
app/controllers/application_controller.rb
View file @
33aea417
...
...
@@ -174,4 +174,18 @@ class ApplicationController < ActionController::Base
filters
=
cookies
[
'event_filter'
].
split
(
','
)
if
cookies
[
'event_filter'
].
present?
@event_filter
||=
EventFilter
.
new
(
filters
)
end
# JSON for infinite scroll via Pager object
def
pager_json
(
partial
,
count
)
html
=
render_to_string
(
partial
,
layout:
false
,
formats:
[
:html
]
)
render
json:
{
html:
html
,
count:
count
}
end
end
app/controllers/dashboard_controller.rb
View file @
33aea417
...
...
@@ -22,7 +22,7 @@ class DashboardController < ApplicationController
respond_to
do
|
format
|
format
.
html
format
.
js
format
.
js
on
{
pager_json
(
"events/_events"
,
@events
.
count
)
}
format
.
atom
{
render
layout:
false
}
end
end
...
...
app/controllers/groups_controller.rb
View file @
33aea417
...
...
@@ -38,7 +38,7 @@ class GroupsController < ApplicationController
respond_to
do
|
format
|
format
.
html
format
.
js
format
.
js
on
{
pager_json
(
"events/_events"
,
@events
.
count
)
}
format
.
atom
{
render
layout:
false
}
end
end
...
...
app/controllers/projects/commits_controller.rb
View file @
33aea417
...
...
@@ -16,7 +16,7 @@ class Projects::CommitsController < Projects::ApplicationController
respond_to
do
|
format
|
format
.
html
# index.html.erb
format
.
js
format
.
js
on
{
pager_json
(
"projects/commits/_commits"
,
@commits
.
size
)
}
format
.
atom
{
render
layout:
false
}
end
end
...
...
app/controllers/projects_controller.rb
View file @
33aea417
...
...
@@ -73,7 +73,7 @@ class ProjectsController < ApplicationController
render
:show
,
layout:
user_layout
end
end
format
.
js
format
.
js
on
{
pager_json
(
"events/_events"
,
@events
.
count
)
}
end
end
...
...
app/views/dashboard/show.js.haml
deleted
100644 → 0
View file @
70c2e1d7
:plain
Pager.append(
#{
@events
.
count
}
, "
#{
escape_javascript
(
render
(
@events
))
}
");
app/views/events/_events.html.haml
0 → 100644
View file @
33aea417
=
render
@events
app/views/groups/show.js.haml
deleted
100644 → 0
View file @
70c2e1d7
:plain
Pager.append(
#{
@events
.
count
}
, "
#{
escape_javascript
(
render
(
@events
))
}
");
app/views/projects/commits/show.js.haml
deleted
100644 → 0
View file @
70c2e1d7
:plain
CommitsList.append(
#{
@commits
.
count
}
, "
#{
escape_javascript
(
render
(
'projects/commits/commits'
))
}
");
app/views/projects/show.js.haml
deleted
100644 → 0
View file @
70c2e1d7
:plain
Pager.append(
#{
@events
.
count
}
, "
#{
escape_javascript
(
render
(
@events
))
}
");
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment