|
|
@@ -230,19 +230,19 @@ MWF.xApplication.process.Xform.Form = MWF.APPForm = new Class({
|
|
|
}
|
|
|
var stylesUrl = "/x_component_process_FormDesigner/Module/Form/skin/" + this.json.styleConfig.extendFile;
|
|
|
MWF.getJSON(stylesUrl, {
|
|
|
- "onSuccess": function (responseJSON) {
|
|
|
- if (responseJSON && responseJSON.form) {
|
|
|
- this.json = Object.merge(this.json, responseJSON.form);
|
|
|
- }
|
|
|
- if (callback) callback();
|
|
|
- }.bind(this),
|
|
|
- "onRequestFailure": function () {
|
|
|
- if (callback) callback();
|
|
|
- }.bind(this),
|
|
|
- "onError": function () {
|
|
|
- if (callback) callback();
|
|
|
- }.bind(this)
|
|
|
- }
|
|
|
+ "onSuccess": function (responseJSON) {
|
|
|
+ if (responseJSON && responseJSON.form) {
|
|
|
+ this.json = Object.merge(this.json, responseJSON.form);
|
|
|
+ }
|
|
|
+ if (callback) callback();
|
|
|
+ }.bind(this),
|
|
|
+ "onRequestFailure": function () {
|
|
|
+ if (callback) callback();
|
|
|
+ }.bind(this),
|
|
|
+ "onError": function () {
|
|
|
+ if (callback) callback();
|
|
|
+ }.bind(this)
|
|
|
+ }
|
|
|
);
|
|
|
},
|
|
|
loadMacro: function (callback) {
|
|
|
@@ -1713,6 +1713,7 @@ MWF.xApplication.process.Xform.Form = MWF.APPForm = new Class({
|
|
|
|
|
|
},
|
|
|
processWork_pc: function(){
|
|
|
+ var _self = this;
|
|
|
this.fireEvent("beforeProcessWork");
|
|
|
if (this.app && this.app.fireEvent) this.app.fireEvent("beforeProcessWork");
|
|
|
|
|
|
@@ -1743,15 +1744,18 @@ MWF.xApplication.process.Xform.Form = MWF.APPForm = new Class({
|
|
|
});
|
|
|
var s = dlg.setContentSize();
|
|
|
if (dlg.content.getStyle("overflow-y") === "auto" && dlg.content.getStyle("overflow-x") !== "auto") {
|
|
|
- dlg.node.setStyle("width", dlg.node.getStyle("width").toInt() + 20 + "px");
|
|
|
- dlg.content.setStyle("width", dlg.content.getStyle("width").toInt() + 20 + "px");
|
|
|
+ var paddingRight = (dlg.content.getStyle("padding-right").toInt() || 0 );
|
|
|
+ if( paddingRight < 20 ){
|
|
|
+ dlg.node.setStyle("width", dlg.node.getStyle("width").toInt() + 20 + "px");
|
|
|
+ dlg.content.setStyle("width", dlg.content.getStyle("width").toInt() + 20 + "px");
|
|
|
+ }
|
|
|
}
|
|
|
if (!notRecenter) dlg.reCenter();
|
|
|
}
|
|
|
|
|
|
//var node = new Element("div", {"styles": this.css.rollbackAreaNode});
|
|
|
var processNode = new Element("div", { "styles": this.app.css.processNode_Area }).inject(this.node);
|
|
|
- this.setProcessNode(processNode, "process", function () {
|
|
|
+ this.setProcessNode(processNode, "process", function ( processor ){
|
|
|
this.processDlg = o2.DL.open({
|
|
|
"title": this.app.lp.process,
|
|
|
"style": this.json.dialogStyle || "user",
|
|
|
@@ -1782,6 +1786,7 @@ MWF.xApplication.process.Xform.Form = MWF.APPForm = new Class({
|
|
|
}
|
|
|
],
|
|
|
"onPostLoad": function () {
|
|
|
+ processor.options.mediaNode = this.content;
|
|
|
setSize.call(this)
|
|
|
}
|
|
|
});
|
|
|
@@ -1889,14 +1894,15 @@ MWF.xApplication.process.Xform.Form = MWF.APPForm = new Class({
|
|
|
if (layout.mobile) {
|
|
|
innerNode = new Element("div").inject(processNode);
|
|
|
}
|
|
|
+
|
|
|
this.processor = new MWF.xApplication.process.Work.Processor(innerNode || processNode, this.businessData.task, {
|
|
|
"style": (layout.mobile) ? "mobile" : (style || "default"),
|
|
|
"opinion": op.opinion,
|
|
|
"tabletWidth": this.json.tabletWidth || 0,
|
|
|
"tabletHeight": this.json.tabletHeight || 0,
|
|
|
"onPostLoad": function () {
|
|
|
- if (postLoadFun) postLoadFun();
|
|
|
- }.bind(this),
|
|
|
+ if (postLoadFun) postLoadFun( this );
|
|
|
+ },
|
|
|
"onResize": function () {
|
|
|
if (resizeFun) resizeFun();
|
|
|
},
|