mirror of
https://github.com/amiaopensource/ffmprovisr.git
synced 2024-12-24 18:58:22 +01:00
modals go inline instead of popup
This commit is contained in:
parent
77c31a7c5c
commit
b1f7f5cad4
1024
index.html
1024
index.html
File diff suppressed because it is too large
Load Diff
28
js/js.js
28
js/js.js
@ -4,25 +4,21 @@ $(document).ready(function() {
|
||||
$('[data-toggle="tooltip"]').tooltip()
|
||||
});
|
||||
|
||||
// open modal window if a hash is found in URL
|
||||
// open recipe 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();
|
||||
$(".link").append("<small>Link to this command: <a href="+window.location.href+">"+window.location.href+"</a></small>");
|
||||
id = window.location.hash
|
||||
$(id).collapse('show');
|
||||
$('html, body').animate({ scrollTop: $(id).offset().top}, 1000);
|
||||
$(id + " .link").empty();
|
||||
$(id + " .link").append("<small>Link to this command: <a href="+window.location.href+">"+window.location.href+"</a></small>");
|
||||
}
|
||||
|
||||
// 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();
|
||||
$(".link").append("<small>Link to this command: <a href="+window.location.href+">"+window.location.href+"</a></small>");
|
||||
});
|
||||
|
||||
// remove hash from URL when modal is closed
|
||||
$(document).on('hide.bs.modal', function (e) {
|
||||
history.pushState("", document.title, window.location.pathname);
|
||||
// add hash URL when recipe is opened
|
||||
$('span[data-toggle="collapse"]').on("click", function(){
|
||||
id = $(this).attr("data-target");
|
||||
window.location.hash = id
|
||||
$(id + " .link").empty();
|
||||
$(id + " .link").append("<small>Link to this command: <a href="+window.location.href+">"+window.location.href+"</a></small>");
|
||||
});
|
||||
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user