diff options
author | Duda Dornelles <ddornell@thoughtworks.com> | 2014-10-08 16:18:34 +0200 |
---|---|---|
committer | Duda Dornelles <ddornell@thoughtworks.com> | 2014-10-08 16:18:34 +0200 |
commit | 84a1e49bdef02ca46df79b7d9151cdf57a574938 (patch) | |
tree | b4998a8fe3fb4f7f1e8310e8f5c89b6fab66d48c /web-ui/app | |
parent | 9a14d542cd399bca2d482b7f9419cd14b27e01de (diff) |
quick refactoring - extracting method in logout component
Diffstat (limited to 'web-ui/app')
-rw-r--r-- | web-ui/app/js/page/logout.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/web-ui/app/js/page/logout.js b/web-ui/app/js/page/logout.js index f598fa34..d881f6c2 100644 --- a/web-ui/app/js/page/logout.js +++ b/web-ui/app/js/page/logout.js @@ -18,10 +18,17 @@ define(['flight/lib/component', 'features', 'views/templates'], function (define 'use strict'; return defineComponent(function () { + + this.render = function () { + var logoutHTML = templates.page.logout({ logout_url: features.getLogoutUrl() }); + this.$node.html(logoutHTML); + }; + this.after('initialize', function () { if (features.isLogoutEnabled()) { - this.$node.html(templates.page.logout({ logout_url: features.getLogoutUrl() })); + this.render(); } }); + }); }); |