From: Art Cancro Date: Fri, 10 Oct 2008 19:46:04 +0000 (+0000) Subject: Fixed the mini-calendar month buttons X-Git-Tag: v7.86~1861 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=69cca3fa1026bba17b888c8026d4c8787b2a9ce1 Fixed the mini-calendar month buttons and moved the javascript function into the trailing block --- diff --git a/webcit/calendar_view.c b/webcit/calendar_view.c index 73fd4669c..cccbdc812 100644 --- a/webcit/calendar_view.c +++ b/webcit/calendar_view.c @@ -129,17 +129,16 @@ void embeddable_mini_calendar(int year, int month, char *urlformat) sprintf(&escaped_urlformat[i*2], "%02X", urlformat[i]); } - wprintf("\n" - , + StrBufAppendPrintf(WC->trailing_javascript, + " function minical_change_month(year, month) { \n" + " p = 'year=' + year + '&month=' + month \n" + " + '&urlformat=%s&r=' + CtdlRandomString(); \n" + " new Ajax.Updater('%s', 'mini_calendar', \n" + " { method: 'get', parameters: p, evalScripts: true } ); \n" + " } \n" + "", escaped_urlformat, div_id - ); + ); }