From 73a2060b4255be0a8d443ad99290d75901f24d0c Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Sun, 18 Jun 2017 17:42:15 +0200 Subject: [PATCH] js: move descriptions to bottom, leave suggestion --- public/js/module.js | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/public/js/module.js b/public/js/module.js index 20c1bc95..00224757 100644 --- a/public/js/module.js +++ b/public/js/module.js @@ -103,7 +103,7 @@ suggestionDoubleClick: function (ev) { var $el = $(ev.currentTarget); - this.getSuggestionList($el) + this.getSuggestionList($el); }, /** @@ -234,6 +234,7 @@ } else { $ul = $(''); $ul.insertAfter($input); + $ul.css({width: $input.css('width')}); return this.refreshSuggestionList($ul, $input); } }, @@ -347,7 +348,7 @@ * @param ev */ leaveSuggestionField: function(ev) { - return; +// return; var _this = this; setTimeout(function() { _this.removeSuggestionList($(ev.currentTarget)); @@ -533,23 +534,19 @@ var $dt = $dd.prev(); var $form = $dd.closest('form'); + var $desc = $dd.find('p.description'); + if ($desc.length) { + $form.css({ marginBottom: ($desc.height() + 48) + 'px' }); + } + $form.find('dt, dd, li').removeClass('active'); $li.addClass('active'); $dt.addClass('active'); $dd.addClass('active'); - $dd.find('p.description.fading-out') - .stop(true) - .removeClass('fading-out') - .fadeIn('fast'); $form.find('dd').not($dd) .find('p.description') - .not('.fading-out') - .addClass('fading-out') - .delay(2000) - .fadeOut('slow', function() { - $(this).removeClass('fading-out').hide() - }); + .hide(); }, highlightFormErrors: function($container)