diff --git a/openlp/plugins/remotes/html/index.html b/openlp/plugins/remotes/html/index.html index 1b053b105..3708db654 100644 --- a/openlp/plugins/remotes/html/index.html +++ b/openlp/plugins/remotes/html/index.html @@ -43,7 +43,6 @@ Service Manager Slide Controller Alerts - Stage View diff --git a/openlp/plugins/remotes/html/openlp.js b/openlp/plugins/remotes/html/openlp.js index 8df369bfd..300a011a8 100644 --- a/openlp/plugins/remotes/html/openlp.js +++ b/openlp/plugins/remotes/html/openlp.js @@ -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 () { diff --git a/openlp/plugins/remotes/html/stage.css b/openlp/plugins/remotes/html/stage.css index 7508a91d7..f4799676f 100644 --- a/openlp/plugins/remotes/html/stage.css +++ b/openlp/plugins/remotes/html/stage.css @@ -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; diff --git a/openlp/plugins/remotes/html/stage.html b/openlp/plugins/remotes/html/stage.html index b41dac904..99090b6f9 100644 --- a/openlp/plugins/remotes/html/stage.html +++ b/openlp/plugins/remotes/html/stage.html @@ -35,7 +35,6 @@
diff --git a/openlp/plugins/remotes/html/stage.js b/openlp/plugins/remotes/html/stage.js index 58088f40f..8b8a83f6a 100644 --- a/openlp/plugins/remotes/html/stage.js +++ b/openlp/plugins/remotes/html/stage.js @@ -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"] + "
"); 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(); diff --git a/openlp/plugins/remotes/lib/httpserver.py b/openlp/plugins/remotes/lib/httpserver.py index 6f0e92518..70f02ff36 100644 --- a/openlp/plugins/remotes/lib/httpserver.py +++ b/openlp/plugins/remotes/lib/httpserver.py @@ -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')