mirror of https://github.com/nextcloud/contacts
Update vcard library (downstream #539)
This commit is contained in:
parent
3bbb839937
commit
a2f49e13a9
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>contacts</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
</natures>
|
||||
</projectDescription>
|
|
@ -26,7 +26,7 @@
|
|||
"angular-uuid4": "0.3.1",
|
||||
"jquery-timepicker": "883bb2cd94",
|
||||
"ui-select": "angular-ui/ui-select#0.14.9",
|
||||
"vcard": "Heymdall/vcard#1eb59e9b4406a3253bbb9295a1da776d22cdfe3a"
|
||||
"vcard": "0.2.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
"angular-mocks": "1.5.8",
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
angular.module('contactsApp')
|
||||
.directive('groupModel', function() {
|
||||
return{
|
||||
restrict: 'A',
|
||||
require: 'ngModel',
|
||||
link: function(scope, element, attr, ngModel) {
|
||||
ngModel.$formatters.push(function(value) {
|
||||
if (value.trim().length === 0) {
|
||||
return [];
|
||||
}
|
||||
return value.split(',');
|
||||
});
|
||||
ngModel.$parsers.push(function(value) {
|
||||
return value.join(',');
|
||||
});
|
||||
}
|
||||
};
|
||||
});
|
|
@ -141,11 +141,13 @@ angular.module('contactsApp')
|
|||
} else {
|
||||
// getter
|
||||
var property = this.getProperty('categories');
|
||||
if(property && property.value.length > 0) {
|
||||
return property.value.split(',');
|
||||
} else {
|
||||
if(!property) {
|
||||
return [];
|
||||
}
|
||||
if (angular.isArray(property.value)) {
|
||||
return property.value;
|
||||
}
|
||||
return [property.value];
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -277,6 +279,9 @@ angular.module('contactsApp')
|
|||
var property = this.getProperty('categories');
|
||||
if(!property) {
|
||||
this.categories('');
|
||||
}
|
||||
} else {
|
||||
if (angular.isString(property.value)) {
|
||||
this.categories([property.value]);
|
||||
}
|
||||
};
|
||||
});
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<label ng-if="ctrl.availableOptions.length === 0" for="details-{{ctrl.name}}">{{ctrl.meta.readableName}}</label>
|
||||
<ui-select id="details-{{ctrl.name}}" multiple tagging tagging-label="{{ctrl.t.newGroup}}" ng-model="ctrl.data.value" group-model
|
||||
<ui-select id="details-{{ctrl.name}}" multiple tagging tagging-label="{{ctrl.t.newGroup}}" ng-model="ctrl.data.value"
|
||||
on-remove="ctrl.model.updateContact()" on-select="ctrl.model.updateContact()"
|
||||
theme="select2" focus-expression="$parent.$parent.ctrl.focus === ctrl.name">
|
||||
<ui-select-match placeholder="{{ctrl.meta.readableName}}">{{$item}}</ui-select-match>
|
||||
|
|
Loading…
Reference in New Issue