add: optional board description

This commit is contained in:
floatinghotpot 2015-12-07 11:22:30 +08:00
parent 011f53ad08
commit 21fa6fdc32
5 changed files with 15 additions and 0 deletions

View file

@ -117,6 +117,9 @@ template(name="boardChangeTitlePopup")
label
| {{_ 'title'}}
input.js-board-name(type="text" value=title autofocus)
label
| {{_ 'description'}}
textarea.js-board-desc= description
input.primary.wide(type="submit" value="{{_ 'rename'}}")
template(name="archiveBoardPopup")

View file

@ -18,8 +18,10 @@ Template.boardMenuPopup.events({
Template.boardChangeTitlePopup.events({
submit(evt, tpl) {
const newTitle = tpl.$('.js-board-name').val().trim();
const newDesc = tpl.$('.js-board-desc').val().trim();
if (newTitle) {
this.rename(newTitle);
this.setDesciption(newDesc);
Popup.close();
}
evt.preventDefault();

View file

@ -20,5 +20,6 @@ template(name="boardList")
i.fa.js-star-board(
class="fa-star{{#if isStarred}} is-star-active{{else}}-o{{/if}}"
title="{{_ 'star-board-title'}}")
p.board-list-item-desc= description
li.js-add-board
a.board-list-item.label {{_ 'add-board'}}