% metaTitle = @room.metadata.all.select{ |m| m.name == configatron.metadata.title }.first %> <% metaDesc = @room.metadata.all.select{ |m| m.name == configatron.metadata.description }.first %> <%= content_for :javascript do %> $("a#edit_bbb_room").fancybox({ 'hideOnContentClick' : false, 'frameWidth' : 450, 'frameHeight' : 430 }); $("#edit-bbb-room #private").livequery('click', function(event) { $('#edit-bbb-room .passwords').toggle(0); if ($("#private").is(':checked')) { $('#moderatorPW').removeAttr('disabled'); $('#attendeePW').removeAttr('disabled'); } else{ $('#moderatorPW').attr('disabled', true); $('#attendeePW').attr('disabled', true); } }); $("#new-webconf-room #private").livequery('click', function(event) { $('#new_room_private_area').toggle(0); if ($(this).is(':checked')) { $('#moderatorPW').removeAttr('disabled'); $('#attendeePW').removeAttr('disabled'); } else { $('#moderatorPW').attr('disabled', true); $('#attendeePW').attr('disabled', true); } }); recListUpdateStart = function() { $("#update-recordings-loading").show(); } recListUpdateEnd = function(error) { $("#update-recordings-loading").hide(); if (error) { $("#update-recordings-error").show(); window.setTimeout(function() { $("#update-recordings-error").hide(); }, 5000); $("#recording-list-wrapper").effect("highlight", { color: "#ff0000"}, 5000); } else { $("#update-recordings-success").show(); window.setTimeout(function() { $("#update-recordings-success").hide(); }, 5000); $("#recording-list-wrapper").effect("highlight", { color: "#00ff00"}, 5000); } } recListUpdateStart(); $.post("<%= fetch_recordings_bigbluebutton_room_path(@room, :format => 'json') %>", { authenticity_token: "<%= form_authenticity_token() %>" }, null, "html").fail(function(e) { recListUpdateEnd(true); }).success(function(data) { $.get("<%= recordings_home_path(:partial => '1', :limit => 3) %>", { authenticity_token: "<%= form_authenticity_token() %>" }).fail(function() { recListUpdateEnd(true); }).success(function(data) { recListUpdateEnd(false); if (data.trim() != "") { $("#recording-list-all").show(); $("#recording-list-wrapper").html(data); } else { $("#recording-list-all").hide(); } }); }); <% end %>