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

@@ -1225,10 +1225,6 @@ public class AVMBrowseBean implements IContextListener
String query = this.searchContext.buildQuery(getMinimumSearchLength()); String query = this.searchContext.buildQuery(getMinimumSearchLength());
if (query == null) if (query == null)
{ {
// failed to build a valid query, the user probably did not enter the
// minimum text required to construct a valid search
Utils.addErrorMessage(MessageFormat.format(Application.getMessage(FacesContext.getCurrentInstance(),
BrowseBean.MSG_SEARCH_MINIMUM), new Object[] {getMinimumSearchLength()}));
this.folders = Collections.<Map>emptyList(); this.folders = Collections.<Map>emptyList();
this.files = Collections.<Map>emptyList(); this.files = Collections.<Map>emptyList();
return; return;
@@ -1987,6 +1983,14 @@ public class AVMBrowseBean implements IContextListener
this.searchContext = searchContext; this.searchContext = searchContext;
resetFileFolderLists(); resetFileFolderLists();
if (searchContext.buildQuery(getMinimumSearchLength()) == null)
{
// failed to build a valid query, the user probably did not enter the
// minimum text required to construct a valid search
Utils.addErrorMessage(MessageFormat.format(Application.getMessage(FacesContext.getCurrentInstance(),
BrowseBean.MSG_SEARCH_MINIMUM), new Object[] {getMinimumSearchLength()}));
}
} }
} }

View File

@@ -45,7 +45,8 @@
{ {
if (okEnabled) if (okEnabled)
{ {
if (document.getElementById("dialog:dialog-body:subject").value.length == 0) if (document.getElementById("dialog:dialog-body:subject").value.trim().length == 0 ||
document.getElementById("dialog:dialog-body:message").value.trim().length == 0)
{ {
document.getElementById("dialog:finish-button").disabled = true; document.getElementById("dialog:finish-button").disabled = true;
} }
@@ -91,7 +92,7 @@
</h:panelGrid> </h:panelGrid>
<h:outputText value="#{msg.message}:"/> <h:outputText value="#{msg.message}:"/>
<h:inputTextarea value="#{DialogManager.bean.mailHelper.body}" rows="4" cols="75" disabled="#{DialogManager.bean.mailHelper.usingTemplate != null}" /> <h:inputTextarea id="message" value="#{DialogManager.bean.mailHelper.body}" rows="4" cols="75" disabled="#{DialogManager.bean.mailHelper.usingTemplate != null}" onkeyup="javascript:checkButtonState();" />
</h:panelGrid> </h:panelGrid>
</a:panel> </a:panel>

View File

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