add function to check for window width and use that throughout the app for more convenient future use

This commit is contained in:
Robin Scholtes 2023-05-12 17:50:46 +12:00
parent 6a1514db30
commit df781bec00
6 changed files with 11 additions and 8 deletions

View file

@ -183,7 +183,7 @@ class OperationsWaiter {
* @param {event} e
*/
opListCreate(e) {
if (window.innerWidth < this.app.breakpoint) {
if (this.app.isMobileView()) {
this.createMobileOpList(e);
} else {
this.createDesktopOpList(e);
@ -313,7 +313,7 @@ class OperationsWaiter {
this.removeIntent = false;
}.bind(this));
if (window.innerWidth >= this.app.breakpoint) {
if (!this.app.isMobileView()) {
$("#edit-favourites-list [data-toggle=popover]").popover();
}
$("#favourites-modal").modal();