Skip to content

Commit

Permalink
Spinner will now work with glyphicon or font-awesome icons.
Browse files Browse the repository at this point in the history
  • Loading branch information
lifo101 committed Jul 15, 2016
1 parent da548b6 commit 8bd277c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Resources/public/js/typeaheadbundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

defs.beforeSend = function(xhr, opts) {
if (!this.options.spinner || this.$addon.data('prev-icon-class') != undefined) return;
var icon = this.$addon.find('[class*="glyphicon-"]');
var icon = this.$addon.children().first();
if (icon.length >= 1) {
this.$addon.data('prev-icon-class', icon.attr('class'));
icon.attr('class', this.options.spinner);
Expand All @@ -37,7 +37,7 @@

defs.afterSend = function(xhr, status) {
if (!this.options.spinner || this.$addon.data('prev-icon-class') == undefined) return;
var icon = this.$addon.find('[class*="glyphicon-"]');
var icon = this.$addon.children().first();
if (icon.length >= 1) {
var cls = this.$addon.data('prev-icon-class');
this.$addon.removeData('prev-icon-class');
Expand Down

0 comments on commit 8bd277c

Please sign in to comment.