mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-20 12:55:26 +02:00
29 lines
732 B
JavaScript
29 lines
732 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) {
|
|
var manifest = tx.manifest
|
|
return tx.promise
|
|
.progressed(function (result) {
|
|
$scope.$apply(function () {
|
|
result.manifest = manifest
|
|
$scope.installation = result
|
|
})
|
|
})
|
|
.then(function (result) {
|
|
$scope.$apply(function () {
|
|
result.manifest = manifest
|
|
$scope.installation = result
|
|
})
|
|
})
|
|
})
|
|
}
|
|
}
|