Родитель
f2c8956237
Коммит
c662c76a36
|
@ -76,14 +76,6 @@
|
||||||
!(function () {
|
!(function () {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var eventModalOpen = new CustomEvent('modalOpen', {
|
|
||||||
bubbles: true,
|
|
||||||
cancelable: true
|
|
||||||
});
|
|
||||||
var eventModalClose = new CustomEvent('modalClose', {
|
|
||||||
bubbles: true,
|
|
||||||
cancelable: true
|
|
||||||
});
|
|
||||||
var findModals = function (target) {
|
var findModals = function (target) {
|
||||||
var i;
|
var i;
|
||||||
var modals = document.querySelectorAll('a');
|
var modals = document.querySelectorAll('a');
|
||||||
|
@ -107,9 +99,18 @@
|
||||||
window.addEventListener('touchend', function (event) {
|
window.addEventListener('touchend', function (event) {
|
||||||
var modal = getModal(event);
|
var modal = getModal(event);
|
||||||
if (modal && modal.classList.contains('modal')) {
|
if (modal && modal.classList.contains('modal')) {
|
||||||
var eventToDispatch = eventModalOpen;
|
var eventToDispatch = null;
|
||||||
if (modal.classList.contains('active')) {
|
if (modal.classList.contains('active')) {
|
||||||
eventToDispatch = eventModalClose;
|
eventToDispatch = new CustomEvent('modalClose', {
|
||||||
|
bubbles: true,
|
||||||
|
cancelable: true
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
eventToDispatch = new CustomEvent('modalOpen', {
|
||||||
|
bubbles: true,
|
||||||
|
cancelable: true
|
||||||
|
});
|
||||||
}
|
}
|
||||||
modal.dispatchEvent(eventToDispatch);
|
modal.dispatchEvent(eventToDispatch);
|
||||||
modal.classList.toggle('active');
|
modal.classList.toggle('active');
|
||||||
|
|
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
|
@ -76,14 +76,6 @@
|
||||||
!(function () {
|
!(function () {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var eventModalOpen = new CustomEvent('modalOpen', {
|
|
||||||
bubbles: true,
|
|
||||||
cancelable: true
|
|
||||||
});
|
|
||||||
var eventModalClose = new CustomEvent('modalClose', {
|
|
||||||
bubbles: true,
|
|
||||||
cancelable: true
|
|
||||||
});
|
|
||||||
var findModals = function (target) {
|
var findModals = function (target) {
|
||||||
var i;
|
var i;
|
||||||
var modals = document.querySelectorAll('a');
|
var modals = document.querySelectorAll('a');
|
||||||
|
@ -107,9 +99,18 @@
|
||||||
window.addEventListener('touchend', function (event) {
|
window.addEventListener('touchend', function (event) {
|
||||||
var modal = getModal(event);
|
var modal = getModal(event);
|
||||||
if (modal && modal.classList.contains('modal')) {
|
if (modal && modal.classList.contains('modal')) {
|
||||||
var eventToDispatch = eventModalOpen;
|
var eventToDispatch = null;
|
||||||
if (modal.classList.contains('active')) {
|
if (modal.classList.contains('active')) {
|
||||||
eventToDispatch = eventModalClose;
|
eventToDispatch = new CustomEvent('modalClose', {
|
||||||
|
bubbles: true,
|
||||||
|
cancelable: true
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
eventToDispatch = new CustomEvent('modalOpen', {
|
||||||
|
bubbles: true,
|
||||||
|
cancelable: true
|
||||||
|
});
|
||||||
}
|
}
|
||||||
modal.dispatchEvent(eventToDispatch);
|
modal.dispatchEvent(eventToDispatch);
|
||||||
modal.classList.toggle('active');
|
modal.classList.toggle('active');
|
||||||
|
|
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
Загрузка…
Ссылка в новой задаче