Hide progress bar after 300ms
This commit is contained in:
parent
10b46db524
commit
70cf67498b
1 changed files with 6 additions and 1 deletions
|
@ -1,14 +1,19 @@
|
||||||
class Loading
|
class Loading
|
||||||
constructor: ->
|
constructor: ->
|
||||||
if window.show_loadingscreen then @showScreen()
|
if window.show_loadingscreen then @showScreen()
|
||||||
|
@timer_hide = null
|
||||||
|
|
||||||
|
|
||||||
setProgress: (percent) ->
|
setProgress: (percent) ->
|
||||||
|
if @timer_hide
|
||||||
|
clearInterval @timer_hide
|
||||||
$(".progressbar").css("width", percent*100+"%").css("opacity", "1").css("display", "block")
|
$(".progressbar").css("width", percent*100+"%").css("opacity", "1").css("display", "block")
|
||||||
|
|
||||||
hideProgress: ->
|
hideProgress: ->
|
||||||
console.log "hideProgress"
|
console.log "hideProgress"
|
||||||
|
@timer_hide = setTimeout ( =>
|
||||||
$(".progressbar").css("width", "100%").css("opacity", "0").hideLater(1000)
|
$(".progressbar").css("width", "100%").css("opacity", "0").hideLater(1000)
|
||||||
|
), 300
|
||||||
|
|
||||||
|
|
||||||
showScreen: ->
|
showScreen: ->
|
||||||
|
|
Loading…
Reference in a new issue