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

update program images

This commit is contained in:
Luke Pulverenti 2016-09-17 01:47:49 -04:00
parent 3a46bfe164
commit a9ae08f60c
18 changed files with 61 additions and 16815 deletions

View file

@ -14,12 +14,12 @@
},
"devDependencies": {},
"ignore": [],
"version": "1.4.250",
"_release": "1.4.250",
"version": "1.4.252",
"_release": "1.4.252",
"_resolution": {
"type": "version",
"tag": "1.4.250",
"commit": "64a7a8d4d23fff00807f047f1019e27886b2a928"
"tag": "1.4.252",
"commit": "05ef5c9690e73f86f9adc9177c1d1565daa04745"
},
"_source": "https://github.com/MediaBrowser/emby-webcomponents.git",
"_target": "^1.2.1",

View file

@ -0,0 +1,49 @@
define(['css!./emby-toggle', 'registerElement'], function () {
var EmbyTogglePrototype = Object.create(HTMLInputElement.prototype);
function onKeyDown(e) {
// Don't submit form on enter
if (e.keyCode == 13) {
e.preventDefault();
this.checked = !this.checked;
this.dispatchEvent(new CustomEvent('change', {
bubbles: true
}));
return false;
}
}
EmbyTogglePrototype.attachedCallback = function () {
if (this.getAttribute('data-embytoggle') == 'true') {
return;
}
this.setAttribute('data-embytoggle', 'true');
this.classList.add('mdl-switch__input');
var labelElement = this.parentNode;
labelElement.classList.add('mdl-switch');
labelElement.classList.add('mdl-js-switch');
var labelTextElement = labelElement.querySelector('span');
labelElement.insertAdjacentHTML('beforeend', '<div class="mdl-switch__track"></div><div class="mdl-switch__thumb"><span class="mdl-switch__focus-helper"></span></div>');
labelTextElement.classList.add('toggleButtonLabel');
labelTextElement.classList.add('mdl-switch__label');
this.addEventListener('keydown', onKeyDown);
};
document.registerElement('emby-toggle', {
prototype: EmbyTogglePrototype,
extends: 'input'
});
});