[icinga-checkins] icinga.org: icinga-core/next: docs: import the toggle url click fix from #3193
git at icinga.org
git at icinga.org
Tue Oct 9 14:12:07 CEST 2012
Module: icinga-core
Branch: next
Commit: e7f80a7bdd4c94864db1d12a0ed90caa47658a60
URL: https://git.icinga.org/?p=icinga-core.git;a=commit;h=e7f80a7bdd4c94864db1d12a0ed90caa47658a60
Author: Michael Friedrich <michael.friedrich at gmail.com>
Date: Tue Oct 9 14:11:43 2012 +0200
docs: import the toggle url click fix from #3193
---
docbook | 2 +-
html/docs/js/icinga-docs.js | 15 +++++++++++++++
2 files changed, 16 insertions(+), 1 deletions(-)
diff --git a/docbook b/docbook
index 213c761..ffbbe18 160000
--- a/docbook
+++ b/docbook
@@ -1 +1 @@
-Subproject commit 213c7614bd920059e1d28e8fb8ac6430d7ee847d
+Subproject commit ffbbe18977bbe92db63fa5fe6550433b754f0fc7
diff --git a/html/docs/js/icinga-docs.js b/html/docs/js/icinga-docs.js
index ceccc5b..8867941 100644
--- a/html/docs/js/icinga-docs.js
+++ b/html/docs/js/icinga-docs.js
@@ -19,6 +19,21 @@ $(document).ready(function() {
}
});
+ //bail early if the url of section x.y was clicked (no toggling here!)
+ $("div.toc dl dd dl dt span.section a").click(function(e) {
+ var target = $(e.target).attr('target');
+ var href = $(e.target).attr('href');
+
+ //if target was undefined, open in the same window,
+ //otherwise open a new window with the target identifier
+ if(target !== undefined) {
+ window.open(href, target);
+ } else {
+ window.location.href = href;
+ }
+ return false;
+ });
+
// the x.y will be the toggle element
$("div.toc dl dd dl dt span.section").click(function(e) {
More information about the icinga-checkins
mailing list