diff options
author | Max Wu | 2017-05-14 17:42:14 +0800 |
---|---|---|
committer | GitHub | 2017-05-14 17:42:14 +0800 |
commit | c37b6669158750ab2222e81a5a8fc3a5c8c353f5 (patch) | |
tree | 8e96eb37c1715f860a698d5e7eeb2381b00af9d8 /public/views | |
parent | 0c619fee91ac5b7dbacf60244c9f6fec6ed62ba7 (diff) | |
parent | f85d1d880114b6787fdb2bac488341776deaad3d (diff) |
Merge branch 'master' into BackendRefactor
Diffstat (limited to '')
-rw-r--r-- | public/js/lib/editor/statusbar.html (renamed from public/views/statusbar.html) | 0 | ||||
-rw-r--r-- | public/views/html.hbs | 23 |
2 files changed, 23 insertions, 0 deletions
diff --git a/public/views/statusbar.html b/public/js/lib/editor/statusbar.html index 24cbf6c2..24cbf6c2 100644 --- a/public/views/statusbar.html +++ b/public/js/lib/editor/statusbar.html diff --git a/public/views/html.hbs b/public/views/html.hbs index 5ef51920..a300ddd5 100644 --- a/public/views/html.hbs +++ b/public/views/html.hbs @@ -160,6 +160,29 @@ removeHash(); }); + var toggle = $('.expand-toggle'); + var tocExpand = false; + + checkExpandToggle(); + toggle.click(function (e) { + e.preventDefault(); + e.stopPropagation(); + tocExpand = !tocExpand; + checkExpandToggle(); + }) + + function checkExpandToggle () { + var toc = $('.ui-toc-dropdown .toc'); + var toggle = $('.expand-toggle'); + if (!tocExpand) { + toc.removeClass('expand'); + toggle.text('Expand all'); + } else { + toc.addClass('expand'); + toggle.text('Collapse all'); + } + } + function scrollToTop() { $('body, html').stop(true, true).animate({ scrollTop: 0 |