summaryrefslogtreecommitdiffstats
path: root/extensions/BMO
diff options
context:
space:
mode:
authorByron Jones <glob@mozilla.com>2015-03-24 06:45:44 +0100
committerByron Jones <glob@mozilla.com>2015-03-24 06:45:44 +0100
commit3ac701266452d3509776fe58f9e1b2b8e9f33c1e (patch)
tree88124baaadb529b1c9809f6b3fa20384c1870780 /extensions/BMO
parent11bd061970f8b9c98e6af43a4c8c7ca4bfff9eb3 (diff)
downloadbugzilla-3ac701266452d3509776fe58f9e1b2b8e9f33c1e.tar.gz
bugzilla-3ac701266452d3509776fe58f9e1b2b8e9f33c1e.tar.xz
Bug 1096798: prototype modal show_bug view
Diffstat (limited to 'extensions/BMO')
-rw-r--r--extensions/BMO/web/js/edituser_menu.js75
1 files changed, 37 insertions, 38 deletions
diff --git a/extensions/BMO/web/js/edituser_menu.js b/extensions/BMO/web/js/edituser_menu.js
index 85d933220..707e35b6e 100644
--- a/extensions/BMO/web/js/edituser_menu.js
+++ b/extensions/BMO/web/js/edituser_menu.js
@@ -6,43 +6,42 @@
* defined by the Mozilla Public License, v. 2.0. */
function show_usermenu(id, email, show_edit) {
- var items = {
- profile: {
- name: "Profile",
- callback: function () {
- var href = "user_profile?login=" + encodeURIComponent(email);
- window.open(href, "_blank");
- }
- },
- activity: {
- name: "Activity",
- callback: function () {
- var href = "page.cgi?id=user_activity.html&action=run&from=-14d&who="
- + encodeURIComponent(email);
- window.open(href, "_blank");
- }
- },
- mail: {
- name: "Mail",
- callback: function () {
- var href = "mailto:" + encodeURIComponent(email);
- window.open(href, "_blank");
- }
- },
- };
- if (show_edit) {
- items.edit = {
- name: "Edit",
- callback: function () {
- var href = "editusers.cgi?action=edit&userid=" + id;
- window.open(href, "_blank");
- }
- };
- }
- $.contextMenu({
- selector: ".vcard_" + id,
- trigger: "left",
- items: items
- });
+ var items = [
+ {
+ name: "Profile",
+ callback: function () {
+ var href = "user_profile?login=" + encodeURIComponent(email);
+ window.open(href, "_blank");
+ }
+ },
+ {
+ name: "Activity",
+ callback: function () {
+ var href = "page.cgi?id=user_activity.html&action=run&from=-14d&who=" + encodeURIComponent(email);
+ window.open(href, "_blank");
+ }
+ },
+ {
+ name: "Mail",
+ callback: function () {
+ var href = "mailto:" + encodeURIComponent(email);
+ window.open(href, "_blank");
+ }
+ }
+ ];
+ if (show_edit) {
+ items.push({
+ name: "Edit",
+ callback: function () {
+ var href = "editusers.cgi?action=edit&userid=" + id;
+ window.open(href, "_blank");
+ }
+ });
+ }
+ $.contextMenu({
+ selector: ".vcard_" + id,
+ trigger: "left",
+ items: items
+ });
}