From 6a4ef02c413767330333298f3c5e434c7772a39a Mon Sep 17 00:00:00 2001 From: ansuz Date: Wed, 18 Aug 2021 08:13:06 +0530 Subject: [PATCH] remove some dead toolbar code --- www/common/toolbar.js | 24 ------------------------ www/file/inner.js | 1 - 2 files changed, 25 deletions(-) diff --git a/www/common/toolbar.js b/www/common/toolbar.js index 47c0b578e..8bd0fcc32 100644 --- a/www/common/toolbar.js +++ b/www/common/toolbar.js @@ -53,7 +53,6 @@ MessengerUI, Messages, Pages) { var USERADMIN_CLS = Bar.constants.user = 'cp-toolbar-user-dropdown'; var USERNAME_CLS = Bar.constants.username = 'cp-toolbar-user-name'; /*var READONLY_CLS = */Bar.constants.readonly = 'cp-toolbar-readonly'; - var USERBUTTON_CLS = Bar.constants.changeUsername = "cp-toolbar-user-rename"; // Create the toolbar element @@ -1029,36 +1028,13 @@ MessengerUI, Messages, Pages) { var userMenuCfg = { $initBlock: $userAdmin, }; - if (!config.hideDisplayName) { - $.extend(true, userMenuCfg, { - displayNameCls: USERNAME_CLS, - changeNameButtonCls: USERBUTTON_CLS, - }); - } if (config.readOnly !== 1) { userMenuCfg.displayName = 1; userMenuCfg.displayChangeName = 1; } - /*if (config.displayed.indexOf('userlist') !== -1) { - userMenuCfg.displayChangeName = 0; - }*/ Common.createUserAdminMenu(userMenuCfg); $userAdmin.find('> button').attr('title', Messages.userAccountButton); - var $userButton = toolbar.$userNameButton = $userAdmin.find('a.' + USERBUTTON_CLS); - $userButton.click(function (e) { - e.preventDefault(); - e.stopPropagation(); - var myData = metadataMgr.getUserData(); - var lastName = myData.name; - UI.prompt(Messages.changeNamePrompt, lastName || '', function (newName) { - if (newName === null && typeof(lastName) === "string") { return; } - if (newName === null) { newName = ''; } - else { Feedback.send('NAME_CHANGED'); } - setDisplayName(newName); - }); - }); - return $userAdmin; }; diff --git a/www/file/inner.js b/www/file/inner.js index d69420f7b..2be2759db 100644 --- a/www/file/inner.js +++ b/www/file/inner.js @@ -62,7 +62,6 @@ define([ } var configTb = { displayed: displayed, - //hideDisplayName: true, $container: $bar, metadataMgr: metadataMgr, sfCommon: common,