### Eclipse Workspace Patch 1.0 #P infusion Index: src/webapp/integration-demos/sakai/js/sakai.js =================================================================== --- src/webapp/integration-demos/sakai/js/sakai.js (revision 7221) +++ src/webapp/integration-demos/sakai/js/sakai.js (working copy) @@ -32,13 +32,8 @@ var dialog_container = $("#dialog_container"); - var initDialog = function () { - // center dialog - $('#dialog_container').css({ - left: ($(window).width() / 2) - ($('#dialog_container').width() / 2), - top: ($(window).height() / 2) - ($('#dialog_container').height() / 2) - }); - + var initDialog = function () { + dialog_container.dialog("option", "position", "center"); var options = { listeners: { afterRender: function () { @@ -56,10 +51,6 @@ // instantiate component uiOptions = fluid.uiOptions("#dialog_container", options); - - // 1 time, reposition dialog - dialog_container.dialog('option', 'position', 'center'); - }; dialog_container.dialog({ @@ -76,7 +67,14 @@ }); $('.lookNfeel a').click(function () { + //The following scrollTo and repositioning of the dialog provides a temporary + //fix to FLUID-2650 caused by a jQuery bug in dialog positioning (jQuery UI ticket 4539). + //However, not sure that the fix to the jQuery bug will solve the larger problem + //of nicely positioning the dialog when text size or line height is very large. + //We should revisit this problem when the jQuery dialog positioning issue is solved. + scrollTo(0,0); dialog_container.dialog("open"); + if (!uiOptions) { $('#dialog_content').load('../../../components/uiOptions/html/UIOptions.html .uiOptions', initDialog); }