diff options
Diffstat (limited to 'view/js/mod_help.js')
-rw-r--r-- | view/js/mod_help.js | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/view/js/mod_help.js b/view/js/mod_help.js index 9c3591498..8308f23ec 100644 --- a/view/js/mod_help.js +++ b/view/js/mod_help.js @@ -1,14 +1,3 @@ -function docoTocToggle() { - if ($('#doco-top-toc').is(':visible')) { - $('#doco-toc-toggle').removeClass('fa-cog').addClass('fa-caret-right'); - } else { - $('#doco-toc-toggle').removeClass('fa-caret-right').addClass('fa-caret-down'); - } - $('#doco-top-toc').toggle(); - - return false; -} - toc = {}; // Generate the table of contents in the side nav menu (see view/tpl/help.tpl) $(document).ready(function () { @@ -69,54 +58,4 @@ $(document).ready(function () { var newref = p.protocol + '//' + p.hostname + portstr + p.pathname + p.hash.split('?').shift(); location.replace(newref) } - - - // Determine language translations available from the language selector menu itself - var langChoices = []; - $('.lang-selector').find('.lang-choice').each(function (idx, a) { - langChoices.push($(a).html()); - }); - // Parse the URL and insert the language code for the loaded language, based - // on the variable "help_language" that is declared in the help.tpl page template - var path = window.location.pathname.split('/'); - var pathParts = []; - var pick_me = true; - for (var i = 0; i < path.length; i++) { - if(i === 2 && pick_me ) { - if(path[i].length > 0) { - pathParts.push(help_language); - pick_me = false; - if($.inArray(path[i], langChoices) < 0) { - i--; - } - } - } else { - if(path[i].length > 0) { - pathParts.push(path[i]); - } - } - - } - // Update the address bar to reflect the loaded language - window.history.replaceState({}, '', '/' + pathParts.join('/')); - - // Highlight the language in the language selector that is currently viewed - $('.lang-selector').find('.lang-choice:contains("' + help_language + '")').addClass('active'); - - // Construct the links to the available translations based and populate the selector menu - $('.lang-selector').find('.lang-choice').each(function (idx, a) { - var langLink = []; - - for (var i = 0; i < pathParts.length; i++) { - - if(i === 1) { - langLink.push($(a).html()); - } else { - langLink.push(pathParts[i]); - } - - } - $(a).attr('href', '/' + langLink.join('/')); - }); - }); |