diff --git a/o2web/source/x_component_process_FormDesigner/Module/ImageClipper.js b/o2web/source/x_component_process_FormDesigner/Module/ImageClipper.js index 8bb9e891104d32911f68592b5d11d446ab166a7a..d3b5123f085af705f56fdc0894530d2c0c462086 100644 --- a/o2web/source/x_component_process_FormDesigner/Module/ImageClipper.js +++ b/o2web/source/x_component_process_FormDesigner/Module/ImageClipper.js @@ -53,6 +53,31 @@ MWF.xApplication.process.FormDesigner.Module.ImageClipper = MWF.FCImageClipper = _loadNodeStyles: function(){ var button = this.node.getFirst("button"); button.setStyles(this.css.buttonIcon); + button.setStyles(this.json.buttonStyles); + }, + + + setAllStyles: function(){ + this.setPropertiesOrStyles("styles"); + this.setPropertiesOrStyles("buttonStyles"); + this.setPropertiesOrStyles("imageStyles"); + this.setPropertiesOrStyles("properties"); + this.reloadMaplist(); + }, + _initModule: function(){ + if (!this.json.isSaved) this.setStyleTemplate(); + + this._resetModuleDomNode(); + + this.setPropertiesOrStyles("styles"); + this.setPropertiesOrStyles("buttonStyles"); + this.setPropertiesOrStyles("imageStyles"); + this.setPropertiesOrStyles("properties"); + + this._setNodeProperty(); + if (!this.form.isSubform) this._createIconAction(); + this._setNodeEvent(); + this.json.isSaved = true; }, unSelected: function(){ @@ -83,6 +108,27 @@ MWF.xApplication.process.FormDesigner.Module.ImageClipper = MWF.FCImageClipper = return this.copyNode; }, + setPropertiesOrStyles: function(name){ + if (name=="styles"){ + try{ + this.setCustomStyles(); + }catch(e){} + } + if (name=="properties"){ + try{ + this.setCustomProperties(); + }catch(e){} + } + if (name=="buttonStyles"){ + if (this.json.buttonStyles){ + var button = this.node.getElement("button"); + button.clearStyles(); + button.setStyles(this.css.buttonIcon); + button.setStyles(this.json.buttonStyles); + } + } + }, + _setEditStyle_custom: function(name){ if (name=="name"){ if (this.json.name){ diff --git a/o2web/source/x_component_process_FormDesigner/Module/ImageClipper/imageclipper.html b/o2web/source/x_component_process_FormDesigner/Module/ImageClipper/imageclipper.html index 1d8268f54d426befdd6592954153bb7b8ebc99bd..585e5a1a5be65e6c53acc791157987bf681b3441 100644 --- a/o2web/source/x_component_process_FormDesigner/Module/ImageClipper/imageclipper.html +++ b/o2web/source/x_component_process_FormDesigner/Module/ImageClipper/imageclipper.html @@ -60,6 +60,7 @@
+
diff --git a/o2web/source/x_component_process_Xform/ImageClipper.js b/o2web/source/x_component_process_Xform/ImageClipper.js index 49241c3a311867e56c3f07911a99085e91d07421..2a51b773d1a5eff7cdbf2d2e417463c4adf98c91 100644 --- a/o2web/source/x_component_process_Xform/ImageClipper.js +++ b/o2web/source/x_component_process_Xform/ImageClipper.js @@ -64,6 +64,9 @@ MWF.xApplication.process.Xform.ImageClipper = MWF.APPImageClipper = new Class( "styles": this.form.json.buttonStyle || this.form.css.buttonStyles, "MWFType": this.json.type }); + if(this.json.buttonStyles){ + button.setStyles( this.json.buttonStyles ); + } button.addEvent("click", function(){ this.validationMode(); var d = this._getBusinessData();