mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 12:19:28 +00:00
navigation component add option to pass css classes for left menu, verticalsplit add isCollapsed function, searchbar remove search button and prevent page reload on pressing enter
This commit is contained in:
@@ -29,7 +29,11 @@ export const CoreNavigationCmpt = {
|
||||
props: {
|
||||
addHeaderMenuEntries: Object, // property used to add new header menu entries from another app/component
|
||||
addSideMenuEntries: Object, // property used to add new side menu entries from another app/component
|
||||
hideTopMenu: Boolean
|
||||
hideTopMenu: Boolean,
|
||||
leftNavCssClasses: {
|
||||
type: String,
|
||||
default: 'navbar navbar-left-side'
|
||||
}
|
||||
},
|
||||
data: function() {
|
||||
return {
|
||||
@@ -131,7 +135,7 @@ export const CoreNavigationCmpt = {
|
||||
</nav>
|
||||
|
||||
<!-- Left side menu -->
|
||||
<nav class="navbar navbar-left-side">
|
||||
<nav :class="leftNavCssClasses">
|
||||
<ul class="navbar-nav">
|
||||
<!-- 1st level -->
|
||||
<template v-for="menu in sideMenuEntries">
|
||||
|
||||
@@ -27,15 +27,14 @@ export default {
|
||||
organisationunit: organisationunit
|
||||
},
|
||||
template: `
|
||||
<form ref="searchform" class="d-flex me-3"
|
||||
<form ref="searchform" class="d-flex me-3" action="javascript:void(0);"
|
||||
@focusin="this.searchfocusin" @focusout="this.searchfocusout">
|
||||
<div class="input-group me-2 bg-white">
|
||||
<input ref="searchbox" @keyup="this.search" @focus="this.showsearchresult"
|
||||
v-model="this.searchsettings.searchstr" class="form-control"
|
||||
type="search" placeholder="Search" aria-label="Search">
|
||||
<button ref="settingsbutton" @click="this.togglesettings" class="btn btn-outline-secondary" type="button" id="search-filter"><i class="fas fa-cog"></i></button>
|
||||
</div>
|
||||
<button @click="this.search" class="btn btn-outline-success" type="button">Search</button>
|
||||
</div>
|
||||
|
||||
<div v-show="this.showresult" ref="result"
|
||||
class="searchbar_results" tabindex="-1">
|
||||
|
||||
@@ -76,6 +76,15 @@ export default {
|
||||
this.topheight = Math.floor(this.availHeight/2);
|
||||
this.bottomheight = Math.floor(this.availHeight/2);
|
||||
},
|
||||
isCollapsed: function() {
|
||||
if( this.topheight === 0 ) {
|
||||
return 'top';
|
||||
} else if ( this.bottomheight === 0 ) {
|
||||
return 'bottom';
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
dragStart: function(e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
Reference in New Issue
Block a user