From 546eccf561ae2536c4807330ebae8635bfef2e7c Mon Sep 17 00:00:00 2001 From: Mike Hatfield Date: Mon, 4 Jun 2007 15:48:11 +0000 Subject: [PATCH] Point check-in. Office AddIn web scripts. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5842 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../alfresco/office/docActions.get.html.ftl | 4 + .../org/alfresco/office/docActions.get.js | 107 +++++-- .../office/documentDetails.get.html.ftl | 140 ++++++--- .../alfresco/office/documentDetails.get.js | 0 .../alfresco/office/myAlfresco.get.html.ftl | 148 +++++---- .../org/alfresco/office/myAlfresco.get.js | 0 .../org/alfresco/office/myTasks.get.desc.xml | 7 + .../org/alfresco/office/myTasks.get.html.ftl | 73 +++++ .../org/alfresco/office/myTasks.get.js | 0 .../office/myTasksDetail.get.desc.xml | 7 + .../office/myTasksDetail.get.html.ftl | 70 +++++ .../alfresco/office/navigation.get.html.ftl | 239 +++++++-------- .../org/alfresco/office/navigation.get.js | 10 + .../org/alfresco/office/search.get.html.ftl | 182 +++-------- .../org/alfresco/office/search.get.js | 0 .../office/searchResults.get.desc.xml | 7 + .../office/searchResults.get.html.ftl | 62 ++++ .../office/versionHistory.get.desc.xml | 7 - .../office/versionHistory.get.html.ftl | 88 ------ source/web/css/office.css | 290 ++++++++++++------ source/web/images/icons/make_versionable.gif | Bin 0 -> 278 bytes source/web/images/office/action_failed.gif | Bin 0 -> 374 bytes .../web/images/office/action_successful.gif | Bin 0 -> 394 bytes source/web/images/office/ajax_anim.gif | Bin 0 -> 970 bytes source/web/images/office/make_versionable.gif | Bin 0 -> 278 bytes source/web/images/office/my_tasks.gif | Bin 0 -> 595 bytes source/web/images/office/search_again.gif | Bin 0 -> 1034 bytes source/web/images/office/tab_left.gif | Bin 0 -> 377 bytes source/web/images/office/tab_right.gif | Bin 0 -> 2095 bytes source/web/images/office/task_item.gif | Bin 0 -> 1540 bytes source/web/images/office/task_overdue.gif | Bin 0 -> 110 bytes source/web/images/office/task_today.gif | Bin 0 -> 104 bytes source/web/scripts/office/my_tasks.js | 98 ++++++ source/web/scripts/office/office_addin.js | 160 ++++++++++ 34 files changed, 1110 insertions(+), 589 deletions(-) create mode 100644 config/alfresco/templates/webscripts/org/alfresco/office/docActions.get.html.ftl create mode 100644 config/alfresco/templates/webscripts/org/alfresco/office/documentDetails.get.js create mode 100644 config/alfresco/templates/webscripts/org/alfresco/office/myAlfresco.get.js create mode 100644 config/alfresco/templates/webscripts/org/alfresco/office/myTasks.get.desc.xml create mode 100644 config/alfresco/templates/webscripts/org/alfresco/office/myTasks.get.html.ftl create mode 100644 config/alfresco/templates/webscripts/org/alfresco/office/myTasks.get.js create mode 100644 config/alfresco/templates/webscripts/org/alfresco/office/myTasksDetail.get.desc.xml create mode 100644 config/alfresco/templates/webscripts/org/alfresco/office/myTasksDetail.get.html.ftl create mode 100644 config/alfresco/templates/webscripts/org/alfresco/office/navigation.get.js create mode 100644 config/alfresco/templates/webscripts/org/alfresco/office/search.get.js create mode 100644 config/alfresco/templates/webscripts/org/alfresco/office/searchResults.get.desc.xml create mode 100644 config/alfresco/templates/webscripts/org/alfresco/office/searchResults.get.html.ftl delete mode 100644 config/alfresco/templates/webscripts/org/alfresco/office/versionHistory.get.desc.xml delete mode 100644 config/alfresco/templates/webscripts/org/alfresco/office/versionHistory.get.html.ftl create mode 100644 source/web/images/icons/make_versionable.gif create mode 100644 source/web/images/office/action_failed.gif create mode 100644 source/web/images/office/action_successful.gif create mode 100644 source/web/images/office/ajax_anim.gif create mode 100644 source/web/images/office/make_versionable.gif create mode 100644 source/web/images/office/my_tasks.gif create mode 100644 source/web/images/office/search_again.gif create mode 100644 source/web/images/office/tab_left.gif create mode 100644 source/web/images/office/tab_right.gif create mode 100644 source/web/images/office/task_item.gif create mode 100644 source/web/images/office/task_overdue.gif create mode 100644 source/web/images/office/task_today.gif create mode 100644 source/web/scripts/office/my_tasks.js create mode 100644 source/web/scripts/office/office_addin.js diff --git a/config/alfresco/templates/webscripts/org/alfresco/office/docActions.get.html.ftl b/config/alfresco/templates/webscripts/org/alfresco/office/docActions.get.html.ftl new file mode 100644 index 0000000000..6d48b83dcf --- /dev/null +++ b/config/alfresco/templates/webscripts/org/alfresco/office/docActions.get.html.ftl @@ -0,0 +1,4 @@ +{ + "statusString":"${resultString}", + "statusCode":${resultCode?string} +} \ No newline at end of file diff --git a/config/alfresco/templates/webscripts/org/alfresco/office/docActions.get.js b/config/alfresco/templates/webscripts/org/alfresco/office/docActions.get.js index 5eabe57c59..faec54c1ca 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/office/docActions.get.js +++ b/config/alfresco/templates/webscripts/org/alfresco/office/docActions.get.js @@ -1,40 +1,79 @@ -// Generate a PDF transform of the current object +// Client has requested certain actions on the current document -if (document.isDocument) +/* Inputs */ +var docId = args["d"], + runAction = args["a"]; + +/* Outputs */ +var resultString = "Action failed.", + resultCode = false; + +var doc = search.findNode("workspace://SpacesStore/" + docId); + +if (doc != null && doc.isDocument) { - var runAction = args['action']; - var result = "Action failed."; - - if (runAction == "makepdf") + try { - var trans = document.transformDocument("application/pdf"); - result = "Action completed."; + if (runAction == "makepdf") + { + resultString = "Could not convert document"; + var nodeTrans = doc.transformDocument("application/pdf"); + if (nodeTrans != null) + { + resultString = "Document converted"; + resultCode = true; + } + } + else if (runAction == "delete") + { + resultString = "Could not delete document"; + if (doc.remove()) + { + resultString = "Document deleted"; + resultCode = true; + } + } + else if (runAction == "checkout") + { + var workingCopy = doc.checkout(); + if (workingCopy != null) + { + resultString = "Document checked out"; + resultCode = true; + } + } + else if (runAction == "checkin") + { + var originalDoc = doc.checkin(); + if (originalDoc != null) + { + resultString = "Document checked in"; + resultCode = true; + } + } + else if (runAction == "makeversion") + { + resultString = "Could not version document"; + if (doc.addAspect("cm:versionable")) + { + resultString = "Document versioned"; + resultCode = true; + } + } + else if (runAction == "test") + { + resultString = "Test complete."; + resultCode = true; + } + else + { + resultString = "Unknown action."; + } } - else if (runAction == "delete") + catch(e) { - var rc = document.remove(); - result = "Action completed."; + resultString = "Action failed due to exception"; } - else if (runAction == "checkout") - { - var wc = null; - wc = document.checkout(); - result = "Action completed."; - } - else if (runAction == "checkin") - { - var wc = document.checkin(); - result = "Action completed."; - } - else if (runAction == "makeversion") - { - var wc = document.addAspect("cm:versionable"); - result = "Action completed."; - } - else - { - result = "Unknown action."; - } - - result; -} \ No newline at end of file +} +model.resultString = resultString; +model.resultCode = resultCode; \ No newline at end of file diff --git a/config/alfresco/templates/webscripts/org/alfresco/office/documentDetails.get.html.ftl b/config/alfresco/templates/webscripts/org/alfresco/office/documentDetails.get.html.ftl index b264df59c3..09bc4a09fa 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/office/documentDetails.get.html.ftl +++ b/config/alfresco/templates/webscripts/org/alfresco/office/documentDetails.get.html.ftl @@ -1,8 +1,10 @@ -<#assign doc_actions="${url.context}/scripts/office/docActions.js"> +<#assign doc_actions="${url.context}/service/office/docActions"> <#if args.p?exists><#assign path=args.p><#else><#assign path=""> <#-- resolve the path (from Company Home) into a node --> <#if path?starts_with("/Company Home")> - <#if companyhome.childByNamePath[args.p[14..]]?exists> + <#if path?length=13> + <#assign d=companyhome> + <#elseif companyhome.childByNamePath[args.p[14..]]?exists> <#assign d=companyhome.childByNamePath[args.p[14..]]> <#else> <#assign d=companyhome> @@ -10,32 +12,29 @@ <#else> <#assign d=companyhome> - - - - Document Details - - + + +
-
Details
+
Current Document Details
-
+
@@ -43,22 +42,23 @@ <#if d.isDocument> ${d.name} - -
- ${d.name} + + ${d.name} <#if d.isLocked > - Locked + Locked -
- + +
+
<#if d.properties.title?exists> <#else> - + <#if d.properties.description?exists> - + <#else> - + @@ -69,44 +69,98 @@
Title:${d.properties.title}
Title:
Title: 
Description:${d.properties.description}
Description:${d.properties.description}
Description:
Description: 
Creator:${d.properties.creator}
Created:${d.properties.created?datetime}
<#if d.hasAspect("cm:generalclassifiable")> <#list d.properties.categories as category> - ${companyhome.nodeByReference[category].name}; + ${companyhome.nodeByReference[category].name}; <#else> - None. + None.
<#else> - The current document is not managed by Alfresco. + The current document is not managed by Alfresco.
-
-Document Actions
+
Version History <#if d.isDocument> - - -<#else> - No actions available. + for ${d.name}
-
  +
+ +<#if d.isDocument > + <#if hasAspect(d, "cm:versionable") == 1> + <#assign versionRow=0> + <#list d.versionHistory?sort_by("versionLabel")?reverse as record> + <#assign versionRow=versionRow+1> + + + + + + <#else> + + + + +<#else> + + + + +
+ Open ${record.versionLabel} + + ${record.versionLabel}
+ Author: ${record.creator}
+ Date: ${record.createdDate?datetime}
+ <#if record.description?exists> + Notes: ${record.description}
+ + +
+ The current document is not versioned.
+
+ +
+ The current document is not managed by Alfresco. +
+
+ +
Document Actions
+ +
+
+<#if d.isDocument> + + +<#else> + No actions available. + +
+ +
+
diff --git a/config/alfresco/templates/webscripts/org/alfresco/office/documentDetails.get.js b/config/alfresco/templates/webscripts/org/alfresco/office/documentDetails.get.js new file mode 100644 index 0000000000..e69de29bb2 diff --git a/config/alfresco/templates/webscripts/org/alfresco/office/myAlfresco.get.html.ftl b/config/alfresco/templates/webscripts/org/alfresco/office/myAlfresco.get.html.ftl index e1490eb018..85630a2065 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/office/myAlfresco.get.html.ftl +++ b/config/alfresco/templates/webscripts/org/alfresco/office/myAlfresco.get.html.ftl @@ -1,92 +1,112 @@ - +<#assign doc_actions="${url.context}/service/office/docActions"> +<#if args.p?exists><#assign path=args.p><#else><#assign path=""> +<#if args.n?exists><#assign node=args.n><#else><#assign node=companyhome> +<#-- resolve the path (from Company Home) into a node --> +<#if path?starts_with("/Company Home")> + <#if path?length=13> + <#assign d=companyhome> + <#elseif companyhome.childByNamePath[args.p[14..]]?exists> + <#assign d=companyhome.childByNamePath[args.p[14..]]> + <#else> + <#assign d=companyhome> + +<#else> + <#assign d=companyhome> + + My Alfresco - - + + +
    -
  • My Alfresco
  • -
  • Browse Spaces and Documents
  • -
  • Search Alfresco
  • -
  • View Details
  • -
  • View Version History
  • +
  • My Alfresco
  • +
  • Browse Spaces and Documents
  • +
  • Search Alfresco
  • +
  • View Details
  • +
  • My Tasks
-
My checked out documents
+
My Checked Out Documents
-
- - +
+
+<#assign rowNum=0> <#assign query="@cm\\:workingCopyOwner:${person.properties.userName}"> <#list companyhome.childrenByLuceneSearch[query] as child> <#if child.isDocument> - - - - - - + <#assign rowNum=rowNum+1> + + + + - - -
- Open ${child.name} - - ${child.name}
-<#if child.properties.description?exists> - ${child.properties.description}
- - Modified: ${child.properties.modified?datetime}, Size: ${child.size / 1024} Kb
- Check In -Make PDF... -
+ ${child.name} + + ${child.name}
+ <#if child.properties.description?exists> + ${child.properties.description}
+ + Modified: ${child.properties.modified?datetime} (${(child.size / 1024)?int}Kb)
+ Check In + Make PDF... +
-
-
My Communities +
-
- - -<#list companyhome.childrenByXPath["*[@cm:name='Communities']/*"] as child> - - - - - - +
My Tasksoverdue=overdue, due today=due today
+ +
+
- Open ${child.name} - - ${child.name}
-<#if child.properties.description?exists> - ${child.properties.description} - -
+<#assign taskNum=0> +<#list workflow.assignedTasks?sort_by('startDate') as t> + <#assign taskNum=taskNum+1> + + + + -
+ <#assign hasDue=t.properties["bpm:dueDate"]?exists> + <#if hasDue> + <#assign due=t.properties["bpm:dueDate"]> + <#-- items due today? --> + <#if (dateCompare(date?date, due?date, 0, "==") == 1)> + + <#-- items overdue? --> + <#elseif (dateCompare(date?date, due?date) == 1)> + + + <#else> +   + + + ${t.description?html} (${t.type?html}) + <#if hasDue> +
Due date: ${due?date} + +
+
+
Other Actions
+
-Other Actions
-
- -
-
- -
  +
+
\ No newline at end of file diff --git a/config/alfresco/templates/webscripts/org/alfresco/office/myAlfresco.get.js b/config/alfresco/templates/webscripts/org/alfresco/office/myAlfresco.get.js new file mode 100644 index 0000000000..e69de29bb2 diff --git a/config/alfresco/templates/webscripts/org/alfresco/office/myTasks.get.desc.xml b/config/alfresco/templates/webscripts/org/alfresco/office/myTasks.get.desc.xml new file mode 100644 index 0000000000..b1ae5ea0e5 --- /dev/null +++ b/config/alfresco/templates/webscripts/org/alfresco/office/myTasks.get.desc.xml @@ -0,0 +1,7 @@ + + My Tasks (Office Add-In) + Generate the Office Add-In My Tasks page + + user + required + \ No newline at end of file diff --git a/config/alfresco/templates/webscripts/org/alfresco/office/myTasks.get.html.ftl b/config/alfresco/templates/webscripts/org/alfresco/office/myTasks.get.html.ftl new file mode 100644 index 0000000000..cca4ae7ca3 --- /dev/null +++ b/config/alfresco/templates/webscripts/org/alfresco/office/myTasks.get.html.ftl @@ -0,0 +1,73 @@ +<#assign doc_actions="${url.context}/service/office/docActions"> +<#if args.p?exists><#assign path=args.p><#else><#assign path=""> +<#if args.n?exists><#assign node=args.n><#else><#assign node=companyhome> + + + + My Tasks + + + + + + + +
+
    +
  • My Alfresco
  • +
  • Browse Spaces and Documents
  • +
  • Search Alfresco
  • +
  • View Details
  • +
  • My Tasks
  • +
+
+ +
My Tasksoverdue=overdue, due today=due today
+ +
+ +<#assign taskNum=0> +<#list workflow.assignedTasks?sort_by('startDate') as t> + <#assign taskNum=taskNum+1> + + + + + +
+ <#assign hasDue=t.properties["bpm:dueDate"]?exists> + <#if hasDue> + <#assign due=t.properties["bpm:dueDate"]> + <#-- items due today? --> + <#if (dateCompare(date?date, due?date, 0, "==") == 1)> + + <#-- items overdue? --> + <#elseif (dateCompare(date?date, due?date) == 1)> + + + <#else> +   + + + ${t.description?html} (${t.type?html}) + <#if hasDue> +
Due date: ${due?date} + <#else> +
(No due date) + +
+
+ +
Workflow
+ +
+
+
+
+ +
+ +
+ + + \ No newline at end of file diff --git a/config/alfresco/templates/webscripts/org/alfresco/office/myTasks.get.js b/config/alfresco/templates/webscripts/org/alfresco/office/myTasks.get.js new file mode 100644 index 0000000000..e69de29bb2 diff --git a/config/alfresco/templates/webscripts/org/alfresco/office/myTasksDetail.get.desc.xml b/config/alfresco/templates/webscripts/org/alfresco/office/myTasksDetail.get.desc.xml new file mode 100644 index 0000000000..709eb59b4f --- /dev/null +++ b/config/alfresco/templates/webscripts/org/alfresco/office/myTasksDetail.get.desc.xml @@ -0,0 +1,7 @@ + + My Tasks Detail (Office Add-In) + Generate the Office Add-In Task Detail page + + user + required + \ No newline at end of file diff --git a/config/alfresco/templates/webscripts/org/alfresco/office/myTasksDetail.get.html.ftl b/config/alfresco/templates/webscripts/org/alfresco/office/myTasksDetail.get.html.ftl new file mode 100644 index 0000000000..50ba6824c9 --- /dev/null +++ b/config/alfresco/templates/webscripts/org/alfresco/office/myTasksDetail.get.html.ftl @@ -0,0 +1,70 @@ +<#if args.t?exists> + <#assign taskid = args.t> + <#if taskid != ""> + <#assign task = workflow.getTaskById(taskid)> + + + +<#if task?exists> + + + + + +
Task item + ${task.description?html} +
+ + + + + + + + + + + + + + + + + + + + + +
Status:${task.properties["bpm:status"]}
Priority:${task.properties["bpm:priority"]}
Start Date:${task.startDate?date}
Type:${task.type?html}
Complete:${task.properties["bpm:percentComplete"]}%
+
+ +
${task.name?html}:
+
+ + <#list task.packageResources as res> + + + + + +
${res.name} + <#if res.isDocument> + ${res.name} + <#else> + ${res.name} + +
+
+ +
+ + + <#list task.transitions as wt> + + + +
+ ${wt.label?html} +
+
+ diff --git a/config/alfresco/templates/webscripts/org/alfresco/office/navigation.get.html.ftl b/config/alfresco/templates/webscripts/org/alfresco/office/navigation.get.html.ftl index 10bc53e85f..c8f942b5a0 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/office/navigation.get.html.ftl +++ b/config/alfresco/templates/webscripts/org/alfresco/office/navigation.get.html.ftl @@ -1,161 +1,154 @@ - -<#list template.parent.children as child> - <#if child.name = "my_alfresco.ftl"><#assign office_home = child.id> - <#elseif child.name = "navigation.ftl"><#assign office_browse = child.id> - <#elseif child.name = "search.ftl"><#assign office_search = child.id> - <#elseif child.name = "document_details.ftl"><#assign office_details = child.id> - <#elseif child.name = "version_history.ftl"><#assign office_history = child.id> - <#elseif child.name = "doc_actions.js"><#assign doc_actions = child.id> - <#elseif child.name = "navigation.js"><#assign nav_script = child> - - -<#if document.isDocument> - <#assign thisSpace = document.parent> +<#assign doc_actions="${url.context}/service/office/docActions"> +<#if node.isDocument> + <#assign thisSpace = node.parent> <#else> - <#assign thisSpace = document> + <#assign thisSpace = node> + -Basic Navigation - - - - - + Browse Spaces and Documents + + +
-
    -
  • My Alfresco
  • -
  • Browse Spaces and Documents
  • -
  • Search Alfresco
  • -
  • View Details
  • -
  • View Version History
  • -
-
- +
    +
  • My Alfresco
  • +
  • Browse Spaces and Documents
  • +
  • Search Alfresco
  • +
  • View Details
  • +
  • My Tasks
  • +
+
- - - - - - - + +
- In: - - ${thisSpace.name} -
+ + + + + - + - -
In:${thisSpace.name} + ${thisSpace.name} <#if thisSpace.properties.description?exists> - ${thisSpace.properties.description} +
${thisSpace.properties.description} -
-      -<#if thisSpace = companyhome> + +<#if thisSpace=companyhome> <#else> -go up to parent spaceUp + + Up to Parent Space + Up + -
+
-
Spaces in ${thisSpace.name}
+
Spaces in ${thisSpace.name}
-
- - +
+
+<#assign spacesFound = 0> <#list thisSpace.children as child> <#if child.isContainer> - - - - - + <#assign spacesFound = spacesFound + 1> + + + + - - -
- Open ${child.name} - - ${child.name}
-<#if child.properties.description?exists> - ${child.properties.description} - -
+ Open ${child.name} + + + ${child.name} + + <#if child.properties.description?exists> +
${child.properties.description} + +
+<#if spacesFound = 0> + + (No subspaces) + + +
-
Documents in ${thisSpace.name} -
+
Documents in ${thisSpace.name}
-
- - +
+
+<#assign documentsFound = 0> <#list thisSpace.children as child> <#if child.isDocument> - -<#assign webdavPath = (child.displayPath?substring(13) + '/' + child.name)?url('ISO-8859-1')?replace('%2F', '/')?replace('\'', '\\\'') /> - - - - - + <#assign documentsFound = documentsFound + 1> + <#assign webdavPath = (child.displayPath?substring(13) + '/' + child.name)?url('ISO-8859-1')?replace('%2F', '/')?replace('\'', '\\\'') /> + + + + - -
-<#if child.name?ends_with(".doc")> - Open ${child.name} -<#else> - Open ${child.name} - - -<#if child.name?ends_with(".doc")> - ${child.name}
-<#else> - ${child.name}
- -<#if child.properties.description?exists> - ${child.properties.description}
- - Modified: ${child.properties.modified?datetime}, Size: ${child.size / 1024} Kb
-<#if child.isLocked > - Locked -<#elseif hasAspect(child, "cm:workingcopy") == 1> - Check In -<#else> - Check Out - -Make PDF... -<#if !child.isLocked > -Delete... - -
+ <#if child.name?ends_with(".doc")> + Open ${child.name} + <#else> + Open ${child.name} + + + <#if child.name?ends_with(".doc")> + + ${child.name} +
+ <#else> + + ${child.name} +
+ + <#if child.properties.description?exists> + ${child.properties.description}
+ + Modified: ${child.properties.modified?datetime}, Size: ${(child.size / 1024)?int}Kb
+ <#if child.isLocked > + Locked + <#elseif hasAspect(child, "cm:workingcopy") == 1> + Check In + <#else> + Check Out + + Make PDF... + <#if !child.isLocked > + Delete... + +
+<#if documentsFound = 0> + + (No documents) + + +
-
-Document Actions
- +
+ +
-
  -
- - \ No newline at end of file diff --git a/config/alfresco/templates/webscripts/org/alfresco/office/navigation.get.js b/config/alfresco/templates/webscripts/org/alfresco/office/navigation.get.js new file mode 100644 index 0000000000..9e0cbf99dd --- /dev/null +++ b/config/alfresco/templates/webscripts/org/alfresco/office/navigation.get.js @@ -0,0 +1,10 @@ + +if ((args.n) && (args.n != "")) +{ + model.node = search.findNode("workspace://SpacesStore/" + args.n); +} +else +{ + model.node = companyhome; +} +model.path = args.p; diff --git a/config/alfresco/templates/webscripts/org/alfresco/office/search.get.html.ftl b/config/alfresco/templates/webscripts/org/alfresco/office/search.get.html.ftl index d79c5b3d08..a415bef94a 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/office/search.get.html.ftl +++ b/config/alfresco/templates/webscripts/org/alfresco/office/search.get.html.ftl @@ -1,150 +1,62 @@ -<#list template.parent.children as child> - <#if child.name = "my_alfresco.ftl"><#assign office_home = child.id> - <#elseif child.name = "navigation.ftl"><#assign office_browse = child.id> - <#elseif child.name = "search.ftl"><#assign office_search = child.id> - <#elseif child.name = "document_details.ftl"><#assign office_details = child.id> - <#elseif child.name = "version_history.ftl"><#assign office_history = child.id> - <#elseif child.name = "doc_actions.js"><#assign doc_actions = child.id> - <#elseif child.name = "search.js"><#assign srch_script = child> - - - -<#if args.search?exists> - <#assign searchString = args.search> - <#if searchString != ""> - <#assign queryString = "TEXT:\"${searchString}\" @cm\\:title:${searchString}"> - -<#else> - <#assign searchString = ""> - <#assign queryString = ""> - - -<#if searchString != ""> - <#if args.maxresults?exists> - <#assign maxresults=args.maxresults?number> - <#else> - <#assign maxresults=10> - - - <#assign rescount=1> - - - - - - <#assign results = companyhome.childrenByLuceneSearch[queryString] > - <#if results?size = 0> - - <#else> - <#list results as child> - - <#if child.isDocument> - <#if child.name?ends_with(".pdf")> - <#assign openURL = "/alfresco${child.url}"> - <#assign hrefExtra = " target=\"_blank\""> - <#else> - <#assign webdavPath = (child.displayPath?substring(13) + '/' + child.name)?url('ISO-8859-1')?replace('%2F', '/')?replace('\'', '\\\'') /> - <#assign openURL = "#"> - <#assign hrefExtra = " onClick=\"window.external.openDocument('${webdavPath}')\""> - - <#else> - <#assign openURL = "/alfresco/template/workspace/SpacesStore/${child.id}/workspace/SpacesStore/${office_browse}?search=${searchString}&maxresults=${maxresults}"> - <#assign hrefExtra = ""> - - - - - - - <#if rescount = maxresults> - <#break> - - <#assign rescount=rescount + 1> - - - -
No results found.
- Open ${child.name} - - ${child.name}
- <#if child.properties.description?exists> - ${child.properties.description}
- - <#if child.isDocument> - Modified: ${child.properties.modified?datetime}, Size: ${child.size / 1024} Kb
- -
- - - - - - -<#if !args.search?exists> - - +<#if args.p?exists><#assign path=args.p><#else><#assign path=""> +<#if args.n?exists><#assign node=args.n><#else><#assign node=companyhome> +<#assign searchCommand="OfficeAddin.runSearch('${url.context}/service/office/searchResults', '${path}')" > +<#if (args.searchagain?exists)><#assign searchText=args.searchagain><#else><#assign searchText=""> +<#if (args.maxresults?exists)><#assign maxResults=args.maxresults><#else><#assign maxResults="5"> + -Search - - - - - + Browse Spaces and Documents + + + - <#if args.searchagain?exists> - <#assign onLoad = "onLoad = \"doSearch('${args.searchagain}', '${args.maxresults}');\""> - <#else> - <#assign onLoad = ""> - - - - +
-
    -
  • My Alfresco
  • -
  • Browse Spaces and Documents
  • -
  • Search Alfresco
  • -
  • View Details
  • -
  • View Version History
  • -
+
    +
  • My Alfresco
  • +
  • Browse Spaces and Documents
  • +
  • Search Alfresco
  • +
  • View Details
  • +
  • My Tasks
  • +
+
Search
+ - -
Items Found
- -
- - - +
+ + +
+ Search for + +
+
+ Return a maximum of  items +
+
-
  +
Items Found
+ +
+
+
+<#if (args.searchagain?exists)> + + - - \ No newline at end of file diff --git a/config/alfresco/templates/webscripts/org/alfresco/office/search.get.js b/config/alfresco/templates/webscripts/org/alfresco/office/search.get.js new file mode 100644 index 0000000000..e69de29bb2 diff --git a/config/alfresco/templates/webscripts/org/alfresco/office/searchResults.get.desc.xml b/config/alfresco/templates/webscripts/org/alfresco/office/searchResults.get.desc.xml new file mode 100644 index 0000000000..932e5fc90f --- /dev/null +++ b/config/alfresco/templates/webscripts/org/alfresco/office/searchResults.get.desc.xml @@ -0,0 +1,7 @@ + + Search Results (Office Add-In) + Generate the Office Add-In Search Results page + + user + required + \ No newline at end of file diff --git a/config/alfresco/templates/webscripts/org/alfresco/office/searchResults.get.html.ftl b/config/alfresco/templates/webscripts/org/alfresco/office/searchResults.get.html.ftl new file mode 100644 index 0000000000..0be509c55b --- /dev/null +++ b/config/alfresco/templates/webscripts/org/alfresco/office/searchResults.get.html.ftl @@ -0,0 +1,62 @@ +<#if args.search?exists> + <#assign searchString = args.search> + <#if searchString != ""> + <#assign queryString = "TEXT:\"${searchString}\" @cm\\:title:${searchString}"> + +<#else> + <#assign searchString = ""> + <#assign queryString = ""> + + +<#if searchString != ""> + <#if args.maxresults?exists> + <#assign maxresults=args.maxresults?number> + <#else> + <#assign maxresults=10> + + + <#assign rescount=1> + + + <#assign results = companyhome.childrenByLuceneSearch[queryString] > + <#if results?size = 0> + + + + <#else> + <#list results as child> + <#if child.isDocument> + <#if child.name?ends_with(".pdf")> + <#assign openURL = "${url.context}${child.url}"> + <#assign hrefExtra = " target=\"_blank\""> + <#else> + <#assign webdavPath = (child.displayPath?substring(13) + '/' + child.name)?url('ISO-8859-1')?replace('%2F', '/')?replace('\'', '\\\'') /> + <#assign openURL = "#"> + <#assign hrefExtra = " onClick=\"window.external.openDocument('${webdavPath}')\""> + + <#else> + <#assign openURL = "${url.context}/service/office/navigation?p=${args.p}&n=${child.id}&search=${searchString}&maxresults=${maxresults}"> + <#assign hrefExtra = ""> + + + + + + <#if rescount = maxresults> + <#break> + + <#assign rescount=rescount + 1> + + +
(No results found)
+ Open ${child.name} + + ${child.name}
+ <#if child.properties.description?exists> + ${child.properties.description}
+ + <#if child.isDocument> + Modified: ${child.properties.modified?datetime} (${(child.size / 1024)?int}Kb)
+ +
+ diff --git a/config/alfresco/templates/webscripts/org/alfresco/office/versionHistory.get.desc.xml b/config/alfresco/templates/webscripts/org/alfresco/office/versionHistory.get.desc.xml deleted file mode 100644 index 469b35e9da..0000000000 --- a/config/alfresco/templates/webscripts/org/alfresco/office/versionHistory.get.desc.xml +++ /dev/null @@ -1,7 +0,0 @@ - - Version History (Office Add-In) - Generate the Office Add-In Version History page - - user - required - \ No newline at end of file diff --git a/config/alfresco/templates/webscripts/org/alfresco/office/versionHistory.get.html.ftl b/config/alfresco/templates/webscripts/org/alfresco/office/versionHistory.get.html.ftl deleted file mode 100644 index 084c8eab1c..0000000000 --- a/config/alfresco/templates/webscripts/org/alfresco/office/versionHistory.get.html.ftl +++ /dev/null @@ -1,88 +0,0 @@ -<#list template.parent.children as child> - <#if child.name = "my_alfresco.ftl"><#assign office_home = child.id> - <#elseif child.name = "navigation.ftl"><#assign office_browse = child.id> - <#elseif child.name = "search.ftl"><#assign office_search = child.id> - <#elseif child.name = "document_details.ftl"><#assign office_details = child.id> - <#elseif child.name = "version_history.ftl"><#assign office_history = child.id> - <#elseif child.name = "doc_actions.js"><#assign doc_actions = child.id> - <#elseif child.name = "version.js"><#assign ver_script = child> - - - - - -Version History - - - - - - - - - - -
-
    -
  • My Alfresco
  • -
  • Browse Spaces and Documents
  • -
  • Search Alfresco
  • -
  • View Details
  • -
  • View Version History
  • -
-
- -
Version History for ${document.name}
- -
- - -<#if document.isDocument > - <#if hasAspect(document, "cm:versionable") == 1 > - - <#list document.versionHistory?sort_by("versionLabel")?reverse as record> - - - - - - <#else> - - - - - -<#else> - - - - - -
- Open ${record.versionLabel} - - ${record.versionLabel}
- Author: ${record.creator}
- Date: ${record.createdDate?datetime}
-<#if record.description?exists> - Notes: ${record.description}
- - -
-The current document is not versioned.
-Make Versionable -
-The current document is not managed by Alfresco. -
-
- -
  -
- - - - \ No newline at end of file diff --git a/source/web/css/office.css b/source/web/css/office.css index c9a8a04d55..9b01355a32 100644 --- a/source/web/css/office.css +++ b/source/web/css/office.css @@ -1,119 +1,204 @@ html, body { - height: 100%; - overflow:hidden; - font-family: tahoma, sans-serif; - font-size: 11px; - color: #0073e6; - background: url("../images/taskpane/view_bg.gif") top; + height: 100%; + overflow: hidden; + font-family: tahoma, sans-serif; + font-size: 11px; + color: #0073e6; + background: url("../images/office/view_bg.gif") top; } -body {margin:0px;padding:0px;} +body { + margin: 0px; + padding: 0px; +} + +a { + color: #0073e6; + text-decoration: none; +} + +a img { + border: 0px; +} + +.bold { + font-weight: bold; +} #tabBar { - float:left; - width:100%; - background:#d4eaff url("../images/taskpane/bg.gif") repeat-x bottom; - font-size:93%; - line-height:normal; - } + float: left; + width: 100%; + background: #efefef; + border-bottom: 1px solid #ccc; +} #tabBar ul { - margin:0; - padding:10px 10px 0; - list-style:none; - } - #tabBar li { - float:left; - background:url("../images/taskpane/norm_left.gif") no-repeat left top; - margin:0; - padding:0 0 0 9px; - } - #tabBar a { - display:block; - background:url("../images/taskpane/norm_right.gif") no-repeat right top; - padding:5px 15px 4px 6px; - text-decoration:none; - font-weight:bold; - color:#765; - } - #tabBar a:hover { - color:#333; - } - #tabBar #current { - background-image:url("../images/taskpane/norm_left_on.gif"); - } - #tabBar #current a { - background-image:url("../images/taskpane/norm_right_on.gif"); - color:#333; - padding-bottom:5px; - } + margin: 0px; + padding: 4px 10px 0px 4px; + list-style: none; +} +#tabBar li { + display: inline; + margin: 0px; + padding: 0px; +} +#tabBar a { + background: url("../images/office/tab_left.gif") no-repeat left top; + float:left; + margin: 0px; + padding: 0px 0px 0px 4px; + text-decoration: none; +} +#tabBar a span { + background: url("../images/office/tab_right.gif") no-repeat right top; + color: #666; + display: block; + float: none; + padding: 5px 15px 4px 6px; + height: 18px; +} -#spaceListHeader {width:100%; - height:auto; - padding:6px;} +#tabBar a:hover span { + color: #FFF; +} +#tabBar a:hover { + background-position: 0% -42px; +} +#tabBar a:hover span { + background-position: 100% -42px; +} -#mycheckedoutdocsListHeader {width:100%; - height:auto; - padding:6px;} +#tabBar #current a { + background-position: 0% -42px; +} +#tabBar #current a span { + background-position: 100% -42px; +} -#mytodoListHeader {width:100%; - height:auto; - padding:6px;} +.header { + clear: both; + width: 282px; + padding: 6px 0px 2px 4px; + font-weight: bold; + float: left; +} -#contentListHeader {width:100%; - height:auto;padding:6px;} +.headerExtra { + font-weight: normal; + float: right; + margin-top: -13px; +} -#searchResultsListHeader {width:100%; - height:auto;padding:6px;} +.listBig { + clear: both; + float: left; + width: 282px; + height: 378px; + overflow: auto; + border: 1px solid #cccccc; + margin: 0px 4px 0px 4px; + background: #fff; +} +.listMedium { + clear: both; + float: left; + width: 282px; + height: 204px; + overflow: auto; + border: 1px solid #cccccc; + margin: 0px 4px 0px 4px; + background: #fff; +} -#detailsListHeader {width:100%; - height:auto;padding:6px;} +.listMediumGrow { + height: 354px !important; +} +.listMediumShrink { + height: 54px !important; +} -#versionListHeader {width:100%; - height:auto;padding:6px;} +.odd { + background-color: #f8f8f8 !important; + border-bottom: 1px solid #eee; +} +.even { + background-color: #ffffff !important; + border-bottom: 1px solid #eee; +} -#advWorkflowListHeader {width:100%; - height:auto;padding:6px;} +#currentSpaceInfo { + clear: both; + float: left; + width: 282px; + height: 34px; + overflow: none; + border: 1px solid #cccccc; + margin: 4px 4px 0px; + padding: 4px 0px 0px; + background: #fff; +} -#myTasksListHeader {width:100%; - height:auto;padding:6px;} +TABLE, TR, TD { + border: 0px; + border-collapse: collapse; + padding: 2px; +} -#simpleWorkflowHeader {width:100%; - height:auto;padding:6px;} +ul { + margin: 0px; + list-style: none; + padding: 2px 0px 0px 4px; +} -#currentSpaceInfo {width:100%; - padding: 6px} +#documentActions { + clear: both; + background-color: #ffffcc; + border: 1px solid #ccc; + float: left; + margin: 0px 4px; + height: 150px; + width: 282px; +} -#simpleWorkflowInfo {width:100%; - padding: 6px} +#documentActionsNavigation { + clear: both; + background-color: #ffffcc; + border: 1px solid #ccc; + float: left; + margin: 0px 4px; + height: 106px; + width: 282px; +} -#spaceList {width:97%;overflow:auto; border: 1px solid #cccccc;margin-left:6px;background:#fff;} -#mycheckedoutdocsList {width:97%;overflow:auto; border: 1px solid #cccccc;margin-left:6px;background:#fff;} -#mytodoList {width:97%;overflow:auto; border: 1px solid #cccccc;margin-left:6px;background:#fff;} -#contentList {width:97%;overflow:auto; border: 1px solid #cccccc;margin-left:6px;background:#fff;} -#searchResultsList {width:97%;overflow:auto; border: 1px solid #cccccc;margin-left:6px;background:#fff;} -#detailsList {width:97%;overflow:auto; border: 1px solid #cccccc;margin-left:6px;background:#fff;} -#versionList {width:97%;overflow:auto; border: 1px solid #cccccc;margin-left:6px;background:#fff;} -#advWorkflowList {width:97%;overflow:auto; border: 1px solid #cccccc;margin-left:6px;background:#fff;} -#myTasksList {width:97%;overflow:auto; border: 1px solid #cccccc;margin-left:6px;background:#fff;} +#nonStatusText { + min-height: 100%; + position: relative; +} -TABLE {border:0px; -padding:2px;} +#searchResultsList { + min-height: 100%; + position: relative; +} -A {color:#0073e6; } +#statusText { + border: none; + float: left; + margin: -22px 0px; + padding: 2px; + position: relative; + height: 17px; + width: 278px; +} -#bottomMargin {height:6px;} +#search { + clear: both; + float: left; + width: 282px; + border: 1px solid #cccccc; + margin: 0px 4px; + background: #fff; +} -#documentActions ul { - margin:0; - padding:10px 10px 0; - list-style:none; - } - -#documentActions {width:97%;margin-left:6px;padding-top:6px;padding-bottom:6px;} - -#search {padding: 24px 0px 0px 10px;} - -input.button{ +input.button { color:#0073e6; font-size:11px; font-weight:bold; @@ -124,7 +209,22 @@ input.button{ border-right-color:#0073e6; border-bottom-color:#0073e6; filter:progid:DXImageTransform.Microsoft.Gradient - (GradientType=0,StartColorStr='#ffffffff',EndColorStr='#6fb7ff'); + (GradientType=0,StartColorStr='#ffffffff',EndColorStr='#6fb7ff'); cursor:pointer; margin-left:6px; - } +} + +#taskDetails { + padding: 2px; +} + +.taskItemSelected { + background-color: #ffe500 !important; +} + +.taskResources { + border: 1px solid #ccc; + margin: 4px; + height: 128px; + overflow: auto; +} diff --git a/source/web/images/icons/make_versionable.gif b/source/web/images/icons/make_versionable.gif new file mode 100644 index 0000000000000000000000000000000000000000..e98712cf3100c3b2f6195e2dc51c66f5b9bb9c8c GIT binary patch literal 278 zcmV+x0qOonNk%w1VGsZi0K^{v|Ns9+MoIYj^Z52&`S^m|+}Qj1p8Wf~^6F*x@W|P< zTiUm9+PH$-&cE{M;PU0!?%2%9Rx7Tdoc#R!`T6gwv`i_@% literal 0 HcmV?d00001 diff --git a/source/web/images/office/action_failed.gif b/source/web/images/office/action_failed.gif new file mode 100644 index 0000000000000000000000000000000000000000..0ad5d8d06800a2ecde0da88fbb16dc86ef152fe1 GIT binary patch literal 374 zcmZ?wbhEHb6krfwxXJ(m|NsBbDz0too1TzW(%3b*p>tAQTi?bV`}Z6=v3|?WCokVU zdj96ammlvweQW8Ry7$Pb9s7@-ICuH*$#a`_9eDNr^NY71pS^zn<;U+&-+t~ra`M5m zSJ!Xd`Tpns*I$3%eEf2Tf#FPA8qf-`Rn#XGf3h$#FeowTfQ$zDiGgjh!^D6k76N_j zM+;60@~F&Rk)rUxfK#f!?Da)~HBOF9&U({@nHD~pc(TFitq;eQIt~8GZpm`D_J0*- zS7PC7R*tt_A(@BPfgXhp;9*%e)CN@FoGlFcP-p;P>ES?vy-*9$hum%8ieTB6E literal 0 HcmV?d00001 diff --git a/source/web/images/office/action_successful.gif b/source/web/images/office/action_successful.gif new file mode 100644 index 0000000000000000000000000000000000000000..90d16c18e4e99628b9bd33c85c0e264a19ee3185 GIT binary patch literal 394 zcmZ?wbhEHb6krfwxXJ(m|NsBbDz5G5pPrCal2KHXSzKG!);DqH!s+vuPnx-4#rkb0 z&Rx0t==sxE?;kvU_2tK(r!U`T7T07HRZpC?XvTu&i&t*~Dq6F7=gs?1F5kR&{_3rV z&)?jB@Z{a+?{7YSef{Cf%XgoizxnXv&;M_~{@!`??D5OD*KghV^!?X|uRq>=1j>F? z-e{=3+0=Neh4l_==Uw(*yPfnq)dKdqgzR$zx()0`oP^>}7DfgJQwAN73Xq=|*p?rd zwV^DCgM+2W75k+3&Rk!+|IGKFzs}uw z*fMYP`%hn|uHHL$)1m+W|JTe|2P7GY28#c={aizWogD*Qjr0td8G#xVf3mPLFbFc} zfD8dSgMqa;LB*|$dG3V8J<69C7+f)U+az_o@x}!wcYVpnjx{O*%h@z%THNAkKJLh% zF_%YAqTz(c(JhDDA9?4o_^e=XPJA%YpJ~ydzowGH2QMcDSge%d;Ptf@2;lb+&~`L- zb?fjFaB@DqX$;mKRpIHEfW|W^p{k zsKX(w_}OCl;-d;1B^22huAUK8RAA^mqRc2QC>L@4gPr5E2qIF@lNivC-p zx$aF!M2&k^sHxb^<4)Kt2?Scw(Ae{W!|~jSEt*1W{Df5}8k!xN%%I7pb)i}$$m$5! zB5oEjEsrM(t#hOdPV8h39WTNr3rW1z^vQ#7lgkB{$tWa_ZRAACrx^Ci)M_EVX z#F>&7RPVVbv|h0Af$&Ya%jqtGN&++PIp|gLG9rA!#J~s)EIwdx`6P&#CS`V=P-YQG z+2;GnU~Qn&#x+}foZNaQ9x5wx5twjvQALN2zyHM7Ax4V+Dt!?<57yQ!eL?*R1&L;y#5z+kvOZ zpogWYBhXdotKZ@X7l{dr#5CQzST4J9`7)&#Docu~96f9puqdo!7Qa}riX6+9QpE<- zwN4sHfd%mh$R2QDiI^n6QfO0HGI6pUzmb&EB^G}nhl#FD8#`ujH3S`L6Bg~|WAG8p z^i$Tj_TDSVitoUQ2_k_u90JVD&lW6QqxAVJwy{_(ag; zLQ{{M6Bo1MKA$ZN?q4_-ALK}?uxV-RNbWGO5EE!;QZX48nZX(W$VNbt literal 0 HcmV?d00001 diff --git a/source/web/images/office/make_versionable.gif b/source/web/images/office/make_versionable.gif new file mode 100644 index 0000000000000000000000000000000000000000..e98712cf3100c3b2f6195e2dc51c66f5b9bb9c8c GIT binary patch literal 278 zcmV+x0qOonNk%w1VGsZi0K^{v|Ns9+MoIYj^Z52&`S^m|+}Qj1p8Wf~^6F*x@W|P< zTiUm9+PH$-&cE{M;PU0!?%2%9Rx7Tdoc#R!`T6gwv`i_@% literal 0 HcmV?d00001 diff --git a/source/web/images/office/my_tasks.gif b/source/web/images/office/my_tasks.gif new file mode 100644 index 0000000000000000000000000000000000000000..6cee9ec03951236aa82eee35b0dba94ab51934e8 GIT binary patch literal 595 zcmZ?wbhEHb6krfwc*Xz%|NsA=w_x6{-@ktR{PF$A_n!Xlmv3IQwztfgH+%NnS+nNM z{P_99hfnX{zJK%P-RoCxUN*HhOqx1j;*|agllz{&c>Lt~qsPx4K74Zj_Wc{T?p?om z_u7p+SFhi`GIhqJnRBM~PwegK>w5I`{=+Bt?mxP7@8Rvc4{qJLfAjXe8}k;-nK5hH zv>8*TPM*p_CJ$wH0>9ZG4zJB}iRawG^PK=E1>M-r_UcfdG_$pllu=J-@E_tPFHtFXIK036-#H$o-uRQ z^pBt3zyI*|-TOCx{`~&=^T&@L-@kqPI&a?GWlNX-{{8#@{rg+DZk;h>MoUWzFdV?) zL03ZYCkrD3LnMO^$W~CCFtBfEh-_*Kb@Ol!ZSHCgW%Bb6FujEH!_sl(!xC4GTeusU3+qv81 zn)b#vcuxR_(`xrksF6*arl1^_j@3>yFd literal 0 HcmV?d00001 diff --git a/source/web/images/office/search_again.gif b/source/web/images/office/search_again.gif new file mode 100644 index 0000000000000000000000000000000000000000..f6ecf2104a8766cf6866bc4b527a1bbbe10c0a14 GIT binary patch literal 1034 zcmZ?wbhEHb6krfw_|5_^xbLZxtJGbb+C zd+pGso5!}^IFd?qu=UTK=M@>FNlX)bEhT}|f)+bxcESQ6v7B-V9Vg8Pajj}^(n{U+M8JauPz zSYd$92PbzP zpV_{4;?_I+k32pzC(~?Up7r8FyX7U0XU?2Cb?Vgd3x- z*aXMwC_z*RDE?$&WMG)hpaW73$`cG6&l${fXMJft-X}Me<=M*OM79|H979M00@G`eNRD9U6l~YK`z`~)SXVIEEoydR<3XDw5 z%w}H&mz40%^PMFpqT%3hK+QRsi8JR(`h)}CMm9A!Tr_$`EQ?>P;7nFueZVPwj!obu z7B6A#8lC)G#i<^G%I*_X95;J>QL_kXsyWHDj92M8(|wKK zeVbmC?|k**#fw+3UN3m@=k43K^N+r(s;Vk0uXyt0Y3KRRvmX9hdiuk=ckj!)mn~ho z^wHzTA3uJ4_Uw61PEKxa?(JK*KYjk(z4rOfpFcWQKl}9Q)BE=yK7amv=gysnm`OV(=~}cpHC@S2vADt7U=uf={mtLn`liN~nzn}a=FZlR-mbo$dM9By z9brk8=}Jm+-1C^&7BaCcVd7fOB)E!6d@U361}2`(OdQ*oM0YZ=?qL$!&%}R-iSg)> gV@DZ}pE`N^+}R5!E}gl2{_4dmH?Q5g;mBYO04|!Wt^fc4 literal 0 HcmV?d00001 diff --git a/source/web/images/office/tab_right.gif b/source/web/images/office/tab_right.gif new file mode 100644 index 0000000000000000000000000000000000000000..7c236f3a27e89632ca1a12fff0b8026b83b79dc3 GIT binary patch literal 2095 zcmcJM`6CmG1HdO|QPL|4rTXRwdGb<@96i^}(V=pr9=?SXPdw+hSD4#!)*N%pHpATa zm2#vR=E{}hnQdm5na!AK+k5Yi_P4rNt!{Yl}!CZEtVqwA0|!AF$7xWkW1j9}E6<3r;&&US8hXV&}Hea@*;dO;rB= zKAB9W)Bka@(Om1v5Y^3KFqygE_qbdxw1*)Qi9#AEY&M(A;TEn5((5+%`TGe*B(bv}>6BE%BCp4` z(R+G&(z+N^lT$0pDwWPN=-GBOf2NXLG~!eFrEq+}!#IX6H5^5sjP zR|(1Jf${N)e<}g~KU~if%6{mIQ{e1rv_6`5<+nLVS6F~Tv0m0`m&IQwlO=b-BIj=7pjq^dx6qQJHinX2 zI$_*maTRd14=g_Bs?HB3Vl(93>o3HxPfj8$J)SIgg)#7jPFW#m%_GQT{lCqBvKRtr zIinQWD&@Tgdu-BZ+3mNMkORK&%<6>3n>Rm%(mI4U;x$>R;Z{Z-1OoV|rA|3m z3FNVsc-$|rKS}W~!dl9yu+H*i1DfBs| zFc4i$DGHh~7&<1Ubc9~h_|>brrg<)iQ3p+rXViZj z0KI7Flj)%~3@E=~BEOugVKygejWSz?%;Yy)KZ2Y#+uFP`Hrs21MmIaq^dqd!rdTId zS5Z+0t2+-f%IeANmf!lAHsZ9^+eNHtK<%>RfB!6MmJjWt9&Sj&Xz!E*SdnWV5~(pu3Xd?zO#h1cCjIE*3JDLZ`SK~m$q4tsNS}P zCs{|^zdy?pMl1&8mqaXi4+^g@1^%zDeaS<%DbY&vy-&hnb*XdFt8e8kJ6Ge>T%(EV z`XSMzR4W5ha+2P;uJsRYoahzc!`XxM+6<)u(S_FpvG~V9nV3IsCGqBboTM!r zaH_ys+K3&enCK&+X>tp|nuwDcgG*?p_RE<~f>peIWcKzFH5AqoZP?gD4~GYoyV*&G zka7jz1+eN|XtK$e@3G)$o3jFTiV@jYv5}pq`h$=P+;R8`0*Kc#+fKU!L7c2SZKvhh zB;$cXD0k@C>4B6oj6E)@V1f49u~*Z5oRO-+wYclu+wVdlNc9b%gXt$iW>hWm++L@{ zO-fEyoWiBELLl&00ZAg&8Ff(wH*9al$$94;e@XK&4&*hRn};H6-oW7;{5j&hvK?7T zd&iM`MV$9l&K0_MaS0FG!#*@Zp6Nf{2YD`XpcqtzK?F@vn$OAaQ$QQ0IF9)p`$cBh z7JW4z=j^ZLR)~k7uVw6yoz{UD;dW$?>Gt76!op#HF||wvJ>y@c=M}Ho21tANxkjRY zDxvK7-yE$Tj|pojVYX^pta;uJqq~*y6#}h=7ZQ%8!r^CuRkx0&-$_#5fgf?9+NhaL zr5c<>Cj$^Iz|R+=>MM0hr*c zU86?6l?rw$t&d{vq=04+s=O-T5X~iTWCm@Ze79vpeI&l-NlN;BuYlKJx~bea(7!TjIRW_ iFFl;=o~y$AdFAM?7&R*~U literal 0 HcmV?d00001 diff --git a/source/web/images/office/task_item.gif b/source/web/images/office/task_item.gif new file mode 100644 index 0000000000000000000000000000000000000000..bf5bd9108408e965254a944c10fed8b98685a9cc GIT binary patch literal 1540 zcmd6m`#aMM0LHf&Hp@vwo=_9@(4nT>x}7H^my;f(oO4Lg<)k_aEpsa~V;D9hmoVji z$-Z)#JqR<#(A>ss%-Y=6T*h)K&*RkjE6)4F`}6yJp3m##a@qEbKN5rlZGwJgcXxOD z+xF(x=EmkmGrgHoM9DA6&&kd4_4Dz$`Pak8fnnj#$r&V4dRj^v5uXqj8;8Z>Vq#)n zt|{az^5x~#rKJ_wmnErGwm82y$Ky|o^SHfi78(A{?6-;R`2tQ`~X>s9=V7-TT_@0KZ%QH~nt= zj`4<`1piY*t*opmi+&jy5rqkl3=0cKqr*Z&(ZRu?PX>qB{hxYU+vzE3$%)AcgrxWx z@s#khU|PhVnwb;`d6QG)l(z+iMfqFv9Xbn5e|nl zI5;>kFwoc6$6~R1dU}{lCWFCfYinz5ZKc!cG#ag`si~o%p{}kD0D#)s+N!Fmii(Po zl9Iy0!XIA!=hy$b47Z_R5U3Yq_H*UWPk>;%pbWUav-@q+3y24tKPY8h9SItUMo4UL zD##-Y0}9jzj5=;uu}Ba!8KkFbWg9_+c}iHxk0xk#6(O@dq+-ALgVfTLJew@fNqtzl zX8AjaYn>ckX3xnzWS0eh<#o}-mRsmSAzB@%TplLrp9#8x z?pGbuQ_Be=0{%*A6<*=Uqb3q`NR_0mrQ29}oxus2d zIju8bC@8f=M;8dej;yE|1Xb^PIu=~7@~(R@<%+s@7U5`q5DN;SI;rf*Kk=*y>6l)1 z19(%U0c{#3vyHucv5sgWjRZx)Jc{g9HqmP?8kTYU5N7vbfSr!La}4{0stL(KI~g_X ztm&Fb;%FDTWp`+4DLfJ8^~NN;zdnbGIN7GbxVZoL+4L^WD<)kK9n=dILGmi;z1p2RtkTBt};(0gWTS`+<$LF9?v`26W#eaXKeq9gg6R;$Ym~MBR!m&C}WK zq`k=|o%T82`lnn@w(MwPA!^Soh$x1MJK?q25jbP7I#_Op!2Z$~YiI>pXP37_l}s&| z6C`_0m-7LEFvU@k(y%JAzI_pHQ!Xz@mA!q~Z{fp1LDNsSYe1e@L5H1T&KEeu?GAUjN=Yfv$1Wzlr21_6Qu4$?K`eo zJ-v$8IAaDt_bJwbt6P%{fG#6f%N>}ZF^Q_AbsED?(29-m@m6>4{~~X3!yp(;i@U^C z2P7VZW1;G=gzSmVK0n%OXzTw$%R(Y>I{aeKTfhwouUj8{v1Q0O{99p*rZbN9RB_ln fd3C+N4kGF}WIIE_sp@$c4B5fWM@epAFzDRB?aA9U literal 0 HcmV?d00001 diff --git a/source/web/images/office/task_overdue.gif b/source/web/images/office/task_overdue.gif new file mode 100644 index 0000000000000000000000000000000000000000..cad27743add355ea4913f327f32507c6186a5cb3 GIT binary patch literal 110 zcmZ?wbhEHb~>;La-{{u<9K=CIF0|Uc<1|1*?G=YPG ffkiZ+!=YJ%>4ok0W%JnD7N@r!Fbxf7VXy`OHn2KE literal 0 HcmV?d00001 diff --git a/source/web/scripts/office/my_tasks.js b/source/web/scripts/office/my_tasks.js new file mode 100644 index 0000000000..52de8127e7 --- /dev/null +++ b/source/web/scripts/office/my_tasks.js @@ -0,0 +1,98 @@ +/* + * Prerequisites: mootools.v1.1.js + */ +var OfficeMyTasks = +{ + init: function() + { + var tasks = $$('#taskList .taskItem'); + + tasks.each(function(task, i) + { + task.isOpen = false; + + // register 'mouseenter' event for each task + task.addEvent('mouseenter', function(e) + { + if (task.isOpen) + return; + + // highlight the item title + task.addClass('taskItemSelected'); + + // reset styles on all closed tasks + tasks.each(function(otherTask, j) + { + if ((otherTask != task) && (!otherTask.isOpen)) + { + // reset selected class + otherTask.removeClass('taskItemSelected'); + } + }); + }); + + // register 'mouseleave' event for each task + task.addEvent('mouseleave', function(e) + { + if (task.isOpen) + return; + + // unhighlight the item title + task.removeClass('taskItemSelected'); + }); + + // register 'click' event for each task + task.addEvent('click', function(e) + { + if (!task.isOpen) + { + // open up this task + // flag this task as open + task.isOpen = true; + + OfficeAddin.showStatusText("Loading task...", "ajax_anim.gif", false); + + // ajax call to load task details + var actionURL = "/alfresco/service/office/myTasksDetail?t=" + task.id; + var myAjax = new Ajax(actionURL, { + method: 'get', + headers: {'If-Modified-Since': 'Sat, 1 Jan 2000 00:00:00 GMT'}, + onComplete: function(textResponse, xmlResponse) + { + OfficeAddin.hideStatusText(); + $("taskDetails").innerHTML = textResponse; + } + }); + myAjax.request(); + + // close other open tasks + tasks.each(function(otherTask, j) + { + if (otherTask != task) + { + // close any other open tasks + otherTask.isOpen = false; + + // unhighlight the item title + otherTask.removeClass('taskItemSelected'); + } + }); + } + }); + }); + + $('taskList').addEvent('mouseleave', function(e) + { + // handler for mouse leaving the entire task list + tasks.each(function(task, i) + { + if (!task.isOpen) + { + task.removeClass('taskItemSelected'); + } + }); + }); + } +}; + +window.addEvent('domready', OfficeMyTasks.init); \ No newline at end of file diff --git a/source/web/scripts/office/office_addin.js b/source/web/scripts/office/office_addin.js new file mode 100644 index 0000000000..f99c452328 --- /dev/null +++ b/source/web/scripts/office/office_addin.js @@ -0,0 +1,160 @@ +/* + * Prerequisites: mootools.v1.1.js + */ +var OfficeAddin = +{ + ANIM_LENGTH: 300, + STATUS_FADE: 10000, + LIST_DEF_HEIGHT: 204, + + init: function() + { + this.queryObject = OfficeAddin.toQueryObject(document.location.search); + + /* Update needed after page load? */ + if(this.queryObject.st) + { + var objResponse = Json.evaluate(this.queryObject.st); + var imgSuccess = (objResponse.statusCode ? "action_successful.gif" : "action_failed.gif"); + OfficeAddin.showStatusText(objResponse.statusString, imgSuccess, true); + } + + /* Have search box? */ + if ($("searchText")) + { + $("searchText").addEvent("keydown", function(event) + { + event = new Event(event); + if (event.key == 'enter') + { + $("simpleSearchButton").click(); + } + }); + } + + /* Have expandos? */ + if ($("toggleSpaceList")) + { + $("toggleSpaceList").addEvent("click", function() + { + $("spaceList").removeClass("listMediumShrink"); + $("spaceList").addClass("listMediumGrow"); + $("documentList").removeClass("listMediumGrow"); + $("documentList").addClass("listMediumShrink"); + }); + $("toggleDocumentList").addEvent("click", function() + { + $("documentList").removeClass("listMediumShrink"); + $("documentList").addClass("listMediumGrow"); + $("spaceList").removeClass("listMediumGrow"); + $("spaceList").addClass("listMediumShrink"); + }); + } + }, + + toQueryObject: function(s) + { + var obj = {}; + $A(s.substring(1).split('&')).each(function(param) + { + param = decodeURIComponent(param).split("="); + obj[param[0]] = param[1]; + }); + return obj; + }, + + showStatusText: function(statusText, statusImage, fadeOut) + { + var e = $("statusText"); + if (statusImage) + { + statusText = "\"*\"" + statusText; + } + e.innerHTML = statusText; + e.setStyle("opacity", "1"); + if (statusText == "") + { + e.setStyle("border-top", ""); + } + else + { + e.setStyle("border-top", "1px dashed #808080"); + var fx = new Fx.Style(e, 'background-color', + { + duration: OfficeAddin.ANIM_LENGTH, + transition: Fx.Transitions.linear + }); + if (fadeOut) + { + fx.onComplete = new function() + { + OfficeAddin.hideStatusText.delay(OfficeAddin.STATUS_FADE); + } + } + fx.start('#ffffcc', '#ffffff'); + } + }, + + hideStatusText: function() + { + var e = $("statusText"); + e.setStyle("opacity", "1"); + var fx = new Fx.Style(e, 'opacity', + { + duration: OfficeAddin.ANIM_LENGTH + }).start('1', '0'); + }, + + /* AJAX call to perform server-side actions */ + runAction: function(useTemplate, Action, Doc, Msg) + { + if (Msg != "" && !confirm(Msg)) + { + return; + } + + OfficeAddin.showStatusText("Running action...", "ajax_anim.gif", false); + var actionURL = useTemplate + "?a=" + Action + "&d=" + Doc; + var myAjax = new Ajax(actionURL, { + method: 'get', + headers: {'If-Modified-Since': 'Sat, 1 Jan 2000 00:00:00 GMT'}, + onComplete: function(textResponse, xmlResponse) + { + // Remove any trailing hash + var href = window.location.href.replace("#", "") + // Remove any previous "&st=" strings + href = href.replace(/[?&]st=([^&$]+)/g, ""); + // Optionally add a status string + if (textResponse != "") + { + href += "&st=" + encodeURI(textResponse); + } + window.location.href = href; + } + }); + myAjax.request(); + }, + + /* AJAX call to perform server-side search */ + runSearch: function(useTemplate, argPath) + { + OfficeAddin.showStatusText("Searching...", "ajax_anim.gif", false); + + var searchString = $("searchText").value; + var maxResults = $("maxResults").value; + + var actionURL = useTemplate + "?p=" + argPath + "&search=" + searchString + "&maxresults=" + maxResults; + var myAjax = new Ajax(actionURL, { + method: 'get', + headers: {'If-Modified-Since': 'Sat, 1 Jan 2000 00:00:00 GMT'}, + onComplete: function(textResponse, xmlResponse) + { + OfficeAddin.hideStatusText(); + $("searchResultsList").innerHTML = textResponse; + } + }); + myAjax.request(); + } +}; + +window.addEvent('domready', OfficeAddin.init); \ No newline at end of file