*/
/*@{*/
#include "webcit.h"
-#include "vcard.h"
#include "webserver.h"
#include "groupdav.h"
* \param maxlen Maximum size of target buffer.
* \param source Source string to be encoded.
*/
-void rfc2047encode(char *target, int maxlen, char *source)
+void webcit_rfc2047encode(char *target, int maxlen, char *source)
{
int need_to_encode = 0;
int i, len;
wprintf(" ");
}
if (!strncasecmp(buf, "time=", 5)) {
- fmt_date(now, atol(&buf[5]), 0);
+ webcit_fmt_date(now, atol(&buf[5]), 0);
wprintf("<span>");
wprintf("%s ", now);
wprintf("</span>");
wprintf("%s ", &buf[5]);
}
if (!strncasecmp(buf, "time=", 5)) {
- fmt_date(now, atol(&buf[5]), 0);
+ webcit_fmt_date(now, atol(&buf[5]), 0);
wprintf("%s ", now);
}
}
wprintf("</td>");
wprintf("<td width=%d%%>", DATE_PLUS_BUTTONS_WIDTH_PCT);
- fmt_date(datebuf, WC->summ[num].date, 1); /* brief */
+ webcit_fmt_date(datebuf, WC->summ[num].date, 1); /* brief */
escputs(datebuf);
wprintf("</td>");
*/
if (is_bbview) {
/** begin bbview scroller */
- wprintf("<form name=\"msgomatictop\" class=\"selector_top\" >");
+ wprintf("<form name=\"msgomatictop\" class=\"selector_top\" > \n <p>");
wprintf(_("Reading #"), lowest_displayed, highest_displayed);
wprintf("<select name=\"whichones\" size=\"1\" "
wprintf(_("newest to oldest"));
wprintf("\n");
- wprintf("</select></form>\n");
+ wprintf("</p></form>\n");
/** end bbview scroller */
}
+ if (is_notes)
+ {
+ wprintf ("<script src=\"/static/dragdrop.js\" type=\"text/javascript\"></script>\n");
+ }
+
for (a = 0; a < nummsgs; ++a) {
}
}
-
/** Output loop */
if (displayed_msgs != NULL) {
if (bbs_reverse) {
*/
if (is_bbview) {
/** begin bbview scroller */
- wprintf("<form name=\"msgomatic\" class=\"selector_bottom\" >");
+ wprintf("<form name=\"msgomatic\" class=\"selector_bottom\" > \n <p>");
wprintf(_("Reading #"), lowest_displayed, highest_displayed);
wprintf("<select name=\"whichones\" size=\"1\" "
wprintf(_("newest to oldest"));
wprintf("\n");
- wprintf("</form>\n");
+ wprintf("</p></form>\n");
/** end bbview scroller */
}
+
+ if (is_notes)
+ {
+// wprintf ("</div>\n");
+ wprintf ("<div id=\"wastebin\" align=middle>Drop notes here to remove them.</div>\n");
+ wprintf ("<script type=\"text/javascript\">\n");
+// wprintf ("//<![CDATA[\n");
+ wprintf ("Droppables.add(\"wastebin\",\n");
+ wprintf ("\t{\n");
+ wprintf ("\t\taccept:'notes',\n");
+ wprintf ("\t\tonDrop:function(element)\n");
+ wprintf ("\t\t{\n");
+ wprintf ("\t\t\tElement.hide(element);\n");
+ wprintf ("\t\t\tnew Ajax.Updater('notes', 'delnote',\n");
+ wprintf ("\t\t\t{\n");
+ wprintf ("\t\t\t\tasynchronous:true,\n");
+ wprintf ("\t\t\t\tevalScripts:true,\n");
+ wprintf ("\t\t\t\tonComplete:function(request)\n");
+ wprintf ("\t\t\t\t{\n");
+ wprintf ("\t\t\t\t\tElement.hide('indicator')\n");
+ wprintf ("\t\t\t\t},\n");
+ wprintf ("\t\t\t\tonLoading:function(request)\n");
+ wprintf ("\t\t\t\t{\n");
+ wprintf ("\t\t\t\t\tElement.show('indicator')\n");
+ wprintf ("\t\t\t\t},\n");
+ wprintf ("\t\t\t\tparameters:'id=' + encodeURIComponent(element.id)\n");
+ wprintf ("\t\t\t})\n");
+ wprintf ("\t\t}\n");
+ wprintf ("\t})\n");
+// wprintf ("//]]>\n");
+ wprintf ("</script>\n");
+ }
+
+
DONE:
if (is_tasks) {
encoded_length = ((att->length * 150) / 100);
encoded = malloc(encoded_length);
if (encoded == NULL) break;
- encoded_strlen = CtdlEncodeBase64(&encoded, att->data, att->length, &encoded_length, 1);
+ encoded_strlen = CtdlEncodeBase64(encoded, att->data, att->length, 1);
serv_printf("--%s", boundary);
serv_printf("Content-type: %s", att->content_type);
int is_anonymous = 0;
char *display_name;
+ if (!IsEmptyStr(bstr("force_room"))) {
+ gotoroom(bstr("force_room"));
+ }
+
display_name = bstr("display_name");
if (!strcmp(display_name, "__ANONYMOUS__")) {
display_name = "";
_("Automatically cancelled because you have already "
"saved this message."));
} else {
- rfc2047encode(encoded_subject, sizeof encoded_subject, bstr("subject"));
+ webcit_rfc2047encode(encoded_subject, sizeof encoded_subject, bstr("subject"));
sprintf(buf, "ENT0 1|%s|%d|4|%s|%s||%s|%s|%s|%s",
bstr("recp"),
is_anonymous,
}
wprintf("<input type=\"hidden\" name=\"return_to\" value=\"%s\">\n", bstr("return_to"));
wprintf("<input type=\"hidden\" name=\"nonce\" value=\"%ld\">\n", WC->nonce);
+ wprintf("<input type=\"hidden\" name=\"force_room\" value=\"");
+ escputs(WC->wc_roomname);
+ wprintf("\">\n");
/** submit or cancel buttons */
wprintf("<p class=\"send_edit_msg\">");
wprintf("<img src=\"static/newmess3_24x.gif\" class=\"imgedit\">");
wprintf(" "); /** header bar */
- fmt_date(buf, now, 0);
+ webcit_fmt_date(buf, now, 0);
wprintf("%s", buf);
wprintf("\n"); /** header bar */
escputs(bstr("recp"));
wprintf("\" size=45 maxlength=1000 />");
wprintf("<div class=\"auto_complete\" id=\"recp_name_choices\"></div>");
- wprintf("</td><td rowspan=\"3\" align=\"left\" valign=\"top\"");
+ wprintf("</td><td rowspan=\"3\" align=\"left\" valign=\"top\">");
/** Pop open an address book -- begin **/
wprintf(
wprintf("\" size=45 maxlength=70>\n");
wprintf("</td></tr>");
- wprintf("<tr><td colspan=\"3\"\n");
+ wprintf("<tr><td colspan=\"3\">\n");
wprintf("<textarea name=\"msgtext\" cols=\"80\" rows=\"15\">");
wprintf(" <input name=\"attachfile\" class=\"attachfile\" "
"size=16 type=\"file\">\n "
"<input type=\"submit\" name=\"attach_button\" value=\"%s\">\n", _("Add"));
- wprintf("</div>");
+ wprintf("</div>"); /* End of "attachment buttons" div */
/** Make sure we only insert our signature once */
wprintf("</td></tr></table>");
wprintf("</form>\n");
- wprintf("</div></div>\n");
+ wprintf("</div>\n"); /* end of "fix_scrollbar_bug" div */
+ /* NOTE: address_book_popup() will close the "content" div. Don't close it here. */
DONE: address_book_popup();
wDumpContent(1);
}