Merge branch 'devel' of dev.sourcefabric.org:airtime into devel
This commit is contained in:
commit
a5e7c0197f
106 changed files with 8649 additions and 1389 deletions
|
@ -453,52 +453,27 @@ function setCurrentUserPseudoPassword() {
|
|||
$(document).ready(function() {
|
||||
if ($('#master-panel').length > 0)
|
||||
init();
|
||||
|
||||
var timer;
|
||||
|
||||
$('.tipsy').live('mouseover', function() {
|
||||
clearTimeout(timer);
|
||||
});
|
||||
|
||||
$('.tipsy').live('mouseout', function() {
|
||||
timer = setTimeout("$('#current-user').tipsy('hide')", 500);
|
||||
});
|
||||
|
||||
$('#current-user').bind('mouseover', function() {
|
||||
setCurrentUserPseudoPassword();
|
||||
|
||||
$('#current-user').live('click', function() {
|
||||
$.ajax({
|
||||
url: baseUrl+'/user/edit-user/format/json',
|
||||
success: function(json) {
|
||||
$('#current-user').tipsy({
|
||||
gravity: 'n',
|
||||
html: true,
|
||||
fade: true,
|
||||
opacity: 0.9,
|
||||
trigger: 'manual',
|
||||
title: function() {
|
||||
return json.html;
|
||||
}
|
||||
});
|
||||
},
|
||||
cache: false,
|
||||
complete: function() {
|
||||
$('#current-user').tipsy('show');
|
||||
setCurrentUserPseudoPassword();
|
||||
}
|
||||
url: baseUrl+'/user/edit-user/format/json'
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
$('#current-user').bind('mouseout', function() {
|
||||
timer = setTimeout("$('#current-user').tipsy('hide')", 500);
|
||||
});
|
||||
|
||||
|
||||
$('#cu_save_user').live('click', function() {
|
||||
var data = $('#current-user-form').serialize();
|
||||
$.post(baseUrl+'/user/edit-user', {format: 'json', data: data}, function(data) {
|
||||
var json = $.parseJSON(data);
|
||||
$('.tipsy-inner').empty().append(json.html);
|
||||
$('.edit-current-user').parent().empty().append(json.html);
|
||||
setCurrentUserPseudoPassword();
|
||||
setTimeout(removeSuccessMsg, 5000);
|
||||
});
|
||||
});
|
||||
|
||||
// When the 'Listen' button is clicked we set the width
|
||||
// of the share button to the width of the 'Live Stream'
|
||||
// text. This differs depending on the language setting
|
||||
$('#popup-link').css('width', $('.jp-container h1').css('width'));
|
||||
|
||||
});
|
||||
|
|
|
@ -558,20 +558,18 @@ var AIRTIME = (function(AIRTIME) {
|
|||
// add the play function to the library_type td
|
||||
$(nRow).find('td.library_type').click(function(){
|
||||
if (aData.ftype === 'playlist' && aData.length !== '0.0'){
|
||||
playlistIndex = $(this).parent().attr('id').substring(3); // remove
|
||||
// the
|
||||
// pl_
|
||||
playlistIndex = $(this).parent().attr('id').substring(3);
|
||||
open_playlist_preview(playlistIndex, 0);
|
||||
} else if (aData.ftype === 'audioclip') {
|
||||
if (isAudioSupported(aData.mime)) {
|
||||
open_audio_preview(aData.ftype, aData.audioFile, aData.track_title, aData.artist_name);
|
||||
}
|
||||
} else if (aData.ftype == 'stream') {
|
||||
open_audio_preview(aData.ftype, aData.audioFile, aData.track_title, aData.artist_name);
|
||||
if (isAudioSupported(aData.mime)) {
|
||||
open_audio_preview(aData.ftype, aData.audioFile, aData.track_title, aData.artist_name);
|
||||
}
|
||||
} else if (aData.ftype == 'block' && aData.bl_type == 'static') {
|
||||
blockIndex = $(this).parent().attr('id').substring(3); // remove
|
||||
// the
|
||||
// bl_
|
||||
blockIndex = $(this).parent().attr('id').substring(3);
|
||||
open_block_preview(blockIndex, 0);
|
||||
}
|
||||
return false;
|
||||
|
@ -915,6 +913,16 @@ var AIRTIME = (function(AIRTIME) {
|
|||
soundcloud.view.callback = callback;
|
||||
}
|
||||
}
|
||||
// add callbacks for duplicate menu items.
|
||||
if (oItems.duplicate !== undefined) {
|
||||
var url = oItems.duplicate.url;
|
||||
callback = function() {
|
||||
$.post(url, {format: "json", id: data.id }, function(json){
|
||||
oTable.fnStandingRedraw();
|
||||
});
|
||||
};
|
||||
oItems.duplicate.callback = callback;
|
||||
}
|
||||
// remove 'Add to smart block' option if the current
|
||||
// block is dynamic
|
||||
if ($('input:radio[name=sp_type]:checked').val() === "1") {
|
||||
|
@ -1043,6 +1051,9 @@ function addQtipToSCIcons(){
|
|||
my: "left top",
|
||||
viewport: $(window)
|
||||
},
|
||||
style: {
|
||||
classes: "ui-tooltip-dark file-md-long"
|
||||
},
|
||||
show: {
|
||||
ready: true // Needed to make it show on first mouseover
|
||||
// event
|
||||
|
@ -1072,6 +1083,9 @@ function addQtipToSCIcons(){
|
|||
my: "left top",
|
||||
viewport: $(window)
|
||||
},
|
||||
style: {
|
||||
classes: "ui-tooltip-dark file-md-long"
|
||||
},
|
||||
show: {
|
||||
ready: true // Needed to make it show on first mouseover
|
||||
// event
|
||||
|
@ -1101,6 +1115,9 @@ function addQtipToSCIcons(){
|
|||
my: "left top",
|
||||
viewport: $(window)
|
||||
},
|
||||
style: {
|
||||
classes: "ui-tooltip-dark file-md-long"
|
||||
},
|
||||
show: {
|
||||
ready: true // Needed to make it show on first mouseover
|
||||
// event
|
||||
|
|
|
@ -94,17 +94,25 @@ var AIRTIME = (function(AIRTIME) {
|
|||
"oTableTools": {
|
||||
"sSwfPath": baseUrl+"/js/datatables/plugin/TableTools/swf/copy_cvs_xls_pdf.swf",
|
||||
"aButtons": [
|
||||
"copy",
|
||||
{
|
||||
"sExtends": "csv",
|
||||
"fnClick": setFlashFileName
|
||||
},
|
||||
{
|
||||
"sExtends": "pdf",
|
||||
"fnClick": setFlashFileName
|
||||
},
|
||||
"print"
|
||||
]
|
||||
{
|
||||
"sExtends": "copy",
|
||||
"fnComplete": function(nButton, oConfig, oFlash, text) {
|
||||
var lines = text.split('\n').length,
|
||||
len = this.s.dt.nTFoot === null ? lines-1 : lines-2,
|
||||
plural = (len==1) ? "" : "s";
|
||||
alert(sprintf($.i18n._('Copied %s row%s to the clipboard'), len, plural));
|
||||
}
|
||||
},
|
||||
{
|
||||
"sExtends": "csv",
|
||||
"fnClick": setFlashFileName
|
||||
},
|
||||
{
|
||||
"sExtends": "pdf",
|
||||
"fnClick": setFlashFileName
|
||||
},
|
||||
"print"
|
||||
]
|
||||
}
|
||||
});
|
||||
oTable.fnSetFilteringDelay(350);
|
||||
|
|
|
@ -80,20 +80,6 @@ function setMsAuthenticationFieldsReadonly(ele) {
|
|||
}
|
||||
}
|
||||
|
||||
function setSliderForReplayGain(){
|
||||
$( "#slider-range-max" ).slider({
|
||||
range: "max",
|
||||
min: 0,
|
||||
max: 10,
|
||||
value: $("#rg_modifier_value").html(),
|
||||
slide: function( event, ui ) {
|
||||
$( "#replayGainModifier" ).val( ui.value );
|
||||
$("#rg_modifier_value").html(ui.value);
|
||||
}
|
||||
});
|
||||
$( "#replayGainModifier" ).val( $( "#slider-range-max" ).slider( "value" ) );
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
$('.collapsible-header').live('click',function() {
|
||||
|
@ -111,7 +97,6 @@ $(document).ready(function() {
|
|||
$('#content').empty().append(json.html);
|
||||
setTimeout(removeSuccessMsg, 5000);
|
||||
showErrorSections();
|
||||
setSliderForReplayGain();
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -121,6 +106,4 @@ $(document).ready(function() {
|
|||
setSystemFromEmailReadonly();
|
||||
setConfigureMailServerListener();
|
||||
setEnableSystemEmailsListener();
|
||||
|
||||
setSliderForReplayGain();
|
||||
});
|
||||
|
|
|
@ -39,8 +39,8 @@ function restrictOggBitrate(ele, on){
|
|||
div.find("select[id$=data-bitrate]").find("option[value='24']").attr("disabled","disabled");
|
||||
div.find("select[id$=data-bitrate]").find("option[value='32']").attr("disabled","disabled");
|
||||
}else{
|
||||
div.find("select[id$=data-bitrate]").find("option[value='24']").attr("disabled","");
|
||||
div.find("select[id$=data-bitrate]").find("option[value='32']").attr("disabled","");
|
||||
div.find("select[id$=data-bitrate]").find("option[value='24']").removeAttr("disabled");
|
||||
div.find("select[id$=data-bitrate]").find("option[value='32']").removeAttr("disabled");
|
||||
}
|
||||
}
|
||||
function hideForShoutcast(ele){
|
||||
|
@ -231,7 +231,7 @@ function setupEventListeners() {
|
|||
}
|
||||
})
|
||||
|
||||
$('.toggle legend').live('click',function() {
|
||||
$('.toggle legend').click(function() {
|
||||
$(this).parent().toggleClass('closed');
|
||||
return false;
|
||||
});
|
||||
|
@ -355,6 +355,27 @@ function setupEventListeners() {
|
|||
},
|
||||
})
|
||||
|
||||
$(".admin_username_help_icon").qtip({
|
||||
content: {
|
||||
text: $.i18n._("This is the admin username and password for Icecast/SHOUTcast to get listener statistics.")
|
||||
},
|
||||
hide: {
|
||||
delay: 500,
|
||||
fixed: true
|
||||
},
|
||||
style: {
|
||||
border: {
|
||||
width: 0,
|
||||
radius: 4
|
||||
},
|
||||
classes: "ui-tooltip-dark ui-tooltip-rounded"
|
||||
},
|
||||
position: {
|
||||
my: "left bottom",
|
||||
at: "right center"
|
||||
},
|
||||
})
|
||||
|
||||
$(".master_username_help_icon").qtip({
|
||||
content: {
|
||||
text: $.i18n._("If your live streaming client does not ask for a username, this field should be 'source'.")
|
||||
|
@ -375,6 +396,25 @@ function setupEventListeners() {
|
|||
at: "right center"
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
function setSliderForReplayGain(){
|
||||
$( "#slider-range-max" ).slider({
|
||||
range: "max",
|
||||
min: -10,
|
||||
max: 10,
|
||||
value: $("#rg_modifier_value").html(),
|
||||
slide: function( event, ui ) {
|
||||
$( "#replayGainModifier" ).val( ui.value );
|
||||
$("#rg_modifier_value").html(ui.value);
|
||||
}
|
||||
});
|
||||
$( "#replayGainModifier" ).val( $( "#slider-range-max" ).slider( "value" ) );
|
||||
}
|
||||
|
||||
$(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.");
|
||||
|
@ -386,12 +426,9 @@ function setupEventListeners() {
|
|||
var json = $.parseJSON(data);
|
||||
$('#content').empty().append(json.html);
|
||||
setupEventListeners();
|
||||
setSliderForReplayGain();
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
setupEventListeners();
|
||||
});
|
||||
|
||||
|
|
|
@ -252,40 +252,28 @@ function eventRender(event, element, view) {
|
|||
} else if (view.name === 'month' && event.record === 1 && event.soundcloud_id === -3) {
|
||||
$(element).find(".fc-event-title").after('<span id="'+event.id+'" class="small-icon recording"></span><span id="'+event.id+'" class="small-icon sc-error"></span>');
|
||||
}
|
||||
|
||||
//add scheduled show content empty icon
|
||||
//addIcon = checkEmptyShowStatus(event);
|
||||
//if (!addIcon) {
|
||||
if (view.name === 'agendaDay' || view.name === 'agendaWeek') {
|
||||
if (event.show_empty === 1 && event.record === 0 && event.rebroadcast === 0) {
|
||||
if (event.soundcloud_id === -1) {
|
||||
$(element)
|
||||
.find(".fc-event-time")
|
||||
.before('<span id="'+event.id+'" title="'+$.i18n._("Show is empty")+'" class="small-icon show-empty"></span>');
|
||||
} else if (event.soundcloud_id > 0) {
|
||||
|
||||
} else if (event.soundcloud_id === -2) {
|
||||
|
||||
} else if (event.soundcloud_id === -3) {
|
||||
|
||||
}
|
||||
}
|
||||
} else if (view.name === 'month') {
|
||||
if (event.show_empty === 1 && event.record === 0 && event.rebroadcast === 0) {
|
||||
if (event.soundcloud_id === -1) {
|
||||
$(element)
|
||||
.find(".fc-event-title")
|
||||
.after('<span id="'+event.id+'" title="'+$.i18n._("Show is empty")+'" class="small-icon show-empty"></span>');
|
||||
} else if (event.soundcloud_id > 0) {
|
||||
|
||||
} else if (event.soundcloud_id === -2) {
|
||||
|
||||
} else if (event.soundcloud_id === -3) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (view.name === 'agendaDay' || view.name === 'agendaWeek') {
|
||||
if (event.show_empty === 1 && event.record === 0 && event.rebroadcast === 0) {
|
||||
$(element)
|
||||
.find(".fc-event-time")
|
||||
.before('<span id="'+event.id+'" class="small-icon show-empty"></span>');
|
||||
} else if (event.show_partial_filled === true) {
|
||||
$(element)
|
||||
.find(".fc-event-time")
|
||||
.before('<span id="'+event.id+'" class="small-icon show-partial-filled"></span>');
|
||||
}
|
||||
//}
|
||||
} else if (view.name === 'month') {
|
||||
if (event.show_empty === 1 && event.record === 0 && event.rebroadcast === 0) {
|
||||
$(element)
|
||||
.find(".fc-event-title")
|
||||
.after('<span id="'+event.id+'" title="'+$.i18n._("Show is empty")+'" class="small-icon show-empty"></span>');
|
||||
} else if (event.show_partial_filled === true) {
|
||||
$(element)
|
||||
.find(".fc-event-title")
|
||||
.after('<span id="'+event.id+'" title="'+$.i18n._("Show is partially filled")+'" class="small-icon show-partial-filled"></span>');
|
||||
}
|
||||
}
|
||||
|
||||
//rebroadcast icon
|
||||
if((view.name === 'agendaDay' || view.name === 'agendaWeek') && event.rebroadcast === 1) {
|
||||
|
@ -300,7 +288,7 @@ function eventRender(event, element, view) {
|
|||
function eventAfterRender( event, element, view ) {
|
||||
|
||||
$(element).find(".small-icon").live('mouseover',function(){
|
||||
addQtipToSCIcons($(this));
|
||||
addQtipsToIcons($(this));
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -418,7 +406,8 @@ function getCurrentShow(){
|
|||
});
|
||||
}
|
||||
|
||||
function addQtipToSCIcons(ele){
|
||||
|
||||
function addQtipsToIcons(ele){
|
||||
var id = $(ele).attr("id");
|
||||
|
||||
if($(ele).hasClass("progress")){
|
||||
|
@ -435,6 +424,9 @@ function addQtipToSCIcons(ele){
|
|||
my: "left top",
|
||||
viewport: $(window)
|
||||
},
|
||||
style: {
|
||||
classes: "ui-tooltip-dark file-md-long"
|
||||
},
|
||||
show: {
|
||||
ready: true // Needed to make it show on first mouseover event
|
||||
}
|
||||
|
@ -446,7 +438,7 @@ function addQtipToSCIcons(ele){
|
|||
ajax: {
|
||||
url: baseUrl+"/Library/get-upload-to-soundcloud-status",
|
||||
type: "post",
|
||||
data: ({format: "json", id : id, type: "file"}),
|
||||
data: ({format: "json", id : id, type: "show"}),
|
||||
success: function(json, status){
|
||||
this.set('content.text', $.i18n._("The soundcloud id for this file is: ")+json.sc_id);
|
||||
}
|
||||
|
@ -461,6 +453,9 @@ function addQtipToSCIcons(ele){
|
|||
my: "left top",
|
||||
viewport: $(window)
|
||||
},
|
||||
style: {
|
||||
classes: "ui-tooltip-dark file-md-long"
|
||||
},
|
||||
show: {
|
||||
ready: true // Needed to make it show on first mouseover event
|
||||
}
|
||||
|
@ -488,6 +483,9 @@ function addQtipToSCIcons(ele){
|
|||
my: "left top",
|
||||
viewport: $(window)
|
||||
},
|
||||
style: {
|
||||
classes: "ui-tooltip-dark file-md-long"
|
||||
},
|
||||
show: {
|
||||
ready: true // Needed to make it show on first mouseover event
|
||||
}
|
||||
|
@ -506,45 +504,36 @@ function addQtipToSCIcons(ele){
|
|||
my: "left top",
|
||||
viewport: $(window)
|
||||
},
|
||||
style: {
|
||||
classes: "ui-tooltip-dark file-md-long"
|
||||
},
|
||||
show: {
|
||||
ready: true // Needed to make it show on first mouseover event
|
||||
}
|
||||
});
|
||||
} else if ($(ele).hasClass("show-partial-filled")){
|
||||
$(ele).qtip({
|
||||
content: {
|
||||
text: $.i18n._("This show is not completely filled with content.")
|
||||
},
|
||||
position:{
|
||||
adjust: {
|
||||
resize: true,
|
||||
method: "flip flip"
|
||||
},
|
||||
at: "right center",
|
||||
my: "left top",
|
||||
viewport: $(window)
|
||||
},
|
||||
style: {
|
||||
classes: "ui-tooltip-dark file-md-long"
|
||||
},
|
||||
show: {
|
||||
ready: true // Needed to make it show on first mouseover event
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/* This functions does two things:
|
||||
* 1. Checks if each event(i.e. a show) is over and removes the show empty icon if it is
|
||||
* 2. Else, if an event is passed in, it checks if the event(i.e. a show) is over
|
||||
* This gets checked when we are deciding if the show-empty icon should be added
|
||||
* at the beginning of an event render callback.
|
||||
*/
|
||||
/*
|
||||
function checkEmptyShowStatus(e) {
|
||||
var currDate = new Date();
|
||||
var endTime;
|
||||
|
||||
if (e === undefined) {
|
||||
var events = $('#schedule_calendar').fullCalendar('clientEvents');
|
||||
|
||||
$.each(events, function(i, event){
|
||||
endTime = event.end;
|
||||
$emptyIcon = $("span[id="+event.id+"][class='small-icon show-empty']");
|
||||
if (currDate.getTime() > endTime.getTime() && $emptyIcon.length === 1) {
|
||||
$emptyIcon.remove();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
endTime = e.end;
|
||||
var showOver = false;
|
||||
if (currDate.getTime() > endTime.getTime()) {
|
||||
showOver = true;
|
||||
}
|
||||
return showOver;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
//Alert the error and reload the page
|
||||
//this function is used to resolve concurrency issue
|
||||
function alertShowErrorAndReload(){
|
||||
|
@ -555,7 +544,6 @@ function alertShowErrorAndReload(){
|
|||
$(document).ready(function(){
|
||||
setInterval( "checkSCUploadStatus()", 5000 );
|
||||
setInterval( "getCurrentShow()", 5000 );
|
||||
//setInterval( "checkEmptyShowStatus()", 5000 );
|
||||
});
|
||||
|
||||
var view_name;
|
||||
|
|
|
@ -122,7 +122,7 @@ $(document).ready(function() {
|
|||
case 'P':
|
||||
$(this).attr('id', 'user-type-P');
|
||||
$(this).attr('user-rights',
|
||||
$.i18n._('Progam Managers can do the following:')+'<br><br>'+
|
||||
$.i18n._('Program Managers can do the following:')+'<br><br>'+
|
||||
$.i18n._('View schedule')+'<br>'+
|
||||
$.i18n._('View and manage show content')+'<br>'+
|
||||
$.i18n._('Schedule shows')+'<br>'+
|
||||
|
@ -193,4 +193,7 @@ $(document).ready(function() {
|
|||
});
|
||||
});
|
||||
|
||||
$("dt[id$='label']").addClass('user-form-label');
|
||||
$("dd[id$='element']").addClass('user-form-element');
|
||||
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue