mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-11 00:14:50 +03:00
Improved Contacts popup view
This commit is contained in:
parent
f1241cf803
commit
56d64b325c
3 changed files with 44 additions and 32 deletions
|
|
@ -94,6 +94,7 @@ export class ContactModel extends AbstractModel {
|
|||
namePrefix: '', // NamePrefix
|
||||
nameSuffix: '', // NameSuffix
|
||||
nickname: null,
|
||||
note: null,
|
||||
|
||||
// Business
|
||||
org: '',
|
||||
|
|
@ -162,7 +163,7 @@ export class ContactModel extends AbstractModel {
|
|||
value && contact[nProps[index]](value)
|
||||
);
|
||||
|
||||
['nickname', 'title'].forEach(field => {
|
||||
['nickname', 'note', 'title'].forEach(field => {
|
||||
props = jCard.getOne(field);
|
||||
props && contact[field](props.value);
|
||||
});
|
||||
|
|
@ -243,6 +244,10 @@ export class ContactModel extends AbstractModel {
|
|||
this.nickname() || this.nickname('');
|
||||
}
|
||||
|
||||
addNote() {
|
||||
this.note() || this.note('');
|
||||
}
|
||||
|
||||
hasChanges()
|
||||
{
|
||||
return this.toJSON().jCard != JSON.stringify(this.jCard);
|
||||
|
|
@ -260,7 +265,7 @@ export class ContactModel extends AbstractModel {
|
|||
]/*, params, group*/);
|
||||
// jCard.parseFullName({set:true});
|
||||
|
||||
['nickname', 'title'].forEach(field =>
|
||||
['nickname', 'note', 'title'].forEach(field =>
|
||||
this[field]() ? jCard.set(field, this[field]()/*, params, group*/) : jCard.remove(field)
|
||||
);
|
||||
|
||||
|
|
@ -269,7 +274,8 @@ export class ContactModel extends AbstractModel {
|
|||
if (this.department()) {
|
||||
org.push(this.department());
|
||||
}
|
||||
jCard.set('org', org);
|
||||
let prop = jCard.getOne('org');
|
||||
prop ? prop.value = org : jCard.set('org', org);
|
||||
} else {
|
||||
jCard.remove('');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,13 +24,13 @@
|
|||
"PASSWORD": "Wachtwoord",
|
||||
"REPLY_TO": "Antwoordadres",
|
||||
"SAVE": "Opslaan",
|
||||
"SAVE_CHANGES": "Save changes?",
|
||||
"SAVE_CHANGES": "Wijzigingen opslaan?",
|
||||
"SEARCH": "Zoeken",
|
||||
"SPAM": "Ongewenste e-mail",
|
||||
"SUBJECT": "Onderwerp",
|
||||
"TEST": "Test",
|
||||
"TO": "Naar",
|
||||
"SERVER_MESSAGE": "Server message",
|
||||
"SERVER_MESSAGE": "Server bericht",
|
||||
"YES": "Ja",
|
||||
"NO": "Nee"
|
||||
},
|
||||
|
|
@ -176,16 +176,16 @@
|
|||
},
|
||||
"CONTACTS": {
|
||||
"TAB_CONTACT": "Contact",
|
||||
"TAB_LOCATIONS": "Locations",
|
||||
"TAB_BUSINESS": "Business",
|
||||
"LABEL_ORGANIZATION": "Organization",
|
||||
"LABEL_DEPARTMENT": "Department",
|
||||
"LABEL_TITLE": "Title",
|
||||
"TAB_LOCATIONS": "Locaties",
|
||||
"TAB_BUSINESS": "Bedrijf",
|
||||
"LABEL_ORGANIZATION": "Organisatie",
|
||||
"LABEL_DEPARTMENT": "Afdeling",
|
||||
"LABEL_TITLE": "Titel",
|
||||
"TAB_CRYPTO": "Crypto",
|
||||
"ASK": "Ask",
|
||||
"NEVER": "Never",
|
||||
"ALWAYS": "Always",
|
||||
"ALWAYS_IF_POSSIBLE": "Always if possible",
|
||||
"ASK": "Vraag",
|
||||
"NEVER": "Nooit",
|
||||
"ALWAYS": "Altijd",
|
||||
"ALWAYS_IF_POSSIBLE": "Altijd indien mogelijk",
|
||||
"BUTTON_ADD_CONTACT": "Contactpersoon Toevoegen",
|
||||
"BUTTON_CREATE_CONTACT": "Toevoegen",
|
||||
"BUTTON_UPDATE_CONTACT": "Bijwerken",
|
||||
|
|
|
|||
|
|
@ -269,30 +269,36 @@
|
|||
<a id="button-add-prop-dropdown-id" href="#" class="btn dropdown-toggle" data-i18n="CONTACTS/ADD_MENU_LABEL"></a>
|
||||
<menu class="dropdown-menu right-edge" style="text-align: left" role="menu" aria-labelledby="button-add-prop-dropdown-id">
|
||||
<li role="presentation">
|
||||
<a href="#" data-bind="click: addEmail">
|
||||
<i class="icon-none"></i>
|
||||
<span data-i18n="GLOBAL/EMAIL"></span>
|
||||
</a>
|
||||
</li>
|
||||
<li role="presentation">
|
||||
<a href="#" data-bind="click: addTel">
|
||||
<i class="icon-none"></i>
|
||||
<span data-i18n="CONTACTS/ADD_MENU_PHONE"></span>
|
||||
</a>
|
||||
</li>
|
||||
<li role="presentation">
|
||||
<a href="#" data-bind="click: addUrl">
|
||||
<i class="icon-none"></i>
|
||||
<span data-i18n="CONTACTS/ADD_MENU_URL"></span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="dividerbar" role="presentation">
|
||||
<a href="#" data-bind="click: addNickname">
|
||||
<i class="icon-none"></i>
|
||||
<span data-i18n="CONTACTS/ADD_MENU_NICKNAME"></span>
|
||||
</a>
|
||||
</li>
|
||||
<li role="presentation">
|
||||
<a href="#" data-bind="click: addEmail">
|
||||
<i class="fontastic">@</i>
|
||||
<span data-i18n="GLOBAL/EMAIL"></span>
|
||||
</a>
|
||||
</li>
|
||||
<li role="presentation">
|
||||
<a href="#" data-bind="click: addTel">
|
||||
<i class="fontastic">📞</i>
|
||||
<span data-i18n="CONTACTS/ADD_MENU_PHONE"></span>
|
||||
</a>
|
||||
</li>
|
||||
<li role="presentation">
|
||||
<a href="#" data-bind="click: addUrl">
|
||||
<i class="fontastic">🌍</i>
|
||||
<span data-i18n="CONTACTS/ADD_MENU_URL"></span>
|
||||
</a>
|
||||
</li>
|
||||
<!--
|
||||
<li class="dividerbar" role="presentation">
|
||||
<a href="#" data-bind="click: addNote">
|
||||
<i class="icon-none"></i>
|
||||
<span data-i18n="CONTACTS/ADD_MENU_NOTES"></span>
|
||||
</a>
|
||||
</li>
|
||||
<li role="presentation">
|
||||
<a href="#" data-bind="click: addNewAddress">
|
||||
<span data-i18n="CONTACTS/ADD_MENU_ADDRESS"></span>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue