diff --git a/src/Umbraco.Web.UI.Client/gruntFile.js b/src/Umbraco.Web.UI.Client/gruntFile.js
index 3a71a94331..44b59d29d1 100644
--- a/src/Umbraco.Web.UI.Client/gruntFile.js
+++ b/src/Umbraco.Web.UI.Client/gruntFile.js
@@ -89,7 +89,7 @@ module.exports = function (grunt) {
},
installer: {
- files: [{ dest: '<%= distdir %>/views/install', src : '*.html', expand: true, cwd: 'src/installer/steps' }]
+ files: [{ dest: '<%= distdir %>/views/install', src : '**/*.html', expand: true, cwd: 'src/installer/steps' }]
},
vendor: {
diff --git a/src/Umbraco.Web.UI.Client/src/assets/img/installer.jpg b/src/Umbraco.Web.UI.Client/src/assets/img/installer.jpg
index 4a48ed831a..7985a510b7 100644
Binary files a/src/Umbraco.Web.UI.Client/src/assets/img/installer.jpg and b/src/Umbraco.Web.UI.Client/src/assets/img/installer.jpg differ
diff --git a/src/Umbraco.Web.UI.Client/src/installer/installer.html b/src/Umbraco.Web.UI.Client/src/installer/installer.html
index 5af94e2a23..1d421db01e 100644
--- a/src/Umbraco.Web.UI.Client/src/installer/installer.html
+++ b/src/Umbraco.Web.UI.Client/src/installer/installer.html
@@ -14,16 +14,12 @@
-
-
- {{installer | json}}
-
-
+
diff --git a/src/Umbraco.Web.UI.Client/src/installer/installer.service.js b/src/Umbraco.Web.UI.Client/src/installer/installer.service.js
index 1852b5e749..ca5e0e4fd4 100644
--- a/src/Umbraco.Web.UI.Client/src/installer/installer.service.js
+++ b/src/Umbraco.Web.UI.Client/src/installer/installer.service.js
@@ -1,56 +1,68 @@
-angular.module("umbraco.install").factory('installerService', function($q, $timeout){
+angular.module("umbraco.install").factory('installerService', function($q, $timeout, $http, $location){
var _status = {
index: 0,
current: undefined,
- steps: undefined
+ steps: undefined,
+ loading: true
+ };
+
+
+ var _installerModel = {
+ DatabaseConfigure: {dbType: 0},
+ StarterKitDownload: "69e44beb-15ff-4cee-8b64-0a7dae498657"
};
- var _installerModel = {};
var service = {
status : _status,
+
+ getPackages : function(){
+ return $http.get(Umbraco.Sys.ServerVariables.installApiBaseUrl + "GetPackages");
+ },
+
getSteps : function(){
- var deferred = $q.defer();
- var s = [
- {
- name: "User",
- view: "user",
- description: "Configuring your user account",
- completed: false
- },
- {
- name: "Database",
- view: "database",
- description: "Setting up the system database",
- completed: false
- },
- {
- name: "Packages",
- view: "packages",
- description: "Installing a staterkit",
- completed: false
- }
- ];
-
- deferred.resolve(s);
- return deferred.promise;
+ return $http.get(Umbraco.Sys.ServerVariables.installApiBaseUrl + "GetSetup");
},
init : function(){
-
+ service.status.loading = true;
if(!_status.all){
- service.getSteps().then(function(steps){
- service.status.steps = steps;
+ service.getSteps().then(function(response){
+ service.status.steps = response.data.steps;
service.status.index = 0;
- service.gotoStep(0);
+ service.findNextStep();
+
+ $timeout(function(){
+ service.status.loading = false;
+ service.status.installing = true;
+ }, 2000);
});
}
-
},
gotoStep : function(index){
var step = service.status.steps[index];
+ if(step.view.indexOf(".html") < 0){
+ step.view = step.view + ".html";
+ }
+ if(step.view.indexOf("/") < 0){
+ step.view = "views/install/" + step.view;
+ }
+ if(!step.model){
+ step.model = {};
+ }
+ service.status.index = index;
+ service.status.current = step;
+ },
+
+ findNextStep : function(){
+ var step = _.find(service.status.steps, function(step, index){
+ if(step.view && index >= service.status.index){
+ service.status.index = index;
+ return true;
+ }
+ });
if(step.view.indexOf(".html") < 0){
step.view = step.view + ".html";
@@ -64,9 +76,8 @@ angular.module("umbraco.install").factory('installerService', function($q, $time
step.model = {};
}
- service.status.index = index;
service.status.current = step;
- },
+ },
storeCurrentStep : function(){
_installerModel[service.status.current.name] = service.status.current.model;
@@ -75,7 +86,7 @@ angular.module("umbraco.install").factory('installerService', function($q, $time
forward : function(){
service.storeCurrentStep();
service.status.index++;
- service.gotoStep(service.status.index);
+ service.findNextStep();
},
backwards : function(){
@@ -86,15 +97,36 @@ angular.module("umbraco.install").factory('installerService', function($q, $time
install : function(){
service.storeCurrentStep();
service.status.current = undefined;
+ service.status.feedback = [];
+ service.status.loading = true;
-
- _.each(service.status.steps, function(step){
- $timeout(function(){
- step.completed = true;
- }, 2000);
- });
+ var _feedback = 0;
+ service.status.feedback = service.status.steps[0].description;
- //post the installer model to somewhere...
+ function processInstallStep(){
+ $http.post(Umbraco.Sys.ServerVariables.installApiBaseUrl + "PostPerformInstall",
+ _installerModel).then(function(response){
+ if(!response.data.complete){
+ _feedback++;
+
+ var step = service.status.steps[_feedback];
+ if(step){
+ service.status.feedback = step.description;
+ }
+
+ processInstallStep();
+ }else{
+ service.status.done = true;
+ service.status.feedback = undefined;
+ service.status.loading = false;
+ service.complete();
+ }
+ });
+ }
+ processInstallStep();
+ },
+ complete : function(){
+ window.location.href = Umbraco.Sys.ServerVariables.umbracoBaseUrl;
}
};
diff --git a/src/Umbraco.Web.UI.Client/src/installer/steps/database.controller.js b/src/Umbraco.Web.UI.Client/src/installer/steps/database.controller.js
index 7ee3a29383..98f9f7fc3a 100644
--- a/src/Umbraco.Web.UI.Client/src/installer/steps/database.controller.js
+++ b/src/Umbraco.Web.UI.Client/src/installer/steps/database.controller.js
@@ -1,3 +1,7 @@
-angular.module("umbraco.install").controller("Umbraco.Installer.DataBaseController", function(){
- alert("we are in your database");
+angular.module("umbraco.install").controller("Umbraco.Installer.DataBaseController", function($scope, installerService){
+ $scope.validateAndForward = function(){
+ if(this.myForm.$valid){
+ installerService.forward();
+ }
+ };
});
\ No newline at end of file
diff --git a/src/Umbraco.Web.UI.Client/src/installer/steps/database.html b/src/Umbraco.Web.UI.Client/src/installer/steps/database.html
index 4c0b1d98f0..fff2c33d1d 100644
--- a/src/Umbraco.Web.UI.Client/src/installer/steps/database.html
+++ b/src/Umbraco.Web.UI.Client/src/installer/steps/database.html
@@ -1,5 +1,97 @@
-
-
-
+
+
Configure your database
+
+ Enter connection and authentication details for the database you want to install umbraco on
+
+
+
\ No newline at end of file
diff --git a/src/Umbraco.Web.UI.Client/src/installer/steps/packages.html b/src/Umbraco.Web.UI.Client/src/installer/steps/packages.html
deleted file mode 100644
index ed769e7484..0000000000
--- a/src/Umbraco.Web.UI.Client/src/installer/steps/packages.html
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/Umbraco.Web.UI.Client/src/installer/steps/starterkit.controller.js b/src/Umbraco.Web.UI.Client/src/installer/steps/starterkit.controller.js
new file mode 100644
index 0000000000..a70e9cd809
--- /dev/null
+++ b/src/Umbraco.Web.UI.Client/src/installer/steps/starterkit.controller.js
@@ -0,0 +1,11 @@
+angular.module("umbraco.install").controller("Umbraco.Installer.PackagesController", function($scope, installerService){
+
+ installerService.getPackages().then(function(response){
+ $scope.packages = response.data;
+ });
+
+ $scope.setPackageAndContinue = function(package){
+
+ installerService.install();
+ };
+});
\ No newline at end of file
diff --git a/src/Umbraco.Web.UI.Client/src/installer/steps/starterkit.html b/src/Umbraco.Web.UI.Client/src/installer/steps/starterkit.html
new file mode 100644
index 0000000000..62dd4518d6
--- /dev/null
+++ b/src/Umbraco.Web.UI.Client/src/installer/steps/starterkit.html
@@ -0,0 +1,17 @@
+
\ No newline at end of file
diff --git a/src/Umbraco.Web.UI.Client/src/installer/steps/user.controller.js b/src/Umbraco.Web.UI.Client/src/installer/steps/user.controller.js
index 441c3177a8..133552a9f4 100644
--- a/src/Umbraco.Web.UI.Client/src/installer/steps/user.controller.js
+++ b/src/Umbraco.Web.UI.Client/src/installer/steps/user.controller.js
@@ -4,9 +4,10 @@ angular.module("umbraco.install").controller("Umbraco.Install.UserController", f
installerService.install();
};
-
$scope.validateAndForward = function(){
- installerService.forward();
+ if(this.myForm.$valid){
+ installerService.forward();
+ }
};
});
\ No newline at end of file
diff --git a/src/Umbraco.Web.UI.Client/src/installer/steps/user.html b/src/Umbraco.Web.UI.Client/src/installer/steps/user.html
index f88b875911..e7ddcb3a70 100644
--- a/src/Umbraco.Web.UI.Client/src/installer/steps/user.html
+++ b/src/Umbraco.Web.UI.Client/src/installer/steps/user.html
@@ -31,18 +31,19 @@
Atleast 8 characters long
+
+
+
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Umbraco.Web.UI.Client/src/less/installer.less b/src/Umbraco.Web.UI.Client/src/less/installer.less
index 28630898e5..952649076c 100644
--- a/src/Umbraco.Web.UI.Client/src/less/installer.less
+++ b/src/Umbraco.Web.UI.Client/src/less/installer.less
@@ -10,6 +10,13 @@
@import "../../lib/bootstrap/less/grid.less";
@import "../../lib/bootstrap/less/layouts.less";
+@import "../../lib/bootstrap/less/thumbnails.less";
+@import "../../lib/bootstrap/less/media.less";
+
+
+[ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak {
+ display: none !important;
+}
html {
@@ -39,13 +46,30 @@ body {
position: absolute;
top: 20px;
left: 20px;
- opacity: 0.8
+ opacity: 0.8;
+ z-index: 777;
}
#installer{
margin: auto;
- background: rgba(255, 255, 255, 1);
- height: 400px;
+ background: white;
+ min-height: 400px;
+ min-width: 500px;
+ max-width: 700px;
+
+ height: 500px;
+
+ padding: 40px;
+}
+
+#overlay{
+ position: absolute;
+ top: 0;
+ right: 0;
+ left: 0;
+ bottom: 0;
+ background: @blackLight;
+ z-index: 666;
}
input.ng-dirty.ng-invalid{border-color: #b94a48; color: #b94a48;}
@@ -66,8 +90,29 @@ input.ng-dirty.ng-invalid{border-color: #b94a48; color: #b94a48;}
top: 0; left: 0; bottom: 0; right: 0;
}
+
+.fade-hide, .fade-show {
+ -webkit-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;
+ -moz-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;
+ -o-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;
+ transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;
+}
+.fade-hide {
+ opacity:1;
+}
+.fade-hide.fade-hide-active {
+ opacity:0;
+}
+.fade-show {
+ opacity:0;
+}
+.fade-show.fade-show-active {
+ opacity:1;
+}
+
+
.umb-loader{
-background-color: @blue;
+background-color: white;
margin-top:0;
margin-left:-100%;
-moz-animation-name:bounce_loadingProgressG;
@@ -150,5 +195,9 @@ height:1px;
//loader defaults
.umb-loader{
- height: 10px; margin: 10px 10px 10px 10px;
+ height: 5px;
+ position: absolute;
+ bottom: 0;
+ left: 0;
+ right: 0;
}
\ No newline at end of file
diff --git a/src/Umbraco.Web.UI/Areas/UmbracoInstall/Views/Install/Index.cshtml b/src/Umbraco.Web.UI/Areas/UmbracoInstall/Views/Install/Index.cshtml
index d4d1bf55e6..a4f7a942b1 100644
--- a/src/Umbraco.Web.UI/Areas/UmbracoInstall/Views/Install/Index.cshtml
+++ b/src/Umbraco.Web.UI/Areas/UmbracoInstall/Views/Install/Index.cshtml
@@ -13,7 +13,6 @@
Install Umbraco
-
@@ -21,8 +20,14 @@
-
-
+
+
+
+
+
{{installer.feedback}}...
-