making height for rich text editor widget paramaterizable. adding snapshot after regenerating renditions.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5990 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Ariel Backenroth
2007-06-15 22:08:58 +00:00
parent 460092a901
commit 9ee0de2054
4 changed files with 52 additions and 19 deletions

View File

@@ -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() || "";