Changeset ada37fa in ammosreader for doc/html/_static/doctools.js


Ignore:
Timestamp:
05/04/22 12:00:45 (3 years ago)
Author:
Enrico Schwass <ennoausberlin@…>
Branches:
AmmosSource, guix
Children:
64565fe
Parents:
1846087
Message:

docs generated

File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/html/_static/doctools.js

    r1846087 rada37fa  
    55 * Sphinx JavaScript utilities for all documentation.
    66 *
    7  * :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS.
     7 * :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS.
    88 * :license: BSD, see LICENSE for details.
    99 *
     
    3030/**
    3131 * small helper function to urldecode strings
     32 *
     33 * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent#Decoding_query_parameters_from_a_URL
    3234 */
    3335jQuery.urldecode = function(x) {
    34   return decodeURIComponent(x).replace(/\+/g, ' ');
     36  if (!x) {
     37    return x
     38  }
     39  return decodeURIComponent(x.replace(/\+/g, ' '));
    3540};
    3641
     
    8893        node.nodeValue = val.substr(0, pos);
    8994        if (isInSVG) {
    90           var bbox = span.getBBox();
    9195          var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect");
    92           rect.x.baseVal.value = bbox.x;
     96          var bbox = node.parentElement.getBBox();
     97          rect.x.baseVal.value = bbox.x;
    9398          rect.y.baseVal.value = bbox.y;
    9499          rect.width.baseVal.value = bbox.width;
    95100          rect.height.baseVal.value = bbox.height;
    96101          rect.setAttribute('class', className);
    97           var parentOfText = node.parentNode.parentNode;
    98102          addItems.push({
    99103              "parent": node.parentNode,
     
    285289
    286290  initOnKeyListeners: function() {
    287     $(document).keyup(function(event) {
     291    $(document).keydown(function(event) {
    288292      var activeElementType = document.activeElement.tagName;
    289       // don't navigate when in search box or textarea
    290       if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT') {
     293      // don't navigate when in search box, textarea, dropdown or button
     294      if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT'
     295          && activeElementType !== 'BUTTON' && !event.altKey && !event.ctrlKey && !event.metaKey
     296          && !event.shiftKey) {
    291297        switch (event.keyCode) {
    292298          case 37: // left
     
    296302              return false;
    297303            }
     304            break;
    298305          case 39: // right
    299306            var nextHref = $('link[rel="next"]').prop('href');
     
    302309              return false;
    303310            }
     311            break;
    304312        }
    305313      }
Note: See TracChangeset for help on using the changeset viewer.