Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
ARSnova Mobile
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Merge Requests
0
Merge Requests
0
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Thomas Rehm
ARSnova Mobile
Commits
cb29d769
Commit
cb29d769
authored
Jun 03, 2015
by
Thomas Rehm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FEATURE] Moved Text Checker Strict mode Options to TextChecker.js
parent
9d47cc30
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
7 deletions
+50
-7
TextChecker.js
src/main/webapp/app/view/speaker/form/TextChecker.js
+50
-7
No files found.
src/main/webapp/app/view/speaker/form/TextChecker.js
View file @
cb29d769
...
...
@@ -23,6 +23,10 @@ Ext.define('ARSnova.view.speaker.form.TextChecker', {
config
:
{
pressed
:
'
free
'
,
scrollable
:
null
,
ignoreCaseSensitive
:
false
,
ignoreWhitespaces
:
false
,
ignorePunctuation
:
false
,
cls
:
'
newQuestionOptions centerFormTitle
'
},
...
...
@@ -30,6 +34,44 @@ Ext.define('ARSnova.view.speaker.form.TextChecker', {
var
me
=
this
;
this
.
callParent
(
arguments
);
var
strictOptions
=
Ext
.
create
(
'
Ext.form.FieldSet
'
,
{
title
:
Messages
.
TEXT_CHECKER_STRICT_OPTIONS
,
hidden
:
true
,
items
:
[{
xtype
:
'
segmentedbutton
'
,
style
:
'
margin: auto
'
,
allowMultiple
:
true
,
//cls: 'yesnoOptions',
defaults
:
{
ui
:
'
action
'
,
style
:
'
width: 33.3%
'
},
items
:
[{
text
:
Messages
.
TEXT_CHECKER_IGNORE_CASE_SENSITIVE
,
pressed
:
this
.
getIgnoreCaseSensitive
(),
scope
:
this
,
handler
:
function
()
{
this
.
setIgnoreCaseSensitive
(
!
this
.
getIgnoreCaseSensitive
());
}
},{
text
:
Messages
.
TEXT_CHECKER_IGNORE_WHITESPACE
,
pressed
:
this
.
getIgnoreWhitespaces
(),
scope
:
this
,
handler
:
function
()
{
this
.
setIgnoreWhitespaces
(
!
this
.
getIgnoreWhitespaces
());
}
},
{
text
:
Messages
.
TEXT_CHECKER_IGNORE_PUNCTUATION
,
pressed
:
this
.
getIgnorePunctuation
(),
scope
:
this
,
handler
:
function
()
{
this
.
setIgnorePunctuation
(
!
this
.
getIgnorePunctuation
());
}
}]
}]
});
this
.
textCheckerStricktOptionsFormPart
=
Ext
.
create
(
'
ARSnova.view.speaker.form.textCheckerStricktOptionsForm
'
,
{
id
:
'
textCheckerStricktOptionsFormPart
'
,
hidden
:
true
...
...
@@ -41,7 +83,7 @@ Ext.define('ARSnova.view.speaker.form.TextChecker', {
mainFormPanel
.
hide
();
selectField
.
hide
();
ratingField
.
hide
();
me
.
textCheckerStricktOptionsFormPart
.
hide
();
strictOptions
.
hide
();
},
pressed
:
this
.
getPressed
()
===
'
free
'
});
...
...
@@ -72,7 +114,7 @@ Ext.define('ARSnova.view.speaker.form.TextChecker', {
var
easyButton
=
Ext
.
create
(
'
Ext.Button
'
,
{
text
:
Messages
.
TEXT_CHECKER_MODE_EASY
,
handler
:
function
()
{
me
.
textCheckerStricktOptionsFormPart
.
hide
();
strictOptions
.
hide
();
},
pressed
:
true
});
...
...
@@ -80,7 +122,7 @@ Ext.define('ARSnova.view.speaker.form.TextChecker', {
var
strictButton
=
Ext
.
create
(
'
Ext.Button
'
,
{
text
:
Messages
.
TEXT_CHECKER_MODE_STRICT
,
handler
:
function
()
{
me
.
textCheckerStricktOptionsFormPart
.
show
();
strictOptions
.
show
();
},
pressed
:
this
.
getPressed
()
===
'
strict
'
});
...
...
@@ -142,16 +184,17 @@ Ext.define('ARSnova.view.speaker.form.TextChecker', {
freefixField
,
mainFormPanel
,
selectField
,
this
.
textCheckerStricktOptionsFormPart
,
strictOptions
,
//this.textCheckerStricktOptionsFormPart,
ratingField
]);
},
getValues
:
function
()
{
var
result
=
{};
result
.
ignoreCaseSensitive
=
this
.
textCheckerStricktOptionsFormPart
.
getIgnoreCaseSensitive
();
result
.
ignoreWhitespaces
=
this
.
textCheckerStricktOptionsFormPart
.
getIgnoreWhitespaces
();
result
.
ignorePunctuation
=
this
.
textCheckerStricktOptionsFormPart
.
getIgnorePunctuation
();
result
.
ignoreCaseSensitive
=
this
.
getIgnoreCaseSensitive
();
result
.
ignoreWhitespaces
=
this
.
getIgnoreWhitespaces
();
result
.
ignorePunctuation
=
this
.
getIgnorePunctuation
();
return
result
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment