summaryrefslogtreecommitdiffstats
path: root/extensions/BMO/web
diff options
context:
space:
mode:
authorByron Jones <bjones@mozilla.com>2013-08-26 15:29:45 +0200
committerByron Jones <bjones@mozilla.com>2013-08-26 15:29:45 +0200
commit7f07f9e6ef4a6b7b8778f3de38ebf1bafc1ba4a6 (patch)
treef2ee7b6773435aa10e76b747d699d458fabe5c11 /extensions/BMO/web
parent147cb58fce0a20f9f398362defc02241940e4e56 (diff)
downloadbugzilla-7f07f9e6ef4a6b7b8778f3de38ebf1bafc1ba4a6.tar.gz
bugzilla-7f07f9e6ef4a6b7b8778f3de38ebf1bafc1ba4a6.tar.xz
Bug 859550: Add 'Profile' back to user context menu
Diffstat (limited to 'extensions/BMO/web')
-rw-r--r--extensions/BMO/web/js/edituser_menu.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/extensions/BMO/web/js/edituser_menu.js b/extensions/BMO/web/js/edituser_menu.js
index d371d32a3..383418430 100644
--- a/extensions/BMO/web/js/edituser_menu.js
+++ b/extensions/BMO/web/js/edituser_menu.js
@@ -3,6 +3,7 @@ var usermenu_widget;
YAHOO.util.Event.onDOMReady(function() {
usermenu_widget = new YAHOO.widget.Menu('usermenu_widget', { position : 'dynamic' });
usermenu_widget.addItems([
+ { text: 'Profile', url: '#', target: '_blank' },
{ text: 'Activity', url: '#', target: '_blank' },
{ text: 'Mail', url: '#', target: '_blank' },
{ text: 'Edit', url: '#', target: '_blank' }
@@ -16,12 +17,14 @@ function show_usermenu(event, id, email, show_edit) {
if (event.ctrlKey || event.shiftKey || event.altKey || event.metaKey)
return true;
usermenu_widget.getItem(0).cfg.setProperty('url',
+ 'user_profile?login=' + encodeURIComponent(email));
+ usermenu_widget.getItem(1).cfg.setProperty('url',
'page.cgi?id=user_activity.html&action=run&from=-14d&who=' + encodeURIComponent(email));
- usermenu_widget.getItem(1).cfg.setProperty('url', 'mailto:' + encodeURIComponent(email));
+ usermenu_widget.getItem(2).cfg.setProperty('url', 'mailto:' + encodeURIComponent(email));
if (show_edit) {
- usermenu_widget.getItem(2).cfg.setProperty('url', 'editusers.cgi?action=edit&userid=' + id);
+ usermenu_widget.getItem(3).cfg.setProperty('url', 'editusers.cgi?action=edit&userid=' + id);
} else {
- usermenu_widget.removeItem(2);
+ usermenu_widget.removeItem(3);
}
usermenu_widget.cfg.setProperty('xy', YAHOO.util.Event.getXY(event));
usermenu_widget.show();