summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2017-11-20 19:10:23 +0100
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2017-11-21 16:00:05 +0100
commitba494835767bd2db0265c8b1a472432ce1ee696d (patch)
tree1deee4a0347f96e40040dd1d420691dac2fa0f47 /templates
parent2bc57687a399cf143b8be56edd485c579d09e273 (diff)
Prevent import if no addressbook is available
Add notify on contact import from addressbook Fix Groups update on enabling/disabling Changed default ab to first that is writtable instead of first of the list Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'templates')
-rw-r--r--templates/contactImport.html7
1 files changed, 4 insertions, 3 deletions
diff --git a/templates/contactImport.html b/templates/contactImport.html
index 4c24a3b8..f1220f6a 100644
--- a/templates/contactImport.html
+++ b/templates/contactImport.html
@@ -1,14 +1,15 @@
<input type="file" id="contact-import" class="hidden-visually" multiple />
<label for="contact-import" class="button {{ctrl.loadingClass}}" ng-class="{'no-select': ctrl.addressBooks.length === 1}" id="upload"
- ng-if="!(ctrl.addressBooks.length===1 && ctrl.addressBooks[0].readOnly)">
+ ng-if="ctrl.addressBooks.length > 0 && ctrl.selectedAddressBook">
{{ctrl.importText}}
<span ng-if="ctrl.addressBooks.length === 1 && !ctrl.importing" ng-class="{'icon-loading-small': ctrl.loading}">{{ctrl.selectedAddressBook.displayName}}</span>
</label>
-<ui-select ng-model="ctrl.selectedAddressBook" ng-if="ctrl.addressBooks.length > 1" search-enabled="ctrl.addressBooks.length > 4"
+<ui-select ng-model="ctrl.selectedAddressBook" ng-if="ctrl.addressBooks.length > 1 && ctrl.selectedAddressBook" search-enabled="ctrl.addressBooks.length > 4"
theme="select2" class="form-control" title="{{ctrl.t.selectAddressbook}}"
uis-open-close="ctrl.stopHideMenu(isOpen)" ng-class="{'icon-loading-small': ctrl.loading}">
<ui-select-match placeholder="{{ctrl.t.selectAddressbook}}">{{$select.selected.displayName}}</ui-select-match>
<ui-select-choices repeat="addressBook in ctrl.addressBooks | filter: {readOnly: false} | filter: {displayName: $select.search}">
{{addressBook.displayName}}
</ui-select-choices>
-</ui-select> \ No newline at end of file
+</ui-select>
+<div ng-if="ctrl.addressBooks.length === 0 || !ctrl.selectedAddressBook">{{ctrl.t.importdisabled}}</div>