From 43b4bf058a6e454e0844023e8473a53bf212bdd2 Mon Sep 17 00:00:00 2001 From: Mike Hatfield Date: Mon, 11 Jun 2007 07:58:41 +0000 Subject: [PATCH] Various updates to Office Addin web scripts git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5903 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../office/documentDetails.get.html.ftl | 52 ++++---- .../alfresco/office/myAlfresco.get.html.ftl | 58 +++++---- .../org/alfresco/office/myTasks.get.html.ftl | 33 +++--- .../alfresco/office/navigation.get.html.ftl | 94 ++++++++------- .../org/alfresco/office/search.get.html.ftl | 28 ++--- .../office/searchResults.get.html.ftl | 15 ++- .../org/alfresco/office/searchResults.get.js | 0 source/web/css/office.css | 112 ++++++++++++------ source/web/images/office/arrow_down.gif | Bin 180 -> 248 bytes source/web/images/office/arrow_up.gif | Bin 186 -> 248 bytes source/web/scripts/office/my_alfresco.js | 85 ++++++++++++- source/web/scripts/office/my_tasks.js | 2 +- source/web/scripts/office/navigation.js | 89 ++++++++++++++ source/web/scripts/office/office_addin.js | 13 ++ source/web/scripts/office/search.js | 23 +++- 15 files changed, 428 insertions(+), 176 deletions(-) create mode 100644 config/alfresco/templates/webscripts/org/alfresco/office/searchResults.get.js 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 b62275f844..b4d7ea7996 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 @@ -24,25 +24,25 @@
Current Document Details
- +
-
<#if d.isDocument> - ${d.name} + ${d.name} + ${d.name} <#if d.isLocked > Locked @@ -92,8 +92,8 @@ -
- +
+
<#if d.isDocument > <#if hasAspect(d, "cm:versionable") == 1> <#assign versionRow=0> @@ -103,14 +103,14 @@ - @@ -120,7 +120,7 @@ The current document is not versioned.

@@ -146,7 +146,7 @@ <#if d.isLocked > <#elseif hasAspect(d, "cm:workingcopy") == 1>
  • - + Check In Check In @@ -154,7 +154,7 @@
  • <#else>
  • - + Check Out Check Out @@ -162,26 +162,26 @@
  • - - Transform to PDF + + Start Workflow + Start Workflow + +
    Start Advanced Workflow for the current document. +
  • +
  • + + Transform to PDF Transform to PDF
    Transform the current document to Adobe PDF format.
  • - - Open Full Details + + Open Full Details Open Full Details
    Open the document details in the Alfresco Web Client.
  • -
  • - - Start Workflow - Start Workflow - -
    Start Advanced Workflow for the current document. -
  • <#else> 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 66366d291a..9271ab13ef 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 @@ -21,40 +21,46 @@ +
      -
    • My Alfresco
    • -
    • Browse Spaces and Documents
    • -
    • Search Alfresco
    • -
    • View Details
    • -
    • My Tasks
    • +
    • My Alfresco
    • +
    • Browse Spaces and Documents
    • +
    • Search Alfresco
    • +
    • View Details
    • +
    • My Tasks
    -
    My Checked Out Documents
    +
    My Checked Out Documents 
    -
    +
    Open ${record.versionLabel} + ${record.versionLabel}
    Author: ${record.creator}
    Date: ${record.createdDate?datetime}
    <#if record.description?exists> Notes: ${record.description}
    - +
    <#assign rowNum=0> <#assign query="@cm\\:workingCopyOwner:${person.properties.userName}"> <#list companyhome.childrenByLuceneSearch[query] as child> <#if child.isDocument> <#assign rowNum=rowNum+1> - + - @@ -62,24 +68,24 @@
    ${child.name} - ${child.name}
    +
    + <#if child.name?ends_with(".doc")> + <#assign webdavPath = (child.displayPath?substring(13) + '/' + child.name)?url('ISO-8859-1')?replace('%2F', '/')?replace('\'', '\\\'') /> + ${child.name}
    + <#else> + ${child.name}
    + <#if child.properties.description?exists> ${child.properties.description}
    Modified: ${child.properties.modified?datetime} (${(child.size / 1024)?int}Kb)
    - Check In - Make PDF... + Check In + Make PDF...
    -
    My Tasksoverdue=overdue, due today=due today
    +
    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)> - + due today <#-- items overdue? --> <#elseif (dateCompare(date?date, due?date) == 1)> - + overdue <#else>   @@ -104,29 +110,29 @@
    • - - Save to Alfresco + + Save to Alfresco Save to Alfresco
      Allows you to place the current document under Alfresco management.
    • - - Browse Alfresco + + Browse Alfresco Browse Alfresco
      Navigate around the Alfresco repository for documents.
    • - - Search + + Search Find Documents
      Search Alfresco for documents by name and content.
    • - - Launch Alfresco + + Launch Alfresco Launch Alfresco
      Start the Alfresco Web Client. 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 index 7b2089413f..df11247085 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/office/myTasks.get.html.ftl +++ b/config/alfresco/templates/webscripts/org/alfresco/office/myTasks.get.html.ftl @@ -28,32 +28,32 @@
        -
      • My Alfresco
      • -
      • Browse Spaces and Documents
      • -
      • Search Alfresco
      • -
      • View Details
      • -
      • My Tasks
      • +
      • My Alfresco
      • +
      • Browse Spaces and Documents
      • +
      • Search Alfresco
      • +
      • View Details
      • +
      • My Tasks
      -
      My Tasksoverdue=overdue, due today=due today
      +
      My Tasksoverdue=overdue, due today=due today
      - +
      <#assign taskNum=0> <#list workflow.assignedTasks?sort_by('startDate') as t> <#assign taskNum=taskNum+1> - + +<#if taskNum = 0> + + + +
      <#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)> - + due today <#-- items overdue? --> <#elseif (dateCompare(date?date, due?date) == 1)> - + overdue <#else>   @@ -61,14 +61,19 @@ ${t.description?html} (${t.type?html}) - <#if hasDue> + <#if hasDue>
      Due date: ${due?date} - <#else> + <#else>
      (No due date) - +
      (No tasks)
      @@ -80,7 +85,7 @@
      - + 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 4c88e52289..b2d78c6d32 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 @@ -11,57 +11,59 @@ +
        -
      • My Alfresco
      • -
      • Browse Spaces and Documents
      • -
      • Search Alfresco
      • -
      • View Details
      • -
      • My Tasks
      • +
      • My Alfresco
      • +
      • Browse Spaces and Documents
      • +
      • Search Alfresco
      • +
      • View Details
      • +
      • My Tasks
      +
      Current Space
      +
      -
      Start workflowStart workflow Start workflow on:
      ${d.name?html}
      - - - - - - -
      In:${thisSpace.name} - ${thisSpace.name} + + + ${thisSpace.name} + + + ${thisSpace.name}
      <#if thisSpace.properties.description?exists> -
      ${thisSpace.properties.description} + ${thisSpace.properties.description} -
      + + <#if thisSpace=companyhome> <#else> - - Up to Parent Space - Up - + + + 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} + + Open ${child.name} - + + ${child.name} <#if child.properties.description?exists> @@ -79,30 +81,30 @@
      -
      Documents in ${thisSpace.name}
      +
      Documents in ${thisSpace.name} 
      -
      - +
      +
      <#assign documentsFound = 0> <#list thisSpace.children as child> <#if child.isDocument> <#assign documentsFound = documentsFound + 1> <#assign webdavPath = (child.displayPath?substring(13) + '/' + child.name)?url('ISO-8859-1')?replace('%2F', '/')?replace('\'', '\\\'') /> - - @@ -141,16 +143,16 @@
      • - - Save to Alfresco + + Save to Alfresco Save to Alfresco
        Allows you to place the current document under Alfresco management.
      • <#if args.search?exists>
      • - - Back to results + + Back to results Back to search results
        Return to the search tab. 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 666705b7b7..a853dd08d9 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 @@ -16,11 +16,11 @@
          -
        • My Alfresco
        • -
        • Browse Spaces and Documents
        • -
        • Search Alfresco
        • -
        • View Details
        • -
        • My Tasks
        • +
        • My Alfresco
        • +
        • Browse Spaces and Documents
        • +
        • Search Alfresco
        • +
        • View Details
        • +
        • My Tasks
        @@ -34,16 +34,16 @@ - Search + Search Return a maximum of - + + + + +  items
      @@ -53,9 +53,9 @@ -
      Items Found
      +
       
      -
      +
      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 index 89b6b54e20..53a2ca1fec 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/office/searchResults.get.html.ftl +++ b/config/alfresco/templates/webscripts/org/alfresco/office/searchResults.get.html.ftl @@ -1,7 +1,8 @@ <#if args.search?exists> <#assign searchString = args.search> <#if searchString != ""> - <#assign queryString = "TEXT:\"${searchString}\" @cm\\:title:*${searchString}*"> + <#-- assign queryString = "(TEXT:\"${searchString}\") OR (@cm\\:name:*${searchString}*)" --> + <#assign queryString = "@\\{http\\://www.alfresco.org/model/content/1.0\\}name:*${searchString}*" > <#else> <#assign searchString = ""> @@ -15,7 +16,7 @@ <#assign maxresults=10> - <#assign rescount=1> + <#assign rescount=0>
      + <#if child.name?ends_with(".doc")> - Open ${child.name} + Open ${child.name} <#else> - Open ${child.name} + Open ${child.name} + <#if child.name?ends_with(".doc")> - + ${child.name}
      <#else> - + ${child.name}
      @@ -111,15 +113,15 @@ Modified: ${child.properties.modified?datetime}, Size: ${(child.size / 1024)?int}Kb
      <#if child.isLocked > - Locked + Locked <#elseif hasAspect(child, "cm:workingcopy") == 1> - Check In + Check In <#else> - Check Out + Check Out - Make PDF... + Make PDF... <#if !child.isLocked > - Delete... + Delete...
      <#assign results = companyhome.childrenByLuceneSearch[queryString] > @@ -24,7 +25,9 @@ <#else> + <#assign totalResults = results?size> <#list results as child> + <#assign rescount=rescount + 1> <#if child.isDocument> <#if child.name?ends_with(".pdf")> <#assign openURL = "${url.context}${child.url}"> @@ -35,11 +38,11 @@ <#assign hrefExtra = " onClick=\"window.external.openDocument('${webdavPath}')\""> <#else> - <#assign openURL = "${url.serviceContext}/office/navigation?p=${args.p}&n=${child.id}&search=${searchString}&maxresults=${maxresults}"> + <#assign openURL = "${url.serviceContext}/office/navigation?p=${args.p?url}&n=${child.id}&search=${searchString?url}&maxresults=${maxresults}"> <#assign hrefExtra = ""> -
      (No results found)
      + Open ${child.name} @@ -55,8 +58,10 @@ <#if rescount = maxresults> <#break> - <#assign rescount=rescount + 1>
      + \ No newline at end of file diff --git a/config/alfresco/templates/webscripts/org/alfresco/office/searchResults.get.js b/config/alfresco/templates/webscripts/org/alfresco/office/searchResults.get.js new file mode 100644 index 0000000000..e69de29bb2 diff --git a/source/web/css/office.css b/source/web/css/office.css index 8707a3450e..c7c9b511ec 100644 --- a/source/web/css/office.css +++ b/source/web/css/office.css @@ -1,3 +1,7 @@ +html { + overflow: hidden; +} + body { background: url("../images/office/view_bg.gif") top; color: #0073e6; @@ -18,6 +22,30 @@ a img { border: 0px; } +TABLE, TR, TD { + border: 0px; + border-collapse: collapse; + padding: 2px; +} + +ul { + margin: 0px; + list-style: none; + padding: 2px 0px 0px 24px; +} + +input.button { + background-color: #cce6ff; + border: 1px solid #0073e6; + color: #0073e6; + font-size: 11px; + font-weight: bold; + cursor: pointer; + margin-left: 6px; + padding: 1px 4px; + filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr='#ffffff', EndColorStr='#cce6ff'); +} + .bold { font-weight: bold; } @@ -73,16 +101,37 @@ a img { .header { clear: both; - width: 282px; - padding: 6px 0px 2px 4px; font-weight: bold; float: left; + padding: 6px 0px 2px 4px; + height: 13px; + width: 282px; } .headerExtra { font-weight: normal; float: right; - margin-top: -13px; + height: 13px; + margin: -13px 0px 0px 0px; +} + +.taskKey { + float: left; + margin: 0px 0px 0px 0px; + padding: 0px 0px 0px 0px; +} + +.toggle { + background: transparent url("../images/office/arrow_up.gif") no-repeat; + cursor: pointer; + display: block; + float: left; + margin: -3px -1px 0px 4px; + height: 16px; + width: 16px; +} +.toggled { + background-image: url("../images/office/arrow_down.gif") !important; } .containerBig { @@ -116,44 +165,38 @@ a img { background: #fff; } -.containerMediumGrow { - height: 354px !important; +.containerSearchResults { + clear: both; + float: left; + width: 282px; + height: 497px; + overflow: auto; + border: 1px solid #cccccc; + margin: 0px 4px 0px 4px; + background: #fff; } -.containerMediumShrink { - height: 54px !important; + +#checkedoutList, #taskList, #spaceList, #documentList, #versionList, #resultsList { + overflow-y: scroll; } .odd { background-color: #f8f8f8 !important; - border-bottom: 1px solid #eee; } .even { background-color: #ffffff !important; - border-bottom: 1px solid #eee; } #currentSpaceInfo { + background: #fff; + border: 1px solid #cccccc; clear: both; float: left; - width: 282px; height: 34px; + width: 280px; overflow: none; - border: 1px solid #cccccc; - margin: 4px 4px 0px; - padding: 4px 0px 0px; - background: #fff; -} - -TABLE, TR, TD { - border: 0px; - border-collapse: collapse; - padding: 2px; -} - -ul { - margin: 0px; - list-style: none; - padding: 2px 0px 0px 24px; + margin: 0px 4px; + padding: 2px 0px 2px 2px; } #documentActions { @@ -180,7 +223,7 @@ ul { border: 1px solid #ccc; float: left; margin: 0px 4px; - height: 106px; + height: 89px; width: 282px; } #documentActionsNavigation li a { @@ -228,16 +271,8 @@ ul { overflow: hidden; } -input.button { - background-color: #cce6ff; - border: 1px solid #0073e6; - color: #0073e6; - font-size: 11px; - font-weight: bold; - cursor: pointer; - margin-left: 6px; - padding: 1px 4px; - filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr='#ffffff', EndColorStr='#cce6ff'); +.checkedoutItem { + border-bottom: 1px solid #eee; } #taskDetails { @@ -246,10 +281,11 @@ input.button { .taskItem { cursor: pointer; + border-bottom: 1px solid #eee; } .taskItemSelected { - background-color: #ffe500 !important; + background-color: #ffff90 !important; } .taskResources { diff --git a/source/web/images/office/arrow_down.gif b/source/web/images/office/arrow_down.gif index dbe0e802dd820db38157f927964f8495b265656c..db3ffe23d94ac0f51b65cdcc5549ab34a5b85e60 100644 GIT binary patch literal 248 zcmZ?wbhEHb6krfwIKlt||Ns9tNnKJj|NPGL&#zv)dgbbsNmC}yo;z#F(#7)^%$qxJ z&dgaercIwZW$NVKzMggK*G`@?ao@hZ^XAQ+JbBWWFJC@?{(SA)wPVMQ0nGuMhe9a+ zWMO1rkYvySiGu88U@c8hOKWRV;anu~IKpy*>iG%5JKYW6hZWwDZ1+>s;7Vg<*EACr z;Bb%XeBScO=Sq4>*{P^<&SR-LGCVzxxtk}6&A9*EBz5Ax9rv4l9Wq#X|8u6Wj-XIo lL$ZXRk|=*`X{HdrgQTcnZNISKWMwvP5nkS69c4uZYXD~dWS#&3 literal 180 zcmZ?wbhEHb6feXj<~M&q8g87)&bY~X62)D&vStHHp;W#nwA LwqlJL3xhQPl?gfL diff --git a/source/web/images/office/arrow_up.gif b/source/web/images/office/arrow_up.gif index 14478fd0f10fe4628cf012fae031837f7d9ccb72..a32f33cded03dacf6ef0d8bbd828f41faa599d13 100644 GIT binary patch delta 223 zcmV<503iRm0r&w}M@dFFIbje05CFsg00000|Ns9qWu$VS&$-X%)z;P2)zp%dk(-^G zq@|;upq`zcoSB-KmY0>3m6MH*jIOV(la!IZzP+BFos*N2^z`)e^Yhl$*2c!hkys*r z5C9MW00nhmCT50$BnhGz<5)S6CC`vkxkoYYR&m@Jhi)bi>AE& delta 161 zcmV;S0ABz20lEQLM@dFFIbjO`4*E~PEJlmMMWeeB>DOI0|NuDuCC|j=a!b1kys)? z3jhxQ00lQ-CXQrjn#3tmi<%*Tbq)