Show spinner for initial ajax query
This commit is contained in:
parent
926cd27136
commit
f7a4266276
@ -74,21 +74,21 @@
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
$(document).on({
|
||||
ajaxStart: function() {
|
||||
$('#spinner').show();
|
||||
},
|
||||
ajaxStop: function() {
|
||||
$('#spinner').hide();
|
||||
}
|
||||
});
|
||||
|
||||
$.getJSON('/node/keywords', function(keywords) {
|
||||
for (var i = 0; i < keywords.length; ++i) {
|
||||
var properties = { value: keywords[i], text: keywords[i] };
|
||||
$('#keyword').append($('<option></option>', properties));
|
||||
}
|
||||
|
||||
$(document).on({
|
||||
ajaxStart: function() {
|
||||
$('#spinner').show();
|
||||
},
|
||||
ajaxStop: function() {
|
||||
$('#spinner').hide();
|
||||
}
|
||||
});
|
||||
|
||||
$('#search').prop('disabled', false);
|
||||
$('#search').click(onSearch);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user