Fixed the multilanguage support for the fileupload plugin. On the new entry page a new attachment drop box is added. Users can now drag&drop files into this drop box to be uploadad asynchronously and displayed as attachments on the page without reloading the entire page.

This commit is contained in:
Dario Milicic
2014-08-14 13:59:07 +02:00
parent 228262bf70
commit 74a2bb2705
7 changed files with 238 additions and 15 deletions
+11 -4
View File
@@ -11321,7 +11321,7 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL
/* show existing attachments */
for (index = 0; index < MAX_ATTACHMENTS; index++)
if (att[index][0]) {
rsprintf("<tr><td nowrap class=\"attribname\">%s %d:</td>\n", loc("Attachment"), index + 1);
rsprintf("<tr class=\"attachment\"><td nowrap class=\"attribname\">%s %d:</td>\n", loc("Attachment"), index + 1);
sprintf(str, "attachment%d", index);
rsprintf("<td class=\"attribvalue\">\n");
rsprintf("<input type=hidden name=\"%s\" value=\"%s\">\n", str, att[index]);
@@ -11507,13 +11507,20 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL
loc("Maximum number of attachments reached"));
rsprintf("</td></tr>\n");
} else {
rsprintf("<tr><td nowrap class=\"attribname\">%s %d:</td>\n", loc("Attachment"), index + 1);
rsprintf("<tr id=\"attachment_upload\"><td nowrap class=\"attribname\">%s %d:</td>\n", loc("Attachment"), index + 1);
rsprintf
("<td class=\"attribvalue\"><input type=\"file\" size=\"60\" maxlength=\"200\" name=\"attfile\" accept=\"filetype/*\">\n");
("<td class=\"attribvalue\"><input type=\"file\" size=\"60\" maxlength=\"200\" name=\"attfile\" accept=\"filetype/*\" multiple>\n");
rsprintf
("&nbsp;&nbsp;<input type=\"submit\" name=\"cmd\" value=\"%s\" onClick=\"return chkupload();\">\n",
("&nbsp;&nbsp;<input type=\"submit\" name=\"cmd\" value=\"%s\">\n",
loc("Upload"));
rsprintf("</td></tr>\n");
// print the holder for dropping attachments
rsprintf("<tr>\n");
rsprintf("<td style=\"background: white;\" colspan=2>\n");
rsprintf("<div id=\"holder\" style=\"background: white; border: 10px dashed #ccc; min-height: 200px; margin: 10px\" >");
rsprintf("<p class=\"info\" style=\"color: #999; font-size: 2em; text-align: center; margin-top: 40px;\">Drop attachments here...</p></div>");
rsprintf("</td></tr>");
}
}
+1 -1
View File
@@ -1 +1 @@
#define GIT_REVISION "Thu Aug 7 16:56:23 2014 +0200 - 25ed901"
#define GIT_REVISION "Mon Aug 11 11:19:47 2014 +0200 - 228262b"