forked from openlp/openlp
remove link on remote, add /stage shortcut plus tidies and refix
This commit is contained in:
parent
03380fb40f
commit
547b58e7b5
|
@ -43,7 +43,6 @@
|
|||
<a href="#service-manager" data-role="button" data-icon="arrow-r" data-iconpos="right">Service Manager</a>
|
||||
<a href="#slide-controller" data-role="button" data-icon="arrow-r" data-iconpos="right">Slide Controller</a>
|
||||
<a href="#alerts" data-role="button" data-icon="arrow-r" data-iconpos="right">Alerts</a>
|
||||
<a href="files/stage.html" data-role="button" rel="external">Stage View</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -113,6 +113,7 @@ window.OpenLP = {
|
|||
$.getJSON(
|
||||
"/api/poll",
|
||||
function (data, status) {
|
||||
var prevItem = OpenLP.currentItem;
|
||||
OpenLP.currentSlide = data.results.slide;
|
||||
OpenLP.currentItem = data.results.item;
|
||||
if ($("#service-manager").is(":visible")) {
|
||||
|
@ -130,6 +131,10 @@ window.OpenLP = {
|
|||
$("#service-manager div[data-role=content] ul[data-role=listview]").listview("refresh");
|
||||
}
|
||||
if ($("#slide-controller").is(":visible")) {
|
||||
if (prevItem != OpenLP.currentItem) {
|
||||
OpenLP.loadController();
|
||||
return;
|
||||
}
|
||||
var idx = 0;
|
||||
$("#slide-controller div[data-role=content] ul[data-role=listview] li").attr("data-theme", "c").removeClass("ui-btn-up-e").addClass("ui-btn-up-c");
|
||||
$("#slide-controller div[data-role=content] ul[data-role=listview] li a").each(function () {
|
||||
|
|
|
@ -54,14 +54,6 @@ body {
|
|||
text-align: right;
|
||||
}
|
||||
|
||||
#service {
|
||||
font-size: 16pt;
|
||||
color: lightblue;
|
||||
text-align: right;
|
||||
white-space: nowrap;
|
||||
display: none;
|
||||
}
|
||||
|
||||
#verseorder {
|
||||
font-size: 30pt;
|
||||
color: green;
|
||||
|
|
|
@ -35,7 +35,6 @@
|
|||
<div id="right">
|
||||
<div id="clock"></div>
|
||||
<div id="notes"></div>
|
||||
<div id="service"></div>
|
||||
</div>
|
||||
<div id="verseorder"></div>
|
||||
<div id="currentslide"></div>
|
||||
|
|
|
@ -27,15 +27,13 @@ window.OpenLP = {
|
|||
function (data, status) {
|
||||
OpenLP.nextSong = "";
|
||||
$("#notes").html("");
|
||||
var div = $("#service");
|
||||
div.html("");
|
||||
for (idx in data.results.items) {
|
||||
idx = parseInt(idx, 10);
|
||||
div.append(data.results.items[idx]["title"] + "<br />");
|
||||
if ((data.results.items[idx]["selected"]) &&
|
||||
(data.results.items.length > idx + 1)) {
|
||||
$("#notes").html(data.results.items[idx]["notes"]);
|
||||
OpenLP.nextSong = data.results.items[idx + 1]["title"];
|
||||
break;
|
||||
}
|
||||
}
|
||||
OpenLP.updateSlide();
|
||||
|
|
|
@ -34,6 +34,9 @@ the remotes.
|
|||
``/``
|
||||
Go to the web interface.
|
||||
|
||||
``/stage``
|
||||
Show the stage view.
|
||||
|
||||
``/files/{filename}``
|
||||
Serve a static file.
|
||||
|
||||
|
@ -241,6 +244,7 @@ class HttpConnection(object):
|
|||
self.parent = parent
|
||||
self.routes = [
|
||||
(u'^/$', self.serve_file),
|
||||
(u'^/(stage)$', self.serve_file),
|
||||
(r'^/files/(.*)$', self.serve_file),
|
||||
(r'^/api/poll$', self.poll),
|
||||
(r'^/api/controller/(live|preview)/(.*)$', self.controller),
|
||||
|
@ -312,6 +316,8 @@ class HttpConnection(object):
|
|||
log.debug(u'serve file request %s' % filename)
|
||||
if not filename:
|
||||
filename = u'index.html'
|
||||
elif filename == u'stage':
|
||||
filename = u'stage.html'
|
||||
path = os.path.normpath(os.path.join(self.parent.html_dir, filename))
|
||||
if not path.startswith(self.parent.html_dir):
|
||||
return HttpResponse(code=u'404 Not Found')
|
||||
|
|
Loading…
Reference in New Issue