Update src with change from #579
parent
6c36a57cbc
commit
1c6f059eb4
@ -1,2 +1,2 @@
|
||||
/*! © Drijkoningen Dirk - datatables.net/license */
|
||||
!function(n){var i,o;"function"==typeof define&&define.amd?define(["jquery","datatables.net"],function(e){return n(e,window,document)}):"object"==typeof exports?(i=require("jquery"),o=function(e,t){t.fn.dataTable||require("datatables.net")(e,t)},"undefined"==typeof window?module.exports=function(e,t){return e=e||window,t=t||i(e),o(e,t),n(t,0,e.document)}:(o(window,i),module.exports=n(i,window,window.document))):n(jQuery,window,document)}(function(e,t,n,i){"use strict";e=e.fn.dataTable;return e.render.percentBar=function(e,t,n,i,o,r,d){r=r||0;var u="border:2px "+(d=d||"ridge")+" "+(n=n||"#BCBCBC")+";line-height:12px;font-size:14px;color:"+(t=t||"#000")+";background:"+(o=o||"#E6E6E6")+";position:relative;",a="height:12px;line-height:12px;text-align:center;background-color:"+(i=i||"#5FD868")+";padding:auto 6px;";return"round"==(e=e||"square")&&(u+="border-radius:5px;",a+="border-top-left-radius:4px;border-bottom-left-radius:4px;"),function(e,t,n){var i=parseFloat(e.toString().replace(/\s%|%/g,"")).toFixed(r);return 100<i&&(i=100),"display"!==t?i:"number"!=typeof e&&"string"!=typeof e?e:'<div style="max-width:100px;height:12px;margin:0 auto;"><div style="'+u+'"><div style="'+a+"width:"+i+'%;"></div><div style="width:100%;text-align:center;position:absolute;left:0;top:0;">'+i+"%</div></div></div>"}},e});
|
||||
!function(r){var n,o;"function"==typeof define&&define.amd?define(["jquery","datatables.net"],function(e){return r(e,window,document)}):"object"==typeof exports?(n=require("jquery"),o=function(e,t){t.fn.dataTable||require("datatables.net")(e,t)},"undefined"==typeof window?module.exports=function(e,t){return e=e||window,t=t||n(e),o(e,t),r(t,0,e.document)}:(o(window,n),module.exports=r(n,window,window.document))):r(jQuery,window,document)}(function(e,t,r,n){"use strict";e=e.fn.dataTable;return e.render.percentBar=function(a,u,l,f,p,s,c,x){a=a||"square",u=u||"#000",l=l||"#BCBCBC",f=f||"#5FD868",p=p||"#E6E6E6",s=s||0,c=c||"ridge";return function(e,t,r){var n,o,i=parseFloat(e.toString().replace(/\s%|%/g,"")).toFixed(s);if(100<i&&(i=100),"display"!==t)return i;if("number"!=typeof e&&"string"!=typeof e)return e;if(x){for(var d=0;d<x.length;d++)if(i>=x[d].min&&i<=x[d].max){o=x[d].barColor||f,n=x[d].backgroundColor||p,x[d].textColor||u;break}}else n=p,o=f,0;t="border:2px "+c+" "+l+";line-height:12px;font-size:14px;color:"+u+";background:"+n+";position:relative;",e="height:12px;line-height:12px;text-align:center;background-color:"+o+";padding:auto 6px;";return"round"==a&&(t+="border-radius:5px;",e+="border-top-left-radius:4px;border-bottom-left-radius:4px;"),'<div style="max-width:100px;height:12px;margin:0 auto;"><div style="'+t+'"><div style="'+e+"width:"+i+'%;"></div><div style="width:100%;text-align:center;position:absolute;left:0;top:0;">'+i+"%</div></div></div>"}},e});
|
@ -1,2 +1,2 @@
|
||||
/*! © Drijkoningen Dirk - datatables.net/license */
|
||||
import jQuery from"jquery";import DataTable from"datatables.net";let $=jQuery;DataTable.render.percentBar=function(t,e,r,i,a,o,d){o=o||0;var n="border:2px "+(d=d||"ridge")+" "+(r=r||"#BCBCBC")+";line-height:12px;font-size:14px;color:"+(e=e||"#000")+";background:"+(a=a||"#E6E6E6")+";position:relative;",p="height:12px;line-height:12px;text-align:center;background-color:"+(i=i||"#5FD868")+";padding:auto 6px;";return"round"==(t=t||"square")&&(n+="border-radius:5px;",p+="border-top-left-radius:4px;border-bottom-left-radius:4px;"),function(t,e,r){var i=parseFloat(t.toString().replace(/\s%|%/g,"")).toFixed(o);return 100<i&&(i=100),"display"!==e?i:"number"!=typeof t&&"string"!=typeof t?t:'<div style="max-width:100px;height:12px;margin:0 auto;"><div style="'+n+'"><div style="'+p+"width:"+i+'%;"></div><div style="width:100%;text-align:center;position:absolute;left:0;top:0;">'+i+"%</div></div></div>"}};export default DataTable;
|
||||
import jQuery from"jquery";import DataTable from"datatables.net";let $=jQuery;DataTable.render.percentBar=function(d,l,p,u,s,x,b,f){d=d||"square",l=l||"#000",p=p||"#BCBCBC",u=u||"#5FD868",s=s||"#E6E6E6",x=x||0,b=b||"ridge";return function(e,t,r){var i,o,a=parseFloat(e.toString().replace(/\s%|%/g,"")).toFixed(x);if(100<a&&(a=100),"display"!==t)return a;if("number"!=typeof e&&"string"!=typeof e)return e;if(f){for(var n=0;n<f.length;n++)if(a>=f[n].min&&a<=f[n].max){o=f[n].barColor||u,i=f[n].backgroundColor||s,f[n].textColor||l;break}}else i=s,o=u,0;t="border:2px "+b+" "+p+";line-height:12px;font-size:14px;color:"+l+";background:"+i+";position:relative;",e="height:12px;line-height:12px;text-align:center;background-color:"+o+";padding:auto 6px;";return"round"==d&&(t+="border-radius:5px;",e+="border-top-left-radius:4px;border-bottom-left-radius:4px;"),'<div style="max-width:100px;height:12px;margin:0 auto;"><div style="'+t+'"><div style="'+e+"width:"+a+'%;"></div><div style="width:100%;text-align:center;position:absolute;left:0;top:0;">'+a+"%</div></div></div>"}};export default DataTable;
|
Loading…
Reference in new issue