
// Generated by Intersoft Script Optimizer V1.5 + Intersoft JS Engine MaxObfuscate(tm) V1.0 
// Generated Datetime : 11/26/2008 2:43:01 PM
// Copyright (c) 2005 Intersoft Solutions.
// Unauthorized decryption/reproduction of any codes contained herein is strictly prohibited and will result in severe civil and criminal penalties .
//**Start Encode**
function wgActiveCell(v7d141,vc0b76,v21e80){ this.element =v21e80; this.tblName =vc0b76; this.gridId =v7d141; if (v21e80) this.cellIndex =v21e80.cellIndex; this.rowElement =null; this.rowChanged =false; this.GetColSetRowElement =function() { var vfdc5 =wgGetGridById(this.gridId); var v25d6 =vfdc5.Tables[this.tblName]; if (v25d6.IsUseColumnSet) { return wgGetColumnSetRow(this.element); } return null; }; this.GetColSetRowsElement =function() { var vfdc5 =wgGetGridById(this.gridId); var v25d6 =vfdc5.Tables[this.tblName]; if (v25d6.IsUseColumnSet) { return wgGetColumnSetRows(this.element); } return null; }; return this;}function wgSetLastAEC(v95c15){ var v81060 =WG50Engine.GetTable(v95c15); var v59386 =ISGetObject(v81060.gridId); var vac447 =v59386.Tables[v81060.tblName]; if (vac447.LastAECIndex !=-1) { if (v95c15.cells.length>vac447.LastAECIndex) { var v14518 =v95c15.cells[vac447.LastAECIndex]; if (v14518.type =="Cell" ||v14518.type =="FilterColumn") WGEditEngine.HighlightEditCell(v14518); else WGEditEngine.ProcessInitialEdit(v95c15); } } else { WGEditEngine.ProcessInitialEdit(v95c15); }}function wgGetFirstEditableCell(v08090){ if (wgIsColumnSetRow(v08090)) return wgGetCSFirstEditableCell(v08090); var v6f151 =WG50Engine.GetTable(v08090); var v5f934 =ISGetObject(v6f151.gridId); var ve7051 =v5f934.Tables[v6f151.tblName]; var v7a863 =ve7051.GetElement(WG40.COLHEADER,WG40.HTMLTABLE,v08090).cells; var v1db59 =-1; for (var vb4634=0; vb4634<v7a863.length; vb4634++) { WG50Engine.EmulateAttributes(v7a863[vb4634]); if (v7a863[vb4634].type =="Column") { var v87a46 =ve7051.Columns.GetNamedItem(v7a863[vb4634].colName); if (WG50Engine.IsCellEditable(v87a46,v08090.cells[vb4634],vb4634)) { v1db59 =vb4634; break; } } } return v1db59;}function wgGetNextEditableRow(va1e10,v79263){ var v22a26 =wgGetNextVisibleRow(va1e10,v79263); if (v22a26) { while (!(v22a26 &&v22a26.element &&!v22a26.element.noEdit)) { if (v22a26 ==null) return null;  v22a26 =wgGetNextVisibleRow(va1e10,v22a26.element); } } return v22a26;}function wgGetPrevEditableRow(v73882,vfe72){ var vb6446 =wgGetPrevVisibleRow(v73882,vfe72); if (vb6446) { while (!(vb6446 &&vb6446.element &&!vb6446.element.noEdit)) vb6446 =wgGetPrevVisibleRow(v73882,vb6446.element); } return vb6446;}function wgGetNextEditableCell(v44f15,v2e719){ var vd3182 =v44f15.parentElement; if (!vd3182) vd3182 =v2e719; var v2be2 =false; if (wgIsColumnSetRow(vd3182)) { var v4c488 =wgGetCSNextEditableCell(v44f15,vd3182); if (v4c488 &&v4c488.rowElement) { if (v4c488.rowElement.type !="GroupHeader" &&v4c488.rowElement.type !="GroupTotalRow") return v4c488; else v2be2 =true; } } var v64b31 =WG50Engine.GetTable(vd3182); var vd463 =ISGetObject(v64b31.gridId); var v5be58 =vd463.Tables[v64b31.tblName]; var v33d46 =v5be58.GetElement(WG40.COLHEADER,WG40.HTMLTABLE,vd3182).cells; var vc8a56 =-1; var vfed71 =new wgActiveCell(v64b31.gridId,v64b31.tblName); var v04885 =v44f15.cellIndex;  if (IS.ie &&v5be58.IsRootTable &&vd463.FreezePaneActive &&(wgIsFilterRow(vd3182)||wgIsNewRow(vd3182))) v04885 =WG50Engine.GetRealCellIndex(v44f15); if (!v2be2) { for (var v96666=v04885 +1; v96666<v33d46.length; v96666++) { WG50Engine.EmulateAttributes(v33d46[v96666]); if (v33d46[v96666].type =="Column") { var vd8c83 =v5be58.GetColumn(v33d46[v96666].colName); if (WG50Engine.IsCellEditable(vd8c83,vd3182.cells[v96666],v96666)) { vc8a56 =v96666; break; } } } } if (vc8a56 ==-1) { var vb7c17 =wgGetNextEditableRow(v64b31,vd3182); if (vb7c17 &&vb7c17.element &&v5be58.Get("AllowEdit")=="Yes") { vfed71.rowChanged =true; vfed71.rowElement =vb7c17.element; if (vb7c17.element.type =="Record" ||vb7c17.element.type =="NewRow") { vc8a56 =wgGetFirstEditableCell(vb7c17.element); if (typeof (vc8a56)=="object") { vfed71.element =vc8a56; } else { if (vc8a56 ==-1) vc8a56 =v5be58.LastAECIndex; if (vc8a56>=vb7c17.element.cells.length) vc8a56 =vb7c17.element.cells.length -1; vfed71.element =vb7c17.element.cells[vc8a56]; } vfed71.cellIndex =vfed71.element.cellIndex; } else { vc8a56 =0; vfed71.element =null; vfed71.cellIndex =null; } } } else { vfed71.rowElement =vd3182; vfed71.element =vd3182.cells[vc8a56]; vfed71.cellIndex =vfed71.element.cellIndex; } if (vc8a56 ==-1) { vfed71.element =v44f15; vfed71.rowElement =vd3182; vfed71.cellIndex =vfed71.element.cellIndex; } return vfed71;}function wgGetPrevEditableCell(v08b73,v1885){ var va8a87 =v08b73.parentElement; if (!va8a87) va8a87 =v1885; if (wgIsColumnSetRow(va8a87)) { var v1a458 =wgGetCSPrevEditableCell(v08b73,va8a87); if (v1a458 &&v1a458.rowElement) { if (v1a458.rowElement.type !="GroupHeader") return v1a458; } } var v70378 =WG50Engine.GetTable(va8a87); var v9b963 =ISGetObject(v70378.gridId); var vcc368 =v9b963.Tables[v70378.tblName]; var vf6b98 =vcc368.GetElement(WG40.COLHEADER,WG40.HTMLTABLE,va8a87).cells; var v91742 =-1; var ve1940 =new wgActiveCell(v70378.gridId,v70378.tblName); var v99a83 =v08b73.cellIndex;  if (IS.ie &&vcc368.IsRootTable &&v9b963.FreezePaneActive &&(wgIsFilterRow(va8a87)||wgIsNewRow(va8a87))) v99a83 =WG50Engine.GetRealCellIndex(v08b73); for (var v56870=v99a83 -1; v56870>=0; v56870--) { WG50Engine.EmulateAttributes(vf6b98[v56870]); if (vf6b98[v56870].type =="Column") { var v36822 =vcc368.Columns.GetNamedItem(vf6b98[v56870].colName); if (WG50Engine.IsCellEditable(v36822,va8a87.cells[v56870],v56870)) { v91742 =v56870; break; } } } if (v91742 ==-1) { var vc6b31 =wgGetPrevEditableRow(v70378,va8a87); if (vc6b31 &&vc6b31.element &&vcc368.Get("AllowEdit")=="Yes") { ve1940.rowChanged =true; ve1940.rowElement =vc6b31.element; if (vc6b31.element.type =="Record" ||vc6b31.element.type =="NewRow") { if (vc6b31.element.type =="NewRow") ve1940.element =wgGetFirstEditableCell(vc6b31.element); else ve1940.element =wgGetLastEditableCell(vc6b31.element); if (ve1940.element) v91742 =ve1940.element.cellIndex; else { v91742 =vcc368.LastAECIndex; ve1940.element =vc6b31.element.cells[v91742]; } ve1940.cellIndex =v91742; } else { v91742 =0; ve1940.element =null; ve1940.cellIndex =null; } } } else { ve1940.rowElement =va8a87; ve1940.element =va8a87.cells[v91742]; ve1940.cellIndex =ve1940.element.cellIndex; } if (v91742 ==-1) { ve1940.element =v08b73; ve1940.rowElement =va8a87; ve1940.cellIndex =ve1940.element.cellIndex; } return ve1940;}function wgGetLastEditableCell(v01631){ if (wgIsColumnSetRow(v01631)) return wgGetCSLastEditableCell(v01631); var v89b92 =WG50Engine.GetTable(v01631); var v23d15 =ISGetObject(v89b92.gridId); var vb3367 =v23d15.Tables[v89b92.tblName]; var vd3496 =vb3367.GetElement(WG40.COLHEADER,WG40.HTMLTABLE,v01631).cells; var ve0f33 =-1; for (var v77238=vd3496.length -1; v77238>=0; v77238--) { WG50Engine.EmulateAttributes(vd3496[v77238]); if (vd3496[v77238].type =="Column") { var v90738 =vb3367.Columns.GetNamedItem(vd3496[v77238].colName); if (v90738.EditType !="NoEdit" &&(v77238<v01631.cells.length &&v01631.cells[v77238].noEdit !="True")) { ve0f33 =v77238; break; } } } if (ve0f33 !=-1) return v01631.cells[ve0f33]; else return null;}function wgActiveCellValid(v64967,v4513){ if (v64967.ActiveEditCell) { if (wgIsSameRow(v64967.ActiveEditCell.element.parentElement,v4513)) { return true; } } return false;}function wgIsRowEditable(vde767){ if (!vde767) return false; if (wgIsColumnSetRow(vde767)) { return wgGetColumnSetRow(vde767).noEdit !="True"; } else { return vde767.noEdit !="True"; }}function wgGetUnMask(vcc242,v50a92,v22e71,v36826,v5e576){ var v2e967 =v50a92.DataType; var vb533; if (v5e576) vb533 =v5e576; else vb533 =v22e71.innerText; if (!v2e967) return vb533; if (wgIsFilterRow(v22e71.parentElement)) return vb533; var v03f19 =v50a92.DataFormatString; var v5cf61 =new ISClientData(null,v2e967,v03f19); vcc242.ValEngine.CheckType(v5cf61); var vec455 =v5cf61.Type; var v75c55 =v50a92.EditType;  if (vec455 =="number" &&v75c55 =="TextBox") { v5cf61.NewValue =vb533; return vcc242.ValEngine.UnMask(v5cf61,vcc242.CultureInfo); } else if (v75c55 =="Checkbox") { return v22e71.childNodes[0].checked; } else { if (v22e71.cellValue &&!v36826) return v22e71.cellValue; else return vb533; }}function wgGetMask(v1198,v41629,vd0227,vefe36,v87b42){ var ve3397; var v71871; if (v41629) { ve3397 =v41629.cellElement; v71871 =v1198.Tables[v41629.tblName]; } else { ve3397 =v87b42; v71871 =vefe36; } if (wgIsFilterRow(ve3397.parentElement)) return vd0227; var vaa256 =v71871.GetColumn(wgGetColNameByCell(ve3397)); if (!vaa256) return; var ve7929 =vaa256.DataType; if (!ve7929) return vd0227; var v60098 =vaa256.DataFormatString; var v55b78 =new ISClientData(null,ve7929,v60098); v1198.ValEngine.CheckType(v55b78); var ve2e33 =v55b78.Type; if ((ve2e33 =="number" ||ve2e33 =="datetime")&&typeof (vd0227)!="undefined") { v55b78.NewValue =vd0227; if (ve2e33 =="datetime" &&v60098 =="") v55b78.Format ="G"; if (ve2e33 =="number" &&v60098 =="") v55b78.Format ="g"; v1198.ValEngine.Validate(v55b78,v1198.CultureInfo); if (v55b78.IsValid) return v55b78.FormattedValue; else { if (typeof (ve3397.oldCellValue)!="undefined") { v55b78.NewValue =ve3397.oldCellValue; if (v55b78.NewValue ==" ") v55b78.NewValue =""; return v1198.ValEngine.Mask(v55b78,v1198.CultureInfo); } else return ""; } } else { return vd0227; }}function wgEditObj(v14047,va2848,v2e561,v6e559,v2ca41){ this.element =v2e561; this.type =v6e559; this.gridId =v14047; this.tblName =va2848; this.cellElement =v2ca41; return this;}function wgDispObjGeneric(v71f67,vc6458,vbf128,v42021,v7aa41,v1b420,v38912,v51990){ WGEditEngine.DisplayObjectGeneric(v71f67,vc6458,vbf128,v42021,v7aa41,v1b420,v38912,v51990);}function _FixAmpChar(v2bc22){ v2bc22 =v2bc22.replace(/&/g,"&amp;"); return v2bc22;}function wgIsRowMarkedEdit(v6a222){ if (v6a222.parentElement ==null) return false; var va3e22 =wgGetRootRow(v6a222); return va3e22.markedEdit;}function wgIsRowDirty(v48897){ var v6af58 =new Array(); if (wgIsColumnSetRow(v48897)) { v6af58 =wgGetColumnSetRows(v48897); } else { v6af58[0] =v48897; } for (var v5f86=0; v5f86<v6af58.length; v5f86++) { var v45f31 =v6af58[v5f86]; for (var vd9465=0; vd9465<v45f31.cells.length; vd9465++) { if (v45f31.cells[vd9465].cellModified) return true; } } return false;}function wgAddNewRow(vff033){ WG50Engine.ExecuteFlyPostback(vff033.Grid.Id,"AddRow",vff033);}function wgUpdateRow(v5e869){ WG50Engine.ExecuteFlyPostback(v5e869.Grid.Id,"UpdateRow",v5e869);}function wgDeleteRow(vd5c69){ WG50Engine.ExecuteFlyPostback(vd5c69.Grid.Id,"DeleteRow",vd5c69);}function wgHighlightEditCell(vbe652,v6985,vc1f50){ WGEditEngine.HighlightEditCell(vbe652,v6985,vc1f50);}function wgActivateEditMode(v6c088){ v6c088.ActivateEditMode();}var WGEditEngine = { ProcessInitialEdit: function(vae972) { if (wgIsColumnSetRow(vae972)) { WGCSEngine.ProcessInitialEdit(vae972); return; } var v99072 =wgGetFirstEditableCell(vae972); if (v99072 !=-1) WGEditEngine.HighlightEditCell(vae972.cells[v99072]); }, ClearEditCell: function(v4a292) { var va348 =v4a292.parentElement; if (!va348) return; var v27e53 =WG50Engine.GetTable(va348); var v62933 =ISGetObject(v27e53.gridId); if (!v62933.ActiveEditCell) return; WGEditEngine.HighlightEditCell(v62933.ActiveEditCell.element,"Clear",v4a292); v62933.ExitEdit(); v62933.ActiveEditCell =null; }, HighlightEditCell: function(v8ab41,v69170,v1f285) { var v98f28 =v8ab41.parentElement; if (!v98f28) return; var v8c863 =WG50Engine.GetTable(v98f28); if (!v8c863) return; var vc9199 =ISGetObject(v8c863.gridId); var v9c453 =vc9199.Tables[v8c863.tblName]; var v6fc5 =vc9199.LayoutSettings.RowHighlightType; if (vc9199.ActiveEditCell &&vc9199.ActiveEditCell.element ==v8ab41 &&v69170 !="Clear" &&v69170 !="Redraw") return; if (!v9c453.IsUseColumnSet &&((v8ab41.type !="Cell" &&v8ab41.type !="FilterColumn") ||(vc9199.Tables[v8c863.tblName].IsRootTable &&v8ab41.style.display !="none"  &&v8ab41.cellIndex ==v98f28.cells.length -1))) return; if (v69170 !="Clear") { v8ab41.selStyle =v8ab41.runtimeStyle.cssText; if (v69170 !="Nodraw") { with (v8ab41.runtimeStyle) { var v27045 =borderLeft; var vaf126 =borderTop; var v5a278 =borderRight; var vd8d3 =borderBottom; cssText =vc9199.GetEditFocusStyle(); if (IS.moz) v5a278 =v8ab41.style.borderRight; if (IS.moz &&v5a278 =="") v5a278 ="0px"; if (v6fc5 =="EntireRow") { borderLeft =v27045; borderTop =vaf126; borderRight =v5a278; borderBottom =vd8d3; } } } if (v69170 !="Redraw") { var v31749 =v8ab41.cellIndex;  if (vc9199.ActiveEditCell &&vc9199.ActiveEditCell.element !=v8ab41) WGEditEngine.HighlightEditCell(vc9199.ActiveEditCell.element,"Clear",v8ab41);  if (vc9199.FreezePaneActive &&v9c453.IsRootTable &&(wgIsFilterRow(v98f28)||wgIsNewRow(v98f28))) v31749 =WG50Engine.GetRealCellIndex(v8ab41); vc9199.ActiveEditCell =new wgActiveCell(v8c863.gridId,v8c863.tblName,v8ab41); vc9199.ActiveEditCell.rowElement =v98f28; vc9199.Tables[v8c863.tblName].LastAECIndex =v31749; vc9199.ResetStatus();  if (vc9199.LayoutSettings.VerboseEditingInformation &&!vc9199.IsInProgress) WGEditEngine.DisplayEditInfoText(vc9199.Tables[v8c863.tblName],v8ab41); } WGEventEngine.EnsureCellVisible(vc9199,v8ab41); } else { if (v8ab41 &&wgIsSameRow(v98f28,v1f285.parentElement)) { var vaf347 =false;  if (IS.moz &&v8ab41.currentStyle.display !="none") vaf347 =true;  v8ab41.runtimeStyle.cssText =v8ab41.selStyle;  if (vaf347) v8ab41.style.display =""; } } },  DisplayEditInfoText: function(v9f788,vecc98) { var v72b97 =vecc98.parentElement; var vc8649 =v9f788.ToRowObject(v72b97); var va2170 =vc8649.GetCell(wgGetColNameByCell(vecc98)); var v14845 =va2170.Column; var v6c048 =v14845.Table.Grid;  if (v14845.EditType =="NoEdit") { var v9f587 =v6c048.GetString("CommonText/ReadOnlyCell");  if (v14845.EditInfoText !="") v9f587 +=" " +v14845.EditInfoText;  v6c048.SetStatus1(v9f587); v6c048.SetStatusIcon("ReadOnly"); } else { v6c048.SetIdle(); if (v14845.EditInfoText !="") v6c048.SetStatus1(v14845.EditInfoText); else { if (vecc98.cellModified) v6c048.SetStatus1("","","CommonText/ModifiedCell"); else v6c048.SetStatus1("","ready","CommonText/Ready"); }  if (v14845.EditInfoImage !="") v6c048.SetStatusIcon(v14845.EditInfoImage,true); { if (vecc98.cellModified) v6c048.SetStatusIcon("Edit"); } } }, InitializeNewRow: function(vfe799,ve4d56) { if (wgIsColumnSetRow(ve4d56)) { WGCSEngine.InitNewRow(vfe799,ve4d56); return; } if (ve4d56.type =="NewRow") { var v69172 =ve4d56.cells; var v04338 =vfe799.Tables[WG50Engine.GetTableNameByRow(ve4d56)]; var v5b523 =null; if (!v04338.IsRootTable) { var veff10 =v04338.GetSubTableById(WG50Engine.GetTable(ve4d56).subId); v5b523 =ISXml.CreateXmlDocument(); ISXml.LoadXml(v5b523,veff10.RelNames); } if (ve4d56.rowValidated) ve4d56.rowValidated =false; for (var v5cb69=0; v5cb69<v69172.length; v5cb69++) { if (v69172[v5cb69].type =="Cell") { var v9213 =wgGetColNameByCell(v69172[v5cb69]); if (v9213) WGEditEngine.InitNewCell(vfe799,v04338,v9213,v69172[v5cb69],v5b523); } } v5b523 =null; } }, SetNewRowInfoText: function(v67938) { var v8b318; if (v67938 &&v67938.type !="NewRow") return; var veff66 =v67938.cells; for (var v76811=0; v76811<veff66.length; v76811++) { if (veff66[v76811].type =="NewRowInfoCell") { v8b318 =veff66[v76811]; break; } } if (v67938.type =="NewRow" &&v8b318) v8b318.innerText =v67938.infoText; }, InitNewCell: function(v5d332,vbb374,v76f97,v18746,ve3856) { if (vbb374) { var v1bb58 =vbb374.Columns.GetNamedItem(v76f97); var v26c85 =v1bb58.DefaultValue; var v54745 =v1bb58.EditType; var v19881 =v1bb58.DefaultText; var v99f35 =false; if (v19881 ==null) v19881 =""; if (v26c85 =="") v26c85 =" "; if (v19881 !="" ||v26c85 !=" ") v99f35 =true; if (ve3856) { var v2e535 =ve3856.selectSingleNode("//DataColumn[@name='" +v76f97 +"']"); if (v2e535) v26c85 =ISXml.DecodeString(v2e535.text); } if (v54745 =="Checkbox") { v18746.innerHTML ="<input type=checkbox class='DefChkBox' " +(v26c85.toLowerCase()=="true" ? "checked" : "")+">"; if (v26c85.toLowerCase()=="true") v18746.cellValue =true; else v18746.cellValue =false; } else if (v54745 =="DropdownList" ||v54745 =="WebComboNET") { if (v26c85 !=" ") { if (v19881 =="") v19881 =v26c85; v18746.cellValue =v26c85; v18746.innerText =v19881; } else { v18746.innerText =v26c85; v18746.cellValue =v26c85; } } else { v18746.innerText =v26c85; if (IS.moz &&v26c85 ==" ") v18746.innerHTML ="&nbsp;"; v18746.cellValue =v26c85; } v18746.cellModified =false; if (!v5d332.LayoutSettings.MarkDefaultValuesAsDirty) v99f35 =false;  if (v99f35) { var veda6 =v18746.parentElement; if (!wgIsRowMarkedEdit(veda6)) { veda6.markedEdit =true; setTimeout(function() { WGEditEngine.MarkEdit(v5d332); },50); } v18746.cellModified =true; } } else v18746.innerText =" "; }, CheckBoxClicked: function(v70579,v7401) { if (v70579.tagName =="INPUT" &&v70579.type =="checkbox" &&!v70579.editHandler) { if (!v7401) return; var v52b24 =v7401.parentElement; if (!v52b24 ||v52b24.tagName !="TR") return; var va6722 =WG50Engine.GetTable(v52b24); if (!va6722 ||(va6722 &&!va6722.gridId)) return; var v6c01 =ISGetObject(va6722.gridId); var v8d990 =v6c01.Tables[va6722.tblName]; if ((v52b24.type =="NewRow" &&v8d990.Get("AllowAddNew")=="Yes")||(wgIsRecordRow(v52b24)&&v8d990.Get("AllowEdit")=="Yes")) { if (v52b24.noEdit) return; if (!v7401.oldCellValue) v7401.oldCellValue =v70579.checked; WGEditEngine.InitCheckBoxEditHandler(v6c01,v70579); } } }, ActivateEditMode: function(vf5620,vb7527) { var ve5799 =vf5620.ActiveEditCell; var v86611 =false; var vd4853 =null; var v69055 =null; var ve0622 =""; var v93f73 =null; var v7c918 =null; if (vf5620.IsPreviewMode) { alert("Not supported in Preview mode!"); return; } if (ve5799 &&ve5799.element) { v69055 =ve5799.element; vd4853 =vf5620.Tables[ve5799.tblName]; v93f73 =vd4853.Columns.GetNamedItem(wgGetColNameByCell(v69055));  if (vf5620.LastSelObj) v7c918 =vf5620.LastSelObj.GetRowElement(); else v7c918 =v69055.parentElement; if (!v93f73) return; if (v69055.noEdit =="True" ||!wgIsRowEditable(v7c918)) return false; ve0622 =v93f73.EditType; if (wgIsFilterRow(v7c918)) { if (v93f73.FilterEditType !="SameAsEditType") ve0622 =v93f73.FilterEditType; } else if (wgIsNewRow(v7c918)) { if (v93f73.NewRowEditType !="SameAsEditType") ve0622 =v93f73.NewRowEditType; } if (vf5620.LastEditObj) { var v86611 =vf5620.ExitEditMode(); if (!v86611) return false; } var vb1619 =false; var vcb539 =false; switch (ve0622) { case "CalendarDropdown": vb1619 =true; vcb539 =true; case "CalendarCombo": vb1619 =true; case "TextBox": v86611 =WGEditEngine.TextboxEditHandler(ve5799,v93f73,"",vb7527,vb1619,vcb539); break; case "WebComboNET": v86611 =WGEditEngine.WebComboEditHandler(ve5799,v93f73,"",vb7527); break; case "Checkbox": v86611 =WGEditEngine.CheckboxEditHandler(ve5799,v93f73,"",vb7527); break; case "DropdownList": v86611 =WGEditEngine.DropDownEditHandler(ve5799,v93f73,"",vb7527); break; case "MultilineTextbox": v86611 =WGEditEngine.TBMLEditHandler(ve5799,v93f73,"",vb7527); break;  case "ResizableTextbox": v86611 =WG5EditEngine.RTBEditHandler(ve5799,v93f73,"",vb7527);  break; case "Custom": var va5c76 =vf5620.CustomEditors[v93f73.CustomEditorName]; v86611 =va5c76.EnterEditMode(ve5799,v93f73,"",vb7527); break; } } if (v86611) { vf5620.IsInEditMode =true; if (v69055.parentElement.type =="NewRow" ||wgIsFilterRow(v69055.parentElement)) { vd4853.IsAdding =true; v69055.oldText =v69055.innerText; if (v69055.cellValue) v69055.oldCellValue =v69055.cellValue; } else { vd4853.IsEditing =true; if (!v69055.oldText) { if (ve0622 =="MultilineTextbox") v69055.oldText =v69055.innerHTML; else { v69055.oldText =v69055.innerText; if (v93f73.ColumnType =="ImageAndText" &&v69055.oldText &&v69055.oldText.substring(0,1)==" ") v69055.oldText =v69055.oldText.substring(1); } } if (!v69055.oldCellValue) { var v1b274 =wgGetUnMask(vf5620,v93f73,v69055); if (typeof (v1b274)!="undefined") { v69055.oldCellValue =v1b274; } } } vf5620.LastEditObj =new wgEditObj(vf5620.Name,vd4853.Id,v86611,ve0622,v69055); if (!ISEvent.Raise(vf5620.LayoutSettings.ClientSideEvents.OnEnterEditMode,vf5620.Name,vd4853.Id,vf5620.LastEditObj)) return; setTimeout(function() { WGEditEngine.EnsureEditFocus(vf5620); },100); } return v86611; }, ExitEdit: function(v79454,v7ca44,v14447,v42f18) { var v02440 =v79454.ActiveEditCell; var vd2237 =v79454.LastEditObj; var v25b61 =false; var vad430 =true; var vd1710; var v2a911 =true; if (!v02440) return true; if (v7ca44 ==-1) { if (vd2237 &&vd2237.cellElement) vd1710 =vd2237.cellElement.parentElement; if (!vd1710) vd1710 =v02440.rowElement; if (vd1710) { var v87631 =vd1710.type; if (v87631 =="NewRow") WGEditEngine.InitializeNewRow(v79454,vd1710); else WGEditEngine.CancelChanges(vd1710); WGEventEngine.SelectRow(vd1710,v79454.GetCurSelImage()); } } else { if (vd2237 &&vd2237.cellElement) { vd1710 =vd2237.cellElement.parentElement; vad430 =WGEditEngine.ExitEditMode(vd2237); } if (vad430) { if (!vd1710) vd1710 =v02440.rowElement; vad430 =(wgIsRowMarkedEdit(vd1710)&&wgIsRowDirty(vd1710)); if (!vad430) v25b61 =true; } if (vad430) { var v28076 =v79454.LayoutSettings.NewRowLostFocusAction; var v6cf28 =v79454.LayoutSettings.RowLostFocusAction; var v87631 =vd1710.type; var vdf311 =false; v79454.IsExitingEdit =true; if (v87631 =="NewRow") { if (v7ca44 !=0) { if (v28076 =="AlwaysPrompt") v2a911 =vdf311 =confirm(v79454.GetString("MessageBoxText/AddNewRow")); else if (v28076 =="AlwaysUpdate") vdf311 =true; } else vdf311 =true; if (vdf311) { v25b61 =WGEditEngine.ValidateRow(v79454,vd1710); if (v25b61) WGEditEngine.DefaultAddRow(v79454,v14447,v7ca44 =="0"); } else v25b61 =true; } else if (wgIsRecordRow(vd1710)) { if (v7ca44 !=0) { if (v6cf28 =="AlwaysPrompt") v2a911 =vdf311 =confirm(v79454.GetString("MessageBoxText/UpdateRow")); else if (v6cf28 =="AlwaysUpdate") vdf311 =true; } else vdf311 =true; if (vdf311) { v25b61 =WGEditEngine.ValidateRow(v79454,vd1710); if (v25b61) WGEditEngine.DefaultUpdateRow(v79454); } else { WGEditEngine.CancelChanges(vd1710); v25b61 =true; } } else if (wgIsFilterRow(vd1710)) { if (v7ca44 ==0) { var v61372 =v02440.element; var v19532 =v79454.Tables[v02440.tblName]; if (ISEvent.Raise(v79454.LayoutSettings.ClientSideEvents.OnColumnFilter,v79454.Id,v19532)) { WGUIEngine.ProcessFilteredColumns(v19532); WGEventEngine.SelectRow(v61372.parentElement,v79454.GetCurSelImage()); WG50Engine.ExecuteFlyPostback(v79454.Name,"ColumnFilter",v19532.Id); } } else { if (vd2237) WGEditEngine.ExitEditMode(vd2237,true); WGEditEngine.CancelChanges(vd1710); v25b61 =true; } } v79454.IsExitingEdit =false; } } return [v25b61,v2a911,vdf311]; }, EnsureEditFocus: function(va8181) { var v7a945 =va8181.LastEditObj; if (v7a945) { if (v7a945.type =="TextBox") { if (IS.safari) v7a945.element.select(); else v7a945.element.focus(); } else if (v7a945.type =="WebComboNET") { if (IS.safari) v7a945.element.TextObj.select(); else v7a945.element.TextObj.focus(); } } },  EnsureWebComboElementExist: function(v23765,vdad3) { var vf5281 =vdad3.FrameObj; if (!vf5281.parentElement) { v23765.FrameObj.insertAdjacentElement("beforeEnd",vdad3.FrameObj); } }, DisplayObjectGeneric: function(va1b86,vc6a19,vad958,v84e37,v69163,vcef90,v21639,v1e147) { var ve0f0 =posLib2.getLeftAbs(va1b86.FrameObj); var v6d472 =posLib2.getTopAbs(va1b86.FrameObj); var v8b636 =va1b86.LayoutSettings.RowHighlightType;  with (vc6a19.style) { if (vcef90) { if (wgIsFilterRow(vad958.parentElement)) v84e37 -=20; } var v53a66 =parseInt(va1b86.FrameObj.currentStyle.borderWidth); if (va1b86.FrameObj.style.position =="absolute") v53a66 =0; if (isNaN(v53a66)) v53a66 =0;  if (IS.opera) v53a66 =0; left =ISPosLib.getLeft(vad958)+(v84e37 ? v84e37 : 0)-ve0f0 +va1b86.EditCtlLeftAdj +v53a66; top =ISPosLib.getTop(vad958)+(v69163 ? v69163 : 0)-v6d472 +va1b86.EditCtlTopAdj +v53a66; var v49997 =va1b86.FrameObj.parentElement; var va5359 =false;  if (v8b636 =="BackgroundOnly" &&(vc6a19.tagName =="INPUT" ||vc6a19.tagName =="TEXTAREA"  ||v21639 =="WebComboNET" ||v21639 =="WebInputNET" ||v21639 =="ResizableTextbox")) va5359 =true; if (va1b86.PosRelativeTo !=null) v49997 =va1b86.PosRelativeTo;  if (va5359) { var vee632 =parseFloat(vc6a19.currentStyle.borderLeftWidth);  if (isNaN(vee632)) vee632 =0;  if (vee632 >0) { left =posLeft -vee632 -1 -(!IS.ie ? 1 : 0); top =posTop -vee632 -1 -(!IS.ie ? 1 : 0); } }  if (!va1b86.LayoutSettings.UseRelativePositioning) { if (v49997 &&(v49997.tagName =="DIV" &&v49997.currentStyle.hasLayout  &&v49997.currentStyle.position !="absolute") ||(va1b86.PosRelativeTo)) { var vd1018 =ISPosLib.getLeft(v49997); var v00b21 =ISPosLib.getTop(v49997); left =posLeft -vd1018; top =posTop -v00b21; } } else { if (IS.ie) { left =posLeft -posLib2.getLeftAbs(va1b86.FrameObj,va1b86); top =posTop -posLib2.getTopAbs(va1b86.FrameObj,va1b86); } else if (IS.safari) { top =posTop -(vad958.offsetTop -vad958.parentElement.offsetTop); } } if (v21639 =="DropdownList") { var v90133 =top; top ="0px";  visibility ="hidden"; setTimeout(function() { vc6a19.style.top =v90133; vc6a19.style.visibility ="visible"; if (vc6a19.style.display !="none") vc6a19.focus(); },1); } var v6ae29 =va1b86.IsRightToLeft(); position ="absolute"; if (vc6a19.tagName !="TEXTAREA") overflow ="hidden"; if (!vcef90) { width =vad958.offsetWidth -(v84e37 ? (v84e37 *2): 0)-(v1e147 &&va1b86.BuiltInDropDown ? 16 : 0); height =vad958.offsetHeight -2; if (wgIsFilterRow(vad958.parentElement)&&parseInt(width)>36) { width =parseInt(width)-20; if (v6ae29) posLeft =parseInt(posLeft)+20; }  if (va5359) { var vee632 =parseFloat(vc6a19.currentStyle.borderLeftWidth);  if (isNaN(vee632)) vee632 =0;  if (vee632 >0) { width =parseInt(width)+(vee632*2)+1; height =parseInt(height)+(vee632*2)+1; } } else { if (IS.moz &&v69163 ==1) height =parseInt(height)-1; } } display =""; vc6a19.origLeft =posLeft; vc6a19.origTop =posTop; if (zIndex ==0) zIndex =199; } }, DropDownEditHandler: function(v5d275,v2a515,v54b96,v92490) { var v4300 =v2a515.Name; var v11227 =document.getElementById(v5d275.gridId +"_" +v5d275.tblName +"_" +v4300); var v0ca44 =ISGetObject(v5d275.gridId); var v16f25 =v5d275.element; if (v11227) { if (v0ca44.DefaultStyleMode =="Elegant") { v11227.style.fontFamily ="Segoe UI, Tahoma"; v11227.style.fontSize ="9pt"; } else { v11227.style.fontFamily ="Verdana"; v11227.style.fontSize ="8pt"; }  wgDispObjGeneric(v0ca44,v11227,v16f25,0,0,null,"DropdownList"); if (!v11227.KBHandlerInit) { if (IS.moz) v11227.attachEvent("onkeyup",function() { WGEditEngine.EditControlKeyUp(v0ca44,v11227); }); v11227.attachEvent("onkeydown",function() { WGEditEngine.EditControlKeyboardHandler(v0ca44); }); v11227.attachEvent("onchange",function() { WGEditEngine.DropDownChanged(v0ca44,v11227); }); v11227.KBHandlerInit =true; } v11227.value =v16f25.cellValue; if (v92490) v11227.isDirty =true; else v11227.isDirty =false; if (v11227.style.visibility =="visible") v11227.focus(); } return v11227; }, EditControlKeyUp: function(v84b30,v04294) { WGEditEngine.DropDownChanged(v84b30,v04294); }, DropDownChanged: function(va8466,vc6064) { WGEditEngine.MarkEdit(va8466); vc6064.isDirty =true; var vb0466 =vc6064.parentElement; vb0466.cellModified =true; vb0466.cellValue =vc6064.value; }, GetWebComboClientID: function(v16c22,v60043) { var vacc66 =ISGetObject(v16c22); for (var v87664=0; v87664<vacc66.WebCombos.length; v87664++) { var va8c0 =vacc66.WebCombos[v87664]; if (va8c0.Id.indexOf(v60043)>-1) return va8c0.Id; } return ""; }, WebCombo30EditHandler: function(v8e357,vdd267,vda012,v91b39) { var vc8d41 =WGEditEngine.GetWebComboClientID(v8e357.gridId,vdd267.WebComboID); var vbab53 =ISGetObject(vc8d41); if (vbab53) { var v7c852 =vbab53.FrameObj; var v2390 =v8e357.element; var v7e371 =v2390.parentElement.type =="NewRow"; var vc1e63 =ISGetObject(v8e357.gridId); var v2cb24 =vc1e63.Tables[v8e357.tblName]; var v00157 =v91b39;  WG50Engine.EmulateAttributes(v2390); wgDispObjGeneric(vc1e63,v7c852,v2390,(WGEditEngine.IsElegantDefaultStyle(vc1e63,vbab53)? 1 : 0),1,null,"WebComboNET"); vbab53.DoResize(); vbab53.Grid =vc1e63; with (vbab53.TextObj) { style.paddingLeft ="1px"; style.paddingTop ="1px"; value =(v2390.innerText ==" " ? "" : v2390.innerText); if (v00157) vbab53.TextObj.isDirty =true; else vbab53.TextObj.isDirty =false; if (!vbab53.KBHandlerInit) { attachEvent("onkeydown",function() { WGEditEngine.EditControlKeyboardHandler(vc1e63); }); attachEvent("onselectstart",function() { event.cancelBubble =true; }); attachEvent("onpaste",function() { WGEditEngine.EditControlPasteHandler(vc1e63); }); if (vbab53.LayoutSettings.ClientSideEvents.OnAfterItemSelected =="") vbab53.LayoutSettings.ClientSideEvents.OnAfterItemSelected ="WGUI.WCIS('" +vc1e63.Name +"', '" +vbab53.Name +"')"; else vbab53.LayoutSettings.ClientSideEvents.OnAfterItemSelected +=";" +"WGUI.WCIS('" +vc1e63.Name +"', '" +vbab53.Name +"')";  if (vbab53.MajorVersion =="4.0") vbab53.LayoutSettings.ClientSideEvents.OnItemChecked ="WGUI.WCIC('" +vc1e63.Name +"', '" +vbab53.Name +"')"; vbab53.KBHandlerInit =true; } }  vbab53.LastSelectedIndex =vbab53.SelectedIndex =-1; vbab53.IsDirty =true; vbab53.NeedClearList =true; if (vbab53.LinkSettings.Enabled) { if (vbab53.LinkSettings.ParentWebCombo ==null) vbab53.LinkSettings.ResolveParentWebCombo(); var v70b91 =null; if (vbab53.LinkSettings.ParentWebCombo !=null) { for (var v12f14=0; v12f14<vbab53.LinkSettings.ParentWebCombo.length; v12f14++) { if (vbab53.LinkSettings.ParentWebCombo[v12f14].Id ==vbab53.LinkSettings.ParentWebComboID) { v70b91 =vbab53.LinkSettings.ParentWebCombo[v12f14]; break; } } } if (v70b91 !=null) { var v67849 =null; for (var v12f14=0; v12f14<v2cb24.Columns.length; v12f14++) { var v6f921 =v2cb24.Columns[v12f14]; if (v6f921.Visible &&v6f921.EditType =="WebComboNET" &&v6f921.WebComboID ==vbab53.LinkSettings.ResolvedParentWebComboID) { v67849 =v6f921; break; } } if (v67849 ==null) { alert("The ParentWebCombo '" +vbab53.LinkSettings.ParentWebComboID +"' which this WebCombo is linked to does not bound to any Column in this Grid."); } else { var v3f895 =v8e357.rowElement; v70b91.Text =wgGetCellByName(v3f895,v6f921.Name).innerText; v70b91.Value =wgGetCellByName(v3f895,v6f921.Name).cellValue; v70b91.UpdateState(); vbab53.RequireLinkRefresh =true; } } } if (!vbab53.IsDataBound &&vbab53.UnboundDataInitialized) { try { var v7df23 =vbab53.GetTData(); if (v7df23) { for (var v12f14=0; v12f14<v7df23.rows.length; v12f14++) { vbab53.UnhighlightRow(v7df23.rows[v12f14]); } } } catch (e) { } } if (v2390.cellValue) { if (vbab53.MultipleSelectionSettings.Enabled) { vbab53.SetMultipleValues(v2390.innerText,v2390.cellValue); vbab53.RefreshValueItems(); } else { vbab53.Value =v2390.cellValue; var v74b97 =v2390.innerText; if (vdd267.ColumnType =="ImageAndText" &&v74b97.substring(0,1)==" ") v74b97 =v74b97.substring(1); vbab53.Text =v74b97; } if (!vbab53.IsDataBound &&vbab53.AllowAdd) { if (!vbab53.UnboundDataInitialized) vbab53.InitializeUnboundMode(); vbab53.SearchUnbound(); } } else { if (v2390.innerText !="" &&v2390.innerText !=" " &&escape(v2390.innerText)!="%A0") { vbab53.Value =v2390.innerText; var v74b97 =v2390.innerText; if (vdd267.ColumnType =="ImageAndText" &&v74b97.substring(0,1)==" ") v74b97 =v74b97.substring(1); vbab53.Text =v74b97; if (!vbab53.IsDataBound &&vbab53.AllowAdd) { if (!vbab53.UnboundDataInitialized) vbab53.InitializeUnboundMode(); vbab53.SearchUnbound(); } } else { vbab53.Value =null; vbab53.Text ="";  if (vbab53.MultipleSelectionSettings.Enabled) { vbab53.SetMultipleValues("",""); vbab53.RefreshValueItems(); } } } vdd267.GetGrid().PreparePostBackData(); return vbab53; } else { alert("Can't find WebCombo.NET instance with ID '" +vc8d41 +"'"); return false; } },  IsElegantDefaultStyle: function(v68e13,vf1d46) { return (vf1d46.UseDefaultStyle &&v68e13.UseDefaultStyle &&v68e13.DefaultStyleMode =="Elegant"); },  ApplyWebCombo40ElegantStyle: function(v9e968,v31025) { if (WGEditEngine.IsElegantDefaultStyle(v9e968,v31025)) { var v3e696 =v31025.FrameObj.style; var v57386 =v31025.TextObj.style;  v31025.LayoutSettings.EnableAnimation =false; v3e696.border ="2px #FFBD69 solid"; v3e696.paddingLeft ="1px"; v3e696.paddingTop="0px"; v3e696.backgroundColor ="white"; v57386.fontSize ="9pt";  if (v31025.SearchObj) v31025.SearchObj.style.borderLeftWidth ="0px"; } }, WebComboEditHandler: function(v44854,v4c772,v16d5,v60a16) { var v11d52 =v4c772.WebComboID; var vfb665 =wcGetComboById(v11d52); if (vfb665) { if (vfb665.MajorVersion &&(vfb665.MajorVersion =="3.0" ||vfb665.MajorVersion =="4.0")) { return WGEditEngine.WebCombo30EditHandler(v44854,v4c772,v16d5,v60a16) } wcFrame =vfb665.FrameObj; var v30731 =v44854.element; var vd7f65 =v30731.parentElement.type =="NewRow"; var v9f81 =ISGetObject(v44854.gridId); wgDispObjGeneric(v9f81,wcFrame,v30731,0,1,null,"WebComboNET"); wcres(v11d52); with (vfb665.TextObj) { style.paddingLeft ="1px"; style.paddingTop ="1px"; value =(v30731.innerText ==" " ? "" : v30731.innerText); if (v60a16) v60a16 =true; else v60a16 =false; if (!vfb665.KBHandlerInit) { attachEvent("onkeydown",function() { WGEditEngine.EditControlKeyboardHandler(v9f81); }); attachEvent("onselectstart",function() { event.cancelBubble =true; }); attachEvent("onpaste",function() { WGEditEngine.EditControlPasteHandler(v9f81); }); if (ISXml.GetNodeText(vfb665.XmlObj,"//events/onafteritemselected")=="") sxt(vfb665,"//events/onafteritemselected","WGUI.WCIS('" +v9f81.Name +"', '" +vfb665.Name +"')"); else sxt(vfb665,"//events/onafteritemselected",ISXml.GetNodeText(vfb665.XmlObj,"//events/onafteritemselected")+";" +"WGUI.WCIS('" +v9f81.Name +"', '" +vfb665.Name +"')"); vfb665.KBHandlerInit =true; } } vfb665.LastSelectedIndex =vfb665.SelectedIndex =-1; vfb665.IsDirty =true; vfb665.NeedClearList =true; if (!vfb665.IsDataBound &&vfb665.UnboundDataInitialized) { try { var v40643 =vfb665.GetTData(); if (v40643) { for (var v1a415=0; v1a415<v40643.rows.length; v1a415++) { wcrcsel(v11d52,v40643.rows[v1a415]); } } } catch (e) { } } if (v30731.cellValue) { vfb665.Value =v30731.cellValue; var vb4526 =v30731.innerText; if (v4c772.ColumnType =="ImageAndText" &&vb4526.substring(0,1)==" ") vb4526 =vb4526.substring(1); vfb665.Text =vb4526; if (!vfb665.IsDataBound &&vfb665.AllowAdd) { if (!vfb665.UnboundDataInitialized) { if (typeof (wcInitUnbound)=="function") wcInitUnbound(v11d52); } wcuseek(v11d52); } } else { if (v30731.innerText !="" &&v30731.innerText !=" ") { vfb665.Value =v30731.innerText; var vb4526 =v30731.innerText; if (v4c772.ColumnType =="ImageAndText" &&vb4526.substring(0,1)==" ") vb4526 =vb4526.substring(1); vfb665.Text =vb4526; if (!vfb665.IsDataBound &&vfb665.AllowAdd) { if (!vfb665.UnboundDataInitialized) { if (typeof (wcInitUnbound)=="function") wcInitUnbound(v11d52); } wcuseek(v11d52); } } else { vfb665.Value =null; vfb665.Text =""; } } v4c772.GetGrid().PreparePostBackData(); return vfb665; } else { alert("Can't find WebCombo.NET instance with ID '" +v11d52 +"'"); return false; } }, WebComboItemSelected: function(v78229,vdc561) { var v40293 =ISGetObject(v78229); var v11391 =wcGetComboById(vdc561); WGEditEngine.MarkEdit(v40293); v11391.TextObj.isDirty =true; },  WebComboItemChecked: function(v6c448,v82b70) { var vcf348 =ISGetObject(v6c448); var v50c70 =wcGetComboById(v82b70); WGEditEngine.MarkEdit(vcf348); v50c70.TextObj.isDirty =true; }, TextboxEditHandler: function(v33734,vaa517,v2cd46,v43b14,ve6a76,va0020) { var v2f848 =v33734.element; var v23170 =ISGetObject(v33734.gridId); if (!v23170.TBObj) { var v63224 =document.getElementById(v33734.gridId +"_TB"); v63224.name =v63224.id; v63224.autocomplete ="off"; v63224.attachEvent("onfocus",WGEditEngine.OnTextBoxFocus); v63224.onselectstart =function() { event.cancelBubble =true; return true; }; v63224.onkeydown =function() { WGEditEngine.EditControlKeyboardHandler(v23170); };  if (IS.opera) { v63224.attachEvent("onkeypress",function() { if (event.keyCode ==13) { event.cancelBubble =true; event.returnValue =false; } }); } v63224.attachEvent("onpaste",function() { WGEditEngine.EditControlPasteHandler(v23170); });  v63224.attachEvent("oncut",function() { WGEditEngine.EditControlPasteHandler(v23170); });  v23170.TBObj =v63224; } var vc9f43 =v23170.TBObj; var v6ce11 =null; vc9f43.readOnly =(va0020); vc9f43.className =v23170.LayoutSettings.TextBoxClass; if (ve6a76) { if (!v23170.CalDDObj) { var vefb89 =document.getElementById(v23170.Name +"_CalDD"); if (v23170.CalDDImg) vefb89.src =v23170.ResolveImagePathEx(v23170.CalDDImg);  else if (wg_Global.CalDDImg !="CalendarDD.gif") vefb89.src =v23170.ResolveImagePathEx(wg_Global.CalDDImg); v23170.CalDDObj =vefb89; } v23170.CalDDObj.DtObj =vc9f43; v23170.CalDDObj.DtFormat =vaa517.DataFormatString; v6ce11 =v23170.CalDDObj; } wgDispObjGeneric(v23170,vc9f43,v2f848,1,1,null,null,v6ce11); if (ve6a76) { wgDispObjGeneric(v23170,v6ce11,v2f848,v2f848.offsetWidth  -(v23170.BuiltInDropDown ? 16 : 0) +(v23170.DefaultStyleMode =="Elegant" ? 1 : 0) ,2,true); v6ce11.style.cursor ="hand"; } if (vaa517.TextboxMaxlength) vc9f43.maxLength =vaa517.TextboxMaxlength; else vc9f43.maxLength =2147483647; var vd7533 =(v2f848.innerText ==" " ||escape(v2f848.innerText)=="%A0" ? "" : wgGetUnMask(v23170,vaa517,v2f848,true)); if (vaa517.ColumnType =="ImageAndText" &&vd7533.substring(0,1)==" ") vd7533 =vd7533.substring(1); vc9f43.value =vd7533; vc9f43.style.textAlign =v2f848.currentStyle.textAlign; if (v43b14) vc9f43.isDirty =true; else vc9f43.isDirty =false; if (IS.ie) vc9f43.focus(); return vc9f43; },  PreloadCalendar: function(v86428) { var v57d9 =wg_Global.CalFrObj;  if (!v57d9) { var v7f86 =v86428.ResolveScriptPath(v86428.LayoutSettings.ScriptDirectory,wg_Global.CalFile); v57d9 =document.createElement("IFRAME"); v57d9.src =v7f86; v57d9.id ="ISDefCal"; v57d9.style.cssText ="position:absolute;top:-100px;left:-100px;height:10px;width:10px"; document.body.appendChild(v57d9); v57d9 =document.getElementById("ISDefCal"); wg_Global.CalFrObj =v57d9; } }, ToggleCalendarDropDown: function(v05489,vacf51) { var v8de64 =wg_Global.CalFrObj; var vbf385 =wg_Global.CalPopObj; if (!v8de64 &&!vbf385 &&!IsGecko30()) { var vcba84 =ISGetObject(vacf51); var vb7982 =vcba84.ResolveScriptPath(vcba84.LayoutSettings.ScriptDirectory,wg_Global.CalFile); if (IS.ie) v8de64 =document.createElement("<IFRAME id='ISDefCal' src='" +vb7982 +"'></IFRAME>"); else { v8de64 =document.createElement("IFRAME"); v8de64.src =vb7982; v8de64.id ="ISDefCal"; } v8de64.style.cssText ="position:absolute;top:-100px;left:-100px;height:10px;width:10px"; document.body.appendChild(v8de64); v8de64 =document.getElementById("ISDefCal"); wg_Global.CalFrObj =v8de64; setTimeout("WGUI.TGCALDD(null, '" +vacf51 +"')",100); return; } if (!vbf385) { var v45820 =""; if (IS.ie) { try { v45820 =v8de64.contentWindow.document.body.parentElement.outerHTML; } catch (e) { setTimeout("WGEditEngine.ToggleCalendarDropDown(null, '" +vacf51 +"')",100); return; } } else { try { v45820 =v8de64.contentWindow.document.firstChild.innerHTML;  if (v45820 =="" ||v45820 ==null ||typeof(v45820)=="undefined") { setTimeout("WGEditEngine.ToggleCalendarDropDown(null, '" +vacf51 +"')",100); return; }  v45820 ="<html>" +v45820 +"</html>"; v45820 =v45820.replace(new RegExp("parent.","g"),""); } catch (e) { setTimeout("WGEditEngine.ToggleCalendarDropDown(null, '" +vacf51 +"')",100); return; } } vbf385 =window.createPopup(); var vfba43 =vbf385.document; vfba43.estWidth =v8de64.document.body.scrollWidth; vfba43.estHeight =v8de64.document.body.scrollHeight +v8de64.document.body.offsetHeight; vfba43.open("text/html","replace"); vfba43.write(v45820); vfba43.close(); document.getElementById("ISDefCal").removeNode(true); v8de64 =wg_Global.CalFrObj =null; wg_Global.CalPopObj =vbf385; setTimeout("WGUI.TGCALDD(null, '" +vacf51 +"')",100); return; } else { if (IsGecko30()) { var vdd941 =vbf385.document.getElementById("cbYear");  if (!vdd941) { wg_Global.CalPopObj =null; setTimeout("WGEditEngine.ToggleCalendarDropDown(null, '" +vacf51 +"')",100); return; } } } var vfba43 =vbf385.document; var vcba84 =ISGetObject(vacf51); var v59546 =vcba84.CalDDObj.DtObj; if (!isCAL.isCalLoaded) loadDatePicker(vfba43,vcba84); setObject(v59546,vcba84); isCAL.curFormat =vcba84.CalDDObj.DtFormat; var vc4e39 =new Date(); if (v59546.value !="") { var vc5a97 =new ISClientData(null,"datetime",isCAL.curFormat); vc5a97.NewValue =v59546.value; vcba84.ValEngine.Validate(vc5a97,vcba84.CultureInfo); if (vc5a97.IsValid) { vc4e39 =new Date(vc5a97.DateData.Year,vc5a97.DateData.Month,vc5a97.DateData.Day); } } setDate(vc4e39); vbf385.show(ISPosLib.getScreenLeft(v59546),ISPosLib.getScreenTop(v59546)+v59546.offsetHeight,170,147 +isCAL.adjHeight,null,true); }, TBMLEditHandler: function(v62436,vca478,v0b829,v52525) { var vb928 =v62436.element; var v1b360 =ISGetObject(v62436.gridId); if (!v1b360.TBMLObj) { var vc227 =document.getElementById(v62436.gridId +"_TBML"); vc227.name =vc227.id; vc227.attachEvent("onfocus",WGEditEngine.OnTextBoxFocus); vc227.onselectstart =function() { event.cancelBubble =true; return true; }; vc227.onkeydown =function() { WGEditEngine.EditControlKeyboardHandler(v1b360); }; vc227.attachEvent("onpaste",function() { WGEditEngine.EditControlPasteHandler(v1b360); }); if (IsGecko30()) { vc227.style.overflowX ="hidden"; } v1b360.TBMLObj =vc227; } var va8638 =v1b360.TBMLObj; va8638.className =v1b360.LayoutSettings.TextBoxClass; wgDispObjGeneric(v1b360,va8638,vb928,1,1); if (vca478.TextboxMaxlength) va8638.maxLength =vca478.TextboxMaxlength; if (IsGecko30()) { if (ISPosLib.getHeight(va8638)<40) { va8638.style.height ="40px"; } }  va8638.value =(vb928.innerText ==" " ? "" : vb928.innerText);  if (IS.moz) va8638.style.overflowY ="scroll"; if (v52525) va8638.isDirty =true; else va8638.isDirty =false; va8638.focus(); return va8638; },  CheckboxEditHandler: function(v3c775,v45c98,v48863,vb2148) { var v4c555 =v3c775.element; var veb088 =WGEditEngine.GetCheckBoxCell(v4c555); var v7ea96 =ISGetObject(v3c775.gridId); WGEditEngine.InitCheckBoxEditHandler(v7ea96,veb088); if (vb2148) veb088.isDirty =true; else veb088.isDirty =false; veb088.focus(); return veb088; }, GetCheckBoxCell: function(v5a530) { var va0194 =v5a530.parentElement; if (wgIsFilterRow(va0194)) return v5a530.childNodes[0].childNodes[0]; else return v5a530.childNodes[0]; }, InitCheckBoxEditHandler: function(v71466,vda246) { if (!vda246.editHandler) { vda246.editHandler =true; vda246.onkeydown =function() { WGEditEngine.EditControlKeyboardHandler(v71466); }; vda246.onclick =function() { WGEditEngine.CheckBoxChanged(v71466,vda246); }; } }, CheckBoxChanged: function(vbc869,v33796) { WGEditEngine.MarkEdit(vbc869); v33796.isDirty =true; var vf9285 =WG50Engine.GetTD(v33796); var v8ea56 =WG50Engine.GetTable(vf9285.parentElement); vf9285.cellModified =true; vf9285.cellValue =v33796.checked; if (!ISEvent.Raise(vbc869.LayoutSettings.ClientSideEvents.OnCheckBoxClick,vbc869.Name,v8ea56.tblName,wgGetColNameByCell(vf9285),v33796.checked)) return; }, OnTextBoxFocus: function() { var vfc741 =event.srcElement; try { vfc741.select(); } catch (e) { } },  EncodeHtml: function(va8a41,vf1b35) { if (va8a41.TreatMarkupAsLiteralText) vf1b35 =IS.EncodeHtml(vf1b35); else vf1b35 =_FixAmpChar(vf1b35);  return vf1b35; }, ExitEditMode: function(v4cf71,vf3257) { if (!v4cf71) return; var v9b580 =v4cf71.element; var v50054 =v4cf71.cellElement; var v9ad52 =v4cf71.type; var v92c81 =ISGetObject(v4cf71.gridId); var v79915 =""; var v53564 =""; var v27727 =true; var vb9123 =true; var v80b13 =null; if (!ISEvent.Raise(v92c81.LayoutSettings.ClientSideEvents.OnExitEditMode,v92c81.Name,v4cf71.tblName,v92c81.LastEditObj)) return; var v4d13 =v50054.parentElement; var v3525 =v92c81.Tables[v4cf71.tblName]; var v80b13 =v3525.GetColumn(wgGetColNameByCell(v50054)); if (v9ad52 =="WebComboNET") { var v1bb1 =ISGetObject(v80b13.WebComboID);  v9b580.FrameObj.style.display ="none"; if (v9b580.AllowAdd) { if (v9b580.Text =="" ||v9b580.Text ==null ||v9b580.Text ==" " ||v9b580.SelectedIndex ==-1) v9b580.Text =v9b580.TextObj.value; if (v9b580.Value =="" ||v9b580.Value ==null ||v9b580.Value ==" " ||v9b580.SelectedIndex ==-1) v9b580.Value =v9b580.Text; } if (v1bb1.MultipleSelectionSettings.Enabled) { v79915 =v1bb1.GetMultipleValuesText(); v53564 =v1bb1.GetMultipleValuesValue(); } else { v79915 =(v9b580.Text ==null ? "" : v9b580.Text); v53564 =(v9b580.Value ==null ? "" : v9b580.Value); }  if (v9b580.TextObj.isDirty ||(v50054.innerText !=v9b580.Text)) v50054.cellModified =true;  v1bb1.IsTextObjFocused =false; v1bb1.LastEventType ="";  } else if (v9ad52 =="Checkbox") { vb9123 =false; if (!vf3257) { v50054.cellValue =WGEditEngine.GetCheckBoxCell(v50054).checked; if (wgIsFilterRow(v4d13)) WGUIEngine.OnFilterBlur(v50054.childNodes[0]); } else { v50054.cellValue =v50054.oldCellValue; WGEditEngine.GetCheckBoxCell(v50054).checked =v50054.cellValue; } } else if (v9ad52 =="Custom") { var vb7c91 =v92c81.CustomEditors[v80b13.CustomEditorName]; v27727 =vb7c91.ImplementationObject.OnExitEditMode(vf3257); v79915 =vb7c91.ImplementationObject.GetText(); v53564 =vb7c91.ImplementationObject.GetValue(); if (typeof (vb7c91.ImplementationObject.ShouldProcessExitEditModeDefaultBehavior)=="function") vb9123 =vb7c91.ImplementationObject.ShouldProcessExitEditModeDefaultBehavior(); if (typeof (vb7c91.ImplementationObject.GetContentMode)=="function") v50054.contentMode =vb7c91.ImplementationObject.GetContentMode(); } else { if (v9b580.style.display !="none") v9b580.style.display ="none"; if (v9ad52 =="CalendarDropdown" ||v9ad52 =="CalendarCombo") { if (v92c81.CalDDObj) v92c81.CalDDObj.style.display ="none"; } if (v9ad52 =="TextBox" ||v9ad52 =="MultilineTextbox" ||v9ad52 =="CalendarCombo" ||v9ad52 =="CalendarDropdown") { v79915 =v53564 =(v9b580.value ==null ? "" : v9b580.value); if (v79915 !="") { if (v9ad52 =="MultilineTextbox") v79915 =v79915.replace(/[\n]/g,"<BR>"); else v79915 =wgGetMask(v92c81,v4cf71,v79915); } } else if (v9ad52 =="ResizableTextbox") { v79915 =v53564 =(v9b580.children[0].value ==null ? "" : v9b580.children[0].value);  if (v79915 !="") v79915 =wgGetMask(v92c81,v4cf71,v79915);  if (v80b13.AllowMultiLine) v79915 =v79915.replace(/[\n]/g,"<BR>");  if (v9b580.children[0].isDirty) v50054.cellModified =true; } else { v53564 =v9b580.value; try { v79915 =v9b580.options[v9b580.selectedIndex].text; } catch (e) { v79915 =""; } } } var v9bc78 =v50054.innerHTML.toUpperCase().indexOf("NOBR")>0; var v40734 =WGEventEngine.GetContentSpan(v50054); if (v40734) v9bc78 =v40734.innerHTML.toUpperCase().indexOf("NOBR")>0; if (vb9123) { var v1a730 =""; var v3525 =v92c81.Tables[v4cf71.tblName]; var v80b13 =v3525.GetColumn(wgGetColNameByCell(v50054)); if (!vf3257) { if (v80b13.ColumnType =="ImageAndText" &&wgIsRecordRow(v4d13)) { try { v1a730 =v50054.childNodes[0].childNodes[0].outerHTML; } catch (e) { } }  var vace65 =(v9bc78 ? "<NOBR>" : "")+v1a730 +(v79915 =="" ? "&nbsp;" : WGEditEngine.EncodeHtml(v80b13,v79915))+(v9bc78 ? "</NOBR>" : ""); if (v40734) v40734.innerHTML =vace65; else v50054.innerHTML =vace65; if (!IS.ie &&wgIsFilterRow(v4d13)) WGMozEngine.ResizeFilterColumn(v50054,v50054.offsetWidth); v50054.cellValue =v53564; var v3525 =v92c81.Tables[v4cf71.tblName]; v80b13 =v3525.GetColumn(wgGetColNameByCell(v50054)); if (v53564 !="" &&v9ad52 =="TextBox") { v53564 =wgGetUnMask(v92c81,v80b13,v50054); v50054.cellValue =v53564; } if (v9b580.isDirty) v50054.cellModified =true; if (wgIsFilterRow(v4d13)) WGUIEngine.OnFilterBlur(v50054.childNodes[0]); else { var v28f70 =v3525.Formulas; for (var v24e5=0; v24e5<v28f70.length; v24e5++) { if (v28f70[v24e5].IsCellAccounted(v50054)) { v28f70[v24e5].ProcessResult(v50054.parentElement,v50054); } } } } else { if (v80b13.ColumnType =="ImageAndText" &&wgIsRecordRow(v4d13)) { try { v1a730 =v50054.childNodes[0].childNodes[0].outerHTML; } catch (e) { } } if (v50054.oldText) { var vace65 =(v9bc78 ? "<NOBR>" : "")+v1a730 +(v50054.oldText =="" ||v50054.oldText ==" " ? "&nbsp;" : v50054.oldText)+(v9bc78 ? "</NOBR>" : ""); if (!v40734) v50054.innerHTML =vace65; else v40734.innerHTML =vace65; } if (v50054.cellValue) v50054.cellValue =v50054.oldCellValue; } } if (IS.moz ||IS.safari) WGMozEngine.EnsureEditFocus(v92c81,v50054); v92c81.LastEditObj =null; v92c81.IsInEditMode =false; return v27727; }, CancelChanges: function(v53887) { var v00662 =WG50Engine.GetTable(v53887); var vd116 =ISGetObject(v00662.gridId); var v98468 =vd116.Tables[v00662.tblName]; var v2bc30 =new Array(); if (wgIsColumnSetRow(v53887)) v2bc30 =wgGetColumnSetRows(v53887); else v2bc30[0] =v53887; for (var v1c591=0; v1c591<v2bc30.length; v1c591++) { var v04c40 =v2bc30[v1c591].cells; for (var ve0452=0; ve0452<v04c40.length; ve0452++) { var vc8d97 =v04c40[ve0452]; if (vc8d97.type =="Cell" ||vc8d97.type =="FilterColumn") { if (vc8d97.cellModified) { var v0a832 =v98468.GetColumn(wgGetColNameByCell(vc8d97)); if (v0a832.EditType =="Checkbox" ||v0a832.FilterEditType =="Checkbox") { vc8d97.cellValue =vc8d97.oldCellValue; WGEditEngine.GetCheckBoxCell(vc8d97).checked =vc8d97.cellValue; } else { var v05054 =vc8d97.innerHTML.toUpperCase().indexOf("NOBR")>0; var vf4274 =WGEventEngine.GetContentSpan(vc8d97); var v06638 =vc8d97.oldText; var va1712 =""; if (wgIsFilterRow(v2bc30[v1c591])) { v06638 =vc8d97.childNodes[0].getAttribute("value"); if (v06638 =="") { var v2eb79 =v98468.FilteredColumns.GetNamedItem(v0a832.Name); if (v2eb79) v98468.FilteredColumns.Remove(v2eb79); } } if (vf4274) v05054 =vf4274.innerHTML.toUpperCase().indexOf("NOBR")>0; if (v0a832.ColumnType =="ImageAndText" &&wgIsRecordRow(v53887)) { try { va1712 =vc8d97.childNodes[0].childNodes[0].outerHTML; } catch (e) { } } var vf2737 =(v05054 ? "<NOBR>" : "")+va1712 +((v06638 =="" ||v06638 ==" ")? "&nbsp;" : v06638)+(v05054 ? "</NOBR>" : ""); if (vf4274) vf4274.innerHTML =vf2737; else vc8d97.innerHTML =vf2737; if (vc8d97.cellValue) vc8d97.cellValue =vc8d97.oldCellValue; if (wgIsFilterRow(v2bc30[v1c591])&&!IS.ie) WGMozEngine.ResizeFilterColumn(vc8d97,vc8d97.offsetWidth); } }  vc8d97.cellModified =false; } } }  if (vd116.LayoutSettings.VerboseEditingInformation) { if (vd116.LayoutSettings.StatusBarVisible &&!vd116.IsStatusLocked) { var vdb988 =document.getElementById("tdStatIcon_" +vd116.Name).childNodes[0];  if (vdb988.src.indexOf(vd116.LayoutSettings.ImageSettings.EditImage)>-1) vdb988.style.visibility ="hidden"; } }  vd116.ResetStatus(); }, AcceptChanges: function(vadd23,vd6f41) { var v6f923 =vadd23.cells; vadd23.markedEdit =false; }, DefaultAddRow: function(v92342,v3c151,vfda9) { var v6616 =v92342.ActiveEditCell; if (WGEditEngine.PrepareAddRowInfo(v92342)) { if (!vfda9) { WGEditEngine.InitializeNewRow(v92342,v6616.rowElement); WGEventEngine.SelectRow(v6616.rowElement,v92342.GetCurSelImage()); } if (v3c151) WGEditEngine.ProcessInitialEdit(v6616.rowElement); WGEditEngine.EnsureActiveEditCellFocus(v92342); } }, DefaultUpdateRow: function(v7dd62) { var v54362 =v7dd62.ActiveEditCell; if (WGEditEngine.PrepareUpdateRowInfo(v7dd62)) { } }, EnsureActiveEditCellFocus: function(v15b81,vfd970) { var vb9862 =v15b81.ActiveEditCell; if (vb9862) { if (v15b81.LastEditObj) return; if (document.activeElement ==vb9862.element ||!v15b81.HasFocus()) return; vb9862.element.setActive(); if (!vfd970) setTimeout(function() { WGEditEngine.EnsureActiveEditCellFocus(v15b81,true); },200); } else { var vc2860 =v15b81.LastSelObj; if (vc2860 &&vc2860.element) { var vb4076 =wgGetCellByPosition(vc2860.element,0); if (vb4076 &&v15b81.HasFocus()) vb4076.setActive(); } } }, EditControlPasteHandler: function(va5217) { WGEditEngine.MarkEdit(va5217); event.srcElement.isDirty =true; }, EditControlKeyboardHandler: function(vf7322,v3ea96) { var v1b353 =0; var v1aa9 =false; var ve5980 =false; v1b353 =event.keyCode; if (!ISEvent.Raise(vf7322.LayoutSettings.ClientSideEvents.OnEditKeyDown,vf7322.Name,v1b353)) return; v1b353 =event.keyCode;  if (v1b353 ==9) { var v52934 =vf7322.ActiveEditCell; var v34c21 =v52934.element; var v86a12 =true; if (!event.shiftKey &&v34c21 ==wgGetLastEditableCell(v52934.rowElement)) { v86a12 =WGEditEngine.ExitEdit(vf7322,0,true,v1b353)[0]; if (v52934.rowElement.type =="NewRow" ||vf7322.IsInProgress) v86a12 =false; } if (v86a12) { var v3d954 =null; if (IS.ie) { v3d954 =document.createEventObject(); v3d954.keyCode =v1b353; v3d954._srcElement =v34c21; v3d954.shiftKey =event.shiftKey; v3d954.ctrlKey =event.ctrlKey; v34c21.fireEvent("onkeydown",v3d954); } else { v3d954 =new Object(); v3d954.srcElement =v34c21; v3d954.shiftKey =event.shiftKey; v3d954.ctrlKey =event.ctrlKey; v3d954.keyCode =v1b353; WGEventEngine.ProcessKeyboardEvents(v3d954); } if (!event.ctrlKey) vf7322.ActivateEditMode(); if (IS.moz) { setTimeout(function() { if (!vf7322.LastEditObj) vf7322.ActivateEditMode(); },50); } } v1aa9 =true; } else if (v1b353 ==27) { var v34c21 =vf7322.ActiveEditCell.element; WGEditEngine.ExitEditMode(vf7322.LastEditObj,true); v34c21.setActive(); v1aa9 =true; } else if (v1b353 ==13) { var v52934 =vf7322.ActiveEditCell; var v34c21 =v52934.element; var v4942 =vf7322.LastEditObj; if (!event.shiftKey) { if (v4942.type !="MultilineTextbox" &&v4942.type !="ResizableTextbox") { var v69215 =true; if (v4942.type =="WebComboNET") { var v73e91 =vf7322.Tables[v52934.tblName].GetColumn(wgGetColNameByCell(v34c21)); var vd6588 =wcGetComboById(v73e91.WebComboID); if (vd6588.EntryMode =="InstantLookup") v69215 =false; } if (v69215) { if (v52934.rowElement.type =="FilterRow" &&vf7322.LayoutSettings.ApplyFiltersKey =="Enter") WGEditEngine.ExitEdit(vf7322,0,false); else WGEditEngine.ExitEditMode(v4942); v34c21.setActive(); v1aa9 =true; } } else { v1aa9 =false; ve5980 =true; } } else { if (!v4942 ||v4942.type !="MultilineTextbox") WGEditEngine.ExitEdit(vf7322,0,false); else { WGEditEngine.ExitEditMode(v4942); v34c21.setActive(); } v1aa9 =true; } } else if (v1b353 ==115) { var v52934 =vf7322.ActiveEditCell; var v34c21 =v52934.element; var v53d5 =v34c21.parentElement; if (wgIsFilterRow(v53d5)) { WGUIEngine.OnFilterKeyDown(v34c21.childNodes[0]); event.keyCode =0; v1aa9 =true; } }  if (v1b353>=46 &&v1b353<=57 ||v1b353>=54 &&v1b353<=90 ||v1b353>=96 &&v1b353<=111 ||v1b353>=186 &&v1b353<=192 ||v1b353>=219 &&v1b353<=222 ||v1b353 ==113 ||v1b353 ==8 ||v1b353 ==229 ||v1b353 ==32 ||ve5980) { WGEditEngine.MarkEdit(vf7322); event.srcElement.isDirty =true; } if (v3ea96) { v3ea96 =vf7322.CustomEditors[v3ea96]; v3ea96.ImplementationObject.OnKeyDown(event.keyCode); } if (v1aa9) { event.cancelBubble =true; event.returnValue =false; } }, MarkEdit: function(v91533) { var v8b778 =v91533.ActiveEditCell.rowElement; if (wgIsColumnSetRow(v8b778)) v8b778 =wgGetColumnSetRow(v8b778); else if (v8b778.type =="PR") v8b778 =wgGetPreviewRowParent(v8b778); if (!v8b778.markedEdit) { var v3ff75 =wgGetRowHeader(v8b778); if (v3ff75) v3ff75.innerHTML ="<img align=absmiddle src='" +v91533.ResolveImagePathEx( v91533.LayoutSettings.ImageSettings.EditImage)+"'>"; v8b778.markedEdit =true; }  if (v91533.LayoutSettings.VerboseEditingInformation &&!v91533.ActiveEditCell.editImageDisplayed) { var vcb436 =wgGetColNameByCell(v91533.ActiveEditCell.element); var vdc928 =v91533.Tables[v91533.ActiveEditCell.tblName]; var v3fd86 =vdc928.Columns.GetNamedItem(vcb436); if (v3fd86.EditInfoImage =="") v91533.SetStatusIcon("Edit");  if (v3fd86.EditInfoText =="") v91533.SetStatus1("","","CommonText/EditedCell"); v91533.ActiveEditCell.editImageDisplayed =true; } }, ValidateRow: function(v71289,v3d033) {  var v4b753 =wgGetRootRow(v3d033); if (v4b753.rowValidated) return true; var vf5364 =true; wg_Global.LastValRowObj =v4b753; vf5364 =ISEvent.Raise(v71289.LayoutSettings.ClientSideEvents.OnRowValidate,v4b753);  if (vf5364) vf5364 =WGEditEngine.ValidateRequiredInput(v71289,v3d033);  if (vf5364) v4b753.rowValidated =true; return vf5364; },  ValidateRequiredInput: function(v46d19,vc441) { var v16372 =wgGetRootRow(vc441); var vf6e73 =WG50Engine.GetTable(v16372); var vf7955 =v46d19.Tables[vf6e73.tblName]; var v0fb55 =vf7955.ToRowObject(v16372); var v32a7 =v0fb55.GetCells(); var vc4486 =false;  for(var ve9323=0; ve9323<v32a7.length; ve9323++) { var v33d18 =v32a7[ve9323];  if (!v33d18) continue;  var ve6f15 =v33d18.Column;  if (ve6f15.InputRequired) { if (v33d18.Text =="" ||v33d18.Text =="\xA0" ||(v33d18.Text !=null &&escape(v33d18.Text)!="" &&v33d18.Text.length <3 &&escape(v33d18.Text).indexOf("%0A")>-1)) { WGEditEngine.ShowRequiredIndicator(v46d19,v33d18);  if (!vc4486) { vc4486 =true;  } } } } if (vc4486) { if (v46d19.FreezePaneActive &&v46d19.FreezeConfig !=null) WGUIEngine.SetFreezeScrollBarPosition(v46d19,0,false,null,true);  v46d19.SetStatus1("","","CommonText/InputRequiredStatus"); v46d19.SetStatusIcon("Warning"); v46d19.IsStatusLocked =true; }  return (!vc4486); },  ShowRequiredIndicator: function(v8b694,v7d390) { var v2ce38 =v7d390.GetElement(); var v4ad10 =v8b694.LayoutSettings.ImageSettings.RequiredImage;  if (v2ce38.children.length >0 &&v2ce38.children[v2ce38.children.length -1].tagName =="DIV") { v2ce38.children[v2ce38.children.length -1].style.display =""; } else { var v85611 =document.createElement("DIV"); v85611.style.cssText ="position:relative; width:100%";  var v69164 =document.createElement("IMG");  v69164.src =v8b694.ResolveImagePathEx(v4ad10); v69164.style.cssText ="position:absolute; right:2px"; v69164.title =(v7d390.Column.InputRequiredErrorText !="" ? v7d390.Column.InputRequiredErrorText : v8b694.GetString("Tooltip/InputRequired"));  v85611.appendChild(v69164); v2ce38.insertAdjacentElement("afterBegin",v85611); } }, PrepareAddRowInfo: function(v22963) { var veec30 =v22963.ActiveEditCell; var v9d559 =veec30.rowElement; var v67414 =null; var v3fd9 =wgGetRootRow(v9d559); if (wgIsRowDirty(v9d559)&&WGEditEngine.ValidateRow(v22963,v9d559)) { var v07718 =v22963.Tables[veec30.tblName]; var v34b14 =null; if (!v07718.IsRootTable) v34b14 =v07718.GetSubTableById(WG50Engine.GetTable(v9d559).subId); var vc2763 =v07718.NewRow(v34b14); var vc7252 =vc2763.Cells; for (var v9da39=0; v9da39<vc7252.length; v9da39++) { var v1ce53 =vc7252[v9da39]; var v89e1 =v1ce53.Name; var v8f020 =wgGetCellByName(v9d559,v89e1); if (v8f020) { var v83295 =v8f020.contentMode; var v74a46 =""; if (v83295 =="HTML") { v74a46 =v8f020.innerHTML; if (v74a46 !="") { var v33174 =new RegExp("\r\n","g"); v74a46 =v74a46.replace(v33174,""); } } else v74a46 =v8f020.innerText; v1ce53.Text =v74a46; if (v8f020.cellValue) v1ce53.Value =v8f020.cellValue; else v1ce53.Value =v1ce53.Text; if ((v1ce53.Value =="" ||v1ce53.Value ==" ")&&v83295 =="HTML") v1ce53.Value =v1ce53.Text; v1ce53.Modified =(v8f020.cellModified ==true ||v74a46 !=" "); v1ce53.DataChanged =true; v1ce53.OldValue =v1ce53.OldText =""; v1ce53._UIState ="Changed"; } } vc2763.RowElement =v9d559; vc2763.Update(); return true; } return false; }, PrepareDeleteRowInfo: function(v7d319,v9e056) { var v7b599 =WG50Engine.GetTable(v9e056); var vbe046 =v7d319.Tables[v7b599.tblName]; v9e056 =wgGetRootRow(v9e056); var v12686 =WG50Engine.GetRowByElement(v9e056); v12686.Delete(); }, PrepareUpdateRowInfo: function(ve5b74) { var v18754 =ve5b74.ActiveEditCell; var v1ef25 =v18754.rowElement; var v7c371 =null; var v1424 =wgGetRootRow(v1ef25); if (wgIsRowDirty(v1ef25)&&WGEditEngine.ValidateRow(ve5b74,v1ef25)) { var vb2182 =WG50Engine.GetRowByElement(v1ef25); vb2182._UIState ="Changed"; vb2182.Update(); return true; } return false; }, PrepareAddRow: function(vac194,v4ce44,v2c95,v3a327) { v4ce44.setAttribute("action","AddRow"); v4ce44.setAttribute("tblName",v3a327.Table.Id); if (!ISEvent.Raise(vac194.LayoutSettings.ClientSideEvents.OnBeforeAdd,vac194.Name,v3a327.Table.Id,vac194.TempLRO)) return; var vacf10 =vac194.XmlReq; if (v4ce44.selectSingleNode("//newRowData")) v4ce44.removeChild(v4ce44.selectSingleNode("//newRowData")); ISXml.CreateCDATA(vacf10,v4ce44,"newRowData",v3a327.ToXml()); if (v3a327.SubTable) { var v04d4 =v3a327.SubTable.GetParentRow(); v04d4 =wgGetPreviousRow(vac194.Tables[WG50Engine.GetTableNameByRow(v04d4)].GetElement(WG40.BODY,WG40.HTMLTABLE,v04d4),v04d4); v04d4 =wgGetRootRow(v04d4); WGHierEngine.PrepareXmlInfo(vac194,v4ce44,v04d4); v4ce44.setAttribute("tblSubId",v3a327.SubTable.SubId); } vac194.SetStatus1("","addrow","CommonText/AddRow"); return true; }, PrepareUpdateRow: function(v80b85,v2fb93,v9c08,vd6672) { v2fb93.setAttribute("action","UpdateRow"); v2fb93.setAttribute("tblName",vd6672.Table.Name); v2fb93.setAttribute("position",vd6672.Position); if (!ISEvent.Raise(v80b85.LayoutSettings.ClientSideEvents.OnBeforeUpdate,v80b85.Name,vd6672.tblName,v80b85.TempLRO)) return; var v04565 =v80b85.XmlReq; if (v2fb93.selectSingleNode("//RowData")) v2fb93.removeChild(v2fb93.selectSingleNode("//RowData")); ISXml.CreateCDATA(v04565,v2fb93,"RowData",vd6672.ToXml()); if (vd6672.SubTable) { var v8b083 =vd6672.SubTable.GetParentRow(); v8b083 =wgGetPreviousRow(v80b85.Tables[WG50Engine.GetTableNameByRow(v8b083)].GetElement(WG40.BODY,WG40.HTMLTABLE,v8b083),v8b083); v8b083 =wgGetRootRow(v8b083); WGHierEngine.CreateRelNames(v80b85,v2fb93,v8b083); v2fb93.setAttribute("tblSubId",vd6672.SubTable.SubId); } v2fb93.setAttribute("parentPos",vd6672.ParentPos); v80b85.SetStatus1("","updaterow","CommonText/UpdateRow"); return true; }, PrepareDeleteRow: function(v75b40,v5b972,v20193,v06f75) { v5b972.setAttribute("action","DeleteRow"); v5b972.setAttribute("tblName",v06f75.Table.Name); v5b972.setAttribute("position",v06f75.Position); v5b972.setAttribute("keyValue",(v06f75.KeyValue ? ISXml.EncodeString(v06f75.KeyValue): "")); if (!ISEvent.Raise(v75b40.LayoutSettings.ClientSideEvents.OnBeforeDelete,v75b40.Name,v06f75.Table.Name,v75b40.TempLRO)) return; if (v06f75.SubTable) { var v1f940 =v06f75.SubTable.GetParentRow(); v1f940 =wgGetPreviousRow(v75b40.Tables[WG50Engine.GetTableNameByRow(v1f940)].GetElement(WG40.BODY,WG40.HTMLTABLE,v1f940),v1f940); if (v1f940.type =="CSRecord") v1f940 =wgGetRootRow(v1f940); WGHierEngine.CreateRelNames(v75b40,v5b972,v1f940); v5b972.setAttribute("tblSubId",v06f75.SubTable.SubId); } v5b972.setAttribute("parentPos",v06f75.ParentPos); v75b40.SetStatus1("","deleterow","CommonText/DeleteRow"); return true; }, ResponseDeleteRow: function(v66310,v68659) { var v01f96 =v66310.LastRequestObj; var v31851 =v66310.Tables[v01f96.Table.Name]; var vc6179 =v01f96.RowElement; var v7b578 =v31851.GetElement(WG40.BODY,WG40.HTMLTABLE,vc6179); var vc1270 =parseFloat(v66310.TotalLoadedRows); var v1ed1 =parseFloat(v66310.TotalRows); var va0a60 =v66310.LayoutSettings.PagingMode; var ve5979 =wgGetRootRow(vc6179); var vfe443 =ve5979.rowIndex; var v74058 =false; if (!ISEvent.Raise(v66310.LayoutSettings.ClientSideEvents.OnAfterDelete,v66310.Name,v01f96.tblName,v66310.LastRequestObj,v66310.XmlResp)) return; if (v01f96.ParentPos =="") { WGEditEngine.DeleteRowGeneric(v66310,v31851,v7b578,vc6179,vc6314,vc1270,v1ed1); } else { var v12a75 =v31851.GetElement(WG40.BODY,WG40.HTMLDIV,vc6179); var va8486 =ISXml.GetNodeText(v68659,"//htmlTB"); v12a75.outerHTML =va8486; if (v31851.IsRootTable) { v66310.ClearChildTables(); WG50Engine.RegisterRootTableBehaviour(v66310); } else { var v1f436 =v31851.GetSubTableById(v7b578.subId); var vc6314 =v1f436.GetParentRow(); v66310.ClearChildTables(v31851.Id); } v66310.ActiveEditCell =null; v66310.LastSelObj =null; } var v57c83 =ISXml.GetNodeText(v68659,"//footerString"); if (v57c83 !="") { if (v31851.IsRootTable) WGUIEngine.UpdateColumnFooter(v66310,v31851,null,v57c83); else { var v1f436 =v31851.GetSubTableById(v7b578.subId); WGUIEngine.UpdateColumnFooter(v66310,null,v1f436,v57c83); } } if (v66310.LayoutSettings.VerboseEditingInformation) { v66310.SetStatus1("","","CommonText/DeleteSuccess"); v66310.SetStatusIcon("Success"); v66310.IsStatusLocked =true; } else { v66310.SetStatus1("","ready","CommonText/Ready"); } }, ResponseUpdateRow: function(vbcf22,v65333) { var v63e65 =""; try { v63e65 =ISXml.GetNodeText(v65333,"//grouplevel"); } catch (e) { } var v52d38 =vbcf22.LastRequestObj; var v6e550 =vbcf22.Tables[v52d38.Table.Name]; var v34b69 =v52d38.RowElement; var vebe13 =v6e550.GetElement(WG40.BODY,WG40.HTMLTABLE,v34b69); var v85443 =parseFloat(vbcf22.TotalLoadedRows); var vf5139 =parseFloat(vbcf22.TotalRows); var v5ff60 =vbcf22.LayoutSettings.PagingMode; var v8d657 =ISXml.GetNodeText(v65333,"//needReposition"); var va0853 =ISXml.GetNodeText(v65333,"//keyValue"); var vf0852 =vbcf22.LastSelObj; var vb1585 =false; var v9bb91 =ISXml.GetNodeText(v65333,"//htmlTB"); if (!ISEvent.Raise(vbcf22.LayoutSettings.ClientSideEvents.OnAfterUpdate,vbcf22.Name,v52d38.Table.Id,vbcf22.LastRequestObj,vbcf22.XmlResp)) return; if (v8d657 =="True" ||(v63e65 !="" &&v9bb91 !="")) { if (v63e65 =="") { var ve8c42 =wgGetRootRow(v34b69); var v90373 =ve8c42.position; var vc2339 =ve8c42.rowIndex; var v9282 =wgGetHierRecord(v34b69); var va1122 =null; if (v9282 &&v9282.type !="HierRecord") v9282 =null; if (v6e550.PreviewRowVisible) va1122 =wgGetPreviewRow(v34b69); if (wgIsColumnSetRow(v34b69)) { var vdb476 =wgGetColumnSetRows(v34b69); for (var vbf86=0; vbf86<vdb476.length; vbf86++) { vdb476[vbf86].removeNode(true); } } else { v34b69.removeNode(true); } if (va1122) va1122.removeNode(true); if (v9282) v9282.removeNode(true); var vdfc2 =parseFloat(ISXml.GetNodeText(v65333,"//position")); if (!v6e550.IsRootTable ||v5ff60 =="ClassicPaging" ||v5ff60 =="None" ||(v5ff60 =="VirtualLoad" &&(v85443 ==vf5139 ||vdfc2<=v85443))) { var vce937 =ISXml.GetNodeText(v65333,"//htmlRow"); WGUIEngine.SetTempContent("<table>" +vce937 +"</table>"); var vd586 =WGUIEngine.GetTempContent(); var newt,hiert; var v3ab51 =vebe13.tBodies[vebe13.tBodies.length -1]; if (!v6e550.IsRootTable) { try { v85443 =parseFloat(vebe13.rows[vebe13.rows.length -1].position)+1; } catch (e) { v85443 =0; } } else { WGUIEngine.FormatFreezeRows(vbcf22,vd586.rows); } newt =v3ab51.appendChild(vd586.rows[0]); var v22645 =vd586.rows.length; var v7de26 =0; for (var vbf86=0; vbf86<v22645; vbf86++) { var v25983 =vd586.rows[0]; WG50Engine.EmulateAttributes(v25983); if (v25983.type !="HierRecord") { v3ab51.appendChild(v25983); v7de26++; } } if (v9282 &&v34b69.childExpanded =="True") { if (v34b69.relNames !=newt.relNames) { v34b69.childExpanded ="False"; v9282 =v3ab51.appendChild(vd586.rows[0]); } } if (vdfc2<v85443) { var v73685 =(vdfc2>v90373 ? vdfc2 +1 : vdfc2); hiert =v9282; if (hiert) v3ab51.appendChild(hiert); if (v73685<v85443) { var vf8876 =parseFloat(newt.rowIndex); vebe13.moveRow(newt.rowIndex,wgGetRowByPositionExact(vebe13,v73685).rowIndex); if (v7de26>0) { for (var v4ad76=0; v4ad76<v7de26; v4ad76++) { vebe13.moveRow(vf8876 +v4ad76 +1,newt.rowIndex +v4ad76 +1); } } if (hiert) vebe13.moveRow(hiert.rowIndex,newt.rowIndex +v7de26 +1); } if (vdfc2 ==v85443 -1) WGEditEngine.FixTreeLines(vbcf22,v6e550,vebe13,newt); WGEditEngine.FixHierState(vbcf22,v34b69,newt); vb1585 =true; } } else { if (v6e550.IsRootTable) { v85443--; vbcf22.Set("TotalLoadedRows",v85443);  if (vbcf22.IsClassicPaging()) WGPageEngine.InvalidatePagingArgs(vbcf22); else vbcf22.SetStatus2("","loaded",v85443,vf5139); } } wgRefreshHierPosition(vbcf22,vebe13,vebe13.rows[0],0,hiert); var v68224 =false; try { var v46a68 =vbcf22.LastSelObj.getRowElement(); var v07f88 =WG50Engine.GetTable(v46a68);  if (v07f88 ==null) v68224 =true; } catch (e) { v68224 =true; } if (v68224) { vbcf22.ActiveEditCell =null; vbcf22.LastSelObj =null; WGEventEngine.ProcessMouseEvents(vebe13.rows[vc2339].cells[v6e550.LastAECIndex],false,true); } } else { var v02131 =v6e550.GetElement(WG40.BODY,WG40.HTMLDIV,v52d38.RowElement); var vce937 =ISXml.GetNodeText(v65333,"//htmlTB"); var vc2339 =v34b69.rowIndex; v02131.outerHTML =vce937; if (v6e550.IsRootTable) { vbcf22.ClearChildTables(); WG50Engine.RegisterRootTableBehaviour(vbcf22); } else { var vb6a64 =v6e550.GetSubTableById(vebe13.subId); var v9282 =vb6a64.GetParentRow(); vbcf22.ClearChildTables(v6e550.Id); } var v87198 =v63e65.split("_"); var v0b273; v02131 =document.getElementById(v02131.id); vebe13 =v02131.childNodes[0]; for (var vbf86=0; vbf86<v87198.length; vbf86++) { var v9161 =wgGetRowByGroup(vebe13,vbf86,v87198[vbf86],v0b273); if (v9161) { if (v9161.childrenLoaded =="True") { wgExpandGroupRow(v9161); } } v0b273 =v9161; } vbcf22.ActiveEditCell =null; vbcf22.LastSelObj =null; var v1e535 =vebe13.rows[vc2339]; var vb9d75 =v6e550.LastAECIndex; if (v1e535) { if (vb9d75>=v1e535.cells.length) vb9d75 =v1e535.cells.length -1; WGEventEngine.ProcessMouseEvents(vebe13.rows[vc2339].cells[vb9d75],false,true); vb1585 =true; } } } else { vb1585 =true; var vce937 =ISXml.GetNodeText(v65333,"//htmlRow"); if (vce937 =="RowRemoved") { WGEditEngine.DeleteRowGeneric(vbcf22,v6e550,vebe13,v34b69,v9282,v85443,vf5139); } else { WGUIEngine.SetTempContent("<table>" +vce937 +"</table>"); var vd586 =WGUIEngine.GetTempContent(); var v9c759 =vd586.rows[0]; var v25313 =wgGetRootRow(v34b69); var vc9c69; if (v6e550.IsRootTable) WGUIEngine.FormatFreezeRows(vbcf22,vd586.rows); v25313.replaceNode(v9c759); vc9c69 =v9c759;  var v0b813 =v9c759; var v22645 =vd586.rows.length; for (var vbf729=0; vbf729<v22645; vbf729++) { v0b813 =wgGetNextRow(vebe13,v0b813); var v25983 =vd586.rows[0]; WG50Engine.EmulateAttributes(v25983); if (v0b813.type !="HierRecord" &&v0b813.type !="GroupTotalRow") { if (v0b813.type ==v25983.type) { v0b813.replaceNode(v25983); v0b813 =null; v0b813 =v25983; var ve8c42 =v25313; if (v25313.srLevel) { ve8c42 =wgGetRootRow(WGUIEngine.GetSelfRefParent(vebe13,v25983)); if (ve8c42.srLevel ==v25313.srLevel) ve8c42 =v25313; } if ((!v25983.srLevel &&v25983.style.display !="") ||(typeof (v25313.srLevel)!="undefined" &&(v25313.srExpanded =="True" ||v25313.style.display ==""))) v25983.style.display =""; vc9c69 =v0b813; } } } v9c759.style.display =""; if (vf0852 &&vf0852.GetRowElement().rowIndex ==-1) { vbcf22.ActiveEditCell =null; vbcf22.LastSelObj =null; try { if (typeof (v9c759.srLevel)!="undefined" &&vbcf22.LayoutSettings.EditOnClick) { var v11427 =vebe13.rows[oldLSO.rowIndex]; vbcf22.LastEditObj.cellElement =v11427.cells[v6e550.LastAECIndex]; WGEventEngine.ProcessMouseEvents(vbcf22.LastEditObj.cellElement,false,true); } else WGEventEngine.ProcessMouseEvents(v9c759.cells[v6e550.LastAECIndex],false,true); } catch (e) { } } if (v25313.childExpanded =="True") { if (v25313.relNames !=v9c759.relNames) { v25313.childExpanded ="False"; v9282 =wgGetNextRow(vebe13,vc9c69); v9282.replaceNode(vd586.rows[0]); } } WGUIEngine.ClearTempContent(); WGEditEngine.FixHierState(vbcf22,v25313,v9c759); WGEditEngine.FixSelfRefState(vbcf22,v6e550,v25313,v9c759); v34b69 =null; } } var vff031 =ISXml.GetNodeText(v65333,"//footerString"); if (vff031 !="") { if (v6e550.IsRootTable) { WGUIEngine.UpdateColumnFooter(vbcf22,v6e550,null,vff031); WG50Engine.OnViewChanged(v6e550,"UpdateRow"); } else { var vb6a64 =v6e550.GetSubTableById(vebe13.subId); WGUIEngine.UpdateColumnFooter(vbcf22,null,vb6a64,vff031); } }  if (v9c759 !=null) WGEditEngine.UpdateGroupTotalRows(v65333,v9c759); if (vbcf22.LastEditObj) { WGEditEngine.EnsureEditFocus(vbcf22); } else { if (vb1585) WGEditEngine.EnsureActiveEditCellFocus(vbcf22); } if (vbcf22.LayoutSettings.VerboseEditingInformation) { vbcf22.SetStatus1("","","CommonText/UpdateSuccess"); vbcf22.SetStatusIcon("Success"); vbcf22.IsStatusLocked =true; } else { vbcf22.SetStatus1("","ready","CommonText/Ready"); } },  UpdateGroupTotalRows: function(v60e33,vaea91) { var v7dd94 =ISXml.GetNodeText(v60e33,"//groupFooterCount"); var vaab72 =null; var v0b463 =-1;  if (v7dd94 !="") { v7dd94 =parseInt(v7dd94);  for (var vc7d26=0; vc7d26<v7dd94; vc7d26++) {  if (vaab72 ==null) { vaab72 =WGEditEngine.GetNextGroupTotalRow(vaea91); v0b463 =parseInt(vaab72.groupIndex); vaab72 =WGEditEngine.ReplaceGroupTotalRows(v60e33,vaab72,vc7d26); continue; }  v0b463--; vaab72 =WGUIEngine.GetTRByGroupIndex(vaab72,v0b463,"next","GroupTotalRow"); vaab72 =WGEditEngine.ReplaceGroupTotalRows(v60e33,vaab72,vc7d26); } } },  ReplaceGroupTotalRows: function(vdeb7,v8f880,va5e48) { var v65468 =ISXml.GetNodeText(vdeb7,"//groupFooterString_" +va5e48);  if (v65468 !="") { WGUIEngine.SetTempContent("<table>" +v65468 +"</table>"); var ve5760 =WGUIEngine.GetTempContent(); var v2fd15 =ve5760.rows[0]; var v65390 =wgGetRootRow(v8f880); v65390.replaceNode(v2fd15); v2fd15.style.display =""; var v51162 =v2fd15; var v55915 =ve5760.rows.length; for (var v37466=0; v37466<v55915; v37466++) { v51162 =wgGetNextRow(tb,v51162); var vba418 =ve5760.rows[0]; WG50Engine.EmulateAttributes(vba418); v51162.replaceNode(vba418); vba418.style.display =""; v51162 =null; v51162 =vba418; }  WGUIEngine.ClearTempContent();  return v2fd15; } },  GetNextGroupTotalRow: function(vc3b82) { var v61863 =WG50Engine.GetTable(vc3b82); var v28b59 =wgGetNextRow(v61863,vc3b82);  while (v28b59 !=null) { if (v28b59.type =="GroupTotalRow") return v28b59;  v28b59 =wgGetNextRow(v61863,v28b59); }  return null; }, DeleteRowGeneric: function(vd8357,v34a57,vfef53,v58043,vcaf4,v9c566,vfbe34) { var vd2782 =wgGetRootRow(v58043); var vdb368 =vd2782.rowIndex; var ve6d1 =false; wgRemoveRow(v34a57,v58043); if (vfef53.rows.length>0) { wgRefreshHierPosition(vd8357,vfef53,vfef53.rows[0],0,vcaf4); var v5e379 =vfef53.rows[vdb368]; var vaca83 =v34a57.LastAECIndex; if (!v5e379) { var v43649 =wgGetLastVisibleRow(vfef53); if (v43649) { v5e379 =v43649.GetRowElement(); if (v5e379) { if (v5e379.type !="NewRow" &&vcaf4) WGEditEngine.MarkLastLines(vd8357,v34a57,vfef53,v5e379); } } } } vd8357.ActiveEditCell =null; vd8357.LastSelObj =null; if (v5e379) { if (vaca83>=v5e379.cells.length ||vaca83 ==-1) { var v43649 =WGUIEngine.GetLastCell(v5e379); if (v43649) vaca83 =v43649.cellIndex; else vaca83 =v5e379.cells.length -1; } WGEventEngine.ProcessMouseEvents(v5e379.cells[vaca83],false,true); if (vd8357.LastEditObj) WGEditEngine.ExitEditMode(vd8357.LastEditObj,true); ve6d1 =true; } if (ve6d1) WGEditEngine.EnsureActiveEditCellFocus(vd8357); if (v34a57.IsRootTable) { vfbe34--; v9c566--; vd8357.Set("TotalLoadedRows",v9c566); vd8357.Set("TotalRows",vfbe34);  if (vd8357.IsClassicPaging()) WGPageEngine.InvalidatePagingArgs(vd8357); else vd8357.SetStatus2("","loaded",v9c566,vfbe34); } v58043 =null; vcaf4 =null; }, ResponseAddRow: function(v92450,vc4c67) { var v3d868 =""; try { v3d868 =ISXml.GetNodeText(vc4c67,"//grouplevel"); } catch (e) { } var v11015 =v92450.LastRequestObj; var vdf523 =v92450.Tables[v11015.Table.Id]; var v20b50 =parseFloat(v92450.TotalLoadedRows); var vb6c48 =parseFloat(v92450.TotalRows); var v49b81 =v92450.LayoutSettings.PagingMode; var v34446 =null; if (vdf523.IsRootTable) v34446 =vdf523.GetElement(WG40.BODY,WG40.HTMLTABLE); else v34446 =v11015.SubTable.GetElement(WG40.BODY,WG40.HTMLTABLE); var v47c71 =v92450.LayoutSettings.ResetNewRowValuesOnError; try { if (v11015.RowElement) { WGEditEngine.InitializeNewRow(v92450,v11015.RowElement); if (v92450.LastSelObj.GetRowElement().type =="NewRow") WGEventEngine.SelectRow(v11015.RowElement,v92450.GetCurSelImage()); } } catch (e) { } if (!ISEvent.Raise(v92450.LayoutSettings.ClientSideEvents.OnAfterAdd,v92450.Name,v11015.tblName,v92450.LastRequestObj,v92450.XmlResp)) return; if (v3d868 !="") { var v0b021 =null; if (vdf523.IsRootTable) v0b021 =vdf523.GetElement(WG40.BODY,WG40.HTMLDIV);  else v0b021 =v11015.SubTable.GetElement(WG40.BODY,WG40.HTMLDIV); var v95b47 =ISXml.GetNodeText(vc4c67,"//htmlTB"); v0b021.outerHTML =v95b47; if (vdf523.IsRootTable) WG50Engine.RegisterRootTableBehaviour(v92450); if (vdf523.IsRootTable) v92450.ClearChildTables(); else v92450.ClearChildTables(vdf523.Id); var v3c443 =v3d868.split("_"); var ve9975; for (var v94b23=0; v94b23<v3c443.length; v94b23++) { var v3a274 =wgGetRowByGroup(v34446,v94b23,v3c443[v94b23],ve9975); if (v3a274) { if (v3a274.childrenLoaded =="True") { wgExpandGroupRow(v3a274); } } ve9975 =v3a274; } if (v49b81 =="None") v20b50++; else v20b50 =v92450.LayoutSettings.VirtualPageSize; } else { var va2f69 =-1; var v95b47 =""; try { va2f69 =parseFloat(ISXml.GetNodeText(vc4c67,"//position")); v95b47 =ISXml.GetNodeText(vc4c67,"//htmlRow"); } catch (e) { } var v12a47 =false; if (v95b47 =="") { v92450.SetStatus1("","ready","CommonText/Ready"); return; } if (!vdf523.IsRootTable ||v49b81 =="None" ||v49b81 =="ClassicPaging" ||(v49b81 =="VirtualLoad" &&(v20b50 ==vb6c48 ||va2f69<=v20b50))) { WGUIEngine.SetTempContent("<table>" +v95b47 +"</table>"); var v00022 =WGUIEngine.GetTempContent(); var newt,hiert; var vb1c60 =null; if (v34446.tBodies.length>0) vb1c60 =v34446.tBodies[v34446.tBodies.length -1]; else { vb1c60 =document.createElement("TBODY"); v34446.appendChild(vb1c60); } if (!vdf523.IsRootTable) { try { v20b50 =parseFloat(v34446.rows[v34446.rows.length -1].position)+1; } catch (e) { v20b50 =0; } } else { WGUIEngine.FormatFreezeRows(v92450,v00022.rows); } newt =vb1c60.appendChild(v00022.rows[0]); var v2c86 =v00022.rows.length; for (var v92d11=0; v92d11<v2c86; v92d11++) { if (v00022.rows[0].type =="HierRecord") { hiert =v00022.rows[0]; v2c86--; } vb1c60.appendChild(v00022.rows[0]); } var vf374 =newt.rowIndex; if (va2f69<v20b50) { v34446.moveRow(newt.rowIndex,wgGetRowByPositionExact(v34446,va2f69).rowIndex); for (var v94b23=0; v94b23<v2c86; v94b23++) { v34446.moveRow(vf374 +v94b23 +1,newt.rowIndex +v94b23 +1); } if (hiert) v34446.moveRow(hiert.rowIndex,newt.rowIndex +(v2c86)+1); wgRefreshHierPosition(v92450,v34446,wgGetNextRow(v34446,(hiert ? hiert : newt)),va2f69 +1,hiert); v12a47 =true; } var vf6720 =wgGetCellByPosition(newt,0); if (v92450.HasFocus()) vf6720.setActive(); WGEventEngine.EnsureCellVisible(v92450,vf6720); WGUIEngine.ClearTempContent(); if (vdf523.IsRootTable) v20b50 +=1; if (!v12a47) { WGEditEngine.FixTreeLines(v92450,vdf523,v34446,newt); } } } if (vdf523.IsRootTable) { vb6c48 +=1; if (v20b50>vb6c48) v20b50 =vb6c48; v92450.Set("TotalLoadedRows",v20b50); v92450.Set("TotalRows",vb6c48); if (v92450.IsClassicPaging()) WGPageEngine.InvalidatePagingArgs(v92450); else v92450.SetStatus2("","loaded",v20b50,vb6c48); } if (newt !=null) WGEditEngine.UpdateGroupTotalRows(vc4c67,newt); var v55d95 =ISXml.GetNodeText(vc4c67,"//footerString"); if (v55d95 !="") { if (vdf523.IsRootTable) { WGUIEngine.UpdateColumnFooter(v92450,vdf523,null,v55d95); WG50Engine.OnViewChanged(vdf523,"AddRow"); } else { var v9cc24 =vdf523.GetSubTableById(v34446.subId); WGUIEngine.UpdateColumnFooter(v92450,null,v9cc24,v55d95); } } if (v92450.LayoutSettings.VerboseEditingInformation) { v92450.SetStatus1("","","CommonText/AddSuccess"); v92450.SetStatusIcon("Success"); v92450.IsStatusLocked =true; } else { v92450.SetStatus1("","ready","CommonText/Ready"); } }, MarkLastLines: function(va499,v0cb96,vc4939,v91384) { if (wgIsRecordRow(v91384)) { var v3ef6 =WGHierEngine.GetCellExpander(v91384); var vc9046 =wgGetHierRecord(v91384); if (vc9046 &&vc9046.type !="HierRecord") vc9046 =null; if (v3ef6) WGHierEngine.SetLastTree(va499,v3ef6.childNodes[0],vc9046); if (vc9046) { var v6d724 =WGHierEngine.GetIStructCell(vc9046); v6d724.innerHTML =""; } } }, FixTreeLines: function(v15336,vb5714,vf4e61,vb0d70) { var vd9681 =wgGetPreviousRow(vf4e61,vb0d70); if (vd9681 &&vd9681.type =="HierRecord") { var v5d235 =WGHierEngine.GetIStructCell(vd9681); WGHierEngine.RenderIStructure(v15336,v5d235); vd9681 =wgGetPreviousRow(vf4e61,vd9681); vd9681 =wgGetRootRow(vd9681); if (vd9681 &&vd9681.type =="Record") { var v5e776 =WGHierEngine.GetCellExpander(vd9681); WGHierEngine.SetNormalLTree(v15336,v5e776.childNodes[0]); } } else if (vd9681 &&wgIsRecordRow(vd9681)&&!vb5714.IsRootTable) { vd9681 =wgGetRootRow(vd9681); var v5e776 =WGHierEngine.GetCellExpander(vd9681); WGHierEngine.SetNormalLTree(v15336,v5e776.childNodes[0],true); } }, FixHierState: function(v44639,vb5163,v57d77) { if (vb5163.childExpanded &&vb5163.childExpanded =="True") { var v7e856 =WGHierEngine.GetCellExpander(v57d77); if (v7e856) { WGHierEngine.ChangeImage(v44639,v7e856,"False"); v57d77.childExpanded ="True"; } } if (vb5163.tblName) v57d77.tblName =vb5163.tblName; }, FixSelfRefState: function(v6ca95,v8d242,v86e62,vdca55) { if (v86e62.srLevel &&v86e62.srExpanded =="True") { var v79111 =WGUIEngine.GetSelfRefImage(v8d242,vdca55); if (v79111) { v79111.src =v6ca95.ResolveImagePathEx(v6ca95.LayoutSettings.ImageSettings.CollapseImage); vdca55.srExpanded ="True"; } } }, ToggleCEDropDown: function(v16870,v08e31,vdea14) { var v9c150 =wgGetGridById(v08e31); var vaae22 =v9c150.CustomEditors[vdea14]; vaae22.ImplementationObject.OnDropdown(); },  LoadDefaultCulture: function(vab661) { if (typeof(ISCultureInfo)=="function") { var v06241 ="<XMLCultureInfo><XMLCultureInfo><DateTimeFormatInfo><StandarFormat><F>dddd, MMMM dd, yyyy h:mm:ss tt</F><f>dddd, MMMM dd, yyyy h:mm tt</f><D>dddd, MMMM dd, yyyy</D><d>M/d/yyyy</d><T>h:mm:ss tt</T><t>h:mm tt</t><m>MMMM dd</m><y>MMMM, yyyy</y><g>M/d/yyyy h:mm tt</g><G>M/d/yyyy h:mm:ss tt</G></StandarFormat><DayNames><idx0>Sunday</idx0><idx1>Monday</idx1><idx2>Tuesday</idx2><idx3>Wednesday</idx3><idx4>Thursday</idx4><idx5>Friday</idx5><idx6>Saturday</idx6></DayNames><AbbreviatedDayNames><idx0>Sun</idx0><idx1>Mon</idx1><idx2>Tue</idx2><idx3>Wed</idx3><idx4>Thu</idx4><idx5>Fri</idx5><idx6>Sat</idx6></AbbreviatedDayNames><MonthNames><idx0>January</idx0><idx1>February</idx1><idx2>March</idx2><idx3>April</idx3><idx4>May</idx4><idx5>June</idx5><idx6>July</idx6><idx7>August</idx7><idx8>September</idx8><idx9>October</idx9><idx10>November</idx10><idx11>December</idx11><idx12></idx12></MonthNames><AbbreviatedMonthNames><idx0>Jan</idx0><idx1>Feb</idx1><idx2>Mar</idx2><idx3>Apr</idx3><idx4>May</idx4><idx5>Jun</idx5><idx6>Jul</idx6><idx7>Aug</idx7><idx8>Sep</idx8><idx9>Oct</idx9><idx10>Nov</idx10><idx11>Dec</idx11><idx12></idx12></AbbreviatedMonthNames><AMDesignator>AM</AMDesignator><PMDesignator>PM</PMDesignator><DateSeparator>/</DateSeparator><TimeSeparator>:</TimeSeparator><EraName>A.D.</EraName><FirstDayOfWeek>Sunday</FirstDayOfWeek><CalendarWeekRule>FirstDay</CalendarWeekRule></DateTimeFormatInfo><NumberFormatInfo><CurrencyDecimalDigits>2</CurrencyDecimalDigits><CurrencyDecimalSeparator>.</CurrencyDecimalSeparator><CurrencyGroupSeparator>,</CurrencyGroupSeparator><CurrencyGroupSizes><idx0>3</idx0></CurrencyGroupSizes><CurrencyNegativePattern>($n)</CurrencyNegativePattern><CurrencyPositivePattern>$n</CurrencyPositivePattern><CurrencySymbol>$</CurrencySymbol><NegativeSign>-</NegativeSign><NumberDecimalDigits>2</NumberDecimalDigits><NumberDecimalSeparator>.</NumberDecimalSeparator><NumberGroupSeparator>,</NumberGroupSeparator><NumberGroupSizes><idx0>3</idx0></NumberGroupSizes><NumberNegativePattern>-n</NumberNegativePattern><PercentDecimalDigits>2</PercentDecimalDigits><PercentDecimalSeparator>.</PercentDecimalSeparator><PercentGroupSeparator>,</PercentGroupSeparator><PercentGroupSizes><idx0>3</idx0></PercentGroupSizes><PercentNegativePattern>-n %</PercentNegativePattern><PercentPositivePattern>n %</PercentPositivePattern><PercentSymbol>%</PercentSymbol><PositiveSign>+</PositiveSign><ScienExpDigit>3</ScienExpDigit></NumberFormatInfo></XMLCultureInfo></XMLCultureInfo>"; var v77d70 =ISXml.CreateXmlDocument(); var v58051 =null;  ISXml.LoadXml(v77d70,v06241); v58051 =new ISCultureInfo(v77d70.selectSingleNode("//XMLCultureInfo"));  vab661.CultureInfo =v58051; return v58051; }  return null; } };var ceProto =null;if (typeof(WebGridCustomEditor)=="undefined") ceProto =new Object();else ceProto =WebGridCustomEditor.prototype;ceProto.GetBaseEditorElement =function(){ if (this.baseEditor ==null) { if (this.BaseEditorType =="Textbox") this.baseEditor =document.getElementById(this.Grid.Name +"_TB" +this.Name); else this.baseEditor =this.ImplementationObject.GetBaseEditorElement(); } return this.baseEditor;};ceProto.GetEditCell =function(){ return this.Grid.GetActiveEditCell();};ceProto.GetEditCellElement =function(){ return this.GetEditCell().element;};ceProto.GetEditRowElement =function(){ return this.GetEditCell().rowElement;};ceProto.GetTable =function(){ var ac =this.Grid.GetActiveEditCell(); var table =this.Grid.Tables[ac.tblName]; return table;};ceProto.GetColumnXml =function(){ var table =this.GetTable(); return table.GetColumn(wgGetColNameByCell(this.GetEditCellElement()));};ceProto.GetColumnEditorProperties =function(){ var colXml =this.GetColumnXml(); return colXml.CustomEditorProperties;};ceProto.GetEditorClientID =function(){ var colXml =this.GetColumnXml(); return colXml.CustomEditorServerId;};ceProto.GetDropdownObject =function(){};ceProto.RowDirty =function(){ WGEditEngine.MarkEdit(this.Grid);};ceProto.CellDirty =function(){ this.GetEditCellElement().cellModified =true;};ceProto.IsRowDirty =function(){ return wgIsRowDirty(this.GetEditRowElement());};ceProto.GetDropdownButtonElement =function(){ if (this.DDObj ==null) { if (this.DropdownButtonType =="Image") this.DDObj =document.getElementById(this.Grid.Name +"_DD" +this.Name); else this.DDObj =this.ImplementationObject.GetDropdownButtonElement(); } return this.DDObj;};ceProto.EnterEditMode =function(ac,colXml,mode,isDirty){ var be; var grid =this.Grid; if (this.ControlType =="DHTMLClientControl") { be =this.GetBaseEditorElement(); if (be !=null &&this.BaseEditorType =="Textbox") { if (!be.initialized) { var ceName =this.Name; be.attachEvent("onfocus",WGEditEngine.OnTextBoxFocus); be.onselectstart =function() { event.cancelBubble =true; return true; }; be.onkeydown =function() { WGEditEngine.EditControlKeyboardHandler(grid,ceName); }; be.className =grid.LayoutSettings.TextBoxClass; } wgDispObjGeneric(grid,be,ac.element,1,1,null,null,this.HasDropdownButton); } } if (this.HasDropdownButton) { var dd =this.GetDropdownButtonElement(); if (this.DropdownButtonType =="Image" &&dd !=null) { dd.style.cursor ="hand"; wgDispObjGeneric(grid,dd,ac.element,ac.element.offsetWidth -this.DropdownButtonWidth,2,true); } } var customResult =this.ImplementationObject.OnEnterEditMode(ac,colXml,isDirty); this.ImplementationObject.OnSetValue(ac.element.innerText,ac); if (isDirty) this.ImplementationObject.OnDirty(); if (!be) be =customResult; return be;};ceProto.ClearEditObject =function(){ this.Grid.LastEditObj =null; this.Grid.IsInEditMode =false;};function WebGridEditDestructor(){ var vb6324 =delete WGEditEngine;}window.attachEvent("onunload",WebGridEditDestructor);if (typeof(Sys)!="undefined") Sys.Application.notifyScriptLoaded();