diff --git a/CHANGELOG.md b/CHANGELOG.md index 397a52dce1cb0f42ea34220a22cf7c45a11c23ac..00ca52024e3b71bb6a1199426c9ed05485f60b40 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +# 2.7.1 +Bug fixes: +* Rendering of `<hlcode>` elements (broken in 2.7.0) works again. +* Abstentions for grid questions have been fixed. +* A JavaScript `TypeError` caused by fullscreen mode in some modern browsers has + been fixed. + ## 2.7 Features: * Users can now delete their own account through the settings panel. diff --git a/src/main/webapp/app/controller/Application.js b/src/main/webapp/app/controller/Application.js index c91faf17a529df68c6a1ee7fec5b0aed9913ddc0..060e5e6045563e2fd1c75243b4ab1b198bc7463d 100644 --- a/src/main/webapp/app/controller/Application.js +++ b/src/main/webapp/app/controller/Application.js @@ -192,9 +192,10 @@ Ext.define("ARSnova.controller.Application", { !document.webkitFullscreenElement && !document.msFullscreenElement; - if (activate && !isFullscreenModeDisabled) { + if (activate !== isFullscreenModeDisabled) { return; - } else if (activate && isFullscreenModeDisabled) { + } + if (activate) { if (document.documentElement.requestFullscreen) { document.documentElement.requestFullscreen(); } else if (document.documentElement.msRequestFullscreen) { diff --git a/src/main/webapp/app/view/MathJaxMarkDownPanel.js b/src/main/webapp/app/view/MathJaxMarkDownPanel.js index ac247d2681c76f620db604ff51e4181f64942546..116f8da56fcf32863a273f5dc4be1ee50f5cca82 100644 --- a/src/main/webapp/app/view/MathJaxMarkDownPanel.js +++ b/src/main/webapp/app/view/MathJaxMarkDownPanel.js @@ -60,7 +60,7 @@ Ext.define('ARSnova.view.MathJaxMarkDownPanel', { var replaceCodeBlockFromContent = function (content) { return content.replace(/<hlcode>([\s\S]*?)<\/hlcode>/g, function (element) { var codeBlockMatch = element.match(/^<hlcode>\s*([\s\S]*?)\s*<\/hlcode>$/)[1]; - return "\n```auto\n" + codeBlockMatch + "```\n"; + return "\n```auto\n" + codeBlockMatch + "\n```\n"; }); }; diff --git a/src/main/webapp/app/view/Question.js b/src/main/webapp/app/view/Question.js index aa8f52f83afa893633def0a5c2135b5f28fc6b6a..535bdcbdc7d6d12be051b8931266d046f1d704ec 100755 --- a/src/main/webapp/app/view/Question.js +++ b/src/main/webapp/app/view/Question.js @@ -640,6 +640,9 @@ Ext.define('ARSnova.view.Question', { saveGridQuestionHandler: function (grid) { var me = this; + if (this.grid.getChosenFields().length === 0) { + return; + } Ext.Msg.confirm('', Messages.SUBMIT_ANSWER, function (button) { if (button !== 'yes') { return; @@ -664,7 +667,9 @@ Ext.define('ARSnova.view.Question', { mcAbstentionHandler: function () { var me = this; - me.answerList.deselectAll(); + if (me.answerList) { + me.answerList.deselectAll(); + } Ext.Msg.confirm('', Messages.SUBMIT_ANSWER, function (button) { if (button !== 'yes') { return; @@ -672,7 +677,7 @@ Ext.define('ARSnova.view.Question', { me.getUserAnswer().then(function (answer) { answer.set('abstention', true); - me.answerList.deselectAll(); + answer.set('answerText', null); me.saveAnswer(answer); }); diff --git a/src/main/webapp/app/view/user/QuestionPanel.js b/src/main/webapp/app/view/user/QuestionPanel.js index 272500ca289447ba35d9e2933a1775378cb251b1..0f41ccd42b6ffed370254ee67e2c5f4d703b4e6a 100644 --- a/src/main/webapp/app/view/user/QuestionPanel.js +++ b/src/main/webapp/app/view/user/QuestionPanel.js @@ -345,7 +345,7 @@ Ext.define('ARSnova.view.user.QuestionPanel', { return; } - if (questionObj.isAbstentionAnswer && "mc" !== questionObj.questionType) { + if (questionObj.isAbstentionAnswer && ["mc", "grid"].indexOf(questionObj.questionType) === -1) { questionPanel.selectAbstentionAnswer(); questionPanel.disableQuestion(); return;