Skip to content

Commit

Permalink
Using call in formatter.
Browse files Browse the repository at this point in the history
  • Loading branch information
tonytomov committed Mar 14, 2012
1 parent 9aabae7 commit 41579d1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions js/jquery.fmatter.js
Expand Up @@ -55,9 +55,9 @@
var v=cellval;
opts = $.extend({}, $.jgrid.formatter, opts);

if ($.fn.fmatter[formatType]){
v = $.fn.fmatter[formatType](cellval, opts, rwd, act);
}
try {
v = $.fn.fmatter[formatType].call(this, cellval, opts, rwd, act);
} catch(fe){}
return v;
};
$.fmatter.util = {
Expand Down Expand Up @@ -495,7 +495,7 @@
re = /([\.\*\_\'\(\)\{\}\+\?\\])/g,
unformatFunc = options.colModel.unformat||($.fn.fmatter[formatType] && $.fn.fmatter[formatType].unformat);
if(typeof unformatFunc !== 'undefined' && $.isFunction(unformatFunc) ) {
ret = unformatFunc($(cellval).text(), options, cellval);
ret = unformatFunc.call(this, $(cellval).text(), options, cellval);
} else if(!$.fmatter.isUndefined(formatType) && $.fmatter.isString(formatType) ) {
var opts = $.jgrid.formatter || {}, stripTag;
switch(formatType) {
Expand Down

0 comments on commit 41579d1

Please sign in to comment.