mirror of
https://github.com/a2nt/webpack-bootstrap-ui-kit.git
synced 2024-10-22 11:05:45 +02:00
IMPROVEMENT: ui.flyout cookies interaction
This commit is contained in:
parent
940c98da7e
commit
26a28191aa
2
dist/js/app.js
vendored
2
dist/js/app.js
vendored
File diff suppressed because one or more lines are too long
2
dist/js/app.js.map
vendored
2
dist/js/app.js.map
vendored
File diff suppressed because one or more lines are too long
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@a2nt/ss-bootstrap-ui-webpack-boilerplate",
|
||||
"version": "1.1.3",
|
||||
"version": "1.1.4",
|
||||
"author": "Tony Air <tony@twma.pro>",
|
||||
"license": "MIT",
|
||||
"description": "This UI Kit allows you to build Bootstrap 4 webapp with some extra UI features. It's easy to extend and easy to convert HTML templates to CMS templates.",
|
||||
|
@ -17,24 +17,26 @@ const FlyoutUI = (($) => {
|
||||
class FlyoutUI {
|
||||
static init() {
|
||||
const ui = this;
|
||||
const $close = ui.$modal.find(`.flyout-${NAME}__close`);
|
||||
|
||||
ui.$modal = $(`.flyout-${NAME}`);
|
||||
const hide = CookieUI.get(COOKIE);
|
||||
|
||||
if (ui.$modal.length && (!hide || hide !== 'true')) {
|
||||
if (ui.$modal.length) {
|
||||
ui.$modal.data(NAME, ui);
|
||||
|
||||
const $close = ui.$modal.find(`.flyout-${NAME}__close`);
|
||||
|
||||
if ($close.length) {
|
||||
$close.on('click', () => {
|
||||
ui.hide();
|
||||
});
|
||||
}
|
||||
|
||||
setTimeout(() => {
|
||||
ui.show();
|
||||
}, TIMEOUT);
|
||||
const hide = CookieUI.get(COOKIE);
|
||||
|
||||
if (!$close.length || !hide || hide !== 'true') {
|
||||
setTimeout(() => {
|
||||
ui.show();
|
||||
}, TIMEOUT);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user