Merged r10527 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@10528 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
1f80a4b0d9
commit
94a1eb21a4
|
@ -478,16 +478,14 @@ function observeSearchfield(fieldId, targetId, url) {
|
||||||
var val = $this.val();
|
var val = $this.val();
|
||||||
if ($this.attr('data-value-was') != val){
|
if ($this.attr('data-value-was') != val){
|
||||||
$this.attr('data-value-was', val);
|
$this.attr('data-value-was', val);
|
||||||
if (val != '') {
|
$.ajax({
|
||||||
$.ajax({
|
url: url,
|
||||||
url: url,
|
type: 'get',
|
||||||
type: 'get',
|
data: {q: $this.val()},
|
||||||
data: {q: $this.val()},
|
success: function(data){ $('#'+targetId).html(data); },
|
||||||
success: function(data){ $('#'+targetId).html(data); },
|
beforeSend: function(){ $this.addClass('ajax-loading'); },
|
||||||
beforeSend: function(){ $this.addClass('ajax-loading'); },
|
complete: function(){ $this.removeClass('ajax-loading'); }
|
||||||
complete: function(){ $this.removeClass('ajax-loading'); }
|
});
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
var reset = function() {
|
var reset = function() {
|
||||||
|
|
Loading…
Reference in New Issue