Fixes where the packager redirects when there is not a custom control to display - it was going to the old old packager thing which we don't want
This commit is contained in:
@@ -10,9 +10,12 @@
|
||||
// we will refresh and then navigate there.
|
||||
|
||||
var installPackageUri = localStorageService.get("packageInstallUri");
|
||||
|
||||
if (installPackageUri) {
|
||||
localStorageService.remove("packageInstallUri");
|
||||
if (installPackageUri) {
|
||||
localStorageService.remove("packageInstallUri");
|
||||
}
|
||||
if (installPackageUri && installPackageUri !== "installed") {
|
||||
//navigate to the custom installer screen, if it is just "installed", then we'll
|
||||
//show the installed view
|
||||
$location.path(installPackageUri).search("");
|
||||
}
|
||||
else {
|
||||
@@ -25,17 +28,19 @@
|
||||
"name": "Packages",
|
||||
"icon": "icon-cloud",
|
||||
"view": "views/packager/views/repo.html",
|
||||
"active": true
|
||||
"active": !installPackageUri || installPackageUri === "navigation"
|
||||
},
|
||||
{
|
||||
"name": "Installed",
|
||||
"icon": "icon-box",
|
||||
"view": "views/packager/views/installed.html"
|
||||
"view": "views/packager/views/installed.html",
|
||||
"active": installPackageUri === "installed"
|
||||
},
|
||||
{
|
||||
"name": "Install local",
|
||||
"icon": "icon-add",
|
||||
"view": "views/packager/views/install-local.html"
|
||||
"view": "views/packager/views/install-local.html",
|
||||
"active": installPackageUri === "local"
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
(function () {
|
||||
"use strict";
|
||||
|
||||
function PackagesInstallLocalController($scope, $route, $location, Upload, umbRequestHelper, packageResource, localStorageService, $timeout) {
|
||||
function PackagesInstallLocalController($scope, $route, $location, Upload, umbRequestHelper, packageResource, localStorageService, $timeout, $window) {
|
||||
|
||||
var vm = this;
|
||||
vm.state = "upload";
|
||||
@@ -122,10 +122,14 @@
|
||||
//Put the redirect Uri in a cookie so we can use after reloading
|
||||
localStorageService.set("packageInstallUri", result.postInstallationPath);
|
||||
}
|
||||
else {
|
||||
//set to a constant value so it knows to just go to the installed view
|
||||
localStorageService.set("packageInstallUri", "installed");
|
||||
}
|
||||
|
||||
//reload on next digest (after cookie)
|
||||
$timeout(function() {
|
||||
window.location.reload(true);
|
||||
$timeout(function () {
|
||||
$window.location.reload(true);
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
@@ -466,17 +466,11 @@ namespace Umbraco.Web.Editors
|
||||
|
||||
|
||||
var redirectUrl = "";
|
||||
if (ins.Control.IsNullOrWhiteSpace())
|
||||
if (ins.Control.IsNullOrWhiteSpace() == false)
|
||||
{
|
||||
redirectUrl = string.Format("/developer/framed/{0}",
|
||||
Uri.EscapeDataString(
|
||||
string.Format("/umbraco/developer/Packages/installer.aspx?installing=custominstaller&dir={0}&pId={1}&customUrl={2}", tempDir, model.Id, ins.Url)));
|
||||
}
|
||||
else
|
||||
{
|
||||
redirectUrl = string.Format("/developer/framed/{0}",
|
||||
Uri.EscapeDataString(
|
||||
string.Format("/umbraco/developer/Packages/installer.aspx?installing=custominstaller&dir={0}&pId={1}&customControl={2}&customUrl={3}", tempDir, model.Id, ins.Control, ins.Url)));
|
||||
string.Format("/umbraco/developer/Packages/installer.aspx?installing=custominstaller&dir={0}&pId={1}&customControl={2}&customUrl={3}", tempDir, model.Id, ins.Control, ins.Url)));
|
||||
}
|
||||
|
||||
return new PackageInstallResult
|
||||
|
||||
Reference in New Issue
Block a user