Index: openacs-4/packages/xowiki/www/portlets/weblog-mini-calendar.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/portlets/weblog-mini-calendar.adp,v diff -u -r1.6 -r1.6.4.1 --- openacs-4/packages/xowiki/www/portlets/weblog-mini-calendar.adp 5 Aug 2013 14:32:13 -0000 1.6 +++ openacs-4/packages/xowiki/www/portlets/weblog-mini-calendar.adp 11 Sep 2016 00:01:23 -0000 1.6.4.1 @@ -35,7 +35,7 @@ - + @days.count@ @days.day_number@ @days.day_number@ Index: openacs-4/packages/xowiki/www/portlets/weblog-mini-calendar.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/portlets/weblog-mini-calendar.tcl,v diff -u -r1.18.2.1 -r1.18.2.2 --- openacs-4/packages/xowiki/www/portlets/weblog-mini-calendar.tcl 10 Sep 2015 08:10:43 -0000 1.18.2.1 +++ openacs-4/packages/xowiki/www/portlets/weblog-mini-calendar.tcl 11 Sep 2016 00:01:23 -0000 1.18.2.2 @@ -94,7 +94,7 @@ } -multirow create days day_number beginning_of_week_p end_of_week_p today_p active_p url count class +multirow create days day_number beginning_of_week_p end_of_week_p today_p active_p url id count class set day_of_week 1 @@ -105,6 +105,7 @@ set calendar_starts_with_julian_date [expr {$first_julian_date_of_month - $active_days_before_month}] set day_number [expr {$days_in_last_month - $active_days_before_month + 1}] +set js "" for {set julian_date $calendar_starts_with_julian_date} {$julian_date <= $last_julian_date + 7} {incr julian_date} { if {$julian_date > $last_julian_date_in_month && $end_of_week_p == "t" } { @@ -153,13 +154,27 @@ } else { set class inactive } - + set url [export_vars -base $base_url {{date $ansi_date} summary}] + set id minicalendar-$ansi_date + append js [subst { + document.getElementById("$id").addEventListener('click', function (event) { + event.preventDefault(); + window.location.href=$url + return false; + }); + }] + multirow append days $day_number $beginning_of_week_p $end_of_week_p $today_p $active_p \ - "[export_vars -base $base_url {{date $ansi_date} summary}]" $count $class + $url $id $count $class incr day_number incr day_of_week } +if {$js ne ""} { + template::add_body_script -script $js +} + + set sysdate [dt_sysdate] set today_url [export_vars -base $base_url {{date $sysdate} page_num}] if {$sysdate eq $date} {