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
7f58faab
Commit
7f58faab
authored
Jan 22, 2017
by
Stan Hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge branch 'fix-upload-group-avatar' into 'master'
Button by itself will submit forms. Button type button willn't Closes #26999 See merge request !8694
parent
09404b07
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
group_avatar.js
app/assets/javascripts/group_avatar.js
+2
-2
_choose_group_avatar_button.html.haml
app/views/shared/_choose_group_avatar_button.html.haml
+1
-1
No files found.
app/assets/javascripts/group_avatar.js
View file @
7f58faab
...
@@ -2,12 +2,12 @@
...
@@ -2,12 +2,12 @@
(
function
()
{
(
function
()
{
this
.
GroupAvatar
=
(
function
()
{
this
.
GroupAvatar
=
(
function
()
{
function
GroupAvatar
()
{
function
GroupAvatar
()
{
$
(
'.js-choose-group-avatar-button'
).
bind
(
"click"
,
function
()
{
$
(
'.js-choose-group-avatar-button'
).
on
(
"click"
,
function
()
{
var
form
;
var
form
;
form
=
$
(
this
).
closest
(
"form"
);
form
=
$
(
this
).
closest
(
"form"
);
return
form
.
find
(
".js-group-avatar-input"
).
click
();
return
form
.
find
(
".js-group-avatar-input"
).
click
();
});
});
$
(
'.js-group-avatar-input'
).
bind
(
"change"
,
function
()
{
$
(
'.js-group-avatar-input'
).
on
(
"change"
,
function
()
{
var
filename
,
form
;
var
filename
,
form
;
form
=
$
(
this
).
closest
(
"form"
);
form
=
$
(
this
).
closest
(
"form"
);
filename
=
$
(
this
).
val
().
replace
(
/^.*
[\\\/]
/
,
''
);
filename
=
$
(
this
).
val
().
replace
(
/^.*
[\\\/]
/
,
''
);
...
...
app/views/shared/_choose_group_avatar_button.html.haml
View file @
7f58faab
%button
.choose-btn.btn.btn-sm.js-choose-group-avatar-button
%button
.choose-btn.btn.btn-sm.js-choose-group-avatar-button
{
type:
'button'
}
%i
.fa.fa-paperclip
%i
.fa.fa-paperclip
%span
Choose File ...
%span
Choose File ...
...
...
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