Changeset 90273 in spip-zone


Ignore:
Timestamp:
Jun 15, 2015, 4:51:05 PM (6 years ago)
Author:
brunobergot@…
Message:

maj de la lib bigfoot pour éviter un problème avec le compression des scripts dans le privé

cf https://github.com/lemonmade/bigfoot/issues/28

File:
1 edited

Legend:

Unmodified
Added
Removed
  • _plugins_/bigfoot/javascript/bigfoot.js

    r85382 r90273  
    2323        scope: false,
    2424        useFootnoteOnlyOnce: true,
    25         contentMarkup: "<aside class=\"bigfoot-footnote is-positioned-bottom\" data-footnote-number=\"{{FOOTNOTENUM}}\" data-footnote-identifier=\"{{FOOTNOTEID}}\" alt=\"Footnote {{FOOTNOTENUM}}\"> <div class=\"bigfoot-footnote__wrapper\"> <div class=\"bigfoot-footnote__content\"> {{FOOTNOTECONTENT}} </div></div> <div class=\"bigfoot-footnote__tooltip\"></div> </aside>",
    26         buttonMarkup: "<div class='bigfoot-footnote__container'> <button class=\"bigfoot-footnote__button\" id=\"{{SUP:data-footnote-backlink-ref}}\" data-footnote-number=\"{{FOOTNOTENUM}}\" data-footnote-identifier=\"{{FOOTNOTEID}}\" alt=\"See Footnote {{FOOTNOTENUM}}\" rel=\"footnote\" data-bigfoot-footnote=\"{{FOOTNOTECONTENT}}\"> <svg class=\"bigfoot-footnote__button__circle\" viewbox=\"0 0 6 6\" preserveAspectRatio=\"xMinYMin\"><circle r=\"3\" cx=\"3\" cy=\"3\" fill=\"white\"></circle></svg> <svg class=\"bigfoot-footnote__button__circle\" viewbox=\"0 0 6 6\" preserveAspectRatio=\"xMinYMin\"><circle r=\"3\" cx=\"3\" cy=\"3\" fill=\"white\"></circle></svg> <svg class=\"bigfoot-footnote__button__circle\" viewbox=\"0 0 6 6\" preserveAspectRatio=\"xMinYMin\"><circle r=\"3\" cx=\"3\" cy=\"3\" fill=\"white\"></circle></svg> </button></div>"
     25        contentMarkup: "<aside class='bigfoot-footnote is-positioned-bottom' data-footnote-number='{{FOOTNOTENUM}}' data-footnote-identifier='{{FOOTNOTEID}}' alt='Footnote {{FOOTNOTENUM}}'> <div class='bigfoot-footnote__wrapper'> <div class='bigfoot-footnote__content'> {{FOOTNOTECONTENT}} </div></div> <div class='bigfoot-footnote__tooltip'></div> </aside>",
     26        buttonMarkup: "<div class='bigfoot-footnote__container'> <button class='bigfoot-footnote__button' id='{{SUP:data-footnote-backlink-ref}}' data-footnote-number='{{FOOTNOTENUM}}' data-footnote-identifier='{{FOOTNOTEID}}' alt='See Footnote {{FOOTNOTENUM}}' rel='footnote' data-bigfoot-footnote='{{FOOTNOTECONTENT}}'> <svg class='bigfoot-footnote__button__circle' viewbox='0 0 6 6' preserveAspectRatio='xMinYMin'><circle r='3' cx='3' cy='3' fill='white'></circle></svg> <svg class='bigfoot-footnote__button__circle' viewbox='0 0 6 6' preserveAspectRatio='xMinYMin'><circle r='3' cx='3' cy='3' fill='white'></circle></svg> <svg class='bigfoot-footnote__button__circle' viewbox='0 0 6 6' preserveAspectRatio='xMinYMin'><circle r='3' cx='3' cy='3' fill='white'></circle></svg> </button></div>"
    2727      };
    2828      settings = $.extend(defaults, options);
     
    3030      footnoteInit = function() {
    3131        var $curResetElement, $currentLastFootnoteLink, $footnoteAnchors, $footnoteButton, $lastResetElement, $parent, $relevantFNLink, $relevantFootnote, finalFNLinks, footnoteButton, footnoteButtonSearchQuery, footnoteContent, footnoteIDNum, footnoteLinks, footnoteNum, footnotes, i, _i, _ref, _results;
    32         footnoteButtonSearchQuery = settings.scope ? '' + settings.scope + ' a[href*="#"]' : 'a[href*="#"]';
     32        footnoteButtonSearchQuery = settings.scope ? "" + settings.scope + " a[href*='#']" : "a[href*='#']";
    3333        $footnoteAnchors = $(footnoteButtonSearchQuery).filter(function() {
    3434          var $this, relAttr;
     
    188188        if (settings.activateOnHover) {
    189189          $buttonHovered = $(event.target).closest(".bigfoot-footnote__button");
    190           dataIdentifier = "[data-footnote-identifier=\"" + ($buttonHovered.attr("data-footnote-identifier")) + "\"]";
     190          dataIdentifier = "[data-footnote-identifier='" + ($buttonHovered.attr("data-footnote-identifier")) + "']";
    191191          if ($buttonHovered.hasClass("is-active")) {
    192192            return;
     
    217217        var dataIdentifier;
    218218        $button.blur();
    219         dataIdentifier = "data-footnote-identifier=\"" + ($button.attr("data-footnote-identifier")) + "\"";
     219        dataIdentifier = "data-footnote-identifier='" + ($button.attr("data-footnote-identifier")) + "'";
    220220        if ($button.hasClass("changing")) {
    221221          return;
     
    377377          $this = $(this);
    378378          footnoteID = $this.attr("data-footnote-identifier");
    379           $linkedButton = $(".bigfoot-footnote__button[data-footnote-identifier=\"" + footnoteID + "\"]");
     379          $linkedButton = $(".bigfoot-footnote__button[data-footnote-identifier='" + footnoteID + "']");
    380380          if (!$linkedButton.hasClass("changing")) {
    381381            $buttonsClosed = $buttonsClosed.add($linkedButton);
     
    399399            $this = $(this);
    400400            identifier = $this.attr("data-footnote-identifier");
    401             dataIdentifier = "data-footnote-identifier=\"" + identifier + "\"";
     401            dataIdentifier = "data-footnote-identifier='" + identifier + "'";
    402402            $contentWrapper = $this.find(".bigfoot-footnote__content");
    403403            $button = $this.siblings(".bigfoot-footnote__button");
     
    486486      };
    487487      viewportDetails = function() {
     488        var $window;
     489        $window = $(window);
    488490        return {
    489491          width: window.innerWidth,
    490492          height: window.innerHeight,
    491           scrollX: window.scrollX,
    492           scrollY: window.scrollY
     493          scrollX: $window.scrollLeft(),
     494          scrollY: $window.scrollTop()
    493495        };
    494496      };
Note: See TracChangeset for help on using the changeset viewer.