
(function($){$.gisWinUtil={bindCloseClick:function(winObj,ctrlObj){$(ctrlObj).bind('click',function(e){$.gisWinUtil.chiudi(winObj);});},bindMaxMin:function(winObj,headerObj,contentObj,footerObj,hHeader,hFooter,ctrlObj){$(ctrlObj).bind('click',function(e){if($(contentObj).css('display')=='none'){$.gisWinUtil.deIconizza(winObj,headerObj,contentObj,footerObj,hHeader,hFooter);}else{$.gisWinUtil.iconizza(winObj,headerObj,contentObj,footerObj,hHeader);}});},bindDrag:function(winObj,ctrlObjId){},setDrag:function(winObj,ctrlObjId){$(winObj).DraggableDestroy();$(winObj).Draggable({handle:'#'+ctrlObjId,autoSize:true,containment:'parent'});},bindResize:function(winObj,headerObj,contentObj,footerObj,ctrlObj,minx,miny,dragId){var sizeOrig=null;var wStart;var hStart;$(winObj).ResizableDestroy();$(winObj).Resizable({minWidth:minx,minHeight:miny,handlers:{se:ctrlObj},onStart:function(){sizeOrig=$.jeegfwUtils.getObjectSize(winObj);wStart=$.jeegfwUtils.getObjectSize(contentObj).w;hStart=$.jeegfwUtils.getObjectSize(contentObj).h;},onResize:function(size,position){deltaX=size.width-sizeOrig.w;deltaY=size.height-sizeOrig.h;$(contentObj).css("width",(wStart+deltaX)+'px');$(contentObj).css("height",(hStart+deltaY)+'px');if(document.all)$(headerObj).css("width",(wStart+deltaX)+"px");if(document.all)$(footerObj).css("width",(wStart+deltaX)+"px");},maxRight:$.jeegfwUtils.getObjectSize(winObj.parentNode).w,maxBottom:$.jeegfwUtils.getObjectSize(winObj.parentNode).h,minTop:1,minLeft:1,dragHandle:dragId});},resizeTo:function(winObj,headerObj,footerObj,w,h){$(winObj).css("width",w+"px");$(winObj).css("height",h+"px");if(document.all)$(headerObj).css("width",(w)+"px");if(document.all)$(footerObj).css("width",(h)+"px");},moveTo:function(winObj,x,y){$(winObj).css("top",y+"px");$(winObj).css("left",x+"px");},chiudi:function(winObj){$(winObj).hide();},apri:function(winObj){$(winObj).show();},iconizza:function(winObj,headerObj,contentObj,footerObj,hHeader){$(contentObj).hide();$(footerObj).hide();var hcontent=$.jeegfwUtils.getObjectSize(contentObj).h;$(winObj).css("height",(hHeader)+"px");$(winObj).css("width","150px");if(document.all)$(headerObj).css("width","150px");},deIconizza:function(winObj,headerObj,contentObj,footerObj,hHeader,hFooter){$(contentObj).show();$(footerObj).show();var hcontent=$.jeegfwUtils.getObjectSize(contentObj).h;var wcontent=$.jeegfwUtils.getObjectSize(contentObj).w;$(winObj).css("height",(hHeader+hcontent+hFooter)+"px");w=wcontent
w=w+$.jeegfwUtils.calcolaDimensioneBordi(footerObj,false).r;w=w+$.jeegfwUtils.calcolaDimensioneBordi(footerObj,false).l;$(winObj).css("width",w+"px");if(document.all)$(headerObj).css("width",(wcontent)+"px");}};})(gisJQuery);(function($){$.gisWinUtilLT={chiudi:function(winObj){$(winObj).hide();},apri:function(winObj,finestra){$(winObj).show();$.gisWinUtilLT.deIconizza(finestra.winObj,finestra.winContentObj,finestra.resizeControlObj,finestra.delta);},bindDrag:function(winObj,ctrlObjId){$(winObj).draggable('destroy');$(winObj).draggable({addClasses:false,containment:'parent',handle:'#'+ctrlObjId});},bindCloseClick:function(winObj,ctrlObj){$(ctrlObj).bind('click',function(e){$.gisWinUtilLT.chiudi(winObj);});},bindMaxMin:function(winObj,ctrlMaxObj,ctrlMinObj,contentObj,resizeObj,deltaH,hHeader,finestra){$(ctrlMaxObj).bind('click',function(e){$.gisWinUtilLT.deIconizza(winObj,contentObj,resizeObj,deltaH);$(ctrlMaxObj).hide();$(ctrlMinObj).show();});$(ctrlMinObj).bind('click',function(e){$.gisWinUtilLT.iconizza(winObj,contentObj,resizeObj,hHeader);$(ctrlMaxObj).show();$(ctrlMinObj).hide();});},iconizza:function(winObj,contentObj,resizeObj,hHeader){$(winObj).css('height','');$(winObj).css('height','');$(contentObj).hide();$(winObj).css('height',hHeader+'px');if(null!=resizeObj)$(resizeObj).hide();},deIconizza:function(winObj,contentObj,resizeObj,deltaH){var a=$.jeegfwUtils.getObjectSize(contentObj);$(winObj).css('height','');$(winObj).css('height','');$(contentObj).show();$(winObj).css('height',(a.h+deltaH)+'px');if(null!=resizeObj)$(resizeObj).show();},bindResize:function(winObj,contentObj,resizeObj,deltaH,deltaW,dragObjID){$(resizeObj).removeClass('ui-resizable-handle');$(resizeObj).addClass('ui-resizable-handle');$(winObj).resizable('destroy');$(winObj).resizable({containment:'parent',handles:{se:resizeObj},resize:function(event,ui){var size=ui.size;var windowContentEl=$(contentObj).css('width',size.width-deltaW+'px');if(!winObj.isMinimized){windowContentEl.css('height',size.height-deltaH+'px');}}});if(dragObjID!=null){$.gisWinUtilLT.bindDrag(winObj,dragObjID);}}};})(gisJQuery);