forked from openlp/openlp
r1522
This commit is contained in:
commit
3a4afcba4c
|
@ -112,6 +112,7 @@ window.OpenLP = {
|
||||||
$.getJSON(
|
$.getJSON(
|
||||||
"/api/poll",
|
"/api/poll",
|
||||||
function (data, status) {
|
function (data, status) {
|
||||||
|
var prevItem = OpenLP.currentItem;
|
||||||
OpenLP.currentSlide = data.results.slide;
|
OpenLP.currentSlide = data.results.slide;
|
||||||
OpenLP.currentItem = data.results.item;
|
OpenLP.currentItem = data.results.item;
|
||||||
if ($("#service-manager").is(":visible")) {
|
if ($("#service-manager").is(":visible")) {
|
||||||
|
@ -129,6 +130,10 @@ window.OpenLP = {
|
||||||
$("#service-manager div[data-role=content] ul[data-role=listview]").listview("refresh");
|
$("#service-manager div[data-role=content] ul[data-role=listview]").listview("refresh");
|
||||||
}
|
}
|
||||||
if ($("#slide-controller").is(":visible")) {
|
if ($("#slide-controller").is(":visible")) {
|
||||||
|
if (prevItem != OpenLP.currentItem) {
|
||||||
|
OpenLP.loadController();
|
||||||
|
return;
|
||||||
|
}
|
||||||
var idx = 0;
|
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").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 () {
|
$("#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
|
// Alerts
|
||||||
$("#alert-submit").live("click", OpenLP.showAlert);
|
$("#alert-submit").live("click", OpenLP.showAlert);
|
||||||
// Poll the server twice a second to get any updates.
|
// Poll the server twice a second to get any updates.
|
||||||
|
$.ajaxSetup({ cache: false });
|
||||||
setInterval("OpenLP.pollServer();", 500);
|
setInterval("OpenLP.pollServer();", 500);
|
||||||
OpenLP.pollServer();
|
OpenLP.pollServer();
|
||||||
|
|
|
@ -97,7 +97,7 @@ class SongShowPlusImport(SongImport):
|
||||||
"""
|
"""
|
||||||
Receive a single file or a list of files to import.
|
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
|
return
|
||||||
self.import_wizard.progressBar.setMaximum(len(self.import_source))
|
self.import_wizard.progressBar.setMaximum(len(self.import_source))
|
||||||
for file in self.import_source:
|
for file in self.import_source:
|
||||||
|
|
Loading…
Reference in New Issue