From ff4e50d904d5d921563032956d3c238fb332c4e5 Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Fri, 10 Jun 2016 15:05:35 -0400 Subject: [PATCH] (js) Use a speed dial for card/list creation --- NEWS | 1 + .../ContactsUI/UIxContactFoldersView.wox | 29 +++++++++++--- .../js/Contacts/AddressBookController.js | 38 +------------------ 3 files changed, 26 insertions(+), 42 deletions(-) diff --git a/NEWS b/NEWS index 13b069475..1fea92406 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,7 @@ Enhancements - [web] always display name of month in week view (#3724) + - [web] use a speed dial (instead of a dialog) for card/list creation Bug fixes - [web] fixed generic avatar in lists (#3719) diff --git a/UI/Templates/ContactsUI/UIxContactFoldersView.wox b/UI/Templates/ContactsUI/UIxContactFoldersView.wox index 7be07cb84..eb3f8c440 100644 --- a/UI/Templates/ContactsUI/UIxContactFoldersView.wox +++ b/UI/Templates/ContactsUI/UIxContactFoldersView.wox @@ -436,12 +436,29 @@ md-mode="indeterminate" md-diameter="32"> - - add - + + + + add + + + + + + person + + + + group + + + diff --git a/UI/WebServerResources/js/Contacts/AddressBookController.js b/UI/WebServerResources/js/Contacts/AddressBookController.js index 67cae8e21..206ef3949 100644 --- a/UI/WebServerResources/js/Contacts/AddressBookController.js +++ b/UI/WebServerResources/js/Contacts/AddressBookController.js @@ -40,42 +40,8 @@ $event.stopPropagation(); } - function newComponent(ev) { - $mdDialog.show({ - parent: angular.element(document.body), - targetEvent: ev, - clickOutsideToClose: true, - escapeToClose: true, - template: [ - '', - ' ', - '
', - ' ', - ' ' + l('Contact'), - ' ', - ' ', - ' ' + l('List'), - ' ', - '
', - '
', - '
' - ].join(''), - locals: { - addressbookId: vm.selectedFolder.id - }, - controller: ComponentDialogController - }); - - /** - * @ngInject - */ - ComponentDialogController.$inject = ['scope', '$mdDialog', '$state', 'addressbookId']; - function ComponentDialogController(scope, $mdDialog, $state, addressbookId) { - scope.create = function(type) { - $mdDialog.hide(); - $state.go('app.addressbook.new', { addressbookId: addressbookId, contactType: type }); - }; - } + function newComponent(type) { + $state.go('app.addressbook.new', { contactType: type }); } function unselectCards() {