mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update guide
This commit is contained in:
parent
7fbb1924d0
commit
9bbb9ecfb9
17 changed files with 291 additions and 56 deletions
|
@ -12,6 +12,10 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
<link rel="import" href="../iron-meta/iron-meta.html">
|
||||
|
||||
<script>
|
||||
/**
|
||||
* Singleton IronMeta instance.
|
||||
*/
|
||||
Polymer.IronValidatableBehaviorMeta = null;
|
||||
|
||||
/**
|
||||
* `Use Polymer.IronValidatableBehavior` to implement an element that validates user input.
|
||||
|
@ -41,14 +45,6 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
|
||||
properties: {
|
||||
|
||||
/**
|
||||
* Namespace for this validator.
|
||||
*/
|
||||
validatorType: {
|
||||
type: String,
|
||||
value: 'validator'
|
||||
},
|
||||
|
||||
/**
|
||||
* Name of the validator to use.
|
||||
*/
|
||||
|
@ -66,22 +62,35 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
value: false
|
||||
},
|
||||
|
||||
/**
|
||||
* This property is deprecated and should not be used. Use the global
|
||||
* validator meta singleton, `Polymer.IronValidatableBehaviorMeta` instead.
|
||||
*/
|
||||
_validatorMeta: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Namespace for this validator. This property is deprecated and should
|
||||
* not be used. For all intents and purposes, please consider it a
|
||||
* read-only, config-time property.
|
||||
*/
|
||||
validatorType: {
|
||||
type: String,
|
||||
value: 'validator'
|
||||
},
|
||||
|
||||
_validator: {
|
||||
computed: '__computeValidator(validator)'
|
||||
}
|
||||
},
|
||||
|
||||
observers: [
|
||||
'_invalidChanged(invalid)'
|
||||
],
|
||||
|
||||
get _validator() {
|
||||
return this._validatorMeta && this._validatorMeta.byKey(this.validator);
|
||||
},
|
||||
|
||||
ready: function() {
|
||||
this._validatorMeta = new Polymer.IronMeta({type: this.validatorType});
|
||||
registered: function() {
|
||||
Polymer.IronValidatableBehaviorMeta = new Polymer.IronMeta({type: 'validator'});
|
||||
},
|
||||
|
||||
_invalidChanged: function() {
|
||||
|
@ -128,6 +137,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
return this._validator.validate(value);
|
||||
}
|
||||
return true;
|
||||
},
|
||||
|
||||
__computeValidator: function() {
|
||||
return Polymer.IronValidatableBehaviorMeta &&
|
||||
Polymer.IronValidatableBehaviorMeta.byKey(this.validator);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue