mirror of
https://github.com/wekan/wekan.git
synced 2025-12-17 07:50:12 +01:00
Add clickable list titles
This commit is contained in:
parent
6d9928ea8f
commit
52f920db12
4 changed files with 36 additions and 2 deletions
|
|
@ -32,11 +32,15 @@ template(name="globalSearch")
|
||||||
+resultCard(card)
|
+resultCard(card)
|
||||||
else
|
else
|
||||||
.global-search-instructions
|
.global-search-instructions
|
||||||
+viewer
|
h2 Label Colors
|
||||||
= searchInstructions
|
|
||||||
.palette-colors: each label in labelColors
|
.palette-colors: each label in labelColors
|
||||||
span.card-label.palette-color.js-palette-color(class="card-label-{{label.color}}")
|
span.card-label.palette-color.js-palette-color(class="card-label-{{label.color}}")
|
||||||
= label.name
|
= label.name
|
||||||
|
h2 Lists
|
||||||
|
.lists-wrapper
|
||||||
|
each title in myLists.get
|
||||||
|
span.card-label.list-title.js-list-title
|
||||||
|
= title
|
||||||
|
|
||||||
template(name="globalSearchViewChangePopup")
|
template(name="globalSearchViewChangePopup")
|
||||||
if currentUser
|
if currentUser
|
||||||
|
|
|
||||||
|
|
@ -42,6 +42,7 @@ BlazeComponent.extendComponent({
|
||||||
this.query = new ReactiveVar('');
|
this.query = new ReactiveVar('');
|
||||||
this.resultsHeading = new ReactiveVar('');
|
this.resultsHeading = new ReactiveVar('');
|
||||||
this.searchLink = new ReactiveVar(null);
|
this.searchLink = new ReactiveVar(null);
|
||||||
|
this.myLists = new ReactiveVar([]);
|
||||||
this.queryParams = null;
|
this.queryParams = null;
|
||||||
this.parsingErrors = [];
|
this.parsingErrors = [];
|
||||||
this.resultsCount = 0;
|
this.resultsCount = 0;
|
||||||
|
|
@ -55,6 +56,13 @@ BlazeComponent.extendComponent({
|
||||||
// }
|
// }
|
||||||
// // eslint-disable-next-line no-console
|
// // eslint-disable-next-line no-console
|
||||||
// console.log('colorMap:', this.colorMap);
|
// console.log('colorMap:', this.colorMap);
|
||||||
|
|
||||||
|
Meteor.call('myLists', (err, data) => {
|
||||||
|
if (!err) {
|
||||||
|
this.myLists.set(data);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
Meteor.subscribe('setting');
|
Meteor.subscribe('setting');
|
||||||
if (Session.get('globalQuery')) {
|
if (Session.get('globalQuery')) {
|
||||||
this.searchAllBoards(Session.get('globalQuery'));
|
this.searchAllBoards(Session.get('globalQuery'));
|
||||||
|
|
@ -375,6 +383,11 @@ BlazeComponent.extendComponent({
|
||||||
`${this.query.get()} label:"${evt.currentTarget.textContent}"`,
|
`${this.query.get()} label:"${evt.currentTarget.textContent}"`,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
'click .js-list-title'(evt) {
|
||||||
|
this.query.set(
|
||||||
|
`${this.query.get()} list:"${evt.currentTarget.textContent}"`,
|
||||||
|
);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -95,3 +95,6 @@ code
|
||||||
background-color: lightgrey
|
background-color: lightgrey
|
||||||
padding: 0.1rem !important
|
padding: 0.1rem !important
|
||||||
font-size: 0.7rem !important
|
font-size: 0.7rem !important
|
||||||
|
|
||||||
|
.list-title
|
||||||
|
background-color: darkgray
|
||||||
|
|
|
||||||
|
|
@ -362,6 +362,20 @@ Meteor.methods({
|
||||||
const list = Lists.findOne({ _id: listId });
|
const list = Lists.findOne({ _id: listId });
|
||||||
list.toggleSoftLimit(!list.getWipLimit('soft'));
|
list.toggleSoftLimit(!list.getWipLimit('soft'));
|
||||||
},
|
},
|
||||||
|
|
||||||
|
myLists() {
|
||||||
|
// my lists
|
||||||
|
return _.uniq(
|
||||||
|
Lists.find(
|
||||||
|
{ boardId: { $in: Boards.userBoardIds(this.userId) } },
|
||||||
|
{ fields: { title: 1 } },
|
||||||
|
)
|
||||||
|
.fetch()
|
||||||
|
.map(list => {
|
||||||
|
return list.title;
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
Lists.hookOptions.after.update = { fetchPrevious: false };
|
Lists.hookOptions.after.update = { fetchPrevious: false };
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue