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
Boxiang Sun
gitlab-ce
Commits
fffc1317
Commit
fffc1317
authored
Feb 23, 2018
by
Constance Okoghenun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed profile webpack bundle tag
parent
8c310424
Changes
19
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
87 additions
and
108 deletions
+87
-108
app/assets/javascripts/dispatcher.js
app/assets/javascripts/dispatcher.js
+0
-5
app/assets/javascripts/pages/profiles/index.js
app/assets/javascripts/pages/profiles/index.js
+19
-0
app/assets/javascripts/pages/profiles/index/index.js
app/assets/javascripts/pages/profiles/index/index.js
+2
-2
app/assets/javascripts/profile/profile.js
app/assets/javascripts/profile/profile.js
+66
-84
app/assets/javascripts/profile/profile_bundle.js
app/assets/javascripts/profile/profile_bundle.js
+0
-2
app/views/profiles/_head.html.haml
app/views/profiles/_head.html.haml
+0
-2
app/views/profiles/accounts/show.html.haml
app/views/profiles/accounts/show.html.haml
+0
-1
app/views/profiles/audit_log.html.haml
app/views/profiles/audit_log.html.haml
+0
-1
app/views/profiles/chat_names/index.html.haml
app/views/profiles/chat_names/index.html.haml
+0
-1
app/views/profiles/emails/index.html.haml
app/views/profiles/emails/index.html.haml
+0
-1
app/views/profiles/gpg_keys/index.html.haml
app/views/profiles/gpg_keys/index.html.haml
+0
-1
app/views/profiles/keys/index.html.haml
app/views/profiles/keys/index.html.haml
+0
-1
app/views/profiles/keys/show.html.haml
app/views/profiles/keys/show.html.haml
+0
-1
app/views/profiles/notifications/show.html.haml
app/views/profiles/notifications/show.html.haml
+0
-1
app/views/profiles/personal_access_tokens/index.html.haml
app/views/profiles/personal_access_tokens/index.html.haml
+0
-1
app/views/profiles/preferences/show.html.haml
app/views/profiles/preferences/show.html.haml
+0
-1
app/views/profiles/show.html.haml
app/views/profiles/show.html.haml
+0
-1
app/views/profiles/two_factor_auths/show.html.haml
app/views/profiles/two_factor_auths/show.html.haml
+0
-1
config/webpack.config.js
config/webpack.config.js
+0
-1
No files found.
app/assets/javascripts/dispatcher.js
View file @
fffc1317
...
@@ -114,11 +114,6 @@ var Dispatcher;
...
@@ -114,11 +114,6 @@ var Dispatcher;
break
;
break
;
}
}
break
;
break
;
case
'
profiles
'
:
import
(
'
./pages/profiles/index
'
)
.
then
(
callDefault
)
.
catch
(
fail
);
break
;
case
'
projects
'
:
case
'
projects
'
:
import
(
'
./pages/projects
'
)
import
(
'
./pages/projects
'
)
.
then
(
callDefault
)
.
then
(
callDefault
)
...
...
app/assets/javascripts/pages/profiles/index.js
0 → 100644
View file @
fffc1317
import
'
~/profile/gl_crop
'
;
import
Profile
from
'
~/profile/profile
'
;
import
{
getPagePath
}
from
'
~/lib/utils/common_utils
'
;
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
{
$
(
document
).
on
(
'
input.ssh_key
'
,
'
#key_key
'
,
()
=>
{
const
$title
=
$
(
'
#key_title
'
);
const
comment
=
$
(
this
).
val
().
match
(
/^
\S
+
\S
+
(
.+
)\n?
$/
);
// Extract the SSH Key title from its comment
if
(
comment
&&
comment
.
length
>
1
)
{
$title
.
val
(
comment
[
1
]).
change
();
}
});
if
(
getPagePath
()
===
'
profiles
'
)
{
new
Profile
();
// eslint-disable-line no-new
}
});
app/assets/javascripts/pages/profiles/index/index.js
View file @
fffc1317
import
NotificationsForm
from
'
../../../notifications_form
'
;
import
NotificationsForm
from
'
../../../notifications_form
'
;
import
notificationsDropdown
from
'
../../../notifications_dropdown
'
;
import
notificationsDropdown
from
'
../../../notifications_dropdown
'
;
export
default
()
=>
{
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
{
new
NotificationsForm
();
// eslint-disable-line no-new
new
NotificationsForm
();
// eslint-disable-line no-new
notificationsDropdown
();
notificationsDropdown
();
};
}
)
;
app/assets/javascripts/profile/profile.js
View file @
fffc1317
/* eslint-disable comma-dangle, no-unused-vars, class-methods-use-this, quotes, consistent-return, func-names, prefer-arrow-callback, space-before-function-paren, max-len */
/* eslint-disable comma-dangle, no-unused-vars, class-methods-use-this, quotes, consistent-return, func-names, prefer-arrow-callback, space-before-function-paren, max-len */
import
Cookies
from
'
js-cookie
'
;
import
Cookies
from
'
js-cookie
'
;
import
{
getPagePath
}
from
'
~/lib/utils/common_utils
'
;
import
axios
from
'
~/lib/utils/axios_utils
'
;
import
axios
from
'
~/lib/utils/axios_utils
'
;
import
{
__
}
from
'
~/locale
'
;
import
{
__
}
from
'
~/locale
'
;
import
flash
from
'
../flash
'
;
import
flash
from
'
../flash
'
;
((
global
)
=>
{
export
default
class
Profile
{
class
Profile
{
constructor
({
form
}
=
{})
{
constructor
({
form
}
=
{})
{
this
.
onSubmitForm
=
this
.
onSubmitForm
.
bind
(
this
);
this
.
onSubmitForm
=
this
.
onSubmitForm
.
bind
(
this
);
this
.
form
=
form
||
$
(
'
.edit-user
'
);
this
.
form
=
form
||
$
(
'
.edit-user
'
);
this
.
newRepoActivated
=
Cookies
.
get
(
'
new_repo
'
);
this
.
newRepoActivated
=
Cookies
.
get
(
'
new_repo
'
);
this
.
setRepoRadio
();
this
.
setRepoRadio
();
this
.
bindEvents
();
this
.
bindEvents
();
this
.
initAvatarGlCrop
();
this
.
initAvatarGlCrop
();
}
}
initAvatarGlCrop
()
{
const
cropOpts
=
{
filename
:
'
.js-avatar-filename
'
,
previewImage
:
'
.avatar-image .avatar
'
,
modalCrop
:
'
.modal-profile-crop
'
,
pickImageEl
:
'
.js-choose-user-avatar-button
'
,
uploadImageBtn
:
'
.js-upload-user-avatar
'
,
modalCropImg
:
'
.modal-profile-crop-image
'
};
this
.
avatarGlCrop
=
$
(
'
.js-user-avatar-input
'
).
glCrop
(
cropOpts
).
data
(
'
glcrop
'
);
}
bindEvents
()
{
initAvatarGlCrop
()
{
$
(
'
.js-preferences-form
'
).
on
(
'
change.preference
'
,
'
input[type=radio]
'
,
this
.
submitForm
);
const
cropOpts
=
{
$
(
'
input[name="user[multi_file]"]
'
).
on
(
'
change
'
,
this
.
setNewRepoCookie
);
filename
:
'
.js-avatar-filename
'
,
$
(
'
#user_notification_email
'
).
on
(
'
change
'
,
this
.
submitForm
);
previewImage
:
'
.avatar-image .avatar
'
,
$
(
'
#user_notified_of_own_activity
'
).
on
(
'
change
'
,
this
.
submitForm
);
modalCrop
:
'
.modal-profile-crop
'
,
this
.
form
.
on
(
'
submit
'
,
this
.
onSubmitForm
);
pickImageEl
:
'
.js-choose-user-avatar-button
'
,
}
uploadImageBtn
:
'
.js-upload-user-avatar
'
,
modalCropImg
:
'
.modal-profile-crop-image
'
};
this
.
avatarGlCrop
=
$
(
'
.js-user-avatar-input
'
).
glCrop
(
cropOpts
).
data
(
'
glcrop
'
);
}
submitForm
()
{
bindEvents
()
{
return
$
(
this
).
parents
(
'
form
'
).
submit
();
$
(
'
.js-preferences-form
'
).
on
(
'
change.preference
'
,
'
input[type=radio]
'
,
this
.
submitForm
);
}
$
(
'
input[name="user[multi_file]"]
'
).
on
(
'
change
'
,
this
.
setNewRepoCookie
);
$
(
'
#user_notification_email
'
).
on
(
'
change
'
,
this
.
submitForm
);
$
(
'
#user_notified_of_own_activity
'
).
on
(
'
change
'
,
this
.
submitForm
);
this
.
form
.
on
(
'
submit
'
,
this
.
onSubmitForm
);
}
onSubmitForm
(
e
)
{
submitForm
()
{
e
.
preventDefault
();
return
$
(
this
).
parents
(
'
form
'
).
submit
();
return
this
.
saveForm
();
}
}
saveForm
(
)
{
onSubmitForm
(
e
)
{
const
self
=
this
;
e
.
preventDefault
()
;
const
formData
=
new
FormData
(
this
.
form
[
0
]
);
return
this
.
saveForm
(
);
const
avatarBlob
=
this
.
avatarGlCrop
.
getBlob
();
}
if
(
avatarBlob
!=
null
)
{
saveForm
()
{
formData
.
append
(
'
user[avatar]
'
,
avatarBlob
,
'
avatar.png
'
);
const
self
=
this
;
}
const
formData
=
new
FormData
(
this
.
form
[
0
]);
const
avatarBlob
=
this
.
avatarGlCrop
.
getBlob
();
axios
({
if
(
avatarBlob
!=
null
)
{
method
:
this
.
form
.
attr
(
'
method
'
),
formData
.
append
(
'
user[avatar]
'
,
avatarBlob
,
'
avatar.png
'
);
url
:
this
.
form
.
attr
(
'
action
'
),
data
:
formData
,
})
.
then
(({
data
})
=>
flash
(
data
.
message
,
'
notice
'
))
.
then
(()
=>
{
window
.
scrollTo
(
0
,
0
);
// Enable submit button after requests ends
self
.
form
.
find
(
'
:input[disabled]
'
).
enable
();
})
.
catch
(
error
=>
flash
(
error
.
message
));
}
}
setNewRepoCookie
()
{
axios
({
if
(
this
.
value
===
'
off
'
)
{
method
:
this
.
form
.
attr
(
'
method
'
),
Cookies
.
remove
(
'
new_repo
'
);
url
:
this
.
form
.
attr
(
'
action
'
),
}
else
{
data
:
formData
,
Cookies
.
set
(
'
new_repo
'
,
true
,
{
expires_in
:
365
});
})
}
.
then
(({
data
})
=>
flash
(
data
.
message
,
'
notice
'
))
}
.
then
(()
=>
{
window
.
scrollTo
(
0
,
0
);
// Enable submit button after requests ends
self
.
form
.
find
(
'
:input[disabled]
'
).
enable
();
})
.
catch
(
error
=>
flash
(
error
.
message
));
}
setRepoRadio
()
{
setNewRepoCookie
()
{
const
multiEditRadios
=
$
(
'
input[name="user[multi_file]"]
'
);
if
(
this
.
value
===
'
off
'
)
{
if
(
this
.
newRepoActivated
||
this
.
newRepoActivated
===
'
true
'
)
{
Cookies
.
remove
(
'
new_repo
'
);
multiEditRadios
.
filter
(
'
[value=on]
'
).
prop
(
'
checked
'
,
true
);
}
else
{
}
else
{
Cookies
.
set
(
'
new_repo
'
,
true
,
{
expires_in
:
365
});
multiEditRadios
.
filter
(
'
[value=off]
'
).
prop
(
'
checked
'
,
true
);
}
}
}
}
}
$
(
function
()
{
setRepoRadio
()
{
$
(
document
).
on
(
'
input.ssh_key
'
,
'
#key_key
'
,
function
()
{
const
multiEditRadios
=
$
(
'
input[name="user[multi_file]"]
'
);
const
$title
=
$
(
'
#key_title
'
);
if
(
this
.
newRepoActivated
||
this
.
newRepoActivated
===
'
true
'
)
{
const
comment
=
$
(
this
).
val
().
match
(
/^
\S
+
\S
+
(
.+
)\n?
$/
);
multiEditRadios
.
filter
(
'
[value=on]
'
).
prop
(
'
checked
'
,
true
);
}
else
{
// Extract the SSH Key title from its comment
multiEditRadios
.
filter
(
'
[value=off]
'
).
prop
(
'
checked
'
,
true
);
if
(
comment
&&
comment
.
length
>
1
)
{
return
$title
.
val
(
comment
[
1
]).
change
();
}
});
if
(
getPagePath
()
===
'
profiles
'
)
{
return
new
Profile
();
}
}
}
);
}
}
)(
window
.
gl
||
(
window
.
gl
=
{}));
}
app/assets/javascripts/profile/profile_bundle.js
deleted
100644 → 0
View file @
8c310424
import
'
./gl_crop
'
;
import
'
./profile
'
;
app/views/profiles/_head.html.haml
deleted
100644 → 0
View file @
8c310424
-
content_for
:page_specific_javascripts
do
=
webpack_bundle_tag
(
'profile'
)
app/views/profiles/accounts/show.html.haml
View file @
fffc1317
-
page_title
"Account"
-
page_title
"Account"
-
@content_class
=
"limit-container-width"
unless
fluid_layout
-
@content_class
=
"limit-container-width"
unless
fluid_layout
=
render
'profiles/head'
-
if
current_user
.
ldap_user?
-
if
current_user
.
ldap_user?
.alert.alert-info
.alert.alert-info
...
...
app/views/profiles/audit_log.html.haml
View file @
fffc1317
-
page_title
"Authentication log"
-
page_title
"Authentication log"
-
@content_class
=
"limit-container-width"
unless
fluid_layout
-
@content_class
=
"limit-container-width"
unless
fluid_layout
=
render
'profiles/head'
.row.prepend-top-default
.row.prepend-top-default
.col-lg-4.profile-settings-sidebar
.col-lg-4.profile-settings-sidebar
...
...
app/views/profiles/chat_names/index.html.haml
View file @
fffc1317
-
page_title
'Chat'
-
page_title
'Chat'
-
@content_class
=
"limit-container-width"
unless
fluid_layout
-
@content_class
=
"limit-container-width"
unless
fluid_layout
=
render
'profiles/head'
.row.prepend-top-default
.row.prepend-top-default
.col-lg-4.profile-settings-sidebar
.col-lg-4.profile-settings-sidebar
...
...
app/views/profiles/emails/index.html.haml
View file @
fffc1317
-
page_title
"Emails"
-
page_title
"Emails"
-
@content_class
=
"limit-container-width"
unless
fluid_layout
-
@content_class
=
"limit-container-width"
unless
fluid_layout
=
render
'profiles/head'
.row.prepend-top-default
.row.prepend-top-default
.col-lg-4.profile-settings-sidebar
.col-lg-4.profile-settings-sidebar
...
...
app/views/profiles/gpg_keys/index.html.haml
View file @
fffc1317
-
page_title
"GPG Keys"
-
page_title
"GPG Keys"
-
@content_class
=
"limit-container-width"
unless
fluid_layout
-
@content_class
=
"limit-container-width"
unless
fluid_layout
=
render
'profiles/head'
.row.prepend-top-default
.row.prepend-top-default
.col-lg-4.profile-settings-sidebar
.col-lg-4.profile-settings-sidebar
...
...
app/views/profiles/keys/index.html.haml
View file @
fffc1317
-
page_title
"SSH Keys"
-
page_title
"SSH Keys"
-
@content_class
=
"limit-container-width"
unless
fluid_layout
-
@content_class
=
"limit-container-width"
unless
fluid_layout
=
render
'profiles/head'
.row.prepend-top-default
.row.prepend-top-default
.col-lg-4.profile-settings-sidebar
.col-lg-4.profile-settings-sidebar
...
...
app/views/profiles/keys/show.html.haml
View file @
fffc1317
...
@@ -2,5 +2,4 @@
...
@@ -2,5 +2,4 @@
-
breadcrumb_title
@key
.
title
-
breadcrumb_title
@key
.
title
-
page_title
@key
.
title
,
"SSH Keys"
-
page_title
@key
.
title
,
"SSH Keys"
-
@content_class
=
"limit-container-width"
unless
fluid_layout
-
@content_class
=
"limit-container-width"
unless
fluid_layout
=
render
'profiles/head'
=
render
"key_details"
=
render
"key_details"
app/views/profiles/notifications/show.html.haml
View file @
fffc1317
-
page_title
"Notifications"
-
page_title
"Notifications"
-
@content_class
=
"limit-container-width"
unless
fluid_layout
-
@content_class
=
"limit-container-width"
unless
fluid_layout
=
render
'profiles/head'
%div
%div
-
if
@user
.
errors
.
any?
-
if
@user
.
errors
.
any?
...
...
app/views/profiles/personal_access_tokens/index.html.haml
View file @
fffc1317
...
@@ -2,7 +2,6 @@
...
@@ -2,7 +2,6 @@
-
page_title
"Personal Access Tokens"
-
page_title
"Personal Access Tokens"
-
@content_class
=
"limit-container-width"
unless
fluid_layout
-
@content_class
=
"limit-container-width"
unless
fluid_layout
=
render
'profiles/head'
.row.prepend-top-default
.row.prepend-top-default
.col-lg-4.profile-settings-sidebar
.col-lg-4.profile-settings-sidebar
...
...
app/views/profiles/preferences/show.html.haml
View file @
fffc1317
-
page_title
'Preferences'
-
page_title
'Preferences'
-
@content_class
=
"limit-container-width"
unless
fluid_layout
-
@content_class
=
"limit-container-width"
unless
fluid_layout
=
render
'profiles/head'
=
form_for
@user
,
url:
profile_preferences_path
,
remote:
true
,
method: :put
,
html:
{
class:
'row prepend-top-default js-preferences-form'
}
do
|
f
|
=
form_for
@user
,
url:
profile_preferences_path
,
remote:
true
,
method: :put
,
html:
{
class:
'row prepend-top-default js-preferences-form'
}
do
|
f
|
.col-lg-4.application-theme
.col-lg-4.application-theme
...
...
app/views/profiles/show.html.haml
View file @
fffc1317
-
breadcrumb_title
"Edit Profile"
-
breadcrumb_title
"Edit Profile"
-
@content_class
=
"limit-container-width"
unless
fluid_layout
-
@content_class
=
"limit-container-width"
unless
fluid_layout
=
render
'profiles/head'
=
bootstrap_form_for
@user
,
url:
profile_path
,
method: :put
,
html:
{
multipart:
true
,
class:
'edit-user prepend-top-default js-quick-submit'
},
authenticity_token:
true
do
|
f
|
=
bootstrap_form_for
@user
,
url:
profile_path
,
method: :put
,
html:
{
multipart:
true
,
class:
'edit-user prepend-top-default js-quick-submit'
},
authenticity_token:
true
do
|
f
|
=
form_errors
(
@user
)
=
form_errors
(
@user
)
...
...
app/views/profiles/two_factor_auths/show.html.haml
View file @
fffc1317
...
@@ -2,7 +2,6 @@
...
@@ -2,7 +2,6 @@
-
add_to_breadcrumbs
(
"Two-Factor Authentication"
,
profile_account_path
)
-
add_to_breadcrumbs
(
"Two-Factor Authentication"
,
profile_account_path
)
-
@content_class
=
"limit-container-width"
unless
fluid_layout
-
@content_class
=
"limit-container-width"
unless
fluid_layout
=
render
'profiles/head'
-
content_for
:page_specific_javascripts
do
-
content_for
:page_specific_javascripts
do
-
if
inject_u2f_api?
-
if
inject_u2f_api?
...
...
config/webpack.config.js
View file @
fffc1317
...
@@ -73,7 +73,6 @@ var config = {
...
@@ -73,7 +73,6 @@ var config = {
pdf_viewer
:
'
./blob/pdf_viewer.js
'
,
pdf_viewer
:
'
./blob/pdf_viewer.js
'
,
pipelines
:
'
./pipelines/pipelines_bundle.js
'
,
pipelines
:
'
./pipelines/pipelines_bundle.js
'
,
pipelines_details
:
'
./pipelines/pipeline_details_bundle.js
'
,
pipelines_details
:
'
./pipelines/pipeline_details_bundle.js
'
,
profile
:
'
./profile/profile_bundle.js
'
,
project_import_gl
:
'
./projects/project_import_gitlab_project.js
'
,
project_import_gl
:
'
./projects/project_import_gitlab_project.js
'
,
protected_branches
:
'
./protected_branches
'
,
protected_branches
:
'
./protected_branches
'
,
protected_tags
:
'
./protected_tags
'
,
protected_tags
:
'
./protected_tags
'
,
...
...
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