Fix the alerts not being sent.

This commit is contained in:
Raoul Snyman 2010-05-31 22:07:27 +02:00
parent b5af6bb5b9
commit 07d402ee59
2 changed files with 13 additions and 7 deletions

View File

@ -140,7 +140,7 @@ OpenLP.Namespace.create("OpenLP.Remote", {
var args = {}; var args = {};
if (eventData != null && eventData != "") if (eventData != null && eventData != "")
{ {
args.q = $.parseJSON(eventData); args.q = escape(eventData);
} }
$.ajax({ $.ajax({
url: url, url: url,

View File

@ -250,13 +250,19 @@ class HttpConnection(object):
def process_request(self, event, params): def process_request(self, event, params):
""" """
Client has requested data. Send the signal and parameters for openlp Client has requested data. Send the signal and parameters for openlp
to handle, then listen out for a corresponding _request signal to handle, then listen out for a corresponding ``_request`` signal
which will have the data to return. which will have the data to return.
For most event timeout after 10 seconds (i.e. incase the signal
recipient isn't listening) For most events, timeout after 10 seconds (i.e. in case the signal
remotes_poll_request is a special case, this is a ajax long poll which recipient isn't listening). ``remotes_poll_request`` is a special case
is just waiting for slide change/song change activity. This can wait however, this is a ajax long poll which is just waiting for slide
longer (one minute) change/song change activity. This can wait longer (one minute).
``event``
The event from the web page.
``params``
Parameters sent with the event.
""" """
log.debug(u'Processing request %s' % event) log.debug(u'Processing request %s' % event)
if not event.endswith(u'_request'): if not event.endswith(u'_request'):