SemantiUI: Sidebar flyout menu - sidebar

I am trying to get a Fly-out type menu launched from a sidebar. Any ideas/examples? Wondering if Popups are an option?
Ex: When user has their mouse over the settings icon, I want a menu to "fly-out" with the 3 options..,
<div id="mnuSideNav" class="ui vertical menu labeled icon inverted sidebar">
<div id="mnuAdmin" class="item ">
<i class="settings icon" title="Administrative Settings"></i>
<div id="mnuAdminItems" class="inverted menu">
<a class="item"><i class="edit icon"></i> Edit Profile</a>
<a class="item"><i class="globe icon"></i> Choose Language</a>
<a class="item"><i class="settings icon"></i> Account Settings</a>
</div>
</div>
</div>

Resolved this using a popup..,
Elements like that support overflow cannot have menus extend beyond the sidebar ("Fly-out"). So Pop-ups are the only option. Define a popup and in the javascript initializing the popup set its popup parameter..,
Ex: SideBar:
<div id="mnuSideNav" class="ui left vertical menu labeled icon inverted sidebar">
<a id="sbAdmin" class="browse item popupMenu">
<i class="settings icon" title="Administrative Settings"></i>
</a>
</div>
Popup
<div id="adminPopup" class="ui popup ">
<div class="ui one column relaxed equal height left aligned grid ">
<div class="ui column ">
<h4 class="ui header">Admin Menu</h4>
</div>
</div>
</div>
Script:
$('.popupMenu').popup({
popup: '#adminPopup',
inline : true,
hoverable: true,
position : 'right center',
delay: {show: 300, hide: 800}
});

Related

how can i fix this problem semantic ui modal won't close

Modal Show Code
$("#classification-model").modal({
autofocus: false,
showOnFocus: false
})
.modal('setting', 'closable', false).modal('show');
Modal Hide Code
$('#classification-model').modal('hide dimmer');
Modal Html Code
<div class="ui page modals transition" id="classification-model" style="display: none !important;">
<div class="ui small modal transition visible active" style="position:relative;">
<div class="header">
<div role="list" class="ui large divided horizontal list">
<div role="listitem" class="item"><div class="content">Classification</div></div>
</div>
</div>
<div class="modalLists content classificationModalList">
<div class="ui two column grid" id="classificationModalList">
</div>
</div>
<div class="actions">
<div role="listbox" aria-expanded="false" class="ui selection dropdown main-classificationv2" tabindex="0" style="float: left;">
<div aria-atomic="true" aria-live="polite" role="alert" class="divider default text">Classification</div><i aria-hidden="true" class="dropdown icon"></i>
<div class="menu transition" id="main-classification">
</div>
</div><button class="ui icon left labeled button check-multi" onclick="ApplytoAll(this)"><i aria-hidden="true" class="check icon"></i>Apply to All</button><button class="ui icon left labeled button upload-resume" onclick="ContinueUploading(this)"><i aria-hidden="true" class="upload icon"></i>Continue Uploading</button>
</div>
</div>
</div>
how can i fix this problem semantic ui modal won't close.
modal does not close

SemanticUI pointing dropdown does not work correctly in Angular 2

I as trying to make a pointing drop down, and it is as Semantic UI's documentation says it should be, but it didn't open to the side when I click,I might be missing something, can you guys help me?
<pre>
<div class="ui vertical menu">
<div class="header item">
Exemplos
</div>
<div class="ui left pointing dropdown link item">
<i class="dropdown icon"></i>
Imagem
<div class="menu">
<div class="item" routerLink="images"
RouterLinkActive="active">Reconhecimento de Objetos</div>
<div class="item">Reconhecimento Facial</div>
</div>
</div>
</div>
</pre>
The Semantic UI dropdown module requires some JavaScript for it to work properly. To just get the menu to show, you can use angular to perform the necessary Javascript work.
<div class="ui vertical menu">
<div class="header item">
Exemplos
</div>
<div class="ui left pointing dropdown link item" ngClass="{'visible': showMenu, 'active': showMenu}">
<i class="dropdown icon" (click)="showMenu = !showMenu"></i>
Imagem
<div class="menu" ngClass="{'visible': showMenu, 'hidden': !showMenu}">
<div class="item" routerLink="images"
RouterLinkActive="active">Reconhecimento de Objetos</div>
<div class="item">Reconhecimento Facial</div>
</div>
</div>
</div>
This won't apply the classes with the proper timing though to do the animations that Semantic UI provides as well. To do that you will have to load the requisite js libraries(jQuery and semantics js files) and get them to play nicely with Typescript.

Accordion options closes sidebar in Semantic UI

Below is the accordion inside sidebar markup with Semantic UI.
<!DOCTYPE 5>
<html>
<head>
<title>App</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
</head>
<body>
<div id="app">
<div class="ui bottom attached segment">
<div class="ui sidebar vertical left menu borderless sidemenu inverted grey"><a class="item logo"><img src="./assets/icon.png"/></a>
<div class="ui accordion inverted"><a class="title item"><i class="home titleIcon icon"></i> Dashboard 1<i class="dropdown icon"></i></a>
<div class="content"><a class="item" href="index.html">Dashboard v1</a></div><a class="title item"><i class="home titleIcon icon"></i> Option <i class="dropdown icon"></i></a>
<div class="content"><a class="item" href="index.html">Dashboard v1</a></div>
</div>
</div>
<div class="pusher">
<div class="ui top attached menu"><a class="item"><i class="sidebar icon"></i></a></div>
<div class="ui basic segment">
<router-view></router-view>
</div>
</div>
</div>
</div>
</body>
</html>
Here are the scripts I use to create the sidebar and the accordion:
$('.ui.sidebar').sidebar({ context: $('.bottom.segment') }).sidebar('attach events', '.menu .item');
$('.ui.accordion')).accordion({ exclusive: false });
When I click on the first item of the accordion:
<a class="title item"><i class="home titleIcon icon"></i> Dashboard 1<i class="dropdown icon"></i></a>
sidebar is toggled into hidden mode. Do I forget to add something? I found some samples and themes online, none of them have this problem.
Thanks for the help.
I recommend using onClick event to toggle the sidebar like the following :
$( "#toggle" ).on( "click", function() {
$('.ui.sidebar').sidebar('toggle');
});
Remember to set a selector (id or class) to your triggering element :
<a class="item" id="toggle"><i class="sidebar icon"></i></a>
[DEMO]

Gap created when collapsing Bootstrap's collapsible panel

I have a problem with a Bootstrap's collapsible panel
When a collapsible panel is collapsed after being shown a blank gap of the same size appears in its place.
This is happening while using Firefox (not in Chrome) and the gap dissapears if the page is resized (zoom in, zoom out).
Fragments of code involving the problematic panel:
<div class="panel panel-default cl-orange">
<a class="" href="#newAircraftType" data-toggle="collapse">
<div class="panel-agregar">
<div class="panel-plus">
<i class="fa fa-caret-right"></i>
</div>
</div>
</a>
</div>
<!--Collapsible panel-->
<div id="newAircraftType" class="panel-collapse collapse in" style="">
<div class="panel-body crear-operador form-horizontal panel-box detalle-panel-body">
<div class="form-wrapper">
<div class="form-group">
<!-- ... -->
</div>
</div>
</div>
</div>
Some screenshots:
Panel shown
Panel collapsed and gap
Panel collapsed without gap

Height overflow in semantic-ui

Here's an example.
https://jsfiddle.net/ustjx0po/2/
<div class="ui top attached large menu red inverted">
<a class="header item item_one ">
<i class="sidebar icon"></i> Menu
</a>
<div class="menu"><a class="item">Home</a>
<a class="item">Form</a>
<a class="item">Help</a>
</div>
<div class="right menu">
<a class="header item ">
<i class="remove circle icon"></i> Logout
</a>
</div>
My problem is that I have unnecessary overflow (height overflow) . I want to get rid of it.
But I would like for my sidebar to fill rest of the height when it opens.
And I wouldn't want to just add overflow:hidden; because I might have content that actually overflows full height.