mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Project subSpaces ordered by name. Also layout bug fix to presence for IE
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@7588 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -5,6 +5,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="colleagueList" rel="${colleaguePresence.colleagues?size}">
|
<div class="colleagueList" rel="${colleaguePresence.colleagues?size}">
|
||||||
<div id="colleaguesOnline">
|
<div id="colleaguesOnline">
|
||||||
|
</div>
|
||||||
|
<div id="colleaguesNotOnline">
|
||||||
<#list colleaguePresence.colleagues?keys as key>
|
<#list colleaguePresence.colleagues?keys as key>
|
||||||
<#assign c = colleaguePresence.colleagues[key]>
|
<#assign c = colleaguePresence.colleagues[key]>
|
||||||
<div class="colleagueRow">
|
<div class="colleagueRow">
|
||||||
@@ -26,8 +28,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</#list>
|
</#list>
|
||||||
</div>
|
</div>
|
||||||
<div id="colleaguesNotOnline">
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="collabFooter">
|
<div class="collabFooter">
|
||||||
<span> </span>
|
<span> </span>
|
||||||
@@ -41,21 +41,24 @@
|
|||||||
.colleagueList {
|
.colleagueList {
|
||||||
border-left: 1px solid #B9BEC4;
|
border-left: 1px solid #B9BEC4;
|
||||||
border-right: 1px solid #B9BEC4;
|
border-right: 1px solid #B9BEC4;
|
||||||
min-height: 290px;
|
height: 400px;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
}
|
}
|
||||||
|
|
||||||
#colleaguesOnline {
|
#colleaguesOnline {
|
||||||
|
float: left;
|
||||||
}
|
}
|
||||||
#colleaguesNotOnline {
|
#colleaguesNotOnline {
|
||||||
|
float: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
.colleagueRow {
|
.colleagueRow {
|
||||||
clear: both;
|
clear: both;
|
||||||
|
float: left;
|
||||||
min-height: 56px;
|
min-height: 56px;
|
||||||
padding: 8px 8px 0px;
|
padding: 8px 8px 0px;
|
||||||
|
width: 208px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.colleagueAvatar {
|
.colleagueAvatar {
|
||||||
|
@@ -8,7 +8,7 @@
|
|||||||
<table width="100%" cellpadding="16" cellspacing="0">
|
<table width="100%" cellpadding="16" cellspacing="0">
|
||||||
<tr valign="top">
|
<tr valign="top">
|
||||||
<td>
|
<td>
|
||||||
<#list projectSpace.subSpaces?keys as key>
|
<#list projectSpace.subSpaces?keys?sort as key>
|
||||||
<#assign node = projectSpace.subSpaces[key]>
|
<#assign node = projectSpace.subSpaces[key]>
|
||||||
<#assign summary = node.properties["cm:summaryWebscript"]!"">
|
<#assign summary = node.properties["cm:summaryWebscript"]!"">
|
||||||
<div class="projectSpace">
|
<div class="projectSpace">
|
||||||
|
@@ -22,7 +22,7 @@ function main(nodeRef)
|
|||||||
{
|
{
|
||||||
if (node.hasAspect("{http://www.alfresco.org/model/content/1.0}projectsummary"))
|
if (node.hasAspect("{http://www.alfresco.org/model/content/1.0}projectsummary"))
|
||||||
{
|
{
|
||||||
subSpaces[node.nodeRef] = node;
|
subSpaces[node.name] = node;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -5,59 +5,67 @@ var ProjectPresence =
|
|||||||
{
|
{
|
||||||
OFFLINE_OPACITY: 0.2,
|
OFFLINE_OPACITY: 0.2,
|
||||||
|
|
||||||
init: function()
|
init: function()
|
||||||
{
|
{
|
||||||
window.contextPath = ProjectPresence.getContextPath();
|
window.contextPath = ProjectPresence.getContextPath();
|
||||||
|
|
||||||
var statuses = $$("#projectColleagues .colleaguePresence");
|
var statuses = $$("#projectColleagues .colleaguePresence");
|
||||||
var rows = $$("#projectColleagues .colleagueRow");
|
var rows = $$("#projectColleagues .colleagueRow");
|
||||||
|
|
||||||
$('colleaguesNotOnline').setStyle("opacity", ProjectPresence.OFFLINE_OPACITY);
|
$("colleaguesNotOnline").setStyle("opacity", ProjectPresence.OFFLINE_OPACITY);
|
||||||
|
|
||||||
statuses.each(function(status, i)
|
statuses.each(function(stat, i)
|
||||||
{
|
{
|
||||||
var userDetails = status.attributes["rel"].value.split("|");
|
var userDetails = stat.attributes["rel"].value.split("|");
|
||||||
var proxyURL = window.contextPath + "/ajax/invoke/PresenceProxyBean.proxyRequest";
|
var proxyURL = window.contextPath + "/ajax/invoke/PresenceProxyBean.proxyRequest";
|
||||||
var statusURL = ProjectPresence.getStatusURL(userDetails);
|
var statusURL = ProjectPresence.getStatusURL(userDetails);
|
||||||
|
|
||||||
if (statusURL != "")
|
if (statusURL != "")
|
||||||
{
|
{
|
||||||
// ajax call to load online status
|
// ajax call to load online status
|
||||||
var myAjax = new Ajax(proxyURL, {
|
var myAjax = new Ajax(proxyURL, {
|
||||||
method: 'get',
|
method: 'get',
|
||||||
headers: {'If-Modified-Since': 'Sat, 1 Jan 2000 00:00:00 GMT'},
|
headers: {'If-Modified-Since': 'Sat, 1 Jan 2000 00:00:00 GMT'},
|
||||||
onComplete: function(textResponse, xmlResponse)
|
onComplete: function(textResponse, xmlResponse)
|
||||||
{
|
{
|
||||||
var statusType = ProjectPresence.getStatusType(userDetails[0], textResponse);
|
var statusType = ProjectPresence.getStatusType(userDetails[0], textResponse);
|
||||||
status.addClass(userDetails[0] + "-" + statusType);
|
stat.addClass(userDetails[0] + "-" + statusType);
|
||||||
if (statusType == "unknown")
|
if (statusType == "unknown")
|
||||||
{
|
{
|
||||||
status.title = "User's status is unknown, possibly due to client privacy settings";
|
stat.title = "User's status is unknown, possibly due to client privacy settings";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
status.title = "User's status is " + statusType;
|
stat.title = "User's status is " + statusType;
|
||||||
}
|
}
|
||||||
if (statusType == "online")
|
if (statusType == "online")
|
||||||
{
|
{
|
||||||
$('colleaguesOnline').adopt(rows[i]);
|
$("colleaguesOnline").adopt(rows[i]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$('colleaguesNotOnline').adopt(rows[i]);
|
$("colleaguesNotOnline").adopt(rows[i]);
|
||||||
}
|
if (window.ie)
|
||||||
}
|
{
|
||||||
}).request("url=" + escape(statusURL));
|
stat.getParent().setStyle("opacity", ProjectPresence.OFFLINE_OPACITY);
|
||||||
}
|
}
|
||||||
else
|
}
|
||||||
{
|
}
|
||||||
status.addClass("none");
|
}).request("url=" + escape(statusURL));
|
||||||
status.title = "User's presence provider has not been configured by Alfresco admin";
|
}
|
||||||
$('colleaguesNotOnline').adopt(rows[i]);
|
else
|
||||||
}
|
{
|
||||||
});
|
stat.addClass("none");
|
||||||
},
|
stat.title = "User's presence provider has not been configured by Alfresco admin";
|
||||||
|
$("colleaguesNotOnline").adopt(rows[i]);
|
||||||
|
if (window.ie)
|
||||||
|
{
|
||||||
|
stat.getParent().setStyle("opacity", ProjectPresence.OFFLINE_OPACITY);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
/* Calculates and returns the context path for the current page */
|
/* Calculates and returns the context path for the current page */
|
||||||
getContextPath: function()
|
getContextPath: function()
|
||||||
{
|
{
|
||||||
@@ -76,51 +84,51 @@ var ProjectPresence =
|
|||||||
return contextPath;
|
return contextPath;
|
||||||
},
|
},
|
||||||
|
|
||||||
getStatusURL: function(userDetails)
|
getStatusURL: function(userDetails)
|
||||||
{
|
{
|
||||||
var provider = userDetails[0];
|
var provider = userDetails[0];
|
||||||
var username = userDetails[1];
|
var username = userDetails[1];
|
||||||
var statusURL = "";
|
var statusURL = "";
|
||||||
|
|
||||||
switch(provider)
|
switch(provider)
|
||||||
{
|
{
|
||||||
case "skype":
|
case "skype":
|
||||||
statusURL = "http://mystatus.skype.com/" + username + ".txt";
|
statusURL = "http://mystatus.skype.com/" + username + ".txt";
|
||||||
break;
|
break;
|
||||||
case "yahoo":
|
case "yahoo":
|
||||||
statusURL = "http://opi.yahoo.com/online?u=" + username + "&m=t&t=1";
|
statusURL = "http://opi.yahoo.com/online?u=" + username + "&m=t&t=1";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return statusURL;
|
return statusURL;
|
||||||
},
|
},
|
||||||
|
|
||||||
getStatusType: function(provider, response)
|
getStatusType: function(provider, response)
|
||||||
{
|
{
|
||||||
var statusType = "unknown";
|
var statusType = "unknown";
|
||||||
|
|
||||||
switch(provider)
|
switch(provider)
|
||||||
{
|
{
|
||||||
case "skype":
|
case "skype":
|
||||||
switch (response)
|
switch (response)
|
||||||
{
|
{
|
||||||
case "Online":
|
case "Online":
|
||||||
statusType = "online";
|
statusType = "online";
|
||||||
break;
|
break;
|
||||||
case "Offline":
|
case "Offline":
|
||||||
statusType = "offline";
|
statusType = "offline";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
statusType = "unknown";
|
statusType = "unknown";
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "yahoo":
|
case "yahoo":
|
||||||
statusType = (response == "01") ? "online" : "offline";
|
statusType = (response == "01") ? "online" : "offline";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return statusType;
|
return statusType;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
window.addEvent('domready', ProjectPresence.init);
|
window.addEvent('domready', ProjectPresence.init);
|
||||||
|
Reference in New Issue
Block a user