Skip to content
Snippets Groups Projects
Commit 87f59073 authored by bbaer's avatar bbaer
Browse files

Added a remove button for input

parent a137c906
No related branches found
No related tags found
1 merge request!221B9720 checkbox various setups
...@@ -60,9 +60,21 @@ $(document).ready( function () { ...@@ -60,9 +60,21 @@ $(document).ready( function () {
$('.qfq-clear-me').each(function() { $('.qfq-clear-me').each(function() {
var myInput = $(this); var myInput = $(this);
if(myInput) { if(!myInput.is("input")) {
console.log("test"); 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); })(QfqNS);
......
...@@ -1059,7 +1059,31 @@ select.qfq-locked:invalid { ...@@ -1059,7 +1059,31 @@ select.qfq-locked:invalid {
} }
span.qfq-more-text { 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 // Droplets
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment