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
87f59073
Commit
87f59073
authored
Dec 10, 2019
by
bbaer
Browse files
Added a remove button for input
parent
a137c906
Changes
2
Hide whitespace changes
Inline
Side-by-side
javascript/src/Main.js
View file @
87f59073
...
...
@@ -60,9 +60,21 @@ $(document).ready( function () {
$
(
'
.qfq-clear-me
'
).
each
(
function
()
{
var
myInput
=
$
(
this
);
if
(
myInput
)
{
console
.
log
(
"
test
"
)
;
if
(
!
myInput
.
is
(
"
input
"
)
)
{
return
;
}
var
closeButton
=
$
(
"
<span>
"
,
{
class
:
"
qfq-clear-me-button hidden
"
});
closeButton
.
on
(
"
click
"
,
function
(
e
)
{
myInput
.
val
(
''
);
closeButton
.
addClass
(
"
hidden
"
);
});
$
(
this
).
after
(
closeButton
);
$
(
this
).
on
(
"
input
"
,
function
()
{
closeButton
.
removeClass
(
"
hidden
"
);
});
});
})(
QfqNS
);
...
...
less/qfq-bs.css.less
View file @
87f59073
...
...
@@ -1059,7 +1059,31 @@ select.qfq-locked:invalid {
}
span.qfq-more-text {
display: none
display: none;
}
.qfq-clear-me-button {
display: block;
content: '\f00d';
font-family: FontAwesome;
right:21px;
width: 30px;
height: 30px;
top: 2px;
position:absolute;
cursor: pointer;
}
.qfq-clear-me-button:before {
content: '\f00d';
font-family: FontAwesome;
position: absolute;
color: #aaa;
font-size: 21px;
left: 12px;
}
input.qfq-clear-me {
padding-right: 28px;
}
// Droplets
...
...
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