www-thermferm/jqwidgets/jqxresponsivepanel.js

changeset 617
b216f9d4b917
parent 511
2d1d43c3a2c2
--- a/www-thermferm/jqwidgets/jqxresponsivepanel.js	Sun Jul 10 16:58:40 2022 +0200
+++ b/www-thermferm/jqwidgets/jqxresponsivepanel.js	Mon Aug 08 10:54:27 2022 +0200
@@ -1,7 +1,9 @@
 /*
-jQWidgets v4.5.2 (2017-May)
-Copyright (c) 2011-2017 jQWidgets.
-License: http://jqwidgets.com/license/
-*/
-!function(a){a.jqx.jqxWidget("jqxResponsivePanel","",{}),a.extend(a.jqx._jqxResponsivePanel.prototype,{defineInstance:function(){var b={width:null,height:null,collapseBreakpoint:1e3,collapseWidth:null,toggleButton:null,toggleButtonSize:30,animationType:"fade",animationDirection:"left",animationShowDelay:"fast",animationHideDelay:"fast",autoClose:!0,initContent:null,_collapsed:!1,_opened:!1,_init:!1,_ie7:a.jqx.browser.msie&&a.jqx.browser.version<8,events:["collapse","expand","open","close"]};return this===a.jqx._jqxResponsivePanel.prototype?b:(a.extend(!0,this,b),b)},createInstance:function(){var a=this;a.initContent&&a._init===!1&&(a.initContent(),a._init=!0),a._render(!0)},_render:function(b){var c=this;if(b===!0&&c.toggleButton){if(c._toggleButton=a(c.toggleButton),0===c._toggleButton.length)throw new Error('jqxResponsivePanel: Invalid toggleButton selector: "'+c.toggleButton+'".');var d=a('<div class="'+c.toThemeProperty("jqx-menu-minimized-button")+" "+c.toThemeProperty("jqx-responsive-panel-button-inner")+'"></div>');c._toggleButton.append(d)}c._setSize(),c._addClasses(),b===!1&&c._removeHandlers(),c._addHandlers(),c._checkWindowSize()},render:function(){this._render(!1)},refresh:function(a){a!==!0&&this._checkWindowSize()},destroy:function(a){var b=this;b._removeHandlers(),b.host.remove(),a!==!0&&b.toggleButton&&b._toggleButton.remove()},propertyChangedHandler:function(a,b,c,d){if(d!==c&&"toggleButton"!==b&&"initContent"!==b)switch(b){case"width":case"height":a.host.css(b,d);break;case"collapseBreakpoint":a._checkWindowSize();break;case"toggleButtonSize":a.toggleButton&&a._toggleButton.css({width:d,height:d});break;default:a.render()}},open:function(){function a(){b.host.show(),b._opened=!0,b._raiseEvent("2"),b.initContent&&b._init===!1&&(b.initContent(),b._init=!0)}var b=this;if(b._collapsed===!0&&b._opened===!1){if(b._ie7===!0)return void a();switch(b.animationType){case"fade":b.host.fadeIn(b.animationShowDelay,function(){b._raiseEvent("2"),b._opened=!0,b.initContent&&b._init===!1&&(b.initContent(),b._init=!0)});break;case"slide":var c=b.animationDirection;"top"===c?c="up":"bottom"===c&&(c="down"),b._slide(b.host,{mode:"show",direction:c,duration:b.animationShowDelay});break;case"none":a()}}},close:function(){var a=this;if(a._collapsed===!0&&a._opened===!0){if(a._ie7===!0)return a.host.hide(),a._opened=!1,void a._raiseEvent("3");switch(a.animationType){case"fade":a.host.fadeOut(a.animationHideDelay,function(){a._opened=!1,a._raiseEvent("3")});break;case"slide":var b=a.animationDirection;"top"===b?b="up":"bottom"===b&&(b="down"),a._slide(a.host,{mode:"hide",direction:b,duration:a.animationHideDelay});break;case"none":a.host.hide(),a._opened=!1,a._raiseEvent("3")}}},_raiseEvent:function(b,c){void 0===c&&(c={owner:null});var d=this.events[b];c.owner=this;var e=new a.Event(d);e.owner=this,e.args=c,e.preventDefault&&e.preventDefault();var f=this.host.trigger(e);return f},_setSize:function(){var a=this;a.host.css("width",a.width),a.host.css("height",a.height),a.toggleButton&&a._toggleButton.css({width:a.toggleButtonSize,height:a.toggleButtonSize})},_addClasses:function(){var a=this;a.host.addClass(a.toThemeProperty("jqx-responsive-panel")),a.host.addClass(a.toThemeProperty("jqx-widget")),a.host.addClass(a.toThemeProperty("jqx-widget-content")),a.host.addClass(a.toThemeProperty("jqx-rc-all")),a.toggleButton&&(a._toggleButton.addClass(a.toThemeProperty("jqx-responsive-panel-button")),a._toggleButton.addClass(a.toThemeProperty("jqx-fill-state-normal")),a._toggleButton.addClass(a.toThemeProperty("jqx-rc-all")))},isCollapsed:function(){return this._collapsed},isOpened:function(){return this._opened},_addHandlers:function(){var b=this,c=b.element.id;b.addHandler(b.host,"click.jqxResponsivePanel"+c,function(a){a.stopPropagation()}),b.addHandler(a(document),"click.jqxResponsivePanel"+c,function(){b._collapsed===!0&&b.autoClose===!0&&b.close()}),b.addHandler(a(window),"resize.jqxResponsivePanel"+c,function(){setTimeout(function(){b._checkWindowSize()},0)}),b.toggleButton&&(b.addHandler(b._toggleButton,"mouseenter.jqxResponsivePanel"+c,function(){b._toggleButton.addClass(b.toThemeProperty("jqx-fill-state-hover"))}),b.addHandler(b._toggleButton,"mouseleave.jqxResponsivePanel"+c,function(){b._toggleButton.removeClass(b.toThemeProperty("jqx-fill-state-hover"))}),b.addHandler(b._toggleButton,"mousedown.jqxResponsivePanel"+c,function(){b._toggleButton.addClass(b.toThemeProperty("jqx-fill-state-pressed"))}),b.addHandler(a(document),"mouseup.jqxResponsivePanel"+c,function(){b._toggleButton.removeClass(b.toThemeProperty("jqx-fill-state-pressed"))}),b.addHandler(b._toggleButton,"click.jqxResponsivePanel"+c,function(a){a.stopPropagation(),b._opened===!0?b.close():b.open()}))},_removeHandlers:function(){var b=this,c=b.element.id;b.removeHandler(b.host,"click.jqxResponsivePanel"+c),b.removeHandler(a(document),"click.jqxResponsivePanel"+c),b.removeHandler(a(window),"resize.jqxResponsivePanel"+c),b.toggleButton&&(b.removeHandler(b._toggleButton,"mouseenter.jqxResponsivePanel"+c),b.removeHandler(b._toggleButton,"mouseleave.jqxResponsivePanel"+c),b.removeHandler(b._toggleButton,"mousedown.jqxResponsivePanel"+c),b.removeHandler(a(document),"mouseup.jqxResponsivePanel"+c),b.removeHandler(b._toggleButton,"click.jqxResponsivePanel"+c))},_checkWindowSize:function(){var a=this,b=this.host.parent().width();a._collapsed===!1&&b<=a.collapseBreakpoint?(a.toggleButton&&a._toggleButton.show(),a._opened===!1&&a.host.hide(),a.host.removeClass(a.toThemeProperty("jqx-responsive-panel-expanded")),a.host.addClass(a.toThemeProperty("jqx-responsive-panel-collapsed")),a._collapsed=!0,a._raiseEvent("0"),a.collapseWidth&&a.host.width(a.collapseWidth),a.host.trigger("resize")):a._collapsed===!0&&b>a.collapseBreakpoint&&(a.collapseWidth&&a.host.width(a.width),a.toggleButton&&a._toggleButton.hide(),a._opened===!1&&a.host.show(),a.host.removeClass(a.toThemeProperty("jqx-responsive-panel-collapsed")),a.host.addClass(a.toThemeProperty("jqx-responsive-panel-expanded")),a._collapsed=!1,a._raiseEvent("1"),a.initContent&&a._init===!1&&(a.initContent(),a._init=!0),a.host.trigger("resize"))},_slide:function(b,c){var d=this;if(d.activeAnimations||(d.activeAnimations=[]),d.activeAnimations.length>0)for(var e=0;e<d.activeAnimations.length;e++)d.activeAnimations[e].clearQueue(),d.activeAnimations[e].finish();else b.clearQueue(),b.finish();var f,g="ui-effects-",h={save:function(a,b){for(var c=0;c<b.length;c++)null!==b[c]&&a.length>0&&a.data(g+b[c],a[0].style[b[c]])},restore:function(a,b){var c,d;for(d=0;d<b.length;d++)null!==b[d]&&(c=a.data(g+b[d]),void 0===c&&(c=""),a.css(b[d],c))},createWrapper:function(b){if(b.parent().is(".ui-effects-wrapper"))return b.parent();var c={width:b.outerWidth(!0),height:b.outerHeight(!0),float:b.css("float")},d=a("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),e={width:b.width(),height:b.height()},f=document.activeElement;try{f.id}catch(a){f=document.body}return b.wrap(d),(b[0]===f||a.contains(b[0],f))&&a(f).focus(),d=b.parent(),"static"===b.css("position")?(d.css({position:"relative"}),b.css({position:"relative"})):(a.extend(c,{position:b.css("position"),zIndex:b.css("z-index")}),a.each(["top","left","bottom","right"],function(a,d){c[d]=b.css(d),isNaN(parseInt(c[d],10))&&(c[d]="auto")}),b.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),b.css(e),d.css(c).show()},removeWrapper:function(b){var c=document.activeElement;return b.parent().is(".ui-effects-wrapper")&&(b.parent().replaceWith(b),(b[0]===c||a.contains(b[0],c))&&a(c).focus()),b}},i=["position","top","bottom","left","right","width","height"],j=c.mode,k="show"===j,l=c.direction||"left",m="up"===l||"down"===l?"top":"left",n="up"===l||"left"===l,o={};h.save(b,i),b.show(),f=c.distance||b["top"===m?"outerHeight":"outerWidth"](!0),h.createWrapper(b).css({overflow:"hidden"}),k&&b.css(m,n?isNaN(f)?"-"+f:-f:f),o[m]=(k?n?"+=":"-=":n?"-=":"+=")+f;var p=function(){b.clearQueue(),b.stop(!0,!0)};return d.activeAnimations.push(b),b.animate(o,{duration:c.duration,easing:c.easing,complete:function(){d.activeAnimations.pop(b),"show"===j?(d._opened=!0,d._raiseEvent("2"),d.initContent&&d._init===!1&&(d.initContent(),d._init=!0)):"hide"===j&&(b.hide(),d._opened=!1,d._raiseEvent("3")),h.restore(b,i),h.removeWrapper(b)}}),p}})}(jqxBaseFramework);
-
+jQWidgets v12.0.1 (2021-Mar)
+Copyright (c) 2011-2021 jQWidgets.
+License: https://jqwidgets.com/license/
+*/
+/* eslint-disable */
+
+(function(a){a.jqx.jqxWidget("jqxResponsivePanel","",{});a.extend(a.jqx._jqxResponsivePanel.prototype,{defineInstance:function(){var b={width:null,height:null,collapseBreakpoint:1000,collapseWidth:null,toggleButton:null,toggleButtonSize:30,animationType:"fade",animationDirection:"left",animationShowDelay:"fast",animationHideDelay:"fast",autoClose:true,initContent:null,_collapsed:false,_opened:false,_init:false,_ie7:(a.jqx.browser.msie&&a.jqx.browser.version<8),events:["collapse","expand","open","close"]};if(this===a.jqx._jqxResponsivePanel.prototype){return b}a.extend(true,this,b);return b},createInstance:function(){var b=this;if(b.initContent&&b._init===false){b.initContent();b._init=true}b._render(true)},_render:function(c){var d=this;if(c===true&&d.toggleButton){d._toggleButton=a(d.toggleButton);if(d._toggleButton.length===0){throw new Error('jqxResponsivePanel: Invalid toggleButton selector: "'+d.toggleButton+'".')}var b=a('<div class="'+d.toThemeProperty("jqx-menu-minimized-button")+" "+d.toThemeProperty("jqx-responsive-panel-button-inner")+'"></div>');d._toggleButton.append(b)}d._setSize();d._addClasses();if(c===false){d._removeHandlers()}d._addHandlers();d._checkWindowSize()},render:function(){this._render(false)},refresh:function(b){if(b!==true){this._checkWindowSize()}},destroy:function(b){var c=this;c._removeHandlers();c.host.remove();if(b!==true&&c.toggleButton){c._toggleButton.remove()}},propertyChangedHandler:function(b,c,e,d){if(d!==e&&c!=="toggleButton"&&c!=="initContent"){switch(c){case"width":case"height":b.host.css(c,d);break;case"collapseBreakpoint":b._checkWindowSize();break;case"toggleButtonSize":if(b.toggleButton){b._toggleButton.css({width:d,height:d})}break;default:b.render()}}},open:function(){var b=this;if(b._collapsed===true&&b._opened===false){function d(){b.host.show();b._opened=true;b._raiseEvent("2");if(b.initContent&&b._init===false){b.initContent();b._init=true}}if(b._ie7===true){d();return}switch(b.animationType){case"fade":b.host.fadeIn(b.animationShowDelay,function(){b._raiseEvent("2");b._opened=true;if(b.initContent&&b._init===false){b.initContent();b._init=true}});break;case"slide":var c=b.animationDirection;if(c==="top"){c="up"}else{if(c==="bottom"){c="down"}}b._slide(b.host,{mode:"show",direction:c,duration:b.animationShowDelay});break;case"none":d();break}}},close:function(){var b=this;if(b._collapsed===true&&b._opened===true){if(b._ie7===true){b.host.hide();b._opened=false;b._raiseEvent("3");return}switch(b.animationType){case"fade":b.host.fadeOut(b.animationHideDelay,function(){b._opened=false;b._raiseEvent("3")});break;case"slide":var c=b.animationDirection;if(c==="top"){c="up"}else{if(c==="bottom"){c="down"}}b._slide(b.host,{mode:"hide",direction:c,duration:b.animationHideDelay});break;case"none":b.host.hide();b._opened=false;b._raiseEvent("3");break}}},_raiseEvent:function(f,c){if(c===undefined){c={owner:null}}var d=this.events[f];c.owner=this;var e=new a.Event(d);e.owner=this;e.args=c;if(e.preventDefault){e.preventDefault()}var b=this.host.trigger(e);return b},_setSize:function(){var b=this;b.host.css("width",b.width);b.host.css("height",b.height);if(b.toggleButton){b._toggleButton.css({width:b.toggleButtonSize,height:b.toggleButtonSize})}},_addClasses:function(){var b=this;b.host.addClass(b.toThemeProperty("jqx-responsive-panel"));b.host.addClass(b.toThemeProperty("jqx-widget"));b.host.addClass(b.toThemeProperty("jqx-widget-content"));b.host.addClass(b.toThemeProperty("jqx-rc-all"));if(b.toggleButton){b._toggleButton.addClass(b.toThemeProperty("jqx-responsive-panel-button"));b._toggleButton.addClass(b.toThemeProperty("jqx-fill-state-normal"));b._toggleButton.addClass(b.toThemeProperty("jqx-rc-all"))}},isCollapsed:function(){return this._collapsed},isOpened:function(){return this._opened},_addHandlers:function(){var b=this,c=b.element.id;b.addHandler(b.host,"click.jqxResponsivePanel"+c,function(d){d.stopPropagation()});b.addHandler(a(document),"click.jqxResponsivePanel"+c,function(){if(b._collapsed===true&&b.autoClose===true){b.close()}});b.addHandler(a(window),"resize.jqxResponsivePanel"+c,function(){setTimeout(function(){b._checkWindowSize()},0)});if(b.toggleButton){b.addHandler(b._toggleButton,"mouseenter.jqxResponsivePanel"+c,function(){b._toggleButton.addClass(b.toThemeProperty("jqx-fill-state-hover"))});b.addHandler(b._toggleButton,"mouseleave.jqxResponsivePanel"+c,function(){b._toggleButton.removeClass(b.toThemeProperty("jqx-fill-state-hover"))});b.addHandler(b._toggleButton,"mousedown.jqxResponsivePanel"+c,function(){b._toggleButton.addClass(b.toThemeProperty("jqx-fill-state-pressed"))});b.addHandler(a(document),"mouseup.jqxResponsivePanel"+c,function(){b._toggleButton.removeClass(b.toThemeProperty("jqx-fill-state-pressed"))});b.addHandler(b._toggleButton,"click.jqxResponsivePanel"+c,function(d){d.stopPropagation();if(b._opened===true){b.close()}else{b.open()}})}},_removeHandlers:function(){var b=this,c=b.element.id;b.removeHandler(b.host,"click.jqxResponsivePanel"+c);b.removeHandler(a(document),"click.jqxResponsivePanel"+c);b.removeHandler(a(window),"resize.jqxResponsivePanel"+c);if(b.toggleButton){b.removeHandler(b._toggleButton,"mouseenter.jqxResponsivePanel"+c);b.removeHandler(b._toggleButton,"mouseleave.jqxResponsivePanel"+c);b.removeHandler(b._toggleButton,"mousedown.jqxResponsivePanel"+c);b.removeHandler(a(document),"mouseup.jqxResponsivePanel"+c);b.removeHandler(b._toggleButton,"click.jqxResponsivePanel"+c)}},_checkWindowSize:function(){var c=this;var b=this.host.parent().width();if(this.host.parent()[0].nodeName.toLowerCase()==="jqx-responsive-panel"){b=this.host.parent().parent().width()}if(c._collapsed===false&&b<=c.collapseBreakpoint){if(c.toggleButton){c._toggleButton.show()}if(c._opened===false){c.host.hide()}c.host.removeClass(c.toThemeProperty("jqx-responsive-panel-expanded"));c.host.addClass(c.toThemeProperty("jqx-responsive-panel-collapsed"));c._collapsed=true;c._raiseEvent("0");if(c.collapseWidth){c.host.width(c.collapseWidth)}c.host.trigger("resize")}else{if(c._collapsed===true&&b>c.collapseBreakpoint){if(c.collapseWidth){c.host.width(c.width)}if(c.toggleButton){c._toggleButton.hide()}if(c._opened===false){c.host.show()}c.host.removeClass(c.toThemeProperty("jqx-responsive-panel-collapsed"));c.host.addClass(c.toThemeProperty("jqx-responsive-panel-expanded"));c._collapsed=false;c._raiseEvent("1");if(c.initContent&&c._init===false){c.initContent();c._init=true}c.host.trigger("resize")}}},_slide:function(f,e){var m=this;if(!m.activeAnimations){m.activeAnimations=[]}if(m.activeAnimations.length>0){for(var k=0;k<m.activeAnimations.length;k++){m.activeAnimations[k].clearQueue();m.activeAnimations[k].finish()}}else{f.clearQueue();f.finish()}var h="ui-effects-";var d={save:function(s,t){for(var o=0;o<t.length;o++){if(t[o]!==null&&s.length>0){s.data(h+t[o],s[0].style[t[o]])}}},restore:function(s,u){var t,o;for(o=0;o<u.length;o++){if(u[o]!==null){t=s.data(h+u[o]);if(t===undefined){t=""}s.css(u[o],t)}}},createWrapper:function(o){if(o.parent().is(".ui-effects-wrapper")){return o.parent()}var s={width:o.outerWidth(true),height:o.outerHeight(true),"float":o.css("float")},v=a("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),i={width:o.width(),height:o.height()},u=document.activeElement;try{u.id}catch(t){u=document.body}o.wrap(v);if(o[0]===u||a.contains(o[0],u)){a(u).focus()}v=o.parent();if(o.css("position")==="static"){v.css({position:"relative"});o.css({position:"relative"})}else{a.extend(s,{position:o.css("position"),zIndex:o.css("z-index")});a.each(["top","left","bottom","right"],function(w,x){s[x]=o.css(x);if(isNaN(parseInt(s[x],10))){s[x]="auto"}});o.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})}o.css(i);return v.css(s).show()},removeWrapper:function(i){var o=document.activeElement;if(i.parent().is(".ui-effects-wrapper")){i.parent().replaceWith(i);if(i[0]===o||a.contains(i[0],o)){a(o).focus()}}return i}};var p=["position","top","bottom","left","right","width","height"],l=e.mode,r=l==="show",q=e.direction||"left",g=(q==="up"||q==="down")?"top":"left",c=(q==="up"||q==="left"),b,j={};d.save(f,p);f.show();b=e.distance||f[g==="top"?"outerHeight":"outerWidth"](true);d.createWrapper(f).css({overflow:"hidden"});if(r){f.css(g,c?(isNaN(b)?"-"+b:-b):b)}j[g]=(r?(c?"+=":"-="):(c?"-=":"+="))+b;var n=function(){f.clearQueue();f.stop(true,true)};m.activeAnimations.push(f);f.animate(j,{duration:e.duration,easing:e.easing,complete:function(){m.activeAnimations.pop(f);if(l==="show"){m._opened=true;m._raiseEvent("2");if(m.initContent&&m._init===false){m.initContent();m._init=true}}else{if(l==="hide"){f.hide();m._opened=false;m._raiseEvent("3")}}d.restore(f,p);d.removeWrapper(f)}});return n}})})(jqxBaseFramework);
+

mercurial