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 /web-ui/app/js/page | |
parent | 21c2dfdace2b3577446c9399123073b75a1835e6 (diff) |
Issue #242 always check for logout enabled when rendering button.
- fixed problems with multiple toggles.
Diffstat (limited to 'web-ui/app/js/page')
-rw-r--r-- | web-ui/app/js/page/logout_shortcut.js | 14 |
1 files changed, 7 insertions, 7 deletions
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 +}); |