Merge branch '7.1.0-installer' into 7.1.0

Conflicts:
	src/Umbraco.Web.UI.Client/src/common/mocks/resources/entity.mocks.js
	src/Umbraco.Web.UI.Client/src/views/propertyeditors/fileupload/fileupload.controller.js
	src/Umbraco.Web.UI.Client/src/views/propertyeditors/imagecropper/imagecropper.controller.js
	src/Umbraco.Web.UI.Client/test/unit/app/media/edit-media-controller.spec.js
This commit is contained in:
Shannon
2014-03-06 12:28:50 +11:00
152 changed files with 4495 additions and 4629 deletions
+7
View File
@@ -42,6 +42,13 @@ namespace SqlCE4Umbraco
{
var sqlCeEngine = new SqlCeEngine(ConnectionString);
sqlCeEngine.CreateDatabase();
// SD: Pretty sure this should be in a using clause but i don't want to cause unknown side-effects here
// since it's been like this for quite some time
//using (var sqlCeEngine = new SqlCeEngine(ConnectionString))
//{
// sqlCeEngine.CreateDatabase();
//}
}
}
+3
View File
@@ -165,6 +165,9 @@ namespace Umbraco.Core
/// </remarks>
internal string OriginalRequestUrl { get; set; }
/// <summary>
/// Checks if the version configured matches the assembly version
/// </summary>
private bool Configured
{
get
@@ -41,7 +41,7 @@ namespace Umbraco.Core.Configuration
private static string _reservedUrls;
//ensure the built on (non-changeable) reserved paths are there at all times
private const string StaticReservedPaths = "~/app_plugins/,~/install/,";
private const string StaticReservedUrls = "~/config/splashes/booting.aspx,~/install/default.aspx,~/config/splashes/noNodes.aspx,~/VSEnterpriseHelper.axd,";
private const string StaticReservedUrls = "~/config/splashes/booting.aspx,~/config/splashes/noNodes.aspx,~/VSEnterpriseHelper.axd,";
#endregion
+66 -19
View File
@@ -113,8 +113,8 @@ namespace Umbraco.Core
public void ConfigureEmbeddedDatabaseConnection()
{
const string providerName = "System.Data.SqlServerCe.4.0";
const string connectionString = @"Data Source=|DataDirectory|\Umbraco.sdf;Flush Interval=1;";
var connectionString = GetEmbeddedDatabaseConnectionString();
SaveConnectionString(connectionString, providerName);
var path = Path.Combine(GlobalSettings.FullpathToRoot, "App_Data", "Umbraco.sdf");
@@ -122,11 +122,23 @@ namespace Umbraco.Core
{
var engine = new SqlCeEngine(connectionString);
engine.CreateDatabase();
// SD: Pretty sure this should be in a using clause but i don't want to cause unknown side-effects here
// since it's been like this for quite some time
//using (var engine = new SqlCeEngine(connectionString))
//{
// engine.CreateDatabase();
//}
}
Initialize(providerName);
}
public string GetEmbeddedDatabaseConnectionString()
{
return @"Data Source=|DataDirectory|\Umbraco.sdf;Flush Interval=1;";
}
/// <summary>
/// Configure a ConnectionString that has been entered manually.
/// </summary>
@@ -149,27 +161,29 @@ namespace Umbraco.Core
/// <param name="password">Database Password</param>
/// <param name="databaseProvider">Type of the provider to be used (Sql, Sql Azure, Sql Ce, MySql)</param>
public void ConfigureDatabaseConnection(string server, string databaseName, string user, string password, string databaseProvider)
{
string connectionString;
string providerName = "System.Data.SqlClient";
if (databaseProvider.ToLower().Contains("mysql"))
{
providerName = "MySql.Data.MySqlClient";
connectionString = string.Format("Server={0}; Database={1};Uid={2};Pwd={3}", server, databaseName, user, password);
}
else if (databaseProvider.ToLower().Contains("azure"))
{
connectionString = BuildAzureConnectionString(server, databaseName, user, password);
}
else
{
connectionString = string.Format("server={0};database={1};user id={2};password={3}", server, databaseName, user, password);
}
{
string providerName;
var connectionString = GetDatabaseConnectionString(server, databaseName, user, password, databaseProvider, out providerName);
SaveConnectionString(connectionString, providerName);
Initialize(providerName);
}
public string GetDatabaseConnectionString(string server, string databaseName, string user, string password, string databaseProvider, out string providerName)
{
providerName = "System.Data.SqlClient";
if (databaseProvider.ToLower().Contains("mysql"))
{
providerName = "MySql.Data.MySqlClient";
return string.Format("Server={0}; Database={1};Uid={2};Pwd={3}", server, databaseName, user, password);
}
if (databaseProvider.ToLower().Contains("azure"))
{
return BuildAzureConnectionString(server, databaseName, user, password);
}
return string.Format("server={0};database={1};user id={2};password={3}", server, databaseName, user, password);
}
/// <summary>
/// Configures a ConnectionString for the Umbraco database that uses Microsoft SQL Server integrated security.
/// </summary>
@@ -178,12 +192,16 @@ namespace Umbraco.Core
public void ConfigureIntegratedSecurityDatabaseConnection(string server, string databaseName)
{
const string providerName = "System.Data.SqlClient";
string connectionString = String.Format("Server={0};Database={1};Integrated Security=true", server, databaseName);
var connectionString = GetIntegratedSecurityDatabaseConnectionString(server, databaseName);
SaveConnectionString(connectionString, providerName);
Initialize(providerName);
}
public string GetIntegratedSecurityDatabaseConnectionString(string server, string databaseName)
{
return String.Format("Server={0};Database={1};Integrated Security=true", server, databaseName);
}
internal string BuildAzureConnectionString(string server, string databaseName, string user, string password)
{
if (server.Contains(".") && ServerStartsWithTcp(server) == false)
@@ -597,5 +615,34 @@ namespace Umbraco.Core
public bool Success { get; set; }
public string Percentage { get; set; }
}
internal bool IsConnectionStringConfigured(ConnectionStringSettings databaseSettings)
{
var dbIsSqlCe = false;
if (databaseSettings != null && databaseSettings.ProviderName != null)
dbIsSqlCe = databaseSettings.ProviderName == "System.Data.SqlServerCe.4.0";
var sqlCeDatabaseExists = false;
if (dbIsSqlCe)
{
var parts = databaseSettings.ConnectionString.Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries);
var dataSourcePart = parts.FirstOrDefault(x => x.InvariantStartsWith("Data Source="));
if (dataSourcePart != null)
{
var datasource = dataSourcePart.Replace("|DataDirectory|", AppDomain.CurrentDomain.GetData("DataDirectory").ToString());
var filePath = datasource.Replace("Data Source=", string.Empty);
sqlCeDatabaseExists = File.Exists(filePath);
}
}
// Either the connection details are not fully specified or it's a SQL CE database that doesn't exist yet
if (databaseSettings == null
|| string.IsNullOrWhiteSpace(databaseSettings.ConnectionString) || string.IsNullOrWhiteSpace(databaseSettings.ProviderName)
|| (dbIsSqlCe && sqlCeDatabaseExists == false))
{
return false;
}
return true;
}
}
}
+19
View File
@@ -15,6 +15,25 @@ namespace Umbraco.Core
///</summary>
internal static class DictionaryExtensions
{
/// <summary>
/// Method to Get a value by the key. If the key doesn't exist it will create a new TVal object for the key and return it.
/// </summary>
/// <typeparam name="TKey"></typeparam>
/// <typeparam name="TVal"></typeparam>
/// <param name="dict"></param>
/// <param name="key"></param>
/// <returns></returns>
public static TVal GetOrCreate<TKey, TVal>(this IDictionary<TKey, TVal> dict, TKey key)
where TVal : class, new()
{
if (dict.ContainsKey(key) == false)
{
dict.Add(key, new TVal());
}
return dict[key];
}
/// <summary>
/// Updates an item with the specified key with the specified value
/// </summary>
@@ -0,0 +1,38 @@
using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Umbraco.Core.Persistence
{
//TODO: check if any of this works and for what databse types it works for:
// ref: http://stackoverflow.com/questions/16171144/how-to-check-for-database-availability
internal static class SqlExtensions
{
public static bool IsConnectionAvailable(string connString)
{
using (var connection = new SqlConnection(connString))
{
return connection.IsAvailable();
}
}
public static bool IsAvailable(this SqlConnection connection)
{
try
{
connection.Open();
connection.Close();
}
catch (SqlException)
{
return false;
}
return true;
}
}
}
+1 -1
View File
@@ -66,7 +66,6 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Newtonsoft.Json.4.5.11\lib\net40\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Configuration" />
@@ -356,6 +355,7 @@
<Compile Include="Persistence\EntityNotFoundException.cs" />
<Compile Include="Persistence\Factories\MemberGroupFactory.cs" />
<Compile Include="Persistence\Mappers\MemberGroupMapper.cs" />
<Compile Include="Persistence\SqlExtensions.cs" />
<Compile Include="PropertyEditors\DefaultPropertyValueConverterAttribute.cs" />
<Compile Include="Persistence\Migrations\Upgrades\TargetVersionSeven\UpdateRelatedLinksData.cs" />
<Compile Include="PropertyEditors\IValueEditor.cs" />
-1
View File
@@ -116,7 +116,6 @@ namespace Umbraco.Tests
Assert.AreNotEqual(appCtx, result);
}
[NUnit.Framework.Ignore("Need to fix more stuff up, this is ignore because an exception occurs because it wants to ensure we have a resolver initialized - need to make that process better for testability")]
[Test]
public void Can_Get_Umbraco_Context()
{
+4 -2
View File
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -651,7 +651,9 @@
<Content Include="Services\Importing\uBlogsy-Package.xml" />
<Content Include="Services\Importing\XsltSearch-Package.xml" />
</ItemGroup>
<ItemGroup />
<ItemGroup>
<Folder Include="Install\" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>xcopy "$(ProjectDir)"..\packages\SqlServerCE.4.0.0.0\amd64\*.* "$(TargetDir)amd64\" /Y /F /E /D
+46 -14
View File
@@ -3,17 +3,18 @@ module.exports = function (grunt) {
// Default task.
grunt.registerTask('default', ['jshint:dev','build','karma:unit']);
grunt.registerTask('dev', ['jshint:dev', 'build', 'webserver', 'open:dev', 'watch']);
//run by the watch task
grunt.registerTask('watch-js', ['jshint:dev','concat','copy:app','copy:mocks','copy:packages','copy:vs','karma:unit']);
grunt.registerTask('watch-less', ['recess:build','copy:assets','copy:vs']);
grunt.registerTask('watch-less', ['recess:build','recess:installer','copy:assets','copy:vs']);
grunt.registerTask('watch-html', ['copy:views', 'copy:vs']);
grunt.registerTask('watch-packages', ['copy:packages']);
grunt.registerTask('watch-installer', ['concat:install','concat:installJs','copy:installer', 'copy:vs']);
grunt.registerTask('watch-test', ['jshint:dev', 'karma:unit']);
//triggered from grunt dev or grunt
grunt.registerTask('build', ['clean','concat','recess:min','copy']);
grunt.registerTask('build', ['clean','concat','recess:min','recess:installer','copy']);
//utillity tasks
grunt.registerTask('docs', ['ngdocs']);
grunt.registerTask('webserver', ['connect:devserver']);
@@ -68,7 +69,7 @@ module.exports = function (grunt) {
specs: ['test/**/*.spec.js'],
scenarios: ['test/**/*.scenario.js'],
samples: ['sample files/*.js'],
html: ['src/index.html'],
html: ['src/index.html','src/install.html'],
everything:['src/**/*.*', 'test/**/*.*', 'docs/**/*.*'],
@@ -86,6 +87,11 @@ module.exports = function (grunt) {
assets: {
files: [{ dest: '<%= distdir %>/assets', src : '**', expand: true, cwd: 'src/assets/' }]
},
installer: {
files: [{ dest: '<%= distdir %>/views/install', src : '**/*.html', expand: true, cwd: 'src/installer/steps' }]
},
vendor: {
files: [{ dest: '<%= distdir %>/lib', src : '**', expand: true, cwd: 'lib/' }]
},
@@ -130,8 +136,24 @@ module.exports = function (grunt) {
process: true
}
},
install: {
src: ['src/installer/installer.html'],
dest: '<%= distdir %>/installer.html',
options: {
process: true
}
},
installJs: {
src: ['src/installer/**/*.js'],
dest: '<%= distdir %>/js/umbraco.installer.js',
options: {
banner: "<%= banner %>\n(function() { \n\n angular.module('umbraco.install', []); \n",
footer: "\n\n})();"
}
},
controllers: {
src:['src/views/**/*.controller.js'],
src:['src/controllers/**/*.controller.js','src/views/**/*.controller.js'],
dest: '<%= distdir %>/js/umbraco.controllers.js',
options: {
banner: "<%= banner %>\n(function() { \n\n",
@@ -198,7 +220,7 @@ module.exports = function (grunt) {
}
}
},
recess: {
build: {
files: {
@@ -208,6 +230,14 @@ module.exports = function (grunt) {
compile: true
}
},
installer: {
files: {
'<%= distdir %>/assets/css/installer.css':
['src/less/installer.less'] },
options: {
compile: true
}
},
min: {
files: {
'<%= distdir %>/assets/css/<%= pkg.name %>.css': ['<%= src.less %>']
@@ -220,7 +250,6 @@ module.exports = function (grunt) {
},
watch:{
css: {
files: '**/*.less',
@@ -237,6 +266,10 @@ module.exports = function (grunt) {
files: ['test/**/*.js'],
tasks: ['watch-test', 'timestamp'],
},
installer: {
files: ['src/installer/**/*.*'],
tasks: ['watch-installer', 'timestamp'],
},
html: {
files: ['src/views/**/*.html', 'src/*.html'],
tasks:['watch-html','timestamp']
@@ -288,7 +321,7 @@ module.exports = function (grunt) {
//NOTE: we ignore tabs vs spaces because enforcing that causes lots of errors depending on the text editor being used
smarttabs: true,
globals:{}
}
}
},
build:{
files:['<%= src.prod %>'],
@@ -312,13 +345,13 @@ module.exports = function (grunt) {
smarttabs: true,
globalstrict:true,
globals:{$:false, jQuery:false,define:false,require:false,window:false}
}
}
}
}
});
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-clean');
@@ -328,11 +361,10 @@ module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-recess');
grunt.loadNpmTasks('grunt-karma');
grunt.loadNpmTasks('grunt-open');
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-ngdocs');
grunt.loadNpmTasks('grunt-ngmin');
};
+1 -2
View File
@@ -42,7 +42,6 @@
"karma-coffee-preprocessor": "0.0.1",
"karma": "~0.9",
"karma-phantomjs-launcher": "0.0.2",
"grunt-ngdocs": "~0.1.2",
"grunt-ngmin": "0.0.3"
"grunt-ngdocs": "~0.1.2"
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 763 KiB

@@ -125,6 +125,39 @@ function mediaHelper(umbRequestHelper) {
return "";
},
registerFileResolver: function(propertyEditorAlias, func){
_mediaFileResolvers[propertyEditorAlias] = func;
},
resolveFile : function(mediaItem){
var _props = [];
//we either have properties raw on the object, or spread out on tabs
if(mediaItem.properties){
_props = mediaItem.properties;
}else if(mediaItem.tabs){
_.each(mediaItem.tabs, function(tab){
if(tab.properties){
_props.concat(tab.propeties);
}
});
}
//we go through our file resolvers to see if any of them matches the editors
var result = "";
_.each(_mediaFileResolvers, function(resolver, key){
var property = _.find(_props, function(property){ return property.editor === key; });
if(property){
var file = resolver(property);
if(file){
result = file;
}
}
});
return result;
},
/**
* @ngdoc function
* @name umbraco.services.mediaHelper#scaleToMaxSize
@@ -208,41 +241,8 @@ function mediaHelper(umbRequestHelper) {
var lowered = imagePath.toLowerCase();
var ext = lowered.substr(lowered.lastIndexOf(".") + 1);
return ("," + Umbraco.Sys.ServerVariables.umbracoSettings.imageFileTypes + ",").indexOf("," + ext + ",") !== -1;
},
registerFileResolver: function(propertyEditorAlias, func){
_mediaFileResolvers[propertyEditorAlias] = func;
},
resolveFile : function(mediaItem){
var _props = [];
//we either have properties raw on the object, or spread out on tabs
if(mediaItem.properties){
_props = mediaItem.properties;
}else if(mediaItem.tabs){
_.each(mediaItem.tabs, function(tab){
if(tab.properties){
_props.concat(tab.propeties);
}
});
}
//we go through our file resolvers to see if any of them matches the editors
var result = "";
_.each(_mediaFileResolvers, function(resolver, key){
var property = _.find(_props, function(property){ return property.editor === key; });
if(property){
var file = resolver(property);
if(file){
result = file;
}
}
});
return result;
}
};
}
angular.module('umbraco.services').factory('mediaHelper', mediaHelper);
@@ -0,0 +1,21 @@
yepnope({
load: [
'lib/jquery/jquery-2.0.3.min.js',
/* 1.1.5 */
'lib/angular/1.1.5/angular.min.js',
'lib/angular/1.1.5/angular-cookies.min.js',
'lib/angular/1.1.5/angular-mobile.min.js',
'lib/angular/1.1.5/angular-mocks.js',
'lib/angular/1.1.5/angular-sanitize.min.js',
'lib/underscore/underscore.js',
'js/umbraco.installer.js'
],
complete: function () {
jQuery(document).ready(function () {
angular.bootstrap(document, ['umbraco.install']);
});
}
});
@@ -0,0 +1,32 @@
angular.module("umbraco.install").controller("Umbraco.InstallerController",
function($scope, installerService){
$scope.stepIndex = 0;
//comment this out if you just want to see tips
installerService.init();
//uncomment this to see tips
//installerService.switchToFeedback();
$scope.installer = installerService.status;
$scope.forward = function(){
installerService.forward();
};
$scope.backward = function(){
installerService.backward();
};
$scope.install = function(){
installerService.install();
};
$scope.gotoStep = function(step){
installerService.gotoNamedStep(step);
};
$scope.restart = function () {
installerService.gotoStep(0);
};
});
@@ -0,0 +1,24 @@
<!doctype html>
<html lang="en">
<head>
<base href="/belle/" />
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Install Umbraco</title>
<link rel="stylesheet" href="assets/css/installer.css" />
</head>
<body ng-class="{touch:touchDevice, installing:installer.current.installing}" ng-controller="Umbraco.InstallerController" id="umbracoInstallPageBody">
<img src="assets/img/application/logo_white.png" id="logo" />
<div id="installer" class="absolute-center clearfix" ng-if="installer.current">
<div ng-include="installer.current.view"></div>
</div>
<div id="overlay"></div>
<script src="lib/yepnope/yepnope.min.js"></script>
<script src="js/install.loader.js"></script>
</body>
</html>
@@ -0,0 +1,308 @@
angular.module("umbraco.install").factory('installerService', function($rootScope, $q, $timeout, $http, $location, $log){
var _status = {
index: 0,
current: undefined,
steps: undefined,
loading: true,
progress: "100%"
};
var factTimer = undefined;
var _installerModel = {
installId: undefined,
instructions: {
}
};
//add to umbraco installer facts here
var facts = ['Umbraco was founded in 2005',
'Over 200.000 websites are currently powered by Umbraco',
'On an average day, more then 1000 people download Umbraco',
'<a target="_blank" href="http://umbraco.tv">umbraco.tv</a> is the premier source of Umbraco video tutorials to get you started',
'<a target="_blank" href="http://our.umbraco.org">our.umbraco.org</a> is the home of the friendly Umbraco community, and excellent resource for any Umbraco developer'
];
/**
Returns the description for the step at a given index based on the order of the serverOrder of steps
Since they don't execute on the server in the order that they are displayed in the UI.
*/
function getDescriptionForStepAtIndex(steps, index) {
var sorted = _.sortBy(steps, "serverOrder");
if (sorted[index]) {
return sorted[index].description;
}
return null;
}
/* Returns the description for the given step name */
function getDescriptionForStepName(steps, name) {
var found = _.find(steps, function(i) {
return i.name == name;
});
return (found) ? found.description : null;
}
//calculates the offset of the progressbar on the installaer
function calculateProgress(steps, next) {
var pct = "100%";
var f = _.find(steps, function(item, index) {
if(item.name == next){
pct = Math.floor((index / steps.length * 100)) + "%";
return true;
}else{
return false;
}
});
return pct;
}
//helpful defaults for the view loading
function resolveView(view){
if(view.indexOf(".html") < 0){
view = view + ".html";
}
if(view.indexOf("/") < 0){
view = "views/install/" + view;
}
return view;
}
/** Have put this here because we are not referencing our other modules */
function safeApply (scope, fn) {
if (scope.$$phase || scope.$root.$$phase) {
if (angular.isFunction(fn)) {
fn();
}
}
else {
if (angular.isFunction(fn)) {
scope.$apply(fn);
}
else {
scope.$apply();
}
}
}
var service = {
status : _status,
//loads the needed steps and sets the intial state
init : function(){
service.status.loading = true;
if(!_status.all){
service.getSteps().then(function(response){
service.status.steps = response.data.steps;
service.status.index = 0;
_installerModel.installId = response.data.installId;
service.findNextStep();
$timeout(function(){
service.status.loading = false;
service.status.configuring = true;
}, 2000);
});
}
},
//loads available packages from our.umbraco.org
getPackages : function(){
return $http.get(Umbraco.Sys.ServerVariables.installApiBaseUrl + "GetPackages");
},
getSteps : function(){
return $http.get(Umbraco.Sys.ServerVariables.installApiBaseUrl + "GetSetup");
},
gotoStep : function(index){
var step = service.status.steps[index];
step.view = resolveView(step.view);
if(!step.model){
step.model = {};
}
service.status.index = index;
service.status.current = step;
service.retrieveCurrentStep();
},
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 = {};
}
service.retrieveCurrentStep();
service.status.current = step;
},
/**
Finds the next step containing a view. If one is found it stores it as the current step
and retreives the step information and returns it, otherwise returns null .
*/
findNextStep : function(){
var step = _.find(service.status.steps, function(s, index){
if(s.view && index >= service.status.index){
service.status.index = index;
return true;
}
return false;
});
if (step) {
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.current = step;
service.retrieveCurrentStep();
//returns the next found step
return step;
}
else {
//there are no more steps found containing a view so return null
return null;
}
},
storeCurrentStep : function(){
_installerModel.instructions[service.status.current.name] = service.status.current.model;
},
retrieveCurrentStep : function(){
if(_installerModel.instructions[service.status.current.name]){
service.status.current.model = _installerModel.instructions[service.status.current.name];
}
},
/** Moves the installer forward to the next view, if there are not more views than the installation will commence */
forward : function(){
service.storeCurrentStep();
service.status.index++;
var found = service.findNextStep();
if (!found) {
//no more steps were found so start the installation process
service.install();
}
},
backwards : function(){
service.storeCurrentStep();
service.gotoStep(service.status.index--);
},
install : function(){
service.storeCurrentStep();
service.switchToFeedback();
service.status.feedback = getDescriptionForStepAtIndex(service.status.steps, 0);
service.status.progress = 0;
function processInstallStep(){
$http.post(Umbraco.Sys.ServerVariables.installApiBaseUrl + "PostPerformInstall",
_installerModel).then(function(response){
if(!response.data.complete){
//progress feedback
service.status.progress = calculateProgress(service.status.steps, response.data.nextStep);
if(response.data.view){
//set the current view and model to whatever the process returns, the view is responsible for retriggering install();
var v = resolveView(response.data.view);
service.status.current = {view: v, model: response.data.model};
//turn off loading bar and feedback
service.switchToConfiguration();
}
else {
var desc = getDescriptionForStepName(service.status.steps, response.data.nextStep);
if (desc) {
service.status.feedback = desc;
}
processInstallStep();
}
}
else {
service.complete();
}
}, function(err){
//this is where we handle installer error
var v = err.data.view ? resolveView(err.data.view) : resolveView("error");
var model = err.data.model ? err.data.model : err.data;
service.status.current = {view: v, model: model};
service.switchToConfiguration();
});
}
processInstallStep();
},
randomFact: function () {
safeApply($rootScope, function() {
service.status.fact = facts[_.random(facts.length - 1)];
});
},
switchToFeedback : function(){
service.status.current = undefined;
service.status.loading = true;
service.status.configuring = false;
//initial fact
service.randomFact();
//timed facts
factTimer = window.setInterval(function(){
service.randomFact();
},6000);
},
switchToConfiguration : function(){
service.status.loading = false;
service.status.configuring = true;
service.status.feedback = undefined;
if(factTimer){
clearInterval(factTimer);
}
},
complete : function(){
service.status.progress = "100%";
service.status.done = true;
service.status.feedback = "Redirecting you to Umbraco, please wait";
service.status.loading = false;
if(factTimer){
clearInterval(factTimer);
}
$timeout(function(){
window.location.href = Umbraco.Sys.ServerVariables.umbracoBaseUrl;
}, 1500);
}
};
return service;
});
@@ -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>
@@ -0,0 +1,25 @@
angular.module("umbraco.install").controller("Umbraco.Installer.DataBaseController", function($scope, $http, installerService){
$scope.checking = false;
$scope.validateAndForward = function(){
if(!$scope.checking && this.myForm.$valid){
$scope.checking = true;
var model = installerService.status.current.model;
$http.post(Umbraco.Sys.ServerVariables.installApiBaseUrl + "PostValidateDatabaseConnection",
model).then(function(response){
if(response.data === "true"){
installerService.forward();
}else{
$scope.invalidDbDns = true;
}
$scope.checking = false;
}, function(){
$scope.invalidDbDns = true;
$scope.checking = false;
});
}
};
});
@@ -0,0 +1,135 @@
<div ng-controller="Umbraco.Installer.DataBaseController">
<h1>Configure your database</h1>
<p>
Enter connection and authentication details for the database you want to install Umbraco on
</p>
<form name="myForm" class="form-horizontal" novalidate ng-submit="validateAndForward();">
<div class="control-group">
<legend>What type of database do you use?</legend>
<label class="control-label" for="dbType">Database type</label>
<div class="controls">
<select name="dbType" ng-model="installer.current.model.dbType" required>
<optgroup>
<option value="0">Embedded database SQL CE</option>
<option value="1">Microsft SQL Server</option>
<option value="2">MySQL</option>
</optgroup>
<optgroup>
<option value="-1">Custom connection-string</option>
</optgroup>
</select>
</div>
</div>
<div ng-if="installer.current.model.dbType == 0">
<p>Great!, no need to configure anything then, you simply click the <strong>continue</strong> button below to continue to the next step</p>
</div>
<div ng-if="installer.current.model.dbType < 0">
<legend>What is the exact connectionstring we should use?</legend>
<div class="control-group">
<label class="control-label" for="server">Connection string</label>
<div class="controls">
<textarea class="input-block-level" required ng-model="installer.current.model.connectionString" rows="5">
</textarea>
<small class="inline-help">Enter a valid database connection string.</small>
</div>
</div>
</div>
<div ng-if="installer.current.model.dbType > 0">
<div class="row">
<legend>Where do we find your database?</legend>
<div class="span6">
<div class="control-group">
<label class="control-label" for="server">Server</label>
<div class="controls">
<input type="text" name="server" placeholder="127.0.0.1/SQLEXPRESS" required ng-model="installer.current.model.server" />
<small class="inline-help">Enter server domain or IP</small>
</div>
</div>
</div>
<div class="span6">
<div class="control-group">
<label class="control-label" for="databaseName">Database name</label>
<div class="controls">
<input type="text" name="installer.current.model.databaseName"
placeholder="umbraco-cms"
required ng-model="installer.current.model.databaseName" />
<small class="inline-help">Enter the name of the database</small>
</div>
</div>
</div>
</div>
<div class="row">
<legend>What credentials are used to access the database?</legend>
<div class="span6">
<div class="control-group" ng-if="!installer.current.model.integratedAuth">
<label class="control-label" for="login">Login</label>
<div class="controls">
<input type="text" name="login"
placeholder="databaseuser"
required ng-model="installer.current.model.login" />
<small class="inline-help">Enter the database user name</small>
</div>
</div>
</div>
<div class="span6">
<div class="control-group" ng-if="!installer.current.model.integratedAuth">
<label class="control-label" for="password">Password</label>
<div class="controls">
<input type="password" name="password"
placeholder="umbraco-cms"
required ng-model="installer.current.model.password" />
<small class="inline-help">Enter the database password</small>
</div>
</div>
</div>
<div class="span12 control-group" ng-if="installer.current.model.dbType == 1">
<div class="controls">
<label class="checkbox" for="integratedAuth">
<input type="checkbox" name="integratedAuth"
placeholder="umbraco-cms"
ng-model="installer.current.model.integratedAuth" /> Use intergrated authentication</label>
</div>
</div>
</div>
</div>
<div class="row">
<div class="control-group" ng-class="{disabled:myForm.$invalid}">
<div class="controls">
<input type="submit" ng-disabled="myForm.$invalid || checking"
value="Continue" class="btn btn-success" />
<br/>
<span class="inline-help" ng-if="checking" ng-animate="'fade'">
Validating your database connection
</span>
<span class="inline-help error" ng-if="invalidDbDns" ng-animate="'fade'">
Could not connect to the database, please correct your connection details
</span>
</div>
</div>
</div>
</form>
</div>
@@ -0,0 +1,9 @@
<div class="error">
<h1>Error during installation</h1>
<p class="message">{{installer.current.model.message}}</p>
<p><small>See log for full details</small></p>
<button class="btn btn-success" ng-click="restart()">Go back</button>
</div>
@@ -0,0 +1,26 @@
<div>
<h1>Your permission settings are not ready for umbraco</h1>
<p>
In order to run umbraco, you'll need to update your permission settings.
Detailed information about the correct file & folder permissions for Umbraco can be found
<a href="http://our.umbraco.org/documentation/Installation/permissions"><strong>here</strong></a>.
</p>
<p>
The following report list the permissions that are currently failing. Once the permissions are fixed press the 'Go back' button to restart the installation.
</p>
<ul class="permissions-report">
<li ng-repeat="(category, items) in installer.current.model.errors">
<h4>{{category}}</h4>
<ul>
<li ng-repeat="item in items">
{{item}}
</li>
</ul>
</li>
</ul>
<p>
<button class="btn btn-success" ng-click="restart()">Go back</button>
</p>
</div>
@@ -0,0 +1,12 @@
angular.module("umbraco.install").controller("Umbraco.Installer.PackagesController", function ($scope, installerService) {
installerService.getPackages().then(function (response) {
$scope.packages = response.data;
});
$scope.setPackageAndContinue = function (pckId) {
installerService.status.current.model = pckId;
installerService.forward();
};
});
@@ -0,0 +1,20 @@
<div ng-controller="Umbraco.Installer.PackagesController">
<h1>Install a starter website</h1>
<p>
Installing a starter website helps you learn how Umbraco works, and gives you a solid
and simple foundation to build on top of.
</p>
<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="setPackageAndContinue('00000000-0000-0000-0000-000000000000')" class="btn btn-link">
No thanks, I do not want to install a starter website
</a>
</div>
@@ -0,0 +1,14 @@
<div>
<h1>Upgrading Umbraco</h1>
<p>
Welcome to the Umbraco installer. You see this screen because your Umbraco installation needs a quick upgrade of its database and files,
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>
<p>
<button class="btn btn-success" ng-click="install()">Continue</button>
</p>
</div>
@@ -0,0 +1,24 @@
angular.module("umbraco.install").controller("Umbraco.Install.UserController", function($scope, installerService) {
$scope.passwordPattern = /.*/;
if ($scope.installer.current.model.minNonAlphaNumericLength > 0) {
var exp = "";
for (var i = 0; i < $scope.installer.current.model.minNonAlphaNumericLength; i++) {
exp += ".*[\\W].*";
}
//replace duplicates
exp = exp.replace(".*.*", ".*");
$scope.passwordPattern = new RegExp(exp);
}
$scope.validateAndInstall = function(){
installerService.install();
};
$scope.validateAndForward = function(){
if(this.myForm.$valid){
installerService.forward();
}
};
});
@@ -0,0 +1,56 @@
<div ng-controller="Umbraco.Install.UserController">
<h1>Install Umbraco 7</h1>
<p>Enter your name, email and password to install Umbraco 7 with its default settings, alternatively you can customize your installation</p>
<form name="myForm" class="form-horizontal" novalidate ng-submit="validateAndInstall();">
<div class="row">
<div class="span8">
<div class="pull-right">
<div class="control-group">
<label class="control-label" for="name">Name</label>
<div class="controls">
<input type="text" name="name" placeholder="First Last" required
ng-model="installer.current.model.name" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="email">Email</label>
<div class="controls">
<input type="email" name="email" placeholder="you@example.com" required ng-model="installer.current.model.email" />
<small class="inline-help">Your email will be used as your login</small>
</div>
</div>
<div class="control-group">
<label class="control-label" for="password">Password</label>
<div class="controls">
<input type="password" name="installer.current.model.password"
ng-minlength="{{installer.current.model.minCharLength}}"
ng-pattern="passwordPattern"
required
ng-model="installer.current.model.password" />
<small class="inline-help">At least {{installer.current.model.minCharLength}} characters long</small>
<small ng-if="installer.current.model.minNonAlphaNumericLength > 0" class="inline-help">
At least {{installer.current.model.minNonAlphaNumericLength}} symbol{{installer.current.model.minNonAlphaNumericLength > 1 ? 's' : ''}}
</small>
</div>
</div>
<div class="control-group" ng-class="{disabled:myForm.$invalid}">
<div class="controls">
<input type="submit" ng-disabled="myForm.$invalid" value="Install" class="btn btn-success" />
<a href class="btn btn-link" ng-disabled="myForm.$invalid" ng-click="validateAndForward()">Customize</a>
</div>
</div>
</div>
</div>
</div>
</form>
</div>
@@ -0,0 +1,22 @@
<div>
<h1>Major version upgrade from {{installer.current.model.currentVersion}} to {{installer.current.model.newVersion}}</h1>
<h2>There were {{installer.current.model.errors.length}} issues detected</h2>
<p>
The following compatibility issues were found. If you continue all non-compatible property editors will be converted to a Readonly/Label.
You will be able to change the property editor to a compatible type manually by editing the data type after installation.
</p>
<p>
Otherwise if you choose not to proceed you will need to fix the errors listed below.
Refer to v{{installer.current.model.newVersion}} upgrade instructions for full details.
</p>
<ul class="upgrade-report">
<li ng-repeat="item in installer.current.model.errors">
{{item}}
</li>
</ul>
<p>
<button class="btn btn-success" ng-click="forward()">Continue</button>
</p>
</div>
@@ -0,0 +1,280 @@
// Core variables and mixins
@import "fonts.less"; // Loading fonts
@import "variables.less"; // Modify this for custom colors, font-sizes, etc
@import "mixins.less";
@import "buttons.less";
@import "forms.less";
// Grid system and page structure
@import "../../lib/bootstrap/less/scaffolding.less";
@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 {
background: url('../img/installer.jpg') no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
body {
margin: 0;
padding: 0;
height: 100%;
width: 100%;
font-family: @baseFontFamily;
font-size: @baseFontSize;
line-height: @baseLineHeight;
color: @textColor;
vertical-align: center;
text-align: center;
}
#logo{
position: absolute;
top: 20px;
left: 20px;
opacity: 0.8;
z-index: 777;
}
#installer{
margin: auto;
background: white;
width: 750px;
height: 600px;
text-align: left;
padding: 30px;
overflow:hidden;
z-index: 667;
}
#overlay{
position: absolute;
top: 0;
right: 0;
left: 0;
bottom: 0;
background: @blackLight;
z-index: 666;
}
.loading #overlay{
opacity: 0.5;
display: block !important;
}
#fact{
color: #fff;
text-shadow: 0px 0px 4px black;
font-size: 25px;
text-align: left;
line-height: 35px;
z-index: 667;
height: 600px;
width: 750px;
}
#fact h2{
font-size: 35px;
border-bottom: 1px solid white;
padding-bottom: 10px;
margin-bottom: 20px;
color: white;
}
#fact a{color: white;}
#feedback{
color: #fff;
text-shadow: 0px 0px 4px black;
font-size: 14px;
text-align: center;
line-height: 20px;
z-index: 667;
bottom: 20px;
right: 0;
left: 0;
height: 25px;
position: absolute;
}
h1{
border-bottom: 1px solid @grayLighter;
padding-bottom: 10px;
color: @gray;
}
.error h1, .error .message, span.error{ color: @red;}
legend{font-size: 14px; font-weight: bold}
input.ng-dirty.ng-invalid{border-color: #b94a48; color: #b94a48;}
.disabled{
opacity: 0.6;
}
.controls{
text-align: left
}
.controls small{display: block; color: @gray;}
.absolute-center {
margin: auto;
position: absolute;
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: white;
margin-top:0;
margin-left:-100%;
-moz-animation-name:bounce_loadingProgressG;
-moz-animation-duration:1s;
-moz-animation-iteration-count:infinite;
-moz-animation-timing-function:linear;
-webkit-animation-name:bounce_loadingProgressG;
-webkit-animation-duration:1s;
-webkit-animation-iteration-count:infinite;
-webkit-animation-timing-function:linear;
-ms-animation-name:bounce_loadingProgressG;
-ms-animation-duration:1s;
-ms-animation-iteration-count:infinite;
-ms-animation-timing-function:linear;
-o-animation-name:bounce_loadingProgressG;
-o-animation-duration:1s;
-o-animation-iteration-count:infinite;
-o-animationtiming-function:linear;
animation-name:bounce_loadingProgressG;
animation-duration:1s;
animation-iteration-count:infinite;
animation-timing-function:linear;
width:100%;
height: 5px;
}
@-moz-keyframes bounce_loadingProgressG{
0%{
margin-left:-100%;
}
100%{
margin-left:100%;
}
}
@-webkit-keyframes bounce_loadingProgressG{
0%{
margin-left:-100%;
}
100%{
margin-left:100%;
}
}
@-ms-keyframes bounce_loadingProgressG{
0%{
margin-left:-100%;
}
100%{
margin-left:100%;
}
}
@-o-keyframes bounce_loadingProgressG{
0%{
margin-left:-100%;
}
100%{
margin-left:100%;
}
}
@keyframes bounce_loadingProgressG{
0%{
margin-left:-100%;
}
100%{
margin-left:100%;
}
}
//loader defaults
.umb-loader-container, .umb-loader-done{
height: 3px;
position: absolute;
bottom: 0;
left: 0;
overflow: hidden;
width: 0%;
z-index: 777;
}
.umb-loader-done{
right: 0%;
background: white;
}
.permissions-report {
overflow:auto;
height:320px;
margin:0;
display:block;
padding:0;
}
.permissions-report > li {
list-style:none;
}
.permissions-report h4 {
margin:7px;
}
.upgrade-report {
overflow:auto;
height:280px;
display:block;
}
@@ -15,8 +15,8 @@
*/
function fileUploadController($scope, $element, $compile, imageHelper, fileManager, umbRequestHelper, mediaHelper) {
mediaHelper.registerFileResolver("Umbraco.UploadField", function (property) {
return property.value;
mediaHelper.registerFileResolver("Umbraco.UploadField", function(property){
return property.value;
});
/** Clears the file collections when content is saving (if we need to clear) or after saved */
@@ -5,7 +5,7 @@ describe('edit media controller tests', function () {
beforeEach(module('umbraco'));
//inject the contentMocks service
beforeEach(inject(function ($rootScope, $controller, angularHelper, $httpBackend, mediaMocks, mocksUtils, entityMocks) {
beforeEach(inject(function ($rootScope, $controller, angularHelper, $httpBackend, mediaMocks, entityMocks, mocksUtils) {
//for these tests we don't want any authorization to occur
mocksUtils.disableAuth();
@@ -1,104 +1,106 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;
using Umbraco.Core.Logging;
using Umbraco.Web.Install;
namespace Umbraco.Web.UI.Install.Steps.Skinning
{
public delegate void StarterKitInstalledEventHandler();
public partial class LoadStarterKits : StepUserControl
{
/// <summary>
/// Returns the string for the package installer web service base url
/// </summary>
protected string PackageInstallServiceBaseUrl { get; private set; }
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
//Get the URL for the package install service base url
var umbracoPath = Core.Configuration.GlobalSettings.UmbracoMvcArea;
var urlHelper = new UrlHelper(Context.Request.RequestContext);
PackageInstallServiceBaseUrl = urlHelper.Action("Index", "InstallPackage", new { area = umbracoPath });
}
/// <summary>
/// Flag to show if we can connect to the repo or not
/// </summary>
protected bool CannotConnect { get; private set; }
public event StarterKitInstalledEventHandler StarterKitInstalled;
protected virtual void OnStarterKitInstalled()
{
StarterKitInstalled();
}
private readonly global::umbraco.cms.businesslogic.packager.repositories.Repository _repo;
private const string RepoGuid = "65194810-1f85-11dd-bd0b-0800200c9a66";
public LoadStarterKits()
{
_repo = global::umbraco.cms.businesslogic.packager.repositories.Repository.getByGuid(RepoGuid);
}
protected void Page_Load(object sender, EventArgs e)
{
}
protected void NextStep(object sender, EventArgs e)
{
var p = (Default)this.Page;
InstallHelper.RedirectToNextStep(Page, Request.GetItemAsString("installStep"));
}
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
if (_repo == null)
{
throw new InvalidOperationException("Could not find repository with id " + RepoGuid);
}
//clear progressbar cache
InstallHelper.ClearProgress();
if (_repo.HasConnection())
{
try
{
var r = new org.umbraco.our.Repository();
rep_starterKits.DataSource = r.Modules();
rep_starterKits.DataBind();
}
catch (Exception ex)
{
LogHelper.Error<LoadStarterKits>("Cannot connect to package repository", ex);
CannotConnect = true;
}
}
else
{
CannotConnect = true;
}
}
protected void GotoLastStep(object sender, EventArgs e)
{
InstallHelper.RedirectToLastStep(Page);
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;
using System.Web.UI;
using Umbraco.Core.Logging;
using Umbraco.Web.Install;
namespace Umbraco.Web.UI.Install.Steps.Skinning
{
public delegate void StarterKitInstalledEventHandler();
public partial class LoadStarterKits : UserControl
{
/// <summary>
/// Returns the string for the package installer web service base url
/// </summary>
protected string PackageInstallServiceBaseUrl { get; private set; }
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
//Get the URL for the package install service base url
var umbracoPath = Core.Configuration.GlobalSettings.UmbracoMvcArea;
var urlHelper = new UrlHelper(Context.Request.RequestContext);
//PackageInstallServiceBaseUrl = urlHelper.Action("Index", "InstallPackage", new { area = "UmbracoInstall" });
PackageInstallServiceBaseUrl = urlHelper.GetUmbracoApiService("Index", "InstallPackage", "UmbracoInstall");
}
/// <summary>
/// Flag to show if we can connect to the repo or not
/// </summary>
protected bool CannotConnect { get; private set; }
public event StarterKitInstalledEventHandler StarterKitInstalled;
protected virtual void OnStarterKitInstalled()
{
StarterKitInstalled();
}
private readonly global::umbraco.cms.businesslogic.packager.repositories.Repository _repo;
private const string RepoGuid = "65194810-1f85-11dd-bd0b-0800200c9a66";
public LoadStarterKits()
{
_repo = global::umbraco.cms.businesslogic.packager.repositories.Repository.getByGuid(RepoGuid);
}
protected void Page_Load(object sender, EventArgs e)
{
}
//protected void NextStep(object sender, EventArgs e)
//{
// var p = (Default)this.Page;
// //InstallHelper.RedirectToNextStep(Page, Request.GetItemAsString("installStep"));
//}
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
if (_repo == null)
{
throw new InvalidOperationException("Could not find repository with id " + RepoGuid);
}
//clear progressbar cache
//InstallHelper.ClearProgress();
if (_repo.HasConnection())
{
try
{
var r = new org.umbraco.our.Repository();
rep_starterKits.DataSource = r.Modules();
rep_starterKits.DataBind();
}
catch (Exception ex)
{
LogHelper.Error<LoadStarterKits>("Cannot connect to package repository", ex);
CannotConnect = true;
}
}
else
{
CannotConnect = true;
}
}
protected void GotoLastStep(object sender, EventArgs e)
{
//InstallHelper.RedirectToLastStep(Page);
}
}
}
@@ -1,60 +1,60 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Umbraco.Web.UI.Install.Steps.Skinning {
public partial class LoadStarterKits {
/// <summary>
/// pl_loadStarterKits control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.PlaceHolder pl_loadStarterKits;
/// <summary>
/// JsInclude1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::ClientDependency.Core.Controls.JsInclude JsInclude1;
/// <summary>
/// rep_starterKits control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Repeater rep_starterKits;
/// <summary>
/// LinkButton1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.LinkButton LinkButton1;
/// <summary>
/// LinkButton2 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.LinkButton LinkButton2;
}
}
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Umbraco.Web.UI.Install.Steps.Skinning {
public partial class LoadStarterKits {
/// <summary>
/// pl_loadStarterKits control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.PlaceHolder pl_loadStarterKits;
/// <summary>
/// JsInclude1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::ClientDependency.Core.Controls.JsInclude JsInclude1;
/// <summary>
/// rep_starterKits control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Repeater rep_starterKits;
/// <summary>
/// LinkButton1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.LinkButton LinkButton1;
/// <summary>
/// LinkButton2 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.LinkButton LinkButton2;
}
}
@@ -1,98 +1,98 @@
<%@ Control Language="C#" AutoEventWireup="True" CodeBehind="LoadStarterKits.ascx.cs" Inherits="Umbraco.Web.UI.Install.Steps.Skinning.LoadStarterKits" %>
<%@ Import Namespace="Umbraco.Web.org.umbraco.our" %>
<%@ Register TagPrefix="umb" Namespace="ClientDependency.Core.Controls" Assembly="ClientDependency.Core" %>
<asp:PlaceHolder ID="pl_loadStarterKits" runat="server">
<umb:JsInclude ID="JsInclude1" runat="server" FilePath="installer/js/PackageInstaller.js" PathNameAlias="UmbracoClient" />
<% if (!CannotConnect) { %>
<script type="text/javascript">
(function ($) {
$(document).ready(function () {
var installer = new Umbraco.Installer.PackageInstaller({
starterKits: $("a.selectStarterKit"),
baseUrl: "<%= PackageInstallServiceBaseUrl %>",
serverError: $("#serverError"),
connectionError: $("#connectionError"),
setProgress: updateProgressBar,
setStatusMessage: updateStatusMessage
});
installer.init();
});
})(jQuery);
</script>
<% } %>
<div id="starter-kit-progress" style="display: none;">
<h2>Installation in progress...</h2>
<div class="loader">
<div class="hold">
<div class="progress-bar">
</div>
<span class="progress-bar-value">0%</span>
</div>
<strong></strong>
</div>
</div>
<asp:Repeater ID="rep_starterKits" runat="server">
<headertemplate>
<ul class="thumbnails">
</headertemplate>
<itemtemplate>
<li class="add-<%# ((Package)Container.DataItem).Text.Replace(" ","").ToLower() %>">
<div class="image">
<div class="overlay"><a href="#" class="single-tab selectStarterKit" data-name="<%# ((Package)Container.DataItem).Text %>" title="Install <%# ((Package)Container.DataItem).Text %>" data-repoid="<%# ((Package)Container.DataItem).RepoGuid %>">Install <%# ((Package)Container.DataItem).Text %></a></div>
<img src="http://our.umbraco.org<%# ((Package)Container.DataItem).Thumbnail %>" alt="<%# ((Package)Container.DataItem).Text %>">
<a class="zoom-in" title="Enlarge <%# ((Package)Container.DataItem).Text %>" href="#<%# ((Package)Container.DataItem).Text %>">Open</a>
</div>
</li>
<div id="<%# ((Package)Container.DataItem).Text %>" class="lb"><a href="#top"><img src="http://our.umbraco.org<%# ((Package)Container.DataItem).Thumbnail %>" alt="oh man" /></a></div>
</itemtemplate>
<footertemplate>
</ul>
<asp:LinkButton runat="server" ID="declineStarterKits" CssClass="declineKit" OnClientClick="return confirm('Are you sure you do not want to install a starter kit?');" OnClick="NextStep">
No thanks, do not install a starterkit!
</asp:LinkButton>
</footertemplate>
</asp:Repeater>
</asp:PlaceHolder>
<div id="connectionError" style="<%= CannotConnect ? "" : "display:none;" %>">
<div style="padding: 0 100px 13px 5px;">
<h2>Oops...the installer can't connect to the repository</h2>
Starter Kits could not be fetched from the repository as there was no connection - which can occur if you are using a proxy server or firewall with certain configurations,
or if you are not currently connected to the internet.
<br />
Click <strong>Continue</strong> to complete the installation then navigate to the Developer section of your Umbraco installation
where you will find the Starter Kits listed in the Packages tree.
</div>
<!-- btn box -->
<footer class="btn-box">
<div class="t">&nbsp;</div>
<asp:LinkButton ID="LinkButton1" class="btn-step btn btn-continue" runat="server" OnClick="GotoLastStep"><span>Continue</span></asp:LinkButton>
</footer>
</div>
<div id="serverError" style="display:none;">
<div style="padding: 0 100px 13px 5px;">
<h2>Oops...the installer encountered an error</h2>
<div class="error-message"></div>
</div>
<!-- btn box -->
<footer class="btn-box">
<div class="t">&nbsp;</div>
<asp:LinkButton ID="LinkButton2" class="btn-step btn btn-continue" runat="server" OnClick="GotoLastStep"><span>Continue</span></asp:LinkButton>
</footer>
<%@ Control Language="C#" AutoEventWireup="True" CodeBehind="LoadStarterKits.ascx.cs" Inherits="Umbraco.Web.UI.Install.Steps.Skinning.LoadStarterKits" %>
<%@ Import Namespace="Umbraco.Web.org.umbraco.our" %>
<%@ Register TagPrefix="umb" Namespace="ClientDependency.Core.Controls" Assembly="ClientDependency.Core" %>
<asp:PlaceHolder ID="pl_loadStarterKits" runat="server">
<umb:JsInclude ID="JsInclude1" runat="server" FilePath="installer/js/PackageInstaller.js" PathNameAlias="UmbracoClient" />
<% if (!CannotConnect) { %>
<script type="text/javascript">
(function ($) {
$(document).ready(function () {
var installer = new Umbraco.Installer.PackageInstaller({
starterKits: $("a.selectStarterKit"),
baseUrl: "<%= PackageInstallServiceBaseUrl %>",
serverError: $("#serverError"),
connectionError: $("#connectionError"),
setProgress: updateProgressBar,
setStatusMessage: updateStatusMessage
});
installer.init();
});
})(jQuery);
</script>
<% } %>
<div id="starter-kit-progress" style="display: none;">
<h2>Installation in progress...</h2>
<div class="loader">
<div class="hold">
<div class="progress-bar">
</div>
<span class="progress-bar-value">0%</span>
</div>
<strong></strong>
</div>
</div>
<asp:Repeater ID="rep_starterKits" runat="server">
<headertemplate>
<ul class="thumbnails">
</headertemplate>
<itemtemplate>
<li class="add-<%# ((Package)Container.DataItem).Text.Replace(" ","").ToLower() %>">
<div class="image">
<div class="overlay"><a href="#" class="single-tab selectStarterKit" data-name="<%# ((Package)Container.DataItem).Text %>" title="Install <%# ((Package)Container.DataItem).Text %>" data-repoid="<%# ((Package)Container.DataItem).RepoGuid %>">Install <%# ((Package)Container.DataItem).Text %></a></div>
<img src="http://our.umbraco.org<%# ((Package)Container.DataItem).Thumbnail %>" alt="<%# ((Package)Container.DataItem).Text %>">
<a class="zoom-in" title="Enlarge <%# ((Package)Container.DataItem).Text %>" href="#<%# ((Package)Container.DataItem).Text %>">Open</a>
</div>
</li>
<div id="<%# ((Package)Container.DataItem).Text %>" class="lb"><a href="#top"><img src="http://our.umbraco.org<%# ((Package)Container.DataItem).Thumbnail %>" alt="oh man" /></a></div>
</itemtemplate>
<footertemplate>
</ul>
<%--<asp:LinkButton runat="server" ID="declineStarterKits" CssClass="declineKit" OnClientClick="return confirm('Are you sure you do not want to install a starter kit?');" OnClick="NextStep">
No thanks, do not install a starterkit!
</asp:LinkButton>--%>
</footertemplate>
</asp:Repeater>
</asp:PlaceHolder>
<div id="connectionError" style="<%= CannotConnect ? "" : "display:none;" %>">
<div style="padding: 0 100px 13px 5px;">
<h2>Oops...the installer can't connect to the repository</h2>
Starter Kits could not be fetched from the repository as there was no connection - which can occur if you are using a proxy server or firewall with certain configurations,
or if you are not currently connected to the internet.
<br />
Click <strong>Continue</strong> to complete the installation then navigate to the Developer section of your Umbraco installation
where you will find the Starter Kits listed in the Packages tree.
</div>
<!-- btn box -->
<footer class="btn-box">
<div class="t">&nbsp;</div>
<asp:LinkButton ID="LinkButton1" class="btn-step btn btn-continue" runat="server" OnClick="GotoLastStep"><span>Continue</span></asp:LinkButton>
</footer>
</div>
<div id="serverError" style="display:none;">
<div style="padding: 0 100px 13px 5px;">
<h2>Oops...the installer encountered an error</h2>
<div class="error-message"></div>
</div>
<!-- btn box -->
<footer class="btn-box">
<div class="t">&nbsp;</div>
<asp:LinkButton ID="LinkButton2" class="btn-step btn btn-continue" runat="server" OnClick="GotoLastStep"><span>Continue</span></asp:LinkButton>
</footer>
</div>
@@ -0,0 +1,52 @@
@using Umbraco.Web
@using Umbraco.Web.Install.Controllers
@{
Layout = null;
}
<!doctype html>
<html lang="en">
<head>
<base href="@ViewBag.UmbracoBaseFolder/" />
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Install Umbraco</title>
<link rel="stylesheet" href="assets/css/installer.css" />
</head>
<body ng-class="{loading:installer.loading}" ng-controller="Umbraco.InstallerController" id="umbracoInstallPageBody">
<img src="assets/img/application/logo_white.png" id="logo" />
<div class="umb-loader-container" ng-style="{'width': installer.progress}">
<div class="umb-loader" id="loader" ng-if="installer.loading"></div>
</div>
<div id="overlay" ng-cloak ng-animate="'fade'" ng-show="installer.done"></div>
<div id="installer" class="absolute-center clearfix"
ng-cloak
ng-animate="'fade'"
ng-show="installer.configuring">
<div ng-if="installer.current" ng-include="installer.current.view"></div>
</div>
<div ng-cloak ng-animate="'fade'" id="fact" class="absolute-center clearfix" ng-show="installer.fact">
<h2>Did you know</h2>
<p ng-bind-html-unsafe="installer.fact"></p>
</div>
<h3 ng-cloak ng-animate="'fade'" id="feedback" ng-show="installer.feedback">{{installer.feedback}}</h3>
<script type="text/javascript">
var Umbraco = {};
Umbraco.Sys = {};
Umbraco.Sys.ServerVariables = {
"installApiBaseUrl": "@ViewBag.InstallApiBaseUrl",
"umbracoBaseUrl": "@ViewBag.UmbracoBaseFolder"
};
</script>
<script src="lib/yepnope/yepnope.min.js"></script>
<script src="js/install.loader.js"></script>
</body>
</html>
@@ -0,0 +1,58 @@
<?xml version="1.0"?>
<configuration>
<configSections>
<sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
<section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
</sectionGroup>
</configSections>
<system.web.webPages.razor>
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<pages pageBaseType="System.Web.Mvc.WebViewPage">
<namespaces>
<add namespace="System.Web.Mvc" />
<add namespace="System.Web.Mvc.Ajax" />
<add namespace="System.Web.Mvc.Html" />
<add namespace="System.Web.Routing" />
</namespaces>
</pages>
</system.web.webPages.razor>
<appSettings>
<add key="webpages:Enabled" value="false" />
</appSettings>
<system.web>
<httpHandlers>
<add path="*" verb="*" type="System.Web.HttpNotFoundHandler"/>
</httpHandlers>
<!--
Enabling request validation in view pages would cause validation to occur
after the input has already been processed by the controller. By default
MVC performs request validation before a controller processes the input.
To change this behavior apply the ValidateInputAttribute to a
controller or action.
-->
<pages
validateRequest="false"
pageParserFilterType="System.Web.Mvc.ViewTypeParserFilter, System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
pageBaseType="System.Web.Mvc.ViewPage, System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
userControlBaseType="System.Web.Mvc.ViewUserControl, System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<controls>
<add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" namespace="System.Web.Mvc" tagPrefix="mvc" />
</controls>
</pages>
</system.web>
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<handlers>
<remove name="BlockViewHandler"/>
<add name="BlockViewHandler" path="*" verb="*" preCondition="integratedMode" type="System.Web.HttpNotFoundHandler" />
</handlers>
</system.webServer>
</configuration>
+10 -122
View File
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
@@ -307,10 +307,13 @@
<Compile Include="..\SolutionInfo.cs">
<Link>Properties\SolutionInfo.cs</Link>
</Compile>
<Compile Include="Install\Default.aspx.cs">
<DependentUpon>default.aspx</DependentUpon>
<Compile Include="Areas\UmbracoInstall\Legacy\LoadStarterKits.ascx.cs">
<DependentUpon>loadStarterKits.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Areas\UmbracoInstall\Legacy\LoadStarterKits.ascx.designer.cs">
<DependentUpon>loadStarterKits.ascx</DependentUpon>
</Compile>
<Compile Include="Config\splashes\NoNodes.aspx.cs">
<DependentUpon>noNodes.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
@@ -319,103 +322,6 @@
<DependentUpon>noNodes.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Install\Default.aspx.designer.cs">
<DependentUpon>default.aspx</DependentUpon>
</Compile>
<Compile Include="Install\InstallerRestService.aspx.cs">
<DependentUpon>InstallerRestService.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Install\InstallerRestService.aspx.designer.cs">
<DependentUpon>InstallerRestService.aspx</DependentUpon>
</Compile>
<Compile Include="Install\Steps\Database.ascx.cs">
<DependentUpon>database.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Install\Steps\Database.ascx.designer.cs">
<DependentUpon>database.ascx</DependentUpon>
</Compile>
<Compile Include="Install\Steps\DefaultUser.ascx.cs">
<DependentUpon>defaultUser.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Install\Steps\DefaultUser.ascx.designer.cs">
<DependentUpon>defaultUser.ascx</DependentUpon>
</Compile>
<Compile Include="Install\Steps\License.ascx.cs">
<DependentUpon>license.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Install\Steps\License.ascx.designer.cs">
<DependentUpon>license.ascx</DependentUpon>
</Compile>
<Compile Include="Install\Steps\Renaming.ascx.cs">
<DependentUpon>renaming.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Install\Steps\Renaming.ascx.designer.cs">
<DependentUpon>renaming.ascx</DependentUpon>
</Compile>
<Compile Include="Install\Steps\RenderingEngine.ascx.cs">
<DependentUpon>RenderingEngine.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Install\Steps\RenderingEngine.ascx.designer.cs">
<DependentUpon>RenderingEngine.ascx</DependentUpon>
</Compile>
<Compile Include="Install\Steps\Skinning\LoadStarterKits.ascx.cs">
<DependentUpon>loadStarterKits.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Install\Steps\Skinning\LoadStarterKits.ascx.designer.cs">
<DependentUpon>loadStarterKits.ascx</DependentUpon>
</Compile>
<Compile Include="Install\Steps\StarterKits.ascx.cs">
<DependentUpon>StarterKits.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Install\Steps\StarterKits.ascx.designer.cs">
<DependentUpon>StarterKits.ascx</DependentUpon>
</Compile>
<Compile Include="Install\Steps\StepUserControl.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Install\Steps\TheEnd.ascx.cs">
<DependentUpon>theend.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Install\Steps\TheEnd.ascx.designer.cs">
<DependentUpon>theend.ascx</DependentUpon>
</Compile>
<Compile Include="Install\Steps\UpgradeReport.ascx.cs">
<DependentUpon>UpgradeReport.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Install\Steps\UpgradeReport.ascx.designer.cs">
<DependentUpon>UpgradeReport.ascx</DependentUpon>
</Compile>
<Compile Include="Install\Steps\ValidatePermissions.ascx.cs">
<DependentUpon>validatePermissions.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Install\Steps\ValidatePermissions.ascx.designer.cs">
<DependentUpon>validatePermissions.ascx</DependentUpon>
</Compile>
<Compile Include="Install\Steps\Welcome.ascx.cs">
<DependentUpon>welcome.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Install\Steps\Welcome.ascx.designer.cs">
<DependentUpon>welcome.ascx</DependentUpon>
</Compile>
<Compile Include="Install\Title.ascx.cs">
<DependentUpon>Title.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Install\Title.ascx.designer.cs">
<DependentUpon>Title.ascx</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
@@ -630,6 +536,7 @@
<Compile Include="Umbraco\TreeInit.aspx.designer.cs">
<DependentUpon>treeInit.aspx</DependentUpon>
</Compile>
<Content Include="Areas\UmbracoInstall\Legacy\loadStarterKits.ascx" />
<Content Include="Umbraco\ClientRedirect.aspx" />
<Content Include="Umbraco\create.aspx" />
<Content Include="Umbraco\Logout.aspx" />
@@ -651,7 +558,6 @@
</Compile>
<Content Include="Config\Splashes\booting.aspx" />
<Content Include="Config\Splashes\noNodes.aspx" />
<Content Include="Install\Steps\UpgradeReport.ascx" />
<Content Include="Umbraco\Dashboard\UserControlProxy.aspx" />
<Content Include="Umbraco\Create\PartialView.ascx" />
<Content Include="Umbraco\Create\User.ascx" />
@@ -667,6 +573,7 @@
<SubType>
</SubType>
</Content>
<Content Include="Areas\UmbracoInstall\Views\Web.config" />
<None Include="Config\404handlers.Release.config">
<DependentUpon>404handlers.config</DependentUpon>
</None>
@@ -729,6 +636,7 @@
<Content Include="MacroScripts\Web.config">
<SubType>Designer</SubType>
</Content>
<Content Include="Areas\UmbracoInstall\Views\Install\Index.cshtml" />
<None Include="packages.config">
<SubType>Designer</SubType>
</None>
@@ -740,7 +648,6 @@
<DependentUpon>UI.xml</DependentUpon>
</None>
<Content Include="Global.asax" />
<Content Include="Install\Steps\RenderingEngine.ascx" />
<Content Include="Umbraco\Config\Lang\en_us.xml" />
<Content Include="Umbraco\Config\Lang\he.xml" />
<Content Include="Umbraco\Config\Lang\ja.xml" />
@@ -1752,12 +1659,6 @@
<Content Include="Umbraco_Client\Installer\Js\jquery.1.4.4.js" />
<Content Include="Umbraco_Client\Installer\Js\jquery.main.js" />
<Content Include="Umbraco_Client\Installer\Js\jquery.ui.selectmenu.js" />
<Content Include="Install\Steps\database.ascx" />
<Content Include="Install\Steps\renaming.ascx" />
<Content Include="Install\Steps\StarterKits.ascx" />
<Content Include="Install\Steps\Skinning\loadStarterKits.ascx" />
<Content Include="Install\Title.ascx" />
<Content Include="Install\InstallerRestService.aspx" />
<Content Include="Umbraco\Config\Lang\ko.xml" />
<Content Include="Umbraco\Dashboard\FeedProxy.aspx" />
<Content Include="Umbraco\Developer\Packages\StarterKits.aspx" />
@@ -1895,8 +1796,6 @@
<Content Include="Umbraco_Client\Tree\Themes\Default\icons.png" />
<Content Include="Umbraco_Client\Tree\Themes\Umbraco\icons.png" />
<Content Include="default.aspx" />
<Content Include="Install\default.aspx" />
<Content Include="Install\Steps\license.ascx" />
<Content Include="Umbraco\Actions\delete.aspx" />
<Content Include="Umbraco\Actions\editContent.aspx" />
<Content Include="Umbraco\Actions\preview.aspx" />
@@ -2087,18 +1986,6 @@
<Content Include="Umbraco\Images\Editor\underline_tw.gif" />
<Content Include="Umbraco\Images\Editor\unlink.gif" />
<Content Include="Umbraco\Images\Editor\visualaid.gif" />
<Content Include="Install\Steps\defaultUser.ascx">
<SubType>UserControl</SubType>
</Content>
<Content Include="Install\Steps\theend.ascx">
<SubType>UserControl</SubType>
</Content>
<Content Include="Install\Steps\validatePermissions.ascx">
<SubType>UserControl</SubType>
</Content>
<Content Include="Install\Steps\welcome.ascx">
<SubType>UserControl</SubType>
</Content>
<Content Include="Umbraco\Config\Create\UI.xml" />
<Content Include="Umbraco\Config\Lang\en.xml">
<SubType>Designer</SubType>
@@ -2615,6 +2502,7 @@
<Folder Include="App_Code\" />
<Folder Include="App_Data\" />
<Folder Include="App_Plugins\" />
<Folder Include="Areas\UmbracoInstall\Views\Shared\" />
<Folder Include="Css\" />
<Folder Include="MasterPages\" />
<Folder Include="Media\" />
+30
View File
@@ -0,0 +1,30 @@
yepnope({
load: [
'lib/jquery/jquery-2.0.3.min.js',
/* 1.1.5 */
'lib/angular/1.1.5/angular.min.js',
'lib/angular/1.1.5/angular-cookies.min.js',
'lib/angular/1.1.5/angular-mobile.min.js',
'lib/angular/1.1.5/angular-mocks.js',
'lib/angular/1.1.5/angular-sanitize.min.js',
'lib/underscore/underscore.js',
'js/umbraco.servervariables.js',
'js/app.dev.js'
],
complete: function () {
jQuery(document).ready(function () {
angular.module('umbraco.install', [
'umbraco.resources',
'umbraco.services',
'umbraco.httpbackend',
'ngMobile'
]);
angular.bootstrap(document, ['umbraco.install']);
});
}
});
@@ -0,0 +1,21 @@
yepnope({
load: [
'lib/jquery/jquery-2.0.3.min.js',
/* 1.1.5 */
'lib/angular/1.1.5/angular.min.js',
'lib/angular/1.1.5/angular-cookies.min.js',
'lib/angular/1.1.5/angular-mobile.min.js',
'lib/angular/1.1.5/angular-mocks.js',
'lib/angular/1.1.5/angular-sanitize.min.js',
'lib/underscore/underscore.js',
'js/umbraco.installer.js'
],
complete: function () {
jQuery(document).ready(function () {
angular.bootstrap(document, ['umbraco.install']);
});
}
});
@@ -10,7 +10,7 @@ NOTES:
* Compression/Combination/Minification is not enabled unless debug="false" is specified on the 'compiliation' element in the web.config
* A new version will invalidate both client and server cache and create new persisted files
-->
<clientDependency version="242556669" fileDependencyExtensions=".js,.css" loggerType="Umbraco.Web.UI.CdfLogger, umbraco">
<clientDependency version="394389720" fileDependencyExtensions=".js,.css" loggerType="Umbraco.Web.UI.CdfLogger, umbraco">
<!--
This section is used for Web Forms only, the enableCompositeFiles="true" is optional and by default is set to true.
@@ -44,22 +44,12 @@ NOTES:
-->
<compositeFiles defaultProvider="defaultFileProcessingProvider" compositeFileHandlerPath="~/DependencyHandler.axd">
<fileProcessingProviders>
<add name="CompositeFileProcessor"
type="ClientDependency.Core.CompositeFiles.Providers.CompositeFileProcessingProvider, ClientDependency.Core"
enableCssMinify="true"
enableJsMinify="true"
persistFiles="true"
compositeFilePath="~/App_Data/TEMP/ClientDependency"
bundleDomains="localhost:123456"
urlType="Base64QueryStrings"
pathUrlFormat="{dependencyId}/{version}/{type}"/>
<add name="CompositeFileProcessor" type="ClientDependency.Core.CompositeFiles.Providers.CompositeFileProcessingProvider, ClientDependency.Core" enableCssMinify="true" enableJsMinify="true" persistFiles="true" compositeFilePath="~/App_Data/TEMP/ClientDependency" bundleDomains="localhost:123456" urlType="Base64QueryStrings" pathUrlFormat="{dependencyId}/{version}/{type}" />
</fileProcessingProviders>
<!-- A file map provider stores references to dependency files by an id to be used in the handler URL when using the MappedId Url type -->
<fileMapProviders>
<add name="XmlFileMap"
type="ClientDependency.Core.CompositeFiles.Providers.XmlFileMapper, ClientDependency.Core"
mapPath="~/App_Data/TEMP/ClientDependency" />
<add name="XmlFileMap" type="ClientDependency.Core.CompositeFiles.Providers.XmlFileMapper, ClientDependency.Core" mapPath="~/App_Data/TEMP/ClientDependency" />
</fileMapProviders>
</compositeFiles>
@@ -1,86 +0,0 @@
using System;
using System.Web;
using System.Web.UI.WebControls;
using Umbraco.Core.IO;
using Umbraco.Web.Install;
using Umbraco.Web.Security;
using Umbraco.Web.UI.Pages;
using umbraco;
namespace Umbraco.Web.UI.Install
{
public partial class Default : BasePage
{
private string _installStep = "";
protected string CurrentStepClass = "";
protected void Page_Load(object sender, System.EventArgs e)
{
rp_steps.DataSource = InstallHelper.InstallerSteps.Values;
rp_steps.DataBind();
}
private void LoadContent(InstallerStep currentStep)
{
PlaceHolderStep.Controls.Clear();
PlaceHolderStep.Controls.Add(LoadControl(IOHelper.ResolveUrl(currentStep.UserControl)));
step.Value = currentStep.Alias;
CurrentStepClass = currentStep.Alias;
}
int _stepCounter = 0;
protected void BindStep(object sender, RepeaterItemEventArgs e)
{
if (e.Item.ItemType == ListItemType.AlternatingItem || e.Item.ItemType == ListItemType.Item)
{
var i = (InstallerStep)e.Item.DataItem;
if (!i.HideFromNavigation)
{
var _class = (Literal)e.Item.FindControl("lt_class");
var name = (Literal)e.Item.FindControl("lt_name");
if (i.Alias == CurrentStepClass)
_class.Text = "active";
_stepCounter++;
name.Text = (_stepCounter).ToString() + " - " + i.Name;
}
else
e.Item.Visible = false;
}
}
override protected void OnInit(EventArgs e)
{
base.OnInit(e);
_installStep = Request.GetItemAsString("installStep");
//if this is not an upgrade we will log in with the default user.
// It's not considered an upgrade if the ConfigurationStatus is missing or empty.
if (string.IsNullOrWhiteSpace(GlobalSettings.ConfigurationStatus) == false)
{
var result = Security.ValidateCurrentUser(false);
switch (result)
{
case ValidateRequestAttempt.FailedNoPrivileges:
case ValidateRequestAttempt.FailedTimedOut:
case ValidateRequestAttempt.FailedNoContextId:
Response.Redirect(SystemDirectories.Umbraco + "/AuthorizeUpgrade?redir=" + Server.UrlEncode(Request.RawUrl));
break;
}
}
var s = string.IsNullOrEmpty(_installStep)
? InstallHelper.InstallerSteps["welcome"]
: InstallHelper.InstallerSteps[_installStep];
LoadContent(s);
}
}
}
-51
View File
@@ -1,51 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Umbraco.Web.UI.Install {
public partial class Default
{
/// <summary>
/// ScriptManager1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.ScriptManager ScriptManager1;
/// <summary>
/// rp_steps control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Repeater rp_steps;
/// <summary>
/// PlaceHolderStep control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.PlaceHolder PlaceHolderStep;
/// <summary>
/// step control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
public global::System.Web.UI.HtmlControls.HtmlInputHidden step;
}
}
@@ -1 +0,0 @@
<%@ Page Language="C#" AutoEventWireup="True" CodeBehind="InstallerRestService.aspx.cs" Inherits="Umbraco.Web.UI.Install.InstallerRestService" %>
@@ -1,126 +0,0 @@
using System;
using System.Configuration;
using System.Security.Authentication;
using System.Web;
using System.Web.Script.Serialization;
using System.Web.Script.Services;
using System.Web.Services;
using Umbraco.Core;
using Umbraco.Core.Logging;
using Umbraco.Web.Install;
using umbraco;
using umbraco.businesslogic.Exceptions;
namespace Umbraco.Web.UI.Install
{
public partial class InstallerRestService : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
LogHelper.Info<InstallerRestService>(string.Format("Hitting Page_Load on InstallerRestService.aspx for the requested '{0}' feed", Request.QueryString["feed"]));
// Stop Caching in IE
Response.Cache.SetCacheability(System.Web.HttpCacheability.NoCache);
// Stop Caching in Firefox
Response.Cache.SetNoStore();
string feed = Request.QueryString["feed"];
string url = "http://our.umbraco.org/html/twitter";
if (feed == "progress")
{
Response.ContentType = "application/json";
Response.Write(InstallHelper.GetProgress());
}
else
{
if (feed == "blogs")
url = "http://our.umbraco.org/html/blogs";
if (feed == "sitebuildervids")
url = "http://umbraco.org/feeds/videos/site-builder-foundation-html";
if (feed == "developervids")
url = "http://umbraco.org/feeds/videos/developer-foundation-html";
string xmlResponse = library.GetXmlDocumentByUrl(url).Current.OuterXml;
if (!xmlResponse.Contains("System.Net.WebException"))
{
Response.Write(library.GetXmlDocumentByUrl(url).Current.OuterXml);
}
else
{
Response.Write("We can't connect to umbraco.tv right now. Click <strong>Set up your new website</strong> above to continue.");
}
}
}
[WebMethod]
[ScriptMethod(ResponseFormat = ResponseFormat.Json)]
public static string Install()
{
//if its not configured then we can continue
if (ApplicationContext.Current == null || ApplicationContext.Current.IsConfigured)
{
throw new AuthenticationException("The application is already configured");
}
LogHelper.Info<InstallerRestService>("Running 'Install' service");
var result = ApplicationContext.Current.DatabaseContext.CreateDatabaseSchemaAndData();
if (result.RequiresUpgrade == false)
{
HandleConnectionStrings();
}
var js = new JavaScriptSerializer();
var jsonResult = js.Serialize(result);
return jsonResult;
}
[WebMethod]
[ScriptMethod(ResponseFormat = ResponseFormat.Json)]
public static string Upgrade()
{
//if its not configured then we can continue
if (ApplicationContext.Current == null || ApplicationContext.Current.IsConfigured)
{
throw new AuthenticationException("The application is already configured");
}
LogHelper.Info<InstallerRestService>("Running 'Upgrade' service");
var result = ApplicationContext.Current.DatabaseContext.UpgradeSchemaAndData();
HandleConnectionStrings();
//After upgrading we must restart the app pool - the reason is because PetaPoco caches a lot of the mapping logic
// and after we upgrade a db, some of the mapping needs to be updated so we restart the app pool to clear it's cache or
// else we can end up with YSODs
ApplicationContext.Current.RestartApplicationPool(new HttpContextWrapper(HttpContext.Current));
var js = new JavaScriptSerializer();
var jsonResult = js.Serialize(result);
return jsonResult;
}
private static void HandleConnectionStrings()
{
// Remove legacy umbracoDbDsn configuration setting if it exists and connectionstring also exists
if (ConfigurationManager.ConnectionStrings[Core.Configuration.GlobalSettings.UmbracoConnectionName] != null)
{
Core.Configuration.GlobalSettings.RemoveSetting(Core.Configuration.GlobalSettings.UmbracoConnectionName);
}
else
{
var ex = new ArgumentNullException(string.Format("ConfigurationManager.ConnectionStrings[{0}]", Core.Configuration.GlobalSettings.UmbracoConnectionName), "Install / upgrade did not complete successfully, umbracoDbDSN was not set in the connectionStrings section");
LogHelper.Error<InstallerRestService>("", ex);
throw ex;
}
}
}
}
@@ -1,15 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Umbraco.Web.UI.Install {
public partial class InstallerRestService {
}
}
-3
View File
@@ -1,3 +0,0 @@
<%@ Control Language="C#" AutoEventWireup="True" CodeBehind="Title.ascx.cs" Inherits="Umbraco.Web.UI.Install.Title" %>
<%@ Import Namespace="Umbraco.Core.Configuration" %>
<title>Umbraco <%=UmbracoVersion.Current.ToString(3)%> <%=UmbracoVersion.CurrentComment%> Configuration Wizard</title>
-12
View File
@@ -1,12 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Umbraco.Web.UI.Pages;
namespace Umbraco.Web.UI.Install
{
public partial class Title : System.Web.UI.UserControl
{
}
}
-15
View File
@@ -1,15 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Umbraco.Web.UI.Install {
public partial class Title {
}
}
-161
View File
@@ -1,161 +0,0 @@
<%@ Page Language="c#" CodeBehind="Default.aspx.cs" AutoEventWireup="True" Inherits="Umbraco.Web.UI.Install.Default" EnableViewState="False" %>
<%@ Register TagPrefix="umb" Namespace="ClientDependency.Core.Controls" Assembly="ClientDependency.Core" %>
<%@ Register Src="~/install/Title.ascx" TagPrefix="umb1" TagName="PageTitle" %><!DOCTYPE html>
<html>
<head runat="server">
<meta charset="utf-8">
<umb1:PageTitle runat="server" />
<link rel="icon" type="image/png" href="<%=umbraco.GlobalSettings.Path + "/Images/PinnedIcons/umb.ico" %>" />
<link media="all" rel="stylesheet" href="../umbraco_client/installer/css/jquery-ui-1.8.6.custom.css" />
<link media="all" type="text/css" rel="stylesheet" href="../umbraco_client/installer/css/reset.css" />
<link media="all" rel="stylesheet" href="../umbraco_client/installer/css/all.css" />
<link media="all" type="text/css" rel="stylesheet" href="../umbraco_client/installer/css/form.css" />
<script src="../umbraco_client/Application/NamespaceManager.js" type="text/javascript"></script>
<script src="../umbraco_client/ui/base2.js" type="text/javascript"></script>
<script src="../umbraco_client/installer/js/jquery.1.4.4.js" type="text/javascript"></script>
<script src="../umbraco_client/installer/js/jquery.ui.selectmenu.js" type="text/javascript"></script>
<script src="../umbraco_client/installer/js/jquery.main.js" type="text/javascript"></script>
<script src="../umbraco_client/passwordStrength/passwordstrength.js" type="text/javascript"></script>
<script src="../umbraco_client/installer/js/PackageInstaller.js" type="text/javascript"></script>
<!--[if lt IE 9]>
<link media="all" rel="stylesheet" href="../umbraco_client/installer/css/lt7.css">
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<!--[if lt IE 7]><script type="text/javascript" src="../umbraco_client/installer/js/ie-png.js"></script><![endif]-->
</head>
<body class="<%= CurrentStepClass %>">
<form runat="server">
<asp:ScriptManager ID="ScriptManager1" EnablePageMethods="true" runat="server">
<Services>
<asp:ServiceReference Path="../umbraco/webservices/CheckForUpgrade.asmx" />
</Services>
</asp:ScriptManager>
<!-- all page -->
<section id="wrapper">
<div class="wholder">
<!-- header -->
<header id="header">
<div class="holder">
<strong class="logo"><a href="#">Umbraco</a></strong>
</div>
</header>
<!-- all content -->
<section id="main">
<!-- tabset -->
<nav class="tabset">
<asp:Repeater ID="rp_steps" runat="server" OnItemDataBound="BindStep">
<HeaderTemplate>
<ul>
</HeaderTemplate>
<FooterTemplate></ul></FooterTemplate>
<ItemTemplate>
<li class="<asp:literal runat='server' ID='lt_class' />">
<asp:Literal ID="lt_name" runat="server" /><em>&nbsp;</em></li>
</ItemTemplate>
</asp:Repeater>
<div class="b">&nbsp;</div>
</nav>
<!-- content -->
<section class="content">
<asp:PlaceHolder ID="PlaceHolderStep" runat="server"></asp:PlaceHolder>
</section>
</section>
</div>
</section>
<!-- bg page
<div class="bg-main">
<div class="color2">
<div class="bg-c"></div>
</div>
<div class="color3">
<div class="bg-c"></div>
</div>
<div class="color1">
<div class="bg-c"></div>
</div>
<div class="color4">
<div class="bg-c"></div>
</div>
<div class="color5">
<div class="bg-c"></div>
</div>
</div>
-->
<!-- lightbox -->
<div class="lightbox" id="lightbox">
<a href="#" class="btn-close btn-close-box">close</a>
<div class="t">&nbsp;</div>
<div class="c">
<div class="heading">
<strong class="title">Name of skin</strong>
<span class="create">Created by: <a href="#">Cogworks</a></span>
</div>
<div class="carusel">
<ul>
<li>
<img src="../umbraco_client/installer/images/img09.jpg" alt="image description"></li>
<li>
<img src="../umbraco_client/installer/images/img10.jpg" alt="image description"></li>
<li>
<img src="../umbraco_client/installer/images/img11.jpg" alt="image description"></li>
</ul>
</div>
<footer class="btn-box">
<a href="#single-tab4" class="single-tab btn-install btn-close-box">Install</a>
</footer>
</div>
<div class="b">&nbsp;</div>
</div>
<input type="hidden" runat="server" value="welcome" id="step" />
</form>
</body>
</html>
@@ -1,273 +0,0 @@
using System;
using System.Configuration;
using System.Data.Common;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using Umbraco.Core;
using Umbraco.Core.Configuration;
using Umbraco.Core.IO;
using Umbraco.Core.Logging;
using System.IO;
using Umbraco.Core.Persistence;
using Umbraco.Web.Install;
using umbraco.DataLayer;
namespace Umbraco.Web.UI.Install.Steps
{
/// <summary>
/// Database detection step in the installer wizard.
/// </summary>
public partial class Database : StepUserControl
{
/// <summary>
/// Returns whether the selected database is an embedded database.
/// </summary>
protected bool IsEmbeddedDatabase
{
get
{
var databaseSettings = ConfigurationManager.ConnectionStrings[GlobalSettings.UmbracoConnectionName];
var configuredDatabaseIsEmbedded = databaseSettings != null && databaseSettings.ProviderName.ToLower().Contains("SqlServerCe".ToLower());
return Request["database"] == "embedded" || configuredDatabaseIsEmbedded;
}
}
protected bool IsConfigured
{
get { return DatabaseType.SelectedValue != ""; }
}
protected bool IsNewInstall
{
get
{
var databaseSettings = ConfigurationManager.ConnectionStrings[GlobalSettings.UmbracoConnectionName];
if (databaseSettings != null && (
databaseSettings.ConnectionString.Trim() == string.Empty
&& databaseSettings.ProviderName.Trim() == string.Empty
&& GlobalSettings.ConfigurationStatus == string.Empty))
{
return true;
}
return false;
}
}
/// <summary>
/// Returns whether the connection string is set by direct text input.
/// </summary>
protected bool ManualConnectionString
{
get { return Request["database"] == "advanced"; }
}
/// <summary>
/// Shows the right panel to the user.
/// </summary>
/// <param name="sender">The sender.</param>
/// <param name="e">The event arguments.</param>
protected void Page_Load(object sender, System.EventArgs e)
{
// Does the user have to enter a connection string?
if (settings.Visible && !Page.IsPostBack)
{
//If the connection string is already present in web.config we don't need to show the settings page and we jump to installing/upgrading.
var databaseSettings = ConfigurationManager.ConnectionStrings[GlobalSettings.UmbracoConnectionName];
var dbIsSqlCe = false;
if(databaseSettings != null && databaseSettings.ProviderName != null)
dbIsSqlCe = databaseSettings.ProviderName == "System.Data.SqlServerCe.4.0";
var sqlCeDatabaseExists = false;
if (dbIsSqlCe)
{
var datasource = databaseSettings.ConnectionString.Replace("|DataDirectory|", AppDomain.CurrentDomain.GetData("DataDirectory").ToString());
var filePath = datasource.Replace("Data Source=", string.Empty);
sqlCeDatabaseExists = File.Exists(filePath);
}
// Either the connection details are not fully specified or it's a SQL CE database that doesn't exist yet
if (databaseSettings == null
|| string.IsNullOrWhiteSpace(databaseSettings.ConnectionString) || string.IsNullOrWhiteSpace(databaseSettings.ProviderName)
|| (dbIsSqlCe && sqlCeDatabaseExists == false))
{
installProgress.Visible = true;
upgradeProgress.Visible = false;
ShowDatabaseSettings();
}
else
{
//Since a connection string was present we verify whether this is an upgrade or an empty db
var result = ApplicationContext.Current.DatabaseContext.ValidateDatabaseSchema();
var determinedVersion = result.DetermineInstalledVersion();
if (determinedVersion.Equals(new Version(0, 0, 0)))
{
//Fresh install
installProgress.Visible = true;
upgradeProgress.Visible = false;
}
else
{
//Upgrade
installProgress.Visible = false;
upgradeProgress.Visible = true;
}
settings.Visible = false;
installing.Visible = true;
}
}
}
/// <summary>
/// Prepares and shows the database settings panel.
/// </summary>
protected void ShowDatabaseSettings()
{
// Parse the connection string
var connectionStringBuilder = new DbConnectionStringBuilder();
var databaseSettings = ConfigurationManager.ConnectionStrings[GlobalSettings.UmbracoConnectionName];
if (databaseSettings != null && string.IsNullOrWhiteSpace(databaseSettings.ConnectionString) == false)
{
var dataHelper = DataLayerHelper.CreateSqlHelper(databaseSettings.ConnectionString, false);
connectionStringBuilder.ConnectionString = dataHelper.ConnectionString;
// Prepare data layer type
var datalayerType = GetConnectionStringValue(connectionStringBuilder, "datalayer");
if (datalayerType.Length > 0)
{
foreach (ListItem item in DatabaseType.Items)
if (item.Value != string.Empty && datalayerType.Contains(item.Value))
DatabaseType.SelectedValue = item.Value;
}
else if (dataHelper.ConnectionString != "server=.\\SQLEXPRESS;database=DATABASE;user id=USER;password=PASS")
DatabaseType.SelectedValue = "SqlServer";
}
else
{
DatabaseType.SelectedValue = "SqlServer";
}
DatabaseType_SelectedIndexChanged(this, new EventArgs());
// Prepare other fields
DatabaseServer.Text = GetConnectionStringValue(connectionStringBuilder, "server");
if (string.IsNullOrEmpty(DatabaseServer.Text)) DatabaseServer.Text = GetConnectionStringValue(connectionStringBuilder, "Data Source");
DatabaseName.Text = GetConnectionStringValue(connectionStringBuilder, "database");
if (string.IsNullOrEmpty(DatabaseName.Text)) DatabaseName.Text = GetConnectionStringValue(connectionStringBuilder, "Initial Catalog");
DatabaseUsername.Text = GetConnectionStringValue(connectionStringBuilder, "user id");
DatabasePassword.Text = GetConnectionStringValue(connectionStringBuilder, "password");
if (string.IsNullOrEmpty(DatabasePassword.Text)) DatabasePassword.Text = GetConnectionStringValue(connectionStringBuilder, "pwd");
ToggleVisible(DatabaseServerItem, !ManualConnectionString && !IsEmbeddedDatabase);
ToggleVisible(DatabaseUsernameItem, !ManualConnectionString && !IsEmbeddedDatabase);
ToggleVisible(DatabasePasswordItem, !ManualConnectionString && !IsEmbeddedDatabase);
ToggleVisible(DatabaseNameItem, !ManualConnectionString && !IsEmbeddedDatabase);
if (IsNewInstall || IsEmbeddedDatabase)
dbinit.Text = "$('#databaseOptionEmbedded').click();$('#databaseOptionEmbedded').change();";
else if (ManualConnectionString)
dbinit.Text = "$('#databaseOptionAdvanced').click();$('#databaseOptionAdvanced').change();";
else if (DatabaseType.SelectedValue == "SqlServer")
dbinit.Text = "$('#databaseOptionBlank').click();$('#databaseOptionBlank').change();";
else if (DatabaseType.SelectedValue == "SqlAzure")
dbinit.Text = "$('#databaseOptionBlank').click();$('#databaseOptionBlank').change();";
//toggleVisible(DatabaseConnectionString, ManualConnectionString);
// Make sure ASP.Net displays the password text
DatabasePassword.Attributes["value"] = DatabasePassword.Text;
}
/// <summary>
/// Shows the installation/upgrade panel.
/// </summary>
protected void SaveDbConfig(object sender, EventArgs e)
{
try
{
var dbContext = ApplicationContext.Current.DatabaseContext;
if (string.IsNullOrEmpty(ConnectionString.Text) == false)
{
dbContext.ConfigureDatabaseConnection(ConnectionString.Text);
}
else if (IsEmbeddedDatabase)
{
dbContext.ConfigureEmbeddedDatabaseConnection();
}
else
{
var server = DatabaseServer.Text;
var databaseName = DatabaseName.Text;
if (DatabaseType.SelectedValue == "SqlServer" && DatabaseIntegratedSecurity.Checked == true)
{
dbContext.ConfigureIntegratedSecurityDatabaseConnection(server, databaseName);
}
else
{
dbContext.ConfigureDatabaseConnection(server, databaseName,
DatabaseUsername.Text, DatabasePassword.Text, DatabaseType.SelectedValue
);
}
}
}
catch (Exception ex)
{
LogHelper.Error<Database>("Exception was thrown during the setup of the database in 'saveDBConfig'.", ex);
}
settings.Visible = false;
installing.Visible = true;
}
/// <summary>
/// Gets the value of the specified item in the connection string.
/// </summary>
/// <param name="connectionStringBuilder">The connection string.</param>
/// <param name="keyword">Name of the item.</param>
/// <returns>The value of the item, or an empty string if not found.</returns>
protected string GetConnectionStringValue(DbConnectionStringBuilder connectionStringBuilder, string keyword)
{
object value = null;
connectionStringBuilder.TryGetValue(keyword, out value);
return (string)value ?? String.Empty;
}
/// <summary>
/// Show the needed fields according to the database type.
/// </summary>
/// <param name="sender">The sender.</param>
/// <param name="e">The event arguments.</param>
protected void DatabaseType_SelectedIndexChanged(object sender, EventArgs e)
{
ToggleVisible(DatabaseServerItem, !ManualConnectionString && !IsEmbeddedDatabase);
ToggleVisible(DatabaseUsernameItem, !ManualConnectionString && !IsEmbeddedDatabase);
ToggleVisible(DatabasePasswordItem, !ManualConnectionString && !IsEmbeddedDatabase);
ToggleVisible(DatabaseNameItem, !ManualConnectionString && !IsEmbeddedDatabase);
//toggleVisible(DatabaseConnectionString, ManualConnectionString);
}
private static void ToggleVisible(HtmlGenericControl div, bool visible)
{
if (!visible)
div.Attributes["style"] = "display: none;";
else
div.Attributes["style"] = "display: block;";
}
protected void GotoSettings(object sender, EventArgs e)
{
settings.Visible = true;
installing.Visible = false;
ShowDatabaseSettings();
jsVars.Text = "showDatabaseSettings();";
}
}
}
-249
View File
@@ -1,249 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Umbraco.Web.UI.Install.Steps {
public partial class Database {
/// <summary>
/// settings control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.PlaceHolder settings;
/// <summary>
/// DatabaseType control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.DropDownList DatabaseType;
/// <summary>
/// ph_dbError control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.PlaceHolder ph_dbError;
/// <summary>
/// lt_dbError control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Literal lt_dbError;
/// <summary>
/// DatabaseServerItem control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl DatabaseServerItem;
/// <summary>
/// DatabaseServerLabel control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label DatabaseServerLabel;
/// <summary>
/// DatabaseServer control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox DatabaseServer;
/// <summary>
/// DatabaseNameItem control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl DatabaseNameItem;
/// <summary>
/// DatabaseNameLabel control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label DatabaseNameLabel;
/// <summary>
/// DatabaseName control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox DatabaseName;
/// <summary>
/// DatabaseIntegratedSecurity control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.CheckBox DatabaseIntegratedSecurity;
/// <summary>
/// DatabaseUsernameItem control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl DatabaseUsernameItem;
/// <summary>
/// DatabaseUsernameLabel control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label DatabaseUsernameLabel;
/// <summary>
/// DatabaseUsername control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox DatabaseUsername;
/// <summary>
/// DatabasePasswordItem control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl DatabasePasswordItem;
/// <summary>
/// DatabasePasswordLabel control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label DatabasePasswordLabel;
/// <summary>
/// DatabasePassword control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox DatabasePassword;
/// <summary>
/// embeddedFilesMissing control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl embeddedFilesMissing;
/// <summary>
/// DatabaseConnectionString control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl DatabaseConnectionString;
/// <summary>
/// ConnectionStringLabel control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label ConnectionStringLabel;
/// <summary>
/// ConnectionString control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox ConnectionString;
/// <summary>
/// jsVars control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Literal jsVars;
/// <summary>
/// dbinit control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Literal dbinit;
/// <summary>
/// installing control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.PlaceHolder installing;
/// <summary>
/// installProgress control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.PlaceHolder installProgress;
/// <summary>
/// upgradeProgress control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.PlaceHolder upgradeProgress;
}
}
@@ -1,94 +0,0 @@
using System;
using System.Web.Security;
using Umbraco.Core.Configuration;
using Umbraco.Core.Logging;
using Umbraco.Core.Security;
using Umbraco.Web.Install;
using Umbraco.Web.Security;
using umbraco.BusinessLogic;
using umbraco.providers;
using System.Collections.Specialized;
namespace Umbraco.Web.UI.Install.Steps
{
/// <summary>
/// Summary description for defaultUser.
/// </summary>
public partial class DefaultUser : StepUserControl
{
protected MembershipProvider CurrentProvider
{
get
{
var provider = Membership.Providers[UmbracoConfig.For.UmbracoSettings().Providers.DefaultBackOfficeUserProvider];
if (provider == null)
{
throw new InvalidOperationException("No MembershipProvider found with name " + UmbracoConfig.For.UmbracoSettings().Providers.DefaultBackOfficeUserProvider);
}
return provider;
}
}
protected void ChangePasswordClick(object sender, EventArgs e)
{
Page.Validate();
if (Page.IsValid)
{
var user = User.GetUser(0);
var membershipUser = CurrentProvider.GetUser(0, true);
if (membershipUser == null)
{
throw new InvalidOperationException("No user found in membership provider with id of 0");
}
try
{
var success = membershipUser.ChangePassword(user.GetPassword(), tb_password.Text.Trim());
if (success == false)
{
PasswordValidator.IsValid = false;
PasswordValidator.ErrorMessage = "Password must be at least " + CurrentProvider.MinRequiredPasswordLength + " characters long and contain at least " + CurrentProvider.MinRequiredNonAlphanumericCharacters + " symbols";
return;
}
}
catch (Exception ex)
{
PasswordValidator.IsValid = false;
PasswordValidator.ErrorMessage = "Password must be at least " + CurrentProvider.MinRequiredPasswordLength + " characters long and contain at least " + CurrentProvider.MinRequiredNonAlphanumericCharacters + " symbols";
return;
}
user.Email = tb_email.Text.Trim();
user.Name = tb_name.Text.Trim();
user.LoginName = tb_login.Text;
user.Save();
if (cb_newsletter.Checked)
{
try
{
var client = new System.Net.WebClient();
var values = new NameValueCollection {{"name", tb_name.Text}, {"email", tb_email.Text}};
client.UploadValues("http://umbraco.org/base/Ecom/SubmitEmail/installer.aspx", values);
}
catch (Exception ex)
{
LogHelper.Error<DefaultUser>("An error occurred subscribing user to newsletter", ex);
}
}
if (String.IsNullOrWhiteSpace(GlobalSettings.ConfigurationStatus))
UmbracoContext.Current.Security.PerformLogin(user.Id);
InstallHelper.RedirectToNextStep(Page, GetCurrentStep());
}
}
}
}
@@ -1,87 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Umbraco.Web.UI.Install.Steps {
public partial class DefaultUser {
/// <summary>
/// identify control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.PlaceHolder identify;
/// <summary>
/// tb_name control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox tb_name;
/// <summary>
/// tb_email control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox tb_email;
/// <summary>
/// tb_login control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox tb_login;
/// <summary>
/// tb_password control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox tb_password;
/// <summary>
/// PasswordValidator control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.CustomValidator PasswordValidator;
/// <summary>
/// tb_password_confirm control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox tb_password_confirm;
/// <summary>
/// cb_newsletter control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.CheckBox cb_newsletter;
}
}
@@ -1,13 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Umbraco.Web.Install;
namespace Umbraco.Web.UI.Install.Steps
{
public partial class License : StepUserControl
{
}
}
@@ -1,24 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Umbraco.Web.UI.Install.Steps {
public partial class License {
/// <summary>
/// btnNext control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.LinkButton btnNext;
}
}
@@ -1,79 +0,0 @@
using System;
using System.IO;
using System.Xml;
using Umbraco.Core.IO;
namespace Umbraco.Web.UI.Install.Steps
{
public partial class Renaming : StepUserControl
{
private readonly string _oldAccessFilePath = IOHelper.MapPath(SystemDirectories.Data + "/access.xml");
private readonly string _newAccessFilePath = IOHelper.MapPath(SystemDirectories.Data + "/access.config");
private bool _changesNeeded = false;
protected void Page_Load(object sender, EventArgs e)
{
// check access.xml file
identifyResult.Text += CheckAccessFile();
if (_changesNeeded)
{
changesNeeded.Visible = true;
}
else
{
noChangedNeeded.Visible = true;
changesNeeded.Visible = false;
}
}
private string CheckAccessFile()
{
if (!NewAccessFileExist() && OldAccessFileExist())
{
_changesNeeded = true;
return "<li>Access.xml found. Needs to be renamed to access.config</li>";
}
return "<li>Public Access file is all good. No changes needed</li>";
}
private bool OldAccessFileExist()
{
return File.Exists(_oldAccessFilePath);
}
private bool NewAccessFileExist()
{
return File.Exists(_newAccessFilePath);
}
protected void UpdateChangesClick(object sender, EventArgs e)
{
bool succes = true;
string progressText = "";
// rename access file
if (OldAccessFileExist())
{
try
{
File.Move(_oldAccessFilePath, IOHelper.MapPath(SystemFiles.AccessXml));
progressText += String.Format("<li>Public Access file renamed</li>");
}
catch (Exception ee)
{
progressText += String.Format("<li>Error renaming access file: {0}</li>", ee.ToString());
succes = false;
}
}
string resultClass = succes ? "success" : "error";
resultText.Text = String.Format("<div class=\"{0}\"><p>{1}</p></div>",
resultClass,
progressText);
result.Visible = true;
init.Visible = false;
}
}
}
@@ -1,78 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Umbraco.Web.UI.Install.Steps {
public partial class Renaming {
/// <summary>
/// init control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Panel init;
/// <summary>
/// noChangedNeeded control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Panel noChangedNeeded;
/// <summary>
/// changesNeeded control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Panel changesNeeded;
/// <summary>
/// identifyResult control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Literal identifyResult;
/// <summary>
/// updateChanges control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Button updateChanges;
/// <summary>
/// result control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Panel result;
/// <summary>
/// resultText control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Literal resultText;
}
}
@@ -1,27 +0,0 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="RenderingEngine.ascx.cs" Inherits="Umbraco.Web.UI.Install.Steps.RenderingEngine" %>
<div class="tab main-tabinfo">
<div class="container">
<h1>
Chose how you like to work with Templates</h1>
<p>
Umbraco works with both ASP.NET WebForms (also known as MasterPages) and ASP.NET MVC (called Views). If you're not sure, we recommend using the MVC templates. You can of course use both but let's select a default one to get started.
</p>
</div>
<div class="step rendering-engine">
<div class="container">
<p>
<strong>Choose a default template type:</strong>
</p>
<asp:RadioButtonList runat="server" ID="EngineSelection" RepeatLayout="Flow">
<asp:ListItem Selected="True">MVC</asp:ListItem>
<asp:ListItem>Web forms</asp:ListItem>
</asp:RadioButtonList>
</div>
</div>
<!-- btn box -->
<footer class="btn-box">
<div class="t">&nbsp;</div>
<asp:LinkButton ID="btnNext" CssClass="btn btn-continue" runat="server" OnClick="GotoNextStep"><span>Continue</span></asp:LinkButton>
</footer>
</div>
@@ -1,22 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Umbraco.Core.Configuration;
namespace Umbraco.Web.UI.Install.Steps
{
public partial class RenderingEngine : StepUserControl
{
protected override void GotoNextStep(object sender, EventArgs e)
{
////set the default engine
//UmbracoSettings.DefaultRenderingEngine = Core.RenderingEngine.Mvc;
//UmbracoSettings.Save();
base.GotoNextStep(sender, e);
}
}
}
@@ -1,33 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Umbraco.Web.UI.Install.Steps {
public partial class RenderingEngine {
/// <summary>
/// EngineSelection control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.RadioButtonList EngineSelection;
/// <summary>
/// btnNext control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.LinkButton btnNext;
}
}
@@ -1,122 +0,0 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="StarterKits.ascx.cs" Inherits="Umbraco.Web.UI.Install.Steps.StarterKits" %>
<!-- Choose starter kit -->
<asp:UpdatePanel runat="server" ID="udp">
<ContentTemplate>
<script type="text/javascript">
var intervalId = 0;
jQuery(document).ready(function () {
jQuery('.zoom-list a.selectStarterKit').click(function () {
jQuery('.main-tabinfo').hide();
jQuery('#starterkitname').html( jQuery(this).attr("title") );
jQuery('#single-tab1').show();
//fire off the progressbar
intervalId = setInterval("progressBarCallback()", 1000);
return true;
});
});
function pageLoad(sender, args) {
if (args.get_isPartialLoad()) {
clearInterval(intervalId);
jQuery('#single-tab1').hide();
initZoomList2();
initSlide();
initLightBox();
jQuery('.btn-install-gal').click(function () {
jQuery('#browseSkins').hide();
jQuery('#installingSkin').show();
//fire off the progressbar
intervalId = setInterval("progressBarCallback()", 1000);
jQuery('#skinname').html( jQuery(this).attr("title") );
return true;
});
}
}
function progressBarCallback() {
jQuery.getJSON('InstallerRestService.aspx?feed=progress', function (data) {
if (data.percentage > 0) {
updateProgressBar(data.percentage);
updateStatusMessage(data.message);
}
if (data.error != "") {
clearInterval(intervalId);
updateStatusMessage(data.error);
}
if (data.percentage == 100) {
clearInterval(intervalId);
jQuery(".btn-box").show();
jQuery('.ui-progressbar-value').css("background-image", "url(../umbraco_client/installer/images/pbar.gif)");
}
});
}
</script>
</script>
<asp:Placeholder ID="pl_starterKit" Runat="server" Visible="True">
<!-- starter box -->
<div class="tab main-tabinfo">
<div class="container">
<h1>Starter kits</h1>
<p>To help you get started here are some basic starter kits. They have been tailored to suit common site configurations and install useful functionality.</p>
</div>
<!-- menu -->
<asp:PlaceHolder ID="ph_starterKits" runat="server" />
</div>
</asp:Placeholder>
<!-- Choose starter kit design -->
<asp:Placeholder ID="pl_starterKitDesign" Runat="server" Visible="True">
<div class="tab install-tab" id="browseSkins">
<div class="container">
<h1>Install a Skin</h1>
<div class="accept-hold">
<p>You can now further enhance your site by choosing one of these great skins. This will apply a default look and feel to all the pages in your site, considerably reducing development time.</p>
</div>
</div>
<!-- skins -->
<asp:Placeholder ID="ph_starterKitDesigns" runat="server" />
</div>
</asp:Placeholder>
</ContentTemplate>
</asp:UpdatePanel>
<!-- itstall starter kit -->
<div class="tab install-tab" id="single-tab1" style="display: none">
<div class="container">
<h1>Installing Starter Kit</h1>
<h2><strong id="starterkitname">Your starter kit</strong> is installing. </h2>
<div class="loader alt">
<div class="hold">
<div class="progress-bar"></div>
<span class="progress-bar-value">56%</span>
</div>
<strong>Starting installation...</strong>
</div>
</div>
</div>
@@ -1,32 +0,0 @@
using System;
using Umbraco.Core.IO;
using Umbraco.Web.Install;
using Umbraco.Web.UI.Install.Steps.Skinning;
using umbraco.cms.businesslogic.packager;
namespace Umbraco.Web.UI.Install.Steps
{
public partial class StarterKits : StepUserControl
{
protected void Page_Load(object sender, EventArgs e)
{
if (InstalledPackage.GetAllInstalledPackages().Count > 0)
GotoNextStep(sender, e);
ShowStarterKits();
}
private void ShowStarterKits()
{
ph_starterKits.Controls.Add(LoadControl(SystemDirectories.Install + "/steps/Skinning/loadStarterKits.ascx"));
pl_starterKit.Visible = true;
pl_starterKitDesign.Visible = false;
}
}
}
@@ -1,60 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Umbraco.Web.UI.Install.Steps {
public partial class StarterKits {
/// <summary>
/// udp control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.UpdatePanel udp;
/// <summary>
/// pl_starterKit control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.PlaceHolder pl_starterKit;
/// <summary>
/// ph_starterKits control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.PlaceHolder ph_starterKits;
/// <summary>
/// pl_starterKitDesign control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.PlaceHolder pl_starterKitDesign;
/// <summary>
/// ph_starterKitDesigns control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.PlaceHolder ph_starterKitDesigns;
}
}
@@ -1,20 +0,0 @@
using System;
using System.Web.UI;
using Umbraco.Web.Install;
namespace Umbraco.Web.UI.Install.Steps
{
public abstract class StepUserControl : UserControl
{
protected string GetCurrentStep()
{
var defaultPage = (Default) Page;
return defaultPage.step.Value;
}
protected virtual void GotoNextStep(object sender, EventArgs e)
{
InstallHelper.RedirectToNextStep(Page, GetCurrentStep());
}
}
}
@@ -1,36 +0,0 @@
using System;
using System.Web;
using Umbraco.Core;
using Umbraco.Core.Configuration;
using Umbraco.Core.Logging;
using Umbraco.Web.Security;
namespace Umbraco.Web.UI.Install.Steps
{
public partial class TheEnd : StepUserControl
{
protected void Page_Load(object sender, System.EventArgs e)
{
// Update configurationStatus
try
{
GlobalSettings.ConfigurationStatus = UmbracoVersion.Current.ToString(3);
}
catch (Exception ex)
{
LogHelper.Error<TheEnd>("An error occurred updating the config status", ex);
}
// Update ClientDependency version
var clientDependencyConfig = new ClientDependencyConfiguration();
var clientDependencyUpdated = clientDependencyConfig.IncreaseVersionNumber();
//Clear the auth cookie - this is required so that the login screen is displayed after upgrade and so the
// csrf anti-forgery tokens are created, otherwise there will just be JS errors if the user has an old
// login token from a previous version when we didn't have csrf tokens in place
var security = new WebSecurity(new HttpContextWrapper(Context), ApplicationContext.Current);
security.ClearCurrentLogin();
}
}
}
-15
View File
@@ -1,15 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Umbraco.Web.UI.Install.Steps {
public partial class TheEnd {
}
}
@@ -1,73 +0,0 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="UpgradeReport.ascx.cs" Inherits="Umbraco.Web.UI.Install.Steps.UpgradeReport" %>
<div class="tab main-tabinfo">
<div class="container">
<h1>Major version upgrade from <%= CurrentVersion %> to <%= NewVersion %></h1>
<asp:MultiView runat="server" ActiveViewIndex="<%#ToggleView.ActiveViewIndex %>" ID="MultiView1">
<asp:View ID="View1" runat="server">
<p>
This installation step will determine if there are compatibility issues with Property Editors that you have defined in your current installation.
</p>
</asp:View>
<asp:View ID="View2" runat="server">
<asp:MultiView runat="server" ActiveViewIndex="<%#Report.Any() ? 0 : 1 %>">
<asp:View runat="server">
<h2>There were <%=Report.Count() %> issues detected</h2>
<p>
The following compatibility issues were found. If you continue all non-compatible property editors will be converted to a Readonly/Label.
You will be able to change the property editor to a compatible type manually by editing the data type after installation.
</p>
<p>
Otherwise if you choose not to proceed you will need to fix the errors listed below.
Refer to v<%= NewVersion%> upgrade instructions for full details.
</p>
</asp:View>
<asp:View runat="server">
<h2>No issues detected</h2>
<p>
<strong>Click 'Continue' to proceed with the upgrade</strong>
</p>
</asp:View>
</asp:MultiView>
</asp:View>
</asp:MultiView>
</div>
<div class="step rendering-engine">
<div class="container btn-box">
<asp:MultiView runat="server" ActiveViewIndex="0" ID="ToggleView">
<asp:View runat="server">
<p>
<strong>Click 'Continue' to generate the compatibility report</strong>
</p>
</asp:View>
<asp:View runat="server">
<table class="upgrade-report">
<% foreach (var item in Report)
{ %>
<tr>
<td class="icon">
<span class='<%= item.Item1 ? "ui-state-default ui-icon ui-icon-check" : "ui-state-highlight ui-icon ui-icon-alert" %>'></span>
</td>
<td class="msg">
<%=item.Item2 %>
</td>
</tr>
<% } %>
</table>
</asp:View>
</asp:MultiView>
</div>
</div>
<!-- btn box -->
<footer class="btn-box">
<div class="t">&nbsp;</div>
<asp:LinkButton ID="btnNext" CssClass="btn btn-continue" runat="server" OnClick="NextButtonClick"><span>Continue</span></asp:LinkButton>
</footer>
</div>
@@ -1,96 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Umbraco.Core;
using Umbraco.Core.Configuration;
using Umbraco.Core.Persistence;
using Umbraco.Core.Persistence.SqlSyntax;
using Umbraco.Core.PropertyEditors;
namespace Umbraco.Web.UI.Install.Steps
{
public partial class UpgradeReport : StepUserControl
{
protected Version CurrentVersion { get; private set; }
protected Version NewVersion { get; private set; }
protected IEnumerable<Tuple<bool, string>> Report { get; private set; }
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
var result = ApplicationContext.Current.DatabaseContext.ValidateDatabaseSchema();
var determinedVersion = result.DetermineInstalledVersion();
CurrentVersion = determinedVersion;
NewVersion = UmbracoVersion.Current;
Report = new List<Tuple<bool, string>>();
}
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
if (!IsPostBack)
{
DataBind();
}
}
protected void NextButtonClick(object sender, EventArgs e)
{
if (ToggleView.ActiveViewIndex == 1)
{
GotoNextStep(sender, e);
}
else
{
CreateReport();
ToggleView.ActiveViewIndex = 1;
DataBind();
}
}
private void CreateReport()
{
var errorReport = new List<Tuple<bool, string>>();
var sql = new Sql();
sql
.Select(
SqlSyntaxContext.SqlSyntaxProvider.GetQuotedColumn("cmsDataType", "controlId"),
SqlSyntaxContext.SqlSyntaxProvider.GetQuotedColumn("umbracoNode", "text"))
.From(SqlSyntaxContext.SqlSyntaxProvider.GetQuotedTableName("cmsDataType"))
.InnerJoin(SqlSyntaxContext.SqlSyntaxProvider.GetQuotedTableName("umbracoNode"))
.On(
SqlSyntaxContext.SqlSyntaxProvider.GetQuotedColumn("cmsDataType", "nodeId") + " = " +
SqlSyntaxContext.SqlSyntaxProvider.GetQuotedColumn("umbracoNode", "id"));
var list = ApplicationContext.Current.DatabaseContext.Database.Fetch<dynamic>(sql);
foreach (var item in list)
{
Guid legacyId = item.controlId;
//check for a map entry
var alias = LegacyPropertyEditorIdToAliasConverter.GetAliasFromLegacyId(legacyId);
if (alias != null)
{
//check that the new property editor exists with that alias
var editor = PropertyEditorResolver.Current.GetByAlias(alias);
if (editor == null)
{
errorReport.Add(new Tuple<bool, string>(false, string.Format("Property Editor with ID '{0}' (assigned to Data Type '{1}') has a valid GUID -> Alias map but no property editor was found. It will be replaced with a Readonly/Label property editor.", item.controlId, item.text)));
}
}
else
{
errorReport.Add(new Tuple<bool, string>(false, string.Format("Property Editor with ID '{0}' (assigned to Data Type '{1}') does not have a valid GUID -> Alias map. It will be replaced with a Readonly/Label property editor.", item.controlId, item.text)));
}
}
Report = errorReport;
}
}
}
@@ -1,60 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Umbraco.Web.UI.Install.Steps {
public partial class UpgradeReport {
/// <summary>
/// MultiView1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.MultiView MultiView1;
/// <summary>
/// View1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.View View1;
/// <summary>
/// View2 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.View View2;
/// <summary>
/// ToggleView control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.MultiView ToggleView;
/// <summary>
/// btnNext control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.LinkButton btnNext;
}
}
@@ -1,181 +0,0 @@
using System;
using System.IO;
using Umbraco.Core.IO;
using Umbraco.Web.Install;
using umbraco;
namespace Umbraco.Web.UI.Install.Steps
{
public partial class ValidatePermissions : StepUserControl
{
protected void Page_Load(object sender, EventArgs e)
{
var permissionsOk = true;
var packageOk = true;
var foldersOk = true;
var cacheOk = true;
var valResult = "";
// Test default dir permissions
foreach (var dir in FilePermissionHelper.PermissionDirs)
{
var result = SaveAndDeleteFile(IOHelper.MapPath(dir + "/configWizardPermissionTest.txt"));
if (!result)
{
permissionsOk = false;
permSummary.Text += "<li>Directory: ./" + dir + "</li>";
}
// Print
valResult += " " + dir + " : " + SuccessOrFailure(result) + "!<br/>";
}
// Test default file permissions
foreach (var file in FilePermissionHelper.PermissionFiles)
{
var result = OpenFileForWrite(IOHelper.MapPath(file));
if (!result)
{
permissionsOk = false;
permSummary.Text += "<li>File: " + file + "</li>";
}
// Print
valResult += " " + file + " : " + SuccessOrFailure(result) + "!<br/>";
}
permissionResults.Text = valResult;
// Test package dir permissions
string packageResult = "";
foreach (var dir in FilePermissionHelper.PackagesPermissionsDirs)
{
var result =
SaveAndDeleteFile(IOHelper.MapPath(dir + "/configWizardPermissionTest.txt"));
if (!result)
{
packageOk = false;
permSummary.Text += "<li>Directory: " + dir + "</li>";
}
// Print
packageResult += " ./" + dir + " : " + SuccessOrFailure(result) + "!<br/>";
}
packageResults.Text = packageResult;
// Test umbraco.xml file
try
{
content.Instance.PersistXmlToFile();
xmlResult.Text = "Success!";
}
catch (Exception ee)
{
cacheOk = false;
xmlResult.Text = "Failed!";
string tempFile = SystemFiles.ContentCacheXml;
if (tempFile.Substring(0, 1) == "/")
tempFile = tempFile.Substring(1, tempFile.Length - 1);
permSummary.Text += string.Format("<li>File ./{0}<br/><strong>Error message: </strong>{1}</li>", tempFile, ee);
}
// Test creation of folders
try
{
string tempDir = IOHelper.MapPath(SystemDirectories.Media + "/testCreatedByConfigWizard");
Directory.CreateDirectory(tempDir);
Directory.Delete(tempDir);
foldersResult.Text = "Success!";
}
catch
{
foldersOk = false;
foldersResult.Text = "Failure!";
}
// update config files
if (permissionsOk)
{
foreach (
var configFile in new DirectoryInfo(IOHelper.MapPath(SystemDirectories.Config)).GetFiles("*.xml"))
{
try
{
if (File.Exists(configFile.FullName.Replace(".xml", ".config")))
File.Delete(configFile.FullName.Replace(".xml", ".config"));
configFile.MoveTo(configFile.FullName.Replace(".xml", ".config"));
}
catch { }
}
}
// Generate summary
howtoResolve.Visible = true;
if (permissionsOk && cacheOk && packageOk && foldersOk)
{
perfect.Visible = true;
howtoResolve.Visible = false;
}
else if (permissionsOk && cacheOk && foldersOk)
noPackages.Visible = true;
else if (permissionsOk && cacheOk)
{
folderWoes.Visible = true;
grant.Visible = false;
noFolders.Visible = true;
}
else
{
error.Visible = true;
if (!foldersOk)
folderWoes.Visible = true;
}
}
private static string SuccessOrFailure(bool result)
{
return result ? "Success" : "Failure";
}
private static bool SaveAndDeleteFile(string file)
{
try
{
//first check if the directory of the file exists, and if not try to create that first.
var fi = new FileInfo(file);
if (!fi.Directory.Exists)
{
fi.Directory.Create();
}
File.WriteAllText(file,
"This file has been created by the umbraco configuration wizard. It is safe to delete it!");
File.Delete(file);
return true;
}
catch
{
return false;
}
}
private bool OpenFileForWrite(string file)
{
try
{
File.AppendText(file).Close();
}
catch
{
return false;
}
return true;
}
}
}
@@ -1,132 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Umbraco.Web.UI.Install.Steps {
public partial class ValidatePermissions {
/// <summary>
/// perfect control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Literal perfect;
/// <summary>
/// noPackages control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Literal noPackages;
/// <summary>
/// noFolders control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Literal noFolders;
/// <summary>
/// error control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Literal error;
/// <summary>
/// howtoResolve control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Panel howtoResolve;
/// <summary>
/// grant control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Panel grant;
/// <summary>
/// permSummary control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Literal permSummary;
/// <summary>
/// folderWoes control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Panel folderWoes;
/// <summary>
/// permissionResults control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Literal permissionResults;
/// <summary>
/// packageResults control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Literal packageResults;
/// <summary>
/// xmlResult control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Literal xmlResult;
/// <summary>
/// foldersResult control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Literal foldersResult;
/// <summary>
/// btnNext control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.LinkButton btnNext;
}
}
@@ -1,45 +0,0 @@
using System;
using Umbraco.Core;
using umbraco;
namespace Umbraco.Web.UI.Install.Steps
{
public partial class Welcome : StepUserControl
{
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
if (!IsPostBack)
{
//clear the plugin cache when installation starts (just a safety check)
PluginManager.Current.ClearPluginCache();
}
}
protected void Page_Load(object sender, EventArgs e)
{
// Check for config! SD: I've moved this config check above the other stuff since there's no point in doing all that processing if we're
// just going to redirect if this setting is true.
if (GlobalSettings.Configured)
{
Response.Redirect(Request.QueryString["url"] ?? "/", true);
}
var result = ApplicationContext.Current.DatabaseContext.ValidateDatabaseSchema();
var determinedVersion = result.DetermineInstalledVersion();
// Display the Umbraco upgrade message if Umbraco is already installed
if (string.IsNullOrWhiteSpace(GlobalSettings.ConfigurationStatus) == false || determinedVersion.Equals(new Version(0, 0, 0)) == false)
{
ph_install.Visible = false;
ph_upgrade.Visible = true;
}
}
}
}
@@ -1,42 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Umbraco.Web.UI.Install.Steps {
public partial class Welcome {
/// <summary>
/// ph_install control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.PlaceHolder ph_install;
/// <summary>
/// ph_upgrade control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.PlaceHolder ph_upgrade;
/// <summary>
/// btnNext control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.LinkButton btnNext;
}
}
@@ -1,442 +0,0 @@
<%@ Control Language="c#" AutoEventWireup="True" CodeBehind="database.ascx.cs" Inherits="Umbraco.Web.UI.Install.Steps.Database" %>
<%@ Import Namespace="Umbraco.Core.Configuration" %>
<asp:PlaceHolder ID="settings" runat="server" Visible="true">
<!-- database box -->
<div class="tab main-tabinfo">
<div class="container">
<h1>Database configuration</h1>
<p>
<strong>To complete this step you will either need a blank database or, if you do not have a blank database available, choose the SQL CE 4 embedded
database (This is the recommended approach for first time users or if you are unsure).</strong>
</p>
<p>
If you are not using the SQL CE 4 embedded database you will need the connection details for your database, such as the
&quot;connection string&quot;. You may need to contact your system administrator or web host for this information.
</p>
</div>
<!-- database -->
<div class="database-hold">
<fieldset>
<div class="step">
<div class="container">
<p>
<strong>1. Select which database option best fits you:</strong>
</p>
<ul>
<li>
<input type="radio" id="databaseOptionEmbedded" name="database" value="embedded" />
<label for="databaseOptionEmbedded">I want to use SQL CE 4, a free, quick-and-simple embedded database</label>
</li>
<li>
<input type="radio" id="databaseOptionBlank" name="database" value="blank" />
<label for="databaseOptionBlank">I already have a blank SQL Server, SQL Azure or MySQL database</label>
</li>
<li>
<input type="radio" id="databaseOptionAdvanced" name="database" value="advanced" />
<label for="databaseOptionAdvanced">I'm an advanced user, let me put in the connection string</label>
</li>
<li>
<input type="radio" id="databaseOptionHelp" name="database" value="help" />
<label for="databaseOptionHelp">I need help</label>
</li>
</ul>
</div>
</div>
<!-- database options -->
<div id="database-options">
<!-- blank option -->
<div id="database-blank" class="database-option">
<script type="text/javascript">
(function($) {
$(document).ready(function() {
// Make database username and password dependent on the integrated security option
var databaseTypeSelect = $("#<%= DatabaseType.ClientID %>");
var integratedSecurityCheckBox = $("#<%= DatabaseIntegratedSecurity.ClientID %>");
var databaseUserNamePasswordInputs = $("#<%= DatabaseUsername.ClientID %>, #<%= DatabasePassword.ClientID %>");
toggle();
databaseTypeSelect.change(toggle);
integratedSecurityCheckBox.change(toggle);
function toggle() {
var databaseType = databaseTypeSelect.val();
if (databaseType == "SqlServer") {
// Only show and enable the integrated security option when it's supported
integratedSecurityCheckBox
.removeAttr("disabled")
.closest("div").show();
} else {
integratedSecurityCheckBox
.attr("disabled", "disabled")
.closest("div").hide();
}
if (integratedSecurityCheckBox.is(":checked")) {
// Hide username and password when integrated security is checked
databaseUserNamePasswordInputs.attr("disabled", "disabled");
databaseUserNamePasswordInputs.closest("div").hide();
} else {
databaseUserNamePasswordInputs.removeAttr("disabled");
databaseUserNamePasswordInputs.closest("div").show();
}
}
});
})(jQuery);
</script>
<div class="step">
<div class="container">
<p>
<strong>2. Now choose your database type below.</strong>
</p>
<div class="select">
<asp:DropDownList runat="server" ID="DatabaseType" CssClass="sel">
<asp:ListItem Value="" Text="Please choose" Selected="True" />
<asp:ListItem Value="SqlServer" Text="Microsoft SQL Server" />
<asp:ListItem Value="SqlAzure" Text="SQL Azure" />
<asp:ListItem Value="MySql" Text="MySQL" />
</asp:DropDownList>
</div>
</div>
</div>
<div class="step" id="database-blank-inputs">
<div class="container">
<p class="instructionText">
<strong>3. Connection details:</strong> Please fill out the connection information for your database.
</p>
<div class="instruction-hold">
<asp:PlaceHolder ID="ph_dbError" runat="server" Visible="false">
<div class="row error">
<p class="text">
<strong>
<asp:Literal ID="lt_dbError" runat="server" /></strong>
</p>
</div>
<script type="text/javascript">
jQuery(document).ready(function () { showDatabaseSettings(); });
</script>
</asp:PlaceHolder>
<div class="row sql" runat="server" id="DatabaseServerItem">
<asp:Label runat="server" AssociatedControlID="DatabaseServer" ID="DatabaseServerLabel">Server:</asp:Label>
<span>
<asp:TextBox runat="server" CssClass="text" ID="DatabaseServer" /></span>
</div>
<div class="row sql" runat="server" id="DatabaseNameItem">
<asp:Label runat="server" AssociatedControlID="DatabaseName" ID="DatabaseNameLabel">Database name:</asp:Label>
<span>
<asp:TextBox runat="server" CssClass="text" ID="DatabaseName" /></span>
</div>
<div class="row sql">
<asp:Label runat="server" AssociatedControlID="DatabaseIntegratedSecurity">Integrated security:</asp:Label>
<asp:CheckBox runat="server" ID="DatabaseIntegratedSecurity" />
</div>
<div class="row sql" runat="server" id="DatabaseUsernameItem">
<asp:Label runat="server" AssociatedControlID="DatabaseUsername" ID="DatabaseUsernameLabel">Username:</asp:Label>
<span>
<asp:TextBox runat="server" CssClass="text" ID="DatabaseUsername" /></span>
</div>
<div class="row sql" runat="server" id="DatabasePasswordItem">
<asp:Label runat="server" AssociatedControlID="DatabasePassword" ID="DatabasePasswordLabel">Password:</asp:Label>
<span>
<asp:TextBox runat="server" ID="DatabasePassword" CssClass="text" TextMode="Password" /></span>
</div>
</div>
</div>
<!-- btn box -->
</div>
</div>
<!-- embedded option -->
<div id="database-embedded" class="database-option">
<div class="step">
<div class="container">
<p class="instructionText">
<strong>2. Simple file-based database:</strong>
</p>
<div class="instruction-hold">
<div class="row embeddedError" runat="server" id="embeddedFilesMissing" style="display: none;">
<p>
<strong>Missing files:</strong> SQL CE 4 requires that you manually add the SQL
CE 4 runtime to your Umbraco installation.<br />
You can either use the following <a href="http://our.umbraco.org/wiki/install-and-setup/using-sql-ce-4-with-umbraco-46"
target="_blank">instructions</a> on how to add SQL CE 4 or select another database type from the dropdown above.
</p>
</div>
<div class="row embedded" style="display: none;">
<p>
<strong>Nothing to configure:</strong>SQL CE 4 does not require any configuration,
simply click the "install" button to continue.
</p>
</div>
</div>
</div>
</div>
</div>
<!-- advanced option -->
<div id="database-advanced" class="database-option">
<div class="step">
<div class="container">
<p>
<strong>2. Connection details:</strong> Please fill out the connection information for your database.
</p>
<div class="instruction-hold">
<div class="row custom" runat="server" id="DatabaseConnectionString">
<asp:Label runat="server" AssociatedControlID="ConnectionString" ID="ConnectionStringLabel">Connection string:</asp:Label>
<span class="textarea">
<asp:TextBox runat="server" TextMode="MultiLine" CssClass="text textarea" ID="ConnectionString" /></span>
</div>
<div class="row custom check-hold">
<p>
Example: <tt>datalayer=MySQL;server=192.168.2.8;user id=user;password=***;database=umbraco</tt>
</p>
</div>
</div>
</div>
</div>
</div>
<!-- help option -->
<div id="database-help" class="database-option">
<div class="step">
<div class="container">
<p>
<strong>2. Getting a database setup for umbraco.</strong><br />
For first time users, we recommend you select "quick-and-simple embedded database".
This will install an easy to use database, that does
not require any additional software to use.<br />
Alternatively, you can install Microsoft SQL Server, which will require a bit more
work to get up and running.<br />
We have provided a step-by-step guide in the video instructions below.
</p>
<span class="btn-link"><a href="http://umbraco.org/getting-started" target="_blank">Open video instructions</a></span>
</div>
</div>
</div>
<footer class="btn-box installbtn">
<div class="t">&nbsp;</div>
<asp:LinkButton runat="server" class="single-tab submit btn-install" OnClick="SaveDbConfig"><span>install</span> </asp:LinkButton>
</footer>
</div>
</fieldset>
</div>
</div>
<script type="text/javascript">
var currentVersion = '<%=UmbracoVersion.Current.ToString(3)%> <%=UmbracoVersion.CurrentComment%> ';
var configured = <%= IsConfigured.ToString().ToLower() %>;
jQuery(document).ready(function(){
<asp:literal runat="server" id="jsVars" />
$("input[name='database']").change(function()
{
switch($(this).val())
{
case "blank":
$(".database-option").hide();
$("#database-blank").show();
$(".installbtn").show();
break;
case "embedded":
$(".database-option").hide();
$("#database-embedded").show();
$('.embedded').show();
$(".installbtn").show();
break;
case "advanced":
$(".database-option").hide();
$("#database-advanced").show();
$(".installbtn").show();
break;
case "help":
$(".database-option").hide();
$("#database-help").show();
$(".installbtn").hide();
break;
}
});
<asp:Literal id="dbinit" runat="server"></asp:Literal>
});
</script>
</asp:PlaceHolder>
<asp:PlaceHolder ID="installing" runat="server" Visible="false">
<!-- installing umbraco -->
<div class="tab install-tab" id="datebase-tab">
<div class="container">
<asp:PlaceHolder ID="installProgress" runat="server" Visible="True">
<div class="progress-status-container">
<h1>Installing Umbraco</h1>
<p>
The Umbraco database is being configured. This process populates your chosen database with a blank Umbraco instance.
</p>
</div>
<div class="result-status-container" style="display: none;">
<h1>Database installed</h1>
<div class="success">
<p>
Umbraco
<%=UmbracoVersion.Current.ToString(3)%> <%=UmbracoVersion.CurrentComment%>
has now been copied to your database. Press <b>Continue</b> to proceed.
</p>
</div>
</div>
</asp:PlaceHolder>
<asp:PlaceHolder ID="upgradeProgress" runat="server" Visible="False">
<div class="progress-status-container">
<h1>Upgrading Umbraco</h1>
<p>
The Umbraco database is being configured. This process upgrades your Umbraco database.
</p>
</div>
<div class="result-status-container" style="display: none;">
<h1>Database upgraded</h1>
<div class="success">
<p>
Your database has been upgraded to version:
<%=UmbracoVersion.Current.ToString(3)%>.<br />
Press <b>Continue</b> to proceed.
</p>
</div>
</div>
</asp:PlaceHolder>
<div class="loader">
<div class="hold">
<div class="progress-bar">
</div>
<span class="progress-bar-value">0%</span>
</div>
<strong></strong>
</div>
</div>
<!-- btn box -->
<footer class="btn-box" style="display: none;">
<div class="t">&nbsp;</div>
<asp:LinkButton class="btn-step btn btn-continue" runat="server" OnClick="GotoNextStep"><span>Continue</span></asp:LinkButton>
<asp:LinkButton class="btn-step btn btn-back" Style="display: none;" runat="server" OnClick="GotoSettings"><span>Back</span></asp:LinkButton>
</footer>
</div>
<script type="text/javascript">
jQuery(document).ready(function() {
updateProgressBar("5");
updateStatusMessage("Connecting to database..");
var upgradeTimeout;
function upgradeProgress(currProgress) {
if (currProgress < 90) {
upgradeTimeout = setTimeout(function() {
currProgress++;
updateProgressBar(currProgress.toString());
upgradeProgress(currProgress);
}, 10000);
}
}
function handleSuccess(json) {
if (json.Success) {
$(".btn-box").show();
$('.ui-progressbar-value').css("background-image", "url(../umbraco_client/installer/images/pbar.gif)");
$(".result-status-container").show();
$(".progress-status-container").hide();
}
else {
$(".btn-continue").hide();
$(".btn-back").show();
$(".btn-box").show();
}
}
function runUpgrade() {
$.ajax({
type: 'POST',
contentType: 'application/json; charset=utf-8',
data: '{}',
dataType: 'json',
url: 'InstallerRestService.aspx/Upgrade',
success: function(data) {
clearTimeout(upgradeTimeout);
var json = JSON.parse(data.d);
updateProgressBar(json.Percentage);
updateStatusMessage(json.Message);
handleSuccess(json);
}
});
upgradeProgress(30);
}
function runInstall() {
$.ajax({
type: 'POST',
contentType: 'application/json; charset=utf-8',
data: '{}',
dataType: 'json',
url: 'InstallerRestService.aspx/Install',
success: function(data) {
var json = JSON.parse(data.d);
updateProgressBar(json.Percentage);
updateStatusMessage(json.Message);
if (json.RequiresUpgrade) {
runUpgrade();
}
else {
handleSuccess(json);
}
}
});
}
//kick it off
runInstall();
});
</script>
</asp:PlaceHolder>
@@ -1,89 +0,0 @@
<%@ Control Language="c#" AutoEventWireup="True" Codebehind="DefaultUser.ascx.cs" Inherits="Umbraco.Web.UI.Install.Steps.DefaultUser" TargetSchema="http://schemas.microsoft.com/intellisense/ie5"%>
<asp:Placeholder ID="identify" Runat="server" Visible="True">
<!-- create box -->
<div class="tab main-tabinfo">
<div class="container">
<h1>Create User</h1>
<div class="create-hold">
<p>You can now setup a new admin user to log into Umbraco, we recommend using a stong password for this (a password which is more than 4 characters and contains a mix of letters, numbers and symbols).
Please make a note of the chosen password.</p>
<p>The password can be changed once you have completed the installation and logged into the admin interface.</p>
</div>
</div>
<div class="database-hold">
<form action="#">
<fieldset>
<div class="container">
<div class="instruction-hold">
<div class="row">
<asp:label AssociatedControlID="tb_name" runat="server">Name:</asp:label>
<span><asp:TextBox ID="tb_name" CssClass="text" type="text" Text="admin" runat="server" /></span>
<asp:RequiredFieldValidator Display="Dynamic" CssClass="invalidaing" ControlToValidate="tb_name" runat="server" ErrorMessage="Name is a mandatory field" />
</div>
<div class="row">
<asp:label AssociatedControlID="tb_email" runat="server">Email:</asp:label>
<span><asp:TextBox ID="tb_email" CssClass="text" type="text" Text="admin@example.com" runat="server" /></span>
<asp:RequiredFieldValidator Display="Dynamic" CssClass="invalidaing" ControlToValidate="tb_email" runat="server" ErrorMessage="Email is a mandatory field" />
</div>
<div class="row">
<asp:label AssociatedControlID="tb_login" runat="server">Username:</asp:label>
<span><asp:TextBox ID="tb_login" CssClass="text" type="text" Text="admin" runat="server" /></span>
<asp:RequiredFieldValidator Display="Dynamic" CssClass="invalidaing" ControlToValidate="tb_login" runat="server" ErrorMessage="Username is a mandatory field" />
</div>
<div class="row" style="height: 35px; overflow: hidden;">
<asp:label AssociatedControlID="tb_password" runat="server">Password:</asp:label>
<span><asp:TextBox ID="tb_password" CssClass="text" TextMode="Password" type="text" Text="" runat="server" /></span>
<asp:RequiredFieldValidator Display="Dynamic" CssClass="invalidaing" ControlToValidate="tb_password" runat="server" ErrorMessage="Password is a mandatory field" />
<asp:CustomValidator ID="PasswordValidator" Display="Dynamic" CssClass="invalidaing" runat="server" />
</div>
<div class="row">
<asp:Label AssociatedControlID="tb_password_confirm" runat="server">Confirm Password:</asp:label>
<span><asp:TextBox ID="tb_password_confirm" CssClass="text" TextMode="Password" type="text" Text="" runat="server" /></span>
<asp:RequiredFieldValidator Display="Dynamic" CssClass="invalidaing" ControlToValidate="tb_password_confirm" runat="server" ErrorMessage="Confirm Password is a mandatory field" />
<asp:CompareValidator Display="Dynamic" CssClass="invalidaing" ControlToCompare="tb_password" ControlToValidate="tb_password_confirm" ErrorMessage="The passwords must be identical" runat="server" />
</div>
<div class="check-hold">
<asp:CheckBox ID="cb_newsletter" runat="server" Checked="true" />
<asp:label AssociatedControlID="cb_newsletter" runat="server">Sign up for our monthly newsletter</asp:label>
</div>
</div>
</div>
<footer class="btn-box">
<div class="t">&nbsp;</div>
<asp:LinkButton CssClass="btn-create" runat="server" onclick="ChangePasswordClick"><span>Create user</span></asp:linkbutton>
</footer>
</fieldset>
</form>
</div>
</div>
</asp:Placeholder>
<script type="text/javascript">
$(document).ready(function() {
jQuery("#<%= tb_password.ClientID %>").passStrength({
shortPass: "invalidaing",
badPass: "invalidaing",
goodPass: "validaing",
strongPass: "validaing",
baseStyle: "basevalidaing",
minLength: <%=CurrentProvider.MinRequiredPasswordLength %>,
userid: jQuery("#<%= tb_login.ClientID %>").val(),
messageloc: 1
});
});
</script>
@@ -1,24 +0,0 @@
<%@ Control Language="C#" AutoEventWireup="True" CodeBehind="license.ascx.cs" Inherits="Umbraco.Web.UI.Install.Steps.License" %>
<!-- licence box -->
<div class="tab main-tabinfo">
<div class="container">
<h1>License</h1>
<div class="accept-hold">
<h2>Accept the license for Umbraco CMS</h2>
<p>By clicking the "accept and continue" button (or by modifying the Umbraco Configuration Status in the web.config), you accept the license for this software as specified in the text below.</p>
</div>
<h3>The License (MIT):</h3>
<div class="box-software">
<p>Copyright (c) 2002 - <%=DateTime.Now.Year %> Umbraco I/S</p>
<p>Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:</p>
<p>The above copyright and this permission notice shall be included in all copies or substantial portions of the software.</p>
<p><span>THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USER OR OTHER DEALINGS IN THE SOFTWARE.</span></p>
</div>
<p>Thats all. That didnt hurt did it?</p>
</div>
<!-- btn box -->
<footer class="btn-box">
<div class="t">&nbsp;</div>
<asp:LinkButton ID="btnNext" CssClass="btn btn-accept" runat="server" OnClick="GotoNextStep"><span>Accept and Continue</span></asp:LinkButton>
</footer>
</div>
@@ -1,25 +0,0 @@
<%@ Control Language="C#" AutoEventWireup="True" CodeBehind="Renaming.ascx.cs" Inherits="Umbraco.Web.UI.Install.Steps.Renaming" %>
<h1>Step 3/5: Updating old conventions</h1>
<asp:Panel ID="init" Runat="server" Visible="True">
<p>
This version of Umbraco introduces new conventions for naming XSLT and REST extensions as well as a renaming of the Public Access storage file.<br />
You no longer need to prefix your extension references with /bin and the public access storage file is now called access.config instead of access.xml.<br />
This step of the installer will try to update your old references. If it fails due to permission settings, you'll need to make these changes manually!
</p>
<asp:Panel ID="noChangedNeeded" runat="server" Visible="false">
<p><strong>Everything looks good. No changes needed for the upgrade, just press next.</strong></p>
</asp:Panel>
<asp:Panel ID="changesNeeded" runat="server" Visible="true">
<p>
<strong>The following changes will need to be made. Press to update changes button to proceed:</strong>
</p>
<asp:Literal id="identifyResult" Runat="server"></asp:Literal>
<asp:Button ID="updateChanges" runat="server" Text="Update Changes"
onclick="UpdateChangesClick" />
</asp:Panel>
</asp:Panel>
<asp:Panel ID="result" Runat="server" Visible="False">
<asp:Literal ID="resultText" runat=server></asp:Literal>
</asp:Panel>
@@ -1,63 +0,0 @@
<%@ Control Language="c#" AutoEventWireup="True" CodeBehind="TheEnd.ascx.cs" Inherits="Umbraco.Web.UI.Install.Steps.TheEnd"
TargetSchema="http://schemas.microsoft.com/intellisense/ie5" %>
<%@ Import Namespace="Umbraco.Core.IO" %>
<script type="text/javascript">
jQuery(document).ready(function () {
$.post("InstallerRestService.aspx?feed=sitebuildervids",
function (data) {
jQuery("#ajax-sitebuildervids").html(data);
});
$.post("InstallerRestService.aspx?feed=developervids",
function (data) {
jQuery("#ajax-developervids").html(data);
});
umbraco.presentation.webservices.CheckForUpgrade.InstallStatus(true, navigator.userAgent, "");
});
</script>
<!-- done box -->
<div class="tab main-tabinfo">
<div class="container">
<h1>Youre done...now what?</h1>
<p>Excellent, you are now ready to start using Umbraco, one of the worlds most popular open source .NET CMS.</p>
<ul class="btn-web">
<li class="btn-set"><a href="<%= IOHelper.ResolveUrl(SystemDirectories.Umbraco) %>/"><span>Launch umbraco</span></a></li>
</ul>
</div>
<div class="threcol">
<div class="t">
&nbsp;</div>
<div class="hold">
<aside class="col1">
<h2>Useful links</h2>
<p>Weve put together some useful links to help you get started with Umbraco.</p>
<nav class="links">
<ul>
<li><a href="http://umbraco.codeplex.com/documentation" target="_blank">Getting Started Guide</a></li>
<li><a href="http://our.umbraco.org?ref=ourFromInstaller">our.umbraco.org</a></li>
</ul>
<ul>
<li><a href="http://our.umbraco.org/wiki?ref=LatestDocsFromInstaller">New documentation</a></li>
<li><a href="http://our.umbraco.org/projects?ref=LatestProjectsFromInstaller">New Projects</a></li>
<li><a href="http://our.umbraco.org/forum?ref=LatesTalkFromInstaller">Forum Talk</a></li>
</ul>
</nav>
</aside>
<aside class="col2">
<h2>Sitebuilder introduction</h2>
<div id="ajax-sitebuildervids"><small>Loading...</small></div>
</aside>
<aside class="col3">
<h2>Developer introduction</h2>
<div id="ajax-developervids"><small>Loading...</small></div>
</aside>
</div>
</div>
</div>
@@ -1,89 +0,0 @@
<%@ Control Language="c#" AutoEventWireup="True" Codebehind="ValidatePermissions.ascx.cs" Inherits="Umbraco.Web.UI.Install.Steps.ValidatePermissions" TargetSchema="http://schemas.microsoft.com/intellisense/ie5"%>
<h1>Step 3/5: Validating File Permissions</h1>
<p>
umbraco needs write/modify access to certain directories in order to store files like pictures and PDF's.
It also stores temporary data (aka: cache) for enhancing the performance of your website.
</p>
<asp:literal id="perfect" Runat="server" Visible="False">
<div class="success">
<p><strong>Your permission settings are perfect!</strong></p>
<p>You are ready to run umbraco and install packages!</p>
</div>
</asp:literal>
<asp:literal id="noPackages" Runat="server" Visible="False">
<div class="error">
<p><strong>Your permission settings are almost perfect!</strong></p>
<p>
You can run umbraco without problems, but you will not be able to install packages which are recommended to take full advantage of umbraco.
</p>
</div>
</asp:literal>
<asp:literal id="noFolders" Runat="server" Visible="False">
<div class="error">
<p>
<strong>Your permission settings might be an issue!</strong>
</p>
<p>You can run umbraco without problems, but you will not be able to create folders or install packages which are recommended to take full advantage of umbraco.</p>
</div>
</asp:literal>
<asp:literal id="error" Runat="server" Visible="False">
<div class="error">
<p>
<strong>Your permission settings are not ready for umbraco!</strong>
</p>
<p>
In order to run umbraco, you'll need to update your permission settings.
</p>
</div>
</asp:literal>
<asp:Panel Visible="False" Runat="server" ID="howtoResolve">
<h2>How to Resolve</h2>
<div id="fixPane" style="display: block;">
<asp:Panel id="grant" Visible="True" Runat="server">
<h2>Affected files and folders</h2>
<p>
You need to grant ASP.NET modify permissions to the following files/folders:
</p>
<ul>
<asp:Literal id="permSummary" Runat="server"></asp:Literal>
</ul>
</asp:Panel>
<asp:Panel id="folderWoes" Visible="False" Runat="server">
<h3>Resolving folder issue</h3>
<p>Follow <a href="http://groups.google.com/group/microsoft.public.dotnet.framework.aspnet/browse_thread/thread/46d6582afffc96b0/9088396b3323d4ae?lnk=st">this link for more information on problems with ASP.NET and creating
folders</a>.
</p>
</asp:Panel>
<p><a href="#" onClick="javascript:document.getElementById('detailsPane').style.display = 'block';"><strong>View Permission Error Details:</strong></a></p>
<div id="detailsPane" style="display: none">
<p style="font-size: 80%">
- Checking default folder permissions:<br />
<asp:literal id="permissionResults" Runat="server"></asp:literal><br />
- Checking optional folder permissions for packages:<br />
<asp:literal id="packageResults" Runat="server"></asp:literal><br />
- Cache (the umbraco.config file):
<asp:literal id="xmlResult" Runat="server"></asp:literal><br />
<br />
- Creating folders:
<asp:literal id="foldersResult" Runat="server"></asp:literal><br />
<br />
</p>
</div>
</div>
</asp:Panel>
<footer class="btn-box">
<div class="t">&nbsp;</div>
<asp:LinkButton ID="btnNext" CssClass="btn btn-accept" runat="server" OnClick="GotoNextStep"><span>Continue anyway</span></asp:LinkButton>
</footer>
@@ -1,55 +0,0 @@
<%@ Control Language="c#" AutoEventWireup="True" CodeBehind="Welcome.ascx.cs" Inherits="Umbraco.Web.UI.Install.Steps.Welcome"
TargetSchema="http://schemas.microsoft.com/intellisense/ie5" %>
<%@ Import Namespace="Umbraco.Core.Configuration" %>
<!-- welcome box -->
<div class="tab main-tabinfo">
<div class="container">
<asp:PlaceHolder ID="ph_install" runat="server">
<h1>
Welcome to the Umbraco installation</h1>
<h2>
Thanks for downloading the Umbraco CMS installer.
</h2>
<p>
You are just a few minutes away from getting up and running. The installer will
take you through the following process:-</p>
<ul class="text-list">
<li><strong>1.</strong><span>Accept the easy to read License.</span></li>
<li><strong>2.</strong><span>Set up a database. There are a number of options available
such as MS SQL Server, MS SQL Express Edition and MYSQL or you may wish to use the
Microsoft SQL CE 4 database. You may need to consult your web host or system administrator.</span></li>
<li><strong>3.</strong><span>Set an Umbraco Admin password.</span></li>
<li><strong>4.</strong><span>You can then choose to install one of our great starter
kits and a skin.</span></li>
<li><strong>5.</strong><span>But whatever you do don't forget to become part of the Umbraco community, one of the friendliest developer communities you will find. Its what makes Umbraco such a great product and so much fun to use.</span></li>
</ul>
<span class="enjoy">Enjoy!</span>
</asp:PlaceHolder>
<asp:PlaceHolder ID="ph_upgrade" runat="server" Visible="false">
<h1>Upgrading Umbraco</h1>
<p>
Welcome to the umbraco upgrade wizard. This will make sure that you upgrade safely from your old version to <strong>Umbraco version <%=UmbracoVersion.Current.ToString(3) %> <%=UmbracoVersion.CurrentComment %></strong>
</p>
<p>
As this is an upgrade, <strong>the wizard might skip steps</strong> that are only needed for new umbraco installations. It might also ask you questions you've already answered once. But do not worry,
everything is in order. Click <strong>Let's get started</strong> below to begin your upgrade.
</p>
<span class="enjoy">Enjoy!</span>
</asp:PlaceHolder>
</div>
<!-- btn box -->
<footer class="btn-box">
<div class="t">&nbsp;</div>
<asp:LinkButton ID="btnNext" CssClass="btn btn-get" runat="server" OnClick="GotoNextStep"><span>Let's get started!</span></asp:LinkButton>
</footer>
</div>
<script type="text/javascript">
jQuery(document).ready(function () {
umbraco.presentation.webservices.CheckForUpgrade.InstallStatus(false, navigator.userAgent, "");
});
</script>
+15
View File
@@ -0,0 +1,15 @@
/*
TXT 2.0 by HTML5 UP
html5up.net | @n33co
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
*/
window._skel_config = {
preset: 'standard',
prefix: '/css/style',
resetCSS: true
};
window._skel_panels_config = {
preset: 'standard'
};
+8
View File
@@ -0,0 +1,8 @@
/*
HTML5 Shiv v3.6.2 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
*/
(function(l,f){function m(){var a=e.elements;return"string"==typeof a?a.split(" "):a}function i(a){var b=n[a[o]];b||(b={},h++,a[o]=h,n[h]=b);return b}function p(a,b,c){b||(b=f);if(g)return b.createElement(a);c||(c=i(b));b=c.cache[a]?c.cache[a].cloneNode():r.test(a)?(c.cache[a]=c.createElem(a)).cloneNode():c.createElem(a);return b.canHaveChildren&&!s.test(a)?c.frag.appendChild(b):b}function t(a,b){if(!b.cache)b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag();
a.createElement=function(c){return!e.shivMethods?b.createElem(c):p(c,a,b)};a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/\w+/g,function(a){b.createElem(a);b.frag.createElement(a);return'c("'+a+'")'})+");return n}")(e,b.frag)}function q(a){a||(a=f);var b=i(a);if(e.shivCSS&&!j&&!b.hasCSS){var c,d=a;c=d.createElement("p");d=d.getElementsByTagName("head")[0]||d.documentElement;c.innerHTML="x<style>article,aside,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}</style>";
c=d.insertBefore(c.lastChild,d.firstChild);b.hasCSS=!!c}g||t(a,b);return a}var k=l.html5||{},s=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,r=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,j,o="_html5shiv",h=0,n={},g;(function(){try{var a=f.createElement("a");a.innerHTML="<xyz></xyz>";j="hidden"in a;var b;if(!(b=1==a.childNodes.length)){f.createElement("a");var c=f.createDocumentFragment();b="undefined"==typeof c.cloneNode||
"undefined"==typeof c.createDocumentFragment||"undefined"==typeof c.createElement}g=b}catch(d){g=j=!0}})();var e={elements:k.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup main mark meter nav output progress section summary time video",version:"3.6.2",shivCSS:!1!==k.shivCSS,supportsUnknownElements:g,shivMethods:!1!==k.shivMethods,type:"default",shivDocument:q,createElement:p,createDocumentFragment:function(a,b){a||(a=f);if(g)return a.createDocumentFragment();
for(var b=b||i(a),c=b.frag.cloneNode(),d=0,e=m(),h=e.length;d<h;d++)c.createElement(e[d]);return c}};l.html5=e;q(f)})(this,document);
File diff suppressed because one or more lines are too long
+33
View File
@@ -0,0 +1,33 @@
/* skelJS v0.4 | (c) n33 | skeljs.org | MIT licensed */
skel.registerPlugin("panels",function(){var b={config:{baseZIndex:1E4,useTransform:!0,transformBreakpoints:null,speed:250,panels:{},overlays:{}},cache:{panels:{},overlays:{},body:null,window:null,pageWrapper:null,defaultWrapper:null,fixedWrapper:null,activePanel:null},eventType:"click",positions:{panels:{top:["top","left"],right:["top","right"],bottom:["bottom","left"],left:["top","left"]},overlays:{"top-left":{top:0,left:0},"top-right":{top:0,right:0},top:{top:0,left:"50%"},"top-center":{top:0,left:"50%"},
"bottom-left":{bottom:0,left:0},"bottom-right":{bottom:0,right:0},bottom:{bottom:0,left:"50%"},"bottom-center":{bottom:0,left:"50%"},left:{top:"50%",left:0},"middle-left":{top:"50%",left:0},right:{top:"50%",right:0},"middle-right":{top:"50%",right:0}}},presets:{standard:{panels:{navPanel:{breakpoints:"mobile",position:"left",style:"push",size:"80%",html:'<div data-action="navList" data-args="nav"></div>'}},overlays:{titleBar:{breakpoints:"mobile",position:"top-left",width:"100%",height:44,html:'<span class="toggle" data-action="togglePanel" data-args="navPanel"></span><span class="title" data-action="copyHTML" data-args="logo"></span>'}}}},
defaults:{config:{panel:{breakpoints:"",position:null,style:null,size:"80%",html:"",resetScroll:!0,resetForms:!0,swipeToClose:!0},overlay:{breakpoints:"",position:null,width:0,height:0,html:""}}},recalcW:function(b){var c=parseInt(b);"string"==typeof b&&"%"==b.charAt(b.length-1)&&(c=Math.floor(jQuery(window).width()*(c/100)));return c},recalcH:function(b){var c=parseInt(b);"string"==typeof b&&"%"==b.charAt(b.length-1)&&(c=Math.floor(jQuery(window).height()*(c/100)));return c},getHalf:function(b){var c=
parseInt(b);return"string"==typeof b&&"%"==b.charAt(b.length-1)?Math.floor(c/2)+"%":Math.floor(c/2)+"px"},parseSuspend:function(b){b=b.get(0);b._skel_panels_suspend&&b._skel_panels_suspend()},parseResume:function(b){b=b.get(0);b._skel_panels_resume&&b._skel_panels_resume()},parseInit:function(e){var c,d;c=e.get(0);var h=e.attr("data-action"),f=e.attr("data-args"),g,l;h&&f&&(f=f.split(","));switch(h){case "togglePanel":case "panelToggle":e.css("-webkit-tap-highlight-color","rgba(0,0,0,0)").css("cursor",
"pointer");c=function(c){c.preventDefault();c.stopPropagation();if(b.cache.activePanel)return b.cache.activePanel._skel_panels_close(),!1;jQuery(this);c=b.cache.panels[f[0]];c.is(":visible")?c._skel_panels_close():c._skel_panels_open()};"android"==b._.vars.deviceType?e.bind("click",c):e.bind(b.eventType,c);break;case "navList":g=jQuery("#"+f[0]);c=g.find("a");d=[];c.each(function(){var b=jQuery(this),c;c=Math.max(0,b.parents("li").length-1);d.push('<a class="link depth-'+c+'" href="'+b.attr("href")+
'"><span class="indent-'+c+'"></span>'+b.text()+"</a>")});0<d.length&&e.html("<nav>"+d.join("")+"</nav>");e.find(".link").css("cursor","pointer").css("display","block");break;case "copyText":g=jQuery("#"+f[0]);e.html(g.text());break;case "copyHTML":g=jQuery("#"+f[0]);e.html(g.html());break;case "moveElementContents":g=jQuery("#"+f[0]);c._skel_panels_resume=function(){g.children().each(function(){e.append(jQuery(this))})};c._skel_panels_suspend=function(){e.children().each(function(){g.append(jQuery(this))})};
c._skel_panels_resume();break;case "moveElement":g=jQuery("#"+f[0]);c._skel_panels_resume=function(){jQuery('<div id="skel-panels-tmp-'+g.attr("id")+'" />').insertBefore(g);e.append(g)};c._skel_panels_suspend=function(){jQuery("#skel-panels-tmp-"+g.attr("id")).replaceWith(g)};c._skel_panels_resume();break;case "moveCell":g=jQuery("#"+f[0]),l=jQuery("#"+f[1]),c._skel_panels_resume=function(){jQuery('<div id="skel-panels-tmp-'+g.attr("id")+'" />').insertBefore(g);e.append(g);g.css("width","auto");l&&
l._skel_panels_expandCell()},c._skel_panels_suspend=function(){jQuery("#skel-panels-tmp-"+g.attr("id")).replaceWith(g);g.css("width","");l&&l.css("width","")},c._skel_panels_resume()}},lockView:function(e){b.cache.window._skel_panels_scrollPos=b.cache.window.scrollTop();b._.vars.isTouch&&b.cache.body.css("overflow-"+e,"hidden");b.cache.pageWrapper.bind("touchstart.lock",function(c){c.preventDefault();c.stopPropagation();b.cache.activePanel&&b.cache.activePanel._skel_panels_close()});b.cache.pageWrapper.bind("click.lock",
function(c){c.preventDefault();c.stopPropagation();b.cache.activePanel&&b.cache.activePanel._skel_panels_close()});b.cache.pageWrapper.bind("scroll.lock",function(c){c.preventDefault();c.stopPropagation();b.cache.activePanel&&b.cache.activePanel._skel_panels_close()});b.cache.window.bind("orientationchange.lock",function(c){b.cache.activePanel&&b.cache.activePanel._skel_panels_close()});b._.vars.isTouch||(b.cache.window.bind("resize.lock",function(c){b.cache.activePanel&&b.cache.activePanel._skel_panels_close()}),
b.cache.window.bind("scroll.lock",function(c){b.cache.activePanel&&b.cache.activePanel._skel_panels_close()}))},unlockView:function(e){b._.vars.isTouch&&b.cache.body.css("overflow-"+e,"visible");b.cache.pageWrapper.unbind("touchstart.lock");b.cache.pageWrapper.unbind("click.lock");b.cache.pageWrapper.unbind("scroll.lock");b.cache.window.unbind("orientationchange.lock");b._.vars.isTouch||(b.cache.window.unbind("resize.lock"),b.cache.window.unbind("scroll.lock"))},resumeElement:function(e){b.cache[e.type+
"s"][e.id].find("*").each(function(){b.parseResume(jQuery(this))})},suspendElement:function(e){e=b.cache[e.type+"s"][e.id];e._skel_panels_translateOrigin();e.find("*").each(function(){b.parseSuspend(jQuery(this))})},initElement:function(e){var c=e.config,d=jQuery(e.object),h;b.cache[e.type+"s"][e.id]=d;d._skel_panels_init();d.find("*").each(function(){b.parseInit(jQuery(this))});switch(e.type){case "panel":d.addClass("skel-panels-panel").css("z-index",b.config.baseZIndex).css("position","fixed").hide();
d.find("a").css("-webkit-tap-highlight-color","rgba(0,0,0,0)").bind("click.skel-panels",function(c){if(b.cache.activePanel){c.preventDefault();c.stopPropagation();c=jQuery(this);var d=c.attr("href");b.cache.activePanel._skel_panels_close();c.hasClass("skel-panels-ignoreHref")||window.setTimeout(function(){window.location.href=d},b.config.speed+10)}});"ios"==b._.vars.deviceType&&d.find("input,select,textarea").focus(function(c){var d=jQuery(this);c.preventDefault();c.stopPropagation();window.setTimeout(function(){var c=
b.cache.window._skel_panels_scrollPos,g=b.cache.window.scrollTop()-c;b.cache.window.scrollTop(c);b.cache.activePanel.scrollTop(b.cache.activePanel.scrollTop()+g);d.hide();window.setTimeout(function(){d.show()},0)},100)});switch(c.position){case "top":case "bottom":var f="bottom"==c.position?"-":"";d.addClass("skel-panels-panel-"+c.position).data("skel-panels-panel-position",c.position).css("height",b.recalcH(c.size)).scrollTop(0);b._.vars.isTouch?d.css("overflow-y","scroll").css("-webkit-overflow-scrolling",
"touch").bind("touchstart",function(b){d._posY=b.originalEvent.touches[0].pageY;d._posX=b.originalEvent.touches[0].pageX}).bind("touchmove",function(b){b=d._posY-b.originalEvent.touches[0].pageY;var c=d.outerHeight(),e=d.get(0).scrollHeight-d.scrollTop();if(0==d.scrollTop()&&0>b||e>c-2&&e<c+2&&0<b)return!1}):d.css("overflow-y","auto");switch(c.style){default:d._skel_panels_open=function(){d._skel_panels_promote().scrollTop(0).css("left","0px").css(c.position,"-"+b.recalcH(c.size)+"px").css("height",
b.recalcH(c.size)).css("width","100%").show();c.resetScroll&&d.scrollTop(0);c.resetForms&&d._skel_panels_resetForms();b.lockView("y");window.setTimeout(function(){d.add(b.cache.fixedWrapper.children()).add(b.cache.pageWrapper)._skel_panels_translate(0,f+b.recalcH(c.size));b.cache.activePanel=d},100)},d._skel_panels_close=function(){d.find("*").blur();d.add(b.cache.pageWrapper).add(b.cache.fixedWrapper.children())._skel_panels_translateOrigin();window.setTimeout(function(){b.unlockView("y");d._skel_panels_demote().hide();
b.cache.activePanel=null},b.config.speed+50)}}break;case "left":case "right":switch(f="right"==c.position?"-":"",d.addClass("skel-panels-panel-"+c.position).data("skel-panels-panel-position",c.position).css("width",b.recalcW(c.size)).scrollTop(0),b._.vars.isTouch?d.css("overflow-y","scroll").css("-webkit-overflow-scrolling","touch").bind("touchstart",function(b){d._posY=b.originalEvent.touches[0].pageY;d._posX=b.originalEvent.touches[0].pageX}).bind("touchmove",function(b){var e=d._posX-b.originalEvent.touches[0].pageX;
b=d._posY-b.originalEvent.touches[0].pageY;var f=d.outerHeight(),h=d.get(0).scrollHeight-d.scrollTop();if(c.swipeToClose&&20>b&&-20<b&&("left"==c.position&&50<e||"right"==c.position&&-50>e))return d._skel_panels_close(),!1;if(0==d.scrollTop()&&0>b||h>f-2&&h<f+2&&0<b)return!1}):d.css("overflow-y","auto"),c.style){default:d._skel_panels_open=function(){d._skel_panels_promote().scrollTop(0).css("top","0px").css(c.position,"-"+b.recalcW(c.size)+"px").css("width",b.recalcW(c.size)).css("height","100%").show();
c.resetScroll&&d.scrollTop(0);c.resetForms&&d._skel_panels_resetForms();b.lockView("x");window.setTimeout(function(){d.add(b.cache.fixedWrapper.children()).add(b.cache.pageWrapper)._skel_panels_translate(f+b.recalcW(c.size),0);b.cache.activePanel=d},100)};d._skel_panels_close=function(){d.find("*").blur();d.add(b.cache.fixedWrapper.children()).add(b.cache.pageWrapper)._skel_panels_translateOrigin();window.setTimeout(function(){b.unlockView("x");d._skel_panels_demote().hide();b.cache.activePanel=null},
b.config.speed+50)};break;case "reveal":d._skel_panels_open=function(){b.cache.fixedWrapper._skel_panels_promote(2);b.cache.pageWrapper._skel_panels_promote(1);d.scrollTop(0).css("top","0px").css(c.position,"0px").css("width",b.recalcW(c.size)).css("height","100%").show();c.resetScroll&&d.scrollTop(0);c.resetForms&&d._skel_panels_resetForms();b.lockView("x");window.setTimeout(function(){b.cache.pageWrapper.add(b.cache.fixedWrapper.children())._skel_panels_translate(f+b.recalcW(c.size),0);b.cache.activePanel=
d},100)},d._skel_panels_close=function(){d.find("*").blur();b.cache.pageWrapper.add(b.cache.fixedWrapper.children())._skel_panels_translateOrigin();window.setTimeout(function(){b.unlockView("x");d.hide();b.cache.pageWrapper._skel_panels_demote();b.cache.pageWrapper._skel_panels_demote();b.cache.activePanel=null},b.config.speed+50)}}}break;case "overlay":d.css("z-index",b.config.baseZIndex).css("position","fixed").addClass("skel-panels-overlay"),d.css("width",c.width).css("height",c.height),(h=b.positions.overlays[c.position])||
(c.position="top-left",h=b.positions.overlays[c.position]),d.addClass("skel-panels-overlay-"+c.position).data("skel-panels-overlay-position",c.position),b._.iterate(h,function(e){d.css(e,h[e]);"50%"==h[e]&&("top"==e?d.css("margin-top","-"+b.getHalf(c.height)):"left"==e&&d.css("margin-left","-"+b.getHalf(c.width)))})}},initElements:function(e){var c,d,h,f=[];b._.iterate(b.config[e+"s"],function(g){c={};b._.extend(c,b.defaults.config[e]);b._.extend(c,b.config[e+"s"][g]);b.config[e+"s"][g]=c;d=b._.newDiv(c.html);
d.id=g;d.className="skel-panels-"+e;c.html||(f[g]=d);h=c.breakpoints?c.breakpoints.split(","):b._.breakpointList;b._.iterate(h,function(f){f=b._.cacheBreakpointElement(h[f],g,d,"overlay"==e?"skel_panels_fixedWrapper":"skel_panels_defaultWrapper",2);f.config=c;f.initialized=!1;f.type=e;f.onAttach=function(){this.initialized?b.resumeElement(this):(b.initElement(this),this.initialized=!0)};f.onDetach=function(){b.suspendElement(this)}})});b._.DOMReady(function(){var c,d;b._.iterate(f,function(b){c=jQuery("#"+
b);d=jQuery(f[b]);c.children().appendTo(d);c.remove()})})},initJQueryUtilityFuncs:function(){jQuery.fn._skel_panels_promote=function(c){this._zIndex=this.css("z-index");this.css("z-index",b.config.baseZIndex+(c?c:1));return this};jQuery.fn._skel_panels_demote=function(){this._zIndex&&(this.css("z-index",this._zIndex),this._zIndex=null);return this};jQuery.fn._skel_panels_xcssValue=function(b,d){return jQuery(this).css(b,"-moz-"+d).css(b,"-webkit-"+d).css(b,"-o-"+d).css(b,"-ms-"+d).css(b,d)};jQuery.fn._skel_panels_xcssProperty=
function(b,d){return jQuery(this).css("-moz-"+b,d).css("-webkit-"+b,d).css("-o-"+b,d).css("-ms-"+b,d).css(b,d)};jQuery.fn._skel_panels_xcss=function(b,d){return jQuery(this).css("-moz-"+b,"-moz-"+d).css("-webkit-"+b,"-webkit-"+d).css("-o-"+b,"-o-"+d).css("-ms-"+b,"-ms-"+d).css(b,d)};jQuery.fn._skel_panels_resetForms=function(){var b=jQuery(this);jQuery(this).find("form").each(function(){this.reset()});return b};jQuery.fn._skel_panels_initializeCell=function(){var b=jQuery(this);b.attr("class").match(/(\s+|^)([0-9]+)u(\s+|$)/)&&
b.data("cell-size",parseInt(RegExp.$2))};jQuery.fn._skel_panels_expandCell=function(){var b=jQuery(this),d=12;b.parent().children().each(function(){var b=jQuery(this).attr("class");b&&b.match(/(\s+|^)([0-9]+)u(\s+|$)/)&&(d-=parseInt(RegExp.$2))});0<d&&(b._skel_panels_initializeCell(),b.css("width",100*((b.data("cell-size")+d)/12)+"%"))};if(b.config.useTransform&&10<=b._.vars.IEVersion&&(!b.config.transformBreakpoints||b._.hasActive(b.config.transformBreakpoints.split(","))))jQuery.fn._skel_panels_translateOrigin=
function(){return jQuery(this)._skel_panels_translate(0,0)},jQuery.fn._skel_panels_translate=function(b,d){return jQuery(this).css("transform","translate("+b+"px, "+d+"px)")},jQuery.fn._skel_panels_init=function(){return jQuery(this).css("backface-visibility","hidden").css("perspective","500")._skel_panels_xcss("transition","transform "+b.config.speed/1E3+"s ease-in-out")};else{var e=[];b.cache.window.resize(function(){if(0!=b.config.speed){var c=b.config.speed;b.config.speed=0;window.setTimeout(function(){b.config.speed=
c;e=[]},c)}});jQuery.fn._skel_panels_translateOrigin=function(){for(var c=0;c<this.length;c++){var d=this[c],h=jQuery(d);e[d.id]&&h.animate(e[d.id],b.config.speed,"swing",function(){b._.iterate(e[d.id],function(b){h.css(b,e[d.id][b])});b.cache.body.css("overflow-x","visible");b.cache.pageWrapper.css("width","auto").css("padding-bottom",0)})}return jQuery(this)};jQuery.fn._skel_panels_translate=function(c,d){var h,f,g,l;c=parseInt(c);d=parseInt(d);0!=c?(b.cache.body.css("overflow-x","hidden"),b.cache.pageWrapper.css("width",
b.cache.window.width())):g=function(){b.cache.body.css("overflow-x","visible");b.cache.pageWrapper.css("width","auto")};0>d?b.cache.pageWrapper.css("padding-bottom",Math.abs(d)):l=function(){b.cache.pageWrapper.css("padding-bottom",0)};for(h=0;h<this.length;h++){var k=this[h],n=jQuery(k),m;if(!e[k.id])if(m=b.positions.overlays[n.data("skel-panels-overlay-position")])e[k.id]=m;else if(m=b.positions.panels[n.data("skel-panels-panel-position")])for(e[k.id]={},f=0;m[f];f++)e[k.id][m[f]]=parseInt(n.css(m[f]));
else m=n.position(),e[k.id]={top:m.top,left:m.left};a={};b._.iterate(e[k.id],function(f){var g;switch(f){case "top":g=b.recalcH(e[k.id][f])+d;break;case "bottom":g=b.recalcH(e[k.id][f])-d;break;case "left":g=b.recalcW(e[k.id][f])+c;break;case "right":g=b.recalcW(e[k.id][f])-c}a[f]=g});n.animate(a,b.config.speed,"swing",function(){g&&g();l&&l()})}return jQuery(this)};jQuery.fn._skel_panels_init=function(){return jQuery(this).css("position","absolute")}}},initObjects:function(){b.cache.window=jQuery(window);
b.cache.window.load(function(){0==b.cache.window.scrollTop()&&window.scrollTo(0,1)});b._.DOMReady(function(){b.cache.body=jQuery("body");b.cache.body.wrapInner('<div id="skel-panels-pageWrapper" />');b.cache.pageWrapper=jQuery("#skel-panels-pageWrapper");b.cache.pageWrapper.css("position","relative").css("left","0").css("right","0").css("top","0")._skel_panels_init();b.cache.defaultWrapper=jQuery('<div id="skel-panels-defaultWrapper" />').appendTo(b.cache.body);b.cache.defaultWrapper.css("height",
"100%");b.cache.fixedWrapper=jQuery('<div id="skel-panels-fixedWrapper" />').appendTo(b.cache.body);b.cache.fixedWrapper.css("position","relative");jQuery(".skel-panels-fixed").appendTo(b.cache.fixedWrapper);b._.registerLocation("skel_panels_defaultWrapper",b.cache.defaultWrapper[0]);b._.registerLocation("skel_panels_fixedWrapper",b.cache.fixedWrapper[0]);b._.registerLocation("skel_panels_pageWrapper",b.cache.pageWrapper[0])})},initIncludes:function(){b._.DOMReady(function(){jQuery(".skel-panels-include").each(function(){b.parseInit(jQuery(this))})})},
init:function(){b.eventType=b._.vars.isTouch?"touchend":"click";b.initObjects();b.initJQueryUtilityFuncs();b.initElements("overlay");b.initElements("panel");b.initIncludes();b._.updateState()}};return b}());
+35
View File
@@ -0,0 +1,35 @@
/* skelJS v0.4 | (c) n33 | skeljs.org | MIT licensed */
var skel=function(){var a={config:{prefix:null,preloadStyleSheets:!1,pollOnce:!1,resetCSS:!1,normalizeCSS:!1,boxModel:null,useOrientation:!1,useRTL:!1,pollOnLock:!1,containers:960,grid:{collapse:!1,gutters:40},breakpoints:{all:{range:"*",hasStyleSheet:!1}},events:{}},isConfigured:!1,isInit:!1,lockState:null,stateId:"",me:null,breakpoints:[],breakpointList:[],events:[],plugins:{},cache:{elements:{},states:{}},locations:{html:null,head:null,body:null},vars:{},lsc:"_skel_lock",sd:" ",css:{r:"html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none}table{border-collapse:collapse;border-spacing:0}body{-webkit-text-size-adjust:none}",
n:'article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,video{display:inline-block}audio:not([controls]){display:none;height:0}[hidden]{display:none}html{background:#fff;color:#000;font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}a:focus{outline:thin dotted}a:active,a:hover{outline:0}h1{font-size:2em;margin:.67em 0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}mark{background:#ff0;color:#000}code,kbd,pre,samp{font-family:monospace,serif;font-size:1em}pre{white-space:pre-wrap}q{quotes:"\u0081C" "\u0081D" "\u00818" "\u00819"}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:0}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}button,input,select,textarea{font-family:inherit;font-size:100%;margin:0}button,input{line-height:normal}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top}table{border-collapse:collapse;border-spacing:0}',
g:".\\31 2u{width:100%}.\\31 1u{width:91.6666666667%}.\\31 0u{width:83.3333333333%}.\\39 u{width:75%}.\\38 u{width:66.6666666667%}.\\37 u{width:58.3333333333%}.\\36 u{width:50%}.\\35 u{width:41.6666666667%}.\\34 u{width:33.3333333333%}.\\33 u{width:25%}.\\32 u{width:16.6666666667%}.\\31 u{width:8.3333333333%}.\\31 u,.\\32 u,.\\33 u,.\\34 u,.\\35 u,.\\36 u,.\\37 u,.\\38 u,.\\39 u,.\\31 0u,.\\31 1u,.\\31 2u{float:left;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-o-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.\\-11u{margin-left:91.6666666667%}.\\-10u{margin-left:83.3333333333%}.\\-9u{margin-left:75%}.\\-8u{margin-left:66.6666666667%}.\\-7u{margin-left:58.3333333333%}.\\-6u{margin-left:50%}.\\-5u{margin-left:41.6666666667%}.\\-4u{margin-left:33.3333333333%}.\\-3u{margin-left:25%}.\\-2u{margin-left:16.6666666667%}.\\-1u{margin-left:8.3333333333%}",
gF:".row.flush{margin-left:0}.row.flush>*{padding:0!important}",gR:".row:after{content:'';display:block;clear:both;height:0}.row:first-child>*{padding-top:0}.row>*{padding-top:0}",gC:".row@{overflow-x:hidden;margin-left:0}.row@>*{float:none!important;width:100%!important;padding:10px 0 10px 0!important;margin-left:0!important}"},presets:{"default":{},standard:{breakpoints:{mobile:{range:"-480",lockViewport:!0,containers:"fluid",grid:{collapse:1}},desktop:{range:"481-",containers:1200},"1000px":{range:"481-1200",
containers:960}}}},defaults:{breakpoint:{test:null,config:null,elements:null},config_breakpoint:{range:"",containers:960,lockViewport:!1,viewportWidth:!1,hasStyleSheet:!0,grid:{}}},DOMReady:null,getElementsByClassName:null,indexOf:null,iterate:null,extend:function(b,c){a.iterate(c,function(d){"object"==typeof c[d]?("object"!=typeof b[d]&&(b[d]={}),a.extend(b[d],c[d])):b[d]=c[d]})},parseMeasurement:function(a){var c;"string"!==typeof a?a=[a,"px"]:"fluid"==a?a=[100,"%"]:(c=a.match(/([0-9\.]+)([^\s]*)/),
a=3>c.length||!c[2]?[parseFloat(a),"px"]:[parseFloat(c[1]),c[2]]);return a},getDevicePixelRatio:function(){var b=navigator.userAgent;if("ios"==a.vars.deviceType||"mac"==a.vars.deviceType||"android"==a.vars.deviceType&&b.match(/Safari\/([0-9]+)/)&&537<=parseInt(RegExp.$1))return 1;if(void 0!==window.devicePixelRatio&&!b.match(/(Firefox; Mobile)/))return window.devicePixelRatio;if(window.matchMedia){if(window.matchMedia("(-webkit-min-device-pixel-ratio: 2),(min--moz-device-pixel-ratio: 2),(-o-min-device-pixel-ratio: 2/1),(min-resolution: 2dppx)").matches)return 2;
if(window.matchMedia("(-webkit-min-device-pixel-ratio: 1.5),(min--moz-device-pixel-ratio: 1.5),(-o-min-device-pixel-ratio: 3/2),(min-resolution: 1.5dppx)").matches)return 1.5}return 1},getViewportWidth:function(){var b,c,d;b=document.documentElement.clientWidth;c=void 0!==window.orientation?Math.abs(window.orientation):!1;d=a.getDevicePixelRatio();screen.width<b&&(b=screen.width);!1!==c&&(b=a.config.useOrientation?90===c?Math.max(screen.width,screen.height):Math.min(screen.width,screen.height):Math.min(screen.width,
screen.height));return b/d},unlock:function(){a.lockState=null;document.cookie=a.lsc+"=;expires=Thu, 1 Jan 1970 12:00:00 UTC; path="+window.location.pathname;a.config.pollOnLock?a.poll():window.location.reload()},lock:function(b){a.lockState=b;document.cookie=a.lsc+"="+b+";expires=Thu, 1 Jan 2077 12:00:00 UTC; path="+window.location.pathname;a.config.pollOnLock?a.poll():window.location.reload()},getLock:function(){return a.lockState},isLocked:function(){return!!a.lockState},hasActive:function(b){var c=
!1;a.iterate(b,function(d){c=c||a.isActive(b[d])});return c},isActive:function(b){return-1!==a.indexOf(a.stateId,a.sd+b)},wasActive:function(b){return-1!==a.indexOf(a.vars.lastStateId,a.sd+b)},canUse:function(b){return a.breakpoints[b]&&a.breakpoints[b].test(a.getViewportWidth())},unreverseRows:function(){var b=a.getElementsByClassName("row");a.iterate(b,function(a){if("length"!==a&&(a=b[a],a._skel_isReversed)){var d=a.children,e;for(e=1;e<d.length;e++)a.insertBefore(d[e],d[0]);a._skel_isReversed=
!1}})},reverseRows:function(b){var c=a.getElementsByClassName("row");a.iterate(c,function(a){if("length"!==a&&(a=c[a],!(a._skel_isReversed||b&&a.className.match(/\bno-collapse-([0-9])\b/)&&parseInt(RegExp.$1)>=parseInt(b)))){var e=a.children,g;for(g=1;g<e.length;g++)a.insertBefore(e[g],e[0]);a._skel_isReversed=!0}})},bind:function(b,c){a.events[b]||(a.events[b]=[]);a.events[b].push(c)},trigger:function(b){a.events[b]&&0!=a.events[b].length&&a.iterate(a.events[b],function(c){a.events[b][c]()})},onStateChange:function(b){a.bind("stateChange",
b);a.isInit&&b()},registerLocation:function(b,c){c._skel_attach="head"==b?function(b){this.insertBefore(b,a.me)}:function(a){this.appendChild(a)};a.locations[b]=c},cacheElement:function(b,c,d,e){return a.cache.elements[b]={id:b,object:c,location:d,priority:e}},cacheBreakpointElement:function(b,c,d,e,g){var f=a.getCachedElement(c);f||(f=a.cacheElement(c,d,e,g));a.breakpoints[b]&&a.breakpoints[b].elements.push(f);return f},getCachedElement:function(b){return a.cache.elements[b]?a.cache.elements[b]:
null},detachAllElements:function(){var b;a.iterate(a.cache.elements,function(c){b=a.cache.elements[c].object;if(b.parentNode&&(!b.parentNode||b.parentNode.tagName)&&(b.parentNode.removeChild(b),a.cache.elements[c].onDetach))a.cache.elements[c].onDetach()})},attachElements:function(b){var c=[],d=[],e;a.iterate(b,function(a){c[b[a].priority]||(c[b[a].priority]=[]);c[b[a].priority].push(b[a])});a.iterate(c,function(b){0!=c[b].length&&a.iterate(c[b],function(f){if(e=a.locations[c[b][f].location]){if(e._skel_attach(c[b][f].object),
c[b][f].onAttach)c[b][f].onAttach()}else d.push(c[b][f])})});0<d.length&&a.DOMReady(function(){a.iterate(d,function(b){if(e=a.locations[d[b].location])if(e._skel_attach(d[b].object),d[b].onAttach)d[b].onAttach()})})},poll:function(){var b,c="";b=a.lockState?a.lockState:a.getViewportWidth();a.vars.viewportWidth=b;a.vars.devicePixelRatio=a.getDevicePixelRatio();a.iterate(a.breakpoints,function(d){a.breakpoints[d].test(b)&&(c+=a.sd+d)});""===c&&(c=a.sd);c!==a.stateId&&(a.locations.html.className=a.locations.html.className.replace(a.stateId,
""),a.changeState(c),a.locations.html.className+=a.stateId)},updateState:function(){var b,c=[],d=a.stateId.substring(1).split(a.sd);a.iterate(d,function(e){b=a.breakpoints[d[e]];0!=b.elements.length&&a.iterate(b.elements,function(d){a.cache.states[a.stateId].elements.push(b.elements[d]);c.push(b.elements[d])})});0<c.length&&a.attachElements(c)},changeState:function(b){var c,d,e,g,f,k,h;a.vars.lastStateId=a.stateId;a.stateId=b;if(a.cache.states[a.stateId])d=a.cache.states[a.stateId];else{a.cache.states[a.stateId]=
{config:{},elements:[],values:{}};d=a.cache.states[a.stateId];c=a.stateId===a.sd?[]:a.stateId.substring(1).split(a.sd);a.extend(d.config,a.defaults.config_breakpoint);a.iterate(c,function(b){a.extend(d.config,a.breakpoints[c[b]].config)});a.config.boxModel&&(f="iBM",(g=a.getCachedElement(f))||(g=a.cacheElement(f,a.newInline("*,*:before,*:after{-moz-@;-webkit-@;-o-@;-ms-@;@}".replace(/@/g,"box-sizing:"+a.config.boxModel+"-box")),"head",3)),d.elements.push(g));a.config.resetCSS?(f="iR",(g=a.getCachedElement(f))||
(g=a.cacheElement(f,a.newInline(a.css.r),"head",2)),d.elements.push(g)):a.config.normalizeCSS&&(f="iN",(g=a.getCachedElement(f))||(g=a.cacheElement(f,a.newInline(a.css.n),"head",2)),d.elements.push(g));a.config.prefix&&(f="ssB",(g=a.getCachedElement(f))||(g=a.cacheElement(f,a.newStyleSheet(a.config.prefix+".css"),"head",4)),d.elements.push(g));d.config.lockViewport?(f="mVL"+a.stateId,(g=a.getCachedElement(f))||(g=a.cacheElement(f,a.newMeta("viewport","width="+(d.config.viewportWidth?d.config.viewportWidth:
"device-width")+",initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"),"head",1)),d.elements.push(g)):d.config.viewportWidth&&(f="mV"+a.stateId,(g=a.getCachedElement(f))||(g=a.cacheElement(f,a.newMeta("viewport","width="+d.config.viewportWidth),"head",1)),d.elements.push(g));e=a.parseMeasurement(d.config.containers);b=e[0];e=e[1];d.values.containers=b+e;f="iC"+b+e;if(!(g=a.getCachedElement(f))){var l;l=b+e;g=a.cacheElement(f,a.newInline("body{min-width:"+l+"}.container{margin:0 auto;width:"+
l+"}.container.small{width:"+(0.75*b+e)+"}.container.big{width:100%;max-width:"+(1.25*b+e)+";min-width:"+l+"}"),"head",3)}d.elements.push(g);f="iG";(g=a.getCachedElement(f))||(g=a.cacheElement(f,a.newInline(a.css.g+a.css.gF),"head",3));d.elements.push(g);f="iGG"+d.config.grid.gutters;if(!(g=a.getCachedElement(f))){var m,n,p;e=a.parseMeasurement(d.config.grid.gutters);b=e[0];m=e[1];e=b+m;l=b/2+m;n=b/4+m;p=1.5*b+m;b=2*b+m;g=a.cacheElement("iGG"+d.config.grid.gutters,a.newInline(".row>*{padding:"+e+
" 0 0 "+e+"}.row+.row>*{padding-top:"+e+"}.row{margin-left:-"+e+"}.row.half>*{padding:"+l+" 0 0 "+l+"}.row.half+.row.half>*{padding-top:"+l+"}.row.half{margin-left:-"+l+"}.row.quarter>*{padding:"+n+" 0 0 "+n+"}.row.quarter+.row.quarter>*{padding-top:"+n+"}.row.quarter{margin-left:-"+n+"}.row.oneandhalf>*{padding:"+p+" 0 0 "+p+"}.row.oneandhalf+.row.oneandhalf>*{padding-top:"+p+"}.row.oneandhalf{margin-left:-"+p+"}.row.double>*{padding:"+b+" 0 0 "+b+"}.row.double+.row.double>*{padding-top:"+b+"}.row.double{margin-left:-"+
b+"}"),"head",3)}d.elements.push(g);if(d.config.grid.collapse){if(b=parseInt(d.config.grid.collapse),isNaN(b)&&(b=1),f="iGC"+b,!(g=a.getCachedElement(f))){k=a.css.gR+a.css.gC;h=":not(.no-collapse)";switch(b){case 4:break;case 3:h+=":not(.no-collapse-3)";break;case 2:h+=":not(.no-collapse-2):not(.no-collapse-3)";break;default:h+=":not(.no-collapse-1):not(.no-collapse-2):not(.no-collapse-3)"}k=k.replace(/@/g,h);g=a.cacheElement(f,a.newInline(k+".container{max-width:none!important;min-width:0!important;width:"+
d.values.containers+"!important}"),"head",3)}}else f="iGNoCo",(g=a.getCachedElement(f))||(g=a.cacheElement(f,a.newInline(a.css.gR),"head",3));d.elements.push(g);f="iCd"+a.stateId;(g=a.getCachedElement(f))||(k=[],h=[],a.iterate(a.breakpoints,function(b){-1!==a.indexOf(c,b)?k.push(".not-"+b):h.push(".only-"+b)}),b=(0<k.length?k.join(",")+"{display:none!important}":"")+(0<h.length?h.join(",")+"{display:none!important}":""),g=a.cacheElement(f,a.newInline(b.replace(/\.([0-9])/,".\\3$1 ")),"head",3),d.elements.push(g));
a.iterate(c,function(b){a.breakpoints[c[b]].config.hasStyleSheet&&a.config.prefix&&(f="ss"+c[b],(g=a.getCachedElement(f))||(g=a.cacheElement(f,a.newStyleSheet(a.config.prefix+"-"+c[b]+".css"),"head",5)),d.elements.push(g));0<a.breakpoints[c[b]].elements.length&&a.iterate(a.breakpoints[c[b]].elements,function(e){d.elements.push(a.breakpoints[c[b]].elements[e])})})}a.detachAllElements();a.attachElements(d.elements);a.DOMReady(function(){var b,c;a.config.useRTL&&(a.unreverseRows(),d.config.grid.collapse&&
a.reverseRows(d.config.grid.collapse));if((b=a.getElementsByClassName("skel-cell-mainContent"))&&0<b.length)if(b=b[0],d.config.grid.collapse)c=document.createElement("div"),c.innerHTML="",c.id="skel-cell-mainContent-placeholder",c.style="display:none",b.parentNode.insertBefore(c,b.nextSibling),b.parentNode.insertBefore(b,b.parentNode.firstChild);else if(c=document.getElementById("skel-cell-mainContent-placeholder"))b.parentNode.insertBefore(b,c),b.parentNode.removeChild(c)});a.vars.state=a.cache.states[a.stateId];
a.vars.stateId=a.stateId;a.trigger("stateChange")},newMeta:function(a,c){var d=document.createElement("meta");d.name=a;d.content=c;return d},newStyleSheet:function(a){var c=document.createElement("link");c.rel="stylesheet";c.type="text/css";c.href=a;return c},newInline:function(b){var c;8>=a.vars.IEVersion?(c=document.createElement("span"),c.innerHTML='&nbsp;<style type="text/css">'+b+"</style>"):(c=document.createElement("style"),c.type="text/css",c.innerHTML=b);return c},newDiv:function(a){var c=
document.createElement("div");c.innerHTML=a;return c},registerPlugin:function(b,c){a.plugins[b]=c;c._=this;a.isConfigured&&(a.initPluginConfig(b,a.plugins[b]),c.init())},initPluginConfig:function(b,c){var d;d="_skel_"+b+"_config";window[d]?d=window[d]:(d=document.getElementsByTagName("script"),(d=d[d.length-1].innerHTML.replace(/^\s+|\s+$/g,""))&&(d=eval("("+d+")")));"object"==typeof d&&(d.preset&&c.presets[d.preset]&&a.extend(c.config,c.presets[d.preset]),a.extend(c.config,d))},initConfig:function(){function b(b,
c){var d;"string"!=typeof c&&(d=function(a){return!1});"*"==c?d=function(a){return!0}:"-"==c.charAt(0)?(g[b]=parseInt(c.substring(1)),d=function(a){return a<=g[b]}):"-"==c.charAt(c.length-1)?(g[b]=parseInt(c.substring(0,c.length-1)),d=function(a){return a>=g[b]}):-1!=a.indexOf(c,"-")?(c=c.split("-"),g[b]=[parseInt(c[0]),parseInt(c[1])],d=function(a){return a>=g[b][0]&&a<=g[b][1]}):(g[b]=parseInt(c),d=function(a){return a==g[b]});return d}var c,d,e,g=[],f=[];window._skel_config?e=window._skel_config:
(e=a.me.innerHTML.replace(/^\s+|\s+$/g,""))&&(e=eval("("+e+")"));"object"==typeof e&&(e.preset&&a.presets[e.preset]?(a.config.breakpoints={},a.extend(a.config,a.presets[e.preset])):e.breakpoints&&(a.config.breakpoints={}),a.extend(a.config,e));a.extend(a.defaults.config_breakpoint.grid,a.config.grid);a.defaults.config_breakpoint.containers=a.config.containers;a.iterate(a.config.breakpoints,function(e){"object"!=typeof a.config.breakpoints[e]&&(a.config.breakpoints[e]={range:a.config.breakpoints[e]});
c={};a.extend(c,a.defaults.config_breakpoint);a.extend(c,a.config.breakpoints[e]);a.config.breakpoints[e]=c;d={};a.extend(d,a.defaults.breakpoint);d.config=a.config.breakpoints[e];d.test=b(e,d.config.range);d.elements=[];a.breakpoints[e]=d;a.config.preloadStyleSheets&&d.config.hasStyleSheet&&f.push(a.config.prefix+"-"+e+".css");a.breakpointList.push(e)});a.iterate(a.config.events,function(b){a.bind(b,a.config.events[b])});0<f.length&&"file:"!=window.location.protocol&&a.DOMReady(function(){document.getElementsByTagName("head");
var b=new XMLHttpRequest;a.iterate(f,function(a){b.open("GET",f[a],!1);b.send("")})})},initEvents:function(){a.config.pollOnce||(window.onresize=function(){a.poll()},a.config.useOrientation&&(window.onorientationchange=function(){a.poll()}))},initUtilityMethods:function(){(function(){var b=window,c=function(a){e=!1;c.isReady=!1;"function"===typeof a&&g.push(a);a=!1;if(!e)if(e=!0,"loading"!==d.readyState&&k(),d.addEventListener)d.addEventListener("DOMContentLoaded",f,!1),b.addEventListener("load",
f,!1);else if(d.attachEvent){d.attachEvent("onreadystatechange",f);b.attachEvent("onload",f);try{a=null==b.frameElement}catch(m){}d.documentElement.doScroll&&a&&h()}},d=b.document,e=!1,g=[],f=function(){d.addEventListener?d.removeEventListener("DOMContentLoaded",f,!1):d.detachEvent("onreadystatechange",f);k()},k=function(){if(!c.isReady){if(!d.body)return setTimeout(k,1);c.isReady=!0;a.iterate(g,function(a){g[a]()});g=[]}},h=function(){if(!c.isReady){try{d.documentElement.doScroll("left")}catch(a){setTimeout(h,
1);return}k()}};c.isReady=!1;a.DOMReady=c})();a.getElementsByClassName=document.getElementsByClassName?function(a){return document.getElementsByClassName(a)}:function(a){var c=document;return c.querySelectorAll?c.querySelectorAll(("."+a.replace(" "," .")).replace(/\.([0-9])/,".\\3$1 ")):[]};a.indexOf=Array.prototype.indexOf?function(a,c){return a.indexOf(c)}:function(a,c){"string"==typeof a&&(a=a.split(""));var d=a.length>>>0,e=Number(c)||0,e=0>e?Math.ceil(e):Math.floor(e);for(0>e&&(e+=d);e<d;e++)if(a instanceof
Array&&e in a&&a[e]===c)return e;return-1};a.iterate=Object.keys?function(a,c){if(!a)return[];var d,e=Object.keys(a);for(d=0;e[d];d++)c(e[d])}:function(a,c){if(!a)return[];for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&c(d)}},initAPI:function(){var b,c,d=navigator.userAgent;a.vars.IEVersion=d.match(/MSIE ([0-9]+)\./)?RegExp.$1:99;a.vars.isTouch=!!("ontouchstart"in window);a.vars.deviceType="other";c={ios:"(iPad|iPhone|iPod)",android:"Android",mac:"Macintosh"};a.iterate(c,function(b){d.match(RegExp(c[b],
"g"))&&(a.vars.deviceType=b)});b=document.cookie.split(";");a.iterate(b,function(c){c=b[c].split("=");c[0]==a.lsc&&(a.lockState=c[1])})},init:function(b,c){a.initUtilityMethods();a.initAPI();b&&(window._skel_config=b);c&&a.iterate(c,function(a){window["_skel_"+a+"_config"]=c[a]});a.initConfig();a.registerLocation("html",document.getElementsByTagName("html")[0]);a.registerLocation("head",document.getElementsByTagName("head")[0]);a.DOMReady(function(){a.registerLocation("body",document.getElementsByTagName("body")[0])});
a.initEvents();a.poll();a.iterate(a.plugins,function(b){a.initPluginConfig(b,a.plugins[b]);a.plugins[b].init()});a.isInit=!0},preInit:function(){var b=document.getElementsByTagName("script");a.me=b[b.length-1];if(window._skel_config)a.isConfigured=!0;else if(s=document.getElementsByTagName("script"),s=s[s.length-1].innerHTML.replace(/^\s+|\s+$/g,""))a.isConfigured=!0;a.isConfigured&&a.init()}};a.preInit();return a}();
+3 -18
View File
@@ -63,13 +63,10 @@
<area alias="auditTrails">
<key alias="atViewingFor">Viewing for</key>
</area>
<area alias="buttons">
<key alias="select">Select</key>
<key alias="selectCurrentFolder">Select current folder</key>
<key alias="somethingElse">Do something else</key>
<key alias="bold">Bold</key>
<key alias="deindent">Cancel Paragraph Indent</key>
<key alias="formFieldInsert">Insert form field</key>
@@ -160,7 +157,6 @@
<key alias="urls">Link to document</key>
<key alias="memberof">Member of group(s)</key>
<key alias="notmemberof">Not a member of group(s)</key>
<key alias="childItems" version="7.0">Child items</key>
<key alias="target" version="7.0">Target</key>
</area>
@@ -172,9 +168,7 @@
<key alias="chooseNode">Where do you want to create the new %0%</key>
<key alias="createUnder">Create an item under</key>
<key alias="updateData">Choose a type and a title</key>
<key alias="noDocumentTypes" version="7.0"><![CDATA[There are no allowed document types available. You must enable these in the settings section under <strong>"document types"</strong>.]]></key>
<key alias="noMediaTypes" version="7.0"><![CDATA[There are no allowed media types available. You must enable these in the settings section under <strong>"media types"</strong>.]]></key>
</area>
<area alias="dashboard">
@@ -248,7 +242,6 @@
<key alias="search">Type to search...</key>
<key alias="filter">Type to filter...</key>
</area>
<area alias="editcontenttype">
<key alias="allowedchildnodetypes">Allowed child nodetypes</key>
<key alias="create">Create</key>
@@ -401,7 +394,6 @@
<key alias="width">Width</key>
<key alias="yes">Yes</key>
<key alias="folder">Folder</key>
<key alias="searchResults">Search results</key>
</area>
<area alias="graphicheadline">
@@ -549,12 +541,9 @@ To manage your website, simply open the umbraco back office and start adding con
<key alias="greeting4">Happy thunder thursday</key>
<key alias="greeting5">Happy friendly friday</key>
<key alias="greeting6">Happy shiny saturday</key>
<key alias="instruction">log in below</key>
<key alias="timeout">Session timed out</key>
<key alias="bottomText"><![CDATA[<p style="text-align:right;">&copy; 2001 - %0% <br /><a href="http://umbraco.org" style="text-decoration: none" target="_blank">umbraco.org</a></p> ]]></key>
</area>
<area alias="main">
<key alias="dashboard">Dashboard</key>
@@ -677,11 +666,9 @@ To manage your website, simply open the umbraco back office and start adding con
<key alias="paSimpleHelp">If you just want to setup simple protection using a single login and password</key>
</area>
<area alias="publish">
<key alias="contentPublishedFailedAwaitingRelease">
<![CDATA[
<key alias="contentPublishedFailedAwaitingRelease"><![CDATA[
%0% could not be published because the item is scheduled for release.
]]>
</key>
]]></key>
<key alias="contentPublishedFailedInvalid"><![CDATA[
%0% could not be published because these properties: %1% did not pass validation rules.
]]></key>
@@ -741,7 +728,6 @@ To manage your website, simply open the umbraco back office and start adding con
<key alias="statistics">Statistics</key>
<key alias="translation">Translation</key>
<key alias="users">Users</key>
<key alias="help" version="7.0">Help</key>
</area>
<area alias="settings">
@@ -993,9 +979,8 @@ To manage your website, simply open the umbraco back office and start adding con
<key alias="usertype">User type</key>
<key alias="userTypes">User types</key>
<key alias="writer">Writer</key>
<key alias="yourProfile" version="7.0">Your profile</key>
<key alias="yourHistory" version="7.0">Your recent history</key>
<key alias="sessionExpires" version="7.0">Session expires in</key>
</area>
</language>
</language>
@@ -62,7 +62,7 @@ namespace Umbraco.Web.UI.Umbraco.Developer.Packages
private void ShowStarterKits()
{
if (Directory.Exists(Server.MapPath(SystemDirectories.Install)) == false)
if (Directory.Exists(Server.MapPath("~/Areas/UmbracoInstall/Legacy")) == false)
{
InstallationDirectoryNotAvailable.Visible = true;
StarterKitNotInstalled.Visible = false;
@@ -71,7 +71,7 @@ namespace Umbraco.Web.UI.Umbraco.Developer.Packages
}
var starterkitsctrl = (LoadStarterKits)LoadControl(SystemDirectories.Install + "/steps/Skinning/loadStarterKits.ascx");
var starterkitsctrl = (LoadStarterKits)LoadControl("~/Areas/UmbracoInstall/Legacy/loadStarterKits.ascx");
ph_starterkits.Controls.Add(starterkitsctrl);
@@ -165,13 +165,7 @@
self._setProgress(r.percentage, r.message);
//install business logic
self.installBusinessLogic();
}
else if (r && !r.success) {
//hasn't completed restarted, re-poll in 2 seconds
setTimeout(function() {
self.pollForRestart();
}, 2000);
}
}
else {
self._showServerError("The server did not respond");
}
@@ -186,7 +180,7 @@
data: "{'kitGuid': '" + self._packageId + "', 'manifestId': '" + self._manifestId + "', 'packageFile': '" + encodeURIComponent(self._packageFile) + "'}",
url: self._opts.baseUrl + '/InstallBusinessLogic',
success: function (r) {
if (r && r.success) {
if (r) {
//set the progress
self._setProgress(r.percentage, r.message);
//cleanup install
@@ -206,7 +200,7 @@
data: "{'kitGuid': '" + self._packageId + "', 'manifestId': '" + self._manifestId + "', 'packageFile': '" + encodeURIComponent(self._packageFile) + "'}",
url: self._opts.baseUrl + '/CleanupInstallation',
success: function (r) {
if (r && r.success) {
if (r) {
//set the progress
self._setProgress(r.percentage, r.message);
//installation complete!
@@ -0,0 +1,28 @@
using System.Web.Http;
using System.Web.Mvc;
using System.Web.Routing;
namespace Umbraco.Web
{
internal static class AreaRegistrationContextExtensions
{
public static Route MapHttpRoute(this AreaRegistrationContext context, string name, string url, object defaults, string[] namespaces)
{
var apiRoute = context.Routes.MapHttpRoute(
name,
url,
defaults);
//web api routes don't set the data tokens object
if (apiRoute.DataTokens == null)
{
apiRoute.DataTokens = new RouteValueDictionary();
}
apiRoute.DataTokens.Add("area", context.AreaName);
apiRoute.DataTokens.Add("Namespaces", namespaces); //look in this namespace to create the controller
apiRoute.DataTokens.Add("UseNamespaceFallback", false); //Don't look anywhere else except this namespace!
return apiRoute;
}
}
}
@@ -0,0 +1,293 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Reflection;
using System.Text;
using System.Web.Http;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Umbraco.Core;
using Umbraco.Core.Configuration;
using Umbraco.Core.Logging;
using Umbraco.Core.Persistence;
using Umbraco.Web.Install.Models;
using Umbraco.Web.WebApi;
namespace Umbraco.Web.Install.Controllers
{
[AngularJsonOnlyConfiguration]
[HttpInstallAuthorize]
public class InstallApiController : ApiController
{
protected InstallApiController()
: this(UmbracoContext.Current)
{
}
protected InstallApiController(UmbracoContext umbracoContext)
{
if (umbracoContext == null) throw new ArgumentNullException("umbracoContext");
UmbracoContext = umbracoContext;
}
/// <summary>
/// Returns the current UmbracoContext
/// </summary>
public UmbracoContext UmbracoContext { get; private set; }
public ApplicationContext ApplicationContext
{
get { return UmbracoContext.Application; }
}
private InstallHelper _helper;
internal InstallHelper InstallHelper
{
get
{
return _helper ?? (_helper = new InstallHelper(UmbracoContext));
}
}
public bool PostValidateDatabaseConnection(DatabaseModel model)
{
var dbHelper = new DatabaseHelper();
return dbHelper.CheckConnection(model, ApplicationContext);
}
/// <summary>
/// Gets the install setup
/// </summary>
/// <returns></returns>
public InstallSetup GetSetup()
{
var setup = new InstallSetup();
//TODO: Check for user/site token
var steps = new List<InstallSetupStep>();
var installSteps = InstallHelper.GetStepsForCurrentInstallType().ToArray();
//only get the steps that are targetting the current install type
steps.AddRange(installSteps);
setup.Steps = steps;
InstallStatusTracker.Initialize(setup.InstallId, installSteps);
return setup;
}
public IEnumerable<Package> GetPackages()
{
var r = new org.umbraco.our.Repository();
var modules = r.Modules();
return modules.Select(package => new Package()
{
Id = package.RepoGuid,
Name = package.Text,
Thumbnail = package.Thumbnail
});
}
/// <summary>
/// Does the install
/// </summary>
/// <returns></returns>
public InstallProgressResultModel PostPerformInstall(InstallInstructions installModel)
{
if (installModel == null) throw new ArgumentNullException("installModel");
var status = InstallStatusTracker.GetStatus().ToArray();
//there won't be any statuses returned if the app pool has restarted so we need to re-read from file.
if (status.Any() == false)
{
status = InstallStatusTracker.InitializeFromFile(installModel.InstallId).ToArray();
}
//create a new queue of the non-finished ones
var queue = new Queue<InstallTrackingItem>(status.Where(x => x.IsComplete == false));
while (queue.Count > 0)
{
var stepStatus = queue.Dequeue();
var step = InstallHelper.GetAllSteps().Single(x => x.Name == stepStatus.Name);
JToken instruction = null;
//If this step has any instructions then extract them
if (installModel.Instructions.Any(x => x.Key == step.Name))
{
instruction = installModel.Instructions[step.Name];
}
//If this step doesn't require execution then continue to the next one, this is just a fail-safe check.
if (StepRequiresExecution(step, instruction) == false)
{
//set this as complete and continue
InstallStatusTracker.SetComplete(installModel.InstallId, stepStatus.Name, null);
continue;
}
try
{
var setupData = ExecuteStep(step, instruction);
//update the status
InstallStatusTracker.SetComplete(installModel.InstallId, step.Name, setupData != null ? setupData.SavedStepData : null);
//Determine's the next step in the queue and dequeue's any items that don't need to execute
var nextStep = IterateNextRequiredStep(step, queue, installModel.InstallId, installModel);
//check if there's a custom view to return for this step
if (setupData != null && setupData.View.IsNullOrWhiteSpace() == false)
{
return new InstallProgressResultModel(false, step.Name, nextStep, setupData.View, setupData.ViewModel);
}
return new InstallProgressResultModel(false, step.Name, nextStep);
}
catch (Exception ex)
{
LogHelper.Error<InstallApiController>("An error occurred during installation step " + step.Name, ex);
if (ex is TargetInvocationException && ex.InnerException != null)
{
ex = ex.InnerException;
}
var installException = ex as InstallException;
if (installException != null)
{
throw new HttpResponseException(Request.CreateValidationErrorResponse(new
{
view = installException.View,
model = installException.ViewModel,
message = installException.Message
}));
}
throw new HttpResponseException(Request.CreateValidationErrorResponse(new
{
step = step.Name,
view = "error",
message = ex.Message
}));
}
}
InstallStatusTracker.Reset();
return new InstallProgressResultModel(true, "", "");
}
/// <summary>
/// We'll peek ahead and check if it's RequiresExecution is returning true. If it
/// is not, we'll dequeue that step and peek ahead again (recurse)
/// </summary>
/// <param name="current"></param>
/// <param name="queue"></param>
/// <param name="installId"></param>
/// <param name="installModel"></param>
/// <returns></returns>
private string IterateNextRequiredStep(InstallSetupStep current, Queue<InstallTrackingItem> queue, Guid installId, InstallInstructions installModel)
{
if (queue.Count > 0)
{
var next = queue.Peek();
var step = InstallHelper.GetAllSteps().Single(x => x.Name == next.Name);
//If the current step restarts the app pool then we must simply return the next one in the queue,
// we cannot peek ahead as the next step might rely on the app restart and therefore RequiresExecution
// will rely on that too.
if (current.PerformsAppRestart)
{
return step.Name;
}
JToken instruction = null;
//If this step has any instructions then extract them
if (installModel.Instructions.Any(x => x.Key == step.Name))
{
instruction = installModel.Instructions[step.Name];
}
//if the step requires execution then return it's name
if (StepRequiresExecution(step, instruction))
{
return step.Name;
}
//this step no longer requires execution, this could be due to a new config change during installation,
// so we'll dequeue this one from the queue and recurse
queue.Dequeue();
//set this as complete
InstallStatusTracker.SetComplete(installId, step.Name, null);
//recurse
return IterateNextRequiredStep(step, queue, installId, installModel);
}
//there is no more steps
return string.Empty;
}
/// <summary>
/// Check if the step requires execution
/// </summary>
/// <param name="step"></param>
/// <param name="instruction"></param>
/// <returns></returns>
internal bool StepRequiresExecution(InstallSetupStep step, JToken instruction)
{
var model = instruction == null ? null : instruction.ToObject(step.StepType);
var genericStepType = typeof(InstallSetupStep<>);
Type[] typeArgs = { step.StepType };
var typedStepType = genericStepType.MakeGenericType(typeArgs);
try
{
var method = typedStepType.GetMethods().Single(x => x.Name == "RequiresExecution");
return (bool)method.Invoke(step, new object[] { model });
}
catch (Exception ex)
{
LogHelper.Error<InstallApiController>("Checking if step requires execution (" + step.Name + ") failed.", ex);
throw;
}
}
internal InstallSetupResult ExecuteStep(InstallSetupStep step, JToken instruction)
{
using (DisposableTimer.TraceDuration<InstallApiController>("Executing installation step: " + step.Name, "Step completed"))
{
var model = instruction == null ? null : instruction.ToObject(step.StepType);
var genericStepType = typeof(InstallSetupStep<>);
Type[] typeArgs = { step.StepType };
var typedStepType = genericStepType.MakeGenericType(typeArgs);
try
{
var method = typedStepType.GetMethods().Single(x => x.Name == "Execute");
return (InstallSetupResult)method.Invoke(step, new object[] { model });
}
catch (Exception ex)
{
LogHelper.Error<InstallApiController>("Installation step " + step.Name + " failed.", ex);
throw;
}
}
}
private HttpResponseMessage Json(object jsonObject, HttpStatusCode status)
{
var response = Request.CreateResponse(status);
var json = JObject.FromObject(jsonObject);
response.Content = new StringContent(json.ToString(), Encoding.UTF8, "application/json");
return response;
}
}
}
@@ -0,0 +1,69 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.Mvc;
using Umbraco.Core;
using Umbraco.Core.Configuration;
using Umbraco.Core.IO;
using Umbraco.Web.Security;
namespace Umbraco.Web.Install.Controllers
{
[InstallAuthorizeAttribute]
public class InstallController : Controller
{
private readonly UmbracoContext _umbracoContext;
public InstallController()
: this(UmbracoContext.Current)
{
}
public InstallController(UmbracoContext umbracoContext)
{
_umbracoContext = umbracoContext;
}
[HttpGet]
public ActionResult Index()
{
//if this is not an upgrade we will log in with the default user.
// It's not considered an upgrade if the ConfigurationStatus is missing or empty.
if (string.IsNullOrWhiteSpace(GlobalSettings.ConfigurationStatus) == false)
{
Version current;
if (Version.TryParse(GlobalSettings.ConfigurationStatus, out current))
{
//check if we are on the current version, and not let the installer execute
if (current == UmbracoVersion.Current)
{
return Redirect(SystemDirectories.Umbraco.EnsureEndsWith('/'));
}
}
var result = _umbracoContext.Security.ValidateCurrentUser(false);
switch (result)
{
case ValidateRequestAttempt.FailedNoPrivileges:
case ValidateRequestAttempt.FailedTimedOut:
case ValidateRequestAttempt.FailedNoContextId:
return Redirect(SystemDirectories.Umbraco + "/AuthorizeUpgrade?redir=" + Server.UrlEncode(Request.RawUrl));
}
}
//gen the install base url
ViewBag.InstallApiBaseUrl = Url.GetUmbracoApiService("GetSetup", "InstallApi", "UmbracoInstall").TrimEnd("GetSetup");
//get the base umbraco folder
ViewBag.UmbracoBaseFolder = IOHelper.ResolveUrl(SystemDirectories.Umbraco);
return View();
}
}
}
@@ -0,0 +1,199 @@
using System;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Text;
using System.Web;
using System.Web.Http;
using Newtonsoft.Json.Linq;
using umbraco;
using Umbraco.Core;
using Umbraco.Web.Install.Models;
using Umbraco.Web.WebApi;
namespace Umbraco.Web.Install.Controllers
{
/// <summary>
/// A controller for the installation process regarding packages
/// </summary>
/// <remarks>
/// Currently this is used for web services however we should/could eventually migrate the whole installer to MVC as it
/// is a bit of a mess currently.
/// </remarks>
[HttpInstallAuthorize]
[AngularJsonOnlyConfiguration]
[Obsolete("This is only used for the legacy way of installing starter kits in the back office")]
public class InstallPackageController : ApiController
{
private readonly ApplicationContext _applicationContext;
public InstallPackageController()
: this(ApplicationContext.Current)
{
}
public InstallPackageController(ApplicationContext applicationContext)
{
_applicationContext = applicationContext;
}
private const string RepoGuid = "65194810-1f85-11dd-bd0b-0800200c9a66";
/// <summary>
/// Empty action, useful for retrieving the base url for this controller
/// </summary>
/// <returns></returns>
[HttpGet]
public HttpResponseMessage Index()
{
throw new NotImplementedException();
}
/// <summary>
/// Connects to the repo, downloads the package and creates the manifest
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
[HttpPost]
public HttpResponseMessage DownloadPackageFiles(InstallPackageModel model)
{
var repo = global::umbraco.cms.businesslogic.packager.repositories.Repository.getByGuid(RepoGuid);
if (repo == null)
{
return Json(
new {success = false, error = "No repository found with id " + RepoGuid},
HttpStatusCode.OK);
}
if (repo.HasConnection() == false)
{
return Json(
new { success = false, error = "cannot_connect" },
HttpStatusCode.OK);
}
var installer = new global::umbraco.cms.businesslogic.packager.Installer();
var tempFile = installer.Import(repo.fetch(model.KitGuid.ToString()));
installer.LoadConfig(tempFile);
var pId = installer.CreateManifest(tempFile, model.KitGuid.ToString(), RepoGuid);
return Json(new
{
success = true,
manifestId = pId,
packageFile = tempFile,
percentage = 10,
message = "Downloading starter kit files..."
}, HttpStatusCode.OK);
}
/// <summary>
/// Installs the files in the package
/// </summary>
/// <returns></returns>
[HttpPost]
public HttpResponseMessage InstallPackageFiles(InstallPackageModel model)
{
model.PackageFile = HttpUtility.UrlDecode(model.PackageFile);
var installer = new global::umbraco.cms.businesslogic.packager.Installer();
installer.LoadConfig(model.PackageFile);
installer.InstallFiles(model.ManifestId, model.PackageFile);
return Json(new
{
success = true,
model.ManifestId,
model.PackageFile,
percentage = 20,
message = "Installing starter kit files"
}, HttpStatusCode.OK);
}
/// <summary>
/// Ensures the app pool is restarted
/// </summary>
/// <returns></returns>
[HttpPost]
public HttpResponseMessage RestartAppPool()
{
_applicationContext.RestartApplicationPool(Request.TryGetHttpContext().Result);
return Json(new
{
success = true,
percentage = 25,
message = "Installing starter kit files"
}, HttpStatusCode.OK);
}
/// <summary>
/// Checks if the app pool has completed restarted
/// </summary>
/// <returns></returns>
[HttpPost]
public HttpResponseMessage CheckAppPoolRestart()
{
if (Request.TryGetHttpContext().Result.Application.AllKeys.Contains("AppPoolRestarting"))
{
return Request.CreateResponse(HttpStatusCode.BadRequest);
}
return Json(new
{
percentage = 30,
success = true,
}, HttpStatusCode.OK);
}
/// <summary>
/// Installs the business logic portion of the package after app restart
/// </summary>
/// <returns></returns>
[HttpPost]
public HttpResponseMessage InstallBusinessLogic(InstallPackageModel model)
{
model.PackageFile = HttpUtility.UrlDecode(model.PackageFile);
var installer = new global::umbraco.cms.businesslogic.packager.Installer();
installer.LoadConfig(model.PackageFile);
installer.InstallBusinessLogic(model.ManifestId, model.PackageFile);
return Json(new
{
success = true,
model.ManifestId,
model.PackageFile,
percentage = 70,
message = "Installing starter kit files"
}, HttpStatusCode.OK);
}
/// <summary>
/// Cleans up the package installation
/// </summary>
/// <returns></returns>
[HttpPost]
public HttpResponseMessage CleanupInstallation(InstallPackageModel model)
{
model.PackageFile = HttpUtility.UrlDecode(model.PackageFile);
var installer = new global::umbraco.cms.businesslogic.packager.Installer();
installer.LoadConfig(model.PackageFile);
installer.InstallCleanUp(model.ManifestId, model.PackageFile);
library.RefreshContent();
return Json(new
{
success = true,
model.ManifestId,
model.PackageFile,
percentage = 100,
message = "Starter kit has been installed"
}, HttpStatusCode.OK);
}
private HttpResponseMessage Json(object jsonObject, HttpStatusCode status)
{
var response = Request.CreateResponse(status);
var json = JObject.FromObject(jsonObject);
response.Content = new StringContent(json.ToString(), Encoding.UTF8, "application/json");
return response;
}
}
}
+46
View File
@@ -0,0 +1,46 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Umbraco.Core;
using Umbraco.Core.Persistence;
using Umbraco.Web.Install.Models;
namespace Umbraco.Web.Install
{
internal class DatabaseHelper
{
internal bool CheckConnection(DatabaseModel database, ApplicationContext applicationContext)
{
string connectionString;
var dbContext = applicationContext.DatabaseContext;
if (database.ConnectionString.IsNullOrWhiteSpace() == false)
{
connectionString = database.ConnectionString;
}
else if (database.DatabaseType == DatabaseType.SqlCe)
{
//we do not test this connection
return true;
//connectionString = dbContext.GetEmbeddedDatabaseConnectionString();
}
else if (database.IntegratedAuth)
{
connectionString = dbContext.GetIntegratedSecurityDatabaseConnectionString(
database.Server, database.DatabaseName);
}
else
{
string providerName;
connectionString = dbContext.GetDatabaseConnectionString(
database.Server, database.DatabaseName, database.Login, database.Password,
database.DatabaseType.ToString(),
out providerName);
}
return SqlExtensions.IsConnectionAvailable(connectionString);
}
}
}
@@ -0,0 +1,70 @@
using System;
using System.Web;
using System.Web.Http;
using System.Web.Http.Controllers;
using Umbraco.Core;
using Umbraco.Web.Security;
using umbraco.BasePages;
namespace Umbraco.Web.Install
{
/// <summary>
/// Ensures authorization occurs for the installer if it has already completed. If install has not yet occured
/// then the authorization is successful
/// </summary>
internal class HttpInstallAuthorizeAttribute : AuthorizeAttribute
{
private readonly ApplicationContext _applicationContext;
private readonly UmbracoContext _umbracoContext;
private ApplicationContext GetApplicationContext()
{
return _applicationContext ?? ApplicationContext.Current;
}
private UmbracoContext GetUmbracoContext()
{
return _umbracoContext ?? UmbracoContext.Current;
}
/// <summary>
/// THIS SHOULD BE ONLY USED FOR UNIT TESTS
/// </summary>
/// <param name="umbracoContext"></param>
public HttpInstallAuthorizeAttribute(UmbracoContext umbracoContext)
{
if (umbracoContext == null) throw new ArgumentNullException("umbracoContext");
_umbracoContext = umbracoContext;
_applicationContext = _umbracoContext.Application;
}
public HttpInstallAuthorizeAttribute()
{
}
protected override bool IsAuthorized(HttpActionContext actionContext)
{
try
{
//if its not configured then we can continue
if (GetApplicationContext().IsConfigured == false)
{
return true;
}
var umbCtx = GetUmbracoContext();
//otherwise we need to ensure that a user is logged in
var isLoggedIn = GetUmbracoContext().Security.ValidateCurrentUser();
if (isLoggedIn)
{
return true;
}
return false;
}
catch (Exception)
{
return false;
}
}
}
}
@@ -0,0 +1,88 @@
using System;
using System.Web;
using System.Web.Mvc;
using Umbraco.Core;
using Umbraco.Core.Configuration;
using Umbraco.Core.IO;
using Umbraco.Web.Security;
using umbraco.BasePages;
namespace Umbraco.Web.Install
{
/// <summary>
/// Ensures authorization occurs for the installer if it has already completed. If install has not yet occured
/// then the authorization is successful
/// </summary>
internal class InstallAuthorizeAttribute : AuthorizeAttribute
{
private readonly ApplicationContext _applicationContext;
private readonly UmbracoContext _umbracoContext;
private ApplicationContext GetApplicationContext()
{
return _applicationContext ?? ApplicationContext.Current;
}
private UmbracoContext GetUmbracoContext()
{
return _umbracoContext ?? UmbracoContext.Current;
}
/// <summary>
/// THIS SHOULD BE ONLY USED FOR UNIT TESTS
/// </summary>
/// <param name="umbracoContext"></param>
public InstallAuthorizeAttribute(UmbracoContext umbracoContext)
{
if (umbracoContext == null) throw new ArgumentNullException("umbracoContext");
_umbracoContext = umbracoContext;
_applicationContext = _umbracoContext.Application;
}
public InstallAuthorizeAttribute()
{
}
/// <summary>
/// Ensures that the user must be logged in or that the application is not configured just yet.
/// </summary>
/// <param name="httpContext"></param>
/// <returns></returns>
protected override bool AuthorizeCore(HttpContextBase httpContext)
{
if (httpContext == null) throw new ArgumentNullException("httpContext");
try
{
//if its not configured then we can continue
if (!GetApplicationContext().IsConfigured)
{
return true;
}
var umbCtx = GetUmbracoContext();
//otherwise we need to ensure that a user is logged in
var isLoggedIn = GetUmbracoContext().Security.ValidateCurrentUser();
if (isLoggedIn)
{
return true;
}
return false;
}
catch (Exception)
{
return false;
}
}
/// <summary>
/// Override to redirect instead of throwing an exception
/// </summary>
/// <param name="filterContext"></param>
protected override void HandleUnauthorizedRequest(AuthorizationContext filterContext)
{
filterContext.Result = new RedirectResult(SystemDirectories.Umbraco.EnsureEndsWith('/'));
}
}
}

Some files were not shown because too many files have changed in this diff Show More