diff options
author | Lisa Junger <ljunger@thoughtworks.com> | 2015-02-02 15:13:33 +0100 |
---|---|---|
committer | Lisa Junger <ljunger@thoughtworks.com> | 2015-02-02 15:13:33 +0100 |
commit | e7127dc234e35a16d28520fbcaad7c9b6d46a087 (patch) | |
tree | ddfe228ba042683efefe9ee1daec0a9143460bd7 | |
parent | 21c2dfdace2b3577446c9399123073b75a1835e6 (diff) |
Issue #242 always check for logout enabled when rendering button.
- fixed problems with multiple toggles.
-rw-r--r-- | web-ui/app/index.html | 1 | ||||
-rw-r--r-- | web-ui/app/js/page/logout_shortcut.js | 14 | ||||
-rw-r--r-- | web-ui/app/templates/page/logout_shortcut.hbs | 2 |
3 files changed, 9 insertions, 8 deletions
diff --git a/web-ui/app/index.html b/web-ui/app/index.html index f845f128..33b54b85 100644 --- a/web-ui/app/index.html +++ b/web-ui/app/index.html @@ -40,6 +40,7 @@ </ul> <ul id="logout-shortcut" class="shortcuts"> </ul> + <a class="exit-off-canvas"></a> </div> <section id="left-pane" class="left-off-canvas-menu"> diff --git a/web-ui/app/js/page/logout_shortcut.js b/web-ui/app/js/page/logout_shortcut.js index d79b2b9a..10a69c7d 100644 --- a/web-ui/app/js/page/logout_shortcut.js +++ b/web-ui/app/js/page/logout_shortcut.js @@ -18,16 +18,16 @@ define(['flight/lib/component', 'features', 'views/templates'], function (define 'use strict'; return defineComponent(function () { - + this.render = function () { - var logoutShortcutHTML = templates.page.logoutShortcut(); - this.$node.html(logoutShortcutHTML); + if (features.isLogoutEnabled()) { + var logoutShortcutHTML = templates.page.logoutShortcut(); + this.$node.html(logoutShortcutHTML); + } }; this.after('initialize', function () { - if (features.isLogoutEnabled()) { - this.render(); - } + this.render(); }); }); -});
\ No newline at end of file +}); diff --git a/web-ui/app/templates/page/logout_shortcut.hbs b/web-ui/app/templates/page/logout_shortcut.hbs index dacedd7a..4c1db89a 100644 --- a/web-ui/app/templates/page/logout_shortcut.hbs +++ b/web-ui/app/templates/page/logout_shortcut.hbs @@ -3,4 +3,4 @@ <i class="fa fa-sign-out"></i> <div class="shortcut-label">Logout</div> </a> -</li>
\ No newline at end of file +</li> |