Merged V3.2E to HEAD

17355: Fix for ETHREEOH-2894 - TinyMCE html source edits are not persisted in some cases within forms
   17360: Fixed IE error when rendering site and container pickers
   17364: IE6 layout fix for DocLib toolbar and long filenames. Follow-up fix for r17360. Fix workflow pop-up.
   17370: Fixed ETHREEOH-2926 "There is no restriction that's why layout is broken."
      - new title limit is 256
      - also moved Configure link to the toolbar as for the ret of the dashlets
      - title words that are longer than the column are hidden (for all dashlets)
   17371: Fixed styling in all themes for sites & search menu that was changed a bit after the last focus/accessability changes
   17374: ETHREEOH-2513 - Null Pointer if log level is DEBUG
   17376: Fixed ETHREEOH-2920 "Spaces are not trimmed in the string entered into Search User/Group field"
   17379: Fixed ETHREEOH-1722 & ETHREEOH-1723 - subject & message must contain characters 
      - ETHREEOH-1722 "It is possible to send e-mail with Subject that consists of spaces"
      - ETHREEOH-1723 "It is possible to send e-mail with empty Message field"
   17382: Merged DEV-TEMPORARY to V3.2
      16735: ETHREEOH-1382: It's impossible to find files with short names on Staging Sandbox
             - User friendly message "Not enough information was entered to perform a search, at least one value must be entered or alocation selected to search within. Text fields require a minimum of 3 characters"

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@18118 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Kevin Roast
2010-01-19 11:03:44 +00:00
parent 85e4c0dbf1
commit 8e594817c3
3 changed files with 98 additions and 81 deletions

View File

@@ -412,14 +412,14 @@ alfresco.xforms.Widget = new Class({
/** Returns the widget's label. */
getLabel: function()
{
var result = "";
var result = "";
var node = this._getChildXFormsNode("label");
if (node && node.firstChild !== null)
{
result = node.firstChild.nodeValue;
}
if (node && node.firstChild !== null)
{
result = node.firstChild.nodeValue;
}
if (alfresco.constants.DEBUG)
{
result += " [" + this.id + "]";
@@ -545,9 +545,9 @@ alfresco.xforms.FilePicker = alfresco.xforms.Widget.extend({
this._selectableTypes = "selectable_types" in params ? params["selectable_types"].split(",") : null;
this._filterMimetypes = "filter_mimetypes" in params ? params["filter_mimetypes"].split(",") : [];
this._folderRestriction = "folder_restriction" in params ? params["folder_restriction"] : null;
this._configSearchName = "config_search_name" in params ? params["config_search_name"] : null;
this._layout = "layout" in params ? params["layout"] : null;
},
this._configSearchName = "config_search_name" in params ? params["config_search_name"] : null;
this._layout = "layout" in params ? params["layout"] : null;
},
/////////////////////////////////////////////////////////////////
// overridden methods
@@ -558,23 +558,23 @@ alfresco.xforms.FilePicker = alfresco.xforms.Widget.extend({
this.domNode.addClass("xformsFilePicker");
attach_point.appendChild(this.domNode);
//XXXarielb support readonly and disabled
if (this._layout == "table")
{
this.widget = new alfresco.FilePickerWidgetTableLayout(this.id,
this.domNode,
this.getInitialValue(),
false,
this._filePicker_changeHandler.bindAsEventListener(this),
null /* cancel is ignored */,
this._filePicker_resizeHandler.bindAsEventListener(this),
this._selectableTypes,
this._filterMimetypes,
this._folderRestriction,
this._configSearchName);
}
else
{
if (this._layout == "table")
{
this.widget = new alfresco.FilePickerWidgetTableLayout(this.id,
this.domNode,
this.getInitialValue(),
false,
this._filePicker_changeHandler.bindAsEventListener(this),
null /* cancel is ignored */,
this._filePicker_resizeHandler.bindAsEventListener(this),
this._selectableTypes,
this._filterMimetypes,
this._folderRestriction,
this._configSearchName);
}
else
{
this.widget = new alfresco.FilePickerWidget(this.id,
this.domNode,
this.getInitialValue(),
@@ -586,7 +586,7 @@ alfresco.xforms.FilePicker = alfresco.xforms.Widget.extend({
this._filterMimetypes,
this._folderRestriction,
this._configSearchName);
}
}
this.widget.render();
},
@@ -667,14 +667,14 @@ alfresco.xforms.TextField = alfresco.xforms.Widget.extend({
var borderWidth = (this.widget.offsetWidth - this.widget.clientWidth);
var marginRight = 2;
this.widget.style.marginRight = marginRight + "px";
if (attach_point.offsetWidth == 0)
{
this.widget.style.width = "100%";
}
else
{
if (attach_point.offsetWidth == 0)
{
this.widget.style.width = "100%";
}
else
{
this.widget.style.width = (((attach_point.offsetWidth - borderWidth - marginRight) / attach_point.offsetWidth) * 100) + "%";
}
}
this.widget.style.minWidth = "50px";
}
@@ -1306,7 +1306,7 @@ alfresco.xforms.CheckboxSelect = alfresco.xforms.AbstractSelectWidget.extend({
{
this.parent(value, forceCommit);
this._selectedValues = value.split(' ');
var checkboxes = this.widget.getElementsByTagName("input");
var checkboxes = this.widget.getElementsByTagName("input");
for (var i = 0; i < checkboxes.length; i++)
{
checkboxes[i].checked =
@@ -1388,7 +1388,7 @@ alfresco.xforms.ListSelect = alfresco.xforms.AbstractSelectWidget.extend({
{
this.parent(value, forceCommit);
this._selectedValues = value.split(' ');
var options = this.widget.getElementsByTagName("option");
var options = this.widget.getElementsByTagName("option");
for (var i = 0; i < options.length; i++)
{
options[i].selected =
@@ -2740,13 +2740,13 @@ alfresco.xforms.VGroup = alfresco.xforms.AbstractGroup.extend({
? "0px"
: "30%");
var contentDivWidth = "100%";
// the following does avoid devision by zero ... in contentDiv.offsetLeft / child.domContainer.offsetWidth
if (!(child instanceof alfresco.xforms.AbstractGroup) && child.domContainer.offsetWidth != 0)
{
contentDivWidth = ((1 - (contentDiv.offsetLeft / child.domContainer.offsetWidth)) * 100) + "%";
}
contentDiv.style.width = contentDivWidth;
var contentDivWidth = "100%";
// the following does avoid devision by zero ... in contentDiv.offsetLeft / child.domContainer.offsetWidth
if (!(child instanceof alfresco.xforms.AbstractGroup) && child.domContainer.offsetWidth != 0)
{
contentDivWidth = ((1 - (contentDiv.offsetLeft / child.domContainer.offsetWidth)) * 100) + "%";
}
contentDiv.style.width = contentDivWidth;
child.render(contentDiv);
if (!(child instanceof alfresco.xforms.AbstractGroup))
{
@@ -2858,14 +2858,14 @@ alfresco.xforms.VGroup = alfresco.xforms.AbstractGroup.extend({
_updateDisplay: function(recursively)
{
this.domNode.style.width = "100%";
if (!window.ie)
{
this.domNode.style.width = "100%";
if (!window.ie)
{
if (this._isIndented())
{
this.domNode.style.marginLeft = 10 + "px";
this.domNode.style.marginRight = 5 + "px";
this.domNode.style.width = (((this.domNode.offsetWidth - 15) / this.domNode.offsetWidth) * 100) + "%";
}
// var x = ((this.domNode.offsetWidth - this.domNode.clientWidth) +
@@ -2890,17 +2890,17 @@ alfresco.xforms.VGroup = alfresco.xforms.AbstractGroup.extend({
contentDiv.style.left = (this._children[i] instanceof alfresco.xforms.AbstractGroup
? "0px"
: "30%");
if (this._children[i].domContainer.parentNode.offsetWidth != 0)
{
if (this._children[i].domContainer.parentNode.offsetWidth != 0)
{
contentDiv.style.width = (this._children[i] instanceof alfresco.xforms.AbstractGroup
? "100%"
: (1 - (contentDiv.offsetLeft /
this._children[i].domContainer.parentNode.offsetWidth)) * 100 + "%");
}
else
{
contentDiv.style.width = "100%";
}
}
else
{
contentDiv.style.width = "100%";
}
if (recursively)
{
@@ -3120,12 +3120,12 @@ alfresco.xforms.SwitchGroup = alfresco.xforms.VGroup.extend({
_insertChildAt: function(child, position)
{
var childDomContainer = this.parent(child, position);
if (child.id == this._selectedCaseId)
{
this._getCaseToggleTriggerByCaseId(this._selectedCaseId).fire();
}
return childDomContainer;
},
@@ -3562,7 +3562,7 @@ alfresco.xforms.Repeat = alfresco.xforms.VGroup.extend({
this._groupHeaderNode.repeat = this;
this._groupHeaderNode.onclick = function(event)
{
if ((typeof(event) != 'undefined') && (typeof(event.target) != 'undefined') && (event.target == event.currentTarget))
if ((typeof(event) != 'undefined') && (typeof(event.target) != 'undefined') && (event.target == event.currentTarget))
{
event.currentTarget.repeat.setFocusedChild(null);
}
@@ -4165,21 +4165,21 @@ alfresco.xforms.XForm = new Class({
" is a prototype, ignoring");
continue;
}
// fix for ETWOTWO-490, hide elements after rendering
if (xformsNode.childNodes[i].nodeName == "chiba:data" &&
parentWidget instanceof alfresco.xforms.SwitchGroup)
{
var selectedCase = parentWidget._selectedCaseId;
for (var x = 0; x < parentWidget._children.length; x++)
{
if (parentWidget._children[x].id != selectedCase)
{
parentWidget._children[x].domContainer.style.display = "none";
}
}
}
// fix for ETWOTWO-490, hide elements after rendering
if (xformsNode.childNodes[i].nodeName == "chiba:data" &&
parentWidget instanceof alfresco.xforms.SwitchGroup)
{
var selectedCase = parentWidget._selectedCaseId;
for (var x = 0; x < parentWidget._children.length; x++)
{
if (parentWidget._children[x].id != selectedCase)
{
parentWidget._children[x].domContainer.style.display = "none";
}
}
}
var w = this.createWidget(xformsNode.childNodes[i]);
if (w != null)
{
@@ -4762,11 +4762,23 @@ alfresco.constants.TINY_MCE_DEFAULT_SETTINGS =
add_form_submit_trigger: false,
theme_advanced_toolbar_location: "top",
theme_advanced_toolbar_align: "left",
theme_advanced_buttons1: "",
theme_advanced_buttons1: "fullscreen,table",
theme_advanced_buttons2: "",
theme_advanced_buttons3: "",
urlconverter_callback: "alfresco_TinyMCE_urlconverter_callback",
file_browser_callback: "alfresco_TinyMCE_file_browser_callback"
file_browser_callback: "alfresco_TinyMCE_file_browser_callback",
setup : function(ed)
{
// Fix for issue in browsers where content is not saved after fullscreen mode is toggled off
ed.onSetContent.add(function(ed, o) {
//if fullscreen plugin is available and o has these values, then we're coming out of fullscreen mode only
if ((ed.settings.plugins.indexOf('fullscreen')!=-1) && o.set && o.format==='raw' && o.initial===undefined)
{
alfresco.xforms.RichTextEditor.currentInstance._commitValueChange(alfresco.xforms.RichTextEditor.currentInstance.getValue());
}
});
}
};
tinyMCE.init($extend({}, alfresco.constants.TINY_MCE_DEFAULT_SETTINGS));