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
bc8ddbb0
Commit
bc8ddbb0
authored
Dec 10, 2019
by
Benjamin Baer
Browse files
Merge branch 'B9734-dirtyLockRelease' into 'develop'
B9734 dirty lock release See merge request
!220
parents
b6c52394
9e078315
Pipeline
#2909
passed with stages
in 3 minutes and 25 seconds
Changes
2
Pipelines
2
Show whitespace changes
Inline
Side-by-side
javascript/src/Element/FormGroup.js
View file @
bc8ddbb0
...
@@ -172,7 +172,14 @@ QfqNS.Element = QfqNS.Element || {};
...
@@ -172,7 +172,14 @@ QfqNS.Element = QfqNS.Element || {};
* @param required
* @param required
*/
*/
n
.
FormGroup
.
prototype
.
setRequired
=
function
(
required
)
{
n
.
FormGroup
.
prototype
.
setRequired
=
function
(
required
)
{
if
(
this
.
$element
.
is
(
'
div
'
))
{
if
(
!!
this
.
$element
.
find
(
'
input
'
))
{
console
.
log
(
"
children found
"
);
this
.
$element
.
find
(
'
input
'
).
prop
(
'
required
'
,
required
);
}
}
else
{
this
.
$element
.
prop
(
'
required
'
,
required
);
this
.
$element
.
prop
(
'
required
'
,
required
);
}
};
};
/**
/**
...
@@ -181,9 +188,9 @@ QfqNS.Element = QfqNS.Element || {};
...
@@ -181,9 +188,9 @@ QfqNS.Element = QfqNS.Element || {};
*/
*/
n
.
FormGroup
.
prototype
.
setError
=
function
(
isError
)
{
n
.
FormGroup
.
prototype
.
setError
=
function
(
isError
)
{
if
(
isError
)
{
if
(
isError
)
{
this
.
$formGroup
.
addClass
(
"
hullahoop
has-error has-danger
"
);
this
.
$formGroup
.
addClass
(
"
has-error has-danger
"
);
}
else
{
}
else
{
this
.
$formGroup
.
removeClass
(
"
hullahoop
has-error has-danger
"
);
this
.
$formGroup
.
removeClass
(
"
has-error has-danger
"
);
}
}
};
};
...
...
javascript/src/QfqForm.js
View file @
bc8ddbb0
...
@@ -152,6 +152,11 @@ var QfqNS = QfqNS || {};
...
@@ -152,6 +152,11 @@ var QfqNS = QfqNS || {};
this
.
form
.
on
(
'
form.validation.failed
'
,
this
.
validationError
);
this
.
form
.
on
(
'
form.validation.failed
'
,
this
.
validationError
);
this
.
form
.
on
(
'
form.validation.success
'
,
this
.
validationSuccess
);
this
.
form
.
on
(
'
form.validation.success
'
,
this
.
validationSuccess
);
// Solves problem of leaving the page without releasing locks.
window
.
onbeforeunload
=
function
(
e
)
{
that
.
releaseLock
();
};
$
(
"
.radio-inline
"
).
append
(
$
(
"
<span>
"
,
{
class
:
"
checkmark
"
,
aria
:
"
hidden
"
}));
$
(
"
.radio-inline
"
).
append
(
$
(
"
<span>
"
,
{
class
:
"
checkmark
"
,
aria
:
"
hidden
"
}));
$
(
"
.checkbox-inline
"
).
append
(
$
(
"
<span>
"
,
{
class
:
"
checkmark
"
,
aria
:
"
hidden
"
}));
$
(
"
.checkbox-inline
"
).
append
(
$
(
"
<span>
"
,
{
class
:
"
checkmark
"
,
aria
:
"
hidden
"
}));
$
(
"
.radio
"
).
append
(
$
(
"
<span>
"
,
{
class
:
"
checkmark
"
,
aria
:
"
hidden
"
}));
$
(
"
.radio
"
).
append
(
$
(
"
<span>
"
,
{
class
:
"
checkmark
"
,
aria
:
"
hidden
"
}));
...
@@ -1261,9 +1266,14 @@ var QfqNS = QfqNS || {};
...
@@ -1261,9 +1266,14 @@ var QfqNS = QfqNS || {};
element
.
setRequired
(
configuration
.
required
);
element
.
setRequired
(
configuration
.
required
);
if
(
element
.
$element
)
{
if
(
element
.
$element
)
{
if
(
element
.
$element
.
is
(
"
select
"
))
{
if
(
element
.
$element
.
is
(
"
select
"
))
{
element
.
$element
.
prop
(
'
required
'
,
configuration
.
required
);
element
.
$element
.
prop
(
'
required
'
,
configuration
Item
.
required
);
element
.
$element
.
attr
(
'
data-required
'
,
'
yes
'
);
element
.
$element
.
attr
(
'
data-required
'
,
'
yes
'
);
}
}
if
(
element
.
$element
.
is
(
"
input[type=hidden]
"
))
{
console
.
log
(
"
Update Hidden
"
);
element
.
$element
.
prop
(
"
required
"
,
configurationItem
.
required
);
}
}
}
}
}
}
catch
(
e
)
{
}
catch
(
e
)
{
...
@@ -1354,6 +1364,9 @@ var QfqNS = QfqNS || {};
...
@@ -1354,6 +1364,9 @@ var QfqNS = QfqNS || {};
*/
*/
n
.
QfqForm
.
prototype
.
goBack
=
function
()
{
n
.
QfqForm
.
prototype
.
goBack
=
function
()
{
var
alert
;
var
alert
;
if
(
this
.
lockAcquired
)
{
this
.
releaseLock
();
}
if
(
window
.
history
.
length
<
2
)
{
if
(
window
.
history
.
length
<
2
)
{
alert
=
new
n
.
Alert
(
alert
=
new
n
.
Alert
(
...
...
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