mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 23:40:13 +01:00
Add a UI to restore archived cards
This commit is contained in:
parent
915a7e5c68
commit
98d7278d08
17 changed files with 137 additions and 84 deletions
|
|
@ -4,7 +4,8 @@ var defaultView = 'home';
|
|||
|
||||
var viewTitles = {
|
||||
filter: 'filter-cards',
|
||||
multiselection: 'multi-selection'
|
||||
multiselection: 'multi-selection',
|
||||
archives: 'archives'
|
||||
};
|
||||
|
||||
BlazeComponent.extendComponent({
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
.sidebar-content
|
||||
padding: 12px
|
||||
background: white
|
||||
background: darken(white, 3%)
|
||||
box-shadow: -10px 0px 5px -10px darken(white, 30%)
|
||||
z-index: 10
|
||||
position: absolute
|
||||
|
|
@ -73,7 +73,7 @@
|
|||
position: absolute
|
||||
top: 12px
|
||||
z-index: 15
|
||||
background: white
|
||||
background: darken(white, 3%)
|
||||
border-radius: left 3px
|
||||
box-shadow: -4px 0px 7px -4px darken(white, 30%)
|
||||
color: darken(white, 50%)
|
||||
|
|
|
|||
10
client/components/sidebar/sidebarArchives.jade
Normal file
10
client/components/sidebar/sidebarArchives.jade
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
template(name="archivesSidebar")
|
||||
each archivedCards
|
||||
.minicard-wrapper.js-minicard
|
||||
+minicard(this)
|
||||
p.quiet
|
||||
a.js-restore Restore
|
||||
| -
|
||||
a.js-delete Delete
|
||||
else
|
||||
p.no-items-message No archived cards.
|
||||
26
client/components/sidebar/sidebarArchives.js
Normal file
26
client/components/sidebar/sidebarArchives.js
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
BlazeComponent.extendComponent({
|
||||
template: function() {
|
||||
return 'archivesSidebar';
|
||||
},
|
||||
archivedCards: function() {
|
||||
return Cards.find({archived: true});
|
||||
},
|
||||
|
||||
onRendered: function() {
|
||||
//XXX We should support dragging a card from the sidebar to the board
|
||||
},
|
||||
|
||||
events: function() {
|
||||
return [{
|
||||
'click .js-restore': function() {
|
||||
var cardId = this.currentData()._id;
|
||||
Cards.update(cardId, {$set: {archived: false}});
|
||||
},
|
||||
'click .js-delete': Popup.afterConfirm('cardDelete', function() {
|
||||
var cardId = this._id;
|
||||
Cards.remove(cardId);
|
||||
Popup.close();
|
||||
})
|
||||
}];
|
||||
}
|
||||
}).register('archivesSidebar');
|
||||
Loading…
Add table
Add a link
Reference in a new issue