mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Some bugfixes for #1673
This commit is contained in:
parent
85fb2ff44d
commit
3a8af7de29
2 changed files with 28 additions and 5 deletions
|
|
@ -1,8 +1,30 @@
|
||||||
((rl) => {
|
((rl) => {
|
||||||
const EmptyOption = { id: -1, name: '' };
|
|
||||||
const Folders = ko.computed(() => {
|
const Folders = ko.computed(() => {
|
||||||
return [EmptyOption, ...rl.app.folderList().map((f) => ({ name: f.name }))];
|
const
|
||||||
|
aResult = [{
|
||||||
|
id: -1,
|
||||||
|
name: ''
|
||||||
|
}],
|
||||||
|
sDeepPrefix = '\u00A0\u00A0\u00A0',
|
||||||
|
showUnsubscribed = true/*!SettingsUserStore.hideUnsubscribed()*/,
|
||||||
|
foldersWalk = folders => {
|
||||||
|
folders.forEach(oItem => {
|
||||||
|
if (showUnsubscribed || oItem.hasSubscriptions() || !oItem.exists) {
|
||||||
|
aResult.push({
|
||||||
|
id: oItem.fullName,
|
||||||
|
name: sDeepPrefix.repeat(oItem.deep) + oItem.detailedName()
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (oItem.subFolders.length) {
|
||||||
|
foldersWalk(oItem.subFolders());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
foldersWalk(rl.app.folderList());
|
||||||
|
return aResult;
|
||||||
|
});
|
||||||
|
|
||||||
const Priorities = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
|
const Priorities = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
|
||||||
const searchQ = ko.observable(''),
|
const searchQ = ko.observable(''),
|
||||||
priority = ko.observable(1),
|
priority = ko.observable(1),
|
||||||
|
|
@ -92,6 +114,7 @@
|
||||||
const advS = event.detail;
|
const advS = event.detail;
|
||||||
if (advS.viewModelTemplateID == 'PopupsAdvancedSearch') {
|
if (advS.viewModelTemplateID == 'PopupsAdvancedSearch') {
|
||||||
const button = document.createElement('button');
|
const button = document.createElement('button');
|
||||||
|
button.setAttribute('class', 'btn');
|
||||||
button.setAttribute('data-i18n', 'SFILTERS/CREATE_FILTER');
|
button.setAttribute('data-i18n', 'SFILTERS/CREATE_FILTER');
|
||||||
button.addEventListener('click', function () {
|
button.addEventListener('click', function () {
|
||||||
searchQ(advS.buildSearchString());
|
searchQ(advS.buildSearchString());
|
||||||
|
|
@ -149,7 +172,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
rl.addSettingsViewModel(SearchFiltersSettingsTab, 'STabSearchFilters', 'Filters', 'filters');
|
rl.addSettingsViewModel(SearchFiltersSettingsTab, 'STabSearchFilters', 'Search Filters', 'searchfilters');
|
||||||
|
|
||||||
class SearchFiltersPopupView extends rl.pluginPopupView {
|
class SearchFiltersPopupView extends rl.pluginPopupView {
|
||||||
constructor() {
|
constructor() {
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
options: folders,
|
options: folders,
|
||||||
value: fFolder,
|
value: fFolder,
|
||||||
optionsText: 'name',
|
optionsText: 'name',
|
||||||
optionsValue: 'name',
|
optionsValue: 'id',
|
||||||
enable: usefFolder
|
enable: usefFolder
|
||||||
"></select>
|
"></select>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue