Merge pull request #1603 from rjabreu/U4-9036

added finish button so page only reloads after user input. also added…
This commit is contained in:
Warren Buckley
2016-11-16 16:14:53 +00:00
committed by GitHub
6 changed files with 47 additions and 9 deletions

View File

@@ -12,6 +12,7 @@
status: "",
progress:0
};
vm.installCompleted = false;
vm.zipFile = {
uploadStatus: "idle",
uploadProgress: 0,
@@ -137,10 +138,10 @@
localStorageService.set("packageInstallUri", "installed");
}
//reload on next digest (after cookie)
$timeout(function () {
$window.location.reload(true);
});
vm.installState.status = localizationService.localize("packager_installStateCompleted");
vm.installCompleted = true;
},
installError);
@@ -150,6 +151,13 @@
//This will return a rejection meaning that the promise change above will stop
return $q.reject();
}
vm.reloadPage = function() {
//reload on next digest (after cookie)
$timeout(function () {
$window.location.reload(true);
});
}
}
angular.module("umbraco").controller("Umbraco.Editors.Packages.InstallLocalController", PackagesInstallLocalController);

View File

@@ -159,6 +159,19 @@
<p>{{vm.installState.status}}</p>
</div>
<div class="umb-info-local-item text-info"
ng-show="vm.installCompleted">
<button type="button"
class="btn btn-success flex-inline mt3"
ng-click="vm.reloadPage()">
Finish
</button>
</div>
</div>
</form>

View File

@@ -30,6 +30,7 @@
vm.openLightbox = openLightbox;
vm.closeLightbox = closeLightbox;
vm.search = search;
vm.installCompleted = false;
var currSort = "Latest";
//used to cancel any request in progress if another one needs to take it's place
@@ -215,10 +216,8 @@
localStorageService.set("packageInstallUri", result.postInstallationPath);
}
//reload on next digest (after cookie)
$timeout(function() {
window.location.reload(true);
});
vm.installState.status = localizationService.localize("packager_installStateCompleted");
vm.installCompleted = true;
},
error);
@@ -277,6 +276,13 @@
searchDebounced();
}
vm.reloadPage = function () {
//reload on next digest (after cookie)
$timeout(function () {
window.location.reload(true);
});
}
init();
}

View File

@@ -340,6 +340,16 @@
<p>{{vm.installState.status}}</p>
</div>
<div class="umb-info-local-item text-info"
ng-show="vm.installCompleted">
<button type="button"
class="btn btn-success flex-inline mt3"
ng-click="vm.reloadPage()">
Finish
</button>
</div>
</div>
</form>

View File

@@ -817,7 +817,7 @@ To manage your website, simply open the Umbraco back office and start adding con
<key alias="installStateInstalling">Installing...</key>
<key alias="installStateRestarting">Restarting, please wait...</key>
<key alias="installStateComplete">All done, your browser will now refresh, please wait...</key>
<key alias="installStateCompleted">Please click finish to complete installation and reload page.</key>
</area>
<area alias="paste">
<key alias="doNothing">Paste with full formatting (Not recommended)</key>

View File

@@ -817,6 +817,7 @@ To manage your website, simply open the Umbraco back office and start adding con
<key alias="installStateInstalling">Installing...</key>
<key alias="installStateRestarting">Restarting, please wait...</key>
<key alias="installStateComplete">All done, your browser will now refresh, please wait...</key>
<key alias="installStateCompleted">Please click finish to complete installation and reload page.</key>
</area>
<area alias="paste">
<key alias="doNothing">Paste with full formatting (Not recommended)</key>