Merge branch 'saas' into saas-dev

This commit is contained in:
drigato 2015-07-21 11:03:31 -04:00
commit ce7765a8cb
3 changed files with 47 additions and 8 deletions

View file

@ -48,7 +48,6 @@ function toggleAddShowButton(){
}
function setupStartTimeWidgets() {
if ($('input[name=add_show_start_now]:checked').val() == 'now') {
$('#add_show_start_date').prop('disabled', 'true');
$('#add_show_start_time').prop('disabled', 'true');
@ -65,9 +64,17 @@ function setupStartTimeWidgets() {
$('#add_show_end_date_no_repeat').val(nowShowEnd.format('YYYY-MM-DD'));
$('#add_show_end_time').val(nowShowEnd.format('HH:mm'));
//Disabled linked show option since user won't be able to schedule
//content
$('#add_show_linked').prop('disabled', 'true');
} else {
$('#add_show_start_date').removeProp('disabled');
$('#add_show_start_time').removeProp('disabled');
//Do not enable start date and time option when a show has already started
if (!$('#add_show_start_now-now').prop('disabled')) {
$('#add_show_start_date').removeProp('disabled');
$('#add_show_start_time').removeProp('disabled');
}
}
}
@ -241,6 +248,10 @@ function setAddShowEvents(form) {
form.find('input:radio[name=add_show_start_now]').click(function() {
setupStartTimeWidgets();
if ($(this).val() == "future") {
$('#add_show_linked').removeProp('disabled');
}
});