From: <nk...@us...> - 2011-08-16 21:34:17
|
Revision: 36253 http://tikiwiki.svn.sourceforge.net/tikiwiki/?rev=36253&view=rev Author: nkoth Date: 2011-08-16 21:34:11 +0000 (Tue, 16 Aug 2011) Log Message: ----------- [FIX] Fix math to get positioning for dialog in fading modal Modified Paths: -------------- trunk/lib/jquery_tiki/tiki-jquery.js Modified: trunk/lib/jquery_tiki/tiki-jquery.js =================================================================== --- trunk/lib/jquery_tiki/tiki-jquery.js 2011-08-16 21:33:35 UTC (rev 36252) +++ trunk/lib/jquery_tiki/tiki-jquery.js 2011-08-16 21:34:11 UTC (rev 36253) @@ -2562,8 +2562,8 @@ left: obj.offset().left, height: obj.height(), //we try to get height here width: obj.width(), - middle: obj.height() / 2, - center: obj.width() / 2 + middle: (obj.height() / 2 + obj.offset().top), + center: (obj.width() / 2 + obj.offset().left) }, s); var modal = $('body').find('#modal_' + lastModal); @@ -2638,10 +2638,10 @@ dialog .append(spinner) .append(msg) - .css('top', s.middle + 'px') - .css('left', s.center + 'px') - .css('position', 'relative'); - + .css('top', (s.middle - dialog.height() / 2) + 'px') + .css('left', (s.center - dialog.width() / 2) + 'px') + .css('position', 'absolute'); + if (s.isEverything) { dialog .css('top', (s.middle - dialog.height() / 2) + 'px') @@ -2649,4 +2649,4 @@ } return obj; -}; \ No newline at end of file +}; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |