Reset selection after adding a field

This commit is contained in:
Thomas Müller 2016-03-03 15:24:15 +01:00
parent b850611356
commit 30db794ac5
2 changed files with 19 additions and 17 deletions

View File

@ -59,6 +59,7 @@ app.controller('contactdetailsCtrl', ['ContactService', 'AddressBookService', 'v
var idx = ctrl.contact.addProperty(field, {value: defaultValue});
ctrl.singleProperties = ctrl.contact.getSingleProperties();
ctrl.focus = field;
$scope.field = '';
};
ctrl.deleteField = function (field, index) {

View File

@ -279,6 +279,7 @@ app.controller('contactdetailsCtrl', ['ContactService', 'AddressBookService', 'v
var idx = ctrl.contact.addProperty(field, {value: defaultValue});
ctrl.singleProperties = ctrl.contact.getSingleProperties();
ctrl.focus = field;
$scope.field = '';
};
ctrl.deleteField = function (field, index) {
@ -486,6 +487,23 @@ app.directive('detailsitem', ['$compile', function($compile) {
};
}]);
app.controller('groupCtrl', function() {
var ctrl = this;
});
app.directive('group', function() {
return {
restrict: 'A', // has to be an attribute to work with core css
scope: {},
controller: 'groupCtrl',
controllerAs: 'ctrl',
bindToController: {
group: "=data"
},
templateUrl: OC.linkTo('contacts', 'templates/group.html')
};
});
app.controller('grouplistCtrl', ['$scope', 'ContactService', '$routeParams', function($scope, ContactService, $routeParams) {
$scope.groups = [t('contacts', 'All contacts')];
@ -511,23 +529,6 @@ app.directive('grouplist', function() {
};
});
app.controller('groupCtrl', function() {
var ctrl = this;
});
app.directive('group', function() {
return {
restrict: 'A', // has to be an attribute to work with core css
scope: {},
controller: 'groupCtrl',
controllerAs: 'ctrl',
bindToController: {
group: "=data"
},
templateUrl: OC.linkTo('contacts', 'templates/group.html')
};
});
app.directive('telModel', function(){
return{
restrict: 'A',