Fixed bug with nonworking 'date' quick filter

SVN revision: 1951
This commit is contained in:
2007-10-25 15:32:07 +00:00
parent 4f52cf5dfd
commit 2b96b8dcb0
2 changed files with 23 additions and 11 deletions
+1 -1
View File
@@ -131,7 +131,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
+22 -10
View File
@@ -17350,12 +17350,13 @@ void show_page_filters(LOGBOOK * lbs, int n_msg, int page_n, BOOL mode_commands,
for (attr_index = 0; attr_index < lbs->n_attr; attr_index++)
if (strieq(list[index], attr_list[attr_index]))
break;
if (attr_index == lbs->n_attr) {
if (attr_index == lbs->n_attr &&
!strieq(list[index], "Date") && !strieq(list[index], "Subtext")) {
rsprintf("Error: Attribute \"%s\" for quick filter not found", list[index]);
attr_index = 0;
}
if (strieq(list[index], loc("Date"))) {
if (strieq(list[index], "Date")) {
i = isparam("last") ? atoi(getparam("last")) : 0;
rsprintf("<select title=\"%s\" name=last onChange=\"document.form1.submit()\">\n",
@@ -17432,15 +17433,26 @@ void show_page_filters(LOGBOOK * lbs, int n_msg, int page_n, BOOL mode_commands,
}
else {
sprintf(str, loc("Enter %s"), list[index]);
rsprintf
("<input onClick=\"this.value='';\" title=\"%s\" type=text onChange=\"document.form1.submit()\"",
str);
sprintf(str, "-- %s --", list[index]);
if (isparam(list[index]) && *getparam(list[index]))
strencode2(str, getparam(list[index]), sizeof(str));
if (strieq(list[index], "Subtext")) {
rsprintf
("<input onClick=\"this.value='';\" title=\"%s\" type=text onChange=\"document.form1.submit()\"",
loc("Enter text"));
sprintf(str, "-- %s --", loc("Text"));
if (isparam(list[index]) && *getparam(list[index]))
strencode2(str, getparam(list[index]), sizeof(str));
rsprintf(" name=\"%s\" value=\"%s\">\n", list[index], str);
rsprintf(" name=\"Subtext\" value=\"%s\">\n", str);
} else {
sprintf(str, loc("Enter %s"), list[index]);
rsprintf
("<input onClick=\"this.value='';\" title=\"%s\" type=text onChange=\"document.form1.submit()\"",
str);
sprintf(str, "-- %s --", list[index]);
if (isparam(list[index]) && *getparam(list[index]))
strencode2(str, getparam(list[index]), sizeof(str));
rsprintf(" name=\"%s\" value=\"%s\">\n", list[index], str);
}
}
} else {