disable loader

stable
Juanfran 2014-08-19 08:30:41 +02:00
parent 0950b995ed
commit ad752c0d21
2 changed files with 4 additions and 2 deletions

View File

@ -54,7 +54,7 @@ configure = ($routeProvider, $locationProvider, $httpProvider, $provide, tgLoade
{templateUrl: "/partials/wiki-edit.html"}) {templateUrl: "/partials/wiki-edit.html"})
# Issues # Issues
$routeProvider.when("/project/:pslug/issues", {templateUrl: "/partials/issues.html", resolve: {loader: tgLoaderProvider.add()}}) $routeProvider.when("/project/:pslug/issues/", {templateUrl: "/partials/issues.html", resolve: {loader: tgLoaderProvider.add()}})
$routeProvider.when("/project/:pslug/issues/:issueref", $routeProvider.when("/project/:pslug/issues/:issueref",
{templateUrl: "/partials/issues-detail.html"}) {templateUrl: "/partials/issues-detail.html"})

View File

@ -35,7 +35,7 @@ Loader = () ->
} }
defaultConfig = { defaultConfig = {
enabled: true, enabled: false,
minTime: 1000, minTime: 1000,
auto: false auto: false
} }
@ -46,6 +46,7 @@ Loader = () ->
@.add = (auto = false) -> @.add = (auto = false) ->
return () -> return () ->
config.auto = auto config.auto = auto
config.enabled = true
@.$get = ["$rootScope", ($rootscope) -> @.$get = ["$rootScope", ($rootscope) ->
interval = null interval = null
@ -70,6 +71,7 @@ Loader = () ->
), timeout ), timeout
start: () -> start: () ->
config.enabled = false
if config.enabled if config.enabled
if config.auto if config.auto
interval = setInterval ( -> interval = setInterval ( ->