From 57101afef29c84e98d936985119d2486b6da556f Mon Sep 17 00:00:00 2001 From: Andreas Preikschat Date: Wed, 10 Oct 2012 17:33:44 +0200 Subject: [PATCH] fixed bug #1065106 'Change in mainwindow are not reflected in remote' Fixes: https://launchpad.net/bugs/1065106 --- openlp/plugins/remotes/html/openlp.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/openlp/plugins/remotes/html/openlp.js b/openlp/plugins/remotes/html/openlp.js index 26c13d2f1..87c82c5b4 100644 --- a/openlp/plugins/remotes/html/openlp.js +++ b/openlp/plugins/remotes/html/openlp.js @@ -55,7 +55,9 @@ window.OpenLP = { ); }, loadService: function (event) { - event.preventDefault(); + if (event) { + event.preventDefault(); + } $.getJSON( "/api/service/list", function (data, status) { @@ -150,6 +152,10 @@ window.OpenLP = { OpenLP.currentSlide = data.results.slide; OpenLP.currentItem = data.results.item; if ($("#service-manager").is(":visible")) { + if (OpenLP.currentService != data.results.service) { + OpenLP.currentService = data.results.service; + OpenLP.loadService(); + } $("#service-manager div[data-role=content] ul[data-role=listview] li").attr("data-theme", "c").removeClass("ui-btn-up-e").addClass("ui-btn-up-c"); $("#service-manager div[data-role=content] ul[data-role=listview] li a").each(function () { var item = $(this); @@ -307,7 +313,7 @@ window.OpenLP = { } ); }, - escapeString: function (string) { + escapeString: function (string) { return string.replace(/\\/g, "\\\\").replace(/"/g, "\\\"") } }