Commit 87f59073 authored by bbaer's avatar bbaer
Browse files

Added a remove button for input

parent a137c906
......@@ -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);
......
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment