multiselect: fixed 'add group' interface a bit

This commit is contained in:
Jan-Christoph Borchardt 2013-06-11 18:21:13 +02:00
parent 686797eb6d
commit 0bcb04398d
2 changed files with 12 additions and 4 deletions

View File

@ -89,9 +89,17 @@ div.multiselect>span:last-child {
} }
ul.multiselectoptions input.new { ul.multiselectoptions input.new {
border-top-left-radius: 0;
border-top-right-radius: 0;
padding-bottom: .2em; padding-bottom: .2em;
padding-top: .2em; padding-top: .2em;
margin: 0; margin: 0;
} }
ul.multiselectoptions > li.creator {
padding: 10px;
font-weight: bold;
}
ul.multiselectoptions > li.creator > input {
width: 95% !important; /* do not constrain size of text input */
padding: 5px;
margin: -5px;
}

View File

@ -176,10 +176,10 @@
}); });
button.parent().data('preventHide',false); button.parent().data('preventHide',false);
if(settings.createText){ if(settings.createText){
var li=$('<li class="creator">+ <em>'+settings.createText+'<em></li>'); var li=$('<li class="creator">+ '+settings.createText+'</li>');
li.click(function(event){ li.click(function(event){
li.empty(); li.empty();
var input=$('<input class="new">'); var input=$('<input type="text" class="new">');
li.append(input); li.append(input);
input.focus(); input.focus();
input.css('width',button.innerWidth()); input.css('width',button.innerWidth());