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