Bamedize some unnecesary confirm.notify messages
parent
bd870ea692
commit
fffa11a425
|
@ -284,8 +284,7 @@ MembershipsRowAdminCheckboxDirective = ($log, $repo, $confirm) ->
|
||||||
$el.find(":checkbox").prop("checked", true)
|
$el.find(":checkbox").prop("checked", true)
|
||||||
|
|
||||||
$el.on "click", ":checkbox", (event) =>
|
$el.on "click", ":checkbox", (event) =>
|
||||||
onSuccess = ->
|
onSuccess = null
|
||||||
$confirm.notify("success")
|
|
||||||
|
|
||||||
onError = ->
|
onError = ->
|
||||||
$confirm.notify("error")
|
$confirm.notify("error")
|
||||||
|
@ -335,8 +334,7 @@ MembershipsRowRoleSelectorDirective = ($log, $repo, $confirm) ->
|
||||||
html = render(member)
|
html = render(member)
|
||||||
|
|
||||||
$el.on "click", "select", (event) =>
|
$el.on "click", "select", (event) =>
|
||||||
onSuccess = ->
|
onSuccess = null
|
||||||
$confirm.notify("success")
|
|
||||||
|
|
||||||
onError = ->
|
onError = ->
|
||||||
$confirm.notify("error")
|
$confirm.notify("error")
|
||||||
|
|
|
@ -91,12 +91,11 @@ class RolesController extends mixOf(taiga.Controller, taiga.PageMixin, taiga.Fil
|
||||||
@confirm.notify('error')
|
@confirm.notify('error')
|
||||||
|
|
||||||
setComputable: ->
|
setComputable: ->
|
||||||
onSuccess = (role) =>
|
onSuccess = null
|
||||||
@confirm.notify('success')
|
|
||||||
|
|
||||||
onError = =>
|
onError = =>
|
||||||
@confirm.notify("error")
|
@confirm.notify("error")
|
||||||
@scope.role.computable = !@scope.role.computable
|
@scope.role.revert()
|
||||||
|
|
||||||
@repo.save(@scope.role).then onSuccess, onError
|
@repo.save(@scope.role).then onSuccess, onError
|
||||||
|
|
||||||
|
@ -303,7 +302,6 @@ RolePermissionsDirective = ($repo, $confirm) ->
|
||||||
$scope.role.permissions = getActivePermissions()
|
$scope.role.permissions = getActivePermissions()
|
||||||
|
|
||||||
onSuccess = (role) ->
|
onSuccess = (role) ->
|
||||||
$confirm.notify('success')
|
|
||||||
categories = generateCategoriesFromRole(role)
|
categories = generateCategoriesFromRole(role)
|
||||||
categoryId = target.parents(".category-config").data("id")
|
categoryId = target.parents(".category-config").data("id")
|
||||||
renderResume(target.parents(".category-config"), categories[categoryId])
|
renderResume(target.parents(".category-config"), categories[categoryId])
|
||||||
|
|
|
@ -258,7 +258,6 @@ AttachmentDirective = ($log, $repo, $confirm) ->
|
||||||
|
|
||||||
onSuccess = ->
|
onSuccess = ->
|
||||||
$ctrl.onDeleteAttachment(attachment)
|
$ctrl.onDeleteAttachment(attachment)
|
||||||
$confirm.notify("success", null, "We've deleted #{subtitle}.") #TODO: i18in
|
|
||||||
|
|
||||||
onError = ->
|
onError = ->
|
||||||
$confirm.notify("error", null, "We have not been able to delete #{subtitle}.") #TODO: i18in
|
$confirm.notify("error", null, "We have not been able to delete #{subtitle}.") #TODO: i18in
|
||||||
|
@ -283,7 +282,6 @@ AttachmentDirective = ($log, $repo, $confirm) ->
|
||||||
onSuccess = ->
|
onSuccess = ->
|
||||||
$ctrl.onEditAttachment(attachment)
|
$ctrl.onEditAttachment(attachment)
|
||||||
render(attachment)
|
render(attachment)
|
||||||
$confirm.notify("success")
|
|
||||||
|
|
||||||
onError = ->
|
onError = ->
|
||||||
$confirm.notify("error")
|
$confirm.notify("error")
|
||||||
|
|
Loading…
Reference in New Issue