Fossil SCM

Fix dynamic sorting of the mimetype tables, as originally intended. Note that the table sorter utility skips leading non-word characters, such as the leading exclamation mark used to flag overwritten entries.

florian 2020-01-24 15:13 mimetypes-list
Commit 26f2bb6fd65f59df4b044154e95c3aea6565e8ecb8ec27dad2e434ae0e82a3e9
1 file changed +2 -1
+2 -1
--- src/doc.c
+++ src/doc.c
@@ -487,11 +487,11 @@
487487
@ for each document.</p>
488488
@ <h1>Repository-specific mimetypes</h1>
489489
@ <p>The following extension-to-mimetype mappings are defined via
490490
@ the <a href="%R/help?cmd=mimetypes">mimetypes setting</a>.</p>
491491
@ <table class='sortable mimetypetable' border=1 cellpadding=0 \
492
- @ data-column-types='tt' data-init-sort='1'>
492
+ @ data-column-types='tt' data-init-sort='0'>
493493
@ <thead>
494494
@ <tr><th>Suffix<th>Mimetype
495495
@ </thead>
496496
@ <tbody>
497497
zCustomList = db_get("mimetypes",0);
@@ -526,10 +526,11 @@
526526
const char *zFlag = "<em><strong>!</strong></em> ";
527527
if( mimetype_from_name_custom(aMime[i].zSuffix)==0 ) zFlag = 0;
528528
@ <tr><td>%s(zFlag)%h(aMime[i].zSuffix)<td>%h(aMime[i].zMimetype)</tr>
529529
}
530530
@ </tbody></table>
531
+ style_table_sorter();
531532
style_footer();
532533
}
533534
534535
/*
535536
** Check to see if the file in the pContent blob is "embedded HTML". Return
536537
--- src/doc.c
+++ src/doc.c
@@ -487,11 +487,11 @@
487 @ for each document.</p>
488 @ <h1>Repository-specific mimetypes</h1>
489 @ <p>The following extension-to-mimetype mappings are defined via
490 @ the <a href="%R/help?cmd=mimetypes">mimetypes setting</a>.</p>
491 @ <table class='sortable mimetypetable' border=1 cellpadding=0 \
492 @ data-column-types='tt' data-init-sort='1'>
493 @ <thead>
494 @ <tr><th>Suffix<th>Mimetype
495 @ </thead>
496 @ <tbody>
497 zCustomList = db_get("mimetypes",0);
@@ -526,10 +526,11 @@
526 const char *zFlag = "<em><strong>!</strong></em> ";
527 if( mimetype_from_name_custom(aMime[i].zSuffix)==0 ) zFlag = 0;
528 @ <tr><td>%s(zFlag)%h(aMime[i].zSuffix)<td>%h(aMime[i].zMimetype)</tr>
529 }
530 @ </tbody></table>
 
531 style_footer();
532 }
533
534 /*
535 ** Check to see if the file in the pContent blob is "embedded HTML". Return
536
--- src/doc.c
+++ src/doc.c
@@ -487,11 +487,11 @@
487 @ for each document.</p>
488 @ <h1>Repository-specific mimetypes</h1>
489 @ <p>The following extension-to-mimetype mappings are defined via
490 @ the <a href="%R/help?cmd=mimetypes">mimetypes setting</a>.</p>
491 @ <table class='sortable mimetypetable' border=1 cellpadding=0 \
492 @ data-column-types='tt' data-init-sort='0'>
493 @ <thead>
494 @ <tr><th>Suffix<th>Mimetype
495 @ </thead>
496 @ <tbody>
497 zCustomList = db_get("mimetypes",0);
@@ -526,10 +526,11 @@
526 const char *zFlag = "<em><strong>!</strong></em> ";
527 if( mimetype_from_name_custom(aMime[i].zSuffix)==0 ) zFlag = 0;
528 @ <tr><td>%s(zFlag)%h(aMime[i].zSuffix)<td>%h(aMime[i].zMimetype)</tr>
529 }
530 @ </tbody></table>
531 style_table_sorter();
532 style_footer();
533 }
534
535 /*
536 ** Check to see if the file in the pContent blob is "embedded HTML". Return
537

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button