Implemented attachment icons in summary/threaded list
SVN revision: 2088
This commit is contained in:
+14
-1
@@ -131,7 +131,8 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE"
|
||||
AdditionalIncludeDirectories="\openssl\include;"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;HAVE_SSL"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
UsePrecompiledHeader="0"
|
||||
@@ -234,6 +235,18 @@
|
||||
Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||
>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Library Files"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\OpenSSL\lib\VC\libeay32MD.lib"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\OpenSSL\lib\VC\ssleay32MD.lib"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
|
||||
+1
-1
@@ -43,7 +43,7 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="\mxml;\openssl\include;"
|
||||
AdditionalIncludeDirectories="\openssl\include;\mxml"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;HAVE_SSL"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
|
||||
+38
-2
@@ -16746,6 +16746,20 @@ void display_line(LOGBOOK * lbs, int message_id, int number, char *mode, int exp
|
||||
}
|
||||
|
||||
if (strieq(mode, "Threaded")) {
|
||||
|
||||
rsputs(" ");
|
||||
for (i = 0; i < MAX_ATTACHMENTS; i++)
|
||||
if (attachment[i][0]) {
|
||||
strlcpy(str, attachment[i], sizeof(str));
|
||||
str[13] = 0;
|
||||
sprintf(ref, "../%s/%s/%s", lbs->name, str, attachment[i] + 14);
|
||||
url_encode(ref, sizeof(ref)); /* for file names with special characters like "+" */
|
||||
|
||||
rsprintf("<a href=\"%s\" target=\"_blank\">", ref);
|
||||
rsprintf("<img border=\"0\" align=\"absmiddle\" src=\"attachment.png\" alt=\"%s\" title=\"%s\"></a>",
|
||||
attachment[i]+14, attachment[i]+14);
|
||||
}
|
||||
|
||||
if (highlight != message_id)
|
||||
rsprintf("</a>\n");
|
||||
else
|
||||
@@ -16832,10 +16846,27 @@ void display_line(LOGBOOK * lbs, int message_id, int number, char *mode, int exp
|
||||
strencode_nouml(str);
|
||||
else
|
||||
rsputs(" ");
|
||||
|
||||
rsputs("</td>\n");
|
||||
}
|
||||
|
||||
if (strieq(mode, "Threaded"))
|
||||
rsprintf("</tr>\n");
|
||||
if (strieq(mode, "Summary")) {
|
||||
/* show attachment icons */
|
||||
rsputs("<td class=\"listatt\"> ");
|
||||
|
||||
for (i = 0; i < MAX_ATTACHMENTS; i++)
|
||||
if (attachment[i][0]) {
|
||||
strlcpy(str, attachment[i], sizeof(str));
|
||||
str[13] = 0;
|
||||
sprintf(ref, "../%s/%s/%s", lbs->name, str, attachment[i] + 14);
|
||||
url_encode(ref, sizeof(ref)); /* for file names with special characters like "+" */
|
||||
|
||||
rsprintf("<a href=\"%s\" target=\"_blank\">", ref);
|
||||
rsprintf("<img border=\"0\" align=\"absmiddle\" src=\"attachment.png\" alt=\"%s\" title=\"%s\"></a>",
|
||||
attachment[i]+14, attachment[i]+14);
|
||||
}
|
||||
|
||||
rsputs(" </td>");
|
||||
}
|
||||
|
||||
colspan = n_attr_disp;
|
||||
@@ -19877,6 +19908,11 @@ void show_elog_list(LOGBOOK * lbs, int past_n, int last_n, int page_n, BOOL defa
|
||||
if (!strieq(mode, "Full") && n_line > 0 && show_text)
|
||||
rsprintf("<th class=\"listtitle\">%s</th>\n", loc("Text"));
|
||||
|
||||
if (strieq(mode, "Summary")) {
|
||||
rsprintf("<th width=\"10\" class=\"listtitle\"><img src=\"attachment.png\" alt=\"%s\" title=\"%s\"</th>",
|
||||
loc("Attachments"), loc("Attachments"));
|
||||
}
|
||||
|
||||
rsprintf("</tr>\n\n");
|
||||
}
|
||||
} /* if (!csv && !xml) */
|
||||
|
||||
@@ -313,6 +313,14 @@ td {
|
||||
font-weight:bold;
|
||||
}
|
||||
|
||||
.listatt {
|
||||
border:1px solid #808040;
|
||||
border-top:1px solid white;
|
||||
border-left:1px solid white;
|
||||
background-color:#B0FFB0;
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
/* attachment line */
|
||||
|
||||
.attachment {
|
||||
|
||||
Reference in New Issue
Block a user