1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

update script loading

This commit is contained in:
Luke Pulverenti 2015-12-03 22:59:48 -05:00
parent 31b3061157
commit 22f689e089
65 changed files with 732 additions and 6138 deletions

View file

@ -9,6 +9,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
-->
<link rel="import" href="../polymer/polymer.html">
<link rel="import" href="../iron-behaviors/iron-control-state.html">
<link rel="import" href="../iron-a11y-keys-behavior/iron-a11y-keys-behavior.html">
<script>
@ -32,7 +33,8 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
*/
/**
* The label for this input. Bind this to `<paper-input-container>`'s `label` property.
* The label for this input. Bind this to `<label>`'s content and `hidden` property, e.g.
* `<label hidden$="[[!label]]">[[label]]</label>` in your `template`
*/
label: {
type: String
@ -287,21 +289,21 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
},
/**
* Bind this to the `<input is="iron-input">`'s `results` property, , used with type=search.
* Bind this to the `<input is="iron-input">`'s `results` property, used with type=search.
*/
results: {
type: Number
},
/**
* Bind this to the `<input is="iron-input">`'s `accept` property, , used with type=file.
* Bind this to the `<input is="iron-input">`'s `accept` property, used with type=file.
*/
accept: {
type: String
},
/**
* Bind this to the `<input is="iron-input">`'s `multiple` property, , used with type=file.
* Bind this to the `<input is="iron-input">`'s `multiple` property, used with type=file.
*/
multiple: {
type: Boolean
@ -320,13 +322,22 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
},
listeners: {
'addon-attached': '_onAddonAttached'
'addon-attached': '_onAddonAttached',
'focus': '_onFocus'
},
observers: [
'_focusedControlStateChanged(focused)'
],
keyBindings: {
'shift+tab:keydown': '_onShiftTabDown'
},
hostAttributes: {
tabindex: 0
},
/**
* Returns a reference to the input element.
*/
@ -334,6 +345,13 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
return this.$.input;
},
/**
* Returns a reference to the focusable element.
*/
get _focusableElement() {
return this.inputElement;
},
attached: function() {
this._updateAriaLabelledBy();
},
@ -367,6 +385,29 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
return this.inputElement.validate();
},
/**
* Forward focus to inputElement
*/
_onFocus: function() {
if (!this._shiftTabPressed) {
this._focusableElement.focus();
}
},
/**
* Handler that is called when a shift+tab keypress is detected by the menu.
*
* @param {CustomEvent} event A key combination event.
*/
_onShiftTabDown: function(event) {
var oldTabIndex = this.getAttribute('tabindex');
this._shiftTabPressed = true;
this.setAttribute('tabindex', '-1');
this.async(function() {
this.setAttribute('tabindex', oldTabIndex);
this._shiftTabPressed = false;
}, 1);
},
/**
* If `autoValidate` is true, then validates the element.
*/
@ -451,6 +492,10 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
};
/** @polymerBehavior */
Polymer.PaperInputBehavior = [Polymer.IronControlState, Polymer.PaperInputBehaviorImpl];
Polymer.PaperInputBehavior = [
Polymer.IronControlState,
Polymer.IronA11yKeysBehavior,
Polymer.PaperInputBehaviorImpl
];
</script>