mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged BRANCHES/V3.4 to HEAD:
24209: Fixes for screenshot 5 in ALF-5590: Translation errors in Explorer git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@24211 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -2040,6 +2040,8 @@ go_up=Go up
|
|||||||
|
|
||||||
# Tag picker
|
# Tag picker
|
||||||
click_to_select_tag=Click to select tags
|
click_to_select_tag=Click to select tags
|
||||||
|
add_a_tag=Add a tag
|
||||||
|
tags=Tags
|
||||||
|
|
||||||
# Category browsing
|
# Category browsing
|
||||||
category_browser_plugin_label=Categories
|
category_browser_plugin_label=Categories
|
||||||
|
@@ -726,7 +726,7 @@
|
|||||||
|
|
||||||
<config evaluator="aspect-name" condition="taggable">
|
<config evaluator="aspect-name" condition="taggable">
|
||||||
<property-sheet>
|
<property-sheet>
|
||||||
<show-property name="cm:taggable" display-label="Tags" show-in-edit-mode="true" component-generator="AjaxTagPickerGenerator" />
|
<show-property name="cm:taggable" show-in-edit-mode="true" component-generator="AjaxTagPickerGenerator" />
|
||||||
</property-sheet>
|
</property-sheet>
|
||||||
</config>
|
</config>
|
||||||
|
|
||||||
|
@@ -64,6 +64,7 @@ public class PickerBean implements Serializable
|
|||||||
private static final long serialVersionUID = 8950457520023294902L;
|
private static final long serialVersionUID = 8950457520023294902L;
|
||||||
|
|
||||||
private static final String MSG_CATEGORIES = "categories";
|
private static final String MSG_CATEGORIES = "categories";
|
||||||
|
private static final String MSG_TAGS = "tags";
|
||||||
private static final String ID_URL = "url";
|
private static final String ID_URL = "url";
|
||||||
private static final String ID_ICON = "icon";
|
private static final String ID_ICON = "icon";
|
||||||
private static final String ID_CHILDREN = "children";
|
private static final String ID_CHILDREN = "children";
|
||||||
@@ -295,7 +296,7 @@ public class PickerBean implements Serializable
|
|||||||
if (parentRef == null)
|
if (parentRef == null)
|
||||||
{
|
{
|
||||||
out.writeNullValue(ID_ID);
|
out.writeNullValue(ID_ID);
|
||||||
out.writeValue(ID_NAME, "Tags");
|
out.writeValue(ID_NAME, Application.getMessage(fc, MSG_TAGS));
|
||||||
out.writeValue(ID_ISROOT, true);
|
out.writeValue(ID_ISROOT, true);
|
||||||
out.writeValue(ID_SELECTABLE, false);
|
out.writeValue(ID_SELECTABLE, false);
|
||||||
}
|
}
|
||||||
|
@@ -19,7 +19,6 @@
|
|||||||
package org.alfresco.web.ui.repo.component;
|
package org.alfresco.web.ui.repo.component;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.ResourceBundle;
|
import java.util.ResourceBundle;
|
||||||
@@ -43,6 +42,9 @@ import org.springframework.web.jsf.FacesContextUtils;
|
|||||||
public class UIAjaxTagPicker extends BaseAjaxItemPicker
|
public class UIAjaxTagPicker extends BaseAjaxItemPicker
|
||||||
{
|
{
|
||||||
private static final String MSG_CLICK_TO_SELECT_TAG = "click_to_select_tag";
|
private static final String MSG_CLICK_TO_SELECT_TAG = "click_to_select_tag";
|
||||||
|
private static final String MSG_ADD = "add";
|
||||||
|
private static final String MSG_ADD_A_TAG = "add_a_tag";
|
||||||
|
private static final String MSG_REMOVE = "remove";
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getFamily()
|
public String getFamily()
|
||||||
@@ -80,6 +82,7 @@ public class UIAjaxTagPicker extends BaseAjaxItemPicker
|
|||||||
return this.label;
|
return this.label;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
@Override
|
@Override
|
||||||
/**
|
/**
|
||||||
* @see javax.faces.component.UIComponentBase#encodeBegin(javax.faces.context.FacesContext)
|
* @see javax.faces.component.UIComponentBase#encodeBegin(javax.faces.context.FacesContext)
|
||||||
@@ -168,8 +171,8 @@ public class UIAjaxTagPicker extends BaseAjaxItemPicker
|
|||||||
out.write("<script type='text/javascript'>");
|
out.write("<script type='text/javascript'>");
|
||||||
out.write("function init" + divId + "() {");
|
out.write("function init" + divId + "() {");
|
||||||
out.write(" window." + objId + " = new AlfTagger('" + divId + "','" + objId + "','" + getServiceCall() +
|
out.write(" window." + objId + " = new AlfTagger('" + divId + "','" + objId + "','" + getServiceCall() +
|
||||||
"','" + formClientId + "');");
|
"','" + formClientId + "','" + msg.getString(MSG_ADD) + "','" + msg.getString(MSG_REMOVE) + "');");
|
||||||
out.write(" window." + objId + ".setChildNavigation(false);");
|
out.write(" window." + objId + ".setChildNavigation(false);");
|
||||||
if (getDefaultIcon() != null)
|
if (getDefaultIcon() != null)
|
||||||
{
|
{
|
||||||
out.write(" window." + objId + ".setDefaultIcon('" + getDefaultIcon() + "');");
|
out.write(" window." + objId + ".setDefaultIcon('" + getDefaultIcon() + "');");
|
||||||
@@ -204,32 +207,32 @@ public class UIAjaxTagPicker extends BaseAjaxItemPicker
|
|||||||
out.write((String)attrs.get("styleClass"));
|
out.write((String)attrs.get("styleClass"));
|
||||||
}
|
}
|
||||||
out.write(">");
|
out.write(">");
|
||||||
if (isDisabled())
|
if (isDisabled())
|
||||||
{
|
{
|
||||||
out.write(" <span>");
|
out.write(" <span>");
|
||||||
if (selectedNames != null)
|
if (selectedNames != null)
|
||||||
{
|
{
|
||||||
out.write(selectedNames);
|
out.write(selectedNames);
|
||||||
}
|
}
|
||||||
out.write(" </span>");
|
out.write(" </span>");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
out.write(" <span class='pickerActionButton'><a href='javascript:" + objId + ".showSelector();'>");
|
out.write(" <span class='pickerActionButton'><a href='javascript:" + objId + ".showSelector();'>");
|
||||||
if (selectedNames == null)
|
if (selectedNames == null)
|
||||||
{
|
{
|
||||||
if ("".equals(getLabel()))
|
if ("".equals(getLabel()))
|
||||||
{
|
{
|
||||||
setLabel(msg.getString(MSG_CLICK_TO_SELECT_TAG));
|
setLabel(msg.getString(MSG_CLICK_TO_SELECT_TAG));
|
||||||
}
|
}
|
||||||
out.write(getLabel());
|
out.write(getLabel());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
out.write(selectedNames);
|
out.write(selectedNames);
|
||||||
}
|
}
|
||||||
out.write(" </a></span>");
|
out.write(" </a></span>");
|
||||||
}
|
}
|
||||||
out.write(" </div>");
|
out.write(" </div>");
|
||||||
// container for item navigation
|
// container for item navigation
|
||||||
out.write(" <div id='" + divId + "-selector' class='pickerSelector'>");
|
out.write(" <div id='" + divId + "-selector' class='pickerSelector'>");
|
||||||
@@ -248,21 +251,31 @@ public class UIAjaxTagPicker extends BaseAjaxItemPicker
|
|||||||
out.write(" <span class='pickerNavBreadcrumb'>");
|
out.write(" <span class='pickerNavBreadcrumb'>");
|
||||||
out.write(" <span id='" + divId + "-nav-txt' class='pickerNavBreadcrumbText'></span></a>");
|
out.write(" <span id='" + divId + "-nav-txt' class='pickerNavBreadcrumbText'></span></a>");
|
||||||
out.write(" </span>");
|
out.write(" </span>");
|
||||||
out.write(" <span class='pickerNavAddTag'>");
|
out.write(" <span class='pickerNavAddTag'>");
|
||||||
out.write(" <span class='pickerAddTagIcon'></span>");
|
out.write(" <span class='pickerAddTagIcon'></span>");
|
||||||
out.write(" <span id='" + divId + "-addTag-linkContainer' class='pickerAddTagLinkContainer'>");
|
out.write(" <span id='" + divId + "-addTag-linkContainer' class='pickerAddTagLinkContainer'>");
|
||||||
out.write(" <a href='#' onclick='window." + objId + ".showAddTagForm(); return false;'>Add a tag</a>");
|
out.write(" <a href='#' onclick='window." + objId + ".showAddTagForm(); return false;'>");
|
||||||
out.write(" </span>");
|
out.write(msg.getString(MSG_ADD_A_TAG));
|
||||||
out.write(" <span id='" + divId + "-addTag-formContainer' class='pickerAddTagFormContainer'>");
|
out.write("</a>");
|
||||||
out.write(" <input id='" + divId + "-addTag-box' class='pickerAddTagBox' name='" + divId + "-addTag-box' type='text'>");
|
out.write(" </span>");
|
||||||
out.write(" <img id='" + divId + "-addTag-ok' class='pickerAddTagImage' alt='Add' src='");
|
out.write(" <span id='" + divId + "-addTag-formContainer' class='pickerAddTagFormContainer'>");
|
||||||
|
out.write(" <input id='" + divId + "-addTag-box' class='pickerAddTagBox' name='" + divId + "-addTag-box' type='text'>");
|
||||||
|
out.write(" <img id='" + divId + "-addTag-ok' class='pickerAddTagImage' src='");
|
||||||
out.write(contextPath);
|
out.write(contextPath);
|
||||||
out.write("/images/office/action_successful.gif'>");
|
out.write("/images/office/action_successful.gif' alt='");
|
||||||
out.write(" <img id='" + divId + "-addTag-cancel' class='pickerAddTagImage' alt='Cancel' src='");
|
out.write(msg.getString(MSG_ADD));
|
||||||
|
out.write("' title='");
|
||||||
|
out.write(msg.getString(MSG_ADD));
|
||||||
|
out.write("'>");
|
||||||
|
out.write(" <img id='" + divId + "-addTag-cancel' class='pickerAddTagImage' src='");
|
||||||
out.write(contextPath);
|
out.write(contextPath);
|
||||||
out.write("/images/office/action_failed.gif'>");
|
out.write("/images/office/action_failed.gif' alt='");
|
||||||
out.write(" </span>");
|
out.write(msg.getString(MSG_CANCEL));
|
||||||
out.write(" </span>");
|
out.write("' title='");
|
||||||
|
out.write(msg.getString(MSG_CANCEL));
|
||||||
|
out.write("'>");
|
||||||
|
out.write(" </span>");
|
||||||
|
out.write(" </span>");
|
||||||
out.write(" <span id='" + divId + "-nav-add'></span>");
|
out.write(" <span id='" + divId + "-nav-add'></span>");
|
||||||
out.write(" </div>");
|
out.write(" </div>");
|
||||||
out.write(" </div>");
|
out.write(" </div>");
|
||||||
|
@@ -66,13 +66,21 @@ var AlfTagger = new Class(
|
|||||||
|
|
||||||
/* allow child selection navigation */
|
/* allow child selection navigation */
|
||||||
allowChildNavigation: true,
|
allowChildNavigation: true,
|
||||||
|
|
||||||
|
/* label to use for Add icon */
|
||||||
|
addLabel: null,
|
||||||
|
|
||||||
|
/* label to use for Remove icon */
|
||||||
|
removeLabel: null,
|
||||||
|
|
||||||
initialize: function(id, varName, service, formClientId)
|
initialize: function(id, varName, service, formClientId, addLabel, removeLabel)
|
||||||
{
|
{
|
||||||
this.id = id;
|
this.id = id;
|
||||||
this.varName = varName;
|
this.varName = varName;
|
||||||
this.service = service;
|
this.service = service;
|
||||||
this.formClientId = formClientId;
|
this.formClientId = formClientId;
|
||||||
|
this.addLabel = addLabel;
|
||||||
|
this.removeLabel = removeLabel;
|
||||||
this.selected = [];
|
this.selected = [];
|
||||||
this.preselected = [];
|
this.preselected = [];
|
||||||
|
|
||||||
@@ -241,7 +249,7 @@ var AlfTagger = new Class(
|
|||||||
var actionScript = "javascript:" + this.varName + ".delItem('" + item.id + "');";
|
var actionScript = "javascript:" + this.varName + ".delItem('" + item.id + "');";
|
||||||
var actionLink = new Element("a", {"href": actionScript});
|
var actionLink = new Element("a", {"href": actionScript});
|
||||||
var deleteIcon = new Element("img", {"src": getContextPath() + "/images/icons/minus.gif", "class": "pickerSelectedIcon",
|
var deleteIcon = new Element("img", {"src": getContextPath() + "/images/icons/minus.gif", "class": "pickerSelectedIcon",
|
||||||
"border": 0, "title": "Remove", "alt": "Remove"});
|
"border": 0, "title": this.removeLabel, "alt": this.removeLabel});
|
||||||
deleteIcon.injectInside(actionLink);
|
deleteIcon.injectInside(actionLink);
|
||||||
actionLink.injectInside(actionSpan);
|
actionLink.injectInside(actionSpan);
|
||||||
actionSpan.injectInside(itemDiv);
|
actionSpan.injectInside(itemDiv);
|
||||||
@@ -406,7 +414,7 @@ var AlfTagger = new Class(
|
|||||||
var actionScript = "javascript:" + tagger.varName + ".addItem(-1);";
|
var actionScript = "javascript:" + tagger.varName + ".addItem(-1);";
|
||||||
var actionLink = new Element("a", {"href": actionScript});
|
var actionLink = new Element("a", {"href": actionScript});
|
||||||
var actionImg = new Element("img", {"id": actionId, "src": getContextPath() + "/images/icons/plus.gif", "class": "taggerActionButton",
|
var actionImg = new Element("img", {"id": actionId, "src": getContextPath() + "/images/icons/plus.gif", "class": "taggerActionButton",
|
||||||
"border": 0, "title": "Add", "alt": "Add"});
|
"border": 0, "title": this.addLabel, "alt": this.addLabel});
|
||||||
actionImg.injectInside(actionLink);
|
actionImg.injectInside(actionLink);
|
||||||
actionLink.injectInside($(tagger.id + "-nav-add"));
|
actionLink.injectInside($(tagger.id + "-nav-add"));
|
||||||
// style modification for this Add button - it's inside a floating div unlike the others
|
// style modification for this Add button - it's inside a floating div unlike the others
|
||||||
@@ -466,7 +474,7 @@ var AlfTagger = new Class(
|
|||||||
var actionScript = "javascript:" + this.varName + ".addItem(" + index + ");";
|
var actionScript = "javascript:" + this.varName + ".addItem(" + index + ");";
|
||||||
var actionLink = new Element("a", {"href": actionScript});
|
var actionLink = new Element("a", {"href": actionScript});
|
||||||
var actionImg = new Element("img", {"id": actionId, "src": getContextPath() + "/images/icons/plus.gif", "class": "pickerActionButton",
|
var actionImg = new Element("img", {"id": actionId, "src": getContextPath() + "/images/icons/plus.gif", "class": "pickerActionButton",
|
||||||
"border": 0, "title": "Add", "alt": "Add"});
|
"border": 0, "title": this.addLabel, "alt": this.addLabel});
|
||||||
actionImg.injectInside(actionLink);
|
actionImg.injectInside(actionLink);
|
||||||
actionLink.injectInside(actionsSpan);
|
actionLink.injectInside(actionsSpan);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user