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
0
Merge Requests
0
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
Jérome Perrin
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
...
@@ -32,7 +32,9 @@ class CommitsList
url
:
location
.
href
url
:
location
.
href
data
:
@
data
data
:
@
data
complete
:
this
.
hideProgress
complete
:
this
.
hideProgress
dataType
:
"script"
success
:
(
data
)
->
CommitsList
.
append
(
data
.
count
,
data
.
html
)
dataType
:
"json"
@
append
:
(
count
,
html
)
->
@
append
:
(
count
,
html
)
->
$
(
"#commits-list"
).
append
(
html
)
$
(
"#commits-list"
).
append
(
html
)
...
...
app/assets/javascripts/pager.js.coffee
View file @
33aea417
...
@@ -19,8 +19,9 @@
...
@@ -19,8 +19,9 @@
data
:
"limit="
+
@
limit
+
"&offset="
+
@
offset
data
:
"limit="
+
@
limit
+
"&offset="
+
@
offset
complete
:
->
complete
:
->
$
(
".loading"
).
hide
()
$
(
".loading"
).
hide
()
success
:
(
data
)
->
dataType
:
"script"
Pager
.
append
(
data
.
count
,
data
.
html
)
dataType
:
"json"
append
:
(
count
,
html
)
->
append
:
(
count
,
html
)
->
$
(
".content_list"
).
append
html
$
(
".content_list"
).
append
html
...
...
app/controllers/application_controller.rb
View file @
33aea417
...
@@ -174,4 +174,18 @@ class ApplicationController < ActionController::Base
...
@@ -174,4 +174,18 @@ class ApplicationController < ActionController::Base
filters
=
cookies
[
'event_filter'
].
split
(
','
)
if
cookies
[
'event_filter'
].
present?
filters
=
cookies
[
'event_filter'
].
split
(
','
)
if
cookies
[
'event_filter'
].
present?
@event_filter
||=
EventFilter
.
new
(
filters
)
@event_filter
||=
EventFilter
.
new
(
filters
)
end
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
end
app/controllers/dashboard_controller.rb
View file @
33aea417
...
@@ -22,7 +22,7 @@ class DashboardController < ApplicationController
...
@@ -22,7 +22,7 @@ class DashboardController < ApplicationController
respond_to
do
|
format
|
respond_to
do
|
format
|
format
.
html
format
.
html
format
.
js
format
.
js
on
{
pager_json
(
"events/_events"
,
@events
.
count
)
}
format
.
atom
{
render
layout:
false
}
format
.
atom
{
render
layout:
false
}
end
end
end
end
...
...
app/controllers/groups_controller.rb
View file @
33aea417
...
@@ -38,7 +38,7 @@ class GroupsController < ApplicationController
...
@@ -38,7 +38,7 @@ class GroupsController < ApplicationController
respond_to
do
|
format
|
respond_to
do
|
format
|
format
.
html
format
.
html
format
.
js
format
.
js
on
{
pager_json
(
"events/_events"
,
@events
.
count
)
}
format
.
atom
{
render
layout:
false
}
format
.
atom
{
render
layout:
false
}
end
end
end
end
...
...
app/controllers/projects/commits_controller.rb
View file @
33aea417
...
@@ -16,7 +16,7 @@ class Projects::CommitsController < Projects::ApplicationController
...
@@ -16,7 +16,7 @@ class Projects::CommitsController < Projects::ApplicationController
respond_to
do
|
format
|
respond_to
do
|
format
|
format
.
html
# index.html.erb
format
.
html
# index.html.erb
format
.
js
format
.
js
on
{
pager_json
(
"projects/commits/_commits"
,
@commits
.
size
)
}
format
.
atom
{
render
layout:
false
}
format
.
atom
{
render
layout:
false
}
end
end
end
end
...
...
app/controllers/projects_controller.rb
View file @
33aea417
...
@@ -73,7 +73,7 @@ class ProjectsController < ApplicationController
...
@@ -73,7 +73,7 @@ class ProjectsController < ApplicationController
render
:show
,
layout:
user_layout
render
:show
,
layout:
user_layout
end
end
end
end
format
.
js
format
.
js
on
{
pager_json
(
"events/_events"
,
@events
.
count
)
}
end
end
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