Skip to content

Commit

Permalink
Use the bootstrap style spinner when loading
Browse files Browse the repository at this point in the history
  • Loading branch information
cbrandtbuffalo authored and sunnavy committed Dec 17, 2024
1 parent ece741a commit 75497eb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions share/static/js/autocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@ window.RT.Autocomplete.bind = function(from) {
render: {
option_create: function(data, escape) {
return '<div class="create"><strong>' + escape(data.input) + '</strong></div>';
},
loading: function(data,escape) {
return '<div class="spinner-border spinner-border-sm ms-3"></div>';
}
},
load: function(query, callback) {
Expand Down
5 changes: 5 additions & 0 deletions share/static/js/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,11 @@ function textToHTML(value) {
function initializeSelectElement(elt) {
let settings = {
allowEmptyOption: true,
render: {
loading: function(data,escape) {
return '<div class="spinner-border spinner-border-sm ms-3"></div>';
}
}
};

if ( elt.options && elt.options.length < RT.Config.SelectLiveSearchLimit ) {
Expand Down

0 comments on commit 75497eb

Please sign in to comment.