diff options
author | Bjoern Schiessle <bjoern@schiessle.org> | 2016-11-16 12:35:07 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2016-11-21 11:29:58 +0100 |
commit | f489fd99c352be3dfa65c1955573e44c13732e30 (patch) | |
tree | 70a1ea1acf7d24d0066ce859b0ffdcc77112b33d /settings/js | |
parent | 3f8bfbdb110a7010038f995d31d6d5132a543112 (diff) | |
download | nextcloud-server-f489fd99c352be3dfa65c1955573e44c13732e30.tar.gz nextcloud-server-f489fd99c352be3dfa65c1955573e44c13732e30.zip |
change scope to 'local' for display name and avatar
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
Diffstat (limited to 'settings/js')
-rw-r--r-- | settings/js/federationscopemenu.js | 45 | ||||
-rw-r--r-- | settings/js/federationsettingsview.js | 2 |
2 files changed, 28 insertions, 19 deletions
diff --git a/settings/js/federationscopemenu.js b/settings/js/federationscopemenu.js index 6eb9afb54e0..45937911f09 100644 --- a/settings/js/federationscopemenu.js +++ b/settings/js/federationscopemenu.js @@ -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 diff --git a/settings/js/federationsettingsview.js b/settings/js/federationsettingsview.js index 6d9c407b2da..1054f13acff 100644 --- a/settings/js/federationsettingsview.js +++ b/settings/js/federationsettingsview.js @@ -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); |