<xsl:comment> This file was created by activities-completed-1.xsl of Activities, which is free software licensed under the GNU Affero General Public License 3 or any later version (see https://gitlab.com/groupware-systems/activities/ and http://www.groupware-systems.org). </xsl:comment>
<xsl:text>
</xsl:text>
<xsl:comment>
Copyright (C) 2018-2019 Stephan Kreutzer
This program is part of Activities.
Activities is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3 or any later version,
as published by the Free Software Foundation.
Activities is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License 3 for more details.
You should have received a copy of the GNU Affero General Public License 3
along with Activities. If not, see <http://www.gnu.org/licenses/>.
The textual content in the <div id="content"/> is not part of this
program, it's user data that is only processed. A different license may apply.
/* Leave this in here because in the source, there should never be
* a completed top-level activity that contains other sub-activities
* that are neither complete nor abandoned, so the use of the default
* classes should indicate that such cases are still present in the
* archived activity and something should be done about them. */
.active
{
color: #FFA500;
}
#content-pane
{
float: left;
width: 50%;
position: relative;
}
#description-pane
{
right: 0;
width: 50%;
border-left: 2px solid black;
box-sizing: border-box;
position: fixed;
}
/*
#content-target
{
padding: 2em;
text-align: justify;
}
*/
#description-target
{
padding: 2em;
text-align: justify;
}
#descriptions
{
display: none;
}
</style>
<scripttype="text/javascript">
"use strict";
function showDescription(id)
{
hideDescription();
let description = document.getElementsByClassName(id);
if (description == null)
{
return -1;
}
if (description.length <= 0)
{
return -1;
}
let parent = document.getElementById('description-target');
if (parent == null)
{
return -1;
}
let destination = document.createElement("div");
parent.appendChild(destination);
for (let i = 0; i < description.length; i++)
{
let element = description[i].cloneNode(true);
// Otherwise DOM would update description.length as the nodes would
// be cloned with their class attribute, leading to an infinite loop.
element.removeAttribute("class");
destination.appendChild(element);
}
return 0;
}
function hideDescription()
{
let parent = document.getElementById('description-target');
if (parent == null)
{
return -1;
}
let description = parent.getElementsByTagName("div");
// Stupid JavaScript has a cloneNode(deep), but no removeNode(deep).
let removeNode = function(element, parent)
{
while (element.hasChildNodes == true)
{
removeNode(element.lastChild, element);
}
parent.removeChild(element);
}
for (let i = 0; i < description.length; i++)
{
removeNode(description[i], parent);
}
return 0;
}
</script>
</head>
<body>
<divid="content">
<xsl:comment> The textual content in this element and sub-elements is not part of this program, it's user data and might be under a different license than this program. This program also doesn't depend on it or link it as a library, it's only processed. </xsl:comment>
<title>Add archival of completed activities.</title>
<description>
<p>
activities-xhtml-1.xsl doesn’t display completed top-level activities any more, so another transformation + output file is needed to show these as some sort of archive.