miscellaneous javascript that any page needs. Callers should be appending
script code to the trailing_javascript strbuf instead of embedding it in the middle
of the page. This will cause it all to be executed at once, which is
the recommended practice. I haven't moved anything to this yet because
I think the script still isn't executing.
void do_iconbar(void);
void do_iconbar_roomlist(void);
-/**
- * \brief draw the icon bar?????
+/*
+ * Render the left side iconbar
*/
void do_selected_iconbar(void) {
if (WC->current_iconbar == current_iconbar_roomlist) {
}
+
+
/*
* wrap up an HTTP session, closes tags, etc.
*
{
if (print_standard_html_footer) {
wprintf("</div>\n"); /* end of "text" div */
+ wprintf("<script type=\"text/javascript\">\n%s\n</script>\n",
+ ChrPtr(WC->trailing_javascript));
do_template("trailing", NULL);
}
WCC->upload_length = 0;
WCC->upload = NULL;
WCC->is_mobile = 0;
+ WCC->trailing_javascript = NewStrBuf();
/** Figure out the action */
index[0] = action;
free(WCC->upload);
WCC->upload_length = 0;
}
+ FreeStrBuf(&WCC->trailing_javascript);
}
HashList *ServCfg; /**< cache our server config for editing */
HashList *InetCfg; /**< Our inet server config for editing */
+
+ StrBuf *trailing_javascript; /**< extra javascript to be appended to page */
};
/** values for WC->current_iconbar */