...
 
Commits (7)
# 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.
......
......@@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>de.thm.arsnova</groupId>
<artifactId>arsnova-mobile</artifactId>
<version>2.7.1-SNAPSHOT</version>
<version>2.7.2-SNAPSHOT</version>
<packaging>war</packaging>
<name>ARSnova Mobile</name>
......
......@@ -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) {
......
......@@ -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";
});
};
......
......@@ -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);
});
......
......@@ -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;
......