MDL-64524 assign: Styles editpdf comments
authorDamyon Wiese <damyon@moodle.com>
Wed, 9 Jan 2019 02:19:55 +0000 (10:19 +0800)
committerDamyon Wiese <damyon@moodle.com>
Mon, 1 Apr 2019 04:17:27 +0000 (12:17 +0800)
Properly display the list of comments, but limiting their size (use title to indicate the full comments).
When there are too many comments, show a scrollbar in the menu.

mod/assign/feedback/editpdf/styles.css
mod/assign/feedback/editpdf/yui/build/moodle-assignfeedback_editpdf-editor/moodle-assignfeedback_editpdf-editor-debug.js
mod/assign/feedback/editpdf/yui/build/moodle-assignfeedback_editpdf-editor/moodle-assignfeedback_editpdf-editor-min.js
mod/assign/feedback/editpdf/yui/build/moodle-assignfeedback_editpdf-editor/moodle-assignfeedback_editpdf-editor.js
mod/assign/feedback/editpdf/yui/src/editor/js/commentmenu.js

index 6e22ae7..48d87f8 100644 (file)
     margin: 0;
 }
 
-.assignfeedback_editpdf_commentmenu li.quicklist_comment {
-    width: 150px;
+.assignfeedback_editpdf_dropdown li.quicklist_comment {
+    width: 200px;
 }
 
-.assignfeedback_editpdf_commentmenu li.quicklist_comment a {
+.assignfeedback_editpdf_dropdown li.quicklist_comment a {
     white-space: nowrap;
     display: inline-block;
-    max-width: 130px;
+    max-width: 140px;
     overflow: hidden;
     text-overflow: ellipsis;
 }
 
-.assignfeedback_editpdf_commentmenu a.delete_quicklist_comment {
+.assignfeedback_editpdf_dropdown a.delete_quicklist_comment {
     float: right;
+    width: 20px;
 }
 
 .assignfeedback_editpdf_dropdown button {
     margin-right: 0;
     margin-top: 0;
     border-radius: 4px;
-    width: 30px;
+    width: 200px;
 }
 
 .moodle-dialogue-base .moodle-dialogue.assignfeedback_editpdf_dropdown .moodle-dialogue-bd {
 .assignfeedback_editpdf_menu li a {
     text-decoration: none;
     color: #555;
-    margin: 10px;
+    margin-left: 10px;
+    margin-right: 10px;
+    margin-top: 4px;
+    margin-bottom: 4px;
 }
 
 ul.assignfeedback_editpdf_search {
@@ -264,15 +268,16 @@ ul.assignfeedback_editpdf_search {
     color: #555;
 }
 
-.assignfeedback_editpdf_menu li:hover,
-.assignfeedback_editpdf_menu li:hover a,
-.assignfeedback_editpdf_menu li a:hover {
+.assignfeedback_editpdf_menu li:hover {
     background-color: #ebebeb;
-    background-image: radial-gradient(ellipse at center, #fff 60%, #dfdfdf 100%);
 }
 
 ul.assignfeedback_editpdf_menu {
     margin: 0;
+    min-width: 200px;
+    max-height: 40vh;
+    overflow-y: auto;
+    overflow-x: hidden;
 }
 
 .assignfeedback_editpdf_menu li {
index b92fa9f..0d6a448 100644 (file)
Binary files a/mod/assign/feedback/editpdf/yui/build/moodle-assignfeedback_editpdf-editor/moodle-assignfeedback_editpdf-editor-debug.js and b/mod/assign/feedback/editpdf/yui/build/moodle-assignfeedback_editpdf-editor/moodle-assignfeedback_editpdf-editor-debug.js differ
index 9132cfd..4b467b2 100644 (file)
Binary files a/mod/assign/feedback/editpdf/yui/build/moodle-assignfeedback_editpdf-editor/moodle-assignfeedback_editpdf-editor-min.js and b/mod/assign/feedback/editpdf/yui/build/moodle-assignfeedback_editpdf-editor/moodle-assignfeedback_editpdf-editor-min.js differ
index b92fa9f..0d6a448 100644 (file)
Binary files a/mod/assign/feedback/editpdf/yui/build/moodle-assignfeedback_editpdf-editor/moodle-assignfeedback_editpdf-editor.js and b/mod/assign/feedback/editpdf/yui/build/moodle-assignfeedback_editpdf-editor/moodle-assignfeedback_editpdf-editor.js differ
index fa1af09..1f823d1 100644 (file)
@@ -98,6 +98,7 @@ Y.extend(COMMENTMENU, M.assignfeedback_editpdf.dropdown, {
                                                '<img src="' + M.util.image_url('t/delete', 'core') + '" ' +
                                                'alt="' + M.util.get_string('deletecomment', 'assignfeedback_editpdf') + '"/>' +
                                                '</a>');
+            linkitem.setAttribute('title', quickcomment.rawtext);
             listitem.append(linkitem);
             listitem.append(deletelinkitem);