diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2017-02-07 16:46:29 +0100 |
---|---|---|
committer | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2017-08-08 19:33:52 +0200 |
commit | c99bec354efa1c1d1b43ac7e6cd20a582d56ad5e (patch) | |
tree | 98056e7c043626eec66a7e459b693ac4e8c3ee56 | |
parent | 614dc8e137af7eff9773e3a21fa5f2504726d7b9 (diff) |
Fix menu closing
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
-rw-r--r-- | bower.json | 2 | ||||
-rw-r--r-- | js/components/contactImport/contactImport_controller.js | 10 | ||||
-rw-r--r-- | templates/contactImport.html | 2 |
3 files changed, 12 insertions, 2 deletions
@@ -25,7 +25,7 @@ "angular-sanitize": "1.5.8", "angular-uuid4": "0.3.1", "jquery-timepicker": "883bb2cd94", - "ui-select": "angular-ui/ui-select#0.14.9", + "ui-select": "angular-ui/ui-select#0.19.6", "vcard": "0.2.7", "angular-click-outside": "^2.10.1", "ngclipboard": "^1.1.1" diff --git a/js/components/contactImport/contactImport_controller.js b/js/components/contactImport/contactImport_controller.js index ad096567..0152df35 100644 --- a/js/components/contactImport/contactImport_controller.js +++ b/js/components/contactImport/contactImport_controller.js @@ -17,4 +17,14 @@ angular.module('contactsApp') ctrl.selectedAddressBook = AddressBookService.getDefaultAddressBook(); }); + ctrl.stopHideMenu = function(isOpen) { + if(isOpen) { + // disabling settings bind + $('#app-settings-header > button').data('apps-slide-toggle', false); + } else { + // reenabling it + $('#app-settings-header > button').data('apps-slide-toggle', '#app-settings-content'); + } + }; + }); diff --git a/templates/contactImport.html b/templates/contactImport.html index 9eac3116..a0f7f180 100644 --- a/templates/contactImport.html +++ b/templates/contactImport.html @@ -2,7 +2,7 @@ <label for="contact-import" class="icon-upload button" id="upload">{{ctrl.importText}}</label> <ui-select ng-model="ctrl.selectedAddressBook" ng-disabled="ctrl.addressBooks.length < 2" theme="select2" class="form-control" title="{{ctrl.t.selectAddressbook}}" - on-select="console.log(0)" ng-class="{'icon-loading-small': ctrl.loading}"> + 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: $select.search"> {{addressBook.displayName}} |