Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
website
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Jannik Hellenkamp
website
Commits
511b61d4
Commit
511b61d4
authored
8 years ago
by
Andreas Valder
Browse files
Options
Downloads
Patches
Plain Diff
mod interface now working in firefox, still needs cleanup
parent
5b261a32
No related branches found
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
run.py
+1
-0
1 addition, 0 deletions
run.py
static/moderator.js
+8
-10
8 additions, 10 deletions
static/moderator.js
templates/macros.html
+1
-1
1 addition, 1 deletion
templates/macros.html
templates/schedule.html
+0
-1
0 additions, 1 deletion
templates/schedule.html
with
10 additions
and
12 deletions
run.py
100644 → 100755
+
1
−
0
View file @
511b61d4
#!/usr/bin/env python
from
server
import
*
from
server
import
*
if
__name__
==
'
__main__
'
:
if
__name__
==
'
__main__
'
:
...
...
This diff is collapsed.
Click to expand it.
static/moderator.js
+
8
−
10
View file @
511b61d4
...
@@ -15,10 +15,10 @@ var moderatorinterface = {
...
@@ -15,10 +15,10 @@ var moderatorinterface = {
return
`
return
`
<div class="row form-group">
<div class="row form-group">
<span class="col-xs-12">
<span class="col-xs-12">
<textarea class="form-control
" rows="3
">`
+
this
.
parentElement
.
getElementsByClassName
(
'
modeditablevalue
'
)[
0
].
innerHTML
+
`</textarea>
<textarea class="form-control
editorvalue" rows="3" data-path="`
+
$
(
this
.
parentElement
).
data
(
'
path
'
)
+
`
">`
+
this
.
parentElement
.
getElementsByClassName
(
'
modeditablevalue
'
)[
0
].
innerHTML
+
`</textarea>
</span>
</span>
<span class="col-xs-12">
<span class="col-xs-12">
<input class="btn btn-default pull-right" type="submit" data-path="`
+
$
(
this
.
parentElement
).
data
(
'
path
'
)
+
`" value="save" onClick="moderatorinterface.edit()">
<input class="btn btn-default pull-right
editorbtn
" type="submit" data-path="`
+
$
(
this
.
parentElement
).
data
(
'
path
'
)
+
`" value="save" onClick="moderatorinterface.edit(
this
)">
</span>
</span>
</div>
</div>
`
;
`
;
...
@@ -28,10 +28,9 @@ var moderatorinterface = {
...
@@ -28,10 +28,9 @@ var moderatorinterface = {
}
}
})
})
},
},
edit
:
function
()
{
edit
:
function
(
src
)
{
var
event
=
window
.
event
;
var
path
=
$
(
$
(
src
)[
0
]).
data
(
'
path
'
);
var
value
=
$
(
event
.
srcElement
)[
0
].
parentElement
.
previousElementSibling
.
children
[
0
].
value
;
var
value
=
$
(
"
.editorvalue
"
)[
0
].
value
;
var
path
=
$
(
$
(
event
.
srcElement
)[
0
]).
data
(
'
path
'
);
var
editable
=
$
(
'
.modeditable
'
);
var
editable
=
$
(
'
.modeditable
'
);
for
(
var
i
=
0
;
i
<
editable
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
editable
.
length
;
i
++
)
{
...
@@ -44,10 +43,9 @@ var moderatorinterface = {
...
@@ -44,10 +43,9 @@ var moderatorinterface = {
}
}
moderatorinterface
.
set
(
path
,
value
);
moderatorinterface
.
set
(
path
,
value
);
},
},
change
:
function
()
{
change
:
function
(
src
)
{
var
event
=
window
.
event
;
var
value
=
$
(
src
)[
0
].
checked
;
var
value
=
$
(
event
.
srcElement
)[
0
].
checked
;
var
path
=
$
(
src
).
data
(
'
path
'
);
var
path
=
$
(
$
(
event
.
srcElement
)[
0
]).
data
(
'
path
'
);
moderatorinterface
.
set
(
path
,
value
?
1
:
0
);
moderatorinterface
.
set
(
path
,
value
?
1
:
0
);
},
},
set
:
function
(
path
,
value
)
{
set
:
function
(
path
,
value
)
{
...
...
This diff is collapsed.
Click to expand it.
templates/macros.html
+
1
−
1
View file @
511b61d4
...
@@ -167,6 +167,6 @@ $('#embedcodebtn').popover(
...
@@ -167,6 +167,6 @@ $('#embedcodebtn').popover(
{% macro valuecheckbox (path,value) %}
{% macro valuecheckbox (path,value) %}
{% if ismod() %}
{% if ismod() %}
<input
type=
"checkbox"
data-path=
"{{path|join('.')}}"
{%
if
value
%}
checked
{%
endif
%}
onchange=
"moderatorinterface.change()"
/>
<input
type=
"checkbox"
data-path=
"{{path|join('.')}}"
{%
if
value
%}
checked
{%
endif
%}
onchange=
"moderatorinterface.change(
this
)"
/>
{% endif %}
{% endif %}
{% endmacro %}
{% endmacro %}
This diff is collapsed.
Click to expand it.
templates/schedule.html
+
0
−
1
View file @
511b61d4
{% extends "base.html" %}
{% extends "base.html" %}
{% set active_page = "schedule" %}
{% block content %}
{% block content %}
<div
class=
"panel-group"
id=
"accordion"
>
<div
class=
"panel-group"
id=
"accordion"
>
<div
class=
"panel panel-default"
>
<div
class=
"panel panel-default"
>
...
...
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