X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/635d44e05306b5bd5f5238a31a122528fee1e779..30cff3b4aec008ee33ddb413f814d5962a5e3727:/src/editor/modules/mainBar/mainBar.js?ds=sidebyside diff --git a/src/editor/modules/mainBar/mainBar.js b/src/editor/modules/mainBar/mainBar.js index e2e09c3..8658c27 100644 --- a/src/editor/modules/mainBar/mainBar.js +++ b/src/editor/modules/mainBar/mainBar.js @@ -7,7 +7,14 @@ define([ return function(sandbox) { - var view = $(_.template(template)()); + /* globals gettext*/ + + var config = sandbox.getConfig(), + userName = config.user && config.user.name, + view = $(_.template(template)({ + userName: userName || gettext('anonymous') + })); + view.find('[data-cmd]').click(function(e) { e.preventDefault(); sandbox.publish('cmd.' + $(e.target).attr('data-cmd'));