Merge branch 'master' of dev.sourcefabric.org:airtime

This commit is contained in:
martin 2011-04-02 13:30:15 -04:00
commit c67ab97dbc
11 changed files with 246 additions and 99 deletions

View file

@ -12,6 +12,7 @@ function startDpSelect(dateText, inst) {
date = new Date(time[0], time[1] - 1, time[2]);
$("#add_show_end_date").datepicker("option", "minDate", date);
$('input[name^="add_show_rebroadcast_absolute_date"]').datepicker("option", "minDate", date);
}
function endDpSelect(dateText, inst) {
@ -64,6 +65,10 @@ function setAddShowEvents() {
if(!form.find("#add_show_repeats").attr('checked')) {
form.find("#schedule-show-when > fieldset:last").hide();
$("#add_show_rebroadcast_relative").hide();
}
else {
$("#add_show_rebroadcast_absolute").hide();
}
if(!form.find("#add_show_record").attr('checked')) {
@ -82,12 +87,12 @@ function setAddShowEvents() {
if(form.find("#add_show_rebroadcast").attr('checked')) {
if($(this).attr('checked')){
form.find("#schedule-record-rebroadcast > fieldset:eq(1)").hide();
form.find("#schedule-record-rebroadcast > fieldset:last").show();
form.find("#add_show_rebroadcast_absolute").hide();
form.find("#add_show_rebroadcast_relative").show();
}
else {
form.find("#schedule-record-rebroadcast > fieldset:eq(1)").show();
form.find("#schedule-record-rebroadcast > fieldset:last").hide();
form.find("#add_show_rebroadcast_absolute").show();
form.find("#add_show_rebroadcast_relative").hide();
}
}
});
@ -100,10 +105,10 @@ function setAddShowEvents() {
form.find("#add_show_rebroadcast").click(function(){
$(this).blur();
if($(this).attr('checked') && !form.find("#add_show_repeats").attr('checked')) {
form.find("#schedule-record-rebroadcast > fieldset:eq(1)").show();
form.find("#add_show_rebroadcast_absolute").show();
}
else if($(this).attr('checked') && form.find("#add_show_repeats").attr('checked')) {
form.find("#schedule-record-rebroadcast > fieldset:last").show();
form.find("#add_show_rebroadcast_relative").show();
}
else {
form.find("#schedule-record-rebroadcast > fieldset:not(:first-child)").hide();
@ -140,7 +145,7 @@ function setAddShowEvents() {
});
form.find('input[name^="add_show_rebroadcast_absolute_date"]').datepicker({
//minDate: new Date(),
minDate: new Date(),
dateFormat: 'yy-mm-dd'
});
form.find('input[name^="add_show_rebroadcast_absolute_time"], input[name^="add_show_rebroadcast_time"]').timepicker({
@ -248,6 +253,14 @@ function showErrorSections() {
if($("#schedule-show-style .errors").length > 0) {
$("#schedule-show-style").show();
}
if($("#add_show_rebroadcast_absolute .errors").length > 0) {
$("#schedule-record-rebroadcast").show();
$("#add_show_rebroadcast_absolute").show();
}
if($("#add_show_rebroadcast_relative .errors").length > 0) {
$("#schedule-record-rebroadcast").show();
$("#add_show_rebroadcast_relative").show();
}
}
$(document).ready(function() {