Only search buffer name
This commit is contained in:
parent
27b277ee6b
commit
0222dc1026
2 changed files with 5 additions and 3 deletions
|
@ -160,10 +160,10 @@
|
|||
<ul class="nav nav-pills nav-stacked">
|
||||
<li class="bufferfilter">
|
||||
<form role="form">
|
||||
<input class="form-control" type="text" id="bufferFilter" ng-model="search.$" placeholder="Search">
|
||||
<input class="form-control" type="text" id="bufferFilter" ng-model="search" placeholder="Search">
|
||||
</form>
|
||||
</li>
|
||||
<li class="" ng-class="{'active': content.active }" ng-repeat="(key, content) in buffers | toArray | filter:search | filter:hasUnread | orderBy:'content.number':true">
|
||||
<li class="" ng-class="{'active': content.active }" ng-repeat="(key, content) in buffers | toArray | filter:{fullName:search} | filter:hasUnread | orderBy:'content.number':true">
|
||||
<a href="#" ng-click="setActiveBuffer(content.id)" title="{{ content.fullName }}">
|
||||
<span class="badge pull-right" ng-hide="content.notification" ng-if="content.unread" ng-bind="content.unread"></span>
|
||||
<span class="badge pull-right danger" ng-show="content.notification" ng-bind="content.notification"></span>
|
||||
|
|
|
@ -386,7 +386,9 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout',
|
|||
|
||||
$scope.hasUnread = function(buffer) {
|
||||
// if search is set, return every buffer
|
||||
if($scope.search != undefined && $scope.search.$) return true;
|
||||
if($scope.search && $scope.search != "") {
|
||||
return true;
|
||||
}
|
||||
if($scope.onlyUnread) {
|
||||
// Always show current buffer in list
|
||||
if (models.getActiveBuffer() == buffer) {
|
||||
|
|
Loading…
Reference in a new issue