Commit 9d47cc30 authored by Thomas Rehm's avatar Thomas Rehm

[FEATURE] Layouted TextChecker UI Elements

parent ac779afa
......@@ -93,9 +93,10 @@ Ext.define('ARSnova.view.speaker.form.FreeTextQuestion', {
id: 'textChecker'
});
this.add([answerFieldset,
this.textAnswerFieldSet,
this.textChecker]);
this.add([this.textChecker,
answerFieldset,
this.textAnswerFieldSet
]);
},
getQuestionValues: function () {
......
......@@ -31,11 +31,12 @@ Ext.define('ARSnova.view.speaker.form.TextChecker', {
this.callParent(arguments);
this.textCheckerStricktOptionsFormPart = Ext.create('ARSnova.view.speaker.form.textCheckerStricktOptionsForm', {
id: 'textCheckerStricktOptionsFormPart'
});
id: 'textCheckerStricktOptionsFormPart',
hidden: true
});
var freeButton = Ext.create('Ext.Button', {
text: Messages.FREETEXT_BUTTON_FREE,
var freeAnswerButton = Ext.create('Ext.Button', {
text: Messages.TEXT_CHECKER_FREETEXT,
handler: function () {
mainFormPanel.hide();
selectField.hide();
......@@ -44,9 +45,9 @@ Ext.define('ARSnova.view.speaker.form.TextChecker', {
},
pressed: this.getPressed() === 'free'
});
var fixButton = Ext.create('Ext.Button', {
text: Messages.FREETEXT_BUTTON_FIX,
var fixAnswerButton = Ext.create('Ext.Button', {
text: Messages.TEXT_CHECKER_ADD_SOLUTION,
handler: function () {
mainFormPanel.show();
selectField.show();
......@@ -55,36 +56,36 @@ Ext.define('ARSnova.view.speaker.form.TextChecker', {
pressed: this.getPressed() === 'fix'
});
var ffSegmentedButton = Ext.create('Ext.SegmentedButton', {
var answerTypeSegmentedButton = Ext.create('Ext.SegmentedButton', {
style: 'margin: auto;',
defaults: {
ui: 'action',
style: 'width: 50%'
},
items:[freeButton, fixButton]
items:[freeAnswerButton, fixAnswerButton]
});
var freefixField = Ext.create('Ext.form.FieldSet', {
xtype: 'fieldset',
title: Messages.FREETEXT_QUESTION_TYPE,
items: [ffSegmentedButton]
title: Messages.TEXT_CHECKER_TITLE,
items: [answerTypeSegmentedButton]
});
var easyButton = Ext.create('Ext.Button', {
text: Messages.FREETEXT_BUTTON_EASY,
text: Messages.TEXT_CHECKER_MODE_EASY,
handler: function () {
me.textCheckerStricktOptionsFormPart.hide();
},
pressed: true
});
var strictButton = Ext.create('Ext.Button', {
text: Messages.FREETEXT_BUTTON_STRICT,
text: Messages.TEXT_CHECKER_MODE_STRICT,
handler: function () {
me.textCheckerStricktOptionsFormPart.show();
},
pressed: this.getPressed() === 'strict'
});
var esSegmentedButton = Ext.create('Ext.SegmentedButton', {
var textCheckerModeSegmentedButton = Ext.create('Ext.SegmentedButton', {
style: 'margin: auto;',
defaults: {
ui: 'action',
......@@ -94,14 +95,14 @@ Ext.define('ARSnova.view.speaker.form.TextChecker', {
});
var selectField = Ext.create('Ext.form.FieldSet', {
xtype: 'fieldset',
title: Messages.FREETEXT_CHECK,
items: [esSegmentedButton],
title: Messages.TEXT_CHECKER_MODE_LABEL,
items: [textCheckerModeSegmentedButton],
hidden: true
});
var rating = Ext.create("ARSnova.view.CustomSliderField", {
minValue: 0,
maxValue: 10,
value: 0,
value: 10,
increment: 1
});
......@@ -113,12 +114,13 @@ Ext.define('ARSnova.view.speaker.form.TextChecker', {
});
// Eingabefeld
var textarea = Ext.create('Ext.plugins.ResizableTextArea', {
name: 'text',
placeHolder: Messages.FORMAT_PLACEHOLDER
});
//sizearea has been deprecated by KQC
var sizearea = Ext.create('Ext.field.Text', {
name: 'size',
placeHolder: Messages.FREETEXT_SIZE
......@@ -130,7 +132,8 @@ Ext.define('ARSnova.view.speaker.form.TextChecker', {
items: [{
xtype: 'fieldset',
title: Messages.CORRECT_PLACEHOLDER,
items: [textarea, sizearea]
//sizearea has been deprecated by KQC
items: [textarea]
}],
hidden: true
});
......@@ -148,7 +151,7 @@ Ext.define('ARSnova.view.speaker.form.TextChecker', {
var result = {};
result.ignoreCaseSensitive = this.textCheckerStricktOptionsFormPart.getIgnoreCaseSensitive();
result.ignoreWhitespaces = this.textCheckerStricktOptionsFormPart.getIgnoreWhitespaces();
result.ignorePunctuation = this.textCheckerStricktOptionsFormPart.getIgnorePunctuation();
result.ignorePunctuation = this.textCheckerStricktOptionsFormPart.getIgnorePunctuation();
return result;
}
......
......@@ -20,7 +20,7 @@ Ext.define('ARSnova.view.speaker.form.textCheckerStricktOptionsForm', {
extend: 'Ext.form.FormPanel',
config: {
ignoreCaseSensitive: false,
ignoreWhitespaces: false,
ignorePunctuation: false,
......@@ -39,9 +39,10 @@ Ext.define('ARSnova.view.speaker.form.textCheckerStricktOptionsForm', {
xtype: 'segmentedbutton',
style: 'margin: auto',
allowMultiple: true,
cls: 'yesnoOptions',
//cls: 'yesnoOptions',
defaults: {
ui: 'action'
ui: 'action',
style: 'width: 33.3%'
},
items: [{
text: Messages.TEXT_CHECKER_IGNORE_CASE_SENSITIVE,
......
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