mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Couple of fixes to presence space custom view scripts
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@7478 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -35,20 +35,28 @@
|
||||
<span class="label">Space nodeRef:</span>
|
||||
<span class="data"><input type="text" name="n" size="64" /><br />e.g. "workspace://SpacesStore/e3741425-35cf-11dc-9762-4b73d0280543"</span>
|
||||
</div>
|
||||
|
||||
|
||||
<#if args.advanced?exists>
|
||||
<div class="field">
|
||||
<span class="label">Webscript URL:</span>
|
||||
<span class="data"><input type="text" name="w" size="64" value="/wcs/ui/presence/status?nodeRef={noderef}" /></span>
|
||||
<input type="hidden" name="advanced" value="${args.advanced}" />
|
||||
</div>
|
||||
|
||||
<#else>
|
||||
<input type="hidden" name="w" value="/wcs/ui/presence/status?nodeRef={noderef}" />
|
||||
</#if>
|
||||
|
||||
<div class="field">
|
||||
<span><input type="submit" value="submit" /></span>
|
||||
<span><input type="submit" value="Add" name="add" /></span>
|
||||
<span><input type="submit" value="Remove" name="remove" /></span>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
<#if args.n?exists>
|
||||
<#if args.add?exists>
|
||||
<div class="action">Aspect added to space.</div>
|
||||
<#elseif args.remove?exists>
|
||||
<div class="action">Aspect removed from space.</div>
|
||||
</#if>
|
||||
</body>
|
||||
</html>
|
@@ -1,7 +1,14 @@
|
||||
if (args["n"] != null)
|
||||
{
|
||||
var dest = search.findNode(args["n"]);
|
||||
dest.addAspect("cm:webscriptable");
|
||||
dest.properties["cm:webscript"] = args["w"];
|
||||
if (args["add"] != null)
|
||||
{
|
||||
dest.addAspect("cm:webscriptable");
|
||||
dest.properties["cm:webscript"] = args["w"];
|
||||
}
|
||||
else
|
||||
{
|
||||
dest.removeAspect("cm:webscriptable");
|
||||
}
|
||||
dest.save();
|
||||
}
|
||||
|
@@ -1,3 +1,4 @@
|
||||
<#assign maxRecentDocs = 5>
|
||||
<script type="text/javascript" src="${url.context}/scripts/ajax/presence.js"></script>
|
||||
|
||||
<div class="presenceTitle">Colleague Status</div>
|
||||
@@ -25,9 +26,9 @@
|
||||
</div>
|
||||
|
||||
<div id="recentDocsContainer">
|
||||
<div class="recentDocsTitle">Recently created or modified documents</div>
|
||||
<div class="recentDocsTitle">Recently created or modified documents<#if (maxRecentDocs != -1)><span class="recentDocsTitleExtra">(showing ${maxRecentDocs} max.)</span></#if></div>
|
||||
<div id="recentDocsTable">
|
||||
<table cellspacing="0" cellpadding="3" border="0">
|
||||
<table cellspacing="1" cellpadding="2" border="0">
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><b>Name</b></td>
|
||||
@@ -35,14 +36,17 @@
|
||||
<td><b>Modified Date</b></td>
|
||||
</tr>
|
||||
<#assign rowNum=0>
|
||||
<#list space.childrenByXPath[".//*[subtypeOf('cm:content')]"] as child>
|
||||
<#list space.childrenByXPath[".//*[subtypeOf('cm:content')]"]?sort_by(['properties','cm:modified'])?reverse as child>
|
||||
<#if (dateCompare(child.properties["cm:modified"], date, 1000*60*60*24*7) == 1) || (dateCompare(child.properties["cm:created"], date, 1000*60*60*24*7) == 1)>
|
||||
<#assign rowNum = rowNum + 1>
|
||||
<#if ((maxRecentDocs != -1) && (rowNum > maxRecentDocs))>
|
||||
<#break>
|
||||
</#if>
|
||||
<tr class="recentDoc ${(rowNum % 2 = 0)?string("even", "odd")}">
|
||||
<td><a href="${url.context}${child.url}" target="new"><img src="${url.context}${child.icon16}" alt="*" border="0"></a></td>
|
||||
<td><a href="${url.context}${child.url}" target="new">${child.properties.name}</a></td>
|
||||
<td>${child.properties["cm:created"]?datetime}</td>
|
||||
<td>${child.properties["cm:modified"]?datetime}</td>
|
||||
<td> <a href="${url.context}${child.url}" target="new">${child.properties.name}</a> </td>
|
||||
<td> ${child.properties["cm:created"]?datetime} </td>
|
||||
<td> ${child.properties["cm:modified"]?datetime} </td>
|
||||
</tr>
|
||||
</#if>
|
||||
</#list>
|
||||
@@ -116,7 +120,7 @@
|
||||
{
|
||||
background-image: url(${url.context}/images/icons/presence_yahoo_offline.png) !important;
|
||||
}
|
||||
.presenceStatus.unknown
|
||||
.presenceStatus.unknown, .presenceStatus.skype-unknown, .presenceStatus.yahoo-unknown
|
||||
{
|
||||
background-image: url(${url.context}/images/icons/presence_status_unknown.png) !important;
|
||||
}
|
||||
@@ -140,6 +144,13 @@
|
||||
float: left;
|
||||
}
|
||||
|
||||
.recentDocsTitleExtra
|
||||
{
|
||||
font-size: small;
|
||||
font-style: italic;
|
||||
margin-left: 0.5em;
|
||||
}
|
||||
|
||||
#recentDocsContainer
|
||||
{
|
||||
float: left;
|
||||
|
@@ -29,12 +29,12 @@ function parsePermissions(space)
|
||||
tokens = perm.split(";");
|
||||
if (tokens[0] == "ALLOWED")
|
||||
{
|
||||
if (("CollaboratorContributorCoordinatorEditor").indexOf(tokens[2]) != -1)
|
||||
if (("AllCollaboratorContributorCoordinatorEditor").indexOf(tokens[2]) != -1)
|
||||
{
|
||||
user = people.getPerson(tokens[1]);
|
||||
if (user != null)
|
||||
{
|
||||
pushUnique(results, user, presence.getDetails(user));
|
||||
pushUnique(user, presence.getDetails(user));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -43,7 +43,7 @@ function parsePermissions(space)
|
||||
{
|
||||
for each(user in people.getMembers(group))
|
||||
{
|
||||
pushUnique(results, user, presence.getDetails(user));
|
||||
pushUnique(user, presence.getDetails(user));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -56,7 +56,7 @@ function parsePermissions(space)
|
||||
}
|
||||
}
|
||||
|
||||
function pushUnique(results, user, details)
|
||||
function pushUnique(user, details)
|
||||
{
|
||||
var provider = String(details).split("|")[0];
|
||||
if (provider == "null")
|
||||
|
Reference in New Issue
Block a user