as a workaround make nav-search dropdown behave a little better

This commit is contained in:
marijus 2015-01-20 15:00:44 +01:00
parent e3041b80fd
commit 33380b3c30
3 changed files with 11 additions and 11 deletions

View File

@ -38,13 +38,6 @@ nav .dropdown-menu .contactname {
display: block; display: block;
} }
nav .dropdown-menu img {
float: left;
margin-right: 5px;
width: 32px;
height: 32px;
}
nav .dropdown-menu li a { nav .dropdown-menu li a {
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
@ -67,6 +60,7 @@ nav .navbar-toggle {
/* nav overrides end */ /* nav overrides end */
.dropdown-menu img { .dropdown-menu img {
float: left;
width: 32px; width: 32px;
height: 32px; height: 32px;
margin-right: 5px; margin-right: 5px;

View File

@ -56,7 +56,7 @@ function contact_format(item) {
var desc = ((item.label) ? item.nick + ' ' + item.label : item.nick) var desc = ((item.label) ? item.nick + ' ' + item.label : item.nick)
if(typeof desc === 'undefined') desc = ''; if(typeof desc === 'undefined') desc = '';
if(desc) desc = ' ('+desc+')'; if(desc) desc = ' ('+desc+')';
return "<div class='{0}' title='{4}'><img src='{1}'>{2}{3}</div>".format(item.taggable, item.photo, item.name, desc, item.link) return "<div class='{0}' title='{4}'><img src='{1}'><b>{2}</b><br>{3}</div>".format(item.taggable, item.photo, item.name, desc, item.link)
} }
else else
return "<div>"+item.text+"</div>" return "<div>"+item.text+"</div>"
@ -111,7 +111,7 @@ function submit_form(e) {
replace: function(item) { return "$1"+item['text'] + ' '; }, replace: function(item) { return "$1"+item['text'] + ' '; },
} }
this.attr('autocomplete','off'); this.attr('autocomplete','off');
this.textcomplete([contacts,smilies],{className:'acpopup',zIndex:1050}); this.textcomplete([contacts,smilies],{className:'acpopup',zIndex:1020});
}; };
})( jQuery ); })( jQuery );
@ -130,7 +130,7 @@ function submit_form(e) {
template: contact_format, template: contact_format,
} }
this.attr('autocomplete','off'); this.attr('autocomplete','off');
var a = this.textcomplete([contacts],{className:'acpopup',maxCount:100,zIndex: 1050}); var a = this.textcomplete([contacts],{className:'acpopup',maxCount:100,zIndex: 1020,appendTo:'nav'});
a.on('textComplete:select', function(e,value,strategy) { submit_form(this); }); a.on('textComplete:select', function(e,value,strategy) { submit_form(this); });
@ -153,7 +153,7 @@ function submit_form(e) {
} }
this.attr('autocomplete','off'); this.attr('autocomplete','off');
var a = this.textcomplete([contacts],{className:'acpopup',zIndex:1050}); var a = this.textcomplete([contacts],{className:'acpopup',zIndex:1020});
if(autosubmit) if(autosubmit)
a.on('textComplete:select', function(e,value,strategy) { submit_form(this); }); a.on('textComplete:select', function(e,value,strategy) { submit_form(this); });

View File

@ -874,6 +874,12 @@ footer {
font-family: FontAwesome; font-family: FontAwesome;
} }
nav .acpopup {
top: 49px !important;
right: 30px !important;
margin-left: -45px;
}
.profile-clear { .profile-clear {
clear: both; clear: both;
} }