| 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);
|
| + });
|
| +})();
|
| +
|
|
|