aboutsummaryrefslogtreecommitdiffstats
path: root/config/snort-dev/javascript/tabs.js
diff options
context:
space:
mode:
authorrobiscool <robrob2626@yahoo.com>2010-03-25 11:55:53 -0700
committerrobiscool <robrob2626@yahoo.com>2010-03-25 11:56:35 -0700
commit13656fde85d45e3533ba8dfdd8b3b173851d4f92 (patch)
tree7a8926d4862bafbe31e95ab8012436453a53d7e2 /config/snort-dev/javascript/tabs.js
parent98fe4d812fc9d5278d756cba51728e0cf9d0ab45 (diff)
downloadpfsense-packages-13656fde85d45e3533ba8dfdd8b3b173851d4f92.tar.gz
pfsense-packages-13656fde85d45e3533ba8dfdd8b3b173851d4f92.tar.bz2
pfsense-packages-13656fde85d45e3533ba8dfdd8b3b173851d4f92.zip
snort-dev, upload binarries 8.0x32 and update to final RC.
Diffstat (limited to 'config/snort-dev/javascript/tabs.js')
-rw-r--r--config/snort-dev/javascript/tabs.js244
1 files changed, 122 insertions, 122 deletions
diff --git a/config/snort-dev/javascript/tabs.js b/config/snort-dev/javascript/tabs.js
index c042d74d..40e54f0e 100644
--- a/config/snort-dev/javascript/tabs.js
+++ b/config/snort-dev/javascript/tabs.js
@@ -1,123 +1,123 @@
-// CSS helper functions
-CSS = {
- // Adds a class to an element.
- AddClass: function (e, c) {
- if (!e.className.match(new RegExp("\\b" + c + "\\b", "i")))
- e.className += (e.className ? " " : "") + c;
- },
-
- // Removes a class from an element.
- RemoveClass: function (e, c) {
- e.className = e.className.replace(new RegExp(" \\b" + c + "\\b|\\b" + c + "\\b ?", "gi"), "");
- }
-};
-
-// Functions for handling tabs.
-Tabs = {
- // Changes to the tab with the specified ID.
- GoTo: function (contentId, skipReplace) {
- // This variable will be true if a tab for the specified
- // content ID was found.
- var foundTab = false;
-
- // Get the TOC element.
- var toc = document.getElementById("toc");
- if (toc) {
- var lis = toc.getElementsByTagName("li");
- for (var j = 0; j < lis.length; j++) {
- var li = lis[j];
-
- // Give the current tab link the class "current" and
- // remove the class from any other TOC links.
- var anchors = li.getElementsByTagName("a");
- for (var k = 0; k < anchors.length; k++) {
- if (anchors[k].hash == "#" + contentId) {
- CSS.AddClass(li, "current");
- foundTab = true;
- break;
- } else {
- CSS.RemoveClass(li, "current");
- }
- }
- }
- }
-
- // Show the content with the specified ID.
- var divsToHide = [];
- var divs = document.getElementsByTagName("div");
- for (var i = 0; i < divs.length; i++) {
- var div = divs[i];
-
- if (div.className.match(/\bcontent\b/i)) {
- if (div.id == "_" + contentId)
- div.style.display = "block";
- else
- divsToHide.push(div);
- }
- }
-
- // Hide the other content boxes.
- for (var i = 0; i < divsToHide.length; i++)
- divsToHide[i].style.display = "none";
-
- // Change the address bar.
- if (!skipReplace) window.location.replace("#" + contentId);
- },
-
- OnClickHandler: function (e) {
- // Stop the event (to stop it from scrolling or
- // making an entry in the history).
- if (!e) e = window.event;
- if (e.preventDefault) e.preventDefault(); else e.returnValue = false;
-
- // Get the name of the anchor of the link that was clicked.
- Tabs.GoTo(this.hash.substring(1));
- },
-
- Init: function () {
- if (!document.getElementsByTagName) return;
-
- // Attach an onclick event to all the anchor links on the page.
- var anchors = document.getElementsByTagName("a");
- for (var i = 0; i < anchors.length; i++) {
- var a = anchors[i];
- if (a.hash) a.onclick = Tabs.OnClickHandler;
- }
-
- var contentId;
- if (window.location.hash) contentId = window.location.hash.substring(1);
-
- var divs = document.getElementsByTagName("div");
- for (var i = 0; i < divs.length; i++) {
- var div = divs[i];
-
- if (div.className.match(/\bcontent\b/i)) {
- if (!contentId) contentId = div.id;
- div.id = "_" + div.id;
- }
- }
-
- if (contentId) Tabs.GoTo(contentId, true);
- }
-};
-
-// Hook up the OnLoad event to the tab initialization function.
-window.onload = Tabs.Init;
-
-// Hide the content while waiting for the onload event to trigger.
-var contentId = window.location.hash || "#Introduction";
-
-if (document.createStyleSheet) {
- var style = document.createStyleSheet();
- style.addRule("div.content", "display: none;");
- style.addRule("div" + contentId, "display: block;");
-} else {
- var head = document.getElementsByTagName("head")[0];
- if (head) {
- var style = document.createElement("style");
- style.setAttribute("type", "text/css");
- style.appendChild(document.createTextNode("div.content { display: none; }"));
- style.appendChild(document.createTextNode("div" + contentId + " { display: block; }"));
- head.appendChild(style);
- }
+// CSS helper functions
+CSS = {
+ // Adds a class to an element.
+ AddClass: function (e, c) {
+ if (!e.className.match(new RegExp("\\b" + c + "\\b", "i")))
+ e.className += (e.className ? " " : "") + c;
+ },
+
+ // Removes a class from an element.
+ RemoveClass: function (e, c) {
+ e.className = e.className.replace(new RegExp(" \\b" + c + "\\b|\\b" + c + "\\b ?", "gi"), "");
+ }
+};
+
+// Functions for handling tabs.
+Tabs = {
+ // Changes to the tab with the specified ID.
+ GoTo: function (contentId, skipReplace) {
+ // This variable will be true if a tab for the specified
+ // content ID was found.
+ var foundTab = false;
+
+ // Get the TOC element.
+ var toc = document.getElementById("toc");
+ if (toc) {
+ var lis = toc.getElementsByTagName("li");
+ for (var j = 0; j < lis.length; j++) {
+ var li = lis[j];
+
+ // Give the current tab link the class "current" and
+ // remove the class from any other TOC links.
+ var anchors = li.getElementsByTagName("a");
+ for (var k = 0; k < anchors.length; k++) {
+ if (anchors[k].hash == "#" + contentId) {
+ CSS.AddClass(li, "current");
+ foundTab = true;
+ break;
+ } else {
+ CSS.RemoveClass(li, "current");
+ }
+ }
+ }
+ }
+
+ // Show the content with the specified ID.
+ var divsToHide = [];
+ var divs = document.getElementsByTagName("div");
+ for (var i = 0; i < divs.length; i++) {
+ var div = divs[i];
+
+ if (div.className.match(/\bcontent\b/i)) {
+ if (div.id == "_" + contentId)
+ div.style.display = "block";
+ else
+ divsToHide.push(div);
+ }
+ }
+
+ // Hide the other content boxes.
+ for (var i = 0; i < divsToHide.length; i++)
+ divsToHide[i].style.display = "none";
+
+ // Change the address bar.
+ if (!skipReplace) window.location.replace("#" + contentId);
+ },
+
+ OnClickHandler: function (e) {
+ // Stop the event (to stop it from scrolling or
+ // making an entry in the history).
+ if (!e) e = window.event;
+ if (e.preventDefault) e.preventDefault(); else e.returnValue = false;
+
+ // Get the name of the anchor of the link that was clicked.
+ Tabs.GoTo(this.hash.substring(1));
+ },
+
+ Init: function () {
+ if (!document.getElementsByTagName) return;
+
+ // Attach an onclick event to all the anchor links on the page.
+ var anchors = document.getElementsByTagName("a");
+ for (var i = 0; i < anchors.length; i++) {
+ var a = anchors[i];
+ if (a.hash) a.onclick = Tabs.OnClickHandler;
+ }
+
+ var contentId;
+ if (window.location.hash) contentId = window.location.hash.substring(1);
+
+ var divs = document.getElementsByTagName("div");
+ for (var i = 0; i < divs.length; i++) {
+ var div = divs[i];
+
+ if (div.className.match(/\bcontent\b/i)) {
+ if (!contentId) contentId = div.id;
+ div.id = "_" + div.id;
+ }
+ }
+
+ if (contentId) Tabs.GoTo(contentId, true);
+ }
+};
+
+// Hook up the OnLoad event to the tab initialization function.
+window.onload = Tabs.Init;
+
+// Hide the content while waiting for the onload event to trigger.
+var contentId = window.location.hash || "#Introduction";
+
+if (document.createStyleSheet) {
+ var style = document.createStyleSheet();
+ style.addRule("div.content", "display: none;");
+ style.addRule("div" + contentId, "display: block;");
+} else {
+ var head = document.getElementsByTagName("head")[0];
+ if (head) {
+ var style = document.createElement("style");
+ style.setAttribute("type", "text/css");
+ style.appendChild(document.createTextNode("div.content { display: none; }"));
+ style.appendChild(document.createTextNode("div" + contentId + " { display: block; }"));
+ head.appendChild(style);
+ }
} \ No newline at end of file