// Shortcut links (calendar icon and "Today" link)
var shortcuts_span = document.createElement('span');
+ // Nirgal HACK starts
+ shortcuts_span.setAttribute('id', 'spancalshort_'+num);
+ //alert(''+inp.getAttribute('disabled'));
+ if (inp.getAttribute('disabled') != null)
+ shortcuts_span.style.display = 'none';
+ // Nirgal HACK ends
inp.parentNode.insertBefore(shortcuts_span, inp.nextSibling);
var today_link = document.createElement('a');
today_link.setAttribute('href', 'javascript:DateTimeShortcuts.handleCalendarQuickLink(' + num + ', 0);');
function show_hide_start_end_time(value) {
if (value=='duration') {
$('#id_start_date').attr('disabled', 'disabled');
+ $('#spancalshort_0').hide();
$('#id_duration_0').removeAttr('disabled');
$('#id_duration_1').removeAttr('disabled');
$('#id_end_date').attr('disabled', 'disabled');
+ $('#spancalshort_1').hide();
} else if (value=='date_date') {
$('#id_start_date').removeAttr('disabled');
+ $('#spancalshort_0').show();
$('#id_duration_0').attr('disabled', 'disabled');
$('#id_duration_1').attr('disabled', 'disabled');
$('#id_end_date').removeAttr('disabled');
+ $('#spancalshort_1').show();
} else if (value=='start_duration') {
$('#id_start_date').removeAttr('disabled');
+ $('#spancalshort_0').show();
$('#id_duration_0').removeAttr('disabled');
$('#id_duration_1').removeAttr('disabled');
$('#id_end_date').attr('disabled', 'disabled');
+ $('#spancalshort_1').hide();
} else {
$('#id_start_date').attr('disabled', 'disabled');
+ $('#spancalshort_0').hide(); /* usually not ready yet */
$('#id_duration_0').attr('disabled', 'disabled');
$('#id_duration_1').attr('disabled', 'disabled');
$('#id_end_date').attr('disabled', 'disabled');
+ $('#spancalshort_1').hide(); /* usually not ready yet */
}
}
$(document).ready(function () {