Start to add Socket Disconnected Modal.

This commit is contained in:
Gunther Brunner
2014-10-17 18:05:22 +09:00
parent 0ea6debc13
commit e172457b5f
7 changed files with 84 additions and 1 deletions

View File

@@ -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
}