//支持IE/Firefox/Chrome三大浏览器, //除了firefox,一律当做IE来处理。因为目前在chrome上是基于Activex4Chrome插件才实现支持的 //区分浏览器(Firefox / IE) var ua = navigator.userAgent.toLowerCase(); var $isIE = (ua.indexOf("msie")>0) ? true : false; var $isFireFox = (ua.indexOf("firefox")>=0) ? true : false; //private: function bldStr(ctlType, id, para) { //!!!!组件版本号,升级后须修改!!!! var ctlver = '1.0.69.0'; //取得组件包的绝对路径(假设和dynaload.js部署在同一个目录) var SupcanPath="", arrScript = document.getElementsByTagName("script"); for(var i=0; i= 0) { SupcanPath = src.substring(0, index); if(SupcanPath.charAt(0) == '/') { src = location.href; index = src.indexOf('//'); if(index != -1) { index = src.indexOf('/', index+2); if(index != -1) src = src.substring(0, index); SupcanPath = src + SupcanPath; } } break; } } var typeid; //除了firefox,一律当做IE来处理。因为目前在chrome上是基于Activex4Chrome才实现支持的 if($isFireFox) typeid = 'type="application/supcan-plugin" Codebase="' +SupcanPath+ 'supcan.xpi"'; else typeid = 'CLASSID="clsid:619F1AC0-2644-40D3-9EB1-22F81C5FE097" Codebase="' +SupcanPath+ 'supcan2.cab#Version=1,0,0,3"'; //组件包URL var zipurl = SupcanPath + "BCV1.bin"; if(ctlType=="LuxForm") zipurl += "," +SupcanPath+ "LuxForm.bin"; else if(ctlType.indexOf("BCV4")>=0) zipurl += "," +SupcanPath+ "BCV4.bin"; var str = ''; str += ''; str += ''; str += ''; str += ''; str += ''; str += ''; return str; } //public: function insertTreeList(id, para) { document.write( bldStr("BCV1.TreeList",id, para) ) } function insertEdit(id, para) { document.write( bldStr("BCV1.Edit", id, para) ) } function insertReport(id, para) { document.write( bldStr("LuxForm", id, para) ) } function insertTree(id, para) { document.write( bldStr("BCV1.Tree", id, para) ) } function insertFreeForm(id, para) { document.write( bldStr("BCV1.FreeForm",id, para) ) } function insertChart(id, para) { document.write( bldStr("BCV1.Chart", id, para) ) } function insertUpload(id, para) { document.write( bldStr("BCV1.Upload", id, para) ) } function insertFormDesigner(id, para) { document.write( bldStr("BCV4.FormDesigner",id, para) ) } //必需的函数(控件会反向调用,用途:切换焦点) function focusIE(obj_or_id) { if($isIE==false) { document.activeElement.blur(); return; } try { if(typeof(obj_or_id)=='object') { if(document.activeElement != obj_or_id) obj_or_id.focus(); } else { if(document.activeElement.id == obj_or_id) return; var o = document.getElementById(obj_or_id); if(o != null) o.focus(); } } catch(e) { } } //为了动态加载 Ext.define('resources.supcan.dynaload',{});