Sha256: 10409e68ad93e00ce4d1cc505849bfff3729f3c97603b409f1bdc824a4a2f039

Contents?: true

Size: 559 Bytes

Versions: 3

Compression:

Stored size: 559 Bytes

Contents

angular.module("SWAT").controller "ConfirmationCtrl", ($rootScope, $scope, $modalInstance, action, message, SwatHelpers)->
  $scope.init = ->
    $scope.action = action
    $scope.message = message
    $scope.helpers = SwatHelpers

  $scope.ok = ->
    result = $scope.action()
    unless result.$promise
      $modalInstance.close()
    else
      $scope.waitingAction = true
      result.$promise.then(->
        $scope.waitingAction = false
        $modalInstance.close()
      )

  $scope.cancel = ->
    $modalInstance.dismiss('cancel')

  $scope.init()

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
sw2at-ui-0.0.16 app/assets/javascripts/swat/app/controllers/management/confirmation.coffee
sw2at-ui-0.0.15 app/assets/javascripts/swat/app/controllers/management/confirmation.coffee
sw2at-ui-0.0.14 app/assets/javascripts/swat/app/controllers/management/confirmation.coffee