mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-18 08:03:30 +02:00
Start to add Socket Disconnected Modal.
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
module.exports =
|
||||
function SocketDisconnectedServiceFactory($modal, $location, $route) {
|
||||
var service = {}
|
||||
|
||||
|
||||
var ModalInstanceCtrl = function ($scope, $modalInstance) {
|
||||
$scope.ok = function () {
|
||||
$modalInstance.close(true)
|
||||
$route.reload()
|
||||
//$location.path('/control/' + device.serial)
|
||||
}
|
||||
|
||||
|
||||
$scope.second = function () {
|
||||
$modalInstance.dismiss()
|
||||
//$location.path('/devices/')
|
||||
}
|
||||
|
||||
$scope.cancel = function () {
|
||||
$modalInstance.dismiss('cancel')
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
service.open = function () {
|
||||
var modalInstance = $modal.open({
|
||||
template: require('./socket-disconnected.jade'),
|
||||
controller: ModalInstanceCtrl,
|
||||
resolve: {}
|
||||
})
|
||||
|
||||
modalInstance.result.then(function () {
|
||||
}, function () {
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
return service
|
||||
}
|
||||
Reference in New Issue
Block a user