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
984bbfb1
Commit
984bbfb1
authored
Nov 07, 2019
by
bbaer
Browse files
Added max height + sizing on init
parent
214b06fc
Pipeline
#2647
passed with stages
in 2 minutes and 45 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
javascript/src/Main.js
View file @
984bbfb1
...
...
@@ -12,12 +12,25 @@ $(document).ready( function () {
tablesorterController
.
setup
(
$
(
this
),
i
);
});
// end .each()
$
(
'
.qfq-auto-grow
'
).
on
(
'
input
'
,
function
()
{
if
(
$
(
this
).
height
()
+
10
<
$
(
this
).
prop
(
'
scrollHeight
'
))
{
$
(
this
).
height
(
$
(
this
).
prop
(
'
scrollHeight
'
));
$
(
'
.qfq-auto-grow
'
).
each
(
function
()
{
var
newHeight
=
$
(
this
).
prop
(
'
scrollHeight
'
);
var
maxHeight
=
$
(
this
).
data
(
'
max-height
'
)
||
0
;
if
(
newHeight
<
maxHeight
||
maxHeight
===
0
)
{
$
(
this
).
height
(
newHeight
);
}
else
{
$
(
this
).
height
(
maxHeight
);
}
});
$
(
'
.qfq-auto-grow
'
).
on
(
'
input
'
,
function
()
{
var
newHeight
=
$
(
this
).
prop
(
'
scrollHeight
'
);
var
maxHeight
=
$
(
this
).
data
(
'
max-height
'
)
||
0
;
if
(
$
(
this
).
height
()
+
10
<
newHeight
)
{
if
(
newHeight
<
maxHeight
||
maxHeight
===
0
)
{
$
(
this
).
height
(
newHeight
);
}
}
});
})(
QfqNS
);
});
\ 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