Merge branch 'MDL-57553-master' of git://github.com/andrewnicols/moodle

This commit is contained in:
David Monllao
2017-04-10 11:44:14 +02:00
5 changed files with 1999 additions and 1585 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
+8 -15
View File
@@ -5,13 +5,13 @@
define(["jquery","./popper"], function (a0,b1) {
return (root['Tour'] = factory(a0,b1));
});
} else if (typeof exports === 'object') {
} else if (typeof module === 'object' && module.exports) {
// Node. Does not work with strict CommonJS, but
// only CommonJS-like environments that support module.exports,
// like Node.
module.exports = factory(require("jquery"),require("popper.js"));
} else {
root['Tour'] = factory($,Popper);
root['Tour'] = factory(root["$"],root["Popper"]);
}
}(this, function ($, Popper) {
@@ -24,7 +24,7 @@
* @param {object} config The configuration object.
*/
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
function Tour(config) {
this.init(config);
@@ -773,12 +773,8 @@ Tour.prototype.addStepToPage = function (stepConfig) {
// Add the backdrop.
this.positionBackdrop(stepConfig);
if (stepConfig.attachPoint === 'append') {
stepConfig.attachTo.append(currentStepNode);
this.currentStepNode = currentStepNode;
} else {
this.currentStepNode = currentStepNode.insertAfter(stepConfig.attachTo);
}
$(document.body).append(currentStepNode);
this.currentStepNode = currentStepNode;
// Ensure that the step node is positioned.
// Some situations mean that the value is not properly calculated without this step.
@@ -807,7 +803,7 @@ Tour.prototype.addStepToPage = function (stepConfig) {
currentStepNode.addClass('orphan');
// It lives in the body.
stepConfig.attachTo.append(currentStepNode);
$(document.body).append(currentStepNode);
this.currentStepNode = currentStepNode;
this.currentStepNode.offset(this.calculateStepPositionInPage());
@@ -1231,11 +1227,6 @@ Tour.prototype.positionStep = function (stepConfig) {
}
};
var boundaryElement = target.closest('section');
if (boundaryElement.length) {
config.boundariesElement = boundaryElement[0];
}
var background = $('[data-flexitour="step-background"]');
if (background.length) {
target = background;
@@ -1311,6 +1302,8 @@ Tour.prototype.positionBackdrop = function (stepConfig) {
var targetPosition = this.calculatePosition(targetNode);
if (targetPosition === 'fixed') {
background.css('top', 0);
} else if (targetPosition === 'absolute') {
background.css('position', 'fixed');
}
var fader = background.clone();
+2 -2
View File
@@ -4,14 +4,14 @@
<location>amd/src/tour.js</location>
<name>Flexitour</name>
<license>GPLv3</license>
<version>0.9.10</version>
<version>0.10.0</version>
<licenseversion>3</licenseversion>
</library>
<library>
<location>amd/src/popper.js</location>
<name>Popper.js</name>
<license>MIT</license>
<version>v1.0.0-alpha.3</version>
<version>v1.0.8</version>
<licenseversion></licenseversion>
</library>
</libraries>