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