Merge branch 'MDL-65679-master-fix' of git://github.com/andrewnicols/moodle

This commit is contained in:
Jun Pataleta 2019-08-09 11:38:59 +08:00
commit a6489fabbf
6 changed files with 36 additions and 26 deletions

View file

@ -343,9 +343,16 @@ ul.assignfeedback_editpdf_menu {
.assignfeedback_editpdf_widget .commentdrawable { .assignfeedback_editpdf_widget .commentdrawable {
display: flex; display: flex;
z-index: 50; z-index: 52;
height: 0; height: 0;
} }
.assignfeedback_editpdf_widget .annotation {
z-index: 51;
}
.assignfeedback_editpdf_widget .deleteannotationbutton {
z-index: 51;
}
.assignfeedback_editpdf_widget .commentdrawable label { .assignfeedback_editpdf_widget .commentdrawable label {
display: inline-block; display: inline-block;

View file

@ -732,7 +732,6 @@ Y.extend(ANNOTATION, Y.Base, {
drawingregion.append(deletelink); drawingregion.append(deletelink);
deletelink.setData('annotation', this); deletelink.setData('annotation', this);
deletelink.setStyle('zIndex', '200');
deletelink.on('click', this.remove, this); deletelink.on('click', this.remove, this);
deletelink.on('key', this.remove, 'space,enter', this); deletelink.on('key', this.remove, 'space,enter', this);
@ -1576,14 +1575,15 @@ Y.extend(ANNOTATIONSTAMP, M.assignfeedback_editpdf.annotation, {
position = this.editor.get_window_coordinates(new M.assignfeedback_editpdf.point(this.x, this.y)); position = this.editor.get_window_coordinates(new M.assignfeedback_editpdf.point(this.x, this.y));
node = Y.Node.create('<div/>'); node = Y.Node.create('<div/>');
node.addClass('annotation');
node.addClass('stamp');
node.setStyles({ node.setStyles({
'position': 'absolute', 'position': 'absolute',
'display': 'inline-block', 'display': 'inline-block',
'backgroundImage': 'url(' + this.editor.get_stamp_image_url(this.path) + ')', 'backgroundImage': 'url(' + this.editor.get_stamp_image_url(this.path) + ')',
'width': (this.endx - this.x), 'width': (this.endx - this.x),
'height': (this.endy - this.y), 'height': (this.endy - this.y),
'backgroundSize': '100% 100%', 'backgroundSize': '100% 100%'
'zIndex': 50
}); });
drawingcanvas.append(node); drawingcanvas.append(node);
@ -1623,14 +1623,15 @@ Y.extend(ANNOTATIONSTAMP, M.assignfeedback_editpdf.annotation, {
position = this.editor.get_window_coordinates(new M.assignfeedback_editpdf.point(bounds.x, bounds.y)); position = this.editor.get_window_coordinates(new M.assignfeedback_editpdf.point(bounds.x, bounds.y));
node = Y.Node.create('<div/>'); node = Y.Node.create('<div/>');
node.addClass('annotation');
node.addClass('stamp');
node.setStyles({ node.setStyles({
'position': 'absolute', 'position': 'absolute',
'display': 'inline-block', 'display': 'inline-block',
'backgroundImage': 'url(' + this.editor.get_stamp_image_url(edit.stamp) + ')', 'backgroundImage': 'url(' + this.editor.get_stamp_image_url(edit.stamp) + ')',
'width': bounds.width, 'width': bounds.width,
'height': bounds.height, 'height': bounds.height,
'backgroundSize': '100% 100%', 'backgroundSize': '100% 100%'
'zIndex': 50
}); });
drawingregion.append(node); drawingregion.append(node);

View file

@ -732,7 +732,6 @@ Y.extend(ANNOTATION, Y.Base, {
drawingregion.append(deletelink); drawingregion.append(deletelink);
deletelink.setData('annotation', this); deletelink.setData('annotation', this);
deletelink.setStyle('zIndex', '200');
deletelink.on('click', this.remove, this); deletelink.on('click', this.remove, this);
deletelink.on('key', this.remove, 'space,enter', this); deletelink.on('key', this.remove, 'space,enter', this);
@ -1576,14 +1575,15 @@ Y.extend(ANNOTATIONSTAMP, M.assignfeedback_editpdf.annotation, {
position = this.editor.get_window_coordinates(new M.assignfeedback_editpdf.point(this.x, this.y)); position = this.editor.get_window_coordinates(new M.assignfeedback_editpdf.point(this.x, this.y));
node = Y.Node.create('<div/>'); node = Y.Node.create('<div/>');
node.addClass('annotation');
node.addClass('stamp');
node.setStyles({ node.setStyles({
'position': 'absolute', 'position': 'absolute',
'display': 'inline-block', 'display': 'inline-block',
'backgroundImage': 'url(' + this.editor.get_stamp_image_url(this.path) + ')', 'backgroundImage': 'url(' + this.editor.get_stamp_image_url(this.path) + ')',
'width': (this.endx - this.x), 'width': (this.endx - this.x),
'height': (this.endy - this.y), 'height': (this.endy - this.y),
'backgroundSize': '100% 100%', 'backgroundSize': '100% 100%'
'zIndex': 50
}); });
drawingcanvas.append(node); drawingcanvas.append(node);
@ -1623,14 +1623,15 @@ Y.extend(ANNOTATIONSTAMP, M.assignfeedback_editpdf.annotation, {
position = this.editor.get_window_coordinates(new M.assignfeedback_editpdf.point(bounds.x, bounds.y)); position = this.editor.get_window_coordinates(new M.assignfeedback_editpdf.point(bounds.x, bounds.y));
node = Y.Node.create('<div/>'); node = Y.Node.create('<div/>');
node.addClass('annotation');
node.addClass('stamp');
node.setStyles({ node.setStyles({
'position': 'absolute', 'position': 'absolute',
'display': 'inline-block', 'display': 'inline-block',
'backgroundImage': 'url(' + this.editor.get_stamp_image_url(edit.stamp) + ')', 'backgroundImage': 'url(' + this.editor.get_stamp_image_url(edit.stamp) + ')',
'width': bounds.width, 'width': bounds.width,
'height': bounds.height, 'height': bounds.height,
'backgroundSize': '100% 100%', 'backgroundSize': '100% 100%'
'zIndex': 50
}); });
drawingregion.append(node); drawingregion.append(node);

View file

@ -212,7 +212,6 @@ Y.extend(ANNOTATION, Y.Base, {
drawingregion.append(deletelink); drawingregion.append(deletelink);
deletelink.setData('annotation', this); deletelink.setData('annotation', this);
deletelink.setStyle('zIndex', '200');
deletelink.on('click', this.remove, this); deletelink.on('click', this.remove, this);
deletelink.on('key', this.remove, 'space,enter', this); deletelink.on('key', this.remove, 'space,enter', this);

View file

@ -49,14 +49,15 @@ Y.extend(ANNOTATIONSTAMP, M.assignfeedback_editpdf.annotation, {
position = this.editor.get_window_coordinates(new M.assignfeedback_editpdf.point(this.x, this.y)); position = this.editor.get_window_coordinates(new M.assignfeedback_editpdf.point(this.x, this.y));
node = Y.Node.create('<div/>'); node = Y.Node.create('<div/>');
node.addClass('annotation');
node.addClass('stamp');
node.setStyles({ node.setStyles({
'position': 'absolute', 'position': 'absolute',
'display': 'inline-block', 'display': 'inline-block',
'backgroundImage': 'url(' + this.editor.get_stamp_image_url(this.path) + ')', 'backgroundImage': 'url(' + this.editor.get_stamp_image_url(this.path) + ')',
'width': (this.endx - this.x), 'width': (this.endx - this.x),
'height': (this.endy - this.y), 'height': (this.endy - this.y),
'backgroundSize': '100% 100%', 'backgroundSize': '100% 100%'
'zIndex': 50
}); });
drawingcanvas.append(node); drawingcanvas.append(node);
@ -96,14 +97,15 @@ Y.extend(ANNOTATIONSTAMP, M.assignfeedback_editpdf.annotation, {
position = this.editor.get_window_coordinates(new M.assignfeedback_editpdf.point(bounds.x, bounds.y)); position = this.editor.get_window_coordinates(new M.assignfeedback_editpdf.point(bounds.x, bounds.y));
node = Y.Node.create('<div/>'); node = Y.Node.create('<div/>');
node.addClass('annotation');
node.addClass('stamp');
node.setStyles({ node.setStyles({
'position': 'absolute', 'position': 'absolute',
'display': 'inline-block', 'display': 'inline-block',
'backgroundImage': 'url(' + this.editor.get_stamp_image_url(edit.stamp) + ')', 'backgroundImage': 'url(' + this.editor.get_stamp_image_url(edit.stamp) + ')',
'width': bounds.width, 'width': bounds.width,
'height': bounds.height, 'height': bounds.height,
'backgroundSize': '100% 100%', 'backgroundSize': '100% 100%'
'zIndex': 50
}); });
drawingregion.append(node); drawingregion.append(node);