mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 20:49:20 +03:00
Remove the openDropdownTrigger and replace some with a better toggle
This commit is contained in:
parent
9d876d1146
commit
df7888e3a6
8 changed files with 8 additions and 27 deletions
14
dev/External/User/ko.js
vendored
14
dev/External/User/ko.js
vendored
|
|
@ -3,7 +3,6 @@ import ko from 'ko';
|
|||
import { HtmlEditor } from 'Common/Html';
|
||||
import { timeToNode } from 'Common/Translator';
|
||||
import { doc, elementById, addEventsListeners, dropdowns, leftPanelDisabled } from 'Common/Globals';
|
||||
import { dropdownsDetectVisibility } from 'Common/UtilsUser';
|
||||
import { EmailAddressesComponent } from 'Component/EmailAddresses';
|
||||
import { ThemeStore } from 'Stores/Theme';
|
||||
import { dropFilesInFolder } from 'Common/Folders';
|
||||
|
|
@ -247,18 +246,5 @@ Object.assign(ko.bindingHandlers, {
|
|||
dropdowns.push(element);
|
||||
element.ddBtn = new BSN.Dropdown(element.querySelector('.dropdown-toggle'));
|
||||
}
|
||||
},
|
||||
|
||||
openDropdownTrigger: {
|
||||
update: (element, fValueAccessor) => {
|
||||
if (ko.unwrap(fValueAccessor())) {
|
||||
const el = element.ddBtn;
|
||||
el.open || el.toggle();
|
||||
// el.focus();
|
||||
|
||||
dropdownsDetectVisibility();
|
||||
fValueAccessor()(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -207,7 +207,7 @@ export class ComposePopupView extends AbstractViewPopup {
|
|||
this.allowSpellcheck = SettingsUserStore.allowSpellcheck;
|
||||
|
||||
addObservablesTo(this, {
|
||||
identitiesDropdownTrigger: false,
|
||||
identitiesMenu: false,
|
||||
|
||||
from: '',
|
||||
to: '',
|
||||
|
|
@ -1136,7 +1136,7 @@ export class ComposePopupView extends AbstractViewPopup {
|
|||
addShortcut('w', 'meta', ScopeCompose, ()=>false);
|
||||
|
||||
addShortcut('m', 'meta', ScopeCompose, () => {
|
||||
this.identitiesDropdownTrigger(true);
|
||||
this.identitiesMenu().ddBtn.toggle();
|
||||
return false;
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -112,9 +112,6 @@ export class MailMessageList extends AbstractViewRight {
|
|||
this.userUsageProc = FolderUserStore.quotaPercentage;
|
||||
|
||||
addObservablesTo(this, {
|
||||
moreDropdownTrigger: false,
|
||||
sortDropdownTrigger: false,
|
||||
|
||||
focusSearch: false
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -105,8 +105,6 @@ export class MailMessageView extends AbstractViewRight {
|
|||
showAttachmentControls: !!Local.get(ClientSideKeyNameMessageAttachmentControls),
|
||||
downloadAsZipLoading: false,
|
||||
showFullInfo: '1' === Local.get(ClientSideKeyNameMessageHeaderFullInfo),
|
||||
moreDropdownTrigger: false,
|
||||
|
||||
// viewer
|
||||
viewFromShort: '',
|
||||
dkimData: ['none', '', '']
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ export class SystemDropDownUserView extends AbstractViewRight {
|
|||
|
||||
addObservablesTo(this, {
|
||||
currentAudio: '',
|
||||
accountMenuDropdownTrigger: false
|
||||
accountMenu: false
|
||||
});
|
||||
|
||||
this.allowContacts = AppUserStore.allowContacts();
|
||||
|
|
@ -115,7 +115,7 @@ export class SystemDropDownUserView extends AbstractViewRight {
|
|||
registerShortcut('m', '', [ScopeMessageList, ScopeMessageView, ScopeSettings], () => {
|
||||
if (!this.viewModelDom.hidden) {
|
||||
// exitFullscreen();
|
||||
this.accountMenuDropdownTrigger(true);
|
||||
this.accountMenu().ddBtn.toggle();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue