enhanced IFrame plugin

- fix error throw
- add tab close button hide/show with hover/focus
pull/3481/head
REJack 2021-03-04 08:04:09 +01:00
parent 31f647fa1b
commit 5b19f5e9aa
2 changed files with 21 additions and 2 deletions

View File

@ -191,7 +191,7 @@ class IFrame {
$(SELECTOR_TAB_EMPTY).show()
} else {
const prevNavItemIndex = navItemIndex - 1
this.switchTab($navItemParent.children().eq(prevNavItemIndex).find('a'))
this.switchTab($navItemParent.children().eq(prevNavItemIndex).find('a.nav-link'))
}
} else {
const $navItem = $(`${SELECTOR_TAB_NAVBAR_NAV_ITEM}.active`)
@ -203,7 +203,7 @@ class IFrame {
$(SELECTOR_TAB_EMPTY).show()
} else {
const prevNavItemIndex = navItemIndex - 1
this.switchTab($navItemParent.children().eq(prevNavItemIndex).find('a'))
this.switchTab($navItemParent.children().eq(prevNavItemIndex).find('a.nav-link'))
}
}
}

View File

@ -28,6 +28,15 @@ body.iframe-mode-fullscreen {
right: .125rem;
top: .125rem;
z-index: 10;
visibility: hidden;
&:hover,
&:focus {
animation-name: fadeIn;
animation-duration: $transition-speed;
animation-fill-mode: both;
visibility: visible;
}
}
.navbar-nav {
overflow-y: auto;
@ -38,6 +47,16 @@ body.iframe-mode-fullscreen {
}
.nav-item {
position: relative;
&:hover,
&:focus {
.btn-iframe-close {
animation-name: fadeIn;
animation-duration: $transition-speed;
animation-fill-mode: both;
visibility: visible;
}
}
}
}
.tab-content {