167 lines
4.2 KiB
JavaScript
167 lines
4.2 KiB
JavaScript
$(function () {
|
|
var jsonCss = [
|
|
{
|
|
"id": "vendorsbundle",
|
|
"rel": "stylesheet",
|
|
"media": "screen, print",
|
|
"href": "../css/vendors.bundle.css",
|
|
"sizes": "",
|
|
"type": ""
|
|
},
|
|
{
|
|
"id": "appbundle",
|
|
"rel": "stylesheet",
|
|
"media": "screen, print",
|
|
"href": "../css/app.bundle.css",
|
|
"sizes": "",
|
|
"type": ""
|
|
},
|
|
{
|
|
"id": "mytheme",
|
|
"rel": "stylesheet",
|
|
"media": "screen, print",
|
|
"href": "../css/themes/cust-theme-14.css",
|
|
"sizes": "",
|
|
"type": ""
|
|
},
|
|
{
|
|
"id": "myskin",
|
|
"rel": "stylesheet",
|
|
"media": "screen, print",
|
|
"href": "../css/skins/skin-master.css",
|
|
"sizes": "",
|
|
"type": ""
|
|
},
|
|
{
|
|
"id": "",
|
|
"rel": "apple-touch-icon",
|
|
"media": "",
|
|
"href": "../img/favicon/apple-touch-icon.png",
|
|
"sizes": "180x180",
|
|
"type": ""
|
|
},
|
|
{
|
|
"id": "",
|
|
"rel": "icon",
|
|
"media": "",
|
|
"href": "../img/favicon/favicon-32x32.png",
|
|
"sizes": "32x32",
|
|
"type": "image/png"
|
|
},
|
|
{
|
|
"id": "",
|
|
"rel": "mask-icon",
|
|
"media": "",
|
|
"href": "../img/favicon/safari-pinned-tab.svg",
|
|
"sizes": "32x32",
|
|
"type": "image/png"
|
|
},
|
|
{
|
|
"id": "",
|
|
"rel": "stylesheet",
|
|
"media": "screen, print",
|
|
"href": "../css/datagrid/datatables/datatables.bundle.css",
|
|
"sizes": "",
|
|
"type": ""
|
|
},
|
|
{
|
|
"id": "",
|
|
"rel": "stylesheet",
|
|
"media": "screen, print",
|
|
"href": "../css/notifications/sweetalert2/sweetalert2.bundle.css",
|
|
"sizes": "",
|
|
"type": ""
|
|
},
|
|
{
|
|
"id": "",
|
|
"rel": "stylesheet",
|
|
"media": "screen, print",
|
|
"href": "../css/notifications/toastr/toastr.css",
|
|
"sizes": "",
|
|
"type": ""
|
|
},
|
|
{
|
|
"id": "",
|
|
"rel": "stylesheet",
|
|
"media": "",
|
|
"href": "../css/site.css",
|
|
"sizes": "",
|
|
"type": ""
|
|
}
|
|
];
|
|
|
|
var head = document.getElementsByTagName('head')[0];
|
|
|
|
$.each(jsonCss, function( index, val ) {
|
|
var link = document.createElement('link');
|
|
link.href = val.href;
|
|
if(val.rel != ""){
|
|
link.rel = val.rel;
|
|
}
|
|
|
|
if(val.id != ""){
|
|
link.id = val.id;
|
|
}
|
|
|
|
if(val.media != ""){
|
|
link.media = val.media;
|
|
}
|
|
|
|
if(val.sizes != ""){
|
|
link.sizes = val.sizes;
|
|
}
|
|
|
|
if(val.type != ""){
|
|
link.type = val.type;
|
|
}
|
|
|
|
head.append(link);
|
|
});
|
|
|
|
|
|
var jsonJs = [
|
|
{
|
|
"src": "../js/vendors.bundle.js"
|
|
},
|
|
{
|
|
"src": "../js/app.bundle.js"
|
|
},
|
|
{
|
|
"src": "../lib/jquery-validation/dist/jquery.validate.js"
|
|
},
|
|
{
|
|
"src": "../lib/jquery-validation/dist/additional-methods.min.js"
|
|
},
|
|
{
|
|
"src": "../lib/jquery-validation/dist/localization/messages_zh_TW.js"
|
|
},
|
|
{
|
|
"src": "../js/datagrid/datatables/datatables.bundle.js"
|
|
},
|
|
{
|
|
"src": "../js/notifications/sweetalert2/sweetalert2.bundle.js"
|
|
},
|
|
{
|
|
"src": "../js/notifications/toastr/toastr.js"
|
|
},
|
|
{
|
|
"src": "../js/toast.js"
|
|
},
|
|
{
|
|
"src": "../js/site.js?123"
|
|
},
|
|
{
|
|
"src": "https://cdn.jsdelivr.net/npm/echarts@5.2.1/dist/echarts.min.js"
|
|
}
|
|
];
|
|
|
|
var body = document.getElementsByTagName('body')[0];
|
|
|
|
$.each(jsonJs, function( index, val ) {
|
|
var script = document.createElement('script');
|
|
script.src = val.src;
|
|
|
|
body.append(script);
|
|
});
|
|
|
|
}); |