added a comment - - edited
There are two instances of the following line of code in section_classes.js
main.sections[i].swap_with_section(main.sections[eval(loopmodifier)]);
Before each instance add this line.
main.sections[i].swap_dates(main.sections[eval(loopmodifier)]);
Then add this function to section_classes.js
section_class.prototype.swap_dates = function(el){
var i=0;
while(this.getEl().getElementsByTagName("div")[i]) {
if (this.getEl().getElementsByTagName("div")[i].className == "weekdates") {
var tempdate = this.getEl().getElementsByTagName("div")[i].innerHTML;
var permi = i;
}
i++;
}
var j=0;
while(el.getEl().getElementsByTagName("div")[j]) {
if (el.getEl().getElementsByTagName("div")[j].className == "weekdates") {
var permj = j;
}
j++;
}
if(tempdate)
{
this.getEl().getElementsByTagName("div")[permi].innerHTML = el.getEl().getElementsByTagName("div")[permj].innerHTML;
el.getEl().getElementsByTagName("div")[permj].innerHTML = tempdate;
}
}
Also, you will have to change format/weeks/format.php
if (ajaxenabled() && $editing) {
// Temporarily hide the dates for the weeks. We do it this way
// for now. Eventually, we'll have to modify the javascript code
// to handle re-calculation of dates when sections are moved
// around. For now, just hide all the dates to avoid confusion.
$weekperiod = '';
} else {
$weekperiod = $weekday.' - '.$endweekday;
}
to just this line
$weekperiod = $weekday.' - '.$endweekday;
There are two instances of the following line of code in section_classes.js
main.sections[i].swap_with_section(main.sections[eval(loopmodifier)]);
Before each instance add this line.
main.sections[i].swap_dates(main.sections[eval(loopmodifier)]);
Then add this function to section_classes.js
section_class.prototype.swap_dates = function(el){
var i=0;
while(this.getEl().getElementsByTagName("div")[i]) {
if (this.getEl().getElementsByTagName("div")[i].className == "weekdates") { var tempdate = this.getEl().getElementsByTagName("div")[i].innerHTML; var permi = i; }
i++;
}
var j=0;
while(el.getEl().getElementsByTagName("div")[j]) {
if (el.getEl().getElementsByTagName("div")[j].className == "weekdates") { var permj = j; }
j++;
}
if(tempdate)
{ this.getEl().getElementsByTagName("div")[permi].innerHTML = el.getEl().getElementsByTagName("div")[permj].innerHTML; el.getEl().getElementsByTagName("div")[permj].innerHTML = tempdate; }}
Also, you will have to change format/weeks/format.php
if (ajaxenabled() && $editing) { // Temporarily hide the dates for the weeks. We do it this way // for now. Eventually, we'll have to modify the javascript code // to handle re-calculation of dates when sections are moved // around. For now, just hide all the dates to avoid confusion. $weekperiod = ''; } else { $weekperiod = $weekday.' - '.$endweekday; }
to just this line
$weekperiod = $weekday.' - '.$endweekday;