From e7127dc234e35a16d28520fbcaad7c9b6d46a087 Mon Sep 17 00:00:00 2001 From: Lisa Junger Date: Mon, 2 Feb 2015 15:13:33 +0100 Subject: Issue #242 always check for logout enabled when rendering button. - fixed problems with multiple toggles. --- web-ui/app/index.html | 1 + web-ui/app/js/page/logout_shortcut.js | 14 +++++++------- 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 @@ +
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 @@
Logout
- \ No newline at end of file + -- cgit v1.2.3