Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
typo3
qfq
Commits
cb5aabdf
Commit
cb5aabdf
authored
May 18, 2017
by
Rafael Ostertag
Browse files
Allow spaces in value when selection <radio> and <select> tags.
parent
d750eeec
Changes
2
Show whitespace changes
Inline
Side-by-side
javascript/src/Element/Radio.js
View file @
cb5aabdf
...
...
@@ -38,7 +38,7 @@ QfqNS.Element = QfqNS.Element || {};
Radio
.
prototype
.
setValue
=
function
(
val
)
{
this
.
$element
.
prop
(
'
checked
'
,
false
);
this
.
$element
.
filter
(
'
[value=
'
+
val
+
"
]
"
).
prop
(
'
checked
'
,
true
);
this
.
$element
.
filter
(
'
[value=
"
'
+
val
.
replace
(
/"/g
,
"
\\\"
"
)
+
'
"]
'
).
prop
(
'
checked
'
,
true
);
};
Radio
.
prototype
.
getValue
=
function
()
{
...
...
javascript/src/Element/Select.js
View file @
cb5aabdf
...
...
@@ -77,7 +77,7 @@ QfqNS.Element = QfqNS.Element || {};
// First, see if we find an <option> tag having an attribute 'value' matching val. If that doesn't work,
// fall back to comparing text content of <option> tags.
var
$selectionByValue
=
this
.
$element
.
find
(
'
option[value=
'
+
val
+
'
]
'
);
var
$selectionByValue
=
this
.
$element
.
find
(
'
option[value=
"
'
+
val
.
replace
(
/"/g
,
"
\\\"
"
)
+
'
"
]
'
);
if
(
$selectionByValue
.
length
>
0
)
{
$selectionByValue
.
prop
(
'
selected
'
,
true
);
}
else
{
...
...
Carsten Rose
@carsten.rose
mentioned in commit
44b9b4c3
·
May 18, 2017
mentioned in commit
44b9b4c3
mentioned in commit 44b9b4c3b78148e052ece382ab4b9b286f972a11
Toggle commit list
Write
Preview
Supports
Markdown
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