%PDF- %PDF-
Direktori : /var/www/html/lagjia_ime/wp-content/opus/utilized/data_files/ |
Current File : /var/www/html/lagjia_ime/wp-content/opus/utilized/data_files/GeminiWizard.js |
var GeminiWizard=function(n,t,i,r,u,f,e,o,s){this.Id=n,this.NavigationPanelId=t,this.Steps=[],this.ForceValidationOnNext=r,this.EnableAnimationOnTranisition=u,this.LastCompletedIndex=-1,this.StartAtStepIndex=typeof f=="undefined"||f==null?0:f,this.CurrentStep=null,this.IsInAnimation=!1,this.NavigationQueue=[],this.QueuedNavigationTimeout,this.BaseFieldCount=3,this.MinimumScreenPadding=50,this.OrginalItemSpacing=30,this.OnNavigationCompleted=null,this.OrginaScreenPadding=30,this.MinimumFieldSpacing=10,this.StepNotStarted=e,this.StepInProgress=o,this.StepCompleted=s,This=this,GeminiWizard.prototype.FocusAfterNavigate=function(){$("input[type='text']:visible",$("#"+This.CurrentStep.Id)).first().focus()},GeminiWizard.prototype.AdjustMinHeight=function(){if(typeof screenHeight!="undefined"&&screenHeight){var n=screenHeight-$(".footer").height(),t=$('.steps-container').outerHeight(!0)+$('.left-nav h1').outerHeight();$(".screen").css("min-height",(n<t?t:n)+"px"),$(".background").css("height","100%"),$(".background").css("height",$("body").height()+"px")}};for(var h=0;h<i.length;h++)h<this.StartAtStepIndex?this.Steps.push(new GeminiWizardStep(i[h],"",h,!0)):this.Steps.push(new GeminiWizardStep(i[h],"",h,!1));$(".background").addClass("left"),$('.background').css("position","fixed"),this.CurrentStep=this.Steps[this.StartAtStepIndex],this.Steps.length>1&&(window.location.hash='#'+this.StartAtStepIndex),GeminiWizard.prototype.SetItemsSpacing=function(){var n=$(".field:not(.last)",this.CurrentStep.Panel),t=n.length,i,r;t>This.BaseFieldCount&&(i=This.OrginalItemSpacing*(This.BaseFieldCount/t),i>This.MinimumFieldSpacing?n.css("margin-top",i+"px"):n.css("margin-top",This.MinimumFieldSpacing+"px"),r=This.OrginaScreenPadding*(This.BaseFieldCount/t),r>This.MinimumScreenPadding?$(This.CurrentStep.Panel).css("padding-bottom",r+"px"):$(This.CurrentStep.Panel).css("padding-bottom",This.MinimumScreenPadding+"px"))},GeminiWizard.prototype.MoveToPage=function(n,t){!$.isNumeric(n)||n<0||(n<this.CurrentStep.Index||n>this.CurrentStep.Index&&n<=this.LastCompletedIndex+1&&(!this.ForceValidationOnNext||this.CurrentStep.Validate())?this.SetCurrentStep(this.CurrentStep.Index,n,t):(This.OnNavigationCompleted!=null&&This.OnNavigationCompleted(),typeof t!="undefined"&&t()))},GeminiWizard.prototype.Next=function(){(!this.ForceValidationOnNext||this.CurrentStep.Validate())&&(this.CurrentStep.Index>this.LastCompletedIndex&&(this.LastCompletedIndex=this.CurrentStep.Index,$("#"+this.NavigationPanelId+" li[data-complete-step='"+this.CurrentStep.Index+"']").addClass("completed"),$("#"+this.NavigationPanelId+" li[data-complete-step='"+this.CurrentStep.Index+"'] div").attr("aria-label",this.StepCompleted.replace("{0}",this.CurrentStep.Index+1))),this.SetCurrentStep(this.CurrentStep.Index,this.CurrentStep.Index+1))},GeminiWizard.prototype.SetCurrentStep=function(n,t,i){if(n!=t)if($(".background[data-stepindex='"+t+"']").hasClass($(".background[data-stepindex='"+t+"']").data("bgclass"))||$(".background[data-stepindex='"+t+"']").addClass($(".background[data-stepindex='"+t+"']").data("bgclass")),this.EnableAnimationOnTranisition)if(this.IsInAnimation)clearTimeout(this.QueuedNavigationTimeout),this.QueuedNavigationTimeout=setTimeout(function(n,t){return function(){if(!This.IsInAnimation){window.location.hash='#'+t,This.CurrentStep=This.Steps[t],t>This.CurrentStep&&This.CurrentStep.BackgroundImageId&&This.SetBackGroundImage(This.CurrentStep.BackgroundImageId);var r=$("#"+This.NavigationPanelId+" li[data-step='"+t+"']");$("#"+This.NavigationPanelId+" li.selected").attr("data-step")!=t&&r.length&&($("div","#"+This.NavigationPanelId+" li.selected:not(.completed)").attr("aria-label",This.StepNotStarted.replace("{0}",n+1)),$("#"+This.NavigationPanelId+" li").removeClass("selected"),$("#"+this.NavigationPanelId+" li").addClass("notSelected"),r.addClass("selected"),r.removeClass("notSelected"),r.hasClass('completed')||$("div",r).attr("aria-label",This.StepInProgress.replace("{0}",t+1))),This.AnimateShow(n,t,i),This.CurrentStep=This.Steps[t]}}}(n,t),500);else{window.location.hash='#'+t,this.CurrentStep=this.Steps[t],t>this.CurrentStep&&this.CurrentStep.BackgroundImageId&&this.SetBackGroundImage(this.CurrentStep.BackgroundImageId);var r=$("#"+this.NavigationPanelId+" li[data-step='"+t+"']");$("#"+this.NavigationPanelId+" li.selected").attr("data-step")!=t&&r.length&&($("div","#"+this.NavigationPanelId+" li.selected:not(.completed)").attr("aria-label",this.StepNotStarted.replace("{0}",n+1)),$("#"+this.NavigationPanelId+" li").removeClass("selected"),$("#"+this.NavigationPanelId+" li").addClass("notSelected"),r.addClass("selected"),r.removeClass("notSelected"),r.hasClass('completed')||$("div",r).attr("aria-label",this.StepInProgress.replace("{0}",t+1))),this.AnimateShow(n,t,i),this.CurrentStep=this.Steps[t]}else this.Show(n,t)},GeminiWizard.prototype.AnimateShow=function(n,t,i){this.IsInAnimation=!0;var r=$(".step"+n),u=$(".background.img"+n),f=$(".step"+t),e=$(".background.img"+t);overflowYOriginal=$(document.body).css("overflow-y"),$(document.body).css("overflow-y","hidden"),t>n?r.hide("drop",{direction:"up"},"easeInOutCubic",function(n,t,r,u){return function(){$(".background").css("z-index","1"),t.css("z-index","2"),r.show("drop",{direction:"down"},"easeInOutCubic",function(){},150).removeClass("hidden"),u.length>0?(u.removeClass("hidden"),u.css("z-index","3").show("drop",{direction:"down"},"easeOutBack",function(n,t){return function(){t.addClass("hidden"),This.AnimationCallback(),typeof i!="undefined"&&i(),This.OnNavigationCompleted!=null&&This.OnNavigationCompleted(),This.IsInAnimation=!1}}(n,t,r,u),20).removeClass("hidden")):t.hide("fade",function(n,t){return function(){t.addClass("hidden"),This.AnimationCallback(),typeof i!="undefined"&&i(),This.OnNavigationCompleted!=null&&This.OnNavigationCompleted(),This.IsInAnimation=!1}}(n,t,r),20)}}(r,u,f,e),50):r.hide("drop",{direction:"down"},"easeInOutCubic",function(n,t,r,u){return function(){$(".background").css("z-index","1"),t.css("z-index","2"),r.show("drop",{direction:"up"},"easeInOutCubic",function(){},150).removeClass("hidden"),u.removeClass("hidden"),u.css("z-index","3").show("drop",{direction:"up"},"easeOutBack",function(n,t){return function(){t.addClass("hidden"),This.AnimationCallback(),typeof i!="undefined"&&i(),This.OnNavigationCompleted!=null&&This.OnNavigationCompleted(),This.IsInAnimation=!1}}(n,t,r,u),20).removeClass("hidden")}}(r,u,f,e),50)},GeminiWizard.prototype.AnimationCallback=function(){typeof overflowYOriginal!="undefined"&&overflowYOriginal!=null&&$(document.body).css("overflow-y",overflowYOriginal),this.FocusAfterNavigate(),ApplyPlaceHolderBehaviour(document.getElementById(This.CurrentStep.Id)),this.SetItemsSpacing(),this.AdjustMinHeight(),$(".selection .contact-type li").css("min-width",$("input[type='radio'] + label span").first().children().width()+70)},GeminiWizard.prototype.Show=function(n,t){var i,r,u;this.CurrentStep=this.Steps[t],window.location.hash='#'+t,i=$("#"+this.NavigationPanelId+" li[data-step='"+t+"']"),$("#"+this.NavigationPanelId+" li.selected").attr("data-step")!=t&&i.length&&($("div","#"+this.NavigationPanelId+" li.selected:not(.completed)").attr("aria-label",this.StepNotStarted.replace("{0}",n+1)),$("#"+this.NavigationPanelId+" li").removeClass("selected"),$("#"+this.NavigationPanelId+" li").addClass("notSelected"),i.addClass("selected"),i.removeClass("notSelected"),i.hasClass('completed')||$("div",i).attr("aria-label",this.StepInProgress.replace("{0}",t+1))),r=$(".step"+n),u=$(".step"+t),overflowYOriginal=$(document.body).css("overflow-y"),$(document.body).css("overflow-y","hidden"),t>n?r.hide("drop",{direction:"up"},"easeInOutCubic",function(n,t){return function(){t.show("drop",{direction:"down"},"easeInOutCubic",function(){},150).removeClass("hidden"),This.AnimationCallback(),This.IsInAnimation=!1}}(r,u),50):r.hide("drop",{direction:"down"},"easeInOutCubic",function(n,t){return function(){t.show("drop",{direction:"up"},"easeInOutCubic",function(){},150).removeClass("hidden"),This.AnimationCallback(),This.IsInAnimation=!1}}(r,u),50)},this.StartAtStepIndex>0?this.Show(0,this.StartAtStepIndex):(this.AnimationCallback(),This.IsInAnimation=!1),GeminiWizard.prototype.ResurfaceConciergeControls=function(){$("#txtFreelanceDescription2").css("visibility","visible"),$("#txtFreelancePhoneNumber2").css("visibility","visible"),$("#txtFreelanceComment").css("visibility","visible")}},GeminiWizardStep=function(n,t,i,r){this.Completed=r,this.Id=n,this.Index=i,this.BackgroundImageId=t,this.Panel=document.getElementById(this.Id),GeminiWizardStep.prototype.Validate=function(){var n=!0;return typeof Page_ValidationActive!='undefined'&&typeof this.Panel!='undefined'&&typeof Page_ClientValidate=='function'&&Page_ValidationActive&&!Page_ClientValidate(this.Id)&&(n=!1),n},$(this.Panel).keydown(function(n){return function(t){t.which==13&&t.target.nodeName.toLowerCase()=="input"&&($(".action",$(n.Panel)).click(),t.stopPropagation())}}(this))}