");
+ $("#verseorder span").last().attr("id", "tag" + tags).text(tag);
+ }
+ }
+ }
OpenLP.currentTags[idx] = tags;
- if (data.results.slides[idx]["selected"])
+ if (slide["selected"])
OpenLP.currentSlide = idx;
- }
+ })
OpenLP.loadService();
}
);
},
updateSlide: function() {
+ // Show the current slide on top. Any trailing slides for the same verse
+ // are shown too underneath in grey.
+ // Then leave a blank line between following verses
$("#verseorder span").removeClass("currenttag");
$("#tag" + OpenLP.currentTags[OpenLP.currentSlide]).addClass("currenttag");
var slide = OpenLP.currentSlides[OpenLP.currentSlide];
@@ -78,12 +104,10 @@ window.OpenLP = {
text = "";
if (OpenLP.currentSlide < OpenLP.currentSlides.length - 1) {
for (var idx = OpenLP.currentSlide + 1; idx < OpenLP.currentSlides.length; idx++) {
- var prevslide = slide;
- slide = OpenLP.currentSlides[idx];
- if (slide["tag"] != prevslide["tag"])
+ if (OpenLP.currentTags[idx] != OpenLP.currentTags[idx - 1])
text = text + '';
- text = text + slide["text"];
- if (slide["tag"] != prevslide["tag"])
+ text = text + OpenLP.currentSlides[idx]["text"];
+ if (OpenLP.currentTags[idx] != OpenLP.currentTags[idx - 1])
text = text + '
';
else
text = text + '
';
@@ -91,9 +115,10 @@ window.OpenLP = {
text = text.replace(/\n/g, '
');
$("#nextslide").html(text);
}
- else
+ else {
text = 'Next: ' + OpenLP.nextSong + '
';
$("#nextslide").html(text);
+ }
},
updateClock: function() {
var div = $("#clock");