Merge branch 'dev-v7' into user-group-permissions

This commit is contained in:
Shannon
2017-05-19 13:21:27 +10:00
12 changed files with 42 additions and 19 deletions

1
.gitignore vendored
View File

@@ -145,3 +145,4 @@ build/msbuild.log
src/packages/
src/PrecompiledWeb/*
build/tools/
src/PrecompiledWeb/*

View File

@@ -57,6 +57,20 @@ $IndexPath = "../src/umbraco.web.ui.client/docs/api/index.html"
# Build the solution in debug mode
$SolutionPath = Join-Path -Path $SolutionRoot -ChildPath "umbraco.sln"
# Go get nuget.exe if we don't hae it
$NuGet = "$ToolsRoot\nuget.exe"
$FileExists = Test-Path $NuGet
If ($FileExists -eq $False) {
Write-Host "Retrieving nuget.exe..."
$SourceNugetExe = "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe"
Invoke-WebRequest $SourceNugetExe -OutFile $NuGet
}
#restore nuget packages
Write-Host "Restoring nuget packages..."
& $NuGet restore $SolutionPath
& $MSBuild "$SolutionPath" /p:Configuration=Debug /maxcpucount /t:Clean
if (-not $?)
{

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<metadata minClientVersion="3.4.4">
<id>UmbracoCms.Core</id>
<version>7.0.0</version>
<title>Umbraco Cms Core Binaries</title>

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata minClientVersion="2.8">
<metadata minClientVersion="3.4.4">
<id>UmbracoCms</id>
<version>7.0.0</version>
<title>Umbraco Cms</title>

View File

@@ -332,6 +332,7 @@
<dependentAssembly xdt:Locator="Condition(./_defaultNamespace:assemblyIdentity/@name='System.Net.Http.Formatting')" xdt:Transform="Remove" />
<dependentAssembly xdt:Locator="Condition(./_defaultNamespace:assemblyIdentity/@name='Microsoft.CodeAnalysis.CSharp')" xdt:Transform="Remove" />
<dependentAssembly xdt:Locator="Condition(./_defaultNamespace:assemblyIdentity/@name='log4net')" xdt:Transform="Remove" />
<dependentAssembly xdt:Locator="Condition(./_defaultNamespace:assemblyIdentity/@name='System.Data.SqlServerCe')" xdt:Transform="Remove" />
</assemblyBinding>
</runtime>
@@ -389,6 +390,10 @@
<assemblyIdentity name="log4net" publicKeyToken="669e0ddf0bb1aa2a" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-2.0.8.0" newVersion="2.0.8.0"/>
</dependentAssembly>
<dependentAssembly xdt:Transform="Insert">
<assemblyIdentity name="System.Data.SqlServerCe" publicKeyToken="89845DCD8080CC91" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-4.0.0.1" newVersion="4.0.0.1"/>
</dependentAssembly>
</assemblyBinding>
</runtime>

View File

@@ -159,7 +159,7 @@ namespace Umbraco.Core.IO
// ReSharper disable once AssignNullToNotNullAttribute
var filepath = UmbracoConfig.For.UmbracoSettings().Content.UploadAllowDirectories
? Path.Combine(folder, filename)
? Path.Combine(folder, filename).Replace('\\', '/')
: folder + "-" + filename;
return filepath;

View File

@@ -6,7 +6,8 @@
placeholder="@general_url"
class="umb-editor umb-textstring"
ng-model="model.target.url"
ng-disabled="model.target.id"/>
ng-disabled="model.target.id"
focus-when="{{true}} "/>
</umb-control-group>
<umb-control-group label="@content_nodeName">

View File

@@ -138,15 +138,15 @@ function fileUploadController($scope, $element, $compile, imageHelper, fileManag
//cannot just check for !newVal because it might be an empty string which we
//want to look for.
if (newVal !== null && newVal !== undefined && newVal !== oldVal) {
//now we need to check if we need to re-initialize our structure which is kind of tricky
// since we only want to do that if the server has changed the value, not if this controller
// has changed the value. There's only 2 scenarios where we change the value internall so
// we know what those values can be, if they are not either of them, then we'll re-initialize.
if (newVal.clearFiles !== true && newVal !== $scope.originalValue && !newVal.selectedFiles) {
// here we need to check if the value change needs to trigger an update in the UI.
// if the value is only changed in the controller and not in the server values, we do not
// want to trigger an update yet.
// we can however no longer rely on checking values in the controller vs. values from the server
// to determine whether to update or not, since you could potentially be uploading a file with
// the exact same name - in that case we need to reinitialize to show the newly uploaded file.
if (newVal.clearFiles !== true && !newVal.selectedFiles) {
initialize($scope.rebuildInput.index + 1);
}
}
});
};

View File

@@ -433,6 +433,10 @@
<assemblyIdentity name="log4net" publicKeyToken="669e0ddf0bb1aa2a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.0.8.0" newVersion="2.0.8.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Data.SqlServerCe" publicKeyToken="89845DCD8080CC91" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-4.0.0.1" newVersion="4.0.0.1"/>
</dependentAssembly>
</assemblyBinding>
</runtime>

View File

@@ -57,7 +57,7 @@ namespace Umbraco.Web.Editors
where TPersisted : IContentBase
{
//Don't update the name if it is empty
if (!contentItem.Name.IsNullOrWhiteSpace())
if (contentItem.Name.IsNullOrWhiteSpace() == false)
{
contentItem.PersistedContent.Name = contentItem.Name;
}

View File

@@ -3,7 +3,6 @@ using AutoMapper;
using Umbraco.Core;
using Umbraco.Core.Models;
using Umbraco.Web.Models.ContentEditing;
using Umbraco.Web.Models.Mapping;
namespace Umbraco.Web.WebApi.Binders
{
@@ -33,7 +32,7 @@ namespace Umbraco.Web.WebApi.Binders
var contentType = ApplicationContext.Services.ContentTypeService.GetContentType(model.ContentTypeAlias);
if (contentType == null)
{
throw new InvalidOperationException("No content type found wth alias " + model.ContentTypeAlias);
throw new InvalidOperationException("No content type found with alias " + model.ContentTypeAlias);
}
return new Content(model.Name, model.ParentId, contentType);
}

View File

@@ -3,7 +3,6 @@ using AutoMapper;
using Umbraco.Core;
using Umbraco.Core.Models;
using Umbraco.Web.Models.ContentEditing;
using Umbraco.Web.Models.Mapping;
namespace Umbraco.Web.WebApi.Binders
{
@@ -29,12 +28,12 @@ namespace Umbraco.Web.WebApi.Binders
protected override IMedia CreateNew(MediaItemSave model)
{
var contentType = ApplicationContext.Services.ContentTypeService.GetMediaType(model.ContentTypeAlias);
if (contentType == null)
var mediaType = ApplicationContext.Services.ContentTypeService.GetMediaType(model.ContentTypeAlias);
if (mediaType == null)
{
throw new InvalidOperationException("No content type found wth alias " + model.ContentTypeAlias);
throw new InvalidOperationException("No media type found with alias " + model.ContentTypeAlias);
}
return new Core.Models.Media(model.Name, model.ParentId, contentType);
return new Core.Models.Media(model.Name, model.ParentId, mediaType);
}
protected override ContentItemDto<IMedia> MapFromPersisted(MediaItemSave model)