Files
alfresco-community-repo/source/web/scripts/ajax/link-validation-report.js
Derek Hulley 26172af267 Merged V2.1 to HEAD
6408: removing the avmsubmittedaspect
   6409: reintroducing the avmclearsubmittedhandler as a stub in order to keep inflight workflows operating properly.
   6412: Fix to a subtle navigation issue when browsing WCM projects.
   6415: WCM-678 - Page size WCM browse screens
   6417: Fixes WCM-556, WCM-557, WCM-618 & WCM-620
            Line endings change -- manual merge
            Manual 'root\projects\web-client\config\alfresco\messages\webclient.properties'


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6731 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2007-09-10 16:23:24 +00:00

118 lines
3.0 KiB
JavaScript

Alfresco.tabSelected = function(tab)
{
var tabElem = document.getElementById(_alfCurrentTab);
if (tabElem != null)
{
tabElem.className = "";
}
var tabContentElem = document.getElementById(_alfCurrentTab + "Content");
if (tabContentElem != null)
{
tabContentElem.style.display = "none";
}
tabElem = document.getElementById(tab + "Tab");
if (tabElem != null)
{
tabElem.className = "selectedTab";
_alfCurrentTab = tab + "Tab";
}
tabContentElem = document.getElementById(tab + "TabContent");
if (tabContentElem != null)
{
tabContentElem.style.display = "block";
}
}
Alfresco.toggleBrokenLinks = function(icon, brokenLinksId)
{
var currentState = icon.className;
var brokenLinksDiv = document.getElementById(brokenLinksId);
if (currentState == "linkValToggleCollapsed")
{
icon.src = getContextPath() + "/images/icons/arrow_open.gif";
icon.className = "linkValToggleExpanded";
// show the div holding the broken links
if (brokenLinksDiv != null)
{
brokenLinksDiv.style.display = "block";
}
}
else
{
icon.src = getContextPath() + "/images/icons/arrow_closed.gif";
icon.className = "linkValToggleCollapsed";
// hide the div holding the broken links
if (brokenLinksDiv != null)
{
brokenLinksDiv.style.display = "none";
}
}
}
Alfresco.toggleGeneratedFiles = function(icon, genFilesId)
{
var currentState = icon.className;
var genFilesDiv = document.getElementById(genFilesId);
if (currentState == "linkValToggleCollapsed")
{
icon.src = getContextPath() + "/images/icons/arrow_open.gif";
icon.className = "linkValToggleExpanded";
// show the div holding the generated files
if (genFilesDiv != null)
{
genFilesDiv.style.display = "block";
}
}
else
{
icon.src = getContextPath() + "/images/icons/arrow_closed.gif";
icon.className = "linkValToggleCollapsed";
// hide the div holding the generated files
if (genFilesDiv != null)
{
genFilesDiv.style.display = "none";
}
}
}
Alfresco.increaseTabSize = function(tabBodyId)
{
var tabElem = document.getElementById(tabBodyId);
if (tabElem != null)
{
var currentHeight = YAHOO.util.Dom.getStyle(tabElem, "height");
var size = currentHeight.substring(0, currentHeight.length-2);
var newSize = Number(size) + 100;
YAHOO.util.Dom.setStyle(tabElem, "height", newSize + "px");
}
}
Alfresco.decreaseTabSize = function(tabBodyId)
{
var tabElem = document.getElementById(tabBodyId);
if (tabElem != null)
{
var currentHeight = YAHOO.util.Dom.getStyle(tabElem, "height");
var size = currentHeight.substring(0, currentHeight.length-2);
var newSize = Number(size) - 100;
if (newSize < 100)
{
newSize = 100;
}
YAHOO.util.Dom.setStyle(tabElem, "height", newSize + "px");
}
}