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>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div class="taskActionContainer">
|
||||||
<table class="taskActions" style="padding-left:16px">
|
<span class="taskActions">
|
||||||
<tr>
|
|
||||||
<#list task.transitions as wt>
|
<#list task.transitions as wt>
|
||||||
<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>
|
||||||
<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>
|
|
||||||
</#list>
|
</#list>
|
||||||
</tr>
|
</span>
|
||||||
</table>
|
<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>
|
</div>
|
||||||
</#if>
|
</#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>
|
<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>
|
</#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="${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")>
|
<#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>
|
<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>
|
</#if>
|
||||||
|
@@ -33,7 +33,7 @@ a img {
|
|||||||
border: 0px;
|
border: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
TABLE, TR, TD {
|
TABLE, TD {
|
||||||
border: 0px;
|
border: 0px;
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
padding: 2px;
|
padding: 2px;
|
||||||
@@ -449,6 +449,20 @@ input.button {
|
|||||||
overflow: auto;
|
overflow: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.taskActionContainer {
|
||||||
|
float: left;
|
||||||
|
width: 272px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.taskActions {
|
||||||
|
float: left;
|
||||||
|
padding-right: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.taskManage {
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
|
||||||
.taskAction {
|
.taskAction {
|
||||||
background-color: #cce6ff;
|
background-color: #cce6ff;
|
||||||
border: 1px solid #0073e6;
|
border: 1px solid #0073e6;
|
||||||
@@ -457,7 +471,7 @@ input.button {
|
|||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
margin: 0px 0px 0px 2px;
|
margin: 0px 0px 0px 4px;
|
||||||
padding: 4px;
|
padding: 4px;
|
||||||
filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr='#ffffff', EndColorStr='#cce6ff');
|
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();
|
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 x = a.dueDate;
|
||||||
var y = b.dueDate;
|
var y = b.dueDate;
|
||||||
return ((x < y) ? -1 : ((x > y) ? 1 : 0));
|
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