| Index: third_party/polymer/components-chromium/core-menu-button/core-menu-button.html
|
| diff --git a/third_party/polymer/components-chromium/core-menu-button/core-menu-button.html b/third_party/polymer/components-chromium/core-menu-button/core-menu-button.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..bb7348fc03f070fd64c04adf69d886bee144c3dc
|
| --- /dev/null
|
| +++ b/third_party/polymer/components-chromium/core-menu-button/core-menu-button.html
|
| @@ -0,0 +1,76 @@
|
| +<!--
|
| +Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
|
| +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
| +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
| +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
| +Code distributed by Google as part of the polymer project is also
|
| +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
| +-->
|
| +<!--
|
| +/**
|
| + * @module Polymer Core Elements
|
| + */
|
| +/**
|
| + * core-menu-button is a core-icon-button with a drop down menu
|
| + * that allows the user to select an option. The drop down menu is styled with
|
| + * an arrow pointing to the button, and can be positioned to the top or the
|
| + * bottom of the button with the valign property. The valign property aligns
|
| + * the menu to the left or right edge of the button.
|
| + *
|
| + * Example:
|
| + *
|
| + * <core-menu-button selected="0">
|
| + * <core-item icon="settings" label="Settings"></core-item>
|
| + * <core-item icon="dialog" label="Dialog"></core-item>
|
| + * <core-item icon="search" label="Search"></core-item>
|
| + * </core-menu-button>
|
| + *
|
| + * @class core-menu-button
|
| + */
|
| +-->
|
| +<link href="../polymer/polymer.html" rel="import">
|
| +<link href="../core-icon-button/core-icon-button.html" rel="import">
|
| +<link href="../core-menu/core-menu.html" rel="import">
|
| +<link href="../core-overlay/core-overlay.html" rel="import">
|
| +
|
| +<polymer-element name="core-menu-button" attributes="icon label src selected opened halign valign valueattr multi inlineMenu" assetpath="">
|
| + <template>
|
| + <link rel="stylesheet" href="core-menu-button.css">
|
| + <core-overlay target="{{$.overlay}}" opened="{{opened}}" layered?="{{!inlineMenu}}"></core-overlay>
|
| + <core-icon-button id="button" on-tap="{{toggle}}" src="{{src}}" icon="{{icon}}" active="{{opened}}"><span>{{label}}</span></core-icon-button>
|
| + <div id="overlay" halign="{{halign}}" valign="{{valign}}">
|
| + <style>
|
| + #overlay {
|
| + position: absolute;
|
| + left: 0px;
|
| + top: 40px;
|
| + padding: 8px;
|
| + background: #fff;
|
| + border: 1px solid #ccc;
|
| + border-radius: 3px;
|
| + /* overlay styling must be complete */
|
| + font-size: 1rem;
|
| + }
|
| +
|
| + core-menu {
|
| + margin: 0;
|
| + }
|
| +
|
| + #overlay[halign=right] {
|
| + left: auto;
|
| + right: 0px;
|
| + }
|
| +
|
| + #overlay[valign=top] {
|
| + top: auto;
|
| + bottom: 40px;
|
| + }
|
| + </style>
|
| + <core-menu id="menu" selected="{{selected}}" selecteditem="{{selectedItem}}" selectedclass="{{selectedClass}}" valueattr="{{valueattr}}" multi="{{multi}}" on-core-select="{{closeAction}}">
|
| + <content select="*"></content>
|
| + </core-menu>
|
| + </div>
|
| + </template>
|
| +
|
| +</polymer-element>
|
| +<script src="core-menu-button-extracted.js"></script>
|
|
|