|
|
@@ -184,6 +184,24 @@ MWF.xApplication.process.Xform.Subform = MWF.APPSubform = new Class({
|
|
|
|
|
|
MWF.xApplication.process.Xform.SubmitForm = MWF.APPSubmitform = new Class({
|
|
|
Extends: MWF.APPSubform,
|
|
|
+ _loadUserInterface: function(){
|
|
|
+ // this.node.empty();
|
|
|
+ this.getSubform(function(){
|
|
|
+ this.loadSubform();
|
|
|
+ }.bind(this));
|
|
|
+ },
|
|
|
+ reload: function(){
|
|
|
+ // this.node.empty();
|
|
|
+ this.getSubform(function(){
|
|
|
+ this.loadSubform();
|
|
|
+ }.bind(this));
|
|
|
+ },
|
|
|
+ fireSubFormEvent : function( name ){
|
|
|
+ var events = this.subformData.json.events;
|
|
|
+ if( events && events[name] && events[name]["code"] ){
|
|
|
+ this.form.Macro.exec(events[name]["code"], this);
|
|
|
+ }
|
|
|
+ },
|
|
|
loadSubform: function(){
|
|
|
if (this.subformData){
|
|
|
if( !this.checkSubformUnique( this.subformData.json.id ) ){ //如果提交表单已经嵌入到表单中,那么把这个表单弹出来
|
|
|
@@ -194,6 +212,7 @@ MWF.xApplication.process.Xform.SubmitForm = MWF.APPSubmitform = new Class({
|
|
|
}else{
|
|
|
//this.form.addEvent("postLoad", function(){
|
|
|
|
|
|
+ this.fireSubFormEvent("queryLoad");
|
|
|
this.loadCss();
|
|
|
|
|
|
this.node.set("html", this.subformData.html);
|
|
|
@@ -222,6 +241,9 @@ MWF.xApplication.process.Xform.SubmitForm = MWF.APPSubmitform = new Class({
|
|
|
}.bind(this));
|
|
|
|
|
|
this.form.subformLoaded.push( this.subformData.json.id );
|
|
|
+ this.fireSubFormEvent("postLoad");
|
|
|
+ this.fireSubFormEvent("load");
|
|
|
+ this.fireSubFormEvent("afterLoad");
|
|
|
}
|
|
|
}
|
|
|
// if( this.form.subformLoadedCount ){
|