From 4e712f7bd60760dfb3448cf6009013967fb6e90a Mon Sep 17 00:00:00 2001 From: julmis Date: Fri, 10 Jun 2005 17:14:05 +0000 Subject: [PATCH] Fixing cut 'n' paste headache... Auts... Multilined error message wasn't working well. --- lib/editor/htmlarea.php | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/lib/editor/htmlarea.php b/lib/editor/htmlarea.php index f8937a6301e..767f28050b7 100644 --- a/lib/editor/htmlarea.php +++ b/lib/editor/htmlarea.php @@ -1882,7 +1882,31 @@ HTMLArea.prototype.execCommand = function(cmdID, UI, param) { } } catch (e) { if (HTMLArea.is_gecko) { - if (confirm("', '\\n', get_string('cutpastemozilla','editor')) ?>")) + ", $strgecko); + + echo "var geckonotice = "; + $cnt = count($lines); + $i = 2; + foreach ($lines as $line) { + + if (empty($line)) { + continue; + } + + $line = addslashes(trim($line)); + + if ($cnt > $i) { + echo "\"$line\\n\" + \n"; + } else { + echo "\"$line\";\n"; + } + $i++; + } + + ?> + if (confirm(geckonotice)) window.open("http://moodle.org/mozillahelp"); } }