Skip to content

Commit

Permalink
Show the modal exactly where it's invoked
Browse files Browse the repository at this point in the history
 * Fix bug 955748
 * Rebase to master

Change-Id: Idac37f6935211c9dfc1c474266864741123e5748
  • Loading branch information
lemonlatte committed Mar 21, 2012
1 parent 513a60b commit cb8b05f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions horizon/static/horizon/js/modals.js
Expand Up @@ -9,6 +9,12 @@ horizon.addInitFunction(function() {
$(this).remove();
});

$(document).on('show', '.modal', function(evt) {
var scrollShift = $('body').scrollTop();
var topVal = $(this).css('top');
$(this).css('top', scrollShift + parseInt(topVal, 10));
});

$('.ajax-modal').click(function (evt) {
var $this = $(this);
$.ajax($this.attr('href'), {
Expand Down

0 comments on commit cb8b05f

Please sign in to comment.