update detail screens
This commit is contained in:
parent
7b42686295
commit
f5323ff3c2
34 changed files with 682 additions and 658 deletions
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "paper-menu-button",
|
||||
"version": "1.0.2",
|
||||
"version": "1.0.3",
|
||||
"description": "",
|
||||
"authors": [
|
||||
"The Polymer Authors"
|
||||
|
@ -41,11 +41,11 @@
|
|||
"iron-image": "polymerelements/iron-image#^1.0.0",
|
||||
"iron-icon": "polymerelements/iron-icon#^1.0.0"
|
||||
},
|
||||
"_release": "1.0.2",
|
||||
"_release": "1.0.3",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v1.0.2",
|
||||
"commit": "cf8bdea832bfa7b4f413e021ecb328273d659b17"
|
||||
"tag": "v1.0.3",
|
||||
"commit": "24abacffd443f967125f5eae580eadc7b90f41c7"
|
||||
},
|
||||
"_source": "git://github.com/polymerelements/paper-menu-button.git",
|
||||
"_target": "^1.0.0",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "paper-menu-button",
|
||||
"version": "1.0.2",
|
||||
"version": "1.0.3",
|
||||
"description": "",
|
||||
"authors": [
|
||||
"The Polymer Authors"
|
||||
|
|
|
@ -85,7 +85,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
<div>
|
||||
<h4>Paper Menu with multi selection</h4>
|
||||
<div class="horizontal-section">
|
||||
<paper-menu-button ignore-activate>
|
||||
<paper-menu-button ignore-select>
|
||||
<paper-icon-button icon="menu" class="dropdown-trigger"></paper-icon-button>
|
||||
<paper-menu class="dropdown-content" multi>
|
||||
<template is="dom-repeat" items="[[letters]]" as="letter">
|
||||
|
|
|
@ -108,9 +108,10 @@ Custom property | Description | Default
|
|||
vertical-offset="[[verticalOffset]]"
|
||||
open-animation-config="[[openAnimationConfig]]"
|
||||
close-animation-config="[[closeAnimationConfig]]"
|
||||
no-animations="[[noAnimations]]">
|
||||
no-animations="[[noAnimations]]"
|
||||
focus-target="[[_dropdownContent]]">
|
||||
<paper-material class="dropdown-content">
|
||||
<content select=".dropdown-content"></content>
|
||||
<content id="content" select=".dropdown-content"></content>
|
||||
</paper-material>
|
||||
</iron-dropdown>
|
||||
</template>
|
||||
|
@ -147,7 +148,8 @@ Custom property | Description | Default
|
|||
opened: {
|
||||
type: Boolean,
|
||||
value: false,
|
||||
notify: true
|
||||
notify: true,
|
||||
observer: '_openedChanged'
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -205,7 +207,7 @@ Custom property | Description | Default
|
|||
* Set to true to disable automatically closing the dropdown after
|
||||
* a selection has been made.
|
||||
*/
|
||||
ignoreActivate: {
|
||||
ignoreSelect: {
|
||||
type: Boolean,
|
||||
value: false
|
||||
},
|
||||
|
@ -268,6 +270,14 @@ Custom property | Description | Default
|
|||
}
|
||||
}];
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* This is the element intended to be bound as the focus target
|
||||
* for the `iron-dropdown` contained by `paper-menu-button`.
|
||||
*/
|
||||
_dropdownContent: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -277,7 +287,14 @@ Custom property | Description | Default
|
|||
},
|
||||
|
||||
listeners: {
|
||||
'iron-activate': '_onIronActivate'
|
||||
'iron-select': '_onIronSelect'
|
||||
},
|
||||
|
||||
/**
|
||||
* The content element that is contained by the menu button, if any.
|
||||
*/
|
||||
get contentElement() {
|
||||
return Polymer.dom(this.$.content).getDistributedNodes()[0];
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -300,14 +317,14 @@ Custom property | Description | Default
|
|||
},
|
||||
|
||||
/**
|
||||
* When an `iron-activate` event is received, the dropdown should
|
||||
* When an `iron-select` event is received, the dropdown should
|
||||
* automatically close on the assumption that a value has been chosen.
|
||||
*
|
||||
* @param {CustomEvent} event A CustomEvent instance with type
|
||||
* set to `"iron-activate"`.
|
||||
* set to `"iron-select"`.
|
||||
*/
|
||||
_onIronActivate: function(event) {
|
||||
if (!this.ignoreActivate) {
|
||||
_onIronSelect: function(event) {
|
||||
if (!this.ignoreSelect) {
|
||||
this.close();
|
||||
}
|
||||
},
|
||||
|
@ -321,6 +338,12 @@ Custom property | Description | Default
|
|||
*/
|
||||
_openedChanged: function(opened, oldOpened) {
|
||||
if (opened) {
|
||||
// TODO(cdata): Update this when we can measure changes in distributed
|
||||
// children in an idiomatic way.
|
||||
// We poke this property in case the element has changed. This will
|
||||
// cause the focus target for the `iron-dropdown` to be updated as
|
||||
// necessary:
|
||||
this._dropdownContent = this.contentElement;
|
||||
this.fire('paper-dropdown-open');
|
||||
} else if (oldOpened != null) {
|
||||
this.fire('paper-dropdown-close');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue