Skip to content
GitLab
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
b6c52394
Commit
b6c52394
authored
Dec 05, 2019
by
Carsten Rose
Browse files
Merge remote-tracking branch 'origin/b7974-tinyMCE' into develop
parents
102af1d6
d3c58318
Pipeline
#2873
passed with stages
in 3 minutes and 28 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
extension/Classes/Core/AbstractBuildForm.php
View file @
b6c52394
...
...
@@ -1178,6 +1178,7 @@ abstract class AbstractBuildForm {
$json
[
API_ELEMENT_UPDATE
][
$key
][
API_ELEMENT_ATTRIBUTE
][
'class'
]
=
$class
;
$json
[
API_ELEMENT_UPDATE
][
$key
][
API_ELEMENT_ATTRIBUTE
][
'required'
]
=
(
$formElement
[
FE_MODE
]
==
'required'
);
$json
[
API_ELEMENT_UPDATE
][
$key
][
API_ELEMENT_ATTRIBUTE
][
'hidden'
]
=
$statusHidden
;
$json
[
API_ELEMENT_UPDATE
][
$key
][
API_ELEMENT_ATTRIBUTE
][
'readonly'
]
=
$json
[
'disabled'
]
?
'readonly'
:
'false'
;
if
(
$pattern
!==
null
)
{
$json
[
API_ELEMENT_UPDATE
][
$key
][
API_ELEMENT_ATTRIBUTE
][
'pattern'
]
=
$pattern
;
...
...
javascript/src/Helper/tinyMCE.js
View file @
b6c52394
...
...
@@ -68,21 +68,23 @@ QfqNS.Helper = QfqNS.Helper || {};
});
/* Remove ReadOnly Again - we have to implement tinymce differently
to make it easier to change such
attributes
*/
to make it easier to change such */
var
me
=
editor
;
var
$parent
=
$
(
config
.
selector
);
$parent
.
parent
(
'
div
'
).
mouseenter
(
function
(
e
)
{
if
(
$parent
.
is
(
'
[readonly="
readonly
"]
'
)
)
{
$parent
.
on
(
"
blur
"
,
function
(
e
,
configuration
)
{
if
(
configuration
.
disabled
||
configuration
.
readonly
)
{
me
.
setMode
(
"
readonly
"
);
$
(
this
).
siblings
(
"
.mce-tinymce
"
).
addClass
(
"
qfq-tinymce-readonly
"
);
}
else
{
me
.
setMode
(
"
design
"
);
$
(
this
).
siblings
(
"
.mce-tinymce
"
).
removeClass
(
"
qfq-tinymce-readonly
"
);
}
});
};
tinymce
.
init
(
config
);
if
(
$
(
this
).
is
(
'
[
readonly
]
'
))
{
if
(
$
(
this
).
is
(
'
[
disabled
]
'
))
{
myEditor
.
setMode
(
"
readonly
"
);
}
}
...
...
javascript/src/QfqForm.js
View file @
b6c52394
...
...
@@ -1231,6 +1231,14 @@ var QfqNS = QfqNS || {};
try
{
var
element
=
n
.
Element
.
getElement
(
formElementName
);
// Cleaner way to set states for tinymce
// This triggers the event on the unaccesable textarea
// The tinymce registers a listener on the textarea
// See helper/tinyMCE.js for details
if
(
element
.
$element
.
hasClass
(
'
qfq-tinymce
'
))
{
element
.
$element
.
trigger
(
"
blur
"
,
[
configurationItem
]);
}
if
(
configurationItem
.
value
!==
undefined
)
{
element
.
setValue
(
configurationItem
.
value
);
}
...
...
less/qfq-bs.css.less
View file @
b6c52394
...
...
@@ -355,6 +355,10 @@ i.@{spinner_class} {
/* ERROR END */
.qfq-tinymce-readonly .mce-panel {
background-color: #eee;
}
/* inline elements in horizontal mode are too much left */
.form-horizontal {
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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