Animate jumpkey transition & change placeholder to "Number"

This commit is contained in:
Lorenz Hübschle-Schneider 2017-03-23 13:41:44 +01:00
parent 915d0d5d3e
commit 26d8b5faee
4 changed files with 15 additions and 7 deletions

View file

@ -83,12 +83,17 @@ td.message {
color: #ccc;
}
.buffer-jump {
display: none;
#jump-addon {
width: 0px;
max-width: 0px;
padding: 0;
overflow: hidden;
transition: all ease-in-out 0.5s;
}
.showjumpkeys .buffer-jump {
display: table-cell;
.showjumpkeys #jump-addon {
width: auto;
max-width: 70px;
padding: 6px 12px;
}
.footer button {

View file

@ -266,8 +266,8 @@ npm run build-electron-{windows, darwin, linux}</pre>
<li class="bufferfilter">
<form role="form">
<div class="input-group">
<span class="input-group-addon buffer-jump" id="jump-addon">Jump:</span>
<input class="form-control favorite-font" type="text" id="bufferFilter" ng-model="search" ng-keydown="handleSearchBoxKey($event)" placeholder="Search" autocomplete="off" aria-describedby="jump-addon">
<span class="input-group-addon" id="jump-addon">Jump</span>
<input class="form-control favorite-font" type="text" id="bufferFilter" ng-model="search" ng-keydown="handleSearchBoxKey($event)" placeholder="{{ search_placeholder || 'Search' }}" autocomplete="off" aria-describedby="jump-addon">
</div>
</form>
</li>

View file

@ -208,6 +208,7 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout',
// Clear search term on buffer change
$scope.search = '';
$scope.search_placeholder = 'Search';
if (!utils.isMobileUi()) {
// This needs to happen asynchronously to prevent the enter key handler

View file

@ -257,6 +257,7 @@ weechat.directive('inputBar', function() {
$rootScope.showJumpKeys = false;
$rootScope.jumpDecimal = undefined;
$scope.$parent.search = '';
$scope.$parent.search_placeholder = 'Search';
$rootScope.refresh_filter_predicate();
};
@ -411,6 +412,7 @@ weechat.directive('inputBar', function() {
$event.preventDefault();
// reset search state and show jump keys
$scope.$parent.search = '';
$scope.$parent.search_placeholder = 'Number';
$rootScope.showJumpKeys = true;
return true;
}