Skip to content

Commit

Permalink
SAK-33918 Resources tool's 'add details' link and missing 'delete' bu…
Browse files Browse the repository at this point in the history
…tton when adding multiple folders and links from the Home tab (sakaiproject#5808)
  • Loading branch information
austin48 authored and bjones86 committed Jul 25, 2018
1 parent 5a2d134 commit c84bf1f
Showing 1 changed file with 41 additions and 39 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -176,47 +176,49 @@
}
function setupDatePickers(contentDiv, index) {
// remove the hasDatepicker CSS class so localDatePicker does the business
document.getElementById('releaseDatePicker${DOT}'+index).classList.remove('hasDatepicker');
document.getElementById('retractDatePicker${DOT}'+index).classList.remove('hasDatepicker');
// also remove the icon that will soon be recreated by localDatePicker
var icons = contentDiv.querySelectorAll('.ui-datepicker-trigger');
for (var i=0; i<icons.length; i++) {
icons[i].remove();
}
if (document.getElementById('releaseDatePicker${DOT}'+index) != null && document.getElementById('retractDatePicker${DOT}'+index) != null) {
document.getElementById('releaseDatePicker${DOT}'+index).classList.remove('hasDatepicker');
document.getElementById('retractDatePicker${DOT}'+index).classList.remove('hasDatepicker');
// also remove the icon that will soon be recreated by localDatePicker
var icons = contentDiv.querySelectorAll('.ui-datepicker-trigger');
for (var i=0; i<icons.length; i++) {
icons[i].remove();
}

// build up a new value
var now = new Date();
var valueString = '' + now.getFullYear() + '-' + (now.getMonth() + 1) + '-' + now.getDate() + ' ' + now.getHours() + ':' + now.getMinutes();
// build up a new value
var now = new Date();
var valueString = '' + now.getFullYear() + '-' + (now.getMonth() + 1) + '-' + now.getDate() + ' ' + now.getHours() + ':' + now.getMinutes();

// setup the date pickers
localDatePicker({
input:'#releaseDatePicker${DOT}'+index,
useTime:1,
parseFormat: 'YYYY-MM-DD HH:mm',
val: valueString,
ashidden:{
month: 'release_month${DOT}'+index,
day: 'release_day${DOT}'+index,
year: 'release_year${DOT}'+index,
hour: 'release_hour${DOT}'+index,
minute: 'release_minute${DOT}'+index,
ampm: 'release_ampm${DOT}'+index
}
});
localDatePicker({
input:'#retractDatePicker${DOT}'+index,
useTime:1,
parseFormat: 'YYYY-MM-DD HH:mm',
val: valueString,
ashidden:{
month: 'retract_month${DOT}'+index,
day: 'retract_day${DOT}'+index,
year: 'retract_year${DOT}'+index,
hour: 'retract_hour${DOT}'+index,
minute: 'retract_minute${DOT}'+index,
ampm: 'retract_ampm${DOT}'+index
}
});
// setup the date pickers
localDatePicker({
input:'#releaseDatePicker${DOT}'+index,
useTime:1,
parseFormat: 'YYYY-MM-DD HH:mm',
val: valueString,
ashidden:{
month: 'release_month${DOT}'+index,
day: 'release_day${DOT}'+index,
year: 'release_year${DOT}'+index,
hour: 'release_hour${DOT}'+index,
minute: 'release_minute${DOT}'+index,
ampm: 'release_ampm${DOT}'+index
}
});
localDatePicker({
input:'#retractDatePicker${DOT}'+index,
useTime:1,
parseFormat: 'YYYY-MM-DD HH:mm',
val: valueString,
ashidden:{
month: 'retract_month${DOT}'+index,
day: 'retract_day${DOT}'+index,
year: 'retract_year${DOT}'+index,
hour: 'retract_hour${DOT}'+index,
minute: 'retract_minute${DOT}'+index,
ampm: 'retract_ampm${DOT}'+index
}
});
}
}
function handleReleaseDatePopupRequest(evt)
{
Expand Down

0 comments on commit c84bf1f

Please sign in to comment.