Compare commits
135 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7393d9c372 | |||
| 79c4d7797c | |||
| 01a895bbf7 | |||
| 4fa523db43 | |||
| 186460ac08 | |||
| 686f6752f3 | |||
| 23ccdeb2cf | |||
| 6148ce4e52 | |||
| 06850ed25c | |||
| 0320a56cb5 | |||
| cd27bb210f | |||
| 67f680a675 | |||
| 47c3e3a79f | |||
| f3bfc1ffb2 | |||
| 89cd655df2 | |||
| 14c4c4815d | |||
| bfb69a34ef | |||
| d52420183e | |||
| 2aaca865e7 | |||
| 2ec8281163 | |||
| 2ac5e61e44 | |||
| c47a08b553 | |||
| de9241bcf5 | |||
| 7c03fe3c1f | |||
| 82eb241119 | |||
| 1073e6257c | |||
| 59bf24c461 | |||
| 2748c3635d | |||
| d31e71a838 | |||
| 2252db0d55 | |||
| df896af476 | |||
| 4b605b2580 | |||
| 80d7f1b2c9 | |||
| 5ada85df29 | |||
| 5b7ae7150f | |||
| 5bf29a907a | |||
| 2a9bcf0e98 | |||
| 3c0565e516 | |||
| fa4acb255b | |||
| a018ed9e52 | |||
| fad33a97b2 | |||
| ac586c5207 | |||
| 8033931e31 | |||
| 8e29810598 | |||
| be96e2cf08 | |||
| 534ee67ad2 | |||
| 571a3bc257 | |||
| e7a30d0a5d | |||
| a55323176f | |||
| 1b83e0a87d | |||
| ca15f340b0 | |||
| 23b8e1cce8 | |||
| cf53ba363d | |||
| 2f309a2fd6 | |||
| 9f45d41a4a | |||
| 1994194656 | |||
| 36559b8761 | |||
| 8fe7c5599a | |||
| 4dd325cec9 | |||
| d558646d75 | |||
| afac4bb918 | |||
| 0869bf27c7 | |||
| 383a8617ce | |||
| 3865f4fb50 | |||
| 3e74bbfb45 | |||
| 966b07ba1c | |||
| d4311fe4ab | |||
| eab597a2a8 | |||
| 8d12170def | |||
| d2655a9f2f | |||
| c4c2082fa9 | |||
| 40d4a8fe6a | |||
| 2898203cb9 | |||
| 5ebdfc7b1c | |||
| 31d7e58191 | |||
| ad4416f663 | |||
| b55d2a8a41 | |||
| 17a4799b97 | |||
| 4df838c20c | |||
| 4e44871671 | |||
| 1dd2c1cb91 | |||
| 5c6a9480a6 | |||
| c1be8e3f00 | |||
| d8dbda8e94 | |||
| a0ab7ace07 | |||
| 7c27189e2e | |||
| 994c6eed50 | |||
| cff5046a9e | |||
| 9f6da2ca4b | |||
| 99cabe564d | |||
| 15b1d35c17 | |||
| c597da8f97 | |||
| 5775a8b614 | |||
| c5347a97ce | |||
| 22f54394fb | |||
| 57c368f70d | |||
| 580de6befe | |||
| 0120dc6ea3 | |||
| 4be6a48fb2 | |||
| 53731049de | |||
| 4b2ce522fe | |||
| d0eddbb9a2 | |||
| 938abab9d6 | |||
| 5faa71187d | |||
| c069f262dc | |||
| 9f42e6a607 | |||
| 202f2d2e27 | |||
| aaab14be3e | |||
| 1c87176d80 | |||
| a182c9b1ee | |||
| 6af1057ad7 | |||
| 97ae6165e4 | |||
| 8cdb61195d | |||
| 50c2d574f1 | |||
| 35645672ae | |||
| f952877d04 | |||
| d69a978870 | |||
| 3d86b08e31 | |||
| 5cef71e4e6 | |||
| fe7b114083 | |||
| 0f969ecdd4 | |||
| 34a3389c17 | |||
| beb325eacf | |||
| 8e45bcf23f | |||
| 40dc49ed47 | |||
| 4b07305dc5 | |||
| 2514a59e93 | |||
| 6843da790c | |||
| ba1a9c3758 | |||
| 332ad6349d | |||
| 42e48426e4 | |||
| a0cc788f27 | |||
| aecf96d74d | |||
| c75938076e | |||
| cebbcb711a |
@@ -135,7 +135,9 @@ function Get-UmbracoBuildEnv
|
|||||||
$vsPath = ""
|
$vsPath = ""
|
||||||
$vsVer = ""
|
$vsVer = ""
|
||||||
$msBuild = $null
|
$msBuild = $null
|
||||||
&$vswhere | foreach {
|
$params = @()
|
||||||
|
$params += "-prerelease"
|
||||||
|
&$vswhere @params | foreach {
|
||||||
if ($_.StartsWith("installationPath:")) { $vsPath = $_.SubString("installationPath:".Length).Trim() }
|
if ($_.StartsWith("installationPath:")) { $vsPath = $_.SubString("installationPath:".Length).Trim() }
|
||||||
if ($_.StartsWith("installationVersion:")) { $vsVer = $_.SubString("installationVersion:".Length).Trim() }
|
if ($_.StartsWith("installationVersion:")) { $vsVer = $_.SubString("installationVersion:".Length).Trim() }
|
||||||
}
|
}
|
||||||
@@ -144,7 +146,10 @@ function Get-UmbracoBuildEnv
|
|||||||
$vsVerParts = $vsVer.Split('.')
|
$vsVerParts = $vsVer.Split('.')
|
||||||
$vsMajor = [int]::Parse($vsVerParts[0])
|
$vsMajor = [int]::Parse($vsVerParts[0])
|
||||||
$vsMinor = [int]::Parse($vsVerParts[1])
|
$vsMinor = [int]::Parse($vsVerParts[1])
|
||||||
if ($vsMajor -eq 15) {
|
if ($vsMajor -eq 16) {
|
||||||
|
$msBuild = "$vsPath\MSBuild\Current\Bin"
|
||||||
|
}
|
||||||
|
elseif ($vsMajor -eq 15) {
|
||||||
$msBuild = "$vsPath\MSBuild\$vsMajor.0\Bin"
|
$msBuild = "$vsPath\MSBuild\$vsMajor.0\Bin"
|
||||||
}
|
}
|
||||||
elseif ($vsMajor -eq 14) {
|
elseif ($vsMajor -eq 14) {
|
||||||
|
|||||||
@@ -195,6 +195,10 @@ function Compile-Umbraco
|
|||||||
{
|
{
|
||||||
$toolsVersion = "15.0"
|
$toolsVersion = "15.0"
|
||||||
}
|
}
|
||||||
|
if ($uenv.VisualStudio.Major -eq 16)
|
||||||
|
{
|
||||||
|
$toolsVersion = "Current"
|
||||||
|
}
|
||||||
|
|
||||||
Write-Host ">> Compile Umbraco"
|
Write-Host ">> Compile Umbraco"
|
||||||
Write-Host "Logging to $tmp\msbuild.umbraco.log"
|
Write-Host "Logging to $tmp\msbuild.umbraco.log"
|
||||||
|
|||||||
@@ -1,107 +1,116 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
||||||
<metadata minClientVersion="3.4.4">
|
<metadata minClientVersion="3.4.4">
|
||||||
<id>UmbracoCms.Core</id>
|
<id>UmbracoCms.Core</id>
|
||||||
<version>7.0.0</version>
|
<version>7.0.0</version>
|
||||||
<title>Umbraco Cms Core Binaries</title>
|
<title>Umbraco Cms Core Binaries</title>
|
||||||
<authors>Umbraco HQ</authors>
|
<authors>Umbraco HQ</authors>
|
||||||
<owners>Umbraco HQ</owners>
|
<owners>Umbraco HQ</owners>
|
||||||
<licenseUrl>http://opensource.org/licenses/MIT</licenseUrl>
|
<licenseUrl>http://opensource.org/licenses/MIT</licenseUrl>
|
||||||
<projectUrl>http://umbraco.com/</projectUrl>
|
<projectUrl>http://umbraco.com/</projectUrl>
|
||||||
<iconUrl>http://umbraco.com/media/357769/100px_transparent.png</iconUrl>
|
<iconUrl>http://umbraco.com/media/357769/100px_transparent.png</iconUrl>
|
||||||
<requireLicenseAcceptance>false</requireLicenseAcceptance>
|
<requireLicenseAcceptance>false</requireLicenseAcceptance>
|
||||||
<description>Contains the core assemblies needed to run Umbraco Cms. This package only contains assemblies and can be used for package development. Use the UmbracoCms-package to setup Umbraco in Visual Studio as an ASP.NET project.</description>
|
<description>Contains the core assemblies needed to run Umbraco Cms. This package only contains assemblies and can be used for package development. Use the UmbracoCms-package to setup Umbraco in Visual Studio as an ASP.NET project.</description>
|
||||||
<summary>Contains the core assemblies needed to run Umbraco Cms</summary>
|
<summary>Contains the core assemblies needed to run Umbraco Cms</summary>
|
||||||
<language>en-US</language>
|
<language>en-US</language>
|
||||||
<tags>umbraco</tags>
|
<tags>umbraco</tags>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency id="log4net" version="[2.0.8,3.0.0)" />
|
<group targetFramework="net452">
|
||||||
<dependency id="Log4Net.Async" version="[2.0.4,3.0.0)" />
|
<dependency id="log4net" version="[2.0.8, 3.0.0)" />
|
||||||
<dependency id="Microsoft.AspNet.Mvc" version="[5.2.3,6.0.0)" />
|
<dependency id="Log4Net.Async" version="[2.0.4, 3.0.0)" />
|
||||||
<dependency id="Microsoft.AspNet.WebApi" version="[5.2.3,6.0.0)" />
|
<dependency id="Microsoft.AspNet.Mvc" version="[5.2.7, 6.0.0)" />
|
||||||
<dependency id="Microsoft.AspNet.Identity.Owin" version="[2.2.1, 3.0.0)" />
|
<dependency id="Microsoft.AspNet.WebApi" version="[5.2.7, 6.0.0)" />
|
||||||
<dependency id="Microsoft.AspNet.SignalR.Core" version="[2.2.1, 3.0.0)" />
|
<dependency id="Microsoft.AspNet.Identity.Owin" version="[2.2.2, 3.0.0)" />
|
||||||
<dependency id="Microsoft.Owin.Security.Cookies" version="[3.1.0, 4.0.0)" />
|
<dependency id="Microsoft.AspNet.SignalR.Core" version="[2.4.1, 3.0.0)" />
|
||||||
<dependency id="Microsoft.Owin.Security.OAuth" version="[3.1.0, 4.0.0)" />
|
<dependency id="Microsoft.Owin.Security.Cookies" version="[4.0.1, 5.0.0)" />
|
||||||
<dependency id="Microsoft.Owin.Host.SystemWeb" version="[3.1.0, 4.0.0)" />
|
<dependency id="Microsoft.Owin.Security.OAuth" version="[4.0.1, 5.0.0)" />
|
||||||
<dependency id="MiniProfiler" version="[2.1.0, 3.0.0)" />
|
<dependency id="Microsoft.Owin.Host.SystemWeb" version="[4.0.1, 5.0.0)" />
|
||||||
<dependency id="HtmlAgilityPack" version="[1.4.9.5, 2.0.0)" />
|
<dependency id="MiniProfiler" version="[2.1.0, 3.0.0)" />
|
||||||
<dependency id="Lucene.Net" version="[2.9.4.1, 3.0.0.0)" />
|
<dependency id="HtmlAgilityPack" version="[1.8.8, 2.0.0)" />
|
||||||
<dependency id="MySql.Data" version="[6.9.9, 7.0.0)" />
|
<dependency id="Lucene.Net" version="[2.9.4.1, 3.0.0.0)" />
|
||||||
<dependency id="ClientDependency" version="[1.9.7, 2.0.0)" />
|
<dependency id="MySql.Data" version="[6.9.9, 7.0.0)" />
|
||||||
<dependency id="ClientDependency-Mvc5" version="[1.8.0.0, 2.0.0)" />
|
<dependency id="ClientDependency" version="[1.9.7, 2.0.0)" />
|
||||||
<dependency id="AutoMapper" version="[3.3.1, 4.0.0)" />
|
<dependency id="ClientDependency-Mvc5" version="[1.8.0.0, 2.0.0)" />
|
||||||
<dependency id="Newtonsoft.Json" version="[10.0.2, 11.0.0)" />
|
<dependency id="AutoMapper" version="[3.3.1, 4.0.0)" />
|
||||||
<dependency id="Examine" version="[0.1.89, 1.0.0)" />
|
<dependency id="Newtonsoft.Json" version="[12.0.2, 13.0.0)" />
|
||||||
<dependency id="ImageProcessor" version="[2.5.6, 3.0.0)" />
|
<dependency id="Examine" version="[0.1.90, 1.0.0)" />
|
||||||
<dependency id="ImageProcessor.Web" version="[4.8.7, 5.0.0)" />
|
<dependency id="ImageProcessor" version="[2.7.0.100, 3.0.0)" />
|
||||||
<dependency id="semver" version="[1.1.2, 3.0.0)" />
|
<dependency id="ImageProcessor.Web" version="[4.10.0.100, 5.0.0)" />
|
||||||
<!-- Markdown can not be updated due to: https://github.com/hey-red/markdownsharp/issues/71#issuecomment-233585487 -->
|
<dependency id="semver" version="[1.1.2, 3.0.0)" />
|
||||||
<dependency id="Markdown" version="[1.14.7, 2.0.0)" />
|
<!-- Markdown can not be updated due to: https://github.com/hey-red/markdownsharp/issues/71#issuecomment-233585487 -->
|
||||||
<dependency id="System.Threading.Tasks.Dataflow" version="[4.7.0, 5.0.0)" />
|
<dependency id="Markdown" version="[1.14.7, 2.0.0)" />
|
||||||
<dependency id="System.ValueTuple" version="[4.4.0, 5.0.0)" />
|
<dependency id="System.Threading.Tasks.Dataflow" version="[4.9.0, 5.0.0)" />
|
||||||
</dependencies>
|
<dependency id="System.ValueTuple" version="[4.5.0, 5.0.0)" />
|
||||||
</metadata>
|
</group>
|
||||||
<files>
|
</dependencies>
|
||||||
<file src="$BuildTmp$\WebApp\bin\businesslogic.dll" target="lib\net45\businesslogic.dll" />
|
<frameworkAssemblies>
|
||||||
<file src="$BuildTmp$\WebApp\bin\businesslogic.xml" target="lib\net45\businesslogic.xml" />
|
<frameworkAssembly assemblyName="System.Configuration" targetFramework="net452" />
|
||||||
<file src="$BuildTmp$\WebApp\bin\cms.dll" target="lib\net45\cms.dll" />
|
<frameworkAssembly assemblyName="System.IO.Compression.FileSystem" targetFramework="net452" />
|
||||||
<file src="$BuildTmp$\WebApp\bin\cms.xml" target="lib\net45\cms.xml" />
|
<frameworkAssembly assemblyName="System.Web" targetFramework="net452" />
|
||||||
<file src="$BuildTmp$\WebApp\bin\controls.dll" target="lib\net45\controls.dll" />
|
<frameworkAssembly assemblyName="System.Net.Http" targetFramework="net452" />
|
||||||
<file src="$BuildTmp$\WebApp\bin\controls.xml" target="lib\net45\controls.xml" />
|
<frameworkAssembly assemblyName="System.Drawing" targetFramework="net452" />
|
||||||
<file src="$BuildTmp$\WebApp\bin\interfaces.dll" target="lib\net45\interfaces.dll" />
|
</frameworkAssemblies>
|
||||||
<file src="$BuildTmp$\WebApp\bin\interfaces.xml" target="lib\net45\interfaces.xml" />
|
</metadata>
|
||||||
<file src="$BuildTmp$\WebApp\bin\log4net.dll" target="lib\net45\log4net.dll" />
|
<files>
|
||||||
<file src="$BuildTmp$\WebApp\bin\Microsoft.ApplicationBlocks.Data.dll" target="lib\net45\Microsoft.ApplicationBlocks.Data.dll" />
|
<file src="$BuildTmp$\WebApp\bin\businesslogic.dll" target="lib\net452\businesslogic.dll" />
|
||||||
<file src="$BuildTmp$\WebApp\bin\SQLCE4Umbraco.dll" target="lib\net45\SQLCE4Umbraco.dll" />
|
<file src="$BuildTmp$\WebApp\bin\businesslogic.xml" target="lib\net452\businesslogic.xml" />
|
||||||
<file src="$BuildTmp$\WebApp\bin\SQLCE4Umbraco.xml" target="lib\net45\SQLCE4Umbraco.xml" />
|
<file src="$BuildTmp$\WebApp\bin\cms.dll" target="lib\net452\cms.dll" />
|
||||||
<file src="$BuildTmp$\WebApp\bin\System.Data.SqlServerCe.dll" target="lib\net45\System.Data.SqlServerCe.dll" />
|
<file src="$BuildTmp$\WebApp\bin\cms.xml" target="lib\net452\cms.xml" />
|
||||||
<file src="$BuildTmp$\WebApp\bin\System.Data.SqlServerCe.Entity.dll" target="lib\net45\System.Data.SqlServerCe.Entity.dll" />
|
<file src="$BuildTmp$\WebApp\bin\controls.dll" target="lib\net452\controls.dll" />
|
||||||
<file src="$BuildTmp$\WebApp\bin\TidyNet.dll" target="lib\net45\TidyNet.dll" />
|
<file src="$BuildTmp$\WebApp\bin\controls.xml" target="lib\net452\controls.xml" />
|
||||||
<file src="$BuildTmp$\WebApp\bin\Umbraco.Core.dll" target="lib\net45\Umbraco.Core.dll" />
|
<file src="$BuildTmp$\WebApp\bin\interfaces.dll" target="lib\net452\interfaces.dll" />
|
||||||
<file src="$BuildTmp$\WebApp\bin\Umbraco.Core.xml" target="lib\net45\Umbraco.Core.xml" />
|
<file src="$BuildTmp$\WebApp\bin\interfaces.xml" target="lib\net452\interfaces.xml" />
|
||||||
<file src="$BuildTmp$\WebApp\bin\umbraco.DataLayer.dll" target="lib\net45\umbraco.DataLayer.dll" />
|
<file src="$BuildTmp$\WebApp\bin\log4net.dll" target="lib\net452\log4net.dll" />
|
||||||
<file src="$BuildTmp$\WebApp\bin\umbraco.DataLayer.xml" target="lib\net45\umbraco.DataLayer.xml" />
|
<file src="$BuildTmp$\WebApp\bin\Microsoft.ApplicationBlocks.Data.dll" target="lib\net452\Microsoft.ApplicationBlocks.Data.dll" />
|
||||||
<file src="$BuildTmp$\WebApp\bin\umbraco.dll" target="lib\net45\umbraco.dll" />
|
<file src="$BuildTmp$\WebApp\bin\SQLCE4Umbraco.dll" target="lib\net452\SQLCE4Umbraco.dll" />
|
||||||
<file src="$BuildTmp$\WebApp\bin\umbraco.xml" target="lib\net45\umbraco.xml" />
|
<file src="$BuildTmp$\WebApp\bin\SQLCE4Umbraco.xml" target="lib\net452\SQLCE4Umbraco.xml" />
|
||||||
<file src="$BuildTmp$\WebApp\bin\umbraco.editorControls.dll" target="lib\net45\umbraco.editorControls.dll" />
|
<file src="$BuildTmp$\WebApp\bin\System.Data.SqlServerCe.dll" target="lib\net452\System.Data.SqlServerCe.dll" />
|
||||||
<file src="$BuildTmp$\WebApp\bin\umbraco.editorControls.xml" target="lib\net45\umbraco.editorControls.xml" />
|
<file src="$BuildTmp$\WebApp\bin\System.Data.SqlServerCe.Entity.dll" target="lib\net452\System.Data.SqlServerCe.Entity.dll" />
|
||||||
<file src="$BuildTmp$\WebApp\bin\umbraco.MacroEngines.dll" target="lib\net45\umbraco.MacroEngines.dll" />
|
<file src="$BuildTmp$\WebApp\bin\TidyNet.dll" target="lib\net452\TidyNet.dll" />
|
||||||
<file src="$BuildTmp$\WebApp\bin\umbraco.MacroEngines.xml" target="lib\net45\umbraco.MacroEngines.xml" />
|
<file src="$BuildTmp$\WebApp\bin\Umbraco.Core.dll" target="lib\net452\Umbraco.Core.dll" />
|
||||||
<file src="$BuildTmp$\WebApp\bin\umbraco.providers.dll" target="lib\net45\umbraco.providers.dll" />
|
<file src="$BuildTmp$\WebApp\bin\Umbraco.Core.xml" target="lib\net452\Umbraco.Core.xml" />
|
||||||
<file src="$BuildTmp$\WebApp\bin\umbraco.providers.xml" target="lib\net45\umbraco.providers.xml" />
|
<file src="$BuildTmp$\WebApp\bin\umbraco.DataLayer.dll" target="lib\net452\umbraco.DataLayer.dll" />
|
||||||
<file src="$BuildTmp$\WebApp\bin\Umbraco.Web.UI.dll" target="lib\net45\Umbraco.Web.UI.dll" />
|
<file src="$BuildTmp$\WebApp\bin\umbraco.DataLayer.xml" target="lib\net452\umbraco.DataLayer.xml" />
|
||||||
<file src="$BuildTmp$\WebApp\bin\Umbraco.Web.UI.xml" target="lib\net45\Umbraco.Web.UI.xml" />
|
<file src="$BuildTmp$\WebApp\bin\umbraco.dll" target="lib\net452\umbraco.dll" />
|
||||||
<file src="$BuildTmp$\WebApp\bin\UmbracoExamine.dll" target="lib\net45\UmbracoExamine.dll" />
|
<file src="$BuildTmp$\WebApp\bin\umbraco.xml" target="lib\net452\umbraco.xml" />
|
||||||
<file src="$BuildTmp$\WebApp\bin\UmbracoExamine.xml" target="lib\net45\UmbracoExamine.xml" />
|
<file src="$BuildTmp$\WebApp\bin\umbraco.editorControls.dll" target="lib\net452\umbraco.editorControls.dll" />
|
||||||
<file src="tools\install.core.ps1" target="tools\install.ps1" />
|
<file src="$BuildTmp$\WebApp\bin\umbraco.editorControls.xml" target="lib\net452\umbraco.editorControls.xml" />
|
||||||
|
<file src="$BuildTmp$\WebApp\bin\umbraco.MacroEngines.dll" target="lib\net452\umbraco.MacroEngines.dll" />
|
||||||
|
<file src="$BuildTmp$\WebApp\bin\umbraco.MacroEngines.xml" target="lib\net452\umbraco.MacroEngines.xml" />
|
||||||
|
<file src="$BuildTmp$\WebApp\bin\umbraco.providers.dll" target="lib\net452\umbraco.providers.dll" />
|
||||||
|
<file src="$BuildTmp$\WebApp\bin\umbraco.providers.xml" target="lib\net452\umbraco.providers.xml" />
|
||||||
|
<file src="$BuildTmp$\WebApp\bin\Umbraco.Web.UI.dll" target="lib\net452\Umbraco.Web.UI.dll" />
|
||||||
|
<file src="$BuildTmp$\WebApp\bin\Umbraco.Web.UI.xml" target="lib\net452\Umbraco.Web.UI.xml" />
|
||||||
|
<file src="$BuildTmp$\WebApp\bin\UmbracoExamine.dll" target="lib\net452\UmbracoExamine.dll" />
|
||||||
|
<file src="$BuildTmp$\WebApp\bin\UmbracoExamine.xml" target="lib\net452\UmbracoExamine.xml" />
|
||||||
|
<file src="tools\install.core.ps1" target="tools\install.ps1" />
|
||||||
|
|
||||||
<!-- Added to be able to produce a symbols package -->
|
<!-- Added to be able to produce a symbols package -->
|
||||||
<file src="$BuildTmp$\bin\SQLCE4Umbraco.pdb" target="lib" />
|
<file src="$BuildTmp$\bin\SQLCE4Umbraco.pdb" target="lib" />
|
||||||
<file src="..\..\src\SQLCE4Umbraco\**\*.cs" exclude="..\..\src\**\TemporaryGeneratedFile*.cs" target="src\SQLCE4Umbraco" />
|
<file src="..\..\src\SQLCE4Umbraco\**\*.cs" exclude="..\..\src\**\TemporaryGeneratedFile*.cs" target="src\SQLCE4Umbraco" />
|
||||||
<file src="$BuildTmp$\bin\businesslogic.pdb" target="lib" />
|
<file src="$BuildTmp$\bin\businesslogic.pdb" target="lib" />
|
||||||
<file src="..\..\src\umbraco.businesslogic\**\*.cs" exclude="..\..\src\**\TemporaryGeneratedFile*.cs" target="src\umbraco.businesslogic" />
|
<file src="..\..\src\umbraco.businesslogic\**\*.cs" exclude="..\..\src\**\TemporaryGeneratedFile*.cs" target="src\umbraco.businesslogic" />
|
||||||
<file src="$BuildTmp$\bin\cms.pdb" target="lib" />
|
<file src="$BuildTmp$\bin\cms.pdb" target="lib" />
|
||||||
<file src="..\..\src\umbraco.cms\**\*.cs" exclude="..\..\src\**\TemporaryGeneratedFile*.cs" target="src\umbraco.cms" />
|
<file src="..\..\src\umbraco.cms\**\*.cs" exclude="..\..\src\**\TemporaryGeneratedFile*.cs" target="src\umbraco.cms" />
|
||||||
<file src="$BuildTmp$\bin\controls.pdb" target="lib" />
|
<file src="$BuildTmp$\bin\controls.pdb" target="lib" />
|
||||||
<file src="..\..\src\umbraco.controls\**\*.cs" exclude="..\..\src\**\TemporaryGeneratedFile*.cs" target="src\umbraco.controls" />
|
<file src="..\..\src\umbraco.controls\**\*.cs" exclude="..\..\src\**\TemporaryGeneratedFile*.cs" target="src\umbraco.controls" />
|
||||||
<file src="$BuildTmp$\bin\interfaces.pdb" target="lib" />
|
<file src="$BuildTmp$\bin\interfaces.pdb" target="lib" />
|
||||||
<file src="..\..\src\umbraco.interfaces\**\*.cs" exclude="..\..\src\**\TemporaryGeneratedFile*.cs" target="src\umbraco.interfaces" />
|
<file src="..\..\src\umbraco.interfaces\**\*.cs" exclude="..\..\src\**\TemporaryGeneratedFile*.cs" target="src\umbraco.interfaces" />
|
||||||
<file src="$BuildTmp$\bin\Umbraco.Core.pdb" target="lib" />
|
<file src="$BuildTmp$\bin\Umbraco.Core.pdb" target="lib" />
|
||||||
<file src="..\..\src\Umbraco.Core\**\*.cs" exclude="..\..\src\**\TemporaryGeneratedFile*.cs" target="src\Umbraco.Core" />
|
<file src="..\..\src\Umbraco.Core\**\*.cs" exclude="..\..\src\**\TemporaryGeneratedFile*.cs" target="src\Umbraco.Core" />
|
||||||
<file src="$BuildTmp$\bin\umbraco.DataLayer.pdb" target="lib" />
|
<file src="$BuildTmp$\bin\umbraco.DataLayer.pdb" target="lib" />
|
||||||
<file src="..\..\src\umbraco.datalayer\**\*.cs" exclude="..\..\src\**\TemporaryGeneratedFile*.cs" target="src\umbraco.datalayer" />
|
<file src="..\..\src\umbraco.datalayer\**\*.cs" exclude="..\..\src\**\TemporaryGeneratedFile*.cs" target="src\umbraco.datalayer" />
|
||||||
<file src="$BuildTmp$\bin\umbraco.editorControls.pdb" target="lib" />
|
<file src="$BuildTmp$\bin\umbraco.editorControls.pdb" target="lib" />
|
||||||
<file src="..\..\src\umbraco.editorControls\**\*.cs" exclude="..\..\src\**\TemporaryGeneratedFile*.cs" target="src\umbraco.editorControls" />
|
<file src="..\..\src\umbraco.editorControls\**\*.cs" exclude="..\..\src\**\TemporaryGeneratedFile*.cs" target="src\umbraco.editorControls" />
|
||||||
<file src="$BuildTmp$\bin\umbraco.MacroEngines.pdb" target="lib" />
|
<file src="$BuildTmp$\bin\umbraco.MacroEngines.pdb" target="lib" />
|
||||||
<file src="..\..\src\umbraco.MacroEngines\**\*.cs" exclude="..\..\src\**\TemporaryGeneratedFile*.cs" target="src\umbraco.MacroEngines" />
|
<file src="..\..\src\umbraco.MacroEngines\**\*.cs" exclude="..\..\src\**\TemporaryGeneratedFile*.cs" target="src\umbraco.MacroEngines" />
|
||||||
<file src="$BuildTmp$\bin\umbraco.providers.pdb" target="lib" />
|
<file src="$BuildTmp$\bin\umbraco.providers.pdb" target="lib" />
|
||||||
<file src="..\..\src\umbraco.providers\**\*.cs" exclude="..\..\src\**\TemporaryGeneratedFile*.cs" target="src\umbraco.providers" />
|
<file src="..\..\src\umbraco.providers\**\*.cs" exclude="..\..\src\**\TemporaryGeneratedFile*.cs" target="src\umbraco.providers" />
|
||||||
<file src="$BuildTmp$\bin\umbraco.pdb" target="lib" />
|
<file src="$BuildTmp$\bin\umbraco.pdb" target="lib" />
|
||||||
<file src="..\..\src\Umbraco.Web\**\*.cs" exclude="..\..\src\**\TemporaryGeneratedFile*.cs" target="src\Umbraco.Web" />
|
<file src="..\..\src\Umbraco.Web\**\*.cs" exclude="..\..\src\**\TemporaryGeneratedFile*.cs" target="src\Umbraco.Web" />
|
||||||
<file src="$BuildTmp$\bin\Umbraco.Web.UI.pdb" target="lib" />
|
<file src="$BuildTmp$\bin\Umbraco.Web.UI.pdb" target="lib" />
|
||||||
<file src="..\..\src\Umbraco.Web.UI\**\*.cs" exclude="..\..\src\**\TemporaryGeneratedFile*.cs" target="src\Umbraco.Web.UI" />
|
<file src="..\..\src\Umbraco.Web.UI\**\*.cs" exclude="..\..\src\**\TemporaryGeneratedFile*.cs" target="src\Umbraco.Web.UI" />
|
||||||
<file src="$BuildTmp$\bin\UmbracoExamine.pdb" target="lib" />
|
<file src="$BuildTmp$\bin\UmbracoExamine.pdb" target="lib" />
|
||||||
<file src="..\..\src\UmbracoExamine\**\*.cs" exclude="..\..\src\**\TemporaryGeneratedFile*.cs" target="src\UmbracoExamine" />
|
<file src="..\..\src\UmbracoExamine\**\*.cs" exclude="..\..\src\**\TemporaryGeneratedFile*.cs" target="src\UmbracoExamine" />
|
||||||
</files>
|
</files>
|
||||||
</package>
|
</package>
|
||||||
|
|||||||
@@ -1,54 +1,56 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
||||||
<metadata minClientVersion="3.4.4">
|
<metadata minClientVersion="3.4.4">
|
||||||
<id>UmbracoCms</id>
|
<id>UmbracoCms</id>
|
||||||
<version>7.0.0</version>
|
<version>7.0.0</version>
|
||||||
<title>Umbraco Cms</title>
|
<title>Umbraco Cms</title>
|
||||||
<authors>Umbraco HQ</authors>
|
<authors>Umbraco HQ</authors>
|
||||||
<owners>Umbraco HQ</owners>
|
<owners>Umbraco HQ</owners>
|
||||||
<licenseUrl>http://opensource.org/licenses/MIT</licenseUrl>
|
<licenseUrl>http://opensource.org/licenses/MIT</licenseUrl>
|
||||||
<projectUrl>http://umbraco.com/</projectUrl>
|
<projectUrl>http://umbraco.com/</projectUrl>
|
||||||
<iconUrl>http://umbraco.com/media/357769/100px_transparent.png</iconUrl>
|
<iconUrl>http://umbraco.com/media/357769/100px_transparent.png</iconUrl>
|
||||||
<requireLicenseAcceptance>false</requireLicenseAcceptance>
|
<requireLicenseAcceptance>false</requireLicenseAcceptance>
|
||||||
<description>Installs Umbraco Cms in your Visual Studio ASP.NET project</description>
|
<description>Installs Umbraco Cms in your Visual Studio ASP.NET project</description>
|
||||||
<summary>Installs Umbraco Cms in your Visual Studio ASP.NET project</summary>
|
<summary>Installs Umbraco Cms in your Visual Studio ASP.NET project</summary>
|
||||||
<language>en-US</language>
|
<language>en-US</language>
|
||||||
<tags>umbraco</tags>
|
<tags>umbraco</tags>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency id="UmbracoCms.Core" version="[$version$]" />
|
<group targetFramework="net452">
|
||||||
<dependency id="Newtonsoft.Json" version="[10.0.2, 11.0.0)" />
|
<dependency id="UmbracoCms.Core" version="[$version$]" />
|
||||||
<dependency id="Umbraco.ModelsBuilder" version="[3.0.10, 4.0.0)" />
|
<dependency id="Newtonsoft.Json" version="[12.0.2, 13.0.0)" />
|
||||||
<dependency id="Microsoft.AspNet.SignalR.Core" version="[2.2.1, 3.0.0)" />
|
<dependency id="Umbraco.ModelsBuilder" version="[3.0.10, 4.0.0)" />
|
||||||
<dependency id="ImageProcessor.Web.Config" version="[2.3.1, 3.0.0)" />
|
<dependency id="Microsoft.AspNet.SignalR.Core" version="[2.4.1, 3.0.0)" />
|
||||||
<dependency id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="[2.0.0, 3.0.0)" />
|
<dependency id="ImageProcessor.Web.Config" version="[2.5.0.100, 3.0.0)" />
|
||||||
</dependencies>
|
<dependency id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="[2.0.1, 3.0.0)" />
|
||||||
</metadata>
|
</group>
|
||||||
<files>
|
</dependencies>
|
||||||
<file src="$BuildTmp$\Configs\**" target="Content\Config" exclude="$BuildTmp$\Configs\Web.config.transform" />
|
</metadata>
|
||||||
<file src="$BuildTmp$\WebApp\Views\**" target="Content\Views" exclude="$BuildTmp$\WebApp\Views\Web.config" />
|
<files>
|
||||||
<file src="$BuildTmp$\WebApp\default.aspx" target="Content\default.aspx" />
|
<file src="$BuildTmp$\Configs\**" target="Content\Config" exclude="$BuildTmp$\Configs\Web.config.transform" />
|
||||||
<file src="$BuildTmp$\WebApp\Global.asax" target="Content\Global.asax" />
|
<file src="$BuildTmp$\WebApp\Views\**" target="Content\Views" exclude="$BuildTmp$\WebApp\Views\Web.config" />
|
||||||
<file src="$BuildTmp$\WebApp\Web.config" target="UmbracoFiles\Web.config" />
|
<file src="$BuildTmp$\WebApp\default.aspx" target="Content\default.aspx" />
|
||||||
<file src="$BuildTmp$\WebApp\App_Browsers\**" target="UmbracoFiles\App_Browsers" />
|
<file src="$BuildTmp$\WebApp\Global.asax" target="Content\Global.asax" />
|
||||||
<file src="$BuildTmp$\WebApp\bin\amd64\**" target="UmbracoFiles\bin\amd64" />
|
<file src="$BuildTmp$\WebApp\Web.config" target="UmbracoFiles\Web.config" />
|
||||||
<file src="$BuildTmp$\WebApp\bin\x86\**" target="UmbracoFiles\bin\x86" />
|
<file src="$BuildTmp$\WebApp\App_Browsers\**" target="UmbracoFiles\App_Browsers" />
|
||||||
<file src="$BuildTmp$\WebApp\config\splashes\**" target="UmbracoFiles\Config\splashes" />
|
<file src="$BuildTmp$\WebApp\bin\amd64\**" target="UmbracoFiles\bin\amd64" />
|
||||||
<file src="$BuildTmp$\WebApp\config\BackOfficeTours\**" target="Content\Config\BackOfficeTours" />
|
<file src="$BuildTmp$\WebApp\bin\x86\**" target="UmbracoFiles\bin\x86" />
|
||||||
<file src="$BuildTmp$\WebApp\umbraco\**" target="UmbracoFiles\umbraco" />
|
<file src="$BuildTmp$\WebApp\config\splashes\**" target="UmbracoFiles\Config\splashes" />
|
||||||
<file src="$BuildTmp$\WebApp\umbraco_client\**" target="UmbracoFiles\umbraco_client" />
|
<file src="$BuildTmp$\WebApp\config\BackOfficeTours\**" target="Content\Config\BackOfficeTours" />
|
||||||
<file src="$BuildTmp$\WebApp\Media\Web.config" target="Content\Media\Web.config" />
|
<file src="$BuildTmp$\WebApp\umbraco\**" target="UmbracoFiles\umbraco" />
|
||||||
<file src="tools\install.ps1" target="tools\install.ps1" />
|
<file src="$BuildTmp$\WebApp\umbraco_client\**" target="UmbracoFiles\umbraco_client" />
|
||||||
<file src="tools\Readme.txt" target="tools\Readme.txt" />
|
<file src="$BuildTmp$\WebApp\Media\Web.config" target="Content\Media\Web.config" />
|
||||||
<file src="tools\ReadmeUpgrade.txt" target="tools\ReadmeUpgrade.txt" />
|
<file src="tools\install.ps1" target="tools\install.ps1" />
|
||||||
<file src="tools\Web.config.install.xdt" target="Content\Web.config.install.xdt" />
|
<file src="tools\Readme.txt" target="tools\Readme.txt" />
|
||||||
<file src="tools\applications.config.install.xdt" target="Content\config\applications.config.install.xdt" />
|
<file src="tools\ReadmeUpgrade.txt" target="tools\ReadmeUpgrade.txt" />
|
||||||
<file src="tools\ClientDependency.config.install.xdt" target="Content\config\ClientDependency.config.install.xdt" />
|
<file src="tools\Web.config.install.xdt" target="Content\Web.config.install.xdt" />
|
||||||
<file src="tools\Dashboard.config.install.xdt" target="Content\config\Dashboard.config.install.xdt" />
|
<file src="tools\applications.config.install.xdt" target="Content\config\applications.config.install.xdt" />
|
||||||
<file src="tools\trees.config.install.xdt" target="Content\config\trees.config.install.xdt" />
|
<file src="tools\ClientDependency.config.install.xdt" target="Content\config\ClientDependency.config.install.xdt" />
|
||||||
<file src="tools\umbracoSettings.config.install.xdt" target="Content\config\umbracoSettings.config.install.xdt" />
|
<file src="tools\Dashboard.config.install.xdt" target="Content\config\Dashboard.config.install.xdt" />
|
||||||
<file src="tools\Views.Web.config.install.xdt" target="Views\Web.config.install.xdt" />
|
<file src="tools\trees.config.install.xdt" target="Content\config\trees.config.install.xdt" />
|
||||||
<file src="tools\processing.config.install.xdt" target="Content\Config\imageprocessor\processing.config.install.xdt" />
|
<file src="tools\umbracoSettings.config.install.xdt" target="Content\config\umbracoSettings.config.install.xdt" />
|
||||||
<file src="tools\cache.config.install.xdt" target="Content\Config\imageprocessor\cache.config.install.xdt" />
|
<file src="tools\Views.Web.config.install.xdt" target="Views\Web.config.install.xdt" />
|
||||||
<file src="build\**" target="build" />
|
<file src="tools\processing.config.install.xdt" target="Content\Config\imageprocessor\processing.config.install.xdt" />
|
||||||
</files>
|
<file src="tools\cache.config.install.xdt" target="Content\Config\imageprocessor\cache.config.install.xdt" />
|
||||||
|
<file src="build\**" target="build" />
|
||||||
|
</files>
|
||||||
</package>
|
</package>
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
</configSections>
|
</configSections>
|
||||||
|
|
||||||
<system.web.webPages.razor>
|
<system.web.webPages.razor>
|
||||||
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" xdt:Locator="Match(factoryType)" xdt:Transform="SetAttributes(factoryType)" />
|
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" xdt:Locator="Match(factoryType)" xdt:Transform="SetAttributes(factoryType)" />
|
||||||
<pages pageBaseType="System.Web.Mvc.WebViewPage">
|
<pages pageBaseType="System.Web.Mvc.WebViewPage">
|
||||||
<namespaces>
|
<namespaces>
|
||||||
<add namespace="Umbraco.Web.PublishedContentModels" xdt:Transform="InsertIfMissing" />
|
<add namespace="Umbraco.Web.PublishedContentModels" xdt:Transform="InsertIfMissing" />
|
||||||
@@ -18,13 +18,13 @@
|
|||||||
|
|
||||||
<system.web>
|
<system.web>
|
||||||
<pages
|
<pages
|
||||||
pageParserFilterType="System.Web.Mvc.ViewTypeParserFilter, System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
|
pageParserFilterType="System.Web.Mvc.ViewTypeParserFilter, System.Web.Mvc, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
|
||||||
pageBaseType="System.Web.Mvc.ViewPage, System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
|
pageBaseType="System.Web.Mvc.ViewPage, System.Web.Mvc, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
|
||||||
userControlBaseType="System.Web.Mvc.ViewUserControl, System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
|
userControlBaseType="System.Web.Mvc.ViewUserControl, System.Web.Mvc, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
|
||||||
xdt:Locator="Match(pageParserFilterType,pageBaseType,userControlBaseType)"
|
xdt:Locator="Match(pageParserFilterType,pageBaseType,userControlBaseType)"
|
||||||
xdt:Transform="SetAttributes(pageParserFilterType,pageBaseType,userControlBaseType)">
|
xdt:Transform="SetAttributes(pageParserFilterType,pageBaseType,userControlBaseType)">
|
||||||
<controls>
|
<controls>
|
||||||
<add assembly="System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" namespace="System.Web.Mvc" xdt:Locator="Match(namespace)" xdt:Transform="SetAttributes(assembly)" />
|
<add assembly="System.Web.Mvc, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" namespace="System.Web.Mvc" xdt:Locator="Match(namespace)" xdt:Transform="SetAttributes(assembly)" />
|
||||||
</controls>
|
</controls>
|
||||||
</pages>
|
</pages>
|
||||||
</system.web>
|
</system.web>
|
||||||
|
|||||||
@@ -324,7 +324,6 @@
|
|||||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
<dependentAssembly xdt:Locator="Condition(./_defaultNamespace:assemblyIdentity/@name='HtmlAgilityPack')" xdt:Transform="Remove" />
|
<dependentAssembly xdt:Locator="Condition(./_defaultNamespace:assemblyIdentity/@name='HtmlAgilityPack')" xdt:Transform="Remove" />
|
||||||
<dependentAssembly xdt:Locator="Condition(./_defaultNamespace:assemblyIdentity/@name='AutoMapper')" xdt:Transform="Remove" />
|
<dependentAssembly xdt:Locator="Condition(./_defaultNamespace:assemblyIdentity/@name='AutoMapper')" xdt:Transform="Remove" />
|
||||||
<dependentAssembly xdt:Locator="Condition(./_defaultNamespace:assemblyIdentity/@name='System.Net.Http')" xdt:Transform="Remove" />
|
|
||||||
<dependentAssembly xdt:Locator="Condition(./_defaultNamespace:assemblyIdentity/@name='Newtonsoft.Json')" xdt:Transform="Remove" />
|
<dependentAssembly xdt:Locator="Condition(./_defaultNamespace:assemblyIdentity/@name='Newtonsoft.Json')" xdt:Transform="Remove" />
|
||||||
<dependentAssembly xdt:Locator="Condition(./_defaultNamespace:assemblyIdentity/@name='System.Web.Mvc')" xdt:Transform="Remove" />
|
<dependentAssembly xdt:Locator="Condition(./_defaultNamespace:assemblyIdentity/@name='System.Web.Mvc')" xdt:Transform="Remove" />
|
||||||
<dependentAssembly xdt:Locator="Condition(./_defaultNamespace:assemblyIdentity/@name='System.Web.WebPages.Razor')" xdt:Transform="Remove" />
|
<dependentAssembly xdt:Locator="Condition(./_defaultNamespace:assemblyIdentity/@name='System.Web.WebPages.Razor')" xdt:Transform="Remove" />
|
||||||
@@ -337,6 +336,9 @@
|
|||||||
<dependentAssembly xdt:Locator="Condition(./_defaultNamespace:assemblyIdentity/@name='Microsoft.CodeAnalysis.CSharp')" 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='log4net')" xdt:Transform="Remove" />
|
||||||
<dependentAssembly xdt:Locator="Condition(./_defaultNamespace:assemblyIdentity/@name='System.Data.SqlServerCe')" xdt:Transform="Remove" />
|
<dependentAssembly xdt:Locator="Condition(./_defaultNamespace:assemblyIdentity/@name='System.Data.SqlServerCe')" xdt:Transform="Remove" />
|
||||||
|
<dependentAssembly xdt:Locator="Condition(./_defaultNamespace:assemblyIdentity/@name='Microsoft.CodeDom.Providers.DotNetCompilerPlatform')" xdt:Transform="Remove" />
|
||||||
|
<dependentAssembly xdt:Locator="Condition(./_defaultNamespace:assemblyIdentity/@name='Microsoft.AspNet.SignalR.Core')" xdt:Transform="Remove" />
|
||||||
|
<dependentAssembly xdt:Locator="Condition(./_defaultNamespace:assemblyIdentity/@name='System.Web.Http.WebHost')" xdt:Transform="Remove" />
|
||||||
</assemblyBinding>
|
</assemblyBinding>
|
||||||
</runtime>
|
</runtime>
|
||||||
|
|
||||||
@@ -344,7 +346,7 @@
|
|||||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
<dependentAssembly xdt:Transform="Insert">
|
<dependentAssembly xdt:Transform="Insert">
|
||||||
<assemblyIdentity name="HtmlAgilityPack" publicKeyToken="bd319b19eaf3b43a" culture="neutral" />
|
<assemblyIdentity name="HtmlAgilityPack" publicKeyToken="bd319b19eaf3b43a" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-1.4.9.5" newVersion="1.4.9.5" />
|
<bindingRedirect oldVersion="0.0.0.0-1.8.8.0" newVersion="1.8.8.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly xdt:Transform="Insert">
|
<dependentAssembly xdt:Transform="Insert">
|
||||||
<assemblyIdentity name="AutoMapper" publicKeyToken="be96cd2c38ef1005" culture="neutral" />
|
<assemblyIdentity name="AutoMapper" publicKeyToken="be96cd2c38ef1005" culture="neutral" />
|
||||||
@@ -356,11 +358,11 @@
|
|||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly xdt:Transform="Insert">
|
<dependentAssembly xdt:Transform="Insert">
|
||||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-10.0.0.0" newVersion="10.0.0.0" />
|
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly xdt:Transform="Insert">
|
<dependentAssembly xdt:Transform="Insert">
|
||||||
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
|
<bindingRedirect oldVersion="0.0.0.0-5.2.7.0" newVersion="5.2.7.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly xdt:Transform="Insert">
|
<dependentAssembly xdt:Transform="Insert">
|
||||||
<assemblyIdentity name="System.Web.WebPages.Razor" publicKeyToken="31bf3856ad364e35" />
|
<assemblyIdentity name="System.Web.WebPages.Razor" publicKeyToken="31bf3856ad364e35" />
|
||||||
@@ -368,27 +370,27 @@
|
|||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly xdt:Transform="Insert">
|
<dependentAssembly xdt:Transform="Insert">
|
||||||
<assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
<assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
|
<bindingRedirect oldVersion="0.0.0.0-5.2.7.0" newVersion="5.2.7.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly xdt:Transform="Insert">
|
<dependentAssembly xdt:Transform="Insert">
|
||||||
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" />
|
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly xdt:Transform="Insert">
|
<dependentAssembly xdt:Transform="Insert">
|
||||||
<assemblyIdentity name="Microsoft.Owin.Security.OAuth" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
<assemblyIdentity name="Microsoft.Owin.Security.OAuth" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" />
|
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly xdt:Transform="Insert">
|
<dependentAssembly xdt:Transform="Insert">
|
||||||
<assemblyIdentity name="Microsoft.Owin.Security" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
<assemblyIdentity name="Microsoft.Owin.Security" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" />
|
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly xdt:Transform="Insert">
|
<dependentAssembly xdt:Transform="Insert">
|
||||||
<assemblyIdentity name="Microsoft.Owin.Security.Cookies" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
<assemblyIdentity name="Microsoft.Owin.Security.Cookies" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" />
|
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly xdt:Transform="Insert">
|
<dependentAssembly xdt:Transform="Insert">
|
||||||
<assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
<assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
|
<bindingRedirect oldVersion="0.0.0.0-5.2.7.0" newVersion="5.2.7.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly xdt:Transform="Insert">
|
<dependentAssembly xdt:Transform="Insert">
|
||||||
<assemblyIdentity name="log4net" publicKeyToken="669e0ddf0bb1aa2a" culture="neutral"/>
|
<assemblyIdentity name="log4net" publicKeyToken="669e0ddf0bb1aa2a" culture="neutral"/>
|
||||||
@@ -398,6 +400,18 @@
|
|||||||
<assemblyIdentity name="System.Data.SqlServerCe" publicKeyToken="89845DCD8080CC91" culture="neutral"/>
|
<assemblyIdentity name="System.Data.SqlServerCe" publicKeyToken="89845DCD8080CC91" culture="neutral"/>
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.0.0.1" newVersion="4.0.0.1"/>
|
<bindingRedirect oldVersion="0.0.0.0-4.0.0.1" newVersion="4.0.0.1"/>
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
|
<dependentAssembly xdt:Transform="Insert">
|
||||||
|
<assemblyIdentity name="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-2.0.1.0" newVersion="2.0.1.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly xdt:Transform="Insert">
|
||||||
|
<assemblyIdentity name="Microsoft.AspNet.SignalR.Core" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-2.4.1.0" newVersion="2.4.1.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly xdt:Transform="Insert">
|
||||||
|
<assemblyIdentity name="System.Web.Http.WebHost" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-5.2.7.0" newVersion="5.2.7.0" />
|
||||||
|
</dependentAssembly>
|
||||||
</assemblyBinding>
|
</assemblyBinding>
|
||||||
</runtime>
|
</runtime>
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
<RootNamespace>SQLCE4Umbraco</RootNamespace>
|
<RootNamespace>SQLCE4Umbraco</RootNamespace>
|
||||||
<AssemblyName>SQLCE4Umbraco</AssemblyName>
|
<AssemblyName>SQLCE4Umbraco</AssemblyName>
|
||||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
|
||||||
<FileAlignment>512</FileAlignment>
|
<FileAlignment>512</FileAlignment>
|
||||||
<SccProjectName>
|
<SccProjectName>
|
||||||
</SccProjectName>
|
</SccProjectName>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-10.0.0.0" newVersion="10.0.0.0" />
|
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
@@ -16,19 +16,19 @@
|
|||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" />
|
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="Microsoft.Owin.Security.OAuth" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
<assemblyIdentity name="Microsoft.Owin.Security.OAuth" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" />
|
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="Microsoft.Owin.Security" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
<assemblyIdentity name="Microsoft.Owin.Security" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" />
|
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="Microsoft.Owin.Security.Cookies" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
<assemblyIdentity name="Microsoft.Owin.Security.Cookies" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" />
|
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="log4net" publicKeyToken="669e0ddf0bb1aa2a" culture="neutral" />
|
<assemblyIdentity name="log4net" publicKeyToken="669e0ddf0bb1aa2a" culture="neutral" />
|
||||||
@@ -36,4 +36,4 @@
|
|||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
</assemblyBinding>
|
</assemblyBinding>
|
||||||
</runtime>
|
</runtime>
|
||||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /></startup></configuration>
|
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" /></startup></configuration>
|
||||||
|
|||||||
+2
-2
@@ -11,5 +11,5 @@ using System.Resources;
|
|||||||
|
|
||||||
[assembly: AssemblyVersion("1.0.*")]
|
[assembly: AssemblyVersion("1.0.*")]
|
||||||
|
|
||||||
[assembly: AssemblyFileVersion("7.14.0")]
|
[assembly: AssemblyFileVersion("7.15.1")]
|
||||||
[assembly: AssemblyInformationalVersion("7.14.0")]
|
[assembly: AssemblyInformationalVersion("7.15.1")]
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ namespace Umbraco.Core.Configuration
|
|||||||
{
|
{
|
||||||
public class UmbracoVersion
|
public class UmbracoVersion
|
||||||
{
|
{
|
||||||
private static readonly Version Version = new Version("7.14.0");
|
private static readonly Version Version = new Version("7.15.1");
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the current version of Umbraco.
|
/// Gets the current version of Umbraco.
|
||||||
|
|||||||
@@ -0,0 +1,295 @@
|
|||||||
|
using System;
|
||||||
|
|
||||||
|
namespace Umbraco.Core
|
||||||
|
{
|
||||||
|
public static partial class Constants
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Defines the identifiers for Umbraco data types as constants for easy centralized access/management.
|
||||||
|
/// </summary>
|
||||||
|
internal static class DataTypes
|
||||||
|
{
|
||||||
|
|
||||||
|
public static class ReservedPreValueKeys
|
||||||
|
{
|
||||||
|
public const string IgnoreUserStartNodes = "ignoreUserStartNodes";
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Guid for Content Picker as string
|
||||||
|
/// </summary>
|
||||||
|
public const string ContentPicker = "FD1E0DA5-5606-4862-B679-5D0CF3A52A59";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Guid for Content Picker
|
||||||
|
/// </summary>
|
||||||
|
public static readonly Guid ContentPickerGuid = new Guid(ContentPicker);
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Guid for Member Picker as string
|
||||||
|
/// </summary>
|
||||||
|
public const string MemberPicker = "1EA2E01F-EBD8-4CE1-8D71-6B1149E63548";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Guid for Member Picker
|
||||||
|
/// </summary>
|
||||||
|
public static readonly Guid MemberPickerGuid = new Guid(MemberPicker);
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Guid for Media Picker as string
|
||||||
|
/// </summary>
|
||||||
|
public const string MediaPicker = "135D60E0-64D9-49ED-AB08-893C9BA44AE5";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Guid for Media Picker
|
||||||
|
/// </summary>
|
||||||
|
public static readonly Guid MediaPickerGuid = new Guid(MediaPicker);
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Guid for Multiple Media Picker as string
|
||||||
|
/// </summary>
|
||||||
|
public const string MultipleMediaPicker = "9DBBCBBB-2327-434A-B355-AF1B84E5010A";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Guid for Multiple Media Picker
|
||||||
|
/// </summary>
|
||||||
|
public static readonly Guid MultipleMediaPickerGuid = new Guid(MultipleMediaPicker);
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Guid for Related Links as string
|
||||||
|
/// </summary>
|
||||||
|
public const string RelatedLinks = "B4E3535A-1753-47E2-8568-602CF8CFEE6F";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Guid for Related Links
|
||||||
|
/// </summary>
|
||||||
|
public static readonly Guid RelatedLinksGuid = new Guid(RelatedLinks);
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Guid for Member as string
|
||||||
|
/// </summary>
|
||||||
|
public const string Member = "d59be02f-1df9-4228-aa1e-01917d806cda";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Guid for Member
|
||||||
|
/// </summary>
|
||||||
|
public static readonly Guid MemberGuid = new Guid(Member);
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Guid for Image Cropper as string
|
||||||
|
/// </summary>
|
||||||
|
public const string ImageCropper = "1df9f033-e6d4-451f-b8d2-e0cbc50a836f";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Guid for Image Cropper
|
||||||
|
/// </summary>
|
||||||
|
public static readonly Guid ImageCropperGuid = new Guid(ImageCropper);
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Guid for Tags as string
|
||||||
|
/// </summary>
|
||||||
|
public const string Tags = "b6b73142-b9c1-4bf8-a16d-e1c23320b549";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Guid for Tags
|
||||||
|
/// </summary>
|
||||||
|
public static readonly Guid TagsGuid = new Guid(Tags);
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Guid for List View - Content as string
|
||||||
|
/// </summary>
|
||||||
|
public const string ListViewContent = "C0808DD3-8133-4E4B-8CE8-E2BEA84A96A4";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Guid for List View - Content
|
||||||
|
/// </summary>
|
||||||
|
public static readonly Guid ListViewContentGuid = new Guid(ListViewContent);
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Guid for List View - Media as string
|
||||||
|
/// </summary>
|
||||||
|
public const string ListViewMedia = "3A0156C4-3B8C-4803-BDC1-6871FAA83FFF";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Guid for List View - Media
|
||||||
|
/// </summary>
|
||||||
|
public static readonly Guid ListViewMediaGuid = new Guid(ListViewMedia);
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Guid for List View - Members as string
|
||||||
|
/// </summary>
|
||||||
|
public const string ListViewMembers = "AA2C52A0-CE87-4E65-A47C-7DF09358585D";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Guid for List View - Members
|
||||||
|
/// </summary>
|
||||||
|
public static readonly Guid ListViewMembersGuid = new Guid(ListViewMembers);
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Guid for Date Picker with time as string
|
||||||
|
/// </summary>
|
||||||
|
public const string DatePickerWithTime = "e4d66c0f-b935-4200-81f0-025f7256b89a";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Guid for Date Picker with time
|
||||||
|
/// </summary>
|
||||||
|
public static readonly Guid DatePickerWithTimeGuid = new Guid(DatePickerWithTime);
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Guid for Approved Color as string
|
||||||
|
/// </summary>
|
||||||
|
public const string ApprovedColor = "0225af17-b302-49cb-9176-b9f35cab9c17";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Guid for Approved Color
|
||||||
|
/// </summary>
|
||||||
|
public static readonly Guid ApprovedColorGuid = new Guid(ApprovedColor);
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Guid for Dropdown multiple as string
|
||||||
|
/// </summary>
|
||||||
|
public const string DropdownMultiple = "f38f0ac7-1d27-439c-9f3f-089cd8825a53";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Guid for Dropdown multiple
|
||||||
|
/// </summary>
|
||||||
|
public static readonly Guid DropdownMultipleGuid = new Guid(DropdownMultiple);
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Guid for Radiobox as string
|
||||||
|
/// </summary>
|
||||||
|
public const string Radiobox = "bb5f57c9-ce2b-4bb9-b697-4caca783a805";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Guid for Radiobox
|
||||||
|
/// </summary>
|
||||||
|
public static readonly Guid RadioboxGuid = new Guid(Radiobox);
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Guid for Date Picker as string
|
||||||
|
/// </summary>
|
||||||
|
public const string DatePicker = "5046194e-4237-453c-a547-15db3a07c4e1";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Guid for Date Picker
|
||||||
|
/// </summary>
|
||||||
|
public static readonly Guid DatePickerGuid = new Guid(DatePicker);
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Guid for Dropdown as string
|
||||||
|
/// </summary>
|
||||||
|
public const string Dropdown = "0b6a45e7-44ba-430d-9da5-4e46060b9e03";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Guid for Dropdown
|
||||||
|
/// </summary>
|
||||||
|
public static readonly Guid DropdownGuid = new Guid(Dropdown);
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Guid for Checkbox list as string
|
||||||
|
/// </summary>
|
||||||
|
public const string CheckboxList = "fbaf13a8-4036-41f2-93a3-974f678c312a";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Guid for Checkbox list
|
||||||
|
/// </summary>
|
||||||
|
public static readonly Guid CheckboxListGuid = new Guid(CheckboxList);
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Guid for Checkbox as string
|
||||||
|
/// </summary>
|
||||||
|
public const string Checkbox = "92897bc6-a5f3-4ffe-ae27-f2e7e33dda49";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Guid for Checkbox
|
||||||
|
/// </summary>
|
||||||
|
public static readonly Guid CheckboxGuid = new Guid(Checkbox);
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Guid for Numeric as string
|
||||||
|
/// </summary>
|
||||||
|
public const string Numeric = "2e6d3631-066e-44b8-aec4-96f09099b2b5";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Guid for Dropdown
|
||||||
|
/// </summary>
|
||||||
|
public static readonly Guid NumericGuid = new Guid(Numeric);
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Guid for Richtext editor as string
|
||||||
|
/// </summary>
|
||||||
|
public const string RichtextEditor = "ca90c950-0aff-4e72-b976-a30b1ac57dad";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Guid for Richtext editor
|
||||||
|
/// </summary>
|
||||||
|
public static readonly Guid RichtextEditorGuid = new Guid(RichtextEditor);
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Guid for Textstring as string
|
||||||
|
/// </summary>
|
||||||
|
public const string Textstring = "0cc0eba1-9960-42c9-bf9b-60e150b429ae";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Guid for Textstring
|
||||||
|
/// </summary>
|
||||||
|
public static readonly Guid TextstringGuid = new Guid(Textstring);
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Guid for Textarea as string
|
||||||
|
/// </summary>
|
||||||
|
public const string Textarea = "c6bac0dd-4ab9-45b1-8e30-e4b619ee5da3";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Guid for Dropdown
|
||||||
|
/// </summary>
|
||||||
|
public static readonly Guid TextareaGuid = new Guid(Textarea);
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Guid for Upload as string
|
||||||
|
/// </summary>
|
||||||
|
public const string Upload = "84c6b441-31df-4ffe-b67e-67d5bc3ae65a";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Guid for Upload
|
||||||
|
/// </summary>
|
||||||
|
public static readonly Guid UploadGuid = new Guid(Upload);
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Guid for Label as string
|
||||||
|
/// </summary>
|
||||||
|
public const string Label = "f0bc4bfb-b499-40d6-ba86-058885a5178c";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Guid for Label
|
||||||
|
/// </summary>
|
||||||
|
public static readonly Guid LabelGuid = new Guid(Label);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+1
-1
@@ -19,7 +19,7 @@ namespace Umbraco.Core.FileResources {
|
|||||||
// class via a tool like ResGen or Visual Studio.
|
// class via a tool like ResGen or Visual Studio.
|
||||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||||
// with the /str option, or rebuild your VS project.
|
// with the /str option, or rebuild your VS project.
|
||||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
internal class Files {
|
internal class Files {
|
||||||
|
|||||||
@@ -0,0 +1,55 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace Umbraco.Core.Models
|
||||||
|
{
|
||||||
|
internal static class DataTypeExtensions
|
||||||
|
{
|
||||||
|
private static readonly ISet<Guid> IdsOfBuildInDataTypes = new HashSet<Guid>()
|
||||||
|
{
|
||||||
|
Constants.DataTypes.ContentPickerGuid,
|
||||||
|
Constants.DataTypes.MemberPickerGuid,
|
||||||
|
Constants.DataTypes.MediaPickerGuid,
|
||||||
|
Constants.DataTypes.MultipleMediaPickerGuid,
|
||||||
|
Constants.DataTypes.RelatedLinksGuid,
|
||||||
|
Constants.DataTypes.MemberGuid,
|
||||||
|
Constants.DataTypes.ImageCropperGuid,
|
||||||
|
Constants.DataTypes.TagsGuid,
|
||||||
|
Constants.DataTypes.ListViewContentGuid,
|
||||||
|
Constants.DataTypes.ListViewMediaGuid,
|
||||||
|
Constants.DataTypes.ListViewMembersGuid,
|
||||||
|
Constants.DataTypes.DatePickerWithTimeGuid,
|
||||||
|
Constants.DataTypes.ApprovedColorGuid,
|
||||||
|
Constants.DataTypes.DropdownMultipleGuid,
|
||||||
|
Constants.DataTypes.RadioboxGuid,
|
||||||
|
Constants.DataTypes.DatePickerGuid,
|
||||||
|
Constants.DataTypes.DropdownGuid,
|
||||||
|
Constants.DataTypes.CheckboxListGuid,
|
||||||
|
Constants.DataTypes.CheckboxGuid,
|
||||||
|
Constants.DataTypes.NumericGuid,
|
||||||
|
Constants.DataTypes.RichtextEditorGuid,
|
||||||
|
Constants.DataTypes.TextstringGuid,
|
||||||
|
Constants.DataTypes.TextareaGuid,
|
||||||
|
Constants.DataTypes.UploadGuid,
|
||||||
|
Constants.DataTypes.LabelGuid,
|
||||||
|
};
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns true if this date type is build-in/default.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="dataType">The data type definition.</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static bool IsBuildInDataType(this IDataTypeDefinition dataType)
|
||||||
|
{
|
||||||
|
return IsBuildInDataType(dataType.Key);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns true if this date type is build-in/default.
|
||||||
|
/// </summary>
|
||||||
|
public static bool IsBuildInDataType(Guid key)
|
||||||
|
{
|
||||||
|
return IdsOfBuildInDataTypes.Contains(key);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -225,42 +225,5 @@ namespace Umbraco.Core.Models
|
|||||||
return clone;
|
return clone;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// A struction that can be contained in the additional data of an UmbracoEntity representing
|
|
||||||
/// a user defined property
|
|
||||||
/// </summary>
|
|
||||||
public class EntityProperty : IDeepCloneable
|
|
||||||
{
|
|
||||||
public string PropertyEditorAlias { get; set; }
|
|
||||||
public object Value { get; set; }
|
|
||||||
public object DeepClone()
|
|
||||||
{
|
|
||||||
//Memberwise clone on Entity will work since it doesn't have any deep elements
|
|
||||||
// for any sub class this will work for standard properties as well that aren't complex object's themselves.
|
|
||||||
var clone = MemberwiseClone();
|
|
||||||
return clone;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected bool Equals(EntityProperty other)
|
|
||||||
{
|
|
||||||
return PropertyEditorAlias.Equals(other.PropertyEditorAlias) && string.Equals(Value, other.Value);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override bool Equals(object obj)
|
|
||||||
{
|
|
||||||
if (ReferenceEquals(null, obj)) return false;
|
|
||||||
if (ReferenceEquals(this, obj)) return true;
|
|
||||||
if (obj.GetType() != this.GetType()) return false;
|
|
||||||
return Equals((EntityProperty) obj);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override int GetHashCode()
|
|
||||||
{
|
|
||||||
unchecked
|
|
||||||
{
|
|
||||||
return (PropertyEditorAlias.GetHashCode() * 397) ^ (Value != null ? Value.GetHashCode() : 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -195,19 +195,6 @@ namespace Umbraco.Core.Models
|
|||||||
return startNodeIds.Any(x => formattedPath.Contains(string.Concat(",", x, ",")));
|
return startNodeIds.Any(x => formattedPath.Contains(string.Concat(",", x, ",")));
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static bool IsInBranchOfStartNode(this IUser user, IUmbracoEntity entity, IEntityService entityService, int recycleBinId, out bool hasPathAccess)
|
|
||||||
{
|
|
||||||
switch (recycleBinId)
|
|
||||||
{
|
|
||||||
case Constants.System.RecycleBinMedia:
|
|
||||||
return IsInBranchOfStartNode(entity.Path, user.CalculateMediaStartNodeIds(entityService), user.GetMediaStartNodePaths(entityService), out hasPathAccess);
|
|
||||||
case Constants.System.RecycleBinContent:
|
|
||||||
return IsInBranchOfStartNode(entity.Path, user.CalculateContentStartNodeIds(entityService), user.GetContentStartNodePaths(entityService), out hasPathAccess);
|
|
||||||
default:
|
|
||||||
throw new NotSupportedException("Path access is only determined on content or media");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
internal static bool IsInBranchOfStartNode(string path, int[] startNodeIds, string[] startNodePaths, out bool hasPathAccess)
|
internal static bool IsInBranchOfStartNode(string path, int[] startNodeIds, string[] startNodePaths, out bool hasPathAccess)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrWhiteSpace(path)) throw new ArgumentException("Value cannot be null or whitespace.", "path");
|
if (string.IsNullOrWhiteSpace(path)) throw new ArgumentException("Value cannot be null or whitespace.", "path");
|
||||||
|
|||||||
@@ -12,14 +12,18 @@ namespace Umbraco.Core.Persistence.Factories
|
|||||||
{
|
{
|
||||||
internal class UmbracoEntityFactory
|
internal class UmbracoEntityFactory
|
||||||
{
|
{
|
||||||
|
private static readonly Lazy<string[]> EntityProperties = new Lazy<string[]>(() => typeof(IUmbracoEntity).GetPublicProperties().Select(x => x.Name).ToArray());
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Figure out what extra properties we have that are not on the IUmbracoEntity and add them to additional data
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="entity"></param>
|
||||||
|
/// <param name="originalEntityProperties"></param>
|
||||||
internal void AddAdditionalData(UmbracoEntity entity, IDictionary<string, object> originalEntityProperties)
|
internal void AddAdditionalData(UmbracoEntity entity, IDictionary<string, object> originalEntityProperties)
|
||||||
{
|
{
|
||||||
var entityProps = typeof(IUmbracoEntity).GetPublicProperties().Select(x => x.Name).ToArray();
|
|
||||||
|
|
||||||
//figure out what extra properties we have that are not on the IUmbracoEntity and add them to additional data
|
|
||||||
foreach (var k in originalEntityProperties.Keys
|
foreach (var k in originalEntityProperties.Keys
|
||||||
.Select(x => new { orig = x, title = x.ToCleanString(CleanStringType.PascalCase | CleanStringType.Ascii | CleanStringType.ConvertCase) })
|
.Select(x => new { orig = x, title = x.ToCleanString(CleanStringType.PascalCase | CleanStringType.Ascii | CleanStringType.ConvertCase) })
|
||||||
.Where(x => entityProps.InvariantContains(x.title) == false))
|
.Where(x => EntityProperties.Value.InvariantContains(x.title) == false))
|
||||||
{
|
{
|
||||||
entity.AdditionalData[k.title] = originalEntityProperties[k.orig];
|
entity.AdditionalData[k.title] = originalEntityProperties[k.orig];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -116,36 +116,36 @@ namespace Umbraco.Core.Persistence.Migrations.Initial
|
|||||||
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -1, Trashed = false, ParentId = -1, UserId = 0, Level = 0, Path = "-1", SortOrder = 0, UniqueId = new Guid("916724a5-173d-4619-b97e-b9de133dd6f5"), Text = "SYSTEM DATA: umbraco master root", NodeObjectType = new Guid(Constants.ObjectTypes.SystemRoot), CreateDate = DateTime.Now });
|
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -1, Trashed = false, ParentId = -1, UserId = 0, Level = 0, Path = "-1", SortOrder = 0, UniqueId = new Guid("916724a5-173d-4619-b97e-b9de133dd6f5"), Text = "SYSTEM DATA: umbraco master root", NodeObjectType = new Guid(Constants.ObjectTypes.SystemRoot), CreateDate = DateTime.Now });
|
||||||
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -20, Trashed = false, ParentId = -1, UserId = 0, Level = 0, Path = "-1,-20", SortOrder = 0, UniqueId = new Guid("0F582A79-1E41-4CF0-BFA0-76340651891A"), Text = "Recycle Bin", NodeObjectType = new Guid(Constants.ObjectTypes.ContentRecycleBin), CreateDate = DateTime.Now });
|
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -20, Trashed = false, ParentId = -1, UserId = 0, Level = 0, Path = "-1,-20", SortOrder = 0, UniqueId = new Guid("0F582A79-1E41-4CF0-BFA0-76340651891A"), Text = "Recycle Bin", NodeObjectType = new Guid(Constants.ObjectTypes.ContentRecycleBin), CreateDate = DateTime.Now });
|
||||||
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -21, Trashed = false, ParentId = -1, UserId = 0, Level = 0, Path = "-1,-21", SortOrder = 0, UniqueId = new Guid("BF7C7CBC-952F-4518-97A2-69E9C7B33842"), Text = "Recycle Bin", NodeObjectType = new Guid(Constants.ObjectTypes.MediaRecycleBin), CreateDate = DateTime.Now });
|
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -21, Trashed = false, ParentId = -1, UserId = 0, Level = 0, Path = "-1,-21", SortOrder = 0, UniqueId = new Guid("BF7C7CBC-952F-4518-97A2-69E9C7B33842"), Text = "Recycle Bin", NodeObjectType = new Guid(Constants.ObjectTypes.MediaRecycleBin), CreateDate = DateTime.Now });
|
||||||
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -92, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,-92", SortOrder = 35, UniqueId = new Guid("f0bc4bfb-b499-40d6-ba86-058885a5178c"), Text = "Label", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -92, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,-92", SortOrder = 35, UniqueId = Constants.DataTypes.LabelGuid, Text = "Label", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
||||||
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -90, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,-90", SortOrder = 34, UniqueId = new Guid("84c6b441-31df-4ffe-b67e-67d5bc3ae65a"), Text = "Upload", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -90, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,-90", SortOrder = 34, UniqueId = Constants.DataTypes.UploadGuid, Text = "Upload", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
||||||
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -89, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,-89", SortOrder = 33, UniqueId = new Guid("c6bac0dd-4ab9-45b1-8e30-e4b619ee5da3"), Text = "Textarea", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -89, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,-89", SortOrder = 33, UniqueId = Constants.DataTypes.TextareaGuid, Text = "Textarea", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
||||||
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -88, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,-88", SortOrder = 32, UniqueId = new Guid("0cc0eba1-9960-42c9-bf9b-60e150b429ae"), Text = "Textstring", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -88, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,-88", SortOrder = 32, UniqueId = Constants.DataTypes.TextstringGuid, Text = "Textstring", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
||||||
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -87, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,-87", SortOrder = 4, UniqueId = new Guid("ca90c950-0aff-4e72-b976-a30b1ac57dad"), Text = "Richtext editor", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -87, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,-87", SortOrder = 4, UniqueId = Constants.DataTypes.RichtextEditorGuid, Text = "Richtext editor", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
||||||
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -51, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,-51", SortOrder = 2, UniqueId = new Guid("2e6d3631-066e-44b8-aec4-96f09099b2b5"), Text = "Numeric", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -51, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,-51", SortOrder = 2, UniqueId = Constants.DataTypes.NumericGuid, Text = "Numeric", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
||||||
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -49, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,-49", SortOrder = 2, UniqueId = new Guid("92897bc6-a5f3-4ffe-ae27-f2e7e33dda49"), Text = "Checkbox", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -49, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,-49", SortOrder = 2, UniqueId = Constants.DataTypes.CheckboxGuid, Text = "Checkbox", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
||||||
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -43, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,-43", SortOrder = 2, UniqueId = new Guid("fbaf13a8-4036-41f2-93a3-974f678c312a"), Text = "Checkbox list", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -43, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,-43", SortOrder = 2, UniqueId = Constants.DataTypes.CheckboxListGuid, Text = "Checkbox list", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
||||||
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -42, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,-42", SortOrder = 2, UniqueId = new Guid("0b6a45e7-44ba-430d-9da5-4e46060b9e03"), Text = "Dropdown", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -42, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,-42", SortOrder = 2, UniqueId = Constants.DataTypes.DropdownGuid, Text = "Dropdown", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
||||||
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -41, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,-41", SortOrder = 2, UniqueId = new Guid("5046194e-4237-453c-a547-15db3a07c4e1"), Text = "Date Picker", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -41, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,-41", SortOrder = 2, UniqueId = Constants.DataTypes.DatePickerGuid, Text = "Date Picker", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
||||||
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -40, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,-40", SortOrder = 2, UniqueId = new Guid("bb5f57c9-ce2b-4bb9-b697-4caca783a805"), Text = "Radiobox", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -40, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,-40", SortOrder = 2, UniqueId = Constants.DataTypes.RadioboxGuid, Text = "Radiobox", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
||||||
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -39, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,-39", SortOrder = 2, UniqueId = new Guid("f38f0ac7-1d27-439c-9f3f-089cd8825a53"), Text = "Dropdown multiple", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -39, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,-39", SortOrder = 2, UniqueId = Constants.DataTypes.DropdownMultipleGuid, Text = "Dropdown multiple", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
||||||
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -37, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,-37", SortOrder = 2, UniqueId = new Guid("0225af17-b302-49cb-9176-b9f35cab9c17"), Text = "Approved Color", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -37, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,-37", SortOrder = 2, UniqueId = Constants.DataTypes.ApprovedColorGuid, Text = "Approved Color", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
||||||
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -36, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,-36", SortOrder = 2, UniqueId = new Guid("e4d66c0f-b935-4200-81f0-025f7256b89a"), Text = "Date Picker with time", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -36, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,-36", SortOrder = 2, UniqueId = Constants.DataTypes.DatePickerWithTimeGuid, Text = "Date Picker with time", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
||||||
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = Constants.System.DefaultContentListViewDataTypeId, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,-95", SortOrder = 2, UniqueId = new Guid("C0808DD3-8133-4E4B-8CE8-E2BEA84A96A4"), Text = Constants.Conventions.DataTypes.ListViewPrefix + "Content", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = Constants.System.DefaultContentListViewDataTypeId, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,-95", SortOrder = 2, UniqueId = Constants.DataTypes.ListViewContentGuid, Text = Constants.Conventions.DataTypes.ListViewPrefix + "Content", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
||||||
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = Constants.System.DefaultMediaListViewDataTypeId, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,-96", SortOrder = 2, UniqueId = new Guid("3A0156C4-3B8C-4803-BDC1-6871FAA83FFF"), Text = Constants.Conventions.DataTypes.ListViewPrefix + "Media", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = Constants.System.DefaultMediaListViewDataTypeId, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,-96", SortOrder = 2, UniqueId = Constants.DataTypes.ListViewMediaGuid, Text = Constants.Conventions.DataTypes.ListViewPrefix + "Media", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
||||||
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = Constants.System.DefaultMembersListViewDataTypeId, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,-97", SortOrder = 2, UniqueId = new Guid("AA2C52A0-CE87-4E65-A47C-7DF09358585D"), Text = Constants.Conventions.DataTypes.ListViewPrefix + "Members", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = Constants.System.DefaultMembersListViewDataTypeId, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,-97", SortOrder = 2, UniqueId = Constants.DataTypes.ListViewMembersGuid, Text = Constants.Conventions.DataTypes.ListViewPrefix + "Members", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
||||||
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = 1031, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,1031", SortOrder = 2, UniqueId = new Guid("f38bd2d7-65d0-48e6-95dc-87ce06ec2d3d"), Text = Constants.Conventions.MediaTypes.Folder, NodeObjectType = new Guid(Constants.ObjectTypes.MediaType), CreateDate = DateTime.Now });
|
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = 1031, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,1031", SortOrder = 2, UniqueId = new Guid("f38bd2d7-65d0-48e6-95dc-87ce06ec2d3d"), Text = Constants.Conventions.MediaTypes.Folder, NodeObjectType = new Guid(Constants.ObjectTypes.MediaType), CreateDate = DateTime.Now });
|
||||||
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = 1032, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,1032", SortOrder = 2, UniqueId = new Guid("cc07b313-0843-4aa8-bbda-871c8da728c8"), Text = Constants.Conventions.MediaTypes.Image, NodeObjectType = new Guid(Constants.ObjectTypes.MediaType), CreateDate = DateTime.Now });
|
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = 1032, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,1032", SortOrder = 2, UniqueId = new Guid("cc07b313-0843-4aa8-bbda-871c8da728c8"), Text = Constants.Conventions.MediaTypes.Image, NodeObjectType = new Guid(Constants.ObjectTypes.MediaType), CreateDate = DateTime.Now });
|
||||||
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = 1033, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,1033", SortOrder = 2, UniqueId = new Guid("4c52d8ab-54e6-40cd-999c-7a5f24903e4d"), Text = Constants.Conventions.MediaTypes.File, NodeObjectType = new Guid(Constants.ObjectTypes.MediaType), CreateDate = DateTime.Now });
|
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = 1033, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,1033", SortOrder = 2, UniqueId = new Guid("4c52d8ab-54e6-40cd-999c-7a5f24903e4d"), Text = Constants.Conventions.MediaTypes.File, NodeObjectType = new Guid(Constants.ObjectTypes.MediaType), CreateDate = DateTime.Now });
|
||||||
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = 1041, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,1041", SortOrder = 2, UniqueId = new Guid("b6b73142-b9c1-4bf8-a16d-e1c23320b549"), Text = "Tags", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = 1041, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,1041", SortOrder = 2, UniqueId = Constants.DataTypes.TagsGuid, Text = "Tags", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
||||||
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = 1043, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,1043", SortOrder = 2, UniqueId = new Guid("1df9f033-e6d4-451f-b8d2-e0cbc50a836f"), Text = "Image Cropper", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = 1043, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,1043", SortOrder = 2, UniqueId = Constants.DataTypes.ImageCropperGuid, Text = "Image Cropper", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
||||||
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = 1044, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,1044", SortOrder = 0, UniqueId = new Guid("d59be02f-1df9-4228-aa1e-01917d806cda"), Text = Constants.Conventions.MemberTypes.DefaultAlias, NodeObjectType = new Guid(Constants.ObjectTypes.MemberType), CreateDate = DateTime.Now });
|
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = 1044, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,1044", SortOrder = 0, UniqueId = Constants.DataTypes.MemberGuid, Text = Constants.Conventions.MemberTypes.DefaultAlias, NodeObjectType = new Guid(Constants.ObjectTypes.MemberType), CreateDate = DateTime.Now });
|
||||||
|
|
||||||
//New UDI pickers with newer Ids
|
//New UDI pickers with newer Ids
|
||||||
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = 1046, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,1046", SortOrder = 2, UniqueId = new Guid("FD1E0DA5-5606-4862-B679-5D0CF3A52A59"), Text = "Content Picker", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = 1046, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,1046", SortOrder = 2, UniqueId = Constants.DataTypes.ContentPickerGuid, Text = "Content Picker", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
||||||
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = 1047, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,1047", SortOrder = 2, UniqueId = new Guid("1EA2E01F-EBD8-4CE1-8D71-6B1149E63548"), Text = "Member Picker", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = 1047, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,1047", SortOrder = 2, UniqueId = Constants.DataTypes.MemberPickerGuid, Text = "Member Picker", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
||||||
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = 1048, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,1048", SortOrder = 2, UniqueId = new Guid("135D60E0-64D9-49ED-AB08-893C9BA44AE5"), Text = "Media Picker", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = 1048, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,1048", SortOrder = 2, UniqueId = Constants.DataTypes.MediaPickerGuid, Text = "Media Picker", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
||||||
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = 1049, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,1049", SortOrder = 2, UniqueId = new Guid("9DBBCBBB-2327-434A-B355-AF1B84E5010A"), Text = "Multiple Media Picker", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = 1049, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,1049", SortOrder = 2, UniqueId = Constants.DataTypes.MultipleMediaPickerGuid, Text = "Multiple Media Picker", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
||||||
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = 1050, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,1050", SortOrder = 2, UniqueId = new Guid("B4E3535A-1753-47E2-8568-602CF8CFEE6F"), Text = "Related Links", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = 1050, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,1050", SortOrder = 2, UniqueId = Constants.DataTypes.RelatedLinksGuid, Text = "Related Links", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CreateUmbracoLockData()
|
private void CreateUmbracoLockData()
|
||||||
|
|||||||
@@ -851,6 +851,7 @@ order by umbracoNode.{2}, umbracoNode.parentID, umbracoNode.sortOrder",
|
|||||||
var sql = string.Format(@"select umbracoNode.id, umbracoNode.parentID, umbracoNode.sortOrder, cmsPreviewXml.{0}, umbracoNode.{1} from umbracoNode
|
var sql = string.Format(@"select umbracoNode.id, umbracoNode.parentID, umbracoNode.sortOrder, cmsPreviewXml.{0}, umbracoNode.{1} from umbracoNode
|
||||||
inner join cmsPreviewXml on cmsPreviewXml.nodeId = umbracoNode.id and umbracoNode.nodeObjectType = @type
|
inner join cmsPreviewXml on cmsPreviewXml.nodeId = umbracoNode.id and umbracoNode.nodeObjectType = @type
|
||||||
inner join cmsDocument on cmsPreviewXml.versionId = cmsDocument.versionId and cmsDocument.newest=1
|
inner join cmsDocument on cmsPreviewXml.versionId = cmsDocument.versionId and cmsDocument.newest=1
|
||||||
|
where umbracoNode.trashed = 0
|
||||||
order by umbracoNode.{2}, umbracoNode.parentID, umbracoNode.sortOrder",
|
order by umbracoNode.{2}, umbracoNode.parentID, umbracoNode.sortOrder",
|
||||||
SqlSyntax.GetQuotedColumnName("xml"),
|
SqlSyntax.GetQuotedColumnName("xml"),
|
||||||
SqlSyntax.GetQuotedColumnName("level"),
|
SqlSyntax.GetQuotedColumnName("level"),
|
||||||
|
|||||||
@@ -20,27 +20,22 @@ namespace Umbraco.Core.Persistence.Repositories
|
|||||||
/// </remarks>
|
/// </remarks>
|
||||||
internal class EntityRepository : DisposableObjectSlim, IEntityRepository
|
internal class EntityRepository : DisposableObjectSlim, IEntityRepository
|
||||||
{
|
{
|
||||||
private readonly IDatabaseUnitOfWork _work;
|
|
||||||
|
|
||||||
public EntityRepository(IDatabaseUnitOfWork work)
|
public EntityRepository(IDatabaseUnitOfWork work)
|
||||||
{
|
{
|
||||||
_work = work;
|
UnitOfWork = work;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the Unit of Work added to the repository
|
/// Returns the Unit of Work added to the repository
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected internal IDatabaseUnitOfWork UnitOfWork
|
protected internal IDatabaseUnitOfWork UnitOfWork { get; }
|
||||||
{
|
|
||||||
get { return _work; }
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Internal for testing purposes
|
/// Internal for testing purposes
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal Guid UnitKey
|
internal Guid UnitKey
|
||||||
{
|
{
|
||||||
get { return (Guid)_work.Key; }
|
get { return (Guid)UnitOfWork.Key; }
|
||||||
}
|
}
|
||||||
|
|
||||||
#region Query Methods
|
#region Query Methods
|
||||||
@@ -69,75 +64,8 @@ namespace Umbraco.Core.Persistence.Repositories
|
|||||||
|
|
||||||
IEnumerable<IUmbracoEntity> result;
|
IEnumerable<IUmbracoEntity> result;
|
||||||
|
|
||||||
if (isMedia)
|
var pagedResult = UnitOfWork.Database.Page<dynamic>(pageIndex + 1, pageSize, pagedSql);
|
||||||
{
|
result = pagedResult.Items.Select(factory.BuildEntityFromDynamic).Cast<IUmbracoEntity>().ToList();
|
||||||
//Treat media differently for now, as an Entity it will be returned with ALL of it's properties in the AdditionalData bag!
|
|
||||||
var pagedResult = _work.Database.Page<dynamic>(pageIndex + 1, pageSize, pagedSql);
|
|
||||||
|
|
||||||
var ids = pagedResult.Items.Select(x => (int) x.id).InGroupsOf(2000);
|
|
||||||
var entities = pagedResult.Items.Select(factory.BuildEntityFromDynamic).Cast<IUmbracoEntity>().ToList();
|
|
||||||
|
|
||||||
//Now we need to merge in the property data since we need paging and we can't do this the way that the big media query was working before
|
|
||||||
foreach (var idGroup in ids)
|
|
||||||
{
|
|
||||||
var propSql = GetPropertySql(Constants.ObjectTypes.Media)
|
|
||||||
.Where("contentNodeId IN (@ids)", new { ids = idGroup });
|
|
||||||
propSql = (orderDirection == Direction.Descending) ? propSql.OrderByDescending("contentNodeId") : propSql.OrderBy("contentNodeId");
|
|
||||||
|
|
||||||
//This does NOT fetch all data into memory in a list, this will read
|
|
||||||
// over the records as a data reader, this is much better for performance and memory,
|
|
||||||
// but it means that during the reading of this data set, nothing else can be read
|
|
||||||
// from SQL server otherwise we'll get an exception.
|
|
||||||
var allPropertyData = _work.Database.Query<dynamic>(propSql);
|
|
||||||
|
|
||||||
//keep track of the current property data item being enumerated
|
|
||||||
var propertyDataSetEnumerator = allPropertyData.GetEnumerator();
|
|
||||||
var hasCurrent = false; // initially there is no enumerator.Current
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
//This must be sorted by node id (which is done by SQL) because this is how we are sorting the query to lookup property types above,
|
|
||||||
// which allows us to more efficiently iterate over the large data set of property values.
|
|
||||||
foreach (var entity in entities)
|
|
||||||
{
|
|
||||||
// assemble the dtos for this def
|
|
||||||
// use the available enumerator.Current if any else move to next
|
|
||||||
while (hasCurrent || propertyDataSetEnumerator.MoveNext())
|
|
||||||
{
|
|
||||||
if (propertyDataSetEnumerator.Current.contentNodeId == entity.Id)
|
|
||||||
{
|
|
||||||
hasCurrent = false; // enumerator.Current is not available
|
|
||||||
|
|
||||||
//the property data goes into the additional data
|
|
||||||
entity.AdditionalData[propertyDataSetEnumerator.Current.propertyTypeAlias] = new UmbracoEntity.EntityProperty
|
|
||||||
{
|
|
||||||
PropertyEditorAlias = propertyDataSetEnumerator.Current.propertyEditorAlias,
|
|
||||||
Value = StringExtensions.IsNullOrWhiteSpace(propertyDataSetEnumerator.Current.dataNtext)
|
|
||||||
? propertyDataSetEnumerator.Current.dataNvarchar
|
|
||||||
: StringExtensions.ConvertToJsonIfPossible(propertyDataSetEnumerator.Current.dataNtext)
|
|
||||||
};
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
hasCurrent = true; // enumerator.Current is available for another def
|
|
||||||
break; // no more propertyDataDto for this def
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
finally
|
|
||||||
{
|
|
||||||
propertyDataSetEnumerator.Dispose();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
result = entities;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var pagedResult = _work.Database.Page<dynamic>(pageIndex + 1, pageSize, pagedSql);
|
|
||||||
result = pagedResult.Items.Select(factory.BuildEntityFromDynamic).Cast<IUmbracoEntity>().ToList();
|
|
||||||
}
|
|
||||||
|
|
||||||
//The total items from the PetaPoco page query will be wrong due to the Outer join used on parent, depending on the search this will
|
//The total items from the PetaPoco page query will be wrong due to the Outer join used on parent, depending on the search this will
|
||||||
//return duplicate results when the COUNT is used in conjuction with it, so we need to get the total on our own.
|
//return duplicate results when the COUNT is used in conjuction with it, so we need to get the total on our own.
|
||||||
@@ -159,7 +87,7 @@ namespace Umbraco.Core.Persistence.Repositories
|
|||||||
var translatorCount = new SqlTranslator<IUmbracoEntity>(sqlCountClause, query);
|
var translatorCount = new SqlTranslator<IUmbracoEntity>(sqlCountClause, query);
|
||||||
var countSql = translatorCount.Translate();
|
var countSql = translatorCount.Translate();
|
||||||
|
|
||||||
totalRecords = _work.Database.ExecuteScalar<int>(countSql);
|
totalRecords = UnitOfWork.Database.ExecuteScalar<int>(countSql);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@@ -167,7 +95,7 @@ namespace Umbraco.Core.Persistence.Repositories
|
|||||||
public IUmbracoEntity GetByKey(Guid key)
|
public IUmbracoEntity GetByKey(Guid key)
|
||||||
{
|
{
|
||||||
var sql = GetBaseWhere(GetBase, false, false, key);
|
var sql = GetBaseWhere(GetBase, false, false, key);
|
||||||
var nodeDto = _work.Database.FirstOrDefault<dynamic>(sql);
|
var nodeDto = UnitOfWork.Database.FirstOrDefault<dynamic>(sql);
|
||||||
if (nodeDto == null)
|
if (nodeDto == null)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
@@ -186,27 +114,15 @@ namespace Umbraco.Core.Persistence.Repositories
|
|||||||
|
|
||||||
var factory = new UmbracoEntityFactory();
|
var factory = new UmbracoEntityFactory();
|
||||||
|
|
||||||
if (isMedia)
|
//query = read forward data reader, do not load everything into mem
|
||||||
|
var dtos = UnitOfWork.Database.Query<dynamic>(sql);
|
||||||
|
var collection = new EntityDefinitionCollection();
|
||||||
|
foreach (var dto in dtos)
|
||||||
{
|
{
|
||||||
//for now treat media differently and include all property data too
|
collection.AddOrUpdate(new EntityDefinition(factory, dto, isContent, false));
|
||||||
var entities = _work.Database.Fetch<dynamic, UmbracoPropertyDto, UmbracoEntity>(
|
|
||||||
new UmbracoEntityRelator().Map, sql);
|
|
||||||
|
|
||||||
return entities.FirstOrDefault();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
|
|
||||||
//query = read forward data reader, do not load everything into mem
|
|
||||||
var dtos = _work.Database.Query<dynamic>(sql);
|
|
||||||
var collection = new EntityDefinitionCollection();
|
|
||||||
foreach (var dto in dtos)
|
|
||||||
{
|
|
||||||
collection.AddOrUpdate(new EntityDefinition(factory, dto, isContent, false));
|
|
||||||
}
|
|
||||||
var found = collection.FirstOrDefault();
|
|
||||||
return found != null ? found.BuildFromDynamic() : null;
|
|
||||||
}
|
}
|
||||||
|
var found = collection.FirstOrDefault();
|
||||||
|
return found != null ? found.BuildFromDynamic() : null;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -214,7 +130,7 @@ namespace Umbraco.Core.Persistence.Repositories
|
|||||||
public virtual IUmbracoEntity Get(int id)
|
public virtual IUmbracoEntity Get(int id)
|
||||||
{
|
{
|
||||||
var sql = GetBaseWhere(GetBase, false, false, id);
|
var sql = GetBaseWhere(GetBase, false, false, id);
|
||||||
var nodeDto = _work.Database.FirstOrDefault<dynamic>(sql);
|
var nodeDto = UnitOfWork.Database.FirstOrDefault<dynamic>(sql);
|
||||||
if (nodeDto == null)
|
if (nodeDto == null)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
@@ -233,26 +149,16 @@ namespace Umbraco.Core.Persistence.Repositories
|
|||||||
|
|
||||||
var factory = new UmbracoEntityFactory();
|
var factory = new UmbracoEntityFactory();
|
||||||
|
|
||||||
if (isMedia)
|
//query = read forward data reader, do not load everything into mem
|
||||||
|
var dtos = UnitOfWork.Database.Query<dynamic>(sql);
|
||||||
|
var collection = new EntityDefinitionCollection();
|
||||||
|
foreach (var dto in dtos)
|
||||||
{
|
{
|
||||||
//for now treat media differently and include all property data too
|
collection.AddOrUpdate(new EntityDefinition(factory, dto, isContent, false));
|
||||||
var entities = _work.Database.Fetch<dynamic, UmbracoPropertyDto, UmbracoEntity>(
|
}
|
||||||
new UmbracoEntityRelator().Map, sql);
|
var found = collection.FirstOrDefault();
|
||||||
|
return found != null ? found.BuildFromDynamic() : null;
|
||||||
|
|
||||||
return entities.FirstOrDefault();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
//query = read forward data reader, do not load everything into mem
|
|
||||||
var dtos = _work.Database.Query<dynamic>(sql);
|
|
||||||
var collection = new EntityDefinitionCollection();
|
|
||||||
foreach (var dto in dtos)
|
|
||||||
{
|
|
||||||
collection.AddOrUpdate(new EntityDefinition(factory, dto, isContent, false));
|
|
||||||
}
|
|
||||||
var found = collection.FirstOrDefault();
|
|
||||||
return found != null ? found.BuildFromDynamic() : null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual IEnumerable<IUmbracoEntity> GetAll(Guid objectTypeId, params int[] ids)
|
public virtual IEnumerable<IUmbracoEntity> GetAll(Guid objectTypeId, params int[] ids)
|
||||||
@@ -277,24 +183,14 @@ namespace Umbraco.Core.Persistence.Repositories
|
|||||||
|
|
||||||
var factory = new UmbracoEntityFactory();
|
var factory = new UmbracoEntityFactory();
|
||||||
|
|
||||||
if (isMedia)
|
//query = read forward data reader, do not load everything into mem
|
||||||
|
var dtos = UnitOfWork.Database.Query<dynamic>(sql);
|
||||||
|
var collection = new EntityDefinitionCollection();
|
||||||
|
foreach (var dto in dtos)
|
||||||
{
|
{
|
||||||
//for now treat media differently and include all property data too
|
collection.AddOrUpdate(new EntityDefinition(factory, dto, isContent, isMedia));
|
||||||
var entities = _work.Database.Fetch<dynamic, UmbracoPropertyDto, UmbracoEntity>(
|
|
||||||
new UmbracoEntityRelator().Map, sql);
|
|
||||||
return entities;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
//query = read forward data reader, do not load everything into mem
|
|
||||||
var dtos = _work.Database.Query<dynamic>(sql);
|
|
||||||
var collection = new EntityDefinitionCollection();
|
|
||||||
foreach (var dto in dtos)
|
|
||||||
{
|
|
||||||
collection.AddOrUpdate(new EntityDefinition(factory, dto, isContent, false));
|
|
||||||
}
|
|
||||||
return collection.Select(x => x.BuildFromDynamic()).ToList();
|
|
||||||
}
|
}
|
||||||
|
return collection.Select(x => x.BuildFromDynamic()).ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual IEnumerable<EntityPath> GetAllPaths(Guid objectTypeId, params int[] ids)
|
public virtual IEnumerable<EntityPath> GetAllPaths(Guid objectTypeId, params int[] ids)
|
||||||
@@ -315,7 +211,7 @@ namespace Umbraco.Core.Persistence.Repositories
|
|||||||
{
|
{
|
||||||
var sql = new Sql("SELECT id, path FROM umbracoNode WHERE umbracoNode.nodeObjectType=@type", new { type = objectTypeId });
|
var sql = new Sql("SELECT id, path FROM umbracoNode WHERE umbracoNode.nodeObjectType=@type", new { type = objectTypeId });
|
||||||
if (filter != null) filter(sql);
|
if (filter != null) filter(sql);
|
||||||
return _work.Database.Fetch<EntityPath>(sql);
|
return UnitOfWork.Database.Fetch<EntityPath>(sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual IEnumerable<IUmbracoEntity> GetByQuery(IQuery<IUmbracoEntity> query)
|
public virtual IEnumerable<IUmbracoEntity> GetByQuery(IQuery<IUmbracoEntity> query)
|
||||||
@@ -324,7 +220,7 @@ namespace Umbraco.Core.Persistence.Repositories
|
|||||||
var translator = new SqlTranslator<IUmbracoEntity>(sqlClause, query);
|
var translator = new SqlTranslator<IUmbracoEntity>(sqlClause, query);
|
||||||
var sql = translator.Translate().Append(GetGroupBy(false, false));
|
var sql = translator.Translate().Append(GetGroupBy(false, false));
|
||||||
|
|
||||||
var dtos = _work.Database.Fetch<dynamic>(sql);
|
var dtos = UnitOfWork.Database.Fetch<dynamic>(sql);
|
||||||
|
|
||||||
var factory = new UmbracoEntityFactory();
|
var factory = new UmbracoEntityFactory();
|
||||||
var list = dtos.Select(factory.BuildEntityFromDynamic).Cast<IUmbracoEntity>().ToList();
|
var list = dtos.Select(factory.BuildEntityFromDynamic).Cast<IUmbracoEntity>().ToList();
|
||||||
@@ -338,10 +234,6 @@ namespace Umbraco.Core.Persistence.Repositories
|
|||||||
/// <param name="query"></param>
|
/// <param name="query"></param>
|
||||||
/// <param name="objectTypeId"></param>
|
/// <param name="objectTypeId"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
/// <remarks>
|
|
||||||
/// Note that this will also fetch all property data for media items, which can cause performance problems
|
|
||||||
/// when used without paging, in sites with large amounts of data in cmsPropertyData.
|
|
||||||
/// </remarks>
|
|
||||||
public virtual IEnumerable<IUmbracoEntity> GetByQuery(IQuery<IUmbracoEntity> query, Guid objectTypeId)
|
public virtual IEnumerable<IUmbracoEntity> GetByQuery(IQuery<IUmbracoEntity> query, Guid objectTypeId)
|
||||||
{
|
{
|
||||||
var isContent = objectTypeId == Constants.ObjectTypes.DocumentGuid || objectTypeId == Constants.ObjectTypes.DocumentBlueprintGuid;
|
var isContent = objectTypeId == Constants.ObjectTypes.DocumentGuid || objectTypeId == Constants.ObjectTypes.DocumentBlueprintGuid;
|
||||||
@@ -352,53 +244,10 @@ namespace Umbraco.Core.Persistence.Repositories
|
|||||||
var translator = new SqlTranslator<IUmbracoEntity>(sqlClause, query);
|
var translator = new SqlTranslator<IUmbracoEntity>(sqlClause, query);
|
||||||
var entitySql = translator.Translate();
|
var entitySql = translator.Translate();
|
||||||
|
|
||||||
var factory = new UmbracoEntityFactory();
|
return GetByQueryInternal(entitySql, isContent, isMedia);
|
||||||
|
|
||||||
if (isMedia)
|
|
||||||
{
|
|
||||||
var wheres = query.GetWhereClauses().ToArray();
|
|
||||||
|
|
||||||
var mediaSql = GetFullSqlForMedia(entitySql.Append(GetGroupBy(isContent, true, false)), sql =>
|
|
||||||
{
|
|
||||||
//adds the additional filters
|
|
||||||
foreach (var whereClause in wheres)
|
|
||||||
{
|
|
||||||
sql.Where(whereClause.Item1, whereClause.Item2);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
//for now treat media differently and include all property data too
|
|
||||||
var entities = _work.Database.Fetch<dynamic, UmbracoPropertyDto, UmbracoEntity>(
|
|
||||||
new UmbracoEntityRelator().Map, mediaSql);
|
|
||||||
return entities;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return GetByQueryInternal(entitySql, isContent, isMedia);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
private IEnumerable<IUmbracoEntity> GetByQueryInternal(Sql entitySql, bool isContent, bool isMedia)
|
||||||
/// Gets entities by query without fetching property data.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="query"></param>
|
|
||||||
/// <param name="objectTypeId"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
/// <remarks>
|
|
||||||
/// This is supposed to be internal and can be used when getting all entities without paging, without causing
|
|
||||||
/// performance issues.
|
|
||||||
/// </remarks>
|
|
||||||
internal IEnumerable<IUmbracoEntity> GetMediaByQueryWithoutPropertyData(IQuery<IUmbracoEntity> query)
|
|
||||||
{
|
|
||||||
var sqlClause = GetBaseWhere(GetBase, false, true, null, UmbracoObjectTypes.Media.GetGuid());
|
|
||||||
|
|
||||||
var translator = new SqlTranslator<IUmbracoEntity>(sqlClause, query);
|
|
||||||
var entitySql = translator.Translate();
|
|
||||||
|
|
||||||
return GetByQueryInternal(entitySql, false, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
internal IEnumerable<IUmbracoEntity> GetByQueryInternal(Sql entitySql, bool isContent, bool isMedia)
|
|
||||||
{
|
{
|
||||||
var factory = new UmbracoEntityFactory();
|
var factory = new UmbracoEntityFactory();
|
||||||
|
|
||||||
@@ -406,7 +255,7 @@ namespace Umbraco.Core.Persistence.Repositories
|
|||||||
var finalSql = entitySql.Append(GetGroupBy(isContent, isMedia));
|
var finalSql = entitySql.Append(GetGroupBy(isContent, isMedia));
|
||||||
|
|
||||||
//query = read forward data reader, do not load everything into mem
|
//query = read forward data reader, do not load everything into mem
|
||||||
var dtos = _work.Database.Query<dynamic>(finalSql);
|
var dtos = UnitOfWork.Database.Query<dynamic>(finalSql);
|
||||||
var collection = new EntityDefinitionCollection();
|
var collection = new EntityDefinitionCollection();
|
||||||
foreach (var dto in dtos)
|
foreach (var dto in dtos)
|
||||||
{
|
{
|
||||||
@@ -426,7 +275,7 @@ namespace Umbraco.Core.Persistence.Repositories
|
|||||||
|
|
||||||
if (isMedia == false) return entitySql.Append(GetGroupBy(isContent, false));
|
if (isMedia == false) return entitySql.Append(GetGroupBy(isContent, false));
|
||||||
|
|
||||||
return GetFullSqlForMedia(entitySql.Append(GetGroupBy(isContent, true, false)));
|
return entitySql.Append(GetGroupBy(isContent, true, false));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Sql GetFullSqlForEntityType(int id, bool isContent, bool isMedia, Guid objectTypeId)
|
protected Sql GetFullSqlForEntityType(int id, bool isContent, bool isMedia, Guid objectTypeId)
|
||||||
@@ -435,7 +284,7 @@ namespace Umbraco.Core.Persistence.Repositories
|
|||||||
|
|
||||||
if (isMedia == false) return entitySql.Append(GetGroupBy(isContent, false));
|
if (isMedia == false) return entitySql.Append(GetGroupBy(isContent, false));
|
||||||
|
|
||||||
return GetFullSqlForMedia(entitySql.Append(GetGroupBy(isContent, true, false)));
|
return entitySql.Append(GetGroupBy(isContent, true, false));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Sql GetFullSqlForEntityType(bool isContent, bool isMedia, Guid objectTypeId, Action<Sql> filter)
|
protected Sql GetFullSqlForEntityType(bool isContent, bool isMedia, Guid objectTypeId, Action<Sql> filter)
|
||||||
@@ -444,48 +293,7 @@ namespace Umbraco.Core.Persistence.Repositories
|
|||||||
|
|
||||||
if (isMedia == false) return entitySql.Append(GetGroupBy(isContent, false));
|
if (isMedia == false) return entitySql.Append(GetGroupBy(isContent, false));
|
||||||
|
|
||||||
return GetFullSqlForMedia(entitySql.Append(GetGroupBy(isContent, true, false)), filter);
|
return entitySql.Append(GetGroupBy(isContent, true, false));
|
||||||
}
|
|
||||||
|
|
||||||
private Sql GetPropertySql(string nodeObjectType)
|
|
||||||
{
|
|
||||||
var sql = new Sql()
|
|
||||||
.Select("contentNodeId, versionId, dataNvarchar, dataNtext, propertyEditorAlias, alias as propertyTypeAlias")
|
|
||||||
.From<PropertyDataDto>()
|
|
||||||
.InnerJoin<NodeDto>()
|
|
||||||
.On<PropertyDataDto, NodeDto>(dto => dto.NodeId, dto => dto.NodeId)
|
|
||||||
.InnerJoin<PropertyTypeDto>()
|
|
||||||
.On<PropertyTypeDto, PropertyDataDto>(dto => dto.Id, dto => dto.PropertyTypeId)
|
|
||||||
.InnerJoin<DataTypeDto>()
|
|
||||||
.On<PropertyTypeDto, DataTypeDto>(dto => dto.DataTypeId, dto => dto.DataTypeId)
|
|
||||||
.Where("umbracoNode.nodeObjectType = @nodeObjectType", new { nodeObjectType = nodeObjectType });
|
|
||||||
|
|
||||||
return sql;
|
|
||||||
}
|
|
||||||
|
|
||||||
private Sql GetFullSqlForMedia(Sql entitySql, Action<Sql> filter = null)
|
|
||||||
{
|
|
||||||
//this will add any dataNvarchar property to the output which can be added to the additional properties
|
|
||||||
|
|
||||||
var joinSql = GetPropertySql(Constants.ObjectTypes.Media);
|
|
||||||
|
|
||||||
if (filter != null)
|
|
||||||
{
|
|
||||||
filter(joinSql);
|
|
||||||
}
|
|
||||||
|
|
||||||
//We're going to create a query to query against the entity SQL
|
|
||||||
// because we cannot group by nText columns and we have a COUNT in the entitySql we cannot simply left join
|
|
||||||
// the entitySql query, we have to join the wrapped query to get the ntext in the result
|
|
||||||
|
|
||||||
var wrappedSql = new Sql("SELECT * FROM (")
|
|
||||||
.Append(entitySql)
|
|
||||||
.Append(new Sql(") tmpTbl LEFT JOIN ("))
|
|
||||||
.Append(joinSql)
|
|
||||||
.Append(new Sql(") as property ON id = property.contentNodeId"))
|
|
||||||
.OrderBy("sortOrder, id");
|
|
||||||
|
|
||||||
return wrappedSql;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected virtual Sql GetBase(bool isContent, bool isMedia, Action<Sql> customFilter)
|
protected virtual Sql GetBase(bool isContent, bool isMedia, Action<Sql> customFilter)
|
||||||
@@ -533,6 +341,11 @@ namespace Umbraco.Core.Persistence.Repositories
|
|||||||
columns.Add("contenttype.thumbnail");
|
columns.Add("contenttype.thumbnail");
|
||||||
columns.Add("contenttype.isContainer");
|
columns.Add("contenttype.isContainer");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isMedia)
|
||||||
|
{
|
||||||
|
columns.Add("media.mediaPath");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Creates an SQL query to return a single row for the entity
|
//Creates an SQL query to return a single row for the entity
|
||||||
@@ -555,9 +368,16 @@ namespace Umbraco.Core.Persistence.Repositories
|
|||||||
.On("umbracoNode.id = published.nodeId");
|
.On("umbracoNode.id = published.nodeId");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isMedia)
|
||||||
|
{
|
||||||
|
entitySql.LeftJoin("cmsMedia media").On("media.nodeId = umbracoNode.id");
|
||||||
|
}
|
||||||
|
|
||||||
entitySql.LeftJoin("cmsContentType contenttype").On("contenttype.nodeId = content.contentType");
|
entitySql.LeftJoin("cmsContentType contenttype").On("contenttype.nodeId = content.contentType");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (isCount == false)
|
if (isCount == false)
|
||||||
{
|
{
|
||||||
entitySql.LeftJoin("umbracoNode parent").On("parent.parentID = umbracoNode.id");
|
entitySql.LeftJoin("umbracoNode parent").On("parent.parentID = umbracoNode.id");
|
||||||
@@ -667,6 +487,12 @@ namespace Umbraco.Core.Persistence.Repositories
|
|||||||
columns.Add("document.versionId");
|
columns.Add("document.versionId");
|
||||||
columns.Add("contentversion.id");
|
columns.Add("contentversion.id");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isMedia)
|
||||||
|
{
|
||||||
|
columns.Add("media.mediaPath");
|
||||||
|
}
|
||||||
|
|
||||||
columns.Add("contenttype.alias");
|
columns.Add("contenttype.alias");
|
||||||
columns.Add("contenttype.icon");
|
columns.Add("contenttype.icon");
|
||||||
columns.Add("contenttype.thumbnail");
|
columns.Add("contenttype.thumbnail");
|
||||||
@@ -700,99 +526,17 @@ namespace Umbraco.Core.Persistence.Repositories
|
|||||||
public bool Exists(Guid key)
|
public bool Exists(Guid key)
|
||||||
{
|
{
|
||||||
var sql = new Sql().Select("COUNT(*)").From("umbracoNode").Where("uniqueID=@uniqueID", new {uniqueID = key});
|
var sql = new Sql().Select("COUNT(*)").From("umbracoNode").Where("uniqueID=@uniqueID", new {uniqueID = key});
|
||||||
return _work.Database.ExecuteScalar<int>(sql) > 0;
|
return UnitOfWork.Database.ExecuteScalar<int>(sql) > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool Exists(int id)
|
public bool Exists(int id)
|
||||||
{
|
{
|
||||||
var sql = new Sql().Select("COUNT(*)").From("umbracoNode").Where("id=@id", new { id = id });
|
var sql = new Sql().Select("COUNT(*)").From("umbracoNode").Where("id=@id", new { id = id });
|
||||||
return _work.Database.ExecuteScalar<int>(sql) > 0;
|
return UnitOfWork.Database.ExecuteScalar<int>(sql) > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#region private classes
|
#region private classes
|
||||||
|
|
||||||
[ExplicitColumns]
|
|
||||||
internal class UmbracoPropertyDto
|
|
||||||
{
|
|
||||||
[Column("propertyEditorAlias")]
|
|
||||||
public string PropertyEditorAlias { get; set; }
|
|
||||||
|
|
||||||
[Column("propertyTypeAlias")]
|
|
||||||
public string PropertyAlias { get; set; }
|
|
||||||
|
|
||||||
[Column("dataNvarchar")]
|
|
||||||
public string NVarcharValue { get; set; }
|
|
||||||
|
|
||||||
[Column("dataNtext")]
|
|
||||||
public string NTextValue { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// This is a special relator in that it is not returning a DTO but a real resolved entity and that it accepts
|
|
||||||
/// a dynamic instance.
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// We're doing this because when we query the db, we want to use dynamic so that it returns all available fields not just the ones
|
|
||||||
/// defined on the entity so we can them to additional data
|
|
||||||
/// </remarks>
|
|
||||||
internal class UmbracoEntityRelator
|
|
||||||
{
|
|
||||||
internal UmbracoEntity Current;
|
|
||||||
private readonly UmbracoEntityFactory _factory = new UmbracoEntityFactory();
|
|
||||||
|
|
||||||
internal UmbracoEntity Map(dynamic a, UmbracoPropertyDto p)
|
|
||||||
{
|
|
||||||
// Terminating call. Since we can return null from this function
|
|
||||||
// we need to be ready for PetaPoco to callback later with null
|
|
||||||
// parameters
|
|
||||||
if (a == null)
|
|
||||||
return Current;
|
|
||||||
|
|
||||||
// Is this the same UmbracoEntity as the current one we're processing
|
|
||||||
if (Current != null && Current.Key == a.uniqueID)
|
|
||||||
{
|
|
||||||
if (p != null && p.PropertyAlias.IsNullOrWhiteSpace() == false)
|
|
||||||
{
|
|
||||||
// Add this UmbracoProperty to the current additional data
|
|
||||||
Current.AdditionalData[p.PropertyAlias] = new UmbracoEntity.EntityProperty
|
|
||||||
{
|
|
||||||
PropertyEditorAlias = p.PropertyEditorAlias,
|
|
||||||
Value = p.NTextValue.IsNullOrWhiteSpace()
|
|
||||||
? p.NVarcharValue
|
|
||||||
: p.NTextValue.ConvertToJsonIfPossible()
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
// Return null to indicate we're not done with this UmbracoEntity yet
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
// This is a different UmbracoEntity to the current one, or this is the
|
|
||||||
// first time through and we don't have a Tab yet
|
|
||||||
|
|
||||||
// Save the current UmbracoEntityDto
|
|
||||||
var prev = Current;
|
|
||||||
|
|
||||||
// Setup the new current UmbracoEntity
|
|
||||||
|
|
||||||
Current = _factory.BuildEntityFromDynamic(a);
|
|
||||||
|
|
||||||
if (p != null && p.PropertyAlias.IsNullOrWhiteSpace() == false)
|
|
||||||
{
|
|
||||||
//add the property/create the prop list if null
|
|
||||||
Current.AdditionalData[p.PropertyAlias] = new UmbracoEntity.EntityProperty
|
|
||||||
{
|
|
||||||
PropertyEditorAlias = p.PropertyEditorAlias,
|
|
||||||
Value = p.NTextValue.IsNullOrWhiteSpace()
|
|
||||||
? p.NVarcharValue
|
|
||||||
: p.NTextValue.ConvertToJsonIfPossible()
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
// Return the now populated previous UmbracoEntity (or null if first time through)
|
|
||||||
return prev;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private class EntityDefinitionCollection : KeyedCollection<int, EntityDefinition>
|
private class EntityDefinitionCollection : KeyedCollection<int, EntityDefinition>
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -267,8 +267,8 @@ ORDER BY colName";
|
|||||||
|
|
||||||
var fromDate = DateTime.UtcNow - timespan;
|
var fromDate = DateTime.UtcNow - timespan;
|
||||||
|
|
||||||
var count = Database.ExecuteScalar<int>("SELECT COUNT(*) FROM umbracoUserLogin WHERE lastValidatedUtc=@fromDate", new { fromDate = fromDate });
|
var count = Database.ExecuteScalar<int>("SELECT COUNT(*) FROM umbracoUserLogin WHERE lastValidatedUtc<=@fromDate", new { fromDate = fromDate });
|
||||||
Database.Execute("DELETE FROM umbracoUserLogin WHERE lastValidatedUtc=@fromDate", new { fromDate = fromDate });
|
Database.Execute("DELETE FROM umbracoUserLogin WHERE lastValidatedUtc<=@fromDate", new { fromDate = fromDate });
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ using System.ComponentModel;
|
|||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
using System.Xml.Linq;
|
using System.Xml.Linq;
|
||||||
@@ -34,6 +35,7 @@ namespace Umbraco.Core.Services
|
|||||||
//Support recursive locks because some of the methods that require locking call other methods that require locking.
|
//Support recursive locks because some of the methods that require locking call other methods that require locking.
|
||||||
//for example, the Move method needs to be locked but this calls the Save method which also needs to be locked.
|
//for example, the Move method needs to be locked but this calls the Save method which also needs to be locked.
|
||||||
private static readonly ReaderWriterLockSlim Locker = new ReaderWriterLockSlim(LockRecursionPolicy.SupportsRecursion);
|
private static readonly ReaderWriterLockSlim Locker = new ReaderWriterLockSlim(LockRecursionPolicy.SupportsRecursion);
|
||||||
|
private static readonly Regex AnchorRegex = new Regex("<a id=\"(.*?)\">", RegexOptions.Compiled);
|
||||||
|
|
||||||
public ContentService(
|
public ContentService(
|
||||||
IDatabaseUnitOfWorkProvider provider,
|
IDatabaseUnitOfWorkProvider provider,
|
||||||
@@ -299,6 +301,45 @@ namespace Umbraco.Core.Services
|
|||||||
return content;
|
return content;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public IEnumerable<string> GetAnchorValuesFromRTEs(int id)
|
||||||
|
{
|
||||||
|
var result = new List<string>();
|
||||||
|
|
||||||
|
var content = GetById(id);
|
||||||
|
|
||||||
|
foreach (var contentProperty in content.Properties)
|
||||||
|
{
|
||||||
|
if (contentProperty.PropertyType.PropertyEditorAlias.InvariantEquals(Constants.PropertyEditors.TinyMCEAlias))
|
||||||
|
{
|
||||||
|
var value = contentProperty.Value?.ToString();
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(value))
|
||||||
|
{
|
||||||
|
result.AddRange(GetAnchorValuesFromRTEContent(value));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public IEnumerable<string> GetAnchorValuesFromRTEContent(string rteContent)
|
||||||
|
{
|
||||||
|
var result = new List<string>();
|
||||||
|
|
||||||
|
var matches = AnchorRegex.Matches(rteContent);
|
||||||
|
|
||||||
|
foreach (Match match in matches)
|
||||||
|
{
|
||||||
|
result.Add(match.Value.Split('\"')[1]);
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates and saves an <see cref="IContent"/> object using the alias of the <see cref="IContentType"/>
|
/// Creates and saves an <see cref="IContent"/> object using the alias of the <see cref="IContentType"/>
|
||||||
/// that this Content should based on.
|
/// that this Content should based on.
|
||||||
|
|||||||
@@ -0,0 +1,25 @@
|
|||||||
|
using System;
|
||||||
|
using Umbraco.Core.Models;
|
||||||
|
|
||||||
|
namespace Umbraco.Core.Services
|
||||||
|
{
|
||||||
|
internal static class DateTypeServiceExtensions
|
||||||
|
{
|
||||||
|
public static bool IsDataTypeIgnoringUserStartNodes(this IDataTypeService dataTypeService, Guid key)
|
||||||
|
{
|
||||||
|
if (DataTypeExtensions.IsBuildInDataType(key)) return false; //built in ones can never be ignoring start nodes
|
||||||
|
|
||||||
|
var dataType = dataTypeService.GetDataTypeDefinitionById(key);
|
||||||
|
|
||||||
|
if (dataType != null)
|
||||||
|
{
|
||||||
|
var preValues = dataTypeService.GetPreValuesCollectionByDataTypeId(dataType.Id);
|
||||||
|
if (preValues.FormatAsDictionary().TryGetValue(
|
||||||
|
Constants.DataTypes.ReservedPreValueKeys.IgnoreUserStartNodes, out var preValue))
|
||||||
|
return preValue.Value.InvariantEquals("1");
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Linq.Expressions;
|
using System.Linq.Expressions;
|
||||||
using Umbraco.Core.CodeAnnotations;
|
using Umbraco.Core.CodeAnnotations;
|
||||||
@@ -75,28 +76,15 @@ namespace Umbraco.Core.Services
|
|||||||
return _idkMap.GetKeyForId(id, umbracoObjectType);
|
return _idkMap.GetKeyForId(id, umbracoObjectType);
|
||||||
}
|
}
|
||||||
|
|
||||||
public IUmbracoEntity GetByKey(Guid key, bool loadBaseType = true)
|
public IUmbracoEntity GetByKey(Guid key)
|
||||||
{
|
{
|
||||||
if (loadBaseType)
|
using (var uow = UowProvider.GetUnitOfWork())
|
||||||
{
|
{
|
||||||
using (var uow = UowProvider.GetUnitOfWork())
|
var repository = RepositoryFactory.CreateEntityRepository(uow);
|
||||||
{
|
var ret = repository.GetByKey(key);
|
||||||
var repository = RepositoryFactory.CreateEntityRepository(uow);
|
uow.Commit();
|
||||||
var ret = repository.GetByKey(key);
|
return ret;
|
||||||
uow.Commit();
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//SD: TODO: Need to enable this at some stage ... just need to ask Morten what the deal is with what this does.
|
|
||||||
throw new NotSupportedException();
|
|
||||||
|
|
||||||
//var objectType = GetObjectType(key);
|
|
||||||
//var entityType = GetEntityType(objectType);
|
|
||||||
//var typeFullName = entityType.FullName;
|
|
||||||
//var entity = _supportedObjectTypes[typeFullName].Item2(id);
|
|
||||||
|
|
||||||
//return entity;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -106,49 +94,26 @@ namespace Umbraco.Core.Services
|
|||||||
/// By default this will load the base type <see cref="IUmbracoEntity"/> with a minimum set of properties.
|
/// By default this will load the base type <see cref="IUmbracoEntity"/> with a minimum set of properties.
|
||||||
/// </returns>
|
/// </returns>
|
||||||
/// <param name="id">Id of the object to retrieve</param>
|
/// <param name="id">Id of the object to retrieve</param>
|
||||||
/// <param name="loadBaseType">Optional bool to load the complete object graph when set to <c>False</c>.</param>
|
|
||||||
/// <returns>An <see cref="IUmbracoEntity"/></returns>
|
/// <returns>An <see cref="IUmbracoEntity"/></returns>
|
||||||
public virtual IUmbracoEntity Get(int id, bool loadBaseType = true)
|
public virtual IUmbracoEntity Get(int id)
|
||||||
{
|
{
|
||||||
if (loadBaseType)
|
using (var uow = UowProvider.GetUnitOfWork(readOnly:true))
|
||||||
{
|
{
|
||||||
using (var uow = UowProvider.GetUnitOfWork(readOnly:true))
|
var repository = RepositoryFactory.CreateEntityRepository(uow);
|
||||||
{
|
var ret = repository.Get(id);
|
||||||
var repository = RepositoryFactory.CreateEntityRepository(uow);
|
return ret;
|
||||||
var ret = repository.Get(id);
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var objectType = GetObjectType(id);
|
|
||||||
var entityType = GetEntityType(objectType);
|
|
||||||
var typeFullName = entityType.FullName;
|
|
||||||
var entity = _supportedObjectTypes[typeFullName].Item2(id);
|
|
||||||
|
|
||||||
return entity;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public IUmbracoEntity GetByKey(Guid key, UmbracoObjectTypes umbracoObjectType, bool loadBaseType = true)
|
public IUmbracoEntity GetByKey(Guid key, UmbracoObjectTypes umbracoObjectType)
|
||||||
{
|
{
|
||||||
if (loadBaseType)
|
var objectTypeId = umbracoObjectType.GetGuid();
|
||||||
|
using (var uow = UowProvider.GetUnitOfWork(readOnly:true))
|
||||||
{
|
{
|
||||||
var objectTypeId = umbracoObjectType.GetGuid();
|
var repository = RepositoryFactory.CreateEntityRepository(uow);
|
||||||
using (var uow = UowProvider.GetUnitOfWork(readOnly:true))
|
var ret = repository.GetByKey(key, objectTypeId);
|
||||||
{
|
return ret;
|
||||||
var repository = RepositoryFactory.CreateEntityRepository(uow);
|
|
||||||
var ret = repository.GetByKey(key, objectTypeId);
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//SD: TODO: Need to enable this at some stage ... just need to ask Morten what the deal is with what this does.
|
|
||||||
throw new NotSupportedException();
|
|
||||||
|
|
||||||
//var entityType = GetEntityType(umbracoObjectType);
|
|
||||||
//var typeFullName = entityType.FullName;
|
|
||||||
//var entity = _supportedObjectTypes[typeFullName].Item2(id);
|
|
||||||
|
|
||||||
//return entity;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -159,29 +124,19 @@ namespace Umbraco.Core.Services
|
|||||||
/// </returns>
|
/// </returns>
|
||||||
/// <param name="id">Id of the object to retrieve</param>
|
/// <param name="id">Id of the object to retrieve</param>
|
||||||
/// <param name="umbracoObjectType">UmbracoObjectType of the entity to retrieve</param>
|
/// <param name="umbracoObjectType">UmbracoObjectType of the entity to retrieve</param>
|
||||||
/// <param name="loadBaseType">Optional bool to load the complete object graph when set to <c>False</c>.</param>
|
// <returns>An <see cref="IUmbracoEntity"/></returns>
|
||||||
/// <returns>An <see cref="IUmbracoEntity"/></returns>
|
public virtual IUmbracoEntity Get(int id, UmbracoObjectTypes umbracoObjectType)
|
||||||
public virtual IUmbracoEntity Get(int id, UmbracoObjectTypes umbracoObjectType, bool loadBaseType = true)
|
|
||||||
{
|
{
|
||||||
if (loadBaseType)
|
var objectTypeId = umbracoObjectType.GetGuid();
|
||||||
|
using (var uow = UowProvider.GetUnitOfWork(readOnly:true))
|
||||||
{
|
{
|
||||||
var objectTypeId = umbracoObjectType.GetGuid();
|
var repository = RepositoryFactory.CreateEntityRepository(uow);
|
||||||
using (var uow = UowProvider.GetUnitOfWork(readOnly:true))
|
var ret = repository.Get(id, objectTypeId);
|
||||||
{
|
return ret;
|
||||||
var repository = RepositoryFactory.CreateEntityRepository(uow);
|
|
||||||
var ret = repository.Get(id, objectTypeId);
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var entityType = GetEntityType(umbracoObjectType);
|
|
||||||
var typeFullName = entityType.FullName;
|
|
||||||
var entity = _supportedObjectTypes[typeFullName].Item2(id);
|
|
||||||
|
|
||||||
return entity;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public IUmbracoEntity GetByKey<T>(Guid key, bool loadBaseType = true) where T : IUmbracoEntity
|
public IUmbracoEntity GetByKey<T>(Guid key) where T : IUmbracoEntity
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
@@ -194,29 +149,15 @@ namespace Umbraco.Core.Services
|
|||||||
/// </returns>
|
/// </returns>
|
||||||
/// <typeparam name="T">Type of the model to retrieve. Must be based on an <see cref="IUmbracoEntity"/></typeparam>
|
/// <typeparam name="T">Type of the model to retrieve. Must be based on an <see cref="IUmbracoEntity"/></typeparam>
|
||||||
/// <param name="id">Id of the object to retrieve</param>
|
/// <param name="id">Id of the object to retrieve</param>
|
||||||
/// <param name="loadBaseType">Optional bool to load the complete object graph when set to <c>False</c>.</param>
|
|
||||||
/// <returns>An <see cref="IUmbracoEntity"/></returns>
|
/// <returns>An <see cref="IUmbracoEntity"/></returns>
|
||||||
public virtual IUmbracoEntity Get<T>(int id, bool loadBaseType = true) where T : IUmbracoEntity
|
public virtual IUmbracoEntity Get<T>(int id) where T : IUmbracoEntity
|
||||||
{
|
{
|
||||||
if (loadBaseType)
|
using (var uow = UowProvider.GetUnitOfWork(readOnly:true))
|
||||||
{
|
{
|
||||||
using (var uow = UowProvider.GetUnitOfWork(readOnly:true))
|
var repository = RepositoryFactory.CreateEntityRepository(uow);
|
||||||
{
|
var ret = repository.Get(id);
|
||||||
var repository = RepositoryFactory.CreateEntityRepository(uow);
|
return ret;
|
||||||
var ret = repository.Get(id);
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var typeFullName = typeof(T).FullName;
|
|
||||||
Mandate.That<NotSupportedException>(_supportedObjectTypes.ContainsKey(typeFullName), () =>
|
|
||||||
{
|
|
||||||
throw new NotSupportedException
|
|
||||||
("The passed in type is not supported");
|
|
||||||
});
|
|
||||||
var entity = _supportedObjectTypes[typeFullName].Item2(id);
|
|
||||||
|
|
||||||
return entity;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -294,27 +235,6 @@ namespace Umbraco.Core.Services
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets a collection of children by the parent's Id and UmbracoObjectType without adding property data
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="parentId">Id of the parent to retrieve children for</param>
|
|
||||||
/// <returns>An enumerable list of <see cref="IUmbracoEntity"/> objects</returns>
|
|
||||||
internal IEnumerable<IUmbracoEntity> GetMediaChildrenWithoutPropertyData(int parentId)
|
|
||||||
{
|
|
||||||
var objectTypeId = UmbracoObjectTypes.Media.GetGuid();
|
|
||||||
using (var uow = UowProvider.GetUnitOfWork(readOnly: true))
|
|
||||||
{
|
|
||||||
var repository = RepositoryFactory.CreateEntityRepository(uow);
|
|
||||||
var query = Query<IUmbracoEntity>.Builder.Where(x => x.ParentId == parentId);
|
|
||||||
|
|
||||||
// Not pretty having to cast the repository, but it is the only way to get to use an internal method that we
|
|
||||||
// do not want to make public on the interface. Unfortunately also prevents this from being unit tested.
|
|
||||||
// See this issue for details on why we need this:
|
|
||||||
// https://github.com/umbraco/Umbraco-CMS/issues/3457
|
|
||||||
return ((EntityRepository)repository).GetMediaByQueryWithoutPropertyData(query);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns a paged collection of children
|
/// Returns a paged collection of children
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -798,5 +718,32 @@ namespace Umbraco.Core.Services
|
|||||||
}
|
}
|
||||||
return node.NodeId;
|
return node.NodeId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#region Obsolete - only here for compat
|
||||||
|
|
||||||
|
[Obsolete("Use the overload that doesn't specify loadBaseType instead, loadBaseType will not affect any results")]
|
||||||
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||||
|
public IUmbracoEntity GetByKey(Guid key, bool loadBaseType = true) => GetByKey(key);
|
||||||
|
|
||||||
|
[Obsolete("Use the overload that doesn't specify loadBaseType instead, loadBaseType will not affect any results")]
|
||||||
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||||
|
public IUmbracoEntity Get(int id, bool loadBaseType = true) => Get(id);
|
||||||
|
|
||||||
|
[Obsolete("Use the overload that doesn't specify loadBaseType instead, loadBaseType will not affect any results")]
|
||||||
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||||
|
public IUmbracoEntity GetByKey(Guid key, UmbracoObjectTypes umbracoObjectType, bool loadBaseType = true) => GetByKey(key, umbracoObjectType);
|
||||||
|
|
||||||
|
[Obsolete("Use the overload that doesn't specify loadBaseType instead, loadBaseType will not affect any results")]
|
||||||
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||||
|
public IUmbracoEntity GetByKey<T>(Guid key, bool loadBaseType = true) where T : IUmbracoEntity => GetByKey<T>(key);
|
||||||
|
|
||||||
|
[Obsolete("Use the overload that doesn't specify loadBaseType instead, loadBaseType will not affect any results")]
|
||||||
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||||
|
public IUmbracoEntity Get(int id, UmbracoObjectTypes umbracoObjectType, bool loadBaseType = true) => Get(id, umbracoObjectType);
|
||||||
|
|
||||||
|
[Obsolete("Use the overload that doesn't specify loadBaseType instead, loadBaseType will not affect any results")]
|
||||||
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||||
|
public IUmbracoEntity Get<T>(int id, bool loadBaseType = true) where T : IUmbracoEntity => Get<T>(id);
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -713,5 +713,8 @@ namespace Umbraco.Core.Services
|
|||||||
/// <param name="userId">Optional id of the user creating the content</param>
|
/// <param name="userId">Optional id of the user creating the content</param>
|
||||||
/// <returns><see cref="IContent"/></returns>
|
/// <returns><see cref="IContent"/></returns>
|
||||||
IContent CreateContentWithIdentity(string name, int parentId, string contentTypeAlias, int userId = 0);
|
IContent CreateContentWithIdentity(string name, int parentId, string contentTypeAlias, int userId = 0);
|
||||||
|
|
||||||
|
IEnumerable<string> GetAnchorValuesFromRTEs(int id);
|
||||||
|
IEnumerable<string> GetAnchorValuesFromRTEContent(string rteContent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
using Umbraco.Core.Models;
|
using Umbraco.Core.Models;
|
||||||
using Umbraco.Core.Models.EntityBase;
|
using Umbraco.Core.Models.EntityBase;
|
||||||
using Umbraco.Core.Persistence.DatabaseModelDefinitions;
|
using Umbraco.Core.Persistence.DatabaseModelDefinitions;
|
||||||
@@ -52,8 +53,11 @@ namespace Umbraco.Core.Services
|
|||||||
/// By default this will load the base type <see cref="IUmbracoEntity"/> with a minimum set of properties.
|
/// By default this will load the base type <see cref="IUmbracoEntity"/> with a minimum set of properties.
|
||||||
/// </returns>
|
/// </returns>
|
||||||
/// <param name="key">Unique Id of the object to retrieve</param>
|
/// <param name="key">Unique Id of the object to retrieve</param>
|
||||||
/// <param name="loadBaseType">Optional bool to load the complete object graph when set to <c>False</c>.</param>
|
|
||||||
/// <returns>An <see cref="IUmbracoEntity"/></returns>
|
/// <returns>An <see cref="IUmbracoEntity"/></returns>
|
||||||
|
IUmbracoEntity GetByKey(Guid key);
|
||||||
|
|
||||||
|
[Obsolete("Use the overload that doesn't specify loadBaseType instead, loadBaseType will not affect any results")]
|
||||||
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||||
IUmbracoEntity GetByKey(Guid key, bool loadBaseType = true);
|
IUmbracoEntity GetByKey(Guid key, bool loadBaseType = true);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -63,8 +67,11 @@ namespace Umbraco.Core.Services
|
|||||||
/// By default this will load the base type <see cref="IUmbracoEntity"/> with a minimum set of properties.
|
/// By default this will load the base type <see cref="IUmbracoEntity"/> with a minimum set of properties.
|
||||||
/// </returns>
|
/// </returns>
|
||||||
/// <param name="id">Id of the object to retrieve</param>
|
/// <param name="id">Id of the object to retrieve</param>
|
||||||
/// <param name="loadBaseType">Optional bool to load the complete object graph when set to <c>False</c>.</param>
|
|
||||||
/// <returns>An <see cref="IUmbracoEntity"/></returns>
|
/// <returns>An <see cref="IUmbracoEntity"/></returns>
|
||||||
|
IUmbracoEntity Get(int id);
|
||||||
|
|
||||||
|
[Obsolete("Use the overload that doesn't specify loadBaseType instead, loadBaseType will not affect any results")]
|
||||||
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||||
IUmbracoEntity Get(int id, bool loadBaseType = true);
|
IUmbracoEntity Get(int id, bool loadBaseType = true);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -75,10 +82,17 @@ namespace Umbraco.Core.Services
|
|||||||
/// </returns>
|
/// </returns>
|
||||||
/// <param name="key">Unique Id of the object to retrieve</param>
|
/// <param name="key">Unique Id of the object to retrieve</param>
|
||||||
/// <param name="umbracoObjectType">UmbracoObjectType of the entity to retrieve</param>
|
/// <param name="umbracoObjectType">UmbracoObjectType of the entity to retrieve</param>
|
||||||
/// <param name="loadBaseType">Optional bool to load the complete object graph when set to <c>False</c>.</param>
|
|
||||||
/// <returns>An <see cref="IUmbracoEntity"/></returns>
|
/// <returns>An <see cref="IUmbracoEntity"/></returns>
|
||||||
|
IUmbracoEntity GetByKey(Guid key, UmbracoObjectTypes umbracoObjectType);
|
||||||
|
|
||||||
|
[Obsolete("Use the overload that doesn't specify loadBaseType instead, loadBaseType will not affect any results")]
|
||||||
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||||
IUmbracoEntity GetByKey(Guid key, UmbracoObjectTypes umbracoObjectType, bool loadBaseType = true);
|
IUmbracoEntity GetByKey(Guid key, UmbracoObjectTypes umbracoObjectType, bool loadBaseType = true);
|
||||||
|
|
||||||
|
[Obsolete("Use the overload that doesn't specify loadBaseType instead, loadBaseType will not affect any results")]
|
||||||
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||||
|
IUmbracoEntity GetByKey<T>(Guid key, bool loadBaseType = true) where T : IUmbracoEntity;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets an UmbracoEntity by its Id and UmbracoObjectType, and optionally loads the complete object graph.
|
/// Gets an UmbracoEntity by its Id and UmbracoObjectType, and optionally loads the complete object graph.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -87,22 +101,13 @@ namespace Umbraco.Core.Services
|
|||||||
/// </returns>
|
/// </returns>
|
||||||
/// <param name="id">Id of the object to retrieve</param>
|
/// <param name="id">Id of the object to retrieve</param>
|
||||||
/// <param name="umbracoObjectType">UmbracoObjectType of the entity to retrieve</param>
|
/// <param name="umbracoObjectType">UmbracoObjectType of the entity to retrieve</param>
|
||||||
/// <param name="loadBaseType">Optional bool to load the complete object graph when set to <c>False</c>.</param>
|
|
||||||
/// <returns>An <see cref="IUmbracoEntity"/></returns>
|
/// <returns>An <see cref="IUmbracoEntity"/></returns>
|
||||||
|
IUmbracoEntity Get(int id, UmbracoObjectTypes umbracoObjectType);
|
||||||
|
|
||||||
|
[Obsolete("Use the overload that doesn't specify loadBaseType instead, loadBaseType will not affect any results")]
|
||||||
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||||
IUmbracoEntity Get(int id, UmbracoObjectTypes umbracoObjectType, bool loadBaseType = true);
|
IUmbracoEntity Get(int id, UmbracoObjectTypes umbracoObjectType, bool loadBaseType = true);
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets an UmbracoEntity by its Id and specified Type. Optionally loads the complete object graph.
|
|
||||||
/// </summary>
|
|
||||||
/// <returns>
|
|
||||||
/// By default this will load the base type <see cref="IUmbracoEntity"/> with a minimum set of properties.
|
|
||||||
/// </returns>
|
|
||||||
/// <typeparam name="T">Type of the model to retrieve. Must be based on an <see cref="IUmbracoEntity"/></typeparam>
|
|
||||||
/// <param name="key">Unique Id of the object to retrieve</param>
|
|
||||||
/// <param name="loadBaseType">Optional bool to load the complete object graph when set to <c>False</c>.</param>
|
|
||||||
/// <returns>An <see cref="IUmbracoEntity"/></returns>
|
|
||||||
IUmbracoEntity GetByKey<T>(Guid key, bool loadBaseType = true) where T : IUmbracoEntity;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets an UmbracoEntity by its Id and specified Type. Optionally loads the complete object graph.
|
/// Gets an UmbracoEntity by its Id and specified Type. Optionally loads the complete object graph.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -111,8 +116,11 @@ namespace Umbraco.Core.Services
|
|||||||
/// </returns>
|
/// </returns>
|
||||||
/// <typeparam name="T">Type of the model to retrieve. Must be based on an <see cref="IUmbracoEntity"/></typeparam>
|
/// <typeparam name="T">Type of the model to retrieve. Must be based on an <see cref="IUmbracoEntity"/></typeparam>
|
||||||
/// <param name="id">Id of the object to retrieve</param>
|
/// <param name="id">Id of the object to retrieve</param>
|
||||||
/// <param name="loadBaseType">Optional bool to load the complete object graph when set to <c>False</c>.</param>
|
|
||||||
/// <returns>An <see cref="IUmbracoEntity"/></returns>
|
/// <returns>An <see cref="IUmbracoEntity"/></returns>
|
||||||
|
IUmbracoEntity Get<T>(int id) where T : IUmbracoEntity;
|
||||||
|
|
||||||
|
[Obsolete("Use the overload that doesn't specify loadBaseType instead, loadBaseType will not affect any results")]
|
||||||
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||||
IUmbracoEntity Get<T>(int id, bool loadBaseType = true) where T : IUmbracoEntity;
|
IUmbracoEntity Get<T>(int id, bool loadBaseType = true) where T : IUmbracoEntity;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
using Umbraco.Core.Models;
|
using Umbraco.Core.Models;
|
||||||
using Umbraco.Core.Models.EntityBase;
|
using Umbraco.Core.Models.EntityBase;
|
||||||
|
|
||||||
@@ -142,49 +143,67 @@ namespace Umbraco.Core.Services
|
|||||||
/// Gets the Child object from a Relation as an <see cref="IUmbracoEntity"/>
|
/// Gets the Child object from a Relation as an <see cref="IUmbracoEntity"/>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="relation">Relation to retrieve child object from</param>
|
/// <param name="relation">Relation to retrieve child object from</param>
|
||||||
/// <param name="loadBaseType">Optional bool to load the complete object graph when set to <c>False</c></param>
|
|
||||||
/// <returns>An <see cref="IUmbracoEntity"/></returns>
|
/// <returns>An <see cref="IUmbracoEntity"/></returns>
|
||||||
|
IUmbracoEntity GetChildEntityFromRelation(IRelation relation);
|
||||||
|
|
||||||
|
[Obsolete("Use the overload that doesn't specify loadBaseType instead, loadBaseType will not affect any results")]
|
||||||
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||||
IUmbracoEntity GetChildEntityFromRelation(IRelation relation, bool loadBaseType = false);
|
IUmbracoEntity GetChildEntityFromRelation(IRelation relation, bool loadBaseType = false);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the Parent object from a Relation as an <see cref="IUmbracoEntity"/>
|
/// Gets the Parent object from a Relation as an <see cref="IUmbracoEntity"/>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="relation">Relation to retrieve parent object from</param>
|
/// <param name="relation">Relation to retrieve parent object from</param>
|
||||||
/// <param name="loadBaseType">Optional bool to load the complete object graph when set to <c>False</c></param>
|
|
||||||
/// <returns>An <see cref="IUmbracoEntity"/></returns>
|
/// <returns>An <see cref="IUmbracoEntity"/></returns>
|
||||||
|
IUmbracoEntity GetParentEntityFromRelation(IRelation relation);
|
||||||
|
|
||||||
|
[Obsolete("Use the overload that doesn't specify loadBaseType instead, loadBaseType will not affect any results")]
|
||||||
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||||
IUmbracoEntity GetParentEntityFromRelation(IRelation relation, bool loadBaseType = false);
|
IUmbracoEntity GetParentEntityFromRelation(IRelation relation, bool loadBaseType = false);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the Parent and Child objects from a Relation as a <see cref="Tuple"/>"/> with <see cref="IUmbracoEntity"/>.
|
/// Gets the Parent and Child objects from a Relation as a <see cref="Tuple"/>"/> with <see cref="IUmbracoEntity"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="relation">Relation to retrieve parent and child object from</param>
|
/// <param name="relation">Relation to retrieve parent and child object from</param>
|
||||||
/// <param name="loadBaseType">Optional bool to load the complete object graph when set to <c>False</c></param>
|
|
||||||
/// <returns>Returns a Tuple with Parent (item1) and Child (item2)</returns>
|
/// <returns>Returns a Tuple with Parent (item1) and Child (item2)</returns>
|
||||||
|
Tuple<IUmbracoEntity, IUmbracoEntity> GetEntitiesFromRelation(IRelation relation);
|
||||||
|
|
||||||
|
[Obsolete("Use the overload that doesn't specify loadBaseType instead, loadBaseType will not affect any results")]
|
||||||
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||||
Tuple<IUmbracoEntity, IUmbracoEntity> GetEntitiesFromRelation(IRelation relation, bool loadBaseType = false);
|
Tuple<IUmbracoEntity, IUmbracoEntity> GetEntitiesFromRelation(IRelation relation, bool loadBaseType = false);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the Child objects from a list of Relations as a list of <see cref="IUmbracoEntity"/> objects.
|
/// Gets the Child objects from a list of Relations as a list of <see cref="IUmbracoEntity"/> objects.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="relations">List of relations to retrieve child objects from</param>
|
/// <param name="relations">List of relations to retrieve child objects from</param>
|
||||||
/// <param name="loadBaseType">Optional bool to load the complete object graph when set to <c>False</c></param>
|
|
||||||
/// <returns>An enumerable list of <see cref="IUmbracoEntity"/></returns>
|
/// <returns>An enumerable list of <see cref="IUmbracoEntity"/></returns>
|
||||||
|
IEnumerable<IUmbracoEntity> GetChildEntitiesFromRelations(IEnumerable<IRelation> relations);
|
||||||
|
|
||||||
|
[Obsolete("Use the overload that doesn't specify loadBaseType instead, loadBaseType will not affect any results")]
|
||||||
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||||
IEnumerable<IUmbracoEntity> GetChildEntitiesFromRelations(IEnumerable<IRelation> relations, bool loadBaseType = false);
|
IEnumerable<IUmbracoEntity> GetChildEntitiesFromRelations(IEnumerable<IRelation> relations, bool loadBaseType = false);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the Parent objects from a list of Relations as a list of <see cref="IUmbracoEntity"/> objects.
|
/// Gets the Parent objects from a list of Relations as a list of <see cref="IUmbracoEntity"/> objects.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="relations">List of relations to retrieve parent objects from</param>
|
/// <param name="relations">List of relations to retrieve parent objects from</param>
|
||||||
/// <param name="loadBaseType">Optional bool to load the complete object graph when set to <c>False</c></param>
|
|
||||||
/// <returns>An enumerable list of <see cref="IUmbracoEntity"/></returns>
|
/// <returns>An enumerable list of <see cref="IUmbracoEntity"/></returns>
|
||||||
IEnumerable<IUmbracoEntity> GetParentEntitiesFromRelations(IEnumerable<IRelation> relations,
|
IEnumerable<IUmbracoEntity> GetParentEntitiesFromRelations(IEnumerable<IRelation> relations);
|
||||||
bool loadBaseType = false);
|
|
||||||
|
[Obsolete("Use the overload that doesn't specify loadBaseType instead, loadBaseType will not affect any results")]
|
||||||
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||||
|
IEnumerable<IUmbracoEntity> GetParentEntitiesFromRelations(IEnumerable<IRelation> relations, bool loadBaseType = false);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the Parent and Child objects from a list of Relations as a list of <see cref="IUmbracoEntity"/> objects.
|
/// Gets the Parent and Child objects from a list of Relations as a list of <see cref="IUmbracoEntity"/> objects.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="relations">List of relations to retrieve parent and child objects from</param>
|
/// <param name="relations">List of relations to retrieve parent and child objects from</param>
|
||||||
/// <param name="loadBaseType">Optional bool to load the complete object graph when set to <c>False</c></param>
|
/// <param name="loadBaseType">Optional bool to load the complete object graph when set to <c>False</c></param>
|
||||||
/// <returns>An enumerable list of <see cref="Tuple"/> with <see cref="IUmbracoEntity"/></returns>
|
IEnumerable<Tuple<IUmbracoEntity, IUmbracoEntity>> GetEntitiesFromRelations(
|
||||||
|
IEnumerable<IRelation> relations);
|
||||||
|
|
||||||
|
[Obsolete("Use the overload that doesn't specify loadBaseType instead, loadBaseType will not affect any results")]
|
||||||
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||||
IEnumerable<Tuple<IUmbracoEntity, IUmbracoEntity>> GetEntitiesFromRelations(
|
IEnumerable<Tuple<IUmbracoEntity, IUmbracoEntity>> GetEntitiesFromRelations(
|
||||||
IEnumerable<IRelation> relations,
|
IEnumerable<IRelation> relations,
|
||||||
bool loadBaseType = false);
|
bool loadBaseType = false);
|
||||||
|
|||||||
@@ -124,11 +124,18 @@ namespace Umbraco.Core.Services
|
|||||||
var notifications = GetUsersNotifications(users.Select(x => x.Id), action, Enumerable.Empty<int>(), Constants.ObjectTypes.DocumentGuid).ToList();
|
var notifications = GetUsersNotifications(users.Select(x => x.Id), action, Enumerable.Empty<int>(), Constants.ObjectTypes.DocumentGuid).ToList();
|
||||||
if (notifications.Count == 0) break;
|
if (notifications.Count == 0) break;
|
||||||
|
|
||||||
var i = 0;
|
while (notifications.Count > 0)
|
||||||
foreach (var user in users)
|
|
||||||
{
|
{
|
||||||
// continue if there's no notification for this user
|
var notification = notifications[0];
|
||||||
if (notifications[i].UserId != user.Id) continue; // next user
|
var isMatched = false;
|
||||||
|
|
||||||
|
// grab user whose associated to the notification
|
||||||
|
var user = users.Where(x => x.Id == notification.UserId).FirstOrDefault();
|
||||||
|
|
||||||
|
if (user == null)
|
||||||
|
{
|
||||||
|
notifications.RemoveAll(x => x.UserId == notification.UserId);
|
||||||
|
}
|
||||||
|
|
||||||
for (var j = 0; j < entitiesL.Count; j++)
|
for (var j = 0; j < entitiesL.Count; j++)
|
||||||
{
|
{
|
||||||
@@ -136,7 +143,9 @@ namespace Umbraco.Core.Services
|
|||||||
var path = paths[j];
|
var path = paths[j];
|
||||||
|
|
||||||
// test if the notification applies to the path ie to this entity
|
// test if the notification applies to the path ie to this entity
|
||||||
if (path.Contains(notifications[i].EntityId) == false) continue; // next entity
|
if (path.Contains(notification.EntityId) == false) continue; // next entity
|
||||||
|
|
||||||
|
isMatched = true;
|
||||||
|
|
||||||
if (prevVersionDictionary.ContainsKey(content.Id) == false)
|
if (prevVersionDictionary.ContainsKey(content.Id) == false)
|
||||||
{
|
{
|
||||||
@@ -146,16 +155,19 @@ namespace Umbraco.Core.Services
|
|||||||
// queue notification
|
// queue notification
|
||||||
var req = CreateNotificationRequest(operatingUser, user, content, prevVersionDictionary[content.Id], actionName, http, createSubject, createBody);
|
var req = CreateNotificationRequest(operatingUser, user, content, prevVersionDictionary[content.Id], actionName, http, createSubject, createBody);
|
||||||
Enqueue(req);
|
Enqueue(req);
|
||||||
|
|
||||||
|
// don't process any further entities as a notification has been sent
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// skip other notifications for this user, essentially this means moving i to the next index of notifications
|
// when a match has been found, skip other notifications for user.
|
||||||
// for the next user.
|
if (isMatched)
|
||||||
do
|
|
||||||
{
|
{
|
||||||
i++;
|
notifications.RemoveAll(x => x.UserId == notification.UserId);
|
||||||
} while (i < notifications.Count && notifications[i].UserId == user.Id);
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (i >= notifications.Count) break; // break if no more notifications
|
notifications.Remove(notification);
|
||||||
}
|
}
|
||||||
|
|
||||||
// load more users if any
|
// load more users if any
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Umbraco.Core.Events;
|
using Umbraco.Core.Events;
|
||||||
using Umbraco.Core.Logging;
|
using Umbraco.Core.Logging;
|
||||||
@@ -304,39 +305,36 @@ namespace Umbraco.Core.Services
|
|||||||
/// Gets the Child object from a Relation as an <see cref="IUmbracoEntity"/>
|
/// Gets the Child object from a Relation as an <see cref="IUmbracoEntity"/>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="relation">Relation to retrieve child object from</param>
|
/// <param name="relation">Relation to retrieve child object from</param>
|
||||||
/// <param name="loadBaseType">Optional bool to load the complete object graph when set to <c>False</c></param>
|
|
||||||
/// <returns>An <see cref="IUmbracoEntity"/></returns>
|
/// <returns>An <see cref="IUmbracoEntity"/></returns>
|
||||||
public IUmbracoEntity GetChildEntityFromRelation(IRelation relation, bool loadBaseType = false)
|
public IUmbracoEntity GetChildEntityFromRelation(IRelation relation)
|
||||||
{
|
{
|
||||||
var objectType = UmbracoObjectTypesExtensions.GetUmbracoObjectType(relation.RelationType.ChildObjectType);
|
var objectType = UmbracoObjectTypesExtensions.GetUmbracoObjectType(relation.RelationType.ChildObjectType);
|
||||||
return _entityService.Get(relation.ChildId, objectType, loadBaseType);
|
return _entityService.Get(relation.ChildId, objectType);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the Parent object from a Relation as an <see cref="IUmbracoEntity"/>
|
/// Gets the Parent object from a Relation as an <see cref="IUmbracoEntity"/>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="relation">Relation to retrieve parent object from</param>
|
/// <param name="relation">Relation to retrieve parent object from</param>
|
||||||
/// <param name="loadBaseType">Optional bool to load the complete object graph when set to <c>False</c></param>
|
|
||||||
/// <returns>An <see cref="IUmbracoEntity"/></returns>
|
/// <returns>An <see cref="IUmbracoEntity"/></returns>
|
||||||
public IUmbracoEntity GetParentEntityFromRelation(IRelation relation, bool loadBaseType = false)
|
public IUmbracoEntity GetParentEntityFromRelation(IRelation relation)
|
||||||
{
|
{
|
||||||
var objectType = UmbracoObjectTypesExtensions.GetUmbracoObjectType(relation.RelationType.ParentObjectType);
|
var objectType = UmbracoObjectTypesExtensions.GetUmbracoObjectType(relation.RelationType.ParentObjectType);
|
||||||
return _entityService.Get(relation.ParentId, objectType, loadBaseType);
|
return _entityService.Get(relation.ParentId, objectType);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the Parent and Child objects from a Relation as a <see cref="Tuple"/>"/> with <see cref="IUmbracoEntity"/>.
|
/// Gets the Parent and Child objects from a Relation as a <see cref="Tuple"/>"/> with <see cref="IUmbracoEntity"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="relation">Relation to retrieve parent and child object from</param>
|
/// <param name="relation">Relation to retrieve parent and child object from</param>
|
||||||
/// <param name="loadBaseType">Optional bool to load the complete object graph when set to <c>False</c></param>
|
|
||||||
/// <returns>Returns a Tuple with Parent (item1) and Child (item2)</returns>
|
/// <returns>Returns a Tuple with Parent (item1) and Child (item2)</returns>
|
||||||
public Tuple<IUmbracoEntity, IUmbracoEntity> GetEntitiesFromRelation(IRelation relation, bool loadBaseType = false)
|
public Tuple<IUmbracoEntity, IUmbracoEntity> GetEntitiesFromRelation(IRelation relation)
|
||||||
{
|
{
|
||||||
var childObjectType = UmbracoObjectTypesExtensions.GetUmbracoObjectType(relation.RelationType.ChildObjectType);
|
var childObjectType = UmbracoObjectTypesExtensions.GetUmbracoObjectType(relation.RelationType.ChildObjectType);
|
||||||
var parentObjectType = UmbracoObjectTypesExtensions.GetUmbracoObjectType(relation.RelationType.ParentObjectType);
|
var parentObjectType = UmbracoObjectTypesExtensions.GetUmbracoObjectType(relation.RelationType.ParentObjectType);
|
||||||
|
|
||||||
var child = _entityService.Get(relation.ChildId, childObjectType, loadBaseType);
|
var child = _entityService.Get(relation.ChildId, childObjectType);
|
||||||
var parent = _entityService.Get(relation.ParentId, parentObjectType, loadBaseType);
|
var parent = _entityService.Get(relation.ParentId, parentObjectType);
|
||||||
|
|
||||||
return new Tuple<IUmbracoEntity, IUmbracoEntity>(parent, child);
|
return new Tuple<IUmbracoEntity, IUmbracoEntity>(parent, child);
|
||||||
}
|
}
|
||||||
@@ -345,14 +343,13 @@ namespace Umbraco.Core.Services
|
|||||||
/// Gets the Child objects from a list of Relations as a list of <see cref="IUmbracoEntity"/> objects.
|
/// Gets the Child objects from a list of Relations as a list of <see cref="IUmbracoEntity"/> objects.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="relations">List of relations to retrieve child objects from</param>
|
/// <param name="relations">List of relations to retrieve child objects from</param>
|
||||||
/// <param name="loadBaseType">Optional bool to load the complete object graph when set to <c>False</c></param>
|
|
||||||
/// <returns>An enumerable list of <see cref="IUmbracoEntity"/></returns>
|
/// <returns>An enumerable list of <see cref="IUmbracoEntity"/></returns>
|
||||||
public IEnumerable<IUmbracoEntity> GetChildEntitiesFromRelations(IEnumerable<IRelation> relations, bool loadBaseType = false)
|
public IEnumerable<IUmbracoEntity> GetChildEntitiesFromRelations(IEnumerable<IRelation> relations)
|
||||||
{
|
{
|
||||||
foreach (var relation in relations)
|
foreach (var relation in relations)
|
||||||
{
|
{
|
||||||
var objectType = UmbracoObjectTypesExtensions.GetUmbracoObjectType(relation.RelationType.ChildObjectType);
|
var objectType = UmbracoObjectTypesExtensions.GetUmbracoObjectType(relation.RelationType.ChildObjectType);
|
||||||
yield return _entityService.Get(relation.ChildId, objectType, loadBaseType);
|
yield return _entityService.Get(relation.ChildId, objectType);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -360,15 +357,13 @@ namespace Umbraco.Core.Services
|
|||||||
/// Gets the Parent objects from a list of Relations as a list of <see cref="IUmbracoEntity"/> objects.
|
/// Gets the Parent objects from a list of Relations as a list of <see cref="IUmbracoEntity"/> objects.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="relations">List of relations to retrieve parent objects from</param>
|
/// <param name="relations">List of relations to retrieve parent objects from</param>
|
||||||
/// <param name="loadBaseType">Optional bool to load the complete object graph when set to <c>False</c></param>
|
|
||||||
/// <returns>An enumerable list of <see cref="IUmbracoEntity"/></returns>
|
/// <returns>An enumerable list of <see cref="IUmbracoEntity"/></returns>
|
||||||
public IEnumerable<IUmbracoEntity> GetParentEntitiesFromRelations(IEnumerable<IRelation> relations,
|
public IEnumerable<IUmbracoEntity> GetParentEntitiesFromRelations(IEnumerable<IRelation> relations)
|
||||||
bool loadBaseType = false)
|
|
||||||
{
|
{
|
||||||
foreach (var relation in relations)
|
foreach (var relation in relations)
|
||||||
{
|
{
|
||||||
var objectType = UmbracoObjectTypesExtensions.GetUmbracoObjectType(relation.RelationType.ParentObjectType);
|
var objectType = UmbracoObjectTypesExtensions.GetUmbracoObjectType(relation.RelationType.ParentObjectType);
|
||||||
yield return _entityService.Get(relation.ParentId, objectType, loadBaseType);
|
yield return _entityService.Get(relation.ParentId, objectType);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -376,19 +371,17 @@ namespace Umbraco.Core.Services
|
|||||||
/// Gets the Parent and Child objects from a list of Relations as a list of <see cref="IUmbracoEntity"/> objects.
|
/// Gets the Parent and Child objects from a list of Relations as a list of <see cref="IUmbracoEntity"/> objects.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="relations">List of relations to retrieve parent and child objects from</param>
|
/// <param name="relations">List of relations to retrieve parent and child objects from</param>
|
||||||
/// <param name="loadBaseType">Optional bool to load the complete object graph when set to <c>False</c></param>
|
|
||||||
/// <returns>An enumerable list of <see cref="Tuple"/> with <see cref="IUmbracoEntity"/></returns>
|
/// <returns>An enumerable list of <see cref="Tuple"/> with <see cref="IUmbracoEntity"/></returns>
|
||||||
public IEnumerable<Tuple<IUmbracoEntity, IUmbracoEntity>> GetEntitiesFromRelations(
|
public IEnumerable<Tuple<IUmbracoEntity, IUmbracoEntity>> GetEntitiesFromRelations(
|
||||||
IEnumerable<IRelation> relations,
|
IEnumerable<IRelation> relations)
|
||||||
bool loadBaseType = false)
|
|
||||||
{
|
{
|
||||||
foreach (var relation in relations)
|
foreach (var relation in relations)
|
||||||
{
|
{
|
||||||
var childObjectType = UmbracoObjectTypesExtensions.GetUmbracoObjectType(relation.RelationType.ChildObjectType);
|
var childObjectType = UmbracoObjectTypesExtensions.GetUmbracoObjectType(relation.RelationType.ChildObjectType);
|
||||||
var parentObjectType = UmbracoObjectTypesExtensions.GetUmbracoObjectType(relation.RelationType.ParentObjectType);
|
var parentObjectType = UmbracoObjectTypesExtensions.GetUmbracoObjectType(relation.RelationType.ParentObjectType);
|
||||||
|
|
||||||
var child = _entityService.Get(relation.ChildId, childObjectType, loadBaseType);
|
var child = _entityService.Get(relation.ChildId, childObjectType);
|
||||||
var parent = _entityService.Get(relation.ParentId, parentObjectType, loadBaseType);
|
var parent = _entityService.Get(relation.ParentId, parentObjectType);
|
||||||
|
|
||||||
yield return new Tuple<IUmbracoEntity, IUmbracoEntity>(parent, child);
|
yield return new Tuple<IUmbracoEntity, IUmbracoEntity>(parent, child);
|
||||||
}
|
}
|
||||||
@@ -744,5 +737,31 @@ namespace Umbraco.Core.Services
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static event TypedEventHandler<IRelationService, SaveEventArgs<IRelationType>> SavedRelationType;
|
public static event TypedEventHandler<IRelationService, SaveEventArgs<IRelationType>> SavedRelationType;
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region Obsolete - only here for compat
|
||||||
|
[Obsolete("Use the overload that doesn't specify loadBaseType instead, loadBaseType will not affect any results")]
|
||||||
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||||
|
public IUmbracoEntity GetChildEntityFromRelation(IRelation relation, bool loadBaseType = false) => GetChildEntityFromRelation(relation);
|
||||||
|
|
||||||
|
[Obsolete("Use the overload that doesn't specify loadBaseType instead, loadBaseType will not affect any results")]
|
||||||
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||||
|
public IUmbracoEntity GetParentEntityFromRelation(IRelation relation, bool loadBaseType = false) => GetParentEntityFromRelation(relation);
|
||||||
|
|
||||||
|
[Obsolete("Use the overload that doesn't specify loadBaseType instead, loadBaseType will not affect any results")]
|
||||||
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||||
|
public Tuple<IUmbracoEntity, IUmbracoEntity> GetEntitiesFromRelation(IRelation relation, bool loadBaseType = false) => GetEntitiesFromRelation(relation);
|
||||||
|
|
||||||
|
[Obsolete("Use the overload that doesn't specify loadBaseType instead, loadBaseType will not affect any results")]
|
||||||
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||||
|
public IEnumerable<IUmbracoEntity> GetChildEntitiesFromRelations(IEnumerable<IRelation> relations, bool loadBaseType = false) => GetChildEntitiesFromRelations(relations);
|
||||||
|
|
||||||
|
[Obsolete("Use the overload that doesn't specify loadBaseType instead, loadBaseType will not affect any results")]
|
||||||
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||||
|
public IEnumerable<IUmbracoEntity> GetParentEntitiesFromRelations(IEnumerable<IRelation> relations, bool loadBaseType = false) => GetParentEntitiesFromRelations(relations);
|
||||||
|
|
||||||
|
[Obsolete("Use the overload that doesn't specify loadBaseType instead, loadBaseType will not affect any results")]
|
||||||
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||||
|
public IEnumerable<Tuple<IUmbracoEntity, IUmbracoEntity>> GetEntitiesFromRelations(IEnumerable<IRelation> relations, bool loadBaseType = false) => GetEntitiesFromRelations(relations);
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
<RootNamespace>Umbraco.Core</RootNamespace>
|
<RootNamespace>Umbraco.Core</RootNamespace>
|
||||||
<AssemblyName>Umbraco.Core</AssemblyName>
|
<AssemblyName>Umbraco.Core</AssemblyName>
|
||||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
|
||||||
<FileAlignment>512</FileAlignment>
|
<FileAlignment>512</FileAlignment>
|
||||||
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
|
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
|
||||||
<RestorePackages>true</RestorePackages>
|
<RestorePackages>true</RestorePackages>
|
||||||
@@ -48,11 +48,11 @@
|
|||||||
<Reference Include="ClientDependency.Core, Version=1.9.7.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="ClientDependency.Core, Version=1.9.7.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\ClientDependency.1.9.7\lib\net45\ClientDependency.Core.dll</HintPath>
|
<HintPath>..\packages\ClientDependency.1.9.7\lib\net45\ClientDependency.Core.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="HtmlAgilityPack, Version=1.4.9.5, Culture=neutral, PublicKeyToken=bd319b19eaf3b43a, processorArchitecture=MSIL">
|
<Reference Include="HtmlAgilityPack, Version=1.8.8.0, Culture=neutral, PublicKeyToken=bd319b19eaf3b43a, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\HtmlAgilityPack.1.4.9.5\lib\Net45\HtmlAgilityPack.dll</HintPath>
|
<HintPath>..\packages\HtmlAgilityPack.1.8.8\lib\Net45\HtmlAgilityPack.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="ImageProcessor, Version=2.5.6.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="ImageProcessor, Version=2.7.0.100, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\ImageProcessor.2.5.6\lib\net45\ImageProcessor.dll</HintPath>
|
<HintPath>..\packages\ImageProcessor.2.7.0.100\lib\net452\ImageProcessor.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
|
<Reference Include="log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\log4net.2.0.8\lib\net45-full\log4net.dll</HintPath>
|
<HintPath>..\packages\log4net.2.0.8\lib\net45-full\log4net.dll</HintPath>
|
||||||
@@ -61,22 +61,22 @@
|
|||||||
<HintPath>..\packages\Log4Net.Async.2.0.4\lib\net40\Log4Net.Async.dll</HintPath>
|
<HintPath>..\packages\Log4Net.Async.2.0.4\lib\net40\Log4Net.Async.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.AspNet.Identity.Core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.AspNet.Identity.Core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.AspNet.Identity.Core.2.2.1\lib\net45\Microsoft.AspNet.Identity.Core.dll</HintPath>
|
<HintPath>..\packages\Microsoft.AspNet.Identity.Core.2.2.2\lib\net45\Microsoft.AspNet.Identity.Core.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.AspNet.Identity.Owin, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.AspNet.Identity.Owin, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.AspNet.Identity.Owin.2.2.1\lib\net45\Microsoft.AspNet.Identity.Owin.dll</HintPath>
|
<HintPath>..\packages\Microsoft.AspNet.Identity.Owin.2.2.2\lib\net45\Microsoft.AspNet.Identity.Owin.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Owin, Version=3.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Owin, Version=4.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.Owin.3.1.0\lib\net45\Microsoft.Owin.dll</HintPath>
|
<HintPath>..\packages\Microsoft.Owin.4.0.1\lib\net45\Microsoft.Owin.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Owin.Security, Version=3.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Owin.Security, Version=4.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.Owin.Security.3.1.0\lib\net45\Microsoft.Owin.Security.dll</HintPath>
|
<HintPath>..\packages\Microsoft.Owin.Security.4.0.1\lib\net45\Microsoft.Owin.Security.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Owin.Security.Cookies, Version=3.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Owin.Security.Cookies, Version=4.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.Owin.Security.Cookies.3.1.0\lib\net45\Microsoft.Owin.Security.Cookies.dll</HintPath>
|
<HintPath>..\packages\Microsoft.Owin.Security.Cookies.4.0.1\lib\net45\Microsoft.Owin.Security.Cookies.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Owin.Security.OAuth, Version=3.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Owin.Security.OAuth, Version=4.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.Owin.Security.OAuth.3.1.0\lib\net45\Microsoft.Owin.Security.OAuth.dll</HintPath>
|
<HintPath>..\packages\Microsoft.Owin.Security.OAuth.4.0.1\lib\net45\Microsoft.Owin.Security.OAuth.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="MiniProfiler, Version=2.1.0.0, Culture=neutral, PublicKeyToken=b44f9351044011a3, processorArchitecture=MSIL">
|
<Reference Include="MiniProfiler, Version=2.1.0.0, Culture=neutral, PublicKeyToken=b44f9351044011a3, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\MiniProfiler.2.1.0\lib\net40\MiniProfiler.dll</HintPath>
|
<HintPath>..\packages\MiniProfiler.2.1.0\lib\net40\MiniProfiler.dll</HintPath>
|
||||||
@@ -85,14 +85,14 @@
|
|||||||
<HintPath>..\packages\MySql.Data.6.9.9\lib\net45\MySql.Data.dll</HintPath>
|
<HintPath>..\packages\MySql.Data.6.9.9\lib\net45\MySql.Data.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Newtonsoft.Json.10.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
|
<HintPath>..\packages\Newtonsoft.Json.12.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Owin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f0ebd12fd5e55cc5, processorArchitecture=MSIL">
|
<Reference Include="Owin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f0ebd12fd5e55cc5, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Owin.1.0\lib\net40\Owin.dll</HintPath>
|
<HintPath>..\packages\Owin.1.0\lib\net40\Owin.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Semver, Version=1.1.2.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="Semver, Version=1.1.2.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\semver.1.1.2\lib\net45\Semver.dll</HintPath>
|
<HintPath>..\packages\semver.1.1.2\lib\net451\Semver.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.ComponentModel.Composition" />
|
<Reference Include="System.ComponentModel.Composition" />
|
||||||
@@ -115,8 +115,8 @@
|
|||||||
<Reference Include="System.Runtime.Caching" />
|
<Reference Include="System.Runtime.Caching" />
|
||||||
<Reference Include="System.Runtime.Serialization" />
|
<Reference Include="System.Runtime.Serialization" />
|
||||||
<Reference Include="System.Transactions" />
|
<Reference Include="System.Transactions" />
|
||||||
<Reference Include="System.ValueTuple, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\System.ValueTuple.4.4.0\lib\netstandard1.0\System.ValueTuple.dll</HintPath>
|
<HintPath>..\packages\System.ValueTuple.4.5.0\lib\netstandard1.0\System.ValueTuple.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Web" />
|
<Reference Include="System.Web" />
|
||||||
<Reference Include="System.Web.ApplicationServices" />
|
<Reference Include="System.Web.ApplicationServices" />
|
||||||
@@ -324,6 +324,9 @@
|
|||||||
<Compile Include="Configuration\UmbracoSettings\WebRoutingElement.cs" />
|
<Compile Include="Configuration\UmbracoSettings\WebRoutingElement.cs" />
|
||||||
<Compile Include="Configuration\UmbracoVersion.cs" />
|
<Compile Include="Configuration\UmbracoVersion.cs" />
|
||||||
<Compile Include="Attempt.cs" />
|
<Compile Include="Attempt.cs" />
|
||||||
|
<Compile Include="Constants-DataTypes.cs">
|
||||||
|
<DependentUpon>Constants.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="Constants-DeploySelector.cs" />
|
<Compile Include="Constants-DeploySelector.cs" />
|
||||||
<Compile Include="Constants-Examine.cs" />
|
<Compile Include="Constants-Examine.cs" />
|
||||||
<Compile Include="Constants-Icons.cs" />
|
<Compile Include="Constants-Icons.cs" />
|
||||||
@@ -374,6 +377,7 @@
|
|||||||
<Compile Include="Models\Consent.cs" />
|
<Compile Include="Models\Consent.cs" />
|
||||||
<Compile Include="Models\ConsentExtensions.cs" />
|
<Compile Include="Models\ConsentExtensions.cs" />
|
||||||
<Compile Include="Models\ConsentState.cs" />
|
<Compile Include="Models\ConsentState.cs" />
|
||||||
|
<Compile Include="Models\DataTypeExtensions.cs" />
|
||||||
<Compile Include="Models\EntityBase\EntityPath.cs" />
|
<Compile Include="Models\EntityBase\EntityPath.cs" />
|
||||||
<Compile Include="Models\EntityBase\IDeletableEntity.cs" />
|
<Compile Include="Models\EntityBase\IDeletableEntity.cs" />
|
||||||
<Compile Include="Models\IAuditEntry.cs" />
|
<Compile Include="Models\IAuditEntry.cs" />
|
||||||
@@ -764,6 +768,7 @@
|
|||||||
<Compile Include="Services\ConsentService.cs" />
|
<Compile Include="Services\ConsentService.cs" />
|
||||||
<Compile Include="Services\ContentTypeServiceExtensions.cs" />
|
<Compile Include="Services\ContentTypeServiceExtensions.cs" />
|
||||||
<Compile Include="Models\RedirectUrl.cs" />
|
<Compile Include="Models\RedirectUrl.cs" />
|
||||||
|
<Compile Include="Services\DateTypeServiceExtensions.cs" />
|
||||||
<Compile Include="Services\IConsentService.cs" />
|
<Compile Include="Services\IConsentService.cs" />
|
||||||
<Compile Include="Services\IContentServiceBase.cs" />
|
<Compile Include="Services\IContentServiceBase.cs" />
|
||||||
<Compile Include="Services\IdkMap.cs" />
|
<Compile Include="Services\IdkMap.cs" />
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-10.0.0.0" newVersion="10.0.0.0" />
|
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
@@ -16,19 +16,19 @@
|
|||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" />
|
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="Microsoft.Owin.Security.OAuth" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
<assemblyIdentity name="Microsoft.Owin.Security.OAuth" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" />
|
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="Microsoft.Owin.Security" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
<assemblyIdentity name="Microsoft.Owin.Security" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" />
|
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="Microsoft.Owin.Security.Cookies" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
<assemblyIdentity name="Microsoft.Owin.Security.Cookies" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" />
|
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="log4net" publicKeyToken="669e0ddf0bb1aa2a" culture="neutral" />
|
<assemblyIdentity name="log4net" publicKeyToken="669e0ddf0bb1aa2a" culture="neutral" />
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
</assemblyBinding>
|
</assemblyBinding>
|
||||||
</runtime>
|
</runtime>
|
||||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /></startup><system.data>
|
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" /></startup><system.data>
|
||||||
<DbProviderFactories>
|
<DbProviderFactories>
|
||||||
<remove invariant="MySql.Data.MySqlClient" />
|
<remove invariant="MySql.Data.MySqlClient" />
|
||||||
<add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.9.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
|
<add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.9.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
|
||||||
|
|||||||
@@ -2,21 +2,21 @@
|
|||||||
<packages>
|
<packages>
|
||||||
<package id="AutoMapper" version="3.3.1" targetFramework="net45" />
|
<package id="AutoMapper" version="3.3.1" targetFramework="net45" />
|
||||||
<package id="ClientDependency" version="1.9.7" targetFramework="net45" />
|
<package id="ClientDependency" version="1.9.7" targetFramework="net45" />
|
||||||
<package id="HtmlAgilityPack" version="1.4.9.5" targetFramework="net45" />
|
<package id="HtmlAgilityPack" version="1.8.8" targetFramework="net452" />
|
||||||
<package id="ImageProcessor" version="2.5.6" targetFramework="net45" />
|
<package id="ImageProcessor" version="2.7.0.100" targetFramework="net452" />
|
||||||
<package id="log4net" version="2.0.8" targetFramework="net45" />
|
<package id="log4net" version="2.0.8" targetFramework="net45" />
|
||||||
<package id="Log4Net.Async" version="2.0.4" targetFramework="net45" />
|
<package id="Log4Net.Async" version="2.0.4" targetFramework="net45" />
|
||||||
<package id="Microsoft.AspNet.Identity.Core" version="2.2.1" targetFramework="net45" />
|
<package id="Microsoft.AspNet.Identity.Core" version="2.2.2" targetFramework="net452" />
|
||||||
<package id="Microsoft.AspNet.Identity.Owin" version="2.2.1" targetFramework="net45" />
|
<package id="Microsoft.AspNet.Identity.Owin" version="2.2.2" targetFramework="net452" />
|
||||||
<package id="Microsoft.Owin" version="3.1.0" targetFramework="net45" />
|
<package id="Microsoft.Owin" version="4.0.1" targetFramework="net452" />
|
||||||
<package id="Microsoft.Owin.Security" version="3.1.0" targetFramework="net45" />
|
<package id="Microsoft.Owin.Security" version="4.0.1" targetFramework="net452" />
|
||||||
<package id="Microsoft.Owin.Security.Cookies" version="3.1.0" targetFramework="net45" />
|
<package id="Microsoft.Owin.Security.Cookies" version="4.0.1" targetFramework="net452" />
|
||||||
<package id="Microsoft.Owin.Security.OAuth" version="3.1.0" targetFramework="net45" />
|
<package id="Microsoft.Owin.Security.OAuth" version="4.0.1" targetFramework="net452" />
|
||||||
<package id="MiniProfiler" version="2.1.0" targetFramework="net45" />
|
<package id="MiniProfiler" version="2.1.0" targetFramework="net45" />
|
||||||
<package id="MySql.Data" version="6.9.9" targetFramework="net45" />
|
<package id="MySql.Data" version="6.9.9" targetFramework="net45" />
|
||||||
<package id="Newtonsoft.Json" version="10.0.2" targetFramework="net45" />
|
<package id="Newtonsoft.Json" version="12.0.2" targetFramework="net452" />
|
||||||
<package id="Owin" version="1.0" targetFramework="net45" />
|
<package id="Owin" version="1.0" targetFramework="net45" />
|
||||||
<package id="semver" version="1.1.2" targetFramework="net45" />
|
<package id="semver" version="1.1.2" targetFramework="net452" />
|
||||||
<package id="SqlServerCE" version="4.0.0.1" targetFramework="net45" />
|
<package id="SqlServerCE" version="4.0.0.1" targetFramework="net45" />
|
||||||
<package id="System.ValueTuple" version="4.4.0" targetFramework="net45" />
|
<package id="System.ValueTuple" version="4.5.0" targetFramework="net452" />
|
||||||
</packages>
|
</packages>
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<Import Project="..\packages\Microsoft.Diagnostics.Tracing.TraceEvent.2.0.26\build\Microsoft.Diagnostics.Tracing.TraceEvent.props" Condition="Exists('..\packages\Microsoft.Diagnostics.Tracing.TraceEvent.2.0.26\build\Microsoft.Diagnostics.Tracing.TraceEvent.props')" />
|
||||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
@@ -9,7 +10,7 @@
|
|||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
<RootNamespace>Umbraco.Tests.Benchmarks</RootNamespace>
|
<RootNamespace>Umbraco.Tests.Benchmarks</RootNamespace>
|
||||||
<AssemblyName>Umbraco.Tests.Benchmarks</AssemblyName>
|
<AssemblyName>Umbraco.Tests.Benchmarks</AssemblyName>
|
||||||
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
|
||||||
<FileAlignment>512</FileAlignment>
|
<FileAlignment>512</FileAlignment>
|
||||||
<NuGetPackageImportStamp>
|
<NuGetPackageImportStamp>
|
||||||
</NuGetPackageImportStamp>
|
</NuGetPackageImportStamp>
|
||||||
@@ -39,8 +40,8 @@
|
|||||||
<RunPostBuildEvent>Always</RunPostBuildEvent>
|
<RunPostBuildEvent>Always</RunPostBuildEvent>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="BenchmarkDotNet, Version=0.10.12.0, Culture=neutral, PublicKeyToken=aa0ca2f9092cefc4, processorArchitecture=MSIL">
|
<Reference Include="BenchmarkDotNet, Version=0.10.3.0, Culture=neutral, PublicKeyToken=aa0ca2f9092cefc4, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\BenchmarkDotNet.0.10.12\lib\net46\BenchmarkDotNet.dll</HintPath>
|
<HintPath>..\packages\BenchmarkDotNet.0.10.3\lib\net45\BenchmarkDotNet.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="BenchmarkDotNet.Core, Version=0.10.12.0, Culture=neutral, PublicKeyToken=aa0ca2f9092cefc4, processorArchitecture=MSIL">
|
<Reference Include="BenchmarkDotNet.Core, Version=0.10.12.0, Culture=neutral, PublicKeyToken=aa0ca2f9092cefc4, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\BenchmarkDotNet.Core.0.10.12\lib\net46\BenchmarkDotNet.Core.dll</HintPath>
|
<HintPath>..\packages\BenchmarkDotNet.Core.0.10.12\lib\net46\BenchmarkDotNet.Core.dll</HintPath>
|
||||||
@@ -48,20 +49,27 @@
|
|||||||
<Reference Include="BenchmarkDotNet.Diagnostics.Windows, Version=0.9.9.0, Culture=neutral, PublicKeyToken=aa0ca2f9092cefc4, processorArchitecture=MSIL">
|
<Reference Include="BenchmarkDotNet.Diagnostics.Windows, Version=0.9.9.0, Culture=neutral, PublicKeyToken=aa0ca2f9092cefc4, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\BenchmarkDotNet.Diagnostics.Windows.0.9.9\lib\net45\BenchmarkDotNet.Diagnostics.Windows.dll</HintPath>
|
<HintPath>..\packages\BenchmarkDotNet.Diagnostics.Windows.0.9.9\lib\net45\BenchmarkDotNet.Diagnostics.Windows.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="BenchmarkDotNet.Toolchains.Roslyn, Version=0.10.12.0, Culture=neutral, PublicKeyToken=aa0ca2f9092cefc4, processorArchitecture=MSIL">
|
<Reference Include="BenchmarkDotNet.Toolchains.Roslyn, Version=0.10.3.0, Culture=neutral, PublicKeyToken=aa0ca2f9092cefc4, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\BenchmarkDotNet.Toolchains.Roslyn.0.10.12\lib\net46\BenchmarkDotNet.Toolchains.Roslyn.dll</HintPath>
|
<HintPath>..\packages\BenchmarkDotNet.Toolchains.Roslyn.0.10.3\lib\net45\BenchmarkDotNet.Toolchains.Roslyn.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Castle.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
|
<Reference Include="Castle.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Castle.Core.4.0.0\lib\net45\Castle.Core.dll</HintPath>
|
<HintPath>..\packages\Castle.Core.4.0.0\lib\net45\Castle.Core.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.CodeAnalysis, Version=2.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Dia2Lib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.CodeAnalysis.Common.2.4.0\lib\netstandard1.3\Microsoft.CodeAnalysis.dll</HintPath>
|
<HintPath>..\packages\Microsoft.Diagnostics.Tracing.TraceEvent.2.0.26\lib\net45\Dia2Lib.dll</HintPath>
|
||||||
|
<EmbedInteropTypes>True</EmbedInteropTypes>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.CodeAnalysis.CSharp, Version=2.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.CodeAnalysis, Version=2.9.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.CodeAnalysis.CSharp.2.4.0\lib\netstandard1.3\Microsoft.CodeAnalysis.CSharp.dll</HintPath>
|
<HintPath>..\packages\Microsoft.CodeAnalysis.Common.2.9.0\lib\netstandard1.3\Microsoft.CodeAnalysis.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Diagnostics.Tracing.TraceEvent, Version=1.0.41.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.CodeAnalysis.CSharp, Version=2.9.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.Diagnostics.Tracing.TraceEvent.1.0.41\lib\net40\Microsoft.Diagnostics.Tracing.TraceEvent.dll</HintPath>
|
<HintPath>..\packages\Microsoft.CodeAnalysis.CSharp.2.9.0\lib\netstandard1.3\Microsoft.CodeAnalysis.CSharp.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.Diagnostics.FastSerialization, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\Microsoft.Diagnostics.Tracing.TraceEvent.2.0.26\lib\net45\Microsoft.Diagnostics.FastSerialization.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.Diagnostics.Tracing.TraceEvent, Version=2.0.26.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\Microsoft.Diagnostics.Tracing.TraceEvent.2.0.26\lib\net45\Microsoft.Diagnostics.Tracing.TraceEvent.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.DotNet.InternalAbstractions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.DotNet.InternalAbstractions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.DotNet.InternalAbstractions.1.0.0\lib\net451\Microsoft.DotNet.InternalAbstractions.dll</HintPath>
|
<HintPath>..\packages\Microsoft.DotNet.InternalAbstractions.1.0.0\lib\net451\Microsoft.DotNet.InternalAbstractions.dll</HintPath>
|
||||||
@@ -69,24 +77,28 @@
|
|||||||
<Reference Include="Microsoft.DotNet.PlatformAbstractions, Version=1.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.DotNet.PlatformAbstractions, Version=1.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.DotNet.PlatformAbstractions.1.1.1\lib\net451\Microsoft.DotNet.PlatformAbstractions.dll</HintPath>
|
<HintPath>..\packages\Microsoft.DotNet.PlatformAbstractions.1.1.1\lib\net451\Microsoft.DotNet.PlatformAbstractions.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Win32.Registry, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Win32.Registry, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.Win32.Registry.4.3.0\lib\net46\Microsoft.Win32.Registry.dll</HintPath>
|
<HintPath>..\packages\Microsoft.Win32.Registry.4.5.0\lib\net461\Microsoft.Win32.Registry.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Moq, Version=4.1.1309.919, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
|
<Reference Include="Moq, Version=4.1.1309.919, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Moq.4.1.1309.0919\lib\net40\Moq.dll</HintPath>
|
<HintPath>..\packages\Moq.4.1.1309.0919\lib\net40\Moq.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="OSExtensions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\Microsoft.Diagnostics.Tracing.TraceEvent.2.0.26\lib\net45\OSExtensions.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.AppContext, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
<Reference Include="System.AppContext, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\System.AppContext.4.3.0\lib\net46\System.AppContext.dll</HintPath>
|
<HintPath>..\packages\System.AppContext.4.3.0\lib\net46\System.AppContext.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Collections.Immutable, Version=1.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
<Reference Include="System.Collections.Immutable, Version=1.2.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\System.Collections.Immutable.1.3.1\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll</HintPath>
|
<HintPath>..\packages\System.Collections.Immutable.1.5.0\lib\netstandard2.0\System.Collections.Immutable.dll</HintPath>
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.ComponentModel.Composition" />
|
<Reference Include="System.ComponentModel.Composition" />
|
||||||
<Reference Include="System.Console, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
<Reference Include="System.Console, Version=4.0.1.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\System.Console.4.3.0\lib\net46\System.Console.dll</HintPath>
|
<HintPath>..\packages\System.Console.4.3.1\lib\net46\System.Console.dll</HintPath>
|
||||||
|
<Private>True</Private>
|
||||||
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
<Reference Include="System.Data.SqlServerCe, Version=4.0.0.1, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
|
<Reference Include="System.Data.SqlServerCe, Version=4.0.0.1, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
|
||||||
@@ -113,11 +125,33 @@
|
|||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Management" />
|
<Reference Include="System.Management" />
|
||||||
<Reference Include="System.Numerics" />
|
<Reference Include="System.Numerics" />
|
||||||
<Reference Include="System.Reflection.Metadata, Version=1.4.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
<Reference Include="System.Reflection, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\System.Reflection.Metadata.1.4.2\lib\portable-net45+win8\System.Reflection.Metadata.dll</HintPath>
|
<HintPath>..\packages\System.Reflection.4.3.0\lib\net462\System.Reflection.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Security.Cryptography.Algorithms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
<Reference Include="System.Reflection.Metadata, Version=1.4.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\System.Security.Cryptography.Algorithms.4.3.0\lib\net46\System.Security.Cryptography.Algorithms.dll</HintPath>
|
<HintPath>..\packages\System.Reflection.Metadata.1.6.0\lib\netstandard2.0\System.Reflection.Metadata.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Runtime, Version=4.1.1.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\System.Runtime.4.3.1\lib\net462\System.Runtime.dll</HintPath>
|
||||||
|
<Private>True</Private>
|
||||||
|
<Private>True</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.5.1\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Runtime.Extensions, Version=4.1.1.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\System.Runtime.Extensions.4.3.1\lib\net462\System.Runtime.Extensions.dll</HintPath>
|
||||||
|
<Private>True</Private>
|
||||||
|
<Private>True</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Runtime.InteropServices, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\System.Runtime.InteropServices.4.3.0\lib\net462\System.Runtime.InteropServices.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Security.AccessControl, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\System.Security.AccessControl.4.5.0\lib\net461\System.Security.AccessControl.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Security.Cryptography.Algorithms, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\System.Security.Cryptography.Algorithms.4.3.1\lib\net461\System.Security.Cryptography.Algorithms.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Security.Cryptography.Encoding, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
<Reference Include="System.Security.Cryptography.Encoding, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
@@ -126,21 +160,25 @@
|
|||||||
<Reference Include="System.Security.Cryptography.Primitives, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
<Reference Include="System.Security.Cryptography.Primitives, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\System.Security.Cryptography.Primitives.4.3.0\lib\net46\System.Security.Cryptography.Primitives.dll</HintPath>
|
<HintPath>..\packages\System.Security.Cryptography.Primitives.4.3.0\lib\net46\System.Security.Cryptography.Primitives.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Security.Cryptography.X509Certificates, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
<Reference Include="System.Security.Cryptography.X509Certificates, Version=4.1.1.2, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\System.Security.Cryptography.X509Certificates.4.3.0\lib\net46\System.Security.Cryptography.X509Certificates.dll</HintPath>
|
<HintPath>..\packages\System.Security.Cryptography.X509Certificates.4.3.2\lib\net461\System.Security.Cryptography.X509Certificates.dll</HintPath>
|
||||||
|
<Private>True</Private>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Text.Encoding.CodePages, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
<Reference Include="System.Security.Principal.Windows, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\System.Text.Encoding.CodePages.4.3.0\lib\net46\System.Text.Encoding.CodePages.dll</HintPath>
|
<HintPath>..\packages\System.Security.Principal.Windows.4.5.0\lib\net461\System.Security.Principal.Windows.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Threading.Tasks.Extensions, Version=4.1.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
<Reference Include="System.Text.Encoding.CodePages, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.3.0\lib\portable-net45+win8+wp8+wpa81\System.Threading.Tasks.Extensions.dll</HintPath>
|
<HintPath>..\packages\System.Text.Encoding.CodePages.4.5.0\lib\net461\System.Text.Encoding.CodePages.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.1\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Threading.Thread, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
<Reference Include="System.Threading.Thread, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\System.Threading.Thread.4.3.0\lib\net46\System.Threading.Thread.dll</HintPath>
|
<HintPath>..\packages\System.Threading.Thread.4.3.0\lib\net46\System.Threading.Thread.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.ValueTuple, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\System.ValueTuple.4.4.0\lib\netstandard1.0\System.ValueTuple.dll</HintPath>
|
<HintPath>..\packages\System.ValueTuple.4.5.0\lib\net461\System.ValueTuple.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Xml.Linq" />
|
<Reference Include="System.Xml.Linq" />
|
||||||
<Reference Include="System.Data.DataSetExtensions" />
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
@@ -149,7 +187,9 @@
|
|||||||
<Reference Include="System.Net.Http" />
|
<Reference Include="System.Net.Http" />
|
||||||
<Reference Include="System.Xml" />
|
<Reference Include="System.Xml" />
|
||||||
<Reference Include="System.Xml.ReaderWriter, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
<Reference Include="System.Xml.ReaderWriter, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\System.Xml.ReaderWriter.4.3.0\lib\net46\System.Xml.ReaderWriter.dll</HintPath>
|
<HintPath>..\packages\System.Xml.ReaderWriter.4.3.1\lib\net46\System.Xml.ReaderWriter.dll</HintPath>
|
||||||
|
<Private>True</Private>
|
||||||
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Xml.XmlDocument, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
<Reference Include="System.Xml.XmlDocument, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\System.Xml.XmlDocument.4.3.0\lib\net46\System.Xml.XmlDocument.dll</HintPath>
|
<HintPath>..\packages\System.Xml.XmlDocument.4.3.0\lib\net46\System.Xml.XmlDocument.dll</HintPath>
|
||||||
@@ -160,6 +200,10 @@
|
|||||||
<Reference Include="System.Xml.XPath.XDocument, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
<Reference Include="System.Xml.XPath.XDocument, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\System.Xml.XPath.XDocument.4.3.0\lib\net46\System.Xml.XPath.XDocument.dll</HintPath>
|
<HintPath>..\packages\System.Xml.XPath.XDocument.4.3.0\lib\net46\System.Xml.XPath.XDocument.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="TraceReloggerLib, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\Microsoft.Diagnostics.Tracing.TraceEvent.2.0.26\lib\net45\TraceReloggerLib.dll</HintPath>
|
||||||
|
<EmbedInteropTypes>True</EmbedInteropTypes>
|
||||||
|
</Reference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="ConcurrentDictionaryBenchmarks.cs" />
|
<Compile Include="ConcurrentDictionaryBenchmarks.cs" />
|
||||||
@@ -195,6 +239,10 @@
|
|||||||
<Name>Umbraco.Web</Name>
|
<Name>Umbraco.Web</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Analyzer Include="..\packages\Microsoft.CodeAnalysis.Analyzers.2.6.2\analyzers\dotnet\cs\Microsoft.CodeAnalysis.Analyzers.dll" />
|
||||||
|
<Analyzer Include="..\packages\Microsoft.CodeAnalysis.Analyzers.2.6.2\analyzers\dotnet\cs\Microsoft.CodeAnalysis.CSharp.Analyzers.dll" />
|
||||||
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<PostBuildEvent>
|
<PostBuildEvent>
|
||||||
@@ -207,12 +255,11 @@
|
|||||||
<PreBuildEvent>xcopy "$(ProjectDir)"..\packages\SqlServerCE.4.0.0.1\amd64\*.* "$(TargetDir)amd64\" /Y /F /E /I /C /D
|
<PreBuildEvent>xcopy "$(ProjectDir)"..\packages\SqlServerCE.4.0.0.1\amd64\*.* "$(TargetDir)amd64\" /Y /F /E /I /C /D
|
||||||
xcopy "$(ProjectDir)"..\packages\SqlServerCE.4.0.0.1\x86\*.* "$(TargetDir)x86\" /Y /F /E /I /C /D</PreBuildEvent>
|
xcopy "$(ProjectDir)"..\packages\SqlServerCE.4.0.0.1\x86\*.* "$(TargetDir)x86\" /Y /F /E /I /C /D</PreBuildEvent>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="..\packages\Microsoft.Diagnostics.Tracing.TraceEvent.1.0.41\build\Microsoft.Diagnostics.Tracing.TraceEvent.targets" Condition="Exists('..\packages\Microsoft.Diagnostics.Tracing.TraceEvent.1.0.41\build\Microsoft.Diagnostics.Tracing.TraceEvent.targets')" />
|
|
||||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Error Condition="!Exists('..\packages\Microsoft.Diagnostics.Tracing.TraceEvent.1.0.41\build\Microsoft.Diagnostics.Tracing.TraceEvent.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Diagnostics.Tracing.TraceEvent.1.0.41\build\Microsoft.Diagnostics.Tracing.TraceEvent.targets'))" />
|
<Error Condition="!Exists('..\packages\Microsoft.Diagnostics.Tracing.TraceEvent.2.0.26\build\Microsoft.Diagnostics.Tracing.TraceEvent.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Diagnostics.Tracing.TraceEvent.2.0.26\build\Microsoft.Diagnostics.Tracing.TraceEvent.props'))" />
|
||||||
</Target>
|
</Target>
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
Other similar extension points exist, see Microsoft.Common.targets.
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
|
|||||||
@@ -4,11 +4,11 @@
|
|||||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="System.IO.Compression" publicKeyToken="b77a5c561934e089" culture="neutral" />
|
<assemblyIdentity name="System.IO.Compression" publicKeyToken="b77a5c561934e089" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.1.2.0" newVersion="4.1.2.0" />
|
<bindingRedirect oldVersion="0.0.0.0-4.2.0.0" newVersion="4.2.0.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
<assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-1.2.1.0" newVersion="1.2.1.0" />
|
<bindingRedirect oldVersion="0.0.0.0-1.2.3.0" newVersion="1.2.3.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="log4net" publicKeyToken="669e0ddf0bb1aa2a" culture="neutral" />
|
<assemblyIdentity name="log4net" publicKeyToken="669e0ddf0bb1aa2a" culture="neutral" />
|
||||||
@@ -16,27 +16,27 @@
|
|||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" />
|
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="Microsoft.Owin.Security.OAuth" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
<assemblyIdentity name="Microsoft.Owin.Security.OAuth" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" />
|
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="Microsoft.Owin.Security" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
<assemblyIdentity name="Microsoft.Owin.Security" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" />
|
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="Microsoft.Owin.Security.Cookies" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
<assemblyIdentity name="Microsoft.Owin.Security.Cookies" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" />
|
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-10.0.0.0" newVersion="10.0.0.0" />
|
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
|
<bindingRedirect oldVersion="0.0.0.0-5.2.7.0" newVersion="5.2.7.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
@@ -64,8 +64,60 @@
|
|||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
<assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
|
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="System.Security.Cryptography.Algorithms" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-4.3.0.0" newVersion="4.3.0.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="System.Runtime" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-4.1.2.0" newVersion="4.1.2.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="System.Runtime.InteropServices" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="System.Runtime.Extensions" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-4.1.2.0" newVersion="4.1.2.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="System.Reflection" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-4.1.1.0" newVersion="4.1.1.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="System.Reflection.Metadata" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-1.4.3.0" newVersion="1.4.3.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="Microsoft.CodeAnalysis" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-2.9.0.0" newVersion="2.9.0.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="Microsoft.CodeAnalysis.CSharp" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-2.9.0.0" newVersion="2.9.0.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-4.2.0.0" newVersion="4.2.0.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="System.Xml.ReaderWriter" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-4.1.1.0" newVersion="4.1.1.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="System.Text.Encoding.CodePages" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-4.1.1.0" newVersion="4.1.1.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="Microsoft.Diagnostics.Tracing.TraceEvent" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-2.0.26.0" newVersion="2.0.26.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="Microsoft.Win32.Registry" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-4.1.1.0" newVersion="4.1.1.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
</assemblyBinding>
|
</assemblyBinding>
|
||||||
</runtime>
|
</runtime>
|
||||||
</configuration>
|
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" /></startup></configuration>
|
||||||
|
|||||||
@@ -1,25 +1,25 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="BenchmarkDotNet" version="0.10.12" targetFramework="net46" />
|
<package id="BenchmarkDotNet" version="0.10.3" targetFramework="net462" />
|
||||||
<package id="BenchmarkDotNet.Core" version="0.10.12" targetFramework="net46" />
|
<package id="BenchmarkDotNet.Core" version="0.10.12" targetFramework="net46" />
|
||||||
<package id="BenchmarkDotNet.Diagnostics.Windows" version="0.9.9" targetFramework="net45" />
|
<package id="BenchmarkDotNet.Diagnostics.Windows" version="0.9.9" targetFramework="net45" />
|
||||||
<package id="BenchmarkDotNet.Toolchains.Roslyn" version="0.10.12" targetFramework="net46" />
|
<package id="BenchmarkDotNet.Toolchains.Roslyn" version="0.10.3" targetFramework="net462" />
|
||||||
<package id="Castle.Core" version="4.0.0" targetFramework="net45" />
|
<package id="Castle.Core" version="4.0.0" targetFramework="net45" />
|
||||||
<package id="Microsoft.CodeAnalysis.Analyzers" version="1.1.0" targetFramework="net45" />
|
<package id="Microsoft.CodeAnalysis.Analyzers" version="2.6.2" targetFramework="net462" developmentDependency="true" />
|
||||||
<package id="Microsoft.CodeAnalysis.Common" version="2.4.0" targetFramework="net46" />
|
<package id="Microsoft.CodeAnalysis.Common" version="2.9.0" targetFramework="net462" />
|
||||||
<package id="Microsoft.CodeAnalysis.CSharp" version="2.4.0" targetFramework="net46" />
|
<package id="Microsoft.CodeAnalysis.CSharp" version="2.9.0" targetFramework="net462" />
|
||||||
<package id="Microsoft.Diagnostics.Tracing.TraceEvent" version="1.0.41" targetFramework="net45" />
|
<package id="Microsoft.Diagnostics.Tracing.TraceEvent" version="2.0.26" targetFramework="net462" />
|
||||||
<package id="Microsoft.DotNet.InternalAbstractions" version="1.0.0" targetFramework="net46" />
|
<package id="Microsoft.DotNet.InternalAbstractions" version="1.0.0" targetFramework="net46" />
|
||||||
<package id="Microsoft.DotNet.PlatformAbstractions" version="1.1.1" targetFramework="net46" />
|
<package id="Microsoft.DotNet.PlatformAbstractions" version="1.1.1" targetFramework="net46" />
|
||||||
<package id="Microsoft.SqlServer.Compact" version="4.0.8854.1" targetFramework="net45" />
|
<package id="Microsoft.SqlServer.Compact" version="4.0.8854.1" targetFramework="net45" />
|
||||||
<package id="Microsoft.Win32.Registry" version="4.3.0" targetFramework="net46" />
|
<package id="Microsoft.Win32.Registry" version="4.5.0" targetFramework="net462" />
|
||||||
<package id="Moq" version="4.1.1309.0919" targetFramework="net45" />
|
<package id="Moq" version="4.1.1309.0919" targetFramework="net45" />
|
||||||
<package id="SqlServerCE" version="4.0.0.1" targetFramework="net45" />
|
<package id="SqlServerCE" version="4.0.0.1" targetFramework="net45" />
|
||||||
<package id="System.AppContext" version="4.3.0" targetFramework="net46" />
|
<package id="System.AppContext" version="4.3.0" targetFramework="net46" />
|
||||||
<package id="System.Collections" version="4.3.0" targetFramework="net46" />
|
<package id="System.Collections" version="4.3.0" targetFramework="net46" />
|
||||||
<package id="System.Collections.Concurrent" version="4.3.0" targetFramework="net46" />
|
<package id="System.Collections.Concurrent" version="4.3.0" targetFramework="net46" />
|
||||||
<package id="System.Collections.Immutable" version="1.3.1" targetFramework="net46" />
|
<package id="System.Collections.Immutable" version="1.5.0" targetFramework="net462" />
|
||||||
<package id="System.Console" version="4.3.0" targetFramework="net46" />
|
<package id="System.Console" version="4.3.1" targetFramework="net462" />
|
||||||
<package id="System.Diagnostics.Debug" version="4.3.0" targetFramework="net46" />
|
<package id="System.Diagnostics.Debug" version="4.3.0" targetFramework="net46" />
|
||||||
<package id="System.Diagnostics.FileVersionInfo" version="4.3.0" targetFramework="net46" />
|
<package id="System.Diagnostics.FileVersionInfo" version="4.3.0" targetFramework="net46" />
|
||||||
<package id="System.Diagnostics.StackTrace" version="4.3.0" targetFramework="net46" />
|
<package id="System.Diagnostics.StackTrace" version="4.3.0" targetFramework="net46" />
|
||||||
@@ -31,28 +31,32 @@
|
|||||||
<package id="System.IO.FileSystem.Primitives" version="4.3.0" targetFramework="net46" />
|
<package id="System.IO.FileSystem.Primitives" version="4.3.0" targetFramework="net46" />
|
||||||
<package id="System.Linq" version="4.3.0" targetFramework="net46" />
|
<package id="System.Linq" version="4.3.0" targetFramework="net46" />
|
||||||
<package id="System.Linq.Expressions" version="4.3.0" targetFramework="net46" />
|
<package id="System.Linq.Expressions" version="4.3.0" targetFramework="net46" />
|
||||||
<package id="System.Reflection" version="4.3.0" targetFramework="net46" />
|
<package id="System.Reflection" version="4.3.0" targetFramework="net462" />
|
||||||
<package id="System.Reflection.Metadata" version="1.4.2" targetFramework="net46" />
|
<package id="System.Reflection.Metadata" version="1.6.0" targetFramework="net462" />
|
||||||
<package id="System.Reflection.Primitives" version="4.0.1" targetFramework="net45" />
|
<package id="System.Reflection.Primitives" version="4.3.0" targetFramework="net462" />
|
||||||
<package id="System.Resources.ResourceManager" version="4.3.0" targetFramework="net46" />
|
<package id="System.Resources.ResourceManager" version="4.3.0" targetFramework="net46" />
|
||||||
<package id="System.Runtime" version="4.3.0" targetFramework="net46" />
|
<package id="System.Runtime" version="4.3.1" targetFramework="net462" />
|
||||||
<package id="System.Runtime.Extensions" version="4.3.0" targetFramework="net46" />
|
<package id="System.Runtime.CompilerServices.Unsafe" version="4.5.1" targetFramework="net462" />
|
||||||
<package id="System.Runtime.InteropServices" version="4.3.0" targetFramework="net46" />
|
<package id="System.Runtime.Extensions" version="4.3.1" targetFramework="net462" />
|
||||||
|
<package id="System.Runtime.Handles" version="4.3.0" targetFramework="net462" />
|
||||||
|
<package id="System.Runtime.InteropServices" version="4.3.0" targetFramework="net462" />
|
||||||
<package id="System.Runtime.Numerics" version="4.3.0" targetFramework="net46" />
|
<package id="System.Runtime.Numerics" version="4.3.0" targetFramework="net46" />
|
||||||
<package id="System.Security.Cryptography.Algorithms" version="4.3.0" targetFramework="net46" />
|
<package id="System.Security.AccessControl" version="4.5.0" targetFramework="net462" />
|
||||||
<package id="System.Security.Cryptography.Encoding" version="4.3.0" targetFramework="net46" />
|
<package id="System.Security.Cryptography.Algorithms" version="4.3.1" targetFramework="net462" />
|
||||||
<package id="System.Security.Cryptography.Primitives" version="4.3.0" targetFramework="net46" />
|
<package id="System.Security.Cryptography.Encoding" version="4.3.0" targetFramework="net462" />
|
||||||
<package id="System.Security.Cryptography.X509Certificates" version="4.3.0" targetFramework="net46" />
|
<package id="System.Security.Cryptography.Primitives" version="4.3.0" targetFramework="net462" />
|
||||||
|
<package id="System.Security.Cryptography.X509Certificates" version="4.3.2" targetFramework="net462" />
|
||||||
|
<package id="System.Security.Principal.Windows" version="4.5.0" targetFramework="net462" />
|
||||||
<package id="System.Text.Encoding" version="4.3.0" targetFramework="net46" />
|
<package id="System.Text.Encoding" version="4.3.0" targetFramework="net46" />
|
||||||
<package id="System.Text.Encoding.CodePages" version="4.3.0" targetFramework="net46" />
|
<package id="System.Text.Encoding.CodePages" version="4.5.0" targetFramework="net462" />
|
||||||
<package id="System.Text.Encoding.Extensions" version="4.3.0" targetFramework="net46" />
|
<package id="System.Text.Encoding.Extensions" version="4.3.0" targetFramework="net46" />
|
||||||
<package id="System.Threading" version="4.3.0" targetFramework="net46" />
|
<package id="System.Threading" version="4.3.0" targetFramework="net46" />
|
||||||
<package id="System.Threading.Tasks" version="4.3.0" targetFramework="net46" />
|
<package id="System.Threading.Tasks" version="4.3.0" targetFramework="net46" />
|
||||||
<package id="System.Threading.Tasks.Extensions" version="4.3.0" targetFramework="net46" />
|
<package id="System.Threading.Tasks.Extensions" version="4.5.1" targetFramework="net462" />
|
||||||
<package id="System.Threading.Tasks.Parallel" version="4.3.0" targetFramework="net46" />
|
<package id="System.Threading.Tasks.Parallel" version="4.3.0" targetFramework="net46" />
|
||||||
<package id="System.Threading.Thread" version="4.3.0" targetFramework="net46" />
|
<package id="System.Threading.Thread" version="4.3.0" targetFramework="net46" />
|
||||||
<package id="System.ValueTuple" version="4.4.0" targetFramework="net46" />
|
<package id="System.ValueTuple" version="4.5.0" targetFramework="net462" />
|
||||||
<package id="System.Xml.ReaderWriter" version="4.3.0" targetFramework="net46" />
|
<package id="System.Xml.ReaderWriter" version="4.3.1" targetFramework="net462" />
|
||||||
<package id="System.Xml.XDocument" version="4.3.0" targetFramework="net46" />
|
<package id="System.Xml.XDocument" version="4.3.0" targetFramework="net46" />
|
||||||
<package id="System.Xml.XmlDocument" version="4.3.0" targetFramework="net46" />
|
<package id="System.Xml.XmlDocument" version="4.3.0" targetFramework="net46" />
|
||||||
<package id="System.Xml.XmlSerializer" version="4.3.0" targetFramework="net46" />
|
<package id="System.Xml.XmlSerializer" version="4.3.0" targetFramework="net46" />
|
||||||
|
|||||||
@@ -102,14 +102,14 @@
|
|||||||
</system.web>
|
</system.web>
|
||||||
|
|
||||||
<startup>
|
<startup>
|
||||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
|
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
|
||||||
</startup>
|
</startup>
|
||||||
<runtime>
|
<runtime>
|
||||||
|
|
||||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
|
<bindingRedirect oldVersion="0.0.0.0-5.2.7.0" newVersion="5.2.7.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
@@ -123,7 +123,7 @@
|
|||||||
|
|
||||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||||
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-10.0.0.0" newVersion="10.0.0.0" />
|
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||||
|
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
|
|
||||||
@@ -141,19 +141,19 @@
|
|||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" />
|
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="Microsoft.Owin.Security.OAuth" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
<assemblyIdentity name="Microsoft.Owin.Security.OAuth" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" />
|
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="Microsoft.Owin.Security" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
<assemblyIdentity name="Microsoft.Owin.Security" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" />
|
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="Microsoft.Owin.Security.Cookies" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
<assemblyIdentity name="Microsoft.Owin.Security.Cookies" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" />
|
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
<assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ namespace Umbraco.Tests.Migrations.SqlScripts {
|
|||||||
// class via a tool like ResGen or Visual Studio.
|
// class via a tool like ResGen or Visual Studio.
|
||||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||||
// with the /str option, or rebuild your VS project.
|
// with the /str option, or rebuild your VS project.
|
||||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
internal class SqlResources {
|
internal class SqlResources {
|
||||||
|
|||||||
@@ -178,17 +178,6 @@ namespace Umbraco.Tests.Models
|
|||||||
item.AdditionalData.Add("test1", 3);
|
item.AdditionalData.Add("test1", 3);
|
||||||
item.AdditionalData.Add("test2", "valuie");
|
item.AdditionalData.Add("test2", "valuie");
|
||||||
|
|
||||||
item.AdditionalData.Add("test3", new UmbracoEntity.EntityProperty()
|
|
||||||
{
|
|
||||||
Value = "test",
|
|
||||||
PropertyEditorAlias = "TestPropertyEditor"
|
|
||||||
});
|
|
||||||
item.AdditionalData.Add("test4", new UmbracoEntity.EntityProperty()
|
|
||||||
{
|
|
||||||
Value = "test2",
|
|
||||||
PropertyEditorAlias = "TestPropertyEditor2"
|
|
||||||
});
|
|
||||||
|
|
||||||
var clone = (UmbracoEntity)item.DeepClone();
|
var clone = (UmbracoEntity)item.DeepClone();
|
||||||
|
|
||||||
Assert.AreNotSame(clone, item);
|
Assert.AreNotSame(clone, item);
|
||||||
@@ -250,16 +239,6 @@ namespace Umbraco.Tests.Models
|
|||||||
};
|
};
|
||||||
item.AdditionalData.Add("test1", 3);
|
item.AdditionalData.Add("test1", 3);
|
||||||
item.AdditionalData.Add("test2", "valuie");
|
item.AdditionalData.Add("test2", "valuie");
|
||||||
item.AdditionalData.Add("test3", new UmbracoEntity.EntityProperty()
|
|
||||||
{
|
|
||||||
Value = "test",
|
|
||||||
PropertyEditorAlias = "TestPropertyEditor"
|
|
||||||
});
|
|
||||||
item.AdditionalData.Add("test4", new UmbracoEntity.EntityProperty()
|
|
||||||
{
|
|
||||||
Value = "test2",
|
|
||||||
PropertyEditorAlias = "TestPropertyEditor2"
|
|
||||||
});
|
|
||||||
|
|
||||||
var result = ss.ToStream(item);
|
var result = ss.ToStream(item);
|
||||||
var json = result.ResultStream.ToJsonString();
|
var json = result.ResultStream.ToJsonString();
|
||||||
|
|||||||
@@ -327,7 +327,7 @@ AnotherContentFinder
|
|||||||
public void Resolves_RestExtensions()
|
public void Resolves_RestExtensions()
|
||||||
{
|
{
|
||||||
var types = _manager.ResolveRestExtensions();
|
var types = _manager.ResolveRestExtensions();
|
||||||
Assert.AreEqual(3, types.Count());
|
Assert.AreEqual(2, types.Count());
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
|
|||||||
@@ -515,12 +515,6 @@ namespace Umbraco.Tests.Services
|
|||||||
|
|
||||||
Assert.That(entities.Any(), Is.True);
|
Assert.That(entities.Any(), Is.True);
|
||||||
Assert.That(entities.Count(), Is.EqualTo(5));
|
Assert.That(entities.Count(), Is.EqualTo(5));
|
||||||
|
|
||||||
Assert.That(
|
|
||||||
entities.Any(
|
|
||||||
x =>
|
|
||||||
x.AdditionalData.Any(y => y.Value is UmbracoEntity.EntityProperty
|
|
||||||
&& ((UmbracoEntity.EntityProperty)y.Value).PropertyEditorAlias == Constants.PropertyEditors.UploadFieldAlias)), Is.True);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ namespace Umbraco.Tests.Services.Importing {
|
|||||||
// class via a tool like ResGen or Visual Studio.
|
// class via a tool like ResGen or Visual Studio.
|
||||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||||
// with the /str option, or rebuild your VS project.
|
// with the /str option, or rebuild your VS project.
|
||||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
internal class ImportResources {
|
internal class ImportResources {
|
||||||
@@ -322,7 +322,7 @@ namespace Umbraco.Tests.Services.Importing {
|
|||||||
/// </package>
|
/// </package>
|
||||||
/// <author>
|
/// <author>
|
||||||
/// <name>Morten Christensen</name>
|
/// <name>Morten Christensen</name>
|
||||||
/// [rest of string was truncated]";.
|
/// [rest of string was truncated]";.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal static string TemplateOnly_Package {
|
internal static string TemplateOnly_Package {
|
||||||
get {
|
get {
|
||||||
@@ -348,7 +348,7 @@ namespace Umbraco.Tests.Services.Importing {
|
|||||||
/// </package>
|
/// </package>
|
||||||
/// <author>
|
/// <author>
|
||||||
/// <name>Morten Christensen</name>
|
/// <name>Morten Christensen</name>
|
||||||
/// [rest of string was truncated]";.
|
/// [rest of string was truncated]";.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal static string TemplateOnly_Updated_Package {
|
internal static string TemplateOnly_Updated_Package {
|
||||||
get {
|
get {
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ namespace Umbraco.Tests.TreesAndSections {
|
|||||||
// class via a tool like ResGen or Visual Studio.
|
// class via a tool like ResGen or Visual Studio.
|
||||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||||
// with the /str option, or rebuild your VS project.
|
// with the /str option, or rebuild your VS project.
|
||||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
internal class ResourceFiles {
|
internal class ResourceFiles {
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
<RootNamespace>Umbraco.Tests</RootNamespace>
|
<RootNamespace>Umbraco.Tests</RootNamespace>
|
||||||
<AssemblyName>Umbraco.Tests</AssemblyName>
|
<AssemblyName>Umbraco.Tests</AssemblyName>
|
||||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
|
||||||
<FileAlignment>512</FileAlignment>
|
<FileAlignment>512</FileAlignment>
|
||||||
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
|
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
|
||||||
<RestorePackages>true</RestorePackages>
|
<RestorePackages>true</RestorePackages>
|
||||||
@@ -65,6 +65,12 @@
|
|||||||
<Reference Include="Examine, Version=0.1.89.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="Examine, Version=0.1.89.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Examine.0.1.89\lib\net45\Examine.dll</HintPath>
|
<HintPath>..\packages\Examine.0.1.89\lib\net45\Examine.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="HtmlAgilityPack, Version=1.8.8.0, Culture=neutral, PublicKeyToken=bd319b19eaf3b43a, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\HtmlAgilityPack.1.8.8\lib\Net45\HtmlAgilityPack.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Examine, Version=0.1.90.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\Examine.0.1.90\lib\net45\Examine.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
<Reference Include="ICSharpCode.SharpZipLib, Version=0.86.0.518, Culture=neutral, PublicKeyToken=1b03e6acf1164f73, processorArchitecture=MSIL">
|
<Reference Include="ICSharpCode.SharpZipLib, Version=0.86.0.518, Culture=neutral, PublicKeyToken=1b03e6acf1164f73, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\SharpZipLib.0.86.0\lib\20\ICSharpCode.SharpZipLib.dll</HintPath>
|
<HintPath>..\packages\SharpZipLib.0.86.0\lib\20\ICSharpCode.SharpZipLib.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
@@ -78,25 +84,25 @@
|
|||||||
<HintPath>..\packages\Lucene.Net.2.9.4.1\lib\net40\Lucene.Net.dll</HintPath>
|
<HintPath>..\packages\Lucene.Net.2.9.4.1\lib\net40\Lucene.Net.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.AspNet.Identity.Core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.AspNet.Identity.Core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.AspNet.Identity.Core.2.2.1\lib\net45\Microsoft.AspNet.Identity.Core.dll</HintPath>
|
<HintPath>..\packages\Microsoft.AspNet.Identity.Core.2.2.2\lib\net45\Microsoft.AspNet.Identity.Core.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Owin, Version=3.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Owin, Version=4.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.Owin.3.1.0\lib\net45\Microsoft.Owin.dll</HintPath>
|
<HintPath>..\packages\Microsoft.Owin.4.0.1\lib\net45\Microsoft.Owin.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Owin.Host.HttpListener, Version=3.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Owin.Host.HttpListener, Version=4.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.Owin.Host.HttpListener.3.1.0\lib\net45\Microsoft.Owin.Host.HttpListener.dll</HintPath>
|
<HintPath>..\packages\Microsoft.Owin.Host.HttpListener.4.0.1\lib\net45\Microsoft.Owin.Host.HttpListener.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Owin.Host.SystemWeb, Version=3.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Owin.Host.SystemWeb, Version=4.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.Owin.Host.SystemWeb.3.1.0\lib\net45\Microsoft.Owin.Host.SystemWeb.dll</HintPath>
|
<HintPath>..\packages\Microsoft.Owin.Host.SystemWeb.4.0.1\lib\net45\Microsoft.Owin.Host.SystemWeb.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Owin.Hosting, Version=3.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Owin.Hosting, Version=4.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.Owin.Hosting.3.1.0\lib\net45\Microsoft.Owin.Hosting.dll</HintPath>
|
<HintPath>..\packages\Microsoft.Owin.Hosting.4.0.1\lib\net45\Microsoft.Owin.Hosting.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Owin.Security, Version=3.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Owin.Security, Version=4.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.Owin.Security.3.1.0\lib\net45\Microsoft.Owin.Security.dll</HintPath>
|
<HintPath>..\packages\Microsoft.Owin.Security.4.0.1\lib\net45\Microsoft.Owin.Security.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Owin.Testing, Version=3.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Owin.Testing, Version=4.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.Owin.Testing.3.1.0\lib\net45\Microsoft.Owin.Testing.dll</HintPath>
|
<HintPath>..\packages\Microsoft.Owin.Testing.4.0.1\lib\net45\Microsoft.Owin.Testing.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
|
<HintPath>..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
|
||||||
@@ -107,8 +113,8 @@
|
|||||||
<Reference Include="Moq, Version=4.1.1309.919, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
|
<Reference Include="Moq, Version=4.1.1309.919, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Moq.4.1.1309.0919\lib\net40\Moq.dll</HintPath>
|
<HintPath>..\packages\Moq.4.1.1309.0919\lib\net40\Moq.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Newtonsoft.Json.10.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
|
<HintPath>..\packages\Newtonsoft.Json.12.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="nunit.framework, Version=2.6.2.12296, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
|
<Reference Include="nunit.framework, Version=2.6.2.12296, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\NUnit.2.6.2\lib\nunit.framework.dll</HintPath>
|
<HintPath>..\packages\NUnit.2.6.2\lib\nunit.framework.dll</HintPath>
|
||||||
@@ -117,7 +123,7 @@
|
|||||||
<HintPath>..\packages\Owin.1.0\lib\net40\Owin.dll</HintPath>
|
<HintPath>..\packages\Owin.1.0\lib\net40\Owin.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Semver, Version=1.1.2.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="Semver, Version=1.1.2.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\semver.1.1.2\lib\net45\Semver.dll</HintPath>
|
<HintPath>..\packages\semver.1.1.2\lib\net451\Semver.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.ComponentModel.Composition" />
|
<Reference Include="System.ComponentModel.Composition" />
|
||||||
@@ -133,8 +139,8 @@
|
|||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Drawing" />
|
<Reference Include="System.Drawing" />
|
||||||
<Reference Include="System.Net.Http" />
|
<Reference Include="System.Net.Http" />
|
||||||
<Reference Include="System.Net.Http.Formatting, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="System.Net.Http.Formatting, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.AspNet.WebApi.Client.5.2.3\lib\net45\System.Net.Http.Formatting.dll</HintPath>
|
<HintPath>..\packages\Microsoft.AspNet.WebApi.Client.5.2.7\lib\net45\System.Net.Http.Formatting.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Net.Http.WebRequest" />
|
<Reference Include="System.Net.Http.WebRequest" />
|
||||||
<Reference Include="System.Runtime.Caching" />
|
<Reference Include="System.Runtime.Caching" />
|
||||||
@@ -142,38 +148,38 @@
|
|||||||
<Reference Include="System.Web" />
|
<Reference Include="System.Web" />
|
||||||
<Reference Include="System.Web.ApplicationServices" />
|
<Reference Include="System.Web.ApplicationServices" />
|
||||||
<Reference Include="System.Web.Helpers, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="System.Web.Helpers, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.Helpers.dll</HintPath>
|
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.Helpers.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Web.Http, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="System.Web.Http, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.AspNet.WebApi.Core.5.2.3\lib\net45\System.Web.Http.dll</HintPath>
|
<HintPath>..\packages\Microsoft.AspNet.WebApi.Core.5.2.7\lib\net45\System.Web.Http.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Web.Http.Owin, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="System.Web.Http.Owin, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.AspNet.WebApi.Owin.5.2.3\lib\net45\System.Web.Http.Owin.dll</HintPath>
|
<HintPath>..\packages\Microsoft.AspNet.WebApi.Owin.5.2.7\lib\net45\System.Web.Http.Owin.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Web.Http.SelfHost, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="System.Web.Http.SelfHost, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.AspNet.WebApi.SelfHost.5.2.3\lib\net45\System.Web.Http.SelfHost.dll</HintPath>
|
<HintPath>..\packages\Microsoft.AspNet.WebApi.SelfHost.5.2.7\lib\net45\System.Web.Http.SelfHost.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Web.Http.Tracing, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="System.Web.Http.Tracing, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.AspNet.WebApi.Tracing.5.2.3\lib\net45\System.Web.Http.Tracing.dll</HintPath>
|
<HintPath>..\packages\Microsoft.AspNet.WebApi.Tracing.5.2.7\lib\net45\System.Web.Http.Tracing.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Web.Http.WebHost, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="System.Web.Http.WebHost, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.AspNet.WebApi.WebHost.5.2.3\lib\net45\System.Web.Http.WebHost.dll</HintPath>
|
<HintPath>..\packages\Microsoft.AspNet.WebApi.WebHost.5.2.7\lib\net45\System.Web.Http.WebHost.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="System.Web.Mvc, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.AspNet.Mvc.5.2.3\lib\net45\System.Web.Mvc.dll</HintPath>
|
<HintPath>..\packages\Microsoft.AspNet.Mvc.5.2.7\lib\net45\System.Web.Mvc.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Web.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="System.Web.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.AspNet.Razor.3.2.3\lib\net45\System.Web.Razor.dll</HintPath>
|
<HintPath>..\packages\Microsoft.AspNet.Razor.3.2.7\lib\net45\System.Web.Razor.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Web.Services" />
|
<Reference Include="System.Web.Services" />
|
||||||
<Reference Include="System.Web.WebPages, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="System.Web.WebPages, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.dll</HintPath>
|
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.WebPages.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Web.WebPages.Deployment, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="System.Web.WebPages.Deployment, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.Deployment.dll</HintPath>
|
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.WebPages.Deployment.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.Razor.dll</HintPath>
|
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.WebPages.Razor.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Xml.Linq" />
|
<Reference Include="System.Xml.Linq" />
|
||||||
<Reference Include="System.Data.DataSetExtensions" />
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
@@ -392,6 +398,7 @@
|
|||||||
<Compile Include="Models\ContentExtensionsTests.cs" />
|
<Compile Include="Models\ContentExtensionsTests.cs" />
|
||||||
<Compile Include="Models\UserExtensionsTests.cs" />
|
<Compile Include="Models\UserExtensionsTests.cs" />
|
||||||
<Compile Include="Web\Mvc\MergeParentContextViewDataAttributeTests.cs" />
|
<Compile Include="Web\Mvc\MergeParentContextViewDataAttributeTests.cs" />
|
||||||
|
<Compile Include="Web\Mvc\ValidateUmbracoFormRouteStringAttributeTests.cs" />
|
||||||
<Compile Include="Web\Mvc\ViewDataDictionaryExtensionTests.cs" />
|
<Compile Include="Web\Mvc\ViewDataDictionaryExtensionTests.cs" />
|
||||||
<Compile Include="Persistence\PetaPocoExtensionsTest.cs" />
|
<Compile Include="Persistence\PetaPocoExtensionsTest.cs" />
|
||||||
<Compile Include="Persistence\Querying\ContentTypeSqlMappingTests.cs" />
|
<Compile Include="Persistence\Querying\ContentTypeSqlMappingTests.cs" />
|
||||||
|
|||||||
+1
-1
@@ -19,7 +19,7 @@ namespace Umbraco.Tests.UmbracoExamine {
|
|||||||
// class via a tool like ResGen or Visual Studio.
|
// class via a tool like ResGen or Visual Studio.
|
||||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||||
// with the /str option, or rebuild your VS project.
|
// with the /str option, or rebuild your VS project.
|
||||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
internal class TestFiles {
|
internal class TestFiles {
|
||||||
|
|||||||
@@ -4,7 +4,8 @@ using Umbraco.Web;
|
|||||||
|
|
||||||
namespace Umbraco.Tests.Web.Mvc
|
namespace Umbraco.Tests.Web.Mvc
|
||||||
{
|
{
|
||||||
[TestFixture]
|
|
||||||
|
[TestFixture]
|
||||||
public class HtmlHelperExtensionMethodsTests
|
public class HtmlHelperExtensionMethodsTests
|
||||||
{
|
{
|
||||||
[SetUp]
|
[SetUp]
|
||||||
|
|||||||
@@ -0,0 +1,37 @@
|
|||||||
|
using NUnit.Framework;
|
||||||
|
using Umbraco.Web;
|
||||||
|
using Umbraco.Web.Mvc;
|
||||||
|
|
||||||
|
namespace Umbraco.Tests.Web.Mvc
|
||||||
|
{
|
||||||
|
[TestFixture]
|
||||||
|
public class ValidateUmbracoFormRouteStringAttributeTests
|
||||||
|
{
|
||||||
|
[Test]
|
||||||
|
public void Validate_Route_String()
|
||||||
|
{
|
||||||
|
var attribute = new ValidateUmbracoFormRouteStringAttribute();
|
||||||
|
|
||||||
|
Assert.Throws<HttpUmbracoFormRouteStringException>(() => attribute.ValidateRouteString(null, null, null, null));
|
||||||
|
|
||||||
|
const string ControllerName = "Test";
|
||||||
|
const string ControllerAction = "Index";
|
||||||
|
const string Area = "MyArea";
|
||||||
|
var validUfprt = UmbracoHelper.CreateEncryptedRouteString(ControllerName, ControllerAction, Area);
|
||||||
|
|
||||||
|
var invalidUfprt = validUfprt + "z";
|
||||||
|
Assert.Throws<HttpUmbracoFormRouteStringException>(() => attribute.ValidateRouteString(invalidUfprt, null, null, null));
|
||||||
|
|
||||||
|
Assert.Throws<HttpUmbracoFormRouteStringException>(() => attribute.ValidateRouteString(validUfprt, ControllerName, ControllerAction, "doesntMatch"));
|
||||||
|
Assert.Throws<HttpUmbracoFormRouteStringException>(() => attribute.ValidateRouteString(validUfprt, ControllerName, ControllerAction, null));
|
||||||
|
Assert.Throws<HttpUmbracoFormRouteStringException>(() => attribute.ValidateRouteString(validUfprt, ControllerName, "doesntMatch", Area));
|
||||||
|
Assert.Throws<HttpUmbracoFormRouteStringException>(() => attribute.ValidateRouteString(validUfprt, ControllerName, null, Area));
|
||||||
|
Assert.Throws<HttpUmbracoFormRouteStringException>(() => attribute.ValidateRouteString(validUfprt, "doesntMatch", ControllerAction, Area));
|
||||||
|
Assert.Throws<HttpUmbracoFormRouteStringException>(() => attribute.ValidateRouteString(validUfprt, null, ControllerAction, Area));
|
||||||
|
|
||||||
|
Assert.DoesNotThrow(() => attribute.ValidateRouteString(validUfprt, ControllerName, ControllerAction, Area));
|
||||||
|
Assert.DoesNotThrow(() => attribute.ValidateRouteString(validUfprt, ControllerName.ToLowerInvariant(), ControllerAction.ToLowerInvariant(), Area.ToLowerInvariant()));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -2,41 +2,42 @@
|
|||||||
<packages>
|
<packages>
|
||||||
<package id="AutoMapper" version="3.3.1" targetFramework="net45" />
|
<package id="AutoMapper" version="3.3.1" targetFramework="net45" />
|
||||||
<package id="Castle.Core" version="4.0.0" targetFramework="net45" />
|
<package id="Castle.Core" version="4.0.0" targetFramework="net45" />
|
||||||
<package id="Examine" version="0.1.89" targetFramework="net45" />
|
<package id="Examine" version="0.1.90" targetFramework="net45" />
|
||||||
|
<package id="HtmlAgilityPack" version="1.8.8" targetFramework="net452" />
|
||||||
<package id="log4net" version="2.0.8" targetFramework="net45" />
|
<package id="log4net" version="2.0.8" targetFramework="net45" />
|
||||||
<package id="Log4Net.Async" version="2.0.4" targetFramework="net45" />
|
<package id="Log4Net.Async" version="2.0.4" targetFramework="net45" />
|
||||||
<package id="Lucene.Net" version="2.9.4.1" targetFramework="net45" />
|
<package id="Lucene.Net" version="2.9.4.1" targetFramework="net45" />
|
||||||
<package id="Microsoft.AspNet.Identity.Core" version="2.2.1" targetFramework="net45" />
|
<package id="Microsoft.AspNet.Identity.Core" version="2.2.2" targetFramework="net452" />
|
||||||
<package id="Microsoft.AspNet.Mvc" version="5.2.3" targetFramework="net45" />
|
<package id="Microsoft.AspNet.Mvc" version="5.2.7" targetFramework="net452" />
|
||||||
<package id="Microsoft.AspNet.Razor" version="3.2.3" targetFramework="net45" />
|
<package id="Microsoft.AspNet.Razor" version="3.2.7" targetFramework="net452" />
|
||||||
<package id="Microsoft.AspNet.WebApi" version="5.2.3" targetFramework="net45" />
|
<package id="Microsoft.AspNet.WebApi" version="5.2.7" targetFramework="net452" />
|
||||||
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.3" targetFramework="net45" />
|
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.7" targetFramework="net452" />
|
||||||
<package id="Microsoft.AspNet.WebApi.Core" version="5.2.3" targetFramework="net45" />
|
<package id="Microsoft.AspNet.WebApi.Core" version="5.2.7" targetFramework="net452" />
|
||||||
<package id="Microsoft.AspNet.WebApi.Owin" version="5.2.3" targetFramework="net45" />
|
<package id="Microsoft.AspNet.WebApi.Owin" version="5.2.7" targetFramework="net452" />
|
||||||
<package id="Microsoft.AspNet.WebApi.OwinSelfHost" version="5.2.3" targetFramework="net45" />
|
<package id="Microsoft.AspNet.WebApi.OwinSelfHost" version="5.2.7" targetFramework="net452" />
|
||||||
<package id="Microsoft.AspNet.WebApi.SelfHost" version="5.2.3" targetFramework="net45" />
|
<package id="Microsoft.AspNet.WebApi.SelfHost" version="5.2.7" targetFramework="net452" />
|
||||||
<package id="Microsoft.AspNet.WebApi.Tracing" version="5.2.3" targetFramework="net45" />
|
<package id="Microsoft.AspNet.WebApi.Tracing" version="5.2.7" targetFramework="net452" />
|
||||||
<package id="Microsoft.AspNet.WebApi.WebHost" version="5.2.3" targetFramework="net45" />
|
<package id="Microsoft.AspNet.WebApi.WebHost" version="5.2.7" targetFramework="net452" />
|
||||||
<package id="Microsoft.AspNet.WebPages" version="3.2.3" targetFramework="net45" />
|
<package id="Microsoft.AspNet.WebPages" version="3.2.7" targetFramework="net452" />
|
||||||
<package id="Microsoft.Owin" version="3.1.0" targetFramework="net45" />
|
<package id="Microsoft.Owin" version="4.0.1" targetFramework="net452" />
|
||||||
<package id="Microsoft.Owin.Host.HttpListener" version="3.1.0" targetFramework="net45" />
|
<package id="Microsoft.Owin.Host.HttpListener" version="4.0.1" targetFramework="net452" />
|
||||||
<package id="Microsoft.Owin.Host.SystemWeb" version="3.1.0" targetFramework="net45" />
|
<package id="Microsoft.Owin.Host.SystemWeb" version="4.0.1" targetFramework="net452" />
|
||||||
<package id="Microsoft.Owin.Hosting" version="3.1.0" targetFramework="net45" />
|
<package id="Microsoft.Owin.Hosting" version="4.0.1" targetFramework="net452" />
|
||||||
<package id="Microsoft.Owin.Security" version="3.1.0" targetFramework="net45" />
|
<package id="Microsoft.Owin.Security" version="4.0.1" targetFramework="net452" />
|
||||||
<package id="Microsoft.Owin.Testing" version="3.1.0" targetFramework="net45" />
|
<package id="Microsoft.Owin.Testing" version="4.0.1" targetFramework="net452" />
|
||||||
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net45" />
|
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net45" />
|
||||||
<package id="MiniProfiler" version="2.1.0" targetFramework="net45" />
|
<package id="MiniProfiler" version="2.1.0" targetFramework="net45" />
|
||||||
<package id="Moq" version="4.1.1309.0919" targetFramework="net45" />
|
<package id="Moq" version="4.1.1309.0919" targetFramework="net45" />
|
||||||
<package id="Newtonsoft.Json" version="10.0.2" targetFramework="net45" />
|
<package id="Newtonsoft.Json" version="12.0.2" targetFramework="net452" />
|
||||||
<package id="NUnit" version="2.6.2" targetFramework="net45" />
|
<package id="NUnit" version="2.6.2" targetFramework="net45" />
|
||||||
<package id="NUnitTestAdapter" version="2.1.1" targetFramework="net45" />
|
<package id="NUnitTestAdapter" version="2.1.1" targetFramework="net45" />
|
||||||
<package id="Owin" version="1.0" targetFramework="net45" />
|
<package id="Owin" version="1.0" targetFramework="net45" />
|
||||||
<package id="Selenium.WebDriver" version="2.32.0" targetFramework="net45" />
|
<package id="Selenium.WebDriver" version="2.32.0" targetFramework="net45" />
|
||||||
<package id="semver" version="1.1.2" targetFramework="net45" />
|
<package id="semver" version="1.1.2" targetFramework="net452" />
|
||||||
<package id="SharpZipLib" version="0.86.0" targetFramework="net45" />
|
<package id="SharpZipLib" version="0.86.0" targetFramework="net45" />
|
||||||
<package id="SqlServerCE" version="4.0.0.1" targetFramework="net45" />
|
<package id="SqlServerCE" version="4.0.0.1" targetFramework="net45" />
|
||||||
<package id="System.Runtime" version="4.3.0" targetFramework="net45" />
|
<package id="System.Runtime" version="4.3.1" targetFramework="net452" />
|
||||||
<package id="System.Runtime.Extensions" version="4.3.0" targetFramework="net45" />
|
<package id="System.Runtime.Extensions" version="4.3.1" targetFramework="net452" />
|
||||||
<package id="System.Runtime.InteropServices" version="4.3.0" targetFramework="net45" />
|
<package id="System.Runtime.InteropServices" version="4.3.0" targetFramework="net452" />
|
||||||
<package id="System.Text.RegularExpressions" version="4.3.0" targetFramework="net45" />
|
<package id="System.Text.RegularExpressions" version="4.3.1" targetFramework="net452" />
|
||||||
</packages>
|
</packages>
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
"jquery-migrate": "1.4.0",
|
"jquery-migrate": "1.4.0",
|
||||||
"angular-dynamic-locale": "0.1.28",
|
"angular-dynamic-locale": "0.1.28",
|
||||||
"ng-file-upload": "~7.3.8",
|
"ng-file-upload": "~7.3.8",
|
||||||
"tinymce": "~4.7.1",
|
"tinymce": "~4.9.4",
|
||||||
"codemirror": "~5.3.0",
|
"codemirror": "~5.3.0",
|
||||||
"angular-local-storage": "~0.2.3",
|
"angular-local-storage": "~0.2.3",
|
||||||
"moment": "~2.10.3",
|
"moment": "~2.10.3",
|
||||||
|
|||||||
+11
-30
@@ -4146,8 +4146,7 @@
|
|||||||
"ansi-regex": {
|
"ansi-regex": {
|
||||||
"version": "2.1.1",
|
"version": "2.1.1",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true
|
||||||
"optional": true
|
|
||||||
},
|
},
|
||||||
"aproba": {
|
"aproba": {
|
||||||
"version": "1.2.0",
|
"version": "1.2.0",
|
||||||
@@ -4168,14 +4167,12 @@
|
|||||||
"balanced-match": {
|
"balanced-match": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true
|
||||||
"optional": true
|
|
||||||
},
|
},
|
||||||
"brace-expansion": {
|
"brace-expansion": {
|
||||||
"version": "1.1.11",
|
"version": "1.1.11",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"optional": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"balanced-match": "^1.0.0",
|
"balanced-match": "^1.0.0",
|
||||||
"concat-map": "0.0.1"
|
"concat-map": "0.0.1"
|
||||||
@@ -4190,20 +4187,17 @@
|
|||||||
"code-point-at": {
|
"code-point-at": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true
|
||||||
"optional": true
|
|
||||||
},
|
},
|
||||||
"concat-map": {
|
"concat-map": {
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true
|
||||||
"optional": true
|
|
||||||
},
|
},
|
||||||
"console-control-strings": {
|
"console-control-strings": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true
|
||||||
"optional": true
|
|
||||||
},
|
},
|
||||||
"core-util-is": {
|
"core-util-is": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
@@ -4320,8 +4314,7 @@
|
|||||||
"inherits": {
|
"inherits": {
|
||||||
"version": "2.0.3",
|
"version": "2.0.3",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true
|
||||||
"optional": true
|
|
||||||
},
|
},
|
||||||
"ini": {
|
"ini": {
|
||||||
"version": "1.3.5",
|
"version": "1.3.5",
|
||||||
@@ -4333,7 +4326,6 @@
|
|||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"optional": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"number-is-nan": "^1.0.0"
|
"number-is-nan": "^1.0.0"
|
||||||
}
|
}
|
||||||
@@ -4348,7 +4340,6 @@
|
|||||||
"version": "3.0.4",
|
"version": "3.0.4",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"optional": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"brace-expansion": "^1.1.7"
|
"brace-expansion": "^1.1.7"
|
||||||
}
|
}
|
||||||
@@ -4356,14 +4347,12 @@
|
|||||||
"minimist": {
|
"minimist": {
|
||||||
"version": "0.0.8",
|
"version": "0.0.8",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true
|
||||||
"optional": true
|
|
||||||
},
|
},
|
||||||
"minipass": {
|
"minipass": {
|
||||||
"version": "2.2.4",
|
"version": "2.2.4",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"optional": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"safe-buffer": "^5.1.1",
|
"safe-buffer": "^5.1.1",
|
||||||
"yallist": "^3.0.0"
|
"yallist": "^3.0.0"
|
||||||
@@ -4382,7 +4371,6 @@
|
|||||||
"version": "0.5.1",
|
"version": "0.5.1",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"optional": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"minimist": "0.0.8"
|
"minimist": "0.0.8"
|
||||||
}
|
}
|
||||||
@@ -4463,8 +4451,7 @@
|
|||||||
"number-is-nan": {
|
"number-is-nan": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true
|
||||||
"optional": true
|
|
||||||
},
|
},
|
||||||
"object-assign": {
|
"object-assign": {
|
||||||
"version": "4.1.1",
|
"version": "4.1.1",
|
||||||
@@ -4476,7 +4463,6 @@
|
|||||||
"version": "1.4.0",
|
"version": "1.4.0",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"optional": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"wrappy": "1"
|
"wrappy": "1"
|
||||||
}
|
}
|
||||||
@@ -4562,8 +4548,7 @@
|
|||||||
"safe-buffer": {
|
"safe-buffer": {
|
||||||
"version": "5.1.1",
|
"version": "5.1.1",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true
|
||||||
"optional": true
|
|
||||||
},
|
},
|
||||||
"safer-buffer": {
|
"safer-buffer": {
|
||||||
"version": "2.1.2",
|
"version": "2.1.2",
|
||||||
@@ -4599,7 +4584,6 @@
|
|||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"optional": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"code-point-at": "^1.0.0",
|
"code-point-at": "^1.0.0",
|
||||||
"is-fullwidth-code-point": "^1.0.0",
|
"is-fullwidth-code-point": "^1.0.0",
|
||||||
@@ -4619,7 +4603,6 @@
|
|||||||
"version": "3.0.1",
|
"version": "3.0.1",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"optional": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"ansi-regex": "^2.0.0"
|
"ansi-regex": "^2.0.0"
|
||||||
}
|
}
|
||||||
@@ -4663,14 +4646,12 @@
|
|||||||
"wrappy": {
|
"wrappy": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true
|
||||||
"optional": true
|
|
||||||
},
|
},
|
||||||
"yallist": {
|
"yallist": {
|
||||||
"version": "3.0.2",
|
"version": "3.0.2",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true
|
||||||
"optional": true
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
+5
-1
@@ -266,7 +266,11 @@ function umbTreeDirective($compile, $log, $q, $rootScope, treeService, notificat
|
|||||||
treeService.syncTree({
|
treeService.syncTree({
|
||||||
node: treeNode,
|
node: treeNode,
|
||||||
path: path,
|
path: path,
|
||||||
forceReload: forceReload
|
forceReload: forceReload,
|
||||||
|
//when the tree node is expanding during sync tree, handle it and raise appropriate events
|
||||||
|
treeNodeExpanded: function (args) {
|
||||||
|
emitEvent("treeNodeExpanded", { tree: scope.tree, node: args.node, children: args.children });
|
||||||
|
}
|
||||||
}).then(function (data) {
|
}).then(function (data) {
|
||||||
|
|
||||||
if (activate === undefined || activate === true) {
|
if (activate === undefined || activate === true) {
|
||||||
|
|||||||
+4
-4
@@ -12,7 +12,7 @@ function treeSearchBox(localizationService, searchService, $q) {
|
|||||||
searchFromName: "@",
|
searchFromName: "@",
|
||||||
showSearch: "@",
|
showSearch: "@",
|
||||||
section: "@",
|
section: "@",
|
||||||
ignoreUserStartNodes: "@",
|
datatypeId: "@",
|
||||||
hideSearchCallback: "=",
|
hideSearchCallback: "=",
|
||||||
searchCallback: "="
|
searchCallback: "="
|
||||||
},
|
},
|
||||||
@@ -62,9 +62,9 @@ function treeSearchBox(localizationService, searchService, $q) {
|
|||||||
searchArgs["searchFrom"] = scope.searchFromId;
|
searchArgs["searchFrom"] = scope.searchFromId;
|
||||||
}
|
}
|
||||||
|
|
||||||
//append ignoreUserStartNodes value if there is one
|
//append dataTypeId value if there is one
|
||||||
if (scope.ignoreUserStartNodes) {
|
if (scope.datatypeId) {
|
||||||
searchArgs["ignoreUserStartNodes"] = scope.ignoreUserStartNodes;
|
searchArgs["dataTypeId"] = scope.datatypeId;
|
||||||
}
|
}
|
||||||
|
|
||||||
searcher(searchArgs).then(function (data) {
|
searcher(searchArgs).then(function (data) {
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -160,6 +160,40 @@ function entityResource($q, $http, umbRequestHelper) {
|
|||||||
'Failed to retrieve entity data for id ' + id);
|
'Failed to retrieve entity data for id ' + id);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
getUrlAndAnchors: function (id) {
|
||||||
|
|
||||||
|
if (id === -1 || id === "-1") {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return umbRequestHelper.resourcePromise(
|
||||||
|
$http.get(
|
||||||
|
umbRequestHelper.getApiUrl(
|
||||||
|
"entityApiBaseUrl",
|
||||||
|
"GetUrlAndAnchors",
|
||||||
|
[{ id: id }])),
|
||||||
|
'Failed to retrieve url and anchors data for id ' + id);
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
getAnchors: function (rteContent) {
|
||||||
|
|
||||||
|
if (!rteContent || rteContent.length === 0) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
return umbRequestHelper.resourcePromise(
|
||||||
|
$http.post(
|
||||||
|
umbRequestHelper.getApiUrl(
|
||||||
|
"entityApiBaseUrl",
|
||||||
|
'GetAnchors'),
|
||||||
|
{
|
||||||
|
rteContent: rteContent
|
||||||
|
}),
|
||||||
|
'Failed to anchors data for rte content ' + rteContent);
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ngdoc method
|
* @ngdoc method
|
||||||
* @name umbraco.resources.entityResource#getByIds
|
* @name umbraco.resources.entityResource#getByIds
|
||||||
@@ -293,27 +327,21 @@ function entityResource($q, $http, umbRequestHelper) {
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
getAncestors: function (id, type, options) {
|
getAncestors: function (id, type, options) {
|
||||||
var defaults = {
|
|
||||||
ignoreUserStartNodes: false
|
var args = [
|
||||||
};
|
{ id: id },
|
||||||
if (options === undefined) {
|
{ type: type }
|
||||||
options = {};
|
];
|
||||||
|
if (options && options.dataTypeId) {
|
||||||
|
args.push({ dataTypeId: options.dataTypeId });
|
||||||
}
|
}
|
||||||
//overwrite the defaults if there are any specified
|
|
||||||
angular.extend(defaults, options);
|
|
||||||
//now copy back to the options we will use
|
|
||||||
options = defaults;
|
|
||||||
|
|
||||||
return umbRequestHelper.resourcePromise(
|
return umbRequestHelper.resourcePromise(
|
||||||
$http.get(
|
$http.get(
|
||||||
umbRequestHelper.getApiUrl(
|
umbRequestHelper.getApiUrl(
|
||||||
"entityApiBaseUrl",
|
"entityApiBaseUrl",
|
||||||
"GetAncestors",
|
"GetAncestors",
|
||||||
[
|
args)),
|
||||||
{ id: id },
|
|
||||||
{ type: type },
|
|
||||||
{ ignoreUserStartNodes: options.ignoreUserStartNodes }
|
|
||||||
])),
|
|
||||||
'Failed to retrieve ancestor data for id ' + id);
|
'Failed to retrieve ancestor data for id ' + id);
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -330,14 +358,19 @@ function entityResource($q, $http, umbRequestHelper) {
|
|||||||
* @returns {Promise} resourcePromise object containing the entity.
|
* @returns {Promise} resourcePromise object containing the entity.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
getChildren: function (id, type) {
|
getChildren: function (id, type, options) {
|
||||||
|
|
||||||
|
var args = [{ id: id }, { type: type }];
|
||||||
|
if (options && options.dataTypeId) {
|
||||||
|
args.push({ dataTypeId: options.dataTypeId });
|
||||||
|
}
|
||||||
|
|
||||||
return umbRequestHelper.resourcePromise(
|
return umbRequestHelper.resourcePromise(
|
||||||
$http.get(
|
$http.get(
|
||||||
umbRequestHelper.getApiUrl(
|
umbRequestHelper.getApiUrl(
|
||||||
"entityApiBaseUrl",
|
"entityApiBaseUrl",
|
||||||
"GetChildren",
|
"GetChildren",
|
||||||
[{ id: id }, { type: type }])),
|
args)),
|
||||||
'Failed to retrieve child data for id ' + id);
|
'Failed to retrieve child data for id ' + id);
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -376,7 +409,8 @@ function entityResource($q, $http, umbRequestHelper) {
|
|||||||
pageNumber: 100,
|
pageNumber: 100,
|
||||||
filter: '',
|
filter: '',
|
||||||
orderDirection: "Ascending",
|
orderDirection: "Ascending",
|
||||||
orderBy: "SortOrder"
|
orderBy: "SortOrder",
|
||||||
|
dataTypeId: null
|
||||||
};
|
};
|
||||||
if (options === undefined) {
|
if (options === undefined) {
|
||||||
options = {};
|
options = {};
|
||||||
@@ -393,6 +427,7 @@ function entityResource($q, $http, umbRequestHelper) {
|
|||||||
options.orderDirection = "Descending";
|
options.orderDirection = "Descending";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return umbRequestHelper.resourcePromise(
|
return umbRequestHelper.resourcePromise(
|
||||||
$http.get(
|
$http.get(
|
||||||
umbRequestHelper.getApiUrl(
|
umbRequestHelper.getApiUrl(
|
||||||
@@ -405,7 +440,8 @@ function entityResource($q, $http, umbRequestHelper) {
|
|||||||
pageSize: options.pageSize,
|
pageSize: options.pageSize,
|
||||||
orderBy: options.orderBy,
|
orderBy: options.orderBy,
|
||||||
orderDirection: options.orderDirection,
|
orderDirection: options.orderDirection,
|
||||||
filter: encodeURIComponent(options.filter)
|
filter: encodeURIComponent(options.filter),
|
||||||
|
dataTypeId: options.dataTypeId
|
||||||
}
|
}
|
||||||
)),
|
)),
|
||||||
'Failed to retrieve child data for id ' + parentId);
|
'Failed to retrieve child data for id ' + parentId);
|
||||||
@@ -447,7 +483,7 @@ function entityResource($q, $http, umbRequestHelper) {
|
|||||||
filter: '',
|
filter: '',
|
||||||
orderDirection: "Ascending",
|
orderDirection: "Ascending",
|
||||||
orderBy: "SortOrder",
|
orderBy: "SortOrder",
|
||||||
ignoreUserStartNodes: false
|
dataTypeId: null
|
||||||
};
|
};
|
||||||
if (options === undefined) {
|
if (options === undefined) {
|
||||||
options = {};
|
options = {};
|
||||||
@@ -477,12 +513,13 @@ function entityResource($q, $http, umbRequestHelper) {
|
|||||||
orderBy: options.orderBy,
|
orderBy: options.orderBy,
|
||||||
orderDirection: options.orderDirection,
|
orderDirection: options.orderDirection,
|
||||||
filter: encodeURIComponent(options.filter),
|
filter: encodeURIComponent(options.filter),
|
||||||
ignoreUserStartNodes: options.ignoreUserStartNodes
|
dataTypeId: options.dataTypeId
|
||||||
}
|
}
|
||||||
)),
|
)),
|
||||||
'Failed to retrieve child data for id ' + parentId);
|
'Failed to retrieve child data for id ' + parentId);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ngdoc method
|
* @ngdoc method
|
||||||
* @name umbraco.resources.entityResource#search
|
* @name umbraco.resources.entityResource#search
|
||||||
@@ -505,19 +542,16 @@ function entityResource($q, $http, umbRequestHelper) {
|
|||||||
* @returns {Promise} resourcePromise object containing the entity array.
|
* @returns {Promise} resourcePromise object containing the entity array.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
search: function (query, type, options, canceler) {
|
search: function (query, type, searchFrom, canceler, dataTypeId) {
|
||||||
|
|
||||||
var defaults = {
|
var args = [{ query: query }, { type: type }];
|
||||||
searchFrom: null,
|
if (searchFrom) {
|
||||||
ignoreUserStartNodes: false
|
args.push({ searchFrom: searchFrom });
|
||||||
};
|
}
|
||||||
if (options === undefined) {
|
|
||||||
options = {};
|
if (dataTypeId) {
|
||||||
|
args.push({ dataTypeId: dataTypeId });
|
||||||
}
|
}
|
||||||
//overwrite the defaults if there are any specified
|
|
||||||
angular.extend(defaults, options);
|
|
||||||
//now copy back to the options we will use
|
|
||||||
options = defaults;
|
|
||||||
|
|
||||||
var httpConfig = {};
|
var httpConfig = {};
|
||||||
if (canceler) {
|
if (canceler) {
|
||||||
@@ -529,12 +563,7 @@ function entityResource($q, $http, umbRequestHelper) {
|
|||||||
umbRequestHelper.getApiUrl(
|
umbRequestHelper.getApiUrl(
|
||||||
"entityApiBaseUrl",
|
"entityApiBaseUrl",
|
||||||
"Search",
|
"Search",
|
||||||
{
|
args),
|
||||||
query: query,
|
|
||||||
type: type,
|
|
||||||
searchFrom: options.searchFrom,
|
|
||||||
ignoreUserStartNodes: options.ignoreUserStartNodes
|
|
||||||
}),
|
|
||||||
httpConfig),
|
httpConfig),
|
||||||
'Failed to retrieve entity data for query ' + query);
|
'Failed to retrieve entity data for query ' + query);
|
||||||
},
|
},
|
||||||
@@ -578,6 +607,8 @@ function entityResource($q, $http, umbRequestHelper) {
|
|||||||
'Failed to retrieve entity data for query ' + query);
|
'Failed to retrieve entity data for query ' + query);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
/**
|
/**
|
||||||
* @ngdoc service
|
* @ngdoc service
|
||||||
* @name umbraco.resources.mediaResource
|
* @name umbraco.resources.mediaResource
|
||||||
* @description Loads in data for media
|
* @description Loads in data for media
|
||||||
**/
|
**/
|
||||||
function mediaResource($q, $http, umbDataFormatter, umbRequestHelper) {
|
function mediaResource($q, $http, umbDataFormatter, umbRequestHelper) {
|
||||||
|
|
||||||
/** internal method process the saving of data and post processing the result */
|
/** internal method process the saving of data and post processing the result */
|
||||||
function saveMediaItem(content, action, files) {
|
function saveMediaItem(content, action, files) {
|
||||||
return umbRequestHelper.postSaveContent({
|
return umbRequestHelper.postSaveContent({
|
||||||
restApiUrl: umbRequestHelper.getApiUrl(
|
restApiUrl: umbRequestHelper.getApiUrl(
|
||||||
"mediaApiBaseUrl",
|
"mediaApiBaseUrl",
|
||||||
"PostSave"),
|
"PostSave"),
|
||||||
content: content,
|
content: content,
|
||||||
action: action,
|
action: action,
|
||||||
files: files,
|
files: files,
|
||||||
@@ -24,35 +24,35 @@ function mediaResource($q, $http, umbDataFormatter, umbRequestHelper) {
|
|||||||
|
|
||||||
getRecycleBin: function () {
|
getRecycleBin: function () {
|
||||||
return umbRequestHelper.resourcePromise(
|
return umbRequestHelper.resourcePromise(
|
||||||
$http.get(
|
$http.get(
|
||||||
umbRequestHelper.getApiUrl(
|
umbRequestHelper.getApiUrl(
|
||||||
"mediaApiBaseUrl",
|
"mediaApiBaseUrl",
|
||||||
"GetRecycleBin")),
|
"GetRecycleBin")),
|
||||||
'Failed to retrieve data for media recycle bin');
|
'Failed to retrieve data for media recycle bin');
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ngdoc method
|
* @ngdoc method
|
||||||
* @name umbraco.resources.mediaResource#sort
|
* @name umbraco.resources.mediaResource#sort
|
||||||
* @methodOf umbraco.resources.mediaResource
|
* @methodOf umbraco.resources.mediaResource
|
||||||
*
|
*
|
||||||
* @description
|
* @description
|
||||||
* Sorts all children below a given parent node id, based on a collection of node-ids
|
* Sorts all children below a given parent node id, based on a collection of node-ids
|
||||||
*
|
*
|
||||||
* ##usage
|
* ##usage
|
||||||
* <pre>
|
* <pre>
|
||||||
* var ids = [123,34533,2334,23434];
|
* var ids = [123,34533,2334,23434];
|
||||||
* mediaResource.sort({ sortedIds: ids })
|
* mediaResource.sort({ sortedIds: ids })
|
||||||
* .then(function() {
|
* .then(function() {
|
||||||
* $scope.complete = true;
|
* $scope.complete = true;
|
||||||
* });
|
* });
|
||||||
* </pre>
|
* </pre>
|
||||||
* @param {Object} args arguments object
|
* @param {Object} args arguments object
|
||||||
* @param {Int} args.parentId the ID of the parent node
|
* @param {Int} args.parentId the ID of the parent node
|
||||||
* @param {Array} options.sortedIds array of node IDs as they should be sorted
|
* @param {Array} options.sortedIds array of node IDs as they should be sorted
|
||||||
* @returns {Promise} resourcePromise object.
|
* @returns {Promise} resourcePromise object.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
sort: function (args) {
|
sort: function (args) {
|
||||||
if (!args) {
|
if (!args) {
|
||||||
throw "args cannot be null";
|
throw "args cannot be null";
|
||||||
@@ -65,37 +65,37 @@ function mediaResource($q, $http, umbDataFormatter, umbRequestHelper) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return umbRequestHelper.resourcePromise(
|
return umbRequestHelper.resourcePromise(
|
||||||
$http.post(umbRequestHelper.getApiUrl("mediaApiBaseUrl", "PostSort"),
|
$http.post(umbRequestHelper.getApiUrl("mediaApiBaseUrl", "PostSort"),
|
||||||
{
|
{
|
||||||
parentId: args.parentId,
|
parentId: args.parentId,
|
||||||
idSortOrder: args.sortedIds
|
idSortOrder: args.sortedIds
|
||||||
}),
|
}),
|
||||||
'Failed to sort media');
|
'Failed to sort media');
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ngdoc method
|
* @ngdoc method
|
||||||
* @name umbraco.resources.mediaResource#move
|
* @name umbraco.resources.mediaResource#move
|
||||||
* @methodOf umbraco.resources.mediaResource
|
* @methodOf umbraco.resources.mediaResource
|
||||||
*
|
*
|
||||||
* @description
|
* @description
|
||||||
* Moves a node underneath a new parentId
|
* Moves a node underneath a new parentId
|
||||||
*
|
*
|
||||||
* ##usage
|
* ##usage
|
||||||
* <pre>
|
* <pre>
|
||||||
* mediaResource.move({ parentId: 1244, id: 123 })
|
* mediaResource.move({ parentId: 1244, id: 123 })
|
||||||
* .then(function() {
|
* .then(function() {
|
||||||
* alert("node was moved");
|
* alert("node was moved");
|
||||||
* }, function(err){
|
* }, function(err){
|
||||||
* alert("node didnt move:" + err.data.Message);
|
* alert("node didnt move:" + err.data.Message);
|
||||||
* });
|
* });
|
||||||
* </pre>
|
* </pre>
|
||||||
* @param {Object} args arguments object
|
* @param {Object} args arguments object
|
||||||
* @param {Int} args.idd the ID of the node to move
|
* @param {Int} args.idd the ID of the node to move
|
||||||
* @param {Int} args.parentId the ID of the parent node to move to
|
* @param {Int} args.parentId the ID of the parent node to move to
|
||||||
* @returns {Promise} resourcePromise object.
|
* @returns {Promise} resourcePromise object.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
move: function (args) {
|
move: function (args) {
|
||||||
if (!args) {
|
if (!args) {
|
||||||
throw "args cannot be null";
|
throw "args cannot be null";
|
||||||
@@ -108,121 +108,121 @@ function mediaResource($q, $http, umbDataFormatter, umbRequestHelper) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return umbRequestHelper.resourcePromise(
|
return umbRequestHelper.resourcePromise(
|
||||||
$http.post(umbRequestHelper.getApiUrl("mediaApiBaseUrl", "PostMove"),
|
$http.post(umbRequestHelper.getApiUrl("mediaApiBaseUrl", "PostMove"),
|
||||||
{
|
{
|
||||||
parentId: args.parentId,
|
parentId: args.parentId,
|
||||||
id: args.id
|
id: args.id
|
||||||
}),
|
}),
|
||||||
{
|
{
|
||||||
error: function(data){
|
error: function(data){
|
||||||
var errorMsg = 'Failed to move media';
|
var errorMsg = 'Failed to move media';
|
||||||
if (data.id !== undefined && data.parentId !== undefined) {
|
if (data.id !== undefined && data.parentId !== undefined) {
|
||||||
if (data.id === data.parentId) {
|
if (data.id === data.parentId) {
|
||||||
errorMsg = 'Media can\'t be moved into itself';
|
errorMsg = 'Media can\'t be moved into itself';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (data.notifications !== undefined) {
|
else if (data.notifications !== undefined) {
|
||||||
if (data.notifications.length > 0) {
|
if (data.notifications.length > 0) {
|
||||||
if (data.notifications[0].header.length > 0) {
|
if (data.notifications[0].header.length > 0) {
|
||||||
errorMsg = data.notifications[0].header;
|
errorMsg = data.notifications[0].header;
|
||||||
}
|
}
|
||||||
if (data.notifications[0].message.length > 0) {
|
if (data.notifications[0].message.length > 0) {
|
||||||
errorMsg = errorMsg + ": " + data.notifications[0].message;
|
errorMsg = errorMsg + ": " + data.notifications[0].message;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
errorMsg: errorMsg
|
errorMsg: errorMsg
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ngdoc method
|
* @ngdoc method
|
||||||
* @name umbraco.resources.mediaResource#getById
|
* @name umbraco.resources.mediaResource#getById
|
||||||
* @methodOf umbraco.resources.mediaResource
|
* @methodOf umbraco.resources.mediaResource
|
||||||
*
|
*
|
||||||
* @description
|
* @description
|
||||||
* Gets a media item with a given id
|
* Gets a media item with a given id
|
||||||
*
|
*
|
||||||
* ##usage
|
* ##usage
|
||||||
* <pre>
|
* <pre>
|
||||||
* mediaResource.getById(1234)
|
* mediaResource.getById(1234)
|
||||||
* .then(function(media) {
|
* .then(function(media) {
|
||||||
* var myMedia = media;
|
* var myMedia = media;
|
||||||
* alert('its here!');
|
* alert('its here!');
|
||||||
* });
|
* });
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @param {Int} id id of media item to return
|
* @param {Int} id id of media item to return
|
||||||
* @returns {Promise} resourcePromise object containing the media item.
|
* @returns {Promise} resourcePromise object containing the media item.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
getById: function (id) {
|
getById: function (id) {
|
||||||
|
|
||||||
return umbRequestHelper.resourcePromise(
|
return umbRequestHelper.resourcePromise(
|
||||||
$http.get(
|
$http.get(
|
||||||
umbRequestHelper.getApiUrl(
|
umbRequestHelper.getApiUrl(
|
||||||
"mediaApiBaseUrl",
|
"mediaApiBaseUrl",
|
||||||
"GetById",
|
"GetById",
|
||||||
[{ id: id }])),
|
[{ id: id }])),
|
||||||
'Failed to retrieve data for media id ' + id);
|
'Failed to retrieve data for media id ' + id);
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ngdoc method
|
* @ngdoc method
|
||||||
* @name umbraco.resources.mediaResource#deleteById
|
* @name umbraco.resources.mediaResource#deleteById
|
||||||
* @methodOf umbraco.resources.mediaResource
|
* @methodOf umbraco.resources.mediaResource
|
||||||
*
|
*
|
||||||
* @description
|
* @description
|
||||||
* Deletes a media item with a given id
|
* Deletes a media item with a given id
|
||||||
*
|
*
|
||||||
* ##usage
|
* ##usage
|
||||||
* <pre>
|
* <pre>
|
||||||
* mediaResource.deleteById(1234)
|
* mediaResource.deleteById(1234)
|
||||||
* .then(function() {
|
* .then(function() {
|
||||||
* alert('its gone!');
|
* alert('its gone!');
|
||||||
* });
|
* });
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @param {Int} id id of media item to delete
|
* @param {Int} id id of media item to delete
|
||||||
* @returns {Promise} resourcePromise object.
|
* @returns {Promise} resourcePromise object.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
deleteById: function (id) {
|
deleteById: function (id) {
|
||||||
return umbRequestHelper.resourcePromise(
|
return umbRequestHelper.resourcePromise(
|
||||||
$http.post(
|
$http.post(
|
||||||
umbRequestHelper.getApiUrl(
|
umbRequestHelper.getApiUrl(
|
||||||
"mediaApiBaseUrl",
|
"mediaApiBaseUrl",
|
||||||
"DeleteById",
|
"DeleteById",
|
||||||
[{ id: id }])),
|
[{ id: id }])),
|
||||||
'Failed to delete item ' + id);
|
'Failed to delete item ' + id);
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ngdoc method
|
* @ngdoc method
|
||||||
* @name umbraco.resources.mediaResource#getByIds
|
* @name umbraco.resources.mediaResource#getByIds
|
||||||
* @methodOf umbraco.resources.mediaResource
|
* @methodOf umbraco.resources.mediaResource
|
||||||
*
|
*
|
||||||
* @description
|
* @description
|
||||||
* Gets an array of media items, given a collection of ids
|
* Gets an array of media items, given a collection of ids
|
||||||
*
|
*
|
||||||
* ##usage
|
* ##usage
|
||||||
* <pre>
|
* <pre>
|
||||||
* mediaResource.getByIds( [1234,2526,28262])
|
* mediaResource.getByIds( [1234,2526,28262])
|
||||||
* .then(function(mediaArray) {
|
* .then(function(mediaArray) {
|
||||||
* var myDoc = contentArray;
|
* var myDoc = contentArray;
|
||||||
* alert('they are here!');
|
* alert('they are here!');
|
||||||
* });
|
* });
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @param {Array} ids ids of media items to return as an array
|
* @param {Array} ids ids of media items to return as an array
|
||||||
* @returns {Promise} resourcePromise object containing the media items array.
|
* @returns {Promise} resourcePromise object containing the media items array.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
getByIds: function (ids) {
|
getByIds: function (ids) {
|
||||||
|
|
||||||
var idQuery = "";
|
var idQuery = "";
|
||||||
@@ -231,96 +231,96 @@ function mediaResource($q, $http, umbDataFormatter, umbRequestHelper) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
return umbRequestHelper.resourcePromise(
|
return umbRequestHelper.resourcePromise(
|
||||||
$http.get(
|
$http.get(
|
||||||
umbRequestHelper.getApiUrl(
|
umbRequestHelper.getApiUrl(
|
||||||
"mediaApiBaseUrl",
|
"mediaApiBaseUrl",
|
||||||
"GetByIds",
|
"GetByIds",
|
||||||
idQuery)),
|
idQuery)),
|
||||||
'Failed to retrieve data for media ids ' + ids);
|
'Failed to retrieve data for media ids ' + ids);
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ngdoc method
|
* @ngdoc method
|
||||||
* @name umbraco.resources.mediaResource#getScaffold
|
* @name umbraco.resources.mediaResource#getScaffold
|
||||||
* @methodOf umbraco.resources.mediaResource
|
* @methodOf umbraco.resources.mediaResource
|
||||||
*
|
*
|
||||||
* @description
|
* @description
|
||||||
* Returns a scaffold of an empty media item, given the id of the media item to place it underneath and the media type alias.
|
* Returns a scaffold of an empty media item, given the id of the media item to place it underneath and the media type alias.
|
||||||
*
|
*
|
||||||
* - Parent Id must be provided so umbraco knows where to store the media
|
* - Parent Id must be provided so umbraco knows where to store the media
|
||||||
* - Media Type alias must be provided so umbraco knows which properties to put on the media scaffold
|
* - Media Type alias must be provided so umbraco knows which properties to put on the media scaffold
|
||||||
*
|
*
|
||||||
* The scaffold is used to build editors for media that has not yet been populated with data.
|
* The scaffold is used to build editors for media that has not yet been populated with data.
|
||||||
*
|
*
|
||||||
* ##usage
|
* ##usage
|
||||||
* <pre>
|
* <pre>
|
||||||
* mediaResource.getScaffold(1234, 'folder')
|
* mediaResource.getScaffold(1234, 'folder')
|
||||||
* .then(function(scaffold) {
|
* .then(function(scaffold) {
|
||||||
* var myDoc = scaffold;
|
* var myDoc = scaffold;
|
||||||
* myDoc.name = "My new media item";
|
* myDoc.name = "My new media item";
|
||||||
*
|
*
|
||||||
* mediaResource.save(myDoc, true)
|
* mediaResource.save(myDoc, true)
|
||||||
* .then(function(media){
|
* .then(function(media){
|
||||||
* alert("Retrieved, updated and saved again");
|
* alert("Retrieved, updated and saved again");
|
||||||
* });
|
* });
|
||||||
* });
|
* });
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @param {Int} parentId id of media item to return
|
* @param {Int} parentId id of media item to return
|
||||||
* @param {String} alias mediatype alias to base the scaffold on
|
* @param {String} alias mediatype alias to base the scaffold on
|
||||||
* @returns {Promise} resourcePromise object containing the media scaffold.
|
* @returns {Promise} resourcePromise object containing the media scaffold.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
getScaffold: function (parentId, alias) {
|
getScaffold: function (parentId, alias) {
|
||||||
|
|
||||||
return umbRequestHelper.resourcePromise(
|
return umbRequestHelper.resourcePromise(
|
||||||
$http.get(
|
$http.get(
|
||||||
umbRequestHelper.getApiUrl(
|
umbRequestHelper.getApiUrl(
|
||||||
"mediaApiBaseUrl",
|
"mediaApiBaseUrl",
|
||||||
"GetEmpty",
|
"GetEmpty",
|
||||||
[{ contentTypeAlias: alias }, { parentId: parentId }])),
|
[{ contentTypeAlias: alias }, { parentId: parentId }])),
|
||||||
'Failed to retrieve data for empty media item type ' + alias);
|
'Failed to retrieve data for empty media item type ' + alias);
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
rootMedia: function () {
|
rootMedia: function () {
|
||||||
|
|
||||||
return umbRequestHelper.resourcePromise(
|
return umbRequestHelper.resourcePromise(
|
||||||
$http.get(
|
$http.get(
|
||||||
umbRequestHelper.getApiUrl(
|
umbRequestHelper.getApiUrl(
|
||||||
"mediaApiBaseUrl",
|
"mediaApiBaseUrl",
|
||||||
"GetRootMedia")),
|
"GetRootMedia")),
|
||||||
'Failed to retrieve data for root media');
|
'Failed to retrieve data for root media');
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ngdoc method
|
* @ngdoc method
|
||||||
* @name umbraco.resources.mediaResource#getChildren
|
* @name umbraco.resources.mediaResource#getChildren
|
||||||
* @methodOf umbraco.resources.mediaResource
|
* @methodOf umbraco.resources.mediaResource
|
||||||
*
|
*
|
||||||
* @description
|
* @description
|
||||||
* Gets children of a media item with a given id
|
* Gets children of a media item with a given id
|
||||||
*
|
*
|
||||||
* ##usage
|
* ##usage
|
||||||
* <pre>
|
* <pre>
|
||||||
* mediaResource.getChildren(1234, {pageSize: 10, pageNumber: 2})
|
* mediaResource.getChildren(1234, {pageSize: 10, pageNumber: 2})
|
||||||
* .then(function(contentArray) {
|
* .then(function(contentArray) {
|
||||||
* var children = contentArray;
|
* var children = contentArray;
|
||||||
* alert('they are here!');
|
* alert('they are here!');
|
||||||
* });
|
* });
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @param {Int} parentid id of content item to return children of
|
* @param {Int} parentid id of content item to return children of
|
||||||
* @param {Object} options optional options object
|
* @param {Object} options optional options object
|
||||||
* @param {Int} options.pageSize if paging data, number of nodes per page, default = 0
|
* @param {Int} options.pageSize if paging data, number of nodes per page, default = 0
|
||||||
* @param {Int} options.pageNumber if paging data, current page index, default = 0
|
* @param {Int} options.pageNumber if paging data, current page index, default = 0
|
||||||
* @param {String} options.filter if provided, query will only return those with names matching the filter
|
* @param {String} options.filter if provided, query will only return those with names matching the filter
|
||||||
* @param {String} options.orderDirection can be `Ascending` or `Descending` - Default: `Ascending`
|
* @param {String} options.orderDirection can be `Ascending` or `Descending` - Default: `Ascending`
|
||||||
* @param {String} options.orderBy property to order items by, default: `SortOrder`
|
* @param {String} options.orderBy property to order items by, default: `SortOrder`
|
||||||
* @returns {Promise} resourcePromise object containing an array of content items.
|
* @returns {Promise} resourcePromise object containing an array of content items.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
getChildren: function (parentId, options) {
|
getChildren: function (parentId, options) {
|
||||||
|
|
||||||
var defaults = {
|
var defaults = {
|
||||||
@@ -329,8 +329,7 @@ function mediaResource($q, $http, umbDataFormatter, umbRequestHelper) {
|
|||||||
filter: '',
|
filter: '',
|
||||||
orderDirection: "Ascending",
|
orderDirection: "Ascending",
|
||||||
orderBy: "SortOrder",
|
orderBy: "SortOrder",
|
||||||
orderBySystemField: true,
|
orderBySystemField: true
|
||||||
ignoreUserStartNodes: false
|
|
||||||
};
|
};
|
||||||
if (options === undefined) {
|
if (options === undefined) {
|
||||||
options = {};
|
options = {};
|
||||||
@@ -362,111 +361,110 @@ function mediaResource($q, $http, umbDataFormatter, umbRequestHelper) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return umbRequestHelper.resourcePromise(
|
return umbRequestHelper.resourcePromise(
|
||||||
$http.get(
|
$http.get(
|
||||||
umbRequestHelper.getApiUrl(
|
umbRequestHelper.getApiUrl(
|
||||||
"mediaApiBaseUrl",
|
"mediaApiBaseUrl",
|
||||||
"GetChildren",
|
"GetChildren",
|
||||||
[
|
[
|
||||||
{ id: parentId },
|
{ id: parentId },
|
||||||
{ pageNumber: options.pageNumber },
|
{ pageNumber: options.pageNumber },
|
||||||
{ pageSize: options.pageSize },
|
{ pageSize: options.pageSize },
|
||||||
{ orderBy: options.orderBy },
|
{ orderBy: options.orderBy },
|
||||||
{ orderDirection: options.orderDirection },
|
{ orderDirection: options.orderDirection },
|
||||||
{ orderBySystemField: toBool(options.orderBySystemField) },
|
{ orderBySystemField: toBool(options.orderBySystemField) },
|
||||||
{ filter: options.filter },
|
{ filter: options.filter }
|
||||||
{ ignoreUserStartNodes: options.ignoreUserStartNodes }
|
])),
|
||||||
])),
|
'Failed to retrieve children for media item ' + parentId);
|
||||||
'Failed to retrieve children for media item ' + parentId);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ngdoc method
|
* @ngdoc method
|
||||||
* @name umbraco.resources.mediaResource#save
|
* @name umbraco.resources.mediaResource#save
|
||||||
* @methodOf umbraco.resources.mediaResource
|
* @methodOf umbraco.resources.mediaResource
|
||||||
*
|
*
|
||||||
* @description
|
* @description
|
||||||
* Saves changes made to a media item, if the media item is new, the isNew paramater must be passed to force creation
|
* Saves changes made to a media item, if the media item is new, the isNew paramater must be passed to force creation
|
||||||
* if the media item needs to have files attached, they must be provided as the files param and passed separately
|
* if the media item needs to have files attached, they must be provided as the files param and passed separately
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* ##usage
|
* ##usage
|
||||||
* <pre>
|
* <pre>
|
||||||
* mediaResource.getById(1234)
|
* mediaResource.getById(1234)
|
||||||
* .then(function(media) {
|
* .then(function(media) {
|
||||||
* media.name = "I want a new name!";
|
* media.name = "I want a new name!";
|
||||||
* mediaResource.save(media, false)
|
* mediaResource.save(media, false)
|
||||||
* .then(function(media){
|
* .then(function(media){
|
||||||
* alert("Retrieved, updated and saved again");
|
* alert("Retrieved, updated and saved again");
|
||||||
* });
|
* });
|
||||||
* });
|
* });
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @param {Object} media The media item object with changes applied
|
* @param {Object} media The media item object with changes applied
|
||||||
* @param {Bool} isNew set to true to create a new item or to update an existing
|
* @param {Bool} isNew set to true to create a new item or to update an existing
|
||||||
* @param {Array} files collection of files for the media item
|
* @param {Array} files collection of files for the media item
|
||||||
* @returns {Promise} resourcePromise object containing the saved media item.
|
* @returns {Promise} resourcePromise object containing the saved media item.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
save: function (media, isNew, files) {
|
save: function (media, isNew, files) {
|
||||||
return saveMediaItem(media, "save" + (isNew ? "New" : ""), files);
|
return saveMediaItem(media, "save" + (isNew ? "New" : ""), files);
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ngdoc method
|
* @ngdoc method
|
||||||
* @name umbraco.resources.mediaResource#addFolder
|
* @name umbraco.resources.mediaResource#addFolder
|
||||||
* @methodOf umbraco.resources.mediaResource
|
* @methodOf umbraco.resources.mediaResource
|
||||||
*
|
*
|
||||||
* @description
|
* @description
|
||||||
* Shorthand for adding a media item of the type "Folder" under a given parent ID
|
* Shorthand for adding a media item of the type "Folder" under a given parent ID
|
||||||
*
|
*
|
||||||
* ##usage
|
* ##usage
|
||||||
* <pre>
|
* <pre>
|
||||||
* mediaResource.addFolder("My gallery", 1234)
|
* mediaResource.addFolder("My gallery", 1234)
|
||||||
* .then(function(folder) {
|
* .then(function(folder) {
|
||||||
* alert('New folder');
|
* alert('New folder');
|
||||||
* });
|
* });
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @param {string} name Name of the folder to create
|
* @param {string} name Name of the folder to create
|
||||||
* @param {int} parentId Id of the media item to create the folder underneath
|
* @param {int} parentId Id of the media item to create the folder underneath
|
||||||
* @returns {Promise} resourcePromise object.
|
* @returns {Promise} resourcePromise object.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
addFolder: function (name, parentId) {
|
addFolder: function (name, parentId) {
|
||||||
return umbRequestHelper.resourcePromise(
|
return umbRequestHelper.resourcePromise(
|
||||||
$http.post(umbRequestHelper
|
$http.post(umbRequestHelper
|
||||||
.getApiUrl("mediaApiBaseUrl", "PostAddFolder"),
|
.getApiUrl("mediaApiBaseUrl", "PostAddFolder"),
|
||||||
{
|
{
|
||||||
name: name,
|
name: name,
|
||||||
parentId: parentId
|
parentId: parentId
|
||||||
}),
|
}),
|
||||||
'Failed to add folder');
|
'Failed to add folder');
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ngdoc method
|
* @ngdoc method
|
||||||
* @name umbraco.resources.mediaResource#getChildFolders
|
* @name umbraco.resources.mediaResource#getChildFolders
|
||||||
* @methodOf umbraco.resources.mediaResource
|
* @methodOf umbraco.resources.mediaResource
|
||||||
*
|
*
|
||||||
* @description
|
* @description
|
||||||
* Retrieves all media children with types used as folders.
|
* Retrieves all media children with types used as folders.
|
||||||
* Uses the convention of looking for media items with mediaTypes ending in
|
* Uses the convention of looking for media items with mediaTypes ending in
|
||||||
* *Folder so will match "Folder", "bannerFolder", "secureFolder" etc,
|
* *Folder so will match "Folder", "bannerFolder", "secureFolder" etc,
|
||||||
*
|
*
|
||||||
* NOTE: This will return a max of 500 folders, if more is required it needs to be paged
|
* NOTE: This will return a max of 500 folders, if more is required it needs to be paged
|
||||||
*
|
*
|
||||||
* ##usage
|
* ##usage
|
||||||
* <pre>
|
* <pre>
|
||||||
* mediaResource.getChildFolders(1234)
|
* mediaResource.getChildFolders(1234)
|
||||||
* .then(function(data) {
|
* .then(function(data) {
|
||||||
* alert('folders');
|
* alert('folders');
|
||||||
* });
|
* });
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @param {int} parentId Id of the media item to query for child folders
|
* @param {int} parentId Id of the media item to query for child folders
|
||||||
* @returns {Promise} resourcePromise object.
|
* @returns {Promise} resourcePromise object.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
getChildFolders: function (parentId) {
|
getChildFolders: function (parentId) {
|
||||||
if (!parentId) {
|
if (!parentId) {
|
||||||
parentId = -1;
|
parentId = -1;
|
||||||
@@ -474,67 +472,67 @@ function mediaResource($q, $http, umbDataFormatter, umbRequestHelper) {
|
|||||||
|
|
||||||
//NOTE: This will return a max of 500 folders, if more is required it needs to be paged
|
//NOTE: This will return a max of 500 folders, if more is required it needs to be paged
|
||||||
return umbRequestHelper.resourcePromise(
|
return umbRequestHelper.resourcePromise(
|
||||||
$http.get(
|
$http.get(
|
||||||
umbRequestHelper.getApiUrl(
|
umbRequestHelper.getApiUrl(
|
||||||
"mediaApiBaseUrl",
|
"mediaApiBaseUrl",
|
||||||
"GetChildFolders",
|
"GetChildFolders",
|
||||||
{
|
{
|
||||||
id: parentId
|
id: parentId
|
||||||
})),
|
})),
|
||||||
'Failed to retrieve child folders for media item ' + parentId);
|
'Failed to retrieve child folders for media item ' + parentId);
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ngdoc method
|
* @ngdoc method
|
||||||
* @name umbraco.resources.mediaResource#emptyRecycleBin
|
* @name umbraco.resources.mediaResource#emptyRecycleBin
|
||||||
* @methodOf umbraco.resources.mediaResource
|
* @methodOf umbraco.resources.mediaResource
|
||||||
*
|
*
|
||||||
* @description
|
* @description
|
||||||
* Empties the media recycle bin
|
* Empties the media recycle bin
|
||||||
*
|
*
|
||||||
* ##usage
|
* ##usage
|
||||||
* <pre>
|
* <pre>
|
||||||
* mediaResource.emptyRecycleBin()
|
* mediaResource.emptyRecycleBin()
|
||||||
* .then(function() {
|
* .then(function() {
|
||||||
* alert('its empty!');
|
* alert('its empty!');
|
||||||
* });
|
* });
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @returns {Promise} resourcePromise object.
|
* @returns {Promise} resourcePromise object.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
emptyRecycleBin: function () {
|
emptyRecycleBin: function () {
|
||||||
return umbRequestHelper.resourcePromise(
|
return umbRequestHelper.resourcePromise(
|
||||||
$http.post(
|
$http.post(
|
||||||
umbRequestHelper.getApiUrl(
|
umbRequestHelper.getApiUrl(
|
||||||
"mediaApiBaseUrl",
|
"mediaApiBaseUrl",
|
||||||
"EmptyRecycleBin")),
|
"EmptyRecycleBin")),
|
||||||
'Failed to empty the recycle bin');
|
'Failed to empty the recycle bin');
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ngdoc method
|
* @ngdoc method
|
||||||
* @name umbraco.resources.mediaResource#search
|
* @name umbraco.resources.mediaResource#search
|
||||||
* @methodOf umbraco.resources.mediaResource
|
* @methodOf umbraco.resources.mediaResource
|
||||||
*
|
*
|
||||||
* @description
|
* @description
|
||||||
* Paginated search for media items starting on the supplied nodeId
|
* Paginated search for media items starting on the supplied nodeId
|
||||||
*
|
*
|
||||||
* ##usage
|
* ##usage
|
||||||
* <pre>
|
* <pre>
|
||||||
* mediaResource.search("my search", 1, 100, -1)
|
* mediaResource.search("my search", 1, 100, -1)
|
||||||
* .then(function(searchResult) {
|
* .then(function(searchResult) {
|
||||||
* alert('it's here!');
|
* alert('it's here!');
|
||||||
* });
|
* });
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @param {string} query The search query
|
* @param {string} query The search query
|
||||||
* @param {int} pageNumber The page number
|
* @param {int} pageNumber The page number
|
||||||
* @param {int} pageSize The number of media items on a page
|
* @param {int} pageSize The number of media items on a page
|
||||||
* @param {int} searchFrom NodeId to search from (-1 for root)
|
* @param {int} searchFrom NodeId to search from (-1 for root)
|
||||||
* @returns {Promise} resourcePromise object.
|
* @returns {Promise} resourcePromise object.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
search: function (query, pageNumber, pageSize, searchFrom) {
|
search: function (query, pageNumber, pageSize, searchFrom) {
|
||||||
|
|
||||||
var args = [
|
var args = [
|
||||||
@@ -545,12 +543,12 @@ function mediaResource($q, $http, umbDataFormatter, umbRequestHelper) {
|
|||||||
];
|
];
|
||||||
|
|
||||||
return umbRequestHelper.resourcePromise(
|
return umbRequestHelper.resourcePromise(
|
||||||
$http.get(
|
$http.get(
|
||||||
umbRequestHelper.getApiUrl(
|
umbRequestHelper.getApiUrl(
|
||||||
"mediaApiBaseUrl",
|
"mediaApiBaseUrl",
|
||||||
"Search",
|
"Search",
|
||||||
args)),
|
args)),
|
||||||
'Failed to retrieve media items for search: ' + query);
|
'Failed to retrieve media items for search: ' + query);
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
* @name umbraco.services.mediaHelper
|
* @name umbraco.services.mediaHelper
|
||||||
* @description A helper object used for dealing with media items
|
* @description A helper object used for dealing with media items
|
||||||
**/
|
**/
|
||||||
function mediaHelper(umbRequestHelper) {
|
function mediaHelper(umbRequestHelper, $log) {
|
||||||
|
|
||||||
//container of fileresolvers
|
//container of fileresolvers
|
||||||
var _mediaFileResolvers = {};
|
var _mediaFileResolvers = {};
|
||||||
@@ -141,29 +141,25 @@ function mediaHelper(umbRequestHelper) {
|
|||||||
* @param {object} mediaEntity A media Entity returned from the entityResource
|
* @param {object} mediaEntity A media Entity returned from the entityResource
|
||||||
* @param {boolean} thumbnail Whether to return the thumbnail url or normal url
|
* @param {boolean} thumbnail Whether to return the thumbnail url or normal url
|
||||||
*/
|
*/
|
||||||
resolveFileFromEntity : function(mediaEntity, thumbnail) {
|
resolveFileFromEntity: function (mediaEntity, thumbnail) {
|
||||||
|
|
||||||
if (!angular.isObject(mediaEntity.metaData)) {
|
if (!angular.isObject(mediaEntity.metaData) || !mediaEntity.metaData.MediaPath) {
|
||||||
throw "Cannot resolve the file url from the mediaEntity, it does not contain the required metaData";
|
//don't throw since this image legitimately might not contain a media path, but output a warning
|
||||||
|
$log.warn("Cannot resolve the file url from the mediaEntity, it does not contain the required metaData");
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
var values = _.values(mediaEntity.metaData);
|
if (thumbnail) {
|
||||||
for (var i = 0; i < values.length; i++) {
|
if (this.detectIfImageByExtension(mediaEntity.metaData.MediaPath)) {
|
||||||
var val = values[i];
|
return this.getThumbnailFromPath(mediaEntity.metaData.MediaPath);
|
||||||
if (angular.isObject(val) && val.PropertyEditorAlias) {
|
}
|
||||||
for (var resolver in _mediaFileResolvers) {
|
else {
|
||||||
if (val.PropertyEditorAlias === resolver) {
|
return null;
|
||||||
//we need to format a property variable that coincides with how the property would be structured
|
|
||||||
// if it came from the mediaResource just to keep things slightly easier for the file resolvers.
|
|
||||||
var property = { value: val.Value };
|
|
||||||
|
|
||||||
return _mediaFileResolvers[resolver](property, mediaEntity, thumbnail);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
return "";
|
return mediaEntity.metaData.MediaPath;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -42,11 +42,7 @@ angular.module('umbraco.services')
|
|||||||
throw "args.term is required";
|
throw "args.term is required";
|
||||||
}
|
}
|
||||||
|
|
||||||
var options = {
|
return entityResource.search(args.term, "Member", args.searchFrom).then(function (data) {
|
||||||
searchFrom: args.searchFrom
|
|
||||||
}
|
|
||||||
|
|
||||||
return entityResource.search(args.term, "Member", options).then(function (data) {
|
|
||||||
_.each(data, function (item) {
|
_.each(data, function (item) {
|
||||||
searchResultFormatter.configureMemberResult(item);
|
searchResultFormatter.configureMemberResult(item);
|
||||||
});
|
});
|
||||||
@@ -71,12 +67,7 @@ angular.module('umbraco.services')
|
|||||||
throw "args.term is required";
|
throw "args.term is required";
|
||||||
}
|
}
|
||||||
|
|
||||||
var options = {
|
return entityResource.search(args.term, "Document", args.searchFrom, args.canceler, args.dataTypeId).then(function (data) {
|
||||||
searchFrom: args.searchFrom,
|
|
||||||
ignoreUserStartNodes: args.ignoreUserStartNodes
|
|
||||||
}
|
|
||||||
|
|
||||||
return entityResource.search(args.term, "Document", options, args.canceler).then(function (data) {
|
|
||||||
_.each(data, function (item) {
|
_.each(data, function (item) {
|
||||||
searchResultFormatter.configureContentResult(item);
|
searchResultFormatter.configureContentResult(item);
|
||||||
});
|
});
|
||||||
@@ -101,12 +92,7 @@ angular.module('umbraco.services')
|
|||||||
throw "args.term is required";
|
throw "args.term is required";
|
||||||
}
|
}
|
||||||
|
|
||||||
var options = {
|
return entityResource.search(args.term, "Media", args.searchFrom, args.canceler, args.dataTypeId).then(function (data) {
|
||||||
searchFrom: args.searchFrom,
|
|
||||||
ignoreUserStartNodes: args.ignoreUserStartNodes
|
|
||||||
}
|
|
||||||
|
|
||||||
return entityResource.search(args.term, "Media", options).then(function (data) {
|
|
||||||
_.each(data, function (item) {
|
_.each(data, function (item) {
|
||||||
searchResultFormatter.configureMediaResult(item);
|
searchResultFormatter.configureMediaResult(item);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -749,35 +749,6 @@ function tinyMceService($log, imageHelper, $http, $timeout, macroResource, macro
|
|||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
|
||||||
* @ngdoc method
|
|
||||||
* @name umbraco.services.tinyMceService#getAnchorNames
|
|
||||||
* @methodOf umbraco.services.tinyMceService
|
|
||||||
*
|
|
||||||
* @description
|
|
||||||
* From the given string, generates a string array where each item is the id attribute value from a named anchor
|
|
||||||
* 'some string <a id="anchor"></a>with a named anchor' returns ['anchor']
|
|
||||||
*
|
|
||||||
* @param {string} input the string to parse
|
|
||||||
*/
|
|
||||||
getAnchorNames: function (input) {
|
|
||||||
if (!input) return [];
|
|
||||||
|
|
||||||
var anchorPattern = /<a id=\\"(.*?)\\">/gi;
|
|
||||||
var matches = input.match(anchorPattern);
|
|
||||||
var anchors = [];
|
|
||||||
|
|
||||||
if (matches) {
|
|
||||||
anchors = matches.map(function (v) {
|
|
||||||
return v.substring(v.indexOf('"') + 1, v.lastIndexOf('\\'));
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
return anchors.filter(function(val, i, self) {
|
|
||||||
return self.indexOf(val) === i;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
insertLinkInEditor: function (editor, target, anchorElm) {
|
insertLinkInEditor: function (editor, target, anchorElm) {
|
||||||
|
|
||||||
var href = target.url;
|
var href = target.url;
|
||||||
@@ -836,7 +807,7 @@ function tinyMceService($log, imageHelper, $http, $timeout, macroResource, macro
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!href) {
|
if (!href && !target.anchor) {
|
||||||
editor.execCommand('unlink');
|
editor.execCommand('unlink');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -850,6 +821,10 @@ function tinyMceService($log, imageHelper, $http, $timeout, macroResource, macro
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!href) {
|
||||||
|
href = "";
|
||||||
|
}
|
||||||
|
|
||||||
// Is email and not //user@domain.com and protocol (e.g. mailto:, sip:) is not specified
|
// Is email and not //user@domain.com and protocol (e.g. mailto:, sip:) is not specified
|
||||||
if (href.indexOf('@') > 0 && href.indexOf('//') === -1 && href.indexOf(':') === -1) {
|
if (href.indexOf('@') > 0 && href.indexOf('//') === -1 && href.indexOf(':') === -1) {
|
||||||
// assume it's a mailto link
|
// assume it's a mailto link
|
||||||
|
|||||||
@@ -759,7 +759,14 @@ function treeService($q, treeResource, iconHelper, notificationsService, eventsS
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
//couldn't find it in the
|
//couldn't find it in the
|
||||||
self.loadNodeChildren({ node: node, section: node.section }).then(function () {
|
self.loadNodeChildren({ node: node, section: node.section }).then(function (children) {
|
||||||
|
|
||||||
|
//we've reloaded a portion of the tree, call the callback if one is specified.
|
||||||
|
//TODO: In v8, we can just use deferred.notify
|
||||||
|
if (args.treeNodeExpanded && angular.isFunction(args.treeNodeExpanded)) {
|
||||||
|
args.treeNodeExpanded({ node: node, children: children });
|
||||||
|
}
|
||||||
|
|
||||||
//ok, got the children, let's find it
|
//ok, got the children, let's find it
|
||||||
var found = self.getChildNode(node, args.path[currPathIndex]);
|
var found = self.getChildNode(node, args.path[currPathIndex]);
|
||||||
if (found) {
|
if (found) {
|
||||||
|
|||||||
@@ -327,27 +327,6 @@ li.root > div > a.umb-options {
|
|||||||
div.not-published > i.icon,div.not-published > a{
|
div.not-published > i.icon,div.not-published > a{
|
||||||
opacity: 0.6;
|
opacity: 0.6;
|
||||||
}
|
}
|
||||||
div.protected:before{
|
|
||||||
content:"\e256";
|
|
||||||
font-family: 'icomoon';
|
|
||||||
color: @red;
|
|
||||||
position: absolute;
|
|
||||||
font-size: 20px;
|
|
||||||
padding-left: 7px;
|
|
||||||
padding-top: 7px;
|
|
||||||
bottom: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.has-unpublished-version:before{
|
|
||||||
content:"\e25a";
|
|
||||||
font-family: 'icomoon';
|
|
||||||
color: @green;
|
|
||||||
position: absolute;
|
|
||||||
font-size: 20px;
|
|
||||||
padding-left: 7px;
|
|
||||||
padding-top: 7px;
|
|
||||||
bottom: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.not-allowed > i.icon,div.not-allowed > a{
|
div.not-allowed > i.icon,div.not-allowed > a{
|
||||||
cursor: not-allowed;
|
cursor: not-allowed;
|
||||||
@@ -380,6 +359,29 @@ div.locked:before{
|
|||||||
bottom: 0;
|
bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
div.has-unpublished-version:before {
|
||||||
|
content: "\e25a";
|
||||||
|
font-family: 'icomoon';
|
||||||
|
color: @green;
|
||||||
|
position: absolute;
|
||||||
|
font-size: 20px;
|
||||||
|
padding-left: 7px;
|
||||||
|
padding-top: 7px;
|
||||||
|
bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.protected:before {
|
||||||
|
content: "\e256";
|
||||||
|
font-family: 'icomoon';
|
||||||
|
color: @red;
|
||||||
|
position: absolute;
|
||||||
|
font-size: 20px;
|
||||||
|
padding-left: 7px;
|
||||||
|
padding-top: 7px;
|
||||||
|
bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
.umb-tree li div.no-access .umb-tree-icon,
|
.umb-tree li div.no-access .umb-tree-icon,
|
||||||
.umb-tree li div.no-access .root-link,
|
.umb-tree li div.no-access .root-link,
|
||||||
.umb-tree li div.no-access .umb-tree-item__label {
|
.umb-tree li div.no-access .umb-tree-item__label {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
//used for the media picker dialog
|
//used for the media picker dialog
|
||||||
angular.module("umbraco").controller("Umbraco.Dialogs.LinkPickerController",
|
angular.module("umbraco").controller("Umbraco.Dialogs.LinkPickerController",
|
||||||
function ($scope, eventsService, dialogService, entityResource, contentResource, mediaHelper, userService, localizationService, tinyMceService) {
|
function ($scope, eventsService, dialogService, entityResource, mediaHelper, userService, localizationService, tinyMceService) {
|
||||||
var dialogOptions = $scope.dialogOptions;
|
var dialogOptions = $scope.dialogOptions;
|
||||||
|
|
||||||
var searchText = "Search...";
|
var searchText = "Search...";
|
||||||
@@ -14,6 +14,7 @@ angular.module("umbraco").controller("Umbraco.Dialogs.LinkPickerController",
|
|||||||
searchFromId: null,
|
searchFromId: null,
|
||||||
searchFromName: null,
|
searchFromName: null,
|
||||||
showSearch: false,
|
showSearch: false,
|
||||||
|
dataTypeId: ($scope.model && $scope.model.dataTypeId) ? $scope.model.dataTypeId : null,
|
||||||
results: [],
|
results: [],
|
||||||
selectedSearchResults: []
|
selectedSearchResults: []
|
||||||
}
|
}
|
||||||
@@ -38,10 +39,10 @@ angular.module("umbraco").controller("Umbraco.Dialogs.LinkPickerController",
|
|||||||
}
|
}
|
||||||
|
|
||||||
// if a link exists, get the properties to build the anchor name list
|
// if a link exists, get the properties to build the anchor name list
|
||||||
contentResource.getById(id).then(function (resp) {
|
entityResource.getUrlAndAnchors(id).then(function(resp){
|
||||||
$scope.anchorValues = tinyMceService.getAnchorNames(JSON.stringify(resp.properties));
|
$scope.anchorValues = resp.anchorValues;
|
||||||
$scope.target.url = resp.urls[0];
|
$scope.target.url = resp.url;
|
||||||
});
|
});
|
||||||
} else if ($scope.target.url.length) {
|
} else if ($scope.target.url.length) {
|
||||||
// a url but no id/udi indicates an external link - trim the url to remove the anchor/qs
|
// a url but no id/udi indicates an external link - trim the url to remove the anchor/qs
|
||||||
// only do the substring if there's a # or a ?
|
// only do the substring if there's a # or a ?
|
||||||
@@ -86,10 +87,10 @@ angular.module("umbraco").controller("Umbraco.Dialogs.LinkPickerController",
|
|||||||
if (args.node.id < 0) {
|
if (args.node.id < 0) {
|
||||||
$scope.target.url = "/";
|
$scope.target.url = "/";
|
||||||
} else {
|
} else {
|
||||||
contentResource.getById(args.node.id).then(function (resp) {
|
entityResource.getUrlAndAnchors(args.node.id).then(function(resp){
|
||||||
$scope.anchorValues = tinyMceService.getAnchorNames(JSON.stringify(resp.properties));
|
$scope.anchorValues = resp.anchorValues;
|
||||||
$scope.target.url = resp.urls[0];
|
$scope.target.url = resp.url;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!angular.isUndefined($scope.target.isMedia)) {
|
if (!angular.isUndefined($scope.target.isMedia)) {
|
||||||
@@ -132,7 +133,7 @@ angular.module("umbraco").controller("Umbraco.Dialogs.LinkPickerController",
|
|||||||
$scope.target.id = media.id;
|
$scope.target.id = media.id;
|
||||||
$scope.target.isMedia = true;
|
$scope.target.isMedia = true;
|
||||||
$scope.target.name = media.name;
|
$scope.target.name = media.name;
|
||||||
$scope.target.url = mediaHelper.resolveFile(media);
|
$scope.target.url = media.image;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -43,6 +43,7 @@
|
|||||||
search-callback="onSearchResults"
|
search-callback="onSearchResults"
|
||||||
search-from-id="{{searchInfo.searchFromId}}"
|
search-from-id="{{searchInfo.searchFromId}}"
|
||||||
search-from-name="{{searchInfo.searchFromName}}"
|
search-from-name="{{searchInfo.searchFromName}}"
|
||||||
|
datatype-id="{{searchInfo.dataTypeId}}"
|
||||||
show-search="{{searchInfo.showSearch}}"
|
show-search="{{searchInfo.showSearch}}"
|
||||||
section="{{section}}">
|
section="{{section}}">
|
||||||
</umb-tree-search-box>
|
</umb-tree-search-box>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<div class="umb-panel-body no-header with-footer umb-scrollable" ng-switch on="dialogMode">
|
<div class="umb-panel-body no-header with-footer umb-scrollable" ng-switch on="dialogMode">
|
||||||
<div class="umb-control-group">
|
<div class="umb-control-group">
|
||||||
<div ng-switch-when="list" ng-swicth-default class="tab-content form-horizontal umb-el-wrap">
|
<div ng-switch-when="list" ng-switch-default class="tab-content form-horizontal umb-el-wrap">
|
||||||
<ul class="nav nav-tabs nav-stacked">
|
<ul class="nav nav-tabs nav-stacked">
|
||||||
<li ng-repeat="macro in macros">
|
<li ng-repeat="macro in macros">
|
||||||
<a href="#" ng-click="configureMacro(macro)" prevent-default>
|
<a href="#" ng-click="configureMacro(macro)" prevent-default>
|
||||||
|
|||||||
@@ -80,10 +80,16 @@ angular.module("umbraco")
|
|||||||
}
|
}
|
||||||
|
|
||||||
//mediaResource.rootMedia()
|
//mediaResource.rootMedia()
|
||||||
mediaResource.getChildren(folder.id)
|
entityResource.getChildren(folder.id, "Media")
|
||||||
.then(function(data) {
|
.then(function(data) {
|
||||||
|
for (i=0;i<data.length;i++){
|
||||||
|
if(data[i].metaData.MediaPath){
|
||||||
|
data[i].thumbnail = mediaHelper.resolveFileFromEntity(data[i], true);
|
||||||
|
data[i].image = mediaHelper.resolveFileFromEntity(data[i], false);
|
||||||
|
}
|
||||||
|
}
|
||||||
$scope.searchTerm = "";
|
$scope.searchTerm = "";
|
||||||
$scope.images = data.items ? data.items : [];
|
$scope.images = data ? data : [];
|
||||||
});
|
});
|
||||||
|
|
||||||
$scope.currentFolder = folder;
|
$scope.currentFolder = folder;
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
//used for the media picker dialog
|
//used for the media picker dialog
|
||||||
angular.module("umbraco").controller("Umbraco.Dialogs.TreePickerController",
|
angular.module("umbraco").controller("Umbraco.Dialogs.TreePickerController",
|
||||||
function ($scope, entityResource, eventsService, $log, searchService, angularHelper, $timeout, localizationService, treeService) {
|
function ($scope, entityResource, eventsService, $log, searchService, angularHelper, $timeout, localizationService, treeService) {
|
||||||
|
|
||||||
var tree = null;
|
var tree = null;
|
||||||
var dialogOptions = $scope.dialogOptions;
|
var dialogOptions = $scope.dialogOptions;
|
||||||
$scope.dialogTreeEventHandler = $({});
|
$scope.dialogTreeEventHandler = $({});
|
||||||
$scope.section = dialogOptions.section;
|
$scope.section = dialogOptions.section;
|
||||||
$scope.treeAlias = dialogOptions.treeAlias;
|
$scope.treeAlias = dialogOptions.treeAlias;
|
||||||
$scope.multiPicker = dialogOptions.multiPicker;
|
$scope.multiPicker = dialogOptions.multiPicker;
|
||||||
$scope.hideHeader = (typeof dialogOptions.hideHeader) === "boolean" ? dialogOptions.hideHeader : true;;
|
$scope.hideHeader = (typeof dialogOptions.hideHeader) === "boolean" ? dialogOptions.hideHeader : true;;
|
||||||
$scope.searchInfo = {
|
$scope.searchInfo = {
|
||||||
searchFromId: dialogOptions.startNodeId,
|
searchFromId: dialogOptions.startNodeId,
|
||||||
@@ -17,44 +17,44 @@ angular.module("umbraco").controller("Umbraco.Dialogs.TreePickerController",
|
|||||||
selectedSearchResults: []
|
selectedSearchResults: []
|
||||||
}
|
}
|
||||||
|
|
||||||
//create the custom query string param for this tree
|
//create the custom query string param for this tree
|
||||||
$scope.customTreeParams = dialogOptions.startNodeId ? "startNodeId=" + dialogOptions.startNodeId : "";
|
$scope.customTreeParams = dialogOptions.startNodeId ? "startNodeId=" + dialogOptions.startNodeId : "";
|
||||||
$scope.customTreeParams += dialogOptions.customTreeParams ? "&" + dialogOptions.customTreeParams : "";
|
$scope.customTreeParams += dialogOptions.customTreeParams ? "&" + dialogOptions.customTreeParams : "";
|
||||||
|
|
||||||
var searchText = "Search...";
|
var searchText = "Search...";
|
||||||
localizationService.localize("general_search").then(function (value) {
|
localizationService.localize("general_search").then(function (value) {
|
||||||
searchText = value + "...";
|
searchText = value + "...";
|
||||||
});
|
});
|
||||||
|
|
||||||
// Allow the entity type to be passed in but defaults to Document for backwards compatibility.
|
// Allow the entity type to be passed in but defaults to Document for backwards compatibility.
|
||||||
var entityType = dialogOptions.entityType ? dialogOptions.entityType : "Document";
|
var entityType = dialogOptions.entityType ? dialogOptions.entityType : "Document";
|
||||||
|
|
||||||
|
|
||||||
//min / max values
|
//min / max values
|
||||||
if (dialogOptions.minNumber) {
|
if (dialogOptions.minNumber) {
|
||||||
dialogOptions.minNumber = parseInt(dialogOptions.minNumber, 10);
|
dialogOptions.minNumber = parseInt(dialogOptions.minNumber, 10);
|
||||||
}
|
}
|
||||||
if (dialogOptions.maxNumber) {
|
if (dialogOptions.maxNumber) {
|
||||||
dialogOptions.maxNumber = parseInt(dialogOptions.maxNumber, 10);
|
dialogOptions.maxNumber = parseInt(dialogOptions.maxNumber, 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dialogOptions.section === "member") {
|
if (dialogOptions.section === "member") {
|
||||||
entityType = "Member";
|
entityType = "Member";
|
||||||
}
|
}
|
||||||
else if (dialogOptions.section === "media") {
|
else if (dialogOptions.section === "media") {
|
||||||
entityType = "Media";
|
entityType = "Media";
|
||||||
}
|
}
|
||||||
|
|
||||||
//Configures filtering
|
//Configures filtering
|
||||||
if (dialogOptions.filter) {
|
if (dialogOptions.filter) {
|
||||||
|
|
||||||
dialogOptions.filterExclude = false;
|
dialogOptions.filterExclude = false;
|
||||||
dialogOptions.filterAdvanced = false;
|
dialogOptions.filterAdvanced = false;
|
||||||
|
|
||||||
//used advanced filtering
|
//used advanced filtering
|
||||||
if (angular.isFunction(dialogOptions.filter)) {
|
if (angular.isFunction(dialogOptions.filter)) {
|
||||||
dialogOptions.filterAdvanced = true;
|
dialogOptions.filterAdvanced = true;
|
||||||
}
|
}
|
||||||
else if (angular.isObject(dialogOptions.filter)) {
|
else if (angular.isObject(dialogOptions.filter)) {
|
||||||
dialogOptions.filterAdvanced = true;
|
dialogOptions.filterAdvanced = true;
|
||||||
}
|
}
|
||||||
@@ -71,93 +71,93 @@ angular.module("umbraco").controller("Umbraco.Dialogs.TreePickerController",
|
|||||||
dialogOptions.filter = angular.fromJson(dialogOptions.filter);
|
dialogOptions.filter = angular.fromJson(dialogOptions.filter);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function nodeExpandedHandler(ev, args) {
|
function nodeExpandedHandler(ev, args) {
|
||||||
if (angular.isArray(args.children)) {
|
if (angular.isArray(args.children)) {
|
||||||
|
|
||||||
//iterate children
|
//iterate children
|
||||||
_.each(args.children, function (child) {
|
_.each(args.children, function (child) {
|
||||||
|
|
||||||
//check if any of the items are list views, if so we need to add some custom
|
//check if any of the items are list views, if so we need to add some custom
|
||||||
// children: A node to activate the search, any nodes that have already been
|
// children: A node to activate the search, any nodes that have already been
|
||||||
// selected in the search
|
// selected in the search
|
||||||
if (child.metaData.isContainer) {
|
if (child.metaData.isContainer) {
|
||||||
child.hasChildren = true;
|
child.hasChildren = true;
|
||||||
child.children = [
|
child.children = [
|
||||||
{
|
{
|
||||||
level: child.level + 1,
|
level: child.level + 1,
|
||||||
hasChildren: false,
|
hasChildren: false,
|
||||||
parent: function () {
|
parent: function () {
|
||||||
return child;
|
return child;
|
||||||
},
|
},
|
||||||
name: searchText,
|
name: searchText,
|
||||||
metaData: {
|
metaData: {
|
||||||
listViewNode: child
|
listViewNode: child
|
||||||
},
|
},
|
||||||
cssClass: "icon-search",
|
cssClass: "icon-search",
|
||||||
cssClasses: ["not-published"]
|
cssClasses: ["not-published"]
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
//add base transition classes to this node
|
//add base transition classes to this node
|
||||||
child.cssClasses.push("tree-node-slide-up");
|
child.cssClasses.push("tree-node-slide-up");
|
||||||
|
|
||||||
var listViewResults = _.filter($scope.searchInfo.selectedSearchResults, function(i) {
|
var listViewResults = _.filter($scope.searchInfo.selectedSearchResults, function(i) {
|
||||||
return i.parentId == child.id;
|
return i.parentId == child.id;
|
||||||
});
|
});
|
||||||
_.each(listViewResults, function(item) {
|
_.each(listViewResults, function(item) {
|
||||||
child.children.unshift({
|
child.children.unshift({
|
||||||
id: item.id,
|
id: item.id,
|
||||||
name: item.name,
|
name: item.name,
|
||||||
cssClass: "icon umb-tree-icon sprTree " + item.icon,
|
cssClass: "icon umb-tree-icon sprTree " + item.icon,
|
||||||
level: child.level + 1,
|
level: child.level + 1,
|
||||||
metaData: {
|
metaData: {
|
||||||
isSearchResult: true
|
isSearchResult: true
|
||||||
},
|
},
|
||||||
hasChildren: false,
|
hasChildren: false,
|
||||||
parent: function () {
|
parent: function () {
|
||||||
return child;
|
return child;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
//now we need to look in the already selected search results and
|
//now we need to look in the already selected search results and
|
||||||
// toggle the check boxes for those ones that are listed
|
// toggle the check boxes for those ones that are listed
|
||||||
var exists = _.find($scope.searchInfo.selectedSearchResults, function (selected) {
|
var exists = _.find($scope.searchInfo.selectedSearchResults, function (selected) {
|
||||||
return child.id == selected.id;
|
return child.id == selected.id;
|
||||||
});
|
});
|
||||||
if (exists) {
|
if (exists) {
|
||||||
child.selected = true;
|
child.selected = true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
//check filter
|
//check filter
|
||||||
performFiltering(args.children);
|
performFiltering(args.children);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//gets the tree object when it loads
|
//gets the tree object when it loads
|
||||||
function treeLoadedHandler(ev, args) {
|
function treeLoadedHandler(ev, args) {
|
||||||
tree = args.tree;
|
tree = args.tree;
|
||||||
}
|
}
|
||||||
|
|
||||||
//wires up selection
|
//wires up selection
|
||||||
function nodeSelectHandler(ev, args) {
|
function nodeSelectHandler(ev, args) {
|
||||||
args.event.preventDefault();
|
args.event.preventDefault();
|
||||||
args.event.stopPropagation();
|
args.event.stopPropagation();
|
||||||
|
|
||||||
if (args.node.metaData.listViewNode) {
|
if (args.node.metaData.listViewNode) {
|
||||||
//check if list view 'search' node was selected
|
//check if list view 'search' node was selected
|
||||||
|
|
||||||
$scope.searchInfo.showSearch = true;
|
$scope.searchInfo.showSearch = true;
|
||||||
$scope.searchInfo.searchFromId = args.node.metaData.listViewNode.id;
|
$scope.searchInfo.searchFromId = args.node.metaData.listViewNode.id;
|
||||||
$scope.searchInfo.searchFromName = args.node.metaData.listViewNode.name;
|
$scope.searchInfo.searchFromName = args.node.metaData.listViewNode.name;
|
||||||
|
|
||||||
//add transition classes
|
//add transition classes
|
||||||
var listViewNode = args.node.parent();
|
var listViewNode = args.node.parent();
|
||||||
listViewNode.cssClasses.push('tree-node-slide-up-hide-active');
|
listViewNode.cssClasses.push('tree-node-slide-up-hide-active');
|
||||||
}
|
}
|
||||||
else if (args.node.metaData.isSearchResult) {
|
else if (args.node.metaData.isSearchResult) {
|
||||||
//check if the item selected was a search result from a list view
|
//check if the item selected was a search result from a list view
|
||||||
|
|
||||||
@@ -166,15 +166,15 @@ angular.module("umbraco").controller("Umbraco.Dialogs.TreePickerController",
|
|||||||
|
|
||||||
//remove it from the list view children
|
//remove it from the list view children
|
||||||
var listView = args.node.parent();
|
var listView = args.node.parent();
|
||||||
listView.children = _.reject(listView.children, function(child) {
|
listView.children = _.reject(listView.children, function(child) {
|
||||||
return child.id == args.node.id;
|
return child.id == args.node.id;
|
||||||
});
|
});
|
||||||
|
|
||||||
//remove it from the custom tracked search result list
|
//remove it from the custom tracked search result list
|
||||||
$scope.searchInfo.selectedSearchResults = _.reject($scope.searchInfo.selectedSearchResults, function (i) {
|
$scope.searchInfo.selectedSearchResults = _.reject($scope.searchInfo.selectedSearchResults, function (i) {
|
||||||
return i.id == args.node.id;
|
return i.id == args.node.id;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
eventsService.emit("dialogs.treePickerController.select", args);
|
eventsService.emit("dialogs.treePickerController.select", args);
|
||||||
|
|
||||||
@@ -189,114 +189,114 @@ angular.module("umbraco").controller("Umbraco.Dialogs.TreePickerController",
|
|||||||
//toggle checked state
|
//toggle checked state
|
||||||
args.node.selected = args.node.selected === true ? false : true;
|
args.node.selected = args.node.selected === true ? false : true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Method used for selecting a node */
|
/** Method used for selecting a node */
|
||||||
function select(text, id, entity) {
|
function select(text, id, entity) {
|
||||||
//if we get the root, we just return a constructed entity, no need for server data
|
//if we get the root, we just return a constructed entity, no need for server data
|
||||||
if (id < 0) {
|
if (id < 0) {
|
||||||
if ($scope.multiPicker) {
|
if ($scope.multiPicker) {
|
||||||
$scope.select(id);
|
$scope.select(id);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
var node = {
|
var node = {
|
||||||
alias: null,
|
alias: null,
|
||||||
icon: "icon-folder",
|
icon: "icon-folder",
|
||||||
id: id,
|
id: id,
|
||||||
name: text
|
name: text
|
||||||
};
|
};
|
||||||
$scope.submit(node);
|
$scope.submit(node);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
||||||
if ($scope.multiPicker) {
|
if ($scope.multiPicker) {
|
||||||
$scope.select(Number(id));
|
$scope.select(Number(id));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
||||||
$scope.hideSearch();
|
$scope.hideSearch();
|
||||||
|
|
||||||
//if an entity has been passed in, use it
|
//if an entity has been passed in, use it
|
||||||
if (entity) {
|
if (entity) {
|
||||||
$scope.submit(entity);
|
$scope.submit(entity);
|
||||||
} else {
|
} else {
|
||||||
//otherwise we have to get it from the server
|
//otherwise we have to get it from the server
|
||||||
entityResource.getById(id, entityType).then(function (ent) {
|
entityResource.getById(id, entityType).then(function (ent) {
|
||||||
$scope.submit(ent);
|
$scope.submit(ent);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function performFiltering(nodes) {
|
function performFiltering(nodes) {
|
||||||
|
|
||||||
if (!dialogOptions.filter) {
|
if (!dialogOptions.filter) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//remove any list view search nodes from being filtered since these are special nodes that always must
|
//remove any list view search nodes from being filtered since these are special nodes that always must
|
||||||
// be allowed to be clicked on
|
// be allowed to be clicked on
|
||||||
nodes = _.filter(nodes, function(n) {
|
nodes = _.filter(nodes, function(n) {
|
||||||
return !angular.isObject(n.metaData.listViewNode);
|
return !angular.isObject(n.metaData.listViewNode);
|
||||||
});
|
});
|
||||||
|
|
||||||
if (dialogOptions.filterAdvanced) {
|
if (dialogOptions.filterAdvanced) {
|
||||||
|
|
||||||
//filter either based on a method or an object
|
//filter either based on a method or an object
|
||||||
var filtered = angular.isFunction(dialogOptions.filter)
|
var filtered = angular.isFunction(dialogOptions.filter)
|
||||||
? _.filter(nodes, dialogOptions.filter)
|
? _.filter(nodes, dialogOptions.filter)
|
||||||
: _.where(nodes, dialogOptions.filter);
|
: _.where(nodes, dialogOptions.filter);
|
||||||
|
|
||||||
angular.forEach(filtered, function (value, key) {
|
angular.forEach(filtered, function (value, key) {
|
||||||
value.filtered = true;
|
value.filtered = true;
|
||||||
if (dialogOptions.filterCssClass) {
|
if (dialogOptions.filterCssClass) {
|
||||||
if (!value.cssClasses) {
|
if (!value.cssClasses) {
|
||||||
value.cssClasses = [];
|
value.cssClasses = [];
|
||||||
}
|
}
|
||||||
value.cssClasses.push(dialogOptions.filterCssClass);
|
value.cssClasses.push(dialogOptions.filterCssClass);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
var a = dialogOptions.filter.toLowerCase().replace(/\s/g, '').split(',');
|
var a = dialogOptions.filter.toLowerCase().replace(/\s/g, '').split(',');
|
||||||
angular.forEach(nodes, function (value, key) {
|
angular.forEach(nodes, function (value, key) {
|
||||||
|
|
||||||
var found = a.indexOf(value.metaData.contentType.toLowerCase()) >= 0;
|
var found = a.indexOf(value.metaData.contentType.toLowerCase()) >= 0;
|
||||||
|
|
||||||
if (!dialogOptions.filterExclude && !found || dialogOptions.filterExclude && found) {
|
if (!dialogOptions.filterExclude && !found || dialogOptions.filterExclude && found) {
|
||||||
value.filtered = true;
|
value.filtered = true;
|
||||||
|
|
||||||
if (dialogOptions.filterCssClass) {
|
if (dialogOptions.filterCssClass) {
|
||||||
if (!value.cssClasses) {
|
if (!value.cssClasses) {
|
||||||
value.cssClasses = [];
|
value.cssClasses = [];
|
||||||
}
|
}
|
||||||
value.cssClasses.push(dialogOptions.filterCssClass);
|
value.cssClasses.push(dialogOptions.filterCssClass);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.multiSubmit = function (result) {
|
$scope.multiSubmit = function (result) {
|
||||||
entityResource.getByIds(result, entityType).then(function (ents) {
|
entityResource.getByIds(result, entityType).then(function (ents) {
|
||||||
$scope.submit(ents);
|
$scope.submit(ents);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
/** method to select a search result */
|
/** method to select a search result */
|
||||||
$scope.selectResult = function (evt, result) {
|
$scope.selectResult = function (evt, result) {
|
||||||
|
|
||||||
if (result.filtered) {
|
if (result.filtered) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
result.selected = result.selected === true ? false : true;
|
result.selected = result.selected === true ? false : true;
|
||||||
|
|
||||||
//since result = an entity, we'll pass it in so we don't have to go back to the server
|
//since result = an entity, we'll pass it in so we don't have to go back to the server
|
||||||
select(result.name, result.id, result);
|
select(result.name, result.id, result);
|
||||||
|
|
||||||
//add/remove to our custom tracked list of selected search results
|
//add/remove to our custom tracked list of selected search results
|
||||||
if (result.selected) {
|
if (result.selected) {
|
||||||
$scope.searchInfo.selectedSearchResults.push(result);
|
$scope.searchInfo.selectedSearchResults.push(result);
|
||||||
}
|
}
|
||||||
@@ -306,23 +306,23 @@ angular.module("umbraco").controller("Umbraco.Dialogs.TreePickerController",
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
//ensure the tree node in the tree is checked/unchecked if it already exists there
|
//ensure the tree node in the tree is checked/unchecked if it already exists there
|
||||||
if (tree) {
|
if (tree) {
|
||||||
var found = treeService.getDescendantNode(tree.root, result.id);
|
var found = treeService.getDescendantNode(tree.root, result.id);
|
||||||
if (found) {
|
if (found) {
|
||||||
found.selected = result.selected;
|
found.selected = result.selected;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.hideSearch = function () {
|
$scope.hideSearch = function () {
|
||||||
|
|
||||||
//Traverse the entire displayed tree and update each node to sync with the selected search results
|
//Traverse the entire displayed tree and update each node to sync with the selected search results
|
||||||
if (tree) {
|
if (tree) {
|
||||||
|
|
||||||
//we need to ensure that any currently displayed nodes that get selected
|
//we need to ensure that any currently displayed nodes that get selected
|
||||||
// from the search get updated to have a check box!
|
// from the search get updated to have a check box!
|
||||||
function checkChildren(children) {
|
function checkChildren(children) {
|
||||||
_.each(children, function (child) {
|
_.each(children, function (child) {
|
||||||
//check if the id is in the selection, if so ensure it's flagged as selected
|
//check if the id is in the selection, if so ensure it's flagged as selected
|
||||||
@@ -385,7 +385,7 @@ angular.module("umbraco").controller("Umbraco.Dialogs.TreePickerController",
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
checkChildren(tree.root.children);
|
checkChildren(tree.root.children);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$scope.searchInfo.showSearch = false;
|
$scope.searchInfo.showSearch = false;
|
||||||
@@ -394,38 +394,38 @@ angular.module("umbraco").controller("Umbraco.Dialogs.TreePickerController",
|
|||||||
$scope.searchInfo.results = [];
|
$scope.searchInfo.results = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.onSearchResults = function(results) {
|
$scope.onSearchResults = function(results) {
|
||||||
|
|
||||||
//filter all items - this will mark an item as filtered
|
//filter all items - this will mark an item as filtered
|
||||||
performFiltering(results);
|
performFiltering(results);
|
||||||
|
|
||||||
//now actually remove all filtered items so they are not even displayed
|
//now actually remove all filtered items so they are not even displayed
|
||||||
results = _.filter(results, function(item) {
|
results = _.filter(results, function(item) {
|
||||||
return !item.filtered;
|
return !item.filtered;
|
||||||
});
|
});
|
||||||
|
|
||||||
$scope.searchInfo.results = results;
|
$scope.searchInfo.results = results;
|
||||||
|
|
||||||
//sync with the curr selected results
|
//sync with the curr selected results
|
||||||
_.each($scope.searchInfo.results, function (result) {
|
_.each($scope.searchInfo.results, function (result) {
|
||||||
var exists = _.find($scope.dialogData.selection, function (selectedId) {
|
var exists = _.find($scope.dialogData.selection, function (selectedId) {
|
||||||
return result.id == selectedId;
|
return result.id == selectedId;
|
||||||
});
|
});
|
||||||
if (exists) {
|
if (exists) {
|
||||||
result.selected = true;
|
result.selected = true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$scope.searchInfo.showSearch = true;
|
$scope.searchInfo.showSearch = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.dialogTreeEventHandler.bind("treeLoaded", treeLoadedHandler);
|
$scope.dialogTreeEventHandler.bind("treeLoaded", treeLoadedHandler);
|
||||||
$scope.dialogTreeEventHandler.bind("treeNodeExpanded", nodeExpandedHandler);
|
$scope.dialogTreeEventHandler.bind("treeNodeExpanded", nodeExpandedHandler);
|
||||||
$scope.dialogTreeEventHandler.bind("treeNodeSelect", nodeSelectHandler);
|
$scope.dialogTreeEventHandler.bind("treeNodeSelect", nodeSelectHandler);
|
||||||
|
|
||||||
$scope.$on('$destroy', function () {
|
$scope.$on('$destroy', function () {
|
||||||
$scope.dialogTreeEventHandler.unbind("treeLoaded", treeLoadedHandler);
|
$scope.dialogTreeEventHandler.unbind("treeLoaded", treeLoadedHandler);
|
||||||
$scope.dialogTreeEventHandler.unbind("treeNodeExpanded", nodeExpandedHandler);
|
$scope.dialogTreeEventHandler.unbind("treeNodeExpanded", nodeExpandedHandler);
|
||||||
$scope.dialogTreeEventHandler.unbind("treeNodeSelect", nodeSelectHandler);
|
$scope.dialogTreeEventHandler.unbind("treeNodeSelect", nodeSelectHandler);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
+1
-1
@@ -9,7 +9,7 @@
|
|||||||
search-from-id="{{searchInfo.searchFromId}}"
|
search-from-id="{{searchInfo.searchFromId}}"
|
||||||
search-from-name="{{searchInfo.searchFromName}}"
|
search-from-name="{{searchInfo.searchFromName}}"
|
||||||
show-search="{{searchInfo.showSearch}}"
|
show-search="{{searchInfo.showSearch}}"
|
||||||
ignore-user-startnodes="{{searchInfo.ignoreUserStartNodes}}"
|
datatype-id="{{searchInfo.dataTypeId}}"
|
||||||
section="content">
|
section="content">
|
||||||
</umb-tree-search-box>
|
</umb-tree-search-box>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
+20
-15
@@ -1,6 +1,6 @@
|
|||||||
//used for the media picker dialog
|
//used for the media picker dialog
|
||||||
angular.module("umbraco").controller("Umbraco.Overlays.LinkPickerController",
|
angular.module("umbraco").controller("Umbraco.Overlays.LinkPickerController",
|
||||||
function ($scope, eventsService, dialogService, entityResource, contentResource, mediaHelper, userService, localizationService, tinyMceService) {
|
function ($scope, eventsService, dialogService, entityResource, mediaHelper, userService, localizationService, tinyMceService) {
|
||||||
var dialogOptions = $scope.model;
|
var dialogOptions = $scope.model;
|
||||||
|
|
||||||
var searchText = "Search...";
|
var searchText = "Search...";
|
||||||
@@ -12,43 +12,47 @@ angular.module("umbraco").controller("Umbraco.Overlays.LinkPickerController",
|
|||||||
$scope.model.title = localizationService.localize("defaultdialogs_selectLink");
|
$scope.model.title = localizationService.localize("defaultdialogs_selectLink");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var dataTypeId = null;
|
||||||
|
if(dialogOptions && dialogOptions.dataTypeId){
|
||||||
|
dataTypeId = dialogOptions.dataTypeId;
|
||||||
|
}
|
||||||
|
|
||||||
$scope.dialogTreeEventHandler = $({});
|
$scope.dialogTreeEventHandler = $({});
|
||||||
$scope.model.target = {};
|
$scope.model.target = {};
|
||||||
$scope.searchInfo = {
|
$scope.searchInfo = {
|
||||||
searchFromId: null,
|
searchFromId: null,
|
||||||
searchFromName: null,
|
searchFromName: null,
|
||||||
showSearch: false,
|
showSearch: false,
|
||||||
ignoreUserStartNodes: dialogOptions.ignoreUserStartNodes,
|
dataTypeId: dataTypeId,
|
||||||
results: [],
|
results: [],
|
||||||
selectedSearchResults: []
|
selectedSearchResults: []
|
||||||
};
|
};
|
||||||
$scope.customTreeParams = dialogOptions.ignoreUserStartNodes ? "ignoreUserStartNodes=" + dialogOptions.ignoreUserStartNodes : "";
|
$scope.customTreeParams = dataTypeId !== null ? "dataTypeId=" + dataTypeId : "";
|
||||||
$scope.showTarget = $scope.model.hideTarget !== true;
|
$scope.showTarget = $scope.model.hideTarget !== true;
|
||||||
|
|
||||||
if (dialogOptions.currentTarget) {
|
if (dialogOptions.currentTarget) {
|
||||||
// clone the current target so we don't accidentally update the caller's model while manipulating $scope.model.target
|
// clone the current target so we don't accidentally update the caller's model while manipulating $scope.model.target
|
||||||
$scope.model.target = angular.copy(dialogOptions.currentTarget);
|
$scope.model.target = angular.copy(dialogOptions.currentTarget);
|
||||||
//if we have a node ID, we fetch the current node to build the form data
|
// if we have a node ID, we fetch the current node to build the form data
|
||||||
if ($scope.model.target.id || $scope.model.target.udi) {
|
if ($scope.model.target.id || $scope.model.target.udi) {
|
||||||
|
|
||||||
//will be either a udi or an int
|
// will be either a udi or an int
|
||||||
var id = $scope.model.target.udi ? $scope.model.target.udi : $scope.model.target.id;
|
var id = $scope.model.target.udi ? $scope.model.target.udi : $scope.model.target.id;
|
||||||
|
|
||||||
// is it a content link?
|
// is it a content link?
|
||||||
if (!$scope.model.target.isMedia) {
|
if (!$scope.model.target.isMedia) {
|
||||||
// get the content path
|
// get the content path
|
||||||
entityResource.getPath(id, "Document").then(function (path) {
|
entityResource.getPath(id, "Document").then(function (path) {
|
||||||
//now sync the tree to this path
|
// now sync the tree to this path
|
||||||
$scope.dialogTreeEventHandler.syncTree({
|
$scope.dialogTreeEventHandler.syncTree({
|
||||||
path: path,
|
path: path,
|
||||||
tree: "content"
|
tree: "content"
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// if a link exists, get the properties to build the anchor name list
|
entityResource.getUrlAndAnchors(id).then(function(resp){
|
||||||
contentResource.getById(id, { ignoreUserStartNodes: dialogOptions.ignoreUserStartNodes }).then(function (resp) {
|
$scope.anchorValues = resp.anchorValues;
|
||||||
$scope.model.target.url = resp.urls[0];
|
$scope.model.target.url = resp.url;
|
||||||
$scope.anchorValues = tinyMceService.getAnchorNames(JSON.stringify(resp.properties));
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else if ($scope.model.target.url.length) {
|
} else if ($scope.model.target.url.length) {
|
||||||
@@ -88,9 +92,9 @@ angular.module("umbraco").controller("Umbraco.Overlays.LinkPickerController",
|
|||||||
if (args.node.id < 0) {
|
if (args.node.id < 0) {
|
||||||
$scope.model.target.url = "/";
|
$scope.model.target.url = "/";
|
||||||
} else {
|
} else {
|
||||||
contentResource.getById(args.node.id, { ignoreUserStartNodes: dialogOptions.ignoreUserStartNodes }).then(function (resp) {
|
entityResource.getUrlAndAnchors(args.node.id).then(function(resp){
|
||||||
$scope.model.target.url = resp.urls[0];
|
$scope.anchorValues = resp.anchorValues;
|
||||||
$scope.anchorValues = tinyMceService.getAnchorNames(JSON.stringify(resp.properties));
|
$scope.model.target.url = resp.url;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -115,12 +119,13 @@ angular.module("umbraco").controller("Umbraco.Overlays.LinkPickerController",
|
|||||||
startNodeId = -1;
|
startNodeId = -1;
|
||||||
startNodeIsVirtual = true;
|
startNodeIsVirtual = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.mediaPickerOverlay = {
|
$scope.mediaPickerOverlay = {
|
||||||
view: "mediapicker",
|
view: "mediapicker",
|
||||||
startNodeId: startNodeId,
|
startNodeId: startNodeId,
|
||||||
startNodeIsVirtual: startNodeIsVirtual,
|
startNodeIsVirtual: startNodeIsVirtual,
|
||||||
show: true,
|
show: true,
|
||||||
ignoreUserStartNodes: dialogOptions.ignoreUserStartNodes,
|
dataTypeId: dataTypeId,
|
||||||
submit: function (model) {
|
submit: function (model) {
|
||||||
var media = model.selectedImages[0];
|
var media = model.selectedImages[0];
|
||||||
|
|
||||||
@@ -128,7 +133,7 @@ angular.module("umbraco").controller("Umbraco.Overlays.LinkPickerController",
|
|||||||
$scope.model.target.udi = media.udi;
|
$scope.model.target.udi = media.udi;
|
||||||
$scope.model.target.isMedia = true;
|
$scope.model.target.isMedia = true;
|
||||||
$scope.model.target.name = media.name;
|
$scope.model.target.name = media.name;
|
||||||
$scope.model.target.url = mediaHelper.resolveFile(media);
|
$scope.model.target.url = media.image;
|
||||||
|
|
||||||
$scope.mediaPickerOverlay.show = false;
|
$scope.mediaPickerOverlay.show = false;
|
||||||
$scope.mediaPickerOverlay = null;
|
$scope.mediaPickerOverlay = null;
|
||||||
|
|||||||
@@ -43,14 +43,13 @@
|
|||||||
<h5>
|
<h5>
|
||||||
<localize key="defaultdialogs_linkToPage">Link to page</localize>
|
<localize key="defaultdialogs_linkToPage">Link to page</localize>
|
||||||
</h5>
|
</h5>
|
||||||
|
|
||||||
<div ng-hide="miniListView">
|
<div ng-hide="miniListView">
|
||||||
<umb-tree-search-box hide-search-callback="hideSearch"
|
<umb-tree-search-box hide-search-callback="hideSearch"
|
||||||
search-callback="onSearchResults"
|
search-callback="onSearchResults"
|
||||||
search-from-id="{{searchInfo.searchFromId}}"
|
search-from-id="{{searchInfo.searchFromId}}"
|
||||||
search-from-name="{{searchInfo.searchFromName}}"
|
search-from-name="{{searchInfo.searchFromName}}"
|
||||||
|
datatype-id="{{searchInfo.dataTypeId}}"
|
||||||
show-search="{{searchInfo.showSearch}}"
|
show-search="{{searchInfo.showSearch}}"
|
||||||
ignore-user-startnodes="{{searchInfo.ignoreUserStartNodes}}"
|
|
||||||
section="{{section}}">
|
section="{{section}}">
|
||||||
</umb-tree-search-box>
|
</umb-tree-search-box>
|
||||||
|
|
||||||
|
|||||||
+62
-49
@@ -1,7 +1,7 @@
|
|||||||
//used for the media picker dialog
|
//used for the media picker dialog
|
||||||
angular.module("umbraco")
|
angular.module("umbraco")
|
||||||
.controller("Umbraco.Overlays.MediaPickerController",
|
.controller("Umbraco.Overlays.MediaPickerController",
|
||||||
function ($scope, mediaResource, umbRequestHelper, entityResource, $log, mediaHelper, mediaTypeHelper, eventsService, treeService, $element, $timeout, userService, $cookies, localStorageService, localizationService) {
|
function ($scope, mediaResource, umbRequestHelper, entityResource, $log, mediaHelper, mediaTypeHelper, eventsService, treeService, $element, $timeout, userService, $cookies, localStorageService, localizationService) {
|
||||||
|
|
||||||
if (!$scope.model.title) {
|
if (!$scope.model.title) {
|
||||||
$scope.model.title = localizationService.localize("defaultdialogs_selectMedia");
|
$scope.model.title = localizationService.localize("defaultdialogs_selectMedia");
|
||||||
@@ -40,17 +40,21 @@ angular.module("umbraco")
|
|||||||
|
|
||||||
$scope.acceptedMediatypes = [];
|
$scope.acceptedMediatypes = [];
|
||||||
mediaTypeHelper.getAllowedImagetypes($scope.startNodeId)
|
mediaTypeHelper.getAllowedImagetypes($scope.startNodeId)
|
||||||
.then(function(types) {
|
.then(function (types) {
|
||||||
$scope.acceptedMediatypes = types;
|
$scope.acceptedMediatypes = types;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var dataTypeId = null;
|
||||||
|
if($scope.model && $scope.model.dataTypeId) {
|
||||||
|
dataTypeId = $scope.model.dataTypeId;
|
||||||
|
}
|
||||||
$scope.searchOptions = {
|
$scope.searchOptions = {
|
||||||
pageNumber: 1,
|
pageNumber: 1,
|
||||||
pageSize: 100,
|
pageSize: 100,
|
||||||
totalItems: 0,
|
totalItems: 0,
|
||||||
totalPages: 0,
|
totalPages: 0,
|
||||||
filter: '',
|
filter: '',
|
||||||
ignoreUserStartNodes: $scope.model.ignoreUserStartNodes
|
dataTypeId: dataTypeId
|
||||||
};
|
};
|
||||||
|
|
||||||
//preload selected item
|
//preload selected item
|
||||||
@@ -90,7 +94,7 @@ angular.module("umbraco")
|
|||||||
var id = $scope.target.udi ? $scope.target.udi : $scope.target.id
|
var id = $scope.target.udi ? $scope.target.udi : $scope.target.id
|
||||||
var altText = $scope.target.altText;
|
var altText = $scope.target.altText;
|
||||||
if (id) {
|
if (id) {
|
||||||
mediaResource.getById(id)
|
entityResource.getById(id, "Media")
|
||||||
.then(function (node) {
|
.then(function (node) {
|
||||||
$scope.target = node;
|
$scope.target = node;
|
||||||
if (ensureWithinStartNode(node)) {
|
if (ensureWithinStartNode(node)) {
|
||||||
@@ -107,24 +111,24 @@ angular.module("umbraco")
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.upload = function(v) {
|
$scope.upload = function (v) {
|
||||||
angular.element(".umb-file-dropzone-directive .file-select").click();
|
angular.element(".umb-file-dropzone-directive .file-select").click();
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.dragLeave = function(el, event) {
|
$scope.dragLeave = function (el, event) {
|
||||||
$scope.activeDrag = false;
|
$scope.activeDrag = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.dragEnter = function(el, event) {
|
$scope.dragEnter = function (el, event) {
|
||||||
$scope.activeDrag = true;
|
$scope.activeDrag = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.submitFolder = function() {
|
$scope.submitFolder = function () {
|
||||||
if ($scope.newFolderName) {
|
if ($scope.newFolderName) {
|
||||||
$scope.creatingFolder = true;
|
$scope.creatingFolder = true;
|
||||||
mediaResource
|
mediaResource
|
||||||
.addFolder($scope.newFolderName, $scope.currentFolder.id)
|
.addFolder($scope.newFolderName, $scope.currentFolder.id)
|
||||||
.then(function(data) {
|
.then(function (data) {
|
||||||
//we've added a new folder so lets clear the tree cache for that specific item
|
//we've added a new folder so lets clear the tree cache for that specific item
|
||||||
treeService.clearCache({
|
treeService.clearCache({
|
||||||
cacheKey: "__media", //this is the main media tree cache key
|
cacheKey: "__media", //this is the main media tree cache key
|
||||||
@@ -140,14 +144,14 @@ angular.module("umbraco")
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.enterSubmitFolder = function(event) {
|
$scope.enterSubmitFolder = function (event) {
|
||||||
if (event.keyCode === 13) {
|
if (event.keyCode === 13) {
|
||||||
$scope.submitFolder();
|
$scope.submitFolder();
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.gotoFolder = function(folder) {
|
$scope.gotoFolder = function (folder) {
|
||||||
if (!$scope.multiPicker) {
|
if (!$scope.multiPicker) {
|
||||||
deselectAllImages($scope.model.selectedImages);
|
deselectAllImages($scope.model.selectedImages);
|
||||||
}
|
}
|
||||||
@@ -157,10 +161,11 @@ angular.module("umbraco")
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (folder.id > 0) {
|
if (folder.id > 0) {
|
||||||
entityResource.getAncestors(folder.id, "media", { ignoreUserStartNodes: $scope.model.ignoreUserStartNodes })
|
|
||||||
.then(function(anc) {
|
entityResource.getAncestors(folder.id, "media", { dataTypeId: dataTypeId })
|
||||||
|
.then(function (anc) {
|
||||||
$scope.path = _.filter(anc,
|
$scope.path = _.filter(anc,
|
||||||
function(f) {
|
function (f) {
|
||||||
return f.path.indexOf($scope.startNodeId) !== -1;
|
return f.path.indexOf($scope.startNodeId) !== -1;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -181,7 +186,7 @@ angular.module("umbraco")
|
|||||||
return getChildren(folder.id);
|
return getChildren(folder.id);
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.clickHandler = function(image, event, index) {
|
$scope.clickHandler = function (image, event, index) {
|
||||||
if (image.isFolder) {
|
if (image.isFolder) {
|
||||||
if ($scope.disableFolderSelect) {
|
if ($scope.disableFolderSelect) {
|
||||||
$scope.gotoFolder(image);
|
$scope.gotoFolder(image);
|
||||||
@@ -209,7 +214,7 @@ angular.module("umbraco")
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.clickItemName = function(item) {
|
$scope.clickItemName = function (item) {
|
||||||
if (item.isFolder) {
|
if (item.isFolder) {
|
||||||
$scope.gotoFolder(item);
|
$scope.gotoFolder(item);
|
||||||
}
|
}
|
||||||
@@ -241,8 +246,8 @@ angular.module("umbraco")
|
|||||||
images.length = 0;
|
images.length = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.onUploadComplete = function(files) {
|
$scope.onUploadComplete = function (files) {
|
||||||
$scope.gotoFolder($scope.currentFolder).then(function() {
|
$scope.gotoFolder($scope.currentFolder).then(function () {
|
||||||
if (files.length === 1 && $scope.model.selectedImages.length === 0) {
|
if (files.length === 1 && $scope.model.selectedImages.length === 0) {
|
||||||
var image = $scope.images[$scope.images.length - 1];
|
var image = $scope.images[$scope.images.length - 1];
|
||||||
$scope.target = image;
|
$scope.target = image;
|
||||||
@@ -252,7 +257,7 @@ angular.module("umbraco")
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.onFilesQueue = function() {
|
$scope.onFilesQueue = function () {
|
||||||
$scope.activeDrag = false;
|
$scope.activeDrag = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -262,7 +267,7 @@ angular.module("umbraco")
|
|||||||
|
|
||||||
// also make sure the node is not trashed
|
// also make sure the node is not trashed
|
||||||
if (nodePath.indexOf($scope.startNodeId.toString()) !== -1 && node.trashed === false) {
|
if (nodePath.indexOf($scope.startNodeId.toString()) !== -1 && node.trashed === false) {
|
||||||
$scope.gotoFolder({ id: $scope.lastOpenedNode, name: "Media", icon: "icon-folder" });
|
$scope.gotoFolder({ id: $scope.lastOpenedNode, name: "Media", icon: "icon-folder", path: node.path });
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
$scope.gotoFolder({ id: $scope.startNodeId, name: "Media", icon: "icon-folder" });
|
$scope.gotoFolder({ id: $scope.startNodeId, name: "Media", icon: "icon-folder" });
|
||||||
@@ -285,12 +290,12 @@ angular.module("umbraco")
|
|||||||
$scope.gotoFolder({ id: $scope.startNodeId, name: "Media", icon: "icon-folder" });
|
$scope.gotoFolder({ id: $scope.startNodeId, name: "Media", icon: "icon-folder" });
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.openDetailsDialog = function() {
|
$scope.openDetailsDialog = function () {
|
||||||
|
|
||||||
$scope.mediaPickerDetailsOverlay = {};
|
$scope.mediaPickerDetailsOverlay = {};
|
||||||
$scope.mediaPickerDetailsOverlay.show = true;
|
$scope.mediaPickerDetailsOverlay.show = true;
|
||||||
|
|
||||||
$scope.mediaPickerDetailsOverlay.submit = function(model) {
|
$scope.mediaPickerDetailsOverlay.submit = function (model) {
|
||||||
$scope.model.selectedImages.push($scope.target);
|
$scope.model.selectedImages.push($scope.target);
|
||||||
$scope.model.submit($scope.model);
|
$scope.model.submit($scope.model);
|
||||||
|
|
||||||
@@ -298,42 +303,43 @@ angular.module("umbraco")
|
|||||||
$scope.mediaPickerDetailsOverlay = null;
|
$scope.mediaPickerDetailsOverlay = null;
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.mediaPickerDetailsOverlay.close = function(oldModel) {
|
$scope.mediaPickerDetailsOverlay.close = function (oldModel) {
|
||||||
$scope.mediaPickerDetailsOverlay.show = false;
|
$scope.mediaPickerDetailsOverlay.show = false;
|
||||||
$scope.mediaPickerDetailsOverlay = null;
|
$scope.mediaPickerDetailsOverlay = null;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
var debounceSearchMedia = _.debounce(function() {
|
var debounceSearchMedia = _.debounce(function () {
|
||||||
$scope.$apply(function() {
|
$scope.$apply(function () {
|
||||||
if ($scope.searchOptions.filter) {
|
if ($scope.searchOptions.filter) {
|
||||||
searchMedia();
|
searchMedia();
|
||||||
} else {
|
} else {
|
||||||
// reset pagination
|
|
||||||
$scope.searchOptions = {
|
|
||||||
pageNumber: 1,
|
|
||||||
pageSize: 100,
|
|
||||||
totalItems: 0,
|
|
||||||
totalPages: 0,
|
|
||||||
filter: '',
|
|
||||||
ignoreUserStartNodes: $scope.model.ignoreUserStartNodes
|
|
||||||
};
|
|
||||||
getChildren($scope.currentFolder.id);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}, 500);
|
|
||||||
|
|
||||||
$scope.changeSearch = function() {
|
// reset pagination
|
||||||
|
$scope.searchOptions = {
|
||||||
|
pageNumber: 1,
|
||||||
|
pageSize: 100,
|
||||||
|
totalItems: 0,
|
||||||
|
totalPages: 0,
|
||||||
|
filter: '',
|
||||||
|
dataTypeId: dataTypeId
|
||||||
|
};
|
||||||
|
getChildren($scope.currentFolder.id);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}, 500);
|
||||||
|
|
||||||
|
$scope.changeSearch = function () {
|
||||||
$scope.loading = true;
|
$scope.loading = true;
|
||||||
debounceSearchMedia();
|
debounceSearchMedia();
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.toggle = function() {
|
$scope.toggle = function () {
|
||||||
// Make sure to activate the changeSearch function everytime the toggle is clicked
|
// Make sure to activate the changeSearch function everytime the toggle is clicked
|
||||||
$scope.changeSearch();
|
$scope.changeSearch();
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.changePagination = function(pageNumber) {
|
$scope.changePagination = function (pageNumber) {
|
||||||
$scope.loading = true;
|
$scope.loading = true;
|
||||||
$scope.searchOptions.pageNumber = pageNumber;
|
$scope.searchOptions.pageNumber = pageNumber;
|
||||||
searchMedia();
|
searchMedia();
|
||||||
@@ -342,10 +348,10 @@ angular.module("umbraco")
|
|||||||
function searchMedia() {
|
function searchMedia() {
|
||||||
$scope.loading = true;
|
$scope.loading = true;
|
||||||
entityResource.getPagedDescendants($scope.currentFolder.id, "Media", $scope.searchOptions)
|
entityResource.getPagedDescendants($scope.currentFolder.id, "Media", $scope.searchOptions)
|
||||||
.then(function(data) {
|
.then(function (data) {
|
||||||
// update image data to work with image grid
|
// update image data to work with image grid
|
||||||
angular.forEach(data.items,
|
angular.forEach(data.items,
|
||||||
function(mediaItem) {
|
function (mediaItem) {
|
||||||
// set thumbnail and src
|
// set thumbnail and src
|
||||||
mediaItem.thumbnail = mediaHelper.resolveFileFromEntity(mediaItem, true);
|
mediaItem.thumbnail = mediaHelper.resolveFileFromEntity(mediaItem, true);
|
||||||
mediaItem.image = mediaHelper.resolveFileFromEntity(mediaItem, false);
|
mediaItem.image = mediaHelper.resolveFileFromEntity(mediaItem, false);
|
||||||
@@ -388,10 +394,17 @@ angular.module("umbraco")
|
|||||||
|
|
||||||
function getChildren(id) {
|
function getChildren(id) {
|
||||||
$scope.loading = true;
|
$scope.loading = true;
|
||||||
return mediaResource.getChildren(id, { ignoreUserStartNodes: $scope.model.ignoreUserStartNodes })
|
return entityResource.getChildren(id, "Media", $scope.searchOptions)
|
||||||
.then(function(data) {
|
.then(function (data) {
|
||||||
|
|
||||||
|
for (var i = 0; i < data.length; i++) {
|
||||||
|
if (data[i].metaData.MediaPath !== null) {
|
||||||
|
data[i].thumbnail = mediaHelper.resolveFileFromEntity(data[i], true);
|
||||||
|
data[i].image = mediaHelper.resolveFileFromEntity(data[i], false);
|
||||||
|
}
|
||||||
|
}
|
||||||
$scope.searchOptions.filter = "";
|
$scope.searchOptions.filter = "";
|
||||||
$scope.images = data.items ? data.items : [];
|
$scope.images = data ? data : [];
|
||||||
// set already selected images to selected
|
// set already selected images to selected
|
||||||
preSelectImages();
|
preSelectImages();
|
||||||
$scope.loading = false;
|
$scope.loading = false;
|
||||||
|
|||||||
+4
-3
@@ -4,6 +4,7 @@ angular.module("umbraco").controller("Umbraco.Overlays.TreePickerController",
|
|||||||
|
|
||||||
var tree = null;
|
var tree = null;
|
||||||
var dialogOptions = $scope.model;
|
var dialogOptions = $scope.model;
|
||||||
|
|
||||||
$scope.treeReady = false;
|
$scope.treeReady = false;
|
||||||
$scope.dialogTreeEventHandler = $({});
|
$scope.dialogTreeEventHandler = $({});
|
||||||
$scope.section = dialogOptions.section;
|
$scope.section = dialogOptions.section;
|
||||||
@@ -16,7 +17,7 @@ angular.module("umbraco").controller("Umbraco.Overlays.TreePickerController",
|
|||||||
searchFromId: dialogOptions.startNodeId,
|
searchFromId: dialogOptions.startNodeId,
|
||||||
searchFromName: null,
|
searchFromName: null,
|
||||||
showSearch: false,
|
showSearch: false,
|
||||||
ignoreUserStartNodes: dialogOptions.ignoreUserStartNodes,
|
dataTypeId: (dialogOptions && dialogOptions.dataTypeId) ? dialogOptions.dataTypeId : null,
|
||||||
results: [],
|
results: [],
|
||||||
selectedSearchResults: []
|
selectedSearchResults: []
|
||||||
}
|
}
|
||||||
@@ -138,8 +139,8 @@ angular.module("umbraco").controller("Umbraco.Overlays.TreePickerController",
|
|||||||
if (dialogOptions.startNodeId)
|
if (dialogOptions.startNodeId)
|
||||||
params.push("startNodeId=" + dialogOptions.startNodeId);
|
params.push("startNodeId=" + dialogOptions.startNodeId);
|
||||||
|
|
||||||
if (dialogOptions.ignoreUserStartNodes)
|
if (dialogOptions.dataTypeId)
|
||||||
params.push("ignoreUserStartNodes=" + dialogOptions.ignoreUserStartNodes);
|
params.push("dataTypeId=" + dialogOptions.dataTypeId);
|
||||||
|
|
||||||
if (dialogOptions.customTreeParams)
|
if (dialogOptions.customTreeParams)
|
||||||
params.push(dialogOptions.customTreeParams);
|
params.push(dialogOptions.customTreeParams);
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
search-from-id="{{searchInfo.searchFromId}}"
|
search-from-id="{{searchInfo.searchFromId}}"
|
||||||
search-from-name="{{searchInfo.searchFromName}}"
|
search-from-name="{{searchInfo.searchFromName}}"
|
||||||
show-search="{{searchInfo.showSearch}}"
|
show-search="{{searchInfo.showSearch}}"
|
||||||
ignore-user-startnodes="{{searchInfo.ignoreUserStartNodes}}"
|
datatype-id="{{searchInfo.dataTypeId}}"
|
||||||
section="{{section}}">
|
section="{{section}}">
|
||||||
</umb-tree-search-box>
|
</umb-tree-search-box>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -131,6 +131,13 @@ function MemberEditController($scope, $routeParams, $location, $q, $window, appS
|
|||||||
$scope.busy = true;
|
$scope.busy = true;
|
||||||
$scope.page.saveButtonState = "busy";
|
$scope.page.saveButtonState = "busy";
|
||||||
|
|
||||||
|
//anytime a user is changing a member's password without the oldPassword, we are in effect resetting it so we need to set that flag here
|
||||||
|
var passwordProp = _.find(contentEditingHelper.getAllProps($scope.content), function (e) { return e.alias === '_umb_password' });
|
||||||
|
if (passwordProp && passwordProp.value && !passwordProp.value.reset) {
|
||||||
|
//so if the admin is not explicitly resetting the password, flag it for resetting if a new password is being entered
|
||||||
|
passwordProp.value.reset = !passwordProp.value.oldPassword && passwordProp.config.allowManuallyChangingPassword;
|
||||||
|
}
|
||||||
|
|
||||||
memberResource.save($scope.content, $routeParams.create, fileManager.getFiles())
|
memberResource.save($scope.content, $routeParams.create, fileManager.getFiles())
|
||||||
.then(function(data) {
|
.then(function(data) {
|
||||||
|
|
||||||
|
|||||||
+39
-38
@@ -66,13 +66,13 @@ function contentPickerController($scope, entityResource, editorState, iconHelper
|
|||||||
showOpenButton: false,
|
showOpenButton: false,
|
||||||
showEditButton: false,
|
showEditButton: false,
|
||||||
showPathOnHover: false,
|
showPathOnHover: false,
|
||||||
ignoreUserStartNodes: false,
|
dataTypeId: null,
|
||||||
maxNumber: 1,
|
maxNumber: 1,
|
||||||
minNumber : 0,
|
minNumber: 0,
|
||||||
startNode: {
|
startNode: {
|
||||||
query: "",
|
query: "",
|
||||||
type: "content",
|
type: "content",
|
||||||
id: $scope.model.config.startNodeId ? $scope.model.config.startNodeId : -1 // get start node for simple Content Picker
|
id: $scope.model.config.startNodeId ? $scope.model.config.startNodeId : -1 // get start node for simple Content Picker
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -100,13 +100,12 @@ function contentPickerController($scope, entityResource, editorState, iconHelper
|
|||||||
$scope.model.config.showOpenButton = ($scope.model.config.showOpenButton === "1" ? true : false);
|
$scope.model.config.showOpenButton = ($scope.model.config.showOpenButton === "1" ? true : false);
|
||||||
$scope.model.config.showEditButton = ($scope.model.config.showEditButton === "1" ? true : false);
|
$scope.model.config.showEditButton = ($scope.model.config.showEditButton === "1" ? true : false);
|
||||||
$scope.model.config.showPathOnHover = ($scope.model.config.showPathOnHover === "1" ? true : false);
|
$scope.model.config.showPathOnHover = ($scope.model.config.showPathOnHover === "1" ? true : false);
|
||||||
$scope.model.config.ignoreUserStartNodes = ($scope.model.config.ignoreUserStartNodes === "1" ? true : false);
|
|
||||||
|
|
||||||
var entityType = $scope.model.config.startNode.type === "member"
|
var entityType = $scope.model.config.startNode.type === "member"
|
||||||
? "Member"
|
? "Member"
|
||||||
: $scope.model.config.startNode.type === "media"
|
: $scope.model.config.startNode.type === "media"
|
||||||
? "Media"
|
? "Media"
|
||||||
: "Document";
|
: "Document";
|
||||||
$scope.allowOpenButton = entityType === "Document";
|
$scope.allowOpenButton = entityType === "Document";
|
||||||
$scope.allowEditButton = entityType === "Document";
|
$scope.allowEditButton = entityType === "Document";
|
||||||
$scope.allowRemoveButton = true;
|
$scope.allowRemoveButton = true;
|
||||||
@@ -145,7 +144,7 @@ function contentPickerController($scope, entityResource, editorState, iconHelper
|
|||||||
dialogOptions.filterCssClass = "not-allowed";
|
dialogOptions.filterCssClass = "not-allowed";
|
||||||
var currFilter = dialogOptions.filter;
|
var currFilter = dialogOptions.filter;
|
||||||
//now change the filter to be a method
|
//now change the filter to be a method
|
||||||
dialogOptions.filter = function(i) {
|
dialogOptions.filter = function (i) {
|
||||||
//filter out the list view nodes
|
//filter out the list view nodes
|
||||||
if (i.metaData.isContainer) {
|
if (i.metaData.isContainer) {
|
||||||
return true;
|
return true;
|
||||||
@@ -180,28 +179,30 @@ function contentPickerController($scope, entityResource, editorState, iconHelper
|
|||||||
}
|
}
|
||||||
|
|
||||||
//dialog
|
//dialog
|
||||||
$scope.openContentPicker = function() {
|
$scope.openContentPicker = function () {
|
||||||
$scope.contentPickerOverlay = dialogOptions;
|
|
||||||
$scope.contentPickerOverlay.view = "treepicker";
|
|
||||||
$scope.contentPickerOverlay.show = true;
|
|
||||||
|
|
||||||
$scope.contentPickerOverlay.submit = function(model) {
|
$scope.contentPickerOverlay = dialogOptions;
|
||||||
|
$scope.contentPickerOverlay.view = "treepicker";
|
||||||
|
$scope.contentPickerOverlay.show = true;
|
||||||
|
$scope.contentPickerOverlay.dataTypeId = ($scope.model && $scope.model.dataTypeId) ? $scope.model.dataTypeId : null;
|
||||||
|
|
||||||
if (angular.isArray(model.selection)) {
|
$scope.contentPickerOverlay.submit = function (model) {
|
||||||
_.each(model.selection, function (item, i) {
|
|
||||||
$scope.add(item);
|
|
||||||
});
|
|
||||||
angularHelper.getCurrentForm($scope).$setDirty();
|
|
||||||
}
|
|
||||||
|
|
||||||
$scope.contentPickerOverlay.show = false;
|
if (angular.isArray(model.selection)) {
|
||||||
$scope.contentPickerOverlay = null;
|
_.each(model.selection, function (item, i) {
|
||||||
}
|
$scope.add(item);
|
||||||
|
});
|
||||||
|
angularHelper.getCurrentForm($scope).$setDirty();
|
||||||
|
}
|
||||||
|
|
||||||
$scope.contentPickerOverlay.close = function(oldModel) {
|
$scope.contentPickerOverlay.show = false;
|
||||||
$scope.contentPickerOverlay.show = false;
|
$scope.contentPickerOverlay = null;
|
||||||
$scope.contentPickerOverlay = null;
|
}
|
||||||
}
|
|
||||||
|
$scope.contentPickerOverlay.close = function (oldModel) {
|
||||||
|
$scope.contentPickerOverlay.show = false;
|
||||||
|
$scope.contentPickerOverlay = null;
|
||||||
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -241,13 +242,13 @@ function contentPickerController($scope, entityResource, editorState, iconHelper
|
|||||||
$scope.renderModel = [];
|
$scope.renderModel = [];
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.openMiniEditor = function(node) {
|
$scope.openMiniEditor = function (node) {
|
||||||
miniEditorHelper.launchMiniEditor(node).then(function(updatedNode){
|
miniEditorHelper.launchMiniEditor(node).then(function (updatedNode) {
|
||||||
// update the node
|
// update the node
|
||||||
node.name = updatedNode.name;
|
node.name = updatedNode.name;
|
||||||
node.published = updatedNode.hasPublishedVersion;
|
node.published = updatedNode.hasPublishedVersion;
|
||||||
if(entityType !== "Member") {
|
if (entityType !== "Member") {
|
||||||
entityResource.getUrl(updatedNode.id, entityType).then(function(data){
|
entityResource.getUrl(updatedNode.id, entityType).then(function (data) {
|
||||||
node.url = data;
|
node.url = data;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -256,7 +257,7 @@ function contentPickerController($scope, entityResource, editorState, iconHelper
|
|||||||
|
|
||||||
//when the scope is destroyed we need to unsubscribe
|
//when the scope is destroyed we need to unsubscribe
|
||||||
$scope.$on('$destroy', function () {
|
$scope.$on('$destroy', function () {
|
||||||
if(unsubscribe) {
|
if (unsubscribe) {
|
||||||
unsubscribe();
|
unsubscribe();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -265,12 +266,12 @@ function contentPickerController($scope, entityResource, editorState, iconHelper
|
|||||||
|
|
||||||
//load current data if anything selected
|
//load current data if anything selected
|
||||||
if (modelIds.length > 0) {
|
if (modelIds.length > 0) {
|
||||||
entityResource.getByIds(modelIds, entityType).then(function(data) {
|
entityResource.getByIds(modelIds, entityType).then(function (data) {
|
||||||
|
|
||||||
_.each(modelIds,
|
_.each(modelIds,
|
||||||
function(id, i) {
|
function (id, i) {
|
||||||
var entity = _.find(data,
|
var entity = _.find(data,
|
||||||
function(d) {
|
function (d) {
|
||||||
return $scope.model.config.idType === "udi" ? (d.udi == id) : (d.id == id);
|
return $scope.model.config.idType === "udi" ? (d.udi == id) : (d.id == id);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -294,10 +295,10 @@ function contentPickerController($scope, entityResource, editorState, iconHelper
|
|||||||
function setEntityUrl(entity) {
|
function setEntityUrl(entity) {
|
||||||
|
|
||||||
// get url for content and media items
|
// get url for content and media items
|
||||||
if(entityType !== "Member") {
|
if (entityType !== "Member") {
|
||||||
entityResource.getUrl(entity.id, entityType).then(function(data){
|
entityResource.getUrl(entity.id, entityType).then(function (data) {
|
||||||
// update url
|
// update url
|
||||||
angular.forEach($scope.renderModel, function(item){
|
angular.forEach($scope.renderModel, function (item) {
|
||||||
if (item.id === entity.id) {
|
if (item.id === entity.id) {
|
||||||
if (entity.trashed) {
|
if (entity.trashed) {
|
||||||
item.url = localizationService.dictionary.general_recycleBin;
|
item.url = localizationService.dictionary.general_recycleBin;
|
||||||
@@ -319,7 +320,7 @@ function contentPickerController($scope, entityResource, editorState, iconHelper
|
|||||||
function addSelectedItem(item) {
|
function addSelectedItem(item) {
|
||||||
|
|
||||||
// set icon
|
// set icon
|
||||||
if(item.icon) {
|
if (item.icon) {
|
||||||
item.icon = iconHelper.convertFromLegacyIcon(item.icon);
|
item.icon = iconHelper.convertFromLegacyIcon(item.icon);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -354,7 +355,7 @@ function contentPickerController($scope, entityResource, editorState, iconHelper
|
|||||||
|
|
||||||
function setSortingState(items) {
|
function setSortingState(items) {
|
||||||
// disable sorting if the list only consist of one item
|
// disable sorting if the list only consist of one item
|
||||||
if(items.length > 1) {
|
if (items.length > 1) {
|
||||||
$scope.sortableOptions.disabled = false;
|
$scope.sortableOptions.disabled = false;
|
||||||
} else {
|
} else {
|
||||||
$scope.sortableOptions.disabled = true;
|
$scope.sortableOptions.disabled = true;
|
||||||
|
|||||||
+6
-7
@@ -2,10 +2,8 @@ angular.module("umbraco")
|
|||||||
.controller("Umbraco.PropertyEditors.Grid.MediaController",
|
.controller("Umbraco.PropertyEditors.Grid.MediaController",
|
||||||
function ($scope, $rootScope, $timeout, userService) {
|
function ($scope, $rootScope, $timeout, userService) {
|
||||||
|
|
||||||
var ignoreUserStartNodes = $scope.model.config.ignoreUserStartNodes === "1" ? true : false;
|
|
||||||
|
|
||||||
if (!$scope.model.config.startNodeId) {
|
if (!$scope.model.config.startNodeId) {
|
||||||
if (ignoreUserStartNodes === true) {
|
if ($scope.model.config.ignoreUserStartNodes === "1" ) {
|
||||||
$scope.model.config.startNodeId = -1;
|
$scope.model.config.startNodeId = -1;
|
||||||
$scope.model.config.startNodeIsVirtual = true;
|
$scope.model.config.startNodeIsVirtual = true;
|
||||||
|
|
||||||
@@ -18,12 +16,13 @@ angular.module("umbraco")
|
|||||||
}
|
}
|
||||||
|
|
||||||
$scope.setImage = function(){
|
$scope.setImage = function(){
|
||||||
|
|
||||||
$scope.mediaPickerOverlay = {};
|
$scope.mediaPickerOverlay = {};
|
||||||
$scope.mediaPickerOverlay.view = "mediapicker";
|
$scope.mediaPickerOverlay.view = "mediapicker";
|
||||||
$scope.mediaPickerOverlay.startNodeId = $scope.model.config && $scope.model.config.startNodeId ? $scope.model.config.startNodeId : undefined;
|
$scope.mediaPickerOverlay.startNodeId = $scope.model.config && $scope.model.config.startNodeId ? $scope.model.config.startNodeId : null;
|
||||||
$scope.mediaPickerOverlay.startNodeIsVirtual = $scope.mediaPickerOverlay.startNodeId ? $scope.model.config.startNodeIsVirtual : undefined;
|
$scope.mediaPickerOverlay.startNodeIsVirtual = $scope.mediaPickerOverlay.startNodeId ? $scope.model.config.startNodeIsVirtual : null;
|
||||||
$scope.mediaPickerOverlay.ignoreUserStartNodes = ignoreUserStartNodes;
|
$scope.mediaPickerOverlay.dataTypeId = ($scope.model && $scope.model.dataTypeId) ? $scope.model.dataTypeId : null;
|
||||||
$scope.mediaPickerOverlay.cropSize = $scope.control.editor.config && $scope.control.editor.config.size ? $scope.control.editor.config.size : undefined;
|
$scope.mediaPickerOverlay.cropSize = $scope.control.editor.config && $scope.control.editor.config.size ? $scope.control.editor.config.size : null;
|
||||||
$scope.mediaPickerOverlay.showDetails = true;
|
$scope.mediaPickerOverlay.showDetails = true;
|
||||||
$scope.mediaPickerOverlay.disableFolderSelect = true;
|
$scope.mediaPickerOverlay.disableFolderSelect = true;
|
||||||
$scope.mediaPickerOverlay.onlyImages = true;
|
$scope.mediaPickerOverlay.onlyImages = true;
|
||||||
|
|||||||
+22
-16
@@ -1,7 +1,7 @@
|
|||||||
(function() {
|
(function() {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
function GridRichTextEditorController($scope, tinyMceService, macroService, editorState) {
|
function GridRichTextEditorController($scope, tinyMceService, macroService, editorState, entityResource) {
|
||||||
|
|
||||||
var vm = this;
|
var vm = this;
|
||||||
|
|
||||||
@@ -10,29 +10,35 @@
|
|||||||
vm.openMacroPicker = openMacroPicker;
|
vm.openMacroPicker = openMacroPicker;
|
||||||
vm.openEmbed = openEmbed;
|
vm.openEmbed = openEmbed;
|
||||||
|
|
||||||
|
var dataTypeId = ($scope.model && $scope.model.dataTypeId) ? $scope.model.dataTypeId : null;
|
||||||
|
|
||||||
function openLinkPicker(editor, currentTarget, anchorElement) {
|
function openLinkPicker(editor, currentTarget, anchorElement) {
|
||||||
|
|
||||||
vm.linkPickerOverlay = {
|
entityResource.getAnchors(JSON.stringify($scope.model.value)).then(function(anchorValues) {
|
||||||
view: "linkpicker",
|
|
||||||
currentTarget: currentTarget,
|
vm.linkPickerOverlay = {
|
||||||
anchors: tinyMceService.getAnchorNames(JSON.stringify(editorState.current.properties)),
|
view: "linkpicker",
|
||||||
ignoreUserStartNodes: $scope.model.config.ignoreUserStartNodes === "1",
|
currentTarget: currentTarget,
|
||||||
show: true,
|
anchors: anchorValues,
|
||||||
submit: function(model) {
|
dataTypeId: dataTypeId,
|
||||||
tinyMceService.insertLinkInEditor(editor, model.target, anchorElement);
|
ignoreUserStartNodes : $scope.model.config.ignoreUserStartNodes,
|
||||||
vm.linkPickerOverlay.show = false;
|
show: true,
|
||||||
vm.linkPickerOverlay = null;
|
submit: function(model) {
|
||||||
}
|
tinyMceService.insertLinkInEditor(editor, model.target, anchorElement);
|
||||||
};
|
vm.linkPickerOverlay.show = false;
|
||||||
|
vm.linkPickerOverlay = null;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function openMediaPicker(editor, currentTarget, userData) {
|
function openMediaPicker(editor, currentTarget, userData) {
|
||||||
var ignoreUserStartNodes = false;
|
|
||||||
var startNodeId = userData.startMediaIds.length !== 1 ? -1 : userData.startMediaIds[0];
|
var startNodeId = userData.startMediaIds.length !== 1 ? -1 : userData.startMediaIds[0];
|
||||||
var startNodeIsVirtual = userData.startMediaIds.length !== 1;
|
var startNodeIsVirtual = userData.startMediaIds.length !== 1;
|
||||||
|
|
||||||
|
|
||||||
if ($scope.model.config.ignoreUserStartNodes === "1") {
|
if ($scope.model.config.ignoreUserStartNodes === "1") {
|
||||||
ignoreUserStartNodes = true;
|
|
||||||
startNodeId = -1;
|
startNodeId = -1;
|
||||||
startNodeIsVirtual = true;
|
startNodeIsVirtual = true;
|
||||||
}
|
}
|
||||||
@@ -43,7 +49,7 @@
|
|||||||
showDetails: true,
|
showDetails: true,
|
||||||
startNodeId: startNodeId,
|
startNodeId: startNodeId,
|
||||||
startNodeIsVirtual: startNodeIsVirtual,
|
startNodeIsVirtual: startNodeIsVirtual,
|
||||||
ignoreUserStartNodes: ignoreUserStartNodes,
|
dataTypeId: dataTypeId,
|
||||||
view: "mediapicker",
|
view: "mediapicker",
|
||||||
show: true,
|
show: true,
|
||||||
submit: function(model) {
|
submit: function(model) {
|
||||||
|
|||||||
+5
-4
@@ -1,16 +1,17 @@
|
|||||||
//this controller simply tells the dialogs service to open a mediaPicker window
|
//this controller simply tells the dialogs service to open a mediaPicker window
|
||||||
//with a specified callback, this callback will receive an object with a selection on it
|
//with a specified callback, this callback will receive an object with a selection on it
|
||||||
angular.module('umbraco').controller("Umbraco.PropertyEditors.MediaPickerController",
|
angular.module('umbraco').controller("Umbraco.PropertyEditors.MediaPickerController",
|
||||||
function ($rootScope, $scope, dialogService, entityResource, mediaResource, mediaHelper, $timeout, userService, $location, localizationService) {
|
function ($rootScope, $scope, dialogService, entityResource, mediaHelper, $timeout, userService, $location, localizationService) {
|
||||||
|
|
||||||
//check the pre-values for multi-picker
|
//check the pre-values for multi-picker
|
||||||
var multiPicker = $scope.model.config.multiPicker && $scope.model.config.multiPicker !== '0' ? true : false;
|
var multiPicker = $scope.model.config.multiPicker && $scope.model.config.multiPicker !== '0' ? true : false;
|
||||||
var onlyImages = $scope.model.config.onlyImages && $scope.model.config.onlyImages !== '0' ? true : false;
|
var onlyImages = $scope.model.config.onlyImages && $scope.model.config.onlyImages !== '0' ? true : false;
|
||||||
var disableFolderSelect = $scope.model.config.disableFolderSelect && $scope.model.config.disableFolderSelect !== '0' ? true : false;
|
var disableFolderSelect = $scope.model.config.disableFolderSelect && $scope.model.config.disableFolderSelect !== '0' ? true : false;
|
||||||
var ignoreUserStartNodes = $scope.model.config.ignoreUserStartNodes === "1" ? true : false;
|
|
||||||
|
|
||||||
if (!$scope.model.config.startNodeId) {
|
if (!$scope.model.config.startNodeId) {
|
||||||
if (ignoreUserStartNodes === true) {
|
|
||||||
|
|
||||||
|
if ( $scope.model.config.ignoreUserStartNodes === "1") {
|
||||||
$scope.model.config.startNodeId = -1;
|
$scope.model.config.startNodeId = -1;
|
||||||
$scope.model.config.startNodeIsVirtual = true;
|
$scope.model.config.startNodeIsVirtual = true;
|
||||||
|
|
||||||
@@ -112,7 +113,7 @@ angular.module('umbraco').controller("Umbraco.PropertyEditors.MediaPickerControl
|
|||||||
title: "Select media",
|
title: "Select media",
|
||||||
startNodeId: $scope.model.config.startNodeId,
|
startNodeId: $scope.model.config.startNodeId,
|
||||||
startNodeIsVirtual: $scope.model.config.startNodeIsVirtual,
|
startNodeIsVirtual: $scope.model.config.startNodeIsVirtual,
|
||||||
ignoreUserStartNodes: ignoreUserStartNodes,
|
dataTypeId: ($scope.model && $scope.model.dataTypeId) ? $scope.model.dataTypeId : null,
|
||||||
multiPicker: multiPicker,
|
multiPicker: multiPicker,
|
||||||
onlyImages: onlyImages,
|
onlyImages: onlyImages,
|
||||||
disableFolderSelect: disableFolderSelect,
|
disableFolderSelect: disableFolderSelect,
|
||||||
|
|||||||
+2
-1
@@ -71,7 +71,8 @@ function multiUrlPickerController($scope, angularHelper, localizationService, en
|
|||||||
$scope.linkPickerOverlay = {
|
$scope.linkPickerOverlay = {
|
||||||
view: "linkpicker",
|
view: "linkpicker",
|
||||||
currentTarget: target,
|
currentTarget: target,
|
||||||
ignoreUserStartNodes: $scope.model.config.ignoreUserStartNodes === "1",
|
dataTypeId: ($scope.model && $scope.model.dataTypeId) ? $scope.model.dataTypeId : null,
|
||||||
|
ignoreUserStartNodes : $scope.model.config.ignoreUserStartNodes,
|
||||||
show: true,
|
show: true,
|
||||||
submit: function (model) {
|
submit: function (model) {
|
||||||
if (model.target.url || model.target.anchor) {
|
if (model.target.url || model.target.anchor) {
|
||||||
|
|||||||
+6
-2
@@ -18,14 +18,17 @@
|
|||||||
$scope.currentEditLink = null;
|
$scope.currentEditLink = null;
|
||||||
$scope.hasError = false;
|
$scope.hasError = false;
|
||||||
|
|
||||||
|
var dataTypeId = ($scope.model && $scope.model.dataTypeId) ? $scope.model.dataTypeId : null;
|
||||||
|
|
||||||
$scope.internal = function($event) {
|
$scope.internal = function($event) {
|
||||||
|
|
||||||
$scope.currentEditLink = null;
|
$scope.currentEditLink = null;
|
||||||
|
|
||||||
$scope.contentPickerOverlay = {};
|
$scope.contentPickerOverlay = {};
|
||||||
$scope.contentPickerOverlay.view = "contentpicker";
|
$scope.contentPickerOverlay.view = "contentpicker";
|
||||||
$scope.contentPickerOverlay.multiPicker = false;
|
$scope.contentPickerOverlay.multiPicker = false;
|
||||||
$scope.contentPickerOverlay.show = true;
|
$scope.contentPickerOverlay.show = true;
|
||||||
$scope.contentPickerOverlay.ignoreUserStartNodes = $scope.model.config.ignoreUserStartNodes === "1" ? true: false;
|
$scope.contentPickerOverlay.dataTypeId = dataTypeId;
|
||||||
$scope.contentPickerOverlay.idType = $scope.model.config.idType ? $scope.model.config.idType : "int";
|
$scope.contentPickerOverlay.idType = $scope.model.config.idType ? $scope.model.config.idType : "int";
|
||||||
|
|
||||||
$scope.contentPickerOverlay.submit = function(model) {
|
$scope.contentPickerOverlay.submit = function(model) {
|
||||||
@@ -45,13 +48,14 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
$scope.selectInternal = function ($event, link) {
|
$scope.selectInternal = function ($event, link) {
|
||||||
|
|
||||||
$scope.currentEditLink = link;
|
$scope.currentEditLink = link;
|
||||||
|
|
||||||
$scope.contentPickerOverlay = {};
|
$scope.contentPickerOverlay = {};
|
||||||
$scope.contentPickerOverlay.view = "contentpicker";
|
$scope.contentPickerOverlay.view = "contentpicker";
|
||||||
$scope.contentPickerOverlay.multiPicker = false;
|
$scope.contentPickerOverlay.multiPicker = false;
|
||||||
$scope.contentPickerOverlay.show = true;
|
$scope.contentPickerOverlay.show = true;
|
||||||
$scope.contentPickerOverlay.ignoreUserStartNodes = $scope.model.config.ignoreUserStartNodes === "1" ? true : false;
|
$scope.contentPickerOverlay.dataTypeId = dataTypeId;
|
||||||
$scope.contentPickerOverlay.idType = $scope.model.config.idType ? $scope.model.config.idType : "int";
|
$scope.contentPickerOverlay.idType = $scope.model.config.idType ? $scope.model.config.idType : "int";
|
||||||
|
|
||||||
$scope.contentPickerOverlay.submit = function(model) {
|
$scope.contentPickerOverlay.submit = function(model) {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
angular.module("umbraco")
|
angular.module("umbraco")
|
||||||
.controller("Umbraco.PropertyEditors.RTEController",
|
.controller("Umbraco.PropertyEditors.RTEController",
|
||||||
function ($rootScope, $scope, $q, $locale, dialogService, $log, imageHelper, assetsService, $timeout, tinyMceService, angularHelper, stylesheetResource, macroService, editorState) {
|
function ($rootScope, $scope, $q, $locale, dialogService, $log, imageHelper, assetsService, $timeout, tinyMceService, angularHelper, stylesheetResource, macroService, editorState, entityResource) {
|
||||||
|
|
||||||
$scope.isLoading = true;
|
$scope.isLoading = true;
|
||||||
|
|
||||||
@@ -52,6 +52,8 @@ angular.module("umbraco")
|
|||||||
editorConfig.maxImageSize = tinyMceService.defaultPrevalues().maxImageSize;
|
editorConfig.maxImageSize = tinyMceService.defaultPrevalues().maxImageSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var dataTypeId = ($scope.model && $scope.model.dataTypeId) ? $scope.model.dataTypeId : null;
|
||||||
|
|
||||||
//queue file loading
|
//queue file loading
|
||||||
if (typeof tinymce === "undefined") { // Don't reload tinymce if already loaded
|
if (typeof tinymce === "undefined") { // Don't reload tinymce if already loaded
|
||||||
await.push(assetsService.loadJs("lib/tinymce/tinymce.min.js", $scope));
|
await.push(assetsService.loadJs("lib/tinymce/tinymce.min.js", $scope));
|
||||||
@@ -270,28 +272,34 @@ angular.module("umbraco")
|
|||||||
});
|
});
|
||||||
|
|
||||||
tinyMceService.createLinkPicker(editor, $scope, function(currentTarget, anchorElement) {
|
tinyMceService.createLinkPicker(editor, $scope, function(currentTarget, anchorElement) {
|
||||||
$scope.linkPickerOverlay = {
|
|
||||||
view: "linkpicker",
|
entityResource.getAnchors($scope.model.value).then(function(anchorValues){
|
||||||
currentTarget: currentTarget,
|
|
||||||
anchors: editorState.current ? tinyMceService.getAnchorNames(JSON.stringify(editorState.current.properties)) : [],
|
$scope.linkPickerOverlay = {
|
||||||
ignoreUserStartNodes: $scope.model.config.ignoreUserStartNodes === "1",
|
view: "linkpicker",
|
||||||
show: true,
|
currentTarget: currentTarget,
|
||||||
submit: function(model) {
|
anchors: anchorValues,
|
||||||
tinyMceService.insertLinkInEditor(editor, model.target, anchorElement);
|
dataTypeId: dataTypeId,
|
||||||
$scope.linkPickerOverlay.show = false;
|
ignoreUserStartNodes: $scope.model.config.ignoreUserStartNodes,
|
||||||
$scope.linkPickerOverlay = null;
|
show: true,
|
||||||
}
|
submit: function(model) {
|
||||||
};
|
tinyMceService.insertLinkInEditor(editor, model.target, anchorElement);
|
||||||
|
$scope.linkPickerOverlay.show = false;
|
||||||
|
$scope.linkPickerOverlay = null;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
//Create the insert media plugin
|
//Create the insert media plugin
|
||||||
tinyMceService.createMediaPicker(editor, $scope, function(currentTarget, userData){
|
tinyMceService.createMediaPicker(editor, $scope, function(currentTarget, userData){
|
||||||
var ignoreUserStartNodes = false;
|
|
||||||
var startNodeId = userData.startMediaIds.length !== 1 ? -1 : userData.startMediaIds[0];
|
var startNodeId = userData.startMediaIds.length !== 1 ? -1 : userData.startMediaIds[0];
|
||||||
var startNodeIsVirtual = userData.startMediaIds.length !== 1;
|
var startNodeIsVirtual = userData.startMediaIds.length !== 1;
|
||||||
|
|
||||||
if ($scope.model.config.ignoreUserStartNodes === "1") {
|
if ($scope.model.config.ignoreUserStartNodes === "1") {
|
||||||
ignoreUserStartNodes = true;
|
|
||||||
startNodeId = -1;
|
startNodeId = -1;
|
||||||
startNodeIsVirtual = true;
|
startNodeIsVirtual = true;
|
||||||
}
|
}
|
||||||
@@ -303,7 +311,7 @@ angular.module("umbraco")
|
|||||||
disableFolderSelect: true,
|
disableFolderSelect: true,
|
||||||
startNodeId: startNodeId,
|
startNodeId: startNodeId,
|
||||||
startNodeIsVirtual: startNodeIsVirtual,
|
startNodeIsVirtual: startNodeIsVirtual,
|
||||||
ignoreUserStartNodes: ignoreUserStartNodes,
|
dataTypeId: dataTypeId,
|
||||||
view: "mediapicker",
|
view: "mediapicker",
|
||||||
show: true,
|
show: true,
|
||||||
submit: function(model) {
|
submit: function(model) {
|
||||||
|
|||||||
@@ -135,7 +135,10 @@
|
|||||||
|
|
||||||
//anytime a user is changing another user's password, we are in effect resetting it so we need to set that flag here
|
//anytime a user is changing another user's password, we are in effect resetting it so we need to set that flag here
|
||||||
if (vm.user.changePassword) {
|
if (vm.user.changePassword) {
|
||||||
vm.user.changePassword.reset = !vm.user.changePassword.oldPassword && !vm.user.isCurrentUser;
|
//NOTE: the check for allowManuallyChangingPassword is due to this legacy user membership provider setting, if that is true, then the current user
|
||||||
|
//can change their own password without entering their current one (this is a legacy setting since that is a security issue but we need to maintain compat).
|
||||||
|
//if allowManuallyChangingPassword=false, then we are using default settings and the user will need to enter their old password to change their own password.
|
||||||
|
vm.user.changePassword.reset = (!vm.user.changePassword.oldPassword && !vm.user.isCurrentUser) || vm.changePasswordModel.config.allowManuallyChangingPassword;
|
||||||
}
|
}
|
||||||
|
|
||||||
vm.page.saveButtonState = "busy";
|
vm.page.saveButtonState = "busy";
|
||||||
|
|||||||
@@ -251,13 +251,12 @@
|
|||||||
</umb-button>
|
</umb-button>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<umb-button type="button" ng-if="model.user.userDisplayState.key !== 'Invited'"
|
<umb-button type="button" ng-if="model.user.userDisplayState.key !== 'Invited' && model.changePasswordModel.isChanging === false"
|
||||||
button-style="[info,block]"
|
button-style="[info,block]"
|
||||||
action="model.toggleChangePassword()"
|
action="model.toggleChangePassword()"
|
||||||
label="Change password"
|
label="Change password"
|
||||||
label-key="general_changePassword"
|
label-key="general_changePassword"
|
||||||
state="changePasswordButtonState"
|
state="changePasswordButtonState"
|
||||||
ng-if="model.changePasswordModel.isChanging === false"
|
|
||||||
size="s">
|
size="s">
|
||||||
</umb-button>
|
</umb-button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
+1
-1
@@ -12,7 +12,7 @@ namespace Umbraco.Web.UI.Properties {
|
|||||||
|
|
||||||
|
|
||||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")]
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.8.0.0")]
|
||||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||||
|
|
||||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="12.0">
|
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="12.0">
|
||||||
<Import Project="..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.0\build\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props" Condition="Exists('..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.0\build\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" />
|
<Import Project="..\packages\MSBuild.Microsoft.VisualStudio.Web.targets.14.0.0.3\build\MSBuild.Microsoft.VisualStudio.Web.targets.props" Condition="Exists('..\packages\MSBuild.Microsoft.VisualStudio.Web.targets.14.0.0.3\build\MSBuild.Microsoft.VisualStudio.Web.targets.props')" />
|
||||||
|
<Import Project="..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\build\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props" Condition="Exists('..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\build\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" />
|
||||||
<Import Project="..\packages\Microsoft.Net.Compilers.1.3.2\build\Microsoft.Net.Compilers.props" Condition="Exists('..\packages\Microsoft.Net.Compilers.1.3.2\build\Microsoft.Net.Compilers.props')" />
|
<Import Project="..\packages\Microsoft.Net.Compilers.1.3.2\build\Microsoft.Net.Compilers.props" Condition="Exists('..\packages\Microsoft.Net.Compilers.1.3.2\build\Microsoft.Net.Compilers.props')" />
|
||||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
@@ -39,7 +40,7 @@
|
|||||||
<SccProvider>
|
<SccProvider>
|
||||||
</SccProvider>
|
</SccProvider>
|
||||||
<OldToolsVersion>4.0</OldToolsVersion>
|
<OldToolsVersion>4.0</OldToolsVersion>
|
||||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
|
||||||
<TargetFrameworkProfile />
|
<TargetFrameworkProfile />
|
||||||
<UseIISExpress>true</UseIISExpress>
|
<UseIISExpress>true</UseIISExpress>
|
||||||
<IISExpressSSLPort>
|
<IISExpressSSLPort>
|
||||||
@@ -131,17 +132,17 @@
|
|||||||
<Reference Include="dotless.Core, Version=1.5.2.0, Culture=neutral, PublicKeyToken=96b446c9e63eae34, processorArchitecture=MSIL">
|
<Reference Include="dotless.Core, Version=1.5.2.0, Culture=neutral, PublicKeyToken=96b446c9e63eae34, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\dotless.1.5.2\lib\dotless.Core.dll</HintPath>
|
<HintPath>..\packages\dotless.1.5.2\lib\dotless.Core.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Examine, Version=0.1.89.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="Examine, Version=0.1.90.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Examine.0.1.89\lib\net45\Examine.dll</HintPath>
|
<HintPath>..\packages\Examine.0.1.90\lib\net45\Examine.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="ICSharpCode.SharpZipLib, Version=0.86.0.518, Culture=neutral, PublicKeyToken=1b03e6acf1164f73, processorArchitecture=MSIL">
|
<Reference Include="ICSharpCode.SharpZipLib, Version=0.86.0.518, Culture=neutral, PublicKeyToken=1b03e6acf1164f73, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\SharpZipLib.0.86.0\lib\20\ICSharpCode.SharpZipLib.dll</HintPath>
|
<HintPath>..\packages\SharpZipLib.0.86.0\lib\20\ICSharpCode.SharpZipLib.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="ImageProcessor, Version=2.5.6.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="ImageProcessor, Version=2.7.0.100, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\ImageProcessor.2.5.6\lib\net45\ImageProcessor.dll</HintPath>
|
<HintPath>..\packages\ImageProcessor.2.7.0.100\lib\net452\ImageProcessor.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="ImageProcessor.Web, Version=4.8.7.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="ImageProcessor.Web, Version=4.10.0.100, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\ImageProcessor.Web.4.8.7\lib\net45\ImageProcessor.Web.dll</HintPath>
|
<HintPath>..\packages\ImageProcessor.Web.4.10.0.100\lib\net452\ImageProcessor.Web.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
|
<Reference Include="log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\log4net.2.0.8\lib\net45-full\log4net.dll</HintPath>
|
<HintPath>..\packages\log4net.2.0.8\lib\net45-full\log4net.dll</HintPath>
|
||||||
@@ -149,13 +150,11 @@
|
|||||||
<Reference Include="Lucene.Net, Version=2.9.4.1, Culture=neutral, PublicKeyToken=85089178b9ac3181, processorArchitecture=MSIL">
|
<Reference Include="Lucene.Net, Version=2.9.4.1, Culture=neutral, PublicKeyToken=85089178b9ac3181, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Lucene.Net.2.9.4.1\lib\net40\Lucene.Net.dll</HintPath>
|
<HintPath>..\packages\Lucene.Net.2.9.4.1\lib\net40\Lucene.Net.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.AspNet.Identity.Core">
|
<Reference Include="Microsoft.AspNet.Identity.Core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.AspNet.Identity.Core.2.2.1\lib\net45\Microsoft.AspNet.Identity.Core.dll</HintPath>
|
<HintPath>..\packages\Microsoft.AspNet.Identity.Core.2.2.2\lib\net45\Microsoft.AspNet.Identity.Core.dll</HintPath>
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.AspNet.Identity.Owin, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.AspNet.Identity.Owin, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<HintPath>..\packages\Microsoft.AspNet.Identity.Owin.2.2.2\lib\net45\Microsoft.AspNet.Identity.Owin.dll</HintPath>
|
||||||
<HintPath>..\packages\Microsoft.AspNet.Identity.Owin.2.2.1\lib\net45\Microsoft.AspNet.Identity.Owin.dll</HintPath>
|
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.CodeAnalysis, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.CodeAnalysis, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.CodeAnalysis.Common.1.0.0\lib\net45\Microsoft.CodeAnalysis.dll</HintPath>
|
<HintPath>..\packages\Microsoft.CodeAnalysis.Common.1.0.0\lib\net45\Microsoft.CodeAnalysis.dll</HintPath>
|
||||||
@@ -163,27 +162,27 @@
|
|||||||
<Reference Include="Microsoft.CodeAnalysis.CSharp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.CodeAnalysis.CSharp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.CodeAnalysis.CSharp.1.0.0\lib\net45\Microsoft.CodeAnalysis.CSharp.dll</HintPath>
|
<HintPath>..\packages\Microsoft.CodeAnalysis.CSharp.1.0.0\lib\net45\Microsoft.CodeAnalysis.CSharp.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.0\lib\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll</HintPath>
|
<HintPath>..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\lib\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.CSharp" />
|
<Reference Include="Microsoft.CSharp" />
|
||||||
<Reference Include="Microsoft.IO.RecyclableMemoryStream, Version=1.2.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.IO.RecyclableMemoryStream, Version=1.2.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.IO.RecyclableMemoryStream.1.2.2\lib\net45\Microsoft.IO.RecyclableMemoryStream.dll</HintPath>
|
<HintPath>..\packages\Microsoft.IO.RecyclableMemoryStream.1.2.2\lib\net45\Microsoft.IO.RecyclableMemoryStream.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Owin, Version=3.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Owin, Version=4.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.Owin.3.1.0\lib\net45\Microsoft.Owin.dll</HintPath>
|
<HintPath>..\packages\Microsoft.Owin.4.0.1\lib\net45\Microsoft.Owin.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Owin.Host.SystemWeb, Version=3.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Owin.Host.SystemWeb, Version=4.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.Owin.Host.SystemWeb.3.1.0\lib\net45\Microsoft.Owin.Host.SystemWeb.dll</HintPath>
|
<HintPath>..\packages\Microsoft.Owin.Host.SystemWeb.4.0.1\lib\net45\Microsoft.Owin.Host.SystemWeb.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Owin.Security, Version=3.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Owin.Security, Version=4.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.Owin.Security.3.1.0\lib\net45\Microsoft.Owin.Security.dll</HintPath>
|
<HintPath>..\packages\Microsoft.Owin.Security.4.0.1\lib\net45\Microsoft.Owin.Security.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Owin.Security.Cookies, Version=3.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Owin.Security.Cookies, Version=4.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.Owin.Security.Cookies.3.1.0\lib\net45\Microsoft.Owin.Security.Cookies.dll</HintPath>
|
<HintPath>..\packages\Microsoft.Owin.Security.Cookies.4.0.1\lib\net45\Microsoft.Owin.Security.Cookies.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Owin.Security.OAuth, Version=3.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Owin.Security.OAuth, Version=4.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.Owin.Security.OAuth.3.1.0\lib\net45\Microsoft.Owin.Security.OAuth.dll</HintPath>
|
<HintPath>..\packages\Microsoft.Owin.Security.OAuth.4.0.1\lib\net45\Microsoft.Owin.Security.OAuth.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
@@ -196,8 +195,8 @@
|
|||||||
<Reference Include="MySql.Data, Version=6.9.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
|
<Reference Include="MySql.Data, Version=6.9.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\MySql.Data.6.9.9\lib\net45\MySql.Data.dll</HintPath>
|
<HintPath>..\packages\MySql.Data.6.9.9\lib\net45\MySql.Data.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Newtonsoft.Json.10.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
|
<HintPath>..\packages\Newtonsoft.Json.12.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Owin">
|
<Reference Include="Owin">
|
||||||
<HintPath>..\packages\Owin.1.0\lib\net40\Owin.dll</HintPath>
|
<HintPath>..\packages\Owin.1.0\lib\net40\Owin.dll</HintPath>
|
||||||
@@ -231,9 +230,8 @@
|
|||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<Private>False</Private>
|
<Private>False</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Net.Http.Formatting, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="System.Net.Http.Formatting, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<HintPath>..\packages\Microsoft.AspNet.WebApi.Client.5.2.7\lib\net45\System.Net.Http.Formatting.dll</HintPath>
|
||||||
<HintPath>..\packages\Microsoft.AspNet.WebApi.Client.5.2.3\lib\net45\System.Net.Http.Formatting.dll</HintPath>
|
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Net.Http.WebRequest, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
<Reference Include="System.Net.Http.WebRequest, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
@@ -256,39 +254,31 @@
|
|||||||
<Reference Include="System.Web.Extensions" />
|
<Reference Include="System.Web.Extensions" />
|
||||||
<Reference Include="System.Web.Extensions.Design" />
|
<Reference Include="System.Web.Extensions.Design" />
|
||||||
<Reference Include="System.Web.Helpers, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="System.Web.Helpers, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.Helpers.dll</HintPath>
|
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.Helpers.dll</HintPath>
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Web.Http, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="System.Web.Http, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<HintPath>..\packages\Microsoft.AspNet.WebApi.Core.5.2.7\lib\net45\System.Web.Http.dll</HintPath>
|
||||||
<HintPath>..\packages\Microsoft.AspNet.WebApi.Core.5.2.3\lib\net45\System.Web.Http.dll</HintPath>
|
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Web.Http.WebHost, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="System.Web.Http.WebHost, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<HintPath>..\packages\Microsoft.AspNet.WebApi.WebHost.5.2.7\lib\net45\System.Web.Http.WebHost.dll</HintPath>
|
||||||
<HintPath>..\packages\Microsoft.AspNet.WebApi.WebHost.5.2.3\lib\net45\System.Web.Http.WebHost.dll</HintPath>
|
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="System.Web.Mvc, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.AspNet.Mvc.5.2.3\lib\net45\System.Web.Mvc.dll</HintPath>
|
<HintPath>..\packages\Microsoft.AspNet.Mvc.5.2.7\lib\net45\System.Web.Mvc.dll</HintPath>
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Web.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="System.Web.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.AspNet.Razor.3.2.3\lib\net45\System.Web.Razor.dll</HintPath>
|
<HintPath>..\packages\Microsoft.AspNet.Razor.3.2.7\lib\net45\System.Web.Razor.dll</HintPath>
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Web.Services">
|
<Reference Include="System.Web.Services">
|
||||||
<Name>System.Web.Services</Name>
|
<Name>System.Web.Services</Name>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Web.WebPages, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="System.Web.WebPages, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.dll</HintPath>
|
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.WebPages.dll</HintPath>
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Web.WebPages.Deployment, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="System.Web.WebPages.Deployment, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.Deployment.dll</HintPath>
|
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.WebPages.Deployment.dll</HintPath>
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.Razor.dll</HintPath>
|
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.WebPages.Razor.dll</HintPath>
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Xml">
|
<Reference Include="System.Xml">
|
||||||
<Name>System.XML</Name>
|
<Name>System.XML</Name>
|
||||||
@@ -1038,9 +1028,9 @@ xcopy "$(ProjectDir)"..\packages\SqlServerCE.4.0.0.1\x86\*.* "$(TargetDir)x86\"
|
|||||||
<WebProjectProperties>
|
<WebProjectProperties>
|
||||||
<UseIIS>True</UseIIS>
|
<UseIIS>True</UseIIS>
|
||||||
<AutoAssignPort>True</AutoAssignPort>
|
<AutoAssignPort>True</AutoAssignPort>
|
||||||
<DevelopmentServerPort>7140</DevelopmentServerPort>
|
<DevelopmentServerPort>7151</DevelopmentServerPort>
|
||||||
<DevelopmentServerVPath>/</DevelopmentServerVPath>
|
<DevelopmentServerVPath>/</DevelopmentServerVPath>
|
||||||
<IISUrl>http://localhost:7140</IISUrl>
|
<IISUrl>http://localhost:7151</IISUrl>
|
||||||
<NTLMAuthentication>False</NTLMAuthentication>
|
<NTLMAuthentication>False</NTLMAuthentication>
|
||||||
<UseCustomServer>False</UseCustomServer>
|
<UseCustomServer>False</UseCustomServer>
|
||||||
<CustomServerUrl>
|
<CustomServerUrl>
|
||||||
@@ -1098,6 +1088,7 @@ xcopy "$(ProjectDir)"..\packages\SqlServerCE.4.0.0.1\x86\*.* "$(TargetDir)x86\"
|
|||||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Error Condition="!Exists('..\packages\Microsoft.Net.Compilers.1.3.2\build\Microsoft.Net.Compilers.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Net.Compilers.1.3.2\build\Microsoft.Net.Compilers.props'))" />
|
<Error Condition="!Exists('..\packages\Microsoft.Net.Compilers.1.3.2\build\Microsoft.Net.Compilers.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Net.Compilers.1.3.2\build\Microsoft.Net.Compilers.props'))" />
|
||||||
<Error Condition="!Exists('..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.0\build\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.0\build\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props'))" />
|
<Error Condition="!Exists('..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\build\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\build\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props'))" />
|
||||||
|
<Error Condition="!Exists('..\packages\MSBuild.Microsoft.VisualStudio.Web.targets.14.0.0.3\build\MSBuild.Microsoft.VisualStudio.Web.targets.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MSBuild.Microsoft.VisualStudio.Web.targets.14.0.0.3\build\MSBuild.Microsoft.VisualStudio.Web.targets.props'))" />
|
||||||
</Target>
|
</Target>
|
||||||
</Project>
|
</Project>
|
||||||
@@ -130,5 +130,12 @@
|
|||||||
<apiEndpoint><![CDATA[https://publish.twitter.com/oembed]]></apiEndpoint>
|
<apiEndpoint><![CDATA[https://publish.twitter.com/oembed]]></apiEndpoint>
|
||||||
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, umbraco">
|
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, umbraco">
|
||||||
</requestParams>
|
</requestParams>
|
||||||
|
</provider>
|
||||||
|
<!-- Giphy Embed support -->
|
||||||
|
<provider name="Giphy" type="Umbraco.Web.Media.EmbedProviders.OEmbedJson, umbraco">
|
||||||
|
<urlShemeRegex><![CDATA[giphy\.com/]]></urlShemeRegex>
|
||||||
|
<apiEndpoint><![CDATA[https://giphy.com/services/oembed?url=]]></apiEndpoint>
|
||||||
|
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, umbraco">
|
||||||
|
</requestParams>
|
||||||
</provider>
|
</provider>
|
||||||
</embed>
|
</embed>
|
||||||
|
|||||||
@@ -130,5 +130,12 @@
|
|||||||
<apiEndpoint><![CDATA[https://publish.twitter.com/oembed]]></apiEndpoint>
|
<apiEndpoint><![CDATA[https://publish.twitter.com/oembed]]></apiEndpoint>
|
||||||
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, umbraco">
|
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, umbraco">
|
||||||
</requestParams>
|
</requestParams>
|
||||||
|
</provider>
|
||||||
|
<!-- Giphy Embed support -->
|
||||||
|
<provider name="Giphy" type="Umbraco.Web.Media.EmbedProviders.OEmbedJson, umbraco">
|
||||||
|
<urlShemeRegex><![CDATA[giphy\.com/]]></urlShemeRegex>
|
||||||
|
<apiEndpoint><![CDATA[https://giphy.com/services/oembed?url=]]></apiEndpoint>
|
||||||
|
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, umbraco">
|
||||||
|
</requestParams>
|
||||||
</provider>
|
</provider>
|
||||||
</embed>
|
</embed>
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<caching currentCache="DiskCache">
|
<caching currentCache="DiskCache">
|
||||||
<caches>
|
<caches>
|
||||||
<cache name="DiskCache" type="ImageProcessor.Web.Caching.DiskCache, ImageProcessor.Web" maxDays="365" browserMaxDays="7" trimCache="false">
|
<cache trimCache="false" name="DiskCache" type="ImageProcessor.Web.Caching.DiskCache, ImageProcessor.Web" maxDays="365" memoryMaxMinutes="1" browserMaxDays="7">
|
||||||
<settings>
|
|
||||||
|
<settings>
|
||||||
<setting key="VirtualCachePath" value="~/app_data/cache" />
|
<setting key="VirtualCachePath" value="~/app_data/cache" />
|
||||||
</settings>
|
</settings></cache>
|
||||||
</cache>
|
|
||||||
</caches>
|
</caches>
|
||||||
</caching>
|
</caching>
|
||||||
@@ -1,10 +1,16 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<processing preserveExifMetaData="true" fixGamma="false" interceptAllRequests="false" allowCacheBuster="true">
|
<processing preserveExifMetaData="true" metaDataMode="None" fixGamma="false" interceptAllRequests="false" allowCacheBuster="true">
|
||||||
<presets>
|
|
||||||
</presets>
|
|
||||||
<plugins>
|
<presets>
|
||||||
|
</presets><plugins>
|
||||||
<plugin name="Alpha" type="ImageProcessor.Web.Processors.Alpha, ImageProcessor.Web" />
|
<plugin name="Alpha" type="ImageProcessor.Web.Processors.Alpha, ImageProcessor.Web" />
|
||||||
<plugin name="AutoRotate" type="ImageProcessor.Web.Processors.AutoRotate, ImageProcessor.Web" enabled="true" />
|
<plugin name="AutoRotate" type="ImageProcessor.Web.Processors.AutoRotate, ImageProcessor.Web" enabled="true" />
|
||||||
|
<plugin name="Background" type="ImageProcessor.Web.Processors.Background, ImageProcessor.Web">
|
||||||
|
<settings>
|
||||||
|
<setting key="VirtualPath" value="~/images/imageprocessor/background/" />
|
||||||
|
</settings>
|
||||||
|
</plugin>
|
||||||
<plugin name="BackgroundColor" type="ImageProcessor.Web.Processors.BackgroundColor, ImageProcessor.Web" enabled="true" />
|
<plugin name="BackgroundColor" type="ImageProcessor.Web.Processors.BackgroundColor, ImageProcessor.Web" enabled="true" />
|
||||||
<plugin name="Brightness" type="ImageProcessor.Web.Processors.Brightness, ImageProcessor.Web" />
|
<plugin name="Brightness" type="ImageProcessor.Web.Processors.Brightness, ImageProcessor.Web" />
|
||||||
<plugin name="Contrast" type="ImageProcessor.Web.Processors.Contrast, ImageProcessor.Web" />
|
<plugin name="Contrast" type="ImageProcessor.Web.Processors.Contrast, ImageProcessor.Web" />
|
||||||
@@ -58,5 +64,4 @@
|
|||||||
<plugin name="Tint" type="ImageProcessor.Web.Processors.Tint, ImageProcessor.Web" />
|
<plugin name="Tint" type="ImageProcessor.Web.Processors.Tint, ImageProcessor.Web" />
|
||||||
<plugin name="Vignette" type="ImageProcessor.Web.Processors.Vignette, ImageProcessor.Web" />
|
<plugin name="Vignette" type="ImageProcessor.Web.Processors.Vignette, ImageProcessor.Web" />
|
||||||
<plugin name="Watermark" type="ImageProcessor.Web.Processors.Watermark, ImageProcessor.Web" />
|
<plugin name="Watermark" type="ImageProcessor.Web.Processors.Watermark, ImageProcessor.Web" />
|
||||||
</plugins>
|
</plugins></processing>
|
||||||
</processing>
|
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<security>
|
<security>
|
||||||
<services>
|
|
||||||
|
<services>
|
||||||
<service name="LocalFileImageService" type="ImageProcessor.Web.Services.LocalFileImageService, ImageProcessor.Web" />
|
<service name="LocalFileImageService" type="ImageProcessor.Web.Services.LocalFileImageService, ImageProcessor.Web" />
|
||||||
<!--Disable the LocalFileImageService and enable this one when using virtual paths. -->
|
<!--Disable the LocalFileImageService and enable this one when using virtual paths. -->
|
||||||
<!--<service name="CloudImageService" type="ImageProcessor.Web.Services.CloudImageService, ImageProcessor.Web">
|
<!--<service name="CloudImageService" type="ImageProcessor.Web.Services.CloudImageService, ImageProcessor.Web">
|
||||||
@@ -20,5 +21,4 @@
|
|||||||
<whitelist>
|
<whitelist>
|
||||||
</whitelist>
|
</whitelist>
|
||||||
</service>
|
</service>
|
||||||
</services>
|
</services></security>
|
||||||
</security>
|
|
||||||
@@ -4,39 +4,40 @@
|
|||||||
<package id="ClientDependency" version="1.9.7" targetFramework="net45" />
|
<package id="ClientDependency" version="1.9.7" targetFramework="net45" />
|
||||||
<package id="ClientDependency-Mvc5" version="1.8.0.0" targetFramework="net45" />
|
<package id="ClientDependency-Mvc5" version="1.8.0.0" targetFramework="net45" />
|
||||||
<package id="dotless" version="1.5.2" targetFramework="net45" />
|
<package id="dotless" version="1.5.2" targetFramework="net45" />
|
||||||
<package id="Examine" version="0.1.89" targetFramework="net45" />
|
<package id="Examine" version="0.1.90" targetFramework="net45" />
|
||||||
<package id="ImageProcessor" version="2.5.6" targetFramework="net45" />
|
<package id="ImageProcessor" version="2.7.0.100" targetFramework="net452" />
|
||||||
<package id="ImageProcessor.Web" version="4.8.7" targetFramework="net45" />
|
<package id="ImageProcessor.Web" version="4.10.0.100" targetFramework="net452" />
|
||||||
<package id="ImageProcessor.Web.Config" version="2.3.1" targetFramework="net45" />
|
<package id="ImageProcessor.Web.Config" version="2.5.0.100" targetFramework="net452" />
|
||||||
<package id="log4net" version="2.0.8" targetFramework="net45" />
|
<package id="log4net" version="2.0.8" targetFramework="net45" />
|
||||||
<package id="Lucene.Net" version="2.9.4.1" targetFramework="net45" />
|
<package id="Lucene.Net" version="2.9.4.1" targetFramework="net45" />
|
||||||
<package id="Microsoft.AspNet.Identity.Core" version="2.2.1" targetFramework="net45" />
|
<package id="Microsoft.AspNet.Identity.Core" version="2.2.2" targetFramework="net452" />
|
||||||
<package id="Microsoft.AspNet.Identity.Owin" version="2.2.1" targetFramework="net45" />
|
<package id="Microsoft.AspNet.Identity.Owin" version="2.2.2" targetFramework="net452" />
|
||||||
<package id="Microsoft.AspNet.Mvc" version="5.2.3" targetFramework="net45" />
|
<package id="Microsoft.AspNet.Mvc" version="5.2.7" targetFramework="net452" />
|
||||||
<package id="Microsoft.AspNet.Razor" version="3.2.3" targetFramework="net45" />
|
<package id="Microsoft.AspNet.Razor" version="3.2.7" targetFramework="net452" />
|
||||||
<package id="Microsoft.AspNet.WebApi" version="5.2.3" targetFramework="net45" />
|
<package id="Microsoft.AspNet.WebApi" version="5.2.7" targetFramework="net452" />
|
||||||
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.3" targetFramework="net45" />
|
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.7" targetFramework="net452" />
|
||||||
<package id="Microsoft.AspNet.WebApi.Core" version="5.2.3" targetFramework="net45" />
|
<package id="Microsoft.AspNet.WebApi.Core" version="5.2.7" targetFramework="net452" />
|
||||||
<package id="Microsoft.AspNet.WebApi.WebHost" version="5.2.3" targetFramework="net45" />
|
<package id="Microsoft.AspNet.WebApi.WebHost" version="5.2.7" targetFramework="net452" />
|
||||||
<package id="Microsoft.AspNet.WebPages" version="3.2.3" targetFramework="net45" />
|
<package id="Microsoft.AspNet.WebPages" version="3.2.7" targetFramework="net452" />
|
||||||
<package id="Microsoft.CodeAnalysis.Analyzers" version="1.0.0" targetFramework="net45" />
|
<package id="Microsoft.CodeAnalysis.Analyzers" version="1.0.0" targetFramework="net452" developmentDependency="true" />
|
||||||
<package id="Microsoft.CodeAnalysis.Common" version="1.0.0" targetFramework="net45" />
|
<package id="Microsoft.CodeAnalysis.Common" version="1.0.0" targetFramework="net452" />
|
||||||
<package id="Microsoft.CodeAnalysis.CSharp" version="1.0.0" targetFramework="net45" />
|
<package id="Microsoft.CodeAnalysis.CSharp" version="1.0.0" targetFramework="net452" />
|
||||||
<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="2.0.0" targetFramework="net45" />
|
<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="2.0.1" targetFramework="net452" />
|
||||||
<package id="Microsoft.IO.RecyclableMemoryStream" version="1.2.2" targetFramework="net45" />
|
<package id="Microsoft.IO.RecyclableMemoryStream" version="1.2.2" targetFramework="net45" />
|
||||||
<package id="Microsoft.Net.Compilers" version="1.3.2" targetFramework="net45" developmentDependency="true" />
|
<package id="Microsoft.Net.Compilers" version="1.3.2" targetFramework="net452" developmentDependency="true" />
|
||||||
<package id="Microsoft.Owin" version="3.1.0" targetFramework="net45" />
|
<package id="Microsoft.Owin" version="4.0.1" targetFramework="net452" />
|
||||||
<package id="Microsoft.Owin.Host.SystemWeb" version="3.1.0" targetFramework="net45" />
|
<package id="Microsoft.Owin.Host.SystemWeb" version="4.0.1" targetFramework="net452" />
|
||||||
<package id="Microsoft.Owin.Security" version="3.1.0" targetFramework="net45" />
|
<package id="Microsoft.Owin.Security" version="4.0.1" targetFramework="net452" />
|
||||||
<package id="Microsoft.Owin.Security.Cookies" version="3.1.0" targetFramework="net45" />
|
<package id="Microsoft.Owin.Security.Cookies" version="4.0.1" targetFramework="net452" />
|
||||||
<package id="Microsoft.Owin.Security.OAuth" version="3.1.0" targetFramework="net45" />
|
<package id="Microsoft.Owin.Security.OAuth" version="4.0.1" targetFramework="net452" />
|
||||||
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net45" />
|
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net45" />
|
||||||
<package id="MiniProfiler" version="2.1.0" targetFramework="net45" />
|
<package id="MiniProfiler" version="2.1.0" targetFramework="net45" />
|
||||||
|
<package id="MSBuild.Microsoft.VisualStudio.Web.targets" version="14.0.0.3" targetFramework="net452" />
|
||||||
<package id="MySql.Data" version="6.9.9" targetFramework="net45" />
|
<package id="MySql.Data" version="6.9.9" targetFramework="net45" />
|
||||||
<package id="Newtonsoft.Json" version="10.0.2" targetFramework="net45" />
|
<package id="Newtonsoft.Json" version="12.0.2" targetFramework="net452" />
|
||||||
<package id="Owin" version="1.0" targetFramework="net45" />
|
<package id="Owin" version="1.0" targetFramework="net45" />
|
||||||
<package id="SqlServerCE" version="4.0.0.1" targetFramework="net45" />
|
<package id="SqlServerCE" version="4.0.0.1" targetFramework="net45" />
|
||||||
<package id="System.Collections.Immutable" version="1.1.36" targetFramework="net45" />
|
<package id="System.Collections.Immutable" version="1.1.36" targetFramework="net452" />
|
||||||
<package id="System.Reflection.Metadata" version="1.0.21" targetFramework="net45" />
|
<package id="System.Reflection.Metadata" version="1.0.21" targetFramework="net452" />
|
||||||
<package id="Umbraco.ModelsBuilder" version="3.0.10" targetFramework="net45" />
|
<package id="Umbraco.ModelsBuilder" version="3.0.10" targetFramework="net45" />
|
||||||
</packages>
|
</packages>
|
||||||
@@ -95,9 +95,9 @@
|
|||||||
</providers>
|
</providers>
|
||||||
</membership>
|
</membership>
|
||||||
|
|
||||||
<httpRuntime targetFramework="4.5" fcnMode="Single" maxRequestLength="1048576" xdt:Transform="SetAttributes(targetFramework,fcnMode,maxRequestLength)" />
|
<httpRuntime targetFramework="4.5.2" fcnMode="Single" maxRequestLength="1048576" xdt:Transform="SetAttributes(targetFramework,fcnMode,maxRequestLength)" />
|
||||||
|
|
||||||
<compilation debug="true" targetFramework="4.5" xdt:Transform="SetAttributes(debug,targetFramework)">
|
<compilation debug="true" targetFramework="4.5.2" xdt:Transform="SetAttributes(debug,targetFramework)">
|
||||||
<assemblies xdt:Transform="Remove" />
|
<assemblies xdt:Transform="Remove" />
|
||||||
<assemblies xdt:Transform="Insert" />
|
<assemblies xdt:Transform="Insert" />
|
||||||
<assemblies>
|
<assemblies>
|
||||||
@@ -356,7 +356,7 @@
|
|||||||
xdt:Locator="Condition(_defaultNamespace:assemblyIdentity[@name='System.Web.Mvc']])" />
|
xdt:Locator="Condition(_defaultNamespace:assemblyIdentity[@name='System.Web.Mvc']])" />
|
||||||
<dependentAssembly xdt:Transform="Insert">
|
<dependentAssembly xdt:Transform="Insert">
|
||||||
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
|
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
|
||||||
<bindingRedirect oldVersion="1.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
|
<bindingRedirect oldVersion="1.0.0.0-5.2.7.0" newVersion="5.2.7.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
|
|
||||||
<dependentAssembly xdt:Transform="Remove"
|
<dependentAssembly xdt:Transform="Remove"
|
||||||
@@ -370,7 +370,7 @@
|
|||||||
xdt:Locator="Condition(_defaultNamespace:assemblyIdentity[@name='System.Web.Http']])"/>
|
xdt:Locator="Condition(_defaultNamespace:assemblyIdentity[@name='System.Web.Http']])"/>
|
||||||
<dependentAssembly xdt:Transform="Insert">
|
<dependentAssembly xdt:Transform="Insert">
|
||||||
<assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" />
|
<assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0"/>
|
<bindingRedirect oldVersion="0.0.0.0-5.2.7.0" newVersion="5.2.7.0"/>
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
|
|
||||||
<dependentAssembly xdt:Transform="Remove"
|
<dependentAssembly xdt:Transform="Remove"
|
||||||
@@ -392,42 +392,42 @@
|
|||||||
xdt:Locator="Condition(_defaultNamespace:assemblyIdentity[@name='HtmlAgilityPack']])" />
|
xdt:Locator="Condition(_defaultNamespace:assemblyIdentity[@name='HtmlAgilityPack']])" />
|
||||||
<dependentAssembly xdt:Transform="Insert">
|
<dependentAssembly xdt:Transform="Insert">
|
||||||
<assemblyIdentity name="HtmlAgilityPack" publicKeyToken="bd319b19eaf3b43a" culture="neutral" />
|
<assemblyIdentity name="HtmlAgilityPack" publicKeyToken="bd319b19eaf3b43a" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-1.4.9.5" newVersion="1.4.9.5" />
|
<bindingRedirect oldVersion="0.0.0.0-1.8.8.0" newVersion="1.8.8.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
|
|
||||||
<dependentAssembly xdt:Transform="Remove"
|
<dependentAssembly xdt:Transform="Remove"
|
||||||
xdt:Locator="Condition(_defaultNamespace:assemblyIdentity[@name='Newtonsoft.Json']])"/>
|
xdt:Locator="Condition(_defaultNamespace:assemblyIdentity[@name='Newtonsoft.Json']])"/>
|
||||||
<dependentAssembly xdt:Transform="Insert">
|
<dependentAssembly xdt:Transform="Insert">
|
||||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-10.0.0.0" newVersion="10.0.0.0" />
|
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
|
|
||||||
<dependentAssembly xdt:Transform="Remove"
|
<dependentAssembly xdt:Transform="Remove"
|
||||||
xdt:Locator="Condition(_defaultNamespace:assemblyIdentity[@name='Microsoft.Owin']])" />
|
xdt:Locator="Condition(_defaultNamespace:assemblyIdentity[@name='Microsoft.Owin']])" />
|
||||||
<dependentAssembly xdt:Transform="Insert">
|
<dependentAssembly xdt:Transform="Insert">
|
||||||
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" />
|
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
|
|
||||||
<dependentAssembly xdt:Transform="Remove"
|
<dependentAssembly xdt:Transform="Remove"
|
||||||
xdt:Locator="Condition(_defaultNamespace:assemblyIdentity[@name='Microsoft.Owin.Security']])" />
|
xdt:Locator="Condition(_defaultNamespace:assemblyIdentity[@name='Microsoft.Owin.Security']])" />
|
||||||
<dependentAssembly xdt:Transform="Insert">
|
<dependentAssembly xdt:Transform="Insert">
|
||||||
<assemblyIdentity name="Microsoft.Owin.Security" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
<assemblyIdentity name="Microsoft.Owin.Security" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" />
|
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
|
|
||||||
<dependentAssembly xdt:Transform="Remove"
|
<dependentAssembly xdt:Transform="Remove"
|
||||||
xdt:Locator="Condition(_defaultNamespace:assemblyIdentity[@name='Microsoft.Owin.Security.Cookies']])" />
|
xdt:Locator="Condition(_defaultNamespace:assemblyIdentity[@name='Microsoft.Owin.Security.Cookies']])" />
|
||||||
<dependentAssembly xdt:Transform="Insert">
|
<dependentAssembly xdt:Transform="Insert">
|
||||||
<assemblyIdentity name="Microsoft.Owin.Security.Cookies" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
<assemblyIdentity name="Microsoft.Owin.Security.Cookies" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" />
|
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
|
|
||||||
<dependentAssembly xdt:Transform="Remove"
|
<dependentAssembly xdt:Transform="Remove"
|
||||||
xdt:Locator="Condition(_defaultNamespace:assemblyIdentity[@name='Microsoft.Owin.Security.OAuth']])" />
|
xdt:Locator="Condition(_defaultNamespace:assemblyIdentity[@name='Microsoft.Owin.Security.OAuth']])" />
|
||||||
<dependentAssembly xdt:Transform="Insert">
|
<dependentAssembly xdt:Transform="Insert">
|
||||||
<assemblyIdentity name="Microsoft.Owin.Security.OAuth" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
<assemblyIdentity name="Microsoft.Owin.Security.OAuth" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" />
|
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
|
|
||||||
<dependentAssembly xdt:Transform="Remove"
|
<dependentAssembly xdt:Transform="Remove"
|
||||||
|
|||||||
@@ -94,7 +94,7 @@
|
|||||||
<system.web>
|
<system.web>
|
||||||
<customErrors mode="RemoteOnly" />
|
<customErrors mode="RemoteOnly" />
|
||||||
<trace enabled="true" requestLimit="10" pageOutput="false" traceMode="SortByTime" localOnly="true" />
|
<trace enabled="true" requestLimit="10" pageOutput="false" traceMode="SortByTime" localOnly="true" />
|
||||||
<httpRuntime requestValidationMode="2.0" enableVersionHeader="false" targetFramework="4.5" maxRequestLength="51200" fcnMode="Single" />
|
<httpRuntime requestValidationMode="2.0" enableVersionHeader="false" targetFramework="4.5.2" maxRequestLength="51200" fcnMode="Single" />
|
||||||
<!--
|
<!--
|
||||||
If you are deploying to a cloud environment that has multiple web server instances,
|
If you are deploying to a cloud environment that has multiple web server instances,
|
||||||
you should change session state mode from "InProc" to "Custom". In addition,
|
you should change session state mode from "InProc" to "Custom". In addition,
|
||||||
@@ -127,7 +127,7 @@
|
|||||||
<add verb="*" path="DependencyHandler.axd" type="ClientDependency.Core.CompositeFiles.CompositeDependencyHandler, ClientDependency.Core " />
|
<add verb="*" path="DependencyHandler.axd" type="ClientDependency.Core.CompositeFiles.CompositeDependencyHandler, ClientDependency.Core " />
|
||||||
</httpHandlers>
|
</httpHandlers>
|
||||||
|
|
||||||
<compilation defaultLanguage="c#" debug="false" batch="true" targetFramework="4.5" numRecompilesBeforeAppRestart="50">
|
<compilation defaultLanguage="c#" debug="false" batch="true" targetFramework="4.5.2" numRecompilesBeforeAppRestart="50">
|
||||||
<assemblies>
|
<assemblies>
|
||||||
<remove assembly="System.Web.Http" />
|
<remove assembly="System.Web.Http" />
|
||||||
<remove assembly="System.Net.Http" />
|
<remove assembly="System.Net.Http" />
|
||||||
@@ -384,7 +384,7 @@
|
|||||||
<!-- Ensure correct version of HtmlAgilityPack -->
|
<!-- Ensure correct version of HtmlAgilityPack -->
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="HtmlAgilityPack" publicKeyToken="bd319b19eaf3b43a" culture="neutral" />
|
<assemblyIdentity name="HtmlAgilityPack" publicKeyToken="bd319b19eaf3b43a" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-1.4.9.5" newVersion="1.4.9.5" />
|
<bindingRedirect oldVersion="0.0.0.0-1.8.8.0" newVersion="1.8.8.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
|
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
@@ -399,36 +399,36 @@
|
|||||||
|
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-10.0.0.0" newVersion="10.0.0.0" />
|
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
|
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
|
<bindingRedirect oldVersion="0.0.0.0-5.2.7.0" newVersion="5.2.7.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
<assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
|
<bindingRedirect oldVersion="0.0.0.0-5.2.7.0" newVersion="5.2.7.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" />
|
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="Microsoft.Owin.Security.OAuth" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
<assemblyIdentity name="Microsoft.Owin.Security.OAuth" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" />
|
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="Microsoft.Owin.Security" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
<assemblyIdentity name="Microsoft.Owin.Security" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" />
|
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="Microsoft.Owin.Security.Cookies" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
<assemblyIdentity name="Microsoft.Owin.Security.Cookies" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" />
|
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
<assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
|
<bindingRedirect oldVersion="0.0.0.0-5.2.7.0" newVersion="5.2.7.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="log4net" publicKeyToken="669e0ddf0bb1aa2a" culture="neutral" />
|
<assemblyIdentity name="log4net" publicKeyToken="669e0ddf0bb1aa2a" culture="neutral" />
|
||||||
@@ -438,6 +438,18 @@
|
|||||||
<assemblyIdentity name="System.Data.SqlServerCe" publicKeyToken="89845DCD8080CC91" culture="neutral"/>
|
<assemblyIdentity name="System.Data.SqlServerCe" publicKeyToken="89845DCD8080CC91" culture="neutral"/>
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.0.0.1" newVersion="4.0.0.1"/>
|
<bindingRedirect oldVersion="0.0.0.0-4.0.0.1" newVersion="4.0.0.1"/>
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-2.0.1.0" newVersion="2.0.1.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="Microsoft.AspNet.SignalR.Core" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-2.4.1.0" newVersion="2.4.1.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="System.Web.Http.WebHost" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-5.2.7.0" newVersion="5.2.7.0" />
|
||||||
|
</dependentAssembly>
|
||||||
</assemblyBinding>
|
</assemblyBinding>
|
||||||
</runtime>
|
</runtime>
|
||||||
|
|
||||||
@@ -460,8 +472,8 @@
|
|||||||
|
|
||||||
<system.codedom>
|
<system.codedom>
|
||||||
<compilers>
|
<compilers>
|
||||||
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:6 /nowarn:1659;1699;1701" />
|
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:6 /nowarn:1659;1699;1701" />
|
||||||
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:14 /nowarn:41008 /define:_MYTYPE=\"Web\" /optionInfer+" />
|
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:14 /nowarn:41008 /define:_MYTYPE=\"Web\" /optionInfer+" />
|
||||||
</compilers>
|
</compilers>
|
||||||
</system.codedom>
|
</system.codedom>
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ namespace Umbraco.Web.Controllers
|
|||||||
{
|
{
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
[ValidateAntiForgeryToken]
|
[ValidateAntiForgeryToken]
|
||||||
|
[ValidateUmbracoFormRouteString]
|
||||||
public ActionResult HandleLogin([Bind(Prefix = "loginModel")]LoginModel model)
|
public ActionResult HandleLogin([Bind(Prefix = "loginModel")]LoginModel model)
|
||||||
{
|
{
|
||||||
if (ModelState.IsValid == false)
|
if (ModelState.IsValid == false)
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ namespace Umbraco.Web.Controllers
|
|||||||
{
|
{
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
[ValidateAntiForgeryToken]
|
[ValidateAntiForgeryToken]
|
||||||
|
[ValidateUmbracoFormRouteString]
|
||||||
public ActionResult HandleLogout([Bind(Prefix = "logoutModel")]PostRedirectModel model)
|
public ActionResult HandleLogout([Bind(Prefix = "logoutModel")]PostRedirectModel model)
|
||||||
{
|
{
|
||||||
if (ModelState.IsValid == false)
|
if (ModelState.IsValid == false)
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ namespace Umbraco.Web.Controllers
|
|||||||
{
|
{
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
[ValidateAntiForgeryToken]
|
[ValidateAntiForgeryToken]
|
||||||
|
[ValidateUmbracoFormRouteString]
|
||||||
public ActionResult HandleUpdateProfile([Bind(Prefix = "profileModel")] ProfileModel model)
|
public ActionResult HandleUpdateProfile([Bind(Prefix = "profileModel")] ProfileModel model)
|
||||||
{
|
{
|
||||||
var provider = global::Umbraco.Core.Security.MembershipProviderExtensions.GetMembersMembershipProvider();
|
var provider = global::Umbraco.Core.Security.MembershipProviderExtensions.GetMembersMembershipProvider();
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ namespace Umbraco.Web.Controllers
|
|||||||
{
|
{
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
[ValidateAntiForgeryToken]
|
[ValidateAntiForgeryToken]
|
||||||
|
[ValidateUmbracoFormRouteString]
|
||||||
public ActionResult HandleRegisterMember([Bind(Prefix = "registerModel")]RegisterModel model)
|
public ActionResult HandleRegisterMember([Bind(Prefix = "registerModel")]RegisterModel model)
|
||||||
{
|
{
|
||||||
if (ModelState.IsValid == false)
|
if (ModelState.IsValid == false)
|
||||||
|
|||||||
@@ -224,10 +224,6 @@ namespace Umbraco.Web.Editors
|
|||||||
"updateCheckApiBaseUrl", _urlHelper.GetUmbracoApiServiceBaseUrl<UpdateCheckController>(
|
"updateCheckApiBaseUrl", _urlHelper.GetUmbracoApiServiceBaseUrl<UpdateCheckController>(
|
||||||
controller => controller.GetCheck())
|
controller => controller.GetCheck())
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"tagApiBaseUrl", _urlHelper.GetUmbracoApiServiceBaseUrl<TagsController>(
|
|
||||||
controller => controller.GetAllTags(null))
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"templateApiBaseUrl", _urlHelper.GetUmbracoApiServiceBaseUrl<TemplateController>(
|
"templateApiBaseUrl", _urlHelper.GetUmbracoApiServiceBaseUrl<TemplateController>(
|
||||||
controller => controller.GetById(0))
|
controller => controller.GetById(0))
|
||||||
|
|||||||
@@ -262,11 +262,10 @@ namespace Umbraco.Web.Editors
|
|||||||
/// Gets the content json for the content id
|
/// Gets the content json for the content id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="id"></param>
|
/// <param name="id"></param>
|
||||||
/// <param name="ignoreUserStartNodes">If set to true, user and group start node permissions will be ignored.</param>
|
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[OutgoingEditorModelEvent]
|
[OutgoingEditorModelEvent]
|
||||||
[EnsureUserPermissionForContent("id")]
|
[EnsureUserPermissionForContent("id")]
|
||||||
public ContentItemDisplay GetById(int id, [FromUri]bool ignoreUserStartNodes = false)
|
public ContentItemDisplay GetById(int id)
|
||||||
{
|
{
|
||||||
var foundContent = GetObjectFromRequest(() => Services.ContentService.GetById(id));
|
var foundContent = GetObjectFromRequest(() => Services.ContentService.GetById(id));
|
||||||
if (foundContent == null)
|
if (foundContent == null)
|
||||||
@@ -1117,7 +1116,6 @@ namespace Umbraco.Web.Editors
|
|||||||
/// <param name="nodeId">The content to lookup, if the contentItem is not specified</param>
|
/// <param name="nodeId">The content to lookup, if the contentItem is not specified</param>
|
||||||
/// <param name="permissionsToCheck"></param>
|
/// <param name="permissionsToCheck"></param>
|
||||||
/// <param name="contentItem">Specifies the already resolved content item to check against</param>
|
/// <param name="contentItem">Specifies the already resolved content item to check against</param>
|
||||||
/// <param name="ignoreUserStartNodes">If set to true, user and group start node permissions will be ignored.</param>
|
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
internal static bool CheckPermissions(
|
internal static bool CheckPermissions(
|
||||||
IDictionary<string, object> storage,
|
IDictionary<string, object> storage,
|
||||||
@@ -1127,8 +1125,7 @@ namespace Umbraco.Web.Editors
|
|||||||
IEntityService entityService,
|
IEntityService entityService,
|
||||||
int nodeId,
|
int nodeId,
|
||||||
char[] permissionsToCheck = null,
|
char[] permissionsToCheck = null,
|
||||||
IContent contentItem = null,
|
IContent contentItem = null)
|
||||||
bool ignoreUserStartNodes = false)
|
|
||||||
{
|
{
|
||||||
if (storage == null) throw new ArgumentNullException("storage");
|
if (storage == null) throw new ArgumentNullException("storage");
|
||||||
if (user == null) throw new ArgumentNullException("user");
|
if (user == null) throw new ArgumentNullException("user");
|
||||||
@@ -1149,11 +1146,6 @@ namespace Umbraco.Web.Editors
|
|||||||
throw new HttpResponseException(HttpStatusCode.NotFound);
|
throw new HttpResponseException(HttpStatusCode.NotFound);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ignoreUserStartNodes)
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
var hasPathAccess = (nodeId == Constants.System.Root)
|
var hasPathAccess = (nodeId == Constants.System.Root)
|
||||||
? user.HasContentRootAccess(entityService)
|
? user.HasContentRootAccess(entityService)
|
||||||
: (nodeId == Constants.System.RecycleBinContent)
|
: (nodeId == Constants.System.RecycleBinContent)
|
||||||
|
|||||||
@@ -303,9 +303,12 @@ namespace Umbraco.Web.Editors
|
|||||||
//check if the type is trying to allow type 0 below itself - id zero refers to the currently unsaved type
|
//check if the type is trying to allow type 0 below itself - id zero refers to the currently unsaved type
|
||||||
//always filter these 0 types out
|
//always filter these 0 types out
|
||||||
var allowItselfAsChild = false;
|
var allowItselfAsChild = false;
|
||||||
|
var allowIfselfAsChildSortOrder = -1;
|
||||||
if (contentTypeSave.AllowedContentTypes != null)
|
if (contentTypeSave.AllowedContentTypes != null)
|
||||||
{
|
{
|
||||||
|
allowIfselfAsChildSortOrder = contentTypeSave.AllowedContentTypes.IndexOf(0);
|
||||||
allowItselfAsChild = contentTypeSave.AllowedContentTypes.Any(x => x == 0);
|
allowItselfAsChild = contentTypeSave.AllowedContentTypes.Any(x => x == 0);
|
||||||
|
|
||||||
contentTypeSave.AllowedContentTypes = contentTypeSave.AllowedContentTypes.Where(x => x > 0).ToList();
|
contentTypeSave.AllowedContentTypes = contentTypeSave.AllowedContentTypes.Where(x => x > 0).ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -334,10 +337,12 @@ namespace Umbraco.Web.Editors
|
|||||||
saveContentType(newCt);
|
saveContentType(newCt);
|
||||||
|
|
||||||
//we need to save it twice to allow itself under itself.
|
//we need to save it twice to allow itself under itself.
|
||||||
if (allowItselfAsChild)
|
if (allowItselfAsChild && newCt != null)
|
||||||
{
|
{
|
||||||
//NOTE: This will throw if the composition isn't right... but it shouldn't be at this stage
|
newCt.AllowedContentTypes =
|
||||||
newCt.AddContentType(newCt);
|
newCt.AllowedContentTypes.Union(
|
||||||
|
new []{ new ContentTypeSort(newCt.Id, allowIfselfAsChildSortOrder) }
|
||||||
|
);
|
||||||
saveContentType(newCt);
|
saveContentType(newCt);
|
||||||
}
|
}
|
||||||
return newCt;
|
return newCt;
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ using System.Text.RegularExpressions;
|
|||||||
using Umbraco.Core.Persistence.DatabaseModelDefinitions;
|
using Umbraco.Core.Persistence.DatabaseModelDefinitions;
|
||||||
using System.Web.Http.Controllers;
|
using System.Web.Http.Controllers;
|
||||||
using Umbraco.Core.Models.EntityBase;
|
using Umbraco.Core.Models.EntityBase;
|
||||||
|
using Umbraco.Core.Services;
|
||||||
using Umbraco.Core.Xml;
|
using Umbraco.Core.Xml;
|
||||||
using Umbraco.Web.Search;
|
using Umbraco.Web.Search;
|
||||||
using Umbraco.Web.Trees;
|
using Umbraco.Web.Trees;
|
||||||
@@ -30,7 +31,12 @@ namespace Umbraco.Web.Editors
|
|||||||
/// The API controller used for getting entity objects, basic name, icon, id representation of umbraco objects that are based on CMSNode
|
/// The API controller used for getting entity objects, basic name, icon, id representation of umbraco objects that are based on CMSNode
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// Some objects such as macros are not based on CMSNode
|
/// <para>
|
||||||
|
/// This controller allows resolving basic entity data for various entities without placing the hard restrictions on users that may not have access
|
||||||
|
/// to the sections these entities entities exist in. This is to allow pickers, etc... of data to work for all users. In some cases such as accessing
|
||||||
|
/// Members, more explicit security checks are done.
|
||||||
|
/// </para>
|
||||||
|
/// <para>Some objects such as macros are not based on CMSNode</para>
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
[EntityControllerConfiguration]
|
[EntityControllerConfiguration]
|
||||||
[PluginController("UmbracoApi")]
|
[PluginController("UmbracoApi")]
|
||||||
@@ -50,6 +56,7 @@ namespace Umbraco.Web.Editors
|
|||||||
//id is passed in eventually we'll probably want to support GUID + Udi too
|
//id is passed in eventually we'll probably want to support GUID + Udi too
|
||||||
new ParameterSwapControllerActionSelector.ParameterSwapInfo("GetPagedChildren", "id", typeof(int), typeof(string)),
|
new ParameterSwapControllerActionSelector.ParameterSwapInfo("GetPagedChildren", "id", typeof(int), typeof(string)),
|
||||||
new ParameterSwapControllerActionSelector.ParameterSwapInfo("GetPath", "id", typeof(int), typeof(Guid), typeof(Udi)),
|
new ParameterSwapControllerActionSelector.ParameterSwapInfo("GetPath", "id", typeof(int), typeof(Guid), typeof(Udi)),
|
||||||
|
new ParameterSwapControllerActionSelector.ParameterSwapInfo("GetUrlAndAnchors", "id", typeof(int), typeof(Guid), typeof(Udi)),
|
||||||
new ParameterSwapControllerActionSelector.ParameterSwapInfo("GetById", "id", typeof(int), typeof(Guid), typeof(Udi)),
|
new ParameterSwapControllerActionSelector.ParameterSwapInfo("GetById", "id", typeof(int), typeof(Guid), typeof(Udi)),
|
||||||
new ParameterSwapControllerActionSelector.ParameterSwapInfo("GetByIds", "ids", typeof(int[]), typeof(Guid[]), typeof(Udi[]))));
|
new ParameterSwapControllerActionSelector.ParameterSwapInfo("GetByIds", "ids", typeof(int[]), typeof(Guid[]), typeof(Udi[]))));
|
||||||
}
|
}
|
||||||
@@ -82,18 +89,18 @@ namespace Umbraco.Web.Editors
|
|||||||
/// <param name="searchFrom">
|
/// <param name="searchFrom">
|
||||||
/// A starting point for the search, generally a node id, but for members this is a member type alias
|
/// A starting point for the search, generally a node id, but for members this is a member type alias
|
||||||
/// </param>
|
/// </param>
|
||||||
/// <param name="ignoreUserStartNodes">If set to true, user and group start node permissions will be ignored.</param>
|
/// <param name="dataTypeId">If set used to look up whether user and group start node permissions will be ignored.</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
public IEnumerable<EntityBasic> Search(string query, UmbracoEntityTypes type, string searchFrom = null, bool? ignoreUserStartNodes = false)
|
public IEnumerable<EntityBasic> Search(string query, UmbracoEntityTypes type, string searchFrom = null, Guid? dataTypeId = null)
|
||||||
{
|
{
|
||||||
//TODO: Should we restrict search results based on what app the user has access to?
|
// NOTE: Theoretically you shouldn't be able to see member data if you don't have access to members right? ... but there is a member picker, so can't really do that
|
||||||
// - Theoretically you shouldn't be able to see member data if you don't have access to members right?
|
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(query))
|
if (string.IsNullOrEmpty(query))
|
||||||
return Enumerable.Empty<EntityBasic>();
|
return Enumerable.Empty<EntityBasic>();
|
||||||
|
|
||||||
return ExamineSearch(query, type, searchFrom, ignoreUserStartNodes != null && ignoreUserStartNodes.Value);
|
var ignoreUserStartNodes = dataTypeId.HasValue && Services.DataTypeService.IsDataTypeIgnoringUserStartNodes(dataTypeId.Value);
|
||||||
|
return ExamineSearch(query, type, searchFrom, ignoreUserStartNodes);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -193,6 +200,9 @@ namespace Umbraco.Web.Editors
|
|||||||
/// <param name="id">Int id of the entity to fetch URL for</param>
|
/// <param name="id">Int id of the entity to fetch URL for</param>
|
||||||
/// <param name="type">The tpye of entity such as Document, Media, Member</param>
|
/// <param name="type">The tpye of entity such as Document, Media, Member</param>
|
||||||
/// <returns>The URL or path to the item</returns>
|
/// <returns>The URL or path to the item</returns>
|
||||||
|
/// <remarks>
|
||||||
|
/// We are not restricting this with security because there is no sensitive data
|
||||||
|
/// </remarks>
|
||||||
public HttpResponseMessage GetUrl(int id, UmbracoEntityTypes type)
|
public HttpResponseMessage GetUrl(int id, UmbracoEntityTypes type)
|
||||||
{
|
{
|
||||||
var returnUrl = string.Empty;
|
var returnUrl = string.Empty;
|
||||||
@@ -272,6 +282,37 @@ namespace Umbraco.Web.Editors
|
|||||||
publishedContentExists: i => Umbraco.TypedContent(i) != null);
|
publishedContentExists: i => Umbraco.TypedContent(i) != null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[HttpGet]
|
||||||
|
public UrlAndAnchors GetUrlAndAnchors(Udi id)
|
||||||
|
{
|
||||||
|
var nodeId = Umbraco.GetIdForUdi(id);
|
||||||
|
var url = Umbraco.Url(nodeId);
|
||||||
|
var anchorValues = Services.ContentService.GetAnchorValuesFromRTEs(nodeId);
|
||||||
|
return new UrlAndAnchors(url, anchorValues);
|
||||||
|
}
|
||||||
|
|
||||||
|
[HttpGet]
|
||||||
|
public UrlAndAnchors GetUrlAndAnchors(int id)
|
||||||
|
{
|
||||||
|
var url = Umbraco.Url(id);
|
||||||
|
var anchorValues = Services.ContentService.GetAnchorValuesFromRTEs(id);
|
||||||
|
return new UrlAndAnchors(url, anchorValues);
|
||||||
|
}
|
||||||
|
|
||||||
|
public class AnchorsModel
|
||||||
|
{
|
||||||
|
public string RteContent { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
[HttpGet]
|
||||||
|
[HttpPost]
|
||||||
|
public IEnumerable<string> GetAnchors(AnchorsModel model)
|
||||||
|
{
|
||||||
|
var anchorValues = Services.ContentService.GetAnchorValuesFromRTEContent(model.RteContent);
|
||||||
|
return anchorValues;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#region GetById
|
#region GetById
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -403,9 +444,43 @@ namespace Umbraco.Web.Editors
|
|||||||
return GetResultForKeys(ids, type);
|
return GetResultForKeys(ids, type);
|
||||||
}
|
}
|
||||||
|
|
||||||
public IEnumerable<EntityBasic> GetChildren(int id, UmbracoEntityTypes type)
|
public IEnumerable<EntityBasic> GetChildren(int id, UmbracoEntityTypes type, Guid? dataTypeId = null)
|
||||||
{
|
{
|
||||||
return GetResultForChildren(id, type);
|
var objectType = ConvertToObjectType(type);
|
||||||
|
if (objectType.HasValue)
|
||||||
|
{
|
||||||
|
//TODO: Need to check for Object types that support hierarchy here, some might not.
|
||||||
|
|
||||||
|
var startNodes = GetStartNodes(type);
|
||||||
|
|
||||||
|
var ignoreUserStartNodes = IsDataTypeIgnoringUserStartNodes(dataTypeId);
|
||||||
|
|
||||||
|
// root is special: we reduce it to start nodes if the user's start node is not the default, then we need to return their start nodes
|
||||||
|
if (id == Constants.System.Root && startNodes.Length > 0 && startNodes.Contains(Constants.System.Root) == false && !ignoreUserStartNodes)
|
||||||
|
{
|
||||||
|
var nodes = Services.EntityService.GetAll(objectType.Value, startNodes).ToArray();
|
||||||
|
if (nodes.Length == 0)
|
||||||
|
return Enumerable.Empty<EntityBasic>();
|
||||||
|
var pr = new List<EntityBasic>(nodes.Select(Mapper.Map<EntityBasic>));
|
||||||
|
return pr;
|
||||||
|
}
|
||||||
|
|
||||||
|
// else proceed as usual
|
||||||
|
|
||||||
|
return Services.EntityService.GetChildren(id, objectType.Value)
|
||||||
|
.WhereNotNull()
|
||||||
|
.Select(Mapper.Map<EntityBasic>);
|
||||||
|
}
|
||||||
|
//now we need to convert the unknown ones
|
||||||
|
switch (type)
|
||||||
|
{
|
||||||
|
case UmbracoEntityTypes.Domain:
|
||||||
|
case UmbracoEntityTypes.Language:
|
||||||
|
case UmbracoEntityTypes.User:
|
||||||
|
case UmbracoEntityTypes.Macro:
|
||||||
|
default:
|
||||||
|
throw new NotSupportedException("The " + typeof(EntityController) + " does not currently support data for the type " + type);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -426,7 +501,8 @@ namespace Umbraco.Web.Editors
|
|||||||
int pageSize,
|
int pageSize,
|
||||||
string orderBy = "SortOrder",
|
string orderBy = "SortOrder",
|
||||||
Direction orderDirection = Direction.Ascending,
|
Direction orderDirection = Direction.Ascending,
|
||||||
string filter = "")
|
string filter = "",
|
||||||
|
Guid? dataTypeId = null)
|
||||||
{
|
{
|
||||||
int intId;
|
int intId;
|
||||||
|
|
||||||
@@ -455,7 +531,7 @@ namespace Umbraco.Web.Editors
|
|||||||
//the EntityService can search paged members from the root
|
//the EntityService can search paged members from the root
|
||||||
|
|
||||||
intId = -1;
|
intId = -1;
|
||||||
return GetPagedChildren(intId, type, pageNumber, pageSize, orderBy, orderDirection, filter);
|
return GetPagedChildren(intId, type, pageNumber, pageSize, orderBy, orderDirection, filter, dataTypeId);
|
||||||
}
|
}
|
||||||
|
|
||||||
//the EntityService cannot search members of a certain type, this is currently not supported and would require
|
//the EntityService cannot search members of a certain type, this is currently not supported and would require
|
||||||
@@ -488,7 +564,8 @@ namespace Umbraco.Web.Editors
|
|||||||
int pageSize,
|
int pageSize,
|
||||||
string orderBy = "SortOrder",
|
string orderBy = "SortOrder",
|
||||||
Direction orderDirection = Direction.Ascending,
|
Direction orderDirection = Direction.Ascending,
|
||||||
string filter = "")
|
string filter = "",
|
||||||
|
Guid? dataTypeId = null)
|
||||||
{
|
{
|
||||||
if (pageNumber <= 0)
|
if (pageNumber <= 0)
|
||||||
throw new HttpResponseException(HttpStatusCode.NotFound);
|
throw new HttpResponseException(HttpStatusCode.NotFound);
|
||||||
@@ -498,8 +575,31 @@ namespace Umbraco.Web.Editors
|
|||||||
var objectType = ConvertToObjectType(type);
|
var objectType = ConvertToObjectType(type);
|
||||||
if (objectType.HasValue)
|
if (objectType.HasValue)
|
||||||
{
|
{
|
||||||
|
IEnumerable<IUmbracoEntity> entities;
|
||||||
long totalRecords;
|
long totalRecords;
|
||||||
var entities = Services.EntityService.GetPagedChildren(id, objectType.Value, pageNumber - 1, pageSize, out totalRecords, orderBy, orderDirection, filter);
|
|
||||||
|
var startNodes = GetStartNodes(type);
|
||||||
|
|
||||||
|
var ignoreUserStartNodes = IsDataTypeIgnoringUserStartNodes(dataTypeId);
|
||||||
|
|
||||||
|
// root is special: we reduce it to start nodes if the user's start node is not the default, then we need to return their start nodes
|
||||||
|
if (id == Constants.System.Root && startNodes.Length > 0 && startNodes.Contains(Constants.System.Root) == false && !ignoreUserStartNodes)
|
||||||
|
{
|
||||||
|
if (pageNumber > 0)
|
||||||
|
return new PagedResult<EntityBasic>(0, 0, 0);
|
||||||
|
var nodes = Services.EntityService.GetAll(objectType.Value, startNodes).ToArray();
|
||||||
|
if (nodes.Length == 0)
|
||||||
|
return new PagedResult<EntityBasic>(0, 0, 0);
|
||||||
|
if (pageSize < nodes.Length) pageSize = nodes.Length; // bah
|
||||||
|
var pr = new PagedResult<EntityBasic>(nodes.Length, pageNumber, pageSize)
|
||||||
|
{
|
||||||
|
Items = nodes.Select(Mapper.Map<EntityBasic>)
|
||||||
|
};
|
||||||
|
return pr;
|
||||||
|
}
|
||||||
|
|
||||||
|
// else proceed as usual
|
||||||
|
entities = Services.EntityService.GetPagedChildren(id, objectType.Value, pageNumber - 1, pageSize, out totalRecords, orderBy, orderDirection, filter);
|
||||||
|
|
||||||
if (totalRecords == 0)
|
if (totalRecords == 0)
|
||||||
{
|
{
|
||||||
@@ -528,6 +628,21 @@ namespace Umbraco.Web.Editors
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private int[] GetStartNodes(UmbracoEntityTypes type)
|
||||||
|
{
|
||||||
|
switch (type)
|
||||||
|
{
|
||||||
|
case UmbracoEntityTypes.Document:
|
||||||
|
return Security.CurrentUser.CalculateContentStartNodeIds(Services.EntityService);
|
||||||
|
case UmbracoEntityTypes.Media:
|
||||||
|
return Security.CurrentUser.CalculateMediaStartNodeIds(Services.EntityService);
|
||||||
|
default:
|
||||||
|
return new int[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public PagedResult<EntityBasic> GetPagedDescendants(
|
public PagedResult<EntityBasic> GetPagedDescendants(
|
||||||
int id,
|
int id,
|
||||||
UmbracoEntityTypes type,
|
UmbracoEntityTypes type,
|
||||||
@@ -536,7 +651,7 @@ namespace Umbraco.Web.Editors
|
|||||||
string orderBy = "SortOrder",
|
string orderBy = "SortOrder",
|
||||||
Direction orderDirection = Direction.Ascending,
|
Direction orderDirection = Direction.Ascending,
|
||||||
string filter = "",
|
string filter = "",
|
||||||
bool ignoreUserStartNodes = false)
|
Guid? dataTypeId = null)
|
||||||
{
|
{
|
||||||
if (pageNumber <= 0)
|
if (pageNumber <= 0)
|
||||||
throw new HttpResponseException(HttpStatusCode.NotFound);
|
throw new HttpResponseException(HttpStatusCode.NotFound);
|
||||||
@@ -553,17 +668,9 @@ namespace Umbraco.Web.Editors
|
|||||||
{
|
{
|
||||||
// root is special: we reduce it to start nodes
|
// root is special: we reduce it to start nodes
|
||||||
|
|
||||||
int[] aids = null;
|
int[] aids = GetStartNodes(type);
|
||||||
switch (type)
|
|
||||||
{
|
|
||||||
case UmbracoEntityTypes.Document:
|
|
||||||
aids = Security.CurrentUser.CalculateContentStartNodeIds(Services.EntityService);
|
|
||||||
break;
|
|
||||||
case UmbracoEntityTypes.Media:
|
|
||||||
aids = Security.CurrentUser.CalculateMediaStartNodeIds(Services.EntityService);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
var ignoreUserStartNodes = IsDataTypeIgnoringUserStartNodes(dataTypeId);
|
||||||
entities = aids == null || aids.Contains(Constants.System.Root) || ignoreUserStartNodes
|
entities = aids == null || aids.Contains(Constants.System.Root) || ignoreUserStartNodes
|
||||||
? Services.EntityService.GetPagedDescendantsFromRoot(objectType.Value, pageNumber - 1, pageSize, out totalRecords, orderBy, orderDirection, filter, includeTrashed: false)
|
? Services.EntityService.GetPagedDescendantsFromRoot(objectType.Value, pageNumber - 1, pageSize, out totalRecords, orderBy, orderDirection, filter, includeTrashed: false)
|
||||||
: Services.EntityService.GetPagedDescendants(aids, objectType.Value, pageNumber - 1, pageSize, out totalRecords, orderBy, orderDirection, filter);
|
: Services.EntityService.GetPagedDescendants(aids, objectType.Value, pageNumber - 1, pageSize, out totalRecords, orderBy, orderDirection, filter);
|
||||||
@@ -600,9 +707,11 @@ namespace Umbraco.Web.Editors
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public IEnumerable<EntityBasic> GetAncestors(int id, UmbracoEntityTypes type, bool ignoreUserStartNodes = false)
|
private bool IsDataTypeIgnoringUserStartNodes(Guid? dataTypeId) => dataTypeId.HasValue && Services.DataTypeService.IsDataTypeIgnoringUserStartNodes(dataTypeId.Value);
|
||||||
|
|
||||||
|
public IEnumerable<EntityBasic> GetAncestors(int id, UmbracoEntityTypes type, Guid? dataTypeId = null)
|
||||||
{
|
{
|
||||||
return GetResultForAncestors(id, type, ignoreUserStartNodes);
|
return GetResultForAncestors(id, type, dataTypeId);
|
||||||
}
|
}
|
||||||
|
|
||||||
public IEnumerable<EntityBasic> GetAll(UmbracoEntityTypes type, string postFilter, [FromUri]IDictionary<string, object> postFilterParams)
|
public IEnumerable<EntityBasic> GetAll(UmbracoEntityTypes type, string postFilter, [FromUri]IDictionary<string, object> postFilterParams)
|
||||||
@@ -624,31 +733,7 @@ namespace Umbraco.Web.Editors
|
|||||||
return _treeSearcher.ExamineSearch(Umbraco, query, entityType, 200, 0, out total, searchFrom, ignoreUserStartNodes);
|
return _treeSearcher.ExamineSearch(Umbraco, query, entityType, 200, 0, out total, searchFrom, ignoreUserStartNodes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private IEnumerable<EntityBasic> GetResultForAncestors(int id, UmbracoEntityTypes entityType, Guid? dataTypeId = null)
|
||||||
private IEnumerable<EntityBasic> GetResultForChildren(int id, UmbracoEntityTypes entityType)
|
|
||||||
{
|
|
||||||
var objectType = ConvertToObjectType(entityType);
|
|
||||||
if (objectType.HasValue)
|
|
||||||
{
|
|
||||||
//TODO: Need to check for Object types that support hierarchic here, some might not.
|
|
||||||
|
|
||||||
return Services.EntityService.GetChildren(id, objectType.Value)
|
|
||||||
.WhereNotNull()
|
|
||||||
.Select(Mapper.Map<EntityBasic>);
|
|
||||||
}
|
|
||||||
//now we need to convert the unknown ones
|
|
||||||
switch (entityType)
|
|
||||||
{
|
|
||||||
case UmbracoEntityTypes.Domain:
|
|
||||||
case UmbracoEntityTypes.Language:
|
|
||||||
case UmbracoEntityTypes.User:
|
|
||||||
case UmbracoEntityTypes.Macro:
|
|
||||||
default:
|
|
||||||
throw new NotSupportedException("The " + typeof(EntityController) + " does not currently support data for the type " + entityType);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private IEnumerable<EntityBasic> GetResultForAncestors(int id, UmbracoEntityTypes entityType, bool ignoreUserStartNodes = false)
|
|
||||||
{
|
{
|
||||||
var objectType = ConvertToObjectType(entityType);
|
var objectType = ConvertToObjectType(entityType);
|
||||||
if (objectType.HasValue)
|
if (objectType.HasValue)
|
||||||
@@ -657,6 +742,7 @@ namespace Umbraco.Web.Editors
|
|||||||
|
|
||||||
var ids = Services.EntityService.Get(id).Path.Split(',').Select(int.Parse).Distinct().ToArray();
|
var ids = Services.EntityService.Get(id).Path.Split(',').Select(int.Parse).Distinct().ToArray();
|
||||||
|
|
||||||
|
var ignoreUserStartNodes = IsDataTypeIgnoringUserStartNodes(dataTypeId);
|
||||||
if (ignoreUserStartNodes == false)
|
if (ignoreUserStartNodes == false)
|
||||||
{
|
{
|
||||||
int[] aids = null;
|
int[] aids = null;
|
||||||
|
|||||||
@@ -264,12 +264,11 @@ namespace Umbraco.Web.Editors
|
|||||||
string orderBy = "SortOrder",
|
string orderBy = "SortOrder",
|
||||||
Direction orderDirection = Direction.Ascending,
|
Direction orderDirection = Direction.Ascending,
|
||||||
bool orderBySystemField = true,
|
bool orderBySystemField = true,
|
||||||
string filter = "",
|
string filter = "")
|
||||||
bool ignoreUserStartNodes = false)
|
|
||||||
{
|
{
|
||||||
//if a request is made for the root node data but the user's start node is not the default, then
|
//if a request is made for the root node data but the user's start node is not the default, then
|
||||||
// we need to return their start nodes
|
// we need to return their start nodes
|
||||||
if (id == Constants.System.Root && UserStartNodes.Length > 0 && (UserStartNodes.Contains(Constants.System.Root) == false && ignoreUserStartNodes == false))
|
if (id == Constants.System.Root && UserStartNodes.Length > 0 && UserStartNodes.Contains(Constants.System.Root) == false)
|
||||||
{
|
{
|
||||||
if (pageNumber > 0)
|
if (pageNumber > 0)
|
||||||
return new PagedResult<ContentItemBasic<ContentPropertyBasic, IMedia>>(0, 0, 0);
|
return new PagedResult<ContentItemBasic<ContentPropertyBasic, IMedia>>(0, 0, 0);
|
||||||
@@ -313,6 +312,7 @@ namespace Umbraco.Web.Editors
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
/// This method is obsolete, use the overload with ignoreUserStartNodes instead
|
||||||
/// Returns the child media objects - using the entity GUID id
|
/// Returns the child media objects - using the entity GUID id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="id"></param>
|
/// <param name="id"></param>
|
||||||
@@ -322,8 +322,8 @@ namespace Umbraco.Web.Editors
|
|||||||
/// <param name="orderDirection"></param>
|
/// <param name="orderDirection"></param>
|
||||||
/// <param name="orderBySystemField"></param>
|
/// <param name="orderBySystemField"></param>
|
||||||
/// <param name="filter"></param>
|
/// <param name="filter"></param>
|
||||||
/// <param name="ignoreUserStartNodes">If set to true, user and group start node permissions will be ignored.</param>
|
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
|
[Obsolete("This method is obsolete, use the overload with ignoreUserStartNodes instead", false)]
|
||||||
[FilterAllowedOutgoingMedia(typeof(IEnumerable<ContentItemBasic<ContentPropertyBasic, IMedia>>), "Items")]
|
[FilterAllowedOutgoingMedia(typeof(IEnumerable<ContentItemBasic<ContentPropertyBasic, IMedia>>), "Items")]
|
||||||
public PagedResult<ContentItemBasic<ContentPropertyBasic, IMedia>> GetChildren(Guid id,
|
public PagedResult<ContentItemBasic<ContentPropertyBasic, IMedia>> GetChildren(Guid id,
|
||||||
int pageNumber = 0,
|
int pageNumber = 0,
|
||||||
@@ -331,17 +331,65 @@ namespace Umbraco.Web.Editors
|
|||||||
string orderBy = "SortOrder",
|
string orderBy = "SortOrder",
|
||||||
Direction orderDirection = Direction.Ascending,
|
Direction orderDirection = Direction.Ascending,
|
||||||
bool orderBySystemField = true,
|
bool orderBySystemField = true,
|
||||||
string filter = "",
|
string filter = "")
|
||||||
bool ignoreUserStartNodes = false)
|
{
|
||||||
|
return GetChildren(id, false, pageNumber, pageSize, orderBy, orderDirection, orderBySystemField, filter);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the child media objects - using the entity GUID id
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id"></param>
|
||||||
|
/// <param name="pageNumber"></param>
|
||||||
|
/// <param name="pageSize"></param>
|
||||||
|
/// <param name="orderBy"></param>
|
||||||
|
/// <param name="orderDirection"></param>
|
||||||
|
/// <param name="orderBySystemField"></param>
|
||||||
|
/// <param name="filter"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[FilterAllowedOutgoingMedia(typeof(IEnumerable<ContentItemBasic<ContentPropertyBasic, IMedia>>), "Items")]
|
||||||
|
public PagedResult<ContentItemBasic<ContentPropertyBasic, IMedia>> GetChildren(Guid id,
|
||||||
|
bool ignoreUserStartNodes,
|
||||||
|
int pageNumber = 0,
|
||||||
|
int pageSize = 0,
|
||||||
|
string orderBy = "SortOrder",
|
||||||
|
Direction orderDirection = Direction.Ascending,
|
||||||
|
bool orderBySystemField = true,
|
||||||
|
string filter = "")
|
||||||
{
|
{
|
||||||
var entity = Services.EntityService.GetByKey(id);
|
var entity = Services.EntityService.GetByKey(id);
|
||||||
if (entity != null)
|
if (entity != null)
|
||||||
{
|
{
|
||||||
return GetChildren(entity.Id, pageNumber, pageSize, orderBy, orderDirection, orderBySystemField, filter, ignoreUserStartNodes);
|
return GetChildren(entity.Id, pageNumber, pageSize, orderBy, orderDirection, orderBySystemField, filter);
|
||||||
}
|
}
|
||||||
throw new HttpResponseException(HttpStatusCode.NotFound);
|
throw new HttpResponseException(HttpStatusCode.NotFound);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// This method is obsolete, use the overload with ignoreUserStartNodes instead
|
||||||
|
/// Returns the child media objects - using the entity UDI id
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id"></param>
|
||||||
|
/// <param name="pageNumber"></param>
|
||||||
|
/// <param name="pageSize"></param>
|
||||||
|
/// <param name="orderBy"></param>
|
||||||
|
/// <param name="orderDirection"></param>
|
||||||
|
/// <param name="orderBySystemField"></param>
|
||||||
|
/// <param name="filter"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[Obsolete("This method is obsolete, use the overload with ignoreUserStartNodes instead", false)]
|
||||||
|
[FilterAllowedOutgoingMedia(typeof(IEnumerable<ContentItemBasic<ContentPropertyBasic, IMedia>>), "Items")]
|
||||||
|
public PagedResult<ContentItemBasic<ContentPropertyBasic, IMedia>> GetChildren(Udi id,
|
||||||
|
int pageNumber = 0,
|
||||||
|
int pageSize = 0,
|
||||||
|
string orderBy = "SortOrder",
|
||||||
|
Direction orderDirection = Direction.Ascending,
|
||||||
|
bool orderBySystemField = true,
|
||||||
|
string filter = "")
|
||||||
|
{
|
||||||
|
return GetChildren(id, false, pageNumber, pageSize, orderBy, orderDirection, orderBySystemField, filter);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the child media objects - using the entity UDI id
|
/// Returns the child media objects - using the entity UDI id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -352,17 +400,16 @@ namespace Umbraco.Web.Editors
|
|||||||
/// <param name="orderDirection"></param>
|
/// <param name="orderDirection"></param>
|
||||||
/// <param name="orderBySystemField"></param>
|
/// <param name="orderBySystemField"></param>
|
||||||
/// <param name="filter"></param>
|
/// <param name="filter"></param>
|
||||||
/// <param name="ignoreUserStartNodes">If set to true, user and group start node permissions will be ignored.</param>
|
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[FilterAllowedOutgoingMedia(typeof(IEnumerable<ContentItemBasic<ContentPropertyBasic, IMedia>>), "Items")]
|
[FilterAllowedOutgoingMedia(typeof(IEnumerable<ContentItemBasic<ContentPropertyBasic, IMedia>>), "Items")]
|
||||||
public PagedResult<ContentItemBasic<ContentPropertyBasic, IMedia>> GetChildren(Udi id,
|
public PagedResult<ContentItemBasic<ContentPropertyBasic, IMedia>> GetChildren(Udi id,
|
||||||
|
bool ignoreUserStartNodes,
|
||||||
int pageNumber = 0,
|
int pageNumber = 0,
|
||||||
int pageSize = 0,
|
int pageSize = 0,
|
||||||
string orderBy = "SortOrder",
|
string orderBy = "SortOrder",
|
||||||
Direction orderDirection = Direction.Ascending,
|
Direction orderDirection = Direction.Ascending,
|
||||||
bool orderBySystemField = true,
|
bool orderBySystemField = true,
|
||||||
string filter = "",
|
string filter = "")
|
||||||
bool ignoreUserStartNodes = false)
|
|
||||||
{
|
{
|
||||||
var guidUdi = id as GuidUdi;
|
var guidUdi = id as GuidUdi;
|
||||||
if (guidUdi != null)
|
if (guidUdi != null)
|
||||||
@@ -370,7 +417,7 @@ namespace Umbraco.Web.Editors
|
|||||||
var entity = Services.EntityService.GetByKey(guidUdi.Guid);
|
var entity = Services.EntityService.GetByKey(guidUdi.Guid);
|
||||||
if (entity != null)
|
if (entity != null)
|
||||||
{
|
{
|
||||||
return GetChildren(entity.Id, pageNumber, pageSize, orderBy, orderDirection, orderBySystemField, filter, ignoreUserStartNodes);
|
return GetChildren(entity.Id, pageNumber, pageSize, orderBy, orderDirection, orderBySystemField, filter);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -386,8 +433,7 @@ namespace Umbraco.Web.Editors
|
|||||||
string orderBy = "SortOrder",
|
string orderBy = "SortOrder",
|
||||||
Direction orderDirection = Direction.Ascending,
|
Direction orderDirection = Direction.Ascending,
|
||||||
bool orderBySystemField = true,
|
bool orderBySystemField = true,
|
||||||
string filter = "",
|
string filter = "")
|
||||||
bool ignoreUserStartNodes = false)
|
|
||||||
{
|
{
|
||||||
foreach (var type in new[] { typeof(int), typeof(Guid) })
|
foreach (var type in new[] { typeof(int), typeof(Guid) })
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -155,6 +155,8 @@ namespace Umbraco.Web.Editors
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public Attempt<PasswordChangedModel> ChangePasswordWithMembershipProvider(string username, ChangingPasswordModel passwordModel, MembershipProvider membershipProvider)
|
public Attempt<PasswordChangedModel> ChangePasswordWithMembershipProvider(string username, ChangingPasswordModel passwordModel, MembershipProvider membershipProvider)
|
||||||
{
|
{
|
||||||
|
var umbracoBaseProvider = membershipProvider as MembershipProviderBase;
|
||||||
|
|
||||||
// YES! It is completely insane how many options you have to take into account based on the membership provider. yikes!
|
// YES! It is completely insane how many options you have to take into account based on the membership provider. yikes!
|
||||||
|
|
||||||
if (passwordModel == null) throw new ArgumentNullException("passwordModel");
|
if (passwordModel == null) throw new ArgumentNullException("passwordModel");
|
||||||
@@ -183,7 +185,7 @@ namespace Umbraco.Web.Editors
|
|||||||
//this is only possible when using a membership provider if the membership provider supports AllowManuallyChangingPassword
|
//this is only possible when using a membership provider if the membership provider supports AllowManuallyChangingPassword
|
||||||
if (passwordModel.NewPassword.IsNullOrWhiteSpace() == false)
|
if (passwordModel.NewPassword.IsNullOrWhiteSpace() == false)
|
||||||
{
|
{
|
||||||
if (membershipProvider is MembershipProviderBase umbracoBaseProvider && umbracoBaseProvider.AllowManuallyChangingPassword)
|
if (umbracoBaseProvider !=null && umbracoBaseProvider.AllowManuallyChangingPassword)
|
||||||
{
|
{
|
||||||
//this provider allows manually changing the password without the old password, so we can just do it
|
//this provider allows manually changing the password without the old password, so we can just do it
|
||||||
try
|
try
|
||||||
|
|||||||
@@ -51,13 +51,8 @@ namespace Umbraco.Web.Editors
|
|||||||
if (isAuthorized == false)
|
if (isAuthorized == false)
|
||||||
throw new HttpResponseException(Request.CreateResponse(HttpStatusCode.Unauthorized, isAuthorized.Result));
|
throw new HttpResponseException(Request.CreateResponse(HttpStatusCode.Unauthorized, isAuthorized.Result));
|
||||||
|
|
||||||
//current user needs to be added to a new group if not an admin (possibly only if no other users are added?) to avoid a 401
|
//need to ensure current user is in a group if not an admin to avoid a 401
|
||||||
if(!Security.CurrentUser.IsAdmin() && (userGroupSave.Id == null || Convert.ToInt32(userGroupSave.Id) >= 0)/* && !userGroupSave.Users.Any() */)
|
EnsureNonAdminUserIsInSavedUserGroup(userGroupSave);
|
||||||
{
|
|
||||||
var userIds = userGroupSave.Users.ToList();
|
|
||||||
userIds.Add(Security.CurrentUser.Id);
|
|
||||||
userGroupSave.Users = userIds;
|
|
||||||
}
|
|
||||||
|
|
||||||
//save the group
|
//save the group
|
||||||
Services.UserService.Save(userGroupSave.PersistedUserGroup, userGroupSave.Users.ToArray());
|
Services.UserService.Save(userGroupSave.PersistedUserGroup, userGroupSave.Users.ToArray());
|
||||||
@@ -88,6 +83,23 @@ namespace Umbraco.Web.Editors
|
|||||||
return display;
|
return display;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void EnsureNonAdminUserIsInSavedUserGroup(UserGroupSave userGroupSave)
|
||||||
|
{
|
||||||
|
if (Security.CurrentUser.IsAdmin())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var userIds = userGroupSave.Users.ToList();
|
||||||
|
if (userIds.Contains(Security.CurrentUser.Id))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
userIds.Add(Security.CurrentUser.Id);
|
||||||
|
userGroupSave.Users = userIds;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the scaffold for creating a new user group
|
/// Returns the scaffold for creating a new user group
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user