|
@@ -218,28 +218,36 @@ MWF.xApplication.cms.FormDesigner.widget.ActionsEditor.ButtonAction = new Class(
|
|
|
//this.setEditNode();
|
|
//this.setEditNode();
|
|
|
},
|
|
},
|
|
|
setEvent: function(){
|
|
setEvent: function(){
|
|
|
- this.iconMenu = new MWF.widget.Menu(this.iconNode, {"event": "click", "style": "actionbarIcon"});
|
|
|
|
|
|
|
+ this.iconMenu = new MWF.widget.Menu(this.iconNode, {
|
|
|
|
|
+ "event": "click",
|
|
|
|
|
+ "style": "actionbarIcon",
|
|
|
|
|
+ "onPostShow" : function (ev) {
|
|
|
|
|
+ ev.stopPropagation();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
this.iconMenu.load();
|
|
this.iconMenu.load();
|
|
|
var _self = this;
|
|
var _self = this;
|
|
|
for (var i=-6; i<0; i++){
|
|
for (var i=-6; i<0; i++){
|
|
|
//var icon = this.editor.path+this.editor.options.style+"/tools/"+i+".png";
|
|
//var icon = this.editor.path+this.editor.options.style+"/tools/"+i+".png";
|
|
|
var icon = "../x_component_cms_FormDesigner/Module/Actionbar/"+this.editor.options.style+"/custom/"+i+".png";
|
|
var icon = "../x_component_cms_FormDesigner/Module/Actionbar/"+this.editor.options.style+"/custom/"+i+".png";
|
|
|
- var item = this.iconMenu.addMenuItem("", "click", function(){
|
|
|
|
|
|
|
+ var item = this.iconMenu.addMenuItem("", "click", function(ev){
|
|
|
var src = this.item.getElement("img").get("src");
|
|
var src = this.item.getElement("img").get("src");
|
|
|
_self.data.img = src.substr(src.lastIndexOf("/")+1, src.length);
|
|
_self.data.img = src.substr(src.lastIndexOf("/")+1, src.length);
|
|
|
_self.iconNode.setStyle("background-image", "url("+src+")");
|
|
_self.iconNode.setStyle("background-image", "url("+src+")");
|
|
|
_self.editor.fireEvent("change");
|
|
_self.editor.fireEvent("change");
|
|
|
|
|
+ ev.stopPropagation();
|
|
|
}, icon);
|
|
}, icon);
|
|
|
item.iconName = i+".png";
|
|
item.iconName = i+".png";
|
|
|
}
|
|
}
|
|
|
for (var i=1; i<=134; i++){
|
|
for (var i=1; i<=134; i++){
|
|
|
//var icon = this.editor.path+this.editor.options.style+"/tools/"+i+".png";
|
|
//var icon = this.editor.path+this.editor.options.style+"/tools/"+i+".png";
|
|
|
var icon = "../x_component_cms_FormDesigner/Module/Actionbar/"+this.editor.options.style+"/custom/"+i+".png";
|
|
var icon = "../x_component_cms_FormDesigner/Module/Actionbar/"+this.editor.options.style+"/custom/"+i+".png";
|
|
|
- var item = this.iconMenu.addMenuItem("", "click", function(){
|
|
|
|
|
|
|
+ var item = this.iconMenu.addMenuItem("", "click", function(ev){
|
|
|
var src = this.item.getElement("img").get("src");
|
|
var src = this.item.getElement("img").get("src");
|
|
|
_self.data.img = src.substr(src.lastIndexOf("/")+1, src.length);
|
|
_self.data.img = src.substr(src.lastIndexOf("/")+1, src.length);
|
|
|
_self.iconNode.setStyle("background-image", "url("+src+")");
|
|
_self.iconNode.setStyle("background-image", "url("+src+")");
|
|
|
_self.editor.fireEvent("change");
|
|
_self.editor.fireEvent("change");
|
|
|
|
|
+ ev.stopPropagation();
|
|
|
}, icon);
|
|
}, icon);
|
|
|
item.iconName = i+".png";
|
|
item.iconName = i+".png";
|
|
|
}
|
|
}
|