Total Complexity | 3 |
Complexity/F | 1.5 |
Lines of Code | 28 |
Function Count | 2 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | /** |
||
12 | import $ from 'jquery'; |
||
13 | import Swal from 'sweetalert2'; |
||
14 | import toastr from 'toastr'; |
||
15 | import Sidebar from './Partials/Sidebar'; |
||
16 | import DropdownWithScrollBar from './Components/DropdownWithScrollBar'; |
||
17 | |||
18 | /** |
||
19 | * Class Admin |
||
20 | */ |
||
21 | export default class Admin { |
||
22 | constructor() { |
||
23 | window.$ = window.jQuery = $; |
||
24 | const sidebarPartial = new Sidebar; |
||
25 | const dropdownWithScrollBar = new DropdownWithScrollBar; |
||
|
|||
26 | |||
27 | /** |
||
28 | * Run sidebar toggle |
||
29 | */ |
||
30 | sidebarPartial.toggle(); |
||
31 | |||
32 | /** |
||
33 | * Run toggle on window resize |
||
34 | */ |
||
35 | $(window).resize(function () { |
||
36 | sidebarPartial.toggle(); |
||
37 | }); |
||
38 | } |
||
39 | } |