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

update buttons

This commit is contained in:
Luke Pulverenti 2016-06-04 20:17:35 -04:00
parent 467ff3657f
commit 3a045a664b
33 changed files with 360 additions and 166 deletions

View file

@ -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);
};