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
Léo-Paul Géneau
gitlab-ce
Commits
bbb926f3
Commit
bbb926f3
authored
Jun 20, 2012
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #952 from gitlabhq/remove_link_to_function
Get rid of deprecated link_to_function
parents
6507c108
d5b41831
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
2 deletions
+18
-2
app/assets/javascripts/application.js
app/assets/javascripts/application.js
+8
-0
app/assets/javascripts/merge_requests.js
app/assets/javascripts/merge_requests.js
+4
-0
app/assets/stylesheets/common.scss
app/assets/stylesheets/common.scss
+4
-0
app/views/commits/_text_file.html.haml
app/views/commits/_text_file.html.haml
+1
-1
app/views/merge_requests/_commits.html.haml
app/views/merge_requests/_commits.html.haml
+1
-1
No files found.
app/assets/javascripts/application.js
View file @
bbb926f3
...
...
@@ -53,6 +53,14 @@ $(document).ready(function(){
e
.
preventDefault
();
}
});
/**
* Commit show suppressed diff
*
*/
$
(
"
.supp_diff_link
"
).
bind
(
"
click
"
,
function
()
{
showDiff
(
this
);
});
});
function
focusSearch
()
{
...
...
app/assets/javascripts/merge_requests.js
View file @
bbb926f3
...
...
@@ -34,6 +34,10 @@ var MergeRequest = {
$
(
"
.merge-request-diffs
"
).
show
();
e
.
preventDefault
();
});
$
(
"
.mr_show_all_commits
"
).
bind
(
"
click
"
,
function
()
{
MergeRequest
.
showAllCommits
();
})
},
showState
:
...
...
app/assets/stylesheets/common.scss
View file @
bbb926f3
...
...
@@ -602,3 +602,7 @@ li.note {
min-height
:
42px
;
}
.supp_diff_link
,
.mr_show_all_commits
{
cursor
:pointer
;
}
app/views/commits/_text_file.html.haml
View file @
bbb926f3
-
too_big
=
max_lines
=
diff
.
diff
.
lines
.
count
>
1000
-
if
too_big
=
link_to_function
"Diff suppressed. Click to show"
,
"showDiff(this)"
,
:class
=>
"supp_diff_link"
%a
.supp_diff_link
Diff suppressed. Click to show
%table
{
:class
=>
"#{'hide' if too_big}"
}
-
each_diff_line
(
diff
.
diff
.
lines
.
to_a
,
index
)
do
|
line
,
type
,
line_code
,
line_new
,
line_old
|
...
...
app/views/merge_requests/_commits.html.haml
View file @
bbb926f3
...
...
@@ -9,7 +9,7 @@
%li
.bottom
8 of
#{
@commits
.
count
}
commits displayed.
%strong
=
link_to_function
"Click here to show all"
,
"MergeRequest.showAllCommits()"
%a
.mr_show_all_commits
Click here to show all
%ul
.all_mr_commits.hide.unstyled
-
@commits
.
each
do
|
commit
|
=
render
"commits/commit"
,
:commit
=>
commit
...
...
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