mirror of
https://github.com/openstf/stf
synced 2025-10-05 02:29:26 +02:00
Dismiss modal when going to the device list.
This commit is contained in:
parent
1d44bf5da3
commit
ef7fd77322
1 changed files with 4 additions and 6 deletions
|
@ -4,12 +4,13 @@ module.exports = function FatalMessageServiceFactory($modal, $location, $route)
|
|||
|
||||
var ModalInstanceCtrl = function ($scope, $modalInstance, device) {
|
||||
$scope.ok = function () {
|
||||
$modalInstance.close(5)
|
||||
$modalInstance.close(true)
|
||||
$route.reload()
|
||||
//$location.path('/control/' + device.serial)
|
||||
}
|
||||
|
||||
$scope.second = function () {
|
||||
$modalInstance.dismiss()
|
||||
$location.path('/devices/')
|
||||
}
|
||||
|
||||
|
@ -23,17 +24,14 @@ module.exports = function FatalMessageServiceFactory($modal, $location, $route)
|
|||
template: require('./fatal-message.jade'),
|
||||
controller: ModalInstanceCtrl,
|
||||
resolve: {
|
||||
device: device,
|
||||
items: function () {
|
||||
return 10
|
||||
}
|
||||
device: device
|
||||
}
|
||||
})
|
||||
|
||||
modalInstance.result.then(function (selectedItem) {
|
||||
console.log(selectedItem)
|
||||
}, function () {
|
||||
console.log('Modal dismissed at: ' + new Date())
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue