提交 4589ee4d 编写于 作者: U unknown

修复内容管理表单操作条不能设置样式的问题

上级 642307bc
......@@ -36,7 +36,8 @@ MWF.xApplication.cms.FormDesigner.Module.Actionbar = MWF.CMSFCActionbar = new Cl
this.json.customIconOverStyle = "white";
},
setAllStyles: function(){
this._refreshActionbar();
//this._refreshActionbar();
this._resetActionbar();
},
_createNode: function(callback){
this.node = new Element("div", {
......@@ -86,8 +87,8 @@ MWF.xApplication.cms.FormDesigner.Module.Actionbar = MWF.CMSFCActionbar = new Cl
this.toolbarNode = this.node.getFirst("div");
this.toolbarNode.empty();
this.toolbarWidget = new MWF.widget.SimpleToolbar(this.toolbarNode, {"style": this.json.style}, this);
//if (!this.json.actionStyles) this.json.actionStyles = Object.clone(this.toolbarWidget.css);
//this.toolbarWidget.css = this.json.actionStyles;
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);
......@@ -146,6 +147,46 @@ MWF.xApplication.cms.FormDesigner.Module.Actionbar = MWF.CMSFCActionbar = new Cl
// }
//
//},
_resetActionbar: 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);
// this.toolbarWidget = new MWF.widget.Toolbar(this.toolbarNode, {"style": this.json.style}, this);
if (!this.json.actionStyles){
this.json.actionStyles = Object.clone(this.toolbarWidget.css);
}else{
this.toolbarWidget.css = Object.merge( Object.clone(this.json.actionStyles), this.toolbarWidget.css );
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);
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);
}
}
},
setToolbars: function(tools, node){
tools.each(function(tool){
var actionNode = new Element("div", {
......
......@@ -21,6 +21,7 @@ MWF.xApplication.cms.Xform.Actionbar = MWF.CMSActionbar = new Class({
this.fireEvent("afterLoad");
}.bind(this)
}, this);
if (this.json.actionStyles) this.toolbarWidget.css = this.json.actionStyles;
//var json = this.readonly ? this.json.sysTools.readTools : this.json.sysTools.editTools;
//if( this.json.style == "xform_red_simple" ){
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册