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 48e84d22e6..f18f40b74f 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
@@ -105,7 +105,7 @@
<#assign versionRow=versionRow+1>
-
+
|
${record.versionLabel}
@@ -114,7 +114,7 @@
<#if record.description?exists>
Notes: ${record.description}
#if>
-
+ Compare with current
|
#list>
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 27ba987a67..7adbbefa69 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
@@ -30,7 +30,7 @@

- 
+ 



@@ -40,25 +40,26 @@
-
<#assign rowNum=0>
<#assign query="@cm\\:workingCopyOwner:${person.properties.userName}">
<#list companyhome.childrenByLuceneSearch[query] as child>
<#if child.isDocument>
<#assign rowNum=rowNum+1>
-
-
+
+
- |
-
+
+
<#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}
+ ${child.name}
#if>
<#if child.properties.description?exists>
- ${child.properties.description}
+ <#if (child.properties.description?length > 0)>
+ ${child.properties.description}
+ #if>
#if>
Modified: ${child.properties.modified?datetime} (${(child.size / 1024)?int}Kb)
@@ -66,57 +67,56 @@
<#if !child.name?ends_with(".pdf")>
#if>
- |
-
+
+
#if>
#list>
<#if rowNum = 0>
-
- (No documents) |
-
+
+ (No documents)
+
#if>
-
-
<#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"]>
+ #if>
+ |
-
- ${t.description?html} (${t.type?html})
+
+
+ ${t.description?html} (${t.type?html})
<#if hasDue>
- Due date: ${due?date}
+ Due date: ${due?date}
<#else>
- (No due date)
+ (No due date)
#if>
- |
-
+
+
#list>
<#if taskNum = 0>
-
- (No tasks) |
-
+
+ (No tasks)
+
#if>
-
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 33fb3775d1..ece4792c89 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
@@ -35,7 +35,7 @@
<#assign spacesFound = 0>
-<#list thisSpace.children as child>
+<#list thisSpace.children?sort_by('name') as child>
<#if child.isContainer>
<#assign spacesFound = spacesFound + 1>
@@ -127,19 +128,19 @@
<#assign documentsFound = 0>
-<#list thisSpace.children as child>
+<#list thisSpace.children?sort_by('name') 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>
@@ -147,7 +148,9 @@
#if>
<#if child.properties.description?exists>
+ <#if (child.properties.description?length > 0)>
${child.properties.description}
+ #if>
#if>
Modified: ${child.properties.modified?datetime}, Size: ${(child.size / 1024)?int}Kb
<#if child.isLocked >
@@ -174,13 +177,19 @@
<#assign currentPath = thisSpace.displayPath + '/' + thisSpace.name />
-<#assign webdavPath = currentPath?substring(13)?url('ISO-8859-1')?replace('%2F', '/')?replace('\'', '\\\'') />
+<#assign currentPath = currentPath?substring(13)?url('ISO-8859-1')?replace('%2F', '/')?replace('\'', '\\\'') />
+
<#if !node.isDocument>
-
-
+
Save to Alfresco
diff --git a/config/alfresco/templates/webscripts/org/alfresco/office/navigation.get.js b/config/alfresco/templates/webscripts/org/alfresco/office/navigation.get.js
index 9e0cbf99dd..6bfc490cd7 100644
--- a/config/alfresco/templates/webscripts/org/alfresco/office/navigation.get.js
+++ b/config/alfresco/templates/webscripts/org/alfresco/office/navigation.get.js
@@ -3,6 +3,26 @@ if ((args.n) && (args.n != ""))
{
model.node = search.findNode("workspace://SpacesStore/" + args.n);
}
+else if ((args.p) && (args.p != ""))
+{
+ var path = args.p;
+ if (path == "/Company Home")
+ {
+ model.node = companyhome;
+ }
+ else
+ {
+ var node = companyhome.childByNamePath(path.substring(13));
+ if (node != null)
+ {
+ model.node = node;
+ }
+ else
+ {
+ model.node = companyhome;
+ }
+ }
+}
else
{
model.node = companyhome;
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 3802155245..299c45144f 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
@@ -20,7 +20,7 @@

- 
+ 



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 53a2ca1fec..14cfc251b8 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,8 +1,8 @@
<#if args.search?exists>
<#assign searchString = args.search>
<#if searchString != "">
- <#-- assign queryString = "(TEXT:\"${searchString}\") OR (@cm\\:name:*${searchString}*)" -->
- <#assign queryString = "@\\{http\\://www.alfresco.org/model/content/1.0\\}name:*${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,19 +15,16 @@
<#else>
<#assign maxresults=10>
#if>
-
- <#assign rescount=0>
-
-
+ <#assign resCount=0>
<#assign results = companyhome.childrenByLuceneSearch[queryString] >
<#if results?size = 0>
-
- (No results found) |
-
+
+ (No results found)
+
<#else>
<#assign totalResults = results?size>
<#list results as child>
- <#assign rescount=rescount + 1>
+ <#assign resCount=resCount + 1>
<#if child.isDocument>
<#if child.name?ends_with(".pdf")>
<#assign openURL = "${url.context}${child.url}">
@@ -41,27 +38,28 @@
<#assign openURL = "${url.serviceContext}/office/navigation?p=${args.p?url}&n=${child.id}&search=${searchString?url}&maxresults=${maxresults}">
<#assign hrefExtra = "">
#if>
-
-
-
- |
-
- ${child.name}
+
+
+
+
+
+ ${child.name}
<#if child.properties.description?exists>
- ${child.properties.description}
+ <#if (child.properties.description?length > 0)>
+ ${child.properties.description}
+ #if>
#if>
<#if child.isDocument>
Modified: ${child.properties.modified?datetime} (${(child.size / 1024)?int}Kb)
#if>
- |
-
- <#if rescount = maxresults>
+
+
+ <#if resCount = maxresults>
<#break>
#if>
#list>
#if>
-
#if>
\ No newline at end of file
diff --git a/source/web/css/office.css b/source/web/css/office.css
index eca49b9b95..f9bf1c1d27 100644
--- a/source/web/css/office.css
+++ b/source/web/css/office.css
@@ -13,6 +13,17 @@ body {
overflow: hidden;
}
+#overlayPanel
+{
+ background-color: #ffffff;
+ position: absolute;
+ left: 0px;
+ top: 0px;
+ height: 652px;
+ width: 290px;
+ z-index: 1;
+}
+
a {
color: #0073e6;
text-decoration: none;
@@ -278,11 +289,23 @@ input.button {
}
.documentItem {
+ float: left;
border-bottom: 1px solid #eee;
padding: 2px 0px 6px 0px;
width: 265px;
}
+.documentItemIcon {
+ float: left;
+ width: 36px;
+ padding: 0px 2px 0px 1px;
+}
+
+.documentItemDetails {
+ float: left;
+ width: 226px;
+}
+
#documentActions {
clear: both;
background-color: #ffffcc;
@@ -325,6 +348,30 @@ input.button {
padding: 0px 3px 0px 0px;
}
+#saveDetailsPanel
+{
+ position: absolute;
+ border: 1px solid #CCD4DB;
+ background-color: #EEF7FB;
+ height: 40px;
+ width: 267px;
+ margin: 8px 0px 0px;
+ padding: 8px;
+ display: none;
+ z-index: 1;
+ -moz-border-radius: 5px;
+}
+
+.saveDetailsItem
+{
+ background-color: #ffffff;
+ border: 1px solid #CCD4DB;
+ color: #0073e6;
+ float: left;
+ font-size: 11px;
+ margin: 0px 4px 4px 4px;
+ padding: 2px;
+}
#nonStatusText {
height: 100%;
@@ -373,6 +420,22 @@ input.button {
.taskItem {
cursor: pointer;
border-bottom: 1px solid #eee;
+ float: left;
+ padding: 4px 0px;
+}
+
+.taskIndicator {
+ display: block;
+ float: left;
+ height: 12px;
+ padding: 0px 0px 0px 2px;
+ width: 12px;
+}
+
+.taskItemDetails {
+ display: block;
+ float: left;
+ width: 251px;
}
.taskItemSelected {
@@ -411,7 +474,7 @@ input.button {
float: left;
padding: 4px 4px 0px 0px;
text-align: right;
- width: 64px;
+ width: 62px;
}
.taskValue {
diff --git a/source/web/scripts/office/my_alfresco.js b/source/web/scripts/office/my_alfresco.js
index 62bc8175b3..d0d086f185 100644
--- a/source/web/scripts/office/my_alfresco.js
+++ b/source/web/scripts/office/my_alfresco.js
@@ -9,6 +9,7 @@ var OfficeMyAlfresco =
init: function()
{
+ OfficeAddin.sortTasks($('taskList'));
OfficeMyAlfresco.setupTasks();
OfficeMyAlfresco.setupToggles();
},
@@ -131,7 +132,7 @@ var OfficeMyAlfresco =
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 5aa4e1256b..d63d896d86 100644
--- a/source/web/scripts/office/my_tasks.js
+++ b/source/web/scripts/office/my_tasks.js
@@ -7,6 +7,7 @@ var OfficeMyTasks =
{
init: function()
{
+ OfficeAddin.sortTasks($('taskList'));
OfficeMyTasks.setupEventHandlers();
if (window.queryObject.t)
@@ -144,7 +145,10 @@ var OfficeMyTasks =
openTask: function(taskId)
{
- $(taskId).fireEvent("click");
+ if ($(taskId))
+ {
+ $(taskId).fireEvent("click");
+ }
},
transitionTask: function(taskId, commandURL, successMessage)
diff --git a/source/web/scripts/office/navigation.js b/source/web/scripts/office/navigation.js
index 9bc5f98b48..6b6b655757 100644
--- a/source/web/scripts/office/navigation.js
+++ b/source/web/scripts/office/navigation.js
@@ -8,9 +8,12 @@ var OfficeNavigation =
ANIM_LENGTH: 800,
CREATE_SPACE_HEIGHT: 108,
CREATE_SPACE_TEMPLATE: 16,
+ OVERLAY_ANIM_LENGTH: 300,
+ OVERLAY_OPACITY: 0.7,
init: function()
{
+ $('overlayPanel').setStyle('opacity', 0);
OfficeNavigation.setupToggles();
OfficeNavigation.setupCreateSpace();
@@ -186,6 +189,82 @@ var OfficeNavigation =
}
});
myAjax.request();
+ },
+
+ saveToAlfresco: function(currentPath)
+ {
+ // Does the current doc have an extension?
+ if (!window.external.docHasExtension())
+ {
+ // No - we need to ask for a filename
+ OfficeNavigation.showSaveFilenamePanel(currentPath);
+ }
+ else
+ {
+ window.external.saveToAlfresco(currentPath);
+ }
+ },
+
+ showSaveFilenamePanel: function(currentPath)
+ {
+ this.fxOverlay = $("overlayPanel").effect('opacity',
+ {
+ duration: OfficeNavigation.OVERLAY_ANIM_LENGTH
+ });
+
+ var panel = $("saveDetailsPanel");
+ panel.setStyle("opacity", 0);
+ panel.setStyle("display", "inline");
+
+ var anim = new Fx.Styles(panel,
+ {
+ duration: OfficeNavigation.ANIM_LENGTH,
+ transition: Fx.Transitions.linear,
+ onComplete: function()
+ {
+ $('saveFilename').addEvent('keydown', function(event)
+ {
+ event = new Event(event);
+ if (event.key == 'enter')
+ {
+ OfficeNavigation.saveOK();
+ }
+ else if (event.key == 'esc')
+ {
+ OfficeNavigation.saveCancel();
+ }
+ });
+ $('saveFilename').focus();
+ }
+ }).start({'opacity': 1});
+
+ this.fxOverlay.start(OfficeNavigation.OVERLAY_OPACITY);
+ this.popupPanel = panel;
+ this.popupPanel.currentPath = currentPath;
+ },
+
+ saveOK: function()
+ {
+ var filename = $('saveFilename').value;
+ var currentPath = this.popupPanel.currentPath;
+ if (filename.length > 0)
+ {
+ window.external.saveToAlfrescoAs(currentPath, filename);
+ }
+ OfficeNavigation.saveCancel();
+ },
+
+ saveCancel: function()
+ {
+ if (this.popupPanel != null)
+ {
+ this.popupPanel.setStyle("display", "none");
+ this.popupPanel = null;
+ }
+ if (this.fxOverlay)
+ {
+ this.fxOverlay.start(0);
+ }
}
};
diff --git a/source/web/scripts/office/office_addin.js b/source/web/scripts/office/office_addin.js
index f745d2da42..ad43994ebc 100644
--- a/source/web/scripts/office/office_addin.js
+++ b/source/web/scripts/office/office_addin.js
@@ -157,6 +157,31 @@ var OfficeAddin =
}
}
return url;
+ },
+
+ sortTasks: function(taskContainer)
+ {
+ var taskArray = new Array();
+ taskContainer.getElementsBySelector('.taskItem').each(function(task, i)
+ {
+ taskArray[i] = {dueDate: task.getProperty('rel'), theTask: task.clone()};
+ });
+
+ taskArray.sort(OfficeAddin.sortByDueDate);
+ taskContainer.empty();
+
+ for(var i = 0; i < taskArray.length; i++)
+ {
+ taskArray[i].theTask.addClass((i % 2 == 0) ? "odd" : "even");
+ taskArray[i].theTask.injectInside(taskContainer);
+ }
+ },
+
+ sortByDueDate: function(a, b)
+ {
+ var x = a.dueDate;
+ var y = b.dueDate;
+ return ((x < y) ? -1 : ((x > y) ? 1 : 0));
}
};