From 94a1eb21a43721d928c96fef833cb0f6becb7ec6 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 29 Sep 2012 17:13:15 +0000 Subject: [PATCH] Merged r10527 from trunk. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@10528 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- public/javascripts/application.js | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/public/javascripts/application.js b/public/javascripts/application.js index c2b1a893c..78dc1e3ab 100644 --- a/public/javascripts/application.js +++ b/public/javascripts/application.js @@ -478,16 +478,14 @@ function observeSearchfield(fieldId, targetId, url) { var val = $this.val(); if ($this.attr('data-value-was') != val){ $this.attr('data-value-was', val); - if (val != '') { - $.ajax({ - url: url, - type: 'get', - data: {q: $this.val()}, - success: function(data){ $('#'+targetId).html(data); }, - beforeSend: function(){ $this.addClass('ajax-loading'); }, - complete: function(){ $this.removeClass('ajax-loading'); } - }); - } + $.ajax({ + url: url, + type: 'get', + data: {q: $this.val()}, + success: function(data){ $('#'+targetId).html(data); }, + beforeSend: function(){ $this.addClass('ajax-loading'); }, + complete: function(){ $this.removeClass('ajax-loading'); } + }); } }; var reset = function() {