Merge branch 'master' of github.com:designcreateplay/NodeBB

v1.18.x
Julian Lam 12 years ago
commit 207eccc505

@ -53,7 +53,13 @@
jQuery('#search-fields').hide();
jQuery('#search-button').show();
});
$('#search-fields input').on('blur', function() {
$('#search-fields').hide();
$('#search-button').show();
});
});
var rightMenu = $('#right-menu'),
isLoggedIn = data.uid > 0;
@ -82,6 +88,7 @@
rightMenu.append(logoutli);
}
} else {
$('#search-button').hide();
jQuery('.nodebb-loggedin').hide();
jQuery('.nodebb-loggedout').show();

@ -2,13 +2,16 @@
$(document).ready(function() {
var searchQuery = $('#topics-container').attr('data-search-query');
$('.search-result-text').each(function() {
var text = $(this).html();
var regex = new RegExp(searchQuery, 'gi');
text = text.replace(regex, '<span class="label label-success">'+searchQuery+'</span>');
$(this).html(text);
});
$('#search-form input').val(searchQuery);
});
})();

@ -63,13 +63,13 @@
<form id="search-form" class="navbar-form navbar-right hidden-xs" role="search" method="GET" action="">
<div class="hide" id="search-fields">
<div class="form-group">
<input type="text" class="form-control" placeholder="Search" name="query">
</div>
<button type="submit" class="btn btn-default hide">Search</button>
</div>
<button id="search-button" type="button" class="btn btn-link nodebb-loggedin"><i class="icon-search"></i></button>
</form>
<div class="form-group">
<input type="text" class="form-control" placeholder="Search" name="query" value="">
</div>
<button type="submit" class="btn btn-default hide">Search</button>
</div>
<button id="search-button" type="button" class="btn btn-link"><i class="icon-search"></i></button>
</form>
<ul id="right-menu" class="nav navbar-nav navbar-right">
<li class="notifications dropdown text-center hidden-xs">

Loading…
Cancel
Save