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

View File

@@ -1,5 +1,5 @@
<#assign isImage=node.isDocument && (node.mimetype = "image/gif" || node.mimetype = "image/jpeg" || node.mimetype = "image/png")> <#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> <tr>
<td> <td>
<div class="spacePreview"> <div class="spacePreview">
@@ -11,7 +11,7 @@
Sorry, no preview currently available for this document. Sorry, no preview currently available for this document.
</#if> </#if>
<#elseif isImage> <#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> <#elseif node.isContainer>
<#list node.children?sort_by('name') as c> <#list node.children?sort_by('name') as c>
<#--if (c_index >= 25)><div>...</div><#break></#if>--> <#--if (c_index >= 25)><div>...</div><#break></#if>-->
@@ -25,29 +25,44 @@
<td width="24"></td> <td width="24"></td>
<td width="300"> <td width="300">
<table width="100%" cellpadding="0" cellspacing="0"> <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> <tr>
<td class="spaceAction docActionCheckout">Checkout</td> <#if node.isLocked >
<td class="spaceAction docActionEditDetails">Edit Details</td> <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>
<tr> <tr>
<td class="spaceAction docActionUpdate">Update</td> <#if node.isLocked >
<td class="spaceAction docActionViewContent">View Content</td> <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>
<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 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> </tr>
<#else> <#else>
<tr> <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> <td class="spaceAction spaceActionDelete" <#if node.hasPermission("Delete")>onclick='event.cancelBubble=true;MySpaces.deleteItem("${node.name}", "${node.nodeRef}");'</#if>>Delete</td>
</tr> </tr>
<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> <td></td>
</tr> </tr>
</#if> </#if>
</table> </table>
</td> </td>
</tr> </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> <#list task.packageResources as res>
<tr> <#assign count=count+1>
<td><a href="${url.context}${res.url}" target="new"><img src="${url.context}${res.icon16}" border=0></a></td> <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> <td>
<#if res.isDocument> <#if res.isDocument>
<a class="resourceLink" onclick="event.cancelBubble=true;" href="${url.context}${res.url}" target="new">${res.name}</a> <a class="resourceLink" onclick="event.cancelBubble=true;" href="${url.context}${res.url}" target="new">${res.name}</a>
<#else> <#else>
<span class="resourceLink">${res.name}</span> <span class="resourceLink">${res.name}</span>
</#if> </#if>
</td> </td>
</tr> </tr>
</#list> </#list>

View File

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

View File

@@ -16,7 +16,7 @@
(filter=3 && d.mimetype="application/pdf") || (filter=3 && d.mimetype="application/pdf") ||
(filter=4 && (dateCompare(d.properties["cm:modified"],date,weekms) == 1 || dateCompare(d.properties["cm:created"], date, weekms) == 1))> (filter=4 && (dateCompare(d.properties["cm:modified"],date,weekms) == 1 || dateCompare(d.properties["cm:created"], date, weekms) == 1))>
<#assign count=count+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"> <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> <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> </div>

View File

@@ -48,9 +48,11 @@
</#if> </#if>
</#list> </#list>
</div> </div>
<!--
<div class="spaceTitle"> <div class="spaceTitle">
<img src="${url.context}${home.icon16}" width="16" height="16" alt="" class="spaceImageIcon">${home.name?html} <img src="${url.context}${home.icon16}" width="16" height="16" alt="" class="spaceImageIcon">${home.name?html}
</div> </div>
-->
<div class="spaceToolbar"> <div class="spaceToolbar">
<#-- TODO: permission checks on the actions! --> <#-- TODO: permission checks on the actions! -->
<#-- Upload File action --> <#-- 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="OK" onclick='MySpaces.uploadOK(this, "${path?url?replace("'","_%_")}");'>
<input class="spaceFormItem" type="button" value="Cancel" onclick="MySpaces.closePopupPanel();"> <input class="spaceFormItem" type="button" value="Cancel" onclick="MySpaces.closePopupPanel();">
</div> </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 --> <#-- 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="spaceToolbarAction spaceToolbarActionCreateSpace" title="Create a new Space" <#if home.hasPermission("CreateChildren")>onclick="MySpaces.createSpace(this);"</#if>>Create Space</div>
<div class="spaceCreateSpacePanel"> <div class="spaceCreateSpacePanel">
@@ -72,14 +78,14 @@
<input class="spaceFormItem" type="button" value="Cancel" onclick="MySpaces.closePopupPanel();"> <input class="spaceFormItem" type="button" value="Cancel" onclick="MySpaces.closePopupPanel();">
</div> </div>
</div> </div>
<div> <div class="spaceHeader">
<table border=0 cellspacing=8 cellpadding=0 width=100%> <table border="0" cellspacing="6" cellpadding="0" width="100%">
<tr> <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=0>spacefilterLinkSelected</#if>" href="#" onclick="MySpaces.filter(0); return false;">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=1>spacefilterLinkSelected</#if>" href="#" onclick="MySpaces.filter(1); return false;">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=2>spacefilterLinkSelected</#if>" href="#" onclick="MySpaces.filter(2); return false;">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=3>spacefilterLinkSelected</#if>" href="#" onclick="MySpaces.filter(3); return false;">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=4>spacefilterLinkSelected</#if>" href="#" onclick="MySpaces.filter(4); return false;">Recently Modified</a></th>
<td align=right> <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> <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> </td>
@@ -87,6 +93,7 @@
</table> </table>
</div> </div>
<div id="spacePanelOverlay"></div> <div id="spacePanelOverlay"></div>
<div id="spacePanelOverlayAjax"></div>
<div id="spacePanel"> <div id="spacePanel">
<#-- populated via an AJAX call to 'myspacespanel' webscript --> <#-- populated via an AJAX call to 'myspacespanel' webscript -->
<#-- resolved path, filter and home.noderef required as arguments --> <#-- resolved path, filter and home.noderef required as arguments -->
@@ -100,7 +107,7 @@
</div> </div>
<div class="spaceFooter"> <div class="spaceFooter">
<#-- the count value is retrieved and set dynamically from the AJAX webscript output above --> <#-- 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>
</div> </div>
@@ -109,7 +116,7 @@ a.spacefilterLink:link, a.spacefilterLink:visited
{ {
color: #8EA1B3; color: #8EA1B3;
font-family: Trebuchet MS, Arial, Helvetica, sans-serif; font-family: Trebuchet MS, Arial, Helvetica, sans-serif;
font-size: 13px; font-size: 12px;
font-weight: bold; font-weight: bold;
text-decoration: none; text-decoration: none;
padding-left: 4px; padding-left: 4px;
@@ -124,8 +131,7 @@ a.spacefilterLink:hover
a.spacefilterLinkSelected:link, a.spacefilterLinkSelected:visited a.spacefilterLinkSelected:link, a.spacefilterLinkSelected:visited
{ {
color: #168ECE; color: #0085CA;
background-color: #EEF7FB;
} }
.spaceTable .spaceTable
@@ -147,10 +153,16 @@ a.spacefilterLinkSelected:link, a.spacefilterLinkSelected:visited
border-bottom: 1px solid #CCD4DB; border-bottom: 1px solid #CCD4DB;
} }
.spaceHeader
{
background-image: url(${url.context}/images/parts/doclist_headerbg.png);
height: 30px;
}
#spacePanel #spacePanel
{ {
height: 320px; height: 320px;
width: 720px; width: 718px;
overflow: auto; overflow: auto;
overflow-y: scroll; overflow-y: scroll;
border-top: 1px solid #CCD4DB; border-top: 1px solid #CCD4DB;
@@ -159,6 +171,15 @@ a.spacefilterLinkSelected:link, a.spacefilterLinkSelected:visited
} }
#spacePanelOverlay #spacePanelOverlay
{
background-color: #fff;
position: absolute;
height: 320px;
width: 720px;
overflow: hidden;
}
#spacePanelOverlayAjax
{ {
background-color: #fff; background-color: #fff;
background-image: url(${url.context}/images/icons/ajax_anim.gif); 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-top: 1px solid #F8FCFD;
border-bottom: 1px solid #CCD4DB; border-bottom: 1px solid #CCD4DB;
} }
.spaceRowOdd
{
background-color: #EEF7FB;
}
.spaceRowEven
{
background-color: #F8FCFD;
}
.spaceFooter .spaceFooter
{ {
width: 700px; height: 34px;
padding: 8px; width: 718px;
padding: 0px;
border: 1px solid #F8FCFD; border: 1px solid #F8FCFD;
background-image: url(${url.context}/images/parts/doclist_footerbg.png); background-image: url(${url.context}/images/parts/doclist_footerbg.png);
text-align: center; text-align: center;
@@ -190,6 +220,12 @@ a.spacefilterLinkSelected:link, a.spacefilterLinkSelected:visited
font-weight: bold; font-weight: bold;
} }
.spaceFooterText
{
display: block;
margin-top: 8px;
}
.spaceItem .spaceItem
{ {
font-family: Trebuchet MS, Arial, Helvetica, sans-serif; font-family: Trebuchet MS, Arial, Helvetica, sans-serif;
@@ -264,9 +300,9 @@ a.spacefilterLinkSelected:link, a.spacefilterLinkSelected:visited
.spaceBreadcrumb .spaceBreadcrumb
{ {
background-color: #DBE1E7; background-image: url(${url.context}/images/parts/spacelist_breadbg.png);
padding: 6px;
border-bottom: 1px solid #CCD4DB; border-bottom: 1px solid #CCD4DB;
padding: 6px;
} }
a.spaceBreadcrumbLink:link, a.spaceBreadcrumbLink:visited, a.spaceBreadcrumbLink:hover a.spaceBreadcrumbLink:link, a.spaceBreadcrumbLink:visited, a.spaceBreadcrumbLink:hover
@@ -295,8 +331,8 @@ a.spaceBreadcrumbLink:link, a.spaceBreadcrumbLink:visited, a.spaceBreadcrumbLink
.spaceToolbar .spaceToolbar
{ {
background-color: #EEF7FB; background-color: #EEF7FB;
height: 4em;
border-bottom: 1px solid #CCD4DB; border-bottom: 1px solid #CCD4DB;
height: 44px;
} }
.spaceToolbarAction .spaceToolbarAction
@@ -309,9 +345,9 @@ a.spaceBreadcrumbLink:link, a.spaceBreadcrumbLink:visited, a.spaceBreadcrumbLink
font-size: 12px; font-size: 12px;
float: left; float: left;
margin: 3px; margin: 3px;
height: 2em; height: 20px;
cursor: pointer; cursor: pointer;
padding: 10px 4px 2px 34px; padding: 10px 4px 6px 34px;
border: 1px dashed #CCD4DB; border: 1px dashed #CCD4DB;
} }
@@ -335,11 +371,11 @@ a.spaceBreadcrumbLink:link, a.spaceBreadcrumbLink:visited, a.spaceBreadcrumbLink
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: left; background-position: left;
width: 87px; width: 87px;
height: 28px; height: 20px;
border: 1px solid #ffffff; border: 1px solid #ffffff;
float: left; float: left;
display: block; display: block;
padding: 10px 0px 0px 36px; padding: 10px 0px 8px 36px;
cursor: pointer; cursor: pointer;
} }
@@ -350,6 +386,19 @@ a.spaceBreadcrumbLink:link, a.spaceBreadcrumbLink:visited, a.spaceBreadcrumbLink
border-right: none; 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 .docActionEditDetails
{ {
background-image: url(${url.context}/images/icons/doclist_action_edit.png); 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; padding: 8px;
margin: 8px; margin: 8px;
display: none; display: none;
z-index: 1;
-moz-border-radius: 5px; -moz-border-radius: 5px;
} }
@@ -422,6 +472,21 @@ a.spaceBreadcrumbLink:link, a.spaceBreadcrumbLink:visited, a.spaceBreadcrumbLink
padding: 8px; padding: 8px;
margin: 8px; margin: 8px;
display: none; 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; -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" src="/alfresco/scripts/ajax/mytasks.js"></script>
<script type="text/javascript">setContextPath('${url.context}');</script> <script type="text/javascript">setContextPath('${url.context}');</script>
<script type="text/javascript" src="/firebug.js"></script>
<script> <script>
// create manager object for the pop-up summary panels // create manager object for the pop-up summary panels
var TaskInfoMgr = new Alfresco.PanelManager("TaskInfoBean.sendTaskInfo", "taskId"); 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 --> <#-- 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> <#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"> <table border="0" cellspacing="0" cellpadding="0" class="taskTable">
<tr> <tr>
<td width=36 bgcolor="#F9F3B0">&nbsp;</td> <td width="36" bgcolor="#F8F2AC">&nbsp;</td>
<td align=center height=40 style="border-left: 1px solid #EBE398;"> <td>
<table border=0 cellspacing=8 cellpadding=0> <table border="0" cellspacing="0" cellpadding="0">
<tr> <tr>
<th><a class="taskfilterLink <#if filter=0>taskfilterLinkSelected</#if>" href="${scripturl("?f=0")}">Tasks to do</a></th> <td align=center height=40 style="border-left: 1px solid #EBE398;">
<th><a class="taskfilterLink <#if filter=1>taskfilterLinkSelected</#if>" href="${scripturl("?f=1")}">Due Today</a></th> <table border="0" cellspacing="8" cellpadding="0" width="100%">
<th><a class="taskfilterLink <#if filter=2>taskfilterLinkSelected</#if>" href="${scripturl("?f=2")}">Next 7 days</a></th> <tr>
<th><a class="taskfilterLink <#if filter=3>taskfilterLinkSelected</#if>" href="${scripturl("?f=3")}">No due date</a></th> <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=4>taskfilterLinkSelected</#if>" href="${scripturl("?f=4")}">Overdue</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>
</tr> <th><a class="taskfilterLink <#if filter=2>taskfilterLinkSelected</#if>" href="#" onclick="MyTasks.filter(2); return false;">Next 7 days</a></th>
</table> <th><a class="taskfilterLink <#if filter=3>taskfilterLinkSelected</#if>" href="#" onclick="MyTasks.filter(3); return false;">No due date</a></th>
</td> <th><a class="taskfilterLink <#if filter=4>taskfilterLinkSelected</#if>" href="#" onclick="MyTasks.filter(4); return false;" style="color: #DF3704;">Overdue</a></th>
<td width=4 class="paperEdgeRight"><td> <td width="150" align="right">
</tr> <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>
<tr><td bgcolor="#F9F3B0">&nbsp;</td><td> </td>
<div id="taskPanelOverlay"></div> </tr>
<div id="taskPanel"> </table>
<#-- populated via an AJAX call to 'mytaskspanel' webscript --> </td>
<#-- resolved filter required as argument --> </tr>
<script>MyTasks.ServiceContext="${url.serviceContext}";MyTasks.Filter="${filter}";</script> <tr>
</div> <td>
</td> <div id="taskPanelOverlay"></div>
<td width=4 class="paperEdgeRight"><td> <div id="taskPanel">
</tr> <#-- populated via an AJAX call to 'mytaskspanel' webscript -->
<tr> <#-- resolved filter required as argument -->
<td bgcolor="#F9F3B0">&nbsp;</td> <script>MyTasks.ServiceContext="${url.serviceContext}";MyTasks.Filter="${filter}";</script>
<td> </div>
<div id="taskFooter"> </td>
<#-- the count value is retrieved and set dynamically from the AJAX webscript output above --> </tr>
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>. <tr>
</div> <td>
</td> <div id="taskFooter">
<td class="paperEdgeRight"><td> <#-- the count value is retrieved and set dynamically from the AJAX webscript output above -->
</tr> <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>
<tr> </div>
<td class="paperLeftCorner"><div style="height:6px"></div></td> </td>
<td class="paperBottomEdge"></td> </tr>
<td class="paperRightCorner"></td> </table>
</tr> </td>
<td class="paperEdgeRight">&nbsp;</td>
</tr>
</table> </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 a.taskfilterLink:link, a.taskfilterLink:visited
{ {
color: #5A5741; color: #5A5741;
@@ -74,13 +83,13 @@ a.taskfilterLink:link, a.taskfilterLink:visited
a.taskfilterLink:hover a.taskfilterLink:hover
{ {
color: #FFFFFF; color: #FFFFFF !important;
background-color: #FDB64F; background-color: #FDB64F;
} }
a.taskfilterLinkSelected:link, a.taskfilterLinkSelected:visited a.taskfilterLinkSelected:link, a.taskfilterLinkSelected:visited
{ {
color: #FFFFFF; color: #FFFFFF !important;
background-color: #FDB64F; 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-image: url(${url.context}/images/logo/alf_task_bg.png);
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: 72 64; background-position: 72 64;
width: 716px;
} }
#taskPanel #taskPanel
{ {
height: 300px; height: 300px;
width: 716px; width: 672px;
overflow: auto; overflow: auto;
overflow-y: scroll;
border-top: 1px solid #EBE398; border-top: 1px solid #EBE398;
border-left: 1px solid #F6DEA0; border-left: 1px solid #F6DEA0;
visibility: hidden; visibility: hidden;
@@ -113,7 +124,7 @@ a.taskfilterLinkSelected:link, a.taskfilterLinkSelected:visited
border-top: 1px solid #EBE398; border-top: 1px solid #EBE398;
border-left: 1px solid #F6DEA0; border-left: 1px solid #F6DEA0;
height: 300px; height: 300px;
width: 716px; width: 672px;
overflow: hidden; overflow: hidden;
} }
@@ -126,17 +137,29 @@ a.taskfilterLinkSelected:link, a.taskfilterLinkSelected:visited
#taskFooter #taskFooter
{ {
width: 700px; height: 36px;
padding: 8px; width: 656px;
padding: 0px;
border-top: 1px solid #EBE398; border-top: 1px solid #EBE398;
border-left: 1px solid #F6DEA0; border-left: 1px solid #F6DEA0;
text-align: right; text-align: center;
color: #5A5741; color: #5A5741;
font-family: Trebuchet MS, Arial, Helvetica, sans-serif; font-family: Trebuchet MS, Arial, Helvetica, sans-serif;
font-size: 13px; font-size: 13px;
font-weight: bold; font-weight: bold;
} }
.taskFooterText
{
display: block;
margin-top: 8px;
}
.taskTitle
{
cursor: pointer;
}
.taskItem .taskItem
{ {
font-family: Trebuchet MS, Arial, Helvetica, sans-serif; font-family: Trebuchet MS, Arial, Helvetica, sans-serif;
@@ -186,17 +209,26 @@ a.taskfilterLinkSelected:link, a.taskfilterLinkSelected:visited
{ {
border: 1px solid #FFE500; border: 1px solid #FFE500;
background-color: #FEF8BC; background-color: #FEF8BC;
margin: 4px 0px 0px 16px; margin: 4px 0px 0px 0px;
width: 400px; width: 360px;
height: 80px; height: 80px;
display: block;
overflow: hidden; overflow: hidden;
} }
.taskResourceOdd
{
background-color: #F8FCFD;
}
.taskResourceEven
{
background-color: #EEF7FB;
}
.taskResourceHeader .taskResourceHeader
{ {
color: #5A5741; color: #5A5741;
font-family: Trebuchet MS, Arial, Helvetica, sans-serif; font-family: Trebuchet MS, Arial, Helvetica, sans-serif;
padding: 0px 0px 0px 16px; padding: 0px;
font-weight: bold; font-weight: bold;
display: inline; display: inline;
} }
@@ -263,16 +295,24 @@ a.taskAction:hover
.paperLeftCorner .paperLeftCorner
{ {
background-image: url(${url.context}/images/parts/paper_leftcorner.png); background-image: url(${url.context}/images/parts/paper_leftcorner.png);
float: left;
height: 6px;
width: 36px;
} }
.paperBottomEdge .paperBottomEdge
{ {
background-image: url(${url.context}/images/parts/paper_bottomedge.png); background-image: url(${url.context}/images/parts/paper_bottomedge.png);
float: left;
height: 6px;
width: 676px;
} }
.paperRightCorner .paperRightCorner
{ {
background-color: white;
background-image: url(${url.context}/images/parts/paper_rightcorner.gif); 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="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))> (args.f="4" && hasDue && (dateCompare(date?date, due?date) == 1))>
<#assign count=count+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="taskTitle">
<div class="taskIndicator"> <div class="taskIndicator">
<#if hasDue> <#if hasDue>
@@ -39,29 +39,40 @@
</div> </div>
</div> </div>
<div class="taskDetail"> <div class="taskDetail">
<div style="float:left"> <table border="0" cellpadding="0" cellspacing="0" width="100%">
<table cellpadding='2' cellspacing='0' style="margin-left:32px;margin-top:16px"> <tr>
<tr><td class="taskMetaprop">Status:</td><td class="taskMetadata">${t.properties["bpm:status"]}</td> <td width="182">
<tr><td class="taskMetaprop">Priority:</td><td class="taskMetadata">${t.properties["bpm:priority"]}</td> <table cellpadding="2" cellspacing="2" style="margin-left:24px; margin-top:4px">
<tr><td class="taskMetaprop">Start Date:</td><td class="taskMetadata">${t.startDate?date}</td></tr> <tr><td class="taskMetaprop">Status:</td><td class="taskMetadata">${t.properties["bpm:status"]}</td>
<tr><td class="taskMetaprop">Type:</td><td class="taskMetadata">${t.type?html}</td></tr> <tr><td class="taskMetaprop">Priority:</td><td class="taskMetadata">${t.properties["bpm:priority"]}</td>
<tr><td class="taskMetaprop">Complete:</td><td class="taskMetadata">${t.properties["bpm:percentComplete"]}%</td> <tr><td class="taskMetaprop">Start Date:</td><td class="taskMetadata">${t.startDate?date}</td></tr>
</table> <tr><td class="taskMetaprop">Type:</td><td class="taskMetadata">${t.type?html}</td></tr>
</div> <tr><td class="taskMetaprop">Complete:</td><td class="taskMetadata">${t.properties["bpm:percentComplete"]}%</td>
<div class="taskResourceHeader">${t.name?html}:</div> </table>
<div class="taskResources"></div> </td>
<div style="float:right;margin-right:48px;margin-top:-48px;"> <td width="8">&nbsp;</td>
<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> <td width="360">
</div> <div class="taskResourceHeader">${t.name?html}:</div>
<div> <div class="taskResources"></div>
<table class="taskActions" style="padding-left:16px"> <table border="0" width="360" class="taskActions">
<tr> <tr>
<#list t.transitions as wt> <td width="70">&nbsp;</td>
<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 t.transitions as wt>
</#list> <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>
</tr> </#list>
</table> <td width="70">&nbsp;</td>
</div> </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>
</div> </div>
</#if> </#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 * OK button click handler for the Update Content pop-up panel
*/ */
updateOK: function(actionEl, nodeRef) updateOK: function(actionEl)
{ {
if (this.fileInput.value.length > 0) if (this.fileInput.value.length > 0)
{ {
@@ -652,7 +652,10 @@ var MyDocs = {
this.popupPanel.setStyle("display", "none"); this.popupPanel.setStyle("display", "none");
this.popupPanel = null; 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, DETAIL_MARGIN: 56,
TITLE_FONT_SIZE: 18, TITLE_FONT_SIZE: 18,
RESOURCE_PANEL_HEIGHT: 150, RESOURCE_PANEL_HEIGHT: 150,
OVERLAY_OPACITY: 0.8,
fileInput: null, fileInput: null,
Path: null, Path: null,
Filter: null, Filter: null,
@@ -17,8 +18,9 @@ var MySpaces = {
{ {
if ($('spacePanel')) if ($('spacePanel'))
{ {
$('spacePanelOverlay').setStyle('opacity', 0);
// show AJAX loading overlay // show AJAX loading overlay
$('spacePanelOverlay').setStyle('visibility', 'visible'); $('spacePanelOverlayAjax').setStyle('visibility', 'visible');
$('spacePanel').setStyle('visibility', 'hidden'); $('spacePanel').setStyle('visibility', 'hidden');
// fire off the ajax request to populate the spaces list - the 'myspacespanel' webscript // 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 // is responsible for rendering just the contents of the main panel div
@@ -54,7 +56,7 @@ var MySpaces = {
$('spacePanel').setHTML("Sorry, data currently unavailable."); $('spacePanel').setHTML("Sorry, data currently unavailable.");
// hide the ajax wait panel and show the main spaces panel // hide the ajax wait panel and show the main spaces panel
$('spacePanelOverlay').setStyle('visibility', 'hidden'); $('spacePanelOverlayAjax').setStyle('visibility', 'hidden');
$('spacePanel').setStyle('visibility', 'visible'); $('spacePanel').setStyle('visibility', 'visible');
} }
} }
@@ -67,7 +69,7 @@ var MySpaces = {
MySpaces.parseSpacePanels(); MySpaces.parseSpacePanels();
// hide the ajax wait panel and show the main spaces panel // hide the ajax wait panel and show the main spaces panel
$('spacePanelOverlay').setStyle('visibility', 'hidden'); $('spacePanelOverlayAjax').setStyle('visibility', 'hidden');
$('spacePanel').setStyle('visibility', 'visible'); $('spacePanel').setStyle('visibility', 'visible');
}, },
@@ -473,6 +475,8 @@ var MySpaces = {
{ {
if (this.popupPanel != null) return; if (this.popupPanel != null) return;
this.fxOverlay = $("spacePanelOverlay").effect('opacity', {duration: MySpaces.ANIM_LENGTH});
var panel = $E(".spaceCreateSpacePanel", $(actionEl).getParent()); var panel = $E(".spaceCreateSpacePanel", $(actionEl).getParent());
panel.setStyle("opacity", 0); panel.setStyle("opacity", 0);
panel.setStyle("display", "inline"); panel.setStyle("display", "inline");
@@ -493,6 +497,7 @@ var MySpaces = {
} }
}); });
anim.start({'opacity': 1}); anim.start({'opacity': 1});
this.fxOverlay.start(MySpaces.OVERLAY_OPACITY);
this.popupPanel = panel; this.popupPanel = panel;
}, },
@@ -548,6 +553,8 @@ var MySpaces = {
{ {
if (this.popupPanel != null) return; if (this.popupPanel != null) return;
this.fxOverlay = $("spacePanelOverlay").effect('opacity', {duration: MySpaces.ANIM_LENGTH});
var panel = $E(".spaceUploadPanel", $(actionEl).getParent()); var panel = $E(".spaceUploadPanel", $(actionEl).getParent());
panel.setStyle("opacity", 0); panel.setStyle("opacity", 0);
panel.setStyle("display", "inline"); panel.setStyle("display", "inline");
@@ -574,6 +581,7 @@ var MySpaces = {
var anim = new Fx.Styles(panel, {duration: MySpaces.ANIM_LENGTH, transition: Fx.Transitions.linear}); var anim = new Fx.Styles(panel, {duration: MySpaces.ANIM_LENGTH, transition: Fx.Transitions.linear});
anim.start({'opacity': 1}); anim.start({'opacity': 1});
this.fxOverlay.start(MySpaces.OVERLAY_OPACITY);
this.popupPanel = panel; this.popupPanel = panel;
}, },
@@ -583,14 +591,17 @@ var MySpaces = {
*/ */
uploadOK: function(actionEl, path) uploadOK: function(actionEl, path)
{ {
// call the upload help to perform the upload if (this.fileInput.value.length > 0)
handleUploadHelper(this.fileInput, {
"1", // TODO: generate unique ID? (parent space noderef?) // call the upload help to perform the upload
MySpaces.uploadCompleteHandler, handleUploadHelper(this.fileInput,
getContextPath(), "1", // TODO: generate unique ID? (parent space noderef?)
"/ajax/invoke/FileUploadBean.uploadFile", MySpaces.uploadCompleteHandler,
{currentPath: path.replace("_%_", "'")}); // decode path getContextPath(),
this.fileInput = null; "/ajax/invoke/FileUploadBean.uploadFile",
{currentPath: path.replace("_%_", "'")}); // decode path
this.fileInput = null;
}
this.closePopupPanel(); this.closePopupPanel();
}, },
@@ -607,6 +618,10 @@ var MySpaces = {
{ {
alert("ERROR: " + error); 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 * Cancel button click handler for various pop-up panels
*/ */
closePopupPanel: function() closePopupPanel: function()
{ {
if (this.fileInput != null)
{
this.fileInput.remove();
this.fileInput = null;
}
if (this.popupPanel != null) if (this.popupPanel != null)
{ {
this.popupPanel.setStyle("display", "none"); this.popupPanel.setStyle("display", "none");
this.popupPanel = null; 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 * Refresh the main data list contents within the spacePanel container
*/ */
@@ -663,7 +828,7 @@ var MySpaces = {
var spacePanel = $('spacePanel'); var spacePanel = $('spacePanel');
spacePanel.setStyle('visibility', 'hidden'); spacePanel.setStyle('visibility', 'hidden');
// show the ajax wait panel // show the ajax wait panel
$('spacePanelOverlay').setStyle('visibility', 'visible'); $('spacePanelOverlayAjax').setStyle('visibility', 'visible');
spacePanel.empty(); spacePanel.empty();
spacePanel.removeEvents('mouseleave'); spacePanel.removeEvents('mouseleave');
MySpaces.start(); MySpaces.start();

View File

@@ -39,6 +39,7 @@ var MyTasks = {
init: function() init: function()
{ {
MyTasks.sortTasks();
MyTasks.parseTaskPanels(); MyTasks.parseTaskPanels();
// hide the ajax wait panel and show the main task panel // hide the ajax wait panel and show the main task panel
@@ -62,7 +63,7 @@ var MyTasks = {
{ {
if (detail.parentNode.isOpen == true) 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]}; 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], 'height': [detailHeight, detail.defHeight],
'opacity': [detail.getStyle('opacity'), 0]}; 'opacity': [detail.getStyle('opacity'), 0]};
detail.getElementsByTagName("div")[2].setStyle('overflow', 'hidden'); $E('.taskResources', detail).setStyle('overflow', 'hidden');
} }
fxInfo.start(animInfo); fxInfo.start(animInfo);
fxDetail.start(animDetail); fxDetail.start(animDetail);
@@ -315,7 +316,54 @@ var MyTasks = {
taskPanel.empty(); taskPanel.empty();
taskPanel.removeEvents('mouseleave'); taskPanel.removeEvents('mouseleave');
MyTasks.start(); 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); window.addEvent('load', MyTasks.start);