From bbbbc0e1c7a20b4e05e018a57d98f8994bcb6e82 Mon Sep 17 00:00:00 2001 From: Daniel Gustafsson Date: Fri, 7 Sep 2018 12:01:51 +0200 Subject: [PATCH] Fix rendering of offline schedule The offline code was using the deprecated .live function which was removed in jQuery 1.9. This is a follow-up commit to 53ce8f3304eac which fixed the same bug for sessionvoting. --- template/confreg/mobile/index.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/template/confreg/mobile/index.html b/template/confreg/mobile/index.html index 1aae5f4..c46e8d6 100644 --- a/template/confreg/mobile/index.html +++ b/template/confreg/mobile/index.html @@ -288,7 +288,7 @@ function saveSetting(name, val) { /* * Initialize events */ -$('#index').live('pageinit', function(event) { +$(document).on('pageinit', '#index', function(event){ if (!supports_html5_storage()) { alert('Sorry, this app only works if your browser supports local storage!'); return; @@ -317,15 +317,15 @@ $('#index').live('pageinit', function(event) { }); // Settings form -$('#set_autosync').live('change', function(e) { +$(document).on('change', '#set_autosync', function(e) { saveSetting('autosync', $('#set_autosync').val()); }); -$('#schedule').live('pageinit',function(event){ +$(document).on('pageinit', '#schedule', function(event){ update_schedule(); }); -$('#news').live('pageinit', function(event) { +$(document).on('pageinit', '#news', function(even) { if (localStorage['{{conf.urlname}}_news_unread']) { localStorage['{{conf.urlname}}_news_unread'] = 0; $('#newsunreadcount').text('0'); -- 2.39.5