Merge branch 'MDL-42355_editpdf_deselect_comment' of git://github.com/davosmith/moodle

Conflicts:
	mod/assign/feedback/editpdf/yui/build/moodle-assignfeedback_editpdf-editor/moodle-assignfeedback_editpdf-editor-min.js
This commit is contained in:
Dan Poltawski
2013-11-04 20:10:24 +08:00
5 changed files with 52 additions and 4 deletions
@@ -2373,6 +2373,7 @@ COMMENT = function(editor, gradeid, pageno, x, y, width, colour, rawtext) {
Y.later(400, this, this.delete_comment_later);
}
this.editor.save_current_page();
this.editor.editingcomment = false;
}, this);
// For delegated event handler.
@@ -3000,6 +3001,16 @@ EDITOR.prototype = {
*/
stamps : [],
/**
* Prevent new comments from appearing
* immediately after clicking off a current
* comment
* @property editingcomment
* @type Boolean
* @public
*/
editingcomment : false,
/**
* Called during the initialisation process of the object.
* @method initializer
@@ -3502,6 +3513,10 @@ EDITOR.prototype = {
return;
}
if (this.editingcomment) {
return;
}
this.currentedit.starttime = new Date().getTime();
this.currentedit.start = point;
this.currentedit.end = {x : point.x, y : point.y};
@@ -3603,6 +3618,7 @@ EDITOR.prototype = {
comment.init_from_edit(this.currentedit);
this.pages[this.currentpage].comments.push(comment);
this.drawables.push(comment.draw(true));
this.editingcomment = true;
} else {
annotation = this.create_annotation(this.currentedit.tool, {});
if (annotation) {
File diff suppressed because one or more lines are too long
@@ -2373,6 +2373,7 @@ COMMENT = function(editor, gradeid, pageno, x, y, width, colour, rawtext) {
Y.later(400, this, this.delete_comment_later);
}
this.editor.save_current_page();
this.editor.editingcomment = false;
}, this);
// For delegated event handler.
@@ -3000,6 +3001,16 @@ EDITOR.prototype = {
*/
stamps : [],
/**
* Prevent new comments from appearing
* immediately after clicking off a current
* comment
* @property editingcomment
* @type Boolean
* @public
*/
editingcomment : false,
/**
* Called during the initialisation process of the object.
* @method initializer
@@ -3502,6 +3513,10 @@ EDITOR.prototype = {
return;
}
if (this.editingcomment) {
return;
}
this.currentedit.starttime = new Date().getTime();
this.currentedit.start = point;
this.currentedit.end = {x : point.x, y : point.y};
@@ -3603,6 +3618,7 @@ EDITOR.prototype = {
comment.init_from_edit(this.currentedit);
this.pages[this.currentpage].comments.push(comment);
this.drawables.push(comment.draw(true));
this.editingcomment = true;
} else {
annotation = this.create_annotation(this.currentedit.tool, {});
if (annotation) {
@@ -244,6 +244,7 @@ COMMENT = function(editor, gradeid, pageno, x, y, width, colour, rawtext) {
Y.later(400, this, this.delete_comment_later);
}
this.editor.save_current_page();
this.editor.editingcomment = false;
}, this);
// For delegated event handler.
+15
View File
@@ -171,6 +171,16 @@ EDITOR.prototype = {
*/
stamps : [],
/**
* Prevent new comments from appearing
* immediately after clicking off a current
* comment
* @property editingcomment
* @type Boolean
* @public
*/
editingcomment : false,
/**
* Called during the initialisation process of the object.
* @method initializer
@@ -673,6 +683,10 @@ EDITOR.prototype = {
return;
}
if (this.editingcomment) {
return;
}
this.currentedit.starttime = new Date().getTime();
this.currentedit.start = point;
this.currentedit.end = {x : point.x, y : point.y};
@@ -774,6 +788,7 @@ EDITOR.prototype = {
comment.init_from_edit(this.currentedit);
this.pages[this.currentpage].comments.push(comment);
this.drawables.push(comment.draw(true));
this.editingcomment = true;
} else {
annotation = this.create_annotation(this.currentedit.tool, {});
if (annotation) {