日期:2014-05-16 浏览次数:20369 次
FlowManagerView:[ __ctxPath+'/js/flow/ProTypeForm.js', __ctxPath+'/js/flow/ProDefinitionForm.js', __ctxPath+'/js/flow/ProDefinitionView.js', __ctxPath+'/js/flow/FlowManagerView.js', __ctxPath+'/js/flow/ProDefinitionDetail.js', __ctxPath+'/js/flow/ProcessRunStart.js', __ctxPath+'/js/flow/ProDefinitionSetting.js', __ctxPath+'/js/flow/MyTaskView.js', __ctxPath+'/js/flow/ProcessNextForm.js', __ctxPath+'/js/flow/FormDesignWindow.js', __ctxPath+'/js/flow/FormEditorWindow.js', __ctxPath+'/js/flowDesign/FlowDesignerWindow.js' ]
function $ImportJs(viewName,callback,params) { var b = jsCache[viewName]; if (b != null) { var view =newView(viewName,params); callback.call(this, view); } else { var jsArr = eval('App.importJs.' + viewName); if(jsArr==undefined || jsArr.length==0){ try{ var view = newView(viewName,params); callback.call(this, view); }catch(e){ } return ; } ScriptMgr.load({ scripts : jsArr, callback : function() { jsCache[viewName]=0; var view = newView(viewName,params); callback.call(this, view); } }); } }
$ImportJs('FlowManagerView',function(){ return new FlowManagerView(); });
ScriptLoaderMgr = function() { this.loader = new ScriptLoader(); this.load = function(o) { if (!Ext.isArray(o.scripts)) { o.scripts = [o.scripts]; } o.url = o.scripts.shift(); if (o.scripts.length == 0) { this.loader.load(o); } else { o.scope = this; this.loader.load(o, function() { this.load(o); }); [size=medium][/size] } }; };
/** * 用于动态加载js * sample is here * ScriptMgr.load({ * scripts: ['/js/other-prerequisite.js', '/js/other.js'], * callback: function() { * var other = new OtherObject(); * alert(other); //just loaded * } * }); */ ScriptLoader = function() { this.timeout = 10; this.scripts = []; this.disableCaching = true;//false this.loadMask = null; }; ScriptLoader.prototype = { showMask : function() { if (!this.loadMask) { this.loadMask = new Ext.LoadMask(Ext.getBody()); this.loadMask.show(); }