From 26d8b5faeee2c8f531e00bb71dc3301fc20ee128 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lorenz=20H=C3=BCbschle-Schneider?= Date: Thu, 23 Mar 2017 13:41:44 +0100 Subject: [PATCH] Animate jumpkey transition & change placeholder to "Number" --- css/glowingbear.css | 15 ++++++++++----- index.html | 4 ++-- js/glowingbear.js | 1 + js/inputbar.js | 2 ++ 4 files changed, 15 insertions(+), 7 deletions(-) diff --git a/css/glowingbear.css b/css/glowingbear.css index 51a7236..c1a36f0 100644 --- a/css/glowingbear.css +++ b/css/glowingbear.css @@ -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 { diff --git a/index.html b/index.html index 8f7f5fe..49cf704 100644 --- a/index.html +++ b/index.html @@ -266,8 +266,8 @@ npm run build-electron-{windows, darwin, linux}
  • - Jump: - + Jump +
  • diff --git a/js/glowingbear.js b/js/glowingbear.js index 305817a..b78d648 100644 --- a/js/glowingbear.js +++ b/js/glowingbear.js @@ -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 diff --git a/js/inputbar.js b/js/inputbar.js index 8cefb1c..3e310b0 100644 --- a/js/inputbar.js +++ b/js/inputbar.js @@ -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; }