Renamed expand switch settings function
This commit is contained in:
parent
875a639db5
commit
dfaec1c1c4
1 changed files with 2 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
|||
document.addEventListener('DOMContentLoaded', addCollapsibleOnClick(), false);
|
||||
document.addEventListener('DOMContentLoaded', expandAllCollapsedElements(), false);
|
||||
document.addEventListener('DOMContentLoaded', applyExpandSettings(), false);
|
||||
|
||||
function addCollapsibleOnClick() {
|
||||
var coll = document.getElementsByClassName("collapsible");
|
||||
|
@ -16,7 +16,7 @@ function addCollapsibleOnClick() {
|
|||
});
|
||||
}
|
||||
}
|
||||
function expandAllCollapsedElements() {
|
||||
function applyExpandSettings() {
|
||||
if (localStorage.getItem('switchExpand') === true || localStorage.getItem('switchExpand') === 'true') {
|
||||
var expandSwitchCB = document.getElementById("expandCB");
|
||||
if ( expandSwitchCB != null ){
|
||||
|
@ -26,7 +26,6 @@ function expandAllCollapsedElements() {
|
|||
if ( expandSwitchSettingsCB != null ){
|
||||
expandSwitchSettingsCB.checked = true;
|
||||
}
|
||||
|
||||
$('.autoExpand').show();
|
||||
} else {
|
||||
$('.autoExpand').hide();
|
||||
|
|
Loading…
Add table
Reference in a new issue