mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Usability updates for Office Web Scripts
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6250 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -68,15 +68,14 @@
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<table class="taskActions" style="padding-left:16px">
|
||||
<tr>
|
||||
<div class="taskActionContainer">
|
||||
<span class="taskActions">
|
||||
<#list task.transitions as wt>
|
||||
<td>
|
||||
<a class="taskAction" href="#" onclick="OfficeMyTasks.transitionTask('${task.id}', '${url.context}/command/task/end/${task.id}<#if wt.id?exists>/${wt.id}</#if>', 'Workflow action \'${wt.label?html}\' completed.');">${wt.label?html}</a>
|
||||
</td>
|
||||
<span class="taskAction" onclick="OfficeMyTasks.transitionTask('${task.id}', '${url.context}/command/task/end/${task.id}<#if wt.id?exists>/${wt.id}</#if>', 'Workflow action \'${wt.label?html}\' completed.');">${wt.label?html}</span>
|
||||
</#list>
|
||||
</tr>
|
||||
</table>
|
||||
</span>
|
||||
<span class="taskManage">
|
||||
<span class="taskAction" onclick="OfficeAddin.openWindowCallback('${url.context}/command/ui/managetask?id=${task.id}&type=${task.qnameType}&container=plain&ticket=${session.ticket}', OfficeMyTasks.refreshPage);">Manage...</span>
|
||||
</span>
|
||||
</div>
|
||||
</#if>
|
||||
|
@@ -163,7 +163,7 @@
|
||||
<a href="#" onclick="OfficeAddin.runAction('${doc_actions}','checkout','${child.id}', '');"><img src="${url.context}/images/office/checkout.gif" style="padding:3px 6px 2px 0px;" alt="Check Out" title="Check Out" /></a>
|
||||
</#if>
|
||||
<a href="${url.serviceContext}/office/myTasks?p=${path?url}&w=new&wd=${child.id}"><img src="${url.context}/images/office/new_workflow.gif" style="padding:3px 6px 2px 0px;" alt="Create Workflow..." title="Create Workflow..." /></a>
|
||||
<a href="#" onclick="window.external.insertDocument('${relativePath}')"><img src="${url.context}/images/office/attach_document.gif" style="padding:3px 6px 2px 0px;" alt="Attach File to Current Document" title="Attach File to Current Document" /></a>
|
||||
<a href="#" onclick="window.external.insertDocument('${relativePath}')"><img src="${url.context}/images/office/insert_document.gif" style="padding:3px 6px 2px 0px;" alt="Insert File into Current Document" title="Insert File into Current Document" /></a>
|
||||
<#if !child.name?ends_with(".pdf")>
|
||||
<a href="#" onclick="OfficeAddin.runAction('${doc_actions}','makepdf','${child.id}', '');"><img src="${url.context}/images/office/makepdf.gif" style="padding:3px 6px 2px 0px;" alt="Make PDF..." title="Make PDF" /></a>
|
||||
</#if>
|
||||
|
@@ -33,7 +33,7 @@ a img {
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
TABLE, TR, TD {
|
||||
TABLE, TD {
|
||||
border: 0px;
|
||||
border-collapse: collapse;
|
||||
padding: 2px;
|
||||
@@ -449,6 +449,20 @@ input.button {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.taskActionContainer {
|
||||
float: left;
|
||||
width: 272px;
|
||||
}
|
||||
|
||||
.taskActions {
|
||||
float: left;
|
||||
padding-right: 2px;
|
||||
}
|
||||
|
||||
.taskManage {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.taskAction {
|
||||
background-color: #cce6ff;
|
||||
border: 1px solid #0073e6;
|
||||
@@ -457,7 +471,7 @@ input.button {
|
||||
font-size: 11px;
|
||||
font-weight: bold;
|
||||
cursor: pointer;
|
||||
margin: 0px 0px 0px 2px;
|
||||
margin: 0px 0px 0px 4px;
|
||||
padding: 4px;
|
||||
filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr='#ffffff', EndColorStr='#cce6ff');
|
||||
}
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 278 B After Width: | Height: | Size: 645 B |
Binary file not shown.
Before Width: | Height: | Size: 574 B After Width: | Height: | Size: 553 B |
@@ -226,6 +226,23 @@ var OfficeMyTasks =
|
||||
}
|
||||
});
|
||||
myAjax.request();
|
||||
},
|
||||
|
||||
refreshPage: function()
|
||||
{
|
||||
// Remove any trailing hash
|
||||
var href = window.location.href.replace("#", "")
|
||||
// Remove any previous "st", "w", "wd" or "t" parameters
|
||||
href = OfficeAddin.removeParameters(href, "st|w|wd|t");
|
||||
// Re-select a selected task after reload
|
||||
var taskSel = $E('#taskList .taskItemSelected');
|
||||
if (taskSel != null)
|
||||
{
|
||||
var taskId = taskSel.id;
|
||||
href += (href.indexOf("?") == -1) ? "?" : "&";
|
||||
href += "t=" + encodeURI(taskId);
|
||||
}
|
||||
window.location.href = href;
|
||||
}
|
||||
};
|
||||
|
||||
|
@@ -204,6 +204,37 @@ var OfficeAddin =
|
||||
var x = a.dueDate;
|
||||
var y = b.dueDate;
|
||||
return ((x < y) ? -1 : ((x > y) ? 1 : 0));
|
||||
},
|
||||
|
||||
openWindowCallback: function(url, callback)
|
||||
{
|
||||
// Store the callback function for later
|
||||
OfficeAddin.callbackFunction = callback;
|
||||
// Register our "well known" callback function
|
||||
window.alfrescoCallback = OfficeAddin.openWindowOnCallback;
|
||||
// Use a named window so that only one dialog is active at a time
|
||||
window.open(url, 'alfrescoDialog', 'width=1024,height=768');
|
||||
},
|
||||
|
||||
openWindowOnCallback: function(fromTimeout)
|
||||
{
|
||||
if (typeof(fromTimeout)=='undefined')
|
||||
{
|
||||
window.setTimeout("OfficeAddin.openWindowOnCallback(true)", 10);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Clear out the global callback function
|
||||
window.alfrescoCallback = null;
|
||||
try
|
||||
{
|
||||
OfficeAddin.callbackFunction();
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
}
|
||||
OfficeAddin.callbackFunction = null;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user