Skip to content
Browse files

Merge pull request #273 from OlegKi/master

Add this in calls of $.unformat and $.unformat.date
  • Loading branch information...
2 parents 0f352c3 + c477260 commit f9a93ae367a82b85e961d842d1dd6a46f6405ebf @tonytomov committed
Showing with 5 additions and 5 deletions.
  1. +2 −2 js/grid.base.js
  2. +3 −3 js/grid.celledit.js
View
4 js/grid.base.js
@@ -2796,7 +2796,7 @@ $.jgrid.extend({
$(this.p.colModel).each(function(i){
nm = this.name;
if( data[nm] !== undefined) {
- lcdata[nm] = this.formatter && typeof(this.formatter) === 'string' && this.formatter == 'date' ? $.unformat.date(data[nm],this) : data[nm];
+ lcdata[nm] = this.formatter && typeof(this.formatter) === 'string' && this.formatter == 'date' ? $.unformat.date.call(t,data[nm],this) : data[nm];
vl = t.formatter( rowid, data[nm], i, data, 'edit');
title = this.title ? {"title":$.jgrid.stripHtml(vl)} : {};
if(t.p.treeGrid===true && nm == t.p.ExpandColumn) {
@@ -3303,7 +3303,7 @@ $.jgrid.extend({
while(i<ln){
if($($t.rows[i]).hasClass('jqgrow')) {
try {
- val = $.unformat($($t.rows[i].cells[pos]),{rowId:$t.rows[i].id, colModel:$t.p.colModel[pos]},pos);
+ val = $.unformat.call($t,$($t.rows[i].cells[pos]),{rowId:$t.rows[i].id, colModel:$t.p.colModel[pos]},pos);
} catch (e) {
val = $.jgrid.htmlDecode($t.rows[i].cells[pos].innerHTML);
}
View
6 js/grid.celledit.js
@@ -62,7 +62,7 @@ $.jgrid.extend({
$(cc).addClass("edit-cell ui-state-highlight");
$($t.rows[iRow]).addClass("selected-row ui-state-hover");
try {
- tmp = $.unformat(cc,{rowId: $t.rows[iRow].id, colModel:cm},iCol);
+ tmp = $.unformat.call($t,cc,{rowId: $t.rows[iRow].id, colModel:cm},iCol);
} catch (_) {
tmp = ( cm.edittype && cm.edittype == 'textarea' ) ? $(cc).text() : $(cc).html();
}
@@ -467,14 +467,14 @@ $.jgrid.extend({
if (mthd=='dirty') {
if ($(this).hasClass('dirty-cell')) {
try {
- res[nm] = $.unformat(this,{rowId:$t.rows[j].id, colModel:$t.p.colModel[i]},i);
+ res[nm] = $.unformat.call($t,this,{rowId:$t.rows[j].id, colModel:$t.p.colModel[i]},i);
} catch (e){
res[nm] = $.jgrid.htmlDecode($(this).html());
}
}
} else {
try {
- res[nm] = $.unformat(this,{rowId:$t.rows[j].id,colModel:$t.p.colModel[i]},i);
+ res[nm] = $.unformat.call($t,this,{rowId:$t.rows[j].id,colModel:$t.p.colModel[i]},i);
} catch (e) {
res[nm] = $.jgrid.htmlDecode($(this).html());
}

0 comments on commit f9a93ae

Please sign in to comment.
Something went wrong with that request. Please try again.