Merge branch 'MDL-57097-master' of git://github.com/lameze/moodle

This commit is contained in:
David Monllao
2016-11-29 10:51:10 +08:00
2 changed files with 6 additions and 1 deletions
File diff suppressed because one or more lines are too long
+5
View File
@@ -347,6 +347,11 @@ define(['jquery', 'core/yui', 'core/notification', 'core/templates', 'core/fragm
*/
GradingPanel.prototype.registerEventListeners = function() {
var docElement = $(document);
var region = $(this._region);
// Add an event listener to prevent form submission when pressing enter key.
region.on('submit', 'form', function(e) {
e.preventDefault();
});
docElement.on('user-changed', this._refreshGradingPanel.bind(this));
docElement.on('save-changes', this._submitForm.bind(this));