1
0
Fork 0
mirror of https://github.com/openstf/stf synced 2025-10-06 03:50:04 +02:00
OpenSTF/res/app/control-panes/dashboard/upload/upload-controller.js
2014-04-02 16:32:44 +09:00

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