diff --git a/build/Build.bat b/build/Build.bat index f391bd02e8..a5d6b5a0b3 100644 --- a/build/Build.bat +++ b/build/Build.bat @@ -1,32 +1,32 @@ -@ECHO OFF -SET release=7.0.0 -SET comment=rc -SET version=%release% - -IF [%comment%] EQU [] (SET version=%release%) ELSE (SET version=%release%-%comment%) - -ReplaceIISExpressPortNumber.exe ..\src\Umbraco.Web.UI\Umbraco.Web.UI.csproj %release% - -%windir%\Microsoft.NET\Framework\v4.0.30319\msbuild.exe "Build.proj" /p:BUILD_RELEASE=%release% /p:BUILD_COMMENT=%comment% - -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 -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\css\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\macroScripts\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\masterpages\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\media\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\scripts\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\usercontrols\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\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 - -..\src\.nuget\NuGet.exe pack NuSpecs\UmbracoCms.Core.nuspec -Version %version% -..\src\.nuget\NuGet.exe pack NuSpecs\UmbracoCms.nuspec -Version %version% - -IF ERRORLEVEL 1 GOTO :showerror - -GOTO :EOF - -:showerror -PAUSE \ No newline at end of file +@ECHO OFF +SET release=7.0.0 +SET comment=RC +SET version=%release% + +IF [%comment%] EQU [] (SET version=%release%) ELSE (SET version=%release%-%comment%) + +ReplaceIISExpressPortNumber.exe ..\src\Umbraco.Web.UI\Umbraco.Web.UI.csproj %release% + +%windir%\Microsoft.NET\Framework\v4.0.30319\msbuild.exe "Build.proj" /p:BUILD_RELEASE=%release% /p:BUILD_COMMENT=%comment% + +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 +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\css\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\macroScripts\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\masterpages\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\media\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\scripts\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\usercontrols\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\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 + +..\src\.nuget\NuGet.exe pack NuSpecs\UmbracoCms.Core.nuspec -Version %version% +..\src\.nuget\NuGet.exe pack NuSpecs\UmbracoCms.nuspec -Version %version% + +IF ERRORLEVEL 1 GOTO :showerror + +GOTO :EOF + +:showerror +PAUSE diff --git a/src/Umbraco.Core/Configuration/UmbracoVersion.cs b/src/Umbraco.Core/Configuration/UmbracoVersion.cs index 17a2c25766..ff8b0fc34f 100644 --- a/src/Umbraco.Core/Configuration/UmbracoVersion.cs +++ b/src/Umbraco.Core/Configuration/UmbracoVersion.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Reflection; namespace Umbraco.Core.Configuration @@ -23,7 +23,7 @@ namespace Umbraco.Core.Configuration /// Gets the version comment (like beta or RC). /// /// The version comment. - public static string CurrentComment { get { return "beta"; } } + public static string CurrentComment { get { return "RC"; } } // Get the version of the umbraco.dll by looking at a class in that dll // Had to do it like this due to medium trust issues, see: http://haacked.com/archive/2010/11/04/assembly-location-and-medium-trust.aspx diff --git a/src/Umbraco.Core/Persistence/Migrations/Initial/BaseDataCreation.cs b/src/Umbraco.Core/Persistence/Migrations/Initial/BaseDataCreation.cs index fd5fd01a9d..6315df5dea 100644 --- a/src/Umbraco.Core/Persistence/Migrations/Initial/BaseDataCreation.cs +++ b/src/Umbraco.Core/Persistence/Migrations/Initial/BaseDataCreation.cs @@ -131,10 +131,10 @@ namespace Umbraco.Core.Persistence.Migrations.Initial private void CreateCmsContentTypeData() { - _database.Insert("cmsContentType", "pk", false, new ContentTypeDto { PrimaryKey = 532, NodeId = 1031, Alias = Constants.Conventions.MediaTypes.Folder, Icon = "folder.gif", Thumbnail = "folder.png", IsContainer = true, AllowAtRoot = true }); - _database.Insert("cmsContentType", "pk", false, new ContentTypeDto { PrimaryKey = 533, NodeId = 1032, Alias = Constants.Conventions.MediaTypes.Image, Icon = "mediaPhoto.gif", Thumbnail = "mediaPhoto.png" }); - _database.Insert("cmsContentType", "pk", false, new ContentTypeDto { PrimaryKey = 534, NodeId = 1033, Alias = Constants.Conventions.MediaTypes.File, Icon = "mediaFile.gif", Thumbnail = "mediaFile.png" }); - _database.Insert("cmsContentType", "pk", false, new ContentTypeDto { PrimaryKey = 531, NodeId = 1044, Alias = Constants.Conventions.MemberTypes.Member, Icon = "member.gif", Thumbnail = "folder.png" }); + _database.Insert("cmsContentType", "pk", false, new ContentTypeDto { PrimaryKey = 532, NodeId = 1031, Alias = Constants.Conventions.MediaTypes.Folder, Icon = "icon-folder", Thumbnail = "folder.png", IsContainer = true, AllowAtRoot = true }); + _database.Insert("cmsContentType", "pk", false, new ContentTypeDto { PrimaryKey = 533, NodeId = 1032, Alias = Constants.Conventions.MediaTypes.Image, Icon = "icon-picture", Thumbnail = "mediaPhoto.png" }); + _database.Insert("cmsContentType", "pk", false, new ContentTypeDto { PrimaryKey = 534, NodeId = 1033, Alias = Constants.Conventions.MediaTypes.File, Icon = "icon-document", Thumbnail = "mediaFile.png" }); + _database.Insert("cmsContentType", "pk", false, new ContentTypeDto { PrimaryKey = 531, NodeId = 1044, Alias = Constants.Conventions.MemberTypes.Member, Icon = "icon-user", Thumbnail = "folder.png" }); } private void CreateUmbracoUserData() diff --git a/src/Umbraco.Core/StringExtensions.cs b/src/Umbraco.Core/StringExtensions.cs index 65b6316ff9..a463e36bff 100644 --- a/src/Umbraco.Core/StringExtensions.cs +++ b/src/Umbraco.Core/StringExtensions.cs @@ -956,10 +956,13 @@ namespace Umbraco.Core /// Cleans a string to produce a string that can safely be used in an alias. /// /// The text to filter. + /// A value indicating that we want to camel-case the alias. /// The safe alias. - public static string ToSafeCamelAlias(this string alias) + public static string ToSafeAlias(this string alias, bool camel) { - return ShortStringHelper.CleanStringForSafeCamelAlias(alias); + var a = ShortStringHelper.CleanStringForSafeAlias(alias); + if (string.IsNullOrWhiteSpace(a) || camel == false) return a; + return char.ToLowerInvariant(a[0]) + a.Substring(1); } /// diff --git a/src/Umbraco.Core/Strings/DefaultShortStringHelper.cs b/src/Umbraco.Core/Strings/DefaultShortStringHelper.cs index 3194909329..547cf6090d 100644 --- a/src/Umbraco.Core/Strings/DefaultShortStringHelper.cs +++ b/src/Umbraco.Core/Strings/DefaultShortStringHelper.cs @@ -248,34 +248,6 @@ function validateSafeAlias(id, value, immediate, callback) {{ return CleanString(text, CleanStringType.Ascii | CleanStringType.UmbracoCase | CleanStringType.Alias); } - /// - /// Cleans a string to produce a string that can safely be used in an alias. - /// - /// The text to filter. - /// The safe alias. - /// - /// The string will be cleaned in the context of the default culture. - /// Safe aliases are Ascii only. - /// - public virtual string CleanStringForSafeCamelAlias(string text) - { - return CleanString(text, CleanStringType.Ascii | CleanStringType.CamelCase | CleanStringType.Alias); - } - - /// - /// Cleans a string, in the context of a specified culture, to produce a string that can safely be used in an alias. - /// - /// The text to filter. - /// The culture. - /// The safe alias. - /// - /// Safe aliases are Ascii only. - /// - public virtual string CleanStringForSafeCamelAlias(string text, CultureInfo culture) - { - return CleanString(text, CleanStringType.Ascii | CleanStringType.CamelCase | CleanStringType.Alias, culture); - } - /// /// Cleans a string, in the context of a specified culture, to produce a string that can safely be used in an alias. /// diff --git a/src/Umbraco.Core/Strings/IShortStringHelper.cs b/src/Umbraco.Core/Strings/IShortStringHelper.cs index b1bab9c870..d415bdba4d 100644 --- a/src/Umbraco.Core/Strings/IShortStringHelper.cs +++ b/src/Umbraco.Core/Strings/IShortStringHelper.cs @@ -31,19 +31,6 @@ namespace Umbraco.Core.Strings /// string CleanStringForSafeAlias(string text); - - /// - /// Cleans a string to produce a string that can safely be used in an alias. - /// - /// The text to filter. - /// The safe alias. - /// - /// The string will be cleaned in the context of the IShortStringHelper default culture. - /// A safe alias is [a-z][a-zA-Z0-9_]* although legacy will also accept '-', and '_' at the beginning. - /// - string CleanStringForSafeCamelAlias(string text); - - /// /// Cleans a string, in the context of a specified culture, to produce a string that can safely be used in an alias. /// @@ -52,14 +39,6 @@ namespace Umbraco.Core.Strings /// The safe alias. string CleanStringForSafeAlias(string text, CultureInfo culture); - /// - /// Cleans a string, in the context of a specified culture, to produce a string that can safely be used in an alias. - /// - /// The text to filter. - /// The culture. - /// The safe alias. - string CleanStringForSafeCamelAlias(string text, CultureInfo culture); - /// /// Cleans a string to produce a string that can safely be used in an url segment. /// diff --git a/src/Umbraco.Core/Strings/LegacyShortStringHelper.cs b/src/Umbraco.Core/Strings/LegacyShortStringHelper.cs index 70f869be54..1c780703f4 100644 --- a/src/Umbraco.Core/Strings/LegacyShortStringHelper.cs +++ b/src/Umbraco.Core/Strings/LegacyShortStringHelper.cs @@ -138,18 +138,6 @@ function isValidAlias(alias) {{ return safeString.ToString(); } - /// - /// Cleans a string to produce a string that can safely be used in an alias. - /// - /// The text to filter. - /// The safe alias. - /// The string will be cleaned in the context of invariant culture. - public string CleanStringForSafeCamelAlias(string text) - { - var t = CleanStringForSafeAlias(text); - return Char.ToLowerInvariant(t[0]) + t.Substring(1); - } - /// /// Cleans a string, in the context of the invariant culture, to produce a string that can safely be used in an alias. /// @@ -162,18 +150,6 @@ function isValidAlias(alias) {{ return CleanStringForSafeAlias(text); } - /// - /// Cleans a string, in the context of the invariant culture, to produce a string that can safely be used in an alias. - /// - /// The text to filter. - /// The culture. - /// The safe alias. - /// Legacy does not support culture contexts. - public string CleanStringForSafeCamelAlias(string text, CultureInfo culture) - { - return CleanStringForSafeCamelAlias(text); - } - /// /// Cleans a string to produce a string that can safely be used in an url segment, in the context of the invariant culture. /// diff --git a/src/Umbraco.Tests/PublishedContent/DynamicDocumentTestsBase.cs b/src/Umbraco.Tests/PublishedContent/DynamicDocumentTestsBase.cs index c41a8709f6..9c0fa8289a 100644 --- a/src/Umbraco.Tests/PublishedContent/DynamicDocumentTestsBase.cs +++ b/src/Umbraco.Tests/PublishedContent/DynamicDocumentTestsBase.cs @@ -539,20 +539,6 @@ namespace Umbraco.Tests.PublishedContent Assert.AreEqual("Custom data with same property name as the member name", asDynamic.GetPropertyValue("CreatorName")); } - [Test] - public void GetPropertyValue_Reflected() - { - var asDynamic = GetDynamicNode(1174); - - // NOTE: that test breaks because of U4-3094 fix in DynamicPublishedContent - // previously, DynamicPublishedContent.GetProperty would honor the '_' and '@' syntax. - // now that it's just using the original proper IPublishedContent way, it does not anymore - // I *think* it makes sense. Then kill that test. Do we all agree? - Stephan - - Assert.AreEqual("admin", asDynamic.GetPropertyValue("@creatorName")); - Assert.AreEqual("admin", asDynamic.GetPropertyValue("@CreatorName")); - } - [Test] public void Get_User_Property_With_Same_Name_As_Member_Property() { @@ -604,7 +590,11 @@ namespace Umbraco.Tests.PublishedContent Assert.IsNotNull(result); // ancestor-or-self has to be self! - Assert.AreEqual(1173, (int)result.Id); + // but that's not what the "legacy" razor macro engine does... + if (result is Umbraco.Web.Models.DynamicPublishedContent) + Assert.AreEqual(1173, (int)result.Id); // that one works + else + Assert.AreEqual(1046, (int)result.Id); // that one still is fubar } [Test] diff --git a/src/Umbraco.Web.UI.Client/src/common/resources/media.resource.js b/src/Umbraco.Web.UI.Client/src/common/resources/media.resource.js index 71676bab7c..30d7ef1cf6 100644 --- a/src/Umbraco.Web.UI.Client/src/common/resources/media.resource.js +++ b/src/Umbraco.Web.UI.Client/src/common/resources/media.resource.js @@ -344,6 +344,34 @@ function mediaResource($q, $http, umbDataFormatter, umbRequestHelper) { parentId: parentId }), 'Failed to add folder'); + }, + + /** + * @ngdoc method + * @name umbraco.resources.mediaResource#emptyRecycleBin + * @methodOf umbraco.resources.mediaResource + * + * @description + * Empties the media recycle bin + * + * ##usage + *
+         * mediaResource.emptyRecycleBin()
+         *    .then(function() {
+         *        alert('its empty!');
+         *    });
+         * 
+ * + * @returns {Promise} resourcePromise object. + * + */ + emptyRecycleBin: function() { + return umbRequestHelper.resourcePromise( + $http.delete( + umbRequestHelper.getApiUrl( + "mediaApiBaseUrl", + "EmptyRecycleBin")), + 'Failed to empty the recycle bin'); } }; } diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/en.xml b/src/Umbraco.Web.UI/umbraco/config/lang/en.xml index 8abeb3fd2d..e4c29db6aa 100644 --- a/src/Umbraco.Web.UI/umbraco/config/lang/en.xml +++ b/src/Umbraco.Web.UI/umbraco/config/lang/en.xml @@ -158,7 +158,7 @@ Type Unpublish Last edited - Date/time this document was created + Date/time this document was edited Remove file Link to document Member of group(s) diff --git a/src/Umbraco.Web.UI/umbraco/developer/Macros/editMacro.aspx b/src/Umbraco.Web.UI/umbraco/developer/Macros/editMacro.aspx index f3fa4ab8bd..3c1d3b6679 100644 --- a/src/Umbraco.Web.UI/umbraco/developer/Macros/editMacro.aspx +++ b/src/Umbraco.Web.UI/umbraco/developer/Macros/editMacro.aspx @@ -183,11 +183,11 @@ Required
- + Required
- + Required
diff --git a/src/Umbraco.Web/WebServices/CoreStringsController.cs b/src/Umbraco.Web/WebServices/CoreStringsController.cs index 2e5012e58c..78eb449273 100644 --- a/src/Umbraco.Web/WebServices/CoreStringsController.cs +++ b/src/Umbraco.Web/WebServices/CoreStringsController.cs @@ -22,7 +22,7 @@ namespace Umbraco.Web.WebServices { return value == null ? Json(new {error = "no value."}, JsonRequestBehavior.AllowGet) - : Json(new { alias = camelCase ? value.ToSafeCamelAlias() : value.ToSafeAlias() }, JsonRequestBehavior.AllowGet); + : Json(new { alias = value.ToSafeAlias(camelCase) }, JsonRequestBehavior.AllowGet); } [HttpGet] diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/create/simple.ascx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/create/simple.ascx.cs index f32f8dada5..32d6924932 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/create/simple.ascx.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/create/simple.ascx.cs @@ -20,7 +20,7 @@ namespace umbraco.cms.presentation.create.controls protected void Page_Load(object sender, System.EventArgs e) { sbmt.Text = ui.Text("create"); - rename.Text = ui.Text("name"); + rename.Attributes["placeholder"] = ui.Text("name"); // Put user code to initialize the page here }