diff --git a/config/alfresco/templates/client/doclist_preview_panel.ftl b/config/alfresco/templates/client/doclist_preview_panel.ftl index 42b56bb9d9..266eef2522 100644 --- a/config/alfresco/templates/client/doclist_preview_panel.ftl +++ b/config/alfresco/templates/client/doclist_preview_panel.ftl @@ -17,6 +17,7 @@ +<#assign navurl='/navigate/showDocDetails/' + node.nodeRef.storeRef.protocol + '/' + node.nodeRef.storeRef.identifier + '/' + node.nodeRef.id> <#if node.isLocked > <#elseif hasAspect(node, "cm:workingcopy") == 1> @@ -40,7 +41,6 @@ -<#assign navurl='/navigate/showDocDetails/' + node.nodeRef.storeRef.protocol + '/' + node.nodeRef.storeRef.identifier + '/' + node.nodeRef.id>
(Locked)
onclick='event.cancelBubble=true;MyDocs.deleteItem("${node.name}", "${node.nodeRef}");'>DeleteMore Actions...
diff --git a/config/alfresco/templates/client/myspaces_preview_panel.ftl b/config/alfresco/templates/client/myspaces_preview_panel.ftl index 0becaa9b15..6a5ab1a8ce 100644 --- a/config/alfresco/templates/client/myspaces_preview_panel.ftl +++ b/config/alfresco/templates/client/myspaces_preview_panel.ftl @@ -1,5 +1,5 @@ <#assign isImage=node.isDocument && (node.mimetype = "image/gif" || node.mimetype = "image/jpeg" || node.mimetype = "image/png")> - +
diff --git a/config/alfresco/templates/client/task_resource_panel.ftl b/config/alfresco/templates/client/task_resource_panel.ftl index 66dc878f3c..9a8bec0c40 100644 --- a/config/alfresco/templates/client/task_resource_panel.ftl +++ b/config/alfresco/templates/client/task_resource_panel.ftl @@ -1,13 +1,15 @@ -
@@ -11,7 +11,7 @@ Sorry, no preview currently available for this document. <#elseif isImage> -
+
<#elseif node.isContainer> <#list node.children?sort_by('name') as c> <#--if (c_index >= 25)>
...
<#break>--> @@ -25,29 +25,44 @@
- <#if node.isDocument> +<#assign navurl='/navigate/showDocDetails/' + node.nodeRef.storeRef.protocol + '/' + node.nodeRef.storeRef.identifier + '/' + node.nodeRef.id> +<#if node.isDocument> - - +<#if node.isLocked > + +<#elseif hasAspect(node, "cm:workingcopy") == 1> + +<#else> + + +<#if node.isLocked > + +<#else> + + - - +<#if node.isLocked > + +<#else> + + + - + - <#else> +<#else> - + - + - +
CheckoutEdit Details(Locked)onclick='event.cancelBubble=true;MySpaces.checkinItem("${node.name}", "${node.nodeRef}");'>Check Inonclick='event.cancelBubble=true;MySpaces.checkoutItem("${node.name}", "${node.nodeRef}");'>Check OutEdit DetailsEdit Details
UpdateView ContentUpdateUpdateView Content
onclick='event.cancelBubble=true;MySpaces.deleteItem("${node.name}", "${node.nodeRef}");'>DeleteMore Actions...More Actions...
Edit DetailsEdit Details onclick='event.cancelBubble=true;MySpaces.deleteItem("${node.name}", "${node.nodeRef}");'>Delete
More Actions...More Actions...
+<#assign count=0> +
<#list task.packageResources as res> - - + <#assign count=count+1> + + diff --git a/config/alfresco/templates/webscripts/org/alfresco/portlets/doclist.get.html.ftl b/config/alfresco/templates/webscripts/org/alfresco/portlets/doclist.get.html.ftl index 1cc67ce77d..d34e851754 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/portlets/doclist.get.html.ftl +++ b/config/alfresco/templates/webscripts/org/alfresco/portlets/doclist.get.html.ftl @@ -9,8 +9,6 @@ - - + + - - - - - - - - - - - - +
- <#if res.isDocument> - ${res.name} - <#else> - ${res.name} - + <#if res.isDocument> + ${res.name} + <#else> + ${res.name} +
-
  -
- <#-- the count value is retrieved and set dynamically from the AJAX webscript output above --> - Showing 0 <#if filter=4>overdue task(s)<#if filter=1> due today<#if filter=2> due next week<#if filter=3> with no due date set. -
-
-
+ + + + +
  + + + + + + + + + + +
+ + + + + + + + + +
Tasks to doDue TodayNext 7 daysNo due dateOverdue + Refresh +
+
+
+
+ <#-- populated via an AJAX call to 'mytaskspanel' webscript --> + <#-- resolved filter required as argument --> + +
+
+
+ <#-- the count value is retrieved and set dynamically from the AJAX webscript output above --> + Showing 0 <#if filter=4>overdue task(s)<#if filter=1> due today<#if filter=2> due next week<#if filter=3> with no due date set +
+
+
 
+
+ + + +
- \ No newline at end of file + \ No newline at end of file diff --git a/config/alfresco/templates/webscripts/org/alfresco/portlets/mytaskspanel.get.html.ftl b/config/alfresco/templates/webscripts/org/alfresco/portlets/mytaskspanel.get.html.ftl index d0c6138b3c..810bddeabd 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/portlets/mytaskspanel.get.html.ftl +++ b/config/alfresco/templates/webscripts/org/alfresco/portlets/mytaskspanel.get.html.ftl @@ -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> -
+
99999999999999">
<#if hasDue> @@ -39,29 +39,40 @@
-
- - - - - - -
Status:
Priority:
Start Date:
Type:
Complete:
-
-
${t.name?html}:
-
-
- Manage Task Details -
-
- - - <#list t.transitions as wt> - - - -
${wt.label?html}
-
+ + + + + + + + +
+ + + + + + +
Status:
Priority:
Start Date:
Type:
Complete:
+
  +
${t.name?html}:
+
+ + + + <#list t.transitions as wt> + + + + +
 ${wt.label?html} 
+
  +
Manage Task
+ Manage Task Details +
+
+
diff --git a/source/web/images/parts/spacelist_breadbg.png b/source/web/images/parts/spacelist_breadbg.png new file mode 100644 index 0000000000..609a1da04a Binary files /dev/null and b/source/web/images/parts/spacelist_breadbg.png differ diff --git a/source/web/scripts/ajax/doclist.js b/source/web/scripts/ajax/doclist.js index cc80819b52..823c578dcc 100644 --- a/source/web/scripts/ajax/doclist.js +++ b/source/web/scripts/ajax/doclist.js @@ -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); + } } }; diff --git a/source/web/scripts/ajax/myspaces.js b/source/web/scripts/ajax/myspaces.js index 86f5dfd827..5e45557d06 100644 --- a/source/web/scripts/ajax/myspaces.js +++ b/source/web/scripts/ajax/myspaces.js @@ -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. + // + 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(); diff --git a/source/web/scripts/ajax/mytasks.js b/source/web/scripts/ajax/mytasks.js index b8f1f1a78e..c2f2497da5 100644 --- a/source/web/scripts/ajax/mytasks.js +++ b/source/web/scripts/ajax/mytasks.js @@ -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); \ No newline at end of file