mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
. First part of the Clipboard UI refactoring ready for AVM node support
- Clipboard actions now based on NodeRef not "id" - Added notion of "workspace" and "AVM" specific clipboard items - Clipboard bean supports creating different ClipboardItem types (workspace or avm) . ActionLink parameters are now "toString()"ed rather than assumed String . Optimization to Portal Tree Navigator support git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@4924 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -96,16 +96,7 @@ public abstract class BaseRenderer extends Renderer
|
||||
if (child instanceof UIParameter)
|
||||
{
|
||||
final UIParameter param = (UIParameter)child;
|
||||
if (param.getValue() == null || param.getValue() instanceof String)
|
||||
{
|
||||
params.put(param.getName(), (String)param.getValue());
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new ClassCastException("value of parameter " + param.getName() +
|
||||
" is a " + param.getValue().getClass().getName() +
|
||||
". Expected a " + String.class.getName());
|
||||
}
|
||||
params.put(param.getName(), param.getValue() != null ? param.getValue().toString() : null);
|
||||
}
|
||||
}
|
||||
return params;
|
||||
|
@@ -160,7 +160,7 @@ public class UIClipboardShelfItem extends UIShelfItem
|
||||
|
||||
// start row with cut/copy state icon
|
||||
out.write("<tr><td width=16>");
|
||||
if (item.Mode == ClipboardStatus.COPY)
|
||||
if (item.getMode() == ClipboardStatus.COPY)
|
||||
{
|
||||
out.write(Utils.buildImageTag(context, WebResources.IMAGE_COPY, 14, 16, bundle.getString(MSG_COPY), null, "absmiddle"));
|
||||
}
|
||||
@@ -170,10 +170,10 @@ public class UIClipboardShelfItem extends UIShelfItem
|
||||
}
|
||||
out.write("</td><td width=16>");
|
||||
|
||||
if (dd.isSubClass(item.Node.getType(), ContentModel.TYPE_FOLDER))
|
||||
if (dd.isSubClass(item.getType(), ContentModel.TYPE_FOLDER))
|
||||
{
|
||||
// start row with correct node icon
|
||||
String icon = (String)item.Node.getProperties().get("app:icon");
|
||||
String icon = (String)item.getIcon();
|
||||
if (icon != null)
|
||||
{
|
||||
icon = "/images/icons/" + icon + "-16.gif";
|
||||
@@ -186,21 +186,21 @@ public class UIClipboardShelfItem extends UIShelfItem
|
||||
}
|
||||
else
|
||||
{
|
||||
String image = Utils.getFileTypeImage(item.Node.getName(), true);
|
||||
String image = Utils.getFileTypeImage(item.getName(), true);
|
||||
out.write(Utils.buildImageTag(context, image, null, "absmiddle"));
|
||||
}
|
||||
|
||||
// output cropped item label - we also output with no breaks, this is ok
|
||||
// as the copped label will ensure a sensible maximum width
|
||||
out.write("</td><td width=100%><nobr> ");
|
||||
out.write(Utils.cropEncode(item.Node.getName()));
|
||||
out.write(Utils.cropEncode(item.getName()));
|
||||
|
||||
// output actions
|
||||
out.write("</nobr></td><td align=right><nobr>");
|
||||
out.write(buildActionLink(ACTION_REMOVE_ITEM, i, bundle.getString(MSG_REMOVE_ITEM), WebResources.IMAGE_REMOVE));
|
||||
out.write(" ");
|
||||
out.write(buildActionLink(ACTION_PASTE_ITEM, i, bundle.getString(MSG_PASTE_ITEM), WebResources.IMAGE_PASTE));
|
||||
if (item.Mode == ClipboardStatus.COPY && dd.isSubClass(item.Node.getType(), ContentModel.TYPE_LINK) == false)
|
||||
if (item.getMode() == ClipboardStatus.COPY && dd.isSubClass(item.getType(), ContentModel.TYPE_LINK) == false)
|
||||
{
|
||||
out.write(" ");
|
||||
out.write(buildActionLink(ACTION_PASTE_LINK, i, bundle.getString(MSG_PASTE_LINK), WebResources.IMAGE_PASTE_LINK));
|
||||
|
Reference in New Issue
Block a user