Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
redeleitsystem
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
Deploy
Releases
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
redl
redeleitsystem
Commits
f4e37e87
Commit
f4e37e87
authored
9 years ago
by
Robin Sonnabend
Browse files
Options
Downloads
Patches
Plain Diff
Added next-speaker-shortcut.
parent
dd06fbae
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
static/js/nextbutton.js
+46
-0
46 additions, 0 deletions
static/js/nextbutton.js
templates/layout.html
+5
-0
5 additions, 0 deletions
templates/layout.html
templates/speech_index.html
+9
-1
9 additions, 1 deletion
templates/speech_index.html
templates/update.js
+1
-1
1 addition, 1 deletion
templates/update.js
with
61 additions
and
2 deletions
static/js/nextbutton.js
0 → 100644
+
46
−
0
View file @
f4e37e87
var
keyhash
=
""
;
var
changehash
=
false
;
var
notificationArea
;
var
timeout
;
function
hashkey
(
e
)
{
return
e
.
keyCode
+
"
;
"
+
e
.
charCode
;
}
function
clickNextSpeaker
()
{
var
rows
=
document
.
getElementById
(
"
next-speaker-table
"
).
rows
;
if
(
rows
.
length
>
1
)
{
var
row
=
rows
[
1
];
var
a
=
row
.
children
[
2
].
childNodes
[
1
];
a
.
click
();
}
}
window
.
onkeypress
=
function
(
e
)
{
if
(
changehash
)
{
keyhash
=
hashkey
(
e
);
changehash
=
false
;
sessionStorage
[
"
keyhash
"
]
=
keyhash
;
notificationArea
.
innerHTML
=
"
Key has been set.
"
;
timeout
=
window
.
setTimeout
(
function
()
{
notificationArea
.
innerHTML
=
""
;
},
5000
);
}
else
{
if
(
hashkey
(
e
)
==
keyhash
)
{
clickNextSpeaker
();
}
}
};
function
setkeyhash
()
{
changehash
=
true
;
notificationArea
.
innerHTML
=
"
Please click the key.
"
;
window
.
clearTimeout
(
timeout
);
}
var
nextbuttoncachedonloadfunction
=
window
.
onload
;
window
.
onload
=
function
()
{
nextbuttoncachedonloadfunction
();
if
(
sessionStorage
[
"
keyhash
"
])
{
keyhash
=
sessionStorage
[
"
keyhash
"
];
}
notificationArea
=
document
.
getElementById
(
"
rede-layout-notification
"
);
};
This diff is collapsed.
Click to expand it.
templates/layout.html
+
5
−
0
View file @
f4e37e87
...
@@ -28,6 +28,8 @@
...
@@ -28,6 +28,8 @@
{% include "content_time.html" %}
{% include "content_time.html" %}
</span>
</span>
<div
class=
"mdl-layout-spacer"
></div>
<div
class=
"mdl-layout-spacer"
></div>
<span
id=
"rede-layout-notification"
class=
"rede-layout-title"
></span>
<div
class=
"mdl-layout-spacer"
></div>
<button
class=
"mdl-button mdl-js-button mdl-js-ripple-effet mdl-button--icon"
id=
"hdrbtn"
>
<button
class=
"mdl-button mdl-js-button mdl-js-ripple-effet mdl-button--icon"
id=
"hdrbtn"
>
<i
class=
"material-icons"
>
more_vert
</i>
<i
class=
"material-icons"
>
more_vert
</i>
</button>
</button>
...
@@ -83,6 +85,9 @@
...
@@ -83,6 +85,9 @@
<a
class=
"mdl-navigation__link"
href=
"{{ url_for("
speech.show
")
}}"
><i
class=
"mdl-color-text--blue-grey-400 material-icons"
role=
"presentation"
>
announcement
</i>
Pending speakers
</a>
<a
class=
"mdl-navigation__link"
href=
"{{ url_for("
speech.show
")
}}"
><i
class=
"mdl-color-text--blue-grey-400 material-icons"
role=
"presentation"
>
announcement
</i>
Pending speakers
</a>
{% if current_user.is_authenticated() and "admin" in current_user.roles %}
{% if current_user.is_authenticated() and "admin" in current_user.roles %}
<a
class=
"mdl-navigation__link"
href=
"{{ url_for("
admin.index
")
}}"
><i
class=
"mdl-color-text--blue-grey-400 material-icons"
role=
"presentation"
>
computer
</i>
Administration
</a>
<a
class=
"mdl-navigation__link"
href=
"{{ url_for("
admin.index
")
}}"
><i
class=
"mdl-color-text--blue-grey-400 material-icons"
role=
"presentation"
>
computer
</i>
Administration
</a>
{% block additional_sidelinks %}
<!-- put your additional sidelinks here -->
{% endblock %}
{% endif %}
{% endif %}
</nav>
</nav>
</div>
</div>
...
...
This diff is collapsed.
Click to expand it.
templates/speech_index.html
+
9
−
1
View file @
f4e37e87
...
@@ -2,9 +2,17 @@
...
@@ -2,9 +2,17 @@
{% from "macros.html" import render_form %}
{% from "macros.html" import render_form %}
{% block title %}Statements{% endblock %}
{% block title %}Statements{% endblock %}
{% block additional_js %}
<script
src=
"{{ url_for('static', filename='js/nextbutton.js') }}"
async
></script>
{% endblock %}
{% block additional_sidelinks %}
<a
href=
"#"
class=
"mdl-navigation__link"
onclick=
"setkeyhash()"
>
Set Next Key
</a>
{% endblock %}
{% block content %}
{% block content %}
{% for statements, add_form, event in meta %}
{% for statements, add_form, event in meta %}
<table
class=
"mdl-data-table mdl-js-table mdl-shadow--2dp mdl-cell mdl-cell--6-col mdl-cell--4-col-tablet mdl-cell--4-col-phone sortable"
>
<table
id=
"next-speaker-table"
class=
"mdl-data-table mdl-js-table mdl-shadow--2dp mdl-cell mdl-cell--6-col mdl-cell--4-col-tablet mdl-cell--4-col-phone sortable"
>
<thead>
<thead>
<tr>
<tr>
<th
class=
"mdl-data-table__cell--non-numeric"
>
Speaker
</th>
<th
class=
"mdl-data-table__cell--non-numeric"
>
Speaker
</th>
...
...
This diff is collapsed.
Click to expand it.
templates/update.js
+
1
−
1
View file @
f4e37e87
...
@@ -27,5 +27,5 @@ var {{ prefix }}f = window.onload;
...
@@ -27,5 +27,5 @@ var {{ prefix }}f = window.onload;
window
.
onload
=
function
()
{
window
.
onload
=
function
()
{
{{
prefix
}}
f
();
{{
prefix
}}
f
();
window
.
setInterval
({{
prefix
}}
request
,
1000
*
{{
update_interval
}});
window
.
setInterval
({{
prefix
}}
request
,
1000
*
{{
update_interval
}});
}
}
;
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