From cce8556b45baacd75a8ae4266a50982a320b882d Mon Sep 17 00:00:00 2001 From: Jonathan Corwin Date: Wed, 4 May 2011 23:34:43 +0100 Subject: [PATCH 1/4] remote browser: detect change of song, and Android browser ajax cache issue --- openlp/plugins/remotes/html/openlp.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/openlp/plugins/remotes/html/openlp.js b/openlp/plugins/remotes/html/openlp.js index cff36b42c..a553dd805 100644 --- a/openlp/plugins/remotes/html/openlp.js +++ b/openlp/plugins/remotes/html/openlp.js @@ -112,6 +112,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")) { @@ -125,10 +126,14 @@ window.OpenLP = { item.attr("data-theme", "e").removeClass("ui-btn-up-c").addClass("ui-btn-up-e"); return false; } - }); + }); $("#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 () { @@ -200,5 +205,6 @@ $("#controller-unblank").live("click", OpenLP.unblankDisplay); // Alerts $("#alert-submit").live("click", OpenLP.showAlert); // Poll the server twice a second to get any updates. +$.ajaxSetup({ cache: false }); setInterval("OpenLP.pollServer();", 500); OpenLP.pollServer(); From 9388055376c12676a5ed6329f52b487bc1967221 Mon Sep 17 00:00:00 2001 From: Jonathan Corwin Date: Wed, 4 May 2011 23:42:35 +0100 Subject: [PATCH 2/4] where did that space come from? --- openlp/plugins/remotes/html/openlp.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openlp/plugins/remotes/html/openlp.js b/openlp/plugins/remotes/html/openlp.js index a553dd805..6105fbb21 100644 --- a/openlp/plugins/remotes/html/openlp.js +++ b/openlp/plugins/remotes/html/openlp.js @@ -126,7 +126,7 @@ window.OpenLP = { item.attr("data-theme", "e").removeClass("ui-btn-up-c").addClass("ui-btn-up-e"); return false; } - }); + }); $("#service-manager div[data-role=content] ul[data-role=listview]").listview("refresh"); } if ($("#slide-controller").is(":visible")) { From de9754caf1ff494c01ddb7c95512919e4da2afb1 Mon Sep 17 00:00:00 2001 From: Jonathan Corwin Date: Thu, 5 May 2011 19:48:11 +0100 Subject: [PATCH 3/4] Well one standard learnt. Probably a few more to go... --- openlp/plugins/remotes/html/openlp.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openlp/plugins/remotes/html/openlp.js b/openlp/plugins/remotes/html/openlp.js index 6105fbb21..e6efbb2c5 100644 --- a/openlp/plugins/remotes/html/openlp.js +++ b/openlp/plugins/remotes/html/openlp.js @@ -130,7 +130,7 @@ window.OpenLP = { $("#service-manager div[data-role=content] ul[data-role=listview]").listview("refresh"); } if ($("#slide-controller").is(":visible")) { - if(prevItem != OpenLP.currentItem) { + if (prevItem != OpenLP.currentItem) { OpenLP.loadController(); return; } From de54c419ce30298aec39acf53753e8682cacd40d Mon Sep 17 00:00:00 2001 From: Andreas Preikschat Date: Fri, 6 May 2011 06:36:22 +0200 Subject: [PATCH 4/4] fixed songshowplus importer --- openlp/plugins/songs/lib/songshowplusimport.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openlp/plugins/songs/lib/songshowplusimport.py b/openlp/plugins/songs/lib/songshowplusimport.py index 9fdc5804a..a3401a8b9 100644 --- a/openlp/plugins/songs/lib/songshowplusimport.py +++ b/openlp/plugins/songs/lib/songshowplusimport.py @@ -97,7 +97,7 @@ class SongShowPlusImport(SongImport): """ Receive a single file or a list of files to import. """ - if isinstance(self.import_source, list): + if not isinstance(self.import_source, list): return self.import_wizard.progressBar.setMaximum(len(self.import_source)) for file in self.import_source: