Make the index header shortcut spin while refreshing the index.
This commit is contained in:
parent
d2587e4bb2
commit
29b96a4a07
@ -2,12 +2,12 @@ Index =
|
|||||||
init: ->
|
init: ->
|
||||||
return if g.VIEW isnt 'index'
|
return if g.VIEW isnt 'index'
|
||||||
|
|
||||||
button = $.el 'a',
|
Index.button = $.el 'a',
|
||||||
className: 'index-refresh-shortcut fa fa-refresh'
|
className: 'index-refresh-shortcut fa fa-refresh'
|
||||||
title: 'Refresh Index'
|
title: 'Refresh Index'
|
||||||
href: 'javascript:;'
|
href: 'javascript:;'
|
||||||
$.on button, 'click', Index.update
|
$.on Index.button, 'click', Index.update
|
||||||
Header.addShortcut button, 1
|
Header.addShortcut Index.button, 1
|
||||||
|
|
||||||
modeEntry =
|
modeEntry =
|
||||||
el: $.el 'span', textContent: 'Index mode'
|
el: $.el 'span', textContent: 'Index mode'
|
||||||
@ -64,7 +64,9 @@ Index =
|
|||||||
onloadend: Index.load
|
onloadend: Index.load
|
||||||
,
|
,
|
||||||
whenModified: true
|
whenModified: true
|
||||||
|
$.addClass Index.button, 'fa-spin'
|
||||||
load: (e) ->
|
load: (e) ->
|
||||||
|
$.rmClass Index.button, 'fa-spin'
|
||||||
{req, notice} = Index
|
{req, notice} = Index
|
||||||
delete Index.req
|
delete Index.req
|
||||||
delete Index.notice
|
delete Index.notice
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user