Skip to content

Commit

Permalink
Use loading spinner for the mod zone
Browse files Browse the repository at this point in the history
  • Loading branch information
Unihedro committed Feb 17, 2016
1 parent e8e3af4 commit d39f95a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion public/javascripts/user.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
$(function() {

var $searchForm = $('form.search.public');
var loadingSpinner = '<div class="spinner"><svg viewBox="0 0 40 40"><circle cx="20" cy="20" r="18" fill="none"></circle></svg></div>';

if ($searchForm.length) {
$searchInput = $searchForm.find('input.search_user');
Expand All @@ -19,7 +20,7 @@ $(function() {
$(this).click(function() {
var $zone = $("div.user_show .mod_zone");
if ($zone.is(':visible')) $zone.hide();
else $zone.html("Loading...").show();
else $zone.html(loadingSpinner).show();
$zone.load($(this).attr("href"), function() {
$zone.find('form.fide_title select').on('change', function() {
$(this).parent('form').submit();
Expand Down

0 comments on commit d39f95a

Please sign in to comment.