Fixes the redirect when uninstalling, fixes the icon header width of installing a local package

This commit is contained in:
Shannon
2016-07-11 11:31:21 +02:00
parent 676bf3a6b2
commit d7c98c2686
2 changed files with 11 additions and 4 deletions

View File

@@ -63,7 +63,7 @@
<div class="flex items-center justify-center">
<div class="umb-info-local-items">
<form novalidate name="localPackageForm">
<form novalidate name="localPackageForm" class="w-100">
<div class="umb-package-icon">
<i ng-if="!vm.localPackage.icon" class="icon-box"></i>
<img ng-if="vm.localPackage.icon" ng-src="{{vm.localPackage.icon}}" alt="" />

View File

@@ -1,7 +1,7 @@
(function () {
"use strict";
function PackagesInstalledController($scope, $route, $location, packageResource) {
function PackagesInstalledController($scope, $route, $location, packageResource, $timeout, $window, localStorageService) {
var vm = this;
@@ -33,12 +33,19 @@
packageResource.uninstall(installedPackage.id)
.then(function () {
if (installedPackage.files.length > 0) {
vm.installState.status = "All done, your browser will now refresh";
vm.installState.progress = "100";
var url = window.location.href + "?uninstalled=" + vm.package.packageGuid;
window.location.reload(true);
//set this flag so that on refresh it shows the installed packages list
localStorageService.set("packageInstallUri", "installed");
//reload on next digest (after cookie)
$timeout(function () {
$window.location.reload(true);
});
}
else {
init();