summaryrefslogtreecommitdiffstats
path: root/js/components/contact/contact_controller.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/components/contact/contact_controller.js')
-rw-r--r--js/components/contact/contact_controller.js35
1 files changed, 0 insertions, 35 deletions
diff --git a/js/components/contact/contact_controller.js b/js/components/contact/contact_controller.js
deleted file mode 100644
index aa3dcd4a..00000000
--- a/js/components/contact/contact_controller.js
+++ /dev/null
@@ -1,35 +0,0 @@
-angular.module('contactsApp')
-.controller('contactCtrl', function($route, $routeParams, SortByService) {
- var ctrl = this;
-
- ctrl.t = {
- errorMessage : t('contacts', 'This card is corrupted and has been fixed. Please check the data and trigger a save to make the changes permanent.'),
- };
-
- ctrl.getName = function() {
- // If lastName equals to firstName then none of them is set
- if (ctrl.contact.lastName() === ctrl.contact.firstName()) {
- return ctrl.contact.displayName();
- }
-
- if (SortByService.getSortByKey() === 'sortLastName') {
- return (
- ctrl.contact.lastName()
- + (ctrl.contact.firstName() ? ', ' : '')
- + ctrl.contact.firstName() + ' '
- + ctrl.contact.additionalNames()
- ).trim();
- }
-
- if (SortByService.getSortByKey() === 'sortFirstName') {
- return (
- ctrl.contact.firstName() + ' '
- + ctrl.contact.additionalNames() + ' '
- + ctrl.contact.lastName()
- ).trim();
- }
-
- return ctrl.contact.displayName();
- };
-});
-