Combined(1).js 5.4 KB

123
  1. vscs=window.vscs||{};vscs.windows=window.vscs.windows||{};vscs.windows.header=function(){function init(){$dropDownList=$("#toclevel1_menu");$selectedCenterLink=$("#selectedTab a");$headerContainer=$("#ux-header");isRtl=$headerContainer.hasClass("rtl");setDropDownListPosition();$(document).click(function(){hideMenu()});$selectedCenterLink.click(function(event){$dropDownList.is(":visible")?hideMenu():showMenu();event.stopPropagation()});$dropDownList.click(function(event){event.stopPropagation()});$(".ltr div.toclevel3 > a").each(function(){$(this).animate({opacity:1,left:"-=25"},300,function(){})});$(".rtl div.toclevel3 > a").each(function(){$(this).animate({opacity:1,left:"+=25"},300,function(){})})}function setDropDownListPosition(){var logoWidth=$("#ux-header #logo a img").first().width();isRtl?$dropDownList.css("right",logoWidth-1+"px"):$dropDownList.css("left",logoWidth-1+"px");$dropDownList.css("top",$dropDownList.parent().outerHeight()+5+"px")}function showMenu(){$dropDownList.show()}function hideMenu(){$dropDownList.hide()}var $headerContainer,$dropDownList,$selectedCenterLink,isRtl=!1;return{init:init}}();$(document).ready(function(){vscs.windows.header.init()});;
  2. epx=window.epx||{};epx.library=window.epx.library||{};epx.library.navigationResizeModule=function(){function init(){if(!epx.topic||epx.topic.isPrintExperience()!==!0){var $leftNavWidths=$("#leftNavWidths");$leftNavWidths.length>0&&(leftNavWidths=$leftNavWidths.val().split(";"));$leftNav=$("#leftNav");$link=$("#NavigationResize");$increase=$("#NavigationResize > img.cl_nav_resize_open");$reset=$("#NavigationResize > img.cl_nav_resize_close");$content=$("#content");epx.utilities&&(position=epx.utilities.getCookie("TocPosition",position),normalizedPostion());setPosition();$link.keydown(function(e){checkForTPressed(e)});$link.click(function(){resize()});$("html").attr("dir")=="rtl"&&$("#toc-resizable-ew").addClass("rtl");$leftNav.css("max-width",leftNavWidths[maxPosition]+"px");$leftNav.css("min-height",$("#content").height()+"px");$(".toc-resizable-ew").mousedown(function(e){mouseDown(e)});$(window).resize(function(){$leftNav.css("min-height",$("#content").height()+"px")})}}function checkForTPressed(evt){if(evt=evt?evt:event?event:null,evt&&evt.keyCode===84){var target=evt.srcElement!=null?evt.srcElement:evt.target;if(target.tagName.toLowerCase()=="input"||target.tagName.toLowerCase()=="textarea"||evt.ctrlKey||evt.altKey)return;resize()}}function resize(){gotoLeftPredefinedPostion();position++;position>maxPosition&&(position=0,$content.css("width",$("#body").css("width")));setPosition();epx.library.tocFixed&&epx.library.tocFixed.setPosition()}function setPosition(width){width?($leftNav.css("width",width+"px"),position=width>=leftNavWidths[maxPosition]?maxPosition:width<=maxPosition?0:width):position<=maxPosition?$leftNav.css("width",leftNavWidths[position]+"px"):$leftNav.css("width",position+"px");epx.utilities&&epx.utilities.setCookie("TocPosition",position,365,"/",".microsoft.com",null);$("html").attr("dir")=="rtl"?($content.css("margin-right",$leftNav.css("width")),$.browser.msie?$link.css("left","-"+(parseInt($link.css("width").replace("px",""))+1)+"px"):$link.css("left","-"+$link.css("width")),applyRtlSrc($increase),applyRtlSrc($reset)):($content.css("margin-left",$leftNav.css("width")),$link.css("left",$leftNav.css("width")));$link.css("display","inline-block");$increase.css("display","none");$reset.css("display","none");$content.css("width","auto");window.setTimeout(epx.library.navigationResize.resizeComplete,0)}function applyRtlSrc($element){var src=$element.attr("src"),dotIndex;src.indexOf("_Rtl")==-1&&(dotIndex=src.lastIndexOf("."),$element.attr("src",src.substr(0,dotIndex)+"_Rtl."+src.substr(dotIndex+1,src.length-dotIndex-1)))}function resizeComplete(){$increase.css("display",position==maxPosition?"none":"");$reset.css("display",position!=maxPosition?"none":"")}function mouseMove(e){resizing&&(mouseDelayMet||(mouseDelayTimer=setTimeout(function(){mouseDelayMet=!0},MinMouseDelay)),epx.library.tocFixed&&epx.library.tocFixed.setPosition(),mouseDistanceMet(e)&&mouseDelayMet&&(prevPageX=e.pageX,prevPageY=e.pageY,$("html").attr("dir")=="rtl"?setPosition($leftNav.offset().left+$leftNav.width()-e.pageX):setPosition(e.pageX-$leftNav.offset().left)),e.preventDefault())}function selectStart(e){return!1}function mouseDown(e){$(document).one("mouseup",mouseUp);$(document).on("mousemove",mouseMove);$(document).on("selectstart",selectStart);prevPageX=e.pageX;prevPageY=e.pageY;resizing=!0;e.preventDefault()}function mouseUp(){resizing&&($(document).off("mousemove",mouseMove),$(document).off("selectstart",selectStart),resizing=!1,mouseDelayMet=!1)}function mouseDistanceMet(e){return Math.abs(prevPageX-e.pageX)>=MinMouseDist}function gotoLeftPredefinedPostion(){var currWidth,i;if(!(position<=maxPosition))for(currWidth=position,position=maxPosition,i=1;i<leftNavWidths.length;i++)if(currWidth<=leftNavWidths[i]){position=i-1;break}}function normalizedPostion(){position>=leftNavWidths[maxPosition]&&(position=maxPosition)}var position=1,resizing=!1,leftNavWidths=[0,280,380,480],maxPosition=leftNavWidths.length-1,prevPageX=0,prevPageY=0,mouseDelayMet=!1,mouseDelayTimer,MinMouseDist=15,MinMouseDelay=1,$leftNav,$link,$increase,$reset,$content;return{init:init,resize:resize,resizeComplete:resizeComplete,setPosition:setPosition}};epx.library.navigationResize=epx.library.navigationResizeModule();$(document).ready(function(){epx.library.navigationResize.init()});;