summaryrefslogtreecommitdiffstats
path: root/js/components/newContactButton/newContactButton_controller.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/components/newContactButton/newContactButton_controller.js')
-rw-r--r--js/components/newContactButton/newContactButton_controller.js23
1 files changed, 0 insertions, 23 deletions
diff --git a/js/components/newContactButton/newContactButton_controller.js b/js/components/newContactButton/newContactButton_controller.js
deleted file mode 100644
index c38d8a78..00000000
--- a/js/components/newContactButton/newContactButton_controller.js
+++ /dev/null
@@ -1,23 +0,0 @@
-angular.module('contactsApp')
-.controller('newContactButtonCtrl', function($scope, ContactService, $routeParams, vCardPropertiesService) {
- var ctrl = this;
-
- ctrl.t = {
- addContact : t('contacts', 'New contact')
- };
-
- ctrl.createContact = function() {
- ContactService.create().then(function(contact) {
- ['tel', 'adr', 'email'].forEach(function(field) {
- var defaultValue = vCardPropertiesService.getMeta(field).defaultValue || {value: ''};
- contact.addProperty(field, defaultValue);
- } );
- if ([t('contacts', 'All contacts'), t('contacts', 'Not grouped')].indexOf($routeParams.gid) === -1) {
- contact.categories([ $routeParams.gid ]);
- } else {
- contact.categories([]);
- }
- $('#details-fullName').focus();
- });
- };
-});