Merge pull request #68 from owncloud/add-default-value-to-fields-select

Adding default value to field select to let user know what to do: "Ad…
This commit is contained in:
Thomas Müller 2016-03-01 14:58:49 +01:00
commit bb51339a11
3 changed files with 5 additions and 2 deletions

View File

@ -4,7 +4,8 @@ app.controller('contactdetailsCtrl', ['ContactService', 'AddressBookService', 'v
ctrl.uid = $routeParams.uid;
ctrl.t = {
noContacts : t('contacts', 'No contacts in here'),
placeholderName : t('contacts', 'Name')
placeholderName : t('contacts', 'Name'),
selectField : t('contacts', 'Add field ...')
};
ctrl.fieldDefinitions = vCardPropertiesService.fieldDefinitions;

View File

@ -198,7 +198,8 @@ app.controller('contactdetailsCtrl', ['ContactService', 'AddressBookService', 'v
ctrl.uid = $routeParams.uid;
ctrl.t = {
noContacts : t('contacts', 'No contacts in here'),
placeholderName : t('contacts', 'Name')
placeholderName : t('contacts', 'Name'),
selectField : t('contacts', 'Add field ...')
};
ctrl.fieldDefinitions = vCardPropertiesService.fieldDefinitions;

View File

@ -19,6 +19,7 @@
</select>
</div>
<select ng-model="field" ng-change="ctrl.addField(field)">
<option value=''>{{ctrl.t.selectField}}</option>
<option ng-repeat="field in ctrl.fieldDefinitions" value="{{field.id}}">{{field.name}}</option>
</select>
</section>