Files
kwenter/AW_11.2.0.0_release1/Js/iview.min.js
Suriyakumarvijayanayagam 949f78f6d0 Initial import: Axpert 11.2 reference material and platform blueprint
- TECH_ARCHITECTURE.md: technical blueprint for the new platform
- AI_LAYER_DESIGN_NOTES.md: AI agent, event/action, SQL and audit design
- Axpert 11.2 web runtime source, structure exports and release notes (reference)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 16:22:58 +05:30

1 line
186 KiB
JavaScript

/*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;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(a),!0).forEach(function(t){_defineProperty(e,t,a[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):ownKeys(Object(a)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))})}return e}function _defineProperty(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function _typeof(e){"@babel/helpers - typeof";return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?_arrayLikeToArray(e,t):void 0}}function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,i=new Array(t);a<t;a++)i[a]=e[a];return i}var traceSplitChar="♦",traceSplitStr="♦♦",NewTree=new Array,arrCheckedFilter=new Array,loadPop,isSqlPagination,parafilterfix={},isDepsProcessed=!0,formSubmited=!1,strTimeTaken="",arrcheckedvalues=new Array,timePickerSec=!1,accordionHeight=0,firstTimeScroll=!0,windowResizer,beforeResizeHeight="",ivirColumnTypeObj="",ivirDataTableApi,ivirDatatable,isChkBox="",rowTypeExist=!1,gl_language="",validateParamOnGo=!1,isPlDepParBound=!1,iframeindex=-1,HeaderText,ColumnType,FieldName,HideColumn,HideColumnLength,filteredColumns,hiddenColumnIndex,ivComps,ivHeadRows,ivExportHF,ivActions,ivScripts,ivHyperlinks,ivConfigurations,ivSmartViewSettings,ivDatas=[],tstFields=[],ivTemplates=[],ivColDesignJSON=[],initAdvFilters=!0,isPerf=!1,tableWidth=0,visibleTableWidth=0,minCellWidth=15,listViewCheckBoxSize=40,responsiveColumnWidth=!1,configNavProp="default",enableCardsUi=!1,isMobile=!1,cardTemplatingHTML="",rowRefreshIndex=undefined,isCheckedRowRefresh=!1,lazyBinding=!1,submittedOnLoad=!1,showColumnSeparator=!1,stripedReport=!1,actionCallFlag=Math.random(),actionCallbackFlag=actionCallFlag,classicView=!1,recordsExist=!1,trimIviewData=!0,resolveAttachmentPath=!1,viewNavigationData=[],cellHeaderConf={},bulkDownloadEnabled=!0,toolbarHTML="",exportType="",scrollBarWidths=5,loadViewName="main",toolbarPinArr=[],popupContentcall=!1,firstTimeParams="",openFilters=!1,viewLoadedColumns=!1,viewLoadedSort=!1,searchHiddenColumnsInReports=!1,unselectReportRowOnAction=!0,showChartsWithAllRecords=!1,isChartCreationOnLoad=!1,rowOptionsExist=!1,openFastReportInNewWindow=!1,splitRatio="1:1:auto",tstFldsRequested=!1,paramValuesArray=[],exportPerf=!1,isLnkClicked=!1;function DeleteIviewCacheFiles(){try{ASB.WebService.DeleteIviewCacheFiles(iName)}catch(e){}}function SetLnkClick(){isLnkClicked=!0}function dvToolBarFix(){""==$j("#dvToolbar").text()||null==$j("#dvToolbar").text()||$j("#dvToolbar").text()==undefined?$j("#dvToolbar").parent().css("display","none"):$j("#dvToolbar").parent().css("display","inline-block"),""!=$j("#FilterValues").text()&&null!=$j("#FilterValues").text()&&$j("#FilterValues").text()!=undefined||$j("#dvSelectedFilters").css("display","none")}function pageLoad(e,t){if(""!=$("#hdnbElapsTimeGo").val()){var a=$("#hdnbElapsTimeGo").val();requestProcess_logtime=a.split("♠")[1],serverprocesstime=a.split("♠")[0],WireElapsTime(serverprocesstime,requestProcess_logtime,!0)}else WireElapsTime(serverprocesstime,requestProcess_logtime);showParam=!0;try{pageLoadIvHook()}catch(m){}if("undefined"==typeof appGlobalVarsObject&&(appGlobalVarsObject=callParentNew("appGlobalVarsObject")),(isMobile=isMobileDevice())&&$("body").addClass("isMobile"),enableCardsUi=enableCardsUi||isMobile,requestJSON&&$("body").addClass("requestJSON"),requestJSON&&"old"==iviewButtonStyle&&$("body").addClass("requestJsonOldUi"),"border"==inputControlType&&$("body").addClass("borderInput"),exportType=redisLoadType,constructToolbar(),$(".animationLoading").show(),"undefined"!=typeof getAjaxIviewData&&getAjaxIviewData&&($("#dvSqlPages").show(),$("#nextPrevBtns").hide()),"undefined"!=typeof capturedButton1Submit&&1==capturedButton1Submit)return capturedButton1Submit=!1,void $("#button1").click();if("undefined"!=typeof totRowCount&&""!=totRowCount&&$("#getIviewRecordCountVal").length>0&&$("#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("<thead></thead>"),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="<tfoot>",i=0;i<t;i++)a+="<td></td>";a+="</tfoot>",e.find("tbody").before(a)}}),$("#tasks").parent("li").hasClass("dropdown-submenu")||$("#tasks").html(callParentNew("lcm")[407]+" <span class='icon-arrows-down'></span>").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('<ul class="breadcrumb fw-bold fs-base mb-1">\n <li class="breadcrumb-item text-muted">\n '.concat(breadCrumbStr.slice(0,breadCrumbStr.length-3),'\n </li>\n <li class="breadcrumb-item text-dark">\n ').concat(p,"\n </li>\n </ul>"))}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("&amp;grave;")>=0&&(l=l.replace(/&amp;grave;/g,"~")),a=a+"<"+r+">",a=(a+=l)+"</"+r+">",l=l.replace(/~/g,"&grave;"),""!=$("#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("<totalrows>")){var a=e.indexOf("</totalrows>");a=a>-1?a:e.length,totRowCount=parseInt(e.substring("<totalrows>".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<parentArr.length;e++)if("string"==typeof Expressions[e]&&""!=Expressions[e]&&"{"==Expressions[e].charAt(0)&&"}"==Expressions[e].charAt(Expressions[e].length-1)&&Expressions[e].indexOf(":")>-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="<table class='gridData clonedHtml'>";a+="<thead>",a+=$(".gridData thead").html(),a+="</thead>",a+="</table>",$(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<e?$("#tblPickData tr:nth-child("+(t+1)+")").addClass("active"):$("#tblPickData tr:nth-child(1)").addClass("active")}function pickUpp(){$j("#tblPickData tr").length;var e="";"0"==(e=$j("#tblPickData tr.active").index()+1)&&(e=1),$j("#tblPickData tr").removeClass("active"),1==e?$("#tblPickData tr:nth-last-child(1)").addClass("active"):$("#tblPickData tr:nth-child("+(e-1)+")").addClass("active")}function SetLnkStyle(){$("#lnkPrev").hover(function(){1==$j(this).hasClass("pickdis")&&$j(this).css("color","gray")}),$("#lnkNext").hover(function(){1==$j(this).hasClass("pickdis")&&$j(this).css("color","gray")})}function CallAssignLoadVals(e,t,a,i){a=void 0!==a?a:"",-1!=e.indexOf(";quot")&&(e=e.replace(new RegExp(";quot","g"),"'")),e=CheckSpCharsInFldValueIview(e),AssignLoadValues(e,t,a,i)}function ScrollToTop(){parent.window.scrollTo(0,0)}function Adjustwin(e){SetLnkStyle()}$(document).ready(function(){var isDisabledSplit="";if(ivConfigurations)try{isDisabledSplit=getCaseInSensitiveJsonProperty(ivConfigurations.filter(function(e,t){var a=getCaseInSensitiveJsonProperty(e,"PROPS");return a&&a.toString()&&"disablesplit"==a.toString().toLowerCase()})[0],["PROPSVAL"]).toString()}catch(ex){}else isDisabledSplit=$("#hdnDisableSplit").val();isMobile||"inmemdb"==iName||isIviewPopup||(isDisabledSplit!=undefined&&"false"==isDisabledSplit.toLowerCase()?($(callParentNew("split-btn","class")).css({display:""}).removeClass("d-none"),$(callParentNew("split-btn-vertical","class")).css({display:""}).removeClass("d-none")):isDisabledSplit!=undefined&&"true"==isDisabledSplit.toLowerCase()?($(callParentNew("splitIcon","id")).addClass("d-none"),$(callParentNew("spiltHeading","class")).addClass("d-none")):isDisabledSplit!=undefined&&""==isDisabledSplit.toLowerCase()&&($(callParentNew("splitIcon","id")).css({display:""}).removeClass("d-none"),$(callParentNew("spiltHeading","class")).css({display:""}).removeClass("d-none"))),$(document).delegate("#myFilters","click",function(){checkSuccessAxpertMsg()}),window.parent.AxIvFilterMinHeader=new Array,"Iview"==document.title&&(GetUserLocale(),AddDatePicker(),AddTimePicker(),$("#hdnparamValues").val().indexOf("¿")>-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"),$('<div id="inMemChartWrapper"></div>').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,"&grave;"),i=firstTimeParams.paramsList||"";i&&(i=JSON.parse(JSON.stringify(i).replace(/&amp;/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;i<e;i++)"rXml"==form1.elements[i].name&&(t+=form1.elements[i].value),"checkbox"==form1.elements[i].type&&form1.elements[i].checked&&(a[l]=form1.elements[i].value,l+=1);t=generateFullIviewXML(t);try{(xmlObj=new ActiveXObject("Microsoft.XMLDOM")).loadXML(t)}catch(p){try{parser=new DOMParser,xmlObj=parser.parseFromString(t,"text/xml")}catch(p){showAlertDialog("error",p.message)}}var s=xmlObj.getElementsByTagName(xmlObj.childNodes[0].tagName.toString()),c=s[0].childNodes.length,d=s[0].childNodes[0].childNodes.length;for(n=0;n<c;n++)if("rowno"==s[0].childNodes[n].childNodes[0].tagName.toString())for(k=0;k<l;k++)if(s[0].childNodes[n].childNodes[0].firstChild.nodeValue==a[k])for(m=0;m<d;m++)"recordid"==s[0].childNodes[n].childNodes[m].tagName.toString()&&(r[o]=s[0].childNodes[n].childNodes[m].firstChild.nodeValue,o+=1);0==l?showAlertDialog("warning",3001,"client"):l>1?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;i<o;i++)"checkbox"==form1.elements[i].type&&form1.elements[i].checked&&(c[d]=form1.elements[i].value,d+=1);s=generateFullIviewXML(s);try{(xmlObj=new ActiveXObject("Microsoft.XMLDOM")).loadXML(s)}catch(C){try{parser=new DOMParser,xmlObj=parser.parseFromString(s,"text/xml")}catch(C){showAlertDialog("error",C.message)}AxWaitCursor(!1)}var p=xmlObj.getElementsByTagName(xmlObj.childNodes[0].tagName.toString())[0].childNodes.length,u="";0==d&&""==r&&p>0&&(c[0]=1);var h=c.length;for(0==d&&"all rows"==r.toString().toLowerCase()&&(h=p),k=0;k<h;k++){var m=c[k];m-=1,xmlObj.getElementsByTagName("row")[m].xml==undefined?(nodeXml=(new XMLSerializer).serializeToString(xmlObj.getElementsByTagName("row")[m]),u+=nodeXml):u+=xmlObj.getElementsByTagName("row")[m].xml,""!=t&&void 0!==t&&(l=":"==t.substring(0,1)?xmlObj.getElementsByTagName(t)[m].firstChild.nodeValue:t.toString())}0==h&&t.length>0&&""==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+'<root axpapp="'+proj+'" trace="'+w+'" sessionid="'+sid+'" stype="iviews" sname="'+a+'" actname="'+e+'" __file="'+g+'"><params>'+f+"</params><varlist>",v+=u,v+="</varlist>";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;i<r;i++)"checkbox"==form1.elements[i].type&&form1.elements[i].checked&&"chkall"!=form1.elements[i].id&&(o[s]=form1.elements[i].value,s+=1);if(0==s&&""!=n&&"all rows"!=n.toString().toLowerCase())return showAlertDialog("warning",3001,"client"),void AxWaitCursor(!1);if(""==a||confirm(a)){l=generateFullIviewXML(l);try{(xmlObj=new ActiveXObject("Microsoft.XMLDOM")).loadXML(l)}catch(b){try{parser=new DOMParser,xmlObj=parser.parseFromString(l,"text/xml")}catch(b){showAlertDialog("error",b.message)}AxWaitCursor(!1)}var c=xmlObj.getElementsByTagName(xmlObj.childNodes[0].tagName.toString())[0].childNodes.length,d="";0==s&&""==n&&c>0&&(o[0]=1);var p=o.length;for(0==s&&"all rows"==n.toString().toLowerCase()&&(p=c),k=0;k<p;k++)if(""!=o[k]&&o[k]!=undefined){var u=o[k];u-=1;xmlObj.getElementsByTagName("row")[u].xml==undefined?d+=(new XMLSerializer).serializeToString(xmlObj.getElementsByTagName("row")[u]):d+=xmlObj.getElementsByTagName("row")[u].xml}var h=generateParamX(),m=traceSplitStr+"Action-"+e+traceSplitChar,f=!1;try{f="true"==(ivScripts[e]["@script"]||"false")}catch(b){}var v='<root axpapp="'+proj+'" trace="'+m+'" sessionid="'+sid+'" stype="iviews" sname="'+t+'" actname="'+e+'"><params>'+h+"</params><varlist>"+d+"</varlist>",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+'<root axpapp="'+proj+'" trace="'+(traceSplitStr+"trace"+traceSplitStr)+'" sessionid="'+sid+'" appsessionkey="'+t+'" stype="iviews" sname="'+iName+'" actname="'+i+'" username="'+a+'"><params>'+n+"</params><varlist>",r+=jsonToXml(e),r+="</varlist>",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("<row/>"),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("<?xml")&&(n=n.substring(38,n.length));try{(xmlObj=new ActiveXObject("Microsoft.XMLDOM")).loadXML(n)}catch(p){try{parser=new DOMParser,xmlObj=parser.parseFromString(n,"text/xml")}catch(p){showAlertDialog("error",p.message)}}xmlObj.getElementsByTagName(xmlObj.childNodes[0].tagName.toString());xmlObj.getElementsByTagName("row")[t].xml==undefined?(nodeXml=(new XMLSerializer).serializeToString(xmlObj.getElementsByTagName("row")[t]),i+=nodeXml):i+=xmlObj.getElementsByTagName("row")[t].xml}var r=new Array,l=traceSplitStr+"CallHLAction-"+e+traceSplitChar,o=generateParamX()+ConstructFldDataNodes(i),s='<root axpapp="'+proj+'" trace="'+l+'" sessionid="'+sid+'" stype="iviews" sname="'+a+'" actname="'+e+'"><params>'+o+"</params><varlist>"+i+"</varlist>",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<i.length;n++){var r=i[n].name,l=i[n].value;!generateParamX().toLowerCase().indexOf("<"+r.toLowerCase()+">")>-1&&(t+="<"+r+">"+l+"</"+r+">")}}return t.replace(/&/g,"&amp;")}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"),"&#9;")).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+"&param="+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(/&amp;/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||(e<t?(showAlertDialog("warning",3006,"client"),!1):!(t<1)||(showAlertDialog("warning",3007,"client"),!1))}function toExcel(e,t){var a=screen.width/2-420,i=screen.height/2-300,n=form1.param.value,r="../aspx/excel.aspx?ivname="+e+"&ivtype="+t+"&params="+(n=CheckUrlSplChars(n));window.open(r,"excelWindow","width=840,height=600,scrollbars=yes,top="+i+",left="+a)}function toHTML(e,t,a){var i=form1.param.value;$("#hdnKey").length>0&&""!=$j("#hdnKey").val()&&(ivKey="&ivKey="+$j("#hdnKey").val()),SetExport("../aspx/htmliv.aspx?ivname="+e+"&ivtype="+t+ivKey+"&params=&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+"&params=",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+"&params=",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+"&params=",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+"&params=",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;i<e;i++)"rXml"==form1.elements[i].name&&(t+=form1.elements[i].value),"checkbox"==form1.elements[i].type&&form1.elements[i].checked&&(a[l]=form1.elements[i].value,l+=1);t=generateFullIviewXML(t);try{(xmlObj=new ActiveXObject("Microsoft.XMLDOM")).loadXML(t)}catch(u){try{parser=new DOMParser,xmlObj=parser.parseFromString(t,"text/xml")}catch(u){showAlertDialog("error",u.message)}}var s=xmlObj.getElementsByTagName(xmlObj.childNodes[0].tagName.toString()),c=s[0].childNodes.length,d=s[0].childNodes[0].childNodes.length;for(n=0;n<c;n++)if("rowno"==s[0].childNodes[n].childNodes[0].tagName.toString())for(k=0;k<l;k++)if(s[0].childNodes[n].childNodes[0].firstChild.nodeValue==a[k])for(m=0;m<d;m++)"recordid"==s[0].childNodes[n].childNodes[m].tagName.toString()&&(r[o]=s[0].childNodes[n].childNodes[m].firstChild.nodeValue,o+=1);var p="n/a";return 0==l?p="0":l>1?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="<table>"+jsonToXml(t)+"</table>"}else-1!=e.indexOf("<?xml")&&(e=e.substring(38,e.length));return e}function callDelete(e,t){if("response"!=iName||"axrol"!=e){AxWaitCursor(!0);var a=form1.elements.length,n="",r=new Array,l=0;for($j("#rXml").length>0&&(n=$j("#rXml").val()),i=0;i<a;i++)"checkbox"==form1.elements[i].type&&form1.elements[i].checked&&(isNaN(parseInt(form1.elements[i].value))||(r[l]=form1.elements[i].value,l+=1));if(0==l)return showAlertDialog("warning",3001,"client"),void AxWaitCursor(!1);n=generateFullIviewXML(n);try{(xmlObj=new ActiveXObject("Microsoft.XMLDOM")).loadXML(n)}catch(f){try{parser=new DOMParser,xmlObj=parser.parseFromString(n,"text/xml")}catch(f){showAlertDialog("error",f.message),AxWaitCursor(!1)}}var o=0;for(o=0;o<xmlObj.childNodes.length&&"xml"==xmlObj.childNodes[o].nodeName.toLowerCase();o++);xmlObj.getElementsByTagName(xmlObj.childNodes[o].tagName.toString())[0].childNodes.length;var s,c="",d="",p=r.length;if(s=GetRecordIdColIndex(xmlObj,r[0]),"Iview"==t&&-1==s)return showAlertDialog("error",3008,"client"),void AxWaitCursor(!1);for(k=0;k<p;k++){var u=r[k];if(!isNaN(u)){if(u-=1,xmlObj.getElementsByTagName("cancel")[u]&&xmlObj.getElementsByTagName("cancel")[u].xml&&"T"==xmlObj.getElementsByTagName("cancel")[u].childNodes[0].text)return showAlertDialog("warning",3009,"client"),void AxWaitCursor(!1);xmlObj.getElementsByTagName("row")[u].xml==undefined?(nodeXml=(new XMLSerializer).serializeToString(xmlObj.getElementsByTagName("row")[u]),c+=nodeXml,-1!=s&&(d=""==d?xmlObj.getElementsByTagName("row")[u].childNodes[s].textContent:","+xmlObj.getElementsByTagName("row")[u].childNodes[s].textContent)):(c+=xmlObj.getElementsByTagName("row")[u].xml,-1!=s&&(""==d?d=xmlObj.getElementsByTagName("row")[u].childNodes[s].text:d+=","+xmlObj.getElementsByTagName("row")[u].childNodes[s].text))}}trace=traceSplitStr+"DeleteRow-"+e+traceSplitChar;var h='<root axpapp="'+proj+'" trace="'+trace+'" sessionid="'+sid+'" stype="iviews" sname="'+e+'" actname="delete"><varlist>'+c+"</varlist>",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;n<i.length;n++)if("recordid"==i[n].nodeName){a=n;break}return a}function callDeleteNew(e,t,a){var i,n="",r="";i=GetRecordIdColIndex(xmlObj,a),$j("#rXml").length>0&&(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='<root axpapp="'+proj+'" trace="'+trace+'" sessionid="'+sid+'" stype="iviews" sname="'+e+'" actname="delete" ><varlist>'+l+"</varlist></root>",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;n<i.length;n++){var r=i[n].toString().replace(new RegExp("\\n","g"),"");if(""==r)return;var l=$j.parseJSON(r);l.error?ExecuteErrorMsg(l.error,"Delete"):l.message&&ExecuteMessage(l.message,"Delete")}AxWaitCursor(!1)}}function ExecuteErrorMsg(e,t){var a=e[0].msg;e[0].errfld&&e[0].errfld;for(var i=a.indexOf("^^dq");-1!=i;)i=(a=a.replace("^^dq",'"')).indexOf("^^dq");null!=a&&a!=undefined&&""!=a&&showAlertDialog("error",a)}function ExecuteMessage(e,t){for(var a=0;a<e.length;a++){for(var i=e[a].msg,n=(i=i.split(",")).length,r="",l=0;l<n;l++){var o=(r+=i[l]+"\n").indexOf("["),s=r.indexOf("]");if(""!=r.substring(o+1,s)){var c=msg.substring(o,s+2);r=r.replace(c,"")}for(var d=r.indexOf("^^dq");-1!=d;)d=(r=r.replace("^^dq",'"')).indexOf("^^dq")}""!=r&&("Delete"==t&&-1!=r.indexOf("done")?(showAlertDialog("success",3010,"client"),$j("#btnClear").length>0?$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='<OBJECT ID="WebBrowser1" WIDTH=0 HEIGHT=0 CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>',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;t<depArr.length;t++)for(var i=depArr[t].split(","),n=0;n<i.length;n++)i[n]==e&&(a=!0);return a}function GetAllChecked(e){$j("#"+e.id).prop("checked")?$j("#"+e.id+" input[type='checkbox']").each(function(){$j(this).prop("checked",!0)}):$j("#"+e.id+" input[type='checkbox']").each(function(){$j(this).prop("checked",!1)})}function UncheckChkAll(e){if(0==e.checked)try{$("#"+e.id+".chkSelectAll").prop("checked",!1)}catch(t){}}function GetChkParamValues(e,t){var a="",i="",n=$j("#"+t+" input[type='checkbox']");return $j.each(n,function(){$j(this).is(":checked")&&(a=$j(this).prop("value"),i=""==i?t+"~"+a:i+"&grave;"+a)}),""==e?e=i:e+=i,e}function GetParamValues(e,t){e=e||"",t=t||"";var a=0,i="";ArrDep.length=0;var n=new Array;if(null!==$j("#hdnSelParamsAftrChWin").val()&&""!==$j("#hdnSelParamsAftrChWin").val())i=$j("#hdnSelParamsAftrChWin").val(),$j("#hdnSelParamsAftrChWin").val(""),$j("#hdnGo").val("Go");else for(a=0;a<parentArr.length;a++){var r;if((r=$j("#"+parentArr[a])).length){var l=r.prop("type");if("select-one"==l){var o=r.find("option:selected").val();if((""==(o=void 0===o?"":o)||null==o)&&"clear"!=e){var s;if("complete"==document.readyState)(null!==(s=t)&&void 0!==s&&s.pointerType||""==t)&&showAlertDialog("warning",3032,"client");return!1}if(1==IsDependent(parentArr[a])){var c=0,d="";$j(r).find("option").each(function(){"0"==$j(this).val()&&""==$j(this).val()||(d+=$j(this).val()+"$$$")}),ArrDep.push(parentArr[a]+"~"+d),i+=parentArr[a]+"~"+o+"¿"}else i+=parentArr[a]+"~"+o+"¿"}else if("select-multiple"==l){var p,u="false",h=document.getElementById(parentArr[a]);if((p=h.options.length)>0)for(c=0;c<p;c++)"false"==u?1==$(h.options[c]).prop("selected")&&(u="true",i+=parentArr[a]+"~"+h.options[c].value):1==$(h.options[c]).prop("selected")&&(i+="&grave;"+h.options[c].value);else i+=parentArr[a]+"~"+h.value;""!=i&&(i+="¿")}else if("checkbox"==l)""!=(i=GetChkParamValues(i,parentArr[a]))&&(i+="¿");else{var m=r.val();if(r.hasClass("trySelectMs"))try{m=r.data("bs.tokenfield")?r.tokenfield("getTokensList").replace(/`/g,"&grave;"):r.data("selectedlist").replace(/`/g,"&grave;")}catch(v){}var f=!0;try{f=AxICheckValid()}catch(g){f==undefined&&(f=!0)}f==undefined&&(f=!0),"Date/Time"==paramType[a]&&"en-us"==dtCulture.toLowerCase()&&""!=m&&(m=GetDateStr(r.val(),"d/m/Y","m/d/Y")),"Date/Time"==paramType[a]&&""==m&&r.val(m=moment(new Date).format("en-us"==dtCulture?"MM/DD/YYYY":"DD/MM/YYYY")),""==m&&""!=r.parent().prev("td").find("font").text()&&f&&n.push(r.parent().prev("td").find("font").text()),i+=parentArr[a]+"~"+m+"¿"}}}if("none"!=$j("#paramCont").css("display"))for(c=0;c<n.length;c++)if(""!=n[c]){ShowDimmer(!1),callParentNew("closeFrame()","function"),showAlertDialog("warning",3011,"client",'"'+n[c]+'"');break}return 0==n.length&&(window.parent.childWindowHandler==undefined?$j("#hdnGo").val("Go"):window.parent.childWindowHandler.length>0&&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<ArrDep.length;d++){var p=ArrDep[d].split("~");if(p[0]==n[0]){var u=p[1].split("$$$"),h=0;for(r[0].options.length=0,h=0;h<u.length-1;h++)$j(r).each(function(){$j(this).append($j("<option></option>").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("<option></option>").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("&grave;"),f=0;f<m.length;f++)$j(r).find("option").each(function(){if($j(this).text()==m[f])return $j(this).attr("selected","selected"),!1});if(r.hasClass("trySelectedMs")){n[1]=n[1].replace(/&grave;/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){}}}else if("checkbox"==o){var v=n[1].split("&grave;"),g=$j(r).parent().next("div").find("input").length;$j(r).parent().next("div").find("input").each(function(){$j(this).prop("checked",!1)});for(f=0;f<v.length;f++)$j(r).parent().next("div").find("input").each(function(){if($j(this).val()==v[f])return $j(this).prop("checked",!0),1,!1});g===v.length&&$j(r).length>0&&$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(/&grave;/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||year<minYear||year>maxYear?(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<e.length;t++){var a=e.charAt(t);if(a<"0"||a>"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,"&amp;")).replace(/</g,"&lt;")).replace(/>/g,"&gt;")}function FillDependents(e){ValParamChanged(e),AxWaitCursor(!0),ctrlID=e;var t=0,a="",i=0;for(i=0;i<parentArr.length;i++)if(parentArr[i]==e){if(""!=depArr[i]||""!=columnDepArr[i]){for(t=0;t<parentArr.length;t++){var n,r="";n=parentArr[t],r=typeArr[t],pValue="";var l=$("<div />"),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:"")+"</"+n+">"})}():a+="<"+n+">"+pValue+"</"+n+">"}for(var s="",c=!1,d=0;d<depArr.length;d++)if(""!=depArr[d]){var p;if(""!=(p=CheckDepParents(e,depArr[d],s))){""==s?s=p:s+=","+p;var u=$("#"+p).attr("type")}u!=undefined&&"hidden"!=u&&(c=!0)}1==c&&ShowDimmer(!0);var h=traceSplitStr+"GetDependParams-"+iName+traceSplitChar,m='<sqlresultset name="'+iName+'" axpapp="'+proj+'" transid="" sessionid="'+sid+'" trace="'+h+'" depparams="'+s+'">';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<parentArr.length;v++)if(e==parentArr[v]&&""!=Expressions[v]){f=!0,ExprHandler(e,"");break}f||(timePickerSec?$("#"+e).val("00:00:00"):$("#"+e).val("00:00"))}}function CheckDepParents(e,t,a){for(var i="",n=t.split(","),r=a.split(","),l=0;l<n.length;l++){if(n[l]!=e)-1==$.inArray(n[l],r)&&(i+=""==i?n[l]:","+n[l])}return i}function OnParDepException(e){AxWaitCursor(!1),ShowDimmer(!1),isDepsProcessed=!0,formSubmited&&$j("#button1").click()}function ValParamChanged(e){var t="",a=$j("#"+e);a.length&&("accept"==a.prop("type").toLowerCase()?t=a.val():"select"==a.prop("type").toLowerCase()?t=$j("#"+pItem).find("option:selected").text():"select-one"==a.prop("type").toLowerCase()?-1!=$j("option:selected",a).index()&&(t=$j(a).find("option:selected").text()):t=a.val());var i=0,n=0;for(n=0;n<parentArr.length;n++)if(parentArr[n]==e){currFldValue=pCurArr[n],i=n;break}var r;r=$j("#hdnParamChngd").val(),t!=currFldValue&&"true"==r?($j("#lblErrMsg").text(appGlobalVarsObject.lcm[6]),pCurArr[i]=t):$j("#lblErrMsg").text("")}function SuccGetDependents(e,t){if(AxWaitCursor(!1),ShowDimmer(!1),!CheckSessionTimeout(e)){if("<error>"==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<n;u++)if(s=i[0].childNodes[u].getAttribute("value"),null!=i[0].childNodes[u].getAttribute("cat")){for(var h=i[0].childNodes[u].childNodes.length,m=new Array,f=new Array,v=0;v<h;v++)if("a0"==(r=i[0].childNodes[u].childNodes[v].tagName)&&(l=i[0].childNodes[u].childNodes[v].firstChild.nodeValue),"a4"==r&&(p=i[0].childNodes[u].childNodes[v].firstChild.nodeValue),"a13"==r&&(o=i[0].childNodes[u].childNodes[v].firstChild.nodeValue),"a21"==r&&(c=i[0].childNodes[u].childNodes[v].firstChild.nodeValue),"response"==r&&i[0].childNodes[u].childNodes[v].childNodes.length>=1){i[0].childNodes[u].childNodes[v].childNodes;var g=0;for(g=0;g<i[0].childNodes[u].childNodes[v].childNodes.length;g++)m[g]=ie?i[0].childNodes[u].childNodes[v].childNodes[g].childNodes[0].text:i[0].childNodes[u].childNodes[v].childNodes[g].childNodes[0].textContent,f[g]=[],i[0].childNodes[u].childNodes[v].childNodes[g].childNodes.length>1&&(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;j<parentArr.length;j++)if(paramType=hiddenArr[j],"true"!=paramType&&(expr=vExpressions[j],fldName=parentArr[j],""!=expr)){var r=Evaluate(fldName,fldName.valueOf(),expr,"vexpr","iview");if("T"!=r&&"true"!=r){if("_"==r.substring(0,1)){r=r.substring(1),showAlertDialog("error",r);var l=$j("#"+fldName);if(l.length){l.val("");try{l.focus()}catch(s){}}return}confirm(r+". Do you want to continue?")||setTimeout("document.getElementById('"+paramNm+"').focus();",50),n=!1;break}}clearParams||n&&(n=GetParamValues("",(null===(e=window)||void 0===e?void 0:e.event)||(null==arguments?void 0:null===(t=arguments.callee)||void 0===t?void 0:null===(a=t.caller)||void 0===a?void 0:null===(i=a.arguments)||void 0===i?void 0:i[0])||""));if(arrCheckedFilter.length=0,$("#newViewparams").val($j("#hdnparamValues").val()),isDepsProcessed){if(formSubmited=!1,n){totRowCount="",clearAdvancedFiltersforNewData();var o=$j("#hdnparamValues").val();o=(o=o.replace(/~/g,"=")).replace(/¿/g,"&"),""!=(o=ReplaceUrlSpecialChars(o))&&(setIviewNavigationData(o,iName),callParentNew("updateAppLinkObj("+window.location.href.replace("iview.aspx?ivname=","ivtoivload.aspx?ivname=")+"&AxIvNav=true,1)","function")),resetSmartViewVariables();try{$(".multiFldChk").each(function(){$(this).data("bs.tokenfield")&&($(this).attr("data-selectedlist",$(this).tokenfield("getTokensList")),$(this).tokenfield("destroy"))}),$("select.trySelect, select.trySelectPl, select.trySelectMs").each(function(){$(this).select2("destroy")})}catch(s){}$(".multiFldChk, select.trySelect, select.trySelectPl, select.trySelectMs").length>0&&$("#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;t<parentArr.length;t++)if(parentArr[t]==e){for(a=t+1;a<parentArr.length;a++){if("true"==hiddenArr[a]){i=Expressions[a],n=parentArr[a],""!=i&&ExprHandler(n,""),FillDependents(n),r=!0;break}break}if(1==r)break}}function GetDateParamFormat(Pdate){var arrdt=new Array;arrdt=Pdate.split("/");var mon="";mon=arrdt[1],mon=eval(mon)-1;var monthNames=new Array("January","February","March","April","May","June","July","August","September","October","November","December");mon=monthNames[mon];var strDate="";return strDate=arrdt[0]+"-"+mon+"-"+arrdt[2],strDate}var result="",expfield="",expfieldname="";function ExprHandler(e,t){var a=arguments.length>2&&arguments[2]!==undefined&&arguments[2];if(a&&""==t||!a){expfield=e.toString();for(var i=0;i<parentArr.length;i++)if(expfield==parentArr[i]&&""!=Expressions[i]){GetParamValues(),paramValuesArray=getParamsValueArray(),"username"==(result=Evaluate(expfield,e.valueOf(),Expressions[i],"expr"))||"usergroup"==result||assignfldvaliv(expfield,result);break}}}function assignfldvaliv(e,t){var a="",i=$j("#"+e);if(i.length){for(var n=0;n<parentArr.length;n++)parentArr[n]==e&&(a=typeArr[n]);if("text"==i.prop("type")||"hidden"==i.prop("type"))"''"==t&&(t=""),t||(t=""),"Date/Time"==a&&0==t&&(t=""),"string"==typeof t&&(t=checkIVSpecialCharInGlobalVar(t)),i.val(t);else if("select-one"==i.prop("type")){for(var r=i.find("option").length,l=0;l<r&&i.val()!=t;l++);i[l].selectedIndex}}}function checkIVSpecialCharInGlobalVar(e){return e=(e=(e=(e=(e=e.replace(/&amp;/g,"&")).replace(/&lt;/g,"<")).replace(/&gt;/g,">")).replace(/&apos;/g,"'")).replace(/&quot;/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;e<Parameters.length;e++){var t=Parameters[e].split("~");"Culture"==t[0]&&(dtCulture=t[1])}dtCulture=callParentNew("glCulture")||dtCulture,dtFormat=GetDateFormat(dtCulture),dateString=dtFormat}function loadParent(e,t){var a=document.getElementById("searchlist"),i=document.getElementById("pgno"),n=parseInt(i.value);a.selectedIndex=10*n+parseInt(e,10);SetSelectedValue(a,"searchlistval",t)}function SetSelectedValue(listcontrol,listctrl,b){if(-1!=listcontrol[listcontrol.selectedIndex].value){var fname=b,result=listcontrol[listcontrol.selectedIndex].value;$(callParentNew(fname,"id")).append(new Option(result,result,!0,!0)).trigger("change");var iVData=$("#hdnIViewData2").val();""!=iVData&&applyAdvPicklistData(fname,listcontrol.selectedIndex,iVData);var len=eval("form1."+listctrl+".options.length");if(len>0&&-1!=eval("form1."+listctrl+"["+listcontrol.selectedIndex+"].value")){var fldarr=eval("form1."+listctrl+"["+listcontrol.selectedIndex+"].value");fldarr=fldarr.split("~");for(var fill=0;fill<fldarr.length;fill++)if(""!=fldarr[fill]){var fieldnm=fldarr[fill].toString();fieldnm=fieldnm.split("***"),eval("document.forms['f1']."+fieldnm[0]+cbnameExt)&&"radio"!=eval("document.forms['f1']."+fieldnm[0]+cbnameExt+".type")&&("*"==fieldnm[1]?eval("document.f1."+fieldnm[0]+cbnameExt+'.value=""'):eval("document.f1."+fieldnm[0]+cbnameExt+'.value="'+fieldnm[1]+'"'))}}callParentNew("ivPlAdvSearch","id").dispatchEvent(new CustomEvent("close"))}}function applyAdvPicklistData(e,t,a){try{var i=$(callParentNew(e,"id"));if(a){var n,r,l,o=$.parseJSON(a),s=(t+1)%10-1;-1==s&&(s=9);var c=null==o?void 0:null===(n=o.sqlresultset)||void 0===n?void 0:null===(r=n.response)||void 0===r?void 0:null===(l=r.row)||void 0===l?void 0:l[s];Object.keys(c||[]).forEach(function(e,t,a){var n="string"==typeof c[e]?c[e]:c[e]["#text"];i.data("optionsss".concat(t>0?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;i<o;i++){if(l[i]==t&&(a=!0,i++,i==o))return;if(1==a){changed=!0;var s=l[i].rows[0].cells.length;if(!(s>r))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<t.length;i++)if("checkbox"==t[i].type){t[i].nextSibling.innerHTML;-1!=t[i].nextSibling.innerHTML.indexOf("Grid DC")&&(e=1+e),t[i].checked&&1==e?childdccnt1=1:t[i].checked&&2==e&&(childdccnt2=2)}childdccnt1>=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='<option value=""></option>';$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+='<option value="'+n+'">'+t+"</option>"}}),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;m<h.length;m++){(b=document.createElement("option")).text=h.options[m].text,b.value=h.options[m].value,u.options.add(b)}}d=c.insertCell();var f=document.createElement("select");f.id="ddlOpr"+i,f.className="lblTxt",d.appendChild(f);var v,g=document.getElementById("ddlOpr"+i);if(g.length=0,g){var w=document.getElementById("ddlListFilcond");if(w.length>0)for(m=0;m<w.length;m++){var b;(b=document.createElement("option")).text=w.options[m].text,b.value=w.options[m].value,g.options.add(b)}}d=c.insertCell(),(v=document.createElement("input")).type="text",v.id="txtFilter"+i,v.className="lblTxt",v.style.width="160px",d.appendChild(v),d=c.insertCell(),(v=document.createElement("input")).type="text",v.id="txtFillVal"+i,v.className="lblTxt",v.style.width="160px",d.appendChild(v),d=c.insertCell();var $=document.createElement("a");$.id="delAnc"+i,$.href="javascript:DeleteListCondition('"+i+"');",$.className="ancLink";var y=document.createElement("span");y.className="curHand icon-arrows-circle-minus",y.id="delCond"+i,$.appendChild(y),d.appendChild($),a.value=i}function AddCondition(){if(0==navigator.vendor.indexOf("Apple")&&/\sSafari\//.test(navigator.userAgent)){var e=document.getElementById("tblFilter"),t="0";(l=document.getElementById("FilterRowCount"))&&(t=l.value);var a=(parseInt(t)+1).toString(),i=(o=e.appendChild(document.createElement("tr"))).insertCell();(w=document.createElement("a")).id="delAnc"+a,w.title="Remove condition",w.href="javascript:DeleteListCondition('"+a+"');",(b=document.createElement("span")).className="curHand icon-arrows-circle-minus",b.id="delCond"+a,w.appendChild(b),i.appendChild(w),i=o.insertCell(),(g=document.createElement("input")).type="text",g.id="txtFillVal"+a,g.className="txtfilter tem Family form-control",g.title="Enter filter text",g.style.width="180px",i.appendChild(g),i=o.insertCell(),(g=document.createElement("input")).type="text",g.id="txtFilter"+a,g.className="txtfilter tem Family form-control",g.title="Enter filter text",g.style.width="180px",i.appendChild(g),i=o.insertCell(),(m=document.createElement("select")).id="ddlOpr"+a,m.className="ddlListFilter combotem Family form-control",m.title="Select filter conditions",m.style.width="145px",i.appendChild(m);$j("ddlListFilter").width();if((f=document.getElementById("ddlOpr"+a)).length=0,f)if((v=document.getElementById("ddlListFilcond")).length>0)for(var n=0;n<v.length;n++){(y=document.createElement("option")).text=v.options[n].text,y.value=v.options[n].value,f.options.add(y)}i=o.insertCell();if((p=document.createElement("select")).id="ddlListFilter"+a,p.className="ddlListFilter combotem Family form-control",p.title="Select column",p.style.width="200px",i.appendChild(p),(u=document.getElementById("ddlListFilter"+a)).length=0,u)if((h=document.getElementById("ddlListFilter")).length>0)for(n=0;n<h.length;n++){(y=document.createElement("option")).text=h.options[n].text,y.value=h.options[n].value,u.options.add(y)}var r=o.insertCell();r=o.insertCell(),(s=document.createElement("input")).type="radio",s.name="grpAndOr"+a,s.id="radAnd"+a,s.value="And",(c=document.createElement("input")).type="radio",c.name="grpAndOr"+a,c.id="radOr"+a,c.value="Or",r.className="paramtd1",r.appendChild(s),(d=document.createElement("span")).innerHTML="And",r.appendChild(d),r.appendChild(c),(d=document.createElement("span")).innerHTML="Or",r.appendChild(d),r.style.align="right",($=document.getElementById("radOr"+a))&&($.checked=!0),l.value=a;$j("dvNewrow").height(),$j("tblpanel").height()}else{var l;e=document.getElementById("tblFilter"),t="0";(l=document.getElementById("FilterRowCount"))&&(t=l.value);var o;a=(parseInt(t)+1).toString();(o=e.insertRow()).setAttribute("id","tblFilterRowID"+a);var s,c,d;r=o.insertCell();r=o.insertCell(),(s=document.createElement("input")).type="radio",s.name="grpAndOr"+a,s.id="radAnd"+a,s.value="And",(c=document.createElement("input")).type="radio",c.name="grpAndOr"+a,c.id="radOr"+a,c.value="Or",r.className="paramtd1",r.appendChild(s),(d=document.createElement("span")).innerHTML="And",r.appendChild(d),r.appendChild(c),(d=document.createElement("span")).innerHTML="Or",r.appendChild(d),r.style.align="right";var p,u,h,m;i=o.insertCell();if((p=document.createElement("select")).id="ddlListFilter"+a,p.className="ddlListFilter combotem Family form-control",p.title="Select column",p.style.width="200px",i.appendChild(p),(u=document.getElementById("ddlListFilter"+a)).length=0,u)if((h=document.getElementById("ddlListFilter")).length>0)for(n=0;n<h.length;n++){(y=document.createElement("option")).text=h.options[n].text,y.value=h.options[n].value,u.options.add(y)}i=o.insertCell(),(m=document.createElement("select")).id="ddlOpr"+a,m.className="ddlListFilter combotem Family form-control",m.title="Select filter conditions",m.style.width="200px",i.appendChild(m);var f,v,g,w,b,$;$j("ddlListFilter").width();if((f=document.getElementById("ddlOpr"+a)).length=0,f)if((v=document.getElementById("ddlListFilcond")).length>0)for(n=0;n<v.length;n++){var y;(y=document.createElement("option")).text=v.options[n].text,y.value=v.options[n].value,f.options.add(y)}i=o.insertCell(),(g=document.createElement("input")).type="text",g.id="txtFilter"+a,g.className="txtfilter tem Family form-control",g.title="Enter filter text",g.style.width="100px",i.appendChild(g),i=o.insertCell(),(g=document.createElement("input")).type="text",g.id="txtFillVal"+a,g.className="txtfilter tem Family form-control",g.title="Enter filter text",g.style.width="100px",i.appendChild(g),i=o.insertCell(),(w=document.createElement("a")).id="delAnc"+a,w.title="Remove condition",w.href="javascript:DeleteListCondition('"+a+"');",(b=document.createElement("span")).className="curHand icon-arrows-circle-minus",b.id="delCond"+a,w.appendChild(b),i.appendChild(w),($=document.getElementById("radOr"+a))&&($.checked=!0),l.value=a;$j("dvNewrow").height(),$j("tblpanel").height()}}function DeleteListCondition(e){if(window.chrome){document.getElementById("tblFilterRowID"+e).remove()}else{document.getElementById("delAnc"+e).parentElement.parentElement.rowIndex;document.getElementById("tblFilterRowID"+e).remove()}e=(parseInt(e)-1).toString();document.getElementById("FilterRowCount").value=e}function RefreshFirstListCondition(){$("#txtListFilter").val(""),$("#ListfilVal2").val(""),$("#ddlListFilcond").val($("#ddlListFilcond option:first").val()),$("#ddlListFilter").val($("#ddlListFilter option:first").val())}function CheckListFilterCond(e){if(-1==e){var t=$j("#ddlListFilcond"),a=$j("#ListfilVal2"),i=$j("#txtListFilter");"between"==t.val()?(i.prop("disabled",!1),a.prop("disabled",!1)):"is null"==t.val()?(i.prop("disabled",!0),a.prop("disabled",!0)):(i.prop("disabled",!1),a.prop("disabled",!0)),a.val(""),i.val("")}}function GetSelectedColumns(){var e="";$j("#tvList input[type=checkbox]:checked").each(function(){$j(this).parentNode==undefined&&(""==e?e=$j(this)[0].nextSibling.innerHTML:e+=","+$j(this)[0].nextSibling.innerHTML)}),$j("#hdnColumns").val(e)}function CheckSpecialCharsInStr(e){return null==e?"":e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e).replace(/<>/g,"")).replace(/</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+="<a1>"+o.parent()[0].childNodes[l].childNodes[0].innerHTML+"</a1>";var a=o.parent()[0].childNodes[l].childNodes[1].innerHTML;-1==a.indexOf("{")?r+="<a4>{"+o.parent()[0].childNodes[l].childNodes[1].innerHTML:r+="<a4>"+o.parent()[0].childNodes[l].childNodes[1].innerHTML,-1==a.indexOf("}")?r+="}</a4>":r+="</a4>",r+="<a5>"+o.parent()[0].childNodes[l].childNodes[2].innerHTML+"</a5>",r+="<a12>"+o.parent()[0].childNodes[l].childNodes[3].innerHTML+"</a12>",r+="<a13>"+o.parent()[0].childNodes[l].childNodes[4].innerHTML+"</a13>",r+="<a18>"+o.parent()[0].childNodes[l].childNodes[5].innerHTML+"</a18>",r+="</"+o.parent()[0].childNodes[l].childNodes[0].innerHTML+"st>",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<n.length;f++)n[f].checked&&(r=n[f].value)}}if(0==c)if(0==d.selectedIndex||0==p.selectedIndex)if("is null"!=p.value&&""==u.value)return""==$j("#lblCond").text()?(isExistCondtn=0,!1):(document.getElementById("hdnSubTypeCond").value=$j("#lblCond").text(),!0);var v=d.value,g=d[d.selectedIndex].text,w=(p.value,u.value),b=h.value,$=p[p.selectedIndex].innerHTML,y=p[p.selectedIndex].value;0!=d.selectedIndex&&0!=p.selectedIndex&&((0==c||c>=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,"&lt;&gt;")).replace(/</g,"&lt;")).replace(/>/g,"&&gt;")).replace(/>=/g,"&gt;=")).replace(/<=/g,"&lt;=")}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),"<c"+l+" lopr='"+o+"' fname='"+e+"' ftype='"+s.toUpperCase()+"' v1='"+n+"' v2='"+r+"' op='"+c+"' fcaption='"+t+"' />"}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+='<tr><td class="tableCell">'+$j("#hdnCbValue").val()+"</td>",e+='<td class="tableCell" >'+document.getElementById("txtHeader").value+"</td>",e+='<td class="tableCell" >'+document.getElementById("txtFooter").value+"</td>",e+='<td class="tableCell" >'+t+"</td>",e+='<td class="tableCell" >'+document.getElementById("txtSubOrder").value+"</td>",e+='<td class="tableCell" >'+document.getElementById("cbLineSpace").checked+"</td>",e+='<td class="tableCell" >'+document.getElementById("cbTtl").checked+"</td>",e+="</tr>",$j("#tblSubtotlList").append(e)}function bindSubtotalList(){if(""!=$j("#hdnSubtotalList").val()){for(var e=$j("#hdnSubtotalList").val().split(";"),t=e.length,a="",i=0;i<t;i++){var n=e[i].split(",");a+='<tr><td class="tableCell">'+n[0]+"</td>",a+='<td class="tableCell" >'+n[1]+"</td>",a+='<td class="tableCell" >'+n[2]+"</td>",a+='<td class="tableCell" >'+n[3]+"</td>",a+='<td class="tableCell" >'+n[4]+"</td>",a+='<td class="tableCell" >'+n[5]+"</td>",a+='<td class="tableCell" >'+n[6]+"</td>",a+="</tr>"}$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;i<a.length;i++){var n,r,l,o,s=a[i].split("^"),c="";if(0==i)i>0&&(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;a<t.length;a++)t[a]==e&&(IsexistView=!0)}var isExistCondtn=1,views="",lname="";function isExistViewName(){if("new"==$j("#txtViewName").val().toLowerCase()||""==$j("#txtViewName").val().toLowerCase()||"main"==$j("#txtViewName").val().toLowerCase()||requestJSON&&"old"!=iviewButtonStyle&&"charts"==$j("#txtViewName").val().toLowerCase())return showAlertDialog("warning",3019,"client"),!1;if($j("#txtViewName").val().toLowerCase()==$j("#hdnTransId").val().toLowerCase())return showAlertDialog("warning",3022,"client"),!1;if($j("#txtViewName").val().length>15)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;n<i.length;n++)i[n].toLowerCase()==lname.toLowerCase()&&(a=!0);return 1==a&&"Edit"!=t?(showAlertDialog("warning",3022,"client"),!1):("ON"!=$j("#hdnStatus").val()||(SaveListCondition(),0!=isExistCondtn))&&(saveLViewActionCond(),document.getElementById("btnSav").click(),$j("#hdnViewNames").val(views+","+lname),!0)}function discardChanges(){$j("#hdnSubtotal").val(""),$j("#hdnNoRepeat").val(""),$j("#ddlSortBy option:selected").val(""),$j("#hdnSort").val(""),$j("#ddlGroupBy option:selected").val(""),$j("#hdnGroup").val(""),$j("#rbtnOrder option:selected").text(""),$j("#hdnOrder").val(""),$j("#rbtnStatus option:selected").text(""),$j("#hdnStatus").val(""),$j("#hdnColumns").val(""),$j("#hdnSubtotlCaptn").val(""),$j("#hdnCondTxt").val(""),$j("#ddlSortBy").val(""),$j("#ddlGroupBy").val(""),$j("#rbtnOrder option:selected").text("Asc"),$j("#rbtnStatus option:selected").text("OFF"),$j("#tblFilter").empty(),$j("#ddlListFilter").val(""),$j("#ddlListFilcond").val(""),$j("#txtListFilter").val(""),$j("#ListfilVal2").val(""),$j("#txtHeader").val(""),$j("#txtFooter").val(""),$j("#ddlCaption").val(""),$j("#cbLineSpace").prop("checked",!1),$j("#cbTtl").prop("checked",!1),$j("#txtSubOrder").val(""),$j("#tblSubtotal input[type=checkbox]").each(function(){$j(this)[0].checked=!1}),$j("#tblNorep input[type=checkbox]").each(function(){$j(this)[0].checked=!1}),$j("#tblSubtotlList").empty()}function FindViewPos(){var e=document.getElementById("imgView");X=FindPosX(e),Y=FindPosY(e)}var X=0,Y=0;function FindPosX(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 FindPosY(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 HideNqIvViewList(){var e=$j("#listViewPopUp");1==IsNqViewBtnCliked?(IsNqViewBtnCliked=!1,e.show()):e.hide()}function ConfirmDelete(){var e="ar"==callParentNew("gllangType"),t=$.confirm({theme:"modern",title:appGlobalVarsObject.lcm[155],onContentReady:function(){disableBackDrop("bind")},backgroundDismiss:"false",rtl:e,escapeKey:"buttonB",content:appGlobalVarsObject.lcm[9],buttons:{buttonA:{text:appGlobalVarsObject.lcm[164],btnClass:"btn btn-primary",action:function(){t.close();var e=document.getElementById("ddlViewList"),a=e.options[e.selectedIndex].innerHTML;$j("#hdnViewDelt").val(a),DeleteView(a)}},buttonB:{text:appGlobalVarsObject.lcm[192],btnClass:"btn btn-bg-light btn-color-danger btn-active-light-danger",action:function(){return disableBackDrop("destroy"),!1}}}})}function DeleteView(e){$j("#btnRemv").click();return!1}function EditCondPopUp(){return""!=$j("#hdnCondTxt").val()&&SetListCondition($j("#hdnCondTxt").val()),!1}function NewViewMode(){return $j("#hdnNoRepeat").val(""),$j("#hdnNoRepeatCaptn").val(""),$j("#hdnSubtotlCaptn").val(""),$j("#hdnSubtotalList").val(""),$j("#hdnGridCond").val(""),$j("#hdnGroup").val(""),$j("#hdnSort").val(""),$j("#hdnStatus").val("OFF"),$j("#hdnColumns").val(""),$j("#hdnOrder").val("Asc"),!0}function OpenopupWithCond(){$j("#lblViewName").show(),$j("#txtViewName").show(),$j("#lblviewtext").hide(),$j("#ddlViewList").hide(),$j("#btnRemove").hide(),$j(divtr1).show(),tr1.className="tvRow selProperty",$j(divtr2).hide(),$j(divtr3).hide(),$j(divtr4).hide(),$j(divtr5).hide();var e=window.innerWidth,t=window.innerHeight;"number"!=typeof e&&("CSS1Compat"==document.compatMode?(e=document.documentElement.clientWidth,t=document.documentElement.clientHeight):(e=document.body.clientWidth,t=document.body.clientHeight));var a=document.getElementById("bg");$j(a).show();var i=document.getElementById("divAction");$j(i).show(),"Microsoft Internet Explorer"==navigator.appName?computedStyle=i.currentStyle:computedStyle=document.defaultView.getComputedStyle(i,null);var n=(e-computedStyle.width.replace("px",""))/2,r=(t-computedStyle.height.replace("px",""))/2;$j(i).css("left",n+"px"),$j(i).css("top",r+"px"),$j(i).css("top","40px");document.getElementById("Panel2");var l=$j(document).height(),o=0;500>l&&(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("<br>","~");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<arrCheckedFilter.length;e++)$j("#cb"+arrCheckedFilter[e]).attr("checked")?$j("#cb"+arrCheckedFilter[e]).prop("checked",!1):$j("#cb"+arrCheckedFilter[e]).prop("checked","checked")}function CheckHiddenColumns(e,t){var a,i=new Array;a="Iview"==document.title?"#GridView1 tr:first-child th":"#GridView1 tr:first-child th a",$j(a).each(function(e){this.innerHTML&&$j(this).text()&&i.push(this.innerHTML.replace(/<br>/g,""))});for(var n=0;n<e.length;n++){var r=e[n],l=(r=r.replace(/~/g,"")).replace(/[^\w\s]/gi,"").replace(/\s/g,"");-1==$j.inArray(r,i)?$j("#cb"+l).prop("checked","checked"):$j("#cb"+l).prop("checked",!1)}}var calledFrom="";function UpdateActiveArray(e){if(""==calledFrom){var t=$j(e).attr("id");$j(e).hasClass("ui-state-active")&&-1==window.parent.AxIvFilterMinHeader.indexOf(t)?window.parent.AxIvFilterMinHeader.push(t):window.parent.AxIvFilterMinHeader.indexOf(t)>-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;e<window.parent.AxIvFilterMinHeader.length;e++)calledFrom="clicked",$j("#"+window.parent.AxIvFilterMinHeader[e]).click();calledFrom=""}function HighLightSelected(){selectedFilterItem&&$j("#"+selectedFilterItem).length>0?$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+"&params=",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;i<a.length;i++){var n=a[i].substring(0,a[i].indexOf(":")),r=a[i].substring(a[i].indexOf(":")+1);t=r.split(",");for(var l=0;l<t.length;l++){$j("#leftPanel:input[value="+t[l]+"]").attr("checked","true"),$j("#"+n+"colValue"+" input").each(function(){$j(this).val()==t[l].toString()&&$j(this).prop("checked",!0)})}}""!=$j("#hdnparamValues").val()&&SetParamValues($j("#hdnparamValues").val())}$j("#hdnMyViewFilterCol").val("")}function OpenIviewFromIv(e,t,a,i){if(configNavProp=i!=undefined?i:"",""!=e){closeParentFrame(),e+="&AxIvNav=true";try{ASB.WebService.SetActionIvParams(e,t,a,SuccOpenIvAction)}catch(n){closeParentFrame()}}}function SuccOpenIvAction(e,t){if(""!=e){callParentNew("updateAppLinkObj("+e+",1)","function");var a=$j("#axpiframe",parent.document);""==configNavProp&&a.hasClass("frameSplited")&&(configNavProp="split"),"split"===configNavProp?(ShowDimmer(!1),callParentNew("OpenOnPropertyBase(".concat(e,")"),"function")):"popup"===configNavProp?LoadPopPage(e):"default"===configNavProp||""===configNavProp?(UpdatePrevMid1FrameUrl(e),document.location.href=e):"newpage"===configNavProp&&popupFullPage(e)}}function adjustwin(e,t,a){var i=t.name;"openpop"!=(i=i.toLowerCase()).substring(0,7)&&"loadpop"!=i.substring(0,7)&&"ivewPop"!=i.substring(0,7)||(i="MyPopUp")}$j(window).on("load",function(){setGridviewWidth()});var initialSrchVal="";function SetFileToDownload(e,t,a,i){var n,r=arguments.length>4&&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<e.split("♠").length;i++){var n=e.split("♠")[i];if(n.indexOf("Error:")>-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('<a id="hdnButtonInvokeDownload" class="hdnButtonInvokeDownload" download=\''+a+"' href='"+e+"'><img src='"+e+"'/></a>"),$(".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<e[0].childNodes.length;i++){if("\n "!=(r=e[0].childNodes[i].textContent)){if(0==i||1==i)(n=t.find("td").eq(a).html()).indexOf("checkbox")>-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<e[0].children.length;i++){var n,r=e[0].children[i].textContent;if(0==i)(n=t.find("td").eq(i).html()).indexOf("checkbox")>-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&&"<error>"!=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="<table id='tblPickData' data-pick='"+i+"' class='pickGridData'>";for(var c=0;c<n.length;c++){var d="axPickTd00"+(c+1)+"F",p=CheckSpecialCharsInHTML(n[c]);if(""!=n[c].toString()){var u=n[c].toString();-1!=n[c].toString().indexOf("^")&&(u=n[c].toString().split("^")[1]),-1!=p.indexOf("\\")&&(p=p.replace("\\","\\\\")),l+='<tr><td id="'+d+'" onclick="javascript:SetPickVal(\''+i+"^"+p+"', $(this).data());FillDependents('"+i+'\');" class="handCur" data-setPickVal="'+i+"^"+p+'" '+(r[c]||"")+"><a>"+u+"</a></td></tr>"}}l+="</table>",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("<label>".concat(appGlobalVarsObject.lcm[11],"</label>"));SetPrevNextLinks(),document.getElementById("advancebtn").style.visibility="visible"}else{l="<table id='' cellpadding='1' cellspacing='1'>",l+="",l+="</table>",document.getElementById("advancebtn").style.visibility="hidden",l+="<label>".concat(appGlobalVarsObject.lcm[11],"</label>"),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<h){0==$j("#tblPickData tr:nth-child("+selectedRow+++")").length&&(selectedRow=2),$j("#tblPickData tr").removeClass("pickbg"),$j("#tblPickData tr:nth-child("+selectedRow+")").addClass("pickbg");for(var t=0,i=0;i<selectedRow;i++)t+=$j("#tblPickData tr:nth-child("+i+")").height();t+20>$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;u<m&&(h=m-u);var f=parseInt(p-h,10);f>0?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",!1),t.css("color","black"),t.attr("onclick","javascript:GetData('next')")):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&&curPageNo<noOfPLPages&&(curPageNo+=1),fallback=!0,CallPicklistService(plname,plvalue,curPageNo,plpagesize,objid)}function FindCtrlPos(e){"string"==typeof e&&(e=document.getElementById(e));var t=e;jQuery(e).offset();iX=findPosX(t)+t.clientWidth+1,iY=findPosY(t)+t.clientHeight+1}function findPosX(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 findPosY(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 SetPickVal(e){var t=arguments.length>1&&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(/&#94;/g,"^")).replace(/&#64;/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='<iframe id="ivPlAdvSearch" name="ivPlAdvSearch" class="col-12 flex-column-fluid w-100 h-100 p-0" src="'.concat(t,'" frameborder="0" allowtransparency="True"></iframe>'),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;o<HeaderText.length;o++)""!==HeaderText[o]&&(ivirColumnTypeObj[FieldName[o]]=ColumnType[o]);if(rowTypeExist=FieldName.filter(function(e){return"axrowtype"==e}).length>0,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"<th ".concat(void 0!==a?'style="'.concat(a,'"'):"",' align="center" colspan="').concat(e,'" rowspan="1" class="pivotHeaderStyle dt-center">').concat(t.replace(/~/g,"<br />"),"</th>")},d=!0;if(s+="<tr>",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<p;u++)s+=c(1,"");ivHeadRows.pivotghead.head.forEach(function(e,t,a){var i=parseInt(e.en)-parseInt(e.sn);e.ghead=e.ghead||"",s+=c(i,e.ghead)})}else t.data.PivotAndMerge&&Object.keys(t.data.PivotAndMerge).filter(function(e,a){return""!==t.data.PivotAndMerge[e]["#text"]}).length?Object.keys(t.data.PivotAndMerge).forEach(function(e,a){var i=t.data.PivotAndMerge[e],n=parseInt(i["@e"])-parseInt(i["@s"]);i["#text"]=i["#text"]||"",s+=c(n,i["#text"])}):d=!1;s+="</tr>",d||(s="")}var h="";tableWidth=0;var m='<table class="gridData table '.concat(appGlobalVarsObject._CONSTANTS.compressedMode?"table-sm":"",'" rules="all" border="1" id="GridView1" data-row>')+"<thead>"+s+'<tr class="fw-bold fs-6 text-gray-800 border-bottom-2 border-gray-200">';m+='<th id="GridView1_ctl01_rowno" data-header-name="rowno" scope="col" style="width:'.concat(null==findGetParameter("tstcaption")?minCellWidth:listViewCheckBoxSize,'px; ">\n ').concat(rowOptionsExist?'<div class="rowOptionsExist float-start form-check form-check-sm form-check-custom invisible">\n <a href="javascript:void(0);" class="btn btn-sm btn-icon form-check-input">\n <span class="material-icons material-icons-style material-icons-2">arrow_drop_down</span>\n </a>\n </div>':"",'\n <div class="form-check form-check-sm form-check-custom form-check-solid ').concat(appGlobalVarsObject._CONSTANTS.compressedMode?"px-2":"px-5 py-3",'"><input class="form-check-input ').concat("true"==isChkBox?"":"d-none",'" name="chkall" id="chkall" onclick="javascript:CheckAll();" type="checkbox" /></div>\n </th>'),h+="<td></td>",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+='<th id="GridView1_ctl01_'.concat(FieldName[t],'" data-header-name="').concat(FieldName[t],'" scope="col" style="width:').concat(i,'px;">').concat(e.replace(/~/g,"<br />")).concat("","</th>"),h+="<td></td>"}}),h="<tfoot><tr>".concat(h,"</tr></tfoot>"),m+="</tr>"+"</thead>".concat(h,"</table>"),$("#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(/&grave;/g,"`"),firstTimeParams.paramsList=getParamsValueList(),firstTimeParams.paramsList&&(firstTimeParams.paramsList=JSON.parse(JSON.stringify(firstTimeParams.paramsList).replace(/&/g,"&amp;"))))}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?"<span><span>":"<div><b>")+($("#"+a).data("caption")||a)+(requestJSON&&"old"!=iviewButtonStyle?"</span>: ":"</b> </td><td>: ")+paramValuesArray[a]+(requestJSON&&"old"!=iviewButtonStyle?"</span>;&nbsp;":"</div>"))}),requestJSON&&"old"!=iviewButtonStyle){var a='<span class="filtertooltipNew">Params<span class="ms-10 cursor-pointer tooltiptext" style="display:none;" >'+e+"</span></span>";$("#FilterValues").html(a);var i=$(".filtertooltipNew span.tooltiptext").clone().css("display","");$("#dvSelectedFilters + .tooltiptext").replaceWith(i),$("#dvSelectedFilters + .tooltiptext").before('\n <span data-caption="main" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-dismiss="click" data-bs-original-title="'.concat(appGlobalVarsObject.lcm[318],'" onclick="$(\'#button2\').click();" class="material-icons material-icons-style material-icons-5 position-absolute pt-1">clear</span>\n '))}else{a='<span class="filtertooltip">'+t+'<span class="ms-10 cursor-pointer tooltiptext"><div>'+e+"</div></span></span>";$("#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="<listviewCols><selectedCols>".concat(n,"</selectedCols><selectedHyperlink>").concat(r,"</selectedHyperlink></listviewCols>"));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<t)?(checkNextDBRowsExist=!1,$("#lnkShowAll").addClass("d-none"),!1):(defaultRecsPerPage=iviewDataWSRows=dtTotalRecords,checkNextDBRowsExist=!0,$("#lnkShowAll").removeClass("d-none"),!0)}catch(i){}}function pieChart1(e){try{var t;$("#inMemChartWrapper").highcharts({colors:["#50B432","#ED561B","#DDDF00","#24CBE5"],credits:{enabled:!1},chart:{type:"pie",options3d:{enabled:!0,alpha:45,beta:0},height:250},exporting:{enabled:!1},legend:(t={layout:"vertical",backgroundColor:"#FFFFFF",floating:!0,align:"right",x:90,y:0,itemStyle:{color:"#FFFFF"}},_defineProperty(t,"align","right"),_defineProperty(t,"verticalAlign","middle"),t),title:{style:{fontWeight:"bold",fontSize:"15px"},text:appGlobalVarsObject.lcm[291]},tooltip:{shared:!0,style:{fontWeight:"bold"}},plotOptions:{pie:{allowPointSelect:!0,cursor:"pointer",depth:35,size:180,dataLabels:{enabled:!0,format:"{point.name}"}}},series:[{colorByPoint:!0,name:"Memory details in MB",data:JSON.parse(JSON.stringify(JSON.parse(e)))}]}),$(".iviewTableWrapperNew").addClass("chartsAdded"),adjustChartBasedWrapperHeight()}catch(a){showAlertDialog("warning",appGlobalVarsObject.lcm[361])}}function callCharts(){ShowDimmer(!0),$.ajax({type:"POST",url:"../aspx/iview.aspx/MemoryDetails",contentType:"application/json;charset=utf-8",data:"{}",dataType:"json",success:function(e){ShowDimmer(!1),pieChart1(e.d),isPostback=!1},error:function(e){showAlertDialog("warning",appGlobalVarsObject.lcm[273]+appGlobalVarsObject.lcm[274]),ShowDimmer(!1)}})}function loadAxTstruct(e){var t=$j("#axpiframe",parent.document),a=$j("#middle1",parent.document);if(t.hasClass("frameSplited"))if(e.toLowerCase().indexOf("tstruct.aspx?")>-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 <li id="myFiltersLi" class="menu-item px-3 '.concat($("#hdnIsParaVisible").val(),'" onclick="$(\'#Filterscollapse\').collapse(\'toggle\');">\n <a href="#Filterscollapse" id="myFilters" class="filterBuTTon" data-bs-toggle="collapse" data-bs-parent="#accordion" aria-expanded="false" onclick="$(\'#Filterscollapse\').collapse(\'toggle\');">\n <span class="ccolapsee material-icons material-icons-style">search</span>\n <span id="lblfilters" title="Params">\n Params\n </span>\n </a> ');requestJSON&&"old"!=iviewButtonStyle||(e+=' <div id="dvSelectedFilters" class="badge badge-primary cursor-pointer d-none">\n <span id="FilterValues"></span> \n </div>'),e+="</li>","modern"!=iviewButtonStyle&&(toolbarHTML+=e),toolbarHTML+="\n ".concat(requestJSON&&"old"!=iviewButtonStyle?"":'<li id=\'filterWrapper\' class="dropdown-item">\n <span class="material-icons pinIcon customIcon d-none" title="Pin to taskbar">\n push_pin\n </span>\n </li>','\n <li id=\'ivirCButtonsWrapper\' class="menu-item px-3 d-none" data-kt-menu-trigger="hover" data-kt-menu-placement="right-start"\n data-kt-menu-flip="left-start, top">\n <span class="material-icons pinIcon customIcon d-none" title="Pin to taskbar">\n push_pin\n </span>\n </li>'),"modern"==iviewButtonStyle&&(toolbarHTML='<div class="card">\n <div class="card-body py-5">\n <div class="mh-450px scroll-y me-n5 pe-5">\n <div class="row g-2">\n '.concat(toolbarHTML+=e,"\n </div>\n </div>\n </div>\n </div>")),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 <li class="menu-item px-3" data-kt-menu-trigger="hover" data-kt-menu-placement="right-start"\n data-kt-menu-flip="left-start, top">\n <span class="iconUIPin"><i class="fa fa-thumb-tack"></i></span>\n <span class="material-icons pinIcon customIcon d-none '.concat("inmemdb"==iName?"d-none":"",' " title="Pin to taskbar">push_pin</span>\n <a href="javascript:void(0)" id="').concat(e.key,'" class="menu-link px-3" title="').concat(finalCaption=getModernButtonIconInfo(e.groupName),'" data-close-others="true">\n <div class="symbol ').concat("modern"==iviewButtonStyle?"symbol-40px":"symbol-25px",' symbol-circle me-5 dropdownIconUI">\n <span class="symbol-label bg-primary text-white fw-normal fs-3 iconUITitle">').concat(e.icon&&""!=e.icon&&getButtonIconHTML(e.icon)||getModernButtonIconInfo(e.groupName),'</span>\n </div>\n <span class="dropdownIconName text-break text-wrap">').concat(getModernButtonIconInfo(e.groupName,!1),'</span>\n <i class="fa fa-angle-down modernDropdownIcon" aria-hidden="true"></i>\n </a>\n <ul class="menu menu-sub menu-sub-dropdown menu-column menu-rounded menu-gray-600 menu-state-bg-light-primary fw-bold mh-450px scroll-y ').concat("modern"==iviewButtonStyle?"w-100 w-sm-350px py-4":"w-200px py-3",' ">\n ').concat("modern"==iviewButtonStyle?'<div class="col-12 d-flex flex-wrap">':"","\n ").concat(constructToolbarHTML(getFormattedToolbarJSON(e),!0),"\n ").concat("modern"==iviewButtonStyle?"</div>":"","\n </ul>\n </li>\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 <li class="menu-item px-3">\n <span class="iconUIPin"><i class="fa fa-thumb-tack"></i></span>\n <span class="material-icons pinIcon d-none customIcon '.concat("inmemdb"==iName?"d-none":"",' " title="Pin to taskbar">push_pin</span>\n <a onclick="').concat(e.onclick||"",'" id="btn_').concat(e.key,'" title="').concat(finalCaption=getModernButtonIconInfo(buttonNewTitle=e.caption||e.hint||e.key,!1),'" class="menu-link px-3" href="').concat(e.href||"",'">\n <div class="symbol ').concat("modern"==iviewButtonStyle?"symbol-40px":"symbol-25px",' symbol-circle me-5 dropdownIconUI">\n <span class="symbol-label bg-primary text-white fw-normal fs-3 iconUITitle">').concat(e.icon&&""!=e.icon&&getButtonIconHTML(e.icon)||getModernButtonIconInfo(buttonNewTitle),'</span>\n </div>\n <span class="dropdownIconName text-break text-wrap">').concat(finalCaption,"</span>\n </a>\n </li>\n "))})}):e.forEach(function(e){e.isRoot?a+="undefined"!=typeof axToolbarRootGenerator&&axToolbarRootGenerator(e)||'\n <li class="dropdown-item">\n <a href="javascript:void(0)" id="'.concat(e.key,'" class="dropdown-toggle" data-bs-toggle="dropdown"\n data-hover="dropdown" title="').concat(e.groupName,'" data-close-others="true">\n <span class="tbIcon">').concat(e.icon&&""!=e.icon&&getButtonIconHTML(e.icon)||"",'</span>\n <span class="tbTitle">').concat(e.groupName,'</span>\n <span class="icon-arrows-down">\n </span>\n </a>\n <ul class="dropdown-menu">\n ').concat(constructToolbarHTML(getFormattedToolbarJSON(e),!0),"\n </ul>\n </li>\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 <li class="dropdown-item '.concat(t?"liTaskItems":"actionWrapper",'">\n <a onclick="').concat(e.onclick||"",'" id="btn_').concat(e.key,'" title="').concat(e.hint||e.caption||e.key,'" class="action singleaction handCur l2" href="').concat(e.href||"",'">\n <span class="tbIcon">').concat(e.icon&&""!=e.icon&&getButtonIconHTML(e.icon)||"",'</span>\n <span class="tbTitle"> ').concat(e.caption||e.hint||e.key,"</span>\n </a>\n </li>\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()<widthOfList()?$(".scroller-right").show():$(".scroller-right").hide(),getLeftPosi()<0?$(".scroller-left").show():($(".item").animate({left:"-="+getLeftPosi()+"px"},"slow"),$(".scroller-left").hide())}function scrollerRightClick(){$(".scroller-left").fadeIn("slow"),-widthOfHidden()<$("#dvViewtabs").outerWidth()&&$(".scroller-right").fadeOut("slow"),lastTabPos=$("#viewTabs > 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()<t&&($("#viewTabs").animate({left:"-="+$("#"+e).offset().left+"px"},"slow",function(){}),$(".scroller-left").fadeIn("slow"))}function checkAllCheckBoxTokens(e,t){$(e).is(":checked")?($("#".concat(t," > 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<a.length;o++)0==o&&(l.options[n]=new Option("",""),l.options[n].title="",n++),l.options[n]=new Option(a[o],a[o]),i==a[o]&&(l.options[n].selected=!0),l.options[n].title=a[o],r[o]&&r[o].forEach(function(e){var t,a=null===(t=Object.keys(e))||void 0===t?void 0:t[0];$(l.options[n]).data(a,e[a])}),n++;break;case"multi select":if(requestJSON){var s=a.join("`");if($(l).hasClass("trySelectMs")){try{$(l).data("bs.tokenfield")?$(l).tokenfield("setTokens",[]):$(l).val("")}catch(p){}$(l).attr("data-valuelist",s).data("valuelist",s);var c=_toConsumableArray(new Set($(l).data("valuelist").split($(l).data("separator")))).filter(function(e){return""!=e});$(l).empty(),c.forEach(function(e,t){return $(l).append(new Option(e,e,!0,!1))}),$(l).trigger("change")}}else{o=0;$(l).parent().next().html("");var d="";for(o=0;o<a.length;o++)d+="<span><input type='checkbox' id='".concat(e,"' class='chkAllList chkShwSel' onclick='UncheckChkAll(this);' value='").concat(a[o],"'/>").concat(a[o],"</span></br>");$(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)?'<span class="'.concat(e.addClass,'">').concat(e.text,"</span>"):'<img src="'.concat(e,'" class="menuIcon">')}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.page<e.total_count}}}ShowDimmer(!1)},cache:!0},allowClear:!0,placeholder:appGlobalVarsObject.lcm[441],templateResult__t:function(e,t){var a=$(t),i="";e.loading?i=e.text:i=e.row?"Hi":e.text;return a.append($(i)),a}}).on("select2:open",function(t){var a,i=null===(a=$(t.currentTarget).data("select2"))||void 0===a?void 0:a.$dropdown;0==i.find(".select2-search").find(".plAdvanceSearch").length&&i.find(".select2-search").addClass("input-group").append('<span class="input-group-text rounded-circle btn btn-icon btn-white btn-color-gray-500 btn-active-primary shadow-sm ms-2 plAdvanceSearch" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-dismiss="click" data-bs-original-title="Advance Search" onclick="javascript:CallSearchOpen('.concat($(e)[0].id,');"><span class="material-icons material-icons-style cursor-pointer">manage_search</span></span>')).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='<div class="msSelectAllOption form-check form-check-custom form-check-solid align-self-end px-5">\n <input type="checkbox" class="form-check-input msSelectAll" onchange="checkAllCheckBoxTokens(this, \''.concat($(t.currentTarget).attr("id"),'\')"/>\n <label for="SelectAll" class="ps-2 form-check-label form-label col-form-label">\n Select All\n </label>\n </div>');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())});