// @require p5Utils__format // @require variables: // if ('undefined' === typeof UNIQ_HASH) throw "Missing UNIQ_HASH"; // $this->_htmlID var p5UI_TableAjax_generateFunctionNode = function(funObj, rowPK, props) { var defaultsProps = { ico: true, label: false }; var props = jQuery.extend({}, defaultsProps, props); var funcNode = $(''); if ('href' in funObj) funcNode.attr('href', p5Utils__format(funObj.href, [rowPK])); if (props.ico) { if ('ico' in funObj) funcNode.append(''); } if ('onclick' in funObj) funcNode.attr('onclick', p5Utils__format(funObj.onclick, [rowPK])); if ('title' in funObj) funcNode.attr('title', funObj.title); if ('target' in funObj) funcNode.attr('target', funObj.target); if (props.label) { if ('label' in funObj) { funcNode.append(' ' + funObj.label); } else if ('title' in funObj) { funcNode.append(' ' + funObj.title); } } return funcNode; }; global['p5UI_TableAjax_generateFunctionNode'] = p5UI_TableAjax_generateFunctionNode