~wgrant/openlp/openlyrics_test

« back to all changes in this revision

Viewing changes to openlp/plugins/remotes/html/stage.js

  • Committer: Martin Zibricky
  • Date: 2011-10-06 16:16:29 UTC
  • mfrom: (1186.2.584 openlp)
  • Revision ID: mzibr.public@gmail.com-20111006161629-17tyvvq60h3h15dd
[merge] r1770, rename testing dir to tests

Show diffs side-by-side

added added

removed removed

Lines of Context:
121
121
      $("#nextslide").html(text);
122
122
    }
123
123
  },
124
 
  updateClock: function() {
 
124
  updateClock: function(data) {
125
125
    var div = $("#clock");
126
126
    var t = new Date();
127
127
    var h = t.getHours();
128
 
    if (h > 12)
 
128
    if (data.results.twelve && h > 12)
129
129
      h = h - 12;
130
130
    var m = t.getMinutes();
131
131
    if (m < 10)
136
136
    $.getJSON(
137
137
      "/api/poll",
138
138
      function (data, status) {
139
 
        OpenLP.updateClock();
 
139
        OpenLP.updateClock(data);
140
140
        if (OpenLP.currentItem != data.results.item) {
141
141
          OpenLP.currentItem = data.results.item;
142
142
          OpenLP.loadSlides();