improve(draw-route): improve generating new Threat for Model

See #47.
This commit is contained in:
Glavin Wiechert 2015-01-14 12:24:39 -04:00
Родитель 3f5497c270
Коммит c6b9ace1b5
1 изменённых файлов: 5 добавлений и 9 удалений

Просмотреть файл

@ -26,10 +26,10 @@ angular.module('seaspongeApp')
values
$scope.semverRegex = new RegExp("\\bv?(?:0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[\\da-z\\-]+(?:\\.[\\da-z\\-]+)*)?(?:\\+[\\da-z\\-]+(?:\\.[\\da-z\\-]+)*)?\\b")
$scope.newThreat = {
name: ''
severity: null
name: 'Untitled Threat'
severity: 'Medium'
description: ''
}
@ -105,14 +105,10 @@ angular.module('seaspongeApp')
# )()
$scope.generateThreat = ->
model.addThreat($scope.newThreat)
newThreat = $.extend(true, {}, $scope.newThreat);
model.addThreat(newThreat)
$scope.menu.newThreatOpen = false
$scope.menu.threatsOpen = true
$scope.newThreat = {
name: ''
severity: null
description: ''
}
$scope.shareModel = ->
model = $scope.model