You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Plugins/dataRender/hyperLink.min.mjs

2 lines
768 B
JavaScript

/*! © Lokesh Babu - datatables.net/license */
import jQuery from"jquery";import DataTable from"datatables.net";let $=jQuery;DataTable.render.hyperLink=function(n,u,i,o){function e(e,r){return"number"==typeof e||"string"==typeof e&&parseInt(e)?e:r}n=n||"Click Here",u=u||"newTab",i=e(i,600),o=e(o,400);return function(e,r,t){if("display"!==r)return e;var a=e;try{switch(a=new URL(e),u){case"newTab":return'<a title="'+a+'" href="'+a+'" target="_blank">'+n+"</a>";case"popup":return'<a title="'+a+'" href="'+a+'" target="popup" rel="noopener noreferrer" onclick="window.open(\''+a+"', '"+n+"', 'width="+i+",height="+o+"'); return false;\">"+n+"</a>";default:return'<a title="'+a+'" href="'+a+'" target="_blank">'+n+"</a>"}}catch(e){return a}}};export default DataTable;