Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tdt4242-group16
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Ole-Christian Bjerkeset
tdt4242-group16
Commits
31cff498
Commit
31cff498
authored
3 years ago
by
Ole-Christian Bjerkeset
Browse files
Options
Downloads
Patches
Plain Diff
Added comments in the profile.js file
parent
5b2b6022
No related branches found
No related tags found
No related merge requests found
Pipeline
#166507
passed
3 years ago
Stage: test
Stage: staging
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
frontend/www/scripts/profile.js
+4
-7
4 additions, 7 deletions
frontend/www/scripts/profile.js
with
4 additions
and
7 deletions
frontend/www/scripts/profile.js
+
4
−
7
View file @
31cff498
...
...
@@ -9,7 +9,7 @@ function handleCancelButtonDuringCreate() {
}
/**
* If user presses "cancel" during editing
a group
the
* If user presses "cancel" during editing
the profile
the
* form fields become read only and the form data is deleted.
* And the buttons change.
*/
...
...
@@ -35,7 +35,7 @@ function handleCancelButtonDuringEdit() {
/**
* If the user clicks on the edit button the form fields can be edited.
* And the form is updated with the
data of the group that
the user wants to
edit
.
* And the form is updated with the
profile data
the user wants to
change
.
*/
function
handleEditProfileButtonClick
()
{
setReadOnly
(
false
,
"
#form-profile
"
);
...
...
@@ -82,8 +82,7 @@ async function getCurrentProfile() {
}
/**
* Sends a PUT request to the API to update a group's information.
* @param {integer} id of the group to be updated
* Sends a PUT request to the API to update the active users profile information.
*/
async
function
updateProfile
()
{
let
res
=
await
sendRequest
(
"
GET
"
,
`
${
HOST
}
/api/users/?user=current`
);
...
...
@@ -123,9 +122,7 @@ async function updateProfile() {
}
/**
* When a user enters the group.html this decides whether it
* is entered in view/edit mode or in create mode. If the html contains
* a url parameter with an id it is entered in view/edit mode.
* When a user enters the profile.html his/her profile information is retrieved
*/
window
.
addEventListener
(
"
DOMContentLoaded
"
,
async
()
=>
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment