mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
fix for IE and tinymce. IE doesn't pay attention to blur event. need to use beforedeactivate which is kinda funky.
also quieting down certain unimplemented errors and a not particularly consequential error with IE and tiny mce involving setValue. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@4856 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -34,7 +34,7 @@
|
|||||||
<div id="outer">
|
<div id="outer">
|
||||||
<div id="inner">
|
<div id="inner">
|
||||||
<div id="sabout">
|
<div id="sabout">
|
||||||
<p><a href="/about/index.html">Company</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="/about/contact/index.html">Contact</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="/media/releases/index.jsp">News</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="/about/events/index.html">Events</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="/about/people/index.html">People</a></p>
|
<p><a href="/about/index.html">Company</a> | <a href="/about/contact/index.html">Contact</a> | <a href="/media/releases/index.jsp">News</a> | <a href="/about/events/index.html">Events</a> | <a href="/about/people/index.html">People</a></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -515,7 +515,14 @@ dojo.declare("alfresco.xforms.DatePicker",
|
|||||||
|
|
||||||
setValue: function(value)
|
setValue: function(value)
|
||||||
{
|
{
|
||||||
throw new Error("setValue unimplemented for DatePicker");
|
if (!this.widget)
|
||||||
|
{
|
||||||
|
this.setInitialValue(value);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw new Error("setValue unimplemented for DatePicker");
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
getValue: function()
|
getValue: function()
|
||||||
@@ -637,7 +644,10 @@ dojo.declare("alfresco.xforms.TextArea",
|
|||||||
|
|
||||||
var editorDocument = tinyMCE.getInstanceById(this.id).getDoc();
|
var editorDocument = tinyMCE.getInstanceById(this.id).getDoc();
|
||||||
editorDocument.widget = this;
|
editorDocument.widget = this;
|
||||||
tinyMCE.addEvent(editorDocument, "blur", this._tinyMCE_blurHandler);
|
|
||||||
|
tinyMCE.addEvent(editorDocument,
|
||||||
|
dojo.render.html.ie ? "beforedeactivate" : "blur",
|
||||||
|
this._tinyMCE_blurHandler);
|
||||||
tinyMCE.addEvent(editorDocument, "focus", this._tinyMCE_focusHandler);
|
tinyMCE.addEvent(editorDocument, "focus", this._tinyMCE_focusHandler);
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -668,7 +678,15 @@ dojo.declare("alfresco.xforms.TextArea",
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
tinyMCE.selectedInstance = tinyMCE.getInstanceById(this.id);
|
tinyMCE.selectedInstance = tinyMCE.getInstanceById(this.id);
|
||||||
tinyMCE.setContent(value);
|
try
|
||||||
|
{
|
||||||
|
tinyMCE.setContent(value);
|
||||||
|
}
|
||||||
|
catch (e)
|
||||||
|
{
|
||||||
|
//XXXarielb figure this out - getting intermittent errors in IE.
|
||||||
|
dojo.debug(e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -707,6 +725,10 @@ dojo.declare("alfresco.xforms.TextArea",
|
|||||||
|
|
||||||
_tinyMCE_blurHandler: function(event)
|
_tinyMCE_blurHandler: function(event)
|
||||||
{
|
{
|
||||||
|
if (event.type == "beforedeactivate")
|
||||||
|
{
|
||||||
|
event.target = event.srcElement.ownerDocument;
|
||||||
|
}
|
||||||
var widget = event.target.widget;
|
var widget = event.target.widget;
|
||||||
widget.xform.setXFormsValue(widget.id, widget.getValue());
|
widget.xform.setXFormsValue(widget.id, widget.getValue());
|
||||||
this.focused = false;
|
this.focused = false;
|
||||||
@@ -867,7 +889,14 @@ dojo.declare("alfresco.xforms.Select",
|
|||||||
|
|
||||||
setValue: function(value)
|
setValue: function(value)
|
||||||
{
|
{
|
||||||
throw new Error("setValue unimplemented for Select");
|
if (!this.widget)
|
||||||
|
{
|
||||||
|
this.setInitialValue(value);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw new Error("setValue unimplemented for Select");
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
getValue: function()
|
getValue: function()
|
||||||
@@ -984,7 +1013,14 @@ dojo.declare("alfresco.xforms.Select1",
|
|||||||
|
|
||||||
setValue: function(value)
|
setValue: function(value)
|
||||||
{
|
{
|
||||||
throw new Error("setValue unimplemented for Select1");
|
if (!this.widget)
|
||||||
|
{
|
||||||
|
this.setInitialValue(value);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw new Error("setValue unimplemented for Select1");
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
getValue: function()
|
getValue: function()
|
||||||
@@ -1051,7 +1087,14 @@ dojo.declare("alfresco.xforms.Checkbox",
|
|||||||
|
|
||||||
setValue: function(value)
|
setValue: function(value)
|
||||||
{
|
{
|
||||||
this.widget.checked = value == "true";
|
if (!this.widget)
|
||||||
|
{
|
||||||
|
this.setInitialValue(value);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this.widget.checked = value == "true";
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
getValue: function()
|
getValue: function()
|
||||||
@@ -2444,7 +2487,15 @@ dojo.declare("alfresco.xforms.XForm",
|
|||||||
if ("value" in xfe.properties)
|
if ("value" in xfe.properties)
|
||||||
{
|
{
|
||||||
dojo.debug("setting " + xfe.getTarget().id + " = " + xfe.properties["value"]);
|
dojo.debug("setting " + xfe.getTarget().id + " = " + xfe.properties["value"]);
|
||||||
xfe.getTarget().setValue(xfe.properties["value"]);
|
try
|
||||||
|
{
|
||||||
|
xfe.getTarget().setValue(xfe.properties["value"]);
|
||||||
|
}
|
||||||
|
catch(e)
|
||||||
|
{
|
||||||
|
//XXXarielb remove once setValues are implemented.
|
||||||
|
dojo.debug("Error in set value: " + e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user