summaryrefslogtreecommitdiffstats
path: root/extensions/BMO/web/js/edituser_menu.js
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/BMO/web/js/edituser_menu.js')
-rw-r--r--extensions/BMO/web/js/edituser_menu.js26
1 files changed, 26 insertions, 0 deletions
diff --git a/extensions/BMO/web/js/edituser_menu.js b/extensions/BMO/web/js/edituser_menu.js
new file mode 100644
index 000000000..9ce78d9ce
--- /dev/null
+++ b/extensions/BMO/web/js/edituser_menu.js
@@ -0,0 +1,26 @@
+var admin_usermenu;
+
+YAHOO.util.Event.onDOMReady(function() {
+ admin_usermenu = new YAHOO.widget.Menu('admin_usermenu', { position : 'dynamic' });
+ admin_usermenu.addItems([
+ { text: 'Edit', url: '#', target: '_new' },
+ { text: 'Activity', url: '#', target: '_new' },
+ { text: 'Mail', url: '#', target: '_new' }
+ ]);
+ admin_usermenu.render(document.body);
+});
+
+function show_admin_username(event, id, email) {
+ if (!admin_usermenu)
+ return;
+ admin_usermenu.getItem(0).cfg.setProperty('url', 'editusers.cgi?action=edit&userid=' + id);
+ admin_usermenu.getItem(1).cfg.setProperty('url',
+ 'page.cgi?id=user_activity.html&action=run' +
+ '&from=' + YAHOO.util.Date.format(new Date(new Date() - (1000 * 60 * 60 * 24 * 14)), {format: '%Y-%m-%d'}) +
+ '&to=' + YAHOO.util.Date.format(new Date(), {format: '%Y-%m-%d'}) +
+ '&who=' + escape(email));
+ admin_usermenu.getItem(2).cfg.setProperty('url', 'mailto:' + escape(email));
+ admin_usermenu.cfg.setProperty('xy', YAHOO.util.Event.getXY(event));
+ admin_usermenu.show();
+}
+