/*https://web.agile-labs.com/minZIP/*//*version=3.9.1*/function ownKeys(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),a.push.apply(a,i)}return a}function _objectSpread(e){for(var t=1;te.length)&&(t=e.length);for(var a=0,i=new Array(t);a0&&$("#lblNoOfRecs").html(" of "+totRowCount),$("table#GridView1").each(function(){var e=$(this);if("undefined"!=typeof getAjaxIviewData&&!getAjaxIviewData&&(e.find("tbody>tr>th").length>0&&(e.find("tbody").before(""),e.find("tbody>tr").each(function(){var t=$(this);t.find("th").length>0&&e.find("thead:first").append(t)}),e.find("tbody>tr>th").parent("tr").remove()),0==e.find("table#GridView1 tfoot").length)){for(var t=e.find("thead tr:last th").length,a="",i=0;i";a+="",e.find("tbody").before(a)}}),$("#tasks").parent("li").hasClass("dropdown-submenu")||$("#tasks").html(callParentNew("lcm")[407]+" ").prop({title:callParentNew("lcm")[407]}),$(".print").prop({title:callParentNew("lcm")[408]}).text(callParentNew("lcm")[408]),requestJSON&&"old"!=iviewButtonStyle?$("#ivInSearchInput").attr({placeholder:callParentNew("lcm")[287]}):$("#ivInSearchInput").attr({placeholder:callParentNew("lcm")[415]}),"Iview"==document.title&&"undefined"!=typeof getAjaxIviewData&&getAjaxIviewData){var i=$("#hdnIViewData").val();if(""!=i)try{if(i){createIvir(i);try{nxtScrollSize=100,defaultRecsPerPage=100,dtTotalRecords=getDtRecordCount(),checkIfNextDBRowsExist(!0)}catch(m){console.log(m.message)}}else showParamsPlaceholder(),checkIfNextDBRowsExist(!0)}catch(f){}else showParamsPlaceholder(),checkIfNextDBRowsExist(!0)}else"Iview"!=document.title||"undefined"==typeof ivirHeaderData||"undefined"==typeof getAjaxIviewData||getAjaxIviewData||Object.keys(ivirHeaderData).length&&createIvir(JSON.stringify(ivirHeaderData));if(!ivConfigurations&&"undefined"!=typeof globalIvConfigurations&&globalIvConfigurations)try{processIvConfiguration(ivConfigurations=globalIvConfigurations.configurations.config.length==undefined?[globalIvConfigurations.configurations.config]:globalIvConfigurations.configurations.config)}catch(m){}if("Iview"==document.title&&0!=$("table#GridView1").length&&""!=ivirColumnTypeObj&&($("table#GridView1").removeAttr("cellspacing rules border style"),$("table#GridView1").addClass("table table-row-bordered ms-0 ivirMainGrid "),stripedReport&&$("table#GridView1").addClass("table-striped"),$("#ivContainer").addClass("interactiveReport"),$(".iviewTableWrapper").addClass("interactiveReportWrapper"),requestJSON&&"old"!=iviewButtonStyle&&$(".iviewTableWrapper").addClass("iviewTableWrapperNew")),requestJSON&&"modern"==iviewButtonStyle&&$("body").addClass("modernButtonOptions"),$("#Filterscollapse").on("shown.bs.collapse",function(){$("#myFilters").removeClass("disabled"),$("#searchBar").find(".ccolapsee").removeClass("glyphicon-plus icon-arrows-plus").addClass("glyphicon-minus icon-arrows-minus"),$("#accordion").addClass("shadow")}).on("hidden.bs.collapse",function(){$("#myFilters").removeClass("disabled"),$("#searchBar").find(".ccolapsee").removeClass("glyphicon-minus icon-arrows-minus").addClass("glyphicon-plus icon-arrows-plus"),$("#accordion").addClass("shadow")}),""==ivirColumnTypeObj&&($("#Filterscollapse").off("show.bs.collapse").off("hide.bs.collapse"),$("#Filterscollapse").on("show.bs.collapse",function(){$("#myFilters").hasClass("disabled")||($("#myFilters").addClass("disabled"),$("#accordion").removeClass("shadow"))}).on("hide.bs.collapse",function(){$("#myFilters").hasClass("disabled")||($("#myFilters").addClass("disabled"),$("#accordion").removeClass("shadow"))})),"Iview"==document.title&&(timePickerSecChecker(),$(window).resize(function(){setSmartViewHeight(),setPinedIconContainerWidth()})),$("#lnkPrev").single_double_click(function(e){EnablePageDimmer(e)},function(e){EnablePageDimmer(e)}),$("#lnkNext").single_double_click(function(e){EnablePageDimmer(e)},function(e){EnablePageDimmer(e)}),FocusOnFirstFieldParam(),$("a").keyup(function(e){e.preventDefault(),e.stopPropagation(),13==e.keyCode&&$(this).click()}),$("#nextPrevBtns").is(":visible")||"iview"!=document.title.toLowerCase()?(classicView=!0,$("#chkall").attr("onclick","javascript:CheckAll()"),$("input[name=chkItem]:checkbox").attr("onclick","javascript:ChkHdrCheckbox();")):(classicView=!1,$("#chkall").attr("onclick","javascript:CheckAll()"),$("input[name=chkItem]:checkbox").attr("onclick","javascript:ChkHdrCheckbox();")),$("#recPerPage").click(function(){lastSelRecPerPage=$("#recPerPage option:selected")}),""==ivirColumnTypeObj){scrollCloneHeader();var n=0,r=setInterval(function(){if($(".gridData.clonedHtml thead").is(":visible"))checkHeightOfTable(),clearInterval(r);else{if(n>2e3)return void clearInterval(r);n+=100}},200);submittedOnLoad||"hidden"==$("#hdnIsParaVisible").val()||$(".animationLoading").hide()}else if($(ivirTable).length>0)try{axAttachExternalCustomPlugin(ivDatas,FieldName,HeaderText,ColumnType,HideColumn,isChkBox,filteredColumns,hiddenColumnIndex,ivConfigurations),$(".animationLoading").hide()}catch(m){if(requestJSON&&"old"!=iviewButtonStyle){var l=$("#hdnWebServiceViewName").val();l&&(loadViewName=l,$("#viewTabs li a#".concat(loadViewName)).length>0&&($("#viewTabs li").removeClass("active"),$("#viewTabs li a#".concat(loadViewName)).parent("li").addClass("active")),$("#hdnWebServiceViewName").val("")),getSavedConditionsNew(loadViewName,mergerSmartviewSettings(ivSmartViewSettings&&!$.isEmptyObject(ivSmartViewSettings)&&JSON.stringify(ivSmartViewSettings)||""))}else getSavedConditions()}else $(".animationLoading").hide();"undefined"!=typeof axAttachExternalCustomPlugin?$("table#GridView1").hide():$("table#GridView1").show();var o,s,c;function d(e){$("#idsearch").hasClass("fa-remove")?$("#idsearch").removeClass("fa-remove"):($("#idsearch").addClass("fa-remove"),$("#ivInSearchInput").focus()),e.stopPropagation(),e.preventDefault()}if($("#ivInSearchInput").on("keyup",(o=function(e){if(void 0===ivirDataTableApi){var t=$(this).val().toLowerCase();$("#GridView1 tbody tr").filter(function(){$(this).toggle($(this).text().toLowerCase().indexOf(t)>-1)})}else ivirDataTableApi.search("").columns().search("").draw(),ivirDataTableApi.search($(this).val()).draw()},s=500,c=0,function(){var e=this,t=arguments;clearTimeout(c),c=setTimeout(function(){o.apply(e,t)},s||0)})).on("blur",function(e){requestJSON&&"old"!=iviewButtonStyle&&($(".searchBoxChildContainer").addClass("d-none"),$("#idsearch").removeClass("fa-remove"),$("#idsearch").off("click.searchExpandCollapse"),setTimeout(function(){$("#idsearch").on("click.searchExpandCollapse",d)},500),e.preventDefault(),e.stopPropagation())}).on("mouseover",function(){$(this).focus()}),requestJSON&&"old"!=iviewButtonStyle&&$("#idsearch").on("click.searchExpandCollapse",d),"Iview"==document.title&&(!showParam||recordsExist?($("#accordion").removeClass("shadow"),$("#myFilters").addClass("collapsed").attr("aria-expanded","false"),$("#Filterscollapse").removeClass("in show").attr("aria-expanded","false")):($("#accordion").addClass("shadow"),$("#myFilters").removeClass("collapsed").attr("aria-expanded","true"),$("#Filterscollapse").addClass("in show").attr("aria-expanded","true"))),ShowDimmer(!1),breadCrumbStr){var p=document.getElementsByClassName("page-caption")[0].innerText;$("#breadcrumb .breadcrumb").length>0&&$("#breadcrumb .breadcrumb").remove(),$("#breadcrumb").append('"))}1==requestJSON&&"old"!=iviewButtonStyle&&($("#rowsTxtCountNew").append($("#rowsTxtCount").detach().html()),$("#ivInSearch").append($("#searchBar").detach()),$("#iconsNew .right").off("click.subMenu",".dropdown-submenu a").on("click.subMenu",".dropdown-submenu a",function(e){var t=$(this).next("ul");$.each($("#iconsUl ul").not(t),function(e,t){$(t).is(":visible")&&$(t).hide()}),$(this).next("ul").toggle(),e.stopPropagation(),e.preventDefault()}),$("#iconsNew .right.dropdown").off("click.menu").on("click.menu",function(e){isMobile&&$(".pinIcon, .iconUIPin").hide(),$(this).hasClass("open")&&$(this).find(".dropdown-submenu ul.dropdown-menu").hide()}),$(".dropdown-submenu").off("click","span.pinIcon, span.iconUIPin").on("click","span.pinIcon, span.iconUIPin",function(e){var t=$(this).parents("li");if($(t).hasClass("pinned")){if($(t).attr("id"))$("#pinned"+$(t).attr("id")).remove(),toolbarPinArr.splice(toolbarPinArr.indexOf($(t).attr("id")),1);else{var a=$(t).children("a").attr("id");$("#pinnediconsUl").find("a#pinned"+a).parent("li").remove(),toolbarPinArr.splice(toolbarPinArr.indexOf(a),1)}$(t).removeClass("pinned"),$(this).attr("title","Pin to taskbar")}else pinItemToTaskbar(t),$(t).attr("id")?toolbarPinArr.push($(t).attr("id")):toolbarPinArr.push($(t).children("a").attr("id")),$(t).addClass("pinned"),$(this).attr("title","Unpin from taskbar");ivirMainViewObj.toolbarPin=_toConsumableArray(new Set(toolbarPinArr)),SaveSmartviewJsonToDb("set",JSON.stringify(ivirMainViewObj),callParentNew("mainUserName"),""),e.stopPropagation(),e.preventDefault()}),$(window).on("resize",function(e){$("#viewTabs li").length&&reAdjust()}),$(".scroller-right").single_double_click(function(e){scrollerRightClick()},function(e){scrollerRightClick()}),$(".scroller-left").single_double_click(function(e){scrollerLeftClick()},function(e){scrollerLeftClick()})),$("select.trySelect").select2({placeholder:appGlobalVarsObject.lcm[441],allowClear:!0});try{createPlSmartSelect(".trySelectPl"),createMsSmartSelect(".trySelectMs")}catch(v){}$("#dvSelectedFilters, .tooltiptext").click(function(){$("#Filterscollapse").collapse("toggle")});try{var u,h;null===(u=KTMenu)||void 0===u||u.init(),null===(h=KTApp)||void 0===h||h.initBootstrapTooltips()}catch(v){}setSmartViewHeight(),""!=$("#hdnbElapsTimeGo").val()&&(GetProcessTime(),GetTotalElapsTime(),$("#hdnbElapsTimeGo").val("")),$("#dvRefreshParamIcon").off("click").on("click",refreshIview)}function BeforeWindowClose(){}function generateParamX(){var e=$("#hdnparamValues").val(),t="",a="";if(void 0!==e&&""!=e){t=e.replace(/¿/g,"♣").split("♣");var i=0;for($("#param").val(""),i=0;i<=t.length-1;i++)if(""!=t[i]){var n=t[i].toString().split("~"),r=CheckSpecialCharsInJson(n[0].toString()),l=CheckSpecialCharsInJson(n[1].toString());l.indexOf("&grave;")>=0&&(l=l.replace(/&grave;/g,"~")),a=a+"<"+r+">",a=(a+=l)+"",l=l.replace(/~/g,"`"),""!=$("#param").val()?$("#param").val($("#param").val()+"~"+r+"♠"+l):$("#param").val(r+"♠"+l)}}return a}function onRecPerPageChange(e){if("0"==$("#recPerPage").val()&&0==allowRecPerPageChange){lastSelRecPerPage.prop("selected",!0);var t="ar"==callParentNew("gllangType"),a=$.confirm({theme:"modern",title:appGlobalVarsObject.lcm[155],onContentReady:function(){disableBackDrop("bind")},backgroundDismiss:"false",rtl:t,escapeKey:"buttonB",content:appGlobalVarsObject.lcm[390],buttons:{buttonA:{text:appGlobalVarsObject.lcm[282],btnClass:"btn btn-primary",action:function(){a.close(),ShowDimmer(!0),$("#recPerPage option[value=0]").prop("selected",!0),allowRecPerPageChange=!0,setTimeout("__doPostBack('recPerPage','')",0)}},buttonB:{text:appGlobalVarsObject.lcm[192],btnClass:"btn btn-bg-light btn-color-danger btn-active-light-danger",action:function(){disableBackDrop("destroy"),allowRecPerPageChange=!1,ShowDimmer(!1)}}}});return allowRecPerPageChange=!1,!1}return setTimeout("__doPostBack('recPerPage','')",0),allowRecPerPageChange=!1,!0}function getIviewRecordCount(){try{""==totRowCount&&$("#getIviewRecordCountVal").length>0&&($("#getIviewRecordCountVal").addClass("fa-spin"),ASB.WebService.GetIviewRecordCount(iName,$j("#hdnparamValues").val(),isListView,function(e,t){if(0==e.indexOf("")){var a=e.indexOf("");a=a>-1?a:e.length,totRowCount=parseInt(e.substring("".length,a),10),$("#lblNoOfRecs").html(" "+totRowCount)}$("#getIviewRecordCountVal").addClass("d-none")},function(e){$("#getIviewRecordCountVal").addClass("d-none")}))}catch(e){$("#getIviewRecordCountVal").addClass("d-none"),console.log(e.message)}}function timePickerSecChecker(){if(0==timePickerSec)for(var e=0;e-1){var t=Expressions[e].slice(1,-1).split(":");t.forEach(function(e,a){isNaN(e)||a!=t.length-1||3!=t.length||(timePickerSec=!0)})}}function checkHeightOfTable(){$("#Filterscollapse").hasClass("in")?($("#searchBar").find(".ccolapsee").addClass("glyphicon-minus icon-arrows-minus"),iviewTableWrapperHeightFix()):($("#searchBar").find(".ccolapsee").addClass("glyphicon-plus icon-arrows-plus"),iviewTableWrapperHeightFix())}function cloneTheGridHeader(e,t){if(e&&0==$(".gridData.clonedHtml").length){var a="";a+="",a+=$(".gridData thead").html(),a+="",a+="
",$(a).insertBefore($(".gridData"))}"iview"==document.title.toLowerCase()&&$(".iviewTableWrapper .dvContent").css("width","100%"),"list iview"==document.title.toLowerCase()&&$(".iviewTableWrapper .pnlgrid").css("width","100%"),$(".gridData:not('.clonedHtml') thead th").each(function(e,t){var a=$(this).outerWidth();$(".gridData.clonedHtml thead th").eq(e).css({width:a,"max-width":a})});var i=$(".gridData:not('.clonedHtml')").outerWidth();$(".gridData.clonedHtml").css({width:i,"min-width":i}),"iview"==document.title.toLowerCase()&&$(".iviewTableWrapper .dvContent").css("width",i),"list iview"==document.title.toLowerCase()&&$(".iviewTableWrapper .pnlgrid").css("width",i),$(".gridData:not('.clonedHtml') thead").css("visibility","hidden");try{isNaN(parseInt($(".gridData:not('.clonedHtml')").css("top")))}catch(n){}}function scrollCloneHeader(){var e=$j(".iviewTableWrapper"),t=$j(".gridData.clonedHtml");e.scroll(function(){var a,i=$("body").hasClass("btextDir-rtl");if(a=0-e.scrollLeft(),i)if(jQuery.browser.msie){var n=".dvContent";"List IView"==document.title&&(n="#Panel2");var r=e.outerWidth();a=-(r=$j(n).outerWidth()-r)-a}else{n=".dvContent";"List IView"==document.title&&(n="#divLContainer"),$(".iviewTableWrapper").outerHeight()<=$(n).outerHeight()&&(a+=16)}t.css("left",a+"px")})}function FocusOnFirstFieldParam(e){var t,a=!1;$("#Filterscollapse").hasClass("in")?(e==undefined&&(e=0),(t=$j("#myFiltersBody").find(':input[type!="hidden"]:input[type!="submit"],textarea,select').filter(":visible:enabled").eq(e)).hasClass("date")&&""==t.val()?t.length>0&&(t.focus(),a=!0):t.hasClass("date")?FocusOnFirstFieldParam(e+1):t.length>0&&(t.focus(),a=!0)):FocusOnFirstFieldIView();a||FocusOnFirstFieldIView()}function FocusOnFirstFieldIView(){var e;$j(".gridData").length>0&&((e=$j(".gridData").find(':input[type="checkbox"],a').first()).length>0&&e.focus())}function iviewTableWrapperHeightFix(){if($("#accordion").height()>accordionHeight&&(accordionHeight=$("#accordion").height()),""==ivirColumnTypeObj&&!$(".iviewTableWrapper").hasClass("marginSetted")){$(".iviewTableWrapper").addClass("marginSetted");$("#ivCap1").outerHeight(!0);$(".iviewTableWrapper").css({overflow:"auto"})}adjustRecordsHeight()}function adjustRecordsHeight(){try{for(var e=$(".iviewTableWrapper")[0],t=e.offsetTop,a=(e.offsetLeft,e.offsetWidth,e.offsetHeight),i=0;e.offsetParent;)t+=(e=e.offsetParent).offsetTop,e.offsetLeft;t+a>$(window).height()+window.pageYOffset?(i=t+a-($(window).height()+window.pageYOffset),$(".iviewTableWrapper").css("height",$(".iviewTableWrapper").outerHeight()-i+"px")):t+a<=$(window).height()+window.pageYOffset&&(i=$(window).height()+window.pageYOffset-(t+a),$(".iviewTableWrapper").css("height",$(".iviewTableWrapper").outerHeight()+i+"px")),$("#noRecccord").css("height",$(window).height()-t+"px")}catch(n){}}$.fn.filterByData=function(e,t){return void 0===t?this.filter(function(){return void 0!==$(this).data(e)}):this.filter(function(){return $(this).data(e)==t})},$.fn.single_double_click=function(e,t,a){return this.each(function(){var i=0,n=this;$(this).on("click",function(r){1==++i&&setTimeout(function(){1==i?e.call(n,r):t.call(n,r),i=0},a||300)})})},window.onbeforeunload=BeforeWindowClose;var pickStatus=!0,xmlObj;function pickDownn(){var e=$j("#tblPickData tr").length,t="";"-1"==(t=$j("#tblPickData tr.active").index()+1)&&(t=0),$("#tblPickData tr").removeClass("active"),t-1&&SetParamValues($("#hdnparamValues").val()),window.opener&&!window.opener.closed&&$j(".backbutton").length>0&&$(".backbutton").children().hide()),"Save As"!=document.title&&load(),"List IView"==document.title?(CallLViewFunctions(),$("#showRecDetails").show(),""==$j("#hdnListViewName").val()&&Adjustwin()):Adjustwin(),"ARABIC"==gl_language?$("#dvRecPerPage").css("float","left"):$("#dvRecPerPage").css("float","right"),history.forward(),"Save As"!=document.title&&"IView Picklist"!=document.title&&SetBackForwardButtonProp(enableForwardButton,enableBackButton);try{AxAfterIviewLoad()}catch(ex){}$(".ddlBtn img.flag").addClass("flagvisibility"),$(".ddlBtn dd ul li a").click(function(){var e=$j(this).html();$j(".ddlBtn dt a span").html(e),$j(".ddlBtn dd ul").hide()}),$("#flagSwitcher").click(function(){$j(".ddlBtn img.flag").toggleClass("flagvisibility")}),"function"==typeof commonReadyTasks&&commonReadyTasks();var ivcRef=callParentNew("ivCmdRefresh");null!=ivcRef&&0!=ivcRef&&(eval(callParent("ivCmdRefresh")+"= ''"),showAlertDialog("success",ivcRef)),"inmemdb"==iName&&($("body").addClass("inmemdb"),$('
').insertBefore("#ivirMainChartWrapper"),callCharts()),$(document).on("click",".viewtabRemove",function(e){var t=$(this).data("name");$("#"+t).unbind("click"),deleteViewtab(t),e.stopPropagation()}),$(document).on("click",".viewtabEdit",function(e){var t=$(this);t.data("name");newViewTabClick(t)}),$(document).on("click",".lnkViewTab",function(e){var t=$(this).attr("id");if("viewAddTab"==t||t==window.loadViewName)return e.preventDefault(),!1;if(viewLoadedColumns&&ivirshowHideColumns(["!"]),viewLoadedSort&&ivirSortColumns(["!"]),"main"!=t&&requestJSON&&"old"!=iviewButtonStyle&&"charts"!=t)loadViewTab($(this).attr("id")),toggleGridView("grid"),window.loadViewName=t;else{if((firstTimeParams||requestJSON&&"old"!=iviewButtonStyle&&"main"==t&&isListView)&&requestJSON&&"old"!=iviewButtonStyle&&"charts"!=t){if(firstTimeParams)try{var a=firstTimeParams.params.replace(/`/g,"`"),i=firstTimeParams.paramsList||"";i&&(i=JSON.parse(JSON.stringify(i).replace(/&/g,"&"))),""!=a&&a!=undefined&&SetParamValues(a,i)}catch(ex){}if("main"!=t&&"charts"!=t){var n=ivirMainViewObj.views[t];n&&n.chart&&n.chart.length&&n.chart.length>0&&$("#hdnWebServiceViewName").val(t)}"main"==t&&isListView&&($("#hdnLvSelectedCols").val(""),$("#hdnLvSelectedHyperlink").val(""),$("#hdnLvChangedStructure").val("main")),setTimeout(function(){$("#button1").trigger("click")},0),window.loadViewName=t}else clearExistingPills(),requestJSON&&"old"!=iviewButtonStyle&&"charts"==t&&(ivirMainObj={},ivirMainObj.key="charts",ivirMainObj.chart=getAllCommonCharts()),requestJSON&&"old"!=iviewButtonStyle&&"main"==t&&(ivirMainObj={}),createPillsOnLoad(),$(".nav-tabs a[id="+t+"]").tab("show"),scrollToActiveView(t),window.loadViewName=t;requestJSON&&"old"!=iviewButtonStyle&&"charts"==t?($("#ivirChartPillsList .ivirChartCheckBox:first").change(),$("#ivirChartPillsDiv .ivirChartCheckBox:first").change(),toggleGridView("chart")):toggleGridView("grid")}try{var r;null===(r=KTMenu)||void 0===r||r.init()}catch(l){}})});var ArrDep=new Array;function pgRefresh(){window.location.href=window.location.href,Adjustwin()}function openEMail(e,t){var a=getRecordid();if(a)if("n/a"==a);else{try{window.open("email.aspx?sname="+e+"&stype="+t+"&recordid="+a,"MyPopUp","width=600,height=600")}catch(i){showAlertDialog("warning",appGlobalVarsObject.lcm[356])}}else showAlertDialog("warning",3e3,"client")}function processRow(){var e=form1.elements.length,t="",a=new Array,r=new Array,l=0,o=0;for(i=0;i1?showAlertDialog("warning",3002,"client"):OpenPDFparams(r[0])}function OpenPDFparams(e){if(e){var t=screen.width/2-250,a=screen.height/2-100;try{window.open("pdfparams.aspx?sname="+ivna+"&recid="+e+"&stype="+ivtype,"MyPopUp","width=500,height=200,top="+a+",left="+t)}catch(i){showAlertDialog("warning",appGlobalVarsObject.lcm[356])}}else showAlertDialog("warning",3e3,"client")}var gActionname="",gConfirmmsg="",IviewName="",appl="";function callFileUploadAction(e,t,a,i){if(a&&""!=a)var n="ar"==callParentNew("gllangType"),r=$.confirm({theme:"modern",title:appGlobalVarsObject.lcm[155],onContentReady:function(){disableBackDrop("bind")},rtl:n,backgroundDismiss:"false",escapeKey:"buttonB",content:a,buttons:{buttonA:{text:appGlobalVarsObject.lcm[164],btnClass:"btn btn-primary",acion:function(){r.close(),l()}},buttonB:{text:appGlobalVarsObject.lcm[192],btnClass:"btn btn-bg-light btn-color-danger btn-active-light-danger",action:function(){disableBackDrop("destroy")}}}});function l(){gActionname=e,gConfirmmsg=a,IviewName=t,i=i;createPopup("./fileupload.aspx?act=upload")}r===undefined&&l()}function CallAfterFileUpload(){var e=$j("#cb_sactbu").val();callActWithFile(gActionname,e,iName,gConfirmmsg,appl)}function callActWithFile(e,t,a,n,r){callParentNew("loadFrame()","function");var l="";AxWaitCursor(!0);var o=form1.elements.length,s="",c=new Array,d=0;for(null!=document.getElementById("rXml")&&(s=document.getElementById("rXml").value),i=0;i0&&(c[0]=1);var h=c.length;for(0==d&&"all rows"==r.toString().toLowerCase()&&(h=p),k=0;k0&&""==l&&(l=t.toString());var f=generateParamX(),v="",g="",w=traceSplitStr+"Action-"+e+traceSplitChar,b=new Array;if(""!=l){var $=(g=l).lastIndexOf("\\");-1!=$&&(g=g.substring($+1))}v=v+''+f+"",v+=u,v+="";var y=!1;try{y="true"==(ivScripts[e]["@script"]||"false")}catch(C){}if(0==d&&""!=r&&"all rows"!=r.toString().toLowerCase())showAlertDialog("warning",3001,"client"),AxWaitCursor(!1);else{var x=$j("#hdnKey").val();""!=n?n(n)&&ASB.WebService.CallActionWS(b,b,b,b,b,"","",v,l,"i","","",x,"",y,CActSucceededCallback):ASB.WebService.CallActionWS(b,b,b,b,b,"","",v,l,"i","","",x,"",y,CActSucceededCallback)}closeParentFrame()}function CActFUSucceededCallback(e,t){try{AssignloadValues(e,"Iview"),AxWaitCursor(!1)}catch(a){AxWaitCursor(!1),ShowDimmer(!1),showAlertDialog("error",3003,"client")}}function callAction(e,t,a,n){AxWaitCursor(!0);var r=form1.elements.length,l="",o=new Array,s=0;for(null!=document.getElementById("rXml")&&(l=document.getElementById("rXml").value),i=0;i0&&(o[0]=1);var p=o.length;for(0==s&&"all rows"==n.toString().toLowerCase()&&(p=c),k=0;k'+h+""+d+"",g=new Array;try{var w=$j("#hdnKey").val();ASB.WebService.CallActionWS(g,g,g,g,g,"","",v,"","i","","",w,"",f,CActSucceededCallback)}catch($){showAlertDialog("error",$.toString())}}else AxWaitCursor(!1)}function ActButtonClick(e,t,a,i){if(actionCallFlag==actionCallbackFlag){actionCallFlag=Math.random(),$("#icons").css({"pointer-events":"auto"}),$("#"+e).removeAttr("href"),ShowDimmer(!0);var n=!1,r="";""==a&&(n=!0),$("#GridView1 tr").each(function(){$(this).find("input:checkbox").each(function(){if("chkItem"==$j(this).attr("name")&&1==$j(this).prop("checked")){var e=$j(this).val();r+=e+"♣",n=!0}})}),null!=iframeindex&&iframeindex>-1&&""==r&&(n=!0,r="1♣");try{if(!AxCustomBeforeAction(r,e))return $j("#hdnIsPostBack").val("false"),actionCallbackFlag=actionCallFlag,void $("#icons,#btnSaveTst,.wizardNextPrevWrapper").css({"pointer-events":"auto"})}catch(s){}if($("#hdnSRows").length&&$("#hdnSRows").val(r),$("#hdnAct").length&&$("#hdnAct").val(e),n)if(""!=t)var l="ar"==callParentNew("gllangType"),o=$.confirm({theme:"modern",closeIcon:!1,title:appGlobalVarsObject.lcm[155],onContentReady:function(){disableBackDrop("bind")},backgroundDismiss:"buttonB",escapeKey:"buttonB",rtl:l,content:t,buttons:{buttonA:{text:appGlobalVarsObject.lcm[164],btnClass:"btn btn-primary",action:function(){disableBackDrop("destroy"),o.close(),getAjaxIviewData&&callRemoteDoActionWS(r)}},buttonB:{text:appGlobalVarsObject.lcm[192],btnClass:"btn btn-bg-light btn-color-danger btn-active-light-danger",action:function(){ShowDimmer(!1),actionCallbackFlag=actionCallFlag,$("#icons,#btnSaveTst,.wizardNextPrevWrapper").css({"pointer-events":"auto"})}}}});else!0,callRemoteDoActionWS(r);else!1,showAlertDialog("warning",3001,"client"),ShowDimmer(!1),actionCallbackFlag=actionCallFlag,$("#icons,#btnSaveTst,.wizardNextPrevWrapper").css({"pointer-events":"auto"})}else $("#icons").css({"pointer-events":"none"})}function callRemoteDoActionWS(e){ShowDimmer(!0);var t=callParentNew("getAppSessionKey()","function").substr(2),a=callParentNew("mainUserName"),i=$j("#hdnAct").val().substr(4),n=generateParamX(),r="";r=r+''+n+"",r+=jsonToXml(e),r+="",ivkey=$("#hdnKey").val();var l=!1;try{l="true"==(ivScripts[i]["@script"]||"false")}catch(o){}$.ajax({url:"iview.aspx/ActionBtnClick",type:"POST",cache:!1,async:!0,contentType:"application/json",dataType:"json",data:JSON.stringify({iName:iName,ivkey:ivkey,iXml:r,actName:i,isScript:l}),success:function(t){if("failure"==(t=t.d).result)"inmemdb"==iName&&showAlertDialog("error",appGlobalVarsObject.lcm[278]);else if("Session Authentication failed..."==t.result)parent.window.location.href="../aspx/sess.aspx";else if("inmemdb"==iName){removeValFromIndex=e.substr(0,e.length-1).split("♣");for(var a=removeValFromIndex.length-1;a>=0;a--)ivDatas.splice(parseInt(removeValFromIndex[a])-1,1);ivirDataTableApi.rows().remove(),ivirDataTableApi.rows.add(ivDatas).draw(),callCharts(),showAlertDialog("success",appGlobalVarsObject.lcm[267])}else t.ActBtnNavigation!=undefined?CallAssignLoadVals(t.actResponse,"Action",i,t.ActBtnNavigation):CallAssignLoadVals(t.actResponse,"Action",i);unselectReportRowOnAction&&CheckAll(!1),ShowDimmer(!1),$("#hdnAct").val(""),actionCallbackFlag=actionCallFlag,$("#icons,#btnSaveTst,.wizardNextPrevWrapper").css({"pointer-events":"auto"})},failure:function(e){ShowDimmer(!1),showAlertDialog("error",3028,"client"),$("#hdnAct").val(""),actionCallbackFlag=actionCallFlag,$("#icons,#btnSaveTst,.wizardNextPrevWrapper").css({"pointer-events":"auto"})},error:function(e){ShowDimmer(!1),showAlertDialog("error",3028,"client"),$("#hdnAct").val(""),actionCallbackFlag=actionCallFlag,$("#icons,#btnSaveTst,.wizardNextPrevWrapper").css({"pointer-events":"auto"})}})}function jsonToXml(e){e=e.split("♣");var t="";return $(e).each(function(e,a){if(""!=a){var i,n,r=$.parseXML(""),l=ivirDataTableApi.data()[a-1],o=r.getElementsByTagName("row")[0];for(i in l){var s=i.startsWith("@")?i.substr(1):i;l.hasOwnProperty(i)&&(n=r.createElement(s),$(n).text(l[i]),o.appendChild(n))}t+=o.outerHTML||(new XMLSerializer).serializeToString(o)}}),t}function CActSucceededCallback(e,t){if(!CheckSessionTimeout(e)){try{e=AfterCallActionIview(e)}catch(a){}try{AssignLoadValues(e,"Iview"),AxWaitCursor(!1),showAlertDialog("info",3004,"client")}catch(a){AxWaitCursor(!1),ShowDimmer(!1),showAlertDialog("error",3003,"client")}}}function callHLaction(e,t,a){GetCurrentTime("Iview Action button click(Post back)"),"false"==$j("#hdnIsDirectDB").val()&&"true"==$j("#hdnIsPerfXml").val()&&(t+=1);var i="";if($("#hdnSRows").length&&$("#hdnSRows").val(t.toString()),$("#hdnAct").length&&$("#hdnAct").val("btn_"+e),getAjaxIviewData)i=jsonToXml(t.toString());else{callParentNew("loadFrame()","function");var n="";form1.elements.length;null!=document.getElementById("rXml")&&(n=document.getElementById("rXml").value),-1!=n.indexOf("'+o+""+i+"",c=$j("#hdnKey").val(),d=!1;try{d="true"==(ivScripts[e]["@script"]||"false")}catch(p){}GetProcessTime(),ASB.WebService.CallActionWS(r,r,r,r,r,"","",s,"","i","","",c,"",d,CHlActSucceededCallback)}function ConstructFldDataNodes(e){var t="";if("false"==$("#hdnIsDirectDB").val()&&"true"==$j("#hdnIsPerfXml").val()){var a="";try{(a=new ActiveXObject("Microsoft.XMLDOM")).loadXML(e)}catch(o){try{parser=new DOMParser,a=parser.parseFromString(e,"text/xml")}catch(o){showAlertDialog("error",o.message)}}if(a.childNodes[0]!=undefined)for(var i=a.childNodes[0].attributes,n=0;n")>-1&&(t+="<"+r+">"+l+"")}}return t.replace(/&/g,"&")}function CHlActSucceededCallback(e,t){if(""!=e){var a=e.split("*♠*")[0],i=e.split("*♠*")[1];e=e.split("*♠*")[2],WireElapsTime(a,i,!0)}if(!CheckSessionTimeout(e))try{AssignLoadValues(e,"Iview"),AxWaitCursor(!1);var n=e.split("*$*")[0].toString().replace(new RegExp("\\n","g"),"");if(n=(n=n.replace(new RegExp("\\t","g")," ")).replace(/\\/g,";bkslh")){var r=$j.parseJSON(n);if(!r.hasOwnProperty("error")&&r.command){var l=r.command[0].cmd;"opentstruct"!==l&&"openfile"!==l&&callParentNew("closeFrame()","function")}}}catch(o){AxWaitCursor(!1),ShowDimmer(!1),showAlertDialog("error",3003,"client"),callParentNew("closeFrame()","function")}}function AxWaitCursor(e){e?$("body").css("cursor","wait"):($("body").css("cursor","arrow"),$("body").css("cursor","default"))}function EndRequestHandler(e,t){new Date;if(AddDatePicker(),AddTimePicker(),t.get_error()==undefined){parent.window.scrollTo(0,0),"Iview"!=document.title&&"List IView"!=document.title||(calledFrom="",ShowVisibleFilters(),HighLightSelected(),CheckMyViewFilters(),SetParamValues($j("#hdnparamValues").val()),evalParamExprHandler());try{AxAfterIviewLoad()}catch(a){}Adjustwin(),AxWaitCursor(!1),ShowDimmer(!1)}else"Sys.WebForms.PageRequestManagerTimeoutException"==t.get_error().name&&showAlertDialog("error",3005,"client"),document.body.style.cursor="default",ShowDimmer(!1);document.title,"undefined"!=typeof isFromClearBtn&&1==isFromClearBtn&&($("#form1").find("input:text").each(function(){$(this).val("")}),$("#form1").find("select option").each(function(){"0"!=$(this).text()&&""!=$j(this).text()||$j(this).attr("selected","selected")}),$("#dvParamCont").find("select").each(function(){$(this).val("ALL")}),isFromClearBtn=!1)}function AdjustRowsperPageDiv(){"block"==$j("#showFilter").css("display")&&$j("#dvRowsPerPage").is(":visible")&&$j("#dvRowsPerPage").css("margin-top","-16px")}function load(){Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler),window.status=""}function CallSaveAs(e,t){if(SaveWindow&&SaveWindow.open&&!SaveWindow.closed)SaveWindow.focus();else if(recordsFieldsValidForSave()){var a=screen.width/2-175,i=screen.height/2-75,n=form1.param.value;n=CheckUrlSplChars(n);var r="";$j("#hdnKey").length>0&&""!=$j("#hdnKey").val()&&(r="&ivKey="+$j("#hdnKey").val());var l="SaveAs.aspx?tid="+e+"¶m="+n+"&ivtype="+t+r;try{SaveWindow=window.open(l,"MyPopUp","width=350,height=150,resizable=yes,top="+i+", left="+a)}catch(o){showAlertDialog("warning",appGlobalVarsObject.lcm[356])}}}function CheckUrlSplChars(e){return e=(e=(e=(e=(e=(e=e.replace(/&/g,"&")).replace(/%/g,"%25")).replace(/&/g,"%26")).replace(/'/g,"%27")).replace(/"/g,"%22")).replace(/#/g,"%23")}function SaveAs(e,t){var a=form1.cb_saveas.value;"html"==a?toHTML(e,t,"false"):"excel"==a?toExcel(e,t):"csv"==a?toCSV(e,t):"xml"==a?toXML(e,t):"pdf"==a?toPDF(e,t):"word"==a&&toWord(e,t)}function recordsFieldsValidForSave(){var e=parseInt($("#printRowsMaxLimitField").val()),t=parseInt($("#hdnTotalIViewRec").val());return"undefined"!=typeof getIviewRowCount&&!getIviewRowCount||(e0&&""!=$j("#hdnKey").val()&&(ivKey="&ivKey="+$j("#hdnKey").val()),SetExport("../aspx/htmliv.aspx?ivname="+e+"&ivtype="+t+ivKey+"¶ms=&isPrint="+a,i,e)}function SetExport(e,t,a){if(""!=a)if(requestJSON)SetDatatableExport(e);else try{ASB.WebService.SetExportParams(e,t,a,SuccSetExportParams)}catch(i){}}function SuccSetExportParams(e,t){if(e&&e.url){var a=e.url.indexOf("htmliv.aspx")>-1;try{try{var i=axSetCustomExport(e)||e.url;if(!0===i)return;e.url=i}catch(n){}a||fixUnloadOnWindowSelfDownloads(window),window.open(e.url+(e.url.indexOf("?")>-1?"&axpCache=true":""),a?"toHTML":"_self","width="+$(window).width()+",height="+$(window).width()+",scrollbars=yes,top=0,left=0")}catch(n){a?showAlertDialog("warning",appGlobalVarsObject.lcm[356]):window.onbeforeunload=BeforeWindowClose}}}function SetDatatableExport(e){try{var t=axSetCustomExport({url:e})||e;if(!0===t)return;e=t}catch(a){}exportType=e.indexOf("htmliv.aspx")>-1?"print":e.indexOf("pdfiview.aspx")>-1?"pdf":e.indexOf("excelweb.aspx")>-1?"excel":e,checkNextDBRowsExist?getAllRecords():ExecuteDatatableExport()}function ExecuteDatatableExport(){if(ivirDataTableApi){var e=exportType;switch(exportType){case"print":ShowDimmer(!0),setTimeout(function(){GetCurrentTime("iview "+e+" export"),ivirDataTableApi.button("4").trigger(),GetProcessTime(),GetTotalElapsTime()},0);break;case"pdf":ShowDimmer(!0),setTimeout(function(){GetCurrentTime("iview "+e+" export"),ivirDataTableApi.button("3").trigger(),GetProcessTime(),GetTotalElapsTime()},0);break;case"excel":ShowDimmer(!0),setTimeout(function(){GetCurrentTime("iview "+e+" export"),ivirDataTableApi.button("2").trigger(),GetProcessTime(),GetTotalElapsTime()},0);break;case"html":ShowDimmer(!0),setTimeout(function(){GetCurrentTime("iview "+e+" export"),ivirDataTableApi.button("5").trigger(),GetProcessTime(),GetTotalElapsTime()},0);break;case"json":ShowDimmer(!0),setTimeout(function(){GetCurrentTime("iview "+e+" export"),ivirDataTableApi.button("6").trigger(),GetProcessTime(),GetTotalElapsTime()},0);break;case"copy":ShowDimmer(!0),setTimeout(function(){GetCurrentTime("iview "+e+" export"),ivirDataTableApi.button("0").trigger(),GetProcessTime(),GetTotalElapsTime()},0);break;default:exportType=""}}exportType=""}function toCSV(e,t){var a=form1.param.value;$("#hdnKey").length>0&&""!=$j("#hdnKey").val()&&(ivKey="&ivKey="+$j("#hdnKey").val()),SetExport("../aspx/csviview.aspx?ivname="+e+"&ivtype="+t+ivKey+"¶ms=",a,e)}function toXML(e,t){var a=form1.param.value;$("#hdnKey").length>0&&""!=$j("#hdnKey").val()&&(ivKey="&ivKey="+$j("#hdnKey").val()),SetExport("../aspx/xmliview.aspx?ivname="+e+"&ivtype="+t+ivKey+"¶ms=",a,e)}function toPDF(e,t){var a=form1.param.value;$j("#hdnKey").length>0&&""!=$j("#hdnKey").val()&&(ivKey="&ivKey="+$j("#hdnKey").val()),SetExport("../aspx/pdfiview.aspx?ivname="+e+"&ivtype="+t+ivKey+"¶ms=",a,e)}function toWord(e,t){var a=form1.param.value,i="";$j("#hdnKey").length>0&&""!=$j("#hdnKey").val()&&(i="&ivKey="+$j("#hdnKey").val()),SetExport("../aspx/wordview.aspx?ivname="+e+"&ivtype="+t+i+"¶ms=",a,e)}function fixUnloadOnWindowSelfDownloads(e){e.onbeforeunload=function(){e.onbeforeunload=BeforeWindowClose}}function getRecordid(){var e=form1.elements.length,t="",a=new Array,r=new Array,l=0,o=0;for(i=0;i1?showAlertDialog("warning",3002,"client"):p=r[0],p}function generateFullIviewXML(e){if("undefined"!=typeof getAjaxIviewData&&getAjaxIviewData){var t="";$j("#GridView1 tr").each(function(){$j(this).find("input:checkbox").each(function(){if("chkItem"==$j(this).attr("name")){var e=$j(this).val();t+=e+"♣"}})}),e=""+jsonToXml(t)+"
"}else-1!=e.indexOf("0&&(n=$j("#rXml").val()),i=0;i'+c+"",m="ar"==callParentNew("gllangType");$.confirm({theme:"modern",title:appGlobalVarsObject.lcm[155],rtl:m,onContentReady:function(){disableBackDrop("bind"),AxWaitCursor(!1)},backgroundDismiss:"false",escapeKey:"buttonB",content:appGlobalVarsObject.lcm[5],buttons:{buttonA:{text:appGlobalVarsObject.lcm[279],btnClass:"btn btn-primary",action:function(){try{ASB.WebService.DeleteIviewRow(d,e,h,SuccessCallbackDRow)}catch(t){AxWaitCursor(!1)}}},buttonB:{text:appGlobalVarsObject.lcm[280],btnClass:"btn btn-bg-light btn-color-danger btn-active-light-danger",action:function(){disableBackDrop("destroy")}}}})}else confirmRespDelete()}function GetRecordIdColIndex(e,t){var a=-1;if(t=parseInt(t,10)-1,!isNaN(t))for(var i=e.getElementsByTagName("row")[t].childNodes,n=0;n0&&(n=$j("#rXml").val()),n=generateFullIviewXML(n);try{(xmlObj=new ActiveXObject("Microsoft.XMLDOM")).loadXML(n)}catch(c){try{parser=new DOMParser,xmlObj=parser.parseFromString(n,"text/xml")}catch(c){showAlertDialog("error",c.message)}}xmlObj.getElementsByTagName(xmlObj.childNodes[0].tagName.toString());var l="";xmlObj.getElementsByTagName("row")[a].xml==undefined?(nodeXml=(new XMLSerializer).serializeToString(xmlObj.getElementsByTagName("row")[a]),l+=nodeXml,r=""==r?(new XMLSerializer).serializeToString(xmlObj.getElementsByTagName("row")[m].childNodes[i].text):","+(new XMLSerializer).serializeToString(xmlObj.getElementsByTagName("row")[m].childNodes[i].text)):(l+=xmlObj.getElementsByTagName("row")[a].xml,""==r?r=xmlObj.getElementsByTagName("row")[m].childNodes[i].text:r+=","+xmlObj.getElementsByTagName("row")[m].childNodes[i].text),trace=traceSplitStr+"DeleteRow-"+e+traceSplitChar;var o=''+l+"",s="ar"==callParentNew("gllangType");$.confirm({theme:"modern",title:appGlobalVarsObject.lcm[155],rtl:s,onContentReady:function(){disableBackDrop("bind")},backgroundDismiss:"false",escapeKey:"buttonB",content:appGlobalVarsObject.lcm[5],buttons:{buttonA:{text:appGlobalVarsObject.lcm[279],btnClass:"btn btn-primary",action:function(){ASB.WebService.DeleteIviewRow(r,e,o,SuccessCallbackDRow)}},buttonB:{text:appGlobalVarsObject.lcm[280],btnClass:"btn btn-bg-light btn-color-danger btn-active-light-danger",action:function(){disableBackDrop("destroy")}}}})}function SuccessCallbackDRow(e,t){if(!CheckSessionTimeout(e)){var a=e.split("*#*")[1];void 0!==a&&""!=a&&ClearRedisKeys(a),e.indexOf("*#*")>-1&&(e=e.substring(0,e.indexOf("*#*")));for(var i=e.split("*$*"),n=0;n0?$j("#btnClear").click():pgRefresh()):showAlertDialog("error",r))}}function callOpenAction(e,t){if("response"==iName&&"axrol"==t)return ShowDimmer(!0),void parent.displayBootstrapModalDialog("Add Responsibility","md","430px",!0,"../aspx/AddEditResponsibility.aspx?action=add",!0);GetCurrentTime("Tstruct load on Iview New button click(Post back)"),"opentstruct"==e&&(callParentNew("loadFrame()","function"),GetProcessTime(),$j(location).attr("href","../aspx/tstruct.aspx?transid="+t+"&hdnbElapsTime="+callParentNew("browserElapsTime")),ResetNavGlobalVariables())}function HideFindList(){if(1==IsFindBtnClicked)IsFindBtnClicked=!1;else{var e=document.getElementById("findListPopUp");null!=e&&e.offsetWidth!=undefined&&e.offsetHeight!=undefined&&(e.style.display="none")}}function HideNqIvTaskList(){var e=$j("#taskListPopUp");1==IsNqIvTaskBtnCliked?(IsNqIvTaskBtnCliked=!1,e.show()):e.hide()}document.all||document.captureEvents(Event.MOUSEMOVE);var iX=0,iY=0;function getPosition(e){document.all?(iX=event.clientX+$j("body").scrollLeft,iY=event.clientY+$j("body").scrollTop):(iX=e.pageX,iY=e.pageY)}function FindposImg(){var e=document.getElementById("imgFind");iX=findPosX(e),iY=findPosY(e)}function OnBlrLstItem(e){e.className="popDivBg"}function OnLnkFcs(e){e.style.color="White"}function OnLnkBlr(e){e.style.color="Black"}function openPrint(){window.print()}function OpenPreview(){WebBrowser='',document.body.insertAdjacentHTML("beforeEnd",WebBrowser),WebBrowser1.ExecWB(7,1),WebBrowser1.outerHTML=""}function LoadPopPage(e,t,a,i){GetCurrentTime("Tstruct load on Iview hyperlink click(Post back)"),window.opener?window.opener.parent.disableNavigation=!1:window.parent.disableNavigation=!1;var n=$j("#axpiframe",parent.document);if(i!=undefined&&""!=i||!n.hasClass("frameSplited")||(i="split"),"split"===i)ShowDimmer(!1),callParentNew("OpenOnPropertyBase(".concat(e,")"),"function");else if("default"===i)ReloadIframe(e);else if("newpage"===i)popupFullPage(e);else{a&&""!=a&&"listview"==window.ivtype?(window.parent.tstructPop=a,window.parent.listViewPage=t,e.indexOf("tstruct.aspx?")>-1&&(e+="&AxPop=true")):(e.indexOf("ivtoivload.aspx?")>-1&&(e+="&AxIsPop=true"),e.indexOf("tstruct.aspx?")>-1&&(e+="&AxPop=true"),e.indexOf("ivtstload.aspx?")>-1&&(e+="&AxPop=true").indexOf("ivtstload.aspx?tstname=digno")>-1&&(e=e.replace("ivtstload.aspx","../dsign/DgsignSkipUser.aspx"))),GetProcessTime();var r="".concat(e,"&hdnbElapsTime=").concat(callParentNew("browserElapsTime"));createPopup(r),callParentNew("loadFrame()","function")}}function IsDependent(e){var t=0,a=!1;for(t=0;t0)for(c=0;c0&&window.parent.childWindowHandler[window.parent.childWindowHandler.length-1]!=undefined&&!window.parent.childWindowHandler[window.parent.childWindowHandler.length-1].closed?$j("#hdnGo").val("TSSave"):$j("#hdnGo").val("Go")),$("#hdnparamValues").val(i),!0}function SetParamValues(e){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:"";new Date;if(AddDatePicker(),AddTimePicker(),clearParams)return FillDependentsStartup(!0),void(clearParams=!1);if(""!=e&&e!=undefined){var a=e.split("¿"),i=0;for(i=0;i<=a.length-1;i++)if(""!=a[i]){var n=a[i].split("~");null!=n[1]&&-1!=n[1].indexOf("quot;")&&(n[1]=n[1].replace(/quot;/g,"'"));var r=$j("#"+n[0]);if(r.length){var l=!1,o=r.prop("type");if(t){var s=t[n[0]];s&&("select-one"==o&&"select"==s.type.toLowerCase()?setParamsValueList(n[0],"select",s.value.split("`"),""):"select-multiple"!=o&&"checkbox"!=o&&"multi select"==s.type.toLowerCase()&&setParamsValueList(n[0],"multi select",s.value.split("`"),""))}if("select-one"==o){var c=r[0].options.length;if(1==c&&"ALL"==r.find("option:selected").val()&&(r[0].options.length=0,c=0,l=!0),0==c){for(var d=0;d").attr("value",u[h]).text(u[h]))});$j(r).find("option").each(function(e){if($j(this).text()==n[1])return $j(this).attr("selected","selected"),!1})}}c=r[0].options.length}0==c&&l&&$j(r).each(function(){$j(this).append($j("").attr("value","ALL").text("ALL"))}),$j(r).find("option").each(function(){$j(this).removeAttr("selected"),$j(this).text()==n[1]&&$j(this).prop("selected",!0)})}else if("select-multiple"==o){for(var m=n[1].split("`"),f=0;f0&&$j(r).prop("checked",!0)}else if(parentArr[i]==n[0]&&"Date/Time"==paramType[i]&&"en-us"==dtCulture.toLowerCase()&&""!=n[1]?r.val(GetDateStr(n[1],"d/m/Y","m/d/Y")):r.val(n[1]),r.hasClass("multiFldChk")){n[1]=n[1].replace(/`/g,r.data("separator"));try{r.data("bs.tokenfield")?r.tokenfield("setTokens","string"==typeof n[1]?_toConsumableArray(new Set(n[1].split(r.data("separator")))):n[1]):r.data("selectedlist",n[1])}catch(w){}}$j("#hdnParamChngd").val("true")}}}!loadPop&&window.parent.isSessionCleared&&"Iview"==document.title&&(window.parent.isSessionCleared=!1),$j("#hdnGo").val(""),AxWaitCursor(!1),ShowDimmer(!1)}var clearParams=!1,xmlObj;function ClearParamValues(){isFromClearBtn=!0,callParentNew("loadFrame()","function"),clearParams=!0,$j("#hdnparamValues").val(""),$j("#form1").find("input:text").each(function(){$j(this).val("")}),$j("#form1").find("select option").each(function(){"0"!=$j(this).text()&&""!=$j(this).text()&&$j(this).text()!=aXEmptyOption||$j(this).attr("selected","selected")});var e=!1,t=!1;$j("#dvParamCont").find("select").each(function(){$.each($j(this).find("option"),function(a,i){$(i).text()==aXEmptyOption&&(t=!0),"ALL"==$(i).text()&&(e=!0)}),e?$j(this).val("ALL"):t?$j(this).val(""):$j(this).val($j(this).find("option:selected").val())}),"Iview"==document.title&&(GetParamValues("clear"),$j("#hdnGo").val("clear")),arrCheckedFilter.length=0,selectedFilterItem=""}function clearFilterValues(){callParentNew("loadFrame()","function"),GetParamValues(),arrCheckedFilter.length=0,selectedFilterItem=""}function iviewValidatedate(e){return" / /"==e.val()||0!=isIviewDate(e.val())||(e.val(""),e.focus(),!1)}function isIviewDate(e){if(""==(e=DateDisplayFormat(e)))return!0;var t=DaysArray(12),a=e.indexOf(dtCh),i=e.indexOf(dtCh,a+1),n=e.substring(0,a),r=e.substring(a+1,i),l=e.substring(i+1);strYr=l,"0"==n.charAt(0)&&n.length>1&&(n=n.substring(1)),"0"==r.charAt(0)&&r.length>1&&(r=r.substring(1));for(var o=1;o<=3;o++)"0"==strYr.charAt(0)&&strYr.length>1&&(strYr=strYr.substring(1));return month=parseInt(r),day=parseInt(n),year=parseInt(strYr),-1==a||-1==i?(showAlertDialog("warning",3012,"client"),!1):r.length<1||month<1||month>12?(showAlertDialog("warning",3013,"client"),!1):n.length<1||day<1||day>31||2==month&&day>daysInFebruary(year)||day>t[month]?(showAlertDialog("warning",3014,"client"),!1):4!=l.length||0==year||yearmaxYear?(showAlertDialog("warning",3015,"client",minYear+"^♠^"+maxYear),!1):-1==e.indexOf(dtCh,i+1)&&0!=isInteger(stripCharsInBag(e,dtCh))||(showAlertDialog("warning",3016,"client"),!1)}function Calendarvalidate(e,t){var a=e.which?e.which:event.keyCode,i=t.length;return(46==a||47==a)&&i>0&&(a=49),!(a>31&&(a<48||a>57))}function validatecalendar(e,t){e.which?e.which:event.keyCode,t.length;return!0}function IsInteger(e){var t;for(t=0;t"9")return!1}return!0}function CheckKeyPressed(e,t){document.getElementById(t);"which"in e?e.which:"keyCode"in e?e.keyCode:"keyCode"in window.event?window.event.keyCode:"which"in window.event?e.which:showAlertDialog("error",3017,"client")}function ChkHdrCheckbox(){var e=$j("#chkall"),t=!0;$j("input[name=chkItem]:checkbox").each(function(){var e=$j(this).prop("checked");if(e==undefined||0==e)return t=!1,!1}),t?e.prop("checked",!0):e.prop("checked",!1)}function CreateXmlObject(e){return ie?(xmlObj=new ActiveXObject("Microsoft.XMLDOM")).loadXML(e):(parser=new DOMParser,xmlObj=parser.parseFromString(e,"text/xml")),xmlObj}var ie=document.all;function CheckSpecialCharsInXml(e){return null==e?"":e=(e=(e=(e=e).replace(/&/g,"&")).replace(//g,">")}function FillDependents(e){ValParamChanged(e),AxWaitCursor(!0),ctrlID=e;var t=0,a="",i=0;for(i=0;i"),o=!1;if("accept"==r.toLowerCase())pValue=$("#"+n).val(),"Date/Time"==paramType[t]&&"en-us"==dtCulture.toLowerCase()&&""!=pValue&&(pValue=GetDateStr(pValue,"d/m/Y","m/d/Y"));else if("select"==r.toLowerCase()){if(l=$("#"+n).find("option:selected"),$("option:selected","#"+n).index()>=0){pValue=l.text();try{o=Object.keys(l.data()).filter(function(e){return e.startsWith("optionsss")}).length>0}catch(g){}}}else if("multi select"==r.toLowerCase())pValue="object"==_typeof($j("#"+n).val())?$j("#"+n).val().join("~"):$j("#"+n).val();else if(pValue=$("#"+n).val(),"pick list"==r.toLowerCase()){l=$("#"+n);try{o=Object.keys($j("#"+n).data()).filter(function(e){return e.startsWith("optionsss")}).length>0}catch(g){}}if(pValue=CheckSpecialCharsInXml(pValue),e==n&&"Date/Time"==paramType[t]){if(!isDtSelected&&"accept"==r.toLowerCase())return;isDtSelected=!1}o?function(){if("pick list"==r.toLowerCase()&&""==columnDepArr[i]&&(columnDepArr[i]=Object.keys(l.data()).filter(function(e){return e.startsWith("optionsss")}).map(function(e){return e.replace("optionsss","")}).join()||""),""!=columnDepArr[i]){var e=[];columnDepArr[i].split(",").forEach(function(t){sqlParamsArr.forEach(function(a,i){a.split(",").forEach(function(a){t==a&&e.push(parentArr[i])})})}),depArr[i]=_toConsumableArray(new Set([].concat(_toConsumableArray(depArr[i].split(",")),e))).join()}var t=Object.keys(l.data()).filter(function(e){return e.startsWith("optionsss")}),n="",o="",s="";t.forEach(function(e){n=e.replace("optionsss",""),o=l.data(e),s=l.data("dtypeee".concat(n))||"",a+="<"+n+(s?' dt="'.concat(s,'"'):"")+">"+(""!=pValue?o:"")+""})}():a+="<"+n+">"+pValue+""}for(var s="",c=!1,d=0;d';m+=a;try{isDepsProcessed=!1,ASB.WebService.GetDependParamsValues(m,$("#hdnKey").val(),SuccGetDependents,OnParDepException)}catch(w){isDepsProcessed=!0,AxWaitCursor(!1),ShowDimmer(!1),formSubmited&&$j("#button1").click()}}else FillHiddenValues(e),AxWaitCursor(!1),ShowDimmer(!1);break}if($("#"+e).hasClass("onlyTime"))if(""!=$("#"+e).val()&&(!timePickerSec&&"00:00"!=$("#"+e).val()||timePickerSec&&"00:00:00"!=$j("#"+e).val()))$("#"+e).val(CheckValidTime($j("#"+e).val()));else{for(var f=!1,v=0;v"==e.substring(0,7))showAlertDialog("error",e),this.blur();else{var a=e;try{xmlObj=CreateXmlObject(a)}catch(y){showAlertDialog("error",y.message)}var i=xmlObj.getElementsByTagName("sqlresultset"),n=i[0].childNodes.length,r="",l="",o="",s="",c="",d=new Array,p="",u=0;for(u=0;u=1){i[0].childNodes[u].childNodes[v].childNodes;var g=0;for(g=0;g1&&(f[g]=$(i[0].childNodes[u].childNodes[v].childNodes[g].childNodes).toArray().reduce(function(e,t,a){var i=t.textContent||t.text,n=[];return n.push(_defineProperty({},"optionsss".concat(a>0?t.tagName:l),i)),0!=a&&t.hasAttribute("dt")&&n.push(_defineProperty({},"dtypeee".concat(a>0?t.tagName:l),t.getAttribute("dt"))),e.push(n),e},[]).flat())}null==s&&(s="");var w="";if(w=document.getElementById(l),"Date/Time"==p&&"en-us"==dtCulture.toLowerCase()&&""!=s&&(s=GetDateStr(s,"d/m/Y","m/d/Y")),"select"==o.toLowerCase()&&"false"==c){setParamsValueList(l,o,m,s,f);var b=m.length;m.splice(0,b)}if("select"==o.toLowerCase()&&"true"==c)w.value=s;else if("accept"==o.toLowerCase()&&"false"==c)w.value=s;else if("accept"==o.toLowerCase()&&"true"==c)w.value=s,d.push(l);else if("multi select"==o.toLowerCase()){setParamsValueList(l,o,m,s);b=m.length;m.splice(0,b)}else"pick list"==o.toLowerCase()&&"false"==c&&(w.value=s)}}onLoadDep=!1,isFstParamsBound&&(document.getElementById("button1").click(),isFstParamsBound=!1),$j("#hdnParamHtml").val($j("#dvParamCont").html()),isDepsProcessed=!0,formSubmited&&$j("#button1").click()}}function ValidateOnSubmit(){GetCurrentTime("Iview param Search button click(Post back)"),ShowDimmer(!0);var e,t,a,i,n=!0;if($j("#hdnParamHtml").val($j("#dvParamCont").html()),validateParamOnGo)for(j=0;j0&&$("#Filterscollapse").collapse("hide")&&$j("#hdnParamHtml").val($j("#dvParamCont").html())}else $(".animationLoading").hide(),ShowDimmer(!1);return GetProcessTime(),$j("#hdnbElapsTimeGo").val(callParentNew("browserElapsTime")),n}return formSubmited=!0,!1}function evalParamExprHandler(){parentArr.forEach(function(e,t){"accept"!=typeArr[t].toLowerCase()||""===Expressions[t]||"date()"===Expressions[t].toLowerCase()||exprSuggestions[t]||"true"==hiddenArr[t]||ExprHandler(e,"")})}function FillHiddenValues(e){var t=0,a=0,i="",n="",r=!1;for(t=0;t2&&arguments[2]!==undefined&&arguments[2];if(a&&""==t||!a){expfield=e.toString();for(var i=0;i")).replace(/'/g,"'")).replace(/"/g,"\\")}function ValidateVexpr(e,t){if(!validateParamOnGo){var a=Evaluate(e,e.valueOf(),t,"vexpr","iview");if("T"!=a&&"true"!=a){if("_"==a.substring(0,1)){a=a.substring(1),showAlertDialog("error",a);var i=$j("#"+e);if(i.length){i.val("");try{i.focus()}catch(o){}}return}var n=appGlobalVarsObject.lcm[7];n=n.replace("{0}",a);var r="ar"==callParentNew("gllangType"),l=$.confirm({theme:"modern",closeIcon:!1,title:appGlobalVarsObject.lcm[155],rtl:r,onContentReady:function(){disableBackDrop("bind")},backgroundDismiss:"false",escapeKey:"buttonB",content:n,buttons:{buttonA:{text:appGlobalVarsObject.lcm[164],btnClass:"btn btn-primary",action:function(){disableBackDrop("destroy"),l.close()}},buttonB:{text:appGlobalVarsObject.lcm[192],btnClass:"btn btn-bg-light btn-color-danger btn-active-light-danger",action:function(){setTimeout("document.getElementById('"+e+"').focus();",50)}}}})}}}function SetParamxml(){ShowDimmer(!0),$j("#hdnGo").val("")}var curPageNo=1;function ToggleParams(){var e;e=$j("#paramCont");var t=document.getElementById("imgArrow");"Hide"==(t=$j("#imgArrow")).attr("alt")?(t.attr({alt:"Show",src:"../AxpImages/arrowup.png"}),e.hide()):"Show"==t.attr("alt")&&(t.attr({alt:"Hide",src:"../AxpImages/arrowdown.png"}),e.show())}function CheckAll(e){var t=$j("#chkall");void 0!==e&&t.prop("checked",e),1==t.prop("checked")?$j("input[name=chkItem]:checkbox").each(function(){$j(this).prop("checked",!0)}):$j("input[name=chkItem]:checkbox").each(function(){$j(this).prop("checked",!1)})}function CheckCond(e){var t=$j("#filVal2");"between"==e.value?t.prop("disabled",!1):t.prop("disabled",!0)}var isDtSelected=!1;function AddDatePicker(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"";e=e.startsWith("#")||""==e?e:"#"+e+" ",$(e+".date").length>0&&$(e+".date").parent().flatpickr({dateFormat:dtFormat,disableMobile:"true",wrap:!0})}function compareDates(e){if(iviewValidatedate(e)&&e.parents(".gridDataFilter").length){var t=e.attr("id"),a=$("#"+t.substr(0,t.length-1)+"1"),i=$("#"+t.substr(0,t.length-1)+"2"),n=0,r=0;try{n=a.datepicker("getDate").getTime()}catch(l){}try{r=i.datepicker("getDate").getTime()}catch(l){}n>r&&0!=n&&0!=r&&(e.val(""),e.focus(),showAlertDialog("warning",callParentNew("lcm")[89]))}}function AddTimePicker(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"";e=e.startsWith("#")||""==e?e:"#"+e+" ",$(e+".onlyTime").length>0&&$(e+".onlyTime").parent().flatpickr({enableTime:!0,noCalendar:!0,dateFormat:"H:i K",disableMobile:"true",wrap:!0})}function GetUserLocale(){for(var e=0;e0&&-1!=eval("form1."+listctrl+"["+listcontrol.selectedIndex+"].value")){var fldarr=eval("form1."+listctrl+"["+listcontrol.selectedIndex+"].value");fldarr=fldarr.split("~");for(var fill=0;fill0?e:a[0]),n),0!=t&&c[e]["@dt"]&&i.data("dtypeee".concat(t>0?e:a[0]),c[e]["@dt"])})}}catch(d){}}var depParamCnt=0,isFstParamsBound=!1,onLoadDep=!1;function FillDependentsStartup(e){new Date;depParamCnt=0,isFstParamsBound=e;try{AxFillDepOnLoad()}catch(t){}1==e&&0==isFromClearBtn||""!=$("#hdnSelParamsAftrChWin").val()?(submittedOnLoad=!0,setTimeout(function(){document.getElementById("button1").click(),isFstParamsBound=!1},0)):isFromClearBtn?(submittedOnLoad=!1,isFstParamsBound=!1,onLoadDep=!0,$(".animationLoading").hide()):(submittedOnLoad=!1,onLoadDep=!0,$(".animationLoading").hide())}function showHideTooltip(e){try{document.getElementById(e).title=document.getElementById(e).options[$("#"+e)[0].selectedIndex].text}catch(t){}}function CheckSpCharsInFldValueIview(e){for(var t=e.indexOf("^^dq");-1!=t;)t=(e=e.replace("^^dq","%22")).indexOf("^^dq");return-1!=e.indexOf(";bkslh")&&(e=e.replace(new RegExp(";bkslh","g"),"\\")),e}function showHide(e){var t=e;$j(".ListCust").hide(),$j("#div"+t).show(),$j("#tblProp tr").each(function(){$j(this)[0].className.indexOf("selProperty")>=0&&($j(this).removeClass("selProperty"),$j(this).addClass("RowCust"))}),$j("#"+t).removeClass("RowCust"),$j("#"+t).addClass("selProperty")}function openListActionWin(){$j(".ListCust").hide(),$j("#divtr1").show(),$j("#tr1").css("background-color","#D9D2D4"),$j("#divAction").dialog({title:"List view actions",height:400,width:800,position:"center",modal:!0,buttons:{Ok:function(){ApplyCondition($j(this))}}}),Adjustwin()}function ApplyCondition(e){$j("#button1").click()}function ToggleParamsLstProp(){var e=$j("#divProperty"),t=document.getElementById("imgArrow");"Hide"==(t=$j("#imgArrow")).attr("alt")?(t.attr({alt:"Show",src:"../AxpImages/arrow-up-black.gif"}),e.hide()):"Show"==t.attr("alt")&&(t.attr({alt:"Hide",src:"../AxpImages/arrow-down-black.gif"}),e.show())}function client_OnTreeNodeCheckedList(){var e,t=window.event.srcElement,a=!1;if(ValidateGridDc(),griddccnt>1)(n=t).checked=!1;else if("INPUT"==t.tagName&&"checkbox"==t.type){var n;1!=(e=(n=t).checked)&&0!=e||(""==hdnTree?hdnTree+=n.parentElement.children[1].innerHTML:hdnTree+="~"+n.parentElement.children[1].innerHTML,NewTree.push(n.parentElement.children[1].innerHTML));do{t=t.parentElement}while("TABLE"!=t.tagName);var r=t.rows[0].cells.length,l=(t.rows[0].cells[0],t.parentElement.getElementsByTagName("TABLE")),o=l.length;if(o>=1)for(i=0;ir))return;l[i].rows[0].cells[s-1].getElementsByTagName("INPUT")[0].checked=e}}}}var griddccnt=0;function ValidateGridDc(){griddccnt=0,$j("#tvList input[type=checkbox]:checked").each(function(){-1!=($j(this).parentNode!=undefined?$j(this).parentNode:$j(this))[0].nextSibling.innerHTML.indexOf("Grid DC")&&griddccnt++}),griddccnt>1&&showAlertDialog("warning",3018,"client")}var childdccnt=0,childdccnt1=0,childdccnt2=0;function validateChildDc(){var e=0,t=(window.event.srcElement,document.getElementById("tvList").getElementsByTagName("input"));for(childdccnt1=0,childdccnt2=0,i=0;i=1&&childdccnt2>=2&&showAlertDialog("warning",3018,"client")}var fldName="";function checkDc(){var e=$j("#hdnNoRepeat").val();$j("#tblNorep input[type=checkbox]").each(function(){var e=$j(this)[0].value,t=$j(this),a=0;$j("#tvList input[type=checkbox]:checked").each(function(){var t=$j(this).next("a"),i="",n=t.attr("href").substring(t.attr("href").indexOf(",")+2,t.attr("href").length-2).split("\\");i=n.length>1?n[n.length-1]:n[0].substr(1),e==i&&(a=1)}),0==a&&t.parent().parent().remove()});var t="",a=$j("#hdnParent").val();$j("#tvList input[type=checkbox]:checked").each(function(){if(t=$j(this),-1!=a.indexOf(t[0].nextSibling.innerHTML)&&""!=t[0].nextSibling.innerHTML);else{fldName=0;var e=t[0].nextSibling.innerHTML,i=$j(this).next("a"),n="",r=i.attr("href").substring(i.attr("href").indexOf(",")+2,i.attr("href").length-2).split("\\");n=r.length>1?r[r.length-1]:r[0].substr(1);var l=document.getElementById("tblNorep");if($j("#tblNorep input[type=checkbox]").each(function(){$j(this)[0].title;$j(this)[0].value==n&&(fldName=1)}),0==fldName){var o=$j("#tblNorep tr").length,s=l.insertRow(o).insertCell(),c=document.createElement("input"),d=document.createElement("label");c.type="checkbox",c.value=n,c.title=e,d.innerHTML=e,s.title=e,s.appendChild(c),s.appendChild(d)}}}),""==e&&null==e||$j("#tblNorep input[type=checkbox]").each(function(){var t=$j(this)[0].value;-1!=e.indexOf(t)&&($j(this)[0].checked=!0)})}var fld="";function bindSubtotalColmn(){var e=$j("#hdnSubtotlCaptn").val();$j("#tblSubtotal input[type=checkbox]").each(function(){var e=$j(this)[0].value,a=$j(this),i=0;$j("#tvList input[type=checkbox]:checked").each(function(){t=$j(this);var a=$j(this).next("a"),n="",r=a.attr("href").substring(a.attr("href").indexOf(",")+2,a.attr("href").length-2).split("\\");n=r.length>1?r[r.length-1]:r[0].substr(1),e==n&&(i=1)}),0==i&&a.parent().parent().remove()});var t="",a=$j("#hdnParent").val();$j("#tvList input[type=checkbox]:checked").each(function(){if(t=$j(this),-1!=a.indexOf(t[0].nextSibling.innerHTML)&&""!=t[0].nextSibling.innerHTML);else{fld=0;var i=t[0].nextSibling.innerHTML,n=document.getElementById("tblSubtotal"),r=$j(this).next("a"),l="",o=r.attr("href").substring(r.attr("href").indexOf(",")+2,r.attr("href").length-2).split("\\");if(l=o.length>1?o[o.length-1]:o[0].substr(1),$j("#tblSubtotal input[type=checkbox]").each(function(){var t=$j(this)[0].value;-1!=e.indexOf(t)&&($j(this)[0].checked=!0),t==l&&(fld=1)}),0==fld){var s=$j("#tblSubtotal tr").length,c=n.insertRow(s).insertCell(),d=document.createElement("input"),p=document.createElement("label");d.type="checkbox",d.value=l,d.title=i,p.innerHTML=i+"("+l+")",p.width="20px",c.title=i,c.appendChild(d),c.appendChild(p)}}}),""==e&&null==e||$j("#tblSubtotal input[type=checkbox]").each(function(){var t=$j(this)[0].value;-1!=e.indexOf(t)&&($j(this)[0].checked=!0)}),$j("#tblSubtotal input[type=checkbox]").click(function(){$j(this);var e=this.title,t=$j(this)[0].value;"checked"==$j(this).attr("checked")?($j("#txtFooter").val("Total"),$j("#txtHeader").val(t),$j("#ddlCaption").val(t),$j("#txtSubOrder").val("0")):($j("#txtHeader").val()==e&&($j("#txtFooter").val(""),$j("#txtHeader").val(""),$j("#ddlCaption option:selected").text(""),$j("#ddlCaption option:selected").val(""),$j("#txtSubOrder").val("")),$j("#tblSubtotlList").each(function(){$j("#tblSubtotlList tr > td:contains("+e+")").parent().remove()}))}),$j("#tblSubtotal").each(function(){$j("tr",this).addClass("clsSubtotl")})}function bindSubttlDrpdwn(){$j("#ddlCaption").empty();var e=$j("#hdnParent").val(),t=$j("#ddlCaption"),a='';$j("#tvList input[type=checkbox]:checked").each(function(){if($j(this).parentNode!=undefined)PNode=$j(this).parentNode;else if(PNode=$j(this),-1!=e.indexOf(PNode[0].nextSibling.innerHTML)&&""!=PNode[0].nextSibling.innerHTML);else{var t=PNode[0].nextSibling.innerHTML,i=$j(this).next("a"),n="",r=i.attr("href").substring(i.attr("href").indexOf(",")+2,i.attr("href").length-2).split("\\");n=r.length>1?r[r.length-1]:r[0].substr(1),a+='"}}),t.html(a)}function AddNewListCondition(){var e=document.getElementById("tblFilter"),t="0",a=document.getElementById("FilterRowCount");a&&(t=a.value);var i=(parseInt(t)+1).toString(),n=(c=e.insertRow()).insertCell();n=c.insertCell();var r=document.createElement("input");r.type="radio",r.name="grpAndOr"+i,r.id="radAnd"+i,r.value="And";var l=document.createElement("input");l.type="radio",l.name="grpAndOr"+i,l.id="radOr"+i,l.value="Or",n.appendChild(r);var o=document.createElement("span");o.innerHTML="And",n.appendChild(o),n.appendChild(l),(o=document.createElement("span")).innerHTML="Or",n.appendChild(o),n.style.align="right";var s=document.getElementById("radOr"+i);s&&(s.checked=!0);var c=e.insertRow();i=(parseInt(i)+1).toString();var d=c.insertCell(),p=document.createElement("select");p.id="ddlListFilter"+i,p.className="lblTxt",p.style.width="120px",d.appendChild(p);var u=document.getElementById("ddlListFilter"+i);if(u.length=0,u){var h=document.getElementById("ddlListFilter");if(h.length>0)for(var m=0;m0)for(m=0;m0)for(var n=0;n0)for(n=0;n0)for(n=0;n0)for(n=0;n/g,"")).replace(//g,"")).replace(/>=/g,"")).replace(/<=/g,"")).replace(/'/g,"")).replace(/"/g,"")).replace(/,/g,"")).replace(/./g,"")).replace(/-/g,"")}function saveLViewActionCond(){if("new"==$j("#txtViewName").val().toLowerCase()||""==$j("#txtViewName").val().toLowerCase())return showAlertDialog("warning",3019,"client"),!1;if($j("#txtViewName").val().length>15)return showAlertDialog("warning",3020,"client"),!1;var e=!1;if($j("#tvList input[type=checkbox]:checked").each(function(){e=!0}),!e)return showAlertDialog("warning",3021,"client"),!1;var t="",a=$j("#hdnParent").val();$j("#tvList input[type=checkbox]:checked").each(function(){if(PNode=$j(this),-1!=a.indexOf(PNode[0].nextSibling.innerHTML)&&""!=PNode[0].nextSibling.innerHTML);else{var e=$j(this).next("a"),i="",n=e.attr("href").substring(e.attr("href").indexOf(",")+2,e.attr("href").length-2).split("\\");i=n.length>1?n[n.length-1]:n[0].substr(1),""==t?t=i:t+=","+i}}),$j("#hdnColumns").val(t);var i="",n="";$j("#tblNorep input[type=checkbox]:checked").each(function(){var e=$j(this)[0].value,t=$j(this)[0].title;""==i?i=e:i+=","+e,""==n?n=t:n+=","+t});var r="",l=0,o=$j("#tblSubtotlList tr");o.each(function(){var e=$j("#hdnColumns").val().split(","),t=o.parent()[0].childNodes[l].childNodes[0].innerHTML;if(-1!=e.indexOf(t)){r+="<"+o.parent()[0].childNodes[l].childNodes[0].innerHTML+'st totalontop="'+o.parent()[0].childNodes[l].childNodes[6].innerHTML+'">',r+=""+o.parent()[0].childNodes[l].childNodes[0].innerHTML+"";var a=o.parent()[0].childNodes[l].childNodes[1].innerHTML;-1==a.indexOf("{")?r+="{"+o.parent()[0].childNodes[l].childNodes[1].innerHTML:r+=""+o.parent()[0].childNodes[l].childNodes[1].innerHTML,-1==a.indexOf("}")?r+="}":r+="",r+=""+o.parent()[0].childNodes[l].childNodes[2].innerHTML+"",r+=""+o.parent()[0].childNodes[l].childNodes[3].innerHTML+"",r+=""+o.parent()[0].childNodes[l].childNodes[4].innerHTML+"",r+=""+o.parent()[0].childNodes[l].childNodes[5].innerHTML+"",r+="",l+=1}}),$j("#hdnSubtotal").val(r),$j("#hdnNoRepeat").val(i),$j("#hdnNoRepeatCaptn").val(n);var s=$j("#ddlSortBy option:selected").val();$j("#hdnSort").val(s),$j("#hdnSortCap").val($j("#ddlSortBy option:selected").text()),s=$j("#ddlGroupBy option:selected").val(),$j("#hdnGroup").val(s),$j("#hdnGroupCap").val($j("#ddlGroupBy option:selected").text()),s=$j("#rbtnOrder option:selected").text(),$j("#hdnOrder").val(s),s=$j("#rbtnStatus option:selected").text(),$j("#hdnStatus").val(s),SaveListCondition()}function SaveListCondition(){var e=document.getElementById("tblFilter");rowCount=e.rows.length;var t=document.getElementById("ddlFldTypes"),a="";a+="iif((";for(var i="",n="",r="",l="",o="",s="",c=0;c<=rowCount;c++){if(0==c)var d=document.getElementById("ddlListFilter"),p=document.getElementById("ddlListFilcond"),u=document.getElementById("txtListFilter"),h=document.getElementById("ListfilVal2");else{if(c>0)d=document.getElementById("ddlListFilter"+c),u=document.getElementById("txtFilter"+c),h=document.getElementById("txtFillVal"+c),p=document.getElementById("ddlOpr"+c);if(c>0){var m="grpAndOr"+c;if(n=document.getElementsByName(m))for(var f=0;f=0)&&(""==a?(a+=ConvertToExpr(v,t[d.selectedIndex].Text,$,w,b),i+=ConvertToExprStr(v,g,$,w,b),o+=ConvertToDisplyStr(v,g,$,w,b),s+=ConvertToXml(v,g,t[d.selectedIndex].innerHTML,y,w,b,c+1,r)):("Or"==r?(i+=" Or ",a+="|",o+=" Or "):"And"==r&&(i+=" And ",a+="&",o+=" And "),i+=ConvertToExprStr(v,g,$,w,b),o+=ConvertToDisplyStr(v,g,$,w,b),a+=ConvertToExpr(v,t[d.selectedIndex].Text,$,w,b),s+=ConvertToXml(v,g,t[d.selectedIndex].innerHTML,y,w,b,c,r)),""==l?l=v+"^"+$+"^"+w+"^"+b+"^"+r:l+="|"+v+"^"+$+"^"+w+"^"+b+"^"+r))}return a+="), {T},{F})",document.getElementById("hdnSubTypeCond").value=a,document.getElementById("hdnCondTxt").value=s,$j("#hdnDisplayCond").val(i),$j("#hdnGridCond").val(o),!0}function CheckSpecialCharsInXmlCond(e){return null==e?"":e=(e=(e=(e=(e=(e=e).replace(/<>/g,"<>")).replace(//g,"&>")).replace(/>=/g,">=")).replace(/<=/g,"<=")}function ConvertToXml(e,t,a,i,n,r,l,o){i=i.toLowerCase();n.substring(0,1);var s="";"numeric"==a.toLowerCase()?s="n":"date/time"==a.toLowerCase()?s="d":"character"==a.toLowerCase()&&(s="c");var c=i;return c=CheckSpecialCharsInXml(c),""}function ConvertToExprStr(e,t,a,i,n){return"between"==a.toLowerCase()?"("+t+" ( "+e+" ) "+a+" "+i+","+n+")":"is null"==a.toLowerCase()?"("+t+" "+a+")":"("+t+" ( "+e+" ) "+a+" "+i+")"}function ConvertToDisplyStr(e,t,a,i,n){return"between"==a.toLowerCase()?"("+t+" "+a+" "+i+","+n+")":"is null"==a.toLowerCase()?"("+t+" "+a+")":"("+t+" "+a+" "+i+")"}function ConvertToExpr(e,t,a,i,n){a=a.toLowerCase();var r=!1;":"==i.substring(0,1)&&(r=!0);var l="";if("less than or equal to"==a||"greater than or equal to"==a){var o="";o="less than or equal to"==a?" <= ":" >= ",l=r?"("+e+o+(i=i.substring(1))+") | ("+e+"="+i+")":"Date/Time"==t?"("+e+o+"ctod({"+i+"})) | ("+e+" = ctod({"+i+"}))":"Numeric"==t?"("+e+o+i+") | ("+e+"="+i+")":"("+e+o+"{"+i+"}) | ("+e+"={"+i+"})"}else if("not equal to"==a||"equal to"==a){o="";o="not equal to"==a.toLowerCase()?" # ":" = ",l=r?"("+e+o+(i=i.substring(1))+")":"Date/Time"==t?"("+e+o+" ctod({"+i+"}))":"Numeric"==t?"("+e+o+i+")":"("+e+o+"{"+i+"})"}else if("less than"==a||"greater than"==a){o="";o="<"==a?" < ":" > ",l=r?"("+e+o+(i=i.substring(1))+")":"Date/Time"==t?"("+e+o+"ctod({"+i+"}))":"Numeric"==t?"("+e+o+i+")":"("+e+o+"{"+i+"})"}else if("between"==a){var s=!1;s=":"==n.substring(0,1),r&&s?(l="(("+e+" > "+(i=i.substring(1))+") | ("+e+"="+i+")) &",l+="(("+e+" < "+(n=n.substring(1))+") | ("+e+"="+n+"))"):r&&!s?(i=i.substring(1),"Date/Time"==t?(l="(("+e+">"+i+") | ("+e+"="+i+")) &",l+="(("+e+"< ctod({"+n+"})) | ("+e+" = ctod({"+n+"})))"):(l="(("+e+" < "+i+") | ("+e+"="+i+")) &",l+="(("+e+" < "+n+") | ("+e+"="+n+")))")):!r&&s?(n=n.substring(1),"Date/Time"==t?(l="(("+e+" > ctod({"+i+"})) | ("+e+" = ctod({"+i+"})) &",l+="(("+e+" < "+n+") | ("+e+"="+n+")))"):(l="(("+e+" > "+i+") | ("+e+" = "+i+")) &",l+="(("+e+" < "+n+") | ("+e+" = "+n+")))")):"Date/Time"==t?(l="(("+e+" > ctod({"+i+"})) | ("+e+" = ctod({"+i+"})) &",l+="(("+e+" < ctod({"+n+"})) | ("+e+" = ctod({"+n+"})))"):(l="(("+e+" > "+i+") | ("+e+" = "+i+")) &",l+="(("+e+" < "+n+") | ("+e+" = "+n+")))")}return l}function CreateSubtotal(){var e="",t=($j("#ddlCaption option:selected").text(),$j("#ddlCaption option:selected")[0].value);$j("#tblSubtotlList").each(function(){$j("#tblSubtotlList tr > td:contains("+t+")").parent().remove()}),e+=''+$j("#hdnCbValue").val()+"",e+=''+document.getElementById("txtHeader").value+"",e+=''+document.getElementById("txtFooter").value+"",e+=''+t+"",e+=''+document.getElementById("txtSubOrder").value+"",e+=''+document.getElementById("cbLineSpace").checked+"",e+=''+document.getElementById("cbTtl").checked+"",e+="",$j("#tblSubtotlList").append(e)}function bindSubtotalList(){if(""!=$j("#hdnSubtotalList").val()){for(var e=$j("#hdnSubtotalList").val().split(";"),t=e.length,a="",i=0;i'+n[0]+"",a+=''+n[1]+"",a+=''+n[2]+"",a+=''+n[3]+"",a+=''+n[4]+"",a+=''+n[5]+"",a+=''+n[6]+"",a+=""}$j("#tblSubtotlList").append(a)}return!1}var X=0,Y=0;function FindListPosX(e){var t=0;if(e.offsetParent)for(;e.offsetParent;)t+=e.offsetLeft,e=e.offsetParent;else e.x&&(t+=e.x);return t}function FindListPosY(e){var t=0;if(e.offsetParent)for(;e.offsetParent;)t+=e.offsetTop,e=e.offsetParent;else e.y&&(t+=e.y);return t}function FindListPos(){var e=document.getElementById("imgView");X=FindListPosX(e),Y=FindListPosY(e)}function SetListCondition(e){var t=document.getElementById("tblFilter");if(rowCount=t.rows.length,!(rowCount>0))for(var a=e.split("|"),i=0;i0&&(c=i),0==i?(n=$j("#ddlListFilter"),r=$j("#ddlListFilcond"),l=$j("#txtListFilter"),o=$j("#ListfilVal2")):(n=$j("#ddlListFilter"+c),l=$j("#txtFilter"+c),o=$j("#txtFillVal"+c),r=$j("#ddlOpr"+c)),n.val(s[0]),r.find("option").each(function(){$j(this).val().toLowerCase()==s[1].toLowerCase()&&($j(this).attr("selected","selected"),"Between"==$j(this).text()?(o.prop("disabled",!1),l.prop("disabled",!1)):"Is empty"==$j(this).text()?(o.prop("disabled",!0),l.prop("disabled",!0)):(o.prop("disabled",!0),l.prop("disabled",!1)))}),l.val(s[2]),o.val(s[3]);else{AddCondition();$j("#rad"+s[4]+i).prop("checked",!0),c=i,n=$j("#ddlListFilter"+c),l=$j("#txtFilter"+c),o=$j("#txtFillVal"+c),r=$j("#ddlOpr"+c),n.val(s[0]),r.find("option").each(function(){$j(this).val()==s[1]&&($j(this).attr("selected","selected"),"Between"==$j(this).text()?(document.getElementById(o[0].id).disabled=!1,document.getElementById(l[0].id).disabled=!1):"Is empty"==$j(this).text()?(document.getElementById(o[0].id).disabled=!0,document.getElementById(l[0].id).disabled=!0):(document.getElementById(o[0].id).disabled=!0,document.getElementById(l[0].id).disabled=!1))}),l.val(s[2]),o.val(s[3])}}}var IsexistView=!0;function checkViewName(e){for(var t=0,a=0,i=e.length,n=e;1==IsexistView;)1==IsexistView?(a=e.substr(e.length-1),t=parseInt(a)+1,e=e.substr(0,e.length-1)+t,NameEnd=e.substr(i-1,e.length-2),"nan"==NameEnd.toLowerCase()&&(e=n+"01"),IsexistView=!1,checkddName(e)):(IsexistView=!1,$j("#ddlViewList").val(e));$j("#ddlViewList").val(e),$j("#txtViewName").val(e)}function checkddName(e){for(var t=$j("#hdnViewNames").val().split(","),a=0;a15)return showAlertDialog("warning",3023,"client"),!1;var e=!1;if($j("#tvList input[type=checkbox]:checked").each(function(){e=!0}),!e)return showAlertDialog("warning",3021,"client"),!1;$j("#hdnCondTxt").val(""),$j("#hdnSubtotal").val(""),$j("#hdnSubtotal").val("");var t=$j("#hdnSaveMode").val();isExistCondtn=1;var a=!1;views=$j("#hdnViewNames").val(),lname=$j("#txtViewName").val();for(var i=views.split(","),n=0;nl&&(o=500-l),Adjustwin(l+40+o),showAlertDialog("warning",3024,"client")}function OpenPopup(e,t){$j("#hdnTransId").val();"main"==$j("#txtViewName").val().toLowerCase()&&(t="New"),"New"==t?($j("#lblViewName").show(),$j("#txtViewName").show(),$j("#lblviewtext").hide(),$j("#ddlViewList").hide(),$j("#btnRemove").hide(),checkViewName($j("#hdnViewName").val()),NewViewMode(),$j("#hdnSaveMode").val("New"),$j("#tblFilter").empty(),$j("#ddlSortBy option:selected").val(""),$j("#ddlGroupBy option:selected").val(""),$j("#ddlGroupBy")[0].selectedIndex=0,$j("#ddlSortBy")[0].selectedIndex=0,$j("#hdnSubtotlCaptn").val(""),$j("#tblSubtotlList").empty(),$j("#tblSubtotal input[type=checkbox]").each(function(){$j(this)[0].checked=!1})):"Edit"==t?($j("#hdnSaveMode").val("Edit"),$j("#lblViewName").hide(),$j("#txtViewName").hide(),$j("#lblviewtext").show(),$j("#ddlViewList").show(),$j("#btnRemove").show()):"EditNew"==t&&($j("#lblViewName").show(),$j("#txtViewName").show(),$j("#lblviewtext").show(),$j("#ddlViewList").show(),$j("#btnRemove").hide(),$j("#hdnSaveMode").val("New"),NewViewMode());var a=document.getElementById("divtr1"),i=document.getElementById("divtr2"),n=document.getElementById("divtr3"),r=document.getElementById("divtr4"),l=document.getElementById("divtr5"),o=$j("#hdnViewName").val();$j("#txtViewName").innerHTML=o,$j("#ddlSortBy option:selected").val($j("#hdnSort").val()),$j("#ddlGroupBy option:selected").val($j("#hdnGroup").val()),$j("#ddlListFilcond").val(""),$j("#ddlListFilter").val(""),$j("#txtListFilter").val(""),$j("#ListfilVal2").val(""),$j("#FilterRowCount").val("0"),$j("#txtHeader").val(""),$j("#txtFooter").val(""),$j("#txtSubOrder").val(""),$j("#cbLineSpace").prop("checked",!1),$j("#cbTtl").prop("checked",!1);var s=$j("#hdnOrder").val(),c=$j("#hdnStatus").val();$j('input:radio[name="rbtnOrder"]').filter('[value="'+s+'"]').attr("checked",!0),$j('input:radio[name="rbtnStatus"]').filter('[value="'+c.toUpperCase()+'"]').attr("checked",!0),$j(a).show(),tr1.className="tvRow selProperty",tr2.className="tvRow RowCust",tr3.className="tvRow RowCust",tr4.className="tvRow RowCust",tr5.className="tvRow RowCust",$j(i).hide(),$j(n).hide(),$j(r).hide(),$j(l).hide();var d=window.innerWidth,p=window.innerHeight;"number"!=typeof d&&("CSS1Compat"==document.compatMode?(d=document.documentElement.clientWidth,p=document.documentElement.clientHeight):(d=document.body.clientWidth,p=document.body.clientHeight));var u=document.getElementById("bg");$j(u).show();var h=document.getElementById(e);$j(h).show(),"Microsoft Internet Explorer"==navigator.appName?computedStyle=h.currentStyle:computedStyle=document.defaultView.getComputedStyle(h,null);var m=(d-computedStyle.width.replace("px",""))/2,f=(p-computedStyle.height.replace("px",""))/2;$j(h).css("left",m+"px"),$j(h).css("top",f+"px"),$j(h).css("top","40px");document.getElementById("Panel2");var v=$j(document).height(),g=0;500>v&&(g=500-v),Adjustwin(v+40+g),$("#txtViewName").focus(),jQuery(".popup_bg").bind("click.modalPopupKD",function(e){CloseListActionWin()}),jQuery(document).bind("keydown.modalPopupKD",function(e){e.shiftKey||9!=e.keyCode?e.shiftKey&&9==e.keyCode?$(document.activeElement)[0].id==$("#closeList")[0].id&&(e.preventDefault(),$("#btnSave").focus()):27==e.keyCode&&CloseListActionWin():$(document.activeElement)[0].id==$("#btnSave")[0].id?(e.preventDefault(),$("#closeList").focus()):$(document.activeElement)[0].id==$("#closeList")[0].id&&(e.preventDefault(),$("#txtViewName").focus())})}function CloseListActionWin(){$j("#bg").hide(),$j("#divAction").hide();var e=$j(document).height(),t=0;return 500>e&&(t=500-e),Adjustwin(e+40+t),jQuery(document).unbind("keydown.modalPopupKD"),jQuery(document).unbind("click.modalPopupKD"),!1}function EditView(e){e.onchange="";var t=document.getElementById("ddlViewList"),a=t.options[t.selectedIndex].innerHTML;return"New view"==a?($j("#lblViewName").show(),$j("#txtViewName").show(),$j("#lblviewtext").show(),$j("#ddlViewList").show(),$j("#btnRemove").hide(),checkViewName($j("#hdnViewName").val()),discardChanges(),$j("#ddlSortBy option:selected").val($j("#hdnSort").val()),$j("#ddlGroupBy option:selected").val($j("#hdnGroup").val()),$j("#hdnSaveMode").val("New")):($j("#hdnViewName").val(a),$j("#txtViewName").val(a),$j("#hdnSaveMode").val("Edit"),discardChanges(),BindXml(a)),!0}function BindXml(e){return $j("#txtViewName").val(e),$j("#hdnListViewName").val(e),$j("#btnListView").click(),!0}function BindGrid(e){return $j("#hdnSelectedView").val(e),$j("#btnShowGrid").click(),!0}function pgReload(){ResetNavGlobalVariables(),$j(location).attr("href","tstruct.aspx?transid="+tst);try{window.parent.isSessionCleared||"List IView"!=window.document.title||(ASB.WebService.ClearNavigationSession(),window.parent.isSessionCleared=!0)}catch(e){}}function submitIt(){var e=$j("#EmployeeCode").val();if(""==e){if(""==$j("#dob").val())return ShowDimmer(!1),showAlertDialog("warning",3025,"client"),!1;var t=$j("#EmployeeName").val(),a=$j("#dept").val(),i=$j("#dddo").val(),n=$j("#doa").val();if(""==e&&""==t&&"--"==a&&""==i&&""==n)return ShowDimmer(!1),showAlertDialog("warning",3026,"client"),!1}return!0}function SetColumnName(e,t,a){ShowDimmer(!0),window.parent.dataRowIndex=t,window.parent.clickedColumn=e,a&&(window.parent.isParentIview=a)}function ShowCharts(e,t){if(!$j("#dvCharts").is(":visible"))if(isChartsAvailable){var a=$j("#hdnChartSize").val();""==a||"half"==a?($j("#dvCharts").show(),Adjustwin(),SetContentPanelWidth("half")):ShowChartPopUp(e,t)}else showAlertDialog("error",3027,"client")}function CloseChart(e){var t=$j("#hdnChartSize").val(),a=$j("#dvCharts");a.hide();""==t||"half"==t?ShowFilter():($j("#bg").hide(),a.removeClass("dvChartsPop"),a.addClass("dvChart"),$j("#hdnChartSize").val(""),$j("#lnkChart").text("View Full Screen")),SetContentPanelWidth(""),"full"==t&&("ARABIC"==gl_language&&$j("#divcontainer").css("margin-top","0%"),Adjustwin())}function ShowChartPopUp(e,t){var a=$j("#lnkChart"),i=$j("#dvCharts"),n="";"View Full Screen"==a.text()?($j("#bg").show(),n=isFilterSortEnabled||"true"==isParamVisible.toLowerCase()?"half":"full",i.removeClass("dvChart"),i.addClass("dvChartsPop"),$j("#hdnChartSize").val("full"),t==undefined&&""!=$j("#ddlChartCol1").val()&&""!=$j("#ddlChartCol2").val()&&$j("#btnGetChart1").click(),i.show(),i.css("top","20px"),$j("#lnkChart").text("Close Full Screen"),Adjustwin(100),"ARABIC"==gl_language&&$j("#dvCharts").css("margin-top","1%")):(n="half",$j("#bg").hide(),i.removeClass("dvChartsPop"),i.addClass("dvChart"),$j("#hdnChartSize").val("half"),$j("#lnkChart").text("View Full Screen"),i.show(),t==undefined&&""!=$j("#ddlChartCol1").val()&&""!=$j("#ddlChartCol2").val()&&$j("#btnGetChart1").click(),"ARABIC"==gl_language&&$j("#dvCharts").css("margin-top","-13%")),SetContentPanelWidth(n)}var visibleColumns=new Array,visibleColumnIds=new Array,isFilterSortEnabled=!1,selectedFilterItem="";function CallSorting(e){callParentNew("loadFrame()","function");var t=e.innerHTML.replace("
","~");selectedFilterItem=e.id,$j("#hdnSortColName").val(t),$j("#SortGrid").click()}function CallFilter(e,t,a){e&&(callParentNew("loadFrame()","function"),arrCheckedFilter.push(a),$j("#cb"+a).attr("checked")?$j("#hdnFilterChecked").val("checked"):$j("#hdnFilterChecked").val("unchecked"),selectedFilterItem=a,$j("#hdnFilterBy").val(t),$j("#hdnFilterColName").val(e),$j("#FilterGrid").click(),$j("#showRecDetails").hide())}function HideFilter(e){document.getElementById("hdnIsParaVisible").value="0",(isFilterSortEnabled||"true"==isParamVisible.toLowerCase())&&($j("#leftPanel").hide("slide",{percent:0},500),$j("#showFilter").css("display","block"),$j("#hideFilter").css("display","none"),$j(".dvContent").css("height","auto"),"Microsoft Internet Explorer"!=navigator.appName&&$j(".vertical").css("margin-left","25px"),$j(".hdIvFilter").hide(),e==undefined&&($j("#dvCharts").is(":visible")?$j("#leftPanel").is(":visible")?SetContentPanelWidth("half"):SetContentPanelWidth("halfchart"):($j("#divcontainer").css("width","100%"),SetContentPanelWidth("full")))),"ARABIC"==gl_language?($j("#divcontainer").css("margin-top","0px"),$j("#divcontainer").css("margin-right","0px")):$j("#divcontainer").css("margin-left","0px"),setGridviewWidth()}function SetContentPanelWidth(e){var t;t="List IView"==document.title?$j("#contentPanelGrid"):$j("#contentPanelGridIview"),"full"==e?(t.css("width","100%"),t.css("margin-left","0px"),SetDynamicScrollWdith("full")):"half"==e?(t.css("width","50%"),t.css("margin-left","10px"),SetDynamicScrollWdith("half")):"halfchart"==e?(t.css("width","60%"),t.css("margin-left","10px"),SetDynamicScrollWdith("halfchart")):("ARABIC"==gl_language&&screen.width>1024?$j("#divcontainer").css("width","75%"):("ENGLISH"==gl_language&&screen.width,$j("#divcontainer").css("width","75%")),$j("#contentPanelGrid").css("width","75%"),t.css("width","100%"),t.css("margin-left","10px"),SetDynamicScrollWdith("")),window.opener!=undefined&&""==e&&(t.css("width","65%"),t.css("margin-left","10px"))}function SetDynamicScrollWdith(e){var t=document.getElementById("DivHeaderRow"),a=document.getElementById("DivMainContent"),i=screen.width-50;if(t&&a)if("full"==e)t.style.width=parseInt(i)-16+"px",a.style.width=i+"px";else if("half"==e){var n=i/2;t.style.width=parseInt(n)-16+"px",a.style.width=n+"px"}else if("halfchart"==e){n=i/2;t.style.width=parseInt(n)-16+"px",a.style.width=n+"px"}else{n=75*i/100+50;1024==screen.width&&(n=75*i/100),t.style.width=parseInt(n)-16+"px",a.style.width=n+"px"}}function ShowFilter(){$j("#dvHideFilter").css("display","block"),$j(".dvContent").css("height","60vh"),document.getElementById("hdnIsParaVisible").value="1",$j("#dvCharts").is(":visible")&&$j("#dvCharts").hide(),(isFilterSortEnabled||"true"==isParamVisible.toLowerCase())&&("ARABIC"==gl_language?($j("#divcontainer").css("float","right"),$j("#leftPanel").css("float","right")):($j("#leftPanel").css("float","left"),$j("#leftPanel").css("clear","both"),$j("#divcontainer").css("margin-top","1%"),screen.width,$j("#divcontainer").css("margin-left","0%")),$j("#leftPanel").show("slide",{percent:0},500),$j("#showFilter").css("display","none"),$j("#dvUpdateFilter").css("margin-top","-16px"),$j(".hdIvFilter").show(),$j("#dvCharts").is(":visible")?SetContentPanelWidth("half"):"List IView"==document.title?$j("#contentPanelGrid").css("width","75%"):SetContentPanelWidth("")),setGridviewWidth()}function CallColumnHide(e){callParentNew("loadFrame()","function");var t=e.id,a=e.parentElement.textContent;t&&a&&($j("#hdnHideColName").val(e.value),$j("#HideColumn").click())}function CheckFilterColumns(){for(var e=0;e/g,""))});for(var n=0;n-1&&window.parent.AxIvFilterMinHeader.splice($j.inArray(t,window.parent.AxIvFilterMinHeader),1)}"true"==$j("#filterIvParam").attr("aria-selected")?$j("#leftPanel").css("margin-top","-1%"):$j("#leftPanel").css("margin-top","-2%")}function ShowVisibleFilters(){for(var e=0;e0?$j("#"+selectedFilterItem).addClass("selectedFilterItem"):selectedFilterItem=""}function toExcelWeb(e,t){var a,i;screen.width,screen.height;a=form1.param.value,$j("#hdnKey").length>0&&""!=$j("#hdnKey").val()&&(i="&ivKey="+$j("#hdnKey").val()),SetExport("../aspx/excelweb.aspx?ivname="+e+"&ivtype="+t+i+"¶ms=",a,e)}function MakeStaticHeader(e,t,a,i,n){var r=document.getElementById(e);if(r){var l=document.getElementById("DivHeaderRow"),o=document.getElementById("DivMainContent");i=$j("#GridView1").find("tr:first").height(),a=screen.width-50,l.style.height=i+"px",l.style.width=parseInt(a)-16+"px",l.style.position="relative",l.style.top="0px",l.style.zIndex="10",l.style.verticalAlign="top",o.style.width=a+"px",o.style.height=t+"px",o.style.position="relative",o.style.top=-i+"px",o.style.zIndex="1",l.appendChild(r.cloneNode(!0))}}function OnScrollDiv(e){document.getElementById("DivHeaderRow").scrollLeft=e.scrollLeft}function setGridviewWidth(){$j("#DivMainContent").width()>$j("#GridView1").width()&&$j("#DivMainContent").width($j("#GridView1").width()+17)}function ShowMessageBox(e,t){if(t!=undefined){var a=FindPosY(document.getElementById(t));$j.msgBox({content:e,type:"info"},a)}else $j.msgBox({content:e,type:"info"},100)}function ddToggle(e){e.preventDefault(),$j(".ddlBtn dd ul").toggle()}function ShowViewPopup(){$j("#divFilterView").css("display","block")}function CloseViewPopup(){$j("#divFilterView").css("display","none")}function FilterMyView(e){callParentNew("loadFrame()","function"),$j("#hdnMyViewName").val(e)}function DeleteMyView(e){confirm("Are you sure you want to delete this item?")&&($j("#hdnMyViewName").val(e),$j("#btnDeleteMyView").click())}function CheckMyViewFilters(){var e=$j("#hdnMyViewFilterCol").val();if(""!=e&&void 0!==e){for(var t=new Array,a=e.split("^"),i=0;i4&&arguments[4]!==undefined?arguments[4]:"image",l=arguments.length>5?arguments[5]:undefined,o=arguments.length>6?arguments[6]:undefined,s=arguments.length>7?arguments[7]:undefined,c=arguments.length>8&&arguments[8]!==undefined&&arguments[8];return e!=undefined&&t!=undefined&&i!=undefined?($j.ajax({type:"POST",async:!c,url:"../WebService.asmx/GetFilePathForIviewAttachment",contentType:"application/json;charset=utf-8",data:JSON.stringify({proj:e,tid:t,fldname:a,filename:i,attachtype:r,onlyRecordId:l,onlyFileName:o,isDbAttachment:s,onlygetPath:c}),dataType:"json",success:function(e){n=InvokeDownloadButton(e.d,r,c)},failure:function(e){showAlertDialog("error",3028,"client"),n=[]},error:function(e){showAlertDialog("error",3028,"client"),n=[]}}),n):[]}function SetAxpFileListviewDownload(e,t){var a,i=arguments.length>2&&arguments[2]!==undefined?arguments[2]:"axpfile";return t!=undefined?($j.ajax({type:"POST",async:!0,url:"../WebService.asmx/GetAxpFilePathForListviewAttachment",contentType:"application/json;charset=utf-8",data:JSON.stringify({filepath:e,filename:t}),dataType:"json",success:function(e){a=InvokeDownloadButton(e.d,i)},failure:function(e){showAlertDialog("error",3028,"client"),a=[]},error:function(e){showAlertDialog("error",3028,"client"),a=[]}}),a):[]}function InvokeDownloadButton(e,t){var a=arguments.length>2&&arguments[2]!==undefined&&arguments[2];if(e){if(e=_toConsumableArray(new Set(e.split("♠"))).join("♠"),a)return e.split("♠").map(function(e){try{var t,a,i,n=null===(t=JSON.parse(e))||void 0===t?void 0:null===(a=t.command)||void 0===a?void 0:null===(i=a[0])||void 0===i?void 0:i.cmdval;return n?(JSON.parse(e).basePath||"")+n:e}catch(r){return e}})||[];for(var i=0;i-1)n=n.replace("Error:",""),showAlertDialog("error",n);else{var r=n,l="";try{l=JSON.parse(r)}catch(o){r=(r=r.split(/\\|\//g))[r.length-1],l=JSON.parse('{"command":[{"cmd":"openfile","cmdval":"'+r+'","isatt":"T"}]}')}AssignLoadValues(JSON.stringify(l))}}return[]}a||showAlertDialog("error",3007,"client")}function downloadImage(e){var t=new Image;t.crossOrigin="anonymous",t.src=e;var a=t.src.split(/(\\|\/)/g).pop();t.onload=function(){var e,t=document.createElement("canvas");switch(t.width=this.naturalWidth,t.height=this.naturalHeight,t.getContext("2d").drawImage(this,0,0),a.match(/\.(jpeg|jpg|gif|png)$/)[0]){case".gif":e=t.toDataURL("image/gif");break;case".jpg":case".jpeg":e=t.toDataURL("image/jpeg");break;case".png":default:e=t.toDataURL("image/png")}$("body").append('"),$(".hdnButtonInvokeDownload:last img").click().parents(".hdnButtonInvokeDownload").remove()}}$j(document).keydown(function(e){if(13==e.which&&$j("#dvPickList").is(":visible")&&$j("#tblPickData tr.active").length>0)if(initialSrchVal==$j("#"+$j("#tblPickData").attr("data-pick")).val()){e.preventDefault(),e.stopPropagation();var t=$j("#tblPickData tr.active td").attr("onclick");SetPickVal(t=(t=t.split(";")[0]).substring(23,t.length-2),$j("#tblPickData tr.active td").data()),FillDependents(t.split("^")[0]),pickStatus=!1,selectedRow=0,e.which=-1,initialSrchVal=""}else createPlSmartSelect($j("#"+$j("#tblPickData").attr("data-pick"))[0]);return 40==e.which&&$j("#dvPickList").is(":visible")&&$j("#tblPickData tr.active").length>0?(e.preventDefault(),e.stopPropagation(),pickDownn(),($("#dvPickHead .active").offset().top-$("#dvPickHead").offset().top+$("#dvPickHead .active").outerHeight()>=$("#dvPickHead").height()||$("#dvPickHead .active").offset().top-$("#dvPickHead").offset().top<0)&&$("#dvPickHead").animate({scrollTop:$("#dvPickHead .active").offset().top-$("#dvPickHead").offset().top+$("#dvPickHead .active").height()},100),!1):38==e.which&&$j("#dvPickList").is(":visible")&&$j("#tblPickData tr.active").length>0?(e.preventDefault(),e.stopPropagation(),pickUpp(),$("#dvPickHead").animate({scrollTop:$("#dvPickHead .active").offset().top-$("#dvPickHead").offset().top-$("#dvPickHead .active").height()},100),!1):void 0});var ivAttachRid=[],ivAttachTransid=[],ivAttachRowNo=[],ivFileNames=[],fallback,totalCount;function DownloadSelectedFiles(){$j("#GridView1").find('input[type="checkbox"]:checked').each(function(e){$j(".downloadLink"+(parseInt($j(this).val())-1)).each(function(e){var t=$j(this).attr("href");t!=undefined&&null!=t&&""!=t&&GetFileValues((t=(t=(t=t.replace("javascript:SetFileToDownload(","")).replace(");","")).replace(/'/g,"")).split(","))})}),GetDownloadLink(),ivAttachRid=[],ivAttachTransid=[],ivAttachRowNo=[],ivFileNames=[]}function GetDownloadLink(){try{ivAttachRid.length>0?ASB.WebService.GetZipPathForIviewAttachment(ivAttachRid,ivAttachTransid,ivAttachRowNo,ivFileNames,InvokeDownloadButton,OnException):showAlertDialog("warning",3029,"client")}catch(e){}}function OnException(e){}function GetFileValues(e){ivAttachRid.push(e[0]),ivAttachTransid.push(e[1]),ivAttachRowNo.push(e[2]),ivFileNames.push(e.slice(3).join(","))}function setWidth(){HideFilter(),$j("#showFilter").css("display","block"),$j("#dvHideFilter").css("display","none"),$j("#contentPanelGridIview").css("margin-top","2%")}function parafilterfixer(){0==parafilterfix.myFilters?($j("#myFilters").attr("aria-expanded","false"),$j("#Filterscollapse").hasClass("in")&&iviewTableWrapperHeightFix(),$j("#Filterscollapse").removeClass("in show"),$("#accordion").removeClass("shadow"),$j("#Filterscollapse").attr("aria-expanded","false")):($j("#myFilters").attr("aria-expanded","true"),$j("#Filterscollapse").hasClass("in")||iviewTableWrapperHeightFix(),$j("#Filterscollapse").addClass("in"),$j("#Filterscollapse").attr("aria-expanded","true"),$("#accordion").addClass("shadow"))}function RefreshParams(){$j("#hdnGo").val("refreshparams"),$j("#btnRefreshParams").click()}function UpdateGetParamCache(){$j("#hdnGo").val("updateCache"),clearAdvancedFiltersforNewData(),capturedButton1Submit=!0}function GetStagRecords(e){callParentNew("loadFrame()","function"),$j("#hdnIViewShow").val(e);var t=$j("#hdnKey").val(),a=$j("#hdnStagTableNo").val();if($j("#hdnTotalIViewRec").val()>20){if("More"==e)try{ASB.WebService.GetNextStagPage(t,a,SuccessGetStag)}catch(i){AxWaitCursor(!1)}else if("All"==e)try{ASB.WebService.GetAllPages(t,a,SuccessGetStag)}catch(i){AxWaitCursor(!1)}}else showMore=!1,DisableStagLoad(),callParentNew("closeFrame()","function")}function FailureGetStag(e,t){closeParentFrame()}function SuccessGetStag(e,t){if(!CheckSessionTimeout(e)){var a=$j.parseXML(e),i=$j(a),n=$j("#hdnStagTableNo").val();n=parseInt(n,10)+1,$j("#hdnStagTableNo").val(n);var r=$j("#hdnIViewShow").val();("More"==r?i.find("Table_"+n):$j(i).find("Table1")).each(function(){var e=$j(this),t=$j("[id$=GridView1] tr").eq(1).clone(!0);if(e[0].childNodes)for(var a=0,i=0;i-1?t.find("td").eq(a).html(n.replace('value="1"','value="'+r+'"')):t.find("td").eq(a).html(r);else"Grand Total"==r&&t.find("td").eq(a-1).html(""),t.find("td").eq(a).html(r);a++}}else for(i=0;i-1?t.find("td").eq(i).html(t[0].children[0].innerHTML.replace('value="1"','value="'+r+'"')):t.find("td").eq(i).html(r);else t.find("td").eq(i).html(r)}$j("[id$=GridView1]").append(t)});var l=$j("#GridView1 tr").length-1;"Grand Total"!=$j("#GridView1 tr:last td:eq(0)").text()&&"Grand Total"!=$j("#GridView1 tr:last td:eq(1)").text()&&"Grand Total"!=$j("#GridView1 tr:first td:eq(1)").text()||("Grand Total"==$j("#GridView1 tr:last td:eq(0)").text()?($j("#GridView1 tr:last td:eq(1)").text("Grand Total"),$j("#GridView1 tr:last td:eq(1)").css("color","DarkGreen"),$j("#GridView1 tr:last td:eq(1)").css("font-weight","bold"),$j("#GridView1 tr:last td:eq(0)").text(" ")):"Grand Total"==$j("#GridView1 tr:last td:eq(1)").text()&&($j("#GridView1 tr:last td:eq(2)").text("Grand Total"),$j("#GridView1 tr:last td:eq(2)").css("color","DarkGreen"),$j("#GridView1 tr:last td:eq(2)").css("font-weight","bold"),$j("#GridView1 tr:last td:eq(1)").text(" ")),l-=1);var o=$j("#hdnTotalIViewRec").val();if($j("#nextPrevBtns").is(":visible"))$j("#lblNoOfRecs").text("Total no of Rows : "+l+" of "+o);else if($j("#dvFilteredRowCount").is(":visible")){var s=appGlobalVarsObject.lcm[12];s=s.replace("{0}",l).replace("{1}",o),$j("#lblFilteredRowCount").text(s)}"All"!=r&&l!=o||(showMore=!1,DisableStagLoad()),callParentNew("closeFrame()","function")}}function DisableStagLoad(){var e=$j("#dvStagLoad").find("a");e.removeAttr("onclick"),e.removeClass("handCursor"),e.attr("disabled","disabled"),e.css("color","GREY")}function CheckValidTime(e){var t=e.split(":");return timePickerSec&&2==t.length?t.push(""):timePickerSec&&1==t.length?(t.push(""),t.push("")):timePickerSec||1!=t.length||t.push(""),t[0]=t[0].replace(/[^0-9]/g,"0"),t[1]=t[1].replace(/[^0-9]/g,"0"),timePickerSec&&(t[2]=t[2].replace(/[^0-9]/g,"0")),parseInt(t[0])<=23||(t[0]=(":"==t[0].charAt(1)?"0":t[0].charAt(1))+(":"==t[0].charAt(0)?"0":t[0].charAt(0)),parseInt(t[0])<=23||(t[0]="00")),parseInt(t[1])<=59||(t[1]=(":"==t[1].charAt(1)?"0":t[1].charAt(1))+(":"==t[1].charAt(0)?"0":t[1].charAt(0)),parseInt(t[1])<=59||(t[1]="00")),!timePickerSec||parseInt(t[2])<=59||(t[2]=(":"==t[2].charAt(1)?"0":t[2].charAt(1))+(":"==t[2].charAt(0)?"0":t[2].charAt(0)),parseInt(t[2])<=59||(t[2]="00")),timePickerSec?t[0]+":"+t[1]+":"+t[2]:t[0]+":"+t[1]}function ParamSearchOpen(e){curPageNo=1;var t=e.id,a="",i=t.split("~");a=-1!=t.indexOf("~")?i[1].toString():i[0].toString();var n=$j("#"+a).val();plname=a,plvalue=n,plpageNo=1,plpagesize=10,objid=t,CallPicklistService(plname,plvalue,plpageNo,plpagesize,objid)}function CallPicklistService(fldname,value,pageNo,pagesize,id){ShowDimmer(!0),initialSrchVal=value,GetParamValues("clear"),$j.ajax({type:"POST",url:"../aspx/iview.aspx/GetIviewPickListData",contentType:"application/json;charset=utf-8",data:'{iviewName: "'+iName+'",pageNo: "'+pageNo+'",pageSize: "'+pagesize+'",fieldName :"'+fldname+'",fieldValue :"'+value+'",depParamVal:"'+$j("#hdnparamValues").val()+'"}',dataType:"json",success:function success(data){var resultString="";if(CheckSessionTimeout(data.d))ShowDimmer(!1);else if(data.d.toLowerCase().indexOf('"error":')>-1)showAlertDialog("error",appGlobalVarsObject.lcm[10]),ShowDimmer(!1);else{var json=JSON.parse(data.d.replace(/@/g,"")),attrs=[];if(null!=json.sqlresultset.response){var count=-1;fallback?(count=totalCount,fallback=!1):(count=parseInt(json.sqlresultset.response.totalrows),totalCount=count),resultString=count+"♣";var dfparam=eval("dfval"+fldname);1==count&&(json.sqlresultset.response.row=[json.sqlresultset.response.row]),$j.each(json.sqlresultset.response.row,function(e,t){var a=json.sqlresultset.response.row[e];if("object"==_typeof(a)&&Object.keys(a).length>1){var i="";Object.keys(a).forEach(function(e,t){var n=a[e],r="string"==typeof n?n:n["#text"];r=CheckSpecialCharsInHTML(r);var l=n.dt||"";i+=" data-optionsss"+(0==t?fldname:e)+'="'+r+'" '+(0!=t&&l?" data-dtypeee"+(0==t?fldname:e)+'="'+l+'" ':"")+" "}),attrs.push(i)}else attrs.push("");"object"!=_typeof(a)&&""!=dfparam&&-1!=a.indexOf("~")?resultString+=("string"==typeof a[dfparam.split("|")[0].split("~")[0].toUpperCase()]?a[dfparam.split("|")[0].split("~")[0].toUpperCase()]:a[dfparam.split("|")[0].split("~")[0].toUpperCase()]["#text"])+"¿":resultString+=("string"==typeof a[Object.keys(a)[0]]?a[Object.keys(a)[0]]:a[Object.keys(a)[0]]["#text"])+"¿"})}AssignPLValues(resultString,pagesize,id,fldname,attrs)}},failure:function(e){showAlertDialog("error",appGlobalVarsObject.lcm[10]),ShowDimmer(!1),AxWaitCursor(!1)},error:function(e){showAlertDialog("error",appGlobalVarsObject.lcm[10]),ShowDimmer(!1),AxWaitCursor(!1)}})}function AssignPLValues(e,t,a,i){var n,r=arguments.length>4&&arguments[4]!==undefined?arguments[4]:[];if(""!=e&&""!=e.substring(0,7)){TogglePrevNextLink("inline");var l="";if(-1!=e.indexOf("♣")){var o=e.split("♣");totalPLRows=parseInt(o[0],10),totalPLRows/t%1>0?noOfPLPages=Math.floor(totalPLRows/t)+1:noOfPLPages=totalPLRows/t,n=o[1].split("¿")}else n=e.split("¿");var s=$j("#dvPickHead");if(n!=undefined&&""!=n){l="";for(var c=0;c"}}l+="
"+u+"
",s.length>0&&s.html(l),$j("#tblPickData tr").length>0&&$j("#tblPickData tr:nth-child(1)").addClass("active")}else s.length>0&&s.html(""));SetPrevNextLinks(),document.getElementById("advancebtn").style.visibility="visible"}else{l="",l+="",l+="
",document.getElementById("advancebtn").style.visibility="hidden",l+=""),TogglePrevNextLink("none"),(s=$j("#dvPickHead")).length>0&&s.html(l)}var h=$j("#tblPickData tbody tr").length;h>1&&$j(".inputClass2").keydown(function(e){if(40==e.which){if("undefined"==typeof selectedRow&&(selectedRow=0),selectedRow$j("#dvPickHead").height()&&$j("#dvPickHead").scrollTop($j("#dvPickHead")[0].scrollHeight)}}else if(38==e.which){if(selectedRow>2){0==$j("#tblPickData tr:nth-child("+selectedRow--+")").length&&selectedRow++,$j("#tblPickData tr").removeClass("pickbg"),$j("#tblPickData tr:nth-child("+selectedRow+")").addClass("pickbg"),1==selectedRow&&e.preventDefault();for(t=0,i=h;i>=selectedRow;i--)t+=$j("#tblPickData tr:nth-child("+i+")").height();if(t+10>$j("#dvPickHead").height()){var n=selectedRow-1;$j("#dvPickHead").scrollTop($j("#tblPickData tr:nth-child("+n+")").height())}}}else 39==e.which?$j("#nextPick").attr("onclick")!=undefined&&""!=$j("#nextPick").attr("onclick")&&(GetData("next"),$j("#dvPickHead").scrollTop(0),selectedRow=1):37==e.which?$j("#prevPick").attr("onclick")!=undefined&&""!=$j("#prevPick").attr("onclick")&&(GetData("prev"),selectedRow=1,$j("#dvPickHead").scrollTop(0)):27!=e.which&&9!=e.which||(HidePLDiv(!1,a),selectedRow=0);e.which=-1}),$j(document).keypress(function(e){if(-1!=e.keyCode){if(13==e.keyCode){var t=GetActivePickListId(),a=GetFieldsDcNo(t),n=GetFieldsRowNo(t);if(AxActiveRowNo=GetDbRowNo(n,a),$j("#dvPickList").is(":visible")){var r="#axPickTd00"+--selectedRow+"F"+GetTdFrameNo();if($j(r).length>0){var l=$j(r).find("a")[0].innerText;l==undefined&&(l=$j(r).find("a")[0].textContent),SetPickVal(i+"^"+l,$j(r).data()),FillDependents(i),pickStatus=!1}selectedRow=0}}e.which=-1}}),$j(document).click(function(e){"nextPick"!=e.target.id&&"prevPick"!=e.target.id&&"curHand"!=e.target.className&&"hdrRow"!=e.target.className&&(HidePLDiv(!1,a),selectedRow=0)}),ShowPickList(a),ShowDimmer(!1),AxWaitCursor(!1),$j("#"+a).focus()}function ShowPickList(e){$j("#pickDimmer").css("display","none");var t,a=e.split("~");t=2==a.length?1:0,FindCtrlPos(i=document.getElementById(a[t]));var i,n=(i=$j("#"+a[t])).width()+19,r=i.height(),l=$j("#dvPickList"),o=GetFieldsDcNo(a[t]);l.width(n);var s=$j("#contentScroll"+o).scrollLeft(),c=$j("#contentScroll"+o).scrollTop();if(c>0){var d=parseInt(iY-r-c+18-0,10);d>0?l.css("top",d+"px"):l.css("top",iY+5+"px")}else l.css("top",iY+5+"px");if(s>0){var p=iX-n-s,u=$j("#divDc"+o).width()+20,h=0,m=p+200;u0?l.css("left",f+"px"):l.css("left","0px")}else l.css("left",iX-n+"px");l.show(),l.removeClass("d-none")}function CheckHeight(e,t){var a=$j("#middle1",parent.document),i=document.body.offsetHeight,n=e+t;n>i&&(i+=n-i,a.height(i+100))}function TogglePrevNextLink(e){var t=$j("#prevPick"),a=$j("#nextPick");"block"==e||"inline"==e?(t.show(),a.show()):(t.hide(),a.hide())}function SetPrevNextLinks(){var e=$j("#prevPick"),t=$j("#nextPick"),a=$j("#tblPickData");1==curPageNo?(e.attr("disabled","disabled"),e.css("display","none"),e.removeAttr("onclick")):(e.attr("disabled",!1),e.css("color","black"),t.css("color","black"),e.attr("onclick","javascript:GetData('prev')")),curPageNo=noOfPLPages?(t.attr("disabled","disabled"),t.css("display","none"),t.removeAttr("onclick")):(a.attr("disabled","disabled"),a.removeAttr("onclick"))}function GetData(e){"prev"==e&&curPageNo>1?curPageNo-=1:"next"==e&&curPageNo1&&arguments[1]!==undefined?arguments[1]:{};e=t.setpickval||e,delete t.setpickval;var a=(e=(e=RepSpecialCharsInHTML(e)).split("^"))[0],i=e[1];i=(i=i.replace(/^/g,"^")).replace(/@/g,"@"),document.getElementById(a).value=i,Object.keys(t).forEach(function(e){var i=t[e];$("#".concat(a)).data(e,i)})}function CallSearchOpen(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"";if(""!=$j("#hdnparamValues").val()&&(isPlDepParBound=!0),""!=$("#".concat(e.id)).data("select2").dropdown.$search.val())try{var t="./ivpicklist.aspx?sqlsearch=".concat(e.id,"&searchval=").concat($("#".concat(e.id)).data("select2").dropdown.$search.val(),"&ivname=").concat(iName,"&isPlDepParBound=").concat(isPlDepParBound),a=''),i=new BSModal("ivPlAdvSearch","Pick List",a,function(){$("#".concat(e.id)).select2("close")},function(){});i.changeSize("fullscreen"),i.scrollableDialog(),i.hideFooter()}catch(n){}else showAlertDialog("error",appGlobalVarsObject.lcm[8]);isPlDepParBound=!1}function GetActivePickListId(){var e=$j("#hdnPickFldId").val().split("~");return e[e.length>1?1:0]}function createIvir(e){$("td[data-order^=Grand]").attr("data-order",""),ivirColumnTypeObj={};var t=$.parseJSON(e);if(getAjaxIviewData){if(t.data){if(ivComps=t.data.comps,ivHeadRows=t.data.headrow,ivExportHF=t.data.reporthf,ivSmartViewSettings=t.data.smartview&&t.data.smartview.settings,ivDatas=processRowData(t.data),t.data.actions&&(ivActions=t.data.actions),t.data.scripts&&(ivScripts=t.data.scripts),t.data.hyperlinks&&(ivHyperlinks=t.data.hyperlinks),isListView&&(requestTstructFieldsObj(),""!=$("#hdnListViewFieldsJSON").val())){var a=JSON.parse($("#hdnListViewFieldsJSON").val());try{tstFields=Object.keys(a).reduce(function(e,t){return[].concat(_toConsumableArray(e),_toConsumableArray(a[t].fields))},[])}catch(f){}}if(t.data.configurations&&t.data.configurations.config&&(ivConfigurations=t.data.configurations.config.length==undefined?[t.data.configurations.config]:t.data.configurations.config)&&processIvConfiguration(ivConfigurations),t.data.templetes&&t.data.templetes.templete)try{t.data.templetes.templete.length==undefined&&(t.data.templetes.templete=[t.data.templetes.templete]),ivTemplates=t.data.templetes.templete,cardTemplatingHTML="";var i=t.data.templetes.templete.filter(function(e,t){return"ALL"==getCaseInSensitiveJsonProperty(e,"ELEMENTS")[0].toUpperCase()});if(i&&i.length){cardTemplatingHTML=getCaseInSensitiveJsonProperty(i[0],"CVALUE")[0];var n=parseJSON(cardTemplatingHTML);if(n){cardTemplatingHTML=n.html;var r=n.width,l=n.align;r&&$("#iviewFrame").addClass("col-lg-".concat(r," col-md-").concat(r," col-sm-12 col-xs-12")),l&&($("#iviewFrame").addClass("alignIview"),$("#iviewFrame").addClass(l))}}}catch(f){}}else t.message&&"webservice timeout"==t.message&&setIviewNotificationInfo(t);FieldName=[],HeaderText=[],ColumnType=[],HideColumn=[],custBtnIVIR=[],isChkBox="true",$.each(ivHeadRows,function(e,t){e.startsWith("@")||"axp__font"==e||"axrowtype"==e||"pivotghead"==e||(FieldName.push(e),HeaderText.push(t["#text"]||""),ColumnType.push(t["@type"]||"c"),HideColumn.push(t["@hide"].toString()||"true"),e.startsWith("p_v_")&&!ivHeadRows[e]["@align"]&&(ivHeadRows[e]["@align"]="Right"),"rowno"==e&&(isChkBox=("false"==t["@hide"].toString()).toString()),requestJSON&&0==FieldName[FieldName.length-1].toLowerCase().indexOf("axpfilepath_")&&(t["@hide"]=HideColumn[HideColumn.length-1]="true"),isListView&&"temps"==iName&&"cvalue"==FieldName[FieldName.length-1].toLowerCase()&&(t["@hide"]=HideColumn[HideColumn.length-1]="true"),"axrowoptions"==FieldName[FieldName.length-1].toLowerCase()&&(t["@hide"]=HideColumn[HideColumn.length-1]="true",rowOptionsExist=!0,isMobile||(HideColumn[FieldName.indexOf("rowno")]="false")))}),cardTemplatingHTML=cardTemplatingHTML||"undefined"==typeof customCardTemplatingHTML?cardTemplatingHTML:customCardTemplatingHTML}else ColumnType=$.parseJSON(t.ColumnType),HeaderText=$.parseJSON(t.HeaderText),FieldName=$.parseJSON(t.FieldName),HideColumn=$.parseJSON(t.HideColumn),(ind=FieldName.indexOf("axrowtype"))>-1&&(ColumnType.splice(ind,1),HeaderText.splice(ind,1),FieldName.splice(ind,1),HideColumn.splice(ind,1)),(ind2=FieldName.indexOf("axp__font"))>-1&&(ColumnType.splice(ind2,1),HeaderText.splice(ind2,1),FieldName.splice(ind2,1),HideColumn.splice(ind2,1)),custBtnIVIR=$.parseJSON(t.customObjIV),isChkBox=t.HasCKB;for(var o=0;o0,filteredColumns=FieldName.filter(function(e,t,a){return"false"==HideColumn[t]&&"rowno"!=FieldName[t]&&"axrowtype"!=FieldName[t]}),getAjaxIviewData){var s="";if(ivHeadRows.pivotghead!==undefined&&!$.isEmptyObject(ivHeadRows.pivotghead)){var c=function(e,t,a){return"').concat(t.replace(/~/g,"
"),"")},d=!0;if(s+="",s+=c(1,"","width:".concat(minCellWidth,"px;")),ivHeadRows.pivotghead){ivHeadRows.pivotghead.head&&ivHeadRows.pivotghead.head.length==undefined&&(ivHeadRows.pivotghead.head=[ivHeadRows.pivotghead.head]);var p=0;try{p=parseInt(_.sortBy(ivHeadRows.pivotghead.head,function(e){return parseInt(e.sn,10)})[0].sn,10)-1}catch(f){}for(var u=0;u",d||(s="")}var h="";tableWidth=0;var m='')+""+s+'';m+=''),h+="",tableWidth+=(null==findGetParameter("tstcaption")?minCellWidth:listViewCheckBoxSize)+("true"==isChkBox?40:0),HeaderText.forEach(function(e,t,a){if("rowno"!=FieldName[t]){var i=ivHeadRows[FieldName[t]]["@width"]||minCellWidth;"false"==(ivHeadRows[FieldName[t]]["@hide"].toString()||"true")&&(tableWidth+=parseInt(i,10)),m+='"),h+=""}}),h="".concat(h,""),m+=""+"".concat(h,"
\n ').concat(rowOptionsExist?'':"",'\n
\n
').concat(e.replace(/~/g,"
")).concat("","
"),$("#GridView2Wrapper").html($(m).css({width:"".concat(tableWidth,"px")})),showParamsPlaceholder();try{$("#GridView2Wrapper").html(axPostTableHeaderCreationHook($("#GridView2Wrapper").html()))}catch(f){}}hiddenColumnIndex=FieldName.map(function(e,t,a){return"rowno"==FieldName[t]||"axrowtype"==FieldName[t]?"":"true"==HideColumn[t]?t-(rowTypeExist?1:0):""}).filter(function(e){return""!==e}),"true"==isChkBox||rowOptionsExist?filteredColumns=[""].concat(_toConsumableArray(filteredColumns)):hiddenColumnIndex=[0].concat(_toConsumableArray(hiddenColumnIndex)),getAjaxIviewData&&(HeaderText.forEach(function(e,t){"root_class"==e.toString().toLowerCase()&&(cellHeaderConf.root_class_index=FieldName[t]),"account name"!=e.toString().toLowerCase()&&"particulars"!=e.toString().toLowerCase()&&"+/-"!=e.toString().toLowerCase()||(cellHeaderConf.root_account_index=FieldName[t]),"root_type"==e.toString().toLowerCase()&&(cellHeaderConf.root_atype_index=FieldName[t])}),bulkDownloadEnabled&&HeaderText.forEach(function(e,t){return e.indexOf("axp_attach")>-1&&(cellHeaderConf.FilesIndexes||(cellHeaderConf.FilesIndexes=[]),cellHeaderConf.FilesIndexes.push(FieldName[t]),ivHeadRows[FieldName[t]]["@align"]="Center"),e}),cellHeaderConf.FilesIndexes&&bulkDownloadEnabled?$("#btnDownloadAll").show():$("#btnDownloadAll").hide()),showColumnSeparator&&$("table#GridView1").addClass("columnSeparator")}function CheckDisabled(e){var t=$("#"+e);return clearAdvancedFiltersforNewData(),!(!t.length||t.hasClass("disabled"))&&(t.addClass("disabled"),$("#waitDiv").is(":hidden")&&ShowDimmer(!0),!0)}function clearAdvancedFiltersforNewData(){$("#divModalAdvancedFilters .body-cont").remove(),advFiltersObjectToApply={}}function resetSmartViewVariables(){nxtScrollSize=100,defaultRecsPerPage=100,checkNextDBRowsExist=!0,dtPageNo=1,dtTotalRecords=0,dtDbTotalRecords=0,autoAppendRecords=!1,pageScrollToEnd=!1,scrollTopPosition=0,""==firstTimeParams&&""!=$j("#hdnparamValues").val()&&((firstTimeParams={}).params=$("#hdnparamValues").val().replace(/`/g,"`"),firstTimeParams.paramsList=getParamsValueList(),firstTimeParams.paramsList&&(firstTimeParams.paramsList=JSON.parse(JSON.stringify(firstTimeParams.paramsList).replace(/&/g,"&"))))}function valdDecPts(e,t){var a=parseFloat(e.value).toFixed(t);e.value=a}function setRefreshParent(val){eval(callParent("isRefreshParentOnClose")+"="+val.toLowerCase())}function processRowData(e){processParamBadge();var t=[];return e["@perfxml"]&&"true"==e["@perfxml"]?((t=e.rowdata.row.length==undefined?[e.rowdata.row]:e.rowdata.row).splice(0,1),t.length>0&&Object.keys(t[0]).indexOf("@ROWNO")<0&&(t=t.map(function(e,t){return _objectSpread({"@ROWNO":(t+1).toString()},e)})),isPerf=!0):t=e.row.length==undefined?[e.row]:e.row,1==t.length&&0==Object.keys(t[0]).filter(function(e){return""!=t[0][e]&&null!=t[0][e]&&("undefined"==typeof t[0][getPropertyAccess("recordid")]||"0"!=t[0][getPropertyAccess("recordid")])&&"rowno"!=getColumnName(e)}).length&&(t=[]),t}function processParamBadge(){if(paramValuesArray=getParamsValueArray(),$("#FilterValues").length&&"hidden"!=$("#hdnIsParaVisible").val()){if(Object.keys(paramValuesArray).length){var e="",t=0;if(Object.keys(paramValuesArray).forEach(function(a,i){$(".paramtd2 #".concat(a,":not([type=hidden])")).length&&""!=paramValuesArray[a]&&(t++,paramValuesArray[a]=paramValuesArray[a].replace(/\~/g,","),e+=(requestJSON&&"old"!=iviewButtonStyle?"":"
")+($("#"+a).data("caption")||a)+(requestJSON&&"old"!=iviewButtonStyle?": ":" : ")+paramValuesArray[a]+(requestJSON&&"old"!=iviewButtonStyle?"; ":"
"))}),requestJSON&&"old"!=iviewButtonStyle){var a='Params";$("#FilterValues").html(a);var i=$(".filtertooltipNew span.tooltiptext").clone().css("display","");$("#dvSelectedFilters + .tooltiptext").replaceWith(i),$("#dvSelectedFilters + .tooltiptext").before('\n clear\n '))}else{a=''+t+'
'+e+"
";$("#FilterValues").html(a)}}else $("#FilterValues").html("");dvToolBarFix()}}function processParamString(){var e="";return paramValuesArray=getParamsValueArray(),Object.keys(paramValuesArray).length&&Object.keys(paramValuesArray).forEach(function(t,a){$(".paramtd2 #".concat(t,":not([type=hidden])")).length&&""!=paramValuesArray[t]&&(paramValuesArray[t]=paramValuesArray[t].replace(/\~/g,","),e+=($("#"+t).data("caption")||t)+": "+paramValuesArray[t]+", ")}),e}function UpdatePrevMid1FrameUrl(e){"middle1"===$(window.frameElement).attr("id")&&(parent.prevMid1FrameUrl=e)}function LoadTstFrmIview(e,t,a){GetCurrentTime("Tstruct load on Iview hyperlink click(Post back)");var i=$j("#axpiframe",parent.document);a!=undefined&&""!=a||!i.hasClass("frameSplited")||(a="split");try{e=loadTstUrlReWrite(e)||e}catch(n){}"split"===a?(ShowDimmer(!1),callParentNew("OpenOnPropertyBase(".concat(e+params,")"),"function")):"popup"===a?LoadPopPage(e+params):"default"===a||""==a?ReloadIframe(e+params):"newpage"===a&&popupFullPage(e+params)}function ReloadIframe(e){var t=$(window.frameElement);try{t=reloadingFrameSwitch()||t}catch(a){}GetProcessTime(),t.attr("src",e+"&hdnbElapsTime="+callParentNew("browserElapsTime"))}function popupFullPage(e){callParentNew("splitfull()","function");var t=$j("#middle1",parent.document);GetProcessTime(),t.attr("src",e+"&hdnbElapsTime="+callParentNew("browserElapsTime"))}function getAllRecords(){var e="ar"==callParentNew("gllangType");if(exportType)t=$.confirm({theme:"modern",title:appGlobalVarsObject.lcm[164],onContentReady:function(){disableBackDrop("bind")},backgroundDismiss:"false",rtl:e,escapeKey:"buttonB",content:appGlobalVarsObject.lcm[499],columnClass:"medium",buttons:{buttonA:{text:appGlobalVarsObject.lcm[500],btnClass:"btn btn-primary",action:function(){t.close(),ShowDimmer(!0),setTimeout(function(){getNextDtRecords(0)},100)}},buttonB:{text:appGlobalVarsObject.lcm[501],btnClass:"btn btn-bg-light btn-color-danger btn-active-light-danger",action:function(){t.close(),ExecuteDatatableExport()}},buttonC:{text:appGlobalVarsObject.lcm[192],btnClass:"btn btn-bg-light btn-color-danger btn-active-light-danger",action:function(){disableBackDrop("destroy"),ShowDimmer(!1),exportType=""}}}});else var t=$.confirm({theme:"modern",title:appGlobalVarsObject.lcm[164],onContentReady:function(){disableBackDrop("bind")},backgroundDismiss:"false",rtl:e,escapeKey:"buttonB",content:appGlobalVarsObject.lcm[390],buttons:{buttonA:{text:appGlobalVarsObject.lcm[282],btnClass:"btn btn-primary",action:function(){t.close(),ShowDimmer(!0),setTimeout(function(){getNextDtRecords(0)},100)}},buttonB:{text:appGlobalVarsObject.lcm[192],btnClass:"btn btn-bg-light btn-color-danger btn-active-light-danger",action:function(){disableBackDrop("destroy"),ShowDimmer(!1),exportType=""}}}})}function requestNextRecords(){setTimeout(function(){getNextDtRecords(dtPageNo+1)},100)}function getNextDtRecords(e){showDataTableLoading();var t=$j("#hdnKey").val(),a=generateParamX(),i="",n="",r="";isListView&&(""!=$("#hdnLvChangedStructure").val()||(n=$("#hdnLvSelectedCols").val(),r=$("#hdnLvSelectedHyperlink").val()),i="".concat(n,"").concat(r,""));var l='{ivKey: "'+t+'", recsPerPage: "'+defaultRecsPerPage+'", pageno: "'+e+'", paramX: "'+a+'", lvXml: "'+i+'", lvStructure: "'+$("#hdnLvChangedStructure").val()+'"}';$j.ajax({url:"iview.aspx/GetiViewData",type:"POST",cache:!1,async:!1,data:l,dataType:"json",contentType:"application/json",success:function(t){if(t&&""!=t.d&&""!=t.d.result)if("success"==t.d.status){var a=JSON.parse(t.d.result);if(a.data){if(0==e)ivDatas=processRowData(a.data),dtDbTotalRecords=getDtRecordCount(),exportType&&ivDatas.length>=1e3&&(lazyBinding=!0,ivirDatatable.DataTable.settings[0].oInit.scroller=!0,$(ivirTable).trigger($.Event("preInit.dt"),ivirDatatable.DataTable.settings),$(ivirTable).trigger($.Event("init.dt"),ivirDatatable.DataTable.settings),setSmartViewHeight()),checkNextDBRowsExist=!1,ivirDataTableApi.rows().remove(),ivirDataTableApi.rows.add(ivDatas).draw(),$("#lnkShowAll, #requestNextRecords").remove(),showChartsWithAllRecords&&(showChartsWithAllRecords=!1,ivirMainObj&&ivirMainObj.chart&&ivirMainObj.chart.length&&ivirMainObj.chart.length>0&&ivirMainObj.chart.forEach(function(e,t){ivirCreateChart(t,!0,!1)}));else{dtPageNo++;var i=ivDatas.length,n=processRowData(a.data);if(n.length>0){var r=ivDatas.findIndex(function(e){return"gtot"==e.axrowtype}),l=n.findIndex(function(e){return"gtot"==e.axrowtype});r>-1&&l>-1&&(ivDatas.splice(r,1),ivirDataTableApi.rows(r).remove(),i=ivDatas.length);var o=0,s=Object.keys(subHeadGroup).reverse().reduce(function(e,t,a){return null==subHeadGroup[t]?o++:o<2&&e.push(parseInt(t)),e},[]).reverse(),c=_.findIndex(n,function(e){return"subhead"==e.axrowtype}),d=!1;s.length>0&&c>-1&&s.forEach(function(e,t){try{var a;if(!d&&"subhead"==(null==n?void 0:null===(a=n[c])||void 0===a?void 0:a.axrowtype)){var i=Object.keys(difference(ivDatas[e],n[c]));0==i.length||1==i.length&&"rowno"==i[0]?n.splice(c,1):d=!0}}catch(r){}}),ivDatas=ivDatas.concat(n),dtDbTotalRecords=getDtRecordCount();nxtScrollSize>ivDatas.length?ivDatas.length:nxtScrollSize;nxtScrollSize=ivDatas.length,checkIfNextDBRowsExist(),pageScrollToEnd=!0,ivirDataTableApi.rows.add(ivDatas.slice(i,ivDatas.length)).draw(!1),$(".dataTables_scrollBody").scrollTop(scrollTopPosition),pageScrollToEnd=!1}else checkNextDBRowsExist=!1,$("#lnkShowAll").remove(),$("#lblCurPage").text("Rows: 1-"+dtDbTotalRecords+" of "),$("#lblNoOfRecs").text(dtDbTotalRecords)}clearAdvancedFiltersforNewData(),ExecuteDatatableExport(),ShowDimmer(!1)}else a.message&&"webservice timeout"==a.message&&setIviewNotificationInfo(a)}else showAlertDialog("warning",t.d.result),"Session Authentication failed..."==t.d.result&&(parent.window.location.href="../aspx/sess.aspx"),ShowDimmer(!1),exportType="";ShowDimmer(!1),AxWaitCursor(!1),exportType=""},failure:function(e){AxWaitCursor(!1),ShowDimmer(!1),exportType=""},error:function(e){AxWaitCursor(!1),ShowDimmer(!1),exportType=""}})}function getDtRecordCount(){return ivDatas.reduce(function(e,t,a){return!requestJSON||"undefined"!=typeof t.axrowtype&&("undefined"==typeof t.axrowtype||null!=t.axrowtype&&""!=t.axrowtype)?isPerf||"undefined"!=typeof t.axrowtype&&(null==t.axrowtype||""==t.axrowtype)?e+1:e+0:e+1},0)}function getSpecialRowCount(){return ivDatas.length-dtDbTotalRecords}function checkIfNextDBRowsExist(e){try{dtDbTotalRecords=getDtRecordCount();var t,a=!1;if(e){if(requestJSON)try{t=JSON.parse($("#hdnIViewData").val()).pagesize.pagesize}catch(i){}else t=JSON.parse($("#hdnIViewData").val()).data.headrow["@pagesize"];t!=undefined?0==(t=parseInt(t))?(defaultRecsPerPage=iviewDataWSRows=dtDbTotalRecords,a=!0):defaultRecsPerPage=iviewDataWSRows=t:defaultRecsPerPage=iviewDataWSRows}return isPivotReport||0==dtDbTotalRecords||a||dtDbTotalRecords%iviewDataWSRows!=0&&(t==undefined||dtDbTotalRecords-1){var i="",n="";""!=e&&e.split("&").forEach(function(e){e.indexOf("recordid=")>-1?i=e.split("=")[1]:n+=e+"♠"}),""!=i&&"0"!=i?$j("#axpiframe",parent.document)[0].contentWindow.GetLoadData(i,n):$j("#axpiframe",parent.document)[0].contentWindow.GetFormLoadData(n),AxWaitCursor(!1),ShowDimmer(!1)}else t.attr("src",e);else a.attr("src",e)}function setListViewDictionary(e,t){ASB.WebService.SetListViewDictionary(e,parseInt(t,10),iName,function(e,t){},function(e){})}function getFormattedToolbarJSON(e){try{e=axUpdateToolbarJson(e)}catch(t){}return _.sortBy(e,function(e){return parseInt(e.left,10)}).filter(function(e){return e.key})}function constructToolbar(){$("#iconsNewNew").addClass("d-none"),$("#iconsNewRemove").addClass("d-none"),$("#iconsNewUtility ul li").addClass("d-none"),$("#iconsNewOption ul li").remove(),toolbarJSON&&"string"==typeof toolbarJSON&&(toolbarJSON=JSON.parse(toolbarJSON)),toolbarHTML="",requestJSON&&"old"!=iviewButtonStyle&&(toolbarHTML+=constructToolbarHTML(getFormattedToolbarJSON(toolbarJSON),!1));var e='\n ","modern"!=iviewButtonStyle&&(toolbarHTML+=e),toolbarHTML+="\n ".concat(requestJSON&&"old"!=iviewButtonStyle?"":'','\n '),"modern"==iviewButtonStyle&&(toolbarHTML='
\n
\n
\n
\n '.concat(toolbarHTML+=e,"\n
\n
\n
\n
")),requestJSON&&"old"!=iviewButtonStyle||(toolbarHTML+=constructToolbarHTML(getFormattedToolbarJSON(toolbarJSON),!1)),$("#iconsUl").children().remove(),$("#iconsUl").append(toolbarHTML),requestJSON&&"old"!=iviewButtonStyle&&$("#myFiltersLi").css("display","none"),constuctDataButton(),$("#iconsNewUtility ul li").hasClass("d-none")?$("#iconsNewUtility").addClass("d-none"):$("#iconsNewUtility").removeClass("d-none"),requestJSON&&"old"!=iviewButtonStyle&&$("#iconsUl li ul").each(function(e,t){0==$(t).find("li").length&&$(t).parent("li").remove()});var t=0;requestJSON&&"old"!=iviewButtonStyle&&($("#iconsUl li").each(function(e,a){("none"==$(a).css("display")||$(a).hasClass("d-none"))&&t++}),$("#iconsUl li").length==t&&$("#iconsNewOption").addClass("d-none")),setPinedIconContainerWidth(),requestJSON&&"modern"==iviewButtonStyle&&($("#iconsExportUl, #iconsUl").removeClass("w-200px").addClass("w-100 w-sm-350px"),$("#iconsExportUl li, #iconsUl li").removeClass("menu-item px-3").addClass("col-4"),$("#iconsExportUl li a, #iconsUl li a").removeClass("menu-link px-3").addClass("d-flex flex-column flex-center text-center text-gray-800 text-hover-primary bg-hover-light rounded p-3 mb-3"),$("#iconsExportUl li a .dropdownIconUI, #iconsUl li a .dropdownIconUI").removeClass("symbol-25px me-5").addClass("symbol-40px"),$("#iconsExportUl li a .iconUITitle, #iconsUl li a .iconUITitle").addClass("mb-1")),requestJSON&&appGlobalVarsObject._CONSTANTS.compressedMode&&($(".toolbarRightMenu").find(".tb-btn").addClass("btn-sm"),$(".toolbarRightMenu").find(".tb-btn .material-icons.material-icons-style").addClass("material-icons-2"))}function constructToolbarHTML(e,t){var a="";return requestJSON&&"old"!=iviewButtonStyle?e.forEach(function(e){e.isRoot?a+="undefined"!=typeof axToolbarRootGenerator&&axToolbarRootGenerator(e)||'\n \n "):(e.href||e.onclick)&&(e=e.onclick&&"object"==_typeof(e.onclick)?Object.keys(e.onclick).map(function(t,a){var i=_objectSpread({},e);return i.onclick=i.onclick[t],i.caption=t.replace(/_/g," "),i.key=t.replace(/ /g,"_"),i}):[e]).forEach(function(e){a+="undefined"!=typeof axToolbarSingleNodeGenerator&&axToolbarSingleNodeGenerator(e,t)||((iconsNewLogicVar=iconsNewLogicFunction(e,t))&&iconsNewLogicVar?"":'\n \n "))})}):e.forEach(function(e){e.isRoot?a+="undefined"!=typeof axToolbarRootGenerator&&axToolbarRootGenerator(e)||'\n \n "):(e.href||e.onclick)&&(e=e.onclick&&"object"==_typeof(e.onclick)?Object.keys(e.onclick).map(function(t,a){var i=_objectSpread({},e);return i.onclick=i.onclick[t],i.caption=t.replace(/_/g," "),i.key=t.replace(/ /g,"_"),i}):[e]).forEach(function(e){a+="undefined"!=typeof axToolbarSingleNodeGenerator&&axToolbarSingleNodeGenerator(e,t)||'\n \n ")})}),a}function widthOfList(){var e=0;return $("#viewTabs li").each(function(){var t=$(this).outerWidth();e+=t}),e}function widthOfHidden(){var e=0-$("#dvViewtabs").outerWidth(),t=$("#dvViewtabs").outerWidth()-widthOfList()-getLeftPosi()-scrollBarWidths;return e>t?e:t}function getLeftPosi(){var e=0-$("#dvViewtabs").outerWidth(),t=$("#viewTabs").position().left;return e>t?e:t}function reAdjust(){$("#dvViewtabs").outerWidth() li:last").offset().left+$("#viewTabs > li:last").outerWidth(),lastTabPos>=$("#dvViewtabs").outerWidth()&&$("#viewTabs").animate({left:"+="+widthOfHidden()+"px"},"slow",function(){})}function scrollerLeftClick(){$(".scroller-right").fadeIn("slow"),$("#viewTabs").animate({left:"-="+getLeftPosi()+"px"},"slow",function(){reAdjust()})}function scrollToActiveView(e){var t=$("#"+e).offset().left+$("#"+e).outerWidth();$("#dvViewtabs").outerWidth() option")).prop("selected","selected"),$("#".concat(t)).trigger("change").select2("close")):($("#".concat(t," > option")).prop("selected",""),$("#".concat(t)).trigger("change").select2("close"))}function iconsNewLogicFunction(e,t){return!isMobile&&("new"==e.key&&e.href&&0==e.href.indexOf("javascript:callOpenAction('opentstruct'")?($("#iconsNewNew").removeClass("d-none"),$("#iconsNewNew a").attr("href",e.href),!0):"delete"==e.key&&e.href&&0==e.href.indexOf("javascript:callDelete('")?($("#iconsNewRemove").removeClass("d-none"),$("#iconsNewRemove a").attr("href",e.href),!0):(thisHref=e.href&&0==e.href.indexOf("javascript:toHTML(")&&e.href||e.onclick&&0==e.onclick.indexOf("javascript:toHTML(")&&e.onclick)?($("#iconsExportPrint").removeClass("d-none").find("a").attr("href",thisHref),!0):(thisHref=e.href&&0==e.href.indexOf("javascript:toPDF(")&&e.href||e.onclick&&0==e.onclick.indexOf("javascript:toPDF(")&&e.onclick)?($("#iconsExportPdf").removeClass("d-none").find("a").attr("href",thisHref),!0):(thisHref=e.href&&0==e.href.indexOf("javascript:toExcelWeb(")&&e.href||e.onclick&&0==e.onclick.indexOf("javascript:toExcelWeb(")&&e.onclick)?($("#iconsExportExcel").removeClass("d-none").find("a").attr("href",thisHref),!0):(thisHref=e.href&&0==e.href.indexOf("javascript:SetDatatableExport(")&&e.href||e.onclick&&0==e.onclick.indexOf("javascript:SetDatatableExport(")&&e.onclick)?($("#iconsExportHTML,#iconsExporJSON,#iconsExportCopy").removeClass("d-none"),!0):void 0)}function setIviewNotificationInfo(e){if(requestJSON){showAlertDialog("info",appGlobalVarsObject.lcm[491]),updateSessionVar=callParentNew("updateSessionVar");var t="";requestJSON&&"old"!=iviewButtonStyle&&(t=$(".viewtabEdit").parents("li.active").find(".viewtabEdit").data("name")||"main");var a={};a.params=$("#hdnparamValues").val(),a.type=exportType,a.headrow=ivHeadRows,a.viewName=t,"function"==typeof updateSessionVar&&updateSessionVar("iview-"+iName+"-"+e.dataId,JSON.stringify(a))}else showAlertDialog("warning",3006,"client")}function getParamsValueList(){var e={};return parentArr.forEach(function(t,a){switch(typeArr[a].toLowerCase()){case"select":e[t]={type:typeArr[a],value:$("#"+t+" option").map(function(){return $(this).val()}).get().filter(function(e){return""!=e}).join("`")};break;case"multi select":e[t]={type:typeArr[a],value:$("#"+t).attr("data-valuelist")}}}),0==Object.keys(e).length&&(e=""),e}function setParamsValueList(e,t,a){var i=arguments.length>3&&arguments[3]!==undefined?arguments[3]:"",r=arguments.length>4&&arguments[4]!==undefined?arguments[4]:[],l=document.getElementById(e);switch(t.toLowerCase()){case"select":var o=0;if(l.options.length=0,a.length<1)l.options[0]=new Option("",0),n=1;else for(n=0,o=0;o").concat(a[o],"

");$(l).parent().next().html(d)}}}function showParamsPlaceholder(){}function processIvConfiguration(e){try{trimIviewData="true"==getCaseInSensitiveJsonProperty(e.filter(function(e,t){var a=getCaseInSensitiveJsonProperty(e,"PROPS");return a&&a.toString()&&"trim iview data"==a.toString().toLowerCase()})[0],["PROPSVAL"]).toString().toLowerCase()}catch(t){}try{resolveAttachmentPath="true"==getCaseInSensitiveJsonProperty(e.filter(function(e,t){var a=getCaseInSensitiveJsonProperty(e,"PROPS");return a&&a.toString()&&"resolve attachment path"==a.toString().toLowerCase()})[0],["PROPSVAL"]).toString().toLowerCase()}catch(t){}try{showColumnSeparator="true"==getCaseInSensitiveJsonProperty(e.filter(function(e,t){var a=getCaseInSensitiveJsonProperty(e,"PROPS");return a&&a.toString()&&"column separator for reports"==a.toString().toLowerCase()})[0],["PROPSVAL"]).toString().toLowerCase()}catch(t){}try{iviewButtonStyle=getCaseInSensitiveJsonProperty(e.filter(function(e,t){var a=getCaseInSensitiveJsonProperty(e,"PROPS");return a&&a.toString()&&"iview button style"==a.toString().toLowerCase()})[0],["PROPSVAL"]).toString().toLowerCase()}catch(t){}try{searchHiddenColumnsInReports="true"==getCaseInSensitiveJsonProperty(e.filter(function(e,t){var a=getCaseInSensitiveJsonProperty(e,"PROPS");return a&&a.toString()&&"search hidden columns in reports"==a.toString().toLowerCase()})[0],["PROPSVAL"]).toString().toLowerCase()}catch(t){}try{unselectReportRowOnAction="true"==getCaseInSensitiveJsonProperty(e.filter(function(e,t){var a=getCaseInSensitiveJsonProperty(e,"PROPS");return a&&a.toString()&&"clear selected report rows after task execution"==a.toString().toLowerCase()})[0],["PROPSVAL"]).toString().toLowerCase()}catch(t){}try{openFastReportInNewWindow="true"==getCaseInSensitiveJsonProperty(ivConfigurations.filter(function(e,t){var a=getCaseInSensitiveJsonProperty(e,"PROPS");return a&&a.toString()&&"open fast report in new window"==a.toString().toLowerCase()})[0],["PROPSVAL"]).toString().toLowerCase()}catch(t){}try{splitRatio=getCaseInSensitiveJsonProperty(ivConfigurations.filter(function(e,t){var a=getCaseInSensitiveJsonProperty(e,"PROPS");return a&&a.toString()&&"split ratio"==a.toString().toLowerCase()})[0],["PROPSVAL"]).toString().toLowerCase()||splitRatio}catch(t){}splitRatio&&(appGlobalVarsObject.splitRatio=splitRatio);try{responsiveColumnWidth="true"==getCaseInSensitiveJsonProperty(ivConfigurations.filter(function(e,t){var a=getCaseInSensitiveJsonProperty(e,"PROPS");return a&&a.toString()&&"iview responsive column width"==a.toString().toLowerCase()})[0],["PROPSVAL"]).toString().toLowerCase()}catch(t){}try{stripedReport="true"==getCaseInSensitiveJsonProperty(ivConfigurations.filter(function(e,t){var a=getCaseInSensitiveJsonProperty(e,"PROPS");return a&&a.toString()&&"striped reports ui"==a.toString().toLowerCase()})[0],["PROPSVAL"]).toString().toLowerCase()}catch(t){}try{exportPerf="enable"==getCaseInSensitiveJsonProperty(ivConfigurations.filter(function(e,t){var a=getCaseInSensitiveJsonProperty(e,"PROPS");return a&&a.toString()&&"excel export with formatting"==a.toString().toLowerCase()})[0],["PROPSVAL"]).toString().toLowerCase()}catch(t){}if(isMobile)try{enableCardsUi=!("true"==getCaseInSensitiveJsonProperty(e.filter(function(e,t){var a=getCaseInSensitiveJsonProperty(e,"PROPS");return a&&a.toString()&&"mobile reports as table"==a.toString().toLowerCase()})[0],["PROPSVAL"]).toString().toLowerCase())}catch(t){}}function getModernButtonIconInfo(e){var t=!(arguments.length>1&&arguments[1]!==undefined)||arguments[1],a=e.split("&").reduce(function(e,t){var a=t.length>0?t[0]:"";return""!=a&&" "!=a&&(e=a),e},"A");return t?a:e.replace("&"+a,a)}function getButtonIconHTML(e){return"object"==_typeof(e)?'').concat(e.text,""):'')}function setPinedIconContainerWidth(){var e=$("#breadcrumb").outerWidth(!0)+$(".toolbarRightMenu").outerWidth(!0)+50;"undefined"!=typeof isAxpertPopup&&isAxpertPopup&&(e+=35),$(".modernButtonOptions #pinnedsearchBar").css({width:"calc(100vw - ".concat(e,"px)"),"max-width":"calc(100vw - ".concat(e,"px)")});var t=$("#pinnediconsUl").outerWidth(!0),a=0;$("ul#pinnediconsUl").children("li").each(function(){if((a+=$(this).outerWidth(!0))>t)return $(this).hide(),$(this).nextAll().hide(),!1;$(this).show(),$(this).nextAll().show()})}function confirmRespDelete(){if(0==getselectedResp())return showAlertDialog("warning",appGlobalVarsObject.lcm[85]),!1;var e="ar"==callParentNew("gllangType"),t=$.confirm({theme:"modern",title:appGlobalVarsObject.lcm[155],onContentReady:function(){disableBackDrop("bind"),$(".jconfirm-buttons button").each(function(){var e=$(this).text();$(this).prop("title",e.charAt(0).toUpperCase()+e.slice(1))}),$(".jconfirm-buttons .hotbtn").focus()},backgroundDismiss:"false",rtl:e,escapeKey:"buttonB",content:appGlobalVarsObject.lcm[87],buttons:{buttonA:{text:appGlobalVarsObject.lcm[248],btnClass:"btn btn-primary",action:function(){disableBackDrop("destroy"),deleteResponsibilities()}},buttonB:{text:appGlobalVarsObject.lcm[192],btnClass:"btn btn-bg-light btn-color-danger btn-active-light-danger",action:function(){return t.close(),disableBackDrop("destroy"),!1}}}})}function getselectedResp(){totalResSelected=0;$("#GridView1 td:nth-child(1) input[type='checkbox']");var e=document.getElementById("GridView1").getElementsByTagName("input");return $("#chkall").is(":checked")?1==e.length?totalResSelected=0:totalResSelected="All":ivirDataTableApi.column(0).nodes().to$().each(function(e){$(this).find("input[type='checkbox']").prop("checked")&&totalResSelected++}),0!=totalResSelected}function deleteResponsibilities(){var e="";ivirDataTableApi.column(1).nodes().to$().each(function(t){$(this).siblings().find("input[type='checkbox']").prop("checked")&&(e+=$(this).find("a").text()+",")}),e=e.substr(0,e.length-1),$.ajax({type:"POST",url:"../aspx/Responsibilities.aspx/DeleteResponsibilities",contentType:"application/json;charset=utf-8",data:'{selectedResp:"'+e+'"}',dataType:"json",success:function(e){"Success"==e.d?(showAlertDialog("success","Responsibility deleted successfully"),setTimeout(function(){window.location.href=window.location.href},1e3)):"SessionExpiry"==e.d?parent.window.location.href="../aspx/sess.aspx":"Error"==e.d?window.location.href="../aspx/err.aspx":(showAlertDialog("warning",e.d),setTimeout(function(){window.location.href=window.location.href},1e3)),$("#chkall").prop("checked",!1),ShowDimmer(!1)}})}function requestTstructFieldsObj(){isListView&&""==$("#hdnListViewFieldsJSON").val()&&!tstFldsRequested&&(tstFldsRequested=!1,$.ajax({url:"iview.aspx/GetTstructFieldsForListView",type:"POST",cache:!1,async:!1,contentType:"application/json",dataType:"json",data:JSON.stringify({iName:iName}),success:function(e){try{if(e&&e.d){e=e.d;var t=JSON.parse(e),a=t.dcs.reduce(function(e,t){return e[t.frameno]={index:t.frameno,name:t.name,caption:t.caption,isGrid:t.isgrid,fields:[]},e},{});t.flds.forEach(function(e){a[e.fldframeno]&&a[e.fldframeno].fields&&a[e.fldframeno].fields.push({index:e.order,name:e.name,caption:e.caption,dcNo:e.fldframeno,isGridField:a[e.fldframeno].isGrid,save:e.savevalue,visible:!e.visibility,length:e.fldlength,component:e.ctype})}),$("#hdnListViewFieldsJSON").val(JSON.stringify(a))}}catch(i){$("#hdnListViewFieldsJSON").val("")}},failure:function(e){},error:function(e){}}))}function difference(e,t){return function a(e,t){return _.transform(e,function(e,i,n){_.isEqual(i,t[n])||(e[n]=_.isObject(i)&&_.isObject(t[n])?a(i,t[n]):i)})}(e,t)}function createPlSmartSelect(e){$(e).select2({ajax:{contentType:"application/json;charset=utf-8",dataType:"json",delay:250,type:"POST",url:"../aspx/iview.aspx/GetIviewPickListData",data:function(t){return GetParamValues("clear"),JSON.stringify({iviewName:iName,pageNo:1,pageSize:10,fieldName:$(e)[0].id,fieldValue:t.term||"",depParamVal:$("#hdnparamValues").val()})},processResults:function(e,t){t.page=t.page||1;if(!CheckSessionTimeout(e.d)){if(e.d.toLowerCase().indexOf('"error":')>-1)showAlertDialog("error",appGlobalVarsObject.lcm[10]),ShowDimmer(!1);else{var a=JSON.parse(e.d.replace(/@/g,""));null!=a.sqlresultset.response&&(e.total_count=a.sqlresultset.response.totalrows||10,e.items=a.sqlresultset.response.row.map(function(e,t){return{id:e[Object.keys(e)[0]]["#text"],text:e[Object.keys(e)[0]]["#text"],row:e}}))}return{results:e.items,pagination:{more:10*t.pagemanage_search
')).find(".select2-search__field").addClass("form-control")})}function createMsSmartSelect(e){var t=$(e),a=_toConsumableArray(new Set($(e).data("valuelist").split($(e).data("separator")))).filter(function(e){return""!=e}),i=$.map(a,function(e,t){return{id:e,text:e}});t.select2({allowClear:!0,data:i,placeholder:appGlobalVarsObject.lcm[441]}).on("select2:open",function(t){var i,n=null===(i=$(t.currentTarget).data("select2"))||void 0===i?void 0:i.$dropdown,r=0;if(0!=(a=_toConsumableArray(new Set($(e).data("valuelist").split($(e).data("separator")))).filter(function(e){return""!=e})).length){if(0==n.find(".select2-results").find(".msSelectAllOption").length){var l='
\n \n \n
');n.find(".select2-results").append(l)}n.find(".select2-results").find(".select2-results__options li:not(.select2-results__option--disabled.loading-results)").each(function(e,t){$(t).hasClass("select2-results__option--selected")&&r++}),n.find(".select2-results").find(".select2-results__options li:not(.select2-results__option--disabled.loading-results)").length==r&&r>0?n.find(".select2-results").find(".msSelectAllOption > .msSelectAll").prop("checked",!0):n.find(".select2-results").find(".select2-results__options li:not(.select2-results__option--disabled.loading-results)").length!=r&&n.find(".select2-results").find(".msSelectAllOption > .msSelectAll").is(":checked")&&n.find(".select2-results").find(".msSelectAllOption > .msSelectAll").prop("checked",!1)}})}function refreshIview(e){"inmemdb"==iName||isListView||"hidden"==$("#hdnIsParaVisible").val()?(e.preventDefault(),window.location.href=window.location.href):""!=$j("#hdnparamValues").val()?UpdateGetParamCache():(e.preventDefault(),$("#Filterscollapse").collapse("show"))}$(document).on("keydown","input[type='text'],input[type='search'],input[type='radio'],input[type='checkbox']",function(e){13==e.keyCode&&e.preventDefault(),13==e.keyCode&&0!==$(e.target).parents("#Filterscollapse").length&&0==$(e.target).parents(".paramtd2.picklist").length&&($(e.target).is("input:text")&&$(e.target).blur(),$("#button1").click())});