diff options
Diffstat (limited to 'chrome/browser/resources/bookmark_manager/main.html')
-rw-r--r-- | chrome/browser/resources/bookmark_manager/main.html | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/chrome/browser/resources/bookmark_manager/main.html b/chrome/browser/resources/bookmark_manager/main.html index 230fd97..bdff3f1 100644 --- a/chrome/browser/resources/bookmark_manager/main.html +++ b/chrome/browser/resources/bookmark_manager/main.html @@ -27,6 +27,7 @@ found in the LICENSE file. <script src="js/cr/ui/listitem.js"></script> <script src="js/cr/ui/list.js"></script> <script src="js/cr/ui/tree.js"></script> +<script src="js/cr/ui/splitpane.js"></script> <script src="js/cr/ui/command.js"></script> <script src="js/cr/ui/menuitem.js"></script> <script src="js/cr/ui/menu.js"></script> @@ -75,6 +76,7 @@ if (cr.isMac) <div id=tree-container> <tree id=tree tabindex=2></tree> </div> + <div class=splitter></div> <list id=list tabindex=2></list> </div> @@ -150,8 +152,15 @@ var bookmarkCache = { } }; -</script> -<script> +var splitPane = document.querySelector('.main'); +cr.ui.SplitPane.decorate(splitPane); + +// The split pane persists the size of the left component in the local store. +if ('treeWidth' in localStorage) + splitPane.firstElementChild.style.width = localStorage['treeWidth']; +splitPane.addEventListener('resize', function(e) { + localStorage['treeWidth'] = splitPane.firstElementChild.style.width; +}); BookmarkList.decorate(list); |