diff -r 033898178630 -r 37f1a08315f3 www/jqwidgets/jqxdocking.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/www/jqwidgets/jqxdocking.js Sun Aug 05 11:32:13 2018 +0200 @@ -0,0 +1,9 @@ +/* +jQWidgets v6.0.5 (2018-July) +Copyright (c) 2011-2018 jQWidgets. +License: https://jqwidgets.com/license/ +*/ +/* eslint-disable */ + +(function(a){a.jqx.jqxWidget("jqxDocking","",{});a.extend(a.jqx._jqxDocking.prototype,{defineInstance:function(){var b={orientation:"horizontal",mode:"default",floatingWindowOpacity:0.3,panelsRoundedCorners:true,disabled:false,width:"auto",height:"auto",windowsMode:null,cookies:false,cookieOptions:{},windowsOffset:5,rtl:false,keyboardNavigation:false,_windowOptions:{},_draggedFired:false,_dragging:false,_draggingItem:null,_panels:[],_windows:[],_indicator:null,_events:["dragEnd","dragStart"]};if(this===a.jqx._jqxDocking.prototype){return b}a.extend(true,this,b);return b},createInstance:function(){if(!this.host.jqxWindow){throw new Error("jqxDocking: Missing reference to jqxwindow.js.")}this._refresh(true);if(this.disabled){this.disabled=false;this.disable()}},refresh:function(b){if(b==true){return}this._performLayout()},_refresh:function(c){this._render();this._removeClasses();this._addClasses();this._setWindowsOptions(true);this._performLayout();this._cookieHandler();this._cookieExporter();this._removeEventListeners();this._addEventListeners();var b=a.Event("resize");this.host.trigger(b)},resize:function(){this._refresh()},_addClasses:function(){this.host.addClass("jqx-docking");for(var b=0;b0){this.focusedWindow=a("#"+b)[0]}else{this.focusedWindow=this._windows[0][0]}a(this.focusedWindow).addClass(this.toThemeProperty("jqx-fill-state-focus"));this.host.focus()},_renderWindows:function(b){var f=b.children("div");for(var d=0;d');var e=this;if(this.keyboardNavigation){var c=function(i){if(i.keyCode===13){if(e.focusedWindow&&a(e.focusedWindow).jqxWindow("showCollapseButton")){a(e.focusedWindow).jqxWindow("_collapseButton").trigger("click")}}else{if((e.focusedWindow&&i.keyCode===27&&a(e.focusedWindow).jqxWindow("keyboardCloseKey")==="esc")||(e.focusedWindow&&a(e.focusedWindow).jqxWindow("keyboardCloseKey")==i.keyCode)){a(e.focusedWindow).jqxWindow("closeWindow",i)}}if(i.keyCode===9){if(e.focusedWindow==null){e.focusedWindow=e._windows[0];a(e.focusedWindow).focus();i.stopPropagation()}else{var g=-1;a.each(e._windows,function(j,k){if(this[0]==e.focusedWindow){g=j}});if(i.shiftKey){g--}else{g++}if(g>=e._windows.length||g<0){a(e.focusedWindow).removeClass(e.toThemeProperty("jqx-fill-state-focus"));e.focusedWindow=null;i.stopPropagation();return true}var h=e._windows[g];if(!h){h=e._windows[0]}a(e.focusedWindow).removeClass(e.toThemeProperty("jqx-fill-state-focus"));e.focusedWindow=h[0];a(e.focusedWindow).focus()}a(e.focusedWindow).addClass(e.toThemeProperty("jqx-fill-state-focus"));if(i.preventDefault){i.preventDefault();i.stopPropagation()}}};a.each(e._windows,function(h,i){var g=a(this);e.removeHandler(g,"focus");e.removeHandler(g,"blur");e.removeHandler(g,"mousedown");e.addHandler(g,"mousedown",function(j){if(e.focusedWindow){a(e.focusedWindow).removeClass(e.toThemeProperty("jqx-fill-state-focus"))}e.focusedWindow=g[0];a(e.focusedWindow).addClass(e.toThemeProperty("jqx-fill-state-focus"));a(e.focusedWindow).focus()});e.addHandler(g,"focus",function(j){if(e.focusedWindow){a(e.focusedWindow).removeClass(e.toThemeProperty("jqx-fill-state-focus"))}e.focusedWindow=g[0];a(e.focusedWindow).addClass(e.toThemeProperty("jqx-fill-state-focus"))});e.addHandler(g,"blur",function(j){if(a(document.activeElement).ischildof(a(g))){return true}a(g).removeClass(e.toThemeProperty("jqx-fill-state-focus"))});e.removeHandler(g,"keydown");e.addHandler(g,"keydown",function(j){c(j)})});this.removeHandler(this.host,"keydown");this.addHandler(this.host,"keydown",function(g){c(g)});this.removeHandler(this.host,"blur");this.addHandler(this.host,"blur",function(g){if(e.focusedWindow){a(e.focusedWindow).removeClass(e.toThemeProperty("jqx-fill-state-focus"));e.focusedWindow=null}})}},_performLayout:function(){this.host.css("width",this.width);this.host.css("height",this.height);this._performWindowsLayout();this._performPanelsLayout();this._performWindowsLayout()},_performPanelsLayout:function(){this.host.css("overflow","hidden");var b,e=this.host.width(),c=0;for(var d=0;d0){b.css("margin-left",-this.windowsOffset)}}}if(this.orientation==="horizontal"){if(c=i){if(d+fc){return"next"}return"prev"}return"all"},_handleIndicator:function(c,d,e){var b=this._getIndicator(d);if(e==="all"){if(this.orientation==="vertical"){b.insertBefore(c.children(".spacer"))}else{c.append(b)}}else{if(e==="prev"){b.insertBefore(d)}else{b.insertAfter(d)}}this._resizeIndicator(b,c)},_getIndicator:function(){var b=this._indicator;if(!b){b=a('
')}this._indicator=b;this._indicator.css("margin",this.windowsOffset);if(this.orientation==="vertical"){this._indicator.css("float","left")}return b},_resizeIndicator:function(c,b){if(this.orientation==="horizontal"){c.width(b.width()-(c.outerWidth(true)-c.width()));c.height(this._draggingItem.height())}else{c.width(this._draggingItem.width());c.height(this._draggingItem.height())}},_mouseLeavePanel:function(b){if(this._indicator){this._indicator.remove();this._indicator=null}},_itemDrop:function(d){var b=d.data.self,c=a(d.currentTarget);b._dragging=false;if(b._indicator){c.detach();c.insertAfter(b._indicator);b._indicator.remove();b._dropFixer(c)}else{b._dropHandler(c)}c.fadeTo(0,1);c.focus();b._indicator=null;b._cookieExporter();b._draggedFired=false;b._raiseEvent(0,{window:c.attr("id")})},_dropFixer:function(b){b.css("position","static");b.addClass(this.toThemeProperty("jqx-docking-window"));b.css("margin",this.windowsOffset);b.jqxWindow("enableResize",false);if(this.orientation==="horizontal"){this._fixWindowSize(b)}},_dropHandler:function(c){var b=this._getWindowOptions(c);if(this.mode==="docked"){this._dropDocked(c)}else{this._dropFloating(c)}},_dropDocked:function(d){var c=this._getWindowOptions(d),b=c.lastPosition;d.detach();if(b.next[0]){d.insertBefore(b.next)}else{if(b.prev[0]){d.insertAfter(b.prev)}else{b.parent.append(d)}}this._dropFixer(d)},_fixWindowSize:function(b){a(b).jqxWindow({width:b.parent().width()-(b.outerWidth()-b.width())-2*parseInt(this.windowsOffset,10)})},_itemResized:function(d){var b=d.data.self,c=a(d.currentTarget);b._setWindowOption(c,"size",{width:d.args.width,height:d.args.height});b._cookieExporter()},_dropFloating:function(c){var b;if(!a(c).jqxWindow("collapsed")){b=this._getWindowOptions(c);a(c).jqxWindow("enableResize",b.resizable)}a(document.body).append(c);this._restoreWindowSize(c)},_restoreWindowSize:function(c){var b=this._getWindowOptions(c);a(c).jqxWindow({width:b.size.width})},_isMouseOverItem:function(i,e,d){if(!i){return false}var j=i.outerWidth(true),g=i.outerHeight(true),b=i.width(),h=i.height(),f=i.offset().top,c=i.offset().left;if(d){f-=(g-h)/2;c-=(j-b)/2;b=j;h=g}if((c<=e.x&&c+b>=e.x)&&(f<=e.y&&f+h+2*this._draggingItem.height()/3>=e.y)){return true}return false},_cookieHandler:function(){if(this.cookies){var b=a.jqx.cookie.cookie("jqxDocking"+this.element.id);if(b!==null){this.importLayout(b);layoutImported=true}}},_cookieExporter:function(){if(this.cookies){a.jqx.cookie.cookie("jqxDocking"+this.element.id,this.exportLayout(),this.cookieOptions)}},_indexOf:function(c,d){for(var b=0;b1){g=g.substring(0,g.length-1)}g+="},"}g=g.substring(0,g.length-1);return{JSON:g,children:e}},_exportFloating:function(c){var e="",d;e+='"floating":{';for(var b=0;b0){b=b.attr("id")}else{b=b.id}}return this._windowOptions[b]},_setWindowOption:function(c,b,d){if(typeof c==="object"&&c!==null){if(c.length>0){c=c.attr("id")}else{c=c.id}}if(typeof this._windowOptions[c]==="undefined"){this._windowOptions[c]={}}this._windowOptions[c][b]=d;if(b==="mode"){this.setWindowMode(c,d)}},_expanded:function(c){var b=c.data.self;b._cookieExporter()},_collapsed:function(c){var b=c.data.self;b._cookieExporter()},_raiseEvent:function(b){var c=a.Event(this._events[b]);c.args=arguments[1];return this.host.trigger(c)},_moveWindow:function(e,c,b){var d=c.children();var g=null;var f=0;a.each(d,function(h){if(a(this).css("position")=="static"){if(f==b&&this!=e[0]){g=this}f++}});if(f<=b){e.appendTo(c)}else{if(g!=null){e.insertBefore(g)}}e.css("position","static")},propertyChangedHandler:function(b,c,e,d){switch(c){case"rtl":a.each(b._windows,function(){this.jqxWindow({rtl:d})});break;case"theme":a.each(b._windows,function(){this.jqxWindow({theme:d})});break;case"orientation":case"height":case"width":b._performLayout();b._cookieExporter();break;case"panelsRoundedCorners":b._removeClasses();b._addClasses();break;case"disabled":if(d){b.disabled=false;b.disable()}else{b.disabled=true;b.enable()}break;case"windowsMode":case"mode":b._setWindowsOptions(false);break;case"cookies":b._cookieExporter();break;case"windowsOffset":b._performLayout();break}},destroy:function(){this._removeEventListeners();this.host.remove();this.windowsMode=null;this.cookieOptions=null;this._windowOptions=null;this._panels=null;this._windows=null;this._events=null},disable:function(){if(!this.disabled){this.disabled=true;this._removeEventListeners();for(var b=0;b