prevent loader in the issues filter
parent
b5fbaa402d
commit
b5b827a363
|
@ -559,11 +559,20 @@ init = ($log, $rootscope, $auth, $events, $analytics, $translate, $location, $na
|
|||
# Analytics
|
||||
$analytics.initialize()
|
||||
|
||||
$rootscope.$on '$routeChangeStart', (event, next) ->
|
||||
# On the first page load the loader is painted in `$routeChangeSuccess`
|
||||
# because we need to hide the tg-navigation-bar.
|
||||
# In the other cases the loader is in `$routeChangeSuccess`
|
||||
# because `location.noreload` prevent to execute this event.
|
||||
un = $rootscope.$on '$routeChangeStart', (event, next) ->
|
||||
if next.loader
|
||||
loaderService.startWithAutoClose()
|
||||
loaderService.start(true)
|
||||
|
||||
un()
|
||||
|
||||
$rootscope.$on '$routeChangeSuccess', (event, next) ->
|
||||
if next.loader
|
||||
loaderService.start(true)
|
||||
|
||||
if next.access && next.access.requiresLogin
|
||||
if !$auth.isAuthenticated()
|
||||
$location.path($navUrls.resolve("login"))
|
||||
|
|
|
@ -51,6 +51,7 @@ Loader = ($rootscope) ->
|
|||
minTime: 300
|
||||
}
|
||||
|
||||
open = false
|
||||
startLoadTime = 0
|
||||
requestCount = 0
|
||||
lastResponseDate = 0
|
||||
|
@ -68,6 +69,7 @@ Loader = ($rootscope) ->
|
|||
|
||||
timeout timeoutValue, ->
|
||||
$rootscope.$broadcast("loader:end")
|
||||
open = false
|
||||
window.prerenderReady = true # Needed by Prerender Server
|
||||
|
||||
startLoadTime = 0
|
||||
|
@ -93,13 +95,14 @@ Loader = ($rootscope) ->
|
|||
start = () ->
|
||||
startLoadTime = new Date().getTime()
|
||||
$rootscope.$broadcast("loader:start")
|
||||
open = true
|
||||
|
||||
return {
|
||||
pageLoaded: pageLoaded
|
||||
start: start
|
||||
startWithAutoClose: () ->
|
||||
start()
|
||||
autoClose()
|
||||
start: (auto=false) ->
|
||||
if !open
|
||||
start()
|
||||
autoClose() if auto
|
||||
onStart: (fn) ->
|
||||
$rootscope.$on("loader:start", fn)
|
||||
|
||||
|
|
Loading…
Reference in New Issue