From 674696ebb8e1d6df937872e73ac81c20aa82cdf5 Mon Sep 17 00:00:00 2001 From: Jared Hancock <jared@osticket.com> Date: Mon, 4 Nov 2013 20:41:25 +0000 Subject: [PATCH] Slight fixup for dialogs * Dialogs are scrollable if too big * Placement does not respect scroll position now (fixed position) --- scp/css/scp.css | 4 +++- scp/js/scp.js | 14 ++------------ 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/scp/css/scp.css b/scp/css/scp.css index 5ace67940..cdfd10f41 100644 --- a/scp/css/scp.css +++ b/scp/css/scp.css @@ -1204,7 +1204,7 @@ time { } .dialog { - position:absolute; + position:fixed; padding:1em; width:500px; height:250px; @@ -1215,6 +1215,8 @@ time { z-index:5; box-shadow: 0 5px 60px #001; border-radius: 5px; + max-height: 72%; + overflow-y: scroll; } .redactor_air { diff --git a/scp/js/scp.js b/scp/js/scp.js index c764a4c52..d483b5a6c 100644 --- a/scp/js/scp.js +++ b/scp/js/scp.js @@ -103,16 +103,6 @@ $(document).ready(function(){ return false; }); - $(window).scroll(function () { - var w = $(window); - $('.dialog').each(function() { - $(this).css({ - top : w.height() / 5 + w.scrollTop(), - left : (w.width() - $(this).outerWidth()) / 2 - }); - }); - }); - if($.browser.msie) { $('.inactive').mouseenter(function() { var elem = $(this); @@ -360,9 +350,9 @@ $(document).ready(function(){ $('.dialog').each(function() { var w = $(window); $(this).css({ - top : w.height() / 5 + w.scrollTop(), + top : (w.innerHeight() / 7), left : (w.width() - $(this).outerWidth()) / 2 - }); + }).draggable(); }); $('.dialog').delegate('input.close, a.close', 'click', function(e) { -- GitLab