")
-
doc.write(leftSide)
-
doc.write("")
-
doc.write(" ")
-
doc.write("")
-
doc.write(" | ")
+ if (USETEXTLINKS) {
+// alert('writing: [' + '' + this.desc + '' +']');
+ doc.write('' + this.desc + '');
+ }
+ else {
+ doc.write(this.desc);
+ }
- if (USETEXTLINKS)
-
- doc.write("" + this.desc + "")
-
- else
-
- doc.write(this.desc)
-
-
-
this.blockEnd()
-
-
if (browserVersion == 1) {
-
this.navObj = doc.all["item"+this.id]
-
this.iconImg = doc.all["itemIcon"+this.id]
-
} else if (browserVersion == 2) {
-
this.navObj = doc.layers["item"+this.id]
-
this.iconImg = this.navObj.document.images["itemIcon"+this.id]
-
doc.yPos=doc.yPos+this.navObj.clip.height
-
} else if (browserVersion == 3) {
-
this.navObj = doc.getElementById("item"+this.id)
-
this.iconImg = doc.getElementById("itemIcon"+this.id)
-
}
-
}
-
-
-
// Methods common to both objects (pseudo-inheritance)
-
// ********************************************************
-
-
function mostra()
-
{
-
if (browserVersion == 1 || browserVersion == 3) {
-
var str = new String(doc.links[0])
-
// if (str.slice(16,20) != "ins.")
-
// return
-
}
-
-
if (browserVersion == 1 || browserVersion == 3)
-
this.navObj.style.display = "block"
-
else
-
this.navObj.visibility = "show"
-
}
-
-
function escondeBlock()
-
{
-
if (browserVersion == 1 || browserVersion == 3) {
-
if (this.navObj.style.display == "none")
-
return
-
this.navObj.style.display = "none"
-
} else {
-
if (this.navObj.visibility == "hiden")
-
return
-
this.navObj.visibility = "hiden"
-
}
-
}
-
-
function blockStart(idprefix) {
-
var idParam = "id='" + idprefix + this.id + "'"
-
-
if (browserVersion == 2)
-
doc.write("")
-
-
if (browserVersion == 3) //N6 has bug on display property with tables
-
doc.write("")
-
-
doc.write(" ")
-
else
-
doc.write(">")
-
}
-
-
function blockEnd() {
-
doc.write(" ")
-
-
if (browserVersion == 2)
-
doc.write("")
-
if (browserVersion == 3)
-
doc.write(" ")
-
}
-
-
function createEntryIndex()
-
{
-
this.id = nEntries
-
indexOfEntries[nEntries] = this
-
nEntries++
-
}
-
-
// total height of subEntries open
-
function totalHeight() //used with browserVersion == 2
-
{
-
var h = this.navObj.clip.height
-
var i = 0
-
-
if (this.isOpen) //is a folder and _is_ open
-
for (i=0 ; i < this.nChildren; i++)
-
h = h + this.children[i].totalHeight()
-
-
return h
-
}
-
-
-
// Events
-
// *********************************************************
-
-
-function clickOnFolder(folderId)
-
+function clickOnFolder(folderId, customOnClick)
{
-
var clicked = indexOfEntries[folderId]
+ eval('function doClick() {'+customOnClick+'} var $clickResult = doClick();');
+
+ if (!$clickResult) {
+ return false;
+ }
+
+ if (!clicked.isOpen) {
+ clickOnNode(folderId);
+ }
+ return true;
-
- if (!clicked.isOpen)
-
- clickOnNode(folderId)
-
-
-
- return
-
-
-
- if (clicked.isSelected)
-
- return
-
+ if (clicked.isSelected) {
+ return true;
+ }
}
-
-
function clickOnNode(folderId)
-
{
-
var clickedFolder = 0
-
var state = 0
-
-
clickedFolder = indexOfEntries[folderId]
-
state = clickedFolder.isOpen
-
-
clickedFolder.setState(!state) //open<->close
-
}
-
-
-
// Auxiliary Functions for Folder-Tree backward compatibility
-
// ***********************************************************
-
-
-function gFld(description, hreference)
-
+function gFld(description, hreference, onClick)
{
-
- folder = new Folder(description, hreference)
-
- return folder
-
+ return new Folder(description, hreference, onClick);
}
-
-
-function gLnk(target, description, linkData)
-
+function gLnk(target, description, linkData, onClick)
{
+ var fullLink = '';
- fullLink = ""
-
-
-
- if (target==0)
-
- {
-
- fullLink = "'"+linkData+"' target=\"main\""
-
- }
-
- else
-
- {
-
- if (target==1)
-
- fullLink = "'http://"+linkData+"' target=_blank"
-
- else
-
- fullLink = "'http://"+linkData+"' target=\"main\""
-
- }
-
-
-
- linkItem = new Item(description, fullLink)
-
- return linkItem
-
+ if (target == 0) {
+ fullLink = '"' + linkData + '" target="main"';
+ }
+ else {
+ if (target == 1) {
+ fullLink = '"http://' + linkData + '" target="_blank"';
+ }
+ else {
+ fullLink = '"http://' + linkData + '" target="main"';
+ }
+ }
+
+ return new Item(description, fullLink, onClick);
}
-
-
function insFld(parentFolder, childFolder)
-
{
return parentFolder.addChild(childFolder);
}
-
-
function insDoc(parentFolder, document)
-
{
return parentFolder.addChild(document)
-
}
-
-
-
// Global variables
-
// ****************
-
-
//These two variables are overwriten on defineMyTree.js if needed be
-
USETEXTLINKS = 0
-
STARTALLOPEN = 0
-
indexOfEntries = new Array
-
nEntries = 0
-
doc = document
-
browserVersion = 0
-
selectedFolder=0
-
-
-
// Main function
-
// *************
-
-
// This function uses an object (navigator) defined in
-
// ua.js, imported in the main html page (left frame).
-
function initializeDocument()
-
{
-
switch(navigator.family)
-
{
-
case 'ie4':
-
browserVersion = 1 //IE4
-
break;
-
case 'nn4':
-
browserVersion = 2 //NS4
-
break;
-
case 'gecko':
-
browserVersion = 3 //NS6
-
break;
-
default:
-
browserVersion = 0 //other
-
break;
-
}
-
-
//foldersTree (with the site's data) is created in an external .js
-
foldersTree.initialize(0, 1, "");
-
-
if (browserVersion == 2)
-
doc.write(" ")
-
-
//The tree starts in full display
-
if (!STARTALLOPEN)
-
if (browserVersion > 0) {
-
// close the whole tree
-
clickOnNode(0)
-
// open the root folder
-
clickOnNode(0)
-
}
-
-
if (browserVersion == 0)
-
doc.write("
This tree only expands or contracts with DHTML capable browsers | ")
+}
+function checkEditMode()
+{
+ if (window.parent.getFrame('main').$edit_mode) {
+ return confirm($phrase_EditingInProgress) ? true : false;
+ }
+
+ return true;
}
-
-
+function isset(variable)
+{
+ if(variable==null) return false;
+ return (typeof(variable)=='undefined')?false:true;
+}
\ No newline at end of file
|