From a70e6072dc2d609d2c58eabe4e7706a49c276dcd Mon Sep 17 00:00:00 2001 From: Evgeny Fadeev Date: Tue, 11 Dec 2012 13:29:21 -0300 Subject: tweaked styling of the search drop box --- askbot/media/js/live_search.js | 18 ++++++++++++------ askbot/media/style/style.less | 10 ++++++++-- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/askbot/media/js/live_search.js b/askbot/media/js/live_search.js index 97b13e31..a0c7c2de 100644 --- a/askbot/media/js/live_search.js +++ b/askbot/media/js/live_search.js @@ -35,8 +35,10 @@ SearchDropMenu.prototype.render = function() { }); if (this._data.length === 0) { list.addClass('empty'); + this._element.addClass('empty'); } else { list.removeClass('empty'); + this._element.removeClass('empty'); } }; @@ -132,15 +134,19 @@ SearchDropMenu.prototype.makeKeyHandler = function() { /** todo: change this to state management as >1 thing happens */ SearchDropMenu.prototype.showWaitIcon = function() { - this._waitIcon.show(); - this._footer.hide(); - this._element.addClass('empty'); + if (this._askButtonEnabled) { + this._waitIcon.show(); + this._footer.hide(); + this._element.addClass('empty'); + } }; SearchDropMenu.prototype.hideWaitIcon = function() { - this._waitIcon.hide(); - this._footer.show(); - this._element.removeClass('empty'); + if (this._askButtonEnabled) { + this._waitIcon.hide(); + this._footer.show(); + this._element.removeClass('empty'); + } }; SearchDropMenu.prototype.createDom = function() { diff --git a/askbot/media/style/style.less b/askbot/media/style/style.less index 905fdbfd..dd854876 100644 --- a/askbot/media/style/style.less +++ b/askbot/media/style/style.less @@ -207,6 +207,7 @@ body.user-messages { .wait-icon-box { text-align: center; + margin-bottom: 8px; } #closeNotify { @@ -532,14 +533,12 @@ body.user-messages { } .search-drop-menu.empty { - padding-bottom: 8px; ul { padding: 5px; margin: 0; } } - .input-tool-tip { color: #999; } @@ -572,6 +571,13 @@ input[type="submit"].searchBtn { height: 0; z-index: 0; } + .search-drop-menu.empty { + border: none; + padding: 0; + ul { + padding: 0; + } + } } .searchBtn:hover { -- cgit v1.2.3-1-g7c22