diff --git a/README.md b/README.md
index 91065214ad..d4a024ddbc 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,11 @@
Umbraco CMS
===========
-##Note: Building version 7 from source##
-If you're interested in using the source code and building version 7, make sure to read the [Belle ReadMe file](src/Umbraco.Web.UI.Client/README.md). Note that you can always [download a nightly build](http://nightly.umbraco.org/umbraco%207.0.0/) so you don't have to build the code yourself.
+Umbraco is a free open source Content Management System built on the ASP.NET platform.
+
+## Building Umbraco from source ##
+The easiest way to get started is to run `build/build.bat` which will build both the backoffice (also known as "Belle") and the Umbraco core. You can then easily start debugging from Visual Studio, or if you need to debug Belle you can run `grunt dev` in `src\Umbraco.Web.UI.Client`.
+
+If you're interested in making changes to Belle make sure to read the [Belle ReadMe file](src/Umbraco.Web.UI.Client/README.md). Note that you can always [download a nightly build](http://nightly.umbraco.org/umbraco%207.0.0/) so you don't have to build the code yourself.
## Watch a five minute introduction video ##
diff --git a/build/Build.bat b/build/Build.bat
index ead7df0abc..0c9b1f1ad2 100644
--- a/build/Build.bat
+++ b/build/Build.bat
@@ -4,11 +4,18 @@ SET comment=
SET version=%release%
IF [%comment%] EQU [] (SET version=%release%) ELSE (SET version=%release%-%comment%)
+ECHO Building Umbraco %version%
ReplaceIISExpressPortNumber.exe ..\src\Umbraco.Web.UI\Umbraco.Web.UI.csproj %release%
+ECHO Installing the Microsoft.Bcl.Build package before anything else, otherwise you'd have to run build.cmd twice
+SET nuGetFolder=%CD%\..\src\packages\
+..\src\.nuget\NuGet.exe install ..\src\Umbraco.Web.UI\packages.config -OutputDirectory %nuGetFolder%
+
+ECHO Performing MSBuild and producing Umbraco binaries zip files
%windir%\Microsoft.NET\Framework\v4.0.30319\msbuild.exe "Build.proj" /p:BUILD_RELEASE=%release% /p:BUILD_COMMENT=%comment%
+ECHO Adding dummy files to include in the NuGet package so that empty folders actually get created
echo This file is only here so that the containing folder will be included in the NuGet package, it is safe to delete. > .\_BuildOutput\WebApp\App_Code\dummy.txt
echo This file is only here so that the containing folder will be included in the NuGet package, it is safe to delete. > .\_BuildOutput\WebApp\App_Data\dummy.txt
echo This file is only here so that the containing folder will be included in the NuGet package, it is safe to delete. > .\_BuildOutput\WebApp\App_Plugins\dummy.txt
@@ -20,9 +27,11 @@ echo This file is only here so that the containing folder will be included in th
echo This file is only here so that the containing folder will be included in the NuGet package, it is safe to delete. > .\_BuildOutput\WebApp\Views\Partials\dummy.txt
echo This file is only here so that the containing folder will be included in the NuGet package, it is safe to delete. > .\_BuildOutput\WebApp\Views\MacroPartials\dummy.txt
+ECHO Adding Web.config transform files to the NuGet package
ren .\_BuildOutput\WebApp\MacroScripts\Web.config Web.config.transform
ren .\_BuildOutput\WebApp\Views\Web.config Web.config.transform
+ECHO Packing the NuGet release files
..\src\.nuget\NuGet.exe pack NuSpecs\UmbracoCms.Core.nuspec -Version %version%
..\src\.nuget\NuGet.exe pack NuSpecs\UmbracoCms.nuspec -Version %version%
diff --git a/build/Build.proj b/build/Build.proj
index 134bb668ed..a442c2bdd4 100644
--- a/build/Build.proj
+++ b/build/Build.proj
@@ -267,7 +267,7 @@
-
+
diff --git a/build/BuildBelle.bat b/build/BuildBelle.bat
new file mode 100644
index 0000000000..bb9cfedb5b
--- /dev/null
+++ b/build/BuildBelle.bat
@@ -0,0 +1,32 @@
+@ECHO OFF
+ECHO Installing Npm NuGet Package
+
+SET nuGetFolder=%CD%\..\src\packages\
+ECHO Configured packages folder: %nuGetFolder%
+ECHO Current folder: %CD%
+
+%CD%\..\src\.nuget\NuGet.exe install Npm.js -OutputDirectory %nuGetFolder%
+
+for /f "delims=" %%A in ('dir %nuGetFolder%node.js.* /b') do set "nodePath=%nuGetFolder%%%A\"
+for /f "delims=" %%A in ('dir %nuGetFolder%npm.js.* /b') do set "npmPath=%nuGetFolder%%%A\tools\"
+
+ECHO Temporarily adding Npm and Node to path
+SET oldPath=%PATH%
+
+path=%npmPath%;%nodePath%;%PATH%
+
+SET buildFolder=%CD%
+
+ECHO Change directory to %CD%\..\src\Umbraco.Web.UI.Client\
+CD %CD%\..\src\Umbraco.Web.UI.Client\
+
+ECHO Do npm install and the grunt build of Belle
+call npm install
+call npm install -g grunt-cli
+call grunt build
+
+ECHO Reset path to what it was before
+path=%oldPath%
+
+ECHO Move back to the build folder
+CD %buildFolder%
\ No newline at end of file
diff --git a/build/NuSpecs/UmbracoCms.Core.nuspec b/build/NuSpecs/UmbracoCms.Core.nuspec
index 65a19d9089..1c70c8b100 100644
--- a/build/NuSpecs/UmbracoCms.Core.nuspec
+++ b/build/NuSpecs/UmbracoCms.Core.nuspec
@@ -26,7 +26,7 @@
-
+
@@ -35,6 +35,7 @@
+
diff --git a/src/.nuget/NuGet.exe b/src/.nuget/NuGet.exe
index c296edf177..8f61340295 100644
Binary files a/src/.nuget/NuGet.exe and b/src/.nuget/NuGet.exe differ
diff --git a/src/.nuget/NuGet.targets b/src/.nuget/NuGet.targets
index 930ac95d01..6ff51f6e83 100644
--- a/src/.nuget/NuGet.targets
+++ b/src/.nuget/NuGet.targets
@@ -18,13 +18,13 @@
-
+
-
+
@@ -41,7 +41,7 @@
- $(NuGetToolsPath)\nuget.exe
+ $(NuGetToolsPath)\NuGet.exe@(PackageSource)"$(NuGetExePath)"
@@ -50,9 +50,14 @@
$(TargetDir.Trim('\\'))-RequireConsent
+ -NonInteractive
+
+ "$(SolutionDir) "
+ "$(SolutionDir)"
+
- $(NuGetCommand) install "$(PackagesConfig)" -source "$(PackageSources)" $(RequireConsentSwitch) -solutionDir "$(SolutionDir) "
- $(NuGetCommand) pack "$(ProjectPath)" -p Configuration=$(Configuration) -o "$(PackageOutputDir)" -symbols
+ $(NuGetCommand) install "$(PackagesConfig)" -source "$(PackageSources)" $(NonInteractiveSwitch) $(RequireConsentSwitch) -solutionDir $(PaddedSolutionDir)
+ $(NuGetCommand) pack "$(ProjectPath)" -Properties "Configuration=$(Configuration);Platform=$(Platform)" $(NonInteractiveSwitch) -OutputDirectory "$(PackageOutputDir)" -symbols
@@ -70,7 +75,6 @@
-
)", RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.Singleline);
- private static readonly Regex MacroPersistedFormat = new Regex(@"(<\?UMBRACO_MACRO macroAlias=[""'](\w+?)[""'].+?)(?:/>|>.*?\?UMBRACO_MACRO>)", RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.Singleline);
+ private static readonly Regex MacroPersistedFormat = new Regex(@"(<\?UMBRACO_MACRO macroAlias=[""']([\w\.]+?)[""'].+?)(?:/>|>.*?\?UMBRACO_MACRO>)", RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.Singleline);
///
/// This formats the persisted string to something useful for the rte so that the macro renders properly since we
@@ -39,8 +39,8 @@ namespace Umbraco.Core.Macros
//
var alias = match.Groups[2].Value;
var sb = new StringBuilder("
Xml representation of the passed in
internal static XElement ToDeepXml(this IContent content)
{
- return ApplicationContext.Current.Services.PackagingService.Export(content, true);
+ return ApplicationContext.Current.Services.PackagingService.Export(content, true, raiseEvents: false);
}
///
@@ -628,7 +628,7 @@ namespace Umbraco.Core.Models
/// Xml representation of the passed in
public static XElement ToXml(this IContent content)
{
- return ApplicationContext.Current.Services.PackagingService.Export(content);
+ return ApplicationContext.Current.Services.PackagingService.Export(content, raiseEvents: false);
}
///
@@ -638,7 +638,7 @@ namespace Umbraco.Core.Models
/// Xml representation of the passed in
public static XElement ToXml(this IMedia media)
{
- return ApplicationContext.Current.Services.PackagingService.Export(media);
+ return ApplicationContext.Current.Services.PackagingService.Export(media, raiseEvents: false);
}
///
@@ -648,7 +648,7 @@ namespace Umbraco.Core.Models
/// Xml representation of the passed in
internal static XElement ToDeepXml(this IMedia media)
{
- return ApplicationContext.Current.Services.PackagingService.Export(media, true);
+ return ApplicationContext.Current.Services.PackagingService.Export(media, true, raiseEvents: false);
}
///
diff --git a/src/Umbraco.Core/Models/Macro.cs b/src/Umbraco.Core/Models/Macro.cs
index 914847aea2..d81f49fc4f 100644
--- a/src/Umbraco.Core/Models/Macro.cs
+++ b/src/Umbraco.Core/Models/Macro.cs
@@ -107,7 +107,7 @@ namespace Umbraco.Core.Models
private bool _dontRender;
private string _scriptFile;
private string _scriptAssembly;
- private string _python;
+ private string _scriptPath;
private string _xslt;
private readonly MacroPropertyCollection _properties;
private readonly List _addedProperties;
@@ -360,14 +360,14 @@ namespace Umbraco.Core.Models
[DataMember]
public string ScriptPath
{
- get { return _python; }
+ get { return _scriptPath; }
set
{
SetPropertyValueAndDetectChanges(o =>
{
- _python = value;
- return _python;
- }, _python, ScriptPathSelector);
+ _scriptPath = value;
+ return _scriptPath;
+ }, _scriptPath, ScriptPathSelector);
}
}
diff --git a/src/Umbraco.Core/Models/MacroProperty.cs b/src/Umbraco.Core/Models/MacroProperty.cs
index 243e5c0e91..ef0a024973 100644
--- a/src/Umbraco.Core/Models/MacroProperty.cs
+++ b/src/Umbraco.Core/Models/MacroProperty.cs
@@ -155,7 +155,6 @@ namespace Umbraco.Core.Models
///
[DataMember]
public string EditorAlias
-
{
get { return _editorAlias; }
set
diff --git a/src/Umbraco.Core/Models/MemberType.cs b/src/Umbraco.Core/Models/MemberType.cs
index c361891fa0..b2e3a4dc89 100644
--- a/src/Umbraco.Core/Models/MemberType.cs
+++ b/src/Umbraco.Core/Models/MemberType.cs
@@ -15,6 +15,7 @@ namespace Umbraco.Core.Models
{
//Dictionary is divided into string: PropertyTypeAlias, Tuple: MemberCanEdit, VisibleOnProfile, PropertyTypeId
private IDictionary> _memberTypePropertyTypes;
+ private string _alias;
public MemberType(int parentId) : base(parentId)
{
@@ -27,6 +28,29 @@ namespace Umbraco.Core.Models
}
private static readonly PropertyInfo MemberTypePropertyTypesSelector = ExpressionHelper.GetPropertyInfo>>(x => x.MemberTypePropertyTypes);
+ private static readonly PropertyInfo AliasSelector = ExpressionHelper.GetPropertyInfo(x => x.Alias);
+
+ ///
+ /// The Alias of the ContentType
+ ///
+ [DataMember]
+ public override string Alias
+ {
+ get { return _alias; }
+ set
+ {
+ //NOTE: WE are overriding this because we don't want to do a ToSafeAlias when the alias is the special case of
+ // "_umbracoSystemDefaultProtectType" which is used internally, currently there is an issue with the safe alias as it strips
+ // leading underscores which we don't want in this case.
+ // see : http://issues.umbraco.org/issue/U4-3968
+
+ SetPropertyValueAndDetectChanges(o =>
+ {
+ _alias = value == "_umbracoSystemDefaultProtectType" ? value : value.ToSafeAlias();
+ return _alias;
+ }, _alias, AliasSelector);
+ }
+ }
///
/// Gets or Sets a Dictionary of Tuples (MemberCanEdit, VisibleOnProfile, PropertyTypeId) by the PropertyTypes' alias.
diff --git a/src/Umbraco.Core/Models/PublishedContent/PublishedPropertyType.cs b/src/Umbraco.Core/Models/PublishedContent/PublishedPropertyType.cs
index 295cbdef66..c8bf96be8f 100644
--- a/src/Umbraco.Core/Models/PublishedContent/PublishedPropertyType.cs
+++ b/src/Umbraco.Core/Models/PublishedContent/PublishedPropertyType.cs
@@ -80,11 +80,8 @@ namespace Umbraco.Core.Models.PublishedContent
private void InitializeConverters()
{
- var converters = PropertyValueConvertersResolver.Current.Converters.ToArray();
-
- var defaultConverters = converters
- .Where(x => x.GetType().GetCustomAttribute(false) != null)
- .ToArray();
+ var converters = PropertyValueConvertersResolver.Current.Converters.ToArray();
+ var defaultConvertersWithAttributes = PropertyValueConvertersResolver.Current.DefaultConverters;
_converter = null;
@@ -98,8 +95,14 @@ namespace Umbraco.Core.Models.PublishedContent
else if (foundConverters.Length > 1)
{
//more than one was found, we need to first figure out if one of these is an Umbraco default value type converter
- var nonDefault = foundConverters.Except(defaultConverters).ToArray();
- if (nonDefault.Length > 1)
+ //get the non-default and see if we have one
+ var nonDefault = foundConverters.Except(defaultConvertersWithAttributes.Select(x => x.Item1)).ToArray();
+ if (nonDefault.Length == 1)
+ {
+ //there's only 1 custom converter registered that so use it
+ _converter = nonDefault[0];
+ }
+ else if (nonDefault.Length > 1)
{
//this is not allowed, there cannot be more than 1 custom converter
throw new InvalidOperationException(
@@ -109,9 +112,31 @@ namespace Umbraco.Core.Models.PublishedContent
ContentType.Alias, PropertyTypeAlias,
nonDefault[1].GetType().FullName, nonDefault[0].GetType().FullName));
}
+ else
+ {
+ //we need to remove any converters that have been shadowed by another converter
+ var foundDefaultConvertersWithAttributes = defaultConvertersWithAttributes.Where(x => foundConverters.Contains(x.Item1));
+ var shadowedTypes = foundDefaultConvertersWithAttributes.SelectMany(x => x.Item2.DefaultConvertersToShadow);
+ var shadowedDefaultConverters = foundConverters.Where(x => shadowedTypes.Contains(x.GetType()));
+ var nonShadowedDefaultConverters = foundConverters.Except(shadowedDefaultConverters).ToArray();
- //there's only 1 custom converter registered that so use it
- _converter = nonDefault[0];
+ if (nonShadowedDefaultConverters.Length == 1)
+ {
+ //assign to the single default converter
+ _converter = nonShadowedDefaultConverters[0];
+ }
+ else if (nonShadowedDefaultConverters.Length > 1)
+ {
+ //this is not allowed, there cannot be more than 1 custom converter
+ throw new InvalidOperationException(
+ string.Format("Type '{2}' cannot be an IPropertyValueConverter"
+ + " for property '{1}' of content type '{0}' because type '{3}' has already been detected as a converter"
+ + " for that property, and only one converter can exist for a property.",
+ ContentType.Alias, PropertyTypeAlias,
+ nonShadowedDefaultConverters[1].GetType().FullName, nonShadowedDefaultConverters[0].GetType().FullName));
+ }
+ }
+
}
// get the cache levels, quietely fixing the inconsistencies (no need to throw, really)
diff --git a/src/Umbraco.Core/Models/UmbracoEntityExtensions.cs b/src/Umbraco.Core/Models/UmbracoEntityExtensions.cs
new file mode 100644
index 0000000000..edcc25ade8
--- /dev/null
+++ b/src/Umbraco.Core/Models/UmbracoEntityExtensions.cs
@@ -0,0 +1,32 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Web.UI.WebControls;
+using Umbraco.Core.Models.EntityBase;
+
+namespace Umbraco.Core.Models
+{
+ internal static class UmbracoEntityExtensions
+ {
+
+ public static object GetAdditionalDataValueIgnoreCase(this IUmbracoEntity entity, string key, object defaultVal)
+ {
+ if (entity.AdditionalData.ContainsKeyIgnoreCase(key) == false) return defaultVal;
+ return entity.AdditionalData.GetValueIgnoreCase(key, defaultVal);
+ }
+
+ public static bool IsContainer(this IUmbracoEntity entity)
+ {
+ if (entity.AdditionalData.ContainsKeyIgnoreCase("IsContainer") == false) return false;
+ var val = entity.AdditionalData.GetValueIgnoreCase("IsContainer", null);
+ if (val is bool && (bool) val)
+ {
+ return true;
+ }
+ return false;
+ }
+
+ }
+}
diff --git a/src/Umbraco.Core/Persistence/Caching/RuntimeCacheProvider.cs b/src/Umbraco.Core/Persistence/Caching/RuntimeCacheProvider.cs
index 60e176096f..273d605bef 100644
--- a/src/Umbraco.Core/Persistence/Caching/RuntimeCacheProvider.cs
+++ b/src/Umbraco.Core/Persistence/Caching/RuntimeCacheProvider.cs
@@ -151,6 +151,21 @@ namespace Umbraco.Core.Persistence.Caching
_keyTracker.Remove(key);
}
+ public void Delete(Type type, int entityId)
+ {
+ var key = GetCompositeId(type, entityId);
+ if (_memoryCache != null)
+ {
+ _memoryCache.Remove(key);
+ }
+ else
+ {
+ HttpRuntime.Cache.Remove(key);
+ }
+
+ _keyTracker.Remove(key);
+ }
+
///
/// Clear cache by type
///
diff --git a/src/Umbraco.Core/Persistence/Repositories/MemberRepository.cs b/src/Umbraco.Core/Persistence/Repositories/MemberRepository.cs
index 9a291194a9..24da2e9848 100644
--- a/src/Umbraco.Core/Persistence/Repositories/MemberRepository.cs
+++ b/src/Umbraco.Core/Persistence/Repositories/MemberRepository.cs
@@ -521,6 +521,10 @@ namespace Umbraco.Core.Persistence.Repositories
totalRecords = Convert.ToInt32(pagedResult.TotalItems);
//now that we have the member dto's we need to construct true members from the list.
+ if (totalRecords == 0)
+ {
+ return Enumerable.Empty();
+ }
var result = GetAll(pagedResult.Items.Select(x => x.NodeId).ToArray());
//now we need to ensure this result is also ordered by the same order by clause
diff --git a/src/Umbraco.Core/Persistence/Repositories/UserRepository.cs b/src/Umbraco.Core/Persistence/Repositories/UserRepository.cs
index 4ccb3b73a4..9c6c742170 100644
--- a/src/Umbraco.Core/Persistence/Repositories/UserRepository.cs
+++ b/src/Umbraco.Core/Persistence/Repositories/UserRepository.cs
@@ -298,6 +298,11 @@ namespace Umbraco.Core.Persistence.Repositories
totalRecords = Convert.ToInt32(pagedResult.TotalItems);
//now that we have the user dto's we need to construct true members from the list.
+ if (totalRecords == 0)
+ {
+ return Enumerable.Empty();
+ }
+
var result = GetAll(pagedResult.Items.Select(x => x.Id).ToArray());
//now we need to ensure this result is also ordered by the same order by clause
diff --git a/src/Umbraco.Core/PropertyEditors/DefaultPropertyValueConverterAttribute.cs b/src/Umbraco.Core/PropertyEditors/DefaultPropertyValueConverterAttribute.cs
index 4857e2bb07..10bdd053a8 100644
--- a/src/Umbraco.Core/PropertyEditors/DefaultPropertyValueConverterAttribute.cs
+++ b/src/Umbraco.Core/PropertyEditors/DefaultPropertyValueConverterAttribute.cs
@@ -1,4 +1,6 @@
using System;
+using System.Collections.Generic;
+using System.Linq;
namespace Umbraco.Core.PropertyEditors
{
@@ -8,5 +10,27 @@ namespace Umbraco.Core.PropertyEditors
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)]
internal class DefaultPropertyValueConverterAttribute : Attribute
{
+ public DefaultPropertyValueConverterAttribute()
+ {
+ DefaultConvertersToShadow = Enumerable.Empty();
+ }
+
+ public DefaultPropertyValueConverterAttribute(params Type[] convertersToShadow)
+ {
+ DefaultConvertersToShadow = convertersToShadow;
+ }
+
+ ///
+ /// A DefaultPropertyValueConverter can 'shadow' other default property value converters so that
+ /// a DefaultPropertyValueConverter can be more specific than another one.
+ ///
+ ///
+ /// An example where this is useful is that both the RelatedLiksEditorValueConverter and the JsonValueConverter
+ /// will be returned as value converters for the Related Links Property editor, however the JsonValueConverter
+ /// is a very generic converter and the RelatedLiksEditorValueConverter is more specific than it, so the RelatedLiksEditorValueConverter
+ /// can specify that it 'shadows' the JsonValueConverter.
+ ///
+ public IEnumerable DefaultConvertersToShadow { get; private set; }
+
}
}
\ No newline at end of file
diff --git a/src/Umbraco.Core/PropertyEditors/LegacyParameterEditorAliasConverter.cs b/src/Umbraco.Core/PropertyEditors/LegacyParameterEditorAliasConverter.cs
index cc89e7671b..9e2fb5d10a 100644
--- a/src/Umbraco.Core/PropertyEditors/LegacyParameterEditorAliasConverter.cs
+++ b/src/Umbraco.Core/PropertyEditors/LegacyParameterEditorAliasConverter.cs
@@ -97,10 +97,7 @@ namespace Umbraco.Core.PropertyEditors
CreateMap("mediaCurrent", Constants.PropertyEditors.MediaPickerAlias);
- CreateMap("number", Constants.PropertyEditors.IntegerAlias);
-
-
-
+ CreateMap("number", Constants.PropertyEditors.IntegerAlias);
}
}
}
\ No newline at end of file
diff --git a/src/Umbraco.Core/PropertyEditors/PropertyValueConvertersResolver.cs b/src/Umbraco.Core/PropertyEditors/PropertyValueConvertersResolver.cs
index 53fecdac9d..295fdb4b09 100644
--- a/src/Umbraco.Core/PropertyEditors/PropertyValueConvertersResolver.cs
+++ b/src/Umbraco.Core/PropertyEditors/PropertyValueConvertersResolver.cs
@@ -1,5 +1,7 @@
using System;
using System.Collections.Generic;
+using System.Linq;
+using System.Threading;
using Umbraco.Core.ObjectResolution;
namespace Umbraco.Core.PropertyEditors
@@ -36,5 +38,41 @@ namespace Umbraco.Core.PropertyEditors
{
get { return Values; }
}
+
+ private readonly ReaderWriterLockSlim _lock = new ReaderWriterLockSlim();
+ private Tuple[] _defaults = null;
+
+ ///
+ /// Caches and gets the default converters with their metadata
+ ///
+ internal Tuple[] DefaultConverters
+ {
+ get
+ {
+ using (var locker = new UpgradeableReadLock(_lock))
+ {
+ if (_defaults == null)
+ {
+ locker.UpgradeToWriteLock();
+
+ var defaultConvertersWithAttributes = Converters
+ .Select(x => new
+ {
+ attribute = x.GetType().GetCustomAttribute(false),
+ converter = x
+ })
+ .Where(x => x.attribute != null)
+ .ToArray();
+
+ _defaults = defaultConvertersWithAttributes
+ .Select(
+ x => new Tuple(x.converter, x.attribute))
+ .ToArray();
+ }
+
+ return _defaults;
+ }
+ }
+ }
}
}
\ No newline at end of file
diff --git a/src/Umbraco.Core/Security/AuthenticationExtensions.cs b/src/Umbraco.Core/Security/AuthenticationExtensions.cs
index b642796932..45c290daba 100644
--- a/src/Umbraco.Core/Security/AuthenticationExtensions.cs
+++ b/src/Umbraco.Core/Security/AuthenticationExtensions.cs
@@ -137,12 +137,19 @@ namespace Umbraco.Core.Security
{
if (response == null) throw new ArgumentNullException("response");
//remove the cookie
- var cookie = new CookieHeaderValue(UmbracoConfig.For.UmbracoSettings().Security.AuthCookieName, "")
+ var authCookie = new CookieHeaderValue(UmbracoConfig.For.UmbracoSettings().Security.AuthCookieName, "")
{
Expires = DateTime.Now.AddYears(-1),
Path = "/"
};
- response.Headers.AddCookies(new[] { cookie });
+ //remove the preview cookie too
+ var prevCookie = new CookieHeaderValue(Constants.Web.PreviewCookieName, "")
+ {
+ Expires = DateTime.Now.AddYears(-1),
+ Path = "/"
+ };
+
+ response.Headers.AddCookies(new[] { authCookie, prevCookie });
}
///
@@ -259,21 +266,27 @@ namespace Umbraco.Core.Security
private static void Logout(this HttpContextBase http, string cookieName)
{
if (http == null) throw new ArgumentNullException("http");
- //remove from the request
- http.Request.Cookies.Remove(cookieName);
+ //clear the preview cookie too
+ var cookies = new[] { cookieName, Constants.Web.PreviewCookieName };
+ foreach (var c in cookies)
+ {
+ //remove from the request
+ http.Request.Cookies.Remove(c);
+
+ //expire from the response
+ var formsCookie = http.Response.Cookies[c];
+ if (formsCookie != null)
+ {
+ //this will expire immediately and be removed from the browser
+ formsCookie.Expires = DateTime.Now.AddYears(-1);
+ }
+ else
+ {
+ //ensure there's def an expired cookie
+ http.Response.Cookies.Add(new HttpCookie(c) { Expires = DateTime.Now.AddYears(-1) });
+ }
+ }
- //expire from the response
- var formsCookie = http.Response.Cookies[cookieName];
- if (formsCookie != null)
- {
- //this will expire immediately and be removed from the browser
- formsCookie.Expires = DateTime.Now.AddYears(-1);
- }
- else
- {
- //ensure there's def an expired cookie
- http.Response.Cookies.Add(new HttpCookie(cookieName) { Expires = DateTime.Now.AddYears(-1) });
- }
}
private static FormsAuthenticationTicket GetAuthTicket(this HttpContextBase http, string cookieName)
diff --git a/src/Umbraco.Core/Security/MembershipProviderExtensions.cs b/src/Umbraco.Core/Security/MembershipProviderExtensions.cs
new file mode 100644
index 0000000000..85db27ac97
--- /dev/null
+++ b/src/Umbraco.Core/Security/MembershipProviderExtensions.cs
@@ -0,0 +1,29 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Web.Security;
+using Umbraco.Core.Security;
+
+namespace Umbraco.Core.Security
+{
+ internal static class MembershipProviderExtensions
+ {
+ ///
+ /// Returns true if the provider specified is a built-in Umbraco membership provider
+ ///
+ ///
+ ///
+ public static bool IsUmbracoMembershipProvider(this MembershipProvider membershipProvider)
+ {
+ return (membershipProvider is UmbracoMembershipProviderBase);
+ }
+
+ public static UmbracoMembershipProviderBase AsUmbracoMembershipProvider(this MembershipProvider membershipProvider)
+ {
+ return (UmbracoMembershipProviderBase)membershipProvider;
+ }
+
+ }
+}
diff --git a/src/Umbraco.Core/Services/INotificationService.cs b/src/Umbraco.Core/Services/INotificationService.cs
index 801424d3b0..4be6d17f0d 100644
--- a/src/Umbraco.Core/Services/INotificationService.cs
+++ b/src/Umbraco.Core/Services/INotificationService.cs
@@ -1,7 +1,9 @@
-using System.Collections.Generic;
+using System;
+using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using System.Web;
using Umbraco.Core.Models;
using Umbraco.Core.Models.EntityBase;
using Umbraco.Core.Models.Membership;
@@ -17,9 +19,15 @@ namespace Umbraco.Core.Services
/// Sends the notifications for the specified user regarding the specified node and action.
///
///
- ///
+ ///
///
- void SendNotifications(IEntity entity, IUser user, IAction action);
+ ///
+ ///
+ ///
+ ///
+ void SendNotifications(IUser operatingUser, IUmbracoEntity entity, string action, string actionName, HttpContextBase http,
+ Func createSubject,
+ Func createBody);
///
/// Gets the notifications for the user
@@ -28,6 +36,17 @@ namespace Umbraco.Core.Services
///
IEnumerable GetUserNotifications(IUser user);
+ ///
+ /// Gets the notifications for the user based on the specified node path
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// Notifications are inherited from the parent so any child node will also have notifications assigned based on it's parent (ancestors)
+ ///
+ IEnumerable GetUserNotifications(IUser user, string path);
+
///
/// Returns the notifications for an entity
///
diff --git a/src/Umbraco.Core/Services/IPackagingService.cs b/src/Umbraco.Core/Services/IPackagingService.cs
index 2f711eb8af..c7e68e6eca 100644
--- a/src/Umbraco.Core/Services/IPackagingService.cs
+++ b/src/Umbraco.Core/Services/IPackagingService.cs
@@ -20,7 +20,7 @@ namespace Umbraco.Core.Services
/// Imports and saves package xml as
///
/// Xml to import
- /// Optional id of the User performing the operation. Default is zero (admin).
+ /// Optional id of the User performing the operation. Default is zero (admin)
/// Optional parameter indicating whether or not to raise events
/// An enumrable list of generated ContentTypes
IEnumerable ImportContentTypes(XElement element, int userId = 0, bool raiseEvents = true);
@@ -30,7 +30,7 @@ namespace Umbraco.Core.Services
///
/// Xml to import
/// Boolean indicating whether or not to import the
- /// Optional id of the User performing the operation. Default is zero (admin).
+ /// Optional id of the User performing the operation. Default is zero (admin)
/// Optional parameter indicating whether or not to raise events
/// An enumrable list of generated ContentTypes
IEnumerable ImportContentTypes(XElement element, bool importStructure, int userId = 0, bool raiseEvents = true);
@@ -39,7 +39,7 @@ namespace Umbraco.Core.Services
/// Imports and saves package xml as
///
/// Xml to import
- ///
+ /// Optional id of the User performing the operation. Default is zero (admin).
/// Optional parameter indicating whether or not to raise events
/// An enumrable list of generated DataTypeDefinitions
IEnumerable ImportDataTypeDefinitions(XElement element, int userId = 0, bool raiseEvents = true);
@@ -56,15 +56,25 @@ namespace Umbraco.Core.Services
/// Imports and saves the 'Languages' part of a package xml as a list of
///
/// Xml to import
+ /// Optional id of the User performing the operation. Default is zero (admin)
/// Optional parameter indicating whether or not to raise events
/// An enumerable list of generated languages
- IEnumerable ImportLanguages(XElement languageElementList, bool raiseEvents = true);
+ IEnumerable ImportLanguages(XElement languageElementList, int userId = 0, bool raiseEvents = true);
+
+ ///
+ /// Imports and saves the 'Macros' part of a package xml as a list of
+ ///
+ /// Xml to import
+ /// Optional id of the User performing the operation
+ /// Optional parameter indicating whether or not to raise events
+ ///
+ IEnumerable ImportMacros(XElement element, int userId = 0, bool raiseEvents = true);
///
/// Imports and saves package xml as
///
/// Xml to import
- /// Optional user id
+ /// Optional id of the User performing the operation. Default is zero (admin)
/// Optional parameter indicating whether or not to raise events
/// An enumrable list of generated Templates
IEnumerable ImportTemplates(XElement element, int userId = 0, bool raiseEvents = true);
@@ -74,7 +84,7 @@ namespace Umbraco.Core.Services
///
/// ContentType to export
/// Optional parameter indicating whether or not to raise events
- /// containing the xml representation of the ContentType item.
+ /// containing the xml representation of the ContentType item
XElement Export(IContentType contentType, bool raiseEvents = true);
///
@@ -144,5 +154,37 @@ namespace Umbraco.Core.Services
/// Optional parameter indicating whether or not to raise events
/// containing the xml representation of the IDataTypeDefinition object
XElement Export(IDataTypeDefinition dataTypeDefinition, bool raiseEvents = true);
+
+ ///
+ /// Exports a list of items to xml as an
+ ///
+ /// List of Templates to export
+ /// Optional parameter indicating whether or not to raise events
+ /// containing the xml representation of the ITemplate objects
+ XElement Export(IEnumerable templates, bool raiseEvents = true);
+
+ ///
+ /// Exports a single item to xml as an
+ ///
+ /// Template to export
+ /// Optional parameter indicating whether or not to raise events
+ /// containing the xml representation of the ITemplate object
+ XElement Export(ITemplate template, bool raiseEvents = true);
+
+ ///
+ /// Exports a list of items to xml as an
+ ///
+ /// Macros to export
+ /// Optional parameter indicating whether or not to raise events
+ /// containing the xml representation of the IMacro objects
+ XElement Export(IEnumerable macros, bool raiseEvents = true);
+
+ ///
+ /// Exports a single item to xml as an
+ ///
+ /// Macro to export
+ /// Optional parameter indicating whether or not to raise events
+ /// containing the xml representation of the IMacro object
+ XElement Export(IMacro macro, bool raiseEvents = true);
}
}
\ No newline at end of file
diff --git a/src/Umbraco.Core/Services/MemberService.cs b/src/Umbraco.Core/Services/MemberService.cs
index 3172f329fa..f37339c70d 100644
--- a/src/Umbraco.Core/Services/MemberService.cs
+++ b/src/Umbraco.Core/Services/MemberService.cs
@@ -191,7 +191,7 @@ namespace Umbraco.Core.Services
using (var uow = _uowProvider.GetUnitOfWork())
{
var repository = _repositoryFactory.CreateMemberRepository(uow);
- //NOTE What about content that has the contenttype as part of its composition?
+ //TODO: What about content that has the contenttype as part of its composition?
var query = Query.Builder.Where(x => x.ContentTypeId == memberTypeId);
var members = repository.GetByQuery(query).ToArray();
@@ -635,7 +635,7 @@ namespace Umbraco.Core.Services
var uow = _uowProvider.GetUnitOfWork();
using (var repository = _repositoryFactory.CreateMemberRepository(uow))
{
- var query = Query.Builder.Where(x => x.Username == userName);
+ var query = Query.Builder.Where(x => x.Username.Equals(userName));
var member = repository.GetByQuery(query).FirstOrDefault();
return member;
diff --git a/src/Umbraco.Core/Services/NotificationService.cs b/src/Umbraco.Core/Services/NotificationService.cs
index 31c534470b..2e4ff7a9ec 100644
--- a/src/Umbraco.Core/Services/NotificationService.cs
+++ b/src/Umbraco.Core/Services/NotificationService.cs
@@ -1,10 +1,20 @@
using System;
using System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+using System.Net.Mail;
+using System.Text;
+using System.Threading;
+using System.Web;
+using Umbraco.Core.Configuration;
+using Umbraco.Core.IO;
+using Umbraco.Core.Logging;
using Umbraco.Core.Models;
using Umbraco.Core.Models.EntityBase;
using Umbraco.Core.Models.Membership;
using Umbraco.Core.Persistence.Repositories;
using Umbraco.Core.Persistence.UnitOfWork;
+using Umbraco.Core.Strings;
using umbraco.interfaces;
namespace Umbraco.Core.Services
@@ -12,21 +22,67 @@ namespace Umbraco.Core.Services
internal class NotificationService : INotificationService
{
private readonly IDatabaseUnitOfWorkProvider _uowProvider;
+ private readonly IUserService _userService;
+ private readonly IContentService _contentService;
- public NotificationService(IDatabaseUnitOfWorkProvider provider)
+ public NotificationService(IDatabaseUnitOfWorkProvider provider, IUserService userService, IContentService contentService)
{
_uowProvider = provider;
+ _userService = userService;
+ _contentService = contentService;
}
///
/// Sends the notifications for the specified user regarding the specified node and action.
///
///
- ///
+ ///
///
- public void SendNotifications(IEntity entity, IUser user, IAction action)
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// Currently this will only work for Content entities!
+ ///
+ public void SendNotifications(IUser operatingUser, IUmbracoEntity entity, string action, string actionName, HttpContextBase http,
+ Func createSubject,
+ Func createBody)
{
- throw new NotImplementedException();
+ if ((entity is IContent) == false)
+ {
+ throw new NotSupportedException();
+ }
+ var content = (IContent) entity;
+ //we'll lazily get these if we need to send notifications
+ IContent[] allVersions = null;
+
+ int totalUsers;
+ var allUsers = _userService.GetAllMembers(0, int.MaxValue, out totalUsers);
+ foreach (var u in allUsers)
+ {
+ if (u.IsApproved == false) continue;
+ var userNotifications = GetUserNotifications(u, content.Path).ToArray();
+ var notificationForAction = userNotifications.FirstOrDefault(x => x.Action == action);
+ if (notificationForAction != null)
+ {
+ //lazy load versions if notifications are required
+ if (allVersions == null)
+ {
+ allVersions = _contentService.GetVersions(entity.Id).ToArray();
+ }
+
+ try
+ {
+ SendNotification(operatingUser, u, content, allVersions, actionName, http, createSubject, createBody);
+ LogHelper.Debug(string.Format("Notification type: {0} sent to {1} ({2})", action, u.Name, u.Email));
+ }
+ catch (Exception ex)
+ {
+ LogHelper.Error("An error occurred sending notification", ex);
+ }
+ }
+ }
}
///
@@ -41,6 +97,23 @@ namespace Umbraco.Core.Services
return repository.GetUserNotifications(user);
}
+ ///
+ /// Gets the notifications for the user based on the specified node path
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// Notifications are inherited from the parent so any child node will also have notifications assigned based on it's parent (ancestors)
+ ///
+ public IEnumerable GetUserNotifications(IUser user, string path)
+ {
+ var userNotifications = GetUserNotifications(user).ToArray();
+ var pathParts = path.Split(new[] {','}, StringSplitOptions.RemoveEmptyEntries);
+ var result = userNotifications.Where(r => pathParts.InvariantContains(r.EntityId.ToString(CultureInfo.InvariantCulture))).ToList();
+ return result;
+ }
+
///
/// Deletes notifications by entity
///
@@ -99,5 +172,255 @@ namespace Umbraco.Core.Services
var repository = new NotificationsRepository(uow);
return repository.CreateNotification(user, entity, action);
}
+
+ #region private methods
+
+ ///
+ /// Sends the notification
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// The action readable name - currently an action is just a single letter, this is the name associated with the letter
+ ///
+ /// Callback to create the mail subject
+ /// Callback to create the mail body
+ private void SendNotification(IUser performingUser, IUser mailingUser, IContent content, IContent[] allVersions, string actionName, HttpContextBase http,
+ Func createSubject,
+ Func createBody)
+ {
+ if (performingUser == null) throw new ArgumentNullException("performingUser");
+ if (mailingUser == null) throw new ArgumentNullException("mailingUser");
+ if (content == null) throw new ArgumentNullException("content");
+ if (allVersions == null) throw new ArgumentNullException("allVersions");
+ if (http == null) throw new ArgumentNullException("http");
+ if (createSubject == null) throw new ArgumentNullException("createSubject");
+ if (createBody == null) throw new ArgumentNullException("createBody");
+
+ int versionCount = (allVersions.Length > 1) ? (allVersions.Length - 2) : (allVersions.Length - 1);
+ var oldDoc = _contentService.GetByVersion(allVersions[versionCount].Version);
+
+ // build summary
+ var summary = new StringBuilder();
+ var props = content.Properties.ToArray();
+ foreach (var p in props)
+ {
+ var newText = p.Value != null ? p.Value.ToString() : "";
+ var oldText = newText;
+
+ // check if something was changed and display the changes otherwise display the fields
+ if (oldDoc.Properties.Contains(p.PropertyType.Alias))
+ {
+ var oldProperty = oldDoc.Properties[p.PropertyType.Alias];
+ oldText = oldProperty.Value != null ? oldProperty.Value.ToString() : "";
+
+ // replace html with char equivalent
+ ReplaceHtmlSymbols(ref oldText);
+ ReplaceHtmlSymbols(ref newText);
+ }
+
+
+ // make sure to only highlight changes done using TinyMCE editor... other changes will be displayed using default summary
+ // TODO: We should probably allow more than just tinymce??
+ if ((p.PropertyType.PropertyEditorAlias == Constants.PropertyEditors.TinyMCEAlias)
+ && string.CompareOrdinal(oldText, newText) != 0)
+ {
+ summary.Append("
");
+ summary.Append("
Note:
");
+ summary.Append(
+ "
Red for deleted charactersYellow for inserted characters
";
var result = MacroTagParser.FormatRichTextPersistedDataForEditor(content, new Dictionary(){{"test1", "value1"},{"test2", "value2"}});
+// Assert.AreEqual(@"
\ No newline at end of file
diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/mediapicker/mediapicker.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/mediapicker/mediapicker.controller.js
index af5779b9a7..39edcc9590 100644
--- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/mediapicker/mediapicker.controller.js
+++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/mediapicker/mediapicker.controller.js
@@ -32,14 +32,6 @@ angular.module('umbraco').controller("Umbraco.PropertyEditors.MediaPickerControl
$scope.sync();
};
- $scope.edit = function(image){
- $scope.currentImage = image;
- $scope.currentImage.crop ={};
- if(!$scope.currentImage.crop){
- //$scope.currentImage.crop = { "left": 0.31731772342645215, "top": 0.17420325244997603, "right": 0.36246473116627076, "bottom": 0.30226197981593617 };
- }
- }
-
$scope.add = function() {
dialogService.mediaPicker({
multiPicker: multiPicker,
@@ -65,7 +57,10 @@ angular.module('umbraco').controller("Umbraco.PropertyEditors.MediaPickerControl
$scope.sortableOptions = {
update: function(e, ui) {
- var r = [];
+ var r = [];
+ //TODO: Instead of doing this with a half second delay would be better to use a watch like we do in the
+ // content picker. THen we don't have to worry about setting ids, render models, models, we just set one and let the
+ // watch do all the rest.
$timeout(function(){
angular.forEach($scope.images, function(value, key){
r.push(value.id);
diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/memberpicker/memberpicker.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/memberpicker/memberpicker.controller.js
index afbb248e5d..21afc87c2b 100644
--- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/memberpicker/memberpicker.controller.js
+++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/memberpicker/memberpicker.controller.js
@@ -33,52 +33,45 @@ angular.module('umbraco')
$scope.remove =function(index){
$scope.renderModel.splice(index, 1);
- $scope.ids.splice(index, 1);
- $scope.model.value = trim($scope.ids.join(), ",");
};
$scope.add =function(item){
if($scope.ids.indexOf(item.id) < 0){
item.icon = iconHelper.convertFromLegacyIcon(item.icon);
-
- $scope.ids.push(item.id);
- $scope.renderModel.push({name: item.name, id: item.id, icon: item.icon});
- $scope.model.value = trim($scope.ids.join(), ",");
+ $scope.renderModel.push({name: item.name, id: item.id, icon: item.icon});
}
};
$scope.clear = function() {
- $scope.model.value = "";
$scope.renderModel = [];
- $scope.ids = [];
};
-
- $scope.sortableOptions = {
- update: function(e, ui) {
- var r = [];
- angular.forEach($scope.renderModel, function(value, key){
- r.push(value.id);
- });
-
- $scope.ids = r;
- $scope.model.value = trim($scope.ids.join(), ",");
- }
- };
-
+ //We need to watch our renderModel so that we can update the underlying $scope.model.value properly, this is required
+ // because the ui-sortable doesn't dispatch an event after the digest of the sort operation. Any of the events for UI sortable
+ // occur after the DOM has updated but BEFORE the digest has occured so the model has NOT changed yet - it even states so in the docs.
+ // In their source code there is no event so we need to just subscribe to our model changes here.
+ //This also makes it easier to manage models, we update one and the rest will just work.
+ $scope.$watch(function () {
+ //return the joined Ids as a string to watch
+ return _.map($scope.renderModel, function (i) {
+ return i.id;
+ }).join();
+ }, function (newVal) {
+ $scope.ids = _.map($scope.renderModel, function (i) {
+ return i.id;
+ });
+ $scope.model.value = trim($scope.ids.join(), ",");
+ });
$scope.$on("formSubmitting", function (ev, args) {
$scope.model.value = trim($scope.ids.join(), ",");
});
-
-
function trim(str, chr) {
var rgxtrim = (!chr) ? new RegExp('^\\s+|\\s+$', 'g') : new RegExp('^'+chr+'+|'+chr+'+$', 'g');
return str.replace(rgxtrim, '');
}
-
function populate(data){
if(angular.isArray(data)){
_.each(data, function (item, i) {
diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/memberpicker/memberpicker.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/memberpicker/memberpicker.html
index 473c5694e8..168b6cdd6d 100644
--- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/memberpicker/memberpicker.html
+++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/memberpicker/memberpicker.html
@@ -2,7 +2,7 @@
diff --git a/src/Umbraco.Web.UI.Client/test/unit/app/media/edit-media-controller.spec.js b/src/Umbraco.Web.UI.Client/test/unit/app/media/edit-media-controller.spec.js
index 3b453a7930..64a21b670e 100644
--- a/src/Umbraco.Web.UI.Client/test/unit/app/media/edit-media-controller.spec.js
+++ b/src/Umbraco.Web.UI.Client/test/unit/app/media/edit-media-controller.spec.js
@@ -47,7 +47,7 @@ describe('edit media controller tests', function () {
});
it('it should have a tabs collection', function () {
- expect(scope.content.tabs.length).toBe(5);
+ expect(scope.content.tabs.length).toBe(1);
});
it('it should have a properties collection on each tab', function () {
diff --git a/src/Umbraco.Web.UI.Client/test/unit/app/propertyeditors/content-picker-controller.spec.js b/src/Umbraco.Web.UI.Client/test/unit/app/propertyeditors/content-picker-controller.spec.js
index 2ffd204d24..b42a861e8a 100644
--- a/src/Umbraco.Web.UI.Client/test/unit/app/propertyeditors/content-picker-controller.spec.js
+++ b/src/Umbraco.Web.UI.Client/test/unit/app/propertyeditors/content-picker-controller.spec.js
@@ -60,7 +60,7 @@ describe('Content picker controller tests', function () {
it("Removing an item should update renderModel, ids and model.value", function(){
scope.remove(1);
-
+ scope.$apply();
expect(scope.renderModel.length).toBe(2);
expect(scope.ids.length).toBe(2);
expect(scope.model.value).toBe("1233,23121");
@@ -69,7 +69,7 @@ describe('Content picker controller tests', function () {
it("Adding an item should update renderModel, ids and model.value", function(){
scope.add({name: "meh", id: 666, icon: "woop"});
-
+ scope.$apply();
expect(scope.renderModel.length).toBe(4);
expect(scope.ids.length).toBe(4);
expect(scope.model.value).toBe("1233,1231,23121,666");
@@ -77,12 +77,14 @@ describe('Content picker controller tests', function () {
it("Adding a dublicate item should note update renderModel, ids and model.value", function(){
- scope.add({name: "meh", id: 666, icon: "woop"});
+ scope.add({ name: "meh", id: 666, icon: "woop" });
+ scope.$apply();
expect(scope.renderModel.length).toBe(4);
expect(scope.ids.length).toBe(4);
expect(scope.model.value).toBe("1233,1231,23121,666");
- scope.add({name: "meh 2", id: 666, icon: "woop 2"});
+ scope.add({ name: "meh 2", id: 666, icon: "woop 2" });
+ scope.$apply();
expect(scope.renderModel.length).toBe(4);
expect(scope.ids.length).toBe(4);
expect(scope.model.value).toBe("1233,1231,23121,666");
diff --git a/src/Umbraco.Web.UI.Client/test/unit/common/services/macro-service.spec.js b/src/Umbraco.Web.UI.Client/test/unit/common/services/macro-service.spec.js
index 470b7b59f8..381ae22713 100644
--- a/src/Umbraco.Web.UI.Client/test/unit/common/services/macro-service.spec.js
+++ b/src/Umbraco.Web.UI.Client/test/unit/common/services/macro-service.spec.js
@@ -21,6 +21,20 @@ describe('macro service tests', function () {
expect(result.marcoParamsDictionary.test2).toBe("hello");
+ });
+
+ it('can parse syntax for macros with aliases containing dots', function () {
+
+ var result = macroService.parseMacroSyntax("");
+
+ expect(result).not.toBeNull();
+ expect(result.macroAlias).toBe("Map.Test");
+ expect(result.marcoParamsDictionary.test1).not.toBeUndefined();
+ expect(result.marcoParamsDictionary.test1).toBe("asdf");
+ expect(result.marcoParamsDictionary.test2).not.toBeUndefined();
+ expect(result.marcoParamsDictionary.test2).toBe("hello");
+
+
});
it('can parse syntax for macros with body', function () {
diff --git a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj
index eaa279c342..ab7f865b06 100644
--- a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj
+++ b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj
@@ -115,15 +115,15 @@
False..\packages\AutoMapper.3.0.0\lib\net40\AutoMapper.Net4.dll
-
+ False..\packages\ClientDependency.1.7.1.1\lib\ClientDependency.Core.dll
-
+ False..\packages\ClientDependency-Mvc.1.7.0.4\lib\ClientDependency.Core.Mvc.dll
-
+ False..\packages\Examine.0.1.52.2941\lib\Examine.dll
@@ -616,6 +616,7 @@
treeInit.aspx
+
@@ -2135,13 +2136,13 @@
-
+
-
+
-
+ Code
@@ -2161,7 +2162,7 @@
-
+
@@ -2667,11 +2668,17 @@ xcopy "$(ProjectDir)"..\packages\SqlServerCE.4.0.0.0\x86\*.* "$(TargetDir)x86\"
-
+
+
+
+
+
+
+
diff --git a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/EmptyTemplate (ForUseWithCustomViews).cshtml b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/Empty (ForUseWithCustomViews).cshtml
similarity index 100%
rename from src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/EmptyTemplate (ForUseWithCustomViews).cshtml
rename to src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/Empty (ForUseWithCustomViews).cshtml
diff --git a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/EmptyTemplate.cshtml b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/Empty.cshtml
similarity index 100%
rename from src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/EmptyTemplate.cshtml
rename to src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/Empty.cshtml
diff --git a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/MultinodeTree-picker.cshtml b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/MultinodeTree-picker.cshtml
index f9e913d9c4..062e5c7171 100644
--- a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/MultinodeTree-picker.cshtml
+++ b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/MultinodeTree-picker.cshtml
@@ -10,10 +10,10 @@
@* Lists each selected value from the picker as a link *@
- @foreach(var id in CurrentPage.PropertyWithPicker){
+ @foreach(var id in CurrentPage.PropertyWithPicker.Split(',')){
@*For each link, get the node, and display its name and url*@
- var content = Umbraco.Content(id.InnerText);
+ var content = Umbraco.Content(id);
}
diff --git a/src/Umbraco.Web.UI/Umbraco/PartialViews/Templates/EmptyTemplate (ForUseWithCustomViews).cshtml b/src/Umbraco.Web.UI/Umbraco/PartialViews/Templates/Empty (ForUseWithCustomViews).cshtml
similarity index 100%
rename from src/Umbraco.Web.UI/Umbraco/PartialViews/Templates/EmptyTemplate (ForUseWithCustomViews).cshtml
rename to src/Umbraco.Web.UI/Umbraco/PartialViews/Templates/Empty (ForUseWithCustomViews).cshtml
diff --git a/src/Umbraco.Web.UI/Umbraco/PartialViews/Templates/Empty.cshtml b/src/Umbraco.Web.UI/Umbraco/PartialViews/Templates/Empty.cshtml
new file mode 100644
index 0000000000..2363dcc14c
--- /dev/null
+++ b/src/Umbraco.Web.UI/Umbraco/PartialViews/Templates/Empty.cshtml
@@ -0,0 +1 @@
+@inherits Umbraco.Web.Mvc.UmbracoTemplatePage
\ No newline at end of file
diff --git a/src/Umbraco.Web.UI/Umbraco/PartialViews/Templates/EmptyTemplate.cshtml b/src/Umbraco.Web.UI/Umbraco/PartialViews/Templates/EmptyTemplate.cshtml
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/src/Umbraco.Web.UI/Umbraco/PartialViews/Templates/MultinodeTree-picker.cshtml b/src/Umbraco.Web.UI/Umbraco/PartialViews/Templates/MultinodeTree-picker.cshtml
index 39efceb361..b3e292230d 100644
--- a/src/Umbraco.Web.UI/Umbraco/PartialViews/Templates/MultinodeTree-picker.cshtml
+++ b/src/Umbraco.Web.UI/Umbraco/PartialViews/Templates/MultinodeTree-picker.cshtml
@@ -10,10 +10,10 @@
@* Lists each selected value from the picker as a link *@
- @foreach(var id in CurrentPage.PropertyWithPicker){
+ @foreach(var id in CurrentPage.PropertyWithPicker.Split(',')){
@*For each link, get the node, and display its name and url*@
- var content = Umbraco.Content(id.InnerText);
+ var content = Umbraco.Content(id);
}
diff --git a/src/Umbraco.Web.UI/Umbraco/create/PartialView.ascx b/src/Umbraco.Web.UI/Umbraco/create/PartialView.ascx
index bf10210713..b34560a19e 100644
--- a/src/Umbraco.Web.UI/Umbraco/create/PartialView.ascx
+++ b/src/Umbraco.Web.UI/Umbraco/create/PartialView.ascx
@@ -22,5 +22,5 @@
<%=umbraco.ui.Text("cancel")%>
-
+
diff --git a/src/Umbraco.Web.UI/Umbraco/create/PartialView.ascx.cs b/src/Umbraco.Web.UI/Umbraco/create/PartialView.ascx.cs
index 5fcd310656..6ba27b5fe7 100644
--- a/src/Umbraco.Web.UI/Umbraco/create/PartialView.ascx.cs
+++ b/src/Umbraco.Web.UI/Umbraco/create/PartialView.ascx.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
using System.Linq;
using System.Web.UI;
using System.Web.UI.WebControls;
@@ -24,16 +24,16 @@ namespace Umbraco.Web.UI.Umbraco.Create
var path = IOHelper.MapPath(SystemDirectories.Umbraco + "/PartialViews/Templates/");
list.Items.Clear();
- // always add the options of empty templates
- list.Items.Add(new ListItem("Empty Template", "EmptyTemplate.cshtml"));
- list.Items.Add(new ListItem("Empty Template (For Use With Custom Views)", "EmptyTemplate (ForUseWithCustomViews).cshtml"));
+ // always add the options of empty snippets
+ list.Items.Add(new ListItem("Empty", "Empty.cshtml"));
+ list.Items.Add(new ListItem("Empty (For Use With Custom Views)", "Empty (ForUseWithCustomViews).cshtml"));
if (System.IO.Directory.Exists(path))
{
const string extension = ".cshtml";
- //Already adding Empty Template as the first item, so don't add it again
- foreach (var fileInfo in new System.IO.DirectoryInfo(path).GetFiles("*" + extension).Where(f => f.Name.StartsWith("EmptyTemplate") == false))
+ //Already adding Empty as the first item, so don't add it again
+ foreach (var fileInfo in new System.IO.DirectoryInfo(path).GetFiles("*" + extension).Where(f => f.Name.StartsWith("Empty") == false))
{
var filename = System.IO.Path.GetFileName(fileInfo.FullName);
diff --git a/src/Umbraco.Web.UI/config/splashes/booting.aspx b/src/Umbraco.Web.UI/config/splashes/booting.aspx
index 267e36b369..1bea61f89d 100644
--- a/src/Umbraco.Web.UI/config/splashes/booting.aspx
+++ b/src/Umbraco.Web.UI/config/splashes/booting.aspx
@@ -2,7 +2,7 @@
<%
// NH: Adds this inline check to avoid a simple codebehind file in the legacy project!
- if (!umbraco.cms.helpers.url.ValidateProxyUrl(Request["url"], Request.Url.AbsoluteUri))
+ if (Request["url"].ToLower().Contains("booting.aspx") || !umbraco.cms.helpers.url.ValidateProxyUrl(Request["url"], Request.Url.AbsoluteUri))
{
throw new ArgumentException("Can't redirect to the requested url - it's not local or an approved proxy url",
"url");
diff --git a/src/Umbraco.Web.UI/install/InstallerRestService.aspx.cs b/src/Umbraco.Web.UI/install/InstallerRestService.aspx.cs
index 248e6c17d2..8b197d75f0 100644
--- a/src/Umbraco.Web.UI/install/InstallerRestService.aspx.cs
+++ b/src/Umbraco.Web.UI/install/InstallerRestService.aspx.cs
@@ -1,6 +1,7 @@
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;
@@ -97,6 +98,11 @@ namespace Umbraco.Web.UI.Install
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;
diff --git a/src/Umbraco.Web.UI/install/steps/Database.ascx.cs b/src/Umbraco.Web.UI/install/steps/Database.ascx.cs
index ede7132da0..45eab19d45 100644
--- a/src/Umbraco.Web.UI/install/steps/Database.ascx.cs
+++ b/src/Umbraco.Web.UI/install/steps/Database.ascx.cs
@@ -161,10 +161,10 @@ namespace Umbraco.Web.UI.Install.Steps
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);
+ 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();";
@@ -243,15 +243,15 @@ namespace Umbraco.Web.UI.Install.Steps
/// The event arguments.
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(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)
+ private static void ToggleVisible(HtmlGenericControl div, bool visible)
{
if (!visible)
div.Attributes["style"] = "display: none;";
diff --git a/src/Umbraco.Web.UI/install/steps/TheEnd.ascx.cs b/src/Umbraco.Web.UI/install/steps/TheEnd.ascx.cs
index 4053f0c782..141bc56958 100644
--- a/src/Umbraco.Web.UI/install/steps/TheEnd.ascx.cs
+++ b/src/Umbraco.Web.UI/install/steps/TheEnd.ascx.cs
@@ -1,5 +1,9 @@
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
{
@@ -12,15 +16,20 @@ namespace Umbraco.Web.UI.Install.Steps
{
GlobalSettings.ConfigurationStatus = UmbracoVersion.Current.ToString(3);
}
- catch (Exception)
+ catch (Exception ex)
{
- //errorLiteral.Text = ex.ToString();
+ LogHelper.Error("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();
}
}
diff --git a/src/Umbraco.Web.UI/umbraco/ClientRedirect.aspx b/src/Umbraco.Web.UI/umbraco/ClientRedirect.aspx
new file mode 100644
index 0000000000..fd9c5182f2
--- /dev/null
+++ b/src/Umbraco.Web.UI/umbraco/ClientRedirect.aspx
@@ -0,0 +1,23 @@
+<%@ Page Language="C#" AutoEventWireup="true" Inherits="System.Web.UI.Page" %>
+<%--
+ This page is required because we cannot reload the angular app with a changed Hash since it just detects the hash and doesn't reload.
+ So this is used purely for a full reload of an angular app with a changed hash.
+--%>
+
+
+
+ Redirecting...
+
+
+
+ Redirecting...
+
+
diff --git a/src/Umbraco.Web.UI/umbraco/config/create/UI.Release.xml b/src/Umbraco.Web.UI/umbraco/config/create/UI.Release.xml
index 742b1f36c4..d05908e2cf 100644
--- a/src/Umbraco.Web.UI/umbraco/config/create/UI.Release.xml
+++ b/src/Umbraco.Web.UI/umbraco/config/create/UI.Release.xml
@@ -61,7 +61,7 @@
User
- /create/simple.ascx
+ /create/user.ascx
diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/da.xml b/src/Umbraco.Web.UI/umbraco/config/lang/da.xml
index 1c9c21cdbe..c4b85332fa 100644
--- a/src/Umbraco.Web.UI/umbraco/config/lang/da.xml
+++ b/src/Umbraco.Web.UI/umbraco/config/lang/da.xml
@@ -467,20 +467,21 @@
Rediger dine notificeringer for %0%
-
+
- Hej %0%
Dette er en automatisk mail for at informere dig om at opgaven '%1%' er blevet udførtpå siden '%2%' af brugeren '%3%'
]]>[%0%] Notificering om %1% udført på %2%Notificeringer
diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/de.xml b/src/Umbraco.Web.UI/umbraco/config/lang/de.xml
index 3721090de9..c2c16cccec 100644
--- a/src/Umbraco.Web.UI/umbraco/config/lang/de.xml
+++ b/src/Umbraco.Web.UI/umbraco/config/lang/de.xml
@@ -497,15 +497,15 @@ Wenn Sie sich für Runway entscheiden, können Sie optional Blöcke nutzen, die
Bearbeiten Sie Ihre Benachrichtigungseinstellungen für '%0%'
-Hallo %0%,
+ Hallo %0%,
-die Aufgabe '%1%' (von Benutzer '%3%') an der Seite '%2%' wurde ausgeführt.
+ die Aufgabe '%1%' (von Benutzer '%3%') an der Seite '%2%' wurde ausgeführt.
-Zum Bearbeiten verwenden Sie bitte diesen Link: http://%4%/umbraco/actions/editContent.aspx?id=%5%
+ Zum Bearbeiten verwenden Sie bitte diesen Link: http://%4%/#/content/content/edit/%5%
-Einen schönen Tag wünscht
-Ihr freundlicher Umbraco-Robot
-
+ Einen schönen Tag wünscht
+ Ihr freundlicher Umbraco-Robot
+
<p>Hallo %0%,</p>
diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/en.xml b/src/Umbraco.Web.UI/umbraco/config/lang/en.xml
index f417282ac2..1c04ba81e1 100644
--- a/src/Umbraco.Web.UI/umbraco/config/lang/en.xml
+++ b/src/Umbraco.Web.UI/umbraco/config/lang/en.xml
@@ -584,7 +584,7 @@ To manage your website, simply open the umbraco back office and start adding con
has been performed on the page '%2%'
by the user '%3%'
- Go to http://%4%/actions/editContent.aspx?id=%5% to edit.
+ Go to http://%4%/#/content/content/edit/%5% to edit.
Have a nice day!
@@ -593,14 +593,12 @@ To manage your website, simply open the umbraco back office and start adding con
Hi %0%
This is an automated mail to inform you that the task '%1%'
- has been performed on the page '%2%'
+ has been performed on the page '%2%'
by the user '%3%'
diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/en_us.xml b/src/Umbraco.Web.UI/umbraco/config/lang/en_us.xml
index b4266e8fd2..4311d1f04c 100644
--- a/src/Umbraco.Web.UI/umbraco/config/lang/en_us.xml
+++ b/src/Umbraco.Web.UI/umbraco/config/lang/en_us.xml
@@ -582,7 +582,7 @@ To manage your website, simply open the umbraco back office and start adding con
has been performed on the page '%2%'
by the user '%3%'
- Go to http://%4%/actions/editContent.aspx?id=%5% to edit.
+ Go to http://%4%/#/content/content/edit/%5% to edit.
Have a nice day!
@@ -598,9 +598,7 @@ To manage your website, simply open the umbraco back office and start adding con
diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/es.xml b/src/Umbraco.Web.UI/umbraco/config/lang/es.xml
index 30bc95d93c..bc45128d7a 100644
--- a/src/Umbraco.Web.UI/umbraco/config/lang/es.xml
+++ b/src/Umbraco.Web.UI/umbraco/config/lang/es.xml
@@ -433,8 +433,8 @@ However, Runway offers an easy foundation based on best practices to get you sta
Edite su notificación para %0%
- Hola %0% Esto es un e-mail automático para informarle que la tarea '%1%' ha sido realizada sobre la página '%2%' por el usuario '%3%' Vaya a http://%4%/actions/editContent.aspx?id=%5% para editarla. ¡Espero que tenga un buen día! Saludos del robot de umbraco
- Hola %0%
Esto es un e-mail generado automáticamente para informarle que la tarea '%1%' ha sido realizada sobre la página '%2%' por el usuario '%3%'
]]>
+ Hola %0% Esto es un e-mail automático para informarle que la tarea '%1%' ha sido realizada sobre la página '%2%' por el usuario '%3%' Vaya a http://%4%/#/content/content/edit/%5% para editarla. ¡Espero que tenga un buen día! Saludos del robot de umbraco
+ Hola %0%
Esto es un e-mail generado automáticamente para informarle que la tarea '%1%' ha sido realizada sobre la página '%2%' por el usuario '%3%'
]]>[%0%] Notificación acerca de %1% realizado en %2%Notificaciones
diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/fr.xml b/src/Umbraco.Web.UI/umbraco/config/lang/fr.xml
index 0f10085ab9..7524dd527c 100644
--- a/src/Umbraco.Web.UI/umbraco/config/lang/fr.xml
+++ b/src/Umbraco.Web.UI/umbraco/config/lang/fr.xml
@@ -534,7 +534,7 @@ Pour gerer votre site, accéder simplement au back office et commencez à contri
Ceci est un email automatique pour vous informer que la tâche '%1%' a été activée sur la page '%2%' par l'utilisateur '%3%'
- Allez à http://%4%/actions/editContent.aspx?id=%5% pour éditer.
+ Allez à http://%4%/#/content/content/edit/%5% pour éditer.
Bonne journée!
@@ -549,10 +549,8 @@ Pour gerer votre site, accéder simplement au back office et commencez à contri
par l'utilisateur '%3%'
diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/he.xml b/src/Umbraco.Web.UI/umbraco/config/lang/he.xml
index 201001ffbc..d22a0474e1 100644
--- a/src/Umbraco.Web.UI/umbraco/config/lang/he.xml
+++ b/src/Umbraco.Web.UI/umbraco/config/lang/he.xml
@@ -509,9 +509,7 @@ To manage your website, simply open the umbraco back office and start adding con
diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/it.xml b/src/Umbraco.Web.UI/umbraco/config/lang/it.xml
index d925460d57..f75a1d73be 100644
--- a/src/Umbraco.Web.UI/umbraco/config/lang/it.xml
+++ b/src/Umbraco.Web.UI/umbraco/config/lang/it.xml
@@ -458,7 +458,7 @@ Per gestire il tuo sito web, è sufficiente aprire il back office di Umbraco e i
è stata eseguita sulla pagina '%2%'
dall'utente '%3%'
- Vai al link http://%4%/actions/editContent.aspx?id=%5% per effettuare le modifiche.
+ Vai al link http://%4%/#/content/content/edit/%5% per effettuare le modifiche.
Buona giornata!
@@ -473,9 +473,7 @@ Per gestire il tuo sito web, è sufficiente aprire il back office di Umbraco e i
diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/ko.xml b/src/Umbraco.Web.UI/umbraco/config/lang/ko.xml
index 0a7ba87cff..2ec2088a01 100644
--- a/src/Umbraco.Web.UI/umbraco/config/lang/ko.xml
+++ b/src/Umbraco.Web.UI/umbraco/config/lang/ko.xml
@@ -475,7 +475,7 @@
사용자 '%3%' 가 작업 '%1%' 를 페이지 '%2%' 에서
진행했음을 알리는 자동 발송 메일입니다.
- 편집하시려면 http://%4%/actions/editContent.aspx?id=%5% 로 이동하세요
+ 편집하시려면 http://%4%/#/content/content/edit/%5% 로 이동하세요
좋은 하루 되세요!
@@ -488,9 +488,7 @@
diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/nl.xml b/src/Umbraco.Web.UI/umbraco/config/lang/nl.xml
index 39c7f53647..02f41b141f 100644
--- a/src/Umbraco.Web.UI/umbraco/config/lang/nl.xml
+++ b/src/Umbraco.Web.UI/umbraco/config/lang/nl.xml
@@ -437,7 +437,7 @@ Echter, Runway biedt een gemakkelijke basis om je snel op weg te helpen. Als je
is uitgevoerd op pagina '%2%'
door gebruiker '%3%'
- Ga naar http://%4%/actions/editContent.aspx?id=%5% om te bewerken.
+ Ga naar http://%4%/#/content/content/edit/%5% om te bewerken.
Een prettige dag!
@@ -451,10 +451,8 @@ Echter, Runway biedt een gemakkelijke basis om je snel op weg te helpen. Als je
door gebruiker '%3%'
]]>[%0%] Powiadomienie o %1% wykonane na %2%Powiadomienie
diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/pt.xml b/src/Umbraco.Web.UI/umbraco/config/lang/pt.xml
index ec10a7bdce..bbb0e7e5e2 100644
--- a/src/Umbraco.Web.UI/umbraco/config/lang/pt.xml
+++ b/src/Umbraco.Web.UI/umbraco/config/lang/pt.xml
@@ -467,7 +467,7 @@ Pressione "próximo" para iniciar o assistente.]]>
Esta é uma mensagem automatizada de email para informar que a tarefa '%1%' foi realizada na página '%2%' pelo usuário '%3%'
-Vá até http://%4%/actions/editContent.aspx?id=%5% para editar.
+Vá até http://%4%/#/content/content/edit/%5% para editar.
Tenha um bom dia!
@@ -480,9 +480,7 @@ Vá até http://%4%/actions/editContent.aspx?id=%5% para editar.
diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/ru.xml b/src/Umbraco.Web.UI/umbraco/config/lang/ru.xml
index d21847c9f8..667dcfe4a9 100644
--- a/src/Umbraco.Web.UI/umbraco/config/lang/ru.xml
+++ b/src/Umbraco.Web.UI/umbraco/config/lang/ru.xml
@@ -515,7 +515,7 @@
Операция '%1%'
была произведена на странице '%2%' пользователем '%3%'.
- Вы можете увидеть изменения и отредактировать, перейдя по ссылке http://%4%/actions/editContent.aspx?id=%5%.
+ Вы можете увидеть изменения и отредактировать, перейдя по ссылке http://%4%/#/content/content/edit/%5%.
Удачи!
@@ -529,9 +529,7 @@
diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/sv.xml b/src/Umbraco.Web.UI/umbraco/config/lang/sv.xml
index bb7f487072..3db191537b 100644
--- a/src/Umbraco.Web.UI/umbraco/config/lang/sv.xml
+++ b/src/Umbraco.Web.UI/umbraco/config/lang/sv.xml
@@ -496,7 +496,7 @@
Inställningar för notifieringar gällande {0}Hej {0} Detta mail skickas till dig automatiskt för att meddela att '{1}' har utförts på sidan '{2}' av användaren '{3}' Gå till http://{4}/actions/editContent.aspx?id={5} för att redigera.
- Hej {0}
Detta mail skickas till dig automatiskt för att meddela att '{1}' har utförts på sidan '{2}' av användaren '{3}'
- This repository requires authentication before you can download any packages from
- it.
- Please enter email and password to login.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Please note: Installing a package containing several items and
- files can take some time. Do not refresh the page or navigate away before, the installer
- notifies you the install is completed.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Binary files in the package!
-
- Read more...
-
-
-
- This package contains .NET code. This is not unusual as .NET code
- is used for any advanced functionality on an Umbraco powered website.
-
- However, if you don't know the author of the package or are unsure why this package
- contains these files, it is adviced not to continue the installation.
-
-
- The Files in question:
-
-
-
-
-
-
-
-
-
-
- Macro Conflicts in the package!
-
- Read more...
-
-
-
- This package contains one or more macros which have the same alias as an existing one on your site, based on the Macro Alias.
-
-
- If you choose to continue your existing macros will be replaced with the ones from this package. If you do not want to overwrite your existing macros you will need to change their alias.
-
-
- The Macros in question:
-
-
-
-
-
-
-
-
-
-
- Template Conflicts in the package!
-
- Read more...
-
-
-
- This package contains one or more templates which have the same alias as an existing one on your site, based on the Template Alias.
-
-
- If you choose to continue your existing template will be replaced with the ones from this package. If you do not want to overwrite your existing templates you will need to change their alias.
-
-
- The Templates in question:
-
-
-
-
-
-
-
-
-
-
- Stylesheet Conflicts in the package!
-
- Read more...
-
-
-
- This package contains one or more stylesheets which have the same alias as an existing one on your site, based on the Stylesheet Name.
-
-
- If you choose to continue your existing stylesheets will be replaced with the ones from this package. If you do not want to overwrite your existing stylesheets you will need to change their name.
-
-
- The Stylesheets in question:
-
-
-
-
-
-
-
-
-
-
-
-
- Installing package, please wait...
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- All items in the package has been installed
-
- Overview of what was installed can found under "installed package" in the developer
- section.
-
- Uninstall is available at the same location.
-
-
-
-
-
-
-
-
-
-
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Packages/installer.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Packages/installer.aspx.cs
index e18d46c625..a429f3018f 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Packages/installer.aspx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Packages/installer.aspx.cs
@@ -1,8 +1,9 @@
-using System;
+using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
+using System.Globalization;
using System.Threading;
using System.Web;
using System.Web.SessionState;
@@ -36,6 +37,8 @@ namespace umbraco.presentation.developer.packages
private readonly cms.businesslogic.packager.Installer _installer = new cms.businesslogic.packager.Installer();
private string _tempFileName = "";
+ protected string RefreshQueryString { get; set; }
+
protected void Page_Load(object sender, EventArgs e)
{
var ex = new Exception();
@@ -53,9 +56,9 @@ namespace umbraco.presentation.developer.packages
}
//if we are actually in the middle of installing something... meaning we keep redirecting back to this page with
- // custom query strings
- // TODO: SD: This process needs to be fixed/changed/etc... to use the InstallPackageController
- // http://issues.umbraco.org/issue/U4-1047
+ // custom query strings
+ // TODO: SD: This process needs to be fixed/changed/etc... to use the InstallPackageController
+ // http://issues.umbraco.org/issue/U4-1047
if (!string.IsNullOrEmpty(Request.GetItemAsString("installing")))
{
HideAllPanes();
@@ -63,22 +66,22 @@ namespace umbraco.presentation.developer.packages
ProcessInstall(Request.GetItemAsString("installing")); //process the current step
}
- else if (tempFile.Value.IsNullOrWhiteSpace() //if we haven't downloaded the .umb temp file yet
- && (!Request.GetItemAsString("guid").IsNullOrWhiteSpace() && !Request.GetItemAsString("repoGuid").IsNullOrWhiteSpace()))
+ else if (tempFile.Value.IsNullOrWhiteSpace() //if we haven't downloaded the .umb temp file yet
+ && (!Request.GetItemAsString("guid").IsNullOrWhiteSpace() && !Request.GetItemAsString("repoGuid").IsNullOrWhiteSpace()))
{
//we'll fetch the local information we have about our repo, to find out what webservice to query.
- _repo = cms.businesslogic.packager.repositories.Repository.getByGuid(Request.GetItemAsString("repoGuid"));
-
+ _repo = cms.businesslogic.packager.repositories.Repository.getByGuid(Request.GetItemAsString("repoGuid"));
+
if (_repo != null && _repo.HasConnection())
{
//from the webservice we'll fetch some info about the package.
- cms.businesslogic.packager.repositories.Package pack = _repo.Webservice.PackageByGuid(Request.GetItemAsString("guid"));
+ cms.businesslogic.packager.repositories.Package pack = _repo.Webservice.PackageByGuid(Request.GetItemAsString("guid"));
//if the package is protected we will ask for the users credentials. (this happens every time they try to fetch anything)
if (!pack.Protected)
{
//if it isn't then go straigt to the accept licens screen
- tempFile.Value = _installer.Import(_repo.fetch(Request.GetItemAsString("guid")));
+ tempFile.Value = _installer.Import(_repo.fetch(Request.GetItemAsString("guid")));
UpdateSettings();
}
@@ -94,7 +97,7 @@ namespace umbraco.presentation.developer.packages
else
{
fb.Style.Add("margin-top", "7px");
- fb.type = global::umbraco.uicontrols.Feedback.feedbacktype.error;
+ fb.type = uicontrols.Feedback.feedbacktype.error;
fb.Text = "No connection to repository. Runway could not be installed as there was no connection to: '" + _repo.RepositoryUrl + "'";
pane_upload.Visible = false;
}
@@ -107,7 +110,7 @@ namespace umbraco.presentation.developer.packages
acceptCheckbox.Attributes.Add("onmouseup", "document.getElementById('" + ButtonInstall.ClientID + "').disabled = false;");
}
- protected void uploadFile(object sender, System.EventArgs e)
+ protected void uploadFile(object sender, EventArgs e)
{
try
{
@@ -131,7 +134,7 @@ namespace umbraco.presentation.developer.packages
string memberGuid = _repo.Webservice.authenticate(tb_email.Text, library.md5(tb_password.Text));
//if we auth correctly and get a valid key back, we will fetch the file from the repo webservice.
- if (!string.IsNullOrEmpty(memberGuid))
+ if (string.IsNullOrEmpty(memberGuid) == false)
{
tempFile.Value = _installer.Import(_repo.fetch(helper.Request("guid"), memberGuid));
UpdateSettings();
@@ -212,77 +215,80 @@ namespace umbraco.presentation.developer.packages
private void ProcessInstall(string currentStep)
{
- var dir = Request.GetItemAsString("dir");
+ var dir = Request.GetItemAsString("dir");
var packageId = 0;
- int.TryParse(Request.GetItemAsString("pId"), out packageId);
+ int.TryParse(Request.GetItemAsString("pId"), out packageId);
switch (currentStep)
{
case "businesslogic":
- //first load in the config from the temporary directory
- //this will ensure that the installer have access to all the new files and the package manifest
- _installer.LoadConfig(dir);
+ //first load in the config from the temporary directory
+ //this will ensure that the installer have access to all the new files and the package manifest
+ _installer.LoadConfig(dir);
_installer.InstallBusinessLogic(packageId, dir);
//making sure that publishing actions performed from the cms layer gets pushed to the presentation
library.RefreshContent();
-
- if (!string.IsNullOrEmpty(_installer.Control))
+
+ if (string.IsNullOrEmpty(_installer.Control) == false)
{
- Response.Redirect("installer.aspx?installing=customInstaller&dir=" + dir + "&pId=" + packageId.ToString() + "&customControl=" + Server.UrlEncode(_installer.Control) + "&customUrl=" + Server.UrlEncode(_installer.Url));
+ Response.Redirect("installer.aspx?installing=refresh&dir=" + dir + "&pId=" + packageId.ToString() + "&customControl=" + Server.UrlEncode(_installer.Control) + "&customUrl=" + Server.UrlEncode(_installer.Url));
}
else
{
- Response.Redirect("installer.aspx?installing=finished&dir=" + dir + "&pId=" + packageId.ToString() + "&customUrl=" + Server.UrlEncode(_installer.Url));
+ Response.Redirect("installer.aspx?installing=refresh&dir=" + dir + "&pId=" + packageId.ToString() + "&customUrl=" + Server.UrlEncode(_installer.Url));
}
break;
case "customInstaller":
- var customControl = Request.GetItemAsString("customControl");
+ var customControl = Request.GetItemAsString("customControl");
- if (!customControl.IsNullOrWhiteSpace())
+ if (customControl.IsNullOrWhiteSpace() == false)
{
HideAllPanes();
- _configControl = new System.Web.UI.UserControl().LoadControl(SystemDirectories.Root + customControl);
+ _configControl = LoadControl(SystemDirectories.Root + customControl);
_configControl.ID = "packagerConfigControl";
pane_optional.Controls.Add(_configControl);
pane_optional.Visible = true;
- if (!IsPostBack)
- {
- //We still need to clean everything up which is normally done in the Finished Action
- PerformPostInstallCleanup(packageId, dir);
- }
-
+ if (!IsPostBack)
+ {
+ //We still need to clean everything up which is normally done in the Finished Action
+ PerformPostInstallCleanup(packageId, dir);
+ }
+
}
else
{
//if the custom installer control is empty here (though it should never be because we've already checked for it previously)
- //then we should run the normal FinishedAction
- PerformFinishedAction(packageId, dir, Request.GetItemAsString("customUrl"));
+ //then we should run the normal FinishedAction
+ PerformFinishedAction(packageId, dir, Request.GetItemAsString("customUrl"));
}
break;
+ case "refresh":
+ PerformRefreshAction(packageId, dir, Request.GetItemAsString("customUrl"), Request.GetItemAsString("customControl"));
+ break;
case "finished":
- PerformFinishedAction(packageId, dir, Request.GetItemAsString("customUrl"));
+ PerformFinishedAction(packageId, dir, Request.GetItemAsString("customUrl"));
break;
default:
break;
}
}
- ///
- /// Perform the 'Finished' action of the installer
- ///
- ///
- ///
- ///
- private void PerformFinishedAction(int packageId, string dir, string url)
- {
- HideAllPanes();
- //string url = _installer.Url;
- string packageViewUrl = "installedPackage.aspx?id=" + packageId.ToString();
+ ///
+ /// Perform the 'Finished' action of the installer
+ ///
+ ///
+ ///
+ ///
+ private void PerformFinishedAction(int packageId, string dir, string url)
+ {
+ HideAllPanes();
+ //string url = _installer.Url;
+ string packageViewUrl = "installedPackage.aspx?id=" + packageId.ToString(CultureInfo.InvariantCulture);
bt_viewInstalledPackage.OnClientClick = "document.location = '" + packageViewUrl + "'; return false;";
@@ -292,23 +298,65 @@ namespace umbraco.presentation.developer.packages
pane_success.Visible = true;
- PerformPostInstallCleanup(packageId, dir);
- }
+ PerformPostInstallCleanup(packageId, dir);
+ }
- ///
- /// Runs Post install actions such as clearning any necessary cache, reloading the correct tree nodes, etc...
- ///
- ///
- ///
- private void PerformPostInstallCleanup(int packageId, string dir)
- {
- BasePage.Current.ClientTools.ReloadActionNode(true, true);
- _installer.InstallCleanUp(packageId, dir);
- //clear the tree cache
- ClientTools.ClearClientTreeCache().RefreshTree("packager");
- TreeDefinitionCollection.Instance.ReRegisterTrees();
- BizLogicAction.ReRegisterActionsAndHandlers();
- }
+ ///
+ /// Perform the 'Refresh' action of the installer
+ ///
+ ///
+ ///
+ ///
+ ///
+ private void PerformRefreshAction(int packageId, string dir, string url, string customControl)
+ {
+ HideAllPanes();
+
+ //create the URL to refresh to
+ // /umbraco/developer/packages/installer.aspx?installing=finished
+ // &dir=X:\Projects\Umbraco\Umbraco_7.0\src\Umbraco.Web.UI\App_Data\aef8c41f-63a0-494b-a1e2-10d761647033
+ // &pId=3
+ // &customUrl=http:%2f%2four.umbraco.org%2fprojects%2fwebsite-utilities%2fmerchello
+
+ if (customControl.IsNullOrWhiteSpace())
+ {
+ RefreshQueryString = Server.UrlEncode(string.Format(
+ "installing=finished&dir={0}&pId={1}&customUrl={2}",
+ dir, packageId, url));
+ }
+ else
+ {
+ RefreshQueryString = Server.UrlEncode(string.Format(
+ "installing=customInstaller&dir={0}&pId={1}&customUrl={2}&customControl={3}",
+ dir, packageId, url, customControl));
+ }
+
+ pane_refresh.Visible = true;
+
+ PerformPostInstallCleanup(packageId, dir);
+ }
+
+ ///
+ /// Runs Post refresh actions such reloading the correct tree nodes, etc...
+ ///
+ private void PerformPostRefreshAction()
+ {
+ BasePage.Current.ClientTools.ReloadActionNode(true, true);
+ }
+
+ ///
+ /// Runs Post install actions such as clearning any necessary cache, reloading the correct tree nodes, etc...
+ ///
+ ///
+ ///
+ private void PerformPostInstallCleanup(int packageId, string dir)
+ {
+ _installer.InstallCleanUp(packageId, dir);
+ //clear the tree cache - we'll do this here even though the browser will reload, but just in case it doesn't can't hurt.
+ ClientTools.ClearClientTreeCache().RefreshTree("packager");
+ TreeDefinitionCollection.Instance.ReRegisterTrees();
+ BizLogicAction.ReRegisterActionsAndHandlers();
+ }
//this accepts the package, creates the manifest and then installs the files.
protected void startInstall(object sender, System.EventArgs e)
@@ -323,11 +371,11 @@ namespace umbraco.presentation.developer.packages
//and then copy over the files. This will take some time if it contains .dlls that will reboot the system..
_installer.InstallFiles(pId, tempFile.Value);
- //TODO: This is a total hack, we need to refactor the installer to be just like the package installer during the
- // install process and use AJAX to ensure that app pool restarts and restarts PROPERLY before installing the business
- // logic. Until then, we are going to put a thread sleep here for 2 seconds in hopes that we always fluke out and the app
- // pool will be restarted after redirect.
- Thread.Sleep(2000);
+ //TODO: This is a total hack, we need to refactor the installer to be just like the package installer during the
+ // install process and use AJAX to ensure that app pool restarts and restarts PROPERLY before installing the business
+ // logic. Until then, we are going to put a thread sleep here for 2 seconds in hopes that we always fluke out and the app
+ // pool will be restarted after redirect.
+ Thread.Sleep(2000);
Response.Redirect("installer.aspx?installing=businesslogic&dir=" + tempFile.Value + "&pId=" + pId.ToString());
}
@@ -339,7 +387,428 @@ namespace umbraco.presentation.developer.packages
pane_installing.Visible = false;
pane_optional.Visible = false;
pane_success.Visible = false;
+ pane_refresh.Visible = false;
pane_upload.Visible = false;
}
+
+ ///
+ /// Panel1 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::umbraco.uicontrols.UmbracoPanel Panel1;
+
+ ///
+ /// fb control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::umbraco.uicontrols.Feedback fb;
+
+ ///
+ /// pane_upload control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::umbraco.uicontrols.Pane pane_upload;
+
+ ///
+ /// PropertyPanel9 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::umbraco.uicontrols.PropertyPanel PropertyPanel9;
+
+ ///
+ /// file1 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlInputFile file1;
+
+ ///
+ /// ButtonLoadPackage control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button ButtonLoadPackage;
+
+ ///
+ /// progbar1 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::umbraco.uicontrols.ProgressBar progbar1;
+
+ ///
+ /// pane_authenticate control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::umbraco.uicontrols.Pane pane_authenticate;
+
+ ///
+ /// tb_email control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox tb_email;
+
+ ///
+ /// PropertyPanel1 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::umbraco.uicontrols.PropertyPanel PropertyPanel1;
+
+ ///
+ /// tb_password control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox tb_password;
+
+ ///
+ /// PropertyPanel2 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::umbraco.uicontrols.PropertyPanel PropertyPanel2;
+
+ ///
+ /// Button1 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button Button1;
+
+ ///
+ /// pane_acceptLicense control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Panel pane_acceptLicense;
+
+ ///
+ /// pane_acceptLicenseInner control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::umbraco.uicontrols.Pane pane_acceptLicenseInner;
+
+ ///
+ /// PropertyPanel3 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::umbraco.uicontrols.PropertyPanel PropertyPanel3;
+
+ ///
+ /// LabelName control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label LabelName;
+
+ ///
+ /// PropertyPanel5 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::umbraco.uicontrols.PropertyPanel PropertyPanel5;
+
+ ///
+ /// LabelAuthor control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label LabelAuthor;
+
+ ///
+ /// PropertyPanel4 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::umbraco.uicontrols.PropertyPanel PropertyPanel4;
+
+ ///
+ /// LabelMore control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label LabelMore;
+
+ ///
+ /// PropertyPanel6 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::umbraco.uicontrols.PropertyPanel PropertyPanel6;
+
+ ///
+ /// LabelLicense control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label LabelLicense;
+
+ ///
+ /// PropertyPanel7 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::umbraco.uicontrols.PropertyPanel PropertyPanel7;
+
+ ///
+ /// acceptCheckbox control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.CheckBox acceptCheckbox;
+
+ ///
+ /// PropertyPanel8 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::umbraco.uicontrols.PropertyPanel PropertyPanel8;
+
+ ///
+ /// readme control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal readme;
+
+ ///
+ /// pp_unsecureFiles control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::umbraco.uicontrols.PropertyPanel pp_unsecureFiles;
+
+ ///
+ /// lt_files control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal lt_files;
+
+ ///
+ /// pp_macroConflicts control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::umbraco.uicontrols.PropertyPanel pp_macroConflicts;
+
+ ///
+ /// ltrMacroAlias control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal ltrMacroAlias;
+
+ ///
+ /// pp_templateConflicts control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::umbraco.uicontrols.PropertyPanel pp_templateConflicts;
+
+ protected global::umbraco.uicontrols.PropertyPanel BinaryFileErrorsPanel;
+ protected global::umbraco.uicontrols.PropertyPanel LegacyPropertyEditorPanel;
+ protected global::System.Web.UI.WebControls.Literal BinaryFileErrorReport;
+
+ ///
+ /// ltrTemplateAlias control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal ltrTemplateAlias;
+
+ ///
+ /// pp_stylesheetConflicts control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::umbraco.uicontrols.PropertyPanel pp_stylesheetConflicts;
+
+ ///
+ /// ltrStylesheetNames control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal ltrStylesheetNames;
+
+ ///
+ /// _progbar1 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::umbraco.uicontrols.ProgressBar _progbar1;
+
+ ///
+ /// ButtonInstall control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button ButtonInstall;
+
+ ///
+ /// pane_installing control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::umbraco.uicontrols.Pane pane_installing;
+
+ ///
+ /// progBar2 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::umbraco.uicontrols.ProgressBar progBar2;
+
+ ///
+ /// lit_installStatus control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal lit_installStatus;
+
+ ///
+ /// pane_optional control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::umbraco.uicontrols.Pane pane_optional;
+
+ ///
+ /// pane_success control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::umbraco.uicontrols.Pane pane_success;
+
+ protected global::umbraco.uicontrols.Pane pane_refresh;
+
+ ///
+ /// bt_viewInstalledPackage control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button bt_viewInstalledPackage;
+
+ ///
+ /// lit_authorUrl control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal lit_authorUrl;
+
+ ///
+ /// tempFile control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlInputHidden tempFile;
+
+ ///
+ /// processState control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlInputHidden processState;
}
}
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Packages/installer.aspx.designer.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Packages/installer.aspx.designer.cs
deleted file mode 100644
index abe1f67506..0000000000
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Packages/installer.aspx.designer.cs
+++ /dev/null
@@ -1,433 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-namespace umbraco.presentation.developer.packages {
-
-
- public partial class Installer {
-
- ///
- /// Panel1 control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::umbraco.uicontrols.UmbracoPanel Panel1;
-
- ///
- /// fb control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::umbraco.uicontrols.Feedback fb;
-
- ///
- /// pane_upload control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::umbraco.uicontrols.Pane pane_upload;
-
- ///
- /// PropertyPanel9 control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::umbraco.uicontrols.PropertyPanel PropertyPanel9;
-
- ///
- /// file1 control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::System.Web.UI.HtmlControls.HtmlInputFile file1;
-
- ///
- /// ButtonLoadPackage control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::System.Web.UI.WebControls.Button ButtonLoadPackage;
-
- ///
- /// progbar1 control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::umbraco.uicontrols.ProgressBar progbar1;
-
- ///
- /// pane_authenticate control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::umbraco.uicontrols.Pane pane_authenticate;
-
- ///
- /// tb_email control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::System.Web.UI.WebControls.TextBox tb_email;
-
- ///
- /// PropertyPanel1 control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::umbraco.uicontrols.PropertyPanel PropertyPanel1;
-
- ///
- /// tb_password control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::System.Web.UI.WebControls.TextBox tb_password;
-
- ///
- /// PropertyPanel2 control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::umbraco.uicontrols.PropertyPanel PropertyPanel2;
-
- ///
- /// Button1 control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::System.Web.UI.WebControls.Button Button1;
-
- ///
- /// pane_acceptLicense control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::System.Web.UI.WebControls.Panel pane_acceptLicense;
-
- ///
- /// pane_acceptLicenseInner control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::umbraco.uicontrols.Pane pane_acceptLicenseInner;
-
- ///
- /// PropertyPanel3 control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::umbraco.uicontrols.PropertyPanel PropertyPanel3;
-
- ///
- /// LabelName control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::System.Web.UI.WebControls.Label LabelName;
-
- ///
- /// PropertyPanel5 control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::umbraco.uicontrols.PropertyPanel PropertyPanel5;
-
- ///
- /// LabelAuthor control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::System.Web.UI.WebControls.Label LabelAuthor;
-
- ///
- /// PropertyPanel4 control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::umbraco.uicontrols.PropertyPanel PropertyPanel4;
-
- ///
- /// LabelMore control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::System.Web.UI.WebControls.Label LabelMore;
-
- ///
- /// PropertyPanel6 control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::umbraco.uicontrols.PropertyPanel PropertyPanel6;
-
- ///
- /// LabelLicense control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::System.Web.UI.WebControls.Label LabelLicense;
-
- ///
- /// PropertyPanel7 control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::umbraco.uicontrols.PropertyPanel PropertyPanel7;
-
- ///
- /// acceptCheckbox control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::System.Web.UI.WebControls.CheckBox acceptCheckbox;
-
- ///
- /// PropertyPanel8 control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::umbraco.uicontrols.PropertyPanel PropertyPanel8;
-
- ///
- /// readme control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::System.Web.UI.WebControls.Literal readme;
-
- ///
- /// pp_unsecureFiles control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::umbraco.uicontrols.PropertyPanel pp_unsecureFiles;
-
- ///
- /// lt_files control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::System.Web.UI.WebControls.Literal lt_files;
-
- ///
- /// pp_macroConflicts control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::umbraco.uicontrols.PropertyPanel pp_macroConflicts;
-
- ///
- /// ltrMacroAlias control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::System.Web.UI.WebControls.Literal ltrMacroAlias;
-
- ///
- /// pp_templateConflicts control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::umbraco.uicontrols.PropertyPanel pp_templateConflicts;
-
- protected global::umbraco.uicontrols.PropertyPanel BinaryFileErrorsPanel;
- protected global::umbraco.uicontrols.PropertyPanel LegacyPropertyEditorPanel;
- protected global::System.Web.UI.WebControls.Literal BinaryFileErrorReport;
-
- ///
- /// ltrTemplateAlias control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::System.Web.UI.WebControls.Literal ltrTemplateAlias;
-
- ///
- /// pp_stylesheetConflicts control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::umbraco.uicontrols.PropertyPanel pp_stylesheetConflicts;
-
- ///
- /// ltrStylesheetNames control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::System.Web.UI.WebControls.Literal ltrStylesheetNames;
-
- ///
- /// _progbar1 control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::umbraco.uicontrols.ProgressBar _progbar1;
-
- ///
- /// ButtonInstall control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::System.Web.UI.WebControls.Button ButtonInstall;
-
- ///
- /// pane_installing control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::umbraco.uicontrols.Pane pane_installing;
-
- ///
- /// progBar2 control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::umbraco.uicontrols.ProgressBar progBar2;
-
- ///
- /// lit_installStatus control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::System.Web.UI.WebControls.Literal lit_installStatus;
-
- ///
- /// pane_optional control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::umbraco.uicontrols.Pane pane_optional;
-
- ///
- /// pane_success control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::umbraco.uicontrols.Pane pane_success;
-
- ///
- /// bt_viewInstalledPackage control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::System.Web.UI.WebControls.Button bt_viewInstalledPackage;
-
- ///
- /// lit_authorUrl control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::System.Web.UI.WebControls.Literal lit_authorUrl;
-
- ///
- /// tempFile control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::System.Web.UI.HtmlControls.HtmlInputHidden tempFile;
-
- ///
- /// processState control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::System.Web.UI.HtmlControls.HtmlInputHidden processState;
- }
-}
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/SendPublish.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/SendPublish.aspx.cs
index 208b2a9780..78c4549a55 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/SendPublish.aspx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/SendPublish.aspx.cs
@@ -8,6 +8,7 @@ using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
+using Umbraco.Web;
using umbraco.BusinessLogic;
using umbraco.BusinessLogic.Actions;
using umbraco.cms.businesslogic.web;
@@ -32,9 +33,9 @@ namespace umbraco.dialogs
int docId;
if (int.TryParse(Request.QueryString["id"], out docId))
{
-
- //TODO Send to publish!!
-
+ //send notifications! TODO: This should be put somewhere centralized instead of hard coded directly here
+ ApplicationContext.Services.NotificationService.SendNotification(
+ ApplicationContext.Services.ContentService.GetById(docId), ActionToPublish.Instance, ApplicationContext);
}
}
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/protectPage.aspx b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/protectPage.aspx
deleted file mode 100644
index 19edd39dfc..0000000000
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/protectPage.aspx
+++ /dev/null
@@ -1,170 +0,0 @@
-<%@ Page Language="c#" MasterPageFile="../masterpages/umbracoDialog.Master" Codebehind="protectPage.aspx.cs" AutoEventWireup="True" Inherits="umbraco.presentation.umbraco.dialogs.protectPage" %>
-<%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-