Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2748)

Unified Diff: appengine/monorail/static/js/framework/framework-accountmenu.js

Issue 1868553004: Open Source Monorail (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Rebase Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: appengine/monorail/static/js/framework/framework-accountmenu.js
diff --git a/appengine/monorail/static/js/framework/framework-accountmenu.js b/appengine/monorail/static/js/framework/framework-accountmenu.js
new file mode 100644
index 0000000000000000000000000000000000000000..b66058b1a317df310a804b9def383eedec477066
--- /dev/null
+++ b/appengine/monorail/static/js/framework/framework-accountmenu.js
@@ -0,0 +1,30 @@
+/* Copyright 2016 The Chromium Authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style
+ * license that can be found in the LICENSE file or at
+ * https://developers.google.com/open-source/licenses/bsd
+ */
+
+/**
+ * @fileoverview This file initializes the drop down menu attached
+ * to the signed in user's email address. It utilizes the menu
+ * widget defined in framework-menu.js.
+ */
+
+/** @type {Menu} */
+var accountMenu;
+
+(function() {
+ var target = document.getElementById('account-menu');
+
+ if (!target) {
+ return;
+ }
+
+ accountMenu = new Menu(target, function() {});
+ accountMenu.addItem('Switch accounts', CS_env.login_url);
+ accountMenu.addEvent(window, 'load', function() {
+ document.body.appendChild(accountMenu.menu);
+ });
+})();
+
« no previous file with comments | « appengine/monorail/static/js/framework/externs.js ('k') | appengine/monorail/static/js/framework/framework-ajax.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698