← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~googol/openlp/bug-1065106 into lp:openlp

 

Andreas Preikschat has proposed merging lp:~googol/openlp/bug-1065106 into lp:openlp.

Requested reviews:
  OpenLP Core (openlp-core)
Related bugs:
  Bug #1065106 in OpenLP: "Change in mainwindow are not reflected in remote"
  https://bugs.launchpad.net/openlp/+bug/1065106

For more details, see:
https://code.launchpad.net/~googol/openlp/bug-1065106/+merge/128978

Hello,

- fixed bug #1065106 'Change in mainwindow are not reflected in remote'

-- 
https://code.launchpad.net/~googol/openlp/bug-1065106/+merge/128978
Your team OpenLP Core is requested to review the proposed merge of lp:~googol/openlp/bug-1065106 into lp:openlp.
=== modified file 'openlp/plugins/remotes/html/openlp.js'
--- openlp/plugins/remotes/html/openlp.js	2012-06-22 14:14:53 +0000
+++ openlp/plugins/remotes/html/openlp.js	2012-10-10 15:36:25 +0000
@@ -55,7 +55,9 @@
     );
   },
   loadService: function (event) {
-    event.preventDefault();
+    if (event) {
+      event.preventDefault();
+    }
     $.getJSON(
       "/api/service/list",
       function (data, status) {
@@ -150,6 +152,10 @@
         OpenLP.currentSlide = data.results.slide;
         OpenLP.currentItem = data.results.item;
         if ($("#service-manager").is(":visible")) {
+          if (OpenLP.currentService != data.results.service) {
+            OpenLP.currentService = data.results.service;
+            OpenLP.loadService();
+          }
           $("#service-manager div[data-role=content] ul[data-role=listview] li").attr("data-theme", "c").removeClass("ui-btn-up-e").addClass("ui-btn-up-c");
           $("#service-manager div[data-role=content] ul[data-role=listview] li a").each(function () {
             var item = $(this);
@@ -307,7 +313,7 @@
       }
     );
   },
-  escapeString: function (string) { 
+  escapeString: function (string) {
     return string.replace(/\\/g, "\\\\").replace(/"/g, "\\\"")
   }
 }


Follow ups