Point check-in. Office AddIn web scripts.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5842 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Mike Hatfield
2007-06-04 15:48:11 +00:00
parent 77c5edc83c
commit 546eccf561
34 changed files with 1110 additions and 589 deletions

View File

@@ -1,119 +1,204 @@
html, body {
height: 100%;
overflow:hidden;
font-family: tahoma, sans-serif;
font-size: 11px;
color: #0073e6;
background: url("../images/taskpane/view_bg.gif") top;
height: 100%;
overflow: hidden;
font-family: tahoma, sans-serif;
font-size: 11px;
color: #0073e6;
background: url("../images/office/view_bg.gif") top;
}
body {margin:0px;padding:0px;}
body {
margin: 0px;
padding: 0px;
}
a {
color: #0073e6;
text-decoration: none;
}
a img {
border: 0px;
}
.bold {
font-weight: bold;
}
#tabBar {
float:left;
width:100%;
background:#d4eaff url("../images/taskpane/bg.gif") repeat-x bottom;
font-size:93%;
line-height:normal;
}
float: left;
width: 100%;
background: #efefef;
border-bottom: 1px solid #ccc;
}
#tabBar ul {
margin:0;
padding:10px 10px 0;
list-style:none;
}
#tabBar li {
float:left;
background:url("../images/taskpane/norm_left.gif") no-repeat left top;
margin:0;
padding:0 0 0 9px;
}
#tabBar a {
display:block;
background:url("../images/taskpane/norm_right.gif") no-repeat right top;
padding:5px 15px 4px 6px;
text-decoration:none;
font-weight:bold;
color:#765;
}
#tabBar a:hover {
color:#333;
}
#tabBar #current {
background-image:url("../images/taskpane/norm_left_on.gif");
}
#tabBar #current a {
background-image:url("../images/taskpane/norm_right_on.gif");
color:#333;
padding-bottom:5px;
}
margin: 0px;
padding: 4px 10px 0px 4px;
list-style: none;
}
#tabBar li {
display: inline;
margin: 0px;
padding: 0px;
}
#tabBar a {
background: url("../images/office/tab_left.gif") no-repeat left top;
float:left;
margin: 0px;
padding: 0px 0px 0px 4px;
text-decoration: none;
}
#tabBar a span {
background: url("../images/office/tab_right.gif") no-repeat right top;
color: #666;
display: block;
float: none;
padding: 5px 15px 4px 6px;
height: 18px;
}
#spaceListHeader {width:100%;
height:auto;
padding:6px;}
#tabBar a:hover span {
color: #FFF;
}
#tabBar a:hover {
background-position: 0% -42px;
}
#tabBar a:hover span {
background-position: 100% -42px;
}
#mycheckedoutdocsListHeader {width:100%;
height:auto;
padding:6px;}
#tabBar #current a {
background-position: 0% -42px;
}
#tabBar #current a span {
background-position: 100% -42px;
}
#mytodoListHeader {width:100%;
height:auto;
padding:6px;}
.header {
clear: both;
width: 282px;
padding: 6px 0px 2px 4px;
font-weight: bold;
float: left;
}
#contentListHeader {width:100%;
height:auto;padding:6px;}
.headerExtra {
font-weight: normal;
float: right;
margin-top: -13px;
}
#searchResultsListHeader {width:100%;
height:auto;padding:6px;}
.listBig {
clear: both;
float: left;
width: 282px;
height: 378px;
overflow: auto;
border: 1px solid #cccccc;
margin: 0px 4px 0px 4px;
background: #fff;
}
.listMedium {
clear: both;
float: left;
width: 282px;
height: 204px;
overflow: auto;
border: 1px solid #cccccc;
margin: 0px 4px 0px 4px;
background: #fff;
}
#detailsListHeader {width:100%;
height:auto;padding:6px;}
.listMediumGrow {
height: 354px !important;
}
.listMediumShrink {
height: 54px !important;
}
#versionListHeader {width:100%;
height:auto;padding:6px;}
.odd {
background-color: #f8f8f8 !important;
border-bottom: 1px solid #eee;
}
.even {
background-color: #ffffff !important;
border-bottom: 1px solid #eee;
}
#advWorkflowListHeader {width:100%;
height:auto;padding:6px;}
#currentSpaceInfo {
clear: both;
float: left;
width: 282px;
height: 34px;
overflow: none;
border: 1px solid #cccccc;
margin: 4px 4px 0px;
padding: 4px 0px 0px;
background: #fff;
}
#myTasksListHeader {width:100%;
height:auto;padding:6px;}
TABLE, TR, TD {
border: 0px;
border-collapse: collapse;
padding: 2px;
}
#simpleWorkflowHeader {width:100%;
height:auto;padding:6px;}
ul {
margin: 0px;
list-style: none;
padding: 2px 0px 0px 4px;
}
#currentSpaceInfo {width:100%;
padding: 6px}
#documentActions {
clear: both;
background-color: #ffffcc;
border: 1px solid #ccc;
float: left;
margin: 0px 4px;
height: 150px;
width: 282px;
}
#simpleWorkflowInfo {width:100%;
padding: 6px}
#documentActionsNavigation {
clear: both;
background-color: #ffffcc;
border: 1px solid #ccc;
float: left;
margin: 0px 4px;
height: 106px;
width: 282px;
}
#spaceList {width:97%;overflow:auto; border: 1px solid #cccccc;margin-left:6px;background:#fff;}
#mycheckedoutdocsList {width:97%;overflow:auto; border: 1px solid #cccccc;margin-left:6px;background:#fff;}
#mytodoList {width:97%;overflow:auto; border: 1px solid #cccccc;margin-left:6px;background:#fff;}
#contentList {width:97%;overflow:auto; border: 1px solid #cccccc;margin-left:6px;background:#fff;}
#searchResultsList {width:97%;overflow:auto; border: 1px solid #cccccc;margin-left:6px;background:#fff;}
#detailsList {width:97%;overflow:auto; border: 1px solid #cccccc;margin-left:6px;background:#fff;}
#versionList {width:97%;overflow:auto; border: 1px solid #cccccc;margin-left:6px;background:#fff;}
#advWorkflowList {width:97%;overflow:auto; border: 1px solid #cccccc;margin-left:6px;background:#fff;}
#myTasksList {width:97%;overflow:auto; border: 1px solid #cccccc;margin-left:6px;background:#fff;}
#nonStatusText {
min-height: 100%;
position: relative;
}
TABLE {border:0px;
padding:2px;}
#searchResultsList {
min-height: 100%;
position: relative;
}
A {color:#0073e6; }
#statusText {
border: none;
float: left;
margin: -22px 0px;
padding: 2px;
position: relative;
height: 17px;
width: 278px;
}
#bottomMargin {height:6px;}
#search {
clear: both;
float: left;
width: 282px;
border: 1px solid #cccccc;
margin: 0px 4px;
background: #fff;
}
#documentActions ul {
margin:0;
padding:10px 10px 0;
list-style:none;
}
#documentActions {width:97%;margin-left:6px;padding-top:6px;padding-bottom:6px;}
#search {padding: 24px 0px 0px 10px;}
input.button{
input.button {
color:#0073e6;
font-size:11px;
font-weight:bold;
@@ -124,7 +209,22 @@ input.button{
border-right-color:#0073e6;
border-bottom-color:#0073e6;
filter:progid:DXImageTransform.Microsoft.Gradient
(GradientType=0,StartColorStr='#ffffffff',EndColorStr='#6fb7ff');
(GradientType=0,StartColorStr='#ffffffff',EndColorStr='#6fb7ff');
cursor:pointer;
margin-left:6px;
}
}
#taskDetails {
padding: 2px;
}
.taskItemSelected {
background-color: #ffe500 !important;
}
.taskResources {
border: 1px solid #ccc;
margin: 4px;
height: 128px;
overflow: auto;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 278 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 374 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 394 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 970 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 278 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 595 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 377 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 B

View File

@@ -0,0 +1,98 @@
/*
* Prerequisites: mootools.v1.1.js
*/
var OfficeMyTasks =
{
init: function()
{
var tasks = $$('#taskList .taskItem');
tasks.each(function(task, i)
{
task.isOpen = false;
// register 'mouseenter' event for each task
task.addEvent('mouseenter', function(e)
{
if (task.isOpen)
return;
// highlight the item title
task.addClass('taskItemSelected');
// reset styles on all closed tasks
tasks.each(function(otherTask, j)
{
if ((otherTask != task) && (!otherTask.isOpen))
{
// reset selected class
otherTask.removeClass('taskItemSelected');
}
});
});
// register 'mouseleave' event for each task
task.addEvent('mouseleave', function(e)
{
if (task.isOpen)
return;
// unhighlight the item title
task.removeClass('taskItemSelected');
});
// register 'click' event for each task
task.addEvent('click', function(e)
{
if (!task.isOpen)
{
// open up this task
// flag this task as open
task.isOpen = true;
OfficeAddin.showStatusText("Loading task...", "ajax_anim.gif", false);
// ajax call to load task details
var actionURL = "/alfresco/service/office/myTasksDetail?t=" + task.id;
var myAjax = new Ajax(actionURL, {
method: 'get',
headers: {'If-Modified-Since': 'Sat, 1 Jan 2000 00:00:00 GMT'},
onComplete: function(textResponse, xmlResponse)
{
OfficeAddin.hideStatusText();
$("taskDetails").innerHTML = textResponse;
}
});
myAjax.request();
// close other open tasks
tasks.each(function(otherTask, j)
{
if (otherTask != task)
{
// close any other open tasks
otherTask.isOpen = false;
// unhighlight the item title
otherTask.removeClass('taskItemSelected');
}
});
}
});
});
$('taskList').addEvent('mouseleave', function(e)
{
// handler for mouse leaving the entire task list
tasks.each(function(task, i)
{
if (!task.isOpen)
{
task.removeClass('taskItemSelected');
}
});
});
}
};
window.addEvent('domready', OfficeMyTasks.init);

View File

@@ -0,0 +1,160 @@
/*
* Prerequisites: mootools.v1.1.js
*/
var OfficeAddin =
{
ANIM_LENGTH: 300,
STATUS_FADE: 10000,
LIST_DEF_HEIGHT: 204,
init: function()
{
this.queryObject = OfficeAddin.toQueryObject(document.location.search);
/* Update needed after page load? */
if(this.queryObject.st)
{
var objResponse = Json.evaluate(this.queryObject.st);
var imgSuccess = (objResponse.statusCode ? "action_successful.gif" : "action_failed.gif");
OfficeAddin.showStatusText(objResponse.statusString, imgSuccess, true);
}
/* Have search box? */
if ($("searchText"))
{
$("searchText").addEvent("keydown", function(event)
{
event = new Event(event);
if (event.key == 'enter')
{
$("simpleSearchButton").click();
}
});
}
/* Have expandos? */
if ($("toggleSpaceList"))
{
$("toggleSpaceList").addEvent("click", function()
{
$("spaceList").removeClass("listMediumShrink");
$("spaceList").addClass("listMediumGrow");
$("documentList").removeClass("listMediumGrow");
$("documentList").addClass("listMediumShrink");
});
$("toggleDocumentList").addEvent("click", function()
{
$("documentList").removeClass("listMediumShrink");
$("documentList").addClass("listMediumGrow");
$("spaceList").removeClass("listMediumGrow");
$("spaceList").addClass("listMediumShrink");
});
}
},
toQueryObject: function(s)
{
var obj = {};
$A(s.substring(1).split('&')).each(function(param)
{
param = decodeURIComponent(param).split("=");
obj[param[0]] = param[1];
});
return obj;
},
showStatusText: function(statusText, statusImage, fadeOut)
{
var e = $("statusText");
if (statusImage)
{
statusText = "<img src=\"../../images/office/" + statusImage + "\" alt=\"*\" style=\"padding-right: 8px;\" align=\"top\" />" + statusText;
}
e.innerHTML = statusText;
e.setStyle("opacity", "1");
if (statusText == "")
{
e.setStyle("border-top", "");
}
else
{
e.setStyle("border-top", "1px dashed #808080");
var fx = new Fx.Style(e, 'background-color',
{
duration: OfficeAddin.ANIM_LENGTH,
transition: Fx.Transitions.linear
});
if (fadeOut)
{
fx.onComplete = new function()
{
OfficeAddin.hideStatusText.delay(OfficeAddin.STATUS_FADE);
}
}
fx.start('#ffffcc', '#ffffff');
}
},
hideStatusText: function()
{
var e = $("statusText");
e.setStyle("opacity", "1");
var fx = new Fx.Style(e, 'opacity',
{
duration: OfficeAddin.ANIM_LENGTH
}).start('1', '0');
},
/* AJAX call to perform server-side actions */
runAction: function(useTemplate, Action, Doc, Msg)
{
if (Msg != "" && !confirm(Msg))
{
return;
}
OfficeAddin.showStatusText("Running action...", "ajax_anim.gif", false);
var actionURL = useTemplate + "?a=" + Action + "&d=" + Doc;
var myAjax = new Ajax(actionURL, {
method: 'get',
headers: {'If-Modified-Since': 'Sat, 1 Jan 2000 00:00:00 GMT'},
onComplete: function(textResponse, xmlResponse)
{
// Remove any trailing hash
var href = window.location.href.replace("#", "")
// Remove any previous "&st=" strings
href = href.replace(/[?&]st=([^&$]+)/g, "");
// Optionally add a status string
if (textResponse != "")
{
href += "&st=" + encodeURI(textResponse);
}
window.location.href = href;
}
});
myAjax.request();
},
/* AJAX call to perform server-side search */
runSearch: function(useTemplate, argPath)
{
OfficeAddin.showStatusText("Searching...", "ajax_anim.gif", false);
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'},
onComplete: function(textResponse, xmlResponse)
{
OfficeAddin.hideStatusText();
$("searchResultsList").innerHTML = textResponse;
}
});
myAjax.request();
}
};
window.addEvent('domready', OfficeAddin.init);