summaryrefslogtreecommitdiff
path: root/public/views
diff options
context:
space:
mode:
authorMax Wu2017-05-14 17:42:14 +0800
committerGitHub2017-05-14 17:42:14 +0800
commitc37b6669158750ab2222e81a5a8fc3a5c8c353f5 (patch)
tree8e96eb37c1715f860a698d5e7eeb2381b00af9d8 /public/views
parent0c619fee91ac5b7dbacf60244c9f6fec6ed62ba7 (diff)
parentf85d1d880114b6787fdb2bac488341776deaad3d (diff)
Merge branch 'master' into BackendRefactor
Diffstat (limited to 'public/views')
-rw-r--r--public/views/html.hbs23
-rw-r--r--public/views/statusbar.html41
2 files changed, 23 insertions, 41 deletions
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
diff --git a/public/views/statusbar.html b/public/views/statusbar.html
deleted file mode 100644
index 24cbf6c2..00000000
--- a/public/views/statusbar.html
+++ /dev/null
@@ -1,41 +0,0 @@
-<div class="status-bar">
- <div class="status-info">
- <div class="status-cursor">
- <span class="status-line-column"></span>
- <span class="status-selection"></span>
- </div>
- <div class="status-file"></div>
- </div>
- <div class="status-indicators">
- <div class="status-length"></div>
- <div class="status-preferences dropup toggle-dropdown pull-right">
- <a id="preferencesLabel" class="ui-preferences-label text-uppercase" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false" title="Click to change preferences">
- <i class="fa fa-wrench fa-fw"></i>
- </a>
- <ul class="dropdown-menu" aria-labelledby="preferencesLabel">
- <li class="ui-preferences-override-browser-keymap"><a><label>Allow override browser keymap&nbsp;&nbsp;<input type="checkbox"></label></a></li>
- </ul>
- </div>
- <div class="status-keymap dropup pull-right">
- <a id="keymapLabel" class="ui-keymap-label text-uppercase" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false" title="Click to change keymap">
- Sublime
- </a>
- <ul class="dropdown-menu" aria-labelledby="keymapLabel">
- <li class="ui-keymap-sublime"><a>Sublime</a></li>
- <li class="ui-keymap-emacs"><a>Emacs</a></li>
- <li class="ui-keymap-vim"><a>Vim</a></li>
- </ul>
- </div>
- <div class="status-indent">
- <div class="indent-type" title="Click to switch indentation type">Spaces:</div>
- <div class="indent-width-label" title="Click to change indentation size">4</div>
- <input class="indent-width-input hidden" type="number" min="1" max="10" maxlength="2" size="2">
- </div>
- <div class="status-theme">
- <a class="ui-theme-toggle" title="Toggle editor theme"><i class="fa fa-sun-o fa-fw"></i></a>
- </div>
- <div class="status-spellcheck">
- <a class="ui-spellcheck-toggle" title="Toggle spellcheck"><i class="fa fa-check fa-fw"></i></a>
- </div>
- </div>
-</div>