2020-05-24 08:58:18 +02:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
import Events from '../_events';
|
|
|
|
|
|
|
|
const ImagePositionUI = (($) => {
|
|
|
|
const D = document;
|
|
|
|
const W = window;
|
|
|
|
const $Body = $('html,body');
|
|
|
|
const NAME = 'ImagePositionUI';
|
|
|
|
const CLASSNAME = `js${NAME}`;
|
|
|
|
|
|
|
|
class ImagePositionUI {
|
|
|
|
static init() {
|
|
|
|
const ui = this;
|
|
|
|
ui.dispose();
|
|
|
|
|
|
|
|
if (!$(`.${CLASSNAME}`).length) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2020-09-09 17:40:58 +02:00
|
|
|
console.log(`${NAME}: init`);
|
2020-05-24 08:58:18 +02:00
|
|
|
$(`.${CLASSNAME}`).on('click', (e) => {
|
|
|
|
e.preventDefault();
|
|
|
|
console.log(e);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
static dispose() {
|
2020-09-09 17:40:58 +02:00
|
|
|
console.log(`${NAME}: dispose`);
|
2020-05-24 08:58:18 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-09-09 17:40:58 +02:00
|
|
|
$(W).on(`${NAME}.init ${Events.AJAX} ${Events.LOADED}`, () => {
|
2020-05-24 08:58:18 +02:00
|
|
|
ImagePositionUI.init();
|
|
|
|
});
|
|
|
|
|
|
|
|
W.ImagePositionUI = new ImagePositionUI();
|
|
|
|
|
|
|
|
return ImagePositionUI;
|
|
|
|
})($);
|
|
|
|
|
|
|
|
export default ImagePositionUI;
|