summaryrefslogtreecommitdiffstats
path: root/extensions
diff options
context:
space:
mode:
authorByron Jones <bjones@mozilla.com>2013-08-19 08:15:38 +0200
committerByron Jones <bjones@mozilla.com>2013-08-19 08:15:38 +0200
commit6438739f319324e8c3bd752837716ffaef9dda82 (patch)
treebdc015a70e83b1a506b64157bad57c121c734d39 /extensions
parentddb819c3e46d3d84b692515f11ebd82199bee2f3 (diff)
downloadbugzilla-6438739f319324e8c3bd752837716ffaef9dda82.tar.gz
bugzilla-6438739f319324e8c3bd752837716ffaef9dda82.tar.xz
Bug 906574: user context menu throws javascript error on second invocation
Diffstat (limited to 'extensions')
-rw-r--r--extensions/BMO/web/js/edituser_menu.js11
1 files changed, 3 insertions, 8 deletions
diff --git a/extensions/BMO/web/js/edituser_menu.js b/extensions/BMO/web/js/edituser_menu.js
index a9baab536..d371d32a3 100644
--- a/extensions/BMO/web/js/edituser_menu.js
+++ b/extensions/BMO/web/js/edituser_menu.js
@@ -3,7 +3,6 @@ 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' }
@@ -17,17 +16,13 @@ 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(2).cfg.setProperty('url', 'mailto:' + encodeURIComponent(email));
+ usermenu_widget.getItem(1).cfg.setProperty('url', 'mailto:' + encodeURIComponent(email));
if (show_edit) {
- usermenu_widget.getItem(3).cfg.setProperty('url', 'editusers.cgi?action=edit&userid=' + id);
+ usermenu_widget.getItem(2).cfg.setProperty('url', 'editusers.cgi?action=edit&userid=' + id);
} else {
- usermenu_widget.removeItem(3);
+ usermenu_widget.removeItem(2);
}
- // hide user-profile menu for now
- usermenu_widget.removeItem(0);
usermenu_widget.cfg.setProperty('xy', YAHOO.util.Event.getXY(event));
usermenu_widget.show();
return false;