mirror of
https://github.com/gchq/CyberChef.git
synced 2025-05-09 07:45:00 -04:00
disable all li.operation popovers on mobile and enable and disable on window resize events appropriately
This commit is contained in:
parent
95c9c88799
commit
1092382fbc
2 changed files with 7 additions and 0 deletions
|
@ -35,6 +35,7 @@
|
||||||
@media only screen and ( min-width: 768px ){
|
@media only screen and ( min-width: 768px ){
|
||||||
#operations-dropdown {
|
#operations-dropdown {
|
||||||
border-bottom: none;
|
border-bottom: none;
|
||||||
|
border-top: 1px solid var(--primary-border-colour);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* On desktop UI, the categories are always visible */
|
/* On desktop UI, the categories are always visible */
|
||||||
|
|
|
@ -53,6 +53,9 @@ class WindowWaiter {
|
||||||
onResizeToDesktop() {
|
onResizeToDesktop() {
|
||||||
this.app.setDesktopUI(false);
|
this.app.setDesktopUI(false);
|
||||||
|
|
||||||
|
// disable app popovers on li.operation elements
|
||||||
|
$(document.querySelectorAll("li.operation")).popover("enable");
|
||||||
|
|
||||||
// if a window is resized past breakpoint while #recipe or #input is maximised, close these maxed panes
|
// if a window is resized past breakpoint while #recipe or #input is maximised, close these maxed panes
|
||||||
["recipe", "input"].forEach(paneId => this.manager.controls.setPaneMaximised(paneId, false));
|
["recipe", "input"].forEach(paneId => this.manager.controls.setPaneMaximised(paneId, false));
|
||||||
|
|
||||||
|
@ -66,6 +69,9 @@ class WindowWaiter {
|
||||||
onResizeToMobile() {
|
onResizeToMobile() {
|
||||||
this.app.setMobileUI();
|
this.app.setMobileUI();
|
||||||
|
|
||||||
|
// disable app popovers on li.operation elements
|
||||||
|
$(document.querySelectorAll("li.operation")).popover("disable");
|
||||||
|
|
||||||
// when mobile devices' keyboards pop up, it triggers a window resize event. Here
|
// when mobile devices' keyboards pop up, it triggers a window resize event. Here
|
||||||
// we keep the maximised panes open until the minimise button is clicked / tapped
|
// we keep the maximised panes open until the minimise button is clicked / tapped
|
||||||
["recipe", "input", "output"]
|
["recipe", "input", "output"]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue