From fc02f97d78d01e8874a7c56021c45b2a296e73d7 Mon Sep 17 00:00:00 2001 From: yflory Date: Fri, 17 Nov 2017 18:20:45 +0100 Subject: [PATCH] Use less2 classes in the user menu --- www/common/common-ui-elements.js | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/www/common/common-ui-elements.js b/www/common/common-ui-elements.js index 0ac34650a..729b1c129 100644 --- a/www/common/common-ui-elements.js +++ b/www/common/common-ui-elements.js @@ -579,19 +579,19 @@ define([ UIElements.createUserAdminMenu = function (Common, config) { var metadataMgr = Common.getMetadataMgr(); - var displayNameCls = config.displayNameCls || 'displayName'; + var displayNameCls = config.displayNameCls || 'cp-toolbar-user-name'; var $displayedName = $('', {'class': displayNameCls}); var accountName = metadataMgr.getPrivateData().accountName; var origin = metadataMgr.getPrivateData().origin; var padType = metadataMgr.getMetadata().type; - var $userName = $('', {'class': 'userDisplayName'}); + var $userName = $(''); var options = []; if (config.displayNameCls) { var $userAdminContent = $('

'); if (accountName) { - var $userAccount = $('', {'class': 'userAccount'}).append(Messages.user_accountName + ': '); + var $userAccount = $('').append(Messages.user_accountName + ': '); $userAdminContent.append($userAccount).append(Util.fixHTML(accountName)); $userAdminContent.append($('
')); } @@ -628,14 +628,14 @@ define([ if (accountName) { options.push({ tag: 'a', - attributes: {'class': 'profile'}, + attributes: {'class': 'cp-toolbar-menu-profile'}, content: Messages.profileButton }); } if (padType !== 'settings') { options.push({ tag: 'a', - attributes: {'class': 'settings'}, + attributes: {'class': 'cp-toolbar-menu-settings'}, content: Messages.settingsButton }); } @@ -643,18 +643,18 @@ define([ if (accountName) { options.push({ tag: 'a', - attributes: {'class': 'logout'}, + attributes: {'class': 'cp-toolbar-menu-logout'}, content: Messages.logoutButton }); } else { options.push({ tag: 'a', - attributes: {'class': 'login'}, + attributes: {'class': 'cp-toolbar-menu-login'}, content: Messages.login_login }); options.push({ tag: 'a', - attributes: {'class': 'register'}, + attributes: {'class': 'cp-toolbar-menu-register'}, content: Messages.login_register }); } @@ -722,31 +722,31 @@ define([ metadataMgr.onChange(updateButton); updateButton(); - $userAdmin.find('a.logout').click(function () { + $userAdmin.find('a.cp-toolbar-menu-logout').click(function () { Common.logout(function () { window.parent.location = origin+'/'; }); }); - $userAdmin.find('a.settings').click(function () { + $userAdmin.find('a.cp-toolbar-menu-settings').click(function () { if (padType) { window.open(origin+'/settings/'); } else { window.parent.location = origin+'/settings/'; } }); - $userAdmin.find('a.profile').click(function () { + $userAdmin.find('a.cp-toolbar-menu-profile').click(function () { if (padType) { window.open(origin+'/profile/'); } else { window.parent.location = origin+'/profile/'; } }); - $userAdmin.find('a.login').click(function () { + $userAdmin.find('a.cp-toolbar-menu-login').click(function () { Common.setLoginRedirect(function () { window.parent.location = origin+'/login/'; }); }); - $userAdmin.find('a.register').click(function () { + $userAdmin.find('a.cp-toolbar-menu-register').click(function () { Common.setLoginRedirect(function () { window.parent.location = origin+'/register/'; });