Skip to content

Commit

Permalink
change scope to 'local' for display name and avatar
Browse files Browse the repository at this point in the history
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
  • Loading branch information
schiessle authored and rullzer committed Nov 21, 2016
1 parent 3f8bfbd commit f489fd9
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 19 deletions.
45 changes: 27 additions & 18 deletions settings/js/federationscopemenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}}' +
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion settings/js/federationsettingsview.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit f489fd9

Please sign in to comment.