73 lines
2.4 KiB
JavaScript
73 lines
2.4 KiB
JavaScript
/**
|
|
* @Author: zhangtq 2452618307@qq.com
|
|
* @Date: 2024-11-18 13:33:30
|
|
* @LastEditors: zhangtq 2452618307@qq.com
|
|
* @LastEditTime: 2024-11-18 13:34:43
|
|
* @FilePath: static/js/qx/utility/include.js
|
|
* @Description: 这是默认设置,可以在设置》工具》File Description中进行配置
|
|
*/
|
|
/**
|
|
* This file includes the required ext-all js and css files based upon "theme" and "rtl"
|
|
* url parameters. It first searches for these parameters on the page url, and if they
|
|
* are not found there, it looks for them on the script tag src query string.
|
|
* For example, to include the neptune flavor of ext from an index page in a subdirectory
|
|
* of extjs/examples/:
|
|
* <script type="text/javascript" src="../../examples/shared/include-ext.js?theme=neptune"></script>
|
|
*/
|
|
(function() {
|
|
// load css
|
|
var theme = 'metro';
|
|
var css_array = new Array();
|
|
var t= new Date().getTime();
|
|
|
|
// load cu js
|
|
var js_array = new Array();
|
|
|
|
var scriptObjects = document.getElementsByTagName("script");
|
|
|
|
for(var i = 0;i < scriptObjects.length;i++)
|
|
{
|
|
var s = scriptObjects[i];
|
|
|
|
if(s.src && s.src.match(/include\.js(\?.*)?$/)){
|
|
|
|
var path = s.src.replace(/js\/include\.js(\?.*)?$/,'');
|
|
var type = s.src.match(/\?type=([a-z,]*)/);
|
|
{
|
|
js_array =[
|
|
'../../static/js/h5/qx/utility/json2.js',
|
|
'../../static/js/h5/qx/utility/easyui/jquery.min.js',
|
|
'../../static/js/h5/qx/utility/easyui/jquery.easyui.min.js',
|
|
'../../static/js/h5/qx/utility/easyui/jquery.xml2json.js',
|
|
'../../static/js/h5/qx/utility/easyui/locale/easyui-lang-zh_CN.js',
|
|
'../../static/js/h5/qx/utility/jquery.fullscreen-min.js'
|
|
];
|
|
|
|
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
|
|
css_array = css_array.concat([
|
|
"../../static/js/h5/qx/utility/easyui/themes/"+theme+"/easyui.css",
|
|
"../../static/js/h5/qx/utility/easyui/themes/icon.css",
|
|
"../../static/js/h5/qx/utility/easyui/themes/color.css"
|
|
]);
|
|
|
|
for(var j = 0;j < css_array.length;j++)
|
|
{
|
|
document.write('<link rel="stylesheet" type="text/css" href="'+css_array[j]+'?t='+t+'" />');
|
|
};
|
|
|
|
for(var j = 0;j < js_array.length;j++)
|
|
{
|
|
if(js_array[j].indexOf("?") > 0){
|
|
document.write('<script type="text/javascript" src="'+js_array[j]+'&t='+t+'"></script>');
|
|
}else{
|
|
document.write('<script type="text/javascript" src="'+js_array[j]+'?t='+t+'"></script>');
|
|
}
|
|
};
|
|
|
|
})();
|