BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
1a05f2f7
Commit
1a05f2f7
authored
Jun 20, 2012
by
randx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Get rid of deprecated link_to_function
parent
6507c108
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
2 deletions
+18
-2
application.js
app/assets/javascripts/application.js
+8
-0
merge_requests.js
app/assets/javascripts/merge_requests.js
+4
-0
common.scss
app/assets/stylesheets/common.scss
+4
-0
_text_file.html.haml
app/views/commits/_text_file.html.haml
+1
-1
_commits.html.haml
app/views/merge_requests/_commits.html.haml
+1
-1
No files found.
app/assets/javascripts/application.js
View file @
1a05f2f7
...
...
@@ -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 @
1a05f2f7
...
...
@@ -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 @
1a05f2f7
...
...
@@ -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 @
1a05f2f7
-
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 @
1a05f2f7
...
...
@@ -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