diff --git a/airtime_mvc/public/js/airtime/preferences/streamsetting.js b/airtime_mvc/public/js/airtime/preferences/streamsetting.js index 2bfcdf710..28dd07db1 100644 --- a/airtime_mvc/public/js/airtime/preferences/streamsetting.js +++ b/airtime_mvc/public/js/airtime/preferences/streamsetting.js @@ -231,7 +231,7 @@ function setupEventListeners() { } }) - $('.toggle legend').live('click',function() { + $('.toggle legend').click(function() { $(this).parent().toggleClass('closed'); return false; }); @@ -375,21 +375,6 @@ function setupEventListeners() { at: "right center" }, }) - - $('#stream_save').live('click', function(){ - var confirm_pypo_restart_text = $.i18n._("If you change the username or password values for an enabled stream the playout engine will be rebooted and your listeners will hear silence for 5-10 seconds. Changing the following fields will NOT cause a reboot: Stream Label (Global Settings), and Switch Transition Fade(s), Master Username, and Master Password (Input Stream Settings). If Airtime is recording, and if the change causes a playout engine restart, the recording will be interrupted."); - if (confirm(confirm_pypo_restart_text)) { - var data = $('#stream_form').serialize(); - var url = baseUrl+'/Preference/stream-setting'; - - $.post(url, {format:"json", data: data}, function(data){ - var json = $.parseJSON(data); - $('#content').empty().append(json.html); - setupEventListeners(); - setSliderForReplayGain(); - }); - } - }); } function setSliderForReplayGain(){ @@ -409,5 +394,20 @@ function setSliderForReplayGain(){ $(document).ready(function() { setupEventListeners(); setSliderForReplayGain(); + + $('#stream_save').live('click', function(){ + var confirm_pypo_restart_text = $.i18n._("If you change the username or password values for an enabled stream the playout engine will be rebooted and your listeners will hear silence for 5-10 seconds. Changing the following fields will NOT cause a reboot: Stream Label (Global Settings), and Switch Transition Fade(s), Master Username, and Master Password (Input Stream Settings). If Airtime is recording, and if the change causes a playout engine restart, the recording will be interrupted."); + if (confirm(confirm_pypo_restart_text)) { + var data = $('#stream_form').serialize(); + var url = baseUrl+'/Preference/stream-setting'; + + $.post(url, {format:"json", data: data}, function(data){ + var json = $.parseJSON(data); + $('#content').empty().append(json.html); + setupEventListeners(); + setSliderForReplayGain(); + }); + } + }); });