<#if d.isDocument>
-
+
|
-
+ |
${d.name}
<#if d.isLocked >
@@ -92,8 +92,8 @@
#if>
-
-
+
+
<#if d.isDocument >
<#if hasAspect(d, "cm:versionable") == 1>
<#assign versionRow=0>
@@ -103,14 +103,14 @@
|
-
+ |
${record.versionLabel}
Author: ${record.creator}
Date: ${record.createdDate?datetime}
<#if record.description?exists>
Notes: ${record.description}
#if>
-
+
|
#list>
@@ -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
@@ -154,7 +154,7 @@
<#else>
-
+
Check Out
@@ -162,26 +162,26 @@
#if>
-
-
+
+
+ Start Workflow
+
+ Start Advanced Workflow for the current document.
+
+
+
+
Transform to PDF
Transform the current document to Adobe PDF format.
-
-
+
+
Open Full Details
Open the document details in the Alfresco Web Client.
-
-
-
- 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 @@
+
-
+
-
+
<#assign rowNum=0>
<#assign query="@cm\\:workingCopyOwner:${person.properties.userName}">
<#list companyhome.childrenByLuceneSearch[query] as child>
<#if child.isDocument>
<#assign rowNum=rowNum+1>
-
+
|
-
- ${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>
<#if child.properties.description?exists>
${child.properties.description}
#if>
Modified: ${child.properties.modified?datetime} (${(child.size / 1024)?int}Kb)
-
-
+
+
|
#if>
@@ -62,24 +68,24 @@
-
+
-
-
+
+
<#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)>
-
+
#if>
<#else>
@@ -104,29 +110,29 @@
-
-
-
+
+
Save to Alfresco
Allows you to place the current document under Alfresco management.
-
-
-
+
+
Browse Alfresco
Navigate around the Alfresco repository for documents.
-
-
-
+
+
Find Documents
Search Alfresco for documents by name and content.
-
-
-
+
+
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 @@
-
+
-
+
<#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)>
-
+
#if>
<#else>
@@ -61,14 +61,19 @@
|
${t.description?html} (${t.type?html})
- <#if hasDue>
+ <#if hasDue>
Due date: ${due?date}
- <#else>
+ <#else>
(No due date)
- #if>
+ #if>
|
#list>
+<#if taskNum = 0>
+
+ (No tasks) |
+
+#if>
@@ -80,7 +85,7 @@
-  |
+  |
Start workflow on: ${d.name?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 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 @@
+
+
+
-
+
-
-
+
+
<#assign spacesFound = 0>
<#list thisSpace.children as child>
<#if child.isContainer>
<#assign spacesFound = spacesFound + 1>
-
-
+ |
+
|
-
-
+ |
+
${child.name}
<#if child.properties.description?exists>
@@ -79,30 +81,30 @@
|
-
+
-
-
+
+
<#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('\'', '\\\'') />
-
+ |
<#if child.name?ends_with(".doc")>
-
+
<#else>
-
+
#if>
|
-
+ |
<#if child.name?ends_with(".doc")>
-
+
${child.name}
<#else>
-
+
${child.name}
#if>
@@ -111,15 +113,15 @@
#if>
Modified: ${child.properties.modified?datetime}, Size: ${(child.size / 1024)?int}Kb
<#if child.isLocked >
-
+
<#elseif hasAspect(child, "cm:workingcopy") == 1>
-
+
<#else>
-
+
#if>
-
+
<#if !child.isLocked >
-
+
#if>
|
@@ -141,16 +143,16 @@
@@ -53,9 +53,9 @@
-
+
-
+
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}*" >
#if>
<#else>
<#assign searchString = "">
@@ -15,7 +16,7 @@
<#assign maxresults=10>
#if>
- <#assign rescount=1>
+ <#assign rescount=0>
<#assign results = companyhome.childrenByLuceneSearch[queryString] >
@@ -24,7 +25,9 @@
(No results found) |
<#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}')\"">
#if>
<#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 = "">
#if>
-
+ |
|
@@ -55,8 +58,10 @@
<#if rescount = maxresults>
<#break>
#if>
- <#assign rescount=rescount + 1>
#list>
#if>
|
#if>
+
\ 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 dbe0e802dd..db3ffe23d9 100644
Binary files a/source/web/images/office/arrow_down.gif and b/source/web/images/office/arrow_down.gif differ
diff --git a/source/web/images/office/arrow_up.gif b/source/web/images/office/arrow_up.gif
index 14478fd0f1..a32f33cded 100644
Binary files a/source/web/images/office/arrow_up.gif and b/source/web/images/office/arrow_up.gif differ
diff --git a/source/web/scripts/office/my_alfresco.js b/source/web/scripts/office/my_alfresco.js
index 672b721d00..6738861a30 100644
--- a/source/web/scripts/office/my_alfresco.js
+++ b/source/web/scripts/office/my_alfresco.js
@@ -4,7 +4,16 @@
*/
var OfficeMyAlfresco =
{
+ TOGGLE_AMOUNT: 150,
+ ANIM_LENGTH: 800,
+
init: function()
+ {
+ OfficeMyAlfresco.setupTasks();
+ OfficeMyAlfresco.setupToggles();
+ },
+
+ setupTasks: function()
{
var tasks = $$('#taskList .taskItem');
@@ -37,7 +46,7 @@ var OfficeMyAlfresco =
// register 'click' event for each task
task.addEvent('click', function(e)
{
- window.location.href = window.serviceContextPath + "/office/myTasks?p=" + window.queryObject.p + "&t=" + task.id;
+ window.location.href = window.serviceContextPath + "/office/myTasks?p=" + window.queryObject.p + "&t=" + task.id.replace(/\./, "$");
});
});
@@ -49,8 +58,80 @@ var OfficeMyAlfresco =
task.removeClass('taskItemSelected');
});
});
- }
+ },
+ setupToggles: function()
+ {
+ // Elements of interest
+ var panels = $$('.togglePanel');
+ var toggles = $$('.toggle');
+
+ // Animation
+ var fxPanel = new Fx.Elements(panels, {wait: false, duration: OfficeMyAlfresco.ANIM_LENGTH, transition: Fx.Transitions.Back.easeInOut});
+
+ panels.each(function(panel, i)
+ {
+ toggle = toggles[i];
+
+ panel.defaultHeight = panel.getStyle('height').toInt();
+ panel.isToggled = false;
+
+ toggle.addEvent('click', function(e)
+ {
+ var animPanel = {};
+
+ if (panel.isToggled)
+ {
+ panel.isToggled = false;
+ this.removeClass('toggled');
+ animPanel[i] =
+ {
+ 'height': [panel.getStyle('height').toInt(), panel.defaultHeight]
+ };
+
+ // reset all other panels
+ panels.each(function(otherPanel, j)
+ {
+ if (otherPanel != panel)
+ {
+ // reset panel
+ otherPanel.isToggled = false;
+ toggles[j].removeClass('toggled');
+ animPanel[j] =
+ {
+ 'height': [otherPanel.getStyle('height').toInt(), otherPanel.defaultHeight]
+ };
+ }
+ });
+ }
+ else
+ {
+ panel.isToggled = true;
+ this.addClass('toggled');
+ animPanel[i] =
+ {
+ 'height': [panel.getStyle('height').toInt(), panel.defaultHeight + (OfficeMyAlfresco.TOGGLE_AMOUNT * (panels.length - 1))]
+ };
+
+ // set all other panels
+ panels.each(function(otherPanel, j)
+ {
+ if (otherPanel != panel)
+ {
+ // set panel
+ otherPanel.isToggled = false;
+ toggles[j].removeClass('toggled');
+ animPanel[j] =
+ {
+ 'height': [otherPanel.getStyle('height').toInt(), otherPanel.defaultHeight - OfficeMyAlfresco.TOGGLE_AMOUNT]
+ };
+ }
+ });
+ }
+ fxPanel.start(animPanel);
+ });
+ });
+ }
};
window.addEvent('domready', OfficeMyAlfresco.init);
\ No newline at end of file
diff --git a/source/web/scripts/office/my_tasks.js b/source/web/scripts/office/my_tasks.js
index fdf2642d37..095b3c410b 100644
--- a/source/web/scripts/office/my_tasks.js
+++ b/source/web/scripts/office/my_tasks.js
@@ -101,7 +101,7 @@ var OfficeMyTasks =
OfficeAddin.showStatusText("Loading task...", "ajax_anim.gif", false);
// ajax call to load task details
- var actionURL = window.serviceContextPath + "/office/myTasksDetail?t=" + task.id;
+ var actionURL = window.serviceContextPath + "/office/myTasksDetail?t=" + task.id.replace(/\./, "$");
var myAjax = new Ajax(actionURL, {
method: 'get',
headers: {'If-Modified-Since': 'Sat, 1 Jan 2000 00:00:00 GMT'},
diff --git a/source/web/scripts/office/navigation.js b/source/web/scripts/office/navigation.js
index e69de29bb2..5f0911ae3e 100644
--- a/source/web/scripts/office/navigation.js
+++ b/source/web/scripts/office/navigation.js
@@ -0,0 +1,89 @@
+/*
+ * Prerequisites: mootools.v1.1.js
+ * office_addin.js
+ */
+var OfficeNavigation =
+{
+ TOGGLE_AMOUNT: 150,
+ ANIM_LENGTH: 800,
+
+ init: function()
+ {
+ OfficeNavigation.setupToggles();
+ },
+
+ setupToggles: function()
+ {
+ // Elements of interest
+ var panels = $$('.togglePanel');
+ var toggles = $$('.toggle');
+
+ // Animation
+ var fxPanel = new Fx.Elements(panels, {wait: false, duration: OfficeNavigation.ANIM_LENGTH, transition: Fx.Transitions.Back.easeInOut});
+
+ panels.each(function(panel, i)
+ {
+ toggle = toggles[i];
+
+ panel.defaultHeight = panel.getStyle('height').toInt();
+ panel.isToggled = false;
+
+ toggle.addEvent('click', function(e)
+ {
+ var animPanel = {};
+
+ if (panel.isToggled)
+ {
+ panel.isToggled = false;
+ this.removeClass('toggled');
+ animPanel[i] =
+ {
+ 'height': [panel.getStyle('height').toInt(), panel.defaultHeight]
+ };
+
+ // reset all other panels
+ panels.each(function(otherPanel, j)
+ {
+ if (otherPanel != panel)
+ {
+ // reset panel
+ otherPanel.isToggled = false;
+ toggles[j].removeClass('toggled');
+ animPanel[j] =
+ {
+ 'height': [otherPanel.getStyle('height').toInt(), otherPanel.defaultHeight]
+ };
+ }
+ });
+ }
+ else
+ {
+ panel.isToggled = true;
+ this.addClass('toggled');
+ animPanel[i] =
+ {
+ 'height': [panel.getStyle('height').toInt(), panel.defaultHeight + (OfficeNavigation.TOGGLE_AMOUNT * (panels.length - 1))]
+ };
+
+ // set all other panels
+ panels.each(function(otherPanel, j)
+ {
+ if (otherPanel != panel)
+ {
+ // set panel
+ otherPanel.isToggled = false;
+ toggles[j].removeClass('toggled');
+ animPanel[j] =
+ {
+ 'height': [otherPanel.getStyle('height').toInt(), otherPanel.defaultHeight - OfficeNavigation.TOGGLE_AMOUNT]
+ };
+ }
+ });
+ }
+ fxPanel.start(animPanel);
+ });
+ });
+ }
+};
+
+window.addEvent('domready', OfficeNavigation.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
index 31d3b0b5a0..87f1180dee 100644
--- a/source/web/scripts/office/office_addin.js
+++ b/source/web/scripts/office/office_addin.js
@@ -20,6 +20,19 @@ var OfficeAddin =
var imgSuccess = (objResponse.statusCode ? "action_successful.gif" : "action_failed.gif");
OfficeAddin.showStatusText(objResponse.statusString, imgSuccess, true);
}
+
+ OfficeAddin.makeExternalLinks();
+ },
+
+ makeExternalLinks: function(e)
+ {
+ $$('a').each(function(anchor, i)
+ {
+ if (anchor.getProperty('rel') == '_blank')
+ {
+ anchor.target = "_blank";
+ }
+ });
},
toQueryObject: function(s)
diff --git a/source/web/scripts/office/search.js b/source/web/scripts/office/search.js
index 603dbe08ad..c4dac1f14b 100644
--- a/source/web/scripts/office/search.js
+++ b/source/web/scripts/office/search.js
@@ -6,7 +6,7 @@ var OfficeSearch =
{
init: function()
{
- $("searchText").addEvent("keydown", function(event)
+ $('searchText').addEvent('keydown', function(event)
{
event = new Event(event);
if (event.key == 'enter')
@@ -14,6 +14,20 @@ var OfficeSearch =
$("simpleSearchButton").onclick();
}
});
+
+ $('itemsFound').innerHTML = "Results Shown Below";
+ },
+
+ itemsFound: function(shownResults, totalResults)
+ {
+ if (shownResults < totalResults)
+ {
+ $('itemsFound').innerHTML = "Showing first " + shownResults + " of " + totalResults + " total items found";
+ }
+ else
+ {
+ $('itemsFound').innerHTML = "Showing all " + shownResults + " items found";
+ }
},
/* AJAX call to perform server-side search */
@@ -21,17 +35,18 @@ var OfficeSearch =
{
OfficeAddin.showStatusText("Searching...", "ajax_anim.gif", false);
- var searchString = $("searchText").value;
- var maxResults = $("maxResults").value;
+ 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'},
+ evalScripts: true,
onComplete: function(textResponse, xmlResponse)
{
OfficeAddin.hideStatusText();
- $("searchResultsList").innerHTML = textResponse;
+ $('searchResultsList').innerHTML = textResponse;
}
});
myAjax.request();
| |