From 1d0134db102d396ae2f494b037168e7891c09858 Mon Sep 17 00:00:00 2001 From: Saophalkun Ponlu Date: Thu, 2 Oct 2008 00:31:33 +0000 Subject: [PATCH] fixed fix position of action area (status message and ajax action buttons) in IE6 using javascript git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@63488 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- css/ModelAdmin.css | 16 +++++++++------- javascript/ModelAdmin.js | 19 +++++++++++++++++++ 2 files changed, 28 insertions(+), 7 deletions(-) diff --git a/css/ModelAdmin.css b/css/ModelAdmin.css index 4f2dc580..6b8e2420 100644 --- a/css/ModelAdmin.css +++ b/css/ModelAdmin.css @@ -107,14 +107,16 @@ body.ModelAdmin #Form_ImportForm_holder dt { } body.ModelAdmin #statusMessage { - position: fixed; - left: auto; - bottom: 35px; + position: fixed !important; + position: absolute; + left: auto !important; + bottom: 35px !important; } /* Form */ body.ModelAdmin #right .ajaxActions { - position: fixed; - right: 30px; - bottom: 35px; -} \ No newline at end of file + position: fixed !important; + position: absolute; + right: 30px !important; + bottom: 35px !important; +} diff --git a/javascript/ModelAdmin.js b/javascript/ModelAdmin.js index 1aacf1dc..2504bb42 100644 --- a/javascript/ModelAdmin.js +++ b/javascript/ModelAdmin.js @@ -23,6 +23,25 @@ $(document).ready(function() { $('input[type=submit]').livequery('click', function() { $(this).addClass('loading'); }); + + $("#right").scroll( function () { + positionActionArea(); + }); + + $(window).resize( function() { + positionActionArea(); + }); + + /* + * Make the status message and ajax action button fixed + */ + function positionActionArea() { + if ( $.browser.msie && $.browser.version.indexOf("6.", 0)==0 ) { + newTopValue = $("#right").scrollTop()+$(window).height()-139; + $('.ajaxActions').css('top', newTopValue); + $('#statusMessage').css('top', newTopValue); + } + } ////////////////////////////////////////////////////////////////// // Search form