]> git.mjollnir.org Git - moodle.git/commitdiff
"MDL-19118, fixed a javascript error on webkit core browsers"
authordongsheng <dongsheng>
Tue, 28 Jul 2009 09:57:28 +0000 (09:57 +0000)
committerdongsheng <dongsheng>
Tue, 28 Jul 2009 09:57:28 +0000 (09:57 +0000)
comment/comment.js
lang/en_utf8/moodle.php
lib/commentlib.php

index f27d524763ba275991fefb36c67821adcb9a9d03..3005ac5d1fc36bfd769cbd4d33619cece8182947 100644 (file)
@@ -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 = '<div class="comment-delete"><a href="###" title="'+mstr.moodle.delete+'" onclick="delete_comment(\''+client_id+'\',\''+list[i].id+'\')"><img src="'+moodle_cfg.wwwroot+'/pix/t/delete.gif" /></a></div>' + list[i].content;
+            list[i].content = '<div class="comment-delete"><a href="###" title="'+mstr.moodle.deletecomment+'" onclick="delete_comment(\''+client_id+'\',\''+list[i].id+'\')"><img src="'+moodle_cfg.wwwroot+'/pix/t/delete.gif" /></a></div>' + 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) {
index 5eb64a8aec4db8ed2ed55ad40efda5c230a02568..8d375302730ec1714cd5dd41284d6947eebd6810 100644 (file)
@@ -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';
index 2b9a38db830551359322066c10d26ff9efb3f724..cf69c4b415b1b661a7f60f7b147e6429c35c4fd6 100644 (file)
@@ -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) {