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
|
||||
click_to_select_tag=Click to select tags
|
||||
add_a_tag=Add a tag
|
||||
tags=Tags
|
||||
|
||||
# Category browsing
|
||||
category_browser_plugin_label=Categories
|
||||
|
@@ -726,7 +726,7 @@
|
||||
|
||||
<config evaluator="aspect-name" condition="taggable">
|
||||
<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>
|
||||
</config>
|
||||
|
||||
|
@@ -64,6 +64,7 @@ public class PickerBean implements Serializable
|
||||
private static final long serialVersionUID = 8950457520023294902L;
|
||||
|
||||
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_ICON = "icon";
|
||||
private static final String ID_CHILDREN = "children";
|
||||
@@ -295,7 +296,7 @@ public class PickerBean implements Serializable
|
||||
if (parentRef == null)
|
||||
{
|
||||
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_SELECTABLE, false);
|
||||
}
|
||||
|
@@ -19,7 +19,6 @@
|
||||
package org.alfresco.web.ui.repo.component;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.ResourceBundle;
|
||||
@@ -43,6 +42,9 @@ import org.springframework.web.jsf.FacesContextUtils;
|
||||
public class UIAjaxTagPicker extends BaseAjaxItemPicker
|
||||
{
|
||||
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
|
||||
public String getFamily()
|
||||
@@ -80,6 +82,7 @@ public class UIAjaxTagPicker extends BaseAjaxItemPicker
|
||||
return this.label;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
/**
|
||||
* @see javax.faces.component.UIComponentBase#encodeBegin(javax.faces.context.FacesContext)
|
||||
@@ -168,7 +171,7 @@ public class UIAjaxTagPicker extends BaseAjaxItemPicker
|
||||
out.write("<script type='text/javascript'>");
|
||||
out.write("function init" + divId + "() {");
|
||||
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);");
|
||||
if (getDefaultIcon() != null)
|
||||
{
|
||||
@@ -251,16 +254,26 @@ public class UIAjaxTagPicker extends BaseAjaxItemPicker
|
||||
out.write(" <span class='pickerNavAddTag'>");
|
||||
out.write(" <span class='pickerAddTagIcon'></span>");
|
||||
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(msg.getString(MSG_ADD_A_TAG));
|
||||
out.write("</a>");
|
||||
out.write(" </span>");
|
||||
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' alt='Add' src='");
|
||||
out.write(" <img id='" + divId + "-addTag-ok' class='pickerAddTagImage' src='");
|
||||
out.write(contextPath);
|
||||
out.write("/images/office/action_successful.gif'>");
|
||||
out.write(" <img id='" + divId + "-addTag-cancel' class='pickerAddTagImage' alt='Cancel' src='");
|
||||
out.write("/images/office/action_successful.gif' alt='");
|
||||
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("/images/office/action_failed.gif'>");
|
||||
out.write("/images/office/action_failed.gif' alt='");
|
||||
out.write(msg.getString(MSG_CANCEL));
|
||||
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>");
|
||||
|
@@ -67,12 +67,20 @@ var AlfTagger = new Class(
|
||||
/* allow child selection navigation */
|
||||
allowChildNavigation: true,
|
||||
|
||||
initialize: function(id, varName, service, formClientId)
|
||||
/* label to use for Add icon */
|
||||
addLabel: null,
|
||||
|
||||
/* label to use for Remove icon */
|
||||
removeLabel: null,
|
||||
|
||||
initialize: function(id, varName, service, formClientId, addLabel, removeLabel)
|
||||
{
|
||||
this.id = id;
|
||||
this.varName = varName;
|
||||
this.service = service;
|
||||
this.formClientId = formClientId;
|
||||
this.addLabel = addLabel;
|
||||
this.removeLabel = removeLabel;
|
||||
this.selected = [];
|
||||
this.preselected = [];
|
||||
|
||||
@@ -241,7 +249,7 @@ var AlfTagger = new Class(
|
||||
var actionScript = "javascript:" + this.varName + ".delItem('" + item.id + "');";
|
||||
var actionLink = new Element("a", {"href": actionScript});
|
||||
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);
|
||||
actionLink.injectInside(actionSpan);
|
||||
actionSpan.injectInside(itemDiv);
|
||||
@@ -406,7 +414,7 @@ var AlfTagger = new Class(
|
||||
var actionScript = "javascript:" + tagger.varName + ".addItem(-1);";
|
||||
var actionLink = new Element("a", {"href": actionScript});
|
||||
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);
|
||||
actionLink.injectInside($(tagger.id + "-nav-add"));
|
||||
// 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 actionLink = new Element("a", {"href": actionScript});
|
||||
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);
|
||||
actionLink.injectInside(actionsSpan);
|
||||
|
||||
|
Reference in New Issue
Block a user