Revision 05101e08
Von Sven Schöling vor mehr als 3 Jahren hinzugefügt
SL/Layout/MaterialMenu.pm | ||
---|---|---|
9 | 9 |
SL::Menu->new('mobile'); |
10 | 10 |
} |
11 | 11 |
|
12 |
sub javascripts_inline { |
|
13 |
<<'EOL'; |
|
14 |
document.addEventListener('DOMContentLoaded', function() { |
|
15 |
var elems = document.querySelectorAll('.sidenav'); |
|
16 |
var instances = M.Sidenav.init(elems); |
|
17 |
}); |
|
18 |
EOL |
|
19 |
} |
|
20 |
|
|
21 | 12 |
sub pre_content { |
22 | 13 |
$_[0]->presenter->render('menu/material', menu => $_[0]->menu, C => SL::Controller::Base->new); |
23 | 14 |
} |
SL/Layout/MaterialStyle.pm | ||
---|---|---|
13 | 13 |
} |
14 | 14 |
|
15 | 15 |
sub javascripts_inline { |
16 |
<<'EOL'; |
|
17 |
document.addEventListener('DOMContentLoaded', function() { |
|
18 |
var elems = document.querySelectorAll('select'); |
|
19 |
var instances = M.FormSelect.init(elems); |
|
20 |
}); |
|
21 |
EOL |
|
16 |
"M.AutoInit();"; |
|
22 | 17 |
} |
23 | 18 |
|
24 | 19 |
sub get_stylesheet_for_user { |
Auch abrufbar als: Unified diff
Mobile Layout: Javascript initialisierung vereinfacht