diff options
Diffstat (limited to 'src/treeview.h')
-rw-r--r-- | src/treeview.h | 35 |
1 files changed, 27 insertions, 8 deletions
diff --git a/src/treeview.h b/src/treeview.h index 213bc82..433db9e 100644 --- a/src/treeview.h +++ b/src/treeview.h @@ -103,7 +103,7 @@ " \n" "function hideFolder() \n" "{ \n" -" if (browserVersion == 1) { \n" +" if (browserVersion == 1 || browserVersion == 3) { \n" " if (this.navObj.style.display == \"none\") \n" " return \n" " this.navObj.style.display = \"none\" \n" @@ -171,6 +171,8 @@ " doc.yPos=8 \n" " doc.write(\"<layer id='folder\" + this.id + \"' top=\" + doc.yPos + \" visibility=hidden>\") \n" " } \n" +" if (browserVersion == 3) \n" +" doc.write(\"<div id='folder\" + this.id + \"' style='display:none;'>\") \n" " \n" " doc.write(\"\\n<table \") \n" " if (browserVersion == 1) \n" @@ -199,6 +201,9 @@ " if (browserVersion == 2) { \n" " doc.write(\"</layer>\") \n" " } \n" +" if (browserVersion == 3) { \n" +" doc.write(\"</div>\") \n" +" } \n" " \n" " if (browserVersion == 1) { \n" " this.navObj = doc.all[\"folder\"+this.id] \n" @@ -209,7 +214,11 @@ " this.iconImg = this.navObj.document.images[\"folderIcon\"+this.id] \n" " this.nodeImg = this.navObj.document.images[\"nodeIcon\"+this.id] \n" " doc.yPos=doc.yPos+this.navObj.clip.height \n" -" } \n" +" } else if (browserVersion == 3) {\n" +" this.navObj = doc.getElementById(\"folder\"+this.id)\n" +" this.iconImg = doc.images.namedItem(\"folderIcon\"+this.id)\n" +" this.nodeImg = doc.images.namedItem(\"nodeIcon\"+this.id)\n" +" }\n" "} \n" " \n" "function outputFolderLink() \n" @@ -276,7 +285,7 @@ " \n" "function hideItem() \n" "{ \n" -" if (browserVersion == 1) { \n" +" if (browserVersion == 1 || browserVersion == 3) { \n" " if (this.navObj.style.display == \"none\") \n" " return \n" " this.navObj.style.display = \"none\" \n" @@ -310,6 +319,8 @@ "{ \n" " if (browserVersion == 2) \n" " doc.write(\"<layer id='item\" + this.id + \"' top=\" + doc.yPos + \" visibility=hidden>\") \n" +" if (browserVersion == 3) \n" +" doc.write(\"<div id='item\" + this.id + \"' style='display:block;'>\") \n" " \n" " doc.write(\"\\n<table \") \n" " if (browserVersion == 1) \n" @@ -340,6 +351,8 @@ " \n" " if (browserVersion == 2) \n" " doc.write(\"</layer>\") \n" +" if (browserVersion == 3) \n" +" doc.write(\"</div>\")\n" " \n" " if (browserVersion == 1) { \n" " this.navObj = doc.all[\"item\"+this.id] \n" @@ -348,7 +361,10 @@ " this.navObj = doc.layers[\"item\"+this.id] \n" " this.iconImg = this.navObj.document.images[\"itemIcon\"+this.id] \n" " doc.yPos=doc.yPos+this.navObj.clip.height \n" -" } \n" +" } else if (browserVersion == 3) {\n" +" this.navObj = doc.getElementById(\"item\"+this.id)\n" +" this.iconImg = doc.images.namedItem(\"itemIcon\"+this.id)\n" +" }\n" "} \n" " \n" " \n" @@ -357,7 +373,7 @@ " \n" "function display() \n" "{ \n" -" if (browserVersion == 1) \n" +" if (browserVersion == 1 || browserVersion == 3) \n" " this.navObj.style.display = \"block\" \n" " else \n" " this.navObj.visibility = \"show\" \n" @@ -419,15 +435,18 @@ " else \n" " if (doc.layers) \n" " browserVersion = 2 //NS4 \n" -" else \n" -" browserVersion = 0 //other \n" +" else if(navigator.userAgent.toLowerCase().indexOf('gecko') != -1)\n" +" browserVersion = 3 //mozilla\n" +" else \n" +" browserVersion = 0 //other \n" "\n" " foldersTree.initialize(0, 1, \"\") \n" " foldersTree.display()\n" " \n" " if (browserVersion > 0) \n" " { \n" -" doc.write(\"<layer top=\"+indexOfEntries[nEntries-1].navObj.top+\"> </layer>\") \n" +" if(browserVersion != 3)\n" +" doc.write(\"<layer top=\"+indexOfEntries[nEntries-1].navObj.top+\"> </layer>\") \n" " \n" " // close the whole tree \n" " clickOnNode(0) \n" |