|
@@ -119,10 +119,15 @@ BlazeComponent.extendComponent({
|
|
},
|
|
},
|
|
}).register('boardChangeColorPopup');
|
|
}).register('boardChangeColorPopup');
|
|
|
|
|
|
-BlazeComponent.extendComponent({
|
|
|
|
|
|
+const CreateBoard = BlazeComponent.extendComponent({
|
|
|
|
+ template() {
|
|
|
|
+ return 'createBoard';
|
|
|
|
+ },
|
|
|
|
+
|
|
onCreated() {
|
|
onCreated() {
|
|
this.visibilityMenuIsOpen = new ReactiveVar(false);
|
|
this.visibilityMenuIsOpen = new ReactiveVar(false);
|
|
this.visibility = new ReactiveVar('private');
|
|
this.visibility = new ReactiveVar('private');
|
|
|
|
+ const boardId = '';
|
|
},
|
|
},
|
|
|
|
|
|
visibilityCheck() {
|
|
visibilityCheck() {
|
|
@@ -143,15 +148,12 @@ BlazeComponent.extendComponent({
|
|
const title = this.find('.js-new-board-title').value;
|
|
const title = this.find('.js-new-board-title').value;
|
|
const visibility = this.visibility.get();
|
|
const visibility = this.visibility.get();
|
|
|
|
|
|
- const boardId = Boards.insert({
|
|
|
|
|
|
+ boardId = Boards.insert({
|
|
title,
|
|
title,
|
|
permission: visibility,
|
|
permission: visibility,
|
|
});
|
|
});
|
|
|
|
|
|
Utils.goBoardId(boardId);
|
|
Utils.goBoardId(boardId);
|
|
-
|
|
|
|
- // Immediately star boards crated with the headerbar popup.
|
|
|
|
- Meteor.user().toggleBoardStar(boardId);
|
|
|
|
},
|
|
},
|
|
|
|
|
|
events() {
|
|
events() {
|
|
@@ -166,6 +168,14 @@ BlazeComponent.extendComponent({
|
|
},
|
|
},
|
|
}).register('createBoardPopup');
|
|
}).register('createBoardPopup');
|
|
|
|
|
|
|
|
+(class HeaderBarCreateBoard extends CreateBoard {
|
|
|
|
+ onSubmit(evt) {
|
|
|
|
+ super.onSubmit(evt);
|
|
|
|
+ // Immediately star boards crated with the headerbar popup.
|
|
|
|
+ Meteor.user().toggleBoardStar(boardId);
|
|
|
|
+ }
|
|
|
|
+}).register('headerBarCreateBoardPopup')
|
|
|
|
+
|
|
BlazeComponent.extendComponent({
|
|
BlazeComponent.extendComponent({
|
|
visibilityCheck() {
|
|
visibilityCheck() {
|
|
const currentBoard = Boards.findOne(Session.get('currentBoard'));
|
|
const currentBoard = Boards.findOne(Session.get('currentBoard'));
|