Ignore:
Timestamp:
Jun 23, 2014, 10:08:45 PM (10 years ago)
Author:
flop25
Message:

adjustments for 2.7
js updated to 9.0.3

Location:
trunk/plugins/TakeATour/js
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/plugins/TakeATour/js

    • Property svn:ignore set to
      900.js
      903.js
      custom-bootstrap-tour-standalone.js.bak
  • trunk/plugins/TakeATour/js/custom-bootstrap-tour-standalone.js

    r28169 r28775  
    11/* ===========================================================
    2 # bootstrap-tour - v0.9.0
     2# bootstrap-tour - v0.9.3
    33# http://bootstraptour.com
    44# ==============================================================
     
    1818*/
    1919/* ========================================================================
    20  * Bootstrap: tooltip.js v3.1.0
     20 * Bootstrap: transition.js v3.1.1
     21 * http://getbootstrap.com/javascript/#transitions
     22 * ========================================================================
     23 * Copyright 2011-2014 Twitter, Inc.
     24 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
     25 * ======================================================================== */
     26
     27
     28+function ($) {
     29  'use strict';
     30
     31  // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)
     32  // ============================================================
     33
     34  function transitionEnd() {
     35    var el = document.createElement('bootstrap')
     36
     37    var transEndEventNames = {
     38      'WebkitTransition' : 'webkitTransitionEnd',
     39      'MozTransition'    : 'transitionend',
     40      'OTransition'      : 'oTransitionEnd otransitionend',
     41      'transition'       : 'transitionend'
     42    }
     43
     44    for (var name in transEndEventNames) {
     45      if (el.style[name] !== undefined) {
     46        return { end: transEndEventNames[name] }
     47      }
     48    }
     49
     50    return false // explicit for ie8 (  ._.)
     51  }
     52
     53  // http://blog.alexmaccaw.com/css-transitions
     54  $.fn.emulateTransitionEnd = function (duration) {
     55    var called = false, $el = this
     56    $(this).one($.support.transition.end, function () { called = true })
     57    var callback = function () { if (!called) $($el).trigger($.support.transition.end) }
     58    setTimeout(callback, duration)
     59    return this
     60  }
     61
     62  $(function () {
     63    $.support.transition = transitionEnd()
     64  })
     65
     66}(jQuery);
     67
     68/* ========================================================================
     69 * Bootstrap: tooltip.js v3.1.1
    2170 * http://getbootstrap.com/javascript/#tooltip
    2271 * Inspired by the original jQuery.tipsy by Jason Frame
     
    418467
    419468/* ========================================================================
    420  * Bootstrap: popover.js v3.1.0
     469 * Bootstrap: popover.js v3.1.1
    421470 * http://getbootstrap.com/javascript/#popovers
    422471 * ========================================================================
     
    533582  Tour = (function() {
    534583    function Tour(options) {
     584      var storage;
     585      try {
     586        storage = window.localStorage;
     587      } catch (_error) {
     588        storage = false;
     589      }
    535590      this._options = $.extend({
    536591        name: "tour",
     
    538593        container: "body",
    539594        keyboard: true,
    540         storage: window.localStorage,
     595        storage: storage,
    541596        debug: false,
    542597        backdrop: false,
     
    696751      this._removeState("current_step");
    697752      this._removeState("end");
    698       this.setCurrentStep(0);
    699753      return this.start();
    700754    };
     
    831885        }
    832886        _this._scrollIntoView(step.element, function() {
     887            if (_this.getCurrentStep() !== i) {
     888              return;
     889            }
    833890          if ((step.element != null) && step.backdrop) {
    834891            _this._showOverlayElement(step.element);
     
    9681025    Tour.prototype._showPopover = function(step, i) {
    9691026      var $element, $navigation, $template, $tip, isOrphan, options;
     1027      $(".tour-" + this._options.name).remove();
    9701028      options = $.extend({}, this._options);
    9711029      $template = $.isFunction(step.template) ? $(step.template(i, step)) : $(step.template);
     
    9831041        $.extend(options, step.options);
    9841042      }
    985       if (step.reflex & !isOrphan) {
     1043      if (step.reflex && !isOrphan) {
    9861044        $element.css("cursor", "pointer").on("click.tour-" + this._options.name, (function(_this) {
    9871045          return function() {
     
    11951253
    11961254    Tour.prototype._hideBackground = function() {
     1255      if (this.backdrop) {
    11971256      this.backdrop.remove();
    11981257      this.backdrop.overlay = null;
    11991258      return this.backdrop.backgroundShown = false;
     1259      }
    12001260    };
    12011261
Note: See TracChangeset for help on using the changeset viewer.