mirror of https://github.com/ColorlibHQ/AdminLTE
commit
99a1632731
|
@ -22,6 +22,7 @@ const SELECTOR_DROPDOWN_MENU_ACTIVE = '.dropdown-menu.show'
|
|||
const SELECTOR_DROPDOWN_TOGGLE = '[data-toggle="dropdown"]'
|
||||
|
||||
const CLASS_NAME_DROPDOWN_RIGHT = 'dropdown-menu-right'
|
||||
const CLASS_NAME_DROPDOWN_SUBMENU = 'dropdown-submenu'
|
||||
|
||||
// TODO: this is unused; should be removed along with the extend?
|
||||
const Default = {
|
||||
|
@ -122,6 +123,10 @@ $(`${SELECTOR_DROPDOWN_MENU} ${SELECTOR_DROPDOWN_TOGGLE}`).on('click', function
|
|||
$(`${SELECTOR_NAVBAR} ${SELECTOR_DROPDOWN_TOGGLE}`).on('click', event => {
|
||||
event.preventDefault()
|
||||
|
||||
if ($(event.target).parent().hasClass(CLASS_NAME_DROPDOWN_SUBMENU)) {
|
||||
return
|
||||
}
|
||||
|
||||
setTimeout(function () {
|
||||
Dropdown._jQueryInterface.call($(this), 'fixPosition')
|
||||
}, 1)
|
||||
|
|
|
@ -118,7 +118,8 @@ class Treeview {
|
|||
// Private
|
||||
|
||||
_setupListeners() {
|
||||
$(document).on('click', this._config.trigger, event => {
|
||||
const elementId = this._element.attr('id') !== undefined ? `#${this._element.attr('id')}` : ''
|
||||
$(document).on('click', `${elementId}${this._config.trigger}`, event => {
|
||||
this.toggle(event)
|
||||
})
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
position: fixed;
|
||||
top: 0;
|
||||
width: 100% !important;
|
||||
z-index: 9999;
|
||||
z-index: $zindex-modal-backdrop;
|
||||
|
||||
&.was-collapsed .card-body {
|
||||
display: block !important;
|
||||
|
|
|
@ -61,3 +61,17 @@ $("#my-toggle-button").ControlSidebar('toggle');
|
|||
{: .table .table-bordered .bg-light}
|
||||
|
||||
Example: `$('#toggle-button').on('expanded.lte.controlsidebar', handleExpandedEvent)`
|
||||
|
||||
|
||||
##### Methods
|
||||
{: .mt-4}
|
||||
|
||||
|---
|
||||
| Method | Description
|
||||
|-|-
|
||||
|collapse | Collapses the control-sidebar
|
||||
|show | Show's the control-sidebar
|
||||
|toggle | Toggles the state of the control-sidebar expanded and collapsed
|
||||
{: .table .table-bordered .bg-light}
|
||||
|
||||
Example: `$('#toggle-button').ControlSidebar('toggle')`
|
||||
|
|
Loading…
Reference in New Issue