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