blob: 1f8cc63a8dc2eae1aad57d0951eff140a2b9b398 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
<div class="contact-details-wrapper wrapper-show"
ng-class="{'mobile-show': ctrl.show, 'icon-loading': ctrl.loading}">
<div id="app-navigation-toggle-back" class="details-back icon-download" ng-click="ctrl.clearContact()"></div>
<div ng-if="ctrl.contact===undefined && !ctrl.loading && !ctrl.init">
<div id="emptycontent">
<div class="icon-contacts-dark"></div>
<h2>{{ctrl.t.noContacts}}</h2>
</div>
</div>
<div ng-if="ctrl.init">
<div id="emptycontent">
<div class="icon-contacts-dark"></div>
<h2>{{ctrl.t.loading}}</h2>
</div>
</div>
<div ng-if="ctrl.contact!==undefined">
<header class="contactdetails__header" ng-style="{'background-color': (ctrl.contact.uid() | contactColor)}">
<avatar data="ctrl.contact" ng-class="{'avatar--missing': ctrl.contact.photo()===undefined}"></avatar>
<div id="details-contact-infos">
<h2>
<input type="text" id="details-fullName" class="contactdetails__name" placeholder="{{ctrl.t.placeholderName}}" autocomplete="off" autocorrect="off" spellcheck="false"
name="fullname" ng-model="ctrl.contact.fullName" ng-model-options="{ getterSetter: true, debounce: 500 }" ng-change="ctrl.updateContact()" value=""
ng-disabled="ctrl.addressBook.readOnly" />
</h2>
<div id="details-org-container">
<input type="text" id="details-org" class="contactdetails__org" placeholder="{{ctrl.t.placeholderOrg}}" autocomplete="off" autocorrect="off" spellcheck="false"
name="org" ng-model="ctrl.contact.org" ng-model-options="{ getterSetter: true, debounce: 500 }" ng-change="ctrl.updateContact()" value=""
inputresize size="{{ctrl.contact.org().length > 1 ? ctrl.contact.org().length : '1'}}"
ng-disabled="ctrl.addressBook.readOnly" />
<input type="text" id="details-title" class="contactdetails__title" placeholder="{{ctrl.t.placeholderTitle}}" autocomplete="off" autocorrect="off" spellcheck="false"
name="title" ng-model="ctrl.contact.title" ng-model-options="{ getterSetter: true, debounce: 500 }" ng-change="ctrl.updateContact()" value=""
inputresize size="{{ctrl.contact.title().length > 1 ? ctrl.contact.title().length : '1'}}"
ng-disabled="ctrl.addressBook.readOnly" />
</div>
</div>
<div id="details-actions">
<span class="icon-more-white openMenuButton" ng-click="ctrl.toggleMenu('options')">
</span>
<div class="popovermenu bubble menu"
ng-class="{open: ctrl.openedMenu === 'options'}"
click-outside="ctrl.closeMenus()"
outside-if-not="openMenuButton,popovermenu">
<ul>
<li ng-if="ctrl.contact.failedProps.length>0">
<a id="contact-failed-save" ng-click="ctrl.updateContact()" uib-tooltip="Contact failed to save please update" class="icon-checkmark">
<span>Update</span>
</a>
</li>
<li>
<a href="{{ctrl.contact.data.url}}" id="contact-export-link" download="{{ ctrl.contact.readableFilename() }}" class="icon-download">
<span>Download</span>
</a>
</li>
<li ng-if="!ctrl.addressBook.readOnly">
<a ng-click="ctrl.deleteContact()" class="icon-delete">
<span>Delete</span>
</a>
</li>
</ul>
</div>
</div>
</header>
<section>
<propertyGroup ng-repeat="prop in ctrl.contact.props | toArray | orderDetailItems:'$key'" model="ctrl.contact" data="prop" name="prop.$key" class="property-{{prop.$key}} grid-span-{{prop.length}}"></propertyGroup>
<div class="select-addressbook" ng-if="ctrl.addressBooks.length > 1 && !ctrl.addressBook.readOnly">
<label for="details-addressbook">{{ctrl.t.addressBook}}</label>
<select ng-model="ctrl.addressBook" ng-change="ctrl.changeAddressBook(ctrl.addressBook, oldAddressBook)" id="details-addressbook"
ng-options="book.displayName for book in ctrl.addressBooks | filter: {readOnly: false}"
ng-click="oldAddressBook = ctrl.addressBook" ng-init="oldAddressBook = ctrl.addressBook">
</select>
</div>
<select class="add-field" ng-model="ctrl.field" ng-change="ctrl.addField(ctrl.field)" ng-if="!ctrl.addressBook.readOnly">
<option value=''>{{ctrl.t.selectField}}</option>
<option ng-repeat="field in ctrl.fieldDefinitions | fieldFilter: ctrl.contact | orderBy : 'name'" value="{{field.id}}">{{field.name}}</option>
</select>
</section>
</div>
</div>
|