Ignore:
Timestamp:
2016-08-12T13:49:36+12:00 (8 years ago)
Author:
kjdon
Message:

added a span round the section title too, so that you can hide the number OR hide the heading. see en:user_advanced:gs3_custom_doc_display in wiki

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/web/interfaces/default/js/document_scripts.js

    r30478 r30700  
    10131013        if (title.search(/tocSectionNumber/) != -1)
    10141014          {
    1015             var matching_regex = /<span class=\"tocSectionNumber\">([0-9]+)<\/span>\s*(.+)$/;
     1015            var matching_regex = /<span class=\"tocSectionNumber\">([0-9]+)<\/span>[\s\S]*<span class=\"tocSectionTitle\">(.+)<\/span>$/mg;
    10161016            var matches_array = matching_regex.exec(title);
    1017             if (matches_array.length == 3) {
     1017            if (matches_array != null && matches_array.length == 3) {
    10181018              t_section = matches_array[1];
    10191019              t_title = matches_array[2];
Note: See TracChangeset for help on using the changeset viewer.