Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
typo3
qfq
Commits
e7dfc6c4
Commit
e7dfc6c4
authored
Dec 03, 2017
by
Carsten Rose
Browse files
Bug 4865: Labels are updated now. 'class="active"' on pills are lost.
parent
0d8850de
Changes
4
Hide whitespace changes
Inline
Side-by-side
doc/PROTOCOL.md
View file @
e7dfc6c4
...
...
@@ -42,7 +42,7 @@ Stream
{
"status": "error",
...
"field-name": "<field name>",
"field-name": "<field name>",
"field-message": "<message>",
...
}
...
...
extension/qfq/qfq/AbstractBuildForm.php
View file @
e7dfc6c4
...
...
@@ -71,7 +71,7 @@ abstract class AbstractBuildForm {
private
$bodytextParser
=
null
;
/**
* @var Array of Database instantiated class
* @var
Database[]
Array of Database instantiated class
*/
protected
$dbArray
=
array
();
...
...
extension/qfq/qfq/BuildFormBootstrap.php
View file @
e7dfc6c4
...
...
@@ -380,7 +380,9 @@ class BuildFormBootstrap extends AbstractBuildForm {
// Iterate over all 'pill'
$ii
=
0
;
$active
=
'class="active"'
;
$recordId
=
$this
->
store
->
getVar
(
COLUMN_ID
,
STORE_RECORD
.
STORE_ZERO
);
foreach
(
$pillArray
as
$formElement
)
{
$htmlIdLi
=
$formElement
[
FE_HTML_ID
]
.
HTML_ID_EXTENSION_PILL_LI
;
$htmlIdLiA
=
$formElement
[
FE_HTML_ID
]
.
HTML_ID_EXTENSION_PILL_LI_A
;
...
...
@@ -405,35 +407,37 @@ class BuildFormBootstrap extends AbstractBuildForm {
$attributeLiA
=
'data-toggle="tab" '
;
$hrefTarget
=
'#'
.
$this
->
createAnker
(
$formElement
[
FE_ID
]);
$htmlFormElementName
=
HelperFormElement
::
buildFormElementName
(
$formElement
,
$recordId
);
switch
(
$formElement
[
FE_MODE
])
{
case
FE_MODE_SHOW
:
case
FE_MODE_REQUIRED
:
$attributeLi
=
''
;
$json
[
API_ELEMENT_UPDATE
][
$htmlIdLi
][
API_ELEMENT_ATTRIBUTE
][
'class'
]
=
''
;
$json
[
API_ELEMENT_UPDATE
][
$htmlIdLiA
][
API_ELEMENT_ATTRIBUTE
][
'class'
]
=
''
;
$json
[
$htmlFormElementName
][
API_ELEMENT_UPDATE
][
$htmlIdLi
][
API_ELEMENT_ATTRIBUTE
][
HTML_ATTR_CLASS
]
=
''
;
$json
[
$htmlFormElementName
][
API_ELEMENT_UPDATE
][
$htmlIdLiA
][
API_ELEMENT_ATTRIBUTE
][
HTML_ATTR_CLASS
]
=
''
;
break
;
case
FE_MODE_READONLY
:
$attributeLi
=
Support
::
doAttribute
(
'class'
,
'disabled'
);
$json
[
API_ELEMENT_UPDATE
][
$htmlIdLi
][
API_ELEMENT_ATTRIBUTE
][
'class'
]
=
'disabled'
;
$json
[
$htmlFormElementName
][
API_ELEMENT_UPDATE
][
$htmlIdLi
][
API_ELEMENT_ATTRIBUTE
][
HTML_ATTR_CLASS
]
=
'disabled'
;
$hrefTarget
=
'#'
;
$attributeLiA
.
=
Support
::
doAttribute
(
'class'
,
'noclick'
);
$json
[
API_ELEMENT_UPDATE
][
$htmlIdLiA
][
API_ELEMENT_ATTRIBUTE
][
'class'
]
=
'noclick'
;
$json
[
$htmlFormElementName
][
API_ELEMENT_UPDATE
][
$htmlIdLiA
][
API_ELEMENT_ATTRIBUTE
][
HTML_ATTR_CLASS
]
=
'noclick'
;
break
;
case
FE_MODE_HIDDEN
:
// $attributeLi = Support::doAttribute('style', 'display: none');
$attributeLi
=
Support
::
doAttribute
(
'class'
,
'hidden'
);
$json
[
API_ELEMENT_UPDATE
][
$htmlIdLi
][
API_ELEMENT_ATTRIBUTE
][
'class'
]
=
'hidden'
;
$json
[
$htmlFormElementName
][
API_ELEMENT_UPDATE
][
$htmlIdLi
][
API_ELEMENT_ATTRIBUTE
][
HTML_ATTR_CLASS
]
=
'hidden'
;
$a
=
''
;
break
;
default
:
throw
new
UserFormException
(
"Unknown Mode: "
.
$formElement
[
FE_MODE
],
ERROR_UNKNOWN_MODE
);
}
$attributeLi
.
=
Support
::
doAttribute
(
'id'
,
$htmlIdLi
);
$attributeLiA
.
=
Support
::
doAttribute
(
'id'
,
$htmlIdLiA
);
$attributeLi
.
=
Support
::
doAttribute
(
HTML_ATTR_ID
,
$htmlIdLi
);
$attributeLiA
.
=
Support
::
doAttribute
(
HTML_ATTR_ID
,
$htmlIdLiA
);
$a
=
Support
::
wrapTag
(
"<a
$attributeLiA
"
.
Support
::
doAttribute
(
'href'
,
$hrefTarget
)
.
">"
,
$formElement
[
FE_LABEL
]);
$json
[
$htmlFormElementName
][
API_ELEMENT_UPDATE
][
$htmlIdLiA
][
API_ELEMENT_CONTENT
]
=
$formElement
[
FE_LABEL
];
if
(
$ii
<=
$maxVisiblePill
)
{
$pillButton
.
=
'<li role="presentation"'
.
$attributeLi
.
$active
.
">"
.
$a
.
"</li>"
;
...
...
extension/qfq/qfq/Constants.php
View file @
e7dfc6c4
...
...
@@ -989,6 +989,10 @@ const HTML_ID_EXTENSION_CHARACTER_COUNT = '-cc';
const
HTML_ID_EXTENSION_PILL_LI
=
'-pl'
;
const
HTML_ID_EXTENSION_PILL_LI_A
=
'-pla'
;
const
HTML_ATTR_ID
=
'id'
;
const
HTML_ATTR_NAME
=
'name'
;
const
HTML_ATTR_CLASS
=
'class'
;
const
SHEBANG_REPORT
=
'#!report'
;
// SUPPORT
...
...
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