[icinga-checkins] icinga.org: icinga-doc/master: docs issue #3561: ctrl-click in toc doesn' t open new window

git at icinga.org git at icinga.org
Fri Mar 29 21:42:10 CET 2013


Module: icinga-doc
Branch: master
Commit: b8bac09887eb0961c2c35ef6b3f9a8269c4c4803
URL:    https://git.icinga.org/?p=icinga-doc.git;a=commit;h=b8bac09887eb0961c2c35ef6b3f9a8269c4c4803

Author: Wolfgang <wnd at gmx.net>
Date:   Fri Mar 29 13:28:27 2013 +0100

docs issue #3561: ctrl-click in toc doesn't open new window

---

 js/icinga-docs.js |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/js/icinga-docs.js b/js/icinga-docs.js
index 8867941..c8ee978 100644
--- a/js/icinga-docs.js
+++ b/js/icinga-docs.js
@@ -24,6 +24,11 @@ $(document).ready(function() {
 		var target = $(e.target).attr('target');
 		var href = $(e.target).attr('href');
 
+		//open new window if ctrl key was pressed
+		if(e.ctrlKey) {
+			target = '_blank';
+		}
+
 		//if target was undefined, open in the same window,
 		//otherwise open a new window with the target identifier
 		if(target !== undefined) {





More information about the icinga-checkins mailing list