paper-elements

Polymer Paper-Radio-Group - how to have multiple radio buttons with the same name

不想你离开。 提交于 2019-12-10 14:36:52
问题 I'm using Paper Elements from the Polymer Project to build a form, and have run into a problem using the paper-radio-group tag and its children, paper-radio-button . With a normal radio button list, I would do the following: <input type="radio" name="myFieldName" value="MyFirstOption" /> <input type="radio" name="myFieldName" value="MySecondOption" /> <input type="radio" name="myFieldName" value="MyThirdOption" /> Note that the name attributes are the same, grouping the radio buttons and

polymer paper-menu-button change the default size of icon

眉间皱痕 提交于 2019-12-10 12:15:01
问题 Is there way to set the size of polymer paper-menu-button element. I think it is the icon size is set to 24px. I wish to have it as 20px but I cannot find a way to do it. Thanks Dennis 回答1: I tried it and it worked. Add this style to the Polymer element containing your <paper-menu-button> element. paper-menu-button /deep/ core-icon[role=img] { height: 20px; width: 20px; } I added [role=img] to increase the selectivity. 来源: https://stackoverflow.com/questions/25352296/polymer-paper-menu-button

Prevent paper-dialog from automatically closing

拈花ヽ惹草 提交于 2019-12-10 11:07:28
问题 Hello: I have a paper-dialog element in a page: <paper-dialog ... id="autom_desc_dialog" autoCloseDisabled> ... <paper-button ... id="automatizar" affirmative autofocus disabled></paper-button> </paper-dialog> and I have an event listener that handles the paper-button click: var auto_btn = querySelector('#automatizar'); auto_btn.on["click"].listen((Event e) { // Some AJAX stuff }); What I want is that in some cases, to be able to prevent the dialog from closing, I've tried event

Tap listener for polymer iron-list item?

╄→гoц情女王★ 提交于 2019-12-10 10:57:32
问题 I have a custom element that utilizes iron-list to display an array of objects. Each item is generated via a template as follows: <iron-list id="projectList" items="[[projects]]" indexAs="_id" as="projLI" class="layout flex"> <template> <div> <paper-material id="itemShadow" animated elevation="1"> <div class="item layout horizontal" onmouseover="hoverOver(this)" onmouseout="hoverOut(this)"> <!-- I use a paper-menu-button to display a list of available actions here --> <!-- list item object

Polymer 1.0 paper-submenu(s) inside paper-menu

耗尽温柔 提交于 2019-12-07 20:52:09
问题 Then I select an item in my outer paper-menu and after that I navigate into my submenu and select an item there, the outer-item is still selected. also conversely: <paper-menu class="list" attr-for-selected="data-route" selected="[[route]]" selectable="a"> <a data-route="one" href="{{baseUrl}}"> <iron-icon icon="home"></iron-icon> <span>one</span> </a> <paper-submenu> <paper-item class="menu-trigger">two</paper-item> <paper-menu class="menu-content"> <a data-route="two-1" href="{{baseUrl}}two

paper-dialog in Polymer doesn't close in iPhone

假装没事ソ 提交于 2019-12-06 21:57:55
问题 I use this example from the doc of polymer <paper-dialog> <h2>Header</h2> <paper-dialog-scrollable> Lorem ipsum... </paper-dialog-scrollable> <div class="buttons"> <paper-button dialog-dismiss>Cancel</paper-button> <paper-button dialog-confirm>Accept</paper-button> </div> </paper-dialog> In every browser the dialog closes when I click on place that is not the dialog, But on iPhone IOS 8.4 it doesn't work. I can't close the dialog. How can I solve this problem? 回答1: I know there is a Z-index

Polymer 1.0 paper-submenu(s) inside paper-menu

不问归期 提交于 2019-12-06 13:35:46
Then I select an item in my outer paper-menu and after that I navigate into my submenu and select an item there, the outer-item is still selected. also conversely: <paper-menu class="list" attr-for-selected="data-route" selected="[[route]]" selectable="a"> <a data-route="one" href="{{baseUrl}}"> <iron-icon icon="home"></iron-icon> <span>one</span> </a> <paper-submenu> <paper-item class="menu-trigger">two</paper-item> <paper-menu class="menu-content"> <a data-route="two-1" href="{{baseUrl}}two-1"> <paper-item> <iron-icon icon="home"></iron-icon> <span>two 1</span> </paper-item> </a> <a data

Prevent paper-dialog from automatically closing

末鹿安然 提交于 2019-12-06 08:12:34
Hello: I have a paper-dialog element in a page: <paper-dialog ... id="autom_desc_dialog" autoCloseDisabled> ... <paper-button ... id="automatizar" affirmative autofocus disabled></paper-button> </paper-dialog> and I have an event listener that handles the paper-button click: var auto_btn = querySelector('#automatizar'); auto_btn.on["click"].listen((Event e) { // Some AJAX stuff }); What I want is that in some cases, to be able to prevent the dialog from closing, I've tried event.preventDefault() , event.stopImmediatePropagation() , event.stopPropagation() but no success. Thanks in advance. You

Tap listener for polymer iron-list item?

痴心易碎 提交于 2019-12-06 06:32:54
I have a custom element that utilizes iron-list to display an array of objects. Each item is generated via a template as follows: <iron-list id="projectList" items="[[projects]]" indexAs="_id" as="projLI" class="layout flex"> <template> <div> <paper-material id="itemShadow" animated elevation="1"> <div class="item layout horizontal" onmouseover="hoverOver(this)" onmouseout="hoverOut(this)"> <!-- I use a paper-menu-button to display a list of available actions here --> <!-- list item object content here such as: [[projLI.desc]] etc. --> </div> </paper-material> </div> </template> </iron-list>

Instance of Paper elements in dart

放肆的年华 提交于 2019-12-02 02:01:17
How can I get an instance to the paper-input element below? HTML file: <!DOCTYPE html> <html> <head> <!-- <script src='packages/web_components/platform.js'></script> not necessary anymore with Polymer >= 0.14.0 --> <script src='packages/web_components/dart_support.js'></script> <link rel='import' href='packages/paper_elements/paper_input.html'> <script src='packages/browser/dart.js'></script> </head> <body fullbleed unresolved> <paper-input id='subject' label='subject'></paper-input> <script type='application/dart' src='myscript.dart'></script> </body> </html> myscript.dart: import 'dart:html'