mirror of
https://github.com/wekan/wekan.git
synced 2025-12-21 18:00:12 +01:00
parent
aa974aa54a
commit
b9d20e04f2
4 changed files with 27 additions and 0 deletions
|
|
@ -78,6 +78,7 @@ globals:
|
||||||
Avatars: true
|
Avatars: true
|
||||||
BlazeComponent: false
|
BlazeComponent: false
|
||||||
BlazeLayout: false
|
BlazeLayout: false
|
||||||
|
DocHead: false
|
||||||
ESSearchResults: false
|
ESSearchResults: false
|
||||||
FlowRouter: false
|
FlowRouter: false
|
||||||
FS: false
|
FS: false
|
||||||
|
|
|
||||||
|
|
@ -50,6 +50,7 @@ alethes:pages
|
||||||
arillo:flow-router-helpers
|
arillo:flow-router-helpers
|
||||||
audit-argument-checks
|
audit-argument-checks
|
||||||
kadira:blaze-layout
|
kadira:blaze-layout
|
||||||
|
kadira:dochead
|
||||||
kadira:flow-router
|
kadira:flow-router
|
||||||
meteorhacks:picker
|
meteorhacks:picker
|
||||||
meteorhacks:subs-manager
|
meteorhacks:subs-manager
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,9 @@ http@1.1.1
|
||||||
id-map@1.0.4
|
id-map@1.0.4
|
||||||
idmontie:migrations@1.0.0
|
idmontie:migrations@1.0.0
|
||||||
jquery@1.11.4
|
jquery@1.11.4
|
||||||
|
jsx@0.1.6
|
||||||
kadira:blaze-layout@2.2.0
|
kadira:blaze-layout@2.2.0
|
||||||
|
kadira:dochead@1.1.0
|
||||||
kadira:flow-router@2.7.0
|
kadira:flow-router@2.7.0
|
||||||
kenton:accounts-sandstorm@0.1.6
|
kenton:accounts-sandstorm@0.1.6
|
||||||
launch-screen@1.0.4
|
launch-screen@1.0.4
|
||||||
|
|
|
||||||
|
|
@ -88,3 +88,26 @@ _.each(redirections, (newPath, oldPath) => {
|
||||||
}],
|
}],
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// As it is not possible to use template helpers in the page <head> we create a
|
||||||
|
// reactive function whose role is to set any page-specific tag in the <head>
|
||||||
|
// using the `kadira:dochead` package. Currently we only use it to display the
|
||||||
|
// board title if we are in a board page (see #364) but we may want to support
|
||||||
|
// some <meta> tags in the future.
|
||||||
|
const appTitle = 'Wekan';
|
||||||
|
|
||||||
|
// XXX The `Meteor.startup` should not be necessary -- we don't need to wait for
|
||||||
|
// the complete DOM to be ready to call `DocHead.setTitle`. But the problem is
|
||||||
|
// that the global variable `Boards` is undefined when this file loads so we
|
||||||
|
// wait a bit until hopefully all files are loaded. This will be fixed in a
|
||||||
|
// clean way once Meteor will support ES6 modules -- hopefully in Meteor 1.3.
|
||||||
|
Meteor.startup(() => {
|
||||||
|
Tracker.autorun(() => {
|
||||||
|
const currentBoard = Boards.findOne(Session.get('currentBoard'));
|
||||||
|
const titleStack = [appTitle];
|
||||||
|
if (currentBoard) {
|
||||||
|
titleStack.push(currentBoard.title);
|
||||||
|
}
|
||||||
|
DocHead.setTitle(titleStack.reverse().join(' - '));
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue