選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

control-sidebar.md 2.3KB

3年前
3年前
3年前
3年前
3年前
3年前
3年前
3年前
3年前
3年前
3年前
3年前
3年前
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. ---
  2. layout: page
  3. title: Control Sidebar Plugin
  4. ---
  5. The control sidebar component is part of AdminLTE's layout as the right sidebar.
  6. ##### Usage
  7. This plugin can be activated as a jQuery plugin or using the data api. To activate the plugin, you must first add the
  8. HTML markup to your layout, then create the toggle button as shown below.
  9. ###### HTML Markup
  10. {: .text-bold }
  11. ```html
  12. <!-- Control Sidebar -->
  13. <aside class="control-sidebar control-sidebar-dark">
  14. <!-- Control sidebar content goes here -->
  15. </aside>
  16. <!-- /.control-sidebar -->
  17. ```
  18. ###### Data api
  19. {: .text-bold }
  20. Add `data-widget="control-sidebar"` to any button or a element to activate the plugin.
  21. ```html
  22. <a href="#" data-widget="control-sidebar">Toggle Control Sidebar</a>
  23. ```
  24. ###### jQuery
  25. {: .text-bold }
  26. Just like all other AdminLTE plugins, you can also activate the toggle button using jQuery by running the following
  27. example.
  28. ```js
  29. $("#my-toggle-button").ControlSidebar('toggle');
  30. ```
  31. ##### Options
  32. |---
  33. | Name | Type | Default | Description
  34. |-|-|-|-
  35. |controlsidebarSlide | Boolean | TRUE | Whether the sidebar should slide over the content or push the content to make
  36. space for itself.
  37. |scrollbarTheme | Boolean | `os-theme-light` | Scrollbar Theme used while SideBar Fixed
  38. |scrollbarAutoHide | Boolean | `l` | Scrollbar auto-hide trigger
  39. |target | String | `.control-sidebar` | Target control-sidebar to handle multiple control-sidebars.
  40. {: .table .table-bordered .bg-light}
  41. > ##### Tip!
  42. > You can use any option via the data-attributes like this to enable auto collapse sidebar on 768 pixels width.
  43. > ```html
  44. > <a href="#" data-widget="control-sidebar" data-controlsidebar-slide="false">Toggle Control Sidebar</a>
  45. > ```
  46. {: .quote-info}
  47. ##### Events
  48. {: .mt-4}
  49. |---
  50. | Event Type | Description
  51. |-|-
  52. |expanded.lte.controlsidebar | Triggered after a control sidebar expands.
  53. |collapsed.lte.controlsidebar | Triggered after a control sidebar collapses.
  54. {: .table .table-bordered .bg-light}
  55. Example: `$('#toggle-button').on('expanded.lte.controlsidebar', handleExpandedEvent)`
  56. ##### Methods
  57. {: .mt-4}
  58. |---
  59. | Method | Description
  60. |-|-
  61. |collapse | Collapses the control-sidebar
  62. |show | Show's the control-sidebar
  63. |toggle | Toggles the state of the control-sidebar expanded and collapsed
  64. {: .table .table-bordered .bg-light}
  65. Example: `$('#toggle-button').ControlSidebar('toggle')`