Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
WTFd
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
FOSS-AG
WTFd
Commits
5b55bf40
Verified
Commit
5b55bf40
authored
5 years ago
by
Jonas Röger
Browse files
Options
Downloads
Patches
Plain Diff
Added bugreport dialog frontend
parent
765fdc61
No related branches found
No related tags found
No related merge requests found
Pipeline
#1952
passed with warnings
5 years ago
Stage: test
Stage: build
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
html/index.html
+16
-0
16 additions, 0 deletions
html/index.html
html/static/main.js
+24
-0
24 additions, 0 deletions
html/static/main.js
with
40 additions
and
0 deletions
html/index.html
+
16
−
0
View file @
5b55bf40
...
@@ -14,6 +14,7 @@
...
@@ -14,6 +14,7 @@
{{
range
.
Challenges
}}
{{
range
.
Challenges
}}
colnum
.
set
(
"
{{.Name}}
"
,{
col
:
"
{{.DepCount}}
"
,
row
:
"
{{.Row}}
"
});
colnum
.
set
(
"
{{.Name}}
"
,{
col
:
"
{{.DepCount}}
"
,
row
:
"
{{.Row}}
"
});
{{
end
}}
{{
end
}}
var
bugreportCategories
=
[
"
Main Page
"
{{
range
.
Challenges
}},
"
{{.Name}}
"
{{
end
}}];
function
start
(){
function
start
(){
{{
if
.
IsUser
}}{{
else
}}
document
.
getElementById
(
"
loginbutton
"
).
click
();{{
end
}}
{{
if
.
IsUser
}}{{
else
}}
document
.
getElementById
(
"
loginbutton
"
).
click
();{{
end
}}
{{
if
.
IsUser
}}
{{
if
.
IsUser
}}
...
@@ -63,6 +64,7 @@ colnum.set("{{.Name}}",{col: "{{.DepCount}}", row: "{{.Row}}"});
...
@@ -63,6 +64,7 @@ colnum.set("{{.Name}}",{col: "{{.DepCount}}", row: "{{.Row}}"});
<dialog
id=
"detailview"
>
<dialog
id=
"detailview"
>
<span
class=
"mdi mdi-close closebtn"
id=
"detailclosebutton"
></span>
<span
class=
"mdi mdi-close closebtn"
id=
"detailclosebutton"
></span>
<h1
id=
"detailtitle"
></h1>
<h1
id=
"detailtitle"
></h1>
<input
type=
"button"
id=
"bugreport"
></input>
<h3
class=
"detailmeta"
>
<h3
class=
"detailmeta"
>
<div
class=
"flexcell flex-left"
>
<div
class=
"flexcell flex-left"
>
<a
id=
"challuri"
class=
"challengelink"
style=
"display: none;"
>
Zur Challenge!
</a>
<a
id=
"challuri"
class=
"challengelink"
style=
"display: none;"
>
Zur Challenge!
</a>
...
@@ -89,4 +91,18 @@ colnum.set("{{.Name}}",{col: "{{.DepCount}}", row: "{{.Row}}"});
...
@@ -89,4 +91,18 @@ colnum.set("{{.Name}}",{col: "{{.DepCount}}", row: "{{.Row}}"});
<span
id=
"checkloading"
class=
"loadingbar"
style=
"display: none;"
></span>
<span
id=
"checkloading"
class=
"loadingbar"
style=
"display: none;"
></span>
</dialog>
</dialog>
<dialog
id=
"bugreportview"
>
<span
class=
"mdi mdi-close closebtn"
id=
"bugreportclosebutton"
></span>
<h1>
Report Bug
</h1>
<div
id=
"bugreportform"
>
<select
id=
"bugreportcategory"
></select>
<input
type=
"text"
placeholder=
"Das soll so ja nicht"
id=
"subjectinput"
class=
"firamono flexcell"
style=
"width: 30vw;"
/>
</br>
<textarea
placeholder=
"Alles kaputt..."
id=
"contentinput"
class=
"firamono flexcell"
style=
"height: 30vh; width: 30vw; resize: none;"
></textarea>
</br>
<input
class=
"button"
type=
"submit"
id=
"bugreportbutton"
value=
"Send report"
style=
"float: right"
/>
</div>
<span
id=
"bugloading"
class=
"loadingbar"
style=
"display: none;"
></span>
</dialog>
{{ template "footer" . }}
{{ template "footer" . }}
This diff is collapsed.
Click to expand it.
html/static/main.js
+
24
−
0
View file @
5b55bf40
...
@@ -7,6 +7,9 @@ let solutioneventlistenerfunc = function () {
...
@@ -7,6 +7,9 @@ let solutioneventlistenerfunc = function () {
let
flaginputeventlistenerfunc
=
function
()
{
let
flaginputeventlistenerfunc
=
function
()
{
};
};
// Used for selection dialog in bugreport
let
selCategory
=
document
.
getElementById
(
"
bugreportcategory
"
);
function
addChallEventListener
(
title
,
points
)
{
function
addChallEventListener
(
title
,
points
)
{
let
elem
=
document
.
getElementById
(
title
);
let
elem
=
document
.
getElementById
(
title
);
elem
.
addEventListener
(
"
click
"
,
function
()
{
elem
.
addEventListener
(
"
click
"
,
function
()
{
...
@@ -113,6 +116,7 @@ function addChallEventListener(title, points) {
...
@@ -113,6 +116,7 @@ function addChallEventListener(title, points) {
}
}
});
});
selCategory
.
value
=
title
;
showDialog
(
detView
);
showDialog
(
detView
);
});
});
...
@@ -312,5 +316,25 @@ function connectElements(svg, startElem, endElem, color) {
...
@@ -312,5 +316,25 @@ function connectElements(svg, startElem, endElem, color) {
svg1
.
innerHTML
=
""
;
svg1
.
innerHTML
=
""
;
// noinspection JSUnresolvedVariable
// noinspection JSUnresolvedVariable
flagsubmitbutton
.
addEventListener
(
"
click
"
,
flagsubmiteventlistenerfunc
);
flagsubmitbutton
.
addEventListener
(
"
click
"
,
flagsubmiteventlistenerfunc
);
let
btnBugreport
=
document
.
getElementById
(
"
bugreport
"
);
let
dlgBugreport
=
document
.
getElementById
(
"
bugreportview
"
);
let
btnBugreportClose
=
document
.
getElementById
(
"
bugreportclosebutton
"
);
btnBugreportClose
.
addEventListener
(
"
click
"
,
function
()
{
dlgBugreport
.
close
();
});
dialogPolyfill
.
registerDialog
(
dlgBugreport
);
btnBugreport
.
addEventListener
(
"
click
"
,
function
()
{
showDialog
(
dlgBugreport
);
loadBugReportView
();
});
// Add categories to bugreport selection
bugreportCategories
.
forEach
(
function
(
elem
)
{
var
opt
=
document
.
createElement
(
"
option
"
);
opt
.
value
=
elem
;
opt
.
innerHTML
=
elem
;
selCategory
.
appendChild
(
opt
);
});
start
();
start
();
})();
})();
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