From 29b96a4a07d9eca76fe7c07732ba03aff7510c72 Mon Sep 17 00:00:00 2001 From: Mayhem Date: Fri, 1 Nov 2013 03:51:45 +0100 Subject: [PATCH] Make the index header shortcut spin while refreshing the index. --- src/Miscellaneous/Index.coffee | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Miscellaneous/Index.coffee b/src/Miscellaneous/Index.coffee index 51050bce2..edb9e17d9 100644 --- a/src/Miscellaneous/Index.coffee +++ b/src/Miscellaneous/Index.coffee @@ -2,12 +2,12 @@ Index = init: -> return if g.VIEW isnt 'index' - button = $.el 'a', + Index.button = $.el 'a', className: 'index-refresh-shortcut fa fa-refresh' title: 'Refresh Index' href: 'javascript:;' - $.on button, 'click', Index.update - Header.addShortcut button, 1 + $.on Index.button, 'click', Index.update + Header.addShortcut Index.button, 1 modeEntry = el: $.el 'span', textContent: 'Index mode' @@ -64,7 +64,9 @@ Index = onloadend: Index.load , whenModified: true + $.addClass Index.button, 'fa-spin' load: (e) -> + $.rmClass Index.button, 'fa-spin' {req, notice} = Index delete Index.req delete Index.notice