From b608ea3493177ba7ac364acc8a5d8da697189db1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Magnus=20K=C3=BChn?= Date: Sun, 30 Jun 2013 09:50:52 +0200 Subject: [PATCH] Shows an inline spinner when searching --- wcfsetup/install/files/js/WCF.js | 2 ++ wcfsetup/install/files/style/layout.less | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/wcfsetup/install/files/js/WCF.js b/wcfsetup/install/files/js/WCF.js index de6ff699aa..d72b65663c 100755 --- a/wcfsetup/install/files/js/WCF.js +++ b/wcfsetup/install/files/js/WCF.js @@ -5353,6 +5353,7 @@ WCF.Search.Base = Class.extend({ } }; + this._searchInput.parents('.searchBar').addClass('loading'); this._proxy.setOption('data', { actionName: 'getSearchResultList', className: this._className, @@ -5488,6 +5489,7 @@ WCF.Search.Base = Class.extend({ */ _success: function(data, textStatus, jqXHR) { this._clearList(false); + this._searchInput.parents('.searchBar').removeClass('loading'); if ($.getLength(data.returnValues)) { for (var $i in data.returnValues) { diff --git a/wcfsetup/install/files/style/layout.less b/wcfsetup/install/files/style/layout.less index 4659a77ee8..4a687d24bc 100644 --- a/wcfsetup/install/files/style/layout.less +++ b/wcfsetup/install/files/style/layout.less @@ -119,6 +119,14 @@ position: absolute; top: 12px; } + &.loading:before { + content: "\f110"; + + -moz-animation: spin 2s infinite linear; + -o-animation: spin 2s infinite linear; + -webkit-animation: spin 2s infinite linear; + animation: spin 2s infinite linear; + } > form { display: inline-block; -- 2.20.1