diff --git a/config/alfresco/web-client-config-wcm.xml b/config/alfresco/web-client-config-wcm.xml index 6d341062bd..1331e828c4 100644 --- a/config/alfresco/web-client-config-wcm.xml +++ b/config/alfresco/web-client-config-wcm.xml @@ -40,13 +40,14 @@ javascript-class-name="alfresco.xforms.PlainTextEditor"/> - bold,italic,underline,separator,forecolor,backcolor,separator,link,unlink,image + bold,italic,underline,separator,forecolor,backcolor,separator,link,unlink,image - bold,italic,underline,strikethrough,separator,fontselect,fontsizeselect - link,unlink,image,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,bullist,numlist,separator,undo,redo,separator,forecolor,backcolor + bold,italic,underline,strikethrough,separator,fontselect,fontsizeselect + link,unlink,image,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,bullist,numlist,separator,undo,redo,separator,forecolor,backcolor + 400 diff --git a/source/java/org/alfresco/web/bean/wcm/RegenerateRenditionsWizard.java b/source/java/org/alfresco/web/bean/wcm/RegenerateRenditionsWizard.java index d41cfa3318..03b010354b 100644 --- a/source/java/org/alfresco/web/bean/wcm/RegenerateRenditionsWizard.java +++ b/source/java/org/alfresco/web/bean/wcm/RegenerateRenditionsWizard.java @@ -69,6 +69,7 @@ import org.alfresco.web.ui.wcm.WebResources; import org.apache.commons.io.FilenameUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +import org.springframework.util.StringUtils; import org.w3c.dom.Document; /** @@ -113,6 +114,26 @@ public class RegenerateRenditionsWizard } LOGGER.debug("updating " + diffList.size() + " renditions in staging"); this.avmSyncService.update(diffList, null, true, true, true, true, null, null); + final StringBuilder description = new StringBuilder(); + if (this.regenerateScope.equals(REGENERATE_SCOPE_FORM)) + { + description.append("regenerated all renditions for content authored using forms "). + append(StringUtils.arrayToDelimitedString(this.selectedForms, ", ")). + append("."); + } + else if (this.regenerateScope.equals(REGENERATE_SCOPE_RENDERING_ENGINE_TEMPLATE)) + { + description.append("regenerated all renditions generated by "). + append(StringUtils.arrayToDelimitedString(this.selectedRenderingEngineTemplates, ", ")). + append("."); + } + else + { + description.append("regenerated all renditions in web project " + this.selectedWebProject.getName()); + } + this.avmService.createSnapshot(this.selectedWebProject.getStoreId(), + "regenerated renditions", + description.toString()); } return outcome; } diff --git a/source/java/org/alfresco/web/forms/xforms/XFormsProcessor.java b/source/java/org/alfresco/web/forms/xforms/XFormsProcessor.java index 13d47e8782..8453fc6390 100644 --- a/source/java/org/alfresco/web/forms/xforms/XFormsProcessor.java +++ b/source/java/org/alfresco/web/forms/xforms/XFormsProcessor.java @@ -278,7 +278,7 @@ public class XFormsProcessor public final String xmlSchemaType; public final String appearance; public final String javascriptClassName; - private List params; + private final Map params = new HashMap(); public WidgetConfigElement(final String xformsType, final String xmlSchemaType, @@ -295,20 +295,16 @@ public class XFormsProcessor this.javascriptClassName = javascriptClassName; } - public void addParam(final String p) + public void addParam(final String k, final String v) { - if (this.params == null) - { - this.params = new LinkedList(); - } - this.params.add(p); + this.params.put(k, v); } - public List getParams() + public Map getParams() { return (this.params == null - ? (List)Collections.EMPTY_LIST - : Collections.unmodifiableList(this.params)); + ? (Map)Collections.EMPTY_MAP + : Collections.unmodifiableMap(this.params)); } public int compareTo(final WidgetConfigElement other) @@ -367,7 +363,7 @@ public class XFormsProcessor final List params = ce.getChildren("param"); for (final ConfigElement p : params) { - wce.addParam(p.getValue()); + wce.addParam(p.getAttribute("name"), p.getValue()); } widgetConfigs.add(wce); } @@ -391,7 +387,10 @@ public class XFormsProcessor final JSONObject o = new JSONObject(); schemaTypeObject.put(s, o); o.put("className", wce.javascriptClassName); - o.put("params", wce.getParams()); + if (wce.getParams().size() != 0) + { + o.put("params", new JSONObject(wce.getParams())); + } } return result; } diff --git a/source/web/scripts/ajax/xforms.js b/source/web/scripts/ajax/xforms.js index 4b0a2f599b..0e3e796b5a 100644 --- a/source/web/scripts/ajax/xforms.js +++ b/source/web/scripts/ajax/xforms.js @@ -814,7 +814,7 @@ dojo.declare("alfresco.xforms.RichTextEditor", function(xform, xformsNode, params) { this._focused = false; - this._tinyMCE_buttons = params; + this._params = params; if (!this.statics.tinyMCEInitialized) { this.statics.tinyMCEInitialized = true; @@ -846,9 +846,13 @@ dojo.declare("alfresco.xforms.RichTextEditor", this.statics.currentInstance = this; - tinyMCE.settings.theme_advanced_buttons1 = this._tinyMCE_buttons[0] || ""; - tinyMCE.settings.theme_advanced_buttons2 = this._tinyMCE_buttons[1] || ""; - tinyMCE.settings.theme_advanced_buttons3 = this._tinyMCE_buttons[2] || ""; + tinyMCE.settings.theme_advanced_buttons1 = this._params["theme_advanced_buttons1"] || ""; + tinyMCE.settings.theme_advanced_buttons2 = this._params["theme_advanced_buttons2"] || ""; + tinyMCE.settings.theme_advanced_buttons3 = this._params["theme_advanced_buttons3"] || ""; + if (this._params["height"]) + { + tinyMCE.settings.height = parseInt(this._params["height"]); + } tinyMCE.addMCEControl(this.widget, this.id); var editorDocument = tinyMCE.getInstanceById(this.id).getDoc(); @@ -868,9 +872,17 @@ dojo.declare("alfresco.xforms.RichTextEditor", { attach_point.appendChild(this.domNode); dojo.html.prependClass(this.domNode, "xformsTextArea"); + if (this._params["height"]) + { + this.domNode.style.height = parseInt(this._params["height"]) + "px"; + } this.widget = document.createElement("div"); this.domNode.appendChild(this.widget); dojo.html.prependClass(this.widget, "xformsTextArea"); + if (this._params["height"]) + { + this.widget.style.height = parseInt(this._params["height"]) + "px"; + } this.widget.style.border = "1px solid black"; this.widget.style.overflow = "auto"; this.widget.innerHTML = this.getInitialValue() || "";