日期:2014-05-16 浏览次数:20429 次
/** * easyloader - jQuery EasyUI * * Licensed under the GPL: * http://www.gnu.org/licenses/gpl.txt * * Copyright 2010 stworthy [ stworthy@gmail.com ] * */ (function(){ //将所有的插件,和插件资源和依赖文件放进modules对象中。 var modules = { draggable:{ js:'jquery.draggable.js' }, droppable:{ js:'jquery.droppable.js' }, resizable:{ js:'jquery.resizable.js' }, linkbutton:{ js:'jquery.linkbutton.js', css:'linkbutton.css' }, pagination:{ js:'jquery.pagination.js', css:'pagination.css', dependencies:['linkbutton'] }, datagrid:{ js:'jquery.datagrid.js', css:'datagrid.css', dependencies:['panel','resizable','linkbutton','pagination'] }, treegrid:{ js:'jquery.treegrid.js', css:'tree.css', dependencies:['datagrid'] }, panel: { js:'jquery.panel.js', css:'panel.css' }, window:{ js:'jquery.window.js', css:'window.css', dependencies:['resizable','draggable','panel'] }, dialog:{ js:'jquery.dialog.js', css:'dialog.css', dependencies:['linkbutton','window'] }, messager:{ js:'jquery.messager.js', css:'messager.css', dependencies:['linkbutton','window'] }, layout:{ js:'jquery.layout.js', css:'layout.css', dependencies:['resizable','panel'] }, form:{ js:'jquery.form.js' }, menu:{ js:'jquery.menu.js', css:'menu.css' }, tabs:{ js:'jquery.tabs.js', css:'tabs.css', dependencies:['panel','linkbutton'] }, splitbutton:{ js:'jquery.splitbutton.js', css:'splitbutton.css', dependencies:['linkbutton','menu'] }, menubutton:{ js:'jquery.menubutton.js', css:'menubutton.css', dependencies:['linkbutton','menu'] }, accordion:{ js:'jquery.accordion.js', css:'accordion.css', dependencies:['panel'] }, calendar:{ js:'jquery.calendar.js', css:'calendar.css' }, combo:{ js:'jquery.combo.js', css:'combo.css', dependencies:['panel','validatebox'] }, combobox:{ js:'jquery.combobox.js', css:'combobox.css', dependencies:['combo'] }, combotree:{ js:'jquery.combotree.js', dependencies:['combo','tree'] }, combogrid:{ js:'jquery.combogrid.js', dependencies:['combo','datagrid'] }, validatebox:{ js:'jquery.validatebox.js', css:'validatebox.css' }, numberbox:{ js:'jquery.numberbox.js', dependencies:['validatebox'] }, spinner:{ js:'jquery.spinner.js', css:'spinner.css', dependencies:['validatebox'] }, numberspinner:{ js:'jquery.numberspinner.js', dependencies:['spinner','numberbox'] }, timespinner:{ js:'jquery.timespinner.js', dependencies:['spinner'] }, tree:{ js:'jquery.tree.js', css:'tree.css', dependencies:['draggable','droppable'] }, datebox:{ js:'jquery.datebox.js', css:'datebox.css', dependencies:['calendar','validatebox'] }, parser:{ js:'jquery.parser.js' } }; //将国际化文件放入一个locales对象中 var locales = { 'af':'easyui-lang-af.js', 'bg':'easyui-lang-bg.js', 'ca':'easyui-lang-ca.js', 'cs':'easyui-lang-cs.js', 'da':'easyui-lang-da.js', 'de':'easyui-lang-de.js', 'en':'easyui-lang-en.js', 'fr':'easyui-lang-fr.js', 'nl':'easyui-lang-nl.js', 'zh_CN':'easyui-lang-zh_CN.js', 'zh_TW':'easyui-lang-zh_TW.js' }; //定义一个局部变量,做循环遍历时候,存放状态 var queues = {}; //加载js方法 function loadJs(url, callback){ //标志变量,js是否加载并执行 var done = false; var script = document.createElement('script');//创建script dom script.type = 'text/javascript'; script.language = 'javascript'; script.src = url; script.onload = script.