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
iv
gitlab-ce
Commits
e80ef19b
Commit
e80ef19b
authored
Oct 23, 2014
by
Robert Schilling
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #8114 from cirosantilli/rm-global-avatar-js
Only run avatar chooser Js on pages that need it
parents
e6e5e63c
38670a66
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
11 deletions
+11
-11
app/assets/javascripts/dispatcher.js.coffee
app/assets/javascripts/dispatcher.js.coffee
+2
-0
app/assets/javascripts/group_avatar.js.coffee
app/assets/javascripts/group_avatar.js.coffee
+9
-0
app/assets/javascripts/groups.js.coffee
app/assets/javascripts/groups.js.coffee
+0
-11
No files found.
app/assets/javascripts/dispatcher.js.coffee
View file @
e80ef19b
...
...
@@ -67,6 +67,8 @@ class Dispatcher
new
TeamMembers
()
when
'groups:members'
new
GroupMembers
()
when
'groups:new'
,
'groups:edit'
,
'admin:groups:edit'
new
GroupAvatar
()
when
'projects:tree:show'
new
TreeView
()
shortcut_handler
=
new
ShortcutsNavigation
()
...
...
app/assets/javascripts/group_avatar.js.coffee
0 → 100644
View file @
e80ef19b
class
@
GroupAvatar
constructor
:
->
$
(
'.js-choose-group-avatar-button'
).
bind
"click"
,
->
form
=
$
(
this
).
closest
(
"form"
)
form
.
find
(
".js-group-avatar-input"
).
click
()
$
(
'.js-group-avatar-input'
).
bind
"change"
,
->
form
=
$
(
this
).
closest
(
"form"
)
filename
=
$
(
this
).
val
().
replace
(
/^.*[\\\/]/
,
''
)
form
.
find
(
".js-avatar-filename"
).
text
(
filename
)
app/assets/javascripts/groups.js.coffee
View file @
e80ef19b
...
...
@@ -2,14 +2,3 @@ class @GroupMembers
constructor
:
->
$
(
'li.group_member'
).
bind
'ajax:success'
,
->
$
(
this
).
fadeOut
()
$
->
# avatar
$
(
'.js-choose-group-avatar-button'
).
bind
"click"
,
->
form
=
$
(
this
).
closest
(
"form"
)
form
.
find
(
".js-group-avatar-input"
).
click
()
$
(
'.js-group-avatar-input'
).
bind
"change"
,
->
form
=
$
(
this
).
closest
(
"form"
)
filename
=
$
(
this
).
val
().
replace
(
/^.*[\\\/]/
,
''
)
form
.
find
(
".js-avatar-filename"
).
text
(
filename
)
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