limiting drag&drop in backlog according to permissions
parent
54da933fe9
commit
36ec352fc5
|
@ -27,6 +27,7 @@ scopeDefer = @.taiga.scopeDefer
|
||||||
bindOnce = @.taiga.bindOnce
|
bindOnce = @.taiga.bindOnce
|
||||||
groupBy = @.taiga.groupBy
|
groupBy = @.taiga.groupBy
|
||||||
textToColor = @.taiga.textToColor
|
textToColor = @.taiga.textToColor
|
||||||
|
bindOnce = @.taiga.bindOnce
|
||||||
|
|
||||||
module = angular.module("taigaBacklog")
|
module = angular.module("taigaBacklog")
|
||||||
|
|
||||||
|
@ -707,7 +708,7 @@ UsPointsDirective = ($repo) ->
|
||||||
$repo.refresh(us).then ->
|
$repo.refresh(us).then ->
|
||||||
$ctrl.loadProjectStats()
|
$ctrl.loadProjectStats()
|
||||||
|
|
||||||
taiga.bindOnce $scope, "project", (project) ->
|
bindOnce $scope, "project", (project) ->
|
||||||
# If the user has not enough permissions the click events are unbinded
|
# If the user has not enough permissions the click events are unbinded
|
||||||
if project.my_permissions.indexOf("modify_us") == -1
|
if project.my_permissions.indexOf("modify_us") == -1
|
||||||
$el.unbind("click")
|
$el.unbind("click")
|
||||||
|
|
|
@ -46,6 +46,10 @@ BacklogSortableDirective = ($repo, $rs, $rootscope) ->
|
||||||
# helper-in-wrong-place-when-scrolled-down-page
|
# helper-in-wrong-place-when-scrolled-down-page
|
||||||
|
|
||||||
link = ($scope, $el, $attrs) ->
|
link = ($scope, $el, $attrs) ->
|
||||||
|
bindOnce $scope, "project", (project) ->
|
||||||
|
# If the user has not enough permissions we don't enable the sortable
|
||||||
|
if project.my_permissions.indexOf("modify_us") > -1
|
||||||
|
|
||||||
$el.sortable({
|
$el.sortable({
|
||||||
connectWith: ".sprint-table"
|
connectWith: ".sprint-table"
|
||||||
handle: ".icon-drag-v",
|
handle: ".icon-drag-v",
|
||||||
|
@ -89,6 +93,9 @@ BacklogSortableDirective = ($repo, $rs, $rootscope) ->
|
||||||
|
|
||||||
SprintSortableDirective = ($repo, $rs, $rootscope) ->
|
SprintSortableDirective = ($repo, $rs, $rootscope) ->
|
||||||
link = ($scope, $el, $attrs) ->
|
link = ($scope, $el, $attrs) ->
|
||||||
|
bindOnce $scope, "project", (project) ->
|
||||||
|
# If the user has not enough permissions we don't enable the sortable
|
||||||
|
if project.my_permissions.indexOf("modify_us") > -1
|
||||||
$el.sortable({
|
$el.sortable({
|
||||||
dropOnEmpty: true
|
dropOnEmpty: true
|
||||||
connectWith: ".sprint-table,.backlog-table-body"
|
connectWith: ".sprint-table,.backlog-table-body"
|
||||||
|
|
Loading…
Reference in New Issue