Split of MyWebForms portlet into MyWebForms and MyWebFiles portlets

- Improvements from UI review from Linton
 - High and click action in MyWebFiles (as per UI review)
 - Lock icon for locked items
 - Hide Edit action if item is in workflow or user does not have access to the lock
Scrollbar CSS colours added to portlets
Added new portlet to portlet.xml defs and as a new dashlet JSP+config
Updates to MyTasks portlet

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6208 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Kevin Roast
2007-07-11 16:07:05 +00:00
parent ccf25a67d9
commit 802a38fb73
14 changed files with 558 additions and 162 deletions

View File

@@ -1,6 +1,8 @@
<#assign count=0> <#assign count=0>
<table border="0" cellpadding="2" cellspacing="0" width="100%"> <table border="0" cellpadding="2" cellspacing="0" width="100%">
<#list task.packageResources as res> <#assign resources=task.packageResources>
<#if resources?size != 0>
<#list resources as res>
<#assign count=count+1> <#assign count=count+1>
<tr class="taskResource${(count % 2 = 0)?string("Odd", "Even")}"> <tr class="taskResource${(count % 2 = 0)?string("Odd", "Even")}">
<td width="18"><a href="${url.context}${res.url}" target="new"><img src="${url.context}${res.icon16}" border=0></a></td> <td width="18"><a href="${url.context}${res.url}" target="new"><img src="${url.context}${res.icon16}" border=0></a></td>
@@ -13,4 +15,7 @@
</td> </td>
</tr> </tr>
</#list> </#list>
<#else>
<tr><td><span class="resourceLink">No task resources</span></td></tr>
</#if>
</table> </table>

View File

@@ -123,6 +123,13 @@ a.docfilterLinkSelected:link, a.docfilterLinkSelected:visited
border-top: 1px solid #CCD4DB; border-top: 1px solid #CCD4DB;
border-bottom: 1px solid #CCD4DB; border-bottom: 1px solid #CCD4DB;
visibility: hidden; visibility: hidden;
scrollbar-face-color: #fafdfd;
scrollbar-3dlight-color: #d2dde0;
scrollbar-highlight-color: #d2dde0;
scrollbar-shadow-color: #c3cdd0;
scrollbar-darkshadow-color: #c3cdd0;
scrollbar-arrow-color: #239ad7;
scrollbar-track-color: #ecf1f2;
} }
#docPanelOverlay #docPanelOverlay

View File

@@ -168,6 +168,13 @@ a.spacefilterLinkSelected:link, a.spacefilterLinkSelected:visited, .spaceCurrent
border-top: 1px solid #CCD4DB; border-top: 1px solid #CCD4DB;
border-bottom: 1px solid #CCD4DB; border-bottom: 1px solid #CCD4DB;
visibility: hidden; visibility: hidden;
scrollbar-face-color: #fafdfd;
scrollbar-3dlight-color: #d2dde0;
scrollbar-highlight-color: #d2dde0;
scrollbar-shadow-color: #c3cdd0;
scrollbar-darkshadow-color: #c3cdd0;
scrollbar-arrow-color: #239ad7;
scrollbar-track-color: #ecf1f2;
} }
#spacePanelOverlay #spacePanelOverlay

View File

@@ -68,6 +68,48 @@
</div> </div>
<style type="text/css"> <style type="text/css">
.taskTable
{
background-color: #FEF8BC;
border-top: 1px solid #EBE398;
border-left: 1px solid #EBE398;
background-image: url(${url.context}/images/logo/alf_task_bg.png);
background-repeat: no-repeat;
background-position: 72 64;
width: 716px;
}
#taskPanel
{
height: 300px;
width: 672px;
overflow: auto;
overflow-y: scroll;
border-top: 1px solid #EBE398;
border-left: 1px solid #F6DEA0;
visibility: hidden;
scrollbar-face-color: #fcf49a;
scrollbar-3dlight-color: #ede591;
scrollbar-highlight-color: #fcf49a;
scrollbar-shadow-color: #d5cc75;
scrollbar-darkshadow-color: #d5cc75;
scrollbar-arrow-color: #c2bb70;
scrollbar-track-color: #f3e985;
}
#taskPanelOverlay
{
background-image: url(${url.context}/images/icons/ajax_anim.gif);
background-position: center;
background-repeat: no-repeat;
position: absolute;
border-top: 1px solid #EBE398;
border-left: 1px solid #F6DEA0;
height: 300px;
width: 672px;
overflow: hidden;
}
a.taskfilterLink:link, a.taskfilterLink:visited a.taskfilterLink:link, a.taskfilterLink:visited
{ {
color: #5A5741; color: #5A5741;
@@ -91,41 +133,6 @@ a.taskfilterLinkSelected:link, a.taskfilterLinkSelected:visited
background-color: #FDB64F; background-color: #FDB64F;
} }
.taskTable
{
background-color: #FEF8BC;
border-top: 1px solid #EBE398;
border-left: 1px solid #EBE398;
background-image: url(${url.context}/images/logo/alf_task_bg.png);
background-repeat: no-repeat;
background-position: 72 64;
width: 716px;
}
#taskPanel
{
height: 300px;
width: 672px;
overflow: auto;
overflow-y: scroll;
border-top: 1px solid #EBE398;
border-left: 1px solid #F6DEA0;
visibility: hidden;
}
#taskPanelOverlay
{
background-image: url(${url.context}/images/icons/ajax_anim.gif);
background-position: center;
background-repeat: no-repeat;
position: absolute;
border-top: 1px solid #EBE398;
border-left: 1px solid #F6DEA0;
height: 300px;
width: 672px;
overflow: hidden;
}
.taskRow .taskRow
{ {
padding-top: 4px; padding-top: 4px;
@@ -213,14 +220,15 @@ a.taskfilterLinkSelected:link, a.taskfilterLinkSelected:visited
display: block; display: block;
overflow: hidden; overflow: hidden;
} }
.taskResourceEven
{
}
.taskResourceOdd .taskResourceOdd
{ {
background-color: #F8FCFD; background-color: #F8FCFD;
} }
.taskResourceEven
{
background-color: #EEF7FB;
}
.taskResourceHeader .taskResourceHeader
{ {

View File

@@ -54,11 +54,10 @@
<td width="360"> <td width="360">
<div class="taskResourceHeader">${t.name?html}:</div> <div class="taskResourceHeader">${t.name?html}:</div>
<div class="taskResources"></div> <div class="taskResources"></div>
<table border="0" width="360" class="taskActions"> <table border="0" class="taskActions">
<tr> <tr>
<td width="70">&nbsp;</td>
<#list t.transitions as wt> <#list t.transitions as wt>
<td style="text-align: center;"><a class="taskAction" href="#" onclick="event.cancelBubble=true; MyTasks.transitionTask('/command/task/end/${t.id}<#if wt.id?exists>/${wt.id}</#if>', 'Workflow action \'${wt.label?html}\' completed.');">${wt.label?html}</a></td> <td style="text-align: left"><a class="taskAction" href="#" onclick="event.cancelBubble=true; MyTasks.transitionTask('/command/task/end/${t.id}<#if wt.id?exists>/${wt.id}</#if>', 'Workflow action \'${wt.label?html}\' completed.');">${wt.label?html}</a></td>
</#list> </#list>
<td width="70">&nbsp;</td> <td width="70">&nbsp;</td>
</tr> </tr>
@@ -68,8 +67,8 @@
<td> <td>
<div class="taskMetaprop" style="padding-bottom: 4px;">Manage Task</div> <div class="taskMetaprop" style="padding-bottom: 4px;">Manage Task</div>
<a class="taskAction" style="display: block; width: 18px; padding: 4px; margin-left: 20px;" onclick="event.cancelBubble=true;" href="${url.context}/command/ui/managetask?id=${t.id}&type=${t.qnameType}&container=plain" target="new"><img src="${url.context}/images/icons/manage_workflow_task.gif" width="16" height="16" border="0" alt="Manage Task Details" title="Manage Task Details"></a> <a class="taskAction" style="display: block; width: 18px; padding: 4px; margin-left: 20px;" onclick="event.cancelBubble=true;" href="${url.context}/command/ui/managetask?id=${t.id}&type=${t.qnameType}&container=plain" target="new"><img src="${url.context}/images/icons/manage_workflow_task.gif" width="16" height="16" border="0" alt="Manage Task Details" title="Manage Task Details"></a>
<br /> <br>
<br /> <br>
</td> </td>
</tr> </tr>
</table> </table>

View File

@@ -0,0 +1,7 @@
<webscript>
<shortname>My Web Modified Files</shortname>
<description>Generate the My Web Modified Files portlet page</description>
<url>/ui/mywebfiles</url>
<authentication>user</authentication>
<transaction>required</transaction>
</webscript>

View File

@@ -0,0 +1,269 @@
<link rel="stylesheet" href="${url.context}/css/main.css" TYPE="text/css">
<script type="text/javascript" src="/alfresco/scripts/ajax/yahoo/yahoo/yahoo-min.js"></script>
<script type="text/javascript" src="/alfresco/scripts/ajax/yahoo/connection/connection-min.js"></script>
<script type="text/javascript" src="/alfresco/scripts/ajax/mootools.v1.11.js"></script>
<script type="text/javascript" src="/alfresco/scripts/ajax/common.js"></script>
<script type="text/javascript" src="/alfresco/scripts/ajax/summary-info.js"></script>
<script type="text/javascript" src="/alfresco/scripts/ajax/mywebfiles.js"></script>
<script type="text/javascript">setContextPath('${url.context}');</script>
<script>
// create manager object for the pop-up summary panels
var AlfNodeInfoMgr = new Alfresco.PanelManager("NodeInfoBean.sendNodeInfo", "noderef", "portlet_node_summary_panel.ftl");
</script>
<#-- List the user modified files in all web projects the user is assigned to -->
<table cellspacing=0 cellpadding=0 border=0 class="webFilesTable">
<tr><td>
<div id="webFilesPanel">
<#assign filecount=0>
<#assign projectcount=0>
<#assign search="TYPE:\"{http://www.alfresco.org/model/wcmappmodel/1.0}webfolder\"">
<#list companyhome.childrenByLuceneSearch[search]?sort_by('name') as wp>
<#list wp.childAssocs["wca:webuser"] as user>
<#if user.properties["wca:username"] = person.properties.userName>
<#assign projectcount=projectcount+1>
<#-- construct the sandbox name based on the webproject and current username -->
<#assign storeId=wp.properties["wca:avmstore"]>
<#assign username=person.properties.userName>
<#assign sandbox=avm.userSandboxStore(storeId, username)>
<div class="webProjectRow">
<div class="webProjectTitle">
<a class="webPreviewLink" href="${avm.websiteUserSandboxUrl(storeId, username)}" target="new"><img src="${url.context}/images/icons/website_large.gif" width=32 height=32 border=0><span class="websiteLink">${wp.name}</span></a>
<a class="webProjectLink" href="${url.context}${wp.url}" target="new">View Web Project</a>
<span class="webProjectInfo" onclick="event.cancelBubble=true; AlfNodeInfoMgr.toggle('${wp.nodeRef}',this);">
<img src="${url.context}/images/icons/popup.gif" class="popupImage" width="16" height="16" />
</span>
<#if wp.properties.description?exists && wp.properties.description?length!=0>
<br>
<span class="webprojectDesc">${wp.properties.description}</span>
</#if>
</div>
<div class="webProjectFiles"> <#-- marker class for dynamic click script -->
<#assign moditems = avm.getModifiedItems(storeId, username, "ROOT")>
<div class="fileTitleRow">My Modified Items</div>
<div class="fileResources">
<#if moditems?size != 0>
<#assign lcount=0>
<#list moditems as t>
<#assign filecount=filecount+1>
<div class="fileItemRow${(lcount%2=0)?string("", "Alt")}">
<#if t.isDocument>
<a class="fileItemLink" href="${url.context}${t.url}" target="new" title="${t.path?html}"><img class="itemImageIcon" src="${url.context}${t.icon16}" border="0">${t.name?html}</a>
<#else>
<span title="${t.path?html}"><img class="itemImageIcon" src="${url.context}${t.icon16}"><span class="fileItemLink">${t.name?html}</span></span>
</#if>
</a>
<#if t.isDocument>
<#if t.isLocked>
<img class="itemImageIcon" src="${url.context}/images/icons/locked${(t.isLockOwner)?string("_owner", "")}.gif" border="0">
</#if>
<#if t.hasAspect("wca:forminstancedata") && !t.hasAspect("wcmwf:submitted") && t.hasLockAccess>
<a class="fileActionLink" href="${url.context}/c/ui/editwebcontent?sandbox=${sandbox}&webproject=${wp.id}&path=${t.path?url}&container=plain" target="new"><img class="itemImageIcon" src="${url.context}/images/icons/edit_icon.gif" border="0">Edit</a>
</#if>
</#if>
<#assign lcount=lcount+1>
</div>
</#list>
<#else>
<div class="fileItemRow">No items modified</div>
</#if>
</div>
</div>
</div>
</#if>
</#list>
</#list>
</div>
</td>
</tr>
<tr>
<td>
<div class="filesFooter">
Showing ${filecount} files(s) in ${projectcount} web project(s)
</div>
</td>
</tr>
</table>
<STYLE type="text/css">
.webFilesTable
{
background-color: #F8FCFD;
border: 1px solid #CCD4DB;
}
#webFilesPanel
{
height: 320px;
width: 716px;
overflow: auto;
overflow-y: scroll;
scrollbar-face-color: #fafdfd;
scrollbar-3dlight-color: #d2dde0;
scrollbar-highlight-color: #d2dde0;
scrollbar-shadow-color: #c3cdd0;
scrollbar-darkshadow-color: #c3cdd0;
scrollbar-arrow-color: #239ad7;
scrollbar-track-color: #ecf1f2;
}
a.webPreviewLink:link, a.webPreviewLink:visited, a.webPreviewLink:hover
{
color: #5A5741;
font-family: Trebuchet MS, Arial, Helvetica, sans-serif;
font-size: 13px;
font-weight: bold;
}
a.webProjectLink:link, a.webProjectLink:visited, a.webProjectLink:hover
{
color: #5A5741;
font-family: Trebuchet MS, Arial, Helvetica, sans-serif;
font-size: 11px;
padding-left: 16px;
vertical-align: 60%;
}
a.fileActionLink:link, a.fileActionLink:visited, a.fileActionLink:hover
{
color: #5A5741;
font-family: Trebuchet MS, Arial, Helvetica, sans-serif;
font-size: 11px;
padding-left: 8px;
}
span.webProjectInfo
{
vertical-align: 60%;
}
.webProjectRow
{
background-color: #EEF7FB;
border-top: 1px solid #EEF7FB;
border-bottom: 1px solid #CCD4DB;
}
.webProjectRowSelected
{
background-color: #CCE7F3;
border-bottom: 1px solid #0092DD;
border-top: 1px solid #0092DD;
}
.webProjectFiles
{
background-color: #BAD7E4;
overflow: hidden;
}
.webprojectDesc
{
color: #5A5741;
font-family: Trebuchet MS, Arial, Helvetica, sans-serif;
padding-left: 40px;
}
.webProjectTitle
{
padding: 8px;
}
.fileResources
{
border: 1px solid #AFBDC3;
background-color: #F8FCFD;
margin: 0px 0px 0px 48px;
width: 360px;
height: 92px;
display: block;
overflow: hidden;
}
.fileTitleRow
{
border-top: 1px solid #CCD4DB;
border-bottom: 1px dotted #CCD4DB;
color: #5A5741;
font-family: Trebuchet MS, Arial, Helvetica, sans-serif;
font-size: 13px;
font-weight: bold;
padding: 4px 0px 4px 48px;
}
.fileItemRow
{
background-color: #F8FCFD;
color: #5A5741;
font-family: Trebuchet MS, Arial, Helvetica, sans-serif;
font-size: 13px;
padding: 3px 0px 2px 3px;
}
.fileItemRowAlt
{
background-color: #EEF7FB;
color: #5A5741;
font-family: Trebuchet MS, Arial, Helvetica, sans-serif;
font-size: 13px;
padding: 3px 0px 2px 3px;
}
a.fileItemLink:link, a.fileItemLink:visited, a.fileItemLink:hover
{
color: #5A5741;
font-family: Trebuchet MS, Arial, Helvetica, sans-serif;
font-size: 11px;
font-weight: bold;
}
span.fileItemLink
{
color: #5A5741;
font-family: Trebuchet MS, Arial, Helvetica, sans-serif;
font-size: 11px;
}
.filesRow, a.filesRow:link, a.filesRow:visited, a.filesRow:hover
{
background-color: #F8FCFD;
color: #5A5741;
font-family: Trebuchet MS, Arial, Helvetica, sans-serif;
font-size: 13px;
padding-left: 44px;
padding-top: 4px;
border-bottom: 1px solid #F8FCFD;
}
.filesRowAlt
{
}
img.itemImageIcon
{
vertical-align: -25%;
padding-right:4px;
}
span.websiteLink
{
padding-left:8px;
vertical-align:60%;
}
.filesFooter
{
width: 700px;
padding: 8px;
border: 1px solid #F8FCFD;
background-image: url(${url.context}/images/parts/doclist_footerbg.png);
text-align: center;
color: #515D6B;
font-family: Trebuchet MS, Arial, Helvetica, sans-serif;
font-size: 13px;
font-weight: bold;
}
</STYLE>

View File

@@ -5,7 +5,7 @@
<script type="text/javascript" src="/alfresco/scripts/ajax/mootools.v1.11.js"></script> <script type="text/javascript" src="/alfresco/scripts/ajax/mootools.v1.11.js"></script>
<script type="text/javascript" src="/alfresco/scripts/ajax/common.js"></script> <script type="text/javascript" src="/alfresco/scripts/ajax/common.js"></script>
<script type="text/javascript" src="/alfresco/scripts/ajax/summary-info.js"></script> <script type="text/javascript" src="/alfresco/scripts/ajax/summary-info.js"></script>
<script type="text/javascript" src="/alfresco/scripts/ajax/myforms.js"></script> <script type="text/javascript" src="/alfresco/scripts/ajax/mywebforms.js"></script>
<script type="text/javascript">setContextPath('${url.context}');</script> <script type="text/javascript">setContextPath('${url.context}');</script>
<script> <script>
@@ -54,24 +54,6 @@
</div> </div>
</#list> </#list>
</#if> </#if>
<#-- Modified Items list -->
<#assign moditems = avm.getModifiedItems(storeId, username, "ROOT")>
<#if moditems?size != 0>
<div class="itemsTitleRow">My Modified Items</div>
<#list moditems as t>
<div class="formItemRow">
<#if t.isDocument>
<a class="formItemLink" href="${url.context}${t.url}" target="new" title="${t.path?html}"><img class="itemImageIcon" src="${url.context}${t.icon16}" border="0">${t.name?html}</a>
<#else>
<span title="${t.path?html}"><img class="itemImageIcon" src="${url.context}${t.icon16}"><span class="formItemLink">${t.name?html}</span></span>
</#if>
</a>
<#if t.hasAspect("wca:forminstancedata")>
<a class="formActionLink" href="${url.context}/c/ui/editwebcontent?sandbox=${sandbox}&webproject=${wp.id}&path=${t.path?url}&container=plain" target="new"><img class="itemImageIcon" src="${url.context}/images/icons/edit_icon.gif" border="0">Edit</a>
</#if>
</div>
</#list>
</#if>
</div> </div>
</div> </div>
</#if> </#if>
@@ -98,10 +80,17 @@
#formsPanel #formsPanel
{ {
height: 480px; height: 320px;
width: 716px; width: 716px;
overflow: auto; overflow: auto;
overflow-y: scroll; overflow-y: scroll;
scrollbar-face-color: #fafdfd;
scrollbar-3dlight-color: #d2dde0;
scrollbar-highlight-color: #d2dde0;
scrollbar-shadow-color: #c3cdd0;
scrollbar-darkshadow-color: #c3cdd0;
scrollbar-arrow-color: #239ad7;
scrollbar-track-color: #ecf1f2;
} }
a.webPreviewLink:link, a.webPreviewLink:visited, a.webPreviewLink:hover a.webPreviewLink:link, a.webPreviewLink:visited, a.webPreviewLink:hover
@@ -121,14 +110,6 @@ a.webProjectLink:link, a.webProjectLink:visited, a.webProjectLink:hover
vertical-align: 60%; vertical-align: 60%;
} }
a.formActionLink:link, a.formActionLink:visited, a.formActionLink:hover
{
color: #5A5741;
font-family: Trebuchet MS, Arial, Helvetica, sans-serif;
font-size: 11px;
padding-left: 8px;
}
span.webProjectInfo span.webProjectInfo
{ {
vertical-align: 60%; vertical-align: 60%;
@@ -162,41 +143,6 @@ span.webProjectInfo
border-bottom: 1px dotted #CCD4DB; border-bottom: 1px dotted #CCD4DB;
} }
.itemsTitleRow
{
background-color: #D8EAF2;
border-top: 1px solid #CCD4DB;
border-bottom: 1px dotted #CCD4DB;
color: #5A5741;
font-family: Trebuchet MS, Arial, Helvetica, sans-serif;
font-size: 13px;
font-weight: bold;
padding: 4px 0px 4px 48px;
}
.formItemRow
{
background-color: #D8EAF2;
color: #5A5741;
font-family: Trebuchet MS, Arial, Helvetica, sans-serif;
font-size: 13px;
padding: 4px 0px 4px 48px;
}
a.formItemLink:link, a.formItemLink:visited, a.formItemLink:hover
{
color: #5A5741;
font-family: Trebuchet MS, Arial, Helvetica, sans-serif;
font-size: 11px;
}
span.formItemLink
{
color: #5A5741;
font-family: Trebuchet MS, Arial, Helvetica, sans-serif;
font-size: 11px;
}
.formsRow, a.formsRow:link, a.formsRow:visited, a.formsRow:hover .formsRow, a.formsRow:link, a.formsRow:visited, a.formsRow:hover
{ {
background-color: #F8FCFD; background-color: #F8FCFD;
@@ -212,12 +158,6 @@ span.formItemLink
{ {
} }
img.itemImageIcon
{
vertical-align: -25%;
padding-right:4px;
}
span.websiteLink span.websiteLink
{ {
padding-left:8px; padding-left:8px;
@@ -245,36 +185,4 @@ a.webformLink:link, a.webformLink:visited, a.webformLink:hover
font-weight: bold; font-weight: bold;
} }
.formsItem
{
font-family: Trebuchet MS, Arial, Helvetica, sans-serif;
font-size: 14px;
color: #515D6B;
margin: 0 0 0 24;
padding: 0px 8px 6px 8px;
}
.formsDetail
{
background-color: #CCE7F3;
font-family: Trebuchet MS, Arial, Helvetica, sans-serif;
font-size: 12px;
color: #000000;
margin: 0px;
display: none;
overflow: hidden;
}
.formsMetadata
{
color: #515D6B;
font-family: Trebuchet MS, Arial, Helvetica, sans-serif;
}
.formsMetaprop
{
color: #515D6B;
font-family: Trebuchet MS, Arial, Helvetica, sans-serif;
font-weight: bold;
}
</STYLE> </STYLE>

View File

@@ -236,6 +236,8 @@
jsp="/jsp/dashboards/dashlets/mytasks-webscript.jsp" /> jsp="/jsp/dashboards/dashlets/mytasks-webscript.jsp" />
<dashlet id="mywebforms-webscript" label="My Web Forms" description="My Web Forms WebScript" <dashlet id="mywebforms-webscript" label="My Web Forms" description="My Web Forms WebScript"
jsp="/jsp/dashboards/dashlets/mywebforms-webscript.jsp" /> jsp="/jsp/dashboards/dashlets/mywebforms-webscript.jsp" />
<dashlet id="mywebfiles-webscript" label="My Web Files" description="My Web Files WebScript"
jsp="/jsp/dashboards/dashlets/mywebfiles-webscript.jsp" />
</dashlets> </dashlets>
<!-- configuration of the default dashlets to display when users login for the first time --> <!-- configuration of the default dashlets to display when users login for the first time -->

View File

@@ -122,6 +122,31 @@
</portlet-info> </portlet-info>
</portlet> </portlet>
<portlet>
<description>My Web Files</description>
<portlet-name>AlfrescoMyWebFiles</portlet-name>
<portlet-class>org.alfresco.web.scripts.portlet.WebScriptPortlet</portlet-class>
<init-param>
<name>authenticator</name>
<value>webscripts.authenticator.jsr168.webclient</value>
</init-param>
<init-param>
<name>scriptUrl</name>
<value>/alfresco/168s/ui/mywebfiles</value>
</init-param>
<supports>
<mime-type>text/html</mime-type>
<portlet-mode>VIEW</portlet-mode>
</supports>
<portlet-info>
<title>My Web Files</title>
<short-title>My Web Files</short-title>
</portlet-info>
</portlet>
<user-attribute> <user-attribute>
<name>user.home-info.online.email</name> <name>user.home-info.online.email</name>
</user-attribute> </user-attribute>

View File

@@ -0,0 +1,27 @@
<%--
* Copyright (C) 2005-2007 Alfresco Software Limited.
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* As a special exception to the terms and conditions of version 2.0 of
* the GPL, you may redistribute this Program in connection with Free/Libre
* and Open Source Software ("FLOSS") applications as described in Alfresco's
* FLOSS exception. You should have recieved a copy of the text describing
* the FLOSS exception, and it is also available here:
* http://www.alfresco.com/legal/licensing"
--%>
<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>
<r:webScript scriptUrl="/wcs/ui/mywebfiles" />

View File

@@ -58,7 +58,7 @@ var MyTasks = {
var fxDetail = new Fx.Elements(details, {wait: false, duration: MyTasks.ANIM_LENGTH, transition: Fx.Transitions.sineInOut, var fxDetail = new Fx.Elements(details, {wait: false, duration: MyTasks.ANIM_LENGTH, transition: Fx.Transitions.sineInOut,
onComplete: function() onComplete: function()
{ {
// event handler to ensure // event handler to ensure scrollable area style is set
this.elements.each(function(detail, i) this.elements.each(function(detail, i)
{ {
if (detail.parentNode.isOpen == true) if (detail.parentNode.isOpen == true)
@@ -202,8 +202,7 @@ var MyTasks = {
// close other open tasks and toggle this one if it's already open // close other open tasks and toggle this one if it's already open
tasks.each(function(otherTask, j) tasks.each(function(otherTask, j)
{ {
var otherItem = items[j], var otherInfo = infos[j],
otherInfo = infos[j],
otherDetail = details[j]; otherDetail = details[j];
if (otherTask != task) if (otherTask != task)

View File

@@ -0,0 +1,133 @@
var MyWebFiles = {
ANIM_LENGTH: 300,
FILE_PANEL_HEIGHT: 128,
start: function()
{
if ($('webFilesPanel'))
{
MyWebFiles.parseFilesPanels();
$('webFilesPanel').setStyle('visibility', 'visible');
}
},
parseFilesPanels: function()
{
var projects = $$('#webFilesPanel .webProjectRow');
var files = $$('#webFilesPanel .webProjectFiles');
var fxFile = new Fx.Elements(files, {wait: false, duration: MyWebFiles.ANIM_LENGTH, transition: Fx.Transitions.sineInOut,
onComplete: function()
{
// event handler to ensure scrollable area style is set
this.elements.each(function(file, i)
{
if (file.parentNode.isOpen == true)
{
$E('.fileResources', file).setStyle('overflow', 'auto');
}
});
}
});
projects.each(function(project, i)
{
var file = files[i];
// animated elements defaults
file.maxHeight = file.getStyle('height').toInt();
file.defHeight = 1;
file.setStyle('height', file.defHeight);
file.setStyle('display', 'block');
file.setStyle('opacity', 0);
// register 'mouseenter' event for each project
project.addEvent('mouseenter', function(e)
{
if (projects.isOpen)
return;
// highlight the item title
projects.addClass('webProjectRowSelected');
// reset styles on all closed projects
projects.each(function(otherProject, j)
{
if ((otherProject != project) && (!otherProject.isOpen))
{
// reset selected class
otherProject.removeClass('webProjectRowSelected');
}
});
});
// register 'mouseleave' event for each project
project.addEvent('mouseleave', function(e)
{
if (project.isOpen)
return;
// unhighlight the item title
project.removeClass('webProjectRowSelected');
});
// register 'click' event for each project
project.addEvent('click', function(e)
{
var animFile = {},
fileHeight = file.getStyle('height').toInt();
if (!project.isOpen)
{
// open up this project
project.isOpen = true;
// slide and fade in the file panel
animFile[i] = {
'height': [fileHeight, file.defHeight + MyWebFiles.FILE_PANEL_HEIGHT],
'opacity': [file.getStyle('opacity'), 1]};
// close other open projects and toggle this one if it's already open
projects.each(function(otherProject, j)
{
var otherFile = files[j];
if (otherProject != project)
{
// close any other open projects
otherProject.isOpen = false;
// unhighlight the item title
otherProject.removeClass('webProjectRowSelected');
// does this file panel need resetting back to it's default height?
var otherHeight = otherFile.getStyle('height').toInt();
if (otherHeight != otherFile.defHeight)
{
animFile[j] = {
'height': [otherHeight, otherFile.defHeight],
'opacity': [otherFile.getStyle('opacity'), 0]};
}
$E('.fileResources', otherFile).setStyle('overflow', 'hidden');
}
});
}
else
{
// close this project
project.isOpen = false;
// reset project back to it's default height
animFile[i] = {
'height': [fileHeight, file.defHeight],
'opacity': [file.getStyle('opacity'), 0]};
$E('.fileResources', file).setStyle('overflow', 'hidden');
}
fxFile.start(animFile);
});
});
}
};
window.addEvent('load', MyWebFiles.start);