change scope to 'local' for display name and avatar

Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
This commit is contained in:
Bjoern Schiessle 2016-11-16 12:35:07 +01:00 committed by Roeland Jago Douma
parent 3f8bfbdb11
commit f489fd99c3
No known key found for this signature in database
GPG Key ID: F941078878347C0C
2 changed files with 28 additions and 19 deletions

View File

@ -16,7 +16,7 @@
'<ul>' +
'{{#each items}}' +
'<li>' +
'<a href="#" class="menuitem action action-{{name}} permanent" data-action="{{name}}">' +
'<a href="#" class="menuitem action action-{{name}} permanent" data-action="{{name}}" title="{{tooltip}}">' +
'{{#if icon}}<img class="icon" src="{{icon}}"/>' +
'{{else}}'+
'{{#if iconClass}}' +
@ -38,23 +38,32 @@
var FederationScopeMenu = OC.Backbone.View.extend({
tagName: 'div',
className: 'federationScopeMenu popovermenu bubble hidden open menu',
_scopes: [
{
name: 'private',
displayName: t('core', 'Private'),
icon: OC.imagePath('core', 'actions/password')
},
{
name: 'contacts',
displayName: t('core', 'Contacts'),
icon: OC.imagePath('core', 'places/contacts-dark')
},
{
name: 'public',
displayName: t('core', 'Public'),
icon: OC.imagePath('core', 'places/link')
}
],
field: undefined,
_scopes: undefined,
initialize: function(options) {
this.field = options.field;
this._scopes = [
{
name: 'private',
displayName: (this.field == 'avatar' || this.field == 'displayname') ? t('core', 'Local') : t('core', 'Private'),
tooltip: (this.field == 'avatar' || this.field == 'displayname') ? t('core', 'Only visible to local users') : t('core', 'Only visible to you'),
icon: OC.imagePath('core', 'actions/password')
},
{
name: 'contacts',
displayName: t('core', 'Contacts'),
tooltip: t('core', 'Visible to local users and to trusted servers'),
icon: OC.imagePath('core', 'places/contacts-dark')
},
{
name: 'public',
displayName: t('core', 'Public'),
tooltip: t('core', 'Will be synced to a global and public address book'),
icon: OC.imagePath('core', 'places/link')
}
];
},
/**
* Current context

View File

@ -64,7 +64,7 @@
_.each(this._inputFields, function(field) {
var $heading = self.$('#' + field + 'form h2');
var $icon = self.$('#' + field + 'form h2 > span');
var scopeMenu = new OC.Settings.FederationScopeMenu();
var scopeMenu = new OC.Settings.FederationScopeMenu({field: field});
self.listenTo(scopeMenu, 'select:scope', function(scope) {
self._onScopeChanged(field, scope);