diff options
author | Gabriel Albo <gabriel@albo.com.br> | 2015-02-25 14:54:11 -0300 |
---|---|---|
committer | Gabriel Albo <gabriel@albo.com.br> | 2015-02-25 14:54:11 -0300 |
commit | e18b3539f8f08325fff32f9f9f39cdf4296d38d4 (patch) | |
tree | f5818cb68c0be7921705ffedfcd285af280652af /web-ui/app/templates | |
parent | 622ce98bf08d58584fe4af7e8967a7d579823ca2 (diff) |
#296 Moving the toggle control script to the tags hbs file so clicking on the tags icon now toggles the left nav. Next: extracting this JS to a proper place.
Diffstat (limited to 'web-ui/app/templates')
-rw-r--r-- | web-ui/app/templates/tags/tag_list.hbs | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/web-ui/app/templates/tags/tag_list.hbs b/web-ui/app/templates/tags/tag_list.hbs index 071b4799..e6108224 100644 --- a/web-ui/app/templates/tags/tag_list.hbs +++ b/web-ui/app/templates/tags/tag_list.hbs @@ -1,6 +1,19 @@ <ul id="default-tag-list"></ul> -<div class="tags-icon"> +<div class="tags-icon side-nav-toggle"> <i class="fa fa-tags"></i> <span class="tag-label">Tags</span> </div> <ul id="custom-tag-list"></ul> + +<script> +$('.side-nav-toggle').click(function (ev) { + ev.preventDefault(); + $('.left-off-canvas-toggle').click(); + if ($('#custom-tag-list').hasClass('expanded')) { + $('#custom-tag-list').removeClass('expanded'); + } + else { + $('#custom-tag-list').addClass('expanded'); + } + }); +</script>
\ No newline at end of file |