/* jQWidgets v3.9.0 (2015-Oct) Copyright (c) 2011-2015 jQWidgets. License: http://jqwidgets.com/license/ */ (function(a){a.extend(a.jqx._jqxGrid.prototype,{_handledblclick:function(t,n){if(t.target==null){return}if(n.disabled){return}if(a(t.target).ischildof(this.columnsheader)){return}var w;if(t.which){w=(t.which==3)}else{if(t.button){w=(t.button==2)}}if(w){return}var B;if(t.which){B=(t.which==2)}else{if(t.button){B=(t.button==1)}}if(B){return}var v=this.showheader?this.columnsheader.height()+2:0;var o=this._groupsheader()?this.groupsheader.height():0;var A=this.showtoolbar?this.toolbarheight:0;o+=A;var e=this.host.offset();var m=t.pageX-e.left;var l=t.pageY-v-e.top-o;var b=this._hittestrow(m,l);if(!b){return}var h=b.row;var j=b.index;var q=t.target.className;var p=this.table[0].rows[j];if(p==null){return}n.mousecaptured=true;n.mousecaptureposition={left:t.pageX,top:t.pageY-o};var r=this.hScrollInstance;var s=r.value;var d=0;var k=this.groupable?this.groups.length:0;for(var u=0;u=m&&m>=g){d=u;break}}if(h!=null){var c=this._getcolumnat(d);if(!(q.indexOf("jqx-grid-group-expand")!=-1||q.indexOf("jqx-grid-group-collapse")!=-1)){if(h.boundindex!=-1){n.begincelledit(n.getboundindex(h),c.datafield,c.defaulteditorvalue)}}}},_getpreveditablecolumn:function(c){var b=this;while(c>0){c--;var d=b.getcolumnat(c);if(!d){return null}if(!d.editable){continue}if(!d.hidden){return d}}return null},_getnexteditablecolumn:function(c){var b=this;while(c=33&&J<=40&&y.selectionmode=="multiplecellsadvanced"){var i=this.editcell.columntype=="textbox"||this.editcell.columntype==null?this.editcell.editor:this.editcell.editor.find("input");var K=y._selection(i);var z=i.val().length;if(K.length>0&&this.editcell.columntype!="datetimeinput"){y._cancelkeydown=true}if(K.start>0&&J==37){y._cancelkeydown=true}if(K.start=this.pagesize){this.clearselection(false);var G=this.dataview.loadedrecords[x];this.selectcell(this.getboundindex(G),c.datafield)}}}}}}}}}}return false}else{if(J==27){this.endcelledit(this.editcell.row,this.editcell.column,true,true);return false}}}}else{var A=false;if(J==113){A=true}if(!E.ctrlKey&&!E.altKey&&!E.metaKey){if(J>=48&&J<=57){this.editchar=String.fromCharCode(J);A=true}if(J>=65&&J<=90){this.editchar=String.fromCharCode(J);var t=false;if(E.shiftKey){t=E.shiftKey}else{if(E.modifiers){t=!!(E.modifiers&4)}}if(!t){this.editchar=this.editchar.toLowerCase()}A=true}else{if(J>=96&&J<=105){this.editchar=J-96;this.editchar=this.editchar.toString();A=true}}var s=a(".jqx-grid").length;A=A&&(s==1||(s>1&&y.focused));var l=a.data(document.body,"jqxgrid.edit");if(l!==undefined&&l!==""){if(J===13||A){if(l!=y.element.id){return true}}}}if(J==13||A){if(y.getselectedrowindex){var h=y.getselectedrowindex();switch(y.selectionmode){case"singlerow":case"multiplerows":case"multiplerowsextended":if(h>=0){var w="";for(var C=0;C0){for(var r=0;r=0){return}if(this.groups.indexOf(f.displayfield)>=0){return}}if(this.editrow!=undefined){return}if(this.editcell){if(this.editcell.row==n&&this.editcell.column==e){return true}if(this.editmode==="selectedrow"){if(this.editcell.row==n){return}}var d=this.endcelledit(this.editcell.row,this.editcell.column,false,true,false);if(false==d){return}}var i=f.columntype=="checkbox"||f.columntype=="button";this.host.removeClass("jqx-disableselect");this.content.removeClass("jqx-disableselect");if(f.editable){if(f.cellbeginedit){var k=this.getcell(n,e);var m=f.cellbeginedit(n,e,f.columntype,k!=null?k.value:null);if(m==false){return}}var j=this.getrowvisibleindex(n);this.editcell=this.getcell(n,e);if(this.editcell){this.editcell.visiblerowindex=j;if(!this.editcell.editing){if(!i){this.editcell.editing=true}this.editcell.columntype=f.columntype;this.editcell.defaultvalue=l;if(f.defaultvalue!=undefined){this.editcell.defaultvalue=f.defaultvalue}this.editcell.init=true;if(f.columntype!="checkbox"&&this.editmode!="selectedrow"){var h=this.getrowdata(n);this._raiseEvent(17,{rowindex:n,row:h,datafield:f.datafield,value:this.editcell.value,columntype:f.columntype})}a.data(document.body,"jqxgrid.edit",this.element.id);if(!i){var b=this.getrowvisibleindex(n);if(g!==false){this.ensurecellvisible(b,f.datafield)}if(c!==false){this._renderrows(this.virtualsizeinfo)}}if(this.editcell){this.editcell.init=false;return true}}}}else{if(!this.editcell){return}this.editcell.editor=null;this.editcell.editing=false;if(c!==false){this._renderrows(this.virtualsizeinfo)}this.editcell=null}},getScrollTop:function(){if(this._py){return pageYOffset}this._py=typeof pageYOffset!="undefined";if(this._py){return pageYOffset}else{var c=document.body;var b=document.documentElement;b=(b.clientHeight)?b:c;return b.scrollTop}},getScrollLeft:function(){if(typeof pageXOffset!="undefined"){return pageXOffset}else{var c=document.body;var b=document.documentElement;b=(b.clientHeight)?b:c;return b.scrollLeft}},endcelledit:function(h,n,j,e,o){if(h==undefined||n==undefined){if(this.editcell){h=this.editcell.row;n=this.editcell.column}if(j==undefined){j=true}}if(!this.editcell){return}var d=this.getcolumn(n);var u=this;if(u.editmode==="selectedrow"){this.endrowedit(h,j);return}var t=function(){if(o!=false){if(u.isTouchDevice()){return}if(!u.isNestedGrid){var v=u.getScrollTop();var x=u.getScrollLeft();try{u.element.focus();u.content.focus();if(v!=u.getScrollTop()){window.scrollTo(x,v)}setTimeout(function(){u.element.focus();u.content.focus();if(v!=u.getScrollTop()){window.scrollTo(x,v)}},10)}catch(w){}}}};if(d.columntype=="checkbox"||d.columntype=="button"){if(this.editcell){this.editcell.editor=null;this.editcell.editing=false;this.editcell=null}return true}var i=this._geteditorvalue(d);var g=function(w){w._hidecelleditor();if(d.cellendedit){d.cellendedit(h,n,d.columntype,w.editcell.value,i)}w.editchar=null;if(d.displayfield!=d.datafield){var v=w.getcellvalue(w.editcell.row,d.displayfield);var x=w.editcell.value;oldvalue={value:x,label:v}}else{oldvalue=w.editcell.value}var y=w.getrowdata(h);w._raiseEvent(18,{rowindex:h,row:y,datafield:n,displayfield:d.displayfield,oldvalue:i,value:i,columntype:d.columntype});w.editcell.editor=null;w.editcell.editing=false;w.editcell=null;if(e||e==undefined){w._renderrows(w.virtualsizeinfo)}t();if(!w.enablebrowserselection){w.host.addClass("jqx-disableselect");w.content.addClass("jqx-disableselect")}};if(j){g(this);return false}if(this.validationpopup){this.validationpopup.hide();this.validationpopuparrow.hide()}if(d.cellvaluechanging){var b=d.cellvaluechanging(h,n,d.columntype,this.editcell.value,i);if(b!=undefined){i=b}}if(d.validation){var c=this.getcell(h,n);try{var p=d.validation(c,i);var l=this.gridlocalization.validationstring;if(p.message!=undefined){l=p.message}var m=typeof p=="boolean"?p:p.result;if(!m){if(p.showmessage==undefined||p.showmessage==true){this._showvalidationpopup(h,n,l)}this.editcell.validated=false;return false}}catch(r){this._showvalidationpopup(h,n,this.gridlocalization.validationstring);this.editcell.validated=false;return false}}if(d.displayfield!=d.datafield){var k=this.getcellvalue(this.editcell.row,d.displayfield);var q=this.editcell.value;oldvalue={value:q,label:k}}else{oldvalue=this.editcell.value}var f=this.getrowdata(h);if(d.cellendedit){var s=d.cellendedit(h,n,d.columntype,this.editcell.value,i);if(s==false){this._raiseEvent(18,{rowindex:h,row:f,datafield:n,displayfield:d.displayfield,oldvalue:oldvalue,value:oldvalue,columntype:d.columntype});g(this);return false}}this._raiseEvent(18,{rowindex:h,row:f,datafield:n,displayfield:d.displayfield,oldvalue:oldvalue,value:i,columntype:d.columntype});this._hidecelleditor(false);if(this.editcell!=undefined){this.editcell.editor=null;this.editcell.editing=false}this.editcell=null;this.editchar=null;this.setcellvalue(h,n,i,e);if(!this.enablebrowserselection){this.host.addClass("jqx-disableselect");this.content.addClass("jqx-disableselect")}if(!a.jqx.browser.msie){t()}a.data(document.body,"jqxgrid.edit","");return true},beginrowedit:function(e){var d=this;var f=-1;d._oldselectedrow=e;this._cellscache=new Array();var c=false;if(this.editmode!="selectedrow"){c=true}if(c){var b=this.editmode;this.editmode="selectedrow"}a.each(this.columns.records,function(h,j){if(d.editable&&this.editable){var g=d.getcell(e,this.datafield);d.begincelledit(e,this.datafield,null,false,false);var i=d.getrowdata(e);d._raiseEvent(17,{rowindex:e,row:i,datafield:this.datafield,value:g.value,columntype:this.columntype})}});if(d.editcell){d.editcell.init=true}this._renderrows(this.virtualsizeinfo);if(c){this.editmode=b}},endrowedit:function(k,o){var D=this;if(!this.editcell){return false}if(this.editcell.editor==undefined){return false}var C=function(){if(focus!=false){if(D.isTouchDevice()){return}if(!D.isNestedGrid){var i=D.getScrollTop();var F=D.getScrollLeft();try{D.element.focus();D.content.focus();if(i!=D.getScrollTop()){window.scrollTo(F,i)}setTimeout(function(){D.element.focus();D.content.focus();if(i!=D.getScrollTop()){window.scrollTo(F,i)}},10)}catch(E){}}}};var p=false;if(this.editmode!="selectedrow"){p=true}if(p){var v=this.editmode;this.editmode="selectedrow"}var h=false;var d={};if(this.validationpopup){this.validationpopup.hide();this.validationpopuparrow.hide()}for(var B=0;B"):k;d.css("top",a(n).parent().position().top);if(this.oldhscroll){d.css("left",-i+parseInt(a(n).position().left))}else{d.css("left",parseInt(a(n).position().left))}if(G.pinned){d.css("left",i+parseInt(a(n).position().left))}if(k==undefined){d.prependTo(this.table);d[0].id="dropdownlisteditor"+this.element.id+D;var f=this.source._source?true:false;var x=null;if(!f){x=new a.jqx.dataAdapter(this.source,{autoBind:false,uniqueDataFields:[A],async:false,autoSort:true,autoSortField:A})}else{var p={localdata:this.source.records,datatype:this.source.datatype,async:false};x=new a.jqx.dataAdapter(p,{autoBind:false,async:false,uniqueDataFields:[A],autoSort:true,autoSortField:A})}var u=!G.createeditor?true:false;d.jqxDropDownList({enableBrowserBoundsDetection:true,keyboardSelection:false,source:x,rtl:this.rtl,autoDropDownHeight:u,theme:this.theme,width:g.width()-2,height:g.height()-2,displayMember:A,valueMember:E});this.editors["dropdownlist_"+D]=d;if(G.createeditor){G.createeditor(q,I,d)}}if(G._requirewidthupdate){d.jqxDropDownList({width:g.width()-2})}var c=d.jqxDropDownList("listBox").visibleItems;if(!G.createeditor){if(c.length<8){d.jqxDropDownList("autoDropDownHeight",true)}else{d.jqxDropDownList("autoDropDownHeight",false)}}var I=this.getcellvalue(q,A);var z=this.findRecordIndex(I,A,c);if(K){if(I!=""){d.jqxDropDownList("selectIndex",z,true)}else{d.jqxDropDownList("selectIndex",-1)}}if(!this.editcell){return}if(this.editcell.defaultvalue!=undefined){d.jqxDropDownList("selectIndex",this.editcell.defaultvalue,true)}if(w){d.jqxDropDownList("focus")}}break;case"combobox":if(this.host.jqxComboBox){n.innerHTML="";var D=a.trim(G.datafield).split(" ").join("");var A=a.trim(G.displayfield).split(" ").join("");if(D.indexOf(".")!=-1){D=D.replace(".","")}if(A.indexOf(".")!=-1){A=A.replace(".","")}var r=this.editors["combobox_"+D];d=r==undefined?a("
"):r;d.css("top",a(n).parent().position().top);if(this.oldhscroll){d.css("left",-i+parseInt(a(n).position().left))}else{d.css("left",parseInt(a(n).position().left))}if(G.pinned){d.css("left",i+parseInt(a(n).position().left))}if(r==undefined){d.prependTo(this.table);d[0].id="comboboxeditor"+this.element.id+D;var f=this.source._source?true:false;var x=null;if(!f){x=new a.jqx.dataAdapter(this.source,{autoBind:false,uniqueDataFields:[A],async:false,autoSort:true,autoSortField:A})}else{var p={localdata:this.source.records,datatype:this.source.datatype,async:false};x=new a.jqx.dataAdapter(p,{autoBind:false,async:false,uniqueDataFields:[A],autoSort:true,autoSortField:A})}var u=!G.createeditor?true:false;d.jqxComboBox({enableBrowserBoundsDetection:true,keyboardSelection:false,source:x,rtl:this.rtl,autoDropDownHeight:u,theme:this.theme,width:g.width()-2,height:g.height()-2,displayMember:A,valueMember:E});d.removeAttr("tabindex");d.find("div").removeAttr("tabindex");this.editors["combobox_"+D]=d;if(G.createeditor){G.createeditor(q,I,d)}}if(G._requirewidthupdate){d.jqxComboBox({width:g.width()-2})}var c=d.jqxComboBox("listBox").visibleItems;if(!G.createeditor){if(c.length<8){d.jqxComboBox("autoDropDownHeight",true)}else{d.jqxComboBox("autoDropDownHeight",false)}}var I=this.getcellvalue(q,A);var z=this.findRecordIndex(I,A,c);if(K){if(I!=""){d.jqxComboBox("selectIndex",z,true);d.jqxComboBox("val",I)}else{d.jqxComboBox("selectIndex",-1);d.jqxComboBox("val",I)}}if(!this.editcell){return}if(this.editcell.defaultvalue!=undefined){d.jqxComboBox("selectIndex",this.editcell.defaultvalue,true)}if(this.editchar&&this.editchar.length>0){d.jqxComboBox("input").val(this.editchar)}if(w){setTimeout(function(){l(d.jqxComboBox("input"));if(d){d.jqxComboBox("_setSelection",0,0);if(s.editchar){d.jqxComboBox("_setSelection",1,1);s.editchar=null}else{if(d.jqxComboBox("input")){var P=d.jqxComboBox("input").val();d.jqxComboBox("_setSelection",0,P.length)}}}},10)}}break;case"datetimeinput":if(this.host.jqxDateTimeInput){n.innerHTML="";var D=a.trim(G.datafield).split(" ").join("");if(D.indexOf(".")!=-1){D=D.replace(".","")}var v=this.editors["datetimeinput_"+D];d=v==undefined?a("
"):v;d.show();d.css("top",a(n).parent().position().top);if(this.oldhscroll){d.css("left",-i+parseInt(a(n).position().left))}else{d.css("left",parseInt(a(n).position().left))}if(G.pinned){d.css("left",i+parseInt(a(n).position().left))}if(v==undefined){d.prependTo(this.table);d[0].id="datetimeeditor"+this.element.id+D;var F={calendar:this.gridlocalization};d.jqxDateTimeInput({enableBrowserBoundsDetection:true,localization:F,_editor:true,theme:this.theme,rtl:this.rtl,width:g.width(),height:g.height(),formatString:G.cellsformat});this.editors["datetimeinput_"+D]=d;if(G.createeditor){G.createeditor(q,I,d)}}if(G._requirewidthupdate){d.jqxDateTimeInput({width:g.width()-2})}if(K){if(I!=""&&I!=null){var L=new Date(I);if(L=="Invalid Date"){if(this.source.getvaluebytype){L=this.source.getvaluebytype(I,{name:G.datafield,type:"date"})}}d.jqxDateTimeInput("setDate",L)}else{d.jqxDateTimeInput("setDate",null)}if(this.editcell.defaultvalue!=undefined){d.jqxDateTimeInput("setDate",this.editcell.defaultvalue)}}if(w){setTimeout(function(){l(d.jqxDateTimeInput("dateTimeInput"))},10)}}break;case"numberinput":if(this.host.jqxNumberInput){n.innerHTML="";var D=a.trim(G.datafield).split(" ").join("");if(D.indexOf(".")!=-1){D=D.replace(".","")}var N=this.editors["numberinput_"+D];d=N==undefined?a("
"):N;d.show();d.css("top",a(n).parent().position().top);if(this.oldhscroll){d.css("left",-i+parseInt(a(n).position().left))}else{d.css("left",parseInt(a(n).position().left))}if(G.pinned){d.css("left",i+parseInt(a(n).position().left))}if(N==undefined){d.prependTo(this.table);d[0].id="numbereditor"+this.element.id+D;var m="";var y="left";var M=2;if(G.cellsformat){if(G.cellsformat.indexOf("c")!=-1){m=this.gridlocalization.currencysymbol;y=this.gridlocalization.currencysymbolposition;if(y=="before"){y="left"}else{y="right"}if(G.cellsformat.length>1){M=parseInt(G.cellsformat.substring(1),10)}}else{if(G.cellsformat.indexOf("p")!=-1){m=this.gridlocalization.percentsymbol;y="right";if(G.cellsformat.length>1){M=parseInt(G.cellsformat.substring(1),10)}}}}else{M=0}d.jqxNumberInput({decimalSeparator:this.gridlocalization.decimalseparator,decimalDigits:M,inputMode:"simple",theme:this.theme,rtl:this.rtl,width:g.width()-1,height:g.height()-1,spinButtons:true,symbol:m,symbolPosition:y});this.editors["numberinput_"+D]=d;if(G.createeditor){G.createeditor(q,I,d)}}if(G._requirewidthupdate){d.jqxNumberInput({width:g.width()-2})}if(K){if(I!=""&&I!=null){var O=I;d.jqxNumberInput("setDecimal",O)}else{d.jqxNumberInput("setDecimal",0)}if(this.editcell.defaultvalue!=undefined){d.jqxNumberInput("setDecimal",this.editcell.defaultvalue)}if(this.editchar&&this.editchar.length>0){var o=parseInt(this.editchar);if(!isNaN(o)){d.jqxNumberInput("setDecimal",o)}}if(w){setTimeout(function(){l(d.jqxNumberInput("numberInput"));d.jqxNumberInput("_setSelectionStart",0);if(s.editchar){if(G.cellsformat.length>0){d.jqxNumberInput("_setSelectionStart",2)}else{d.jqxNumberInput("_setSelectionStart",1)}s.editchar=null}else{var P=d.jqxNumberInput("spinButtons");if(P){var Q=d.jqxNumberInput("numberInput").val();s._setSelection(d.jqxNumberInput("numberInput")[0],Q.length,Q.length)}else{var Q=d.jqxNumberInput("numberInput").val();s._setSelection(d.jqxNumberInput("numberInput")[0],0,Q.length)}}d.jqxNumberInput("selectAll")},10)}}}break;case"custom":n.innerHTML="";var D=a.trim(G.datafield).split(" ").join("");if(D.indexOf(".")!=-1){D=D.replace(".","")}var B=this.editors["customeditor_"+D+"_"+q];d=B==undefined?a("
"):B;d.show();d.css("top",a(n).parent().position().top);if(this.oldhscroll){d.css("left",-i+parseInt(a(n).position().left))}else{d.css("left",parseInt(a(n).position().left))}if(G.pinned){d.css("left",i+parseInt(a(n).position().left))}if(B==undefined){d.prependTo(this.table);d[0].id="customeditor"+this.element.id+D+"_"+q;this.editors["customeditor_"+D+"_"+q]=d;var b=g.width()-1;var e=g.height()-1;d.width(b);d.height(e);if(G.createeditor){G.createeditor(q,I,d,C,b,e,this.editchar)}}if(G._requirewidthupdate){d.width(g.width()-2)}break;case"template":n.innerHTML="";var D=a.trim(G.datafield).split(" ").join("");if(D.indexOf(".")!=-1){D=D.replace(".","")}var h=this.editors["templateeditor_"+D];d=h==undefined?a("
"):h;d.show();d.css("top",a(n).parent().position().top);if(this.oldhscroll){d.css("left",-i+parseInt(a(n).position().left))}else{d.css("left",parseInt(a(n).position().left))}if(G.pinned){d.css("left",i+parseInt(a(n).position().left))}if(h==undefined){d.prependTo(this.table);d[0].id="templateeditor"+this.element.id+D;this.editors["templateeditor_"+D]=d;var b=g.width()-1;var e=g.height()-1;d.width(b);d.height(e);if(G.createeditor){G.createeditor(q,I,d,C,b,e,this.editchar)}}if(G._requirewidthupdate){d.width(g.width()-2)}break;case"textbox":default:n.innerHTML="";d=this.editors["textboxeditor_"+G.datafield]||a("");d[0].id="textboxeditor"+this.element.id+G.datafield;d.appendTo(g);if(this.rtl){d.css("direction","rtl")}if(K||d[0].className==""){d.addClass(this.toThemeProperty("jqx-input"));d.addClass(this.toThemeProperty("jqx-widget-content"));if(this.editchar&&this.editchar.length>0){d.val(this.editchar)}else{if(G.cellsformat!=""){I=this.getcelltext(q,E)}if(I==undefined){I=""}d.val(I)}if(this.editcell.defaultvalue!=undefined){d.val(this.editcell.defaultvalue)}d.width(g.width()+1);d.height(g.height()+1);if(G.createeditor){G.createeditor(q,I,d)}if(G.cellsformat!=""){if(G.cellsformat.indexOf("p")!=-1||G.cellsformat.indexOf("c")!=-1||G.cellsformat.indexOf("n")!=-1||G.cellsformat.indexOf("f")!=-1){if(!this.editors["textboxeditor_"+G.datafield]){d.keydown(function(Q){var W=Q.charCode?Q.charCode:Q.keyCode?Q.keyCode:0;var T=String.fromCharCode(W);var U=parseInt(T);if(isNaN(U)){return true}if(s._selection(d).length>0){return true}var S="";var R=d.val();if(G.cellsformat.length>1){var V=parseInt(G.cellsformat.substring(1));if(isNaN(V)){V=0}}else{var V=0}if(V>0){if(R.indexOf(s.gridlocalization.decimalseparator)!=-1){if(s._selection(d).start>R.indexOf(s.gridlocalization.decimalseparator)){return true}}}for(var X=0;X=11){return false}})}}}}this.editors["textboxeditor_"+G.datafield]=d;if(K){if(w){setTimeout(function(){l(d);if(s.editchar){s._setSelection(d[0],1,1);s.editchar=null}else{s._setSelection(d[0],0,d.val().length)}},25)}}break}if(d){d[0].style.zIndex=1+n.style.zIndex;if(a.jqx.browser.msie&&a.jqx.browser.version<8){d[0].style.zIndex=1+this.columns.records.length+n.style.zIndex}d.css("display","block");this.editcell.editor=d;if(!this.editcell[E]){this.editcell[E]={};this.editcell[E].editor=d}else{this.editcell[E].editor=d}}if(K){if(G.initeditor){G.initeditor(q,I,d,C,this.editchar)}}if(s.isTouchDevice()){return}setTimeout(function(){if(s.content){s.content[0].scrollTop=0;s.content[0].scrollLeft=0}if(s.gridcontent){s.gridcontent[0].scrollLeft=0;s.gridcontent[0].scrollTop=0}},10)},_setSelection:function(d,g,b){try{if("selectionStart" in d){d.setSelectionRange(g,b)}else{var c=d.createTextRange();c.collapse(true);c.moveEnd("character",b);c.moveStart("character",g);c.select()}}catch(e){var f=e}},_hideeditors:function(){if(this.editcells!=null){var b=this;for(var c in this.editcells){b.editcell=b.editcells[c];b._hidecelleditor()}}},_hidecelleditor:function(b){if(!this.editcell){return}if(this.editmode==="selectedrow"){for(var c=0;c-1){o=o.replace(this.gridlocalization.currencysymbol,"")}var m=function(w,u,v){var s=w;if(u==v){return w}var t=s.indexOf(u);while(t!=-1){s=s.replace(u,v);t=s.indexOf(u)}return s};var k=o;k=new Number(k);if(!isNaN(k)){return k}o=m(o,this.gridlocalization.thousandsseparator,"");o=o.replace(this.gridlocalization.decimalseparator,".");if(o.indexOf(this.gridlocalization.percentsymbol)>-1){o=o.replace(this.gridlocalization.percentsymbol,"")}var d="";for(var r=0;r");var r=a("
");g.html(h);r.addClass(this.toThemeProperty("jqx-grid-validation-arrow-up"));g.addClass(this.toThemeProperty("jqx-grid-validation"));g.addClass(this.toThemeProperty("jqx-rc-all"));g.prependTo(this.table);r.prependTo(this.table);var l=this.hScrollInstance;var n=l.value;var d=parseInt(n);var b=this.getcolumn(j).uielement;var p=null;for(var o=0;o=this._gettableheight()){r.removeClass(this.toThemeProperty("jqx-grid-validation-arrow-up"));r.addClass(this.toThemeProperty("jqx-grid-validation-arrow-down"));k=parseInt(c.position().top)-this.rowsheight-5;if(k<0){k=0;this.validationpopuparrow.removeClass(this.toThemeProperty("jqx-grid-validation-arrow-down"));q=true}g.css("top",k+"px");r.css("top",k+g.outerHeight()-9)}var t=-d+parseInt(a(b).position().left);r.css("left",d+t+30);var m=g.width();if(m+t>this.host.width()-20){var e=m+t-this.host.width()+40;t-=e}if(!q){g.css("left",d+t)}else{g.css("left",d+parseInt(a(b).position().left)-g.outerWidth())}g.show();r.show();if(!this.popups){this.popups=new Array()}this.popups[this.popups.length]={validation:g,validationrow:r}},_showvalidationpopup:function(p,e,q){var c=this.editcell;var k=this.editcell.editor;if(this.editmode=="selectedrow"){var c=this.editcell[e];if(c&&c.editor){k=c.editor;c.element=k}}if(!k){return}if(this.validationpopup&&a.jqx.isHidden(this.validationpopup)){if(this.validationpopup.remove){this.validationpopup.remove();this.validationpopuparrow.remove()}this.validationpopup=null;this.validationpopuparrow=null;if(e===undefined&&q===undefined&&this.editors&&this.editors.length===0){return}}if(!this.validationpopup){var n=a("
");var m=a("
");n.html(q);m.addClass(this.toThemeProperty("jqx-grid-validation-arrow-up"));n.addClass(this.toThemeProperty("jqx-grid-validation"));n.addClass(this.toThemeProperty("jqx-rc-all"));n.prependTo(this.table);m.prependTo(this.table);this.validationpopup=n;this.validationpopuparrow=m}else{this.validationpopup.html(q)}var h=this.hScrollInstance;var j=h.value;var g=parseInt(j);if(this.editmode=="selectedrow"){if(this.visiblerows&&this.visiblerows[this.editcell.visiblerowindex]){this.validationpopup.css("top",this.visiblerows[this.editcell.visiblerowindex].top+(this.rowsheight+5)+"px")}else{this.validationpopup.css("top",parseInt(a(c.editor).position().top)+(this.rowsheight+5)+"px")}}else{this.validationpopup.css("top",parseInt(a(c.element).parent().position().top)+(this.rowsheight+5)+"px")}var b=parseInt(this.validationpopup.css("top"));this.validationpopuparrow.css("top",b-11);this.validationpopuparrow.removeClass();this.validationpopuparrow.addClass(this.toThemeProperty("jqx-grid-validation-arrow-up"));var o=this._gettableheight();var f=false;if(b>=o){this.validationpopuparrow.removeClass(this.toThemeProperty("jqx-grid-validation-arrow-up"));this.validationpopuparrow.addClass(this.toThemeProperty("jqx-grid-validation-arrow-down"));b=parseInt(a(c.element).parent().position().top)-this.rowsheight-5;if(this.editmode=="selectedrow"){if(this.visiblerows&&this.visiblerows[this.editcell.visiblerowindex]){b=this.visiblerows[this.editcell.visiblerowindex].top-this.rowsheight-5}else{b=parseInt(a(c.editor).position().top)-this.rowsheight-5}}if(b<0){b=0;this.validationpopuparrow.removeClass(this.toThemeProperty("jqx-grid-validation-arrow-down"));f=true}this.validationpopup.css("top",b+"px");this.validationpopuparrow.css("top",b+this.validationpopup.outerHeight()-9)}var l=-g+parseInt(a(c.element).position().left);this.validationpopuparrow.css("left",g+l+30);var d=this.validationpopup.width();if(d+l>this.host.width()-20){var i=d+l-this.host.width()+40;l-=i}if(!f){this.validationpopup.css("left",g+l)}else{this.validationpopup.css("left",g+parseInt(a(c.element).position().left)-this.validationpopup.outerWidth())}if(this.editcell.editor.css("display")=="none"){this.validationpopup.hide();this.validationpopuparrow.hide()}else{this.validationpopup.show();this.validationpopuparrow.show()}}})})(jqxBaseFramework);