2016-06-18 23:44:36 +02:00
|
|
|
$(document).ready(function() {
|
|
|
|
|
|
|
|
$(function () {
|
|
|
|
$('[data-toggle="tooltip"]').tooltip()
|
|
|
|
});
|
|
|
|
|
|
|
|
// open modal window if a hash is found in URL
|
|
|
|
if(window.location.hash) {
|
|
|
|
$(window.location.hash).modal('show');
|
|
|
|
// add direct link to modal window
|
|
|
|
$(".link").empty();
|
2016-06-30 10:47:24 +02:00
|
|
|
$(".link").append("<small>Link to this command: <a href=""+window.location.href+"">"+window.location.href+"</a></small>");
|
2016-06-18 23:44:36 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
// add hash to URL when modal is opened
|
|
|
|
$('span[data-toggle="modal"]').on("click", function(){
|
|
|
|
window.location.hash = $(this).attr("data-target");
|
|
|
|
// add direct link to modal window
|
|
|
|
$(".link").empty();
|
2016-06-30 10:47:24 +02:00
|
|
|
$(".link").append("<small>Link to this command: <a href=""+window.location.href+"">"+window.location.href+"</a></small>");
|
2016-06-18 23:44:36 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
// remove hash from URL when modal is closed
|
|
|
|
$(document).on('hide.bs.modal', function (e) {
|
|
|
|
history.pushState("", document.title, window.location.pathname);
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|