From 2d5d16b40b2cd37cf462f246dd69d7db79d940c1 Mon Sep 17 00:00:00 2001 From: Jonathan Corwin Date: Tue, 17 May 2011 23:00:50 +0100 Subject: [PATCH] Return filename in text for non-text types. Display verse tag in remote view --- openlp/plugins/remotes/html/openlp.js | 4 +++- openlp/plugins/remotes/lib/httpserver.py | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/openlp/plugins/remotes/html/openlp.js b/openlp/plugins/remotes/html/openlp.js index 57c770447..4eee047a4 100644 --- a/openlp/plugins/remotes/html/openlp.js +++ b/openlp/plugins/remotes/html/openlp.js @@ -76,7 +76,9 @@ window.OpenLP = { var ul = $("#slide-controller > div[data-role=content] > ul[data-role=listview]"); ul.html(""); for (idx in data.results.slides) { - var text = data.results.slides[idx]["text"]; + var text = data.results.slides[idx]["tag"]; + if (text != "") text = text + ": "; + text = text + data.results.slides[idx]["text"]; text = text.replace(/\n/g, '
'); var li = $("
  • ").append( $("").attr("value", parseInt(idx, 10)).html(text)); diff --git a/openlp/plugins/remotes/lib/httpserver.py b/openlp/plugins/remotes/lib/httpserver.py index 224a2513e..351e7f905 100644 --- a/openlp/plugins/remotes/lib/httpserver.py +++ b/openlp/plugins/remotes/lib/httpserver.py @@ -412,8 +412,8 @@ class HttpConnection(object): item[u'html'] = unicode(frame[u'html']) else: item[u'tag'] = unicode(index + 1) - item[u'text'] = u'' - item[u'html'] = u'' + item[u'text'] = unicode(frame[u'title']) + item[u'html'] = unicode(frame[u'title']) item[u'selected'] = (self.parent.current_slide == index) data.append(item) json_data = {u'results': {u'slides': data}}