Portlet web scripts UI updates following internal review

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6076 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Mike Hatfield
2007-06-23 10:22:30 +00:00
parent 960d89a837
commit 732d9e0585
12 changed files with 490 additions and 144 deletions

View File

@@ -17,6 +17,7 @@
<td width="300">
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<#assign navurl='/navigate/showDocDetails/' + node.nodeRef.storeRef.protocol + '/' + node.nodeRef.storeRef.identifier + '/' + node.nodeRef.id>
<#if node.isLocked >
<td class="docAction docActionCheckout docActionLocked">(Locked)</td>
<#elseif hasAspect(node, "cm:workingcopy") == 1>
@@ -40,7 +41,6 @@
</tr>
<tr>
<td class="docAction docActionDelete" <#if node.hasPermission("Delete")>onclick='event.cancelBubble=true;MyDocs.deleteItem("${node.name}", "${node.nodeRef}");'</#if>>Delete</td>
<#assign navurl='/navigate/showDocDetails/' + node.nodeRef.storeRef.protocol + '/' + node.nodeRef.storeRef.identifier + '/' + node.nodeRef.id>
<td class="docAction docActionMoreActions" onclick="window.open('${url.context}${navurl}', '_blank');">More Actions...</td>
</tr>
</table>

View File

@@ -1,5 +1,5 @@
<#assign isImage=node.isDocument && (node.mimetype = "image/gif" || node.mimetype = "image/jpeg" || node.mimetype = "image/png")>
<table width="100%" cellpadding="2" cellspacing="0" border="0" onclick="event.cancelBubble=true;">
<table width="690" cellpadding="2" cellspacing="0" border="0" onclick="event.cancelBubble=true;">
<tr>
<td>
<div class="spacePreview">
@@ -11,7 +11,7 @@
Sorry, no preview currently available for this document.
</#if>
<#elseif isImage>
<center><a href="${url.context}${node.url}" target="new"><img src="${url.context}${node.url}" height=140 border=0></a></center>
<center><a href="${url.context}${node.url}" target="new"><img src="${url.context}${node.url}?${node.size}" height=140 border=0></a></center>
<#elseif node.isContainer>
<#list node.children?sort_by('name') as c>
<#--if (c_index >= 25)><div>...</div><#break></#if>-->
@@ -25,29 +25,44 @@
<td width="24"></td>
<td width="300">
<table width="100%" cellpadding="0" cellspacing="0">
<#if node.isDocument>
<#assign navurl='/navigate/showDocDetails/' + node.nodeRef.storeRef.protocol + '/' + node.nodeRef.storeRef.identifier + '/' + node.nodeRef.id>
<#if node.isDocument>
<tr>
<td class="spaceAction docActionCheckout">Checkout</td>
<td class="spaceAction docActionEditDetails">Edit Details</td>
<#if node.isLocked >
<td class="spaceAction docActionCheckout docActionLocked">(Locked)</td>
<#elseif hasAspect(node, "cm:workingcopy") == 1>
<td class="spaceAction docActionCheckin" <#if node.hasPermission("CheckIn")>onclick='event.cancelBubble=true;MySpaces.checkinItem("${node.name}", "${node.nodeRef}");'</#if>>Check In</td>
<#else>
<td class="spaceAction docActionCheckout" <#if node.hasPermission("CheckOut")>onclick='event.cancelBubble=true;MySpaces.checkoutItem("${node.name}", "${node.nodeRef}");'</#if>>Check Out</td>
</#if>
<#if node.isLocked >
<td class="spaceAction docActionEditDetails docActionLocked">Edit Details</td>
<#else>
<td class="spaceAction docActionEditDetails" onclick="window.open('${url.context}/command/ui/editcontentprops?container=plain&amp;noderef=${node.nodeRef}', '_blank');">Edit Details</td>
</#if>
</tr>
<tr>
<td class="spaceAction docActionUpdate">Update</td>
<td class="spaceAction docActionViewContent">View Content</td>
<#if node.isLocked >
<td class="spaceAction docActionUpdate docActionLocked">Update</td>
<#else>
<td class="spaceAction docActionUpdate" onclick="event.cancelBubble=true;MySpaces.updateItem(this, '${node.nodeRef}');">Update</td>
</#if>
<td class="spaceAction docActionViewContent" onclick="window.open('${url.context}${node.downloadUrl}', '_blank');">View Content</td>
</tr>
<tr>
<td class="spaceAction docActionDelete" <#if node.hasPermission("Delete")>onclick='event.cancelBubble=true;MySpaces.deleteItem("${node.name}", "${node.nodeRef}");'</#if>>Delete</td>
<td class="spaceAction docActionMoreActions">More Actions...</td>
<td class="spaceAction docActionMoreActions" onclick="window.open('${url.context}${navurl}', '_blank');">More Actions...</td>
</tr>
<#else>
<#else>
<tr>
<td class="spaceAction spaceActionEditDetails">Edit Details</td>
<td class="spaceAction docActionEditDetails" onclick="window.open('${url.context}/command/ui/editcontentprops?container=plain&amp;noderef=${node.nodeRef}', '_blank');">Edit Details</td>
<td class="spaceAction spaceActionDelete" <#if node.hasPermission("Delete")>onclick='event.cancelBubble=true;MySpaces.deleteItem("${node.name}", "${node.nodeRef}");'</#if>>Delete</td>
</tr>
<tr>
<td class="spaceAction spaceActionMoreActions">More Actions...</td>
<td class="spaceAction docActionMoreActions" onclick="window.open('${url.context}${navurl}', '_blank');">More Actions...</td>
<td></td>
</tr>
</#if>
</#if>
</table>
</td>
</tr>

View File

@@ -1,13 +1,15 @@
<table cellpadding='2' cellspacing='0'>
<#assign count=0>
<table border="0" cellpadding="2" cellspacing="0" width="100%">
<#list task.packageResources as res>
<tr>
<td><a href="${url.context}${res.url}" target="new"><img src="${url.context}${res.icon16}" border=0></a></td>
<#assign count=count+1>
<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>
<#if res.isDocument>
<a class="resourceLink" onclick="event.cancelBubble=true;" href="${url.context}${res.url}" target="new">${res.name}</a>
<#else>
<span class="resourceLink">${res.name}</span>
</#if>
<#if res.isDocument>
<a class="resourceLink" onclick="event.cancelBubble=true;" href="${url.context}${res.url}" target="new">${res.name}</a>
<#else>
<span class="resourceLink">${res.name}</span>
</#if>
</td>
</tr>
</#list>

View File

@@ -9,8 +9,6 @@
<script type="text/javascript" src="/alfresco/scripts/ajax/doclist.js"></script>
<script type="text/javascript">setContextPath('${url.context}');</script>
<script type="text/javascript" src="/firebug.js"></script>
<script>
// create manager object for the pop-up summary panels
var AlfNodeInfoMgr = new Alfresco.PanelManager("NodeInfoBean.sendNodeInfo", "noderef", "portlet_node_summary_panel.ftl");
@@ -61,8 +59,7 @@
</tr>
<tr><td>
<div id="docUpdatePanel">
<#-- Url encode the path value, and encode any single quotes to generate valid string -->
<input class="docFormItem" type="button" value="OK" onclick='MyDocs.updateOK(this, "${path?url?replace("'","_%_")}");'>
<input class="docFormItem" type="button" value="OK" onclick="MyDocs.updateOK(this);">
<input class="docFormItem" type="button" value="Cancel" onclick="MyDocs.closePopupPanel();">
</div>
<div id="docPanelOverlay"></div>
@@ -88,7 +85,7 @@
</tr>
</table>
<STYLE type="text/css">
<style type="text/css">
a.docfilterLink:link, a.docfilterLink:visited
{
color: #8EA1B3;
@@ -371,4 +368,4 @@ a.refreshViewLink:link, a.refreshViewLink:visited, a.refreshViewLink:hover
border: 1px solid #CCD4DB;
}
</STYLE>
</style>

View File

@@ -16,7 +16,7 @@
(filter=3 && d.mimetype="application/pdf") ||
(filter=4 && (dateCompare(d.properties["cm:modified"],date,weekms) == 1 || dateCompare(d.properties["cm:created"], date, weekms) == 1))>
<#assign count=count+1>
<div class="docRow docRow${(count % 2 = 0)?string("Odd", "wEven")}">
<div class="docRow docRow${(count % 2 = 0)?string("Odd", "Even")}">
<div class="docIcon">
<a href="${url.context}${d.url}" target="new"><img class="docIconImage" alt="" width="16" height="16" src="${url.context}${d.icon16?replace(".gif",".png")}" border=0></a>
</div>

View File

@@ -48,9 +48,11 @@
</#if>
</#list>
</div>
<!--
<div class="spaceTitle">
<img src="${url.context}${home.icon16}" width="16" height="16" alt="" class="spaceImageIcon">${home.name?html}
</div>
-->
<div class="spaceToolbar">
<#-- TODO: permission checks on the actions! -->
<#-- Upload File action -->
@@ -60,6 +62,10 @@
<input class="spaceFormItem" type="button" value="OK" onclick='MySpaces.uploadOK(this, "${path?url?replace("'","_%_")}");'>
<input class="spaceFormItem" type="button" value="Cancel" onclick="MySpaces.closePopupPanel();">
</div>
<div id="docUpdatePanel">
<input class="spaceFormItem" type="button" value="OK" onclick="MySpaces.updateOK(this);">
<input class="spaceFormItem" type="button" value="Cancel" onclick="MySpaces.closePopupPanel();">
</div>
<#-- Create Space action -->
<div class="spaceToolbarAction spaceToolbarActionCreateSpace" title="Create a new Space" <#if home.hasPermission("CreateChildren")>onclick="MySpaces.createSpace(this);"</#if>>Create Space</div>
<div class="spaceCreateSpacePanel">
@@ -72,14 +78,14 @@
<input class="spaceFormItem" type="button" value="Cancel" onclick="MySpaces.closePopupPanel();">
</div>
</div>
<div>
<table border=0 cellspacing=8 cellpadding=0 width=100%>
<div class="spaceHeader">
<table border="0" cellspacing="6" cellpadding="0" width="100%">
<tr>
<th><a class="spacefilterLink <#if filter=0>spacefilterLinkSelected</#if>" href="${scripturl("?f=0&p=${path?url}")}">All Items</a></th>
<th><a class="spacefilterLink <#if filter=1>spacefilterLinkSelected</#if>" href="${scripturl("?f=1&p=${path?url}")}">Spaces</a></th>
<th><a class="spacefilterLink <#if filter=2>spacefilterLinkSelected</#if>" href="${scripturl("?f=2&p=${path?url}")}">Documents</a></th>
<th><a class="spacefilterLink <#if filter=3>spacefilterLinkSelected</#if>" href="${scripturl("?f=3&p=${path?url}")}">My Items</a></th>
<th><a class="spacefilterLink <#if filter=4>spacefilterLinkSelected</#if>" href="${scripturl("?f=4&p=${path?url}")}">Recently Modified</a></th>
<th><a class="spacefilterLink <#if filter=0>spacefilterLinkSelected</#if>" href="#" onclick="MySpaces.filter(0); return false;">All Items</a></th>
<th><a class="spacefilterLink <#if filter=1>spacefilterLinkSelected</#if>" href="#" onclick="MySpaces.filter(1); return false;">Spaces</a></th>
<th><a class="spacefilterLink <#if filter=2>spacefilterLinkSelected</#if>" href="#" onclick="MySpaces.filter(2); return false;">Documents</a></th>
<th><a class="spacefilterLink <#if filter=3>spacefilterLinkSelected</#if>" href="#" onclick="MySpaces.filter(3); return false;">My Items</a></th>
<th><a class="spacefilterLink <#if filter=4>spacefilterLinkSelected</#if>" href="#" onclick="MySpaces.filter(4); return false;">Recently Modified</a></th>
<td align=right>
<a href="#" onclick="MySpaces.start(); return false;" class="refreshViewLink"><img src="${url.context}/images/icons/reset.gif" border="0" width="16" height="16" class="spaceImageIcon">Refresh</a>
</td>
@@ -87,6 +93,7 @@
</table>
</div>
<div id="spacePanelOverlay"></div>
<div id="spacePanelOverlayAjax"></div>
<div id="spacePanel">
<#-- populated via an AJAX call to 'myspacespanel' webscript -->
<#-- resolved path, filter and home.noderef required as arguments -->
@@ -100,7 +107,7 @@
</div>
<div class="spaceFooter">
<#-- the count value is retrieved and set dynamically from the AJAX webscript output above -->
Showing <span id="spaceCount">0</span> items(s)
<span class="spaceFooterText">Showing <span id="spaceCount">0</span> items(s)</span>
</div>
</div>
@@ -109,7 +116,7 @@ a.spacefilterLink:link, a.spacefilterLink:visited
{
color: #8EA1B3;
font-family: Trebuchet MS, Arial, Helvetica, sans-serif;
font-size: 13px;
font-size: 12px;
font-weight: bold;
text-decoration: none;
padding-left: 4px;
@@ -124,8 +131,7 @@ a.spacefilterLink:hover
a.spacefilterLinkSelected:link, a.spacefilterLinkSelected:visited
{
color: #168ECE;
background-color: #EEF7FB;
color: #0085CA;
}
.spaceTable
@@ -147,10 +153,16 @@ a.spacefilterLinkSelected:link, a.spacefilterLinkSelected:visited
border-bottom: 1px solid #CCD4DB;
}
.spaceHeader
{
background-image: url(${url.context}/images/parts/doclist_headerbg.png);
height: 30px;
}
#spacePanel
{
height: 320px;
width: 720px;
width: 718px;
overflow: auto;
overflow-y: scroll;
border-top: 1px solid #CCD4DB;
@@ -159,6 +171,15 @@ a.spacefilterLinkSelected:link, a.spacefilterLinkSelected:visited
}
#spacePanelOverlay
{
background-color: #fff;
position: absolute;
height: 320px;
width: 720px;
overflow: hidden;
}
#spacePanelOverlayAjax
{
background-color: #fff;
background-image: url(${url.context}/images/icons/ajax_anim.gif);
@@ -176,11 +197,20 @@ a.spacefilterLinkSelected:link, a.spacefilterLinkSelected:visited
border-top: 1px solid #F8FCFD;
border-bottom: 1px solid #CCD4DB;
}
.spaceRowOdd
{
background-color: #EEF7FB;
}
.spaceRowEven
{
background-color: #F8FCFD;
}
.spaceFooter
{
width: 700px;
padding: 8px;
height: 34px;
width: 718px;
padding: 0px;
border: 1px solid #F8FCFD;
background-image: url(${url.context}/images/parts/doclist_footerbg.png);
text-align: center;
@@ -190,6 +220,12 @@ a.spacefilterLinkSelected:link, a.spacefilterLinkSelected:visited
font-weight: bold;
}
.spaceFooterText
{
display: block;
margin-top: 8px;
}
.spaceItem
{
font-family: Trebuchet MS, Arial, Helvetica, sans-serif;
@@ -264,9 +300,9 @@ a.spacefilterLinkSelected:link, a.spacefilterLinkSelected:visited
.spaceBreadcrumb
{
background-color: #DBE1E7;
padding: 6px;
background-image: url(${url.context}/images/parts/spacelist_breadbg.png);
border-bottom: 1px solid #CCD4DB;
padding: 6px;
}
a.spaceBreadcrumbLink:link, a.spaceBreadcrumbLink:visited, a.spaceBreadcrumbLink:hover
@@ -295,8 +331,8 @@ a.spaceBreadcrumbLink:link, a.spaceBreadcrumbLink:visited, a.spaceBreadcrumbLink
.spaceToolbar
{
background-color: #EEF7FB;
height: 4em;
border-bottom: 1px solid #CCD4DB;
height: 44px;
}
.spaceToolbarAction
@@ -309,9 +345,9 @@ a.spaceBreadcrumbLink:link, a.spaceBreadcrumbLink:visited, a.spaceBreadcrumbLink
font-size: 12px;
float: left;
margin: 3px;
height: 2em;
height: 20px;
cursor: pointer;
padding: 10px 4px 2px 34px;
padding: 10px 4px 6px 34px;
border: 1px dashed #CCD4DB;
}
@@ -335,11 +371,11 @@ a.spaceBreadcrumbLink:link, a.spaceBreadcrumbLink:visited, a.spaceBreadcrumbLink
background-repeat: no-repeat;
background-position: left;
width: 87px;
height: 28px;
height: 20px;
border: 1px solid #ffffff;
float: left;
display: block;
padding: 10px 0px 0px 36px;
padding: 10px 0px 8px 36px;
cursor: pointer;
}
@@ -350,6 +386,19 @@ a.spaceBreadcrumbLink:link, a.spaceBreadcrumbLink:visited, a.spaceBreadcrumbLink
border-right: none;
}
.docActionCheckin
{
background-image: url(${url.context}/images/icons/doclist_action_checkin.png);
border-bottom: none;
border-right: none;
}
.docActionLocked
{
background-image: url(${url.context}/images/icons/doclist_action_locked.png) !important;
cursor: default !important;
}
.docActionEditDetails
{
background-image: url(${url.context}/images/icons/doclist_action_edit.png);
@@ -409,6 +458,7 @@ a.spaceBreadcrumbLink:link, a.spaceBreadcrumbLink:visited, a.spaceBreadcrumbLink
padding: 8px;
margin: 8px;
display: none;
z-index: 1;
-moz-border-radius: 5px;
}
@@ -422,6 +472,21 @@ a.spaceBreadcrumbLink:link, a.spaceBreadcrumbLink:visited, a.spaceBreadcrumbLink
padding: 8px;
margin: 8px;
display: none;
z-index: 1;
-moz-border-radius: 5px;
}
#docUpdatePanel
{
position: absolute;
border: 1px solid #CCD4DB;
background-color: #EEF7FB;
width: 24em;
height: 5em;
padding: 8px;
margin: 8px;
display: none;
z-index: 1;
-moz-border-radius: 5px;
}

View File

@@ -8,6 +8,8 @@
<script type="text/javascript" src="/alfresco/scripts/ajax/mytasks.js"></script>
<script type="text/javascript">setContextPath('${url.context}');</script>
<script type="text/javascript" src="/firebug.js"></script>
<script>
// create manager object for the pop-up summary panels
var TaskInfoMgr = new Alfresco.PanelManager("TaskInfoBean.sendTaskInfo", "taskId");
@@ -17,50 +19,57 @@
<#-- filters: 0=all, 1=today, 2=next week, 3=no due date, 4=overdue -->
<#if args.f?exists && args.f?length!=0><#assign filter=args.f?number><#else><#assign filter=0></#if>
<table border=0 cellspacing=0 cellpadding=0 class="taskTable">
<tr>
<td width=36 bgcolor="#F9F3B0">&nbsp;</td>
<td align=center height=40 style="border-left: 1px solid #EBE398;">
<table border=0 cellspacing=8 cellpadding=0>
<tr>
<th><a class="taskfilterLink <#if filter=0>taskfilterLinkSelected</#if>" href="${scripturl("?f=0")}">Tasks to do</a></th>
<th><a class="taskfilterLink <#if filter=1>taskfilterLinkSelected</#if>" href="${scripturl("?f=1")}">Due Today</a></th>
<th><a class="taskfilterLink <#if filter=2>taskfilterLinkSelected</#if>" href="${scripturl("?f=2")}">Next 7 days</a></th>
<th><a class="taskfilterLink <#if filter=3>taskfilterLinkSelected</#if>" href="${scripturl("?f=3")}">No due date</a></th>
<th><a class="taskfilterLink <#if filter=4>taskfilterLinkSelected</#if>" href="${scripturl("?f=4")}">Overdue</a></th>
</tr>
</table>
</td>
<td width=4 class="paperEdgeRight"><td>
</tr>
<tr><td bgcolor="#F9F3B0">&nbsp;</td><td>
<div id="taskPanelOverlay"></div>
<div id="taskPanel">
<#-- populated via an AJAX call to 'mytaskspanel' webscript -->
<#-- resolved filter required as argument -->
<script>MyTasks.ServiceContext="${url.serviceContext}";MyTasks.Filter="${filter}";</script>
</div>
</td>
<td width=4 class="paperEdgeRight"><td>
</tr>
<tr>
<td bgcolor="#F9F3B0">&nbsp;</td>
<td>
<div id="taskFooter">
<#-- the count value is retrieved and set dynamically from the AJAX webscript output above -->
Showing <span id="taskCount">0</span> <#if filter=4>overdue</#if> task(s)<#if filter=1> due today</#if><#if filter=2> due next week</#if><#if filter=3> with no due date set</#if>.
</div>
</td>
<td class="paperEdgeRight"><td>
</tr>
<tr>
<td class="paperLeftCorner"><div style="height:6px"></div></td>
<td class="paperBottomEdge"></td>
<td class="paperRightCorner"></td>
</tr>
<table border="0" cellspacing="0" cellpadding="0" class="taskTable">
<tr>
<td width="36" bgcolor="#F8F2AC">&nbsp;</td>
<td>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td align=center height=40 style="border-left: 1px solid #EBE398;">
<table border="0" cellspacing="8" cellpadding="0" width="100%">
<tr>
<th><a class="taskfilterLink <#if filter=0>taskfilterLinkSelected</#if>" href="#" onclick="MyTasks.filter(0); return false;">Tasks to do</a></th>
<th><a class="taskfilterLink <#if filter=1>taskfilterLinkSelected</#if>" href="#" onclick="MyTasks.filter(1); return false;" style="color: #399DF7;">Due Today</a></th>
<th><a class="taskfilterLink <#if filter=2>taskfilterLinkSelected</#if>" href="#" onclick="MyTasks.filter(2); return false;">Next 7 days</a></th>
<th><a class="taskfilterLink <#if filter=3>taskfilterLinkSelected</#if>" href="#" onclick="MyTasks.filter(3); return false;">No due date</a></th>
<th><a class="taskfilterLink <#if filter=4>taskfilterLinkSelected</#if>" href="#" onclick="MyTasks.filter(4); return false;" style="color: #DF3704;">Overdue</a></th>
<td width="150" align="right">
<a href="#" onclick="MyTasks.refreshList(); return false;" class="refreshViewLink"><img src="${url.context}/images/icons/reset.gif" border="0" width="16" height="16" style="vertical-align:-25%;padding-right:4px">Refresh</a>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<div id="taskPanelOverlay"></div>
<div id="taskPanel">
<#-- populated via an AJAX call to 'mytaskspanel' webscript -->
<#-- resolved filter required as argument -->
<script>MyTasks.ServiceContext="${url.serviceContext}";MyTasks.Filter="${filter}";</script>
</div>
</td>
</tr>
<tr>
<td>
<div id="taskFooter">
<#-- the count value is retrieved and set dynamically from the AJAX webscript output above -->
<span class="taskFooterText">Showing <span id="taskCount">0</span> <#if filter=4>overdue</#if> task(s)<#if filter=1> due today</#if><#if filter=2> due next week</#if><#if filter=3> with no due date set</#if></span>
</div>
</td>
</tr>
</table>
</td>
<td class="paperEdgeRight">&nbsp;</td>
</tr>
</table>
<div style="font-size: 3px;">
<span class="paperLeftCorner"></span>
<span class="paperBottomEdge"></span>
<span class="paperRightCorner"></span>
</div>
<STYLE type="text/css">
<style type="text/css">
a.taskfilterLink:link, a.taskfilterLink:visited
{
color: #5A5741;
@@ -74,13 +83,13 @@ a.taskfilterLink:link, a.taskfilterLink:visited
a.taskfilterLink:hover
{
color: #FFFFFF;
color: #FFFFFF !important;
background-color: #FDB64F;
}
a.taskfilterLinkSelected:link, a.taskfilterLinkSelected:visited
{
color: #FFFFFF;
color: #FFFFFF !important;
background-color: #FDB64F;
}
@@ -92,13 +101,15 @@ a.taskfilterLinkSelected:link, a.taskfilterLinkSelected:visited
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: 716px;
width: 672px;
overflow: auto;
overflow-y: scroll;
border-top: 1px solid #EBE398;
border-left: 1px solid #F6DEA0;
visibility: hidden;
@@ -113,7 +124,7 @@ a.taskfilterLinkSelected:link, a.taskfilterLinkSelected:visited
border-top: 1px solid #EBE398;
border-left: 1px solid #F6DEA0;
height: 300px;
width: 716px;
width: 672px;
overflow: hidden;
}
@@ -126,17 +137,29 @@ a.taskfilterLinkSelected:link, a.taskfilterLinkSelected:visited
#taskFooter
{
width: 700px;
padding: 8px;
height: 36px;
width: 656px;
padding: 0px;
border-top: 1px solid #EBE398;
border-left: 1px solid #F6DEA0;
text-align: right;
text-align: center;
color: #5A5741;
font-family: Trebuchet MS, Arial, Helvetica, sans-serif;
font-size: 13px;
font-weight: bold;
}
.taskFooterText
{
display: block;
margin-top: 8px;
}
.taskTitle
{
cursor: pointer;
}
.taskItem
{
font-family: Trebuchet MS, Arial, Helvetica, sans-serif;
@@ -186,17 +209,26 @@ a.taskfilterLinkSelected:link, a.taskfilterLinkSelected:visited
{
border: 1px solid #FFE500;
background-color: #FEF8BC;
margin: 4px 0px 0px 16px;
width: 400px;
margin: 4px 0px 0px 0px;
width: 360px;
height: 80px;
display: block;
overflow: hidden;
}
.taskResourceOdd
{
background-color: #F8FCFD;
}
.taskResourceEven
{
background-color: #EEF7FB;
}
.taskResourceHeader
{
color: #5A5741;
font-family: Trebuchet MS, Arial, Helvetica, sans-serif;
padding: 0px 0px 0px 16px;
padding: 0px;
font-weight: bold;
display: inline;
}
@@ -263,16 +295,24 @@ a.taskAction:hover
.paperLeftCorner
{
background-image: url(${url.context}/images/parts/paper_leftcorner.png);
float: left;
height: 6px;
width: 36px;
}
.paperBottomEdge
{
background-image: url(${url.context}/images/parts/paper_bottomedge.png);
float: left;
height: 6px;
width: 676px;
}
.paperRightCorner
{
background-color: white;
background-image: url(${url.context}/images/parts/paper_rightcorner.gif);
float: left;
height: 6px;
width: 4px;
}
</STYLE>
</style>

View File

@@ -13,7 +13,7 @@
(args.f="2" && hasDue && (dateCompare(due?date, date?date) == 1 && dateCompare(date?date, due?date, weekms) == 1)) ||
(args.f="4" && hasDue && (dateCompare(date?date, due?date) == 1))>
<#assign count=count+1>
<div class="taskRow" id="${t.id}">
<div class="taskRow" id="${t.id}" rel="<#if hasDue>${due?date?string("yyyyMMddHHmmss")}<#else>99999999999999</#if>">
<div class="taskTitle">
<div class="taskIndicator">
<#if hasDue>
@@ -39,29 +39,40 @@
</div>
</div>
<div class="taskDetail">
<div style="float:left">
<table cellpadding='2' cellspacing='0' style="margin-left:32px;margin-top:16px">
<tr><td class="taskMetaprop">Status:</td><td class="taskMetadata">${t.properties["bpm:status"]}</td>
<tr><td class="taskMetaprop">Priority:</td><td class="taskMetadata">${t.properties["bpm:priority"]}</td>
<tr><td class="taskMetaprop">Start Date:</td><td class="taskMetadata">${t.startDate?date}</td></tr>
<tr><td class="taskMetaprop">Type:</td><td class="taskMetadata">${t.type?html}</td></tr>
<tr><td class="taskMetaprop">Complete:</td><td class="taskMetadata">${t.properties["bpm:percentComplete"]}%</td>
</table>
</div>
<div class="taskResourceHeader">${t.name?html}:</div>
<div class="taskResources"></div>
<div style="float:right;margin-right:48px;margin-top:-48px;">
<a class="taskAction" style="padding-top:6px" 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>
</div>
<div>
<table class="taskActions" style="padding-left:16px">
<tr>
<#list t.transitions as wt>
<td><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>
</tr>
</table>
</div>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="182">
<table cellpadding="2" cellspacing="2" style="margin-left:24px; margin-top:4px">
<tr><td class="taskMetaprop">Status:</td><td class="taskMetadata">${t.properties["bpm:status"]}</td>
<tr><td class="taskMetaprop">Priority:</td><td class="taskMetadata">${t.properties["bpm:priority"]}</td>
<tr><td class="taskMetaprop">Start Date:</td><td class="taskMetadata">${t.startDate?date}</td></tr>
<tr><td class="taskMetaprop">Type:</td><td class="taskMetadata">${t.type?html}</td></tr>
<tr><td class="taskMetaprop">Complete:</td><td class="taskMetadata">${t.properties["bpm:percentComplete"]}%</td>
</table>
</td>
<td width="8">&nbsp;</td>
<td width="360">
<div class="taskResourceHeader">${t.name?html}:</div>
<div class="taskResources"></div>
<table border="0" width="360" class="taskActions">
<tr>
<td width="70">&nbsp;</td>
<#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>
</#list>
<td width="70">&nbsp;</td>
</tr>
</table>
</td>
<td width="16">&nbsp;</td>
<td>
<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>
<br />
<br />
</td>
</tr>
</table>
</div>
</div>
</#if>

Binary file not shown.

After

Width:  |  Height:  |  Size: 827 B

View File

@@ -607,7 +607,7 @@ var MyDocs = {
/**
* OK button click handler for the Update Content pop-up panel
*/
updateOK: function(actionEl, nodeRef)
updateOK: function(actionEl)
{
if (this.fileInput.value.length > 0)
{
@@ -652,7 +652,10 @@ var MyDocs = {
this.popupPanel.setStyle("display", "none");
this.popupPanel = null;
}
this.fxOverlay.start(0);
if (this.fxOverlay)
{
this.fxOverlay.start(0);
}
}
};

View File

@@ -5,6 +5,7 @@ var MySpaces = {
DETAIL_MARGIN: 56,
TITLE_FONT_SIZE: 18,
RESOURCE_PANEL_HEIGHT: 150,
OVERLAY_OPACITY: 0.8,
fileInput: null,
Path: null,
Filter: null,
@@ -17,8 +18,9 @@ var MySpaces = {
{
if ($('spacePanel'))
{
$('spacePanelOverlay').setStyle('opacity', 0);
// show AJAX loading overlay
$('spacePanelOverlay').setStyle('visibility', 'visible');
$('spacePanelOverlayAjax').setStyle('visibility', 'visible');
$('spacePanel').setStyle('visibility', 'hidden');
// fire off the ajax request to populate the spaces list - the 'myspacespanel' webscript
// is responsible for rendering just the contents of the main panel div
@@ -54,7 +56,7 @@ var MySpaces = {
$('spacePanel').setHTML("Sorry, data currently unavailable.");
// hide the ajax wait panel and show the main spaces panel
$('spacePanelOverlay').setStyle('visibility', 'hidden');
$('spacePanelOverlayAjax').setStyle('visibility', 'hidden');
$('spacePanel').setStyle('visibility', 'visible');
}
}
@@ -67,7 +69,7 @@ var MySpaces = {
MySpaces.parseSpacePanels();
// hide the ajax wait panel and show the main spaces panel
$('spacePanelOverlay').setStyle('visibility', 'hidden');
$('spacePanelOverlayAjax').setStyle('visibility', 'hidden');
$('spacePanel').setStyle('visibility', 'visible');
},
@@ -473,6 +475,8 @@ var MySpaces = {
{
if (this.popupPanel != null) return;
this.fxOverlay = $("spacePanelOverlay").effect('opacity', {duration: MySpaces.ANIM_LENGTH});
var panel = $E(".spaceCreateSpacePanel", $(actionEl).getParent());
panel.setStyle("opacity", 0);
panel.setStyle("display", "inline");
@@ -493,6 +497,7 @@ var MySpaces = {
}
});
anim.start({'opacity': 1});
this.fxOverlay.start(MySpaces.OVERLAY_OPACITY);
this.popupPanel = panel;
},
@@ -548,6 +553,8 @@ var MySpaces = {
{
if (this.popupPanel != null) return;
this.fxOverlay = $("spacePanelOverlay").effect('opacity', {duration: MySpaces.ANIM_LENGTH});
var panel = $E(".spaceUploadPanel", $(actionEl).getParent());
panel.setStyle("opacity", 0);
panel.setStyle("display", "inline");
@@ -574,6 +581,7 @@ var MySpaces = {
var anim = new Fx.Styles(panel, {duration: MySpaces.ANIM_LENGTH, transition: Fx.Transitions.linear});
anim.start({'opacity': 1});
this.fxOverlay.start(MySpaces.OVERLAY_OPACITY);
this.popupPanel = panel;
},
@@ -583,14 +591,17 @@ var MySpaces = {
*/
uploadOK: function(actionEl, path)
{
// call the upload help to perform the upload
handleUploadHelper(this.fileInput,
"1", // TODO: generate unique ID? (parent space noderef?)
MySpaces.uploadCompleteHandler,
getContextPath(),
"/ajax/invoke/FileUploadBean.uploadFile",
{currentPath: path.replace("_%_", "'")}); // decode path
this.fileInput = null;
if (this.fileInput.value.length > 0)
{
// call the upload help to perform the upload
handleUploadHelper(this.fileInput,
"1", // TODO: generate unique ID? (parent space noderef?)
MySpaces.uploadCompleteHandler,
getContextPath(),
"/ajax/invoke/FileUploadBean.uploadFile",
{currentPath: path.replace("_%_", "'")}); // decode path
this.fileInput = null;
}
this.closePopupPanel();
},
@@ -607,6 +618,10 @@ var MySpaces = {
{
alert("ERROR: " + error);
}
if (this.fxOverlay)
{
this.fxOverlay.start(0);
}
},
/**
@@ -642,18 +657,168 @@ var MySpaces = {
}
},
/**
* Check Out a document item
*/
checkoutItem: function(name, noderef)
{
// ajax call to delete item
YAHOO.util.Connect.asyncRequest(
"POST",
getContextPath() + '/ajax/invoke/PortletActionsBean.checkoutItem',
{
success: function(response)
{
if (response.responseText.indexOf("OK:") == 0)
{
MySpaces.refreshList();
}
else
{
alert("Error during check out of item: " + response.responseText);
}
},
failure: function(response)
{
alert("Error during check out of item: " + response.responseText);
}
},
"noderef=" + noderef
);
},
/**
* Check In a document item
*/
checkinItem: function(name, noderef)
{
// ajax call to delete item
YAHOO.util.Connect.asyncRequest(
"POST",
getContextPath() + '/ajax/invoke/PortletActionsBean.checkinItem',
{
success: function(response)
{
if (response.responseText.indexOf("OK:") == 0)
{
MySpaces.refreshList();
}
else
{
alert("Error during check in of item: " + response.responseText);
}
},
failure: function(response)
{
alert("Error during check in of item: " + response.responseText);
}
},
"noderef=" + noderef
);
},
/**
* Display the Update File pop-up panel
*/
updateItem: function(actionEl, nodeRef)
{
if (this.popupPanel != null) return;
this.fxOverlay = $("spacePanelOverlay").effect('opacity', {duration: MySpaces.ANIM_LENGTH});
var panel = $("docUpdatePanel");
panel.setStyle("opacity", 0);
panel.setStyle("display", "inline");
Alfresco.Dom.smartAlignElement(panel, actionEl);
// make into a dragable panel
new Drag.Move(panel);
// Generate a file upload element
// To perform the actual upload, the element is moved to a hidden iframe
// from which the upload is performed - this is required as javascript cannot
// set the important properties on a file upload element for security reasons.
// <input size="35" style="width:100%" type="file" value="" id="_upload" name="_upload">
if (this.fileInput == null)
{
var fileInput = $(document.createElement("input"));
fileInput.type = "file";
fileInput.name = "_upload";
fileInput.size = "35";
fileInput.setStyle("width", "100%");
fileInput.addClass("spaceFormItem");
fileInput.injectTop(panel);
this.fileInput = fileInput;
}
var anim = new Fx.Styles(panel, {duration: MySpaces.ANIM_LENGTH, transition: Fx.Transitions.linear});
anim.start({'opacity': 1});
this.fxOverlay.start(MySpaces.OVERLAY_OPACITY);
this.popupPanel = panel;
this.popupPanel.nodeRef = nodeRef;
},
/**
* OK button click handler for the Update Content pop-up panel
*/
updateOK: function(actionEl)
{
if (this.fileInput.value.length > 0)
{
// call the upload help to perform the upload
handleUploadHelper(this.fileInput,
"1", // TODO: generate unique ID? (parent space noderef?)
MySpaces.uploadCompleteHandler,
getContextPath(),
"/ajax/invoke/ContentUpdateBean.updateFile",
{nodeRef: this.popupPanel.nodeRef});
}
this.closePopupPanel();
},
/**
* Cancel button click handler for various pop-up panels
*/
closePopupPanel: function()
{
if (this.fileInput != null)
{
this.fileInput.remove();
this.fileInput = null;
}
if (this.popupPanel != null)
{
this.popupPanel.setStyle("display", "none");
this.popupPanel = null;
}
if (this.fxOverlay)
{
this.fxOverlay.start(0);
}
},
/**
* Update the view filter
*/
filter: function(filter)
{
if (this.popupPanel != null) return;
$$('.spacefilterLink').each(function(filterLink, i)
{
if (i == filter)
{
filterLink.addClass("spacefilterLinkSelected");
}
else
{
filterLink.removeClass("spacefilterLinkSelected");
}
});
MySpaces.Filter = filter;
MySpaces.refreshList();
},
/**
* Refresh the main data list contents within the spacePanel container
*/
@@ -663,7 +828,7 @@ var MySpaces = {
var spacePanel = $('spacePanel');
spacePanel.setStyle('visibility', 'hidden');
// show the ajax wait panel
$('spacePanelOverlay').setStyle('visibility', 'visible');
$('spacePanelOverlayAjax').setStyle('visibility', 'visible');
spacePanel.empty();
spacePanel.removeEvents('mouseleave');
MySpaces.start();

View File

@@ -39,6 +39,7 @@ var MyTasks = {
init: function()
{
MyTasks.sortTasks();
MyTasks.parseTaskPanels();
// hide the ajax wait panel and show the main task panel
@@ -62,7 +63,7 @@ var MyTasks = {
{
if (detail.parentNode.isOpen == true)
{
detail.getElementsByTagName("div")[2].setStyle('overflow', 'auto');
$E('.taskResources', detail).setStyle('overflow', 'auto');
}
});
}
@@ -228,7 +229,7 @@ var MyTasks = {
animInfo[j] = {'opacity': [otherOpacity, 0]};
}
otherDetail.getElementsByTagName("div")[2].setStyle('overflow', 'hidden');
$E('.taskResources', otherDetail).setStyle('overflow', 'hidden');
}
});
}
@@ -246,7 +247,7 @@ var MyTasks = {
'height': [detailHeight, detail.defHeight],
'opacity': [detail.getStyle('opacity'), 0]};
detail.getElementsByTagName("div")[2].setStyle('overflow', 'hidden');
$E('.taskResources', detail).setStyle('overflow', 'hidden');
}
fxInfo.start(animInfo);
fxDetail.start(animDetail);
@@ -315,7 +316,54 @@ var MyTasks = {
taskPanel.empty();
taskPanel.removeEvents('mouseleave');
MyTasks.start();
},
/**
* Update the view filter
*/
filter: function(filter)
{
$$('.taskfilterLink').each(function(filterLink, i)
{
if (i == filter)
{
filterLink.addClass("taskfilterLinkSelected");
}
else
{
filterLink.removeClass("taskfilterLinkSelected");
}
});
MyTasks.Filter = filter;
MyTasks.refreshList();
},
sortTasks: function()
{
var taskArray = new Array();
$$('#taskPanel .taskRow').each(function(taskDiv, i)
{
taskArray[i] = {dueDate: taskDiv.getProperty('rel'), theDiv: taskDiv.clone()};
});
taskArray.sort(MyTasks.sortByDueDate);
var taskPanel = $('taskPanel');
taskPanel.empty();
taskPanel.removeEvents('mouseleave');
for(var i = 0; i < taskArray.length; i++)
{
taskArray[i].theDiv.injectInside(taskPanel);
}
},
sortByDueDate: function(a, b)
{
var x = a.dueDate;
var y = b.dueDate;
return ((x < y) ? -1 : ((x > y) ? 1 : 0));
}
};
window.addEvent('load', MyTasks.start);