From: dongsheng Date: Tue, 28 Jul 2009 09:57:28 +0000 (+0000) Subject: "MDL-19118, fixed a javascript error on webkit core browsers" X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=84301fd2cc79bd5be59f1a3beb73f8218504dce9;p=moodle.git "MDL-19118, fixed a javascript error on webkit core browsers" --- diff --git a/comment/comment.js b/comment/comment.js index f27d524763..3005ac5d1f 100644 --- a/comment/comment.js +++ b/comment/comment.js @@ -12,7 +12,7 @@ function cmt_replace(client_id,list,newcmt) { var val = template.innerHTML; val = val.replace('___name___', list[i].username); if (list[i]['delete']||newcmt) { - list[i].content = '
' + list[i].content; + list[i].content = '
' + list[i].content; } val = val.replace('___time___', list[i].time); val = val.replace('___picture___', list[i].avatar); @@ -180,7 +180,6 @@ function comment_hide_link(cid) { if(link){ link.style.display='none'; } else { - alert('wront'); } } function toggle_textarea(focus) { diff --git a/lang/en_utf8/moodle.php b/lang/en_utf8/moodle.php index 5eb64a8aec..8d37530273 100644 --- a/lang/en_utf8/moodle.php +++ b/lang/en_utf8/moodle.php @@ -422,6 +422,7 @@ $string['deletecheckfiles'] = 'Are you absolutely sure you want to delete these $string['deletecheckfull'] = 'Are you absolutely sure you want to completely delete $a ?'; $string['deletecheckwarning'] = 'You are about to delete these files'; $string['deletecompletely'] = 'Delete completely'; +$string['deletecomment'] = 'Delete this comment'; $string['deletecourse'] = 'Delete a course'; $string['deletecoursecheck'] = 'Are you absolutely sure you want to completely delete this course and all the data it contains?'; $string['deleted'] = 'Deleted'; diff --git a/lib/commentlib.php b/lib/commentlib.php index 2b9a38db83..cf69c4b415 100644 --- a/lib/commentlib.php +++ b/lib/commentlib.php @@ -184,7 +184,7 @@ EOD; $PAGE->requires->yui_lib('connection')->in_head(); $PAGE->requires->js('comment/comment.js')->in_head(); $PAGE->requires->string_for_js('addcomment', 'moodle'); - $PAGE->requires->string_for_js('delete', 'moodle'); + $PAGE->requires->string_for_js('deletecomment', 'moodle'); } private function _setup_course($courseid) {