From 6e4c0f6164b07f5ff90fbddde902ab432c6e13a0 Mon Sep 17 00:00:00 2001 From: julmis Date: Thu, 11 Mar 2004 08:21:55 +0000 Subject: [PATCH] Some fixes of students dialog's placement on the screen and a little fix for event handling --- lib/editor/dialog.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/editor/dialog.js b/lib/editor/dialog.js index 37238527a9..50dec52a6b 100644 --- a/lib/editor/dialog.js +++ b/lib/editor/dialog.js @@ -1,3 +1,4 @@ +// $Id$ // Though "Dialog" looks like an object, it isn't really an object. Instead // it's just namespace for protecting global symbols. @@ -20,7 +21,6 @@ function Dialog(url, action, init) { Dialog._parentEvent = function(ev) { if (Dialog._modal && !Dialog._modal.closed) { - setTimeout("Dialog._modal.focus()", 1); // we get here in Mozilla only, anyway, so we can safely use // the DOM version. ev.preventDefault(); @@ -57,6 +57,12 @@ Dialog._geckoOpenModal = function(url, action, init) { } else if (url.lastIndexOf("insert_table.php") != -1) { var x = 410; var y = 240; + } else if (url.lastIndexOf("link_std.php") != -1) { + var x = 420; + var y = 210; + } else if (url.lastIndexOf("insert_image_std.php") != -1) { + var x = 450; + var y = 230; } else { var x = 10; var y = 10; @@ -82,7 +88,7 @@ Dialog._geckoOpenModal = function(url, action, init) { }; capwin(window); // capture other frames - for (var i = 0; i < window.frames.length; capwin(window.frames[i++])); + //for (var i = 0; i < window.frames.length; capwin(window.frames[i++])); // make up a function to be called when the Dialog ends. Dialog._return = function (val) { if (val && action) { @@ -90,7 +96,7 @@ Dialog._geckoOpenModal = function(url, action, init) { } relwin(window); // capture other frames - for (var i = 0; i < window.frames.length; relwin(window.frames[i++])); + //for (var i = 0; i < window.frames.length; relwin(window.frames[i++])); Dialog._modal = null; }; }; -- 2.39.5