Adds an indicator to all autocomplete/search fields.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11082 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2012-12-26 12:01:11 +00:00
parent 7606353ff9
commit 48a51e60bc
2 changed files with 11 additions and 6 deletions

View File

@ -460,14 +460,18 @@ function observeAutocompleteField(fieldId, url, options) {
$(document).ready(function() {
$('#'+fieldId).autocomplete($.extend({
source: url,
minLength: 2
minLength: 2,
search: function(){$('#'+fieldId).addClass('ajax-loading');},
response: function(){$('#'+fieldId).removeClass('ajax-loading');},
}, options));
$('#'+fieldId).addClass('autocomplete');
});
}
function observeSearchfield(fieldId, targetId, url) {
$('#'+fieldId).each(function() {
var $this = $(this);
$this.addClass('autocomplete');
$this.attr('data-value-was', $this.val());
var check = function() {
var val = $this.val();

View File

@ -569,12 +569,13 @@ div#tab-content-members fieldset div, div#tab-content-users fieldset div { max-h
table.members td.group { padding-left: 20px; background: url(../images/group.png) no-repeat 0% 50%; }
input#principal_search, input#user_search {width:100%}
input#principal_search, input#user_search {
background: url(../images/magnifier.png) no-repeat 2px 50%; padding-left:20px;
border:1px solid #9EB1C2; border-radius:3px; height:1.5em; width:95%;
input#principal_search, input#user_search {width:90%}
input.autocomplete {
background: #fff url(../images/magnifier.png) no-repeat 2px 50%; padding-left:20px;
border:1px solid #9EB1C2; border-radius:2px; height:1.5em;
}
input#principal_search.ajax-loading, input#user_search.ajax-loading {
input.autocomplete.ajax-loading {
background-image: url(../images/loading.gif);
}