M3 Integration fixes
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
// Set new default font family and font color to mimic Bootstrap's default styling
|
||||
Chart.defaults.global.defaultFontFamily = '-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif';
|
||||
Chart.defaults.global.defaultFontColor = '#292b2c';
|
||||
|
||||
// Area Chart Example
|
||||
let ctx = document.getElementById("myAreaChart");
|
||||
if (ctx) {
|
||||
new Chart(ctx, {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["Mar 1", "Mar 2", "Mar 3", "Mar 4", "Mar 5", "Mar 6", "Mar 7", "Mar 8", "Mar 9", "Mar 10", "Mar 11", "Mar 12", "Mar 13"],
|
||||
datasets: [{
|
||||
label: "Sessions",
|
||||
lineTension: 0.3,
|
||||
backgroundColor: "rgba(2,117,216,0.2)",
|
||||
borderColor: "rgba(2,117,216,1)",
|
||||
pointRadius: 5,
|
||||
pointBackgroundColor: "rgba(2,117,216,1)",
|
||||
pointBorderColor: "rgba(255,255,255,0.8)",
|
||||
pointHoverRadius: 5,
|
||||
pointHoverBackgroundColor: "rgba(2,117,216,1)",
|
||||
pointHitRadius: 50,
|
||||
pointBorderWidth: 2,
|
||||
data: [10000, 30162, 26263, 18394, 18287, 28682, 31274, 33259, 25849, 24159, 32651, 31984, 38451],
|
||||
}],
|
||||
},
|
||||
options: {
|
||||
scales: {
|
||||
xAxes: [{
|
||||
time: {
|
||||
unit: 'date'
|
||||
},
|
||||
gridLines: {
|
||||
display: false
|
||||
},
|
||||
ticks: {
|
||||
maxTicksLimit: 7
|
||||
}
|
||||
}],
|
||||
yAxes: [{
|
||||
ticks: {
|
||||
min: 0,
|
||||
max: 40000,
|
||||
maxTicksLimit: 5
|
||||
},
|
||||
gridLines: {
|
||||
color: "rgba(0, 0, 0, .125)",
|
||||
}
|
||||
}],
|
||||
},
|
||||
legend: {
|
||||
display: false
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
// Set new default font family and font color to mimic Bootstrap's default styling
|
||||
Chart.defaults.global.defaultFontFamily = '-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif';
|
||||
Chart.defaults.global.defaultFontColor = '#292b2c';
|
||||
|
||||
// Bar Chart Example
|
||||
let ctx = document.getElementById("myBarChart");
|
||||
if (ctx) {
|
||||
new Chart(ctx, {
|
||||
type: 'bar',
|
||||
data: {
|
||||
labels: ["January", "February", "March", "April", "May", "June"],
|
||||
datasets: [{
|
||||
label: "Revenue",
|
||||
backgroundColor: "rgba(2,117,216,1)",
|
||||
borderColor: "rgba(2,117,216,1)",
|
||||
data: [4215, 5312, 6251, 7841, 9821, 14984],
|
||||
}],
|
||||
},
|
||||
options: {
|
||||
scales: {
|
||||
xAxes: [{
|
||||
time: {
|
||||
unit: 'month'
|
||||
},
|
||||
gridLines: {
|
||||
display: false
|
||||
},
|
||||
ticks: {
|
||||
maxTicksLimit: 6
|
||||
}
|
||||
}],
|
||||
yAxes: [{
|
||||
ticks: {
|
||||
min: 0,
|
||||
max: 15000,
|
||||
maxTicksLimit: 5
|
||||
},
|
||||
gridLines: {
|
||||
display: true
|
||||
}
|
||||
}],
|
||||
},
|
||||
legend: {
|
||||
display: false
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
// Set new default font family and font color to mimic Bootstrap's default styling
|
||||
Chart.defaults.global.defaultFontFamily = '-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif';
|
||||
Chart.defaults.global.defaultFontColor = '#292b2c';
|
||||
|
||||
// Pie Chart Example
|
||||
let ctx = document.getElementById("myPieChart");
|
||||
if (ctx){
|
||||
new Chart(ctx, {
|
||||
type: 'pie',
|
||||
data: {
|
||||
labels: ["Blue", "Red", "Yellow", "Green"],
|
||||
datasets: [{
|
||||
data: [12.21, 15.58, 11.25, 8.32],
|
||||
backgroundColor: ['#007bff', '#dc3545', '#ffc107', '#28a745'],
|
||||
}],
|
||||
},
|
||||
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
// Call the dataTables jQuery plugin
|
||||
$(document).ready(function() {
|
||||
$('#dataTable').DataTable();
|
||||
});
|
||||
+1
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 6.0 KiB |
@@ -0,0 +1,26 @@
|
||||
/* M3 integration inside the Core WMS shell. Core owns the global sidebar, topbar, typography and appearance. */
|
||||
.m3-core-page{font-family:inherit;color:inherit;width:100%;max-width:1600px;margin:0 auto;padding:1.5rem}
|
||||
.m3-core-header{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;margin-bottom:1.5rem;padding:1.5rem;border:1px solid rgb(228 228 231);border-radius:1.5rem;background:linear-gradient(135deg,#020617,#0f172a 55%,#172554);color:#fff}
|
||||
.m3-core-eyebrow{margin:0 0 .5rem;font-size:.75rem;font-weight:700;letter-spacing:.28em;color:#bfdbfe}
|
||||
.m3-core-title{margin:0;font:inherit;font-size:2rem;font-weight:650;line-height:1.15;letter-spacing:-.025em;color:#fff}
|
||||
.m3-core-context{margin:.5rem 0 0;color:#dbeafe}
|
||||
.m3-core-actions{display:flex;gap:.5rem;flex-wrap:wrap}
|
||||
.m3-core-breadcrumb{margin-bottom:1rem;color:rgb(82 82 91);font-size:.875rem}
|
||||
.m3-core-content{color:rgb(24 24 27)}
|
||||
.m3-core-content .container-fluid{padding:0}
|
||||
.m3-core-content .panel,.m3-core-content .card,.m3-core-content .well{border:1px solid rgb(228 228 231);border-radius:1rem;background:#fff;box-shadow:0 1px 2px rgb(0 0 0/.04);overflow:hidden}
|
||||
.m3-core-content .panel-heading,.m3-core-content .card-header{background:rgb(250 250 250);border-bottom:1px solid rgb(228 228 231);padding:.9rem 1rem;font-weight:600}
|
||||
.m3-core-content table{color:inherit;background:transparent}
|
||||
.m3-core-content .table>tbody>tr>td,.m3-core-content .table>tbody>tr>th,.m3-core-content .table>tfoot>tr>td,.m3-core-content .table>tfoot>tr>th,.m3-core-content .table>thead>tr>td,.m3-core-content .table>thead>tr>th{border-color:rgb(228 228 231)}
|
||||
.m3-core-content input,.m3-core-content select,.m3-core-content textarea,.m3-core-content button{font-family:inherit}
|
||||
.m3-core-alert{padding:1rem;border:1px solid rgb(254 202 202);border-radius:1rem;background:rgb(254 242 242);color:rgb(153 27 27);font-weight:600}
|
||||
html.dark .m3-core-header{border-color:rgb(63 63 70);background:linear-gradient(135deg,#020617,#0f172a 55%,#172554)}
|
||||
html.dark .m3-core-breadcrumb{color:rgb(161 161 170)}
|
||||
html.dark .m3-core-content{color:rgb(244 244 245)}
|
||||
html.dark .m3-core-content .panel,html.dark .m3-core-content .card,html.dark .m3-core-content .well{border-color:rgb(63 63 70);background:rgb(24 24 27)}
|
||||
html.dark .m3-core-content .panel-heading,html.dark .m3-core-content .card-header{background:rgb(39 39 42);border-color:rgb(63 63 70);color:rgb(244 244 245)}
|
||||
html.dark .m3-core-content .table{color:rgb(244 244 245)}
|
||||
html.dark .m3-core-content .table>tbody>tr>td,html.dark .m3-core-content .table>tbody>tr>th,html.dark .m3-core-content .table>tfoot>tr>td,html.dark .m3-core-content .table>tfoot>tr>th,html.dark .m3-core-content .table>thead>tr>td,html.dark .m3-core-content .table>thead>tr>th{border-color:rgb(63 63 70)}
|
||||
html.dark .m3-core-content input,html.dark .m3-core-content select,html.dark .m3-core-content textarea{background:rgb(39 39 42);border-color:rgb(82 82 91);color:rgb(244 244 245)}
|
||||
html.dark .m3-core-alert{border-color:rgb(127 29 29);background:rgb(69 10 10);color:rgb(254 202 202)}
|
||||
@media(max-width:768px){.m3-core-page{padding:1rem}.m3-core-header{padding:1.25rem}.m3-core-title{font-size:1.6rem}}
|
||||
@@ -0,0 +1,2 @@
|
||||
.morris-hover{overflow: auto; height: 300px;position:absolute;z-index:1000}.morris-hover.morris-default-style{border-radius:10px;padding:6px;color:#666;background:rgba(255,255,255,0.8);border:solid 2px rgba(230,230,230,0.8);font-family:sans-serif;font-size:12px;text-align:center}.morris-hover.morris-default-style .morris-hover-row-label{font-weight:bold;margin:0.25em 0}
|
||||
.morris-hover.morris-default-style .morris-hover-point{white-space:nowrap;margin:0.1em 0}
|
||||
+11820
File diff suppressed because it is too large
Load Diff
+1216
File diff suppressed because it is too large
Load Diff
+17
@@ -0,0 +1,17 @@
|
||||
/*!
|
||||
Bootstrap integration for DataTables' Editor
|
||||
©2015 SpryMedia Ltd - datatables.net/license
|
||||
*/
|
||||
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(a,b,c){a instanceof String&&(a=String(a));for(var e=a.length,d=0;d<e;d++){var f=a[d];if(b.call(c,f,d,a))return{i:d,v:f}}return{i:-1,v:void 0}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.ISOLATE_POLYFILLS=!1;
|
||||
$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(a==Array.prototype||a==Object.prototype)return a;a[b]=c.value;return a};$jscomp.getGlobal=function(a){a=["object"==typeof globalThis&&globalThis,a,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var b=0;b<a.length;++b){var c=a[b];if(c&&c.Math==Math)return c}throw Error("Cannot find global object");};$jscomp.global=$jscomp.getGlobal(this);
|
||||
$jscomp.IS_SYMBOL_NATIVE="function"===typeof Symbol&&"symbol"===typeof Symbol("x");$jscomp.TRUST_ES6_POLYFILLS=!$jscomp.ISOLATE_POLYFILLS||$jscomp.IS_SYMBOL_NATIVE;$jscomp.polyfills={};$jscomp.propertyToPolyfillSymbol={};$jscomp.POLYFILL_PREFIX="$jscp$";var $jscomp$lookupPolyfilledValue=function(a,b){var c=$jscomp.propertyToPolyfillSymbol[b];if(null==c)return a[b];c=a[c];return void 0!==c?c:a[b]};
|
||||
$jscomp.polyfill=function(a,b,c,e){b&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(a,b,c,e):$jscomp.polyfillUnisolated(a,b,c,e))};$jscomp.polyfillUnisolated=function(a,b,c,e){c=$jscomp.global;a=a.split(".");for(e=0;e<a.length-1;e++){var d=a[e];if(!(d in c))return;c=c[d]}a=a[a.length-1];e=c[a];b=b(e);b!=e&&null!=b&&$jscomp.defineProperty(c,a,{configurable:!0,writable:!0,value:b})};
|
||||
$jscomp.polyfillIsolated=function(a,b,c,e){var d=a.split(".");a=1===d.length;e=d[0];e=!a&&e in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var f=0;f<d.length-1;f++){var k=d[f];if(!(k in e))return;e=e[k]}d=d[d.length-1];c=$jscomp.IS_SYMBOL_NATIVE&&"es6"===c?e[d]:null;b=b(c);null!=b&&(a?$jscomp.defineProperty($jscomp.polyfills,d,{configurable:!0,writable:!0,value:b}):b!==c&&($jscomp.propertyToPolyfillSymbol[d]=$jscomp.IS_SYMBOL_NATIVE?$jscomp.global.Symbol(d):$jscomp.POLYFILL_PREFIX+d,d=
|
||||
$jscomp.propertyToPolyfillSymbol[d],$jscomp.defineProperty(e,d,{configurable:!0,writable:!0,value:b})))};$jscomp.polyfill("Array.prototype.find",function(a){return a?a:function(b,c){return $jscomp.findInternal(this,b,c).v}},"es6","es3");
|
||||
(function(a){"function"===typeof define&&define.amd?define(["jquery","datatables.net-bs5","datatables.net-editor"],function(b){return a(b,window,document)}):"object"===typeof exports?module.exports=function(b,c){b||(b=window);c&&c.fn.dataTable||(c=require("datatables.net-bs5")(b,c).$);c.fn.dataTable.Editor||require("datatables.net-editor")(b,c);return a(c,b,b.document)}:a(jQuery,window,document)})(function(a,b,c,e){var d=a.fn.dataTable;d.Editor.defaults.display="bootstrap";e=d.Editor.defaults.i18n;
|
||||
e.create.title='<h5 class="modal-title">'+e.create.title+"</h5>";e.edit.title='<h5 class="modal-title">'+e.edit.title+"</h5>";e.remove.title='<h5 class="modal-title">'+e.remove.title+"</h5>";a.extend(!0,a.fn.dataTable.Editor.classes,{header:{wrapper:"DTE_Header modal-header"},body:{wrapper:"DTE_Body modal-body"},footer:{wrapper:"DTE_Footer modal-footer"},form:{tag:"form-horizontal",button:"btn",buttonInternal:"btn btn-outline-secondary"},field:{wrapper:"DTE_Field form-group row",label:"col-lg-4 col-form-label",
|
||||
input:"col-lg-8",error:"error is-invalid","msg-labelInfo":"form-text text-secondary small","msg-info":"form-text text-secondary small","msg-message":"form-text text-secondary small","msg-error":"form-text text-danger small",multiValue:"card multi-value",multiInfo:"small",multiRestore:"card multi-restore"}});a.extend(!0,d.ext.buttons,{create:{formButtons:{className:"btn-primary"}},edit:{formButtons:{className:"btn-primary"}},remove:{formButtons:{className:"btn-danger"}}});d.Editor.fieldTypes.datatable.tableClass=
|
||||
"table";var f=!1,k=!1,l=a('<div class="modal fade DTED"><div class="modal-dialog modal-dialog-scrollable modal-dialog-centered"></div></div>'),v=a('<button class="btn-close"></div>'),n,u=b.bootstrap;d.Editor.bootstrap=function(g){u=g};d.Editor.display.bootstrap=a.extend(!0,{},d.Editor.models.displayController,{init:function(g){g.on("displayOrder.dtebs",function(h,m,q,r){a.each(g.s.fields,function(p,t){a("input:not([type=checkbox]):not([type=radio]), select, textarea",t.node()).addClass("form-control");
|
||||
a("input[type=checkbox], input[type=radio]",t.node()).addClass("form-check-input");a("select",t.node()).addClass("form-select")})});return d.Editor.display.bootstrap},open:function(g,h,m){n||(n=new u.Modal(l[0],{backdrop:"static",keyboard:!1}));a(h).addClass("modal-content");a(h).find("div.DTE_Field_Type_datatable div.dt-buttons").removeClass("btn-group").addClass("btn-group-vertical");v.attr("title",g.i18n.close).off("click.dte-bs5").on("click.dte-bs5",function(){g.close("icon")}).appendTo(a("div.modal-header",
|
||||
h));var q=!1;a(c).off("mousedown.dte-bs5").on("mousedown.dte-bs5","div.modal",function(p){q=a(p.target).hasClass("modal")&&f?!0:!1});a(c).off("click.dte-bs5").on("click.dte-bs5","div.modal",function(p){a(p.target).hasClass("modal")&&q&&g.background()});var r=l.find("div.modal-dialog");r.children().detach();r.append(h);f?m&&m():(f=!0,k=!1,a(l).one("shown.bs.modal",function(){g.s.setFocus&&g.s.setFocus.focus();k=!0;m&&m()}).one("hidden",function(){f=!1}).appendTo("body"),n.show())},close:function(g,
|
||||
h){if(f)if(k)a(l).one("hidden.bs.modal",function(){a(this).detach()}),n.hide(),k=f=!1,h&&h();else a(l).one("shown.bs.modal",function(){d.Editor.display.bootstrap.close(g,h)});else h&&h()},node:function(g){return l[0]}});return d.Editor});
|
||||
+1
File diff suppressed because one or more lines are too long
@@ -0,0 +1,9 @@
|
||||
$('#datatablesSimple').DataTable( {
|
||||
|
||||
});
|
||||
|
||||
$('#datatablesSimple2').DataTable( {
|
||||
responsive: true,
|
||||
"pageLength": 50,
|
||||
"aaSorting": []
|
||||
});
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
/*!
|
||||
Bootstrap integration for DataTables' Editor
|
||||
©2015 SpryMedia Ltd - datatables.net/license
|
||||
*/
|
||||
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(a,b,c){a instanceof String&&(a=String(a));for(var e=a.length,d=0;d<e;d++){var f=a[d];if(b.call(c,f,d,a))return{i:d,v:f}}return{i:-1,v:void 0}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.ISOLATE_POLYFILLS=!1;
|
||||
$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(a==Array.prototype||a==Object.prototype)return a;a[b]=c.value;return a};$jscomp.getGlobal=function(a){a=["object"==typeof globalThis&&globalThis,a,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var b=0;b<a.length;++b){var c=a[b];if(c&&c.Math==Math)return c}throw Error("Cannot find global object");};$jscomp.global=$jscomp.getGlobal(this);
|
||||
$jscomp.IS_SYMBOL_NATIVE="function"===typeof Symbol&&"symbol"===typeof Symbol("x");$jscomp.TRUST_ES6_POLYFILLS=!$jscomp.ISOLATE_POLYFILLS||$jscomp.IS_SYMBOL_NATIVE;$jscomp.polyfills={};$jscomp.propertyToPolyfillSymbol={};$jscomp.POLYFILL_PREFIX="$jscp$";var $jscomp$lookupPolyfilledValue=function(a,b){var c=$jscomp.propertyToPolyfillSymbol[b];if(null==c)return a[b];c=a[c];return void 0!==c?c:a[b]};
|
||||
$jscomp.polyfill=function(a,b,c,e){b&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(a,b,c,e):$jscomp.polyfillUnisolated(a,b,c,e))};$jscomp.polyfillUnisolated=function(a,b,c,e){c=$jscomp.global;a=a.split(".");for(e=0;e<a.length-1;e++){var d=a[e];if(!(d in c))return;c=c[d]}a=a[a.length-1];e=c[a];b=b(e);b!=e&&null!=b&&$jscomp.defineProperty(c,a,{configurable:!0,writable:!0,value:b})};
|
||||
$jscomp.polyfillIsolated=function(a,b,c,e){var d=a.split(".");a=1===d.length;e=d[0];e=!a&&e in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var f=0;f<d.length-1;f++){var k=d[f];if(!(k in e))return;e=e[k]}d=d[d.length-1];c=$jscomp.IS_SYMBOL_NATIVE&&"es6"===c?e[d]:null;b=b(c);null!=b&&(a?$jscomp.defineProperty($jscomp.polyfills,d,{configurable:!0,writable:!0,value:b}):b!==c&&($jscomp.propertyToPolyfillSymbol[d]=$jscomp.IS_SYMBOL_NATIVE?$jscomp.global.Symbol(d):$jscomp.POLYFILL_PREFIX+d,d=
|
||||
$jscomp.propertyToPolyfillSymbol[d],$jscomp.defineProperty(e,d,{configurable:!0,writable:!0,value:b})))};$jscomp.polyfill("Array.prototype.find",function(a){return a?a:function(b,c){return $jscomp.findInternal(this,b,c).v}},"es6","es3");
|
||||
(function(a){"function"===typeof define&&define.amd?define(["jquery","datatables.net-bs5","datatables.net-editor"],function(b){return a(b,window,document)}):"object"===typeof exports?module.exports=function(b,c){b||(b=window);c&&c.fn.dataTable||(c=require("datatables.net-bs5")(b,c).$);c.fn.dataTable.Editor||require("datatables.net-editor")(b,c);return a(c,b,b.document)}:a(jQuery,window,document)})(function(a,b,c,e){var d=a.fn.dataTable;d.Editor.defaults.display="bootstrap";e=d.Editor.defaults.i18n;
|
||||
e.create.title='<h5 class="modal-title">'+e.create.title+"</h5>";e.edit.title='<h5 class="modal-title">'+e.edit.title+"</h5>";e.remove.title='<h5 class="modal-title">'+e.remove.title+"</h5>";a.extend(!0,a.fn.dataTable.Editor.classes,{header:{wrapper:"DTE_Header modal-header"},body:{wrapper:"DTE_Body modal-body"},footer:{wrapper:"DTE_Footer modal-footer"},form:{tag:"form-horizontal",button:"btn",buttonInternal:"btn btn-outline-secondary"},field:{wrapper:"DTE_Field form-group row",label:"col-lg-4 col-form-label",
|
||||
input:"col-lg-8",error:"error is-invalid","msg-labelInfo":"form-text text-secondary small","msg-info":"form-text text-secondary small","msg-message":"form-text text-secondary small","msg-error":"form-text text-danger small",multiValue:"card multi-value",multiInfo:"small",multiRestore:"card multi-restore"}});a.extend(!0,d.ext.buttons,{create:{formButtons:{className:"btn-primary"}},edit:{formButtons:{className:"btn-primary"}},remove:{formButtons:{className:"btn-danger"}}});d.Editor.fieldTypes.datatable.tableClass=
|
||||
"table";var f=!1,k=!1,l=a('<div class="modal fade DTED"><div class="modal-dialog modal-dialog-scrollable modal-dialog-centered"></div></div>'),v=a('<button class="btn-close"></div>'),n,u=b.bootstrap;d.Editor.bootstrap=function(g){u=g};d.Editor.display.bootstrap=a.extend(!0,{},d.Editor.models.displayController,{init:function(g){g.on("displayOrder.dtebs",function(h,m,q,r){a.each(g.s.fields,function(p,t){a("input:not([type=checkbox]):not([type=radio]), select, textarea",t.node()).addClass("form-control");
|
||||
a("input[type=checkbox], input[type=radio]",t.node()).addClass("form-check-input");a("select",t.node()).addClass("form-select")})});return d.Editor.display.bootstrap},open:function(g,h,m){n||(n=new u.Modal(l[0],{backdrop:"static",keyboard:!1}));a(h).addClass("modal-content");a(h).find("div.DTE_Field_Type_datatable div.dt-buttons").removeClass("btn-group").addClass("btn-group-vertical");v.attr("title",g.i18n.close).off("click.dte-bs5").on("click.dte-bs5",function(){g.close("icon")}).appendTo(a("div.modal-header",
|
||||
h));var q=!1;a(c).off("mousedown.dte-bs5").on("mousedown.dte-bs5","div.modal",function(p){q=a(p.target).hasClass("modal")&&f?!0:!1});a(c).off("click.dte-bs5").on("click.dte-bs5","div.modal",function(p){a(p.target).hasClass("modal")&&q&&g.background()});var r=l.find("div.modal-dialog");r.children().detach();r.append(h);f?m&&m():(f=!0,k=!1,a(l).one("shown.bs.modal",function(){g.s.setFocus&&g.s.setFocus.focus();k=!0;m&&m()}).one("hidden",function(){f=!1}).appendTo("body"),n.show())},close:function(g,
|
||||
h){if(f)if(k)a(l).one("hidden.bs.modal",function(){a(this).detach()}),n.hide(),k=f=!1,h&&h();else a(l).one("shown.bs.modal",function(){d.Editor.display.bootstrap.close(g,h)});else h&&h()},node:function(g){return l[0]}});return d.Editor});
|
||||
+5
File diff suppressed because one or more lines are too long
+7
File diff suppressed because one or more lines are too long
+8438
File diff suppressed because it is too large
Load Diff
+145
@@ -0,0 +1,145 @@
|
||||
/*!
|
||||
* Start Bootstrap - SB Admin v7.0.3 (https://startbootstrap.com/template/sb-admin)
|
||||
* Copyright 2013-2021 Start Bootstrap
|
||||
* Licensed under MIT (https://github.com/StartBootstrap/startbootstrap-sb-admin/blob/master/LICENSE)
|
||||
*/
|
||||
//
|
||||
// Scripts
|
||||
//
|
||||
|
||||
|
||||
$(function() {
|
||||
let copyButtonTrans = 'Copy'
|
||||
let csvButtonTrans = 'CSV'
|
||||
let excelButtonTrans = 'Excel'
|
||||
let pdfButtonTrans = 'PDF'
|
||||
// let printButtonTrans = '{{ trans('global.datatables.print') }}'
|
||||
let colvisButtonTrans = 'Columns'
|
||||
let selectAllButtonTrans = 'Select All'
|
||||
let selectNoneButtonTrans = 'Deselect All'
|
||||
|
||||
let languages = {
|
||||
'en': 'https://cdn.datatables.net/plug-ins/1.10.19/i18n/English.json'
|
||||
};
|
||||
|
||||
$.extend(true, $.fn.dataTable.Buttons.defaults.dom.button, {
|
||||
className: 'btn'
|
||||
})
|
||||
$.extend(true, $.fn.dataTable.defaults, {
|
||||
language: {
|
||||
url: languages['{{ app()->getLocale() }}']
|
||||
},
|
||||
columnDefs: [
|
||||
{
|
||||
orderable: false,
|
||||
className: 'select-checkbox',
|
||||
targets: 0
|
||||
},
|
||||
{
|
||||
orderable: false,
|
||||
searchable: false,
|
||||
targets: -1
|
||||
}
|
||||
],
|
||||
select: {
|
||||
style: 'multi+shift',
|
||||
selector: 'td:first-child'
|
||||
},
|
||||
order: [],
|
||||
scrollX: true,
|
||||
pageLength: 100,
|
||||
dom: "<'row'<'col-sm-12 col-md-2'l><'col-sm-12 col-md-7'B><'col-sm-12 col-md-3'f>>" +
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>",
|
||||
// dom: '<lBfr>tip<"actions">',
|
||||
buttons: [{
|
||||
extend: 'selectAll',
|
||||
className: 'btn-primary mr-1',
|
||||
text: selectAllButtonTrans,
|
||||
exportOptions: {
|
||||
columns: ':visible'
|
||||
},
|
||||
action: function(e, dt) {
|
||||
e.preventDefault()
|
||||
dt.rows().deselect();
|
||||
dt.rows({
|
||||
search: 'applied'
|
||||
}).select();
|
||||
}
|
||||
},
|
||||
{
|
||||
extend: 'selectNone',
|
||||
className: 'btn-primary mr-1',
|
||||
text: selectNoneButtonTrans,
|
||||
exportOptions: {
|
||||
columns: ':visible'
|
||||
}
|
||||
},
|
||||
{
|
||||
extend: 'copy',
|
||||
className: 'btn-default mr-1',
|
||||
text: copyButtonTrans,
|
||||
exportOptions: {
|
||||
columns: ':visible'
|
||||
}
|
||||
},
|
||||
{
|
||||
extend: 'csv',
|
||||
className: 'btn-default mr-1',
|
||||
text: csvButtonTrans,
|
||||
exportOptions: {
|
||||
columns: ':visible'
|
||||
}
|
||||
},
|
||||
{
|
||||
extend: 'excelHtml5',
|
||||
className: 'btn-default mr-1',
|
||||
text: excelButtonTrans,
|
||||
exportOptions: {
|
||||
columns: ':visible',
|
||||
stripHtml: true
|
||||
},
|
||||
customize: function(xlsx,btnObj, tableInst) {
|
||||
let sheet = xlsx.xl.worksheets['sheet1.xml'];
|
||||
let cellIndexes = tableInst.cells(".bg-danger").indexes();
|
||||
for (let i = 0; i < cellIndexes.length; i++) {
|
||||
let cellIndex = cellIndexes[i];
|
||||
let tblRow = cellIndex['row']+3; // adjusted from 0 indexed
|
||||
let tblCol = cellIndex['column']; // adjusted from 0 indexed
|
||||
let xlCol = numberToLetters(tblCol);
|
||||
let excelCell = xlCol+tblRow;
|
||||
$('row c[r='+excelCell+']', sheet).attr( 's', '11' );
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
extend: 'pdfHtml5',
|
||||
className: 'btn-default mr-1',
|
||||
text: pdfButtonTrans,
|
||||
exportOptions: {
|
||||
columns: ':visible'
|
||||
}
|
||||
},
|
||||
// {
|
||||
// extend: 'print',
|
||||
// className: 'btn-default',
|
||||
// text: printButtonTrans,
|
||||
// exportOptions: {
|
||||
// columns: ':visible'
|
||||
// }
|
||||
// },
|
||||
{
|
||||
extend: 'colvis',
|
||||
className: 'btn-default mr-1',
|
||||
text: colvisButtonTrans,
|
||||
exportOptions: {
|
||||
columns: ':visible'
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
$.fn.dataTable.ext.classes.sPageButton = '';
|
||||
});
|
||||
|
||||
// console.log("Scripts");
|
||||
Reference in New Issue
Block a user