fnp
/
fnpeditor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
editor: refactoring the way document properties are kept
[fnpeditor.git]
/
src
/
editor
/
modules
/
mainBar
/
mainBar.js
diff --git
a/src/editor/modules/mainBar/mainBar.js
b/src/editor/modules/mainBar/mainBar.js
index
e2e09c3
..
8658c27
100644
(file)
--- a/
src/editor/modules/mainBar/mainBar.js
+++ b/
src/editor/modules/mainBar/mainBar.js
@@
-7,7
+7,14
@@
define([
return function(sandbox) {
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'));
view.find('[data-cmd]').click(function(e) {
e.preventDefault();
sandbox.publish('cmd.' + $(e.target).attr('data-cmd'));