Point check-in of the Office 2003 Add-in. Currently only Word has been developed - Excel is just a bare framework. To test, use installer provided in AlfrescoWord2003Setup\Debug and check the README in the templates folder.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5787 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
130
source/web/css/office.css
Normal file
@@ -0,0 +1,130 @@
|
||||
html, body {
|
||||
height: 100%;
|
||||
overflow:hidden;
|
||||
font-family: tahoma, sans-serif;
|
||||
font-size: 11px;
|
||||
color: #0073e6;
|
||||
background: url("../images/taskpane/view_bg.gif") top;
|
||||
}
|
||||
|
||||
body {margin:0px;padding:0px;}
|
||||
|
||||
#tabBar {
|
||||
float:left;
|
||||
width:100%;
|
||||
background:#d4eaff url("../images/taskpane/bg.gif") repeat-x bottom;
|
||||
font-size:93%;
|
||||
line-height:normal;
|
||||
}
|
||||
#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;
|
||||
}
|
||||
|
||||
#spaceListHeader {width:100%;
|
||||
height:auto;
|
||||
padding:6px;}
|
||||
|
||||
#mycheckedoutdocsListHeader {width:100%;
|
||||
height:auto;
|
||||
padding:6px;}
|
||||
|
||||
#mytodoListHeader {width:100%;
|
||||
height:auto;
|
||||
padding:6px;}
|
||||
|
||||
#contentListHeader {width:100%;
|
||||
height:auto;padding:6px;}
|
||||
|
||||
#searchResultsListHeader {width:100%;
|
||||
height:auto;padding:6px;}
|
||||
|
||||
#detailsListHeader {width:100%;
|
||||
height:auto;padding:6px;}
|
||||
|
||||
#versionListHeader {width:100%;
|
||||
height:auto;padding:6px;}
|
||||
|
||||
#advWorkflowListHeader {width:100%;
|
||||
height:auto;padding:6px;}
|
||||
|
||||
#myTasksListHeader {width:100%;
|
||||
height:auto;padding:6px;}
|
||||
|
||||
#simpleWorkflowHeader {width:100%;
|
||||
height:auto;padding:6px;}
|
||||
|
||||
#currentSpaceInfo {width:100%;
|
||||
padding: 6px}
|
||||
|
||||
#simpleWorkflowInfo {width:100%;
|
||||
padding: 6px}
|
||||
|
||||
#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;}
|
||||
|
||||
TABLE {border:0px;
|
||||
padding:2px;}
|
||||
|
||||
A {color:#0073e6; }
|
||||
|
||||
#bottomMargin {height:6px;}
|
||||
|
||||
#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{
|
||||
color:#0073e6;
|
||||
font-size:11px;
|
||||
font-weight:bold;
|
||||
background-color:#cce6ff;
|
||||
border:1px solid;
|
||||
border-top-color:#0073e6;
|
||||
border-left-color:#0073e6;
|
||||
border-right-color:#0073e6;
|
||||
border-bottom-color:#0073e6;
|
||||
filter:progid:DXImageTransform.Microsoft.Gradient
|
||||
(GradientType=0,StartColorStr='#ffffffff',EndColorStr='#6fb7ff');
|
||||
cursor:pointer;
|
||||
margin-left:6px;
|
||||
}
|
BIN
source/web/images/office/add_aspect.gif
Normal file
After Width: | Height: | Size: 625 B |
BIN
source/web/images/office/approve.gif
Normal file
After Width: | Height: | Size: 625 B |
BIN
source/web/images/office/arrow_down.gif
Normal file
After Width: | Height: | Size: 180 B |
BIN
source/web/images/office/arrow_up.gif
Normal file
After Width: | Height: | Size: 186 B |
BIN
source/web/images/office/bg.gif
Normal file
After Width: | Height: | Size: 502 B |
BIN
source/web/images/office/checkin.gif
Normal file
After Width: | Height: | Size: 332 B |
BIN
source/web/images/office/checkout.gif
Normal file
After Width: | Height: | Size: 540 B |
BIN
source/web/images/office/delete.gif
Normal file
After Width: | Height: | Size: 577 B |
BIN
source/web/images/office/document.gif
Normal file
After Width: | Height: | Size: 633 B |
BIN
source/web/images/office/document_details.gif
Normal file
After Width: | Height: | Size: 565 B |
BIN
source/web/images/office/edit_properties.gif
Normal file
After Width: | Height: | Size: 625 B |
BIN
source/web/images/office/folder_large.gif
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
source/web/images/office/go_up.gif
Normal file
After Width: | Height: | Size: 569 B |
BIN
source/web/images/office/lock.gif
Normal file
After Width: | Height: | Size: 605 B |
BIN
source/web/images/office/makepdf.gif
Normal file
After Width: | Height: | Size: 592 B |
BIN
source/web/images/office/my_alfresco.gif
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
source/web/images/office/navigator.gif
Normal file
After Width: | Height: | Size: 574 B |
BIN
source/web/images/office/norm_left.gif
Normal file
After Width: | Height: | Size: 391 B |
BIN
source/web/images/office/norm_left_on.gif
Normal file
After Width: | Height: | Size: 346 B |
BIN
source/web/images/office/norm_right.gif
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
source/web/images/office/norm_right_on.gif
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
source/web/images/office/placeholder.gif
Normal file
After Width: | Height: | Size: 625 B |
BIN
source/web/images/office/reject.gif
Normal file
After Width: | Height: | Size: 625 B |
BIN
source/web/images/office/run_script.gif
Normal file
After Width: | Height: | Size: 625 B |
BIN
source/web/images/office/save_to_alfresco.gif
Normal file
After Width: | Height: | Size: 998 B |
BIN
source/web/images/office/search.gif
Normal file
After Width: | Height: | Size: 561 B |
BIN
source/web/images/office/space.gif
Normal file
After Width: | Height: | Size: 628 B |
BIN
source/web/images/office/start_workflow.gif
Normal file
After Width: | Height: | Size: 625 B |
BIN
source/web/images/office/task.gif
Normal file
After Width: | Height: | Size: 585 B |
BIN
source/web/images/office/update.gif
Normal file
After Width: | Height: | Size: 625 B |
BIN
source/web/images/office/version_history.gif
Normal file
After Width: | Height: | Size: 312 B |
BIN
source/web/images/office/view_bg.gif
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
source/web/images/office/workflow.gif
Normal file
After Width: | Height: | Size: 344 B |
110
source/web/scripts/office/doc_details.js
Normal file
@@ -0,0 +1,110 @@
|
||||
var xmlHttp
|
||||
|
||||
function showStatus(url)
|
||||
{
|
||||
xmlHttp=GetXmlHttpObject()
|
||||
if (xmlHttp==null)
|
||||
{
|
||||
alert ("Browser does not support HTTP Request")
|
||||
return
|
||||
}
|
||||
xmlHttp.onreadystatechange=stateChanged
|
||||
xmlHttp.open("GET",url,true)
|
||||
xmlHttp.send(null)
|
||||
}
|
||||
|
||||
function stateChanged()
|
||||
{
|
||||
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
|
||||
{
|
||||
document.getElementById("statusArea").innerHTML=xmlHttp.responseText
|
||||
window.location.reload();
|
||||
}
|
||||
}
|
||||
|
||||
function GetXmlHttpObject()
|
||||
{
|
||||
var objXMLHttp = null;
|
||||
if (window.XMLHttpRequest)
|
||||
{
|
||||
objXMLHttp=new XMLHttpRequest();
|
||||
}
|
||||
else if (window.ActiveXObject)
|
||||
{
|
||||
objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP");
|
||||
}
|
||||
return objXMLHttp;
|
||||
}
|
||||
|
||||
function runAction(useTemplate, Action, Doc, Msg)
|
||||
{
|
||||
if (Msg != "" && !confirm(Msg))
|
||||
{
|
||||
return;
|
||||
}
|
||||
document.getElementById("statusArea").innerHTML="Running action...";
|
||||
showStatus("/alfresco/command/script/execute/workspace/SpacesStore/" + useTemplate + "/workspace/SpacesStore/" + Doc + "?action=" + Action);
|
||||
}
|
||||
|
||||
|
||||
function getWindowHeight()
|
||||
{
|
||||
var windowHeight = 0;
|
||||
if (typeof(window.innerHeight) == 'number')
|
||||
{
|
||||
windowHeight = window.innerHeight;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (document.documentElement && document.documentElement.clientHeight)
|
||||
{
|
||||
windowHeight = document.documentElement.clientHeight;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (document.body && document.body.clientHeight)
|
||||
{
|
||||
windowHeight = document.body.clientHeight;
|
||||
}
|
||||
}
|
||||
}
|
||||
return windowHeight;
|
||||
}
|
||||
|
||||
function setContent()
|
||||
{
|
||||
if (document.getElementById)
|
||||
{
|
||||
var windowHeight = getWindowHeight();
|
||||
if (windowHeight > 0)
|
||||
{
|
||||
var detailsListHeaderElement = document.getElementById('detailsListHeader');
|
||||
var detailsListElement = document.getElementById('detailsList');
|
||||
var tabBarElement = document.getElementById('tabBar');
|
||||
var bottomMarginElement = document.getElementById('bottomMargin');
|
||||
var documentActionsElement = document.getElementById('documentActions');
|
||||
|
||||
var detailsListHeight = detailsListElement.offsetHeight;
|
||||
var detailsListHeaderHeight = detailsListHeaderElement.offsetHeight;
|
||||
var tabBarHeight = tabBarElement.offsetHeight;
|
||||
var bottomMarginHeight = bottomMarginElement.offsetHeight;
|
||||
var documentActionsHeight = documentActionsElement.offsetHeight;
|
||||
|
||||
if (windowHeight > 0)
|
||||
{
|
||||
detailsListElement.style.height = ((windowHeight- (tabBarHeight + detailsListHeaderHeight + documentActionsHeight + bottomMarginHeight)) /3) * 2 + 'px';
|
||||
documentActionsElement.style.height = (windowHeight- (tabBarHeight + detailsListHeaderHeight + documentActionsHeight + bottomMarginHeight)) /3 + 'px';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
window.onload = function()
|
||||
{
|
||||
setContent();
|
||||
}
|
||||
|
||||
window.onresize = function()
|
||||
{
|
||||
setContent();
|
||||
}
|
182
source/web/scripts/office/my_alfresco.js
Normal file
@@ -0,0 +1,182 @@
|
||||
var xmlHttp
|
||||
|
||||
function GetXmlHttpObject()
|
||||
{
|
||||
var objXMLHttp=null;
|
||||
if (window.XMLHttpRequest)
|
||||
{
|
||||
objXMLHttp=new XMLHttpRequest()
|
||||
}
|
||||
else if (window.ActiveXObject)
|
||||
{
|
||||
objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
|
||||
}
|
||||
|
||||
return objXMLHttp;
|
||||
}
|
||||
|
||||
function showStatus(url)
|
||||
{
|
||||
xmlHttp=GetXmlHttpObject();
|
||||
if (xmlHttp==null)
|
||||
{
|
||||
alert("Browser does not support HTTP Request");
|
||||
return;
|
||||
}
|
||||
xmlHttp.onreadystatechange=stateChanged;
|
||||
xmlHttp.open("GET",url+"&sid="+Math.random(),true);
|
||||
xmlHttp.send(null);
|
||||
}
|
||||
|
||||
function stateChanged()
|
||||
{
|
||||
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
|
||||
{
|
||||
if (xmlHttp.responseText.indexOf("System Error") > 0)
|
||||
{
|
||||
var myWindow = window.open("", "_blank", "scrollbars,height=500,width=400");
|
||||
myWindow.document.write(xmlHttp.responseText);
|
||||
document.getElementById("statusArea").innerHTML="";
|
||||
}
|
||||
else
|
||||
{
|
||||
document.getElementById("statusArea").innerHTML=xmlHttp.responseText;
|
||||
window.location.reload();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function runAction(Action, Doc, Msg)
|
||||
{
|
||||
if (Msg != "" && !confirm(Msg))
|
||||
{
|
||||
return;
|
||||
}
|
||||
document.getElementById("statusArea").innerHTML="Running action...";
|
||||
showStatus("/alfresco/command/script/execute/workspace/SpacesStore/${doc_actions}/workspace/SpacesStore/" + Doc + "?action=" + Action);
|
||||
}
|
||||
|
||||
|
||||
function getWindowHeight() {
|
||||
var windowHeight = 0;
|
||||
if (typeof(window.innerHeight) == 'number') {
|
||||
windowHeight = window.innerHeight;
|
||||
}
|
||||
else {
|
||||
if (document.documentElement && document.documentElement.clientHeight) {
|
||||
windowHeight = document.documentElement.clientHeight;
|
||||
}
|
||||
else {
|
||||
if (document.body && document.body.clientHeight) {
|
||||
windowHeight = document.body.clientHeight;
|
||||
}
|
||||
}
|
||||
}
|
||||
return windowHeight;
|
||||
}
|
||||
function setContent() {
|
||||
if (document.getElementById) {
|
||||
var windowHeight = getWindowHeight();
|
||||
if (windowHeight > 0) {
|
||||
var mycheckedoutdocsListElement = document.getElementById('mycheckedoutdocsList');
|
||||
var mytodoListElement = document.getElementById('mytodoList');
|
||||
var tabBarElement = document.getElementById('tabBar');
|
||||
var mycheckedoutdocsListHeaderElement = document.getElementById('mycheckedoutdocsListHeader');
|
||||
var mytodoListHeaderElement = document.getElementById('mytodoListHeader');
|
||||
var bottomMarginElement = document.getElementById('bottomMargin');
|
||||
var documentActionsElement = document.getElementById('documentActions');
|
||||
|
||||
var mycheckedoutdocsListHeight = mycheckedoutdocsListElement.offsetHeight;
|
||||
var mytodoListHeight = mytodoListElement.offsetHeight;
|
||||
var tabBarHeight = tabBarElement.offsetHeight;
|
||||
var mycheckedoutdocsListHeaderHeight = mycheckedoutdocsListHeaderElement.offsetHeight;
|
||||
var mytodoListHeaderHeight = mytodoListHeaderElement.offsetHeight;
|
||||
var bottomMarginHeight = bottomMarginElement.offsetHeight;
|
||||
var documentActionsHeight = documentActionsElement.offsetHeight;
|
||||
|
||||
if (windowHeight > 0) {
|
||||
mycheckedoutdocsListElement.style.height = (windowHeight- (tabBarHeight + mytodoListHeaderHeight + mycheckedoutdocsListHeaderHeight + documentActionsHeight + bottomMarginHeight)) /2 + 'px';
|
||||
mytodoListElement.style.height = (windowHeight- (tabBarHeight + mytodoListHeaderHeight + mycheckedoutdocsListHeaderHeight + documentActionsHeight + bottomMarginHeight)) /2 + 'px';
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
window.onload = function() {
|
||||
setContent();
|
||||
stripe('mytodoList', '#fff', '#f6f8fa');
|
||||
stripe('mycheckedoutdocsList', '#fff', '#f6f8fa');
|
||||
}
|
||||
window.onresize = function() {
|
||||
setContent();
|
||||
}
|
||||
|
||||
|
||||
|
||||
// this function is need to work around
|
||||
// a bug in IE related to element attributes
|
||||
function hasClass(obj) {
|
||||
var result = false;
|
||||
if (obj.getAttributeNode("class") != null) {
|
||||
result = obj.getAttributeNode("class").value;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
function stripe(id) {
|
||||
|
||||
// the flag we'll use to keep track of
|
||||
// whether the current row is odd or even
|
||||
var even = false;
|
||||
|
||||
// if arguments are provided to specify the colours
|
||||
// of the even & odd rows, then use the them;
|
||||
// otherwise use the following defaults:
|
||||
var evenColor = arguments[1] ? arguments[1] : "#fff";
|
||||
var oddColor = arguments[2] ? arguments[2] : "#eee";
|
||||
|
||||
// obtain a reference to the desired table
|
||||
// if no such table exists, abort
|
||||
var table = document.getElementById(id);
|
||||
if (! table) { return; }
|
||||
|
||||
// by definition, tables can have more than one tbody
|
||||
// element, so we'll have to get the list of child
|
||||
// <tbody>s
|
||||
var tbodies = table.getElementsByTagName("tbody");
|
||||
|
||||
// and iterate through them...
|
||||
for (var h = 0; h < tbodies.length; h++) {
|
||||
|
||||
// find all the <tr> elements...
|
||||
var trs = tbodies[h].getElementsByTagName("tr");
|
||||
|
||||
// ... and iterate through them
|
||||
for (var i = 0; i < trs.length; i++) {
|
||||
|
||||
// avoid rows that have a class attribute
|
||||
// or backgroundColor style
|
||||
if (!hasClass(trs[i]) && ! trs[i].style.backgroundColor) {
|
||||
|
||||
// get all the cells in this row...
|
||||
var tds = trs[i].getElementsByTagName("td");
|
||||
|
||||
// and iterate through them...
|
||||
for (var j = 0; j < tds.length; j++) {
|
||||
|
||||
var mytd = tds[j];
|
||||
|
||||
// avoid cells that have a class attribute
|
||||
// or backgroundColor style
|
||||
if (! hasClass(mytd) && ! mytd.style.backgroundColor) {
|
||||
|
||||
mytd.style.backgroundColor = even ? evenColor : oddColor;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
// flip from odd to even, or vice-versa
|
||||
even = ! even;
|
||||
}
|
||||
}
|
||||
}
|
187
source/web/scripts/office/navigation.js
Normal file
@@ -0,0 +1,187 @@
|
||||
|
||||
var xmlHttp
|
||||
|
||||
function GetXmlHttpObject()
|
||||
{
|
||||
var objXMLHttp=null;
|
||||
if (window.XMLHttpRequest)
|
||||
{
|
||||
objXMLHttp=new XMLHttpRequest()
|
||||
}
|
||||
else if (window.ActiveXObject)
|
||||
{
|
||||
objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
|
||||
}
|
||||
|
||||
return objXMLHttp;
|
||||
}
|
||||
|
||||
function showStatus(url)
|
||||
{
|
||||
xmlHttp=GetXmlHttpObject();
|
||||
if (xmlHttp==null)
|
||||
{
|
||||
alert("Browser does not support HTTP Request");
|
||||
return;
|
||||
}
|
||||
xmlHttp.onreadystatechange=stateChanged;
|
||||
xmlHttp.open("GET",url+"&sid="+Math.random(),true);
|
||||
xmlHttp.send(null);
|
||||
}
|
||||
|
||||
function stateChanged()
|
||||
{
|
||||
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
|
||||
{
|
||||
if (xmlHttp.responseText.indexOf("System Error") > 0)
|
||||
{
|
||||
var myWindow = window.open("", "_blank", "scrollbars,height=500,width=400");
|
||||
myWindow.document.write(xmlHttp.responseText);
|
||||
document.getElementById("statusArea").innerHTML="";
|
||||
}
|
||||
else
|
||||
{
|
||||
document.getElementById("statusArea").innerHTML=xmlHttp.responseText;
|
||||
window.location.reload();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
function runAction(useTemplate, Action, Doc, Msg)
|
||||
{
|
||||
if (Msg != "" && !confirm(Msg))
|
||||
{
|
||||
return;
|
||||
}
|
||||
document.getElementById("statusArea").innerHTML="Running action...";
|
||||
showStatus("/alfresco/command/script/execute/workspace/SpacesStore/" + useTemplate + "/workspace/SpacesStore/" + Doc + "?action=" + Action);
|
||||
}
|
||||
|
||||
function getWindowHeight() {
|
||||
var windowHeight = 0;
|
||||
if (typeof(window.innerHeight) == 'number') {
|
||||
windowHeight = window.innerHeight;
|
||||
}
|
||||
else {
|
||||
if (document.documentElement && document.documentElement.clientHeight) {
|
||||
windowHeight = document.documentElement.clientHeight;
|
||||
}
|
||||
else {
|
||||
if (document.body && document.body.clientHeight) {
|
||||
windowHeight = document.body.clientHeight;
|
||||
}
|
||||
}
|
||||
}
|
||||
return windowHeight;
|
||||
}
|
||||
function setContent() {
|
||||
if (document.getElementById) {
|
||||
var windowHeight = getWindowHeight();
|
||||
if (windowHeight > 0) {
|
||||
var spaceListElement = document.getElementById('spaceList');
|
||||
var contentListElement = document.getElementById('contentList');
|
||||
var tabBarElement = document.getElementById('tabBar');
|
||||
var currentSpaceInfoElement = document.getElementById('currentSpaceInfo');
|
||||
var spaceListHeaderElement = document.getElementById('spaceListHeader');
|
||||
var contentListHeaderElement = document.getElementById('contentListHeader');
|
||||
var bottomMarginElement = document.getElementById('bottomMargin');
|
||||
var documentActionsElement = document.getElementById('documentActions');
|
||||
|
||||
var spaceListHeight = spaceListElement.offsetHeight;
|
||||
var contentListHeight = contentListElement.offsetHeight;
|
||||
var tabBarHeight = tabBarElement.offsetHeight;
|
||||
var currentSpaceInfoHeight = currentSpaceInfoElement.offsetHeight;
|
||||
var spaceListHeaderHeight = spaceListHeaderElement.offsetHeight;
|
||||
var contentListHeaderHeight = contentListHeaderElement.offsetHeight;
|
||||
var bottomMarginHeight = bottomMarginElement.offsetHeight;
|
||||
var documentActionsHeight = documentActionsElement.offsetHeight;
|
||||
|
||||
if (windowHeight > 0) {
|
||||
spaceListElement.style.height = (windowHeight- (tabBarHeight + currentSpaceInfoHeight + spaceListHeaderHeight + contentListHeaderHeight + documentActionsHeight + bottomMarginHeight)) /2 + 'px';
|
||||
contentListElement.style.height = (windowHeight- (tabBarHeight + currentSpaceInfoHeight + spaceListHeaderHeight + contentListHeaderHeight + documentActionsHeight + bottomMarginHeight)) /2 + 'px';
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
window.onload = function() {
|
||||
setContent();
|
||||
stripe('spaceList', '#fff', '#f6f8fa');
|
||||
stripe('contentList', '#fff', '#f6f8fa');
|
||||
}
|
||||
window.onresize = function() {
|
||||
setContent();
|
||||
}
|
||||
|
||||
|
||||
|
||||
// this function is need to work around
|
||||
// a bug in IE related to element attributes
|
||||
function hasClass(obj) {
|
||||
var result = false;
|
||||
if (obj.getAttributeNode("class") != null) {
|
||||
result = obj.getAttributeNode("class").value;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
function stripe(id) {
|
||||
|
||||
// the flag we'll use to keep track of
|
||||
// whether the current row is odd or even
|
||||
var even = false;
|
||||
|
||||
// if arguments are provided to specify the colours
|
||||
// of the even & odd rows, then use the them;
|
||||
// otherwise use the following defaults:
|
||||
var evenColor = arguments[1] ? arguments[1] : "#fff";
|
||||
var oddColor = arguments[2] ? arguments[2] : "#eee";
|
||||
|
||||
// obtain a reference to the desired table
|
||||
// if no such table exists, abort
|
||||
var table = document.getElementById(id);
|
||||
if (! table) { return; }
|
||||
|
||||
// by definition, tables can have more than one tbody
|
||||
// element, so we'll have to get the list of child
|
||||
// <tbody>s
|
||||
var tbodies = table.getElementsByTagName("tbody");
|
||||
|
||||
// and iterate through them...
|
||||
for (var h = 0; h < tbodies.length; h++) {
|
||||
|
||||
// find all the <tr> elements...
|
||||
var trs = tbodies[h].getElementsByTagName("tr");
|
||||
|
||||
// ... and iterate through them
|
||||
for (var i = 0; i < trs.length; i++) {
|
||||
|
||||
// avoid rows that have a class attribute
|
||||
// or backgroundColor style
|
||||
if (!hasClass(trs[i]) && ! trs[i].style.backgroundColor) {
|
||||
|
||||
// get all the cells in this row...
|
||||
var tds = trs[i].getElementsByTagName("td");
|
||||
|
||||
// and iterate through them...
|
||||
for (var j = 0; j < tds.length; j++) {
|
||||
|
||||
var mytd = tds[j];
|
||||
|
||||
// avoid cells that have a class attribute
|
||||
// or backgroundColor style
|
||||
if (! hasClass(mytd) && ! mytd.style.backgroundColor) {
|
||||
|
||||
mytd.style.backgroundColor = even ? evenColor : oddColor;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
// flip from odd to even, or vice-versa
|
||||
even = ! even;
|
||||
}
|
||||
}
|
||||
}
|
203
source/web/scripts/office/search.js
Normal file
@@ -0,0 +1,203 @@
|
||||
var xmlHttp
|
||||
|
||||
function GetXmlHttpObject()
|
||||
{
|
||||
var objXMLHttp=null;
|
||||
if (window.XMLHttpRequest)
|
||||
{
|
||||
objXMLHttp=new XMLHttpRequest()
|
||||
}
|
||||
else if (window.ActiveXObject)
|
||||
{
|
||||
objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
|
||||
}
|
||||
|
||||
return objXMLHttp;
|
||||
}
|
||||
|
||||
function showStatus(url)
|
||||
{
|
||||
// alert(url);
|
||||
xmlHttp=GetXmlHttpObject();
|
||||
if (xmlHttp==null)
|
||||
{
|
||||
alert("Browser does not support HTTP Request");
|
||||
return;
|
||||
}
|
||||
xmlHttp.onreadystatechange=stateChanged;
|
||||
xmlHttp.open("GET",url+"&sid="+Math.random(),true);
|
||||
xmlHttp.send(null);
|
||||
}
|
||||
|
||||
function stateChanged()
|
||||
{
|
||||
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
|
||||
{
|
||||
if (xmlHttp.responseText.indexOf("System Error") > 0)
|
||||
{
|
||||
var myWindow = window.open("", "_blank", "scrollbars,height=500,width=400");
|
||||
myWindow.document.write(xmlHttp.responseText);
|
||||
}
|
||||
else
|
||||
{
|
||||
document.getElementById("searchResultsList").innerHTML=xmlHttp.responseText;
|
||||
stripe('searchResultsList', '#fff', '#f6f8fa');
|
||||
}
|
||||
document.getElementById("statusArea").innerHTML="";
|
||||
}
|
||||
}
|
||||
|
||||
function runSearch(useTemplate)
|
||||
{
|
||||
document.getElementById("statusArea").innerHTML="Searching...";
|
||||
searchString = document.getElementById("searchText").value;
|
||||
maxcount = document.getElementById("maxresults").value;
|
||||
doSearch(useTemplate, searchString, maxcount);
|
||||
}
|
||||
|
||||
function doSearch(useTemplate, searchString, maxcount)
|
||||
{
|
||||
showStatus("/alfresco/template/workspace/SpacesStore/"+ useTemplate + "/workspace/SpacesStore/" + useTemplate + "?search=" + searchString + "&maxresults=" + maxcount);
|
||||
}
|
||||
|
||||
function handleTextEnter(e) {
|
||||
var keycode;
|
||||
|
||||
// get the keycode
|
||||
if (window.event)
|
||||
{
|
||||
keycode = window.event.keyCode;
|
||||
}
|
||||
else if (e)
|
||||
{
|
||||
keycode = e.which;
|
||||
}
|
||||
// if ENTER was pressed execute the query
|
||||
if (keycode == 13)
|
||||
{
|
||||
runSearch();
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
function getWindowHeight() {
|
||||
var windowHeight = 0;
|
||||
if (typeof(window.innerHeight) == 'number') {
|
||||
windowHeight = window.innerHeight;
|
||||
}
|
||||
else {
|
||||
if (document.documentElement && document.documentElement.clientHeight) {
|
||||
windowHeight = document.documentElement.clientHeight;
|
||||
}
|
||||
else {
|
||||
if (document.body && document.body.clientHeight) {
|
||||
windowHeight = document.body.clientHeight;
|
||||
}
|
||||
}
|
||||
}
|
||||
return windowHeight;
|
||||
}
|
||||
|
||||
function setContent() {
|
||||
if (document.getElementById) {
|
||||
var windowHeight = getWindowHeight();
|
||||
if (windowHeight > 0) {
|
||||
|
||||
var tabBarElement = document.getElementById('tabBar');
|
||||
var bottomMarginElement = document.getElementById('bottomMargin');
|
||||
var searchResultsListElement = document.getElementById('searchResultsList');
|
||||
var searchHeightElement = document.getElementById('search');
|
||||
var searchResultsListHeaderElement = document.getElementById('searchResultsListHeader');
|
||||
|
||||
var tabBarHeight = tabBarElement.offsetHeight;
|
||||
var bottomMarginHeight = bottomMarginElement.offsetHeight;
|
||||
var searchResultsListHeight = searchResultsListElement.offsetHeight;
|
||||
var searchHeight = searchHeightElement.offsetHeight;
|
||||
var searchResultsListHeaderHeight = searchResultsListHeaderElement.offsetHeight;
|
||||
|
||||
if (windowHeight > 0) {
|
||||
searchResultsListElement.style.height = windowHeight- (tabBarHeight + searchHeight + searchResultsListHeaderHeight + bottomMarginHeight) + 'px';
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
window.onload = function() {
|
||||
setContent();
|
||||
stripe('searchResultsList', '#fff', '#f6f8fa');
|
||||
}
|
||||
window.onresize = function() {
|
||||
setContent();
|
||||
}
|
||||
|
||||
|
||||
// this function is need to work around
|
||||
// a bug in IE related to element attributes
|
||||
function hasClass(obj) {
|
||||
var result = false;
|
||||
if (obj.getAttributeNode("class") != null) {
|
||||
result = obj.getAttributeNode("class").value;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
function stripe(id) {
|
||||
|
||||
// the flag we'll use to keep track of
|
||||
// whether the current row is odd or even
|
||||
var even = false;
|
||||
|
||||
// if arguments are provided to specify the colours
|
||||
// of the even & odd rows, then use the them;
|
||||
// otherwise use the following defaults:
|
||||
var evenColor = arguments[1] ? arguments[1] : "#fff";
|
||||
var oddColor = arguments[2] ? arguments[2] : "#eee";
|
||||
|
||||
// obtain a reference to the desired table
|
||||
// if no such table exists, abort
|
||||
var table = document.getElementById(id);
|
||||
if (! table) { return; }
|
||||
|
||||
// by definition, tables can have more than one tbody
|
||||
// element, so we'll have to get the list of child
|
||||
// <tbody>s
|
||||
var tbodies = table.getElementsByTagName("tbody");
|
||||
|
||||
// and iterate through them...
|
||||
for (var h = 0; h < tbodies.length; h++) {
|
||||
|
||||
// find all the <tr> elements...
|
||||
var trs = tbodies[h].getElementsByTagName("tr");
|
||||
|
||||
// ... and iterate through them
|
||||
for (var i = 0; i < trs.length; i++) {
|
||||
|
||||
// avoid rows that have a class attribute
|
||||
// or backgroundColor style
|
||||
if (!hasClass(trs[i]) && ! trs[i].style.backgroundColor) {
|
||||
|
||||
// get all the cells in this row...
|
||||
var tds = trs[i].getElementsByTagName("td");
|
||||
|
||||
// and iterate through them...
|
||||
for (var j = 0; j < tds.length; j++) {
|
||||
|
||||
var mytd = tds[j];
|
||||
|
||||
// avoid cells that have a class attribute
|
||||
// or backgroundColor style
|
||||
if (! hasClass(mytd) && ! mytd.style.backgroundColor) {
|
||||
|
||||
mytd.style.backgroundColor = even ? evenColor : oddColor;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
// flip from odd to even, or vice-versa
|
||||
even = ! even;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
173
source/web/scripts/office/version.js
Normal file
@@ -0,0 +1,173 @@
|
||||
var xmlHttp
|
||||
|
||||
function GetXmlHttpObject()
|
||||
{
|
||||
var objXMLHttp=null;
|
||||
if (window.XMLHttpRequest)
|
||||
{
|
||||
objXMLHttp=new XMLHttpRequest()
|
||||
}
|
||||
else if (window.ActiveXObject)
|
||||
{
|
||||
objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
|
||||
}
|
||||
|
||||
return objXMLHttp;
|
||||
}
|
||||
|
||||
function showStatus(url)
|
||||
{
|
||||
xmlHttp=GetXmlHttpObject();
|
||||
if (xmlHttp==null)
|
||||
{
|
||||
alert("Browser does not support HTTP Request");
|
||||
return;
|
||||
}
|
||||
xmlHttp.onreadystatechange=stateChanged;
|
||||
xmlHttp.open("GET",url+"&sid="+Math.random(),true);
|
||||
xmlHttp.send(null);
|
||||
}
|
||||
|
||||
function stateChanged()
|
||||
{
|
||||
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
|
||||
{
|
||||
if (xmlHttp.responseText.indexOf("System Error") > 0)
|
||||
{
|
||||
var myWindow = window.open("", "_blank", "scrollbars,height=500,width=400");
|
||||
myWindow.document.write(xmlHttp.responseText);
|
||||
document.getElementById("statusArea").innerHTML="";
|
||||
}
|
||||
else
|
||||
{
|
||||
document.getElementById("statusArea").innerHTML=xmlHttp.responseText;
|
||||
window.location.reload();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function runAction(useTemplate, Action, Doc, Msg)
|
||||
{
|
||||
if (Msg != "" && !confirm(Msg))
|
||||
{
|
||||
return;
|
||||
}
|
||||
document.getElementById("statusArea").innerHTML="Running action...";
|
||||
showStatus("/alfresco/command/script/execute/workspace/SpacesStore/" + useTemplate + "/workspace/SpacesStore/" + Doc + "?action=" + Action);
|
||||
}
|
||||
|
||||
|
||||
function getWindowHeight() {
|
||||
var windowHeight = 0;
|
||||
if (typeof(window.innerHeight) == 'number') {
|
||||
windowHeight = window.innerHeight;
|
||||
}
|
||||
else {
|
||||
if (document.documentElement && document.documentElement.clientHeight) {
|
||||
windowHeight = document.documentElement.clientHeight;
|
||||
}
|
||||
else {
|
||||
if (document.body && document.body.clientHeight) {
|
||||
windowHeight = document.body.clientHeight;
|
||||
}
|
||||
}
|
||||
}
|
||||
return windowHeight;
|
||||
}
|
||||
function setContent() {
|
||||
if (document.getElementById) {
|
||||
var windowHeight = getWindowHeight();
|
||||
if (windowHeight > 0) {
|
||||
var versionListHeaderElement = document.getElementById('versionListheader');
|
||||
var versionListElement = document.getElementById('versionList');
|
||||
var tabBarElement = document.getElementById('tabBar');
|
||||
var bottomMarginElement = document.getElementById('bottomMargin');
|
||||
|
||||
var versionListHeight = versionListElement.offsetHeight;
|
||||
var versionListHeaderHeight = versionListHeaderElement.offsetHeight;
|
||||
var tabBarHeight = tabBarElement.offsetHeight;
|
||||
var bottomMarginHeight = bottomMarginElement.offsetHeight;
|
||||
|
||||
if (windowHeight > 0) {
|
||||
versionListElement.style.height = (windowHeight- (tabBarHeight + versionListHeaderHeight + bottomMarginHeight)) + 'px';
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
window.onload = function() {
|
||||
setContent();
|
||||
stripe('versionList', '#fff', '#f6f8fa');
|
||||
}
|
||||
window.onresize = function() {
|
||||
setContent();
|
||||
}
|
||||
|
||||
|
||||
// this function is need to work around
|
||||
// a bug in IE related to element attributes
|
||||
function hasClass(obj) {
|
||||
var result = false;
|
||||
if (obj.getAttributeNode("class") != null) {
|
||||
result = obj.getAttributeNode("class").value;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
function stripe(id) {
|
||||
|
||||
// the flag we'll use to keep track of
|
||||
// whether the current row is odd or even
|
||||
var even = false;
|
||||
|
||||
// if arguments are provided to specify the colours
|
||||
// of the even & odd rows, then use the them;
|
||||
// otherwise use the following defaults:
|
||||
var evenColor = arguments[1] ? arguments[1] : "#fff";
|
||||
var oddColor = arguments[2] ? arguments[2] : "#eee";
|
||||
|
||||
// obtain a reference to the desired table
|
||||
// if no such table exists, abort
|
||||
var table = document.getElementById(id);
|
||||
if (! table) { return; }
|
||||
|
||||
// by definition, tables can have more than one tbody
|
||||
// element, so we'll have to get the list of child
|
||||
// <tbody>s
|
||||
var tbodies = table.getElementsByTagName("tbody");
|
||||
|
||||
// and iterate through them...
|
||||
for (var h = 0; h < tbodies.length; h++) {
|
||||
|
||||
// find all the <tr> elements...
|
||||
var trs = tbodies[h].getElementsByTagName("tr");
|
||||
|
||||
// ... and iterate through them
|
||||
for (var i = 0; i < trs.length; i++) {
|
||||
|
||||
// avoid rows that have a class attribute
|
||||
// or backgroundColor style
|
||||
if (!hasClass(trs[i]) && ! trs[i].style.backgroundColor) {
|
||||
|
||||
// get all the cells in this row...
|
||||
var tds = trs[i].getElementsByTagName("td");
|
||||
|
||||
// and iterate through them...
|
||||
for (var j = 0; j < tds.length; j++) {
|
||||
|
||||
var mytd = tds[j];
|
||||
|
||||
// avoid cells that have a class attribute
|
||||
// or backgroundColor style
|
||||
if (! hasClass(mytd) && ! mytd.style.backgroundColor) {
|
||||
|
||||
mytd.style.backgroundColor = even ? evenColor : oddColor;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
// flip from odd to even, or vice-versa
|
||||
even = ! even;
|
||||
}
|
||||
}
|
||||
}
|