From 5393c61f22e57b4eb1efa1ccc3fd51e851713fd8 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Sun, 15 Jan 2017 13:09:41 +0100 Subject: [PATCH] Content Back button uses history.back() if there's no list and no sidebar --- skins/elastic/ui.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/skins/elastic/ui.js b/skins/elastic/ui.js index 66f8424a7..13c361da7 100644 --- a/skins/elastic/ui.js +++ b/skins/elastic/ui.js @@ -66,7 +66,15 @@ function rcube_elastic_ui() // menu/sidebar button buttons.menu.on('click', function() { show_menu(); return false; }); buttons.back_sidebar.on('click', function() { show_sidebar(); return false; }); - buttons.back_list.on('click', function() { hide_content(); return false; }); + buttons.back_list.on('click', function() { + if (!layout.list && !layout.sidebar) { + history.back(); + } + else { + hide_content(); + } + return false; + }); // Semantic-UI style