提交 95ff1f98 编写于 作者: NoSubject's avatar NoSubject

Merge branch 'fix/form_style' into 'develop'

Merge of fix/form_style to develop 一些表单样式问题修改

See merge request o2oa/o2oa!865
......@@ -791,7 +791,7 @@ MWF.xApplication.cms.DictionaryDesigner.Dictionary.item = new Class({
switch(type){
case "array":
if (this.value!="New Item Value" && this.value!="New Element Value"){
this.dictionary.designer.confirm("warn", e, this.dictionary.designer.lp.notice.changeType, this.dictionary.designer.lp.notice.changeType, 300, 120, function(){
this.dictionary.designer.confirm("warn", e, this.dictionary.designer.lp.notice.changeTypeTitle, this.dictionary.designer.lp.notice.changeType, 300, 120, function(){
if (_self.type=="object"){
_self.changeTypeObjectToArray(type);
}else{
......@@ -814,7 +814,7 @@ MWF.xApplication.cms.DictionaryDesigner.Dictionary.item = new Class({
break;
case "object":
if (this.value!="New Item Value" && this.value!="New Element Value") {
this.dictionary.designer.confirm("warn", e, this.dictionary.designer.lp.notice.changeType, this.dictionary.designer.lp.notice.changeType, 300, 120, function () {
this.dictionary.designer.confirm("warn", e, this.dictionary.designer.lp.notice.changeTypeTitle, this.dictionary.designer.lp.notice.changeType, 300, 120, function () {
if (_self.type == "array") {
_self.changeTypeArrayToObject(type);
} else {
......@@ -837,7 +837,7 @@ MWF.xApplication.cms.DictionaryDesigner.Dictionary.item = new Class({
break;
default:
if (this.value!="New Item Value" && this.value!="New Element Value") {
this.dictionary.designer.confirm("warn", e, this.dictionary.designer.lp.notice.changeType, this.dictionary.designer.lp.notice.changeTypeDeleteChildren, 300, 120, function () {
this.dictionary.designer.confirm("warn", e, this.dictionary.designer.lp.notice.changeTypeTitle, this.dictionary.designer.lp.notice.changeTypeDeleteChildren, 300, 120, function () {
if (_self.type == "array") {
_self.changeTypeArrayToPrimitive(type);
} else if (_self.type == "object") {
......
......@@ -621,8 +621,8 @@ MWF.xApplication.process.Application.WorkExplorer = new Class({
removeWork: function(work, all){
this.actions.removeWork(work.data.id, this.app.options.id, all, function(json){
json.data.each(function(item){
this.items.erase(this.works[item.id]);
this.works[item.id].destroy();
this.items.erase(this.works[item.id]);
MWF.release(this.works[item.id]);
delete this.works[item.id];
}.bind(this));
......@@ -1749,4 +1749,4 @@ MWF.xApplication.process.Application.WorkExplorer.Readed = new Class({
this.close();
});
}
});
\ No newline at end of file
});
......@@ -787,7 +787,7 @@ MWF.xApplication.process.DictionaryDesigner.Dictionary.item = new Class({
switch(type){
case "array":
if (this.value!="New Item Value" && this.value!="New Element Value"){
this.dictionary.designer.confirm("warn", e, this.dictionary.designer.lp.notice.changeType, this.dictionary.designer.lp.notice.changeType, 300, 120, function(){
this.dictionary.designer.confirm("warn", e, this.dictionary.designer.lp.notice.changeTypeTitle, this.dictionary.designer.lp.notice.changeType, 300, 120, function(){
if (_self.type=="object"){
_self.changeTypeObjectToArray(type);
}else{
......@@ -810,7 +810,7 @@ MWF.xApplication.process.DictionaryDesigner.Dictionary.item = new Class({
break;
case "object":
if (this.value!="New Item Value" && this.value!="New Element Value") {
this.dictionary.designer.confirm("warn", e, this.dictionary.designer.lp.notice.changeType, this.dictionary.designer.lp.notice.changeType, 300, 120, function () {
this.dictionary.designer.confirm("warn", e, this.dictionary.designer.lp.notice.changeTypeTitle, this.dictionary.designer.lp.notice.changeType, 300, 120, function () {
if (_self.type == "array") {
_self.changeTypeArrayToObject(type);
} else {
......@@ -833,7 +833,7 @@ MWF.xApplication.process.DictionaryDesigner.Dictionary.item = new Class({
break;
default:
if (this.value!="New Item Value" && this.value!="New Element Value") {
this.dictionary.designer.confirm("warn", e, this.dictionary.designer.lp.notice.changeType, this.dictionary.designer.lp.notice.changeTypeDeleteChildren, 300, 120, function () {
this.dictionary.designer.confirm("warn", e, this.dictionary.designer.lp.notice.changeTypeTitle, this.dictionary.designer.lp.notice.changeTypeDeleteChildren, 300, 120, function () {
if (_self.type == "array") {
_self.changeTypeArrayToPrimitive(type);
} else if (_self.type == "object") {
......
......@@ -46,6 +46,56 @@ MWF.xApplication.process.FormDesigner.Module.Iframe = MWF.FCIframe = new Class({
this.parseModules();
this.json.moduleName = this.moduleName;
},
_resetModuleDomNode: function(){
// if (this.json.preprocessing){
// var node = new Element("div", {
// "MWFType": "iframe",
// "id": this.json.id,
// "styles": this.css.moduleNodeMove,
// "events": {
// "selectstart": function(){
// return false;
// }
// }
// }).inject(this.node, "after");
// this.node.destroy();
// this._createNode(node);
//}
},
_preprocessingModuleData: function(){
// var iframe = new Element("iframe", {
// "src": src
// }).inject(this.node, "after");
// iframe.setStyles({
// "width": "100%",
// "border": "0"
// });
// this.recoveryNode = this.node.dispose();
//
// if (this.json.styles){
// this.json.recoveryStyles = Object.clone(this.json.styles);
// if (this.json.recoveryStyles) Object.each(this.json.recoveryStyles, function(value, key){
// if ((value.indexOf("x_processplatform_assemble_surface")==-1 && value.indexOf("x_portal_assemble_surface")==-1)){
// iframe.setStyle(key, value);
// delete this.json.styles[key];
// }
// }.bind(this));
// }
// this.json.preprocessing = "y";
},
_recoveryModuleData: function(){
// if (this.json.recoveryStyles) this.json.styles = this.json.recoveryStyles;
//
// if (this.recoveryNode) {
// this.node.empty();
// this.recoveryTextNode.inject(this.node, "top");
// }
// if (this.recoveryIconNode) {
// this.recoveryIconNode.inject(this.node, "top");
// }
// this.json.recoveryStyles = null;
// this.recoveryNode = null;
},
_createMoveNode: function(){
this.moveNode = new Element("div", {
"MWFType": "iframe",
......@@ -58,8 +108,8 @@ MWF.xApplication.process.FormDesigner.Module.Iframe = MWF.FCIframe = new Class({
}
}).inject(this.form.container);
},
_createNode: function(){
this.node = this.moveNode.clone(true, true);
_createNode: function(node){
this.node = node || this.moveNode.clone(true, true);
this.node.setStyles(this.css.moduleNode);
this.node.set("id", this.json.id);
this.node.addEvent("selectstart", function(){
......
......@@ -1558,12 +1558,14 @@ MWF.xApplication.process.ProcessDesigner.Process.Panel = new Class({
this.jsonStringNode.set("text", JSON.stringify(json,null,2));
MWF.widget.ace.load(function(){
COMMON.AjaxModule.loadDom("../o2_lib/ace/src-min-noconflict/ext-static_highlight.js", function(){
var highlight = ace.require("ace/ext/static_highlight");
highlight(this.jsonStringNode, {mode: "ace/mode/json", theme: "ace/theme/tomorrow", "fontSize": 16});
}.bind(this));
}.bind(this));
o2.require("o2.widget.ace", function(){
MWF.widget.ace.load(function(){
COMMON.AjaxModule.loadDom("../o2_lib/ace/src-min-noconflict/ext-static_highlight.js", function(){
var highlight = ace.require("ace/ext/static_highlight");
highlight(this.jsonStringNode, {mode: "ace/mode/json", theme: "ace/theme/tomorrow", "fontSize": 16});
}.bind(this));
}.bind(this));
}.bind(this));
},
clearJson: function(){
this.json = null;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册