Updates the RequiresExecution logic so we can skip steps based on some user input (i.e. skip the starter kit installation). Fixes the start kit js stuff to update the model correctly and continue. Fixes the error view to restart - it cannot just go back because there might not be a view there.

This commit is contained in:
Shannon
2014-03-05 14:30:17 +11:00
parent 893f86d34c
commit a40ba2f27e
24 changed files with 180 additions and 68 deletions

View File

@@ -20,4 +20,8 @@ angular.module("umbraco.install").controller("Umbraco.InstallerController",
$scope.gotoStep = function(step){
installerService.gotoNamedStep(step);
};
$scope.restart = function () {
installerService.gotoStep(0);
};
});

View File

@@ -89,20 +89,20 @@ angular.module("umbraco.install").factory('installerService', function($q, $time
},
gotoNamedStep : function(stepName){
var step = _.find(service.status.steps, function(s, index){
if (s.view && s.name === stepName) {
service.status.index = index;
return true;
}
return false;
});
step.view = resolveView(step.view);
if(!step.model){
step.model = {};
var step = _.find(service.status.steps, function(s, index){
if (s.view && s.name === stepName) {
service.status.index = index;
return true;
}
service.retrieveCurrentStep();
service.status.current = step;
return false;
});
step.view = resolveView(step.view);
if(!step.model){
step.model = {};
}
service.retrieveCurrentStep();
service.status.current = step;
},
/**

View File

@@ -0,0 +1,13 @@
<div>
<h1>Continue Umbraco Installation</h1>
<p>
You see this screen because your Umbraco installation did not complete correctly.
</p>
<p>
Simply click <strong>continue</strong> below to be guided through the rest of the installation process.
</p>
<p>
<button class="btn btn-success" ng-click="install()">Continue</button>
</p>
</div>

View File

@@ -1,7 +1,9 @@
<div class="error">
<h1>Error during installation</h1>
<h1>Error during installation</h1>
<p class="message">{{installer.current.model.message}}</p>
<p class="message">{{installer.current.model.message}}</p>
<button class="btn btn-success" ng-click="gotoStep(installer.current.model.step)">Go back</button>
<p><small>See log for full details</small></p>
<button class="btn btn-success" ng-click="restart()">Go back</button>
</div>

View File

@@ -4,7 +4,8 @@ angular.module("umbraco.install").controller("Umbraco.Installer.PackagesControll
$scope.packages = response.data;
});
$scope.setPackageAndContinue = function (pck) {
$scope.setPackageAndContinue = function (pckId) {
installerService.status.current.model = pckId;
installerService.forward();
};

View File

@@ -6,14 +6,15 @@
and simple foundation to build on top of.
</p>
<ul class="thumbnails">
<li class="span3" ng-repeat="package in packages">
<a href ng-click="installer.current.model = package.id; install()" class="thumbnail">
<img ng-src="http://our.umbraco.org{{package.thumbnail}}" alt="{{package.name}}">
</a>
</li>
</ul>
<ul class="thumbnails">
<li class="span3" ng-repeat="pck in packages">
<a href ng-click="setPackageAndContinue(pck.id)" class="thumbnail">
<img ng-src="http://our.umbraco.org{{pck.thumbnail}}" alt="{{pck.name}}">
</a>
</li>
</ul>
<a href ng-click="install()" class="btn btn-link">No thanks, I do not want to install a starter website</a>
<a href ng-click="setPackageAndContinue('00000000-0000-0000-0000-000000000000')" class="btn btn-link">
No thanks, I do not want to install a starter website
</a>
</div>

View File

@@ -5,7 +5,7 @@
it is completely harmless and will simply ensure your website is kept as fast, secure and uptodate as possible.
</p>
<p>
Simply click <strong>continue</strong> below to be guided through the rest of the upgrade</p>
Simply click <strong>continue</strong> below to be guided through the rest of the upgrade
</p>
<p>