diff options
author | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2013-04-02 00:53:51 -0400 |
---|---|---|
committer | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2013-04-02 00:53:51 -0400 |
commit | ae1f49685f978051fcbeb4f2599d6a27f1b3a9ac (patch) | |
tree | 4a4fbc0993db527d5c3826522b45da9c17224cff | |
parent | f4441f0b40971d6ef8ae59b1fe231e78807c3935 (diff) | |
download | askbot-ae1f49685f978051fcbeb4f2599d6a27f1b3a9ac.tar.gz askbot-ae1f49685f978051fcbeb4f2599d6a27f1b3a9ac.tar.bz2 askbot-ae1f49685f978051fcbeb4f2599d6a27f1b3a9ac.zip |
css fixes to search bar and enhancements for the AutoCompleter
-rw-r--r-- | askbot/media/js/utils.js | 5 | ||||
-rw-r--r-- | askbot/media/style/style.css | 3 | ||||
-rw-r--r-- | askbot/media/style/style.less | 3 |
3 files changed, 8 insertions, 3 deletions
diff --git a/askbot/media/js/utils.js b/askbot/media/js/utils.js index 21fb9467..ef3b3e2c 100644 --- a/askbot/media/js/utils.js +++ b/askbot/media/js/utils.js @@ -2454,6 +2454,9 @@ AutoCompleter.prototype.activate = function() { AutoCompleter.prototype.activateNow = function() { var value = this.getValue(); + if (value.length === 0) { + this.finish(); + } if (value !== this.lastProcessedValue_ && value !== this.lastSelectedValue_) { if (value.length >= this.options.minChars) { this.active_ = true; @@ -2803,7 +2806,7 @@ AutoCompleter.prototype.selectItem = function($li) { * @param {string} symbol - a single char string */ AutoCompleter.prototype.isContentChar = function(symbol){ - if (symbol.match(this.options['stopCharRegex'])){ + if (this.options['stopCharRegex'] && symbol.match(this.options['stopCharRegex'])){ return false; } else if (symbol === this.options['multipleSeparator']){ return false; diff --git a/askbot/media/style/style.css b/askbot/media/style/style.css index fa4cf1b1..ced2398a 100644 --- a/askbot/media/style/style.css +++ b/askbot/media/style/style.css @@ -473,6 +473,7 @@ body.user-messages { line-height: 20px; font-size: 20px; font-style: italic; + position: absolute; } .search-drop-menu { box-sizing: border-box; @@ -531,7 +532,7 @@ input[type="submit"].searchBtn { line-height: 22px; text-align: center; float: right; - margin: -39px -48px 0 0; + margin: 1px -48px 0 0; width: 48px; background: -98px -37px url(../images/sprites.png) no-repeat; border-radius: 0; diff --git a/askbot/media/style/style.less b/askbot/media/style/style.less index 6a55aa2c..21a1bd06 100644 --- a/askbot/media/style/style.less +++ b/askbot/media/style/style.less @@ -513,6 +513,7 @@ body.user-messages { line-height: 20px; font-size: 20px; font-style: italic; + position: absolute; } } @@ -581,7 +582,7 @@ input[type="submit"].searchBtn { line-height: 22px; text-align: center; float:right; - margin: -39px -48px 0 0; + margin: 1px -48px 0 0; width: 48px; .sprites(-98px,-37px); .rounded-corners(0); |