Merge pull request #1476 from alexhermida/ft/add_debounce
Fix debounce in Kanban,Taskboard, IssuesListstable
commit
7bd0bf7872
|
@ -204,7 +204,7 @@ class EventsService
|
|||
subscription = {
|
||||
scope: scope,
|
||||
routingKey: routingKey,
|
||||
callback: _.debounce(callback, 500, {"leading": true, "trailing": false})
|
||||
callback: callback
|
||||
}
|
||||
|
||||
message = {
|
||||
|
|
|
@ -33,6 +33,7 @@ bindOnce = @.taiga.bindOnce
|
|||
debounceLeading = @.taiga.debounceLeading
|
||||
startswith = @.taiga.startswith
|
||||
bindMethods = @.taiga.bindMethods
|
||||
debounceLeading = @.taiga.debounceLeading
|
||||
|
||||
module = angular.module("taigaIssues")
|
||||
|
||||
|
@ -309,9 +310,8 @@ class IssuesController extends mixOf(taiga.Controller, taiga.PageMixin, taiga.Fi
|
|||
|
||||
initializeSubscription: ->
|
||||
routingKey = "changes.project.#{@scope.projectId}.issues"
|
||||
@events.subscribe @scope, routingKey, (message) =>
|
||||
@.loadIssues()
|
||||
|
||||
@events.subscribe @scope, routingKey, debounceLeading(500, (message) =>
|
||||
@.loadIssues())
|
||||
|
||||
loadProject: ->
|
||||
project = @projectService.project.toJS()
|
||||
|
|
|
@ -31,6 +31,7 @@ bindOnce = @.taiga.bindOnce
|
|||
groupBy = @.taiga.groupBy
|
||||
timeout = @.taiga.timeout
|
||||
bindMethods = @.taiga.bindMethods
|
||||
debounceLeading = @.taiga.debounceLeading
|
||||
|
||||
module = angular.module("taigaKanban")
|
||||
|
||||
|
@ -342,8 +343,8 @@ class KanbanController extends mixOf(taiga.Controller, taiga.PageMixin, taiga.Fi
|
|||
|
||||
initializeSubscription: ->
|
||||
routingKey1 = "changes.project.#{@scope.projectId}.userstories"
|
||||
@events.subscribe @scope, routingKey1, (message) =>
|
||||
@.loadUserstories()
|
||||
@events.subscribe @scope, routingKey1, debounceLeading(500, (message) =>
|
||||
@.loadUserstories())
|
||||
|
||||
loadInitialData: ->
|
||||
project = @.loadProject()
|
||||
|
|
|
@ -30,6 +30,7 @@ bindOnce = @.taiga.bindOnce
|
|||
scopeDefer = @.taiga.scopeDefer
|
||||
timeout = @.taiga.timeout
|
||||
bindMethods = @.taiga.bindMethods
|
||||
debounceLeading = @.taiga.debounceLeading
|
||||
|
||||
module = angular.module("taigaTaskboard")
|
||||
|
||||
|
@ -326,8 +327,8 @@ class TaskboardController extends mixOf(taiga.Controller, taiga.PageMixin, taiga
|
|||
|
||||
initializeSubscription: ->
|
||||
routingKey = "changes.project.#{@scope.projectId}.tasks"
|
||||
@events.subscribe @scope, routingKey, (message) =>
|
||||
@.loadTaskboard()
|
||||
@events.subscribe @scope, routingKey, debounceLeading(500, (message) =>
|
||||
@.loadTaskboard())
|
||||
|
||||
routingKey1 = "changes.project.#{@scope.projectId}.userstories"
|
||||
@events.subscribe @scope, routingKey1, (message) =>
|
||||
|
|
Loading…
Reference in New Issue