From 0061ffeb56409e3a940608f61c8bcd80fc882a83 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Wed, 23 Oct 2019 18:16:43 -0400 Subject: [PATCH] =?UTF-8?q?Fix=20Collection=20Pane=20and=20Item=20Pane=20t?= =?UTF-8?q?oggles=20in=20View=20=E2=86=92=20Layout?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- chrome/content/zotero/standalone/standalone.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/chrome/content/zotero/standalone/standalone.js b/chrome/content/zotero/standalone/standalone.js index 7bbf30c595..761129c8a5 100644 --- a/chrome/content/zotero/standalone/standalone.js +++ b/chrome/content/zotero/standalone/standalone.js @@ -299,29 +299,31 @@ const ZoteroStandalone = new function() { break; case 'collections-pane': + var collectionsPane = document.getElementById('zotero-collections-pane'); // Show - if (menuitem.getAttribute('checked') != 'true') { + if (collectionsPane.getAttribute('collapsed') == 'true') { document.getElementById('zotero-collections-splitter').setAttribute('state', 'open'); - document.getElementById('zotero-collections-pane').setAttribute('collapsed', false); + collectionsPane.setAttribute('collapsed', false); } // Hide else { document.getElementById('zotero-collections-splitter').setAttribute('state', 'collapsed'); - document.getElementById('zotero-collections-pane').setAttribute('collapsed', true); + collectionsPane.setAttribute('collapsed', true); } ZoteroPane.updateToolbarPosition(); break; case 'item-pane': + var itemPane = document.getElementById('zotero-item-pane'); // Show - if (menuitem.getAttribute('checked') != 'true') { + if (itemPane.getAttribute('collapsed') == 'true') { document.getElementById('zotero-items-splitter').setAttribute('state', 'open'); - document.getElementById('zotero-item-pane').setAttribute('collapsed', false); + itemPane.setAttribute('collapsed', false); } // Hide else { document.getElementById('zotero-items-splitter').setAttribute('state', 'collapsed'); - document.getElementById('zotero-item-pane').setAttribute('collapsed', true); + itemPane.setAttribute('collapsed', true); } ZoteroPane.updateToolbarPosition(); break;