mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-18 16:13:24 +02:00
add groups feature
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
/**
|
||||
* Copyright © 2019 code initially contributed by Orange SA, authors: Denis Barbaron - Licensed under the Apache license 2.0
|
||||
**/
|
||||
|
||||
module.exports =
|
||||
function GenericModalServiceFactory($uibModal) {
|
||||
const service = {}
|
||||
|
||||
const ModalInstanceCtrl = function($scope, $uibModalInstance, data) {
|
||||
$scope.data = data
|
||||
|
||||
$scope.ok = function() {
|
||||
$uibModalInstance.close(true)
|
||||
}
|
||||
|
||||
$scope.cancel = function() {
|
||||
$uibModalInstance.dismiss('cancel')
|
||||
}
|
||||
}
|
||||
|
||||
service.open = function(data) {
|
||||
var modalInstance = $uibModal.open({
|
||||
template: require('./generic-modal.pug'),
|
||||
controller: ModalInstanceCtrl,
|
||||
size: data.size,
|
||||
animation: true,
|
||||
resolve: {
|
||||
data: function() {
|
||||
return data
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
return modalInstance.result
|
||||
}
|
||||
|
||||
return service
|
||||
}
|
||||
Reference in New Issue
Block a user