Removes booting.aspx and creates embedded html pages for booting and failed (if those are ever seen ), renames some classes and namespaces, removes old cdf bundle classes

This commit is contained in:
Shannon
2019-01-29 23:05:59 +11:00
parent e7b0e43d98
commit eef86689c8
54 changed files with 383 additions and 376 deletions

View File

@@ -9,7 +9,6 @@ using Umbraco.Core.Cache;
using Umbraco.Core.Composing;
using Umbraco.Core.Logging;
using Umbraco.Core.Models;
using Umbraco.Core.Profiling;
using Umbraco.Core.PropertyEditors;
using Umbraco.Core.Services;
using Umbraco.Tests.TestHelpers;

View File

@@ -1,7 +1,6 @@
using System.Collections.Generic;
using System.Web.Mvc;
using NUnit.Framework;
using Umbraco.Core.Profiling;
using Umbraco.Web.Mvc;
using Umbraco.Web.Runtime;

View File

@@ -1,7 +1,7 @@
using System.Linq;
using NUnit.Framework;
using Umbraco.Core;
using Umbraco.Web.UI.JavaScript;
using Umbraco.Web.JavaScript;
namespace Umbraco.Tests.Web.AngularIntegration
{

View File

@@ -1,7 +1,7 @@
using System.Collections.Generic;
using NUnit.Framework;
using Umbraco.Web.UI.JavaScript;
using Umbraco.Core;
using Umbraco.Web.JavaScript;
namespace Umbraco.Tests.Web.AngularIntegration
{

View File

@@ -12,7 +12,6 @@ using Umbraco.Core.Cache;
using Umbraco.Core.Composing;
using Umbraco.Core.Configuration.UmbracoSettings;
using Umbraco.Core.Logging;
using Umbraco.Core.Profiling;
using Umbraco.Core.Services;
using Umbraco.Tests.TestHelpers;
using Umbraco.Tests.TestHelpers.Stubs;

View File

@@ -162,7 +162,6 @@
<Content Include="Config\Lang\ru-RU.user.xml" />
<Content Include="Config\Lang\sv-SE.user.xml" />
<Content Include="Config\Lang\zh-CN.user.xml" />
<Content Include="Config\splashes\booting.aspx" />
<Content Include="Config\splashes\noNodes.aspx" />
<Content Include="Umbraco\Config\Lang\cs.xml" />
<Content Include="Umbraco\Config\Lang\tr.xml" />

View File

@@ -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="1" fileDependencyExtensions=".js,.css" loggerType="Umbraco.Web.UI.CdfLogger, Umbraco.Web">
<clientDependency version="1" fileDependencyExtensions=".js,.css" loggerType="Umbraco.Web.CdfLogger, Umbraco.Web">
<!--
This section is used for Web Forms only, the enableCompositeFiles="true" is optional and by default is set to true.

View File

@@ -1,29 +0,0 @@
<%@ Page Language="C#" AutoEventWireup="true" Inherits="System.Web.UI.Page" %>
<%@ Import Namespace="System.Web.Mvc" %>
<%@ Import Namespace="Umbraco.Web.Mvc" %>
<%
var urlHelper = new UrlHelper(Request.RequestContext);
// NH: Adds this inline check to avoid a simple codebehind file in the legacy project!
if (Request["url"].ToLower().Contains("booting.aspx") || urlHelper.ValidateProxyUrl(Request["url"], Request.Url.AbsoluteUri) == false)
{
throw new ArgumentException("Can't redirect to the requested url - it's not local or an approved proxy url", "url");
}
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>The website is restarting</title>
<meta http-equiv="REFRESH" content="10; URL=<%=Request["url"] %>">
</head>
<body>
<h1>The website is restarting</h1>
<p>Please wait for 10s while we prepare to serve the page you have requested...</p>
<p style="border-top: 1px solid #ccc; padding-top: 10px;">
<small>You can modify the design of this page by editing /config/splashes/booting.aspx</small>
</p>
</body>
</html>

View File

@@ -4,7 +4,7 @@ using Umbraco.Web.Composing;
using ICdfLogger = ClientDependency.Core.Logging.ILogger;
using ICoreLogger = Umbraco.Core.Logging.ILogger;
namespace Umbraco.Web.UI
namespace Umbraco.Web
{
/// <summary>
/// A logger for ClientDependency

View File

@@ -1,23 +1,24 @@
using System;
using Umbraco.Core.Components;
using Umbraco.Core.Composing;
using Current = Umbraco.Web.Composing.Current;
using Umbraco.Web.Actions;
using Umbraco.Web.ContentApps;
using Umbraco.Web.Dashboards;
using Umbraco.Web.Editors;
using Umbraco.Web.HealthCheck;
using Umbraco.Web.Mvc;
using Umbraco.Web.PublishedCache;
using Umbraco.Web.Routing;
using Umbraco.Web.ContentApps;
using Umbraco.Web.Tour;
using Umbraco.Web.Trees;
using Umbraco.Web.Dashboards;
using Current = Umbraco.Web.Composing.Current;
// the namespace here is intentional - although defined in Umbraco.Web assembly,
// this class should be visible when using Umbraco.Core.Components, alongside
// Umbraco.Core's own CompositionExtensions class
// ReSharper disable once CheckNamespace
namespace Umbraco.Core.Components
namespace Umbraco.Web
{
/// <summary>
/// Provides extension methods to the <see cref="Composition"/> class.

View File

@@ -21,10 +21,10 @@ using Umbraco.Core.Manifest;
using Umbraco.Core.Models.Identity;
using Umbraco.Web.Models;
using Umbraco.Web.Mvc;
using Umbraco.Web.UI.JavaScript;
using Umbraco.Core.Services;
using Umbraco.Web.Composing;
using Umbraco.Web.Features;
using Umbraco.Web.JavaScript;
using Umbraco.Web.Security;
using Constants = Umbraco.Core.Constants;
using JArray = Newtonsoft.Json.Linq.JArray;

View File

@@ -22,12 +22,9 @@ using Umbraco.Core.Packaging;
using Umbraco.Core.Persistence;
using Umbraco.Core.PropertyEditors;
using Umbraco.Core.Services;
using Umbraco.Core.Services.Implement;
using Umbraco.Web.Composing;
using Umbraco.Web.Models;
using Umbraco.Web.Models.ContentEditing;
using Umbraco.Web.Mvc;
using Umbraco.Web.UI;
using Umbraco.Web.WebApi;
using Umbraco.Web.WebApi.Filters;
using Constants = Umbraco.Core.Constants;
@@ -573,7 +570,7 @@ namespace Umbraco.Web.Editors
model.Notifications.Add(new Notification(
Services.TextService.Localize("speechBubbles/operationFailedHeader"),
Services.TextService.Localize("media/disallowedFileType"),
SpeechBubbleIcon.Warning));
NotificationStyle.Warning));
}
return model;

View File

@@ -8,7 +8,6 @@ using AutoMapper;
using Umbraco.Core.Models;
using Umbraco.Web.Models.ContentEditing;
using Umbraco.Web.Mvc;
using Umbraco.Web.UI;
using Umbraco.Web.WebApi;
using Umbraco.Web.WebApi.Filters;
using Constants = Umbraco.Core.Constants;
@@ -172,7 +171,7 @@ namespace Umbraco.Web.Editors
model.Notifications.Add(new Notification(
Services.TextService.Localize("speechBubbles/dictionaryItemSaved", userCulture), string.Empty,
SpeechBubbleIcon.Success));
NotificationStyle.Success));
return model;
}

View File

@@ -1,27 +1,24 @@
using Umbraco.Core.Services;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using Umbraco.Core;
using Umbraco.Core.IO;
using Umbraco.Core.Logging;
using Umbraco.Core.Models;
using Umbraco.Web.Composing;
using Umbraco.Web.Models.ContentEditing;
using Umbraco.Web.Mvc;
using Umbraco.Web.WebApi;
using Umbraco.Web.WebApi.Filters;
using Constants = Umbraco.Core.Constants;
namespace Umbraco.Web.Editors
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using Umbraco.Core;
using Umbraco.Core.IO;
using Umbraco.Core.Logging;
using Umbraco.Core.Models;
using Umbraco.Web.Composing;
using Umbraco.Web.Models.ContentEditing;
using Umbraco.Web.Mvc;
using Umbraco.Web.UI;
using Umbraco.Web.WebApi;
using Umbraco.Web.WebApi.Filters;
using Constants = Umbraco.Core.Constants;
{
/// <summary>
/// The API controller used for editing dictionary items
@@ -182,7 +179,7 @@ namespace Umbraco.Web.Editors
macroDisplay.Notifications.Clear();
macroDisplay.Notifications.Add(new Models.ContentEditing.Notification("Success", "Macro saved", SpeechBubbleIcon.Success));
macroDisplay.Notifications.Add(new Models.ContentEditing.Notification("Success", "Macro saved", NotificationStyle.Success));
return this.Request.CreateResponse(HttpStatusCode.OK, macroDisplay);
}

View File

@@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using System.Net;
using System.Net.Http;
@@ -18,7 +17,6 @@ using Umbraco.Core.Models.Membership;
using Umbraco.Core.Persistence.DatabaseModelDefinitions;
using Umbraco.Core.Services;
using Umbraco.Web.Models.ContentEditing;
using Umbraco.Web.Models.Mapping;
using Umbraco.Web.Mvc;
using Umbraco.Web.WebApi;
using System.Linq;
@@ -26,9 +24,7 @@ using System.Web.Http.Controllers;
using Umbraco.Core.Composing;
using Umbraco.Web.WebApi.Filters;
using Constants = Umbraco.Core.Constants;
using Umbraco.Core.Configuration;
using Umbraco.Core.Persistence.Querying;
using Umbraco.Web.UI;
using Notification = Umbraco.Web.Models.ContentEditing.Notification;
using Umbraco.Core.Persistence;
using Umbraco.Core.Configuration.UmbracoSettings;
@@ -432,7 +428,7 @@ namespace Umbraco.Web.Editors
if (sourceParentID == destinationParentID)
{
return Request.CreateValidationErrorResponse(new SimpleNotificationModel(new Notification("",Services.TextService.Localize("media/moveToSameFolderFailed"),SpeechBubbleIcon.Error)));
return Request.CreateValidationErrorResponse(new SimpleNotificationModel(new Notification("",Services.TextService.Localize("media/moveToSameFolderFailed"),NotificationStyle.Error)));
}
if (moveResult == false)
{
@@ -752,7 +748,7 @@ namespace Umbraco.Web.Editors
tempFiles.Notifications.Add(new Notification(
Services.TextService.Localize("speechBubbles/operationFailedHeader"),
Services.TextService.Localize("media/disallowedFileType"),
SpeechBubbleIcon.Warning));
NotificationStyle.Warning));
}
}
@@ -844,7 +840,7 @@ namespace Umbraco.Web.Editors
new SimpleNotificationModel(new Notification(
Services.TextService.Localize("speechBubbles/operationFailedHeader"),
Services.TextService.Localize("speechBubbles/invalidUserPermissionsText"),
SpeechBubbleIcon.Warning))));
NotificationStyle.Warning))));
}
return intParentId;

View File

@@ -1,39 +1,29 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Threading.Tasks;
using System.Web.Http;
using System.Xml;
using System.Xml.Linq;
using Semver;
using Umbraco.Core;
using Umbraco.Core.Cache;
using Umbraco.Core.Configuration;
using Umbraco.Core.Events;
using Umbraco.Core.IO;
using Umbraco.Core.Logging;
using Umbraco.Core.Models;
using Umbraco.Core.Models.Editors;
using Umbraco.Core.Models.Packaging;
using Umbraco.Core.Packaging;
using Umbraco.Core.Persistence;
using Umbraco.Core.Services;
using Umbraco.Core.Services.Implement;
using Umbraco.Web.Composing;
using Umbraco.Web.JavaScript;
using Umbraco.Web.Models;
using Umbraco.Web.Models.ContentEditing;
using Umbraco.Web.Mvc;
using Umbraco.Web.UI;
using Umbraco.Web.UI.JavaScript;
using Umbraco.Web.WebApi;
using Umbraco.Web.WebApi.Filters;
using File = System.IO.File;
using Notification = Umbraco.Web.Models.ContentEditing.Notification;
using Version = System.Version;
namespace Umbraco.Web.Editors
{
@@ -200,7 +190,7 @@ namespace Umbraco.Web.Editors
model.Notifications.Add(new Notification(
Services.TextService.Localize("speechBubbles/operationFailedHeader"),
Services.TextService.Localize("media/disallowedFileType"),
SpeechBubbleIcon.Warning));
NotificationStyle.Warning));
}
}

View File

@@ -6,10 +6,10 @@ using Umbraco.Core;
using Umbraco.Core.Configuration;
using Umbraco.Web.Composing;
using Umbraco.Web.Features;
using Umbraco.Web.JavaScript;
using Umbraco.Web.Models.ContentEditing;
using Umbraco.Web.Mvc;
using Umbraco.Web.PublishedCache;
using Umbraco.Web.UI.JavaScript;
using Constants = Umbraco.Core.Constants;
namespace Umbraco.Web.Editors

View File

@@ -5,8 +5,8 @@ using Umbraco.Core.Configuration;
using Umbraco.Core.IO;
using Umbraco.Core.Logging;
using Umbraco.Core.Migrations.Install;
using Umbraco.Web.JavaScript;
using Umbraco.Web.Security;
using Umbraco.Web.UI.JavaScript;
namespace Umbraco.Web.Install.Controllers
{

View File

@@ -8,7 +8,7 @@ using ClientDependency.Core.Config;
using Umbraco.Web.Composing;
using Umbraco.Web.PropertyEditors;
namespace Umbraco.Web.UI.JavaScript
namespace Umbraco.Web.JavaScript
{
internal abstract class AssetInitialization
{

View File

@@ -12,7 +12,7 @@ using Semver;
using Umbraco.Core.IO;
using Umbraco.Core.Logging;
namespace Umbraco.Web.UI.JavaScript
namespace Umbraco.Web.JavaScript
{
/// <summary>
/// A utility class for working with CDF config and cache files - use sparingly!

View File

@@ -1,12 +1,12 @@
using System.Web;
using ClientDependency.Core;
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using ClientDependency.Core;
using Umbraco.Core.Manifest;
namespace Umbraco.Web.UI.JavaScript
namespace Umbraco.Web.JavaScript
{
internal class CssInitialization : AssetInitialization
{

View File

@@ -3,7 +3,7 @@ using System.Web;
using ClientDependency.Core;
using ClientDependency.Core.FileRegistration.Providers;
namespace Umbraco.Web.UI.JavaScript
namespace Umbraco.Web.JavaScript
{
/// <summary>
/// A custom renderer that only outputs a dependency path instead of script tags - for use with the js loader with yepnope

View File

@@ -1,4 +1,6 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Web;
using ClientDependency.Core;
@@ -6,10 +8,8 @@ using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Umbraco.Core.IO;
using Umbraco.Core.Manifest;
using System.Linq;
using System.Text;
namespace Umbraco.Web.UI.JavaScript
namespace Umbraco.Web.JavaScript
{
/// <summary>
/// Reads from all defined manifests and ensures that any of their initialization is output with the

View File

@@ -8,11 +8,10 @@
// </auto-generated>
//------------------------------------------------------------------------------
namespace Umbraco.Web.UI.JavaScript
{
namespace Umbraco.Web.JavaScript {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
@@ -23,62 +22,55 @@ namespace Umbraco.Web.UI.JavaScript
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources
{
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources()
{
internal Resources() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager
{
get
{
if (object.ReferenceEquals(resourceMan, null))
{
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Umbraco.Web.UI.JavaScript.Resources", typeof(Resources).Assembly);
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Umbraco.Web.JavaScript.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture
{
get
{
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set
{
set {
resourceCulture = value;
}
}
/// <summary>
/// Looks up a localized string similar to [
/// &apos;lib/jquery/jquery.min.js&apos;,
/// &apos;lib/jquery-ui/jquery-ui.min.js&apos;,
/// &apos;lib/jquery-ui-touch-punch/jquery.ui.touch-punch.js&apos;,
/// &apos;lib/jquery-ui-touch-punch/jquery.ui.touch-punch.min.js&apos;,
///
/// &apos;lib/angular/angular.js&apos;,
/// &apos;lib/underscore/underscore-min.js&apos;,
///
/// &apos;lib/moment/moment.min.js&apos;,
/// &apos;lib/flatpickr/flatpickr.js&apos;,
///
/// &apos;lib/animejs/anime.min.js&apos;,
///
@@ -86,38 +78,35 @@ namespace Umbraco.Web.UI.JavaScript
/// &apos;lib/angular-cookies/angular-cookies.js&apos;,
/// &apos;lib/angular-touch/angular-touch.js&apos;,
/// &apos;lib/angular-sanitize/angular-sanitize.js&apos;,
/// &apos;lib/angular-animate/angular-animate.js&apos;,
/// [rest of string was truncated]&quot;;.
/// &apos;lib/an [rest of string was truncated]&quot;;.
/// </summary>
internal static string JsInitialize
{
get
{
internal static string JsInitialize {
get {
return ResourceManager.GetString("JsInitialize", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to LazyLoad.js(&quot;##JsInitialize##&quot;, function () {
/// //we need to set the legacy UmbClientMgr path
/// UmbClientMgr.setUmbracoPath(&apos;&quot;##UmbracoPath##&quot;&apos;);
/// if ((typeof UmbClientMgr) !== &quot;undefined&quot;) {
/// UmbClientMgr.setUmbracoPath(&apos;&quot;##UmbracoPath##&quot;&apos;);
/// }
///
/// jQuery(document).ready(function () {
///
/// angular.bootstrap(document, [&apos;##AngularModule##&apos;]);
/// angular.bootstrap(document, [&apos;&quot;##AngularModule##&quot;&apos;]);
///
/// });
///});
///.
/// </summary>
internal static string Main
{
get
{
internal static string Main {
get {
return ResourceManager.GetString("Main", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to [
/// &apos;../lib/jquery/jquery.min.js&apos;,
@@ -131,18 +120,16 @@ namespace Umbraco.Web.UI.JavaScript
/// &apos;../ServerVariables&apos;,
/// &apos;../lib/signalr/jquery.signalR.js&apos;,
/// &apos;../BackOffice/signalr/hubs&apos;,
/// &apos;../js/umbraco.canvasdesigner.js&apos;
/// &apos;../js/umbraco.preview.js&apos;
///]
///.
/// </summary>
internal static string PreviewInitialize
{
get
{
internal static string PreviewInitialize {
get {
return ResourceManager.GetString("PreviewInitialize", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to // TODO: This would be nicer as an angular module so it can be injected into stuff... that&apos;d be heaps nicer, but
///// how to do that when this is not a regular JS file, it is a server side JS file and RequireJS seems to only want
@@ -154,10 +141,8 @@ namespace Umbraco.Web.UI.JavaScript
/////define a global static object
///Umbraco.Sys.ServerVariables = ##Variables## ;.
/// </summary>
internal static string ServerVariables
{
get
{
internal static string ServerVariables {
get {
return ResourceManager.GetString("ServerVariables", resourceCulture);
}
}

View File

@@ -2,7 +2,7 @@
using System.Collections.Generic;
using Newtonsoft.Json.Linq;
namespace Umbraco.Web.UI.JavaScript
namespace Umbraco.Web.JavaScript
{
public sealed class ServerVariablesParser
{

View File

@@ -3,7 +3,7 @@ using ClientDependency.Core.Controls;
using ClientDependency.Core.FileRegistration.Providers;
using Umbraco.Core.IO;
namespace Umbraco.Web.UI.JavaScript
namespace Umbraco.Web.JavaScript
{
/// <summary>
/// Used to load in all client dependencies for Umbraco.

View File

@@ -1,10 +1,9 @@
using Umbraco.Web.UI;

namespace Umbraco.Web.Models.ContentEditing
{
public static class MessagesExtensions
{
public static void AddNotification(this INotificationModel model, string header, string msg, SpeechBubbleIcon type)
public static void AddNotification(this INotificationModel model, string header, string msg, NotificationStyle type)
{
model.Notifications.Add(new Notification()
{
@@ -20,7 +19,7 @@ namespace Umbraco.Web.Models.ContentEditing
{
Header = header,
Message = msg,
NotificationType = SpeechBubbleIcon.Success
NotificationType = NotificationStyle.Success
});
}
@@ -30,7 +29,7 @@ namespace Umbraco.Web.Models.ContentEditing
{
Header = header,
Message = msg,
NotificationType = SpeechBubbleIcon.Error
NotificationType = NotificationStyle.Error
});
}
@@ -40,7 +39,7 @@ namespace Umbraco.Web.Models.ContentEditing
{
Header = header,
Message = msg,
NotificationType = SpeechBubbleIcon.Warning
NotificationType = NotificationStyle.Warning
});
}
@@ -50,7 +49,7 @@ namespace Umbraco.Web.Models.ContentEditing
{
Header = header,
Message = msg,
NotificationType = SpeechBubbleIcon.Info
NotificationType = NotificationStyle.Info
});
}
}

View File

@@ -1,5 +1,4 @@
using System.Runtime.Serialization;
using Umbraco.Web.UI;
namespace Umbraco.Web.Models.ContentEditing
{
@@ -11,7 +10,7 @@ namespace Umbraco.Web.Models.ContentEditing
}
public Notification(string header, string message, SpeechBubbleIcon notificationType)
public Notification(string header, string message, NotificationStyle notificationType)
{
Header = header;
Message = message;
@@ -25,7 +24,7 @@ namespace Umbraco.Web.Models.ContentEditing
public string Message { get; set; }
[DataMember(Name = "type")]
public SpeechBubbleIcon NotificationType { get; set; }
public NotificationStyle NotificationType { get; set; }
}
}

View File

@@ -1,11 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Umbraco.Web.UI
namespace Umbraco.Web.Models.ContentEditing
{
public enum SpeechBubbleIcon
public enum NotificationStyle
{
/// <summary>
/// Save icon

View File

@@ -1,10 +1,8 @@
using System.IO;
using System.Web.Mvc;
using Umbraco.Core.Logging;
using Umbraco.Web;
using Umbraco.Web.Composing;
namespace Umbraco.Core.Profiling
namespace Umbraco.Web.Mvc
{
public class ProfilingView : IView
{

View File

@@ -1,9 +1,7 @@
using System.Web.Mvc;
using Umbraco.Core.Logging;
using Umbraco.Web;
using Umbraco.Web.Composing;
namespace Umbraco.Core.Profiling
namespace Umbraco.Web.Mvc
{
public class ProfilingViewEngine: IViewEngine
{

View File

@@ -5,7 +5,6 @@ using System.Web.Mvc;
using System.Web.Routing;
using Umbraco.Core;
using Umbraco.Core.Logging;
using Umbraco.Core.Profiling;
using Umbraco.Web.Composing;
namespace Umbraco.Web.Mvc

View File

@@ -1,72 +0,0 @@
using System;
using System.Web.Mvc;
using Umbraco.Core;
using Umbraco.Core.Configuration;
using Umbraco.Core.IO;
using Umbraco.Core.Xml;
namespace Umbraco.Web.Mvc
{
/// <summary>
/// Extension methods for UrlHelper
/// </summary>
public static class UrlHelperExtensions
{
/// <summary>
/// Utility method for checking for valid proxy urls or redirect urls to prevent Open Redirect security issues
/// </summary>
/// <param name="urlHelper"></param>
/// <param name="url">The url to validate</param>
/// <param name="callerUrl">The url of the current local domain (to ensure we can validate if the requested url is local without dependency on the request)</param>
/// <returns>True if it's an allowed url</returns>
[Obsolete("This looks OLD & unused", true)]
public static bool ValidateProxyUrl(this UrlHelper urlHelper, string url, string callerUrl)
{
if (Uri.IsWellFormedUriString(url, UriKind.RelativeOrAbsolute) == false)
{
return false;
}
if (url.StartsWith("//"))
return false;
Uri requestUri;
if (Uri.TryCreate(url, UriKind.RelativeOrAbsolute, out requestUri))
{
if (string.IsNullOrEmpty(callerUrl) == false)
{
Uri localUri;
if (Uri.TryCreate(callerUrl, UriKind.RelativeOrAbsolute, out localUri))
{
// check for local urls
//Cannot start with // since that is not a local url
if (requestUri.OriginalString.StartsWith("//") == false
//cannot be non-absolute and also contain the char : since that will indicate a protocol
&& (requestUri.IsAbsoluteUri == false && requestUri.OriginalString.Contains(":") == false)
//needs to be non-absolute or the hosts must match the current request
&& (requestUri.IsAbsoluteUri == false || requestUri.Host == localUri.Host))
{
return true;
}
}
else
{
return false;
}
}
//we cannot continue if the url is not absolute
if (requestUri.IsAbsoluteUri == false)
{
return false;
}
}
else
{
return false;
}
return false;
}
}
}

View File

@@ -3,7 +3,6 @@ using System.Collections.Generic;
using System.Linq;
using Umbraco.Core.Cache;
using Umbraco.Core.Components;
using Umbraco.Core.Configuration;
using Umbraco.Core.Configuration.UmbracoSettings;
using Umbraco.Core.Events;
using Umbraco.Core.Models;
@@ -13,7 +12,7 @@ using Umbraco.Core.Sync;
using Umbraco.Web.Cache;
using Umbraco.Web.Composing;
namespace Umbraco.Web.Redirects
namespace Umbraco.Web.Routing
{
/// Implements an Application Event Handler for managing redirect urls tracking.
/// <para>when content is renamed or moved, we want to create a permanent 301 redirect from it's old url</para>

View File

@@ -1,7 +1,7 @@
using Umbraco.Core;
using Umbraco.Core.Components;
namespace Umbraco.Web.Redirects
namespace Umbraco.Web.Routing
{
/// <summary>
/// Implements an Application Event Handler for managing redirect urls tracking.

View File

@@ -0,0 +1,9 @@
<html>
<head>
<title>The website is restarting</title>
</head>
<body>
<h1>The website is restarting</h1>
<p>Please wait while we prepare to serve the page you have requested...</p>
</body>
</html>

View File

@@ -0,0 +1,8 @@
<html>
<head>
<title>The website cannot start</title>
</head>
<body>
<h1>The website failed to start :(</h1>
</body>
</html>

View File

@@ -0,0 +1,99 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Umbraco.Web.Routing.Resources {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class HtmlPages {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal HtmlPages() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Umbraco.Web.Routing.Resources.HtmlPages", typeof(HtmlPages).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// Looks up a localized string similar to &lt;html&gt;
///&lt;head&gt;
/// &lt;title&gt;The website is restarting&lt;/title&gt;
///&lt;/head&gt;
///&lt;body&gt;
/// &lt;h1&gt;The website is restarting&lt;/h1&gt;
/// &lt;p&gt;Please wait while we prepare to serve the page you have requested...&lt;/p&gt;
///&lt;/body&gt;
///&lt;/html&gt;
///.
/// </summary>
internal static string Booting {
get {
return ResourceManager.GetString("Booting", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to &lt;html&gt;
///&lt;head&gt;
/// &lt;title&gt;The website is restarting&lt;/title&gt;
///&lt;/head&gt;
///&lt;body&gt;
/// &lt;h1&gt;The website is restarting&lt;/h1&gt;
/// &lt;p&gt;Please wait while we prepare to serve the page you have requested...&lt;/p&gt;
///&lt;/body&gt;
///&lt;/html&gt;
///.
/// </summary>
internal static string Failed {
get {
return ResourceManager.GetString("Failed", resourceCulture);
}
}
}
}

View File

@@ -0,0 +1,127 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="Booting" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>booting.html;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
</data>
<data name="Failed" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>failed.html;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
</data>
</root>

View File

@@ -19,16 +19,15 @@ using Umbraco.Core.Configuration;
using Umbraco.Core.Configuration.UmbracoSettings;
using Umbraco.Core.IO;
using Umbraco.Core.Models.PublishedContent;
using Umbraco.Core.Profiling;
using Umbraco.Core.Services;
using Umbraco.Web.Install;
using Umbraco.Web.JavaScript;
using Umbraco.Web.Models.Trees;
using Umbraco.Web.Mvc;
using Umbraco.Web.PublishedCache;
using Umbraco.Web.Routing;
using Umbraco.Web.Security;
using Umbraco.Web.Trees;
using Umbraco.Web.UI.JavaScript;
using Umbraco.Web.WebApi;
using Current = Umbraco.Web.Composing.Current;

View File

@@ -1,13 +0,0 @@
using System.Web.UI;
using ClientDependency.Core;
namespace Umbraco.Web.UI.Bundles
{
/// <summary>
/// The core libs that have no dependencies
/// </summary>
[ClientDependency(ClientDependencyType.Javascript, "lib/umbraco/NamespaceManager.js", "UmbracoRoot", Priority = 0, Group = 0)]
public class JsApplicationLib : Control
{
}
}

View File

@@ -1,14 +0,0 @@
using System.Web.UI;
using ClientDependency.Core;
namespace Umbraco.Web.UI.Bundles
{
/// <summary>
/// The core Jquery libs
/// </summary>
[ClientDependency(ClientDependencyType.Javascript, "lib/jquery/jquery.min.js", "UmbracoRoot", Priority = 1, Group = 1)]
[ClientDependency(ClientDependencyType.Javascript, "lib/jquery-migrate/jquery-migrate.min.js", "UmbracoRoot", Priority = 2, Group = 1)]
public class JsJQueryCore : Control
{
}
}

View File

@@ -1,15 +0,0 @@
using System.Web.UI;
using ClientDependency.Core;
namespace Umbraco.Web.UI.Bundles
{
/// <summary>
/// The core Jquery libs
/// </summary>
[ClientDependency(ClientDependencyType.Javascript, "modal/jquery.simplemodal.1.4.1.custom.js", "UmbracoClient", Priority = 2, Group = 4)]
[ClientDependency(ClientDependencyType.Javascript, "Application/jQuery/jquery.cookie.js", "UmbracoClient", Priority = 3, Group = 4)]
[ClientDependency(ClientDependencyType.Javascript, "Application/JQuery/jquery.metadata.min.js", "UmbracoClient", Priority = 4, Group = 4)]
[ClientDependency(ClientDependencyType.Javascript, "Application/jQuery/jquery.hotkeys.js", "UmbracoClient", Priority = 5, Group = 4)]
public class JsJQueryPlugins : Control
{
}
}

View File

@@ -1,13 +0,0 @@
using System.Web.UI;
using ClientDependency.Core;
namespace Umbraco.Web.UI.Bundles
{
/// <summary>
/// The core libs that require JQuery to be loaded
/// </summary>
[ClientDependency(ClientDependencyType.Javascript, "lib/umbraco/LegacyUmbClientMgr.js", "UmbracoRoot", Priority = 1, Group = 2)]
public class JsUmbracoApplicationCore : Control
{
}
}

View File

@@ -1,14 +0,0 @@
using System.Web.UI;
using ClientDependency.Core;
namespace Umbraco.Web.UI.Bundles
{
/// <summary>
/// The UI Umbraco libs
/// </summary>
[ClientDependency(ClientDependencyType.Javascript, "js/guiFunctions.js", "UmbracoRoot", Priority = 1, Group = 5)]
[ClientDependency(ClientDependencyType.Javascript, "js/UmbracoSpeechBubbleBackend.js", "UmbracoRoot", Priority = 3, Group = 5)]
public class JsUmbracoApplicationUI : Control
{
}
}

View File

@@ -1,18 +0,0 @@
using System.Web.UI;
using ClientDependency.Core;
namespace Umbraco.Web.UI.Bundles
{
/// <summary>
/// The umb tree libs
/// </summary>
[ClientDependency(ClientDependencyType.Javascript, "Tree/jquery.tree.js", "UmbracoClient", Priority = 0, Group = 10)]
[ClientDependency(ClientDependencyType.Javascript, "Tree/UmbracoContext.js", "UmbracoClient", Priority = 1, Group = 10)]
[ClientDependency(ClientDependencyType.Javascript, "Tree/jquery.tree.contextmenu.js", "UmbracoClient", Priority = 2, Group = 10)]
[ClientDependency(ClientDependencyType.Javascript, "Tree/jquery.tree.checkbox.js", "UmbracoClient", Priority = 3, Group = 10)]
[ClientDependency(ClientDependencyType.Javascript, "Tree/NodeDefinition.js", "UmbracoClient", Priority = 4, Group = 10)]
[ClientDependency(ClientDependencyType.Javascript, "Tree/UmbracoTree.js", "UmbracoClient", Priority = 5, Group = 10)]
public class JsUmbracoTree : Control
{
}
}

View File

@@ -182,6 +182,11 @@
<Compile Include="Models\ContentEditing\LinkDisplay.cs" />
<Compile Include="Models\ContentEditing\MacroDisplay.cs" />
<Compile Include="Models\ContentEditing\MacroParameterDisplay.cs" />
<Compile Include="Routing\Resources\HtmlPages.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>HtmlPages.resx</DependentUpon>
</Compile>
<Compile Include="Services\DashboardService.cs" />
<Compile Include="Services\IDashboardService.cs" />
<Compile Include="Models\Link.cs" />
@@ -259,7 +264,7 @@
<Compile Include="Trees\LegacyTreeDataConverter.cs" />
<Compile Include="Trees\FilesTreeController.cs" />
<Compile Include="Trees\TreeCollection.cs" />
<Compile Include="UI\JavaScript\ClientDependencyConfiguration.cs" />
<Compile Include="JavaScript\ClientDependencyConfiguration.cs" />
<Compile Include="Editors\Binders\BlueprintItemBinder.cs" />
<Compile Include="UmbracoApplicationBase.cs" />
<Compile Include="WebApi\HttpActionContextExtensions.cs" />
@@ -577,9 +582,6 @@
<Compile Include="Trees\DictionaryTreeController.cs" />
<Compile Include="Trees\StylesheetsTreeController.cs" />
<Compile Include="Trees\UserTreeController.cs" />
<Compile Include="UI\Bundles\JsApplicationLib.cs" />
<Compile Include="UI\Bundles\JsJQueryPlugins.cs" />
<Compile Include="UI\Bundles\JsUmbracoApplicationCore.cs" />
<Compile Include="UmbracoModule.cs" />
<Compile Include="WebApi\EnableDetailedErrorsAttribute.cs" />
<Compile Include="WebApi\Filters\AppendUserModifiedHeaderAttribute.cs" />
@@ -679,7 +681,7 @@
<Compile Include="Trees\MediaTypeTreeController.cs" />
<Compile Include="Trees\MemberTypeTreeController.cs" />
<Compile Include="Security\WebAuthExtensions.cs" />
<Compile Include="UI\JavaScript\UmbracoClientDependencyLoader.cs" />
<Compile Include="JavaScript\UmbracoClientDependencyLoader.cs" />
<Compile Include="UmbracoDefaultOwinStartup.cs" />
<Compile Include="IUmbracoContextAccessor.cs" />
<Compile Include="HtmlStringUtilities.cs" />
@@ -691,7 +693,6 @@
<Compile Include="Scheduling\ThreadingTaskImmutable.cs" />
<Compile Include="Mvc\ProfilingView.cs" />
<Compile Include="Mvc\ProfilingViewEngine.cs" />
<Compile Include="Mvc\UrlHelperExtensions.cs" />
<Compile Include="Scheduling\BackgroundTaskRunner.cs" />
<Compile Include="BatchedDatabaseServerMessenger.cs" />
<Compile Include="CacheHelperExtensions.cs" />
@@ -892,9 +893,9 @@
<Compile Include="Models\Trees\MenuItemList.cs" />
<Compile Include="Trees\TemplatesTreeController.cs" />
<Compile Include="Trees\TreeControllerBase.cs" />
<Compile Include="UI\JavaScript\AssetInitialization.cs" />
<Compile Include="UI\JavaScript\CssInitialization.cs" />
<Compile Include="UI\JavaScript\DependencyPathRenderer.cs" />
<Compile Include="JavaScript\AssetInitialization.cs" />
<Compile Include="JavaScript\CssInitialization.cs" />
<Compile Include="JavaScript\DependencyPathRenderer.cs" />
<Compile Include="UmbracoComponentRenderer.cs" />
<Compile Include="Web References\org.umbraco.our\Reference.cs">
<AutoGen>True</AutoGen>
@@ -1001,7 +1002,7 @@
<Compile Include="Trees\ContentTreeController.cs" />
<Compile Include="Trees\TreeRenderingEventArgs.cs" />
<Compile Include="Trees\UrlHelperExtensions.cs" />
<Compile Include="UI\JavaScript\JsInitialization.cs" />
<Compile Include="JavaScript\JsInitialization.cs" />
<Compile Include="Models\ContentEditing\ContentItemBasic.cs" />
<Compile Include="Models\ContentEditing\ContentItemDisplay.cs" />
<Compile Include="Models\ContentEditing\ContentPropertyCollectionDto.cs" />
@@ -1035,17 +1036,14 @@
<Compile Include="Search\ExamineIndexModel.cs" />
<Compile Include="Security\ValidateRequestAttempt.cs" />
<Compile Include="Security\WebSecurity.cs" />
<Compile Include="UI\JavaScript\Resources.Designer.cs">
<Compile Include="JavaScript\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="UI\JavaScript\ServerVariablesParser.cs" />
<Compile Include="JavaScript\ServerVariablesParser.cs" />
<Compile Include="Components\PublicAccessComponent.cs" />
<Compile Include="UI\Bundles\JsJQueryCore.cs" />
<Compile Include="UI\Bundles\JsUmbracoApplicationUI.cs" />
<Compile Include="UI\Bundles\JsUmbracoTree.cs" />
<Compile Include="UI\CdfLogger.cs" />
<Compile Include="CdfLogger.cs" />
<Compile Include="Controllers\UmbLoginController.cs" />
<Compile Include="UrlHelperExtensions.cs" />
<Compile Include="Editors\MediaController.cs" />
@@ -1139,7 +1137,7 @@
<Compile Include="Trees\PartialViewsTreeController.cs" />
<Compile Include="_Legacy\PackageActions\allowDoctype.cs" />
<Compile Include="_Legacy\PackageActions\publishRootDocument.cs" />
<Compile Include="UI\SpeechBubbleIcon.cs" />
<Compile Include="Models\ContentEditing\NotificationStyle.cs" />
<Compile Include="UmbracoHelper.cs" />
<Compile Include="Mvc\ViewContextExtensions.cs" />
<Compile Include="Mvc\ViewDataContainerExtensions.cs" />
@@ -1202,7 +1200,7 @@
<Compile Include="WebViewPageExtensions.cs" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="UI\JavaScript\Resources.resx">
<EmbeddedResource Include="JavaScript\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
@@ -1211,15 +1209,21 @@
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Strings.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Include="UI\JavaScript\Main.js" />
<EmbeddedResource Include="UI\JavaScript\JsInitialize.js" />
<EmbeddedResource Include="UI\JavaScript\ServerVariables.js" />
<EmbeddedResource Include="JavaScript\Main.js" />
<EmbeddedResource Include="JavaScript\JsInitialize.js" />
<EmbeddedResource Include="JavaScript\ServerVariables.js" />
<EmbeddedResource Include="Routing\Resources\HtmlPages.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>HtmlPages.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<WebReferences Include="Web References\" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="UI\JavaScript\PreviewInitialize.js" />
<EmbeddedResource Include="Routing\Resources\Failed.html" />
<EmbeddedResource Include="Routing\Resources\Booting.html" />
<EmbeddedResource Include="JavaScript\PreviewInitialize.js" />
<!--<Content Include="umbraco.presentation\umbraco\users\PermissionEditor.aspx" />-->
<Content Include="PublishedCache\NuCache\notes.txt" />
</ItemGroup>

View File

@@ -275,9 +275,10 @@ namespace Umbraco.Web
// redirect to booting page
httpContext.Response.StatusCode = 503; // temp not available
const string bootUrl = "~/config/splashes/booting.aspx"; //fixme: remove booting.aspx once the above question is resolved
var bootHtml = Routing.Resources.HtmlPages.Booting;
httpContext.Response.AddHeader("Retry-After", debug ? "1" : "30"); // seconds
httpContext.RewritePath(UriUtility.ToAbsolute(bootUrl) + "?url=" + HttpUtility.UrlEncode(uri.ToString()));
httpContext.Response.Write(bootHtml);
httpContext.Response.Flush();
return false; // cannot serve content
case RuntimeLevel.BootFailed:
@@ -285,9 +286,10 @@ namespace Umbraco.Web
ReportRuntime(level, "Umbraco has failed.");
httpContext.Response.StatusCode = 503; // temp not available
const string deathUrl = "~/config/splashes/death.aspx";
var deathHtml = Routing.Resources.HtmlPages.Failed;
httpContext.Response.AddHeader("Retry-After", debug ? "1" : "300"); // seconds
httpContext.RewritePath(UriUtility.ToAbsolute(deathUrl) + "?url=" + HttpUtility.UrlEncode(uri.ToString()));
httpContext.Response.Write(deathHtml);
httpContext.Response.Flush();
return false; // cannot serve content
case RuntimeLevel.Run:

View File

@@ -4,7 +4,6 @@ using System.Web.Http.Filters;
using Umbraco.Core.Events;
using Umbraco.Web.Composing;
using Umbraco.Web.Models.ContentEditing;
using Umbraco.Web.UI;
namespace Umbraco.Web.WebApi.Filters
{
@@ -32,23 +31,23 @@ namespace Umbraco.Web.WebApi.Filters
foreach (var eventMessage in msgs.GetAll())
{
SpeechBubbleIcon msgType;
NotificationStyle msgType;
switch (eventMessage.MessageType)
{
case EventMessageType.Default:
msgType = SpeechBubbleIcon.Save;
msgType = NotificationStyle.Save;
break;
case EventMessageType.Info:
msgType = SpeechBubbleIcon.Info;
msgType = NotificationStyle.Info;
break;
case EventMessageType.Error:
msgType = SpeechBubbleIcon.Error;
msgType = NotificationStyle.Error;
break;
case EventMessageType.Success:
msgType = SpeechBubbleIcon.Success;
msgType = NotificationStyle.Success;
break;
case EventMessageType.Warning:
msgType = SpeechBubbleIcon.Warning;
msgType = NotificationStyle.Warning;
break;
default:
throw new ArgumentOutOfRangeException();