mirror of
https://github.com/wekan/wekan.git
synced 2026-01-06 09:38:49 +01:00
UI improvements
* Implement visibility choice on board creation;
* Rework the board header bar. Remove links to un-implemented
features;
* Implement a board star counter (visible if the board have >2 stars);
* Define a new icon (a thin cross) to close elements;
* Remove $(document).on('mouseover') event handlers that were
basically fired hundreds of times for nothing, we now define a proper
Tracker dependency to execute jquery-ui plugin initialization only
when something has changed;
* Bug fixes related to list scrolling.
This commit is contained in:
parent
42f6dc686f
commit
dcc64f44f9
51 changed files with 644 additions and 990 deletions
|
|
@ -4,7 +4,7 @@ template(name="cardDetails")
|
|||
.card-detail-cover(style="background-image: url({{ card.cover.url }})")
|
||||
.card-detail-header(class="{{#if currentUser.isBoardMember}}editable{{/if}}")
|
||||
a.js-close-card-detail
|
||||
i.fa.fa-times
|
||||
i.fa.fa-times-thin
|
||||
h2.card-detail-title.js-card-title= title
|
||||
p.card-detail-list.js-move-card
|
||||
| {{_ 'in-list'}}
|
||||
|
|
@ -25,7 +25,7 @@ template(name="cardDetails")
|
|||
if currentUser.isBoardMember
|
||||
h3 Description
|
||||
+inlinedForm(classNames="js-card-description")
|
||||
i.fa.fa-times.js-close-inlined-form
|
||||
a.fa.fa-times-thin.js-close-inlined-form
|
||||
+editor(autofocus=true)
|
||||
= description
|
||||
button(type="submit") {{_ 'edit'}}
|
||||
|
|
|
|||
|
|
@ -1,64 +1,3 @@
|
|||
// Template.cards.events({
|
||||
// // 'click .js-cancel': function(event, t) {
|
||||
// // var composer = t.$('.card-composer');
|
||||
|
||||
// // // Keep the old value in memory to display it again next time
|
||||
// // var inputCacheKey = "addCard-" + this.listId;
|
||||
// // var oldValue = composer.find('.js-card-title').val();
|
||||
// // InputsCache.set(inputCacheKey, oldValue);
|
||||
|
||||
// // // add composer hide class
|
||||
// // composer.addClass('hide');
|
||||
// // composer.find('.js-card-title').val('');
|
||||
|
||||
// // // remove hide open link class
|
||||
// // $('.js-open-card-composer').removeClass('hide');
|
||||
// // },
|
||||
// 'submit': function(evt, tpl) {
|
||||
// evt.preventDefault();
|
||||
// var textarea = $(evt.currentTarget).find('textarea');
|
||||
// var title = textarea.val();
|
||||
// var lastCard = tpl.find('.js-minicard:last-child');
|
||||
// var sort;
|
||||
// if (lastCard === null) {
|
||||
// sort = 0;
|
||||
// } else {
|
||||
// sort = Blaze.getData(lastCard).sort + 1;
|
||||
// }
|
||||
// // debugger
|
||||
|
||||
// // Clear the form in-memory cache
|
||||
// // var inputCacheKey = "addCard-" + this.listId;
|
||||
// // InputsCache.set(inputCacheKey, '');
|
||||
|
||||
// // title trim if not empty then
|
||||
// if ($.trim(title)) {
|
||||
// Cards.insert({
|
||||
// title: title,
|
||||
// listId: Template.currentData().listId,
|
||||
// boardId: Template.currentData().board._id,
|
||||
// sort: sort
|
||||
// }, function(err, _id) {
|
||||
// // In case the filter is active we need to add the newly
|
||||
// // inserted card in the list of exceptions -- cards that are
|
||||
// // not filtered. Otherwise the card will disappear instantly.
|
||||
// // See https://github.com/libreboard/libreboard/issues/80
|
||||
// Filter.addException(_id);
|
||||
// });
|
||||
|
||||
// // empty and focus.
|
||||
// textarea.val('').focus();
|
||||
|
||||
// // focus complete then scroll top
|
||||
// Utils.Scroll(tpl.find('.js-minicards')).top(1000, true);
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
|
||||
// Template.cards.events({
|
||||
// 'click .member': Popup.open('cardMember')
|
||||
// });
|
||||
|
||||
Template.cardMemberPopup.events({
|
||||
'click .js-remove-member': function() {
|
||||
Cards.update(this.cardId, {$pull: {members: this.userId}});
|
||||
|
|
|
|||
27
client/components/cards/minicard.jade
Normal file
27
client/components/cards/minicard.jade
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
template(name="minicard")
|
||||
.minicard.card.js-minicard(
|
||||
class="{{#if isSelected}}is-selected{{/if}}")
|
||||
a.minicard-details.clearfix.show(href=absoluteUrl)
|
||||
if cover
|
||||
.minicard-cover.js-card-cover(style="background-image: url({{cover.url}});")
|
||||
if labels
|
||||
.minicard-labels
|
||||
each labels
|
||||
.minicard-label(class="card-label-{{color}}" title="{{name}}")
|
||||
.minicard-title= title
|
||||
if members
|
||||
.minicard-members.js-minicard-members
|
||||
each members
|
||||
+userAvatar(userId=this size="small" cardId="{{../_id}}")
|
||||
.badges
|
||||
if comments.count
|
||||
.badge(title="{{_ 'card-comments-title' comments.count }}")
|
||||
span.badge-icon.icon-sm.fa.fa-comment-o
|
||||
.badge-text= comments.count
|
||||
if description
|
||||
.badge.badge-state-image-only(title=description)
|
||||
span.badge-icon.icon-sm.fa.fa-align-left
|
||||
if attachments.count
|
||||
.badge
|
||||
span.badge-icon.icon-sm.fa.fa-paperclip
|
||||
span.badge-text= attachments.count
|
||||
14
client/components/cards/minicard.js
Normal file
14
client/components/cards/minicard.js
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
// Template.cards.events({
|
||||
// 'click .member': Popup.open('cardMember')
|
||||
// });
|
||||
|
||||
|
||||
BlazeComponent.extendComponent({
|
||||
template: function() {
|
||||
return 'minicard';
|
||||
},
|
||||
|
||||
isSelected: function() {
|
||||
return Session.equals('currentCard', this.currentData()._id);
|
||||
}
|
||||
}).register('minicard');
|
||||
Loading…
Add table
Add a link
Reference in a new issue