From 8e86f21cbd2eaad71e581ba46eb01ef2ac4b2f5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Nau?= Date: Sun, 27 Nov 2011 21:39:39 +0200 Subject: [PATCH] Service notes are not displayed on stage remote view when the current service item is the last. --- openlp/plugins/remotes/html/stage.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/openlp/plugins/remotes/html/stage.js b/openlp/plugins/remotes/html/stage.js index 8db92b39a..925a850a4 100644 --- a/openlp/plugins/remotes/html/stage.js +++ b/openlp/plugins/remotes/html/stage.js @@ -30,10 +30,11 @@ window.OpenLP = { $("#notes").html(""); for (idx in data.results.items) { idx = parseInt(idx, 10); - 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"]; + if (data.results.items[idx]["selected"]) { + $("#notes").html(data.results.items[idx]["notes"].replace(/\n/g, "
")); + if (data.results.items.length > idx + 1) { + OpenLP.nextSong = data.results.items[idx + 1]["title"]; + } break; } }