mirror of
https://github.com/openstf/stf
synced 2025-10-06 03:50:04 +02:00
26 lines
616 B
JavaScript
26 lines
616 B
JavaScript
module.exports = function UploadCtrl($scope, $rootScope) {
|
|
|
|
$scope.installation = null
|
|
|
|
$scope.clear = function () {
|
|
$scope.installation = null
|
|
}
|
|
|
|
$rootScope.install = function ($files) {
|
|
|
|
return $rootScope.control.install($files)
|
|
.then(function (tx) {
|
|
return tx.promise
|
|
.progressed(function (result) {
|
|
$scope.$apply(function () {
|
|
$scope.installation = result
|
|
})
|
|
})
|
|
.then(function (result) {
|
|
$scope.$apply(function () {
|
|
$scope.installation = result
|
|
})
|
|
})
|
|
})
|
|
}
|
|
}
|