Browse Source

change scope to 'local' for display name and avatar

Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
tags/v11.0RC2
Bjoern Schiessle 7 years ago
parent
commit
f489fd99c3
No account linked to committer's email address
2 changed files with 28 additions and 19 deletions
  1. 27
    18
      settings/js/federationscopemenu.js
  2. 1
    1
      settings/js/federationsettingsview.js

+ 27
- 18
settings/js/federationscopemenu.js 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

+ 1
- 1
settings/js/federationsettingsview.js 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);

Loading…
Cancel
Save