mirror of https://github.com/nextcloud/contacts
fix click on contact list
This commit is contained in:
parent
8896d3b8e4
commit
e0b24d2519
|
@ -1,6 +1,10 @@
|
|||
app.controller('contactCtrl', [function() {
|
||||
app.controller('contactCtrl', ['$route', function($route) {
|
||||
var ctrl = this;
|
||||
|
||||
ctrl.openContact = function() {
|
||||
$route.updateParams({uid: ctrl.contact.uid()});
|
||||
};
|
||||
|
||||
console.log("Contact: ",ctrl.contact);
|
||||
|
||||
}]);
|
||||
|
|
|
@ -22,6 +22,22 @@ app.config(['$routeProvider', function($routeProvider){
|
|||
|
||||
}]);
|
||||
|
||||
app.controller('addressbookCtrl', function() {
|
||||
var ctrl = this;
|
||||
console.log(this);
|
||||
});
|
||||
app.directive('addressbook', function() {
|
||||
return {
|
||||
restrict: 'A', // has to be an attribute to work with core css
|
||||
scope: {},
|
||||
controller: 'addressbookCtrl',
|
||||
controllerAs: 'ctrl',
|
||||
bindToController: {
|
||||
addressBook: "=data"
|
||||
},
|
||||
templateUrl: OC.linkTo('contactsrework', 'templates/addressBook.html')
|
||||
};
|
||||
});
|
||||
app.controller('addressbooklistCtrl', ['$scope', 'AddressBookService', 'SettingsService', function(scope, AddressBookService, SettingsService) {
|
||||
var ctrl = this;
|
||||
|
||||
|
@ -49,24 +65,12 @@ app.directive('addressbooklist', function() {
|
|||
};
|
||||
});
|
||||
|
||||
app.controller('addressbookCtrl', function() {
|
||||
app.controller('contactCtrl', ['$route', function($route) {
|
||||
var ctrl = this;
|
||||
console.log(this);
|
||||
});
|
||||
app.directive('addressbook', function() {
|
||||
return {
|
||||
restrict: 'A', // has to be an attribute to work with core css
|
||||
scope: {},
|
||||
controller: 'addressbookCtrl',
|
||||
controllerAs: 'ctrl',
|
||||
bindToController: {
|
||||
addressBook: "=data"
|
||||
},
|
||||
templateUrl: OC.linkTo('contactsrework', 'templates/addressBook.html')
|
||||
|
||||
ctrl.openContact = function() {
|
||||
$route.updateParams({uid: ctrl.contact.uid()});
|
||||
};
|
||||
});
|
||||
app.controller('contactCtrl', [function() {
|
||||
var ctrl = this;
|
||||
|
||||
console.log("Contact: ",ctrl.contact);
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<a class="app-content-list-item-link" ng-href="#/{{ctrl.contact.uid()}}">
|
||||
<a class="app-content-list-item-link" ng-click="ctrl.openContact()">
|
||||
<div class="app-content-list-item-icon contact__icon" ng-style="{'background-color': (ctrl.contact.uid() | contactColor) }">{{ ctrl.contact.fullName() | firstCharacter }}</div>
|
||||
|
||||
<div class="app-content-list-item-star icon-star" data-starred="false"></div>
|
||||
|
|
Loading…
Reference in New Issue