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
04dac3c5
Commit
04dac3c5
authored
3 years ago
by
Simen
Browse files
Options
Downloads
Patches
Plain Diff
minor redirect changes
parent
144e3c75
No related branches found
No related tags found
1 merge request
!4
Feat/32 group content
Pipeline
#162496
passed
3 years ago
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
frontend/www/contentcomments.html
+1
-1
1 addition, 1 deletion
frontend/www/contentcomments.html
frontend/www/scripts/addcontent.js
+3
-3
3 additions, 3 deletions
frontend/www/scripts/addcontent.js
with
4 additions
and
4 deletions
frontend/www/contentcomments.html
+
1
−
1
View file @
04dac3c5
...
...
@@ -20,7 +20,7 @@
<p>
Here you can post comments and like.
</p>
</div>
<div
class=
"col-lg-6"
>
<input
type=
"button"
class=
"btn btn-
primary
"
id=
"btn-like"
value=
"Like"
>
<input
type=
"button"
class=
"btn btn-
success
"
id=
"btn-like"
value=
"Like"
>
</div>
<div
class=
"col-lg-6"
>
...
...
This diff is collapsed.
Click to expand it.
frontend/www/scripts/addcontent.js
+
3
−
3
View file @
04dac3c5
...
...
@@ -6,8 +6,8 @@ function handleCancelButtonDuringCreate() {
}
/**
* This api request is fired when the user clicks the button to
create
a group
* It sends a POST request with the form data, and relocates to groups
.html
or
* This api request is fired when the user clicks the button to
add content to
a group
* It sends a POST request with the form data, and relocates to groups
Content page
or
* sends an error message in respons.
*/
async
function
addContent
()
{
...
...
@@ -25,7 +25,7 @@ async function addContent() {
let
response
=
await
sendRequest
(
"
POST
"
,
`
${
HOST
}
/api/content/`
,
body
);
if
(
response
.
ok
)
{
window
.
location
.
replace
(
"
group
s.html
"
);
window
.
location
.
replace
(
`
group
Content.html?id=
${
groupId
}
`
);
}
else
{
let
data
=
await
response
.
json
();
let
alert
=
createAlert
(
"
Could not create new group!
"
,
data
);
...
...
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