minify
This commit is contained in:
parent
82bcca376f
commit
8a6884abef
494 changed files with 256 additions and 120180 deletions
|
@ -1,48 +1 @@
|
|||
define(['css!./emby-radio', 'registerElement'], function () {
|
||||
'use strict';
|
||||
|
||||
var EmbyRadioPrototype = Object.create(HTMLInputElement.prototype);
|
||||
|
||||
function onKeyDown(e) {
|
||||
|
||||
// Don't submit form on enter
|
||||
if (e.keyCode === 13) {
|
||||
e.preventDefault();
|
||||
|
||||
this.checked = true;
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
EmbyRadioPrototype.attachedCallback = function () {
|
||||
|
||||
if (this.getAttribute('data-radio') === 'true') {
|
||||
return;
|
||||
}
|
||||
|
||||
this.setAttribute('data-radio', 'true');
|
||||
|
||||
this.classList.add('mdl-radio__button');
|
||||
|
||||
var labelElement = this.parentNode;
|
||||
//labelElement.classList.add('"mdl-radio mdl-js-radio mdl-js-ripple-effect');
|
||||
labelElement.classList.add('mdl-radio');
|
||||
labelElement.classList.add('mdl-js-radio');
|
||||
labelElement.classList.add('mdl-js-ripple-effect');
|
||||
|
||||
var labelTextElement = labelElement.querySelector('span');
|
||||
|
||||
labelTextElement.classList.add('radioButtonLabel');
|
||||
labelTextElement.classList.add('mdl-radio__label');
|
||||
|
||||
labelElement.insertAdjacentHTML('beforeend', '<span class="mdl-radio__outer-circle"></span><span class="mdl-radio__inner-circle"></span>');
|
||||
|
||||
this.addEventListener('keydown', onKeyDown);
|
||||
};
|
||||
|
||||
document.registerElement('emby-radio', {
|
||||
prototype: EmbyRadioPrototype,
|
||||
extends: 'input'
|
||||
});
|
||||
});
|
||||
define(["css!./emby-radio","registerElement"],function(){"use strict";function onKeyDown(e){if(13===e.keyCode)return e.preventDefault(),this.checked=!0,!1}var EmbyRadioPrototype=Object.create(HTMLInputElement.prototype);EmbyRadioPrototype.attachedCallback=function(){if("true"!==this.getAttribute("data-radio")){this.setAttribute("data-radio","true"),this.classList.add("mdl-radio__button");var labelElement=this.parentNode;labelElement.classList.add("mdl-radio"),labelElement.classList.add("mdl-js-radio"),labelElement.classList.add("mdl-js-ripple-effect");var labelTextElement=labelElement.querySelector("span");labelTextElement.classList.add("radioButtonLabel"),labelTextElement.classList.add("mdl-radio__label"),labelElement.insertAdjacentHTML("beforeend",'<span class="mdl-radio__outer-circle"></span><span class="mdl-radio__inner-circle"></span>'),this.addEventListener("keydown",onKeyDown)}},document.registerElement("emby-radio",{prototype:EmbyRadioPrototype,extends:"input"})});
|
Loading…
Add table
Add a link
Reference in a new issue