Commit c8395d84 authored by Cedric Takongmo's avatar Cedric Takongmo

ignoreSensitiveCase.js deleted, new design added ('Which of the following...

ignoreSensitiveCase.js deleted, new design added ('Which of the following options should be ignored?'...)
parent 0b91d22d
......@@ -122,7 +122,7 @@ Ext.define("ARSnova.controller.Questions", {
possibleAnswers: options.possibleAnswers,
noCorrect: options.noCorrect,
abstention: options.abstention,
ignoreSensitiveCase: options.ignoreSensitiveCase,
textCheckerStricktOptions: options.textCheckerStricktOptions,
gridSize: options.gridSize,
offsetX: options.offsetX,
offsetY: options.offsetY,
......
......@@ -33,7 +33,7 @@ Ext.define('ARSnova.model.Answer', {
'questionId',
'sessionId',
'abstention',
'ignoreSensitiveCase',
'textCheckerStricktOptions',
'timestamp',
'questionVariant',
'questionValue',
......
......@@ -58,7 +58,7 @@ Ext.define('ARSnova.model.Question', {
'offsetY',
'zoomLvl',
'image',
'ignoreSensitiveCase',
'textCheckerStricktOptions',
'fcImage',
'gridOffsetX',
'gridOffsetY',
......
......@@ -32,7 +32,7 @@ Ext.define('ARSnova.view.speaker.NewQuestionPanel', {
'ARSnova.view.speaker.form.FreeTextQuestion',
'ARSnova.view.speaker.form.ImageUploadPanel',
'ARSnova.view.MarkDownEditorPanel',
'ARSnova.view.speaker.form.ignoreSensitiveCaseForm'
'ARSnova.view.speaker.form.textCheckerStricktOptionsForm'
],
config: {
......@@ -149,8 +149,8 @@ Ext.define('ARSnova.view.speaker.NewQuestionPanel', {
id: 'abstentionPart'
});
this.ignoreSensitiveCaseFormPart = Ext.create('ARSnova.view.speaker.form.ignoreSensitiveCaseForm', {
id: 'ignoreSensitiveCaseFormPart'
this.textCheckerStricktOptionsFormPart = Ext.create('ARSnova.view.speaker.form.textCheckerStricktOptionsForm', {
id: 'textCheckerStricktOptionsFormPart'
});
this.uploadView = Ext.create('ARSnova.view.speaker.form.ImageUploadPanel', {
......@@ -427,7 +427,7 @@ Ext.define('ARSnova.view.speaker.NewQuestionPanel', {
me.abstentionPart,
me.uploadView,
me.grid,
me.ignoreSensitiveCaseFormPart
me.textCheckerStricktOptionsFormPart
]);
if (me.gridQuestion) {
me.add(me.gridQuestion);
......@@ -462,7 +462,7 @@ Ext.define('ARSnova.view.speaker.NewQuestionPanel', {
values.text = mainPartValues.text;
values.subject = mainPartValues.subject;
values.abstention = !panel.abstentionPart.isHidden() && panel.abstentionPart.getAbstention();
values.ignoreSensitiveCase= !panel.ignoreSensitiveCaseFormPart.isHidden() && panel.ignoreSensitiveCaseFormPart.getIgnoreSensitiveCase();
values.textCheckerStricktOptions= !panel.textCheckerStricktOptionsFormPart.isHidden() && panel.textCheckerStricktOptionsFormPart.gettextCheckerStricktOptions();
values.questionVariant = panel.getVariant();
values.image = this.image;
values.flashcardImage = null;
......@@ -582,7 +582,7 @@ Ext.define('ARSnova.view.speaker.NewQuestionPanel', {
releasedFor: values.releasedFor,
noCorrect: values.noCorrect,
abstention: values.abstention,
ignoreSensitiveCase: values.ignoreSensitiveCase,
textCheckerStricktOptions: values.textCheckerStricktOptions,
showStatistic: 1,
gridSize: values.gridSize,
offsetX: values.offsetX,
......
......@@ -42,7 +42,7 @@ Ext.define('FreetextAnswer', {
'groupDate',
'questionId',
'abstention',
'ignoreSensitiveCase',
'textCheckerStricktOptions',
'answerText',
'piRound',
'sessionId',
......@@ -68,7 +68,7 @@ Ext.define('ARSnova.view.speaker.QuestionDetailsPanel', {
'ARSnova.view.speaker.form.YesNoQuestion',
'ARSnova.view.speaker.form.FlashcardQuestion',
'ARSnova.view.speaker.QuestionStatisticChart',
'ARSnova.view.speaker.form.ignoreSensitiveCaseForm'
'ARSnova.view.speaker.form.textCheckerStricktOptionsForm'
],
config: {
......@@ -334,7 +334,7 @@ Ext.define('ARSnova.view.speaker.QuestionDetailsPanel', {
if (panel.questionObj.questionType === 'flashcard') {
panel.abstentionPart.hide();
panel.ignoreSensitiveCaseFormPart.hide();
panel.textCheckerStricktOptionsFormPart.hide();
if (panel.questionObj.fcImage) {
panel.answerEditForm.setFcImage(panel.questionObj.fcImage);
......@@ -343,7 +343,7 @@ Ext.define('ARSnova.view.speaker.QuestionDetailsPanel', {
if (questionValues.gridType === "moderation") {
panel.abstentionPart.setHidden(true);
panel.ignoreSensitiveCaseFormPart.setHidden(true);
panel.textCheckerStricktOptionsFormPart.setHidden(true);
panel.absteionAlternative.show();
} else {
panel.absteionAlternative.hide();
......@@ -359,11 +359,11 @@ Ext.define('ARSnova.view.speaker.QuestionDetailsPanel', {
question.set("subject", values.subject);
question.set("text", values.questionText);
question.set("abstention", panel.abstentionPart.getAbstention());
question.set("ignoreSensitiveCase", panel.ignoreSensitiveCaseFormPart.getIgnoreSensitiveCase());
question.set("textCheckerStricktOptions", panel.textCheckerStricktOptionsFormPart.gettextCheckerStricktOptions());
question.raw.subject = values.subject;
question.raw.text = values.questionText;
question.raw.abstention = panel.abstentionPart.getAbstention();
question.raw.ignoreSensitiveCase = panel.abstentionPart.getIgnoreSensitiveCase();
question.raw.textCheckerStricktOptions = panel.abstentionPart.gettextCheckerStricktOptions();
panel.subject.resetOriginalValue();
panel.textarea.resetOriginalValue();
......@@ -459,7 +459,7 @@ Ext.define('ARSnova.view.speaker.QuestionDetailsPanel', {
}
panel.answerEditForm.setHidden(!enable);
panel.abstentionPart.setHidden(!enable);
panel.ignoreSensitiveCaseFormPart.setHidden(!enable);
panel.textCheckerStricktOptionsFormPart.setHidden(!enable);
}
});
......@@ -767,8 +767,8 @@ Ext.define('ARSnova.view.speaker.QuestionDetailsPanel', {
hidden: true
});
this.ignoreSensitiveCaseFormPart = Ext.create('ARSnova.view.speaker.form.ignoreSensitiveCaseForm', {
abstention: this.questionObj.ignoreSensitiveCase,
this.textCheckerStricktOptionsFormPart = Ext.create('ARSnova.view.speaker.form.textCheckerStricktOptionsForm', {
textCheckerStricktOptions: this.questionObj.textCheckerStricktOptions,
hidden: true
});
......@@ -831,7 +831,7 @@ Ext.define('ARSnova.view.speaker.QuestionDetailsPanel', {
},
this.actionsPanel,
this.abstentionPart,
this.ignoreSensitiveCaseFormPart,
this.textCheckerStricktOptionsFormPart,
this.absteionAlternative,
this.answerForm,
this.answerEditForm,
......
......@@ -16,11 +16,15 @@
* You should have received a copy of the GNU General Public License
* along with ARSnova Mobile. If not, see <http://www.gnu.org/licenses/>.
*/
Ext.define('ARSnova.view.speaker.form.ignoreSensitiveCaseForm', {
Ext.define('ARSnova.view.speaker.form.textCheckerStricktOptionsForm', {
extend: 'Ext.form.FormPanel',
config: {
ignoreSensitiveCase: true,
textCheckerStricktOptions: {
ignoreCaseSensitive: false,
ignoreWhitespaces: false,
ignorePunctuation: false
},
scrollable: null,
cls: 'newQuestionOptions centerFormTitle'
......@@ -31,7 +35,7 @@ Ext.define('ARSnova.view.speaker.form.ignoreSensitiveCaseForm', {
this.add([{
xtype: 'fieldset',
title: Messages.TEXT_CHECKER_IGNORE_CASE_SENSITIVE,
title: Messages.TEXT_CHECKER_STRICT_OPTIONS,
items: [{
xtype: 'segmentedbutton',
style: 'margin: auto',
......@@ -40,18 +44,25 @@ Ext.define('ARSnova.view.speaker.form.ignoreSensitiveCaseForm', {
ui: 'action'
},
items: [{
text: Messages.YES,
pressed: this.getIgnoreSensitiveCase(),
text: Messages.TEXT_CHECKER_IGNORE_CASE_SENSITIVE,
pressed: this.gettextCheckerStricktOptions().ignoreCaseSensitive,
scope: this,
handler: function () {
this.setIgnoreSensitiveCase(true);
this.gettextCheckerStricktOptions().ignoreCaseSensitive = !this.gettextCheckerStricktOptions().ignoreCaseSensitive;
}
},{
text: Messages.TEXT_CHECKER_IGNORE_WHITESPACE,
pressed: this.gettextCheckerStricktOptions().ignoreWhitespaces,
scope: this,
handler: function () {
this.gettextCheckerStricktOptions().ignoreWhitespaces = !this.gettextCheckerStricktOptions().ignoreWhitespaces;
}
}, {
text: Messages.NO,
pressed: !this.getIgnoreSensitiveCase(),
text: Messages.TEXT_CHECKER_IGNORE_PUNCTUATION,
pressed: !this.gettextCheckerStricktOptions().ignorePunctuation ,
scope: this,
handler: function () {
this.setIgnoreSensitiveCase(false);
this.gettextCheckerStricktOptions().ignorePunctuation = !this.gettextCheckerStricktOptions().ignorePunctuation;
}
}]
}]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment