reactivating js for class 'today' as hourly built is disfunctional and last built known per page in footers
This commit is contained in:
parent
d9c8658485
commit
52a1c40434
|
@ -0,0 +1,23 @@
|
|||
function hilight_today() {
|
||||
var now = new Date();
|
||||
var ClassName = 'today';
|
||||
var today = document.getElementById( "calendar-" +
|
||||
now.getFullYear() + "-" +
|
||||
(now.getMonth() + 1) + "-" +
|
||||
now.getDate() );
|
||||
var oldtoday = document.getElementById( document.getElementsByClassName(ClassName)[0].id );
|
||||
|
||||
/* Has document fetching completed enough? */
|
||||
if (today) {
|
||||
oldtoday.className = oldtoday.className.replace(/\btoday\b/,'');
|
||||
var td = today.parentNode;
|
||||
var klass = td.getAttribute('class');
|
||||
klass = (klass || "") + ' ' + ClassName;
|
||||
td.setAttribute('class', klass);
|
||||
} else {
|
||||
/* Not in calendar yet, retry later: */
|
||||
window.setTimeout(hilight_today, 100);
|
||||
}
|
||||
}
|
||||
|
||||
window.setTimeout(hilight_today, 1);
|
|
@ -44,9 +44,9 @@
|
|||
<![endif]</xsl:comment>
|
||||
<xsl:if test="/page/calendar-summary">
|
||||
<!-- vv01f: todo: build tags for existing files only -->
|
||||
<!-- <xsl:call-template name="make-script-tag">
|
||||
<xsl:call-template name="make-script-tag">
|
||||
<xsl:with-param name="name" select="'calendar'"/>
|
||||
</xsl:call-template>-->
|
||||
</xsl:call-template>
|
||||
</xsl:if>
|
||||
<xsl:call-template name="make-script-tag">
|
||||
<xsl:with-param name="name" select="'jquery-1.8.3.min'"/>
|
||||
|
|
Loading…
Reference in New Issue