Merge branch 'devel' into CC-3174

This commit is contained in:
Naomi Aro 2012-01-16 09:58:02 +01:00
commit df33a457b1
31 changed files with 391 additions and 275 deletions

View file

@ -125,6 +125,12 @@ $(document).ready(function() {
rebuildStreamURL($(this))
})
if(!$("#output_sound_device").is(':checked')){
$("select[id=output_sound_device_type]").attr('disabled', 'disabled')
}else{
$("select[id=output_sound_device_type]").removeAttr('disabled')
}
$("#output_sound_device").change(function(){
if($(this).is(':checked')){
$("select[id=output_sound_device_type]").removeAttr('disabled')

View file

@ -33,7 +33,8 @@ function createDateInput(el, onSelect) {
onSelect: onSelect,
dateFormat: 'yy-mm-dd',
closeText: 'Close',
showButtonPanel: true
showButtonPanel: true,
firstDay: weekStart
});
}
@ -190,7 +191,8 @@ function setAddShowEvents() {
minDate: adjustDateToServerDate(new Date(), timezoneOffset),
dateFormat: 'yy-mm-dd',
closeText: 'Close',
showButtonPanel: true
showButtonPanel: true,
firstDay: weekStart
});
form.find('input[name^="add_show_rebroadcast_time"]').timepicker({
amPmText: ['', ''],

View file

@ -86,7 +86,7 @@ function setScheduleDialogEvents(dialog) {
}
function dtRowCallback( nRow, aData, iDisplayIndex, iDisplayIndexFull ) {
var id = "pl_" + aData[0];
var id = "pl_" + aData['id'];
$(nRow).attr("id", id);
@ -125,12 +125,12 @@ function makeScheduleDialog(dialog, json) {
"fnRowCallback": dtRowCallback,
"fnDrawCallback": dtDrawCallback,
"aoColumns": [
/* Id */ { "sName": "pl.id", "bSearchable": false, "bVisible": false },
/* Description */ { "sName": "pl.description", "bVisible": false },
/* Name */ { "sName": "pl.name" },
/* Creator */ { "sName": "pl.creator" },
/* Length */ { "sName": "plt.length" },
/* Editing */ { "sName": "sub.login" }
/* Id */ {"sTitle": "ID", "sName": "pl.id", "bSearchable": false, "bVisible": false, "mDataProp": "id"},
/* Description */ {"sTitle": "Description", "sName": "pl.description", "bSearchable": false, "bVisible": false, "mDataProp": "description"},
/* Name */ {"sTitle": "Title", "sName": "pl.name", "mDataProp": "name"},
/* Creator */ {"sTitle": "Creator", "sName": "pl.creator", "mDataProp": "creator"},
/* Length */ {"sTitle": "Length", "sName": "plt.length", "mDataProp": "length"},
/* Editing */ {"sTitle": "Editing", "sName": "sub.login", "mDataProp": "login"}
],
"aaSorting": [[2,'asc']],
"sPaginationType": "full_numbers",
@ -184,6 +184,16 @@ function confirmCancelShow(show_instance_id){
}
}
function confirmCancelRecordedShow(show_instance_id){
if(confirm('Erase current show and stop recording?')){
var url = "/Schedule/cancel-current-show/id/"+show_instance_id;
$.ajax({
url: url,
success: function(data){scheduleRefetchEvents(data);}
});
}
}
function uploadToSoundCloud(show_instance_id){
var url = "/Schedule/upload-to-sound-cloud";

View file

@ -35,23 +35,23 @@ function removeUserCallback(row_id, nRow){
}
function rowCallback( nRow, aData, iDisplayIndex ){
$(nRow).click(function(){rowClickCallback(aData[0])});
if( aData[5] != "self"){
$('td:eq(4)', nRow).append( '<span class="ui-icon ui-icon-closethick"></span>').children('span').click(function(e){e.stopPropagation(); removeUserCallback(aData[0], nRow)});
$(nRow).click(function(){rowClickCallback(aData['id'])});
if( aData['delete'] != "self"){
$('td:eq(4)', nRow).append( '<span class="ui-icon ui-icon-closethick"></span>').children('span').click(function(e){e.stopPropagation(); removeUserCallback(aData['id'], nRow)});
}else{
$('td:eq(4)', nRow).empty().append( '<span class="ui-icon ui-icon-closethick"></span>').children('span').click(function(e){e.stopPropagation(); alert("Can't delete yourself!")});
}
if ( aData[4] == "A" )
if ( aData['type'] == "A" )
{
$('td:eq(3)', nRow).html( 'Admin' );
} else if ( aData[4] == "H" )
} else if ( aData['type'] == "H" )
{
$('td:eq(3)', nRow).html( 'DJ' );
} else if ( aData[4] == "G" )
} else if ( aData['type'] == "G" )
{
$('td:eq(3)', nRow).html( 'Guest' );
} else if ( aData[4] == "P" )
} else if ( aData['type'] == "P" )
{
$('td:eq(3)', nRow).html( 'Program Manager' );
}
@ -75,12 +75,12 @@ $(document).ready(function() {
},
"fnRowCallback": rowCallback,
"aoColumns": [
/* Id */ { "sName": "id", "bSearchable": false, "bVisible": false },
/* user name */ { "sName": "login" },
/* first name */ { "sName": "first_name" },
/* last name */ { "sName": "last_name" },
/* user type */ { "sName": "type", "bSearchable": false },
/* del button */ { "sName": "null as delete", "bSearchable": false, "bSortable": false}
/* Id */ { "sName": "id", "bSearchable": false, "bVisible": false, "mDataProp": "id" },
/* user name */ { "sName": "login", "mDataProp": "login" },
/* first name */ { "sName": "first_name", "mDataProp": "first_name" },
/* last name */ { "sName": "last_name", "mDataProp": "last_name" },
/* user type */ { "sName": "type", "bSearchable": false, "mDataProp": "type" },
/* del button */ { "sName": "null as delete", "bSearchable": false, "bSortable": false, "mDataProp": "delete"}
],
"bJQueryUI": true,
"bAutoWidth": false,