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
c30f49bd
Commit
c30f49bd
authored
Feb 08, 2018
by
Elias Villiger
Browse files
Merge branch 'master' into 5308-timeIsOptional-parameter
parents
ce5793b8
7365bbcd
Changes
6
Hide whitespace changes
Inline
Side-by-side
extension/qfq/qfq/AbstractBuildForm.php
View file @
c30f49bd
...
...
@@ -484,7 +484,7 @@ abstract class AbstractBuildForm {
$storeRecord
=
$this
->
store
->
getStore
(
STORE_RECORD
);
$value
=
$this
->
report
->
process
(
$this
->
bodytextParser
->
process
(
$value
),
false
);
$this
->
store
->
setStore
(
$storeRecord
,
STORE_RECORD
,
true
);
$this
->
store
->
setVar
(
SYSTEM_REPORT_FULL_LEVEL
,
''
,
STORE_SYSTEM
);
}
return
$value
;
...
...
@@ -1325,6 +1325,7 @@ abstract class AbstractBuildForm {
$column
=
$formElement
[
FE_NAME
];
$matches
=
array
();
$inputType
=
'number'
;
$typeSpec
=
$this
->
store
->
getVar
(
$column
,
STORE_TABLE_COLUMN_TYPES
);
switch
(
$typeSpec
)
{
...
...
@@ -1389,6 +1390,7 @@ abstract class AbstractBuildForm {
case
'float'
:
case
'double'
:
$checkType
=
SANITIZE_ALLOW_NUMERICAL
;
$inputType
=
'text'
;
break
;
case
'bit'
:
$checkType
=
SANITIZE_ALLOW_DIGIT
;
...
...
@@ -1408,7 +1410,7 @@ abstract class AbstractBuildForm {
$formElement
[
FE_CHECK_TYPE
]
=
$checkType
;
if
(
empty
(
$formElement
[
FE_INPUT_TYPE
]))
{
$formElement
[
FE_INPUT_TYPE
]
=
'number'
;
$formElement
[
FE_INPUT_TYPE
]
=
$inputType
;
}
}
...
...
extension/qfq/qfq/exceptions/AbstractException.php
View file @
c30f49bd
...
...
@@ -67,7 +67,7 @@ class AbstractException extends \Exception {
// Debug Information
if
(
$store
!==
null
&&
Support
::
findInSet
(
SYSTEM_SHOW_DEBUG_INFO_YES
,
$store
->
getVar
(
SYSTEM_SHOW_DEBUG_INFO
,
STORE_SYSTEM
)))
{
$arrDebugShow
=
$this
->
messageArrayDebug
;
$arrDebugShow
=
array_merge
([
EXCEPTION_REPORT_FULL_LEVEL
=>
Store
::
getVar
(
SYSTEM_REPORT_FULL_LEVEL
,
STORE_SYSTEM
)],
$this
->
messageArrayDebug
)
;
$arrDebugShow
[
EXCEPTION_SIP
]
=
$store
->
getStore
(
STORE_SIP
);
$arrDebugShow
[
EXCEPTION_PAGE_ID
]
=
$t3Vars
[
TYPO3_PAGE_ID
];
...
...
extension/qfq/qfq/exceptions/UserReportException.php
View file @
c30f49bd
...
...
@@ -28,6 +28,8 @@ class UserReportException extends AbstractException {
$this
->
messageArrayDebug
[
EXCEPTION_SQL_RAW
]
=
Store
::
getVar
(
SYSTEM_SQL_RAW
,
STORE_SYSTEM
);
$this
->
messageArrayDebug
[
EXCEPTION_SQL_FINAL
]
=
Store
::
getVar
(
SYSTEM_SQL_FINAL
,
STORE_SYSTEM
);
$this
->
messageArrayDebug
[
EXCEPTION_SQL_PARAM_ARRAY
]
=
Store
::
getVar
(
SYSTEM_SQL_PARAM_ARRAY
,
STORE_SYSTEM
);
$this
->
messageArrayDebug
[
EXCEPTION_REPORT_COLUMN_INDEX
]
=
Store
::
getVar
(
SYSTEM_REPORT_COLUMN_INDEX
,
STORE_SYSTEM
);
$this
->
messageArrayDebug
[
EXCEPTION_REPORT_COLUMN_NAME
]
=
Store
::
getVar
(
SYSTEM_REPORT_COLUMN_NAME
,
STORE_SYSTEM
);
$this
->
messageArrayDebug
[
EXCEPTION_REPORT_COLUMN_VALUE
]
=
Store
::
getVar
(
SYSTEM_REPORT_COLUMN_VALUE
,
STORE_SYSTEM
);
...
...
javascript/src/Alert.js
View file @
c30f49bd
...
...
@@ -97,6 +97,8 @@ var QfqNS = QfqNS || {};
// new style
this
.
message
=
options
.
message
||
"
MESSAGE
"
;
this
.
messageType
=
options
.
type
||
"
info
"
;
this
.
messageTitle
=
options
.
title
||
false
;
this
.
errorCode
=
options
.
code
||
false
;
this
.
buttons
=
options
.
buttons
||
[];
this
.
modal
=
options
.
modal
||
false
;
this
.
timeout
=
options
.
timeout
||
n
.
Alert
.
constants
.
NO_TIMEOUT
;
...
...
@@ -115,7 +117,7 @@ var QfqNS = QfqNS || {};
n
.
Alert
.
prototype
.
on
=
n
.
EventEmitter
.
onMixin
;
n
.
Alert
.
constants
=
{
alertContainerId
:
"
qfqAlertContainer
"
,
alertContainerId
:
"
alert-interactive
"
,
alertContainerSelector
:
"
#qfqAlertContainer
"
,
jQueryAlertRemoveEventName
:
"
qfqalert.remove:
"
,
NO_TIMEOUT
:
0
...
...
@@ -159,14 +161,14 @@ var QfqNS = QfqNS || {};
n
.
Alert
.
prototype
.
getAlertClassBasedOnMessageType
=
function
()
{
switch
(
this
.
messageType
)
{
case
"
warning
"
:
return
"
al
er
t
-warning
"
;
return
"
bord
er-warning
"
;
case
"
danger
"
:
case
"
error
"
:
return
"
alert-dange
r
"
;
return
"
border-erro
r
"
;
case
"
info
"
:
return
"
al
er
t
-info
"
;
return
"
bord
er-info
"
;
case
"
success
"
:
return
"
al
er
t
-success
"
;
return
"
bord
er-success
"
;
/* jshint -W086 */
default
:
n
.
Log
.
warning
(
"
Message type '
"
+
this
.
messageType
+
"
' unknown. Use default type.
"
);
...
...
@@ -179,7 +181,7 @@ var QfqNS = QfqNS || {};
*/
n
.
Alert
.
prototype
.
getButtons
=
function
()
{
var
$buttons
=
null
;
var
$container
=
$
(
"
<
div
>
"
).
addClass
(
"
alert-
buttons
"
);
var
$container
=
$
(
"
<
p
>
"
).
addClass
(
"
buttons
"
);
var
numberOfButtons
=
this
.
buttons
.
length
;
var
index
;
var
buttonConfiguration
;
...
...
@@ -226,17 +228,35 @@ var QfqNS = QfqNS || {};
$alertContainer
=
this
.
makeAlertContainerSingleton
();
if
(
this
.
modal
)
{
this
.
$modalDiv
=
$
(
"
<div>
"
);
this
.
$modalDiv
.
css
(
'
width
'
,
"
100%
"
);
this
.
$modalDiv
.
css
(
'
height
'
,
Math
.
max
(
document
.
documentElement
.
clientHeight
,
window
.
innerHeight
||
0
));
//
this.$modalDiv.css('width', "100%");
//
this.$modalDiv.css('height', Math.max(document.documentElement.clientHeight, window.innerHeight || 0));
}
if
(
this
.
messageTitle
)
{
this
.
$titleWrap
=
$
(
"
<p>
"
)
.
addClass
(
"
title
"
)
.
append
(
this
.
messageTitle
);
}
this
.
$messageWrap
=
$
(
"
<p>
"
)
.
addClass
(
"
body
"
)
.
append
(
this
.
message
);
this
.
$alertDiv
=
$
(
"
<div>
"
)
.
hide
()
.
addClass
(
"
alert
"
)
.
addClass
(
this
.
getAlertClassBasedOnMessageType
())
.
attr
(
"
role
"
,
"
alert
"
)
.
append
(
this
.
message
);
.
append
(
this
.
$
message
Wrap
);
if
(
this
.
$titleWrap
)
{
this
.
$alertDiv
.
prepend
(
this
.
$titleWrap
);
}
if
(
this
.
modal
)
{
this
.
$alertDiv
.
addClass
(
"
alert-interactive
"
);
}
else
{
this
.
$alertDiv
.
addClass
(
"
alert-side
"
);
}
var
buttons
=
this
.
getButtons
();
if
(
buttons
)
{
...
...
@@ -250,18 +270,18 @@ var QfqNS = QfqNS || {};
this
.
$alertDiv
.
on
(
n
.
Alert
.
constants
.
jQueryAlertRemoveEventName
,
this
.
removeAlert
.
bind
(
this
));
}
if
(
this
.
modal
)
{
this
.
$modalDiv
.
append
(
this
.
$alertDiv
);
$alertContainer
.
append
(
this
.
$modalDiv
);
$alertContainer
.
append
(
this
.
$alertDiv
);
//this.$alertDiv.slideDown(this.fadeInDuration, this.afterFadeIn.bind(this));
if
(
!
this
.
modal
)
{
this
.
$alertDiv
.
animate
({
width
:
'
show
'
},
this
.
fadeInDuration
,
this
.
afterFadeIn
.
bind
(
this
));
}
else
{
$alert
Container
.
append
(
this
.
$alertDiv
);
this
.
$alert
Div
.
fadeIn
(
this
.
fadeInDuration
);
}
this
.
$alertDiv
.
slideDown
(
this
.
fadeInDuration
,
this
.
afterFadeIn
.
bind
(
this
));
this
.
$alertDiv
.
find
(
"
.wants-focus
"
).
focus
();
this
.
shown
=
true
;
};
/**
...
...
@@ -286,20 +306,26 @@ var QfqNS = QfqNS || {};
}
var
that
=
this
;
this
.
$alertDiv
.
slideUp
(
this
.
fadeOutDuration
,
function
()
{
that
.
$alertDiv
.
remove
();
that
.
$alertDiv
=
null
;
if
(
that
.
modal
)
{
that
.
$modalDiv
.
remove
();
that
.
$modalDiv
=
null
;
}
that
.
shown
=
false
;
if
(
!
this
.
modal
)
{
this
.
$alertDiv
.
animate
({
width
:
'
hide
'
},
this
.
fadeOutDuration
,
function
()
{
that
.
$alertDiv
.
remove
();
that
.
$alertDiv
=
null
;
that
.
shown
=
false
;
// TODO: removeAlert should not have knowledge on how to handle alert container
if
(
that
.
countAlertsInAlertContainer
()
===
0
)
{
that
.
removeAlertContainer
();
}
});
}
else
{
this
.
$alertDiv
.
fadeOut
(
this
.
fadeOutDuration
,
function
(){
this
.
$alertDiv
.
remove
();
this
.
$alertDiv
=
null
;
this
.
shown
=
false
;
});
}
// TODO: removeAlert should not have knowledge on how to handle alert container
if
(
that
.
countAlertsInAlertContainer
()
===
0
)
{
that
.
removeAlertContainer
();
}
});
};
...
...
javascript/src/QfqForm.js
View file @
c30f49bd
...
...
@@ -955,6 +955,13 @@ var QfqNS = QfqNS || {};
alert
.
show
();
}
// Skip other checks if external Save is called
if
(
this
.
goToAfterSave
)
{
console
.
log
(
"
Called goToAfterSave =
"
+
this
.
goToAfterSave
);
window
.
location
=
this
.
goToAfterSave
;
return
;
}
// do we have to update the HTML Form?
if
(
data
[
'
form-update
'
])
{
this
.
applyFormConfiguration
(
data
[
'
form-update
'
]);
...
...
@@ -973,12 +980,6 @@ var QfqNS = QfqNS || {};
return
;
}
if
(
this
.
goToAfterSave
)
{
console
.
log
(
"
Called goToAfterSave =
"
+
this
.
goToAfterSave
);
window
.
location
=
this
.
goToAfterSave
;
return
;
}
break
;
case
'
close
'
:
if
(
!
data
.
redirect
||
data
.
redirect
===
"
no
"
)
{
...
...
less/qfq-bs.css.less
View file @
c30f49bd
...
...
@@ -366,6 +366,23 @@ i.@{spinner_class} {
background-color: #333;
}
.alert-side > p.body {
margin: 0px;
overflow: hidden;
white-space: nowrap;
}
.alert-side {
position: fixed;
display: box;
right: 0px;
top: 20px;
padding: 20px;
color: #d0d0d0;
border-left: 5px solid;
background-color: #333;
}
.border-success {
border-color: #5cb85c;
}
...
...
@@ -390,8 +407,4 @@ i.@{spinner_class} {
.alert-interactive p.buttons {
margin-top: 20px;
text-align: center;
}
.alert-interactive p.buttons button {
margin-right: 4px;
}
\ No newline at end of file
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