mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-04 06:57:03 +03:00
Improved icon font view
This commit is contained in:
parent
93738eac22
commit
4a8c9f8e18
31 changed files with 115 additions and 196 deletions
|
|
@ -1,7 +1,8 @@
|
|||
import { doc, createElement } from 'Common/Globals';
|
||||
import { EmailModel } from 'Model/Email';
|
||||
|
||||
const contentType = 'snappymail/emailaddress';
|
||||
const contentType = 'snappymail/emailaddress',
|
||||
getAddressKey = li => li && li.emailaddress && li.emailaddress.key;
|
||||
|
||||
let dragAddress, datalist;
|
||||
|
||||
|
|
@ -165,7 +166,7 @@ export class EmailAddressesComponent {
|
|||
|
||||
_editTag(ev) {
|
||||
var li = ev.target.closest('li'),
|
||||
tagKey = li && li.emailaddress.key;
|
||||
tagKey = getAddressKey(li);
|
||||
|
||||
if (!tagKey) {
|
||||
return true;
|
||||
|
|
@ -344,7 +345,7 @@ export class EmailAddressesComponent {
|
|||
_removeTag(ev, li) {
|
||||
ev.preventDefault();
|
||||
|
||||
var key = li.emailaddress.key,
|
||||
var key = getAddressKey(li),
|
||||
self = this,
|
||||
indexFound = self._chosenValues.findIndex(v => key === v.key);
|
||||
|
||||
|
|
@ -358,7 +359,7 @@ export class EmailAddressesComponent {
|
|||
|
||||
_removeDraggedTag(li) {
|
||||
var
|
||||
key = li.emailaddress.key,
|
||||
key = getAddressKey(li),
|
||||
self = this,
|
||||
indexFound = self._chosenValues.findIndex(v => key === v.key)
|
||||
;
|
||||
|
|
@ -380,7 +381,7 @@ export class EmailAddressesComponent {
|
|||
|
||||
_focus(ev) {
|
||||
var li = ev.target.closest('li');
|
||||
if (li && li.emailaddress.key) {
|
||||
if (getAddressKey(li)) {
|
||||
li.querySelector('a').focus();
|
||||
} else {
|
||||
this.focus();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue