diff --git a/README.md b/README.md
index 35f44c5d8..fb14d20be 100644
--- a/README.md
+++ b/README.md
@@ -72,32 +72,33 @@ Things might work in Edge 15-18, Firefox 47-62 and Chrome 54-68 due to one polyf
* Removed jquery-mousewheel
* Removed matchmedia-polyfill
* Removed momentjs (localization still used)
+* Removed opentip (use CSS)
|js/* |1.14.0 |native |gzip 1.14 |gzip |
|----------- |--------: |--------: |--------: |--------: |
-|admin.js |2.130.942 |1.130.247 | 485.481 | 273.277 |
-|app.js |4.184.455 |2.840.968 | 932.725 | 662.061 |
+|admin.js |2.130.942 |1.119.116 | 485.481 | 270.646 |
+|app.js |4.184.455 |2.829.860 | 932.725 | 659.501 |
|boot.js | 671.522 | 44.029 | 169.502 | 15.460 |
-|libs.js | 647.614 | 426.949 | 194.728 | 131.409 |
+|libs.js | 647.614 | 364.163 | 194.728 | 118.262 |
|polyfills.js | 325.834 | 0 | 71.825 | 0 |
-|TOTAL js |7.960.367 |4.442.193 |1.854.261 |1.082.207 |
+|TOTAL js |7.960.367 |4.357.168 |1.854.261 |1.063.869 |
|js/min/* |1.14.0 |native |gzip 1.14 |gzip |
|--------------- |--------: |--------: |--------: |--------: |
-|admin.min.js | 252.147 | 152.759 | 73.657 | 43.564 |
-|app.min.js | 511.202 | 378.335 |140.462 | 99.341 |
+|admin.min.js | 252.147 | 151.264 | 73.657 | 43.122 |
+|app.min.js | 511.202 | 376.839 |140.462 | 98.898 |
|boot.min.js | 66.007 | 5.589 | 22.567 | 2.333 |
-|libs.min.js | 572.545 | 385.139 |176.720 |121.907 |
+|libs.min.js | 572.545 | 348.651 |176.720 |112.822 |
|polyfills.min.js | 32.452 | 0 | 11.312 | 0 |
-|TOTAL js/min |1.434.353 | 921.822 |424.718 |267.145 |
+|TOTAL js/min |1.434.353 | 882.343 |424.718 |257.175 |
-512.531 bytes (157.573 gzip) is not much, but it feels faster.
+552.010 bytes (167.543 gzip) is not much, but it feels faster.
|css/* |1.14.0 |native |
|-------------- |--------: |--------: |
-|app.css | 340.334 | 272.858 |
-|app.min.css | 274.791 | 216.893 |
+|app.css | 340.334 | 267.507 |
+|app.min.css | 274.791 | 212.244 |
### PHP73 branch
diff --git a/dev/External/Opentip.js b/dev/External/Opentip.js
deleted file mode 100644
index abb10452f..000000000
--- a/dev/External/Opentip.js
+++ /dev/null
@@ -1,42 +0,0 @@
-const Opentip = window.Opentip || {};
-
-Opentip.styles = Opentip.styles || {};
-
-Opentip.styles.rainloop = {
- 'extends': 'standard',
-
- 'fixed': true,
- 'target': true,
-
- 'delay': 0.2,
- 'hideDelay': 0,
-
- 'hideEffect': 'fade',
- 'hideEffectDuration': 0.2,
-
- 'showEffect': 'fade',
- 'showEffectDuration': 0.2,
-
- 'showOn': 'mouseover click',
- 'removeElementsOnHide': true,
-
- 'background': '#fff',
- 'shadow': false,
-
- 'borderColor': '#999',
- 'borderRadius': 2,
- 'borderWidth': 1
-};
-
-Opentip.styles.rainloopTip = {
- 'extends': 'rainloop',
- 'delay': 0.4,
- 'group': 'rainloopTips'
-};
-
-Opentip.styles.rainloopErrorTip = {
- 'extends': 'rainloop',
- 'className': 'rainloopErrorTip'
-};
-
-export { Opentip, Opentip as default };
diff --git a/dev/External/ko.js b/dev/External/ko.js
index b4609240d..fa33da1e3 100644
--- a/dev/External/ko.js
+++ b/dev/External/ko.js
@@ -1,17 +1,9 @@
-import Opentip from 'Opentip';
-
import { SaveSettingsStep, Magics } from 'Common/Enums';
const
$ = jQuery,
ko = window.ko,
- fDisposalTooltipHelper = (element) => {
- ko.utils.domNodeDisposal.addDisposeCallback(element, () => {
- if (element && element.__opentip) {
- element.__opentip.deactivate();
- }
- });
- },
+ Translator = () => require('Common/Translator'),
isFunction = v => typeof v === 'function';
ko.bindingHandlers.editor = {
@@ -112,79 +104,35 @@ ko.bindingHandlers.visibleAnimated = {
ko.bindingHandlers.tooltip = {
init: (element, fValueAccessor) => {
- const $el = $(element),
- fValue = fValueAccessor(),
- isMobile = 'on' === ($el.data('tooltip-mobile') || 'off'),
- isI18N = 'on' === ($el.data('tooltip-i18n') || 'on'),
+ const fValue = fValueAccessor(),
Globals = require('Common/Globals');
- if (!Globals.bMobileDevice || isMobile) {
+ if (!Globals.bMobileDevice || 'on' === element.dataset.tooltipMobile) {
const sValue = !ko.isObservable(fValue) && isFunction(fValue) ? fValue() : ko.unwrap(fValue);
- element.__opentip = new Opentip(element, {
- 'style': 'rainloopTip',
- 'element': element,
- 'tipJoint': $el.data('tooltip-join') || 'bottom'
- });
-
- Globals.dropdownVisibility.subscribe((v) => {
- if (v) {
- element.__opentip.hide();
- }
- });
-
- if (sValue) {
- element.__opentip.activate();
+ if ('off' === element.dataset.tooltipI18n) {
+ element.title = sValue;
} else {
- element.__opentip.hide();
- element.__opentip.deactivate();
- element.__opentip.setContent('');
+ element.title = Translator().i18n(sValue);
+ Translator().trigger.subscribe(() =>
+ element.title = Translator().i18n(sValue)
+ );
+ Globals.dropdownVisibility.subscribe(() =>
+ element.title = Translator().i18n(sValue)
+ );
}
-
- if (isI18N) {
- const Translator = require('Common/Translator');
-
- element.__opentip.setContent(Translator.i18n(sValue));
-
- Translator.trigger.subscribe(() => {
- element.__opentip.setContent(Translator.i18n(sValue));
- });
-
- Globals.dropdownVisibility.subscribe(() => {
- if (element && element.__opentip) {
- element.__opentip.setContent(Translator.i18n(sValue));
- }
- });
- } else {
- element.__opentip.setContent(sValue);
- }
-
- addEventListener('rl.tooltips.diactivate', () => {
- element.__opentip.hide();
- element.__opentip.deactivate();
- });
-
- addEventListener('rl.tooltips.activate', () => {
- element.__opentip.activate();
- });
}
},
update: (element, fValueAccessor) => {
- const $el = $(element),
- fValue = fValueAccessor(),
- isMobile = 'on' === ($el.data('tooltip-mobile') || 'off'),
- isI18N = 'on' === ($el.data('tooltip-i18n') || 'on'),
+ const fValue = fValueAccessor(),
Globals = require('Common/Globals');
- if ((!Globals.bMobileDevice || isMobile) && element.__opentip) {
+ if (!Globals.bMobileDevice || 'on' === element.dataset.tooltipMobile) {
const sValue = !ko.isObservable(fValue) && isFunction(fValue) ? fValue() : ko.unwrap(fValue);
if (sValue) {
- element.__opentip.setContent(isI18N ? require('Common/Translator').i18n(sValue) : sValue);
- element.__opentip.activate();
+ element.title = 'off' === element.dataset.tooltipI18n ? sValue : Translator().i18n(sValue);
} else {
- element.__opentip.hide();
- element.__opentip.deactivate();
- element.__opentip.setContent('');
+ element.title = '';
}
}
}
@@ -192,49 +140,21 @@ ko.bindingHandlers.tooltip = {
ko.bindingHandlers.tooltipErrorTip = {
init: function(element) {
- const $el = $(element);
-
- element.__opentip = new Opentip(element, {
- style: 'rainloopErrorTip',
- hideOn: 'mouseout click',
- element: element,
- tipJoint: $el.data('tooltip-join') || 'top'
- });
-
- element.__opentip.deactivate();
-
$(document).on('click', () => {
- if (element && element.__opentip) {
- element.__opentip.hide();
- }
+ element.removeAttribute('data-rainloopErrorTip')
+ });
+ ko.utils.domNodeDisposal.addDisposeCallback(element, () => {
+ element.removeAttribute('data-rainloopErrorTip')
});
-
- fDisposalTooltipHelper(element);
},
update: (element, fValueAccessor) => {
- const $el = $(element),
- fValue = fValueAccessor(),
- value = !ko.isObservable(fValue) && isFunction(fValue) ? fValue() : ko.unwrap(fValue),
- openTips = element.__opentip;
+ const fValue = fValueAccessor(),
+ value = !ko.isObservable(fValue) && isFunction(fValue) ? fValue() : ko.unwrap(fValue);
- if (openTips) {
- if (value) {
- setTimeout(() => {
- if ($el.is(':visible')) {
- openTips.setContent(value);
- openTips.activate();
- openTips.show();
- } else {
- openTips.hide();
- openTips.deactivate();
- openTips.setContent('');
- }
- }, Magics.Time100ms);
- } else {
- openTips.hide();
- openTips.deactivate();
- openTips.setContent('');
- }
+ if (value) {
+ setTimeout(() => element.setAttribute('data-rainloopErrorTip', value), Magics.Time100ms);
+ } else {
+ element.removeAttribute('data-rainloopErrorTip');
}
}
};
diff --git a/dev/Styles/_End.less b/dev/Styles/_End.less
index df632e069..f11a25532 100644
--- a/dev/Styles/_End.less
+++ b/dev/Styles/_End.less
@@ -23,43 +23,55 @@
opacity: 0;
}
-.opentip-container {
-
+[data-rainloopTip],
+[data-rainloopErrorTip] {
+ position: relative;
+}
+[data-rainloopTip]::before,
+[data-rainloopErrorTip]::before {
+ background: #fff;
+ border-radius: 3px;
+ border: 1px solid #999;
+ content : attr(data-rainloopTip);
+ font-size: 13px;
+ left: 100%;
+ opacity : 0;
+ padding: 0.25em;
+ position : absolute;
+ text-align: left;
+ top: 100%;
+ transition: opacity 0.2s ease-in-out;
+ white-space: nowrap;
z-index: 2001 !important;
- .ot-content {
- font-size: 13px;
- }
-
- &.style-rainloopErrorTip .ot-content {
- color: red;
- }
-
- &.ot-show-effect-none, &.ot-hide-effect-none {
- transition: none !important;
- }
-
- &.ot-show-effect-fade {
-
- transition: none;
-
- &.ot-hidden {
- opacity: 0;
- }
-
- &.ot-going-to-show {
- opacity: 0;
- transition: opacity 0.2s ease-in-out;
- }
- &.ot-showing {
- opacity: 1;
- transition: opacity 0.2s ease-in-out;
- }
- &.ot-visible {
- opacity: 1;
- transition: none;
- }
+}
+@media only screen and (max-width: 600px) {
+ [data-rainloopTip]::before,
+ [data-rainloopErrorTip]::before {
+ min-width: 60vw;
+ white-space: normal;
}
}
+[data-rainloopErrorTip]::before {
+ color: red;
+ content : attr(data-rainloopErrorTip);
+ opacity : 1;
+}
+[data-tooltip]:hover::before {
+ opacity : 1;
+}
+[data-rainloopTip]::after,
+[data-rainloopErrorTip]::after {
+ border-color: transparent transparent #999 transparent;
+ border-style: solid;
+ border-width: 5px;
+ content: "";
+ margin: -5px;
+ max-width: 80vw;
+ position: absolute;
+ top: 100%;
+ transform: rotate(-45deg);
+ z-index: 2002;
+}
svg-icon {
display: none;
diff --git a/dev/View/Popup/Activate.js b/dev/View/Popup/Activate.js
deleted file mode 100644
index 93c001f6e..000000000
--- a/dev/View/Popup/Activate.js
+++ /dev/null
@@ -1,119 +0,0 @@
-import ko from 'ko';
-
-import { StorageResultType, Notification } from 'Common/Enums';
-import { RAINLOOP_TRIAL_KEY } from 'Common/Consts';
-import { i18n, getNotification } from 'Common/Translator';
-
-import * as Settings from 'Storage/Settings';
-
-import Remote from 'Remote/Admin/Ajax';
-import LicenseStore from 'Stores/Admin/License';
-
-import { popup, command } from 'Knoin/Knoin';
-import { AbstractViewNext } from 'Knoin/AbstractViewNext';
-
-@popup({
- name: 'View/Popup/Activate',
- templateID: 'PopupsActivate'
-})
-class ActivatePopupView extends AbstractViewNext {
- constructor() {
- super();
-
- this.domain = ko.observable('');
- this.key = ko.observable('');
- this.key.focus = ko.observable(false);
- this.activationSuccessed = ko.observable(false);
-
- this.licenseTrigger = LicenseStore.licenseTrigger;
-
- this.activateProcess = ko.observable(false);
- this.activateText = ko.observable('');
- this.activateText.isError = ko.observable(false);
-
- this.htmlDescription = ko.computed(() => i18n('POPUPS_ACTIVATE/HTML_DESC', { 'DOMAIN': this.domain() }));
-
- this.key.subscribe(() => {
- this.activateText('');
- this.activateText.isError(false);
- });
-
- this.activationSuccessed.subscribe((value) => {
- if (value) {
- this.licenseTrigger(!this.licenseTrigger());
- }
- });
- }
-
- @command(
- (self) => !self.activateProcess() && self.domain() && self.key() && !self.activationSuccessed()
- )
- activateCommand() {
- this.activateProcess(true);
- if (this.validateSubscriptionKey()) {
- Remote.licensingActivate(
- (sResult, oData) => {
- this.activateProcess(false);
- if (StorageResultType.Success === sResult && oData.Result) {
- if (true === oData.Result) {
- this.activationSuccessed(true);
- this.activateText(i18n('POPUPS_ACTIVATE/SUBS_KEY_ACTIVATED'));
- this.activateText.isError(false);
- } else {
- this.activateText(oData.Result);
- this.activateText.isError(true);
- this.key.focus(true);
- }
- } else if (oData.ErrorCode) {
- this.activateText(getNotification(oData.ErrorCode));
- this.activateText.isError(true);
- this.key.focus(true);
- } else {
- this.activateText(getNotification(Notification.UnknownError));
- this.activateText.isError(true);
- this.key.focus(true);
- }
- },
- this.domain(),
- this.key().replace(/[^A-Z0-9-]/gi, '')
- );
- } else {
- this.activateProcess(false);
- this.activateText(i18n('POPUPS_ACTIVATE/ERROR_INVALID_SUBS_KEY'));
- this.activateText.isError(true);
- this.key.focus(true);
- }
- }
-
- onShow(isTrial) {
- this.domain(Settings.settingsGet('AdminDomain'));
- if (!this.activateProcess()) {
- isTrial = undefined === isTrial ? false : !!isTrial;
-
- this.key(isTrial ? RAINLOOP_TRIAL_KEY : '');
- this.activateText('');
- this.activateText.isError(false);
- this.activationSuccessed(false);
- }
- }
-
- onShowWithDelay() {
- if (!this.activateProcess()) {
- this.key.focus(true);
- }
- }
-
- /**
- * @returns {boolean}
- */
- validateSubscriptionKey() {
- const value = this.key();
- return (
- !value ||
- RAINLOOP_TRIAL_KEY === value ||
- !!/^RL[\d]+-[A-Z0-9-]+Z$/.test(value.trim().replace(/[^A-Z0-9-]/gi, ''))
- );
- }
-}
-
-export { ActivatePopupView, ActivatePopupView as default };
diff --git a/package.json b/package.json
index e4d48e4ad..64ade4f91 100644
--- a/package.json
+++ b/package.json
@@ -93,7 +93,6 @@
"node-fs": "0.1.7",
"normalize.css": "8.0.1",
"openpgp": "2.6.2",
- "opentip": "2.4.3",
"prettier": "1.19.1",
"raw-loader": "4.0.0",
"rimraf": "3.0.2",
diff --git a/tasks/config.js b/tasks/config.js
index 768090880..350c6c9fe 100644
--- a/tasks/config.js
+++ b/tasks/config.js
@@ -55,7 +55,6 @@ config.paths.css = {
'vendors/fontastic/styles.css',
'vendors/inputosaurus/inputosaurus.css',
'vendors/flags/flags-fixed.css',
- 'node_modules/opentip/css/opentip.css',
'vendors/lightgallery/dist/css/lightgallery.min.css',
'vendors/lightgallery/dist/css/lg-transitions.min.css',
'dev/Styles/_progressjs.css'
@@ -86,8 +85,6 @@ config.paths.js = {
'node_modules/knockout-sortable/build/knockout-sortable.min.js ',
'node_modules/simplestatemanager/dist/ssm.min.js',
'node_modules/autolinker/dist/Autolinker.min.js',
- 'node_modules/opentip/lib/opentip.js',
- 'node_modules/opentip/lib/adapter-jquery.js',
'vendors/lightgallery/dist/js/lightgallery.min.js', // license
'vendors/lightgallery/dist/js/lg-fullscreen.min.js',
'vendors/lightgallery/dist/js/lg-thumbnail.min.js',
diff --git a/vendors/bootstrap/js/bootstrap.js b/vendors/bootstrap/js/bootstrap.js
index d990118f6..87ad05a9e 100644
--- a/vendors/bootstrap/js/bootstrap.js
+++ b/vendors/bootstrap/js/bootstrap.js
@@ -90,17 +90,18 @@
$items = $('[role=menu] li:not(.divider):visible a', $parent)
- if (!$items.length) return
+ if ($items.length) {
- index = $items.index($items.filter(':focus'))
+ index = $items.index($items.filter(':focus'))
- if (e.keyCode == 38 && index > 0) index-- // up
- if (e.keyCode == 40 && index < $items.length - 1) index++ // down
- if (!~index) index = 0
+ if (e.keyCode == 38 && index > 0) index-- // up
+ if (e.keyCode == 40 && index < $items.length - 1) index++ // down
+ if (!~index) index = 0
- $items
- .eq(index)
- .focus()
+ $items
+ .eq(index)
+ .focus()
+ }
}
}
@@ -199,7 +200,7 @@
that.enforceFocus()
transition ?
- that.$element.one('transitionend', function () { that.$element.focus().trigger('shown') }) :
+ that.$element.one('transitionend', () => that.$element.focus().trigger('shown')) :
that.$element.focus().trigger('shown')
})
@@ -231,7 +232,7 @@
enforceFocus () {
var that = this
- $(doc).on('focusin.modal', function (e) {
+ $(doc).on('focusin.modal', e => {
if (that.$element[0] !== e.target && !that.$element.has(e.target).length) {
that.$element.focus()
}
@@ -241,9 +242,7 @@
escape () {
var that = this
if (this.isShown && this.options.keyboard) {
- this.$element.on('keyup.dismiss.modal', function ( e ) {
- e.which == 27 && that.hide()
- })
+ this.$element.on('keyup.dismiss.modal', e => e.which == 27 && that.hide())
} else if (!this.isShown) {
this.$element.off('keyup.dismiss.modal')
}
@@ -251,12 +250,12 @@
hideWithTransition () {
var that = this
- , timeout = setTimeout(function () {
+ , timeout = setTimeout(() => {
that.$element.off('transitionend')
that.hideModal()
}, 500)
- this.$element.one('transitionend', function () {
+ this.$element.one('transitionend', () => {
clearTimeout(timeout)
that.hideModal()
})
@@ -265,7 +264,7 @@
hideModal () {
var that = this
this.$element.hide()
- this.backdrop(function () {
+ this.backdrop(() => {
that.removeBackdrop()
that.$element.trigger('hidden')
})
@@ -347,9 +346,7 @@
$target
.modal(option)
- .one('hide', function () {
- $this.focus()
- })
+ .one('hide', () => $this.focus())
})
/* TAB CLASS DEFINITION
@@ -452,4 +449,4 @@
$(this).tab('show')
})
-})(window.jQuery);
+})(jQuery);
diff --git a/vendors/bootstrap/js/bootstrap.min.js b/vendors/bootstrap/js/bootstrap.min.js
index 35d827406..51b466dc8 100644
--- a/vendors/bootstrap/js/bootstrap.min.js
+++ b/vendors/bootstrap/js/bootstrap.min.js
@@ -3,4 +3,4 @@
* Copyright 2013 Twitter, Inc.
* http://www.apache.org/licenses/LICENSE-2.0.txt
*/
-(e=>{"use strict";const t=document;var a="[data-toggle=dropdown]";class o{constructor(t){var a=e(t).on("click.dropdown.data-api",this.toggle);e("html").on("click.dropdown.data-api",()=>a.parent().removeClass("open"))}toggle(){var a,o,n=e(this);if(!n.is(".disabled, :disabled"))return o=(a=s(n)).hasClass("open"),i(),o||("ontouchstart"in t.documentElement&&e('
').insertBefore(e(this)).on("click",i),a.toggleClass("open")),n.focus(),!1}keydown(t){var o,i,n,d,r;if(/(38|40|27)/.test(t.keyCode)&&(o=e(this),t.preventDefault(),t.stopPropagation(),!o.is(".disabled, :disabled"))){if(!(d=(n=s(o)).hasClass("open"))||d&&27==t.keyCode)return 27==t.which&&n.find(a).focus(),o.click();(i=e("[role=menu] li:not(.divider):visible a",n)).length&&(r=i.index(i.filter(":focus")),38==t.keyCode&&r>0&&r--,40==t.keyCode&&re.stopPropagation()).on("click.dropdown.data-api",a,o.prototype.toggle).on("keydown.dropdown.data-api",a+", [role=menu]",o.prototype.keydown);class n{constructor(t,a){this.options=a,this.$element=e(t).on("click.dismiss.modal",'[data-dismiss="modal"]',this.hide.bind(this)),this.options.remote&&this.$element.find(".modal-body").on("load",this.options.remote)}toggle(){return this[this.isShown?"hide":"show"]()}show(){var a=this,o=e.Event("show");this.$element.trigger(o),this.isShown||o.isDefaultPrevented()||(this.isShown=!0,this.escape(),this.backdrop(()=>{var e=a.$element.hasClass("fade");a.$element.parent().length||a.$element.appendTo(t.body),a.$element.show(),e&&a.$element[0].offsetWidth,a.$element.addClass("in").attr("aria-hidden",!1),a.enforceFocus(),e?a.$element.one("transitionend",function(){a.$element.focus().trigger("shown")}):a.$element.focus().trigger("shown")}))}hide(a){a&&a.preventDefault(),a=e.Event("hide"),this.$element.trigger(a),this.isShown&&!a.isDefaultPrevented()&&(this.isShown=!1,this.escape(),e(t).off("focusin.modal"),this.$element.removeClass("in").attr("aria-hidden",!0),this.$element.hasClass("fade")?this.hideWithTransition():this.hideModal())}enforceFocus(){var a=this;e(t).on("focusin.modal",function(e){a.$element[0]===e.target||a.$element.has(e.target).length||a.$element.focus()})}escape(){var e=this;this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.modal",function(t){27==t.which&&e.hide()}):this.isShown||this.$element.off("keyup.dismiss.modal")}hideWithTransition(){var e=this,t=setTimeout(function(){e.$element.off("transitionend"),e.hideModal()},500);this.$element.one("transitionend",function(){clearTimeout(t),e.hideModal()})}hideModal(){var e=this;this.$element.hide(),this.backdrop(function(){e.removeBackdrop(),e.$element.trigger("hidden")})}removeBackdrop(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null}backdrop(a){var o=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){if(this.$backdrop=e('').appendTo(t.body),this.$backdrop.click("static"==this.options.backdrop?this.$element[0].focus.bind(this.$element[0]):this.hide.bind(this)),o&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!a)return;o?this.$backdrop.one("transitionend",a):a()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),this.$element.hasClass("fade")?this.$backdrop.one("transitionend",a):a()):a&&a()}}e.fn.modal=function(t){return this.each(function(){var a=e(this),o=a.data("modal"),i=e.extend({},e.fn.modal.defaults,a.data(),"object"==typeof t&&t);o||a.data("modal",o=new n(this,i)),"string"==typeof t?o[t]():i.show&&o.show()})},e.fn.modal.defaults={backdrop:!0,keyboard:!0,show:!0},e(t).on("click.modal.data-api",'[data-toggle="modal"]',function(t){var a=e(this),o=a.attr("href"),i=e(a.attr("data-target")||o&&o.replace(/.*(?=#[^\s]+$)/,"")),s=i.data("modal")?"toggle":e.extend({remote:!/#/.test(o)&&o},i.data(),a.data());t.preventDefault(),i.modal(s).one("hide",function(){a.focus()})});var d=(e,t,a)=>{var o=t.find("> .active"),i=a&&o.hasClass("fade"),s=()=>{o.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),e.addClass("active"),i?(e[0].offsetWidth,e.addClass("in")):e.removeClass("fade"),e.parent(".dropdown-menu")&&e.closest("li.dropdown").addClass("active"),a&&a()};i?o.one("transitionend",s):s(),o.removeClass("in")};class r{constructor(t){this.element=e(t)}show(){var t,a,o,i=this.element,s=i.closest("ul:not(.dropdown-menu)"),n=i.attr("data-target");n||(n=(n=i.attr("href"))&&n.replace(/.*(?=#[^\s]*$)/,"")),i.parent("li").hasClass("active")||(t=s.find(".active:last a")[0],o=e.Event("show",{relatedTarget:t}),i.trigger(o),o.isDefaultPrevented()||(a=e(n),d(i.parent("li"),s),d(a,a.parent(),()=>{i.trigger({type:"shown",relatedTarget:t})})))}}e.fn.tab=function(t){return this.each(function(){var a=e(this),o=a.data("tab");o||a.data("tab",o=new r(this)),"string"==typeof t&&o[t]()})},e(t).on("click.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(t){t.preventDefault(),e(this).tab("show")})})(window.jQuery);
+(e=>{"use strict";const t=document;var a="[data-toggle=dropdown]";class o{constructor(t){var a=e(t).on("click.dropdown.data-api",this.toggle);e("html").on("click.dropdown.data-api",()=>a.parent().removeClass("open"))}toggle(){var a,o,n=e(this);if(!n.is(".disabled, :disabled"))return o=(a=i(n)).hasClass("open"),s(),o||("ontouchstart"in t.documentElement&&e('').insertBefore(e(this)).on("click",s),a.toggleClass("open")),n.focus(),!1}keydown(t){var o,s,n,d,r;if(/(38|40|27)/.test(t.keyCode)&&(o=e(this),t.preventDefault(),t.stopPropagation(),!o.is(".disabled, :disabled"))){if(!(d=(n=i(o)).hasClass("open"))||d&&27==t.keyCode)return 27==t.which&&n.find(a).focus(),o.click();(s=e("[role=menu] li:not(.divider):visible a",n)).length&&(r=s.index(s.filter(":focus")),38==t.keyCode&&r>0&&r--,40==t.keyCode&&re.stopPropagation()).on("click.dropdown.data-api",a,o.prototype.toggle).on("keydown.dropdown.data-api",a+", [role=menu]",o.prototype.keydown);class n{constructor(t,a){this.options=a,this.$element=e(t).on("click.dismiss.modal",'[data-dismiss="modal"]',this.hide.bind(this)),this.options.remote&&this.$element.find(".modal-body").on("load",this.options.remote)}toggle(){return this[this.isShown?"hide":"show"]()}show(){var a=this,o=e.Event("show");this.$element.trigger(o),this.isShown||o.isDefaultPrevented()||(this.isShown=!0,this.escape(),this.backdrop(()=>{var e=a.$element.hasClass("fade");a.$element.parent().length||a.$element.appendTo(t.body),a.$element.show(),e&&a.$element[0].offsetWidth,a.$element.addClass("in").attr("aria-hidden",!1),a.enforceFocus(),e?a.$element.one("transitionend",()=>a.$element.focus().trigger("shown")):a.$element.focus().trigger("shown")}))}hide(a){a&&a.preventDefault(),a=e.Event("hide"),this.$element.trigger(a),this.isShown&&!a.isDefaultPrevented()&&(this.isShown=!1,this.escape(),e(t).off("focusin.modal"),this.$element.removeClass("in").attr("aria-hidden",!0),this.$element.hasClass("fade")?this.hideWithTransition():this.hideModal())}enforceFocus(){var a=this;e(t).on("focusin.modal",e=>{a.$element[0]===e.target||a.$element.has(e.target).length||a.$element.focus()})}escape(){var e=this;this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.modal",t=>27==t.which&&e.hide()):this.isShown||this.$element.off("keyup.dismiss.modal")}hideWithTransition(){var e=this,t=setTimeout(()=>{e.$element.off("transitionend"),e.hideModal()},500);this.$element.one("transitionend",()=>{clearTimeout(t),e.hideModal()})}hideModal(){var e=this;this.$element.hide(),this.backdrop(()=>{e.removeBackdrop(),e.$element.trigger("hidden")})}removeBackdrop(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null}backdrop(a){var o=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){if(this.$backdrop=e('').appendTo(t.body),this.$backdrop.click("static"==this.options.backdrop?this.$element[0].focus.bind(this.$element[0]):this.hide.bind(this)),o&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!a)return;o?this.$backdrop.one("transitionend",a):a()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),this.$element.hasClass("fade")?this.$backdrop.one("transitionend",a):a()):a&&a()}}e.fn.modal=function(t){return this.each(function(){var a=e(this),o=a.data("modal"),s=e.extend({},e.fn.modal.defaults,a.data(),"object"==typeof t&&t);o||a.data("modal",o=new n(this,s)),"string"==typeof t?o[t]():s.show&&o.show()})},e.fn.modal.defaults={backdrop:!0,keyboard:!0,show:!0},e(t).on("click.modal.data-api",'[data-toggle="modal"]',function(t){var a=e(this),o=a.attr("href"),s=e(a.attr("data-target")||o&&o.replace(/.*(?=#[^\s]+$)/,"")),i=s.data("modal")?"toggle":e.extend({remote:!/#/.test(o)&&o},s.data(),a.data());t.preventDefault(),s.modal(i).one("hide",()=>a.focus())});var d=(e,t,a)=>{var o=t.find("> .active"),s=a&&o.hasClass("fade"),i=()=>{o.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),e.addClass("active"),s?(e[0].offsetWidth,e.addClass("in")):e.removeClass("fade"),e.parent(".dropdown-menu")&&e.closest("li.dropdown").addClass("active"),a&&a()};s?o.one("transitionend",i):i(),o.removeClass("in")};class r{constructor(t){this.element=e(t)}show(){var t,a,o,s=this.element,i=s.closest("ul:not(.dropdown-menu)"),n=s.attr("data-target");n||(n=(n=s.attr("href"))&&n.replace(/.*(?=#[^\s]*$)/,"")),s.parent("li").hasClass("active")||(t=i.find(".active:last a")[0],o=e.Event("show",{relatedTarget:t}),s.trigger(o),o.isDefaultPrevented()||(a=e(n),d(s.parent("li"),i),d(a,a.parent(),()=>{s.trigger({type:"shown",relatedTarget:t})})))}}e.fn.tab=function(t){return this.each(function(){var a=e(this),o=a.data("tab");o||a.data("tab",o=new r(this)),"string"==typeof t&&o[t]()})},e(t).on("click.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(t){t.preventDefault(),e(this).tab("show")})})(jQuery);
diff --git a/vendors/inputosaurus/inputosaurus.js b/vendors/inputosaurus/inputosaurus.js
index ab5ba5ec2..71ba42f1b 100644
--- a/vendors/inputosaurus/inputosaurus.js
+++ b/vendors/inputosaurus/inputosaurus.js
@@ -20,13 +20,10 @@
($ => {
- var inputosaurustext = {
+ const fakeSpan = $('');
- version: "0.1.6",
-
- fakeSpan: $(''),
-
- eventprefix: "inputosaurus",
+ $('body').append(fakeSpan);
+ $.widget("ui.inputosaurus", {
options: {
@@ -259,10 +256,10 @@
// the input dynamically resizes based on the length of its value
_resizeInput : function(ev) {
var widget = (ev && ev.data.widget) || this;
- inputosaurustext.fakeSpan.text(widget.elements.input.val());
+ fakeSpan.text(widget.elements.input.val());
// setTimeout(function () {
- var txtWidth = 25 + inputosaurustext.fakeSpan.width();
+ var txtWidth = 25 + fakeSpan.width();
txtWidth = txtWidth > 50 ? txtWidth : 50;
txtWidth = txtWidth < 500 ? txtWidth : 500;
widget.elements.input.width(txtWidth);
@@ -637,10 +634,7 @@
els.ul.replaceWith(this.element);
}
}
- };
-
- $('body').append(inputosaurustext.fakeSpan);
- $.widget("ui.inputosaurus", inputosaurustext);
+ });
})(jQuery);
diff --git a/vendors/keymaster/keymaster.js b/vendors/keymaster/keymaster.js
index 046732465..836376a38 100644
--- a/vendors/keymaster/keymaster.js
+++ b/vendors/keymaster/keymaster.js
@@ -149,7 +149,7 @@
});
// reset modifiers to false whenever the window is (re)focused.
- window.addEventListener('focus', () => {
+ addEventListener('focus', () => {
for(let k in _mods) _mods[k] = false;
for(let k in _MODIFIERS) assignKey[k] = false;
});
diff --git a/vendors/lightgallery/dist/js/lg-autoplay.js b/vendors/lightgallery/dist/js/lg-autoplay.js
index 6c1c9b7a4..fd923e7e7 100644
--- a/vendors/lightgallery/dist/js/lg-autoplay.js
+++ b/vendors/lightgallery/dist/js/lg-autoplay.js
@@ -8,7 +8,7 @@
* @license MIT License (MIT)
*/
-(function($, window, document, undefined) {
+($ => {
'use strict';
@@ -25,166 +25,170 @@
* Creates the autoplay plugin.
* @param {object} element - lightGallery element
*/
- var Autoplay = function(element) {
+ class Autoplay
+ {
- this.core = $(element).data('lightGallery');
+ constructor(element) {
- this.$el = $(element);
+ this.core = $(element).data('lightGallery');
- // Execute only if items are above 1
- if (this.core.$items.length < 2) {
- return false;
- }
+ this.$el = $(element);
- this.core.s = $.extend({}, defaults, this.core.s);
- this.interval = false;
-
- // Identify if slide happened from autoplay
- this.fromAuto = true;
-
- // Identify if autoplay canceled from touch/drag
- this.canceledOnTouch = false;
-
- // save fourceautoplay value
- this.fourceAutoplayTemp = this.core.s.fourceAutoplay;
-
- // do not allow progress bar if browser does not support css3 transitions
- if (!this.core.doCss()) {
- this.core.s.progressBar = false;
- }
-
- this.init();
-
- return this;
- };
-
- Autoplay.prototype.init = function() {
- var _this = this;
-
- // append autoplay controls
- if (_this.core.s.autoplayControls) {
- _this.controls();
- }
-
- // Create progress bar
- if (_this.core.s.progressBar) {
- _this.core.$outer.find('.lg').append('');
- }
-
- // set progress
- _this.progress();
-
- // Start autoplay
- if (_this.core.s.autoplay) {
- _this.startlAuto();
- }
-
- // cancel interval on touchstart and dragstart
- _this.$el.on('onDragstart.lg.tm touchstart.lg.tm', function() {
- if (_this.interval) {
- _this.cancelAuto();
- _this.canceledOnTouch = true;
+ // Execute only if items are above 1
+ if (this.core.$items.length < 2) {
+ return false;
}
- });
- // restore autoplay if autoplay canceled from touchstart / dragstart
- _this.$el.on('onDragend.lg.tm touchend.lg.tm onSlideClick.lg.tm', function() {
- if (!_this.interval && _this.canceledOnTouch) {
+ this.core.s = $.extend({}, defaults, this.core.s);
+ this.interval = false;
+
+ // Identify if slide happened from autoplay
+ this.fromAuto = true;
+
+ // Identify if autoplay canceled from touch/drag
+ this.canceledOnTouch = false;
+
+ // save fourceautoplay value
+ this.fourceAutoplayTemp = this.core.s.fourceAutoplay;
+
+ // do not allow progress bar if browser does not support css3 transitions
+ if (!this.core.doCss()) {
+ this.core.s.progressBar = false;
+ }
+
+ this.init();
+
+ return this;
+ }
+
+ init() {
+ var _this = this;
+
+ // append autoplay controls
+ if (_this.core.s.autoplayControls) {
+ _this.controls();
+ }
+
+ // Create progress bar
+ if (_this.core.s.progressBar) {
+ _this.core.$outer.find('.lg').append('');
+ }
+
+ // set progress
+ _this.progress();
+
+ // Start autoplay
+ if (_this.core.s.autoplay) {
_this.startlAuto();
- _this.canceledOnTouch = false;
}
- });
- };
-
- Autoplay.prototype.progress = function() {
-
- var _this = this;
- var _$progressBar;
- var _$progress;
-
- _this.$el.on('onBeforeSlide.lg.tm', function() {
-
- // start progress bar animation
- if (_this.core.s.progressBar && _this.fromAuto) {
- _$progressBar = _this.core.$outer.find('.lg-progress-bar');
- _$progress = _this.core.$outer.find('.lg-progress');
+ // cancel interval on touchstart and dragstart
+ _this.$el.on('onDragstart.lg.tm touchstart.lg.tm', () => {
if (_this.interval) {
- _$progress.removeAttr('style');
- _$progressBar.removeClass('lg-start');
- setTimeout(function() {
- _$progress.css('transition', 'width ' + (_this.core.s.speed + _this.core.s.pause) + 'ms ease 0s');
- _$progressBar.addClass('lg-start');
- }, 20);
+ _this.cancelAuto();
+ _this.canceledOnTouch = true;
}
- }
+ });
- // Remove setinterval if slide is triggered manually and fourceautoplay is false
- if (!_this.fromAuto && !_this.core.s.fourceAutoplay) {
- _this.cancelAuto();
- }
-
- _this.fromAuto = false;
-
- });
- };
-
- // Manage autoplay via play/stop buttons
- Autoplay.prototype.controls = function() {
- var _this = this;
- var _html = '';
-
- // Append autoplay controls
- $(this.core.s.appendAutoplayControlsTo).append(_html);
-
- _this.core.$outer.find('.lg-autoplay-button').on('click.lg', function() {
- if ($(_this.core.$outer).hasClass('lg-show-autoplay')) {
- _this.cancelAuto();
- _this.core.s.fourceAutoplay = false;
- } else {
- if (!_this.interval) {
+ // restore autoplay if autoplay canceled from touchstart / dragstart
+ _this.$el.on('onDragend.lg.tm touchend.lg.tm onSlideClick.lg.tm', () => {
+ if (!_this.interval && _this.canceledOnTouch) {
_this.startlAuto();
- _this.core.s.fourceAutoplay = _this.fourceAutoplayTemp;
+ _this.canceledOnTouch = false;
}
- }
- });
- };
+ });
- // Autostart gallery
- Autoplay.prototype.startlAuto = function() {
- var _this = this;
+ }
- _this.core.$outer.find('.lg-progress').css('transition', 'width ' + (_this.core.s.speed + _this.core.s.pause) + 'ms ease 0s');
- _this.core.$outer.addClass('lg-show-autoplay');
- _this.core.$outer.find('.lg-progress-bar').addClass('lg-start');
+ progress() {
- _this.interval = setInterval(function() {
- if (_this.core.index + 1 < _this.core.$items.length) {
- _this.core.index++;
- } else {
- _this.core.index = 0;
- }
+ var _this = this;
+ var _$progressBar;
+ var _$progress;
- _this.fromAuto = true;
- _this.core.slide(_this.core.index, false, false);
- }, _this.core.s.speed + _this.core.s.pause);
- };
+ _this.$el.on('onBeforeSlide.lg.tm', () => {
- // cancel Autostart
- Autoplay.prototype.cancelAuto = function() {
- clearInterval(this.interval);
- this.interval = false;
- this.core.$outer.find('.lg-progress').removeAttr('style');
- this.core.$outer.removeClass('lg-show-autoplay');
- this.core.$outer.find('.lg-progress-bar').removeClass('lg-start');
- };
+ // start progress bar animation
+ if (_this.core.s.progressBar && _this.fromAuto) {
+ _$progressBar = _this.core.$outer.find('.lg-progress-bar');
+ _$progress = _this.core.$outer.find('.lg-progress');
+ if (_this.interval) {
+ _$progress.removeAttr('style');
+ _$progressBar.removeClass('lg-start');
+ setTimeout(() => {
+ _$progress.css('transition', 'width ' + (_this.core.s.speed + _this.core.s.pause) + 'ms ease 0s');
+ _$progressBar.addClass('lg-start');
+ }, 20);
+ }
+ }
- Autoplay.prototype.destroy = function() {
+ // Remove setinterval if slide is triggered manually and fourceautoplay is false
+ if (!_this.fromAuto && !_this.core.s.fourceAutoplay) {
+ _this.cancelAuto();
+ }
- this.cancelAuto();
- this.core.$outer.find('.lg-progress-bar').remove();
- };
+ _this.fromAuto = false;
+
+ });
+ }
+
+ // Manage autoplay via play/stop buttons
+ controls() {
+ var _this = this;
+ var _html = '';
+
+ // Append autoplay controls
+ $(this.core.s.appendAutoplayControlsTo).append(_html);
+
+ _this.core.$outer.find('.lg-autoplay-button').on('click.lg', () => {
+ if ($(_this.core.$outer).hasClass('lg-show-autoplay')) {
+ _this.cancelAuto();
+ _this.core.s.fourceAutoplay = false;
+ } else {
+ if (!_this.interval) {
+ _this.startlAuto();
+ _this.core.s.fourceAutoplay = _this.fourceAutoplayTemp;
+ }
+ }
+ });
+ }
+
+ // Autostart gallery
+ startlAuto() {
+ var _this = this;
+
+ _this.core.$outer.find('.lg-progress').css('transition', 'width ' + (_this.core.s.speed + _this.core.s.pause) + 'ms ease 0s');
+ _this.core.$outer.addClass('lg-show-autoplay');
+ _this.core.$outer.find('.lg-progress-bar').addClass('lg-start');
+
+ _this.interval = setInterval(() => {
+ if (_this.core.index + 1 < _this.core.$items.length) {
+ _this.core.index++;
+ } else {
+ _this.core.index = 0;
+ }
+
+ _this.fromAuto = true;
+ _this.core.slide(_this.core.index, false, false);
+ }, _this.core.s.speed + _this.core.s.pause);
+ }
+
+ // cancel Autostart
+ cancelAuto() {
+ clearInterval(this.interval);
+ this.interval = false;
+ this.core.$outer.find('.lg-progress').removeAttr('style');
+ this.core.$outer.removeClass('lg-show-autoplay');
+ this.core.$outer.find('.lg-progress-bar').removeClass('lg-start');
+ }
+
+ destroy() {
+
+ this.cancelAuto();
+ this.core.$outer.find('.lg-progress-bar').remove();
+ }
+ }
$.fn.lightGallery.modules.autoplay = Autoplay;
-})(jQuery, window, document);
+})(jQuery);
diff --git a/vendors/lightgallery/dist/js/lg-autoplay.min.js b/vendors/lightgallery/dist/js/lg-autoplay.min.js
index d4323b161..f81e1ea9a 100644
--- a/vendors/lightgallery/dist/js/lg-autoplay.min.js
+++ b/vendors/lightgallery/dist/js/lg-autoplay.min.js
@@ -1,4 +1,4 @@
/*! lightgallery - v1.2.21 - 2016-06-28
* http://sachinchoolur.github.io/lightGallery/
* Copyright (c) 2016 Sachin N; Licensed Apache 2.0 */
-!function(a,b,c,d){"use strict";var e={autoplay:!1,pause:5e3,progressBar:!0,fourceAutoplay:!1,autoplayControls:!0,appendAutoplayControlsTo:".lg-toolbar"},f=function(b){return this.core=a(b).data("lightGallery"),this.$el=a(b),this.core.$items.length<2?!1:(this.core.s=a.extend({},e,this.core.s),this.interval=!1,this.fromAuto=!0,this.canceledOnTouch=!1,this.fourceAutoplayTemp=this.core.s.fourceAutoplay,this.core.doCss()||(this.core.s.progressBar=!1),this.init(),this)};f.prototype.init=function(){var a=this;a.core.s.autoplayControls&&a.controls(),a.core.s.progressBar&&a.core.$outer.find(".lg").append(''),a.progress(),a.core.s.autoplay&&a.startlAuto(),a.$el.on("onDragstart.lg.tm touchstart.lg.tm",function(){a.interval&&(a.cancelAuto(),a.canceledOnTouch=!0)}),a.$el.on("onDragend.lg.tm touchend.lg.tm onSlideClick.lg.tm",function(){!a.interval&&a.canceledOnTouch&&(a.startlAuto(),a.canceledOnTouch=!1)})},f.prototype.progress=function(){var a,b,c=this;c.$el.on("onBeforeSlide.lg.tm",function(){c.core.s.progressBar&&c.fromAuto&&(a=c.core.$outer.find(".lg-progress-bar"),b=c.core.$outer.find(".lg-progress"),c.interval&&(b.removeAttr("style"),a.removeClass("lg-start"),setTimeout(function(){b.css("transition","width "+(c.core.s.speed+c.core.s.pause)+"ms ease 0s"),a.addClass("lg-start")},20))),c.fromAuto||c.core.s.fourceAutoplay||c.cancelAuto(),c.fromAuto=!1})},f.prototype.controls=function(){var b=this,c='';a(this.core.s.appendAutoplayControlsTo).append(c),b.core.$outer.find(".lg-autoplay-button").on("click.lg",function(){a(b.core.$outer).hasClass("lg-show-autoplay")?(b.cancelAuto(),b.core.s.fourceAutoplay=!1):b.interval||(b.startlAuto(),b.core.s.fourceAutoplay=b.fourceAutoplayTemp)})},f.prototype.startlAuto=function(){var a=this;a.core.$outer.find(".lg-progress").css("transition","width "+(a.core.s.speed+a.core.s.pause)+"ms ease 0s"),a.core.$outer.addClass("lg-show-autoplay"),a.core.$outer.find(".lg-progress-bar").addClass("lg-start"),a.interval=setInterval(function(){a.core.index+1{"use strict";var o={autoplay:!1,pause:5e3,progressBar:!0,fourceAutoplay:!1,autoplayControls:!0,appendAutoplayControlsTo:".lg-toolbar"};e.fn.lightGallery.modules.autoplay=class{constructor(r){return this.core=e(r).data("lightGallery"),this.$el=e(r),!(this.core.$items.length<2)&&(this.core.s=e.extend({},o,this.core.s),this.interval=!1,this.fromAuto=!0,this.canceledOnTouch=!1,this.fourceAutoplayTemp=this.core.s.fourceAutoplay,this.core.doCss()||(this.core.s.progressBar=!1),this.init(),this)}init(){var e=this;e.core.s.autoplayControls&&e.controls(),e.core.s.progressBar&&e.core.$outer.find(".lg").append(''),e.progress(),e.core.s.autoplay&&e.startlAuto(),e.$el.on("onDragstart.lg.tm touchstart.lg.tm",()=>{e.interval&&(e.cancelAuto(),e.canceledOnTouch=!0)}),e.$el.on("onDragend.lg.tm touchend.lg.tm onSlideClick.lg.tm",()=>{!e.interval&&e.canceledOnTouch&&(e.startlAuto(),e.canceledOnTouch=!1)})}progress(){var e,o,r=this;r.$el.on("onBeforeSlide.lg.tm",()=>{r.core.s.progressBar&&r.fromAuto&&(e=r.core.$outer.find(".lg-progress-bar"),o=r.core.$outer.find(".lg-progress"),r.interval&&(o.removeAttr("style"),e.removeClass("lg-start"),setTimeout(()=>{o.css("transition","width "+(r.core.s.speed+r.core.s.pause)+"ms ease 0s"),e.addClass("lg-start")},20))),r.fromAuto||r.core.s.fourceAutoplay||r.cancelAuto(),r.fromAuto=!1})}controls(){var o=this;e(this.core.s.appendAutoplayControlsTo).append(''),o.core.$outer.find(".lg-autoplay-button").on("click.lg",()=>{e(o.core.$outer).hasClass("lg-show-autoplay")?(o.cancelAuto(),o.core.s.fourceAutoplay=!1):o.interval||(o.startlAuto(),o.core.s.fourceAutoplay=o.fourceAutoplayTemp)})}startlAuto(){var e=this;e.core.$outer.find(".lg-progress").css("transition","width "+(e.core.s.speed+e.core.s.pause)+"ms ease 0s"),e.core.$outer.addClass("lg-show-autoplay"),e.core.$outer.find(".lg-progress-bar").addClass("lg-start"),e.interval=setInterval(()=>{e.core.index+1 {
'use strict';
@@ -9,89 +9,92 @@
fullScreen: true
};
- var Fullscreen = function(element) {
+ class Fullscreen
+ {
+ constructor(element) {
- // get lightGallery core plugin data
- this.core = $(element).data('lightGallery');
+ // get lightGallery core plugin data
+ this.core = $(element).data('lightGallery');
- this.$el = $(element);
+ this.$el = $(element);
- // extend module defalut settings with lightGallery core settings
- this.core.s = $.extend({}, defaults, this.core.s);
+ // extend module defalut settings with lightGallery core settings
+ this.core.s = $.extend({}, defaults, this.core.s);
- this.init();
+ this.init();
- return this;
- };
+ return this;
+ }
- Fullscreen.prototype.init = function() {
- var fullScreen = '';
- if (this.core.s.fullScreen) {
+ init() {
+ var fullScreen = '';
+ if (this.core.s.fullScreen) {
- // check for fullscreen browser support
- if (!document.fullscreenEnabled && !document.webkitFullscreenEnabled &&
- !document.mozFullScreenEnabled && !document.msFullscreenEnabled) {
- return;
- } else {
- fullScreen = '';
- this.core.$outer.find('.lg-toolbar').append(fullScreen);
- this.fullScreen();
+ // check for fullscreen browser support
+ if (!document.fullscreenEnabled && !document.webkitFullscreenEnabled &&
+ !document.mozFullScreenEnabled && !document.msFullscreenEnabled) {
+ return;
+ } else {
+ fullScreen = '';
+ this.core.$outer.find('.lg-toolbar').append(fullScreen);
+ this.fullScreen();
+ }
}
}
- };
- Fullscreen.prototype.requestFullscreen = function() {
- var el = document.documentElement;
- if (el.requestFullscreen) {
- el.requestFullscreen();
- } else if (el.msRequestFullscreen) {
- el.msRequestFullscreen();
- } else if (el.mozRequestFullScreen) {
- el.mozRequestFullScreen();
- } else if (el.webkitRequestFullscreen) {
- el.webkitRequestFullscreen();
- }
- };
-
- Fullscreen.prototype.exitFullscreen = function() {
- if (document.exitFullscreen) {
- document.exitFullscreen();
- } else if (document.msExitFullscreen) {
- document.msExitFullscreen();
- } else if (document.mozCancelFullScreen) {
- document.mozCancelFullScreen();
- } else if (document.webkitExitFullscreen) {
- document.webkitExitFullscreen();
- }
- };
-
- // https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Using_full_screen_mode
- Fullscreen.prototype.fullScreen = function() {
- var _this = this;
-
- $(document).on('fullscreenchange.lg webkitfullscreenchange.lg mozfullscreenchange.lg MSFullscreenChange.lg', function() {
- _this.core.$outer.toggleClass('lg-fullscreen-on');
- });
-
- this.core.$outer.find('.lg-fullscreen').on('click.lg', function() {
- if (!document.fullscreenElement &&
- !document.mozFullScreenElement && !document.webkitFullscreenElement && !document.msFullscreenElement) {
- _this.requestFullscreen();
- } else {
- _this.exitFullscreen();
+ requestFullscreen() {
+ var el = document.documentElement;
+ if (el.requestFullscreen) {
+ el.requestFullscreen();
+ } else if (el.msRequestFullscreen) {
+ el.msRequestFullscreen();
+ } else if (el.mozRequestFullScreen) {
+ el.mozRequestFullScreen();
+ } else if (el.webkitRequestFullscreen) {
+ el.webkitRequestFullscreen();
}
- });
+ }
- };
+ exitFullscreen() {
+ if (document.exitFullscreen) {
+ document.exitFullscreen();
+ } else if (document.msExitFullscreen) {
+ document.msExitFullscreen();
+ } else if (document.mozCancelFullScreen) {
+ document.mozCancelFullScreen();
+ } else if (document.webkitExitFullscreen) {
+ document.webkitExitFullscreen();
+ }
+ }
- Fullscreen.prototype.destroy = function() {
+ // https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Using_full_screen_mode
+ fullScreen() {
+ var _this = this;
- // exit from fullscreen if activated
- this.exitFullscreen();
+ $(document).on('fullscreenchange.lg webkitfullscreenchange.lg mozfullscreenchange.lg MSFullscreenChange.lg', () =>
+ _this.core.$outer.toggleClass('lg-fullscreen-on')
+ );
- $(document).off('fullscreenchange.lg webkitfullscreenchange.lg mozfullscreenchange.lg MSFullscreenChange.lg');
- };
+ this.core.$outer.find('.lg-fullscreen').on('click.lg', () => {
+ if (!document.fullscreenElement &&
+ !document.mozFullScreenElement && !document.webkitFullscreenElement && !document.msFullscreenElement) {
+ _this.requestFullscreen();
+ } else {
+ _this.exitFullscreen();
+ }
+ });
+
+ }
+
+ destroy() {
+
+ // exit from fullscreen if activated
+ this.exitFullscreen();
+
+ $(document).off('fullscreenchange.lg webkitfullscreenchange.lg mozfullscreenchange.lg MSFullscreenChange.lg');
+ }
+ }
$.fn.lightGallery.modules.fullscreen = Fullscreen;
-})(jQuery, window, document);
+})(jQuery, document);
diff --git a/vendors/lightgallery/dist/js/lg-fullscreen.min.js b/vendors/lightgallery/dist/js/lg-fullscreen.min.js
index 5af5eb4d9..db27064b3 100644
--- a/vendors/lightgallery/dist/js/lg-fullscreen.min.js
+++ b/vendors/lightgallery/dist/js/lg-fullscreen.min.js
@@ -1,4 +1,4 @@
/*! lightgallery - v1.2.21 - 2016-06-28
* http://sachinchoolur.github.io/lightGallery/
* Copyright (c) 2016 Sachin N; Licensed Apache 2.0 */
-!function(a,b,c,d){"use strict";var e={fullScreen:!0},f=function(b){return this.core=a(b).data("lightGallery"),this.$el=a(b),this.core.s=a.extend({},e,this.core.s),this.init(),this};f.prototype.init=function(){var a="";if(this.core.s.fullScreen){if(!(c.fullscreenEnabled||c.webkitFullscreenEnabled||c.mozFullScreenEnabled||c.msFullscreenEnabled))return;a='',this.core.$outer.find(".lg-toolbar").append(a),this.fullScreen()}},f.prototype.requestFullscreen=function(){var a=c.documentElement;a.requestFullscreen?a.requestFullscreen():a.msRequestFullscreen?a.msRequestFullscreen():a.mozRequestFullScreen?a.mozRequestFullScreen():a.webkitRequestFullscreen&&a.webkitRequestFullscreen()},f.prototype.exitFullscreen=function(){c.exitFullscreen?c.exitFullscreen():c.msExitFullscreen?c.msExitFullscreen():c.mozCancelFullScreen?c.mozCancelFullScreen():c.webkitExitFullscreen&&c.webkitExitFullscreen()},f.prototype.fullScreen=function(){var b=this;a(c).on("fullscreenchange.lg webkitfullscreenchange.lg mozfullscreenchange.lg MSFullscreenChange.lg",function(){b.core.$outer.toggleClass("lg-fullscreen-on")}),this.core.$outer.find(".lg-fullscreen").on("click.lg",function(){c.fullscreenElement||c.mozFullScreenElement||c.webkitFullscreenElement||c.msFullscreenElement?b.exitFullscreen():b.requestFullscreen()})},f.prototype.destroy=function(){this.exitFullscreen(),a(c).off("fullscreenchange.lg webkitfullscreenchange.lg mozfullscreenchange.lg MSFullscreenChange.lg")},a.fn.lightGallery.modules.fullscreen=f}(jQuery,window,document);
\ No newline at end of file
+((e,l)=>{"use strict";var n={fullScreen:!0};e.fn.lightGallery.modules.fullscreen=class{constructor(l){return this.core=e(l).data("lightGallery"),this.$el=e(l),this.core.s=e.extend({},n,this.core.s),this.init(),this}init(){var e="";if(this.core.s.fullScreen){if(!(l.fullscreenEnabled||l.webkitFullscreenEnabled||l.mozFullScreenEnabled||l.msFullscreenEnabled))return;e='',this.core.$outer.find(".lg-toolbar").append(e),this.fullScreen()}}requestFullscreen(){var e=l.documentElement;e.requestFullscreen?e.requestFullscreen():e.msRequestFullscreen?e.msRequestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen&&e.webkitRequestFullscreen()}exitFullscreen(){l.exitFullscreen?l.exitFullscreen():l.msExitFullscreen?l.msExitFullscreen():l.mozCancelFullScreen?l.mozCancelFullScreen():l.webkitExitFullscreen&&l.webkitExitFullscreen()}fullScreen(){var n=this;e(l).on("fullscreenchange.lg webkitfullscreenchange.lg mozfullscreenchange.lg MSFullscreenChange.lg",()=>n.core.$outer.toggleClass("lg-fullscreen-on")),this.core.$outer.find(".lg-fullscreen").on("click.lg",()=>{l.fullscreenElement||l.mozFullScreenElement||l.webkitFullscreenElement||l.msFullscreenElement?n.exitFullscreen():n.requestFullscreen()})}destroy(){this.exitFullscreen(),e(l).off("fullscreenchange.lg webkitfullscreenchange.lg mozfullscreenchange.lg MSFullscreenChange.lg")}}})(jQuery,document);
diff --git a/vendors/lightgallery/dist/js/lg-hash.js b/vendors/lightgallery/dist/js/lg-hash.js
deleted file mode 100644
index 59b6915b1..000000000
--- a/vendors/lightgallery/dist/js/lg-hash.js
+++ /dev/null
@@ -1,73 +0,0 @@
-/*! lightgallery - v1.2.21 - 2016-06-28
-* http://sachinchoolur.github.io/lightGallery/
-* Copyright (c) 2016 Sachin N; Licensed Apache 2.0 */
-(function($, window, document, undefined) {
-
- 'use strict';
-
- var defaults = {
- hash: true
- };
-
- var Hash = function(element) {
-
- this.core = $(element).data('lightGallery');
-
- this.core.s = $.extend({}, defaults, this.core.s);
-
- if (this.core.s.hash) {
- this.oldHash = window.location.hash;
- this.init();
- }
-
- return this;
- };
-
- Hash.prototype.init = function() {
- var _this = this;
- var _hash;
-
- // Change hash value on after each slide transition
- _this.core.$el.on('onAfterSlide.lg.tm', function(event, prevIndex, index) {
- window.location.hash = 'lg=' + _this.core.s.galleryId + '&slide=' + index;
- });
-
- // Listen hash change and change the slide according to slide value
- $(window).on('hashchange.lg.hash', function() {
- _hash = window.location.hash;
- var _idx = parseInt(_hash.split('&slide=')[1], 10);
-
- // it galleryId doesn't exist in the url close the gallery
- if ((_hash.indexOf('lg=' + _this.core.s.galleryId) > -1)) {
- _this.core.slide(_idx, false, false);
- } else if (_this.core.lGalleryOn) {
- _this.core.destroy();
- }
-
- });
- };
-
- Hash.prototype.destroy = function() {
-
- if (!this.core.s.hash) {
- return;
- }
-
- // Reset to old hash value
- if (this.oldHash && this.oldHash.indexOf('lg=' + this.core.s.galleryId) < 0) {
- window.location.hash = this.oldHash;
- } else {
- if (history.pushState) {
- history.pushState('', document.title, window.location.pathname + window.location.search);
- } else {
- window.location.hash = '';
- }
- }
-
- this.core.$el.off('.lg.hash');
-
- };
-
- $.fn.lightGallery.modules.hash = Hash;
-
-})(jQuery, window, document);
\ No newline at end of file
diff --git a/vendors/lightgallery/dist/js/lg-hash.min.js b/vendors/lightgallery/dist/js/lg-hash.min.js
deleted file mode 100644
index fb6bc4a89..000000000
--- a/vendors/lightgallery/dist/js/lg-hash.min.js
+++ /dev/null
@@ -1,4 +0,0 @@
-/*! lightgallery - v1.2.21 - 2016-06-28
-* http://sachinchoolur.github.io/lightGallery/
-* Copyright (c) 2016 Sachin N; Licensed Apache 2.0 */
-!function(a,b,c,d){"use strict";var e={hash:!0},f=function(c){return this.core=a(c).data("lightGallery"),this.core.s=a.extend({},e,this.core.s),this.core.s.hash&&(this.oldHash=b.location.hash,this.init()),this};f.prototype.init=function(){var c,d=this;d.core.$el.on("onAfterSlide.lg.tm",function(a,c,e){b.location.hash="lg="+d.core.s.galleryId+"&slide="+e}),a(b).on("hashchange.lg.hash",function(){c=b.location.hash;var a=parseInt(c.split("&slide=")[1],10);c.indexOf("lg="+d.core.s.galleryId)>-1?d.core.slide(a,!1,!1):d.core.lGalleryOn&&d.core.destroy()})},f.prototype.destroy=function(){this.core.s.hash&&(this.oldHash&&this.oldHash.indexOf("lg="+this.core.s.galleryId)<0?b.location.hash=this.oldHash:history.pushState?history.pushState("",c.title,b.location.pathname+b.location.search):b.location.hash="",this.core.$el.off(".lg.hash"))},a.fn.lightGallery.modules.hash=f}(jQuery,window,document);
\ No newline at end of file
diff --git a/vendors/lightgallery/dist/js/lg-pager.js b/vendors/lightgallery/dist/js/lg-pager.js
deleted file mode 100644
index e58c3095c..000000000
--- a/vendors/lightgallery/dist/js/lg-pager.js
+++ /dev/null
@@ -1,85 +0,0 @@
-/*! lightgallery - v1.2.21 - 2016-06-28
-* http://sachinchoolur.github.io/lightGallery/
-* Copyright (c) 2016 Sachin N; Licensed Apache 2.0 */
-(function($, window, document, undefined) {
-
- 'use strict';
-
- var defaults = {
- pager: false
- };
-
- var Pager = function(element) {
-
- this.core = $(element).data('lightGallery');
-
- this.$el = $(element);
- this.core.s = $.extend({}, defaults, this.core.s);
- if (this.core.s.pager && this.core.$items.length > 1) {
- this.init();
- }
-
- return this;
- };
-
- Pager.prototype.init = function() {
- var _this = this;
- var pagerList = '';
- var $pagerCont;
- var $pagerOuter;
- var timeout;
-
- _this.core.$outer.find('.lg').append('');
-
- if (_this.core.s.dynamic) {
- for (var i = 0; i < _this.core.s.dynamicEl.length; i++) {
- pagerList += '';
- }
- } else {
- _this.core.$items.each(function() {
-
- if (!_this.core.s.exThumbImage) {
- pagerList += '';
- } else {
- pagerList += '';
- }
-
- });
- }
-
- $pagerOuter = _this.core.$outer.find('.lg-pager-outer');
-
- $pagerOuter.html(pagerList);
-
- $pagerCont = _this.core.$outer.find('.lg-pager-cont');
- $pagerCont.on('click.lg touchend.lg', function() {
- var _$this = $(this);
- _this.core.index = _$this.index();
- _this.core.slide(_this.core.index, false, false);
- });
-
- $pagerOuter.on('mouseover.lg', function() {
- clearTimeout(timeout);
- $pagerOuter.addClass('lg-pager-hover');
- });
-
- $pagerOuter.on('mouseout.lg', function() {
- timeout = setTimeout(function() {
- $pagerOuter.removeClass('lg-pager-hover');
- });
- });
-
- _this.core.$el.on('onBeforeSlide.lg.tm', function(e, prevIndex, index) {
- $pagerCont.removeClass('lg-pager-active');
- $pagerCont.eq(index).addClass('lg-pager-active');
- });
-
- };
-
- Pager.prototype.destroy = function() {
-
- };
-
- $.fn.lightGallery.modules.pager = Pager;
-
-})(jQuery, window, document);
diff --git a/vendors/lightgallery/dist/js/lg-pager.min.js b/vendors/lightgallery/dist/js/lg-pager.min.js
deleted file mode 100644
index 0090a8e57..000000000
--- a/vendors/lightgallery/dist/js/lg-pager.min.js
+++ /dev/null
@@ -1,4 +0,0 @@
-/*! lightgallery - v1.2.21 - 2016-06-28
-* http://sachinchoolur.github.io/lightGallery/
-* Copyright (c) 2016 Sachin N; Licensed Apache 2.0 */
-!function(a,b,c,d){"use strict";var e={pager:!1},f=function(b){return this.core=a(b).data("lightGallery"),this.$el=a(b),this.core.s=a.extend({},e,this.core.s),this.core.s.pager&&this.core.$items.length>1&&this.init(),this};f.prototype.init=function(){var b,c,d,e=this,f="";if(e.core.$outer.find(".lg").append(''),e.core.s.dynamic)for(var g=0;g