Implemented "Tooltip <attribute option>"

SVN revision: 1760
This commit is contained in:
2006-11-28 09:19:28 +00:00
parent 81e40d283e
commit dd8a4c1179
2 changed files with 16 additions and 3 deletions
+7
View File
@@ -1003,6 +1003,13 @@ incorporated in the next version.
comment gets displayed as a tooltip (tiny pup-up window) when the user
moves the mouse cursor over the attribute name in the entry form.
</li>
<li>
<b><code>Tooltip &lt;attribute option&gt; = &lt;comment&gt;</code></b><br>
Same as <code><b>Tooltip &lt;attribute&gt;</b></code>, but for option
values of a <code><b>MOptions</b></code> attribute. Using this option,
a different tooltip can be shown above each check box of an optional
value for an attribute.
</li>
<li>
<b><code>Icon comment &lt;icon&gt; = &lt;comment&gt;</code></b><br>
Icons may contain a comment, which is then used in email notifications
+9 -3
View File
@@ -8509,7 +8509,7 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL
att[MAX_ATTACHMENTS][256], encoding[80], slist[MAX_N_ATTR + 10][NAME_LENGTH],
svalue[MAX_N_ATTR + 10][NAME_LENGTH], owner[256], locked_by[256], class_value[80], class_name[80],
ua[NAME_LENGTH], mid[80], title[256], login_name[256], full_name[256], cookie[256], orig_author[256],
attr_moptions[MAX_N_LIST][NAME_LENGTH], ref[256], file_enc[256];
attr_moptions[MAX_N_LIST][NAME_LENGTH], ref[256], file_enc[256], tooltip[256];
time_t now, ltime;
char fl[8][NAME_LENGTH];
struct tm *pts;
@@ -9559,9 +9559,15 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL
n_moptions = strbreak(attrib[index], attr_moptions, MAX_N_LIST, "|");
for (i = 0; i < MAX_N_LIST && attr_options[index][i][0]; i++) {
sprintf(str, "%s_%d", ua, i);
rsprintf("<span style=\"white-space:nowrap;\">\n");
/* display check box with optional tooltip */
sprintf(str, "Tooltip %s", attr_options[index][i]);
tooltip[0] = 0;
if (getcfg(lbs->name, str, comment, sizeof(comment)))
sprintf(tooltip, " title=\"%s\"", comment);
sprintf(str, "%s_%d", ua, i);
rsprintf("<span%s style=\"white-space:nowrap;\">\n", tooltip);
for (j = 0; j < n_moptions; j++)
if (strcmp(attr_moptions[j], attr_options[index][i]) == 0)