From: julmis Date: Sun, 16 May 2004 16:09:23 +0000 (+0000) Subject: Changing link dialog and adding new select color dialog. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=1665e6c80d06fa30c537f4e94dd17287db148565;p=moodle.git Changing link dialog and adding new select color dialog. --- diff --git a/lib/editor/coursefiles.php b/lib/editor/coursefiles.php index ba572a2d49..cc012a54bf 100644 --- a/lib/editor/coursefiles.php +++ b/lib/editor/coursefiles.php @@ -18,7 +18,7 @@ optional_variable($file, ""); optional_variable($wdir, ""); optional_variable($action, ""); - optional_variable($usecheckboxes, ""); + optional_variable($usecheckboxes, true); if (! $course = get_record("course", "id", $id) ) { error("That's an invalid course id"); @@ -77,10 +77,14 @@ for(field in params) { var value = params[field]; switch(field) { - case "url" : upper.document.getElementById('f_href').value = value; break; - case "imodified" : upper.document.getElementById('imodified').value = value; break; - case "isize" : upper.document.getElementById('isize').value = value; break; - case "itype" : upper.document.getElementById('itype').value = value; break; + case "url" : + //upper.document.getElementById('f_href').value = value; + upper.opener.document.getElementById('f_href').value = value; + upper.close(); + break; + //case "imodified" : upper.document.getElementById('imodified').value = value; break; + //case "isize" : upper.document.getElementById('isize').value = value; break; + //case "itype" : upper.document.getElementById('itype').value = value; break; } } } diff --git a/lib/editor/dialog.js b/lib/editor/dialog.js index 50dec52a6b..d6ec2446c6 100644 --- a/lib/editor/dialog.js +++ b/lib/editor/dialog.js @@ -38,20 +38,20 @@ Dialog._modal = null; Dialog._arguments = null; Dialog._geckoOpenModal = function(url, action, init) { - + if(url.lastIndexOf("insert_image.php") != -1) { var x = 730; var y = 540; - } else if (url.lastIndexOf("link.php") != -1) { - var x = 700; - var y = 460; + } else if (url.lastIndexOf("link_std.php") != -1) { + var x = 400; + var y = 180; } else if (url.lastIndexOf("dlg_ins_smile.php") != -1) { var x = 330; var y = 360; } else if (url.lastIndexOf("dlg_ins_char.php") != -1) { var x = 450; var y = 270; - } else if (url.lastIndexOf("select_color.html") != -1) { + } else if (url.lastIndexOf("select_color.php") != -1) { var x = 238; var y = 188; } else if (url.lastIndexOf("insert_table.php") != -1) { @@ -67,7 +67,7 @@ Dialog._geckoOpenModal = function(url, action, init) { var x = 10; var y = 10; } - + var lx = (screen.width - x) / 2; var tx = (screen.height - y) / 2; var dlg = window.open(url, "ha_dialog", "toolbar=no,menubar=no,personalbar=no, width="+ x +",height="+ y +",scrollbars=no,resizable=no, left="+ lx +", top="+ tx +""); diff --git a/lib/editor/htmlarea.php b/lib/editor/htmlarea.php index 120a658c09..9363998d08 100644 --- a/lib/editor/htmlarea.php +++ b/lib/editor/htmlarea.php @@ -1428,12 +1428,7 @@ HTMLArea.prototype._createLink = function(link) { f_title : link.title, f_target : link.target }; - this._popupDialog("", function(param) { + this._popupDialog("link_std.php?id=", function(param) { if (!param) return false; var a = link; @@ -1676,7 +1671,7 @@ HTMLArea.prototype.execCommand = function(cmdID, UI, param) { case "hilitecolor": (HTMLArea.is_ie) && (cmdID = "backcolor"); case "forecolor": - this._popupDialog("select_color.html", function(color) { + this._popupDialog("select_color.php", function(color) { if (color) { // selection not canceled editor._doc.execCommand(cmdID, false, "#" + color); } diff --git a/lib/editor/popups/link.php b/lib/editor/popups/link.php index aef03b87ef..255f47ca39 100644 --- a/lib/editor/popups/link.php +++ b/lib/editor/popups/link.php @@ -14,85 +14,12 @@ <?php print_string("insertlink","editor");?> "> - - +
- +
- -
+
id."\" width=\"360\" height=\"260\">": + "": ""; ?>

 
-
-
- -
- - - - - - - - - - - - - -
:
:
:
-
-
-
-
- - - - - - - - - - - - - -
:
:
:
-
- - - - -
  -
-
-
-
-
- +
+ + +
+ @@ -249,7 +114,14 @@ form { margin-bottom: 1px; margin-top: 1px; } "> -
:
" onclick="return submit_form('delete');">
+
+ + + + + +
+ + + + + +
+ + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +