Skip to content

Commit

Permalink
Add this in calls of unformatter and formatter
Browse files Browse the repository at this point in the history
Signed-off-by: Dr. Oleg Kiriljuk <oleg.kiriljuk@ok-soft-gmbh.com>
  • Loading branch information
OlegKi committed Mar 21, 2012
1 parent 0f352c3 commit c477260
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions js/grid.base.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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);
}
Expand Down
6 changes: 3 additions & 3 deletions js/grid.celledit.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down Expand Up @@ -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());
}
Expand Down

0 comments on commit c477260

Please sign in to comment.