summaryrefslogtreecommitdiff
path: root/web-ui/app/templates/tags
diff options
context:
space:
mode:
authorGabriel Albo <gabriel@albo.com.br>2015-02-25 14:54:11 -0300
committerGabriel Albo <gabriel@albo.com.br>2015-02-25 14:54:11 -0300
commite18b3539f8f08325fff32f9f9f39cdf4296d38d4 (patch)
treef5818cb68c0be7921705ffedfcd285af280652af /web-ui/app/templates/tags
parent622ce98bf08d58584fe4af7e8967a7d579823ca2 (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/tags')
-rw-r--r--web-ui/app/templates/tags/tag_list.hbs15
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