mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update buttons
This commit is contained in:
parent
467ff3657f
commit
3a045a664b
33 changed files with 360 additions and 166 deletions
|
@ -4,6 +4,22 @@
|
|||
|
||||
var inputId = 0;
|
||||
|
||||
if (Object.getOwnPropertyDescriptor && Object.defineProperty) {
|
||||
|
||||
var descriptor = Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, 'value');
|
||||
|
||||
var baseSetMethod = descriptor.set;
|
||||
descriptor.set = function (value) {
|
||||
baseSetMethod.call(this, value);
|
||||
this.dispatchEvent(new CustomEvent('valueset', {
|
||||
bubbles: false,
|
||||
cancelable: false
|
||||
}));
|
||||
}
|
||||
|
||||
Object.defineProperty(HTMLInputElement.prototype, 'value', descriptor);
|
||||
}
|
||||
|
||||
EmbyInputPrototype.createdCallback = function () {
|
||||
|
||||
if (!this.id) {
|
||||
|
@ -45,11 +61,13 @@
|
|||
label.classList.add('focused');
|
||||
});
|
||||
this.addEventListener('blur', function () {
|
||||
onChange.call(this);
|
||||
label.classList.remove('focused');
|
||||
});
|
||||
|
||||
this.addEventListener('change', onChange);
|
||||
this.addEventListener('input', onChange);
|
||||
this.addEventListener('valueset', onChange);
|
||||
|
||||
onChange.call(this);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue