From 18ec8c0f93a75a3283ed92eafc55468b085b4557 Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Mon, 14 Jul 2014 16:33:00 -0400 Subject: [PATCH] Make build package UI a bit nicer and make sure it always executes via a scope apply --- static/js/controllers.js | 6 +++++- static/partials/build-package.html | 9 ++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/static/js/controllers.js b/static/js/controllers.js index cad428481..0b19eba2e 100644 --- a/static/js/controllers.js +++ b/static/js/controllers.js @@ -921,7 +921,11 @@ function BuildPackageCtrl($scope, Restangular, ApiService, DataFileService, $rou }); }; - DataFileService.readDataArrayAsPossibleArchive(uint8array, archiveread, notarchive); + setTimeout(function() { + $scope.$apply(function() { + DataFileService.readDataArrayAsPossibleArchive(uint8array, archiveread, notarchive); + }); + }, 0); }; var downloadBuildPack = function(url) { diff --git a/static/partials/build-package.html b/static/partials/build-package.html index eb96df2ba..3f6df7d50 100644 --- a/static/partials/build-package.html +++ b/static/partials/build-package.html @@ -23,6 +23,11 @@ Error: Could not download the build pack + +
+ Reading... +
+