2 lines
61 KiB
JavaScript
2 lines
61 KiB
JavaScript
|
function resizeBackground(){bg.height($(window).height()+60)}function MaterialButton(e){"use strict";this.element_=e,this.init()}function MaterialCheckbox(e){"use strict";this.element_=e,this.init()}function MaterialIconToggle(e){"use strict";this.element_=e,this.init()}function MaterialMenu(e){"use strict";this.element_=e,this.init()}function MaterialProgress(e){"use strict";this.element_=e,this.init()}function MaterialRadio(e){"use strict";this.element_=e,this.init()}function MaterialSlider(e){"use strict";this.element_=e,this.isIE_=window.navigator.msPointerEnabled,this.init()}function MaterialSpinner(e){"use strict";this.element_=e,this.init()}function MaterialSwitch(e){"use strict";this.element_=e,this.init()}function MaterialTabs(e){"use strict";this.element_=e,this.init()}function MaterialTab(e,t){"use strict";if(e){if(t.element_.classList.contains(t.CssClasses_.MDL_JS_RIPPLE_EFFECT)){var s=document.createElement("span");s.classList.add(t.CssClasses_.MDL_RIPPLE_CONTAINER),s.classList.add(t.CssClasses_.MDL_JS_RIPPLE_EFFECT);var i=document.createElement("span");i.classList.add(t.CssClasses_.MDL_RIPPLE),s.appendChild(i),e.appendChild(s)}e.addEventListener("click",function(s){s.preventDefault();var i=e.href.split("#")[1],n=t.element_.querySelector("#"+i);t.resetTabState_(),t.resetPanelState_(),e.classList.add(t.CssClasses_.ACTIVE_CLASS),n.classList.add(t.CssClasses_.ACTIVE_CLASS)})}}function MaterialTextfield(e){"use strict";this.element_=e,this.maxRows=this.Constant_.NO_MAX_ROWS,this.init()}function MaterialTooltip(e){"use strict";this.element_=e,this.init()}function MaterialLayout(e){"use strict";this.element_=e,this.init()}function MaterialLayoutTab(e,t,s,i){"use strict";if(e){if(i.tabBar_.classList.contains(i.CssClasses_.JS_RIPPLE_EFFECT)){var n=document.createElement("span");n.classList.add(i.CssClasses_.RIPPLE_CONTAINER),n.classList.add(i.CssClasses_.JS_RIPPLE_EFFECT);var a=document.createElement("span");a.classList.add(i.CssClasses_.RIPPLE),n.appendChild(a),e.appendChild(n)}e.addEventListener("click",function(n){n.preventDefault();var a=e.href.split("#")[1],l=i.content_.querySelector("#"+a);i.resetTabState_(t),i.resetPanelState_(s),e.classList.add(i.CssClasses_.IS_ACTIVE),l.classList.add(i.CssClasses_.IS_ACTIVE)})}}function MaterialDataTable(e){"use strict";this.element_=e,this.init()}function MaterialRipple(e){"use strict";this.element_=e,this.init()}var bg=$("#bg");$(window).resize(resizeBackground),resizeBackground(),!function(){"use strict";var e=function(e){this.element_=e,this.init()};window.MaterialSelectfield=e,e.prototype.Constant_={},e.prototype.CssClasses_={LABEL:"mdl-selectfield__label",SELECT:"mdl-selectfield__select",IS_DIRTY:"is-dirty",IS_FOCUSED:"is-focused",IS_DISABLED:"is-disabled",IS_INVALID:"is-invalid",IS_UPGRADED:"is-upgraded"},e.prototype.onFocus_=function(e){this.element_.classList.add(this.CssClasses_.IS_FOCUSED)},e.prototype.onBlur_=function(e){this.element_.classList.remove(this.CssClasses_.IS_FOCUSED)},e.prototype.onReset_=function(e){this.updateClasses_()},e.prototype.updateClasses_=function(){this.checkDisabled(),this.checkValidity(),this.checkDirty()},e.prototype.checkDisabled=function(){this.select_.disabled?this.element_.classList.add(this.CssClasses_.IS_DISABLED):this.element_.classList.remove(this.CssClasses_.IS_DISABLED)},e.prototype.checkDisabled=e.prototype.checkDisabled,e.prototype.checkValidity=function(){this.select_.validity.valid?this.element_.classList.remove(this.CssClasses_.IS_INVALID):this.element_.classList.add(this.CssClasses_.IS_INVALID)},e.prototype.checkValidity=e.prototype.checkValidity,e.prototype.checkDirty=function(){this.select_.value&&this.select_.value.length>0?this.element_.classList.add(this.CssClasses_.IS_DIRTY):this.element_.classList.remove(this.CssClasses_.IS_DIRTY)},e.prototype.checkDirty=e.prototype.checkDirty,e.prototype.disable=function(){this.select_.disabled=!0,this.updateClasses_()},e.prototype.disable=e.prototype.disable,e.prototype.enable=function(){this.select_.disabled=!1,this.updateClasses_()},e.prototype.enable=e.prototype.enable,e.p
|
||
|
componentHandler.register({constructor:MaterialRadio,classAsString:"MaterialRadio",cssClass:"mdl-js-radio",widget:!0}),MaterialSlider.prototype.Constant_={},MaterialSlider.prototype.CssClasses_={IE_CONTAINER:"mdl-slider__ie-container",SLIDER_CONTAINER:"mdl-slider__container",BACKGROUND_FLEX:"mdl-slider__background-flex",BACKGROUND_LOWER:"mdl-slider__background-lower",BACKGROUND_UPPER:"mdl-slider__background-upper",IS_LOWEST_VALUE:"is-lowest-value",IS_UPGRADED:"is-upgraded"},MaterialSlider.prototype.onInput_=function(e){"use strict";this.updateValueStyles_()},MaterialSlider.prototype.onChange_=function(e){"use strict";this.updateValueStyles_()},MaterialSlider.prototype.onMouseUp_=function(e){"use strict";e.target.blur()},MaterialSlider.prototype.onContainerMouseDown_=function(e){"use strict";if(e.target===this.element_.parentElement){e.preventDefault();var t=new MouseEvent("mousedown",{target:e.target,buttons:e.buttons,clientX:e.clientX,clientY:this.element_.getBoundingClientRect().y});this.element_.dispatchEvent(t)}},MaterialSlider.prototype.updateValueStyles_=function(e){"use strict";var t=(this.element_.value-this.element_.min)/(this.element_.max-this.element_.min);0===t?this.element_.classList.add(this.CssClasses_.IS_LOWEST_VALUE):this.element_.classList.remove(this.CssClasses_.IS_LOWEST_VALUE),this.isIE_||(this.backgroundLower_.style.flex=t,this.backgroundLower_.style.webkitFlex=t,this.backgroundUpper_.style.flex=1-t,this.backgroundUpper_.style.webkitFlex=1-t)},MaterialSlider.prototype.disable=function(){"use strict";this.element_.disabled=!0},MaterialSlider.prototype.enable=function(){"use strict";this.element_.disabled=!1},MaterialSlider.prototype.change=function(e){"use strict";e&&(this.element_.value=e),this.updateValueStyles_()},MaterialSlider.prototype.init=function(){"use strict";if(this.element_){if(this.isIE_){var e=document.createElement("div");e.classList.add(this.CssClasses_.IE_CONTAINER),this.element_.parentElement.insertBefore(e,this.element_),this.element_.parentElement.removeChild(this.element_),e.appendChild(this.element_)}else{var t=document.createElement("div");t.classList.add(this.CssClasses_.SLIDER_CONTAINER),this.element_.parentElement.insertBefore(t,this.element_),this.element_.parentElement.removeChild(this.element_),t.appendChild(this.element_);var s=document.createElement("div");s.classList.add(this.CssClasses_.BACKGROUND_FLEX),t.appendChild(s),this.backgroundLower_=document.createElement("div"),this.backgroundLower_.classList.add(this.CssClasses_.BACKGROUND_LOWER),s.appendChild(this.backgroundLower_),this.backgroundUpper_=document.createElement("div"),this.backgroundUpper_.classList.add(this.CssClasses_.BACKGROUND_UPPER),s.appendChild(this.backgroundUpper_)}this.boundInputHandler=this.onInput_.bind(this),this.boundChangeHandler=this.onChange_.bind(this),this.boundMouseUpHandler=this.onMouseUp_.bind(this),this.boundContainerMouseDownHandler=this.onContainerMouseDown_.bind(this),this.element_.addEventListener("input",this.boundInputHandler),this.element_.addEventListener("change",this.boundChangeHandler),this.element_.addEventListener("mouseup",this.boundMouseUpHandler),this.element_.parentElement.addEventListener("mousedown",this.boundContainerMouseDownHandler),this.updateValueStyles_(),this.element_.classList.add(this.CssClasses_.IS_UPGRADED)}},MaterialSlider.prototype.mdlDowngrade_=function(){"use strict";this.element_.removeEventListener("input",this.boundInputHandler),this.element_.removeEventListener("change",this.boundChangeHandler),this.element_.removeEventListener("mouseup",this.boundMouseUpHandler),this.element_.parentElement.removeEventListener("mousedown",this.boundContainerMouseDownHandler)},componentHandler.register({constructor:MaterialSlider,classAsString:"MaterialSlider",cssClass:"mdl-js-slider",widget:!0}),MaterialSpinner.prototype.Constant_={MDL_SPINNER_LAYER_COUNT:4},MaterialSpinner.prototype.CssClasses_={MDL_SPINNER_LAYER:"mdl-spinner__layer",MDL_SPINNER_CIRCLE_CLIPPER:"mdl-spinner__circle-clipper",MDL_SPINNER_CIRCLE:"mdl-spinner__circle",MDL_SPINNER_GAP_PATCH:"mdl-spinn
|