diff --git a/views/default.handlebars b/views/default.handlebars index c2b827cd..ee03721c 100644 --- a/views/default.handlebars +++ b/views/default.handlebars @@ -255,7 +255,9 @@ -     +    +   +       @@ -1570,6 +1572,9 @@ var deskKeyboardShortcutsStr = getstore('deskKeyShortcuts', '0x0A002E,0x100000,0x100028,0x100026,0x10004C,0x10004D,0x11004D,0x100052,0x020073,0x080057,0x020009,0x100025,0x100027').split(','); for (var i in deskKeyboardShortcutsStr) { deskKeyboardShortcuts.push(parseInt(deskKeyboardShortcutsStr[i])); } updateDeskShortcutKeys(); + + // Override the collapse button text + updateCollapseallButtonText(); } function refreshCookieSession() { @@ -4311,6 +4316,7 @@ } Q('DevxColImg' + id).src = x?'images/c2.png':'images/c1.png'; putstore('_collapse', JSON.stringify(CollapsedGroups)); + updateCollapseallButtonText(); onDevicesScrollEx(); } @@ -4851,6 +4857,22 @@ return "Unknown"; } + function collapseallButtonFunction() { + if (Q('CollapseAllButton').value == "Collapse All") { + cmexpandaction(2); + } else { + cmexpandaction(1); + } + } + + function updateCollapseallButtonText() { + if ((JSON.stringify(getstore('_collapse', '{}')).length - 4) > 0) { + Q('CollapseAllButton').value = "Expand All"; + } else { + Q('CollapseAllButton').value = "Collapse All"; + } + } + function selectallButtonFunction() { var elements = document.getElementsByClassName('DeviceCheckbox'), checkcount = Object.keys(checkedNodeids).length; for (var i = 0; i < elements.length; i++) { elements[i].checked = (checkcount == 0); } @@ -5456,6 +5478,7 @@ } } putstore('_collapse', JSON.stringify(CollapsedGroups)); + updateCollapseallButtonText(); mainUpdate(4); }