projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
64b5ed9
)
Finished the trailing_javascript API and moved a few things to it
author
Art Cancro
<ajc@citadel.org>
Fri, 3 Oct 2008 14:38:30 +0000
(14:38 +0000)
committer
Art Cancro
<ajc@citadel.org>
Fri, 3 Oct 2008 14:38:30 +0000
(14:38 +0000)
webcit/addressbook_popup.c
patch
|
blob
|
history
webcit/event.c
patch
|
blob
|
history
webcit/static/t/trailing.html
patch
|
blob
|
history
webcit/webcit.c
patch
|
blob
|
history
webcit/webcit.h
patch
|
blob
|
history
webcit/who.c
patch
|
blob
|
history
diff --git
a/webcit/addressbook_popup.c
b/webcit/addressbook_popup.c
index 5609c68aef980557dbe7d5c25523a6d9d4aa90ff..b8be3e77aef133608ee40476287ec737ea748c66 100644
(file)
--- a/
webcit/addressbook_popup.c
+++ b/
webcit/addressbook_popup.c
@@
-88,9
+88,8
@@
void display_address_book_middle_div(void) {
"><img src=\"static/closewindow.gif\">");
wprintf("</td></tr></table>");
"><img src=\"static/closewindow.gif\">");
wprintf("</td></tr></table>");
- wprintf("<script type=\"text/javascript\">"
- "PopulateAddressBookInnerDiv($('which_addr_book').value,'%s');"
- "</script>\n",
+ StrBufAppendPrintf(WC->trailing_javascript,
+ "PopulateAddressBookInnerDiv($('which_addr_book').value,'%s');",
bstr("target_input")
);
bstr("target_input")
);
diff --git
a/webcit/event.c
b/webcit/event.c
index 3bf04f86164160a29c5d25efcff91c571d631c12..54cf9e1cc89cc9fa4a336a407510d4ba268c5624 100644
(file)
--- a/
webcit/event.c
+++ b/
webcit/event.c
@@
-562,10
+562,9
@@
void display_edit_individual_event(icalcomponent *supplied_vevent, long msgnum,
wprintf("</div>\n");
wprintf("</div>\n");
- wprintf("<script type=\"text/javascript\"> \n"
+ StrBufAppendPrintf(WC->trailing_javascript,
"eventEditAllDay(); \n"
"RecurrenceShowHide(); \n"
"eventEditAllDay(); \n"
"RecurrenceShowHide(); \n"
- "</script> \n"
);
address_book_popup();
wDumpContent(1);
);
address_book_popup();
wDumpContent(1);
diff --git
a/webcit/static/t/trailing.html
b/webcit/static/t/trailing.html
index e69a7c0f284ed2f33b071f1c890de03e7b0efa9a..5d1f0e0ec408118a93805803238493fb28d1a49b 100644
(file)
--- a/
webcit/static/t/trailing.html
+++ b/
webcit/static/t/trailing.html
@@
-1,5
+1,6
@@
<!-- start trailing.html -->
<script type="text/javascript">
<!-- start trailing.html -->
<script type="text/javascript">
+<?TRAILING_JAVASCRIPT>
Rounded("div.box", "big transparent top bottom");
Rounded("form.box", "big transparent top bottom");
Rounded("div.boxlabel", "big transparent top");
Rounded("div.box", "big transparent top bottom");
Rounded("form.box", "big transparent top bottom");
Rounded("div.boxlabel", "big transparent top");
diff --git
a/webcit/webcit.c
b/webcit/webcit.c
index 2ce352ee7ecfdc8a41a1b0747f3a0af863797b59..6be92d017e03f751404335982f36bb0aed206e66 100644
(file)
--- a/
webcit/webcit.c
+++ b/
webcit/webcit.c
@@
-382,7
+382,9
@@
void hprintf(const char *format,...)
}
}
-
+void put_trailing_javascript(void) {
+ wprintf("%s", ChrPtr(WC->trailing_javascript));
+}
/*
* wrap up an HTTP session, closes tags, etc.
/*
* wrap up an HTTP session, closes tags, etc.
@@
-396,8
+398,7
@@
void wDumpContent(int print_standard_html_footer)
{
if (print_standard_html_footer) {
wprintf("</div>\n"); /* end of "text" div */
{
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));
+ svcallback("TRAILING_JAVASCRIPT", put_trailing_javascript);
do_template("trailing", NULL);
}
do_template("trailing", NULL);
}
diff --git
a/webcit/webcit.h
b/webcit/webcit.h
index 3a3e0c333fb628aa880440a18252ffa83e9e26b3..265e6f0254361b8bcdf756ad2863e6544cc79715 100644
(file)
--- a/
webcit/webcit.h
+++ b/
webcit/webcit.h
@@
-282,7
+282,7
@@
typedef struct _TemplateToken {
TemplateParam *Params[MAXPARAM];
} WCTemplateToken;
TemplateParam *Params[MAXPARAM];
} WCTemplateToken;
-typedef void (*WCHandlerFunc)(
StrBuf *Target, int nArgs, WCTemplateToken *Token, void *Context, int ContextType
);
+typedef void (*WCHandlerFunc)();
/**
/**
diff --git
a/webcit/who.c
b/webcit/who.c
index 02f3630e90e716aa982ecd07950fecfa762a26a3..a2ecd9a3ce09074a8cdb38a132db5d4ef45d270e 100644
(file)
--- a/
webcit/who.c
+++ b/
webcit/who.c
@@
-231,6
+231,7
@@
void who_inner_div(void) {
*/
*/
+#if 0
/*
* Display a list of users currently logged in to the system
* /
/*
* Display a list of users currently logged in to the system
* /
@@
-246,6
+247,7
@@
void who(void)
"}\n"
"</script>\n", _("Do you really want to kill this session?")
);
"}\n"
"</script>\n", _("Do you really want to kill this session?")
);
+#endif
wprintf("<div id=\"banner\">\n");
wprintf("<div class=\"room_banner\">");
wprintf("<div id=\"banner\">\n");
wprintf("<div class=\"room_banner\">");
@@
-294,6
+296,7
@@
void who(void)
wDumpContent(1);
}
*/
wDumpContent(1);
}
*/
+#endif
/*
* end session
/*
* end session