提交 e4cb485f 编写于 作者: U unknown

操作条的操作系统和自定义操作可以混合排序

上级 fcbe1600
......@@ -24,6 +24,7 @@ MWF.xApplication.cms.FormDesigner.Module.Actionbar = MWF.CMSFCActionbar = new Cl
this.containerNode = null;
this.systemTools = [];
this.customTools = [];
this.multiTools = [];
},
setTemplateStyles: function(styles){
this.json.style = styles.style;
......@@ -60,7 +61,8 @@ MWF.xApplication.cms.FormDesigner.Module.Actionbar = MWF.CMSFCActionbar = new Cl
this.toolbarWidget = new MWF.widget.SimpleToolbar(this.toolbarNode, {"style": this.json.style}, this);
MWF.getJSON(this.path+"toolbars.json", function(json){
this.json.defaultTools = json;
//this.json.defaultTools = json;
this.json.multiTools = json.map( function (d) { d.system = true; return d; });
this.setToolbars(json, this.toolbarNode);
this.toolbarWidget.load();
this._setEditStyle_custom( "hideSystemTools" );
......@@ -90,63 +92,34 @@ MWF.xApplication.cms.FormDesigner.Module.Actionbar = MWF.CMSFCActionbar = new Cl
if (!this.json.actionStyles) this.json.actionStyles = Object.clone(this.toolbarWidget.css);
this.toolbarWidget.css = this.json.actionStyles;
if (this.json.defaultTools){
var json = Array.clone(this.json.defaultTools);
this.setToolbars(json, this.toolbarNode);
//if (this.json.tools) json.append(this.json.tools);
//this.setToolbars(json, this.toolbarNode);
if (this.json.tools){
this.setCustomToolbars(Array.clone(this.json.tools), this.toolbarNode);
}
this.toolbarWidget.load();
this._setEditStyle_custom( "hideSystemTools" );
this._setEditStyle_custom( "hideSetPopularDocumentTool" );
//json = null;
}else{
MWF.getJSON(this.path+"toolbars.json", function(json){
this.json.defaultTools = json;
var json = Array.clone(this.json.defaultTools);
this.setToolbars(json, this.toolbarNode);
//if (this.json.tools) json.append(this.json.tools);
//this.setToolbars(json, this.toolbarNode);
if (this.json.tools){
this.setCustomToolbars(Array.clone(this.json.tools), this.toolbarNode);
}
this.toolbarWidget.load();
this._setEditStyle_custom( "hideSystemTools" );
this._setEditStyle_custom( "hideSetPopularDocumentTool" );
//json = null;
}.bind(this), false);
}
this.loadMultiToolbar();
// if (this.json.sysTools.editTools){
// this.setToolbars(this.json.sysTools.editTools, this.toolbarNode);
//// this.setToolbars(this.json.tools.editTools, this.toolbarNode);
// }else{
// this.setToolbars(this.json.sysTools, this.toolbarNode);
//// this.setToolbars(this.json.tools, this.toolbarNode);
// }
// if (this.json.defaultTools){
// var json = Array.clone(this.json.defaultTools);
// this.setToolbars(json, this.toolbarNode);
// if (this.json.tools){
// this.setCustomToolbars(Array.clone(this.json.tools), this.toolbarNode);
// }
// this.toolbarWidget.load();
// this._setEditStyle_custom( "hideSystemTools" );
// this._setEditStyle_custom( "hideSetPopularDocumentTool" );
// }else{
// MWF.getJSON(this.path+"toolbars.json", function(json){
// this.json.defaultTools = json;
// var json = Array.clone(this.json.defaultTools);
// this.setToolbars(json, this.toolbarNode);
// if (this.json.tools){
// this.setCustomToolbars(Array.clone(this.json.tools), this.toolbarNode);
// }
// this.toolbarWidget.load();
// this._setEditStyle_custom( "hideSystemTools" );
// this._setEditStyle_custom( "hideSetPopularDocumentTool" );
// }.bind(this), false);
// }
}
},
//_refreshActionbar: function(){
// if (this.form.options.mode == "Mobile"){
// this.node.set("text", MWF.APPFD.LP.notice.notUseModuleInMobile+"("+this.moduleName+")");
// this.node.setStyles({"height": "24px", "line-height": "24px", "background-color": "#999"});
// }else{
// this.toolbarNode = this.node.getFirst("div");
// this.toolbarNode.empty();
// this.toolbarWidget = new MWF.widget.SimpleToolbar(this.toolbarNode, {"style": this.json.style}, this);
//
// MWF.getJSON(this.path+"toolbars.json", function(json){
// this.setToolbars(json, this.toolbarNode);
// this.toolbarWidget.load();
// this._setEditStyle_custom( "hideSetPopularDocumentTool" );
// }.bind(this), false);
// }
//
//},
_resetActionbar: function(){
if (this.form.options.mode == "Mobile"){
this.node.set("text", MWF.APPFD.LP.notice.notUseModuleInMobile+"("+this.moduleName+")");
......@@ -163,30 +136,66 @@ MWF.xApplication.cms.FormDesigner.Module.Actionbar = MWF.CMSFCActionbar = new Cl
this.json.actionStyles = Object.clone(this.toolbarWidget.css);
}
if (this.json.defaultTools){
var json = Array.clone(this.json.defaultTools);
//if (this.json.tools) json.append(this.json.tools);
this.setToolbars(json, this.toolbarNode);
this.loadMultiToolbar();
// if (this.json.defaultTools){
// var json = Array.clone(this.json.defaultTools);
// this.setToolbars(json, this.toolbarNode);
// if (this.json.tools){
// this.setCustomToolbars(Array.clone(this.json.tools), this.toolbarNode);
// }
// this.toolbarWidget.load();
// }else{
// MWF.getJSON(this.path+"toolbars.json", function(json){
// this.json.defaultTools = json;
// var json = Array.clone(this.json.defaultTools);
// this.setToolbars(json, this.toolbarNode);
// if (this.json.tools){
// this.setCustomToolbars(Array.clone(this.json.tools), this.toolbarNode);
// }
// this.toolbarWidget.load();
// }.bind(this), false);
// }
}
},
loadMultiToolbar : function(){
if( this.json.multiTools ){
var json = Array.clone(this.json.multiTools);
this.setMultiToolbars(json, this.toolbarNode);
this.toolbarWidget.load();
this._setEditStyle_custom( "hideSystemTools" );
this._setEditStyle_custom( "hideSetPopularDocumentTool" );
}else if( this.json.defaultTools ){
this.json.multiTools = this.json.defaultTools.map( function (d) { d.system = true; return d; });
if (this.json.tools){
this.json.multiTools = this.json.multiTools.concat( this.json.tools )
}
this.setMultiToolbars( Array.clone(this.json.multiTools), this.toolbarNode);
this.toolbarWidget.load();
this._setEditStyle_custom( "hideSystemTools" );
this._setEditStyle_custom( "hideSetPopularDocumentTool" );
}else{
MWF.getJSON(this.path+"toolbars.json", function(json){
this.json.multiTools = json.map( function (d) { d.system = true; return d; });
if (this.json.tools){
this.setCustomToolbars(Array.clone(this.json.tools), this.toolbarNode);
this.json.multiTools = this.json.multiTools.concat( this.json.tools )
}
this.setMultiToolbars(Array.clone(this.json.multiTools), this.toolbarNode);
this.toolbarWidget.load();
//json = null;
}else{
MWF.getJSON(this.path+"toolbars.json", function(json){
this.json.defaultTools = json;
var json = Array.clone(this.json.defaultTools);
//if (this.json.tools) json.append(this.json.tools);
this.setToolbars(json, this.toolbarNode);
if (this.json.tools){
this.setCustomToolbars(Array.clone(this.json.tools), this.toolbarNode);
}
this.toolbarWidget.load();
//json = null;
}.bind(this), false);
}
this._setEditStyle_custom( "hideSystemTools" );
this._setEditStyle_custom( "hideSetPopularDocumentTool" );
}.bind(this), false);
}
},
setMultiToolbars: function(tools, node){
tools.each(function(tool){
if( tool.system ){
this.setToolbars( [tool], node );
}else{
this.setCustomToolbars( [tool], node );
}
}.bind(this));
},
setToolbars: function(tools, node){
tools.each(function(tool){
var actionNode = new Element("div", {
......@@ -198,6 +207,7 @@ MWF.xApplication.cms.FormDesigner.Module.Actionbar = MWF.CMSFCActionbar = new Cl
"MWFButtonText": tool.text
}).inject(node);
this.systemTools.push(actionNode);
this.multiTools.push( actionNode );
if (tool.sub){
var subNode = node.getLast();
this.setToolbars(tool.sub, subNode);
......@@ -223,6 +233,7 @@ MWF.xApplication.cms.FormDesigner.Module.Actionbar = MWF.CMSFCActionbar = new Cl
"MWFButtonText": tool.text
}).inject(node);
this.customTools.push(actionNode);
this.multiTools.push( actionNode );
if (tool.sub){
var subNode = node.getLast();
this.setToolbars(tool.sub, subNode);
......
......@@ -125,6 +125,24 @@ if( !MWF.CMSProperty_Process ){
},
loadActionArea_Process : MWF.CMSProperty_Process.loadActionArea,
loadActionArea_CMS: function(){
var multiActionArea = this.propertyContent.getElements(".MWFMultiActionArea");
multiActionArea.each(function(node){
var name = node.get("name");
var actionContent = this.data[name];
MWF.xDesktop.requireApp("process.FormDesigner", "widget.ActionsEditor", function(){
var actionEditor = new MWF.xApplication.process.FormDesigner.widget.ActionsEditor(node, this.designer, this.data, {
"maxObj": this.propertyNode.parentElement.parentElement.parentElement,
"isSystemTool" : true,
"onChange": function(){
this.data[name] = actionEditor.data;
this.changeData(name);
}.bind(this)
});
actionEditor.load(actionContent);
}.bind(this));
}.bind(this));
var actionAreas = this.propertyContent.getElements(".MWFActionArea");
actionAreas.each(function(node){
var name = node.get("name");
......
......@@ -38,6 +38,23 @@ MWF.xApplication.cms.FormDesigner.Property = MWF.CMSFCProperty = new Class({
}
},
loadActionArea: function(){
var multiActionArea = this.propertyContent.getElements(".MWFMultiActionArea");
multiActionArea.each(function(node){
var name = node.get("name");
var actionContent = this.data[name];
MWF.xDesktop.requireApp("process.FormDesigner", "widget.ActionsEditor", function(){
var actionEditor = new MWF.xApplication.process.FormDesigner.widget.ActionsEditor(node, this.designer, this.data, {
"maxObj": this.propertyNode.parentElement.parentElement.parentElement,
"isSystemTool" : true,
"onChange": function(){
this.data[name] = actionEditor.data;
this.changeData(name);
}.bind(this)
});
actionEditor.load(actionContent);
}.bind(this));
}.bind(this));
var actionAreas = this.propertyContent.getElements(".MWFActionArea");
actionAreas.each(function(node){
var name = node.get("name");
......
......@@ -75,6 +75,7 @@ MWF.xApplication.cms.FormDesigner.widget.ActionsEditor = new Class({
array.each( function(tool){
for( var i=0; i<list.length; i++ ){
if( list[i].id === tool.data.id ){
list[i].system = true;
this.data.push( list[i] );
var action = new MWF.xApplication.cms.FormDesigner.widget.ActionsEditor.ButtonAction(this);
action.load(list[i]);
......@@ -139,7 +140,7 @@ MWF.xApplication.cms.FormDesigner.widget.ActionsEditor.ButtonAction = new Class(
this.conditionButton.setStyle("background-image", "url("+this.editor.path+this.editor.options.style+"/icon/code_empty.png)");
}
if (!this.editor.options.noEditShow){
if (!this.editor.options.noEditShow && !this.data.system){
this.editButton = new Element("div", {"styles": this.css.actionEditButtonNode, "title": this.editor.designer.lp.actionbar.edithide}).inject(this.titleNode);
if (this.data.editShow){
this.editButton.setStyle("background-image", "url("+this.editor.path+this.editor.options.style+"/icon/edit.png)");
......@@ -148,7 +149,7 @@ MWF.xApplication.cms.FormDesigner.widget.ActionsEditor.ButtonAction = new Class(
}
}
if (!this.editor.options.noReadShow){
if (!this.editor.options.noReadShow && !this.data.system){
this.readButton = new Element("div", {"styles": this.css.actionReadButtonNode, "title": this.editor.designer.lp.actionbar.readhide}).inject(this.titleNode);
if (this.data.readShow){
this.readButton.setStyle("background-image", "url("+this.editor.path+this.editor.options.style+"/icon/read.png)");
......@@ -162,7 +163,7 @@ MWF.xApplication.cms.FormDesigner.widget.ActionsEditor.ButtonAction = new Class(
var icon = this.editor.path+this.editor.options.style+"/tools/"+this.data.img;
this.iconNode.setStyle("background-image", "url("+icon+")");
if (!this.editor.options.noCode) {
if (!this.editor.options.noCode && !this.data.system ) {
this.scriptNode = new Element("div", {"styles": this.css.actionScriptNode}).inject(this.node);
this.scriptArea = new MWF.widget.ScriptArea(this.scriptNode, {
"title": this.editor.designer.lp.actionbar.editScript,
......
......@@ -36,31 +36,43 @@ MWF.xApplication.cms.Xform.Actionbar = MWF.CMSActionbar = new Class({
//this.setCustomToolbars(this.json.tools, this.toolbarNode);
//
//this.toolbarWidget.load();
if (this.json.hideSystemTools){
this.setCustomToolbars(this.json.tools, this.toolbarNode);
if( this.json.multiTools ){
this.json.multiTools.each( function (tool) {
if( tool.system ){
if( !this.json.hideSystemTools ){
this.setToolbars( [tool], this.toolbarNode, this.readonly);
}
}else{
this.setCustomToolbars([tool], this.toolbarNode);
}
}.bind(this));
this.toolbarWidget.load();
}else{
if (this.json.defaultTools){
this.setToolbars(this.json.defaultTools, this.toolbarNode, this.readonly);
if (this.json.hideSystemTools){
this.setCustomToolbars(this.json.tools, this.toolbarNode);
this.toolbarWidget.load();
}else{
MWF.getJSON("../x_component_cms_Xform/$Form/toolbars.json", function(json){
this.setToolbars(json, this.toolbarNode, this.readonly, true);
if (this.json.defaultTools){
this.setToolbars(this.json.defaultTools, this.toolbarNode, this.readonly);
this.setCustomToolbars(this.json.tools, this.toolbarNode);
this.toolbarWidget.load();
}.bind(this), false);
}
}else{
MWF.getJSON("../x_component_cms_Xform/$Form/toolbars.json", function(json){
this.setToolbars(json, this.toolbarNode, this.readonly, true);
this.setCustomToolbars(this.json.tools, this.toolbarNode);
//MWF.getJSON("../x_component_cms_Xform/$Form/toolbars.json", function(json){
// this.setToolbars(json, this.toolbarNode, this.readonly);
// this.setCustomToolbars(this.json.tools, this.toolbarNode);
//
// this.toolbarWidget.load();
//}.bind(this), false);
}
this.toolbarWidget.load();
}.bind(this), false);
}
//MWF.getJSON("../x_component_cms_Xform/$Form/toolbars.json", function(json){
// this.setToolbars(json, this.toolbarNode, this.readonly);
// this.setCustomToolbars(this.json.tools, this.toolbarNode);
//
// this.toolbarWidget.load();
//}.bind(this), false);
}
}
}.bind(this));
//}
},
......
......@@ -28,6 +28,7 @@ MWF.xApplication.process.FormDesigner.Module.Actionbar = MWF.FCActionbar = new C
this.containerNode = null;
this.systemTools = [];
this.customTools = [];
this.multiTools = [];
//this.containers = [];
//this.elements = [];
},
......@@ -79,7 +80,8 @@ MWF.xApplication.process.FormDesigner.Module.Actionbar = MWF.FCActionbar = new C
this.toolbarWidget = new MWF.widget.Toolbar(this.toolbarNode, {"style": this.json.style}, this);
MWF.getJSON(this.path+"toolbars.json", function(json){
this.json.defaultTools = json;
// this.json.defaultTools = json;
this.json.multiTools = json.map( function (d) { d.system = true; return d; });
this.setToolbars(json, this.toolbarNode);
this.toolbarWidget.load();
}.bind(this), false);
......@@ -119,28 +121,26 @@ MWF.xApplication.process.FormDesigner.Module.Actionbar = MWF.FCActionbar = new C
if (!this.json.actionStyles) this.json.actionStyles = Object.clone(this.toolbarWidget.css);
this.toolbarWidget.css = this.json.actionStyles;
if (this.json.defaultTools){
var json = Array.clone(this.json.defaultTools);
//if (this.json.tools) json.append(this.json.tools);
this.setToolbars(json, this.toolbarNode);
if (this.json.tools){
this.setCustomToolbars(Array.clone(this.json.tools), this.toolbarNode);
}
this.toolbarWidget.load();
//json = null;
}else{
MWF.getJSON(this.path+"toolbars.json", function(json){
this.json.defaultTools = json;
var json = Array.clone(this.json.defaultTools);
//if (this.json.tools) json.append(this.json.tools);
this.setToolbars(json, this.toolbarNode);
if (this.json.tools){
this.setCustomToolbars(Array.clone(this.json.tools), this.toolbarNode);
}
this.toolbarWidget.load();
//json = null;
}.bind(this), false);
}
this.loadMultiToolbar();
// if (this.json.defaultTools){
// var json = Array.clone(this.json.defaultTools);
// this.setToolbars(json, this.toolbarNode);
// if (this.json.tools){
// this.setCustomToolbars(Array.clone(this.json.tools), this.toolbarNode);
// }
// this.toolbarWidget.load();
// }else{
// MWF.getJSON(this.path+"toolbars.json", function(json){
// this.json.defaultTools = json;
// var json = Array.clone(this.json.defaultTools);
// this.setToolbars(json, this.toolbarNode);
// if (this.json.tools){
// this.setCustomToolbars(Array.clone(this.json.tools), this.toolbarNode);
// }
// this.toolbarWidget.load();
// }.bind(this), false);
// }
}
},
......@@ -159,29 +159,60 @@ MWF.xApplication.process.FormDesigner.Module.Actionbar = MWF.FCActionbar = new C
this.json.actionStyles = Object.clone(this.toolbarWidget.css);
}
if (this.json.defaultTools){
var json = Array.clone(this.json.defaultTools);
//if (this.json.tools) json.append(this.json.tools);
this.setToolbars(json, this.toolbarNode);
this.loadMultiToolbar();
// if (this.json.defaultTools){
// var json = Array.clone(this.json.defaultTools);
// this.setToolbars(json, this.toolbarNode);
// if (this.json.tools){
// this.setCustomToolbars(Array.clone(this.json.tools), this.toolbarNode);
// }
// this.toolbarWidget.load();
// }else{
// MWF.getJSON(this.path+"toolbars.json", function(json){
// this.json.defaultTools = json;
// var json = Array.clone(this.json.defaultTools);
// this.setToolbars(json, this.toolbarNode);
// if (this.json.tools){
// this.setCustomToolbars(Array.clone(this.json.tools), this.toolbarNode);
// }
// this.toolbarWidget.load();
// //json = null;
// }.bind(this), false);
// }
}
},
loadMultiToolbar : function(){
if( this.json.multiTools ){
var json = Array.clone(this.json.multiTools);
this.setMultiToolbars(json, this.toolbarNode);
this.toolbarWidget.load();
}else if( this.json.defaultTools ){
this.json.multiTools = this.json.defaultTools.map( function (d) { d.system = true; return d; });
if (this.json.tools){
this.json.multiTools = this.json.multiTools.concat( this.json.tools )
}
this.setMultiToolbars( Array.clone(this.json.multiTools), this.toolbarNode);
this.toolbarWidget.load();
}else{
MWF.getJSON(this.path+"toolbars.json", function(json){
this.json.multiTools = json.map( function (d) { d.system = true; return d; });
if (this.json.tools){
this.setCustomToolbars(Array.clone(this.json.tools), this.toolbarNode);
this.json.multiTools = this.json.multiTools.concat( this.json.tools )
}
this.setMultiToolbars(Array.clone(this.json.multiTools), this.toolbarNode);
this.toolbarWidget.load();
//json = null;
}.bind(this), false);
}
},
setMultiToolbars: function(tools, node){
tools.each(function(tool){
if( tool.system ){
this.setToolbars( [tool], node );
}else{
MWF.getJSON(this.path+"toolbars.json", function(json){
this.json.defaultTools = json;
var json = Array.clone(this.json.defaultTools);
//if (this.json.tools) json.append(this.json.tools);
this.setToolbars(json, this.toolbarNode);
if (this.json.tools){
this.setCustomToolbars(Array.clone(this.json.tools), this.toolbarNode);
}
this.toolbarWidget.load();
//json = null;
}.bind(this), false);
this.setCustomToolbars( [tool], node );
}
}
}.bind(this));
},
setToolbars: function(tools, node){
tools.each(function(tool){
......@@ -195,7 +226,9 @@ MWF.xApplication.process.FormDesigner.Module.Actionbar = MWF.FCActionbar = new C
if( this.json.iconOverStyle ){
actionNode.set("MWFButtonImageOver" , this.path+""+this.options.style+"/tools/"+this.json.iconOverStyle+"/"+tool.img );
}
actionNode.isSystemTool = true;
this.systemTools.push(actionNode);
this.multiTools.push( actionNode );
if (tool.sub){
var subNode = node.getLast();
this.setToolbars(tool.sub, subNode);
......@@ -221,6 +254,7 @@ MWF.xApplication.process.FormDesigner.Module.Actionbar = MWF.FCActionbar = new C
actionNode.set("MWFButtonImageOver" , this.path+""+this.options.style +"/custom/"+this.json.customIconOverStyle+ "/" +tool.img );
}
this.customTools.push(actionNode);
this.multiTools.push( actionNode );
if (tool.sub){
var subNode = node.getLast();
this.setToolbars(tool.sub, subNode);
......@@ -239,7 +273,7 @@ MWF.xApplication.process.FormDesigner.Module.Actionbar = MWF.FCActionbar = new C
});
}
}
if (name=="defaultTools" || name=="tools" || name==="actionStyles"){
if (name=="defaultTools" || name=="tools" || name=="multiTools" || name==="actionStyles"){
this._refreshActionbar();
}
......
......@@ -30,8 +30,9 @@
</table>
</div>
<div title="操作" class="MWFTab" style="overflow: hidden">
<div class="MWFDefaultActionArea" name="defaultTools"></div>
<div class="MWFActionArea" name="tools"></div>
<!-- <div class="MWFDefaultActionArea" name="defaultTools"></div>-->
<!-- <div class="MWFActionArea" name="tools"></div>-->
<div class="MWFMultiActionArea" name="multiTools"></div>
</div>
<div title="样式" class="MWFTab">
<div class="MWFActionStylesArea" name="actionStyles"></div>
......
......@@ -1862,6 +1862,23 @@ debugger;
}.bind(this));
},
loadActionArea: function(){
var multiActionArea = this.propertyContent.getElements(".MWFMultiActionArea");
multiActionArea.each(function(node){
var name = node.get("name");
var actionContent = this.data[name];
MWF.xDesktop.requireApp("process.FormDesigner", "widget.ActionsEditor", function(){
var actionEditor = new MWF.xApplication.process.FormDesigner.widget.ActionsEditor(node, this.designer, this.data, {
"maxObj": this.propertyNode.parentElement.parentElement.parentElement,
"isSystemTool" : true,
"onChange": function(){
this.data[name] = actionEditor.data;
this.changeData(name);
}.bind(this)
});
actionEditor.load(actionContent);
}.bind(this));
}.bind(this));
var actionAreas = this.propertyContent.getElements(".MWFActionArea");
actionAreas.each(function(node){
var name = node.get("name");
......
......@@ -169,6 +169,7 @@ MWF.xApplication.process.FormDesigner.widget.ActionsEditor = new Class({
array.each( function(tool){
for( var i=0; i<list.length; i++ ){
if( list[i].id === tool.data.id ){
list[i].system = true;
this.data.push( list[i] );
var action = new MWF.xApplication.process.FormDesigner.widget.ActionsEditor.ButtonAction(this);
action.load(list[i]);
......@@ -261,7 +262,7 @@ MWF.xApplication.process.FormDesigner.widget.ActionsEditor.ButtonAction = new Cl
this.conditionButton.setStyle("background-image", "url("+this.editor.path+this.editor.options.style+"/icon/code_empty.png)");
}
if (!this.editor.options.noEditShow){
if (!this.editor.options.noEditShow && !this.data.system){
this.editButton = new Element("div", {"styles": this.css.actionEditButtonNode, "title": this.editor.designer.lp.actionbar.edithide}).inject(this.titleNode);
if (this.data.editShow){
this.editButton.setStyle("background-image", "url("+this.editor.path+this.editor.options.style+"/icon/edit.png)");
......@@ -270,7 +271,7 @@ MWF.xApplication.process.FormDesigner.widget.ActionsEditor.ButtonAction = new Cl
}
}
if (!this.editor.options.noReadShow){
if (!this.editor.options.noReadShow && !this.data.system){
this.readButton = new Element("div", {"styles": this.css.actionReadButtonNode, "title": this.editor.designer.lp.actionbar.readhide}).inject(this.titleNode);
if (this.data.readShow){
this.readButton.setStyle("background-image", "url("+this.editor.path+this.editor.options.style+"/icon/read.png)");
......@@ -282,7 +283,7 @@ MWF.xApplication.process.FormDesigner.widget.ActionsEditor.ButtonAction = new Cl
var icon = this.editor.path+this.editor.options.style+"/tools/"+this.data.img;
this.iconNode.setStyle("background-image", "url("+icon+")");
if (!this.editor.options.noCode){
if (!this.editor.options.noCode && !this.data.system ){
this.scriptNode = new Element("div", {"styles": this.css.actionScriptNode}).inject(this.node);
this.scriptArea = new MWF.widget.ScriptArea(this.scriptNode, {
"title": this.editor.designer.lp.actionbar.editScript,
......
......@@ -934,6 +934,23 @@ MWF.xApplication.query.ViewDesigner.Property = MWF.FVProperty = new Class({
MWF.APPFD = MWF.xApplication.process.FormDesigner = MWF.xApplication.process.FormDesigner || {};
MWF.xDesktop.requireApp("process.FormDesigner", "lp." + o2.language, null, false);
var multiActionArea = this.propertyContent.getElements(".MWFMultiActionArea");
multiActionArea.each(function(node){
var name = node.get("name");
var actionContent = this.data[name];
MWF.xDesktop.requireApp("process.FormDesigner", "widget.ActionsEditor", function(){
var actionEditor = new MWF.xApplication.process.FormDesigner.widget.ActionsEditor(node, this.designer, this.data, {
"maxObj": this.propertyNode.parentElement.parentElement.parentElement,
"isSystemTool" : true,
"onChange": function(){
this.data[name] = actionEditor.data;
this.changeData(name);
}.bind(this)
});
actionEditor.load(actionContent);
}.bind(this));
}.bind(this));
var actionAreas = this.propertyContent.getElements(".MWFActionArea");
actionAreas.each(function (node) {
var name = node.get("name");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册