www-thermferm/jqwidgets/jqxlayout.js

Sun, 07 Jul 2019 14:31:10 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Sun, 07 Jul 2019 14:31:10 +0200
branch
stable
changeset 603
fcff55324b84
parent 511
2d1d43c3a2c2
child 617
b216f9d4b917
permissions
-rw-r--r--

Merged fix from default

511
2d1d43c3a2c2 Upgraded jqwidgets to version 4.5.2
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1 /*
2d1d43c3a2c2 Upgraded jqwidgets to version 4.5.2
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
2 jQWidgets v4.5.2 (2017-May)
2d1d43c3a2c2 Upgraded jqwidgets to version 4.5.2
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
3 Copyright (c) 2011-2017 jQWidgets.
2d1d43c3a2c2 Upgraded jqwidgets to version 4.5.2
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
4 License: http://jqwidgets.com/license/
2d1d43c3a2c2 Upgraded jqwidgets to version 4.5.2
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
5 */
2d1d43c3a2c2 Upgraded jqwidgets to version 4.5.2
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
6 !function(a){"use strict";a.jqx.jqxWidget("jqxLayout","",{}),a.extend(a.jqx._jqxLayout.prototype,{defineInstance:function(){var b={width:null,height:null,minGroupWidth:100,minGroupHeight:100,layout:[],resizable:!0,contextMenu:!1,rtl:!1,events:["create","resize","pin","unpin","floatGroupClosed"]};return this===a.jqx._jqxLayout.prototype?b:(a.extend(!0,this,b),b)},createInstance:function(){var b=this;b._originalElement=a(b.element.cloneNode(!0)),b._coordinates=[],b._oldIE=a.jqx.browser.msie&&a.jqx.browser.version<9,b._ie7=a.jqx.browser.msie&&a.jqx.browser.version<8,b._touchDevice=a.jqx.mobile.isTouchDevice(),"none"!==b.host.css("display")&&document.body.contains(b.element)===!0?(b._initiallyHidden=!1,b._initialization=!0,b.render()):b._initiallyHidden=!0,a.jqx.utilities.resize(this.host,function(){b._suppressResizeHandler!==!0&&(b._initiallyHidden===!0&&(b._initialization=!0),b.render(),b._initiallyHidden===!0&&(b.dockingLayout&&(b.dockingLayout._createOverlay(),b.dockingLayout._createEdgeOverlays()),b._initiallyHidden=!1))})},render:function(){var b,c,d=this,e=[];if(d._tabbedGroupsList=[],d.dockingLayout&&(d._overlayGroups=[],d._initialization===!1)){b=d.dockingLayout._overlay.detach(),c=d.dockingLayout._dropOverlayHelper.detach();for(var f=0;f<d.dockingLayout._edgeOverlays.length;f++)e.push(a(d.dockingLayout._edgeOverlays[f]).detach())}if(d._rendered===!0&&d._detachContent(d.layout[0].items),d.element.innerHTML="",!d.host.jqxRibbon)throw new Error("jqxLayout: Missing reference to jqxribbon.js.");if(d._setSize(),d._addClasses(),d._removeHandlers(),!d._rendered){if("layoutGroup"!==d.layout[0].type)throw new Error('jqxLayout: Invalid layout structure. The first member of the layout array has to be with type: "layoutGroup".');var g=d.layout[0].items[0].width,h=d.layout[0].items[0].height;g&&"string"==typeof g&&"%"===g.charAt(g.length-1)||h&&"string"==typeof h&&"%"===h.charAt(h.length-1)||(d.layout[0].initialPxWidth=d.element.offsetWidth,d.layout[0].initialPxHeight=d.element.offsetHeight,d._pxToPercent(d.layout[0],!0))}if(d._createLayout(d.layout,d.host,{type:"host"},0),d.resizable===!0&&(d._addResizeFeedbacks(),d._getGroupCoordinates(),d._addHandlers()),d.contextMenu===!0&&d._initMenu(),d._initialization===!0)d._initialization=!1,d._raiseEvent("0");else if(d.dockingLayout){if(d._ie7){a("body").append(b,c);for(var i=0;i<e.length;i++)a("body").append(e[i])}else{b.appendTo(d.host),c.appendTo(d.host);for(var j=0;j<e.length;j++)e[j].appendTo(d.host)}d.dockingLayout._trackFloatGroups()}for(var k=0;k<d._tabbedGroupsList.length;k++)d._validateTabbedGroup(d._tabbedGroupsList[k]);d._rendered||(d._rendered=!0)},refresh:function(a){a!==!0&&this.render()},destroy:function(){var a=this;a._mouseupHandler=null,a._docUP=null,a._removeHandlers(),a.contextMenu===!0&&a._menu.jqxMenu("destroy"),a.host.remove()},saveLayout:function(){for(var a=this,b=[],c=0;c<a.layout.length;c++)a._copyItem(a.layout[c],b);return b},loadLayout:function(b){if(void 0!==b&&a.isEmptyObject(b)===!1){var c=this;c.layout=b,c._rendered=!1,c.render()}},propertyChangedHandler:function(b,c,d,e){if("layout"!==c){if(e!==d)switch(c){case"width":case"height":b.element.style[c]=b._toPx(e);break;case"theme":a.jqx.utilities.setTheme(d,e,b.host),b._menuInitialized&&a.jqx.utilities.setTheme(d,e,b._menu),b.dockingLayout&&a("."+b.element.id+"FloatGroup").length>0&&a("."+b.element.id+"FloatGroup").jqxWindow({theme:e});break;case"layout":case"resizable":b.render();break;case"contextMenu":e!==!0||b._menuInitialized||b.render();break;case"rtl":var f=e?"rtl":"ltr",g=e?"ltr":"rtl",h=function(c){for(var d=b._find(c,".jqx-layout-pseudo-window-title-"+g),h=b._find(c,".jqx-layout-pseudo-window-pin-background-"+g),i=b._find(c,".jqx-layout-pseudo-window-close-background-"+g),j=b._find(c,".jqx-layout-ribbon-header"),k=b._find(c,".jqx-ribbon"),l=0;l<d.length;l++){var m=a(d[l]);m.removeClass(b.toThemeProperty("jqx-layout-pseudo-window-title-"+g)),m.addClass(b.toThemeProperty("jqx-layout-pseudo-window-title-"+f))}for(var n=0;n<h.length;n++){var o=a(h[n]);o.removeClass(b.toThemeProperty("jqx-layout-pseudo-window-pin-background-"+g)),o.addClass(b.toThemeProperty("jqx-layout-pseudo-window-pin-background-"+f))}for(var p=0;p<i.length;p++){var q=a(i[p]);q.removeClass(b.toThemeProperty("jqx-layout-pseudo-window-close-background-"+g)),q.addClass(b.toThemeProperty("jqx-layout-pseudo-window-close-background-"+f))}for(var r=0;r<j.length;r++){var s=a(j[r]);s.removeClass(b.toThemeProperty("jqx-layout-ribbon-header-"+g)),s.addClass(b.toThemeProperty("jqx-layout-ribbon-header-"+f))}for(var t=0;t<k.length;t++)a(k[t]).jqxRibbon({rtl:e})};if(h(b.host),b.dockingLayout)for(var i=b._find(document.body,"."+b.element.id+"FloatGroup"),j=0;j<i.length;j++){var k=a(i[j]);h(k),k.jqxWindow({rtl:e})}}}else b.render()},_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.element.style.width=a._toPx(a.width),a.element.style.height=a._toPx(a.height)},_addClasses:function(){var a=this;a.host.addClass(a.toThemeProperty("jqx-layout jqx-widget jqx-widget-content jqx-rc-all"))},_getPercentage:function(a,b,c){return a/b.widget[c]()*100},_addHandlers:function(){function b(a,b){for(var c=0;c<i._coordinates.length;c++){var d=i._coordinates[c];if(a>=d.x.from&&a<=d.x.to&&b>=d.y.from&&b<=d.y.to){"horizontal"===d.orientation?i.element.style.cursor="col-resize":i.element.style.cursor="row-resize",i._resize={allowed:!0,widget:d.widget,side:d.side};break}i.element.style.cursor="default",i._resize.allowed=!1}}function c(a){if(i._resize.allowed===!0){var b=i._resize.widget,c=b.current.parent,d=i._percentToPx("width",b.current.minWidth,c),e=i._percentToPx("height",b.current.minHeight,c),f=c.items[b.current.index-1],j=c.items[b.current.index+1];switch(i._resizeStartPosition={x:a.pageX,y:a.pageY},d||(d=i._percentToPx("width",i.minGroupWidth,c)),d=Math.min(d,b.width()),b.current.minWidth=d,e||(e=i._percentToPx("height",i.minGroupHeight,c)),e=Math.min(e,b.height()),b.current.minHeight=e,i._resize.side){case"left":var k=i._percentToPx("width",f.minWidth,c);k||(k=i._percentToPx("width",i.minGroupWidth,c)),g=f.widget.offset().left+k,h=b.offset().left+b.width()-d;break;case"right":var l=i._percentToPx("width",j.minWidth,c);l||(l=i._percentToPx("width",i.minGroupWidth,c)),g=b.offset().left+d,h=j.widget.offset().left+j.widget.width()-l;break;case"top":var m=i._percentToPx("height",f.minHeight,c);m||(m=i._percentToPx("height",i.minGroupHeight,c)),g=f.widget.offset().top+m,h=b.offset().top+b.height()-e;break;case"bottom":var n=i._percentToPx("height",j.minHeight,c);n||(n=i._percentToPx("height",i.minGroupHeight,c)),g=b.offset().top+e,h=j.widget.offset().top+j.widget.height()-n}var o,p=function(a,b){if(b="undefined"==typeof b?{top:0,left:0}:b,a!==top){var c=a.frameElement.getBoundingClientRect();b.left+=c.left,b.top+=c.top,b=p(a.parent,b)}return b};i._clickedToResize=!0,i._overlay[0].style.display="block","left"===i._resize.side||"right"===i._resize.side?(i._verticalFeedback[0].style.height=i._resize.widget.height()+"px",o=i._ie7?p(window).top:0,i._verticalFeedback.offset({top:i._resize.widget.offset().top-i.host.offset().top+document.body.scrollTop-o})):(i._horizontalFeedback[0].style.width=i._resize.widget.width()+"px",o=i._ie7?p(window).left:0,i._horizontalFeedback.offset({left:i._resize.widget.offset().left-i.host.offset().left+document.body.scrollLeft+1-o}))}}function d(a,b,c,d,e){var f,g,h=e.charAt(0).toUpperCase()+e.slice(1),j=b.parent;return a?(f=i._percentToPx(e,c["min"+h],j),g=parseFloat(c[e])/100*b.parent.widget[e]()-d):(f=i._percentToPx(e,b["min"+h],j),g=parseFloat(b[e])/100*b.parent.widget[e]()-d),f||(f=i._percentToPx(e,i["minGroup"+h],j)),g<f?f:g}function e(a){if(i._clickedToResize===!0){var b,c,e,f,g,h,j=function(){i._clickedToResize=!1,i._overlay[0].style.display="none",i._verticalFeedback[0].style.display="none",i._horizontalFeedback[0].style.display="none"},k=a.pageX,l=a.pageY,m=i._resize.widget.current,n=i._resize.widget.offset(),o=n.left,p=n.top;if(a.pageX===i._resizeStartPosition.x&&a.pageY===i._resizeStartPosition.y)return void j();if("left"===i._resize.side||"right"===i._resize.side){if(h=m.width,"left"===i._resize.side?(b=m.parent.items[m.index-1],c=o,e=k<c):(b=m.parent.items[m.index+1],c=o+m.widget.width(),e=k>=c),f=Math.abs(k-c),0===f)return void j();if(e?(g=i._getPercentage(d(!0,m,b,f,"width"),m.parent,"width"),f=Math.abs(g-parseFloat(b.width)),b.width=g+"%",m.width=parseFloat(m.width)+f+"%"):(g=i._getPercentage(d(!1,m,b,f,"width"),m.parent,"width"),f=Math.abs(g-parseFloat(m.width)),m.width=g+"%",b.width=parseFloat(b.width)+f+"%"),m.width===h)return void j()}else{if(h=m.height,"top"===i._resize.side?(b=m.parent.items[m.index-1],c=p,e=l<c):(b=m.parent.items[m.index+1],c=p+m.widget.height(),e=l>=c),f=Math.abs(l-c),0===f)return void j();if(e?(g=i._getPercentage(d(!0,m,b,f,"height"),m.parent,"height"),f=Math.abs(g-parseFloat(b.height)),b.height=g+"%",m.height=parseFloat(m.height)+f+"%"):(g=i._getPercentage(d(!1,m,b,f,"height"),m.parent,"height"),f=Math.abs(g-parseFloat(m.height)),m.height=g+"%",b.height=parseFloat(b.height)+f+"%"),m.height===h)return void j()}j(),i.render(),i._raiseEvent("1",{item:m})}}function f(a){if(i._clickedToResize===!0){var b=a.pageX,c=a.pageY;"left"===i._resize.side||"right"===i._resize.side?(i._verticalFeedback[0].style.display="block",b<g?(b=g,i._verticalFeedback.addClass(i.toThemeProperty("jqx-layout-resize-feedback-warning"))):b>h?(b=h,i._verticalFeedback.addClass(i.toThemeProperty("jqx-layout-resize-feedback-warning"))):i._verticalFeedback.removeClass(i.toThemeProperty("jqx-layout-resize-feedback-warning")),i._verticalFeedback.offset({left:b-2})):(i._horizontalFeedback[0].style.display="block",c<g?(c=g,i._horizontalFeedback.addClass(i.toThemeProperty("jqx-layout-resize-feedback-warning"))):c>h?(c=h,i._horizontalFeedback.addClass(i.toThemeProperty("jqx-layout-resize-feedback-warning"))):i._horizontalFeedback.removeClass(i.toThemeProperty("jqx-layout-resize-feedback-warning")),i._horizontalFeedback.offset({top:c-2}),i._horizontalFeedback.offset({left:i._resize.widget.offset().left+document.body.scrollLeft+1}))}}var g,h,i=this,j=i.element.id;if(i._resize={allowed:!1},i._clickedToResize=!1,i._docUP=e,i._touchDevice?(i.addHandler(a(document),"touchstart.jqxDockingLayout"+j,function(a){var d=a.originalEvent.touches[0];b(d.pageX,d.pageY),c(d)}),i.addHandler(a(document),"touchmove.jqxDockingLayout"+j,function(a){var b=a.originalEvent.touches[0];f(b)}),i.addHandler(a(document),"touchend.jqxDockingLayout"+j,function(a){var b=a.originalEvent.changedTouches[0];e(b)})):(i.addHandler(i.host,"mousemove.jqxLayout"+j,function(a){if(i._clickedToResize===!1&&(!i.dockingLayout||i.dockingLayout&&i.dockingLayout._windowDragged!==!0)){var c=a.pageX,d=a.pageY;b(c,d)}}),i.addHandler(a(document),"mousemove.jqxLayout"+j,function(a){f(a)}),i.addHandler(i.host,"mousedown.jqxLayout"+j,function(a){c(a)}),i.addHandler(a(document),"mouseup.jqxLayout"+j,function(a){e(a)})),i.addHandler(a(document),"selectstart.jqxLayout"+j,function(){if(i._clickedToResize===!0)return!1}),i.dockingLayout)try{(""!==document.referrer||window.frameElement)&&(window.top.document.addEventListener?window.top.document.addEventListener("mouseup",i._mouseupHandler,!1):window.top.document.attachEvent&&window.top.document.attachEvent("onmouseup",i._mouseupHandler))}catch(a){}},_removeHandlers:function(){var b=this,c=b.element.id;if(b._touchDevice?(b.removeHandler(a(document),"touchstart.jqxLayout"+c),b.removeHandler(a(document),"touchmove.jqxLayout"+c),b.removeHandler(a(document),"touchend.jqxLayout"+c)):(b.removeHandler(b.host,"mousemove.jqxLayout"+c),b.removeHandler(a(document),"mousemove.jqxLayout"+c),b.removeHandler(b.host,"mousedown.jqxLayout"+c),b.removeHandler(a(document),"mouseup.jqxLayout"+c)),b.removeHandler(a(document),"selectstart.jqxLayout"+c),b.dockingLayout)try{(""!==document.referrer||window.frameElement)&&(window.top.document.removeEventListener?window.top.document.removeEventListener("mouseup",b._mouseupHandler,!1):window.top.document.detachEvent&&window.top.document.detachEvent("onmouseup",b._mouseupHandler))}catch(a){}if(b._oldIE)a("."+c+"FloatGroup").off("close");else for(var d=document.body.querySelectorAll("."+c+"FloatGroup"),e=0;e<d.length;e++)b.removeHandler(d[e],"close")},_createLayout:function(b,c,d){function e(a){var b=c.children(),d=b[0],e=b[1];if(d.innerHTML=a.title,a.content)m=a.content;else{var g=f._find(f._originalElement,'[data-container="'+a.contentContainer+'"]')[0];m=void 0!==g?g.innerHTML:""}void 0===m&&(m=""),e.innerHTML=m}for(var f=this,g=d.type,h=0;h<b.length;h++){var i,j,k,l,m,n,o,p,q=b[h];switch(q.type){case"layoutGroup":if(i=document.createElement("div"),k="jqx-layout-group-default","horizontal"===q.orientation&&(k+=" jqx-layout-group-default-horizontal"),"host"===g)k+=" jqx-layout-group-root";else{var r="horizontal"===d.orientation?q.width:"100%",s="horizontal"===d.orientation?"100%":q.height;i.style.width=f._toPx(r),i.style.height=f._toPx(s)}i.className=f.toThemeProperty(k),c[0].appendChild(i),j=a(i);break;case"tabbedGroup":"floatGroup"!==g?(j=document.createElement("div"),j.className=f.toThemeProperty("jqx-layout-group-tabbed"),j.innerHTML='<div class="jqx-layout-window-header"><div></div></div><div><div class="jqx-layout-ribbon"><ul class="jqx-layout-ribbon-header jqx-layout-ribbon-header-'+(f.rtl?"rtl":"ltr")+'"></ul><div class="jqx-layout-ribbon-content"></div></div></div>',c[0].appendChild(j),j=a(j),f._addRightClickHandler(f._find(j,".jqx-layout-window-header")[0],j)):(j=document.createElement("div"),j.className="jqx-layout-ribbon",j.innerHTML='<ul class="jqx-layout-ribbon-header jqx-layout-ribbon-header-'+(f.rtl?"rtl":"ltr")+'"></ul><div class="jqx-layout-ribbon-content"></div>',c.children()[1].appendChild(j),j=a(j));break;case"documentGroup":case"autoHideGroup":i=document.createElement("div");var t="";"documentGroup"===q.type&&(t="jqx-layout-ribbon-header jqx-layout-ribbon-header-"+(f.rtl?"rtl":"ltr")),i.innerHTML='<ul class="'+t+'"></ul><div></div>',f._ie7&&"autoHideGroup"===q.type&&(i.style.zIndex=9999-500*h),c[0].appendChild(i),j=a(i);break;case"floatGroup":if(f._rendered&&q.programmaticallyAdded!==!0)continue;if(!f.dockingLayout)throw new Error("Float groups are only available in the jqxDockingLayout widget. Initialize a jqxDockingLayout (requires jqxdockinglayout.js) instead of a jqxLayout.");j=document.createElement("div"),j.className=f.toThemeProperty("jqx-docking-layout-group-floating"),j.innerHTML="<div></div><div></div>",c[0].appendChild(j),j=a(j),q.programmaticallyAdded===!0&&delete q.programmaticallyAdded;break;case"layoutPanel":if(j={},"tabbedGroup"===g){var u=f._find(c,".jqx-layout-window-header")[0];if(u){var v=a(u).text();""===v&&(u.firstChild.innerHTML=q.title)}if(o=document.createElement("li"),o.innerHTML=q.title,f._find(c,".jqx-layout-ribbon-header")[0].appendChild(o),f._rendered||q.docked?m=q.detachedContent:(l=f._find(f._originalElement,'[data-container="'+q.contentContainer+'"]')[0],m=void 0!==l?l.innerHTML:""),n=document.createElement("div"),"string"==typeof m)n.innerHTML=m;else for(var w=0;w<m.length;w++)a(m[w]).appendTo(n);f._find(c,".jqx-layout-ribbon-content")[0].appendChild(n),f._addRightClickHandler(o,j)}else if("autoHideGroup"===g){if(p=c.children(),o=document.createElement("li"),o.innerHTML=q.title,p[0].appendChild(o),f._rendered?m=q.detachedContent:(l=f._find(f._originalElement,'[data-container="'+q.contentContainer+'"]')[0],m=void 0!==l?l.innerHTML:""),n=document.createElement("div"),"string"==typeof m)n.innerHTML=m;else for(var x=0;x<m.length;x++)m[x].appendTo(n);var y;"left"===d.alignment||"right"===d.alignment?(void 0!==d.popupContentSize&&(n.style.width=parseInt(d.popupContentSize,10)+"px"),y="jqx-layout-group-auto-hide-content-vertical"):(void 0!==d.popupContentSize&&(n.style.height=parseInt(d.popupContentSize,10)+"px"),y="jqx-layout-group-auto-hide-content-horizontal"),n.className=f.toThemeProperty(y);var z=document.createElement("div"),A=document.createElement("div");A.className="jqx-layout-window",A.innerHTML="<div><div>"+q.title+"</div></div>",A.appendChild(n),z.appendChild(A),p[1].appendChild(z),f._addRightClickHandler(A,j)}else"floatGroup"===g&&e(q);break;case"documentPanel":if(j={},"floatGroup"===g)e(q);else{if(p=c.children(),o=document.createElement("li"),o.innerHTML=q.title,p[0].appendChild(o),f._rendered||q.docked?m=q.detachedContent:(l=f._find(f._originalElement,'[data-container="'+q.contentContainer+'"]')[0],m=void 0!==l?l.innerHTML:""),n=document.createElement("div"),"string"==typeof m)n.innerHTML=m;else for(var B=0;B<m.length;B++)m[B].appendTo(n);p[1].appendChild(n),f._addRightClickHandler(o,j)}}if(q.items&&q.items.length>0){var C=j;f._createLayout(q.items,C,q)}if(f._createWidget(d,c,q,j,h),f.dockingLayout&&("documentGroup"===q.type||"tabbedGroup"===q.type||"layoutGroup"===q.type&&0===q.items.length)){var D={element:j,width:j.width(),height:j.height(),offset:j.offset(),settings:q};f._overlayGroups.push(D),"floatGroup"===q.parent.type&&(q.parent._overlayGroup=D)}}},_createWidget:function(b,c,d,e,f){function g(){for(var a=0,b=0;b<d.items.length;b++)if(d.items[b].selected===!0){a=b;break}return d.items[a].selected=!0,a}var h=this,i="horizontal"===b.orientation?d.width:"100%",j="horizontal"===b.orientation?"100%":d.height,k=!1;switch(d.parent=b,d.widget=e,d.index=f,d.widget&&(d.widget.current=d),d.type){case"tabbedGroup":var l,m;"floatGroup"!==b.type?(l=h._initWindowPanel(e,i,j,d.type),m=a(h._find(e,".jqx-layout-ribbon")[0]),h._tabbedGroupsList.push(d)):m=e,h.dockingLayout&&d.allowDrag!==!1&&(k=!0),m.jqxRibbon({theme:h.theme,width:"100%",height:"100%",position:"bottom",selectionMode:"click",animationType:"none",rtl:h.rtl,_roundedCorners:!1,initContent:function(b){var c=d.items[b];!c.initialized&&c.initContent&&(c.initContent(a(this._contentSections[b])),c.initialized=!0)},_removeByDrag:k,reorder:!0,_suppressReorder:!1}),m.on("select",function(c){if(c.stopPropagation(),c.target.id===m[0].id){c.stopPropagation();var e=c.args.selectedIndex;d.items[e].selected=!0;var f=a(a(m.children()[1]).children()[e]).text();"floatGroup"!==b.type?l[0].innerHTML=f:h._find(b.widget,".jqx-window-header")[0].firstChild.innerHTML=f}}),m.on("unselect",function(a){a.stopPropagation(),a.target.id===m[0].id&&(d.items[a.args.unselectedIndex].selected=!1)}),m.on("reorder",function(a){h._swapPanelsInLayout(d.items,a.args.newIndex,a.args.oldIndex);var b=a.args.newIndex;setTimeout(function(){d.items[b]&&h._addRightClickHandler(h._find(m,".jqx-ribbon-item")[b],d.items[b].widget)},200)}),k&&(m.on("_removeByDrag",function(a){h.dockingLayout._removeByDragHandler(a,d,m),"floatGroup"===d.parent.type&&1===d.items.length&&m.jqxRibbon({_removeByDrag:!1})}),"floatGroup"!==d.parent.type&&h.dockingLayout._addTabbedGroupHandlers(d,e)),m.jqxRibbon("selectAt",g());break;case"documentGroup":h.dockingLayout&&d.allowDrag!==!1&&(k=!0),e.jqxRibbon({theme:h.theme,width:i,height:j,_roundedCorners:!1,position:"top",selectedIndex:g(),selectionMode:"click",animationType:"none",rtl:h.rtl,initContent:function(b){var c=d.items[b];!c.initialized&&c.initContent&&(c.initContent(a(this._contentSections[b])),c.initialized=!0)},_removeByDrag:k,reorder:!0,_suppressReorder:!1}),e.on("select",function(a){a.stopPropagation(),a.target.id===e[0].id&&(d.items[a.args.selectedIndex].selected=!0)}),e.on("unselect",function(a){a.stopPropagation(),a.target.id===e[0].id&&(d.items[a.args.unselectedIndex].selected=!1)}),e.on("reorder",function(a){h._swapPanelsInLayout(d.items,a.args.newIndex,a.args.oldIndex);var b=a.args.newIndex;setTimeout(function(){h._addRightClickHandler(h._find(e,".jqx-ribbon-item")[b],d.items[b].widget)},200)}),k&&e.on("_removeByDrag",function(a){h.dockingLayout._removeByDragHandler(a,d,e)}),e.addClass(h.toThemeProperty("jqx-layout-group-document"));break;case"autoHideGroup":e.jqxRibbon({theme:h.theme,width:i,height:j,mode:"popup",popupCloseMode:"click",position:d.alignment,selectionMode:"click",animationType:"none",_roundedCorners:!1,rtl:h.rtl,initContent:function(b){var c=a(this._contentSections[b]),f=a(h._find(c,".jqx-layout-window")[0]);f.current=e.current.items[b],f[0].style.border="none",h._initWindowPanel(f,"100%","100%",d.type),!d.items[b].initialized&&d.items[b].initContent&&(d.items[b].initContent(a(f.children()[1])),d.items[b].initialized=!0)}}),e.addClass(h.toThemeProperty("jqx-layout-group-auto-hide"));break;case"floatGroup":e.addClass(h.element.id+"FloatGroup"),e.jqxWindow({theme:h.theme,width:d.width,maxWidth:null,height:d.height,maxHeight:null,position:{x:d.position.x,y:d.position.y},showCloseButton:d.allowClose!==!1,closeButtonAction:"close",rtl:h.rtl,initContent:function(){var a=this._header,b=h._touchDevice?"touchstart":"mousedown",c=".jqxLayout"+h.element.id;if(h.addHandler(a,b+c,function(){h.dockingLayout._windowDragged=!0,d._overlayGroup&&(d._overlayGroup.self=!0),h.dockingLayout._interval(),h.resizable&&(h._overlay[0].style.display="block");var a,b,c;"documentPanel"===d.items[0].type?(a={type:"documentGroup"},b=d.items[0],c=b.title):"layoutPanel"===d.items[0].type?(a={type:"tabbedGroup"},b=d.items[0],c=b.title):"tabbedGroup"===d.items[0].type&&(a=d.items[0]),h.dockingLayout._draggedWindow={fromGroup:a,fromPanel:b,title:c,element:e},h.dockingLayout._showEdgeOverlays()}),h.addHandler(a,"mouseup"+c,function(){h.dockingLayout._hideOverlays()}),"tabbedGroup"===d.items[0].type){for(var f=0,g=0;g<d.items[0].items.length;g++)if(d.items[0].items[g].selected){f=g;break}var i=d.items[0].items[f].title;e.jqxWindow("setTitle",i)}else d.items[0].initContent&&d.items[0].initContent(this._content)}}),e.on("moved",function(a){d.position.x=a.args.x,d.position.y=a.args.y,d._overlayGroup&&h.dockingLayout._updateOverlayGroup(d._overlayGroup),h.dockingLayout._windowCreate=!1,h.dockingLayout._hideOverlays(),h.dockingLayout._clearTextSelection()}),e.on("resized",function(b){d.width=b.args.width,d.height=b.args.height;var c=a(this).offset();d.position.x=c.left,d.position.y=c.top,d._overlayGroup&&h.dockingLayout._updateOverlayGroup(d._overlayGroup)}),e.on("close",function(a){a.stopPropagation(),a.target.id===e[0].id&&(h._raiseEvent("4",{element:e,floatGroup:e.current}),e.current._overlayGroup&&(e.current._overlayGroup.removed=!0,h.dockingLayout._updateOverlayGroups()),h.dockingLayout._removeFloatGroupObject(e.current))})}},_initWindowPanel:function(b,c,d,e){function f(){return g.dockingLayout?"layoutPanel"===b.current.type?void 0===b.current.parent.allowClose||b.current.parent.allowClose===!0:void 0===b.current.allowClose||b.current.allowClose===!0:"layoutPanel"===b.current.type?b.current.parent.allowClose===!0:b.current.allowClose===!0}var g=this;if(b.addClass(g.toThemeProperty("jqx-widget jqx-widget-content jqx-window jqx-layout-pseudo-window jqx-rc-all")),g._ie7){var h=b.parent();if("tabbedGroup"===e){var i,j,k=parseInt(b.css("border-left-width"),10),l=parseInt(b.css("border-right-width"),10),m=parseInt(b.css("border-top-width"),10),n=parseInt(b.css("border-bottom-width"),10);i="100%"===c?h.width():parseFloat(c)/100*h.width(),i-=k+l,j="100%"===d?h.height():parseFloat(d)/100*h.height(),j-=m+n,b.css({width:i,height:j})}else"autoHideGroup"===e&&b.css({width:c,height:d})}else b[0].style.width=c,b[0].style.height=d;var o=g.rtl?"rtl":"ltr",p=a(b[0].firstChild),q=a(p[0].firstChild);q.addClass(g.toThemeProperty("jqx-layout-pseudo-window-title jqx-layout-pseudo-window-title-"+o)),p.addClass(g.toThemeProperty("jqx-widget-header jqx-window-header jqx-disableselect jqx-layout-pseudo-window-header")),g._ie7&&(p.css("width",p.width()-parseInt(p.css("padding-left"),10)-parseInt(p.css("padding-right"),10)),p.css("height",p.height()-parseInt(p.css("padding-top"),10)-parseInt(p.css("padding-bottom"),10)));var r,s,t=0;if(f()&&(r=document.createElement("div"),r.className=g.toThemeProperty("jqx-window-close-button-background jqx-layout-pseudo-window-close-background jqx-layout-pseudo-window-close-background-"+o),r.setAttribute("title","Close"),r.innerHTML='<div class="'+g.toThemeProperty("jqx-window-close-button jqx-icon-close jqx-layout-pseudo-window-close-icon")+'"></div>',p[0].appendChild(r),t+=16),"tabbedGroup"===e&&b.current.allowPin!==!1||"autoHideGroup"===e&&b.current.parent.allowUnpin!==!1){var u;switch(e){case"tabbedGroup":u="jqx-layout-pseudo-window-pin-icon",b.pinned=!1;break;case"autoHideGroup":u="jqx-layout-pseudo-window-pinned-icon",b.pinned=!0}s=document.createElement("div"),s.className=g.toThemeProperty("jqx-window-close-button-background jqx-layout-pseudo-window-pin-background"),s.setAttribute("title","Auto Hide"),s.innerHTML='<div class="'+g.toThemeProperty(u)+'"></div>',r?s.className+=" "+g.toThemeProperty("jqx-layout-pseudo-window-pin-background-"+o):g.rtl===!1&&(s.style.right="0px"),p[0].appendChild(s),t+=16,g.dockingLayout&&"autoHideGroup"===e&&g.dockingLayout._addAutoHideGroupHandlers(b.current,p,b.current.title,b.children()[1])}q[0].style.maxWidth=g._toPx(p.width()-t);var v=b.children()[1];return v.style.height=g._toPx(1+b.height()-p.outerHeight()),v.style.marginLeft="-1px",v.style.marginRight="-1px",g._addWindowPanelHandlers(r,s,b),q},_addWindowPanelHandlers:function(a,b,c){var d=this,e=d.element.id,f=c.current,g=f.type;a&&d.addHandler(a,"click.jqxLayout"+e,function(){if("tabbedGroup"===g&&f.items.length>1){var a=d._find(c,".jqx-ribbon-item-selected")[0]._index;d._close(f.items[a])}else c.initAnimate&&c.initAnimate(),c.fadeOut({complete:function(){d._close(f),c.remove()}})}),b&&d.addHandler(b,"click.jqxLayout"+e,function(){"tabbedGroup"===g&&f.pinValid===!0?d._pin(f):"layoutPanel"===g&&d._unPin(f.parent)})},_getGroupCoordinates:function(){function a(a){return"layoutGroup"===a||"tabbedGroup"===a||"documentGroup"===a}function b(d){for(var e=0;e<d.length;e++){var f=d[e];if(a(f.type)){var g,h,i,j,k,l=d[e-1],m=d[e+1],n=f.widget.offset();l&&a(l.type)&&("horizontal"===f.parent.orientation?(g=n.left-5,h=g+10,i=n.top-5,j=i+f.widget.height()+10,k="left"):(g=n.left-5,h=g+f.widget.width()+10,i=n.top-5,j=i+10,k="top"),c._coordinates.push({x:{from:g,to:h},y:{from:i,to:j},widget:f.widget,side:k,orientation:f.parent.orientation})),m&&a(m.type)&&("horizontal"===f.parent.orientation?(g=n.left+f.widget.width()-5,h=g+10,i=n.top-5,j=i+f.widget.height()+10,k="right"):(g=n.left-5,h=g+f.widget.width()+10,i=n.top+f.widget.height()-5,j=i+10,k="bottom"),c._coordinates.push({x:{from:g,to:h},y:{from:i,to:j},widget:f.widget,side:k,orientation:f.parent.orientation})),f.items&&b(f.items)}}}var c=this;c._coordinates=[],b(c.layout[0].items)},_close:function(b){var c,d=this;if(b.removed=!0,"tabbedGroup"===b.type||"autoHideGroup"===b.type||"documentGroup"===b.type){if(c="tabbedGroup"===b.type?a(d._find(b.widget,".jqx-ribbon")[0]):b.widget,c.jqxRibbon("destroy"),b.parent.items){var e=b.parent.items[b.index-1],f=b.parent.items[b.index+1],g="vertical"===b.parent.orientation?"height":"width",h=function(a){var c=parseFloat(a[g])+parseFloat(b[g])+"%";"documentGroup"===a.type?"height"===g?a.widget.jqxRibbon({height:c}):a.widget.jqxRibbon({width:c}):"layoutGroup"!==a.type&&"tabbedGroup"!==a.type||(a.widget[0].style[g]=c),a[g]=c,d._raiseEvent("1",{item:a})};e&&"autoHideGroup"!==e.type&&"floatGroup"!==e.type?h(e):f&&"autoHideGroup"!==f.type&&"floatGroup"!==f.type&&h(f)}}else if("layoutPanel"===b.type){if("tabbedGroup"===b.parent.type)return c=a(d._find(b.parent.widget,".jqx-ribbon")[0]),c.jqxRibbon("removeAt",b.index),d._updateLayout(d.layout),void(0===b.index?c.jqxRibbon("selectAt",0):c.jqxRibbon("selectAt",b.index-1));if("autoHideGroup"===b.parent.type){c=b.parent.widget,c.jqxRibbon("removeAt",b.index);for(var i=c.children(),j=0,k=0;k<i.length;k++)if("ul"===i[k].nodeName.toLowerCase()){j=a(i[k]).children().length;break}0===j&&d._close(c.current)}}d._updateLayout(d.layout),d.render()},_updateLayout:function(a){for(var b=0;b<a.length;b++)if(a[b].removed===!0){a.splice(b,1);for(var c=0;c<a.length;c++)a[c].index=c}else a[b].items&&this._updateLayout(a[b].items)},_pin:function(b){var c,d,e,f=this,g=b.parent;if(b.alignment)c=b.alignment;else{var h=Math.abs(b.parent.items.length-1-b.index),i=Math.abs(0-b.index);c=i<h?"horizontal"===b.parent.orientation?"left":"top":"horizontal"===b.parent.orientation?"right":"bottom"}var j="top"===c||"left"===c?b.index+1:b.index-1;"left"===c||"right"===c?(d="width",e=b.pinnedWidth):(d="height",e=b.pinnedHeight),"number"==typeof e&&(e=f._getPercentage(e,g,d)+"%"),e||("width"===d?e=8e3/b.parent.widget.width()+"%":"height"===d&&(e=3e3/b.parent.widget.height()+"%")),f._detachContent(b.items,!0);var k={type:"autoHideGroup",alignment:c,items:b.items};k[d]=e,k["min"+d.charAt(0).toUpperCase()+d.slice(1)]=b["min"+d.charAt(0).toUpperCase()+d.slice(1)],k["unpinned"+d.charAt(0).toUpperCase()+d.slice(1)]=b[d],k.allowDrag=b.allowDrag,k.allowDrop=b.allowDrop,k.allowClose=b.allowClose;for(var l=0;l<k.items.length;l++)k.items[l].allowClose=b.allowClose;b.popupContentSize&&(k.popupContentSize=b.popupContentSize);var m=g.items[j];m[d]=parseFloat(m[d])+parseFloat(b[d])-parseFloat(e)+"%",g.items.splice(b.index,0,k),b.removed=!0,a(f._find(b.widget,".jqx-ribbon")[0]).jqxRibbon("destroy"),b.widget.remove(),f._updateLayout(f.layout),f.render(),f._raiseEvent("1",{item:m}),f._raiseEvent("2",{item:k})},_unPin:function(a){var b,c,d,e=this,f=a.parent,g=a.alignment,h="top"===g||"left"===g?a.index+1:a.index-1,i=f.items[h];"left"===g||"right"===g?(b="width",c=a.unpinnedWidth):(b="height",c=a.unpinnedHeight),c||(c="10%"),e._detachContent(a.items,!0);var j={type:"tabbedGroup",alignment:g,items:a.items};if(j["pinned"+b.charAt(0).toUpperCase()+b.slice(1)]=a[b],j.allowDrag=a.allowDrag,j.allowDrop=a.allowDrop,j.allowClose=a.allowClose,a.popupContentSize&&(j.popupContentSize=a.popupContentSize),i){var k=parseFloat(i[b])+parseFloat(a[b])-parseFloat(c)+"%",l=i["min"+b.charAt(0).toUpperCase()+b.slice(1)];l||(l=e["minGroup"+b.charAt(0).toUpperCase()+b.slice(1)]),parseFloat(k)<e._getPercentage(l,f,b)?(c=a[b],k=e._getPercentage(l,f,b)+"%",j["min"+b.charAt(0).toUpperCase()+b.slice(1)]=a.widget.width()):j["min"+b.charAt(0).toUpperCase()+b.slice(1)]=a["min"+b.charAt(0).toUpperCase()+b.slice(1)],j[b]=c,i[b]=k,d=i}else j["min"+b.charAt(0).toUpperCase()+b.slice(1)]=a["min"+b.charAt(0).toUpperCase()+b.slice(1)],j[b]="100%",d=j;f.items.splice(a.index,0,j),a.removed=!0,a.widget.jqxRibbon("destroy"),e._updateLayout(e.layout),e.render(),e._raiseEvent("1",{item:d}),e._raiseEvent("3",{item:j})},_copyItem:function(a,b){var c={};for(var d in a)if(a.hasOwnProperty(d)&&"parent"!==d&&"widget"!==d&&"initialized"!==d)if("position"===d)c.position={x:a.position.x,y:a.position.y};else if("items"===d){for(var e=[],f=0;f<a.items.length;f++)this._copyItem(a.items[f],e);c.items=e}else c[d]=a[d];b.push(c)},_addResizeFeedbacks:function(){var b=this;b._horizontalFeedback=document.createElement("div"),b._horizontalFeedback.className=b.toThemeProperty("jqx-fill-state-normal jqx-layout-resize-feedback jqx-layout-resize-feedback-horizontal"),b._verticalFeedback=document.createElement("div"),b._verticalFeedback.className=b.toThemeProperty("jqx-fill-state-normal jqx-layout-resize-feedback jqx-layout-resize-feedback-vertical"),b._overlay=document.createElement("div"),b._overlay.className=b.toThemeProperty("jqx-layout-overlay"),b.dockingLayout&&b.dockingLayout._windowDragged&&(b._overlay.style.display="block"),b.element.appendChild(b._horizontalFeedback),b.element.appendChild(b._verticalFeedback),b.element.appendChild(b._overlay),b._horizontalFeedback=a(b._horizontalFeedback),b._verticalFeedback=a(b._verticalFeedback),b._overlay=a(b._overlay)},_detachContent:function(b,c){function d(b){if(b.prevent===!0)b.prevent=!1;else{var d=e._find(b.parent.widget,".jqx-ribbon-content-section")[b.index];g=e._detachChildNodes(d),a(d).remove(),b.detachedContent=g,c===!0&&(b.prevent=!0)}}for(var e=this,f=b.length-1;f>=0;f--){
2d1d43c3a2c2 Upgraded jqwidgets to version 4.5.2
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
7 var g,h=b[f],i=h.type;if("layoutGroup"===i||"tabbedGroup"===i||"documentGroup"===i||"autoHideGroup"===i||"floatGroup"===i)h.items&&h.items.length>0&&this._detachContent(h.items);else if("layoutPanel"===i){if("tabbedGroup"===h.parent.type)d(h);else if("autoHideGroup"===h.parent.type)if(h.prevent===!0)h.prevent=!1;else{if("left"===h.parent.alignment||"right"===h.parent.alignment){var j=e._find(h.parent.widget,".jqx-layout-group-auto-hide-content-vertical")[f];g=e._detachChildNodes(j),a(j).remove()}else{var k=e._find(h.parent.widget,".jqx-layout-group-auto-hide-content-horizontal")[f];g=e._detachChildNodes(k),a(k).remove()}h.detachedContent=g,c===!0&&(h.prevent=!0)}}else"documentPanel"===i&&d(h)}},_pxToPercent:function(a,b){function c(c,e){var f,g;return c=parseInt(c,10),g=b?d.element["offset"+e]:a["initialPx"+e],f=(100*c/g).toString()+"%"}for(var d=this,e=0;e<a.items.length;e++){var f=a.items[e];void 0!==f.width?(f.initialPxWidth=f.width,f.width=c(f.width,"Width")):f.initialPxWidth=a.initialPxWidth,void 0!==f.height?(f.initialPxHeight=f.height,f.height=c(f.height,"Height")):f.initialPxHeight=a.initialPxHeight,void 0!==f.unpinnedWidth&&(f.unpinnedWidth=c(f.unpinnedWidth,"Width")),void 0!==f.pinnedWidth&&(f.pinnedWidth=c(f.pinnedWidth,"Width")),void 0!==f.unpinnedHeight&&(f.unpinnedHeight=c(f.unpinnedHeight,"Height")),void 0!==f.pinnedHeight&&(f.pinnedHeight=c(f.pinnedHeight,"Height")),"layoutGroup"===f.type&&f.items&&f.items.length>0&&d._pxToPercent(f,!1)}},_percentToPx:function(a,b,c){return void 0===b?void 0:"string"!=typeof b||"string"==typeof b&&"%"!==b.charAt(b.length-1)?parseFloat(b):parseFloat(b.slice(0,b.length-1))/100*c.widget[a]()},_swapPanelsInLayout:function(a,b,c){var d=a[b];a[b]=a[c],a[b].index=b,a[c]=d,a[c].index=c},_initMenu:function(){var b=this;if(!b._menuInitialized){var c=b.element.id,d="",e=function(a,d,e){b._menu.jqxMenu("disable","dockOption"+c,a),b._menu.jqxMenu("disable","autoHideOption"+c,d),b._menu.jqxMenu("disable","closeOption"+c,e)};if(!b.host.jqxMenu)throw new Error("jqxLayout: Missing reference to jqxmenu.js.");b.dockingLayout&&(d='<li id="floatOption'+c+'">Float</li>');var f=document.createElement("div");f.className=b.toThemeProperty("jqx-layout-context-menu jqx-layout-context-menu-"+c),f.innerHTML="<ul>"+d+'<li id="dockOption'+c+'">Dock</li><li id="autoHideOption'+c+'" style="white-space: nowrap;">Auto Hide</li><li id="closeOption'+c+'">Close</li></ul>',b._menu=a(f),document.body.appendChild(f),b._menu.jqxMenu({theme:b.theme,width:100,height:"auto",autoOpenPopup:!1,mode:"popup",popupZIndex:99999,rtl:b.rtl}),b._menuInitialized=!0,b.addHandler(b._menu,"itemclick.jqxLayout"+c,function(c){b._handleMenuItemClick(a(c.target).text())});var g=function(a){return b.dockingLayout?a.allowClose===!1:a.allowClose!==!0};b.addHandler(b._menu,"shown.jqxLayout"+c,function(){switch(b._contextMenuTarget.type){case"tabbedGroup":e(!0,b._contextMenuTarget.allowPin===!1||b._contextMenuTarget.pinValid===!1,g(b._contextMenuTarget));break;case"layoutPanel":var a=b._contextMenuTarget.parent;"tabbedGroup"===a.type?e(!0,a.allowPin===!1||b._isMiddleTabbedGroup(a),g(a)):"autoHideGroup"===a.type&&e(a.allowUnpin===!1,!0,g(b._contextMenuTarget));break;case"documentPanel":e(!0,!0,g(b._contextMenuTarget))}})}},_addRightClickHandler:function(b,c){var d=this;d.contextMenu===!0&&(d.addHandler(b,"mousedown.jqxLayout"+d.element.id,function(b){if(d.contextMenu===!0&&(b.which&&3===b.which||b.button&&2===b.button)){var e=document.body.scrollTop,f=a(window).scrollLeft();d._contextMenuTarget=c.current,d._menu.jqxMenu("open",parseInt(b.clientX,10)+5+f,parseInt(b.clientY,10)+5+e)}}),d.addHandler(b,"contextmenu.jqxLayout"+d.element.id,function(){if(d.contextMenu===!0)return!1}))},_handleMenuItemClick:function(b){var c=this,d=c._contextMenuTarget.type,e=c._contextMenuTarget.parent;switch(b){case"Float":switch(d){case"tabbedGroup":c.dockingLayout._floatTabbedGroup(c._contextMenuTarget,c._contextMenuTarget.widget);break;case"layoutPanel":if("tabbedGroup"===e.type)c.dockingLayout._removeByDragHandler(void 0,e,e.widget,c._contextMenuTarget.index,!1);else if("autoHideGroup"===e.type){var f=c._find(a(a(c._find(c._contextMenuTarget.parent.widget,".jqx-ribbon-content")[0]).children()[c._contextMenuTarget.index]),".jqx-layout-window")[0].firstChild;c.dockingLayout._floatAutoHideGroup(c._contextMenuTarget,c._contextMenuTarget.title,f)}break;case"documentPanel":c.dockingLayout._removeByDragHandler(void 0,e,e.widget,c._contextMenuTarget.index,!1)}break;case"Dock":c._unPin(c._contextMenuTarget.parent);break;case"Auto Hide":switch(d){case"tabbedGroup":c._pin(c._contextMenuTarget);break;case"layoutPanel":c._pin(c._contextMenuTarget.parent)}break;case"Close":switch(d){case"tabbedGroup":c._close(c._contextMenuTarget);break;case"layoutPanel":c._contextMenuTarget.parent.items.length>1?c._close(c._contextMenuTarget):c._close(c._contextMenuTarget.parent);break;case"documentPanel":c._closeDocumentPanel(c._contextMenuTarget.index,c._contextMenuTarget.parent.items,c._contextMenuTarget.parent,c._contextMenuTarget.parent.widget,!1)}}},_closeDocumentPanel:function(a,b,c,d,e){var f=this;if(e===!1&&d.jqxRibbon("removeAt",a),b.length>1){var g=!1;b[a].removed=!0,f._updateLayout(b);for(var h=0;h<b.length;h++)if(b[h].selected===!0){g=!0;break}setTimeout(function(){g===!1?b[a]?d.jqxRibbon("selectAt",a):d.jqxRibbon("selectAt",a-1):d.jqxRibbon("render")},0)}else f._close(c)},_isMiddleTabbedGroup:function(a){return!(0===a.index||a.index===a.parent.items.length-1)},_validateTabbedGroup:function(b){var c=this,d=!0;if(d=d&&b.parent.items.length>1,d&&2===b.parent.items.length){var e=0===b.index?1:0;"autoHideGroup"===b.parent.items[e].type&&(d=!1)}d&&(d=d&&!c._isMiddleTabbedGroup(b)),b.pinValid=d,d===!1&&a(c._find(b.widget,".jqx-layout-pseudo-window-pin-background")[0]).addClass("jqx-fill-state-disabled")},_mouseupHandler:function(a){var b=this;try{b.dockingLayout&&(b._docUP(a),b.dockingLayout._windowCreate=!1,b.dockingLayout._hideOverlays())}catch(a){}},_toPx:function(a){return"number"==typeof a?a+"px":a},_find:function(a,b){var c=this;return c._oldIE?a.find(b):a[0]?a[0].querySelectorAll(b):a.querySelectorAll(b)},_detachChildNodes:function(b){for(var c=[],d=b.childNodes;d.length>0;)c.push(a(d[0]).detach());return c}})}(jqxBaseFramework);
2d1d43c3a2c2 Upgraded jqwidgets to version 4.5.2
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
8

mercurial