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 {
|
||||||
|
|||||||
@@ -1,219 +1,219 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Runtime.Serialization;
|
using System.Runtime.Serialization;
|
||||||
using Umbraco.Core.Logging;
|
using Umbraco.Core.Logging;
|
||||||
using Umbraco.Core.Models.EntityBase;
|
using Umbraco.Core.Models.EntityBase;
|
||||||
using Umbraco.Core.Persistence;
|
using Umbraco.Core.Persistence;
|
||||||
using Umbraco.Core.PropertyEditors;
|
using Umbraco.Core.PropertyEditors;
|
||||||
using Umbraco.Core.Services;
|
using Umbraco.Core.Services;
|
||||||
|
|
||||||
namespace Umbraco.Core.Models
|
namespace Umbraco.Core.Models
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Definition of a DataType/PropertyEditor
|
/// Definition of a DataType/PropertyEditor
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// The definition exists as a database reference between an actual DataType/PropertyEditor
|
/// The definition exists as a database reference between an actual DataType/PropertyEditor
|
||||||
/// (identified by its control id), its prevalues (configuration) and the named DataType in the backoffice UI.
|
/// (identified by its control id), its prevalues (configuration) and the named DataType in the backoffice UI.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
[Serializable]
|
[Serializable]
|
||||||
[DataContract(IsReference = true)]
|
[DataContract(IsReference = true)]
|
||||||
public class DataTypeDefinition : Entity, IDataTypeDefinition
|
public class DataTypeDefinition : Entity, IDataTypeDefinition
|
||||||
{
|
{
|
||||||
private int _parentId;
|
private int _parentId;
|
||||||
private string _name;
|
private string _name;
|
||||||
private int _sortOrder;
|
private int _sortOrder;
|
||||||
private int _level;
|
private int _level;
|
||||||
private string _path;
|
private string _path;
|
||||||
private int _creatorId;
|
private int _creatorId;
|
||||||
private bool _trashed;
|
private bool _trashed;
|
||||||
private string _propertyEditorAlias;
|
private string _propertyEditorAlias;
|
||||||
private DataTypeDatabaseType _databaseType;
|
private DataTypeDatabaseType _databaseType;
|
||||||
|
|
||||||
[Obsolete("Property editor's are defined by a string alias from version 7 onwards, use the alternative contructor that specifies an alias")]
|
[Obsolete("Property editor's are defined by a string alias from version 7 onwards, use the alternative contructor that specifies an alias")]
|
||||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||||
public DataTypeDefinition(int parentId, Guid controlId)
|
public DataTypeDefinition(int parentId, Guid controlId)
|
||||||
{
|
{
|
||||||
_parentId = parentId;
|
_parentId = parentId;
|
||||||
|
|
||||||
_propertyEditorAlias = LegacyPropertyEditorIdToAliasConverter.GetAliasFromLegacyId(controlId, false);
|
_propertyEditorAlias = LegacyPropertyEditorIdToAliasConverter.GetAliasFromLegacyId(controlId, false);
|
||||||
if (_propertyEditorAlias == null)
|
if (_propertyEditorAlias == null)
|
||||||
{
|
{
|
||||||
//convert to Label!
|
//convert to Label!
|
||||||
LogHelper.Warn<DataTypeDefinition>("Could not find a GUID -> Alias mapping for the legacy property editor with id " + controlId + ". The DataType has been converted to a Label.");
|
LogHelper.Warn<DataTypeDefinition>("Could not find a GUID -> Alias mapping for the legacy property editor with id " + controlId + ". The DataType has been converted to a Label.");
|
||||||
_propertyEditorAlias = Constants.PropertyEditors.NoEditAlias;
|
_propertyEditorAlias = Constants.PropertyEditors.NoEditAlias;
|
||||||
}
|
}
|
||||||
|
|
||||||
_additionalData = new Dictionary<string, object>();
|
_additionalData = new Dictionary<string, object>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public DataTypeDefinition(int parentId, string propertyEditorAlias)
|
public DataTypeDefinition(int parentId, string propertyEditorAlias)
|
||||||
{
|
{
|
||||||
_parentId = parentId;
|
_parentId = parentId;
|
||||||
_propertyEditorAlias = propertyEditorAlias;
|
_propertyEditorAlias = propertyEditorAlias;
|
||||||
|
|
||||||
_additionalData = new Dictionary<string, object>();
|
_additionalData = new Dictionary<string, object>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public DataTypeDefinition(string propertyEditorAlias)
|
public DataTypeDefinition(string propertyEditorAlias)
|
||||||
{
|
{
|
||||||
_parentId = -1;
|
_parentId = -1;
|
||||||
_propertyEditorAlias = propertyEditorAlias;
|
_propertyEditorAlias = propertyEditorAlias;
|
||||||
|
|
||||||
_additionalData = new Dictionary<string, object>();
|
_additionalData = new Dictionary<string, object>();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static readonly Lazy<PropertySelectors> Ps = new Lazy<PropertySelectors>();
|
private static readonly Lazy<PropertySelectors> Ps = new Lazy<PropertySelectors>();
|
||||||
|
|
||||||
private class PropertySelectors
|
private class PropertySelectors
|
||||||
{
|
{
|
||||||
public readonly PropertyInfo NameSelector = ExpressionHelper.GetPropertyInfo<DataTypeDefinition, string>(x => x.Name);
|
public readonly PropertyInfo NameSelector = ExpressionHelper.GetPropertyInfo<DataTypeDefinition, string>(x => x.Name);
|
||||||
public readonly PropertyInfo ParentIdSelector = ExpressionHelper.GetPropertyInfo<DataTypeDefinition, int>(x => x.ParentId);
|
public readonly PropertyInfo ParentIdSelector = ExpressionHelper.GetPropertyInfo<DataTypeDefinition, int>(x => x.ParentId);
|
||||||
public readonly PropertyInfo SortOrderSelector = ExpressionHelper.GetPropertyInfo<DataTypeDefinition, int>(x => x.SortOrder);
|
public readonly PropertyInfo SortOrderSelector = ExpressionHelper.GetPropertyInfo<DataTypeDefinition, int>(x => x.SortOrder);
|
||||||
public readonly PropertyInfo LevelSelector = ExpressionHelper.GetPropertyInfo<DataTypeDefinition, int>(x => x.Level);
|
public readonly PropertyInfo LevelSelector = ExpressionHelper.GetPropertyInfo<DataTypeDefinition, int>(x => x.Level);
|
||||||
public readonly PropertyInfo PathSelector = ExpressionHelper.GetPropertyInfo<DataTypeDefinition, string>(x => x.Path);
|
public readonly PropertyInfo PathSelector = ExpressionHelper.GetPropertyInfo<DataTypeDefinition, string>(x => x.Path);
|
||||||
public readonly PropertyInfo UserIdSelector = ExpressionHelper.GetPropertyInfo<DataTypeDefinition, int>(x => x.CreatorId);
|
public readonly PropertyInfo UserIdSelector = ExpressionHelper.GetPropertyInfo<DataTypeDefinition, int>(x => x.CreatorId);
|
||||||
public readonly PropertyInfo TrashedSelector = ExpressionHelper.GetPropertyInfo<DataTypeDefinition, bool>(x => x.Trashed);
|
public readonly PropertyInfo TrashedSelector = ExpressionHelper.GetPropertyInfo<DataTypeDefinition, bool>(x => x.Trashed);
|
||||||
public readonly PropertyInfo PropertyEditorAliasSelector = ExpressionHelper.GetPropertyInfo<DataTypeDefinition, string>(x => x.PropertyEditorAlias);
|
public readonly PropertyInfo PropertyEditorAliasSelector = ExpressionHelper.GetPropertyInfo<DataTypeDefinition, string>(x => x.PropertyEditorAlias);
|
||||||
public readonly PropertyInfo DatabaseTypeSelector = ExpressionHelper.GetPropertyInfo<DataTypeDefinition, DataTypeDatabaseType>(x => x.DatabaseType);
|
public readonly PropertyInfo DatabaseTypeSelector = ExpressionHelper.GetPropertyInfo<DataTypeDefinition, DataTypeDatabaseType>(x => x.DatabaseType);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the Id of the Parent entity
|
/// Gets or sets the Id of the Parent entity
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>Might not be necessary if handled as a relation?</remarks>
|
/// <remarks>Might not be necessary if handled as a relation?</remarks>
|
||||||
[DataMember]
|
[DataMember]
|
||||||
public int ParentId
|
public int ParentId
|
||||||
{
|
{
|
||||||
get { return _parentId; }
|
get { return _parentId; }
|
||||||
set { SetPropertyValueAndDetectChanges(value, ref _parentId, Ps.Value.ParentIdSelector); }
|
set { SetPropertyValueAndDetectChanges(value, ref _parentId, Ps.Value.ParentIdSelector); }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the name of the current entity
|
/// Gets or sets the name of the current entity
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DataMember]
|
[DataMember]
|
||||||
public string Name
|
public string Name
|
||||||
{
|
{
|
||||||
get { return _name; }
|
get { return _name; }
|
||||||
set { SetPropertyValueAndDetectChanges(value, ref _name, Ps.Value.NameSelector); }
|
set { SetPropertyValueAndDetectChanges(value, ref _name, Ps.Value.NameSelector); }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the sort order of the content entity
|
/// Gets or sets the sort order of the content entity
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DataMember]
|
[DataMember]
|
||||||
public int SortOrder
|
public int SortOrder
|
||||||
{
|
{
|
||||||
get { return _sortOrder; }
|
get { return _sortOrder; }
|
||||||
set { SetPropertyValueAndDetectChanges(value, ref _sortOrder, Ps.Value.SortOrderSelector); }
|
set { SetPropertyValueAndDetectChanges(value, ref _sortOrder, Ps.Value.SortOrderSelector); }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the level of the content entity
|
/// Gets or sets the level of the content entity
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DataMember]
|
[DataMember]
|
||||||
public int Level
|
public int Level
|
||||||
{
|
{
|
||||||
get { return _level; }
|
get { return _level; }
|
||||||
set { SetPropertyValueAndDetectChanges(value, ref _level, Ps.Value.LevelSelector); }
|
set { SetPropertyValueAndDetectChanges(value, ref _level, Ps.Value.LevelSelector); }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the path
|
/// Gets or sets the path
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DataMember]
|
[DataMember]
|
||||||
public string Path //Setting this value should be handled by the class not the user
|
public string Path //Setting this value should be handled by the class not the user
|
||||||
{
|
{
|
||||||
get { return _path; }
|
get { return _path; }
|
||||||
set { SetPropertyValueAndDetectChanges(value, ref _path, Ps.Value.PathSelector); }
|
set { SetPropertyValueAndDetectChanges(value, ref _path, Ps.Value.PathSelector); }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Id of the user who created this entity
|
/// Id of the user who created this entity
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DataMember]
|
[DataMember]
|
||||||
public int CreatorId
|
public int CreatorId
|
||||||
{
|
{
|
||||||
get { return _creatorId; }
|
get { return _creatorId; }
|
||||||
set { SetPropertyValueAndDetectChanges(value, ref _creatorId, Ps.Value.UserIdSelector); }
|
set { SetPropertyValueAndDetectChanges(value, ref _creatorId, Ps.Value.UserIdSelector); }
|
||||||
}
|
}
|
||||||
|
|
||||||
//NOTE: SD: Why do we have this ??
|
//NOTE: SD: Why do we have this ??
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Boolean indicating whether this entity is Trashed or not.
|
/// Boolean indicating whether this entity is Trashed or not.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DataMember]
|
[DataMember]
|
||||||
public bool Trashed
|
public bool Trashed
|
||||||
{
|
{
|
||||||
get { return _trashed; }
|
get { return _trashed; }
|
||||||
internal set
|
internal set
|
||||||
{
|
{
|
||||||
SetPropertyValueAndDetectChanges(value, ref _trashed, Ps.Value.TrashedSelector);
|
SetPropertyValueAndDetectChanges(value, ref _trashed, Ps.Value.TrashedSelector);
|
||||||
//This is a custom property that is not exposed in IUmbracoEntity so add it to the additional data
|
//This is a custom property that is not exposed in IUmbracoEntity so add it to the additional data
|
||||||
_additionalData["Trashed"] = value;
|
_additionalData["Trashed"] = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[DataMember]
|
[DataMember]
|
||||||
public string PropertyEditorAlias
|
public string PropertyEditorAlias
|
||||||
{
|
{
|
||||||
get { return _propertyEditorAlias; }
|
get { return _propertyEditorAlias; }
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
SetPropertyValueAndDetectChanges(value, ref _propertyEditorAlias, Ps.Value.PropertyEditorAliasSelector);
|
SetPropertyValueAndDetectChanges(value, ref _propertyEditorAlias, Ps.Value.PropertyEditorAliasSelector);
|
||||||
//This is a custom property that is not exposed in IUmbracoEntity so add it to the additional data
|
//This is a custom property that is not exposed in IUmbracoEntity so add it to the additional data
|
||||||
_additionalData["DatabaseType"] = value;
|
_additionalData["DatabaseType"] = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Id of the DataType control
|
/// Id of the DataType control
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DataMember]
|
[DataMember]
|
||||||
[Obsolete("Property editor's are defined by a string alias from version 7 onwards, use the PropertyEditorAlias property instead. This method will return a generated GUID for any property editor alias not explicitly mapped to a legacy ID")]
|
[Obsolete("Property editor's are defined by a string alias from version 7 onwards, use the PropertyEditorAlias property instead. This method will return a generated GUID for any property editor alias not explicitly mapped to a legacy ID")]
|
||||||
public Guid ControlId
|
public Guid ControlId
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return LegacyPropertyEditorIdToAliasConverter.GetLegacyIdFromAlias(
|
return LegacyPropertyEditorIdToAliasConverter.GetLegacyIdFromAlias(
|
||||||
_propertyEditorAlias, LegacyPropertyEditorIdToAliasConverter.NotFoundLegacyIdResponseBehavior.GenerateId).Value;
|
_propertyEditorAlias, LegacyPropertyEditorIdToAliasConverter.NotFoundLegacyIdResponseBehavior.GenerateId).Value;
|
||||||
}
|
}
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
var alias = LegacyPropertyEditorIdToAliasConverter.GetAliasFromLegacyId(value, true);
|
var alias = LegacyPropertyEditorIdToAliasConverter.GetAliasFromLegacyId(value, true);
|
||||||
PropertyEditorAlias = alias;
|
PropertyEditorAlias = alias;
|
||||||
//This is a custom property that is not exposed in IUmbracoEntity so add it to the additional data
|
//This is a custom property that is not exposed in IUmbracoEntity so add it to the additional data
|
||||||
_additionalData["ControlId"] = value;
|
_additionalData["ControlId"] = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets the DatabaseType for which the DataType's value is saved as
|
/// Gets or Sets the DatabaseType for which the DataType's value is saved as
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DataMember]
|
[DataMember]
|
||||||
public DataTypeDatabaseType DatabaseType
|
public DataTypeDatabaseType DatabaseType
|
||||||
{
|
{
|
||||||
get { return _databaseType; }
|
get { return _databaseType; }
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
SetPropertyValueAndDetectChanges(value, ref _databaseType, Ps.Value.DatabaseTypeSelector);
|
SetPropertyValueAndDetectChanges(value, ref _databaseType, Ps.Value.DatabaseTypeSelector);
|
||||||
//This is a custom property that is not exposed in IUmbracoEntity so add it to the additional data
|
//This is a custom property that is not exposed in IUmbracoEntity so add it to the additional data
|
||||||
_additionalData["DatabaseType"] = value;
|
_additionalData["DatabaseType"] = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private readonly IDictionary<string, object> _additionalData;
|
private readonly IDictionary<string, object> _additionalData;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Some entities may expose additional data that other's might not, this custom data will be available in this collection
|
/// Some entities may expose additional data that other's might not, this custom data will be available in this collection
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||||
IDictionary<string, object> IUmbracoEntity.AdditionalData
|
IDictionary<string, object> IUmbracoEntity.AdditionalData
|
||||||
{
|
{
|
||||||
get { return _additionalData; }
|
get { return _additionalData; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,24 +1,24 @@
|
|||||||
using System;
|
using System;
|
||||||
using Umbraco.Core.Models.EntityBase;
|
using Umbraco.Core.Models.EntityBase;
|
||||||
|
|
||||||
namespace Umbraco.Core.Models
|
namespace Umbraco.Core.Models
|
||||||
{
|
{
|
||||||
public interface IDataTypeDefinition : IUmbracoEntity
|
public interface IDataTypeDefinition : IUmbracoEntity
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The Property editor alias assigned to the data type
|
/// The Property editor alias assigned to the data type
|
||||||
/// </summary>
|
/// </summary>
|
||||||
string PropertyEditorAlias { get; set; }
|
string PropertyEditorAlias { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Id of the DataType control
|
/// Id of the DataType control
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Obsolete("Property editor's are defined by a string alias from version 7 onwards, use the PropertyEditorAlias property instead")]
|
[Obsolete("Property editor's are defined by a string alias from version 7 onwards, use the PropertyEditorAlias property instead")]
|
||||||
Guid ControlId { get; set; }
|
Guid ControlId { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets the DatabaseType for which the DataType's value is saved as
|
/// Gets or Sets the DatabaseType for which the DataType's value is saved as
|
||||||
/// </summary>
|
/// </summary>
|
||||||
DataTypeDatabaseType DatabaseType { get; set; }
|
DataTypeDatabaseType DatabaseType { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -193,19 +193,6 @@ namespace Umbraco.Core.Models
|
|||||||
|
|
||||||
// check for a start node in the path
|
// check for a start node in the path
|
||||||
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)
|
||||||
|
|||||||
@@ -1,98 +1,98 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using Umbraco.Core.Models;
|
using Umbraco.Core.Models;
|
||||||
using Umbraco.Core.Models.Rdbms;
|
using Umbraco.Core.Models.Rdbms;
|
||||||
|
|
||||||
namespace Umbraco.Core.Persistence.Factories
|
namespace Umbraco.Core.Persistence.Factories
|
||||||
{
|
{
|
||||||
internal class DataTypeDefinitionFactory
|
internal class DataTypeDefinitionFactory
|
||||||
{
|
{
|
||||||
private readonly Guid _nodeObjectTypeId;
|
private readonly Guid _nodeObjectTypeId;
|
||||||
private int _primaryKey;
|
private int _primaryKey;
|
||||||
|
|
||||||
public DataTypeDefinitionFactory(Guid nodeObjectTypeId)
|
public DataTypeDefinitionFactory(Guid nodeObjectTypeId)
|
||||||
{
|
{
|
||||||
_nodeObjectTypeId = nodeObjectTypeId;
|
_nodeObjectTypeId = nodeObjectTypeId;
|
||||||
}
|
}
|
||||||
|
|
||||||
#region Implementation of IEntityFactory<DataTypeDefinition,DataTypeDto>
|
#region Implementation of IEntityFactory<DataTypeDefinition,DataTypeDto>
|
||||||
|
|
||||||
public IDataTypeDefinition BuildEntity(DataTypeDto dto)
|
public IDataTypeDefinition BuildEntity(DataTypeDto dto)
|
||||||
{
|
{
|
||||||
var dataTypeDefinition = new DataTypeDefinition(dto.PropertyEditorAlias);
|
var dataTypeDefinition = new DataTypeDefinition(dto.PropertyEditorAlias);
|
||||||
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
dataTypeDefinition.DisableChangeTracking();
|
dataTypeDefinition.DisableChangeTracking();
|
||||||
|
|
||||||
dataTypeDefinition.CreateDate = dto.NodeDto.CreateDate;
|
dataTypeDefinition.CreateDate = dto.NodeDto.CreateDate;
|
||||||
dataTypeDefinition.DatabaseType = dto.DbType.EnumParse<DataTypeDatabaseType>(true);
|
dataTypeDefinition.DatabaseType = dto.DbType.EnumParse<DataTypeDatabaseType>(true);
|
||||||
dataTypeDefinition.Id = dto.DataTypeId;
|
dataTypeDefinition.Id = dto.DataTypeId;
|
||||||
dataTypeDefinition.Key = dto.NodeDto.UniqueId;
|
dataTypeDefinition.Key = dto.NodeDto.UniqueId;
|
||||||
dataTypeDefinition.Level = dto.NodeDto.Level;
|
dataTypeDefinition.Level = dto.NodeDto.Level;
|
||||||
dataTypeDefinition.UpdateDate = dto.NodeDto.CreateDate;
|
dataTypeDefinition.UpdateDate = dto.NodeDto.CreateDate;
|
||||||
dataTypeDefinition.Name = dto.NodeDto.Text;
|
dataTypeDefinition.Name = dto.NodeDto.Text;
|
||||||
dataTypeDefinition.ParentId = dto.NodeDto.ParentId;
|
dataTypeDefinition.ParentId = dto.NodeDto.ParentId;
|
||||||
dataTypeDefinition.Path = dto.NodeDto.Path;
|
dataTypeDefinition.Path = dto.NodeDto.Path;
|
||||||
dataTypeDefinition.SortOrder = dto.NodeDto.SortOrder;
|
dataTypeDefinition.SortOrder = dto.NodeDto.SortOrder;
|
||||||
dataTypeDefinition.Trashed = dto.NodeDto.Trashed;
|
dataTypeDefinition.Trashed = dto.NodeDto.Trashed;
|
||||||
dataTypeDefinition.CreatorId = dto.NodeDto.UserId.Value;
|
dataTypeDefinition.CreatorId = dto.NodeDto.UserId.Value;
|
||||||
|
|
||||||
//on initial construction we don't want to have dirty properties tracked
|
//on initial construction we don't want to have dirty properties tracked
|
||||||
// http://issues.umbraco.org/issue/U4-1946
|
// http://issues.umbraco.org/issue/U4-1946
|
||||||
dataTypeDefinition.ResetDirtyProperties(false);
|
dataTypeDefinition.ResetDirtyProperties(false);
|
||||||
return dataTypeDefinition;
|
return dataTypeDefinition;
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
dataTypeDefinition.EnableChangeTracking();
|
dataTypeDefinition.EnableChangeTracking();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public DataTypeDto BuildDto(IDataTypeDefinition entity)
|
public DataTypeDto BuildDto(IDataTypeDefinition entity)
|
||||||
{
|
{
|
||||||
var dataTypeDto = new DataTypeDto
|
var dataTypeDto = new DataTypeDto
|
||||||
{
|
{
|
||||||
PropertyEditorAlias = entity.PropertyEditorAlias,
|
PropertyEditorAlias = entity.PropertyEditorAlias,
|
||||||
DataTypeId = entity.Id,
|
DataTypeId = entity.Id,
|
||||||
DbType = entity.DatabaseType.ToString(),
|
DbType = entity.DatabaseType.ToString(),
|
||||||
NodeDto = BuildNodeDto(entity)
|
NodeDto = BuildNodeDto(entity)
|
||||||
};
|
};
|
||||||
|
|
||||||
if (_primaryKey > 0)
|
if (_primaryKey > 0)
|
||||||
{
|
{
|
||||||
dataTypeDto.PrimaryKey = _primaryKey;
|
dataTypeDto.PrimaryKey = _primaryKey;
|
||||||
}
|
}
|
||||||
|
|
||||||
return dataTypeDto;
|
return dataTypeDto;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public void SetPrimaryKey(int primaryKey)
|
public void SetPrimaryKey(int primaryKey)
|
||||||
{
|
{
|
||||||
_primaryKey = primaryKey;
|
_primaryKey = primaryKey;
|
||||||
}
|
}
|
||||||
|
|
||||||
private NodeDto BuildNodeDto(IDataTypeDefinition entity)
|
private NodeDto BuildNodeDto(IDataTypeDefinition entity)
|
||||||
{
|
{
|
||||||
var nodeDto = new NodeDto
|
var nodeDto = new NodeDto
|
||||||
{
|
{
|
||||||
CreateDate = entity.CreateDate,
|
CreateDate = entity.CreateDate,
|
||||||
NodeId = entity.Id,
|
NodeId = entity.Id,
|
||||||
Level = short.Parse(entity.Level.ToString(CultureInfo.InvariantCulture)),
|
Level = short.Parse(entity.Level.ToString(CultureInfo.InvariantCulture)),
|
||||||
NodeObjectType = _nodeObjectTypeId,
|
NodeObjectType = _nodeObjectTypeId,
|
||||||
ParentId = entity.ParentId,
|
ParentId = entity.ParentId,
|
||||||
Path = entity.Path,
|
Path = entity.Path,
|
||||||
SortOrder = entity.SortOrder,
|
SortOrder = entity.SortOrder,
|
||||||
Text = entity.Name,
|
Text = entity.Name,
|
||||||
Trashed = entity.Trashed,
|
Trashed = entity.Trashed,
|
||||||
UniqueId = entity.Key,
|
UniqueId = entity.Key,
|
||||||
UserId = entity.CreatorId
|
UserId = entity.CreatorId
|
||||||
};
|
};
|
||||||
|
|
||||||
return nodeDto;
|
return nodeDto;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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];
|
||||||
}
|
}
|
||||||
@@ -78,4 +82,4 @@ namespace Umbraco.Core.Persistence.Factories
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,342 +1,342 @@
|
|||||||
using System;
|
using System;
|
||||||
using Umbraco.Core.Configuration;
|
using Umbraco.Core.Configuration;
|
||||||
using Umbraco.Core.Logging;
|
using Umbraco.Core.Logging;
|
||||||
using Umbraco.Core.Models.Rdbms;
|
using Umbraco.Core.Models.Rdbms;
|
||||||
|
|
||||||
namespace Umbraco.Core.Persistence.Migrations.Initial
|
namespace Umbraco.Core.Persistence.Migrations.Initial
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents the initial data creation by running Insert for the base data.
|
/// Represents the initial data creation by running Insert for the base data.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal class BaseDataCreation
|
internal class BaseDataCreation
|
||||||
{
|
{
|
||||||
private readonly Database _database;
|
private readonly Database _database;
|
||||||
private readonly ILogger _logger;
|
private readonly ILogger _logger;
|
||||||
|
|
||||||
public BaseDataCreation(Database database, ILogger logger)
|
public BaseDataCreation(Database database, ILogger logger)
|
||||||
{
|
{
|
||||||
_database = database;
|
_database = database;
|
||||||
_logger = logger;
|
_logger = logger;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initialize the base data creation by inserting the data foundation for umbraco
|
/// Initialize the base data creation by inserting the data foundation for umbraco
|
||||||
/// specific to a table
|
/// specific to a table
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="tableName">Name of the table to create base data for</param>
|
/// <param name="tableName">Name of the table to create base data for</param>
|
||||||
public void InitializeBaseData(string tableName)
|
public void InitializeBaseData(string tableName)
|
||||||
{
|
{
|
||||||
_logger.Info<BaseDataCreation>(string.Format("Creating data in table {0}", tableName));
|
_logger.Info<BaseDataCreation>(string.Format("Creating data in table {0}", tableName));
|
||||||
|
|
||||||
if(tableName.Equals("umbracoNode"))
|
if(tableName.Equals("umbracoNode"))
|
||||||
{
|
{
|
||||||
CreateUmbracoNodeData();
|
CreateUmbracoNodeData();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tableName.Equals("umbracoLock"))
|
if (tableName.Equals("umbracoLock"))
|
||||||
{
|
{
|
||||||
CreateUmbracoLockData();
|
CreateUmbracoLockData();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tableName.Equals("cmsContentType"))
|
if (tableName.Equals("cmsContentType"))
|
||||||
{
|
{
|
||||||
CreateCmsContentTypeData();
|
CreateCmsContentTypeData();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tableName.Equals("umbracoUser"))
|
if (tableName.Equals("umbracoUser"))
|
||||||
{
|
{
|
||||||
CreateUmbracoUserData();
|
CreateUmbracoUserData();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tableName.Equals("umbracoUserGroup"))
|
if (tableName.Equals("umbracoUserGroup"))
|
||||||
{
|
{
|
||||||
CreateUmbracoUserGroupData();
|
CreateUmbracoUserGroupData();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tableName.Equals("umbracoUser2UserGroup"))
|
if (tableName.Equals("umbracoUser2UserGroup"))
|
||||||
{
|
{
|
||||||
CreateUmbracoUser2UserGroupData();
|
CreateUmbracoUser2UserGroupData();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tableName.Equals("umbracoUserGroup2App"))
|
if (tableName.Equals("umbracoUserGroup2App"))
|
||||||
{
|
{
|
||||||
CreateUmbracoUserGroup2AppData();
|
CreateUmbracoUserGroup2AppData();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tableName.Equals("cmsPropertyTypeGroup"))
|
if (tableName.Equals("cmsPropertyTypeGroup"))
|
||||||
{
|
{
|
||||||
CreateCmsPropertyTypeGroupData();
|
CreateCmsPropertyTypeGroupData();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tableName.Equals("cmsPropertyType"))
|
if (tableName.Equals("cmsPropertyType"))
|
||||||
{
|
{
|
||||||
CreateCmsPropertyTypeData();
|
CreateCmsPropertyTypeData();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tableName.Equals("umbracoLanguage"))
|
if (tableName.Equals("umbracoLanguage"))
|
||||||
{
|
{
|
||||||
CreateUmbracoLanguageData();
|
CreateUmbracoLanguageData();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tableName.Equals("cmsContentTypeAllowedContentType"))
|
if (tableName.Equals("cmsContentTypeAllowedContentType"))
|
||||||
{
|
{
|
||||||
CreateCmsContentTypeAllowedContentTypeData();
|
CreateCmsContentTypeAllowedContentTypeData();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(tableName.Equals("cmsDataType"))
|
if(tableName.Equals("cmsDataType"))
|
||||||
{
|
{
|
||||||
CreateCmsDataTypeData();
|
CreateCmsDataTypeData();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tableName.Equals("cmsDataTypePreValues"))
|
if (tableName.Equals("cmsDataTypePreValues"))
|
||||||
{
|
{
|
||||||
CreateCmsDataTypePreValuesData();
|
CreateCmsDataTypePreValuesData();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tableName.Equals("umbracoRelationType"))
|
if (tableName.Equals("umbracoRelationType"))
|
||||||
{
|
{
|
||||||
CreateUmbracoRelationTypeData();
|
CreateUmbracoRelationTypeData();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tableName.Equals("cmsTaskType"))
|
if (tableName.Equals("cmsTaskType"))
|
||||||
{
|
{
|
||||||
CreateCmsTaskTypeData();
|
CreateCmsTaskTypeData();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tableName.Equals("umbracoMigration"))
|
if (tableName.Equals("umbracoMigration"))
|
||||||
{
|
{
|
||||||
CreateUmbracoMigrationData();
|
CreateUmbracoMigrationData();
|
||||||
}
|
}
|
||||||
|
|
||||||
_logger.Info<BaseDataCreation>(string.Format("Done creating data in table {0}", tableName));
|
_logger.Info<BaseDataCreation>(string.Format("Done creating data in table {0}", tableName));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CreateUmbracoNodeData()
|
private void CreateUmbracoNodeData()
|
||||||
{
|
{
|
||||||
_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()
|
||||||
{
|
{
|
||||||
// all lock objects
|
// all lock objects
|
||||||
_database.Insert("umbracoLock", "id", false, new LockDto { Id = Constants.Locks.Servers, Name = "Servers" });
|
_database.Insert("umbracoLock", "id", false, new LockDto { Id = Constants.Locks.Servers, Name = "Servers" });
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CreateCmsContentTypeData()
|
private void CreateCmsContentTypeData()
|
||||||
{
|
{
|
||||||
_database.Insert("cmsContentType", "pk", false, new ContentTypeDto { PrimaryKey = 532, NodeId = 1031, Alias = Constants.Conventions.MediaTypes.Folder, Icon = "icon-folder", Thumbnail = "icon-folder", IsContainer = false, AllowAtRoot = true });
|
_database.Insert("cmsContentType", "pk", false, new ContentTypeDto { PrimaryKey = 532, NodeId = 1031, Alias = Constants.Conventions.MediaTypes.Folder, Icon = "icon-folder", Thumbnail = "icon-folder", IsContainer = false, AllowAtRoot = true });
|
||||||
_database.Insert("cmsContentType", "pk", false, new ContentTypeDto { PrimaryKey = 533, NodeId = 1032, Alias = Constants.Conventions.MediaTypes.Image, Icon = "icon-picture", Thumbnail = "icon-picture", AllowAtRoot = true });
|
_database.Insert("cmsContentType", "pk", false, new ContentTypeDto { PrimaryKey = 533, NodeId = 1032, Alias = Constants.Conventions.MediaTypes.Image, Icon = "icon-picture", Thumbnail = "icon-picture", AllowAtRoot = true });
|
||||||
_database.Insert("cmsContentType", "pk", false, new ContentTypeDto { PrimaryKey = 534, NodeId = 1033, Alias = Constants.Conventions.MediaTypes.File, Icon = "icon-document", Thumbnail = "icon-document", AllowAtRoot = true });
|
_database.Insert("cmsContentType", "pk", false, new ContentTypeDto { PrimaryKey = 534, NodeId = 1033, Alias = Constants.Conventions.MediaTypes.File, Icon = "icon-document", Thumbnail = "icon-document", AllowAtRoot = true });
|
||||||
_database.Insert("cmsContentType", "pk", false, new ContentTypeDto { PrimaryKey = 531, NodeId = 1044, Alias = Constants.Conventions.MemberTypes.DefaultAlias, Icon = "icon-user", Thumbnail = "icon-user" });
|
_database.Insert("cmsContentType", "pk", false, new ContentTypeDto { PrimaryKey = 531, NodeId = 1044, Alias = Constants.Conventions.MemberTypes.DefaultAlias, Icon = "icon-user", Thumbnail = "icon-user" });
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CreateUmbracoUserData()
|
private void CreateUmbracoUserData()
|
||||||
{
|
{
|
||||||
_database.Insert("umbracoUser", "id", false, new UserDto { Id = 0, Disabled = false, NoConsole = false, UserName = "Administrator", Login = "admin", Password = "default", Email = "", UserLanguage = "en-US", CreateDate = DateTime.Now, UpdateDate = DateTime.Now });
|
_database.Insert("umbracoUser", "id", false, new UserDto { Id = 0, Disabled = false, NoConsole = false, UserName = "Administrator", Login = "admin", Password = "default", Email = "", UserLanguage = "en-US", CreateDate = DateTime.Now, UpdateDate = DateTime.Now });
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CreateUmbracoUserGroupData()
|
private void CreateUmbracoUserGroupData()
|
||||||
{
|
{
|
||||||
_database.Insert("umbracoUserGroup", "id", false, new UserGroupDto { Id = 1, StartMediaId = -1, StartContentId = -1, Alias = Constants.Security.AdminGroupAlias, Name = "Administrators", DefaultPermissions = "CADMOSKTPIURZ:5F7ï", CreateDate = DateTime.Now, UpdateDate = DateTime.Now, Icon = "icon-medal" });
|
_database.Insert("umbracoUserGroup", "id", false, new UserGroupDto { Id = 1, StartMediaId = -1, StartContentId = -1, Alias = Constants.Security.AdminGroupAlias, Name = "Administrators", DefaultPermissions = "CADMOSKTPIURZ:5F7ï", CreateDate = DateTime.Now, UpdateDate = DateTime.Now, Icon = "icon-medal" });
|
||||||
_database.Insert("umbracoUserGroup", "id", false, new UserGroupDto { Id = 2, StartMediaId = -1, StartContentId = -1, Alias = "writer", Name = "Writers", DefaultPermissions = "CAH:F", CreateDate = DateTime.Now, UpdateDate = DateTime.Now, Icon = "icon-edit" });
|
_database.Insert("umbracoUserGroup", "id", false, new UserGroupDto { Id = 2, StartMediaId = -1, StartContentId = -1, Alias = "writer", Name = "Writers", DefaultPermissions = "CAH:F", CreateDate = DateTime.Now, UpdateDate = DateTime.Now, Icon = "icon-edit" });
|
||||||
_database.Insert("umbracoUserGroup", "id", false, new UserGroupDto { Id = 3, StartMediaId = -1, StartContentId = -1, Alias = "editor", Name = "Editors", DefaultPermissions = "CADMOSKTPUZ:5Fï", CreateDate = DateTime.Now, UpdateDate = DateTime.Now, Icon = "icon-tools" });
|
_database.Insert("umbracoUserGroup", "id", false, new UserGroupDto { Id = 3, StartMediaId = -1, StartContentId = -1, Alias = "editor", Name = "Editors", DefaultPermissions = "CADMOSKTPUZ:5Fï", CreateDate = DateTime.Now, UpdateDate = DateTime.Now, Icon = "icon-tools" });
|
||||||
_database.Insert("umbracoUserGroup", "id", false, new UserGroupDto { Id = 4, StartMediaId = -1, StartContentId = -1, Alias = Constants.Security.TranslatorGroupAlias, Name = "Translators", DefaultPermissions = "AF", CreateDate = DateTime.Now, UpdateDate = DateTime.Now, Icon = "icon-globe" });
|
_database.Insert("umbracoUserGroup", "id", false, new UserGroupDto { Id = 4, StartMediaId = -1, StartContentId = -1, Alias = Constants.Security.TranslatorGroupAlias, Name = "Translators", DefaultPermissions = "AF", CreateDate = DateTime.Now, UpdateDate = DateTime.Now, Icon = "icon-globe" });
|
||||||
_database.Insert("umbracoUserGroup", "id", false, new UserGroupDto { Id = 5, StartMediaId = -1, StartContentId = -1, Alias = Constants.Security.SensitiveDataGroupAlias, Name = "Sensitive data", DefaultPermissions = "", CreateDate = DateTime.Now, UpdateDate = DateTime.Now, Icon = "icon-lock" });
|
_database.Insert("umbracoUserGroup", "id", false, new UserGroupDto { Id = 5, StartMediaId = -1, StartContentId = -1, Alias = Constants.Security.SensitiveDataGroupAlias, Name = "Sensitive data", DefaultPermissions = "", CreateDate = DateTime.Now, UpdateDate = DateTime.Now, Icon = "icon-lock" });
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CreateUmbracoUser2UserGroupData()
|
private void CreateUmbracoUser2UserGroupData()
|
||||||
{
|
{
|
||||||
_database.Insert(new User2UserGroupDto { UserGroupId = 1, UserId = 0 }); //add admin to admins
|
_database.Insert(new User2UserGroupDto { UserGroupId = 1, UserId = 0 }); //add admin to admins
|
||||||
_database.Insert(new User2UserGroupDto { UserGroupId = 5, UserId = 0 }); //add admin to sensitive data
|
_database.Insert(new User2UserGroupDto { UserGroupId = 5, UserId = 0 }); //add admin to sensitive data
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CreateUmbracoUserGroup2AppData()
|
private void CreateUmbracoUserGroup2AppData()
|
||||||
{
|
{
|
||||||
_database.Insert(new UserGroup2AppDto { UserGroupId = 1, AppAlias = Constants.Applications.Content });
|
_database.Insert(new UserGroup2AppDto { UserGroupId = 1, AppAlias = Constants.Applications.Content });
|
||||||
_database.Insert(new UserGroup2AppDto { UserGroupId = 1, AppAlias = Constants.Applications.Developer });
|
_database.Insert(new UserGroup2AppDto { UserGroupId = 1, AppAlias = Constants.Applications.Developer });
|
||||||
_database.Insert(new UserGroup2AppDto { UserGroupId = 1, AppAlias = Constants.Applications.Media });
|
_database.Insert(new UserGroup2AppDto { UserGroupId = 1, AppAlias = Constants.Applications.Media });
|
||||||
_database.Insert(new UserGroup2AppDto { UserGroupId = 1, AppAlias = Constants.Applications.Members });
|
_database.Insert(new UserGroup2AppDto { UserGroupId = 1, AppAlias = Constants.Applications.Members });
|
||||||
_database.Insert(new UserGroup2AppDto { UserGroupId = 1, AppAlias = Constants.Applications.Settings });
|
_database.Insert(new UserGroup2AppDto { UserGroupId = 1, AppAlias = Constants.Applications.Settings });
|
||||||
_database.Insert(new UserGroup2AppDto { UserGroupId = 1, AppAlias = Constants.Applications.Users });
|
_database.Insert(new UserGroup2AppDto { UserGroupId = 1, AppAlias = Constants.Applications.Users });
|
||||||
_database.Insert(new UserGroup2AppDto { UserGroupId = 1, AppAlias = Constants.Applications.Forms });
|
_database.Insert(new UserGroup2AppDto { UserGroupId = 1, AppAlias = Constants.Applications.Forms });
|
||||||
|
|
||||||
_database.Insert(new UserGroup2AppDto { UserGroupId = 2, AppAlias = Constants.Applications.Content });
|
_database.Insert(new UserGroup2AppDto { UserGroupId = 2, AppAlias = Constants.Applications.Content });
|
||||||
|
|
||||||
_database.Insert(new UserGroup2AppDto { UserGroupId = 3, AppAlias = Constants.Applications.Content });
|
_database.Insert(new UserGroup2AppDto { UserGroupId = 3, AppAlias = Constants.Applications.Content });
|
||||||
_database.Insert(new UserGroup2AppDto { UserGroupId = 3, AppAlias = Constants.Applications.Media });
|
_database.Insert(new UserGroup2AppDto { UserGroupId = 3, AppAlias = Constants.Applications.Media });
|
||||||
_database.Insert(new UserGroup2AppDto { UserGroupId = 3, AppAlias = Constants.Applications.Forms });
|
_database.Insert(new UserGroup2AppDto { UserGroupId = 3, AppAlias = Constants.Applications.Forms });
|
||||||
|
|
||||||
_database.Insert(new UserGroup2AppDto { UserGroupId = 4, AppAlias = Constants.Applications.Translation });
|
_database.Insert(new UserGroup2AppDto { UserGroupId = 4, AppAlias = Constants.Applications.Translation });
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CreateCmsPropertyTypeGroupData()
|
private void CreateCmsPropertyTypeGroupData()
|
||||||
{
|
{
|
||||||
_database.Insert("cmsPropertyTypeGroup", "id", false, new PropertyTypeGroupDto { Id = 3, ContentTypeNodeId = 1032, Text = "Image", SortOrder = 1, UniqueId = new Guid(Constants.PropertyTypeGroups.Image) });
|
_database.Insert("cmsPropertyTypeGroup", "id", false, new PropertyTypeGroupDto { Id = 3, ContentTypeNodeId = 1032, Text = "Image", SortOrder = 1, UniqueId = new Guid(Constants.PropertyTypeGroups.Image) });
|
||||||
_database.Insert("cmsPropertyTypeGroup", "id", false, new PropertyTypeGroupDto { Id = 4, ContentTypeNodeId = 1033, Text = "File", SortOrder = 1, UniqueId = new Guid(Constants.PropertyTypeGroups.File) });
|
_database.Insert("cmsPropertyTypeGroup", "id", false, new PropertyTypeGroupDto { Id = 4, ContentTypeNodeId = 1033, Text = "File", SortOrder = 1, UniqueId = new Guid(Constants.PropertyTypeGroups.File) });
|
||||||
_database.Insert("cmsPropertyTypeGroup", "id", false, new PropertyTypeGroupDto { Id = 5, ContentTypeNodeId = 1031, Text = "Contents", SortOrder = 1, UniqueId = new Guid(Constants.PropertyTypeGroups.Contents) });
|
_database.Insert("cmsPropertyTypeGroup", "id", false, new PropertyTypeGroupDto { Id = 5, ContentTypeNodeId = 1031, Text = "Contents", SortOrder = 1, UniqueId = new Guid(Constants.PropertyTypeGroups.Contents) });
|
||||||
//membership property group
|
//membership property group
|
||||||
_database.Insert("cmsPropertyTypeGroup", "id", false, new PropertyTypeGroupDto { Id = 11, ContentTypeNodeId = 1044, Text = "Membership", SortOrder = 1, UniqueId = new Guid(Constants.PropertyTypeGroups.Membership) });
|
_database.Insert("cmsPropertyTypeGroup", "id", false, new PropertyTypeGroupDto { Id = 11, ContentTypeNodeId = 1044, Text = "Membership", SortOrder = 1, UniqueId = new Guid(Constants.PropertyTypeGroups.Membership) });
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CreateCmsPropertyTypeData()
|
private void CreateCmsPropertyTypeData()
|
||||||
{
|
{
|
||||||
_database.Insert("cmsPropertyType", "id", false, new PropertyTypeDto { Id = 6, UniqueId = 6.ToGuid(), DataTypeId = 1043, ContentTypeId = 1032, PropertyTypeGroupId = 3, Alias = Constants.Conventions.Media.File, Name = "Upload image", SortOrder = 0, Mandatory = false, ValidationRegExp = null, Description = null });
|
_database.Insert("cmsPropertyType", "id", false, new PropertyTypeDto { Id = 6, UniqueId = 6.ToGuid(), DataTypeId = 1043, ContentTypeId = 1032, PropertyTypeGroupId = 3, Alias = Constants.Conventions.Media.File, Name = "Upload image", SortOrder = 0, Mandatory = false, ValidationRegExp = null, Description = null });
|
||||||
_database.Insert("cmsPropertyType", "id", false, new PropertyTypeDto { Id = 7, UniqueId = 7.ToGuid(), DataTypeId = -92, ContentTypeId = 1032, PropertyTypeGroupId = 3, Alias = Constants.Conventions.Media.Width, Name = "Width", SortOrder = 0, Mandatory = false, ValidationRegExp = null, Description = null });
|
_database.Insert("cmsPropertyType", "id", false, new PropertyTypeDto { Id = 7, UniqueId = 7.ToGuid(), DataTypeId = -92, ContentTypeId = 1032, PropertyTypeGroupId = 3, Alias = Constants.Conventions.Media.Width, Name = "Width", SortOrder = 0, Mandatory = false, ValidationRegExp = null, Description = null });
|
||||||
_database.Insert("cmsPropertyType", "id", false, new PropertyTypeDto { Id = 8, UniqueId = 8.ToGuid(), DataTypeId = -92, ContentTypeId = 1032, PropertyTypeGroupId = 3, Alias = Constants.Conventions.Media.Height, Name = "Height", SortOrder = 0, Mandatory = false, ValidationRegExp = null, Description = null });
|
_database.Insert("cmsPropertyType", "id", false, new PropertyTypeDto { Id = 8, UniqueId = 8.ToGuid(), DataTypeId = -92, ContentTypeId = 1032, PropertyTypeGroupId = 3, Alias = Constants.Conventions.Media.Height, Name = "Height", SortOrder = 0, Mandatory = false, ValidationRegExp = null, Description = null });
|
||||||
_database.Insert("cmsPropertyType", "id", false, new PropertyTypeDto { Id = 9, UniqueId = 9.ToGuid(), DataTypeId = -92, ContentTypeId = 1032, PropertyTypeGroupId = 3, Alias = Constants.Conventions.Media.Bytes, Name = "Size", SortOrder = 0, Mandatory = false, ValidationRegExp = null, Description = null });
|
_database.Insert("cmsPropertyType", "id", false, new PropertyTypeDto { Id = 9, UniqueId = 9.ToGuid(), DataTypeId = -92, ContentTypeId = 1032, PropertyTypeGroupId = 3, Alias = Constants.Conventions.Media.Bytes, Name = "Size", SortOrder = 0, Mandatory = false, ValidationRegExp = null, Description = null });
|
||||||
_database.Insert("cmsPropertyType", "id", false, new PropertyTypeDto { Id = 10, UniqueId = 10.ToGuid(), DataTypeId = -92, ContentTypeId = 1032, PropertyTypeGroupId = 3, Alias = Constants.Conventions.Media.Extension, Name = "Type", SortOrder = 0, Mandatory = false, ValidationRegExp = null, Description = null });
|
_database.Insert("cmsPropertyType", "id", false, new PropertyTypeDto { Id = 10, UniqueId = 10.ToGuid(), DataTypeId = -92, ContentTypeId = 1032, PropertyTypeGroupId = 3, Alias = Constants.Conventions.Media.Extension, Name = "Type", SortOrder = 0, Mandatory = false, ValidationRegExp = null, Description = null });
|
||||||
_database.Insert("cmsPropertyType", "id", false, new PropertyTypeDto { Id = 24, UniqueId = 24.ToGuid(), DataTypeId = -90, ContentTypeId = 1033, PropertyTypeGroupId = 4, Alias = Constants.Conventions.Media.File, Name = "Upload file", SortOrder = 0, Mandatory = false, ValidationRegExp = null, Description = null });
|
_database.Insert("cmsPropertyType", "id", false, new PropertyTypeDto { Id = 24, UniqueId = 24.ToGuid(), DataTypeId = -90, ContentTypeId = 1033, PropertyTypeGroupId = 4, Alias = Constants.Conventions.Media.File, Name = "Upload file", SortOrder = 0, Mandatory = false, ValidationRegExp = null, Description = null });
|
||||||
_database.Insert("cmsPropertyType", "id", false, new PropertyTypeDto { Id = 25, UniqueId = 25.ToGuid(), DataTypeId = -92, ContentTypeId = 1033, PropertyTypeGroupId = 4, Alias = Constants.Conventions.Media.Extension, Name = "Type", SortOrder = 0, Mandatory = false, ValidationRegExp = null, Description = null });
|
_database.Insert("cmsPropertyType", "id", false, new PropertyTypeDto { Id = 25, UniqueId = 25.ToGuid(), DataTypeId = -92, ContentTypeId = 1033, PropertyTypeGroupId = 4, Alias = Constants.Conventions.Media.Extension, Name = "Type", SortOrder = 0, Mandatory = false, ValidationRegExp = null, Description = null });
|
||||||
_database.Insert("cmsPropertyType", "id", false, new PropertyTypeDto { Id = 26, UniqueId = 26.ToGuid(), DataTypeId = -92, ContentTypeId = 1033, PropertyTypeGroupId = 4, Alias = Constants.Conventions.Media.Bytes, Name = "Size", SortOrder = 0, Mandatory = false, ValidationRegExp = null, Description = null });
|
_database.Insert("cmsPropertyType", "id", false, new PropertyTypeDto { Id = 26, UniqueId = 26.ToGuid(), DataTypeId = -92, ContentTypeId = 1033, PropertyTypeGroupId = 4, Alias = Constants.Conventions.Media.Bytes, Name = "Size", SortOrder = 0, Mandatory = false, ValidationRegExp = null, Description = null });
|
||||||
_database.Insert("cmsPropertyType", "id", false, new PropertyTypeDto { Id = 27, UniqueId = 27.ToGuid(), DataTypeId = Constants.System.DefaultMediaListViewDataTypeId, ContentTypeId = 1031, PropertyTypeGroupId = 5, Alias = "contents", Name = "Contents:", SortOrder = 0, Mandatory = false, ValidationRegExp = null, Description = null });
|
_database.Insert("cmsPropertyType", "id", false, new PropertyTypeDto { Id = 27, UniqueId = 27.ToGuid(), DataTypeId = Constants.System.DefaultMediaListViewDataTypeId, ContentTypeId = 1031, PropertyTypeGroupId = 5, Alias = "contents", Name = "Contents:", SortOrder = 0, Mandatory = false, ValidationRegExp = null, Description = null });
|
||||||
//membership property types
|
//membership property types
|
||||||
_database.Insert("cmsPropertyType", "id", false, new PropertyTypeDto { Id = 28, UniqueId = 28.ToGuid(), DataTypeId = -89, ContentTypeId = 1044, PropertyTypeGroupId = 11, Alias = Constants.Conventions.Member.Comments, Name = Constants.Conventions.Member.CommentsLabel, SortOrder = 0, Mandatory = false, ValidationRegExp = null, Description = null });
|
_database.Insert("cmsPropertyType", "id", false, new PropertyTypeDto { Id = 28, UniqueId = 28.ToGuid(), DataTypeId = -89, ContentTypeId = 1044, PropertyTypeGroupId = 11, Alias = Constants.Conventions.Member.Comments, Name = Constants.Conventions.Member.CommentsLabel, SortOrder = 0, Mandatory = false, ValidationRegExp = null, Description = null });
|
||||||
_database.Insert("cmsPropertyType", "id", false, new PropertyTypeDto { Id = 29, UniqueId = 29.ToGuid(), DataTypeId = -92, ContentTypeId = 1044, PropertyTypeGroupId = 11, Alias = Constants.Conventions.Member.FailedPasswordAttempts, Name = Constants.Conventions.Member.FailedPasswordAttemptsLabel, SortOrder = 1, Mandatory = false, ValidationRegExp = null, Description = null });
|
_database.Insert("cmsPropertyType", "id", false, new PropertyTypeDto { Id = 29, UniqueId = 29.ToGuid(), DataTypeId = -92, ContentTypeId = 1044, PropertyTypeGroupId = 11, Alias = Constants.Conventions.Member.FailedPasswordAttempts, Name = Constants.Conventions.Member.FailedPasswordAttemptsLabel, SortOrder = 1, Mandatory = false, ValidationRegExp = null, Description = null });
|
||||||
_database.Insert("cmsPropertyType", "id", false, new PropertyTypeDto { Id = 30, UniqueId = 30.ToGuid(), DataTypeId = -49, ContentTypeId = 1044, PropertyTypeGroupId = 11, Alias = Constants.Conventions.Member.IsApproved, Name = Constants.Conventions.Member.IsApprovedLabel, SortOrder = 2, Mandatory = false, ValidationRegExp = null, Description = null });
|
_database.Insert("cmsPropertyType", "id", false, new PropertyTypeDto { Id = 30, UniqueId = 30.ToGuid(), DataTypeId = -49, ContentTypeId = 1044, PropertyTypeGroupId = 11, Alias = Constants.Conventions.Member.IsApproved, Name = Constants.Conventions.Member.IsApprovedLabel, SortOrder = 2, Mandatory = false, ValidationRegExp = null, Description = null });
|
||||||
_database.Insert("cmsPropertyType", "id", false, new PropertyTypeDto { Id = 31, UniqueId = 31.ToGuid(), DataTypeId = -49, ContentTypeId = 1044, PropertyTypeGroupId = 11, Alias = Constants.Conventions.Member.IsLockedOut, Name = Constants.Conventions.Member.IsLockedOutLabel, SortOrder = 3, Mandatory = false, ValidationRegExp = null, Description = null });
|
_database.Insert("cmsPropertyType", "id", false, new PropertyTypeDto { Id = 31, UniqueId = 31.ToGuid(), DataTypeId = -49, ContentTypeId = 1044, PropertyTypeGroupId = 11, Alias = Constants.Conventions.Member.IsLockedOut, Name = Constants.Conventions.Member.IsLockedOutLabel, SortOrder = 3, Mandatory = false, ValidationRegExp = null, Description = null });
|
||||||
_database.Insert("cmsPropertyType", "id", false, new PropertyTypeDto { Id = 32, UniqueId = 32.ToGuid(), DataTypeId = -92, ContentTypeId = 1044, PropertyTypeGroupId = 11, Alias = Constants.Conventions.Member.LastLockoutDate, Name = Constants.Conventions.Member.LastLockoutDateLabel, SortOrder = 4, Mandatory = false, ValidationRegExp = null, Description = null });
|
_database.Insert("cmsPropertyType", "id", false, new PropertyTypeDto { Id = 32, UniqueId = 32.ToGuid(), DataTypeId = -92, ContentTypeId = 1044, PropertyTypeGroupId = 11, Alias = Constants.Conventions.Member.LastLockoutDate, Name = Constants.Conventions.Member.LastLockoutDateLabel, SortOrder = 4, Mandatory = false, ValidationRegExp = null, Description = null });
|
||||||
_database.Insert("cmsPropertyType", "id", false, new PropertyTypeDto { Id = 33, UniqueId = 33.ToGuid(), DataTypeId = -92, ContentTypeId = 1044, PropertyTypeGroupId = 11, Alias = Constants.Conventions.Member.LastLoginDate, Name = Constants.Conventions.Member.LastLoginDateLabel, SortOrder = 5, Mandatory = false, ValidationRegExp = null, Description = null });
|
_database.Insert("cmsPropertyType", "id", false, new PropertyTypeDto { Id = 33, UniqueId = 33.ToGuid(), DataTypeId = -92, ContentTypeId = 1044, PropertyTypeGroupId = 11, Alias = Constants.Conventions.Member.LastLoginDate, Name = Constants.Conventions.Member.LastLoginDateLabel, SortOrder = 5, Mandatory = false, ValidationRegExp = null, Description = null });
|
||||||
_database.Insert("cmsPropertyType", "id", false, new PropertyTypeDto { Id = 34, UniqueId = 34.ToGuid(), DataTypeId = -92, ContentTypeId = 1044, PropertyTypeGroupId = 11, Alias = Constants.Conventions.Member.LastPasswordChangeDate, Name = Constants.Conventions.Member.LastPasswordChangeDateLabel, SortOrder = 6, Mandatory = false, ValidationRegExp = null, Description = null });
|
_database.Insert("cmsPropertyType", "id", false, new PropertyTypeDto { Id = 34, UniqueId = 34.ToGuid(), DataTypeId = -92, ContentTypeId = 1044, PropertyTypeGroupId = 11, Alias = Constants.Conventions.Member.LastPasswordChangeDate, Name = Constants.Conventions.Member.LastPasswordChangeDateLabel, SortOrder = 6, Mandatory = false, ValidationRegExp = null, Description = null });
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CreateUmbracoLanguageData()
|
private void CreateUmbracoLanguageData()
|
||||||
{
|
{
|
||||||
_database.Insert("umbracoLanguage", "id", false, new LanguageDto { Id = 1, IsoCode = "en-US", CultureName = "en-US" });
|
_database.Insert("umbracoLanguage", "id", false, new LanguageDto { Id = 1, IsoCode = "en-US", CultureName = "en-US" });
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CreateCmsContentTypeAllowedContentTypeData()
|
private void CreateCmsContentTypeAllowedContentTypeData()
|
||||||
{
|
{
|
||||||
_database.Insert("cmsContentTypeAllowedContentType", "Id", false, new ContentTypeAllowedContentTypeDto { Id = 1031, AllowedId = 1031 });
|
_database.Insert("cmsContentTypeAllowedContentType", "Id", false, new ContentTypeAllowedContentTypeDto { Id = 1031, AllowedId = 1031 });
|
||||||
_database.Insert("cmsContentTypeAllowedContentType", "Id", false, new ContentTypeAllowedContentTypeDto { Id = 1031, AllowedId = 1032 });
|
_database.Insert("cmsContentTypeAllowedContentType", "Id", false, new ContentTypeAllowedContentTypeDto { Id = 1031, AllowedId = 1032 });
|
||||||
_database.Insert("cmsContentTypeAllowedContentType", "Id", false, new ContentTypeAllowedContentTypeDto { Id = 1031, AllowedId = 1033 });
|
_database.Insert("cmsContentTypeAllowedContentType", "Id", false, new ContentTypeAllowedContentTypeDto { Id = 1031, AllowedId = 1033 });
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CreateCmsDataTypeData()
|
private void CreateCmsDataTypeData()
|
||||||
{
|
{
|
||||||
//TODO Check which of the DataTypeIds below doesn't exist in umbracoNode, which results in a foreign key constraint errors.
|
//TODO Check which of the DataTypeIds below doesn't exist in umbracoNode, which results in a foreign key constraint errors.
|
||||||
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 1, DataTypeId = -49, PropertyEditorAlias = Constants.PropertyEditors.TrueFalseAlias, DbType = "Integer" });
|
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 1, DataTypeId = -49, PropertyEditorAlias = Constants.PropertyEditors.TrueFalseAlias, DbType = "Integer" });
|
||||||
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 2, DataTypeId = -51, PropertyEditorAlias = Constants.PropertyEditors.IntegerAlias, DbType = "Integer" });
|
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 2, DataTypeId = -51, PropertyEditorAlias = Constants.PropertyEditors.IntegerAlias, DbType = "Integer" });
|
||||||
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 3, DataTypeId = -87, PropertyEditorAlias = Constants.PropertyEditors.TinyMCEAlias, DbType = "Ntext" });
|
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 3, DataTypeId = -87, PropertyEditorAlias = Constants.PropertyEditors.TinyMCEAlias, DbType = "Ntext" });
|
||||||
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 4, DataTypeId = -88, PropertyEditorAlias = Constants.PropertyEditors.TextboxAlias, DbType = "Nvarchar" });
|
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 4, DataTypeId = -88, PropertyEditorAlias = Constants.PropertyEditors.TextboxAlias, DbType = "Nvarchar" });
|
||||||
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 5, DataTypeId = -89, PropertyEditorAlias = Constants.PropertyEditors.TextboxMultipleAlias, DbType = "Ntext" });
|
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 5, DataTypeId = -89, PropertyEditorAlias = Constants.PropertyEditors.TextboxMultipleAlias, DbType = "Ntext" });
|
||||||
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 6, DataTypeId = -90, PropertyEditorAlias = Constants.PropertyEditors.UploadFieldAlias, DbType = "Nvarchar" });
|
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 6, DataTypeId = -90, PropertyEditorAlias = Constants.PropertyEditors.UploadFieldAlias, DbType = "Nvarchar" });
|
||||||
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 7, DataTypeId = -92, PropertyEditorAlias = Constants.PropertyEditors.NoEditAlias, DbType = "Nvarchar" });
|
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 7, DataTypeId = -92, PropertyEditorAlias = Constants.PropertyEditors.NoEditAlias, DbType = "Nvarchar" });
|
||||||
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 8, DataTypeId = -36, PropertyEditorAlias = Constants.PropertyEditors.DateTimeAlias, DbType = "Date" });
|
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 8, DataTypeId = -36, PropertyEditorAlias = Constants.PropertyEditors.DateTimeAlias, DbType = "Date" });
|
||||||
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 9, DataTypeId = -37, PropertyEditorAlias = Constants.PropertyEditors.ColorPickerAlias, DbType = "Nvarchar" });
|
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 9, DataTypeId = -37, PropertyEditorAlias = Constants.PropertyEditors.ColorPickerAlias, DbType = "Nvarchar" });
|
||||||
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 11, DataTypeId = -39, PropertyEditorAlias = Constants.PropertyEditors.DropDownListFlexibleAlias, DbType = "Nvarchar" });
|
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 11, DataTypeId = -39, PropertyEditorAlias = Constants.PropertyEditors.DropDownListFlexibleAlias, DbType = "Nvarchar" });
|
||||||
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 12, DataTypeId = -40, PropertyEditorAlias = Constants.PropertyEditors.RadioButtonListAlias, DbType = "Nvarchar" });
|
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 12, DataTypeId = -40, PropertyEditorAlias = Constants.PropertyEditors.RadioButtonListAlias, DbType = "Nvarchar" });
|
||||||
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 13, DataTypeId = -41, PropertyEditorAlias = Constants.PropertyEditors.DateAlias, DbType = "Date" });
|
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 13, DataTypeId = -41, PropertyEditorAlias = Constants.PropertyEditors.DateAlias, DbType = "Date" });
|
||||||
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 14, DataTypeId = -42, PropertyEditorAlias = Constants.PropertyEditors.DropDownListFlexibleAlias, DbType = "Integer" });
|
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 14, DataTypeId = -42, PropertyEditorAlias = Constants.PropertyEditors.DropDownListFlexibleAlias, DbType = "Integer" });
|
||||||
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 15, DataTypeId = -43, PropertyEditorAlias = Constants.PropertyEditors.CheckBoxListAlias, DbType = "Nvarchar" });
|
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 15, DataTypeId = -43, PropertyEditorAlias = Constants.PropertyEditors.CheckBoxListAlias, DbType = "Nvarchar" });
|
||||||
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 22, DataTypeId = 1041, PropertyEditorAlias = Constants.PropertyEditors.TagsAlias, DbType = "Ntext" });
|
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 22, DataTypeId = 1041, PropertyEditorAlias = Constants.PropertyEditors.TagsAlias, DbType = "Ntext" });
|
||||||
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 24, DataTypeId = 1043, PropertyEditorAlias = Constants.PropertyEditors.ImageCropperAlias, DbType = "Ntext" });
|
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 24, DataTypeId = 1043, PropertyEditorAlias = Constants.PropertyEditors.ImageCropperAlias, DbType = "Ntext" });
|
||||||
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = -26, DataTypeId = Constants.System.DefaultContentListViewDataTypeId, PropertyEditorAlias = Constants.PropertyEditors.ListViewAlias, DbType = "Nvarchar" });
|
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = -26, DataTypeId = Constants.System.DefaultContentListViewDataTypeId, PropertyEditorAlias = Constants.PropertyEditors.ListViewAlias, DbType = "Nvarchar" });
|
||||||
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = -27, DataTypeId = Constants.System.DefaultMediaListViewDataTypeId, PropertyEditorAlias = Constants.PropertyEditors.ListViewAlias, DbType = "Nvarchar" });
|
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = -27, DataTypeId = Constants.System.DefaultMediaListViewDataTypeId, PropertyEditorAlias = Constants.PropertyEditors.ListViewAlias, DbType = "Nvarchar" });
|
||||||
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = -28, DataTypeId = Constants.System.DefaultMembersListViewDataTypeId, PropertyEditorAlias = Constants.PropertyEditors.ListViewAlias, DbType = "Nvarchar" });
|
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = -28, DataTypeId = Constants.System.DefaultMembersListViewDataTypeId, PropertyEditorAlias = Constants.PropertyEditors.ListViewAlias, DbType = "Nvarchar" });
|
||||||
|
|
||||||
//New UDI pickers with newer Ids
|
//New UDI pickers with newer Ids
|
||||||
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 26, DataTypeId = 1046, PropertyEditorAlias = Constants.PropertyEditors.ContentPicker2Alias, DbType = "Nvarchar" });
|
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 26, DataTypeId = 1046, PropertyEditorAlias = Constants.PropertyEditors.ContentPicker2Alias, DbType = "Nvarchar" });
|
||||||
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 27, DataTypeId = 1047, PropertyEditorAlias = Constants.PropertyEditors.MemberPicker2Alias, DbType = "Nvarchar" });
|
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 27, DataTypeId = 1047, PropertyEditorAlias = Constants.PropertyEditors.MemberPicker2Alias, DbType = "Nvarchar" });
|
||||||
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 28, DataTypeId = 1048, PropertyEditorAlias = Constants.PropertyEditors.MediaPicker2Alias, DbType = "Ntext" });
|
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 28, DataTypeId = 1048, PropertyEditorAlias = Constants.PropertyEditors.MediaPicker2Alias, DbType = "Ntext" });
|
||||||
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 29, DataTypeId = 1049, PropertyEditorAlias = Constants.PropertyEditors.MediaPicker2Alias, DbType = "Ntext" });
|
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 29, DataTypeId = 1049, PropertyEditorAlias = Constants.PropertyEditors.MediaPicker2Alias, DbType = "Ntext" });
|
||||||
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 30, DataTypeId = 1050, PropertyEditorAlias = Constants.PropertyEditors.RelatedLinks2Alias, DbType = "Ntext" });
|
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 30, DataTypeId = 1050, PropertyEditorAlias = Constants.PropertyEditors.RelatedLinks2Alias, DbType = "Ntext" });
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CreateCmsDataTypePreValuesData()
|
private void CreateCmsDataTypePreValuesData()
|
||||||
{
|
{
|
||||||
_database.Insert("cmsDataTypePreValues", "id", false, new DataTypePreValueDto { Id = 3, Alias = "", SortOrder = 0, DataTypeNodeId = -87, Value = ",code,undo,redo,cut,copy,mcepasteword,stylepicker,bold,italic,bullist,numlist,outdent,indent,mcelink,unlink,mceinsertanchor,mceimage,umbracomacro,mceinserttable,umbracoembed,mcecharmap,|1|1,2,3,|0|500,400|1049,|true|" });
|
_database.Insert("cmsDataTypePreValues", "id", false, new DataTypePreValueDto { Id = 3, Alias = "", SortOrder = 0, DataTypeNodeId = -87, Value = ",code,undo,redo,cut,copy,mcepasteword,stylepicker,bold,italic,bullist,numlist,outdent,indent,mcelink,unlink,mceinsertanchor,mceimage,umbracomacro,mceinserttable,umbracoembed,mcecharmap,|1|1,2,3,|0|500,400|1049,|true|" });
|
||||||
_database.Insert("cmsDataTypePreValues", "id", false, new DataTypePreValueDto { Id = 4, Alias = "group", SortOrder = 0, DataTypeNodeId = 1041, Value = "default" });
|
_database.Insert("cmsDataTypePreValues", "id", false, new DataTypePreValueDto { Id = 4, Alias = "group", SortOrder = 0, DataTypeNodeId = 1041, Value = "default" });
|
||||||
_database.Insert("cmsDataTypePreValues", "id", false, new DataTypePreValueDto { Id = 5, Alias = "storageType", SortOrder = 0, DataTypeNodeId = 1041, Value = "Json" });
|
_database.Insert("cmsDataTypePreValues", "id", false, new DataTypePreValueDto { Id = 5, Alias = "storageType", SortOrder = 0, DataTypeNodeId = 1041, Value = "Json" });
|
||||||
|
|
||||||
//defaults for the member list
|
//defaults for the member list
|
||||||
_database.Insert("cmsDataTypePreValues", "id", false, new DataTypePreValueDto { Id = -1, Alias = "pageSize", SortOrder = 1, DataTypeNodeId = Constants.System.DefaultMembersListViewDataTypeId, Value = "10" });
|
_database.Insert("cmsDataTypePreValues", "id", false, new DataTypePreValueDto { Id = -1, Alias = "pageSize", SortOrder = 1, DataTypeNodeId = Constants.System.DefaultMembersListViewDataTypeId, Value = "10" });
|
||||||
_database.Insert("cmsDataTypePreValues", "id", false, new DataTypePreValueDto { Id = -2, Alias = "orderBy", SortOrder = 2, DataTypeNodeId = Constants.System.DefaultMembersListViewDataTypeId, Value = "username" });
|
_database.Insert("cmsDataTypePreValues", "id", false, new DataTypePreValueDto { Id = -2, Alias = "orderBy", SortOrder = 2, DataTypeNodeId = Constants.System.DefaultMembersListViewDataTypeId, Value = "username" });
|
||||||
_database.Insert("cmsDataTypePreValues", "id", false, new DataTypePreValueDto { Id = -3, Alias = "orderDirection", SortOrder = 3, DataTypeNodeId = Constants.System.DefaultMembersListViewDataTypeId, Value = "asc" });
|
_database.Insert("cmsDataTypePreValues", "id", false, new DataTypePreValueDto { Id = -3, Alias = "orderDirection", SortOrder = 3, DataTypeNodeId = Constants.System.DefaultMembersListViewDataTypeId, Value = "asc" });
|
||||||
_database.Insert("cmsDataTypePreValues", "id", false, new DataTypePreValueDto { Id = -4, Alias = "includeProperties", SortOrder = 4, DataTypeNodeId = Constants.System.DefaultMembersListViewDataTypeId, Value = "[{\"alias\":\"username\",\"isSystem\":1},{\"alias\":\"email\",\"isSystem\":1},{\"alias\":\"updateDate\",\"header\":\"Last edited\",\"isSystem\":1}]" });
|
_database.Insert("cmsDataTypePreValues", "id", false, new DataTypePreValueDto { Id = -4, Alias = "includeProperties", SortOrder = 4, DataTypeNodeId = Constants.System.DefaultMembersListViewDataTypeId, Value = "[{\"alias\":\"username\",\"isSystem\":1},{\"alias\":\"email\",\"isSystem\":1},{\"alias\":\"updateDate\",\"header\":\"Last edited\",\"isSystem\":1}]" });
|
||||||
|
|
||||||
//layouts for the list view
|
//layouts for the list view
|
||||||
var cardLayout = "{\"name\": \"Grid\",\"path\": \"views/propertyeditors/listview/layouts/grid/grid.html\", \"icon\": \"icon-thumbnails-small\", \"isSystem\": 1, \"selected\": true}";
|
var cardLayout = "{\"name\": \"Grid\",\"path\": \"views/propertyeditors/listview/layouts/grid/grid.html\", \"icon\": \"icon-thumbnails-small\", \"isSystem\": 1, \"selected\": true}";
|
||||||
var listLayout = "{\"name\": \"List\",\"path\": \"views/propertyeditors/listview/layouts/list/list.html\",\"icon\": \"icon-list\", \"isSystem\": 1,\"selected\": true}";
|
var listLayout = "{\"name\": \"List\",\"path\": \"views/propertyeditors/listview/layouts/list/list.html\",\"icon\": \"icon-list\", \"isSystem\": 1,\"selected\": true}";
|
||||||
|
|
||||||
//defaults for the media list
|
//defaults for the media list
|
||||||
_database.Insert("cmsDataTypePreValues", "id", false, new DataTypePreValueDto { Id = -5, Alias = "pageSize", SortOrder = 1, DataTypeNodeId = Constants.System.DefaultMediaListViewDataTypeId, Value = "100" });
|
_database.Insert("cmsDataTypePreValues", "id", false, new DataTypePreValueDto { Id = -5, Alias = "pageSize", SortOrder = 1, DataTypeNodeId = Constants.System.DefaultMediaListViewDataTypeId, Value = "100" });
|
||||||
_database.Insert("cmsDataTypePreValues", "id", false, new DataTypePreValueDto { Id = -6, Alias = "orderBy", SortOrder = 2, DataTypeNodeId = Constants.System.DefaultMediaListViewDataTypeId, Value = "updateDate" });
|
_database.Insert("cmsDataTypePreValues", "id", false, new DataTypePreValueDto { Id = -6, Alias = "orderBy", SortOrder = 2, DataTypeNodeId = Constants.System.DefaultMediaListViewDataTypeId, Value = "updateDate" });
|
||||||
_database.Insert("cmsDataTypePreValues", "id", false, new DataTypePreValueDto { Id = -7, Alias = "orderDirection", SortOrder = 3, DataTypeNodeId = Constants.System.DefaultMediaListViewDataTypeId, Value = "desc" });
|
_database.Insert("cmsDataTypePreValues", "id", false, new DataTypePreValueDto { Id = -7, Alias = "orderDirection", SortOrder = 3, DataTypeNodeId = Constants.System.DefaultMediaListViewDataTypeId, Value = "desc" });
|
||||||
_database.Insert("cmsDataTypePreValues", "id", false, new DataTypePreValueDto { Id = -8, Alias = "layouts", SortOrder = 4, DataTypeNodeId = Constants.System.DefaultMediaListViewDataTypeId, Value = "[" + cardLayout + "," + listLayout + "]" });
|
_database.Insert("cmsDataTypePreValues", "id", false, new DataTypePreValueDto { Id = -8, Alias = "layouts", SortOrder = 4, DataTypeNodeId = Constants.System.DefaultMediaListViewDataTypeId, Value = "[" + cardLayout + "," + listLayout + "]" });
|
||||||
_database.Insert("cmsDataTypePreValues", "id", false, new DataTypePreValueDto { Id = -9, Alias = "includeProperties", SortOrder = 5, DataTypeNodeId = Constants.System.DefaultMediaListViewDataTypeId, Value = "[{\"alias\":\"updateDate\",\"header\":\"Last edited\",\"isSystem\":1},{\"alias\":\"owner\",\"header\":\"Updated by\",\"isSystem\":1}]" });
|
_database.Insert("cmsDataTypePreValues", "id", false, new DataTypePreValueDto { Id = -9, Alias = "includeProperties", SortOrder = 5, DataTypeNodeId = Constants.System.DefaultMediaListViewDataTypeId, Value = "[{\"alias\":\"updateDate\",\"header\":\"Last edited\",\"isSystem\":1},{\"alias\":\"owner\",\"header\":\"Updated by\",\"isSystem\":1}]" });
|
||||||
|
|
||||||
//default's for MultipleMediaPickerAlias picker
|
//default's for MultipleMediaPickerAlias picker
|
||||||
_database.Insert("cmsDataTypePreValues", "id", false, new DataTypePreValueDto { Id = 6, Alias = "multiPicker", SortOrder = 0, DataTypeNodeId = 1049, Value = "1" });
|
_database.Insert("cmsDataTypePreValues", "id", false, new DataTypePreValueDto { Id = 6, Alias = "multiPicker", SortOrder = 0, DataTypeNodeId = 1049, Value = "1" });
|
||||||
|
|
||||||
// Defaults for single item dropdown
|
// Defaults for single item dropdown
|
||||||
_database.Insert("cmsDataTypePreValues", "id", false, new DataTypePreValueDto { Id = 7, Alias = "multiple", SortOrder = 0, DataTypeNodeId = -42, Value = "0" });
|
_database.Insert("cmsDataTypePreValues", "id", false, new DataTypePreValueDto { Id = 7, Alias = "multiple", SortOrder = 0, DataTypeNodeId = -42, Value = "0" });
|
||||||
|
|
||||||
// Defaults for multiple item dropdown
|
// Defaults for multiple item dropdown
|
||||||
_database.Insert("cmsDataTypePreValues", "id", false, new DataTypePreValueDto { Id = 8, Alias = "multiple", SortOrder = 0, DataTypeNodeId = -39, Value = "1" });
|
_database.Insert("cmsDataTypePreValues", "id", false, new DataTypePreValueDto { Id = 8, Alias = "multiple", SortOrder = 0, DataTypeNodeId = -39, Value = "1" });
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CreateUmbracoRelationTypeData()
|
private void CreateUmbracoRelationTypeData()
|
||||||
{
|
{
|
||||||
var relationType = new RelationTypeDto { Id = 1, Alias = Constants.Conventions.RelationTypes.RelateDocumentOnCopyAlias, ChildObjectType = new Guid(Constants.ObjectTypes.Document), ParentObjectType = new Guid(Constants.ObjectTypes.Document), Dual = true, Name = Constants.Conventions.RelationTypes.RelateDocumentOnCopyName };
|
var relationType = new RelationTypeDto { Id = 1, Alias = Constants.Conventions.RelationTypes.RelateDocumentOnCopyAlias, ChildObjectType = new Guid(Constants.ObjectTypes.Document), ParentObjectType = new Guid(Constants.ObjectTypes.Document), Dual = true, Name = Constants.Conventions.RelationTypes.RelateDocumentOnCopyName };
|
||||||
relationType.UniqueId = (relationType.Alias + "____" + relationType.Name).ToGuid();
|
relationType.UniqueId = (relationType.Alias + "____" + relationType.Name).ToGuid();
|
||||||
_database.Insert("umbracoRelationType", "id", false, relationType);
|
_database.Insert("umbracoRelationType", "id", false, relationType);
|
||||||
relationType = new RelationTypeDto { Id = 2, Alias = Constants.Conventions.RelationTypes.RelateParentDocumentOnDeleteAlias, ChildObjectType = new Guid(Constants.ObjectTypes.Document), ParentObjectType = new Guid(Constants.ObjectTypes.Document), Dual = false, Name = Constants.Conventions.RelationTypes.RelateParentDocumentOnDeleteName };
|
relationType = new RelationTypeDto { Id = 2, Alias = Constants.Conventions.RelationTypes.RelateParentDocumentOnDeleteAlias, ChildObjectType = new Guid(Constants.ObjectTypes.Document), ParentObjectType = new Guid(Constants.ObjectTypes.Document), Dual = false, Name = Constants.Conventions.RelationTypes.RelateParentDocumentOnDeleteName };
|
||||||
relationType.UniqueId = (relationType.Alias + "____" + relationType.Name).ToGuid();
|
relationType.UniqueId = (relationType.Alias + "____" + relationType.Name).ToGuid();
|
||||||
_database.Insert("umbracoRelationType", "id", false, relationType);
|
_database.Insert("umbracoRelationType", "id", false, relationType);
|
||||||
relationType = new RelationTypeDto { Id = 3, Alias = Constants.Conventions.RelationTypes.RelateParentMediaFolderOnDeleteAlias, ChildObjectType = new Guid(Constants.ObjectTypes.Media), ParentObjectType = new Guid(Constants.ObjectTypes.Media), Dual = false, Name = Constants.Conventions.RelationTypes.RelateParentMediaFolderOnDeleteName };
|
relationType = new RelationTypeDto { Id = 3, Alias = Constants.Conventions.RelationTypes.RelateParentMediaFolderOnDeleteAlias, ChildObjectType = new Guid(Constants.ObjectTypes.Media), ParentObjectType = new Guid(Constants.ObjectTypes.Media), Dual = false, Name = Constants.Conventions.RelationTypes.RelateParentMediaFolderOnDeleteName };
|
||||||
relationType.UniqueId = (relationType.Alias + "____" + relationType.Name).ToGuid();
|
relationType.UniqueId = (relationType.Alias + "____" + relationType.Name).ToGuid();
|
||||||
_database.Insert("umbracoRelationType", "id", false, relationType);
|
_database.Insert("umbracoRelationType", "id", false, relationType);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CreateCmsTaskTypeData()
|
private void CreateCmsTaskTypeData()
|
||||||
{
|
{
|
||||||
_database.Insert("cmsTaskType", "id", false, new TaskTypeDto { Id = 1, Alias = "toTranslate" });
|
_database.Insert("cmsTaskType", "id", false, new TaskTypeDto { Id = 1, Alias = "toTranslate" });
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CreateUmbracoMigrationData()
|
private void CreateUmbracoMigrationData()
|
||||||
{
|
{
|
||||||
var dto = new MigrationDto
|
var dto = new MigrationDto
|
||||||
{
|
{
|
||||||
Id = 1,
|
Id = 1,
|
||||||
Name = Constants.System.UmbracoMigrationName,
|
Name = Constants.System.UmbracoMigrationName,
|
||||||
Version = UmbracoVersion.GetSemanticVersion().ToString(),
|
Version = UmbracoVersion.GetSemanticVersion().ToString(),
|
||||||
CreateDate = DateTime.Now
|
CreateDate = DateTime.Now
|
||||||
};
|
};
|
||||||
|
|
||||||
_database.Insert("umbracoMigration", "pk", false, dto);
|
_database.Insert("umbracoMigration", "pk", false, dto);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2945
-2904
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,167 +1,167 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Umbraco.Core.Models;
|
using Umbraco.Core.Models;
|
||||||
using umbraco.interfaces;
|
using umbraco.interfaces;
|
||||||
|
|
||||||
namespace Umbraco.Core.Services
|
namespace Umbraco.Core.Services
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Defines the DataType Service, which is an easy access to operations involving <see cref="IDataTypeDefinition"/>
|
/// Defines the DataType Service, which is an easy access to operations involving <see cref="IDataTypeDefinition"/>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IDataTypeService : IService
|
public interface IDataTypeService : IService
|
||||||
{
|
{
|
||||||
Attempt<OperationStatus<EntityContainer, OperationStatusType>> CreateContainer(int parentId, string name, int userId = 0);
|
Attempt<OperationStatus<EntityContainer, OperationStatusType>> CreateContainer(int parentId, string name, int userId = 0);
|
||||||
Attempt<OperationStatus> SaveContainer(EntityContainer container, int userId = 0);
|
Attempt<OperationStatus> SaveContainer(EntityContainer container, int userId = 0);
|
||||||
EntityContainer GetContainer(int containerId);
|
EntityContainer GetContainer(int containerId);
|
||||||
EntityContainer GetContainer(Guid containerId);
|
EntityContainer GetContainer(Guid containerId);
|
||||||
IEnumerable<EntityContainer> GetContainers(string folderName, int level);
|
IEnumerable<EntityContainer> GetContainers(string folderName, int level);
|
||||||
IEnumerable<EntityContainer> GetContainers(IDataTypeDefinition dataTypeDefinition);
|
IEnumerable<EntityContainer> GetContainers(IDataTypeDefinition dataTypeDefinition);
|
||||||
IEnumerable<EntityContainer> GetContainers(int[] containerIds);
|
IEnumerable<EntityContainer> GetContainers(int[] containerIds);
|
||||||
Attempt<OperationStatus> DeleteContainer(int containerId, int userId = 0);
|
Attempt<OperationStatus> DeleteContainer(int containerId, int userId = 0);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a <see cref="IDataTypeDefinition"/> by its Name
|
/// Gets a <see cref="IDataTypeDefinition"/> by its Name
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="name">Name of the <see cref="IDataTypeDefinition"/></param>
|
/// <param name="name">Name of the <see cref="IDataTypeDefinition"/></param>
|
||||||
/// <returns><see cref="IDataTypeDefinition"/></returns>
|
/// <returns><see cref="IDataTypeDefinition"/></returns>
|
||||||
IDataTypeDefinition GetDataTypeDefinitionByName(string name);
|
IDataTypeDefinition GetDataTypeDefinitionByName(string name);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a <see cref="IDataTypeDefinition"/> by its Id
|
/// Gets a <see cref="IDataTypeDefinition"/> by its Id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="id">Id of the <see cref="IDataTypeDefinition"/></param>
|
/// <param name="id">Id of the <see cref="IDataTypeDefinition"/></param>
|
||||||
/// <returns><see cref="IDataTypeDefinition"/></returns>
|
/// <returns><see cref="IDataTypeDefinition"/></returns>
|
||||||
IDataTypeDefinition GetDataTypeDefinitionById(int id);
|
IDataTypeDefinition GetDataTypeDefinitionById(int id);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a <see cref="IDataTypeDefinition"/> by its unique guid Id
|
/// Gets a <see cref="IDataTypeDefinition"/> by its unique guid Id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="id">Unique guid Id of the DataType</param>
|
/// <param name="id">Unique guid Id of the DataType</param>
|
||||||
/// <returns><see cref="IDataTypeDefinition"/></returns>
|
/// <returns><see cref="IDataTypeDefinition"/></returns>
|
||||||
IDataTypeDefinition GetDataTypeDefinitionById(Guid id);
|
IDataTypeDefinition GetDataTypeDefinitionById(Guid id);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets all <see cref="IDataTypeDefinition"/> objects or those with the ids passed in
|
/// Gets all <see cref="IDataTypeDefinition"/> objects or those with the ids passed in
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="ids">Optional array of Ids</param>
|
/// <param name="ids">Optional array of Ids</param>
|
||||||
/// <returns>An enumerable list of <see cref="IDataTypeDefinition"/> objects</returns>
|
/// <returns>An enumerable list of <see cref="IDataTypeDefinition"/> objects</returns>
|
||||||
IEnumerable<IDataTypeDefinition> GetAllDataTypeDefinitions(params int[] ids);
|
IEnumerable<IDataTypeDefinition> GetAllDataTypeDefinitions(params int[] ids);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Saves an <see cref="IDataTypeDefinition"/>
|
/// Saves an <see cref="IDataTypeDefinition"/>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="dataTypeDefinition"><see cref="IDataTypeDefinition"/> to save</param>
|
/// <param name="dataTypeDefinition"><see cref="IDataTypeDefinition"/> to save</param>
|
||||||
/// <param name="userId">Id of the user issueing the save</param>
|
/// <param name="userId">Id of the user issueing the save</param>
|
||||||
void Save(IDataTypeDefinition dataTypeDefinition, int userId = 0);
|
void Save(IDataTypeDefinition dataTypeDefinition, int userId = 0);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Saves a collection of <see cref="IDataTypeDefinition"/>
|
/// Saves a collection of <see cref="IDataTypeDefinition"/>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="dataTypeDefinitions"><see cref="IDataTypeDefinition"/> to save</param>
|
/// <param name="dataTypeDefinitions"><see cref="IDataTypeDefinition"/> to save</param>
|
||||||
/// <param name="userId">Id of the user issueing the save</param>
|
/// <param name="userId">Id of the user issueing the save</param>
|
||||||
void Save(IEnumerable<IDataTypeDefinition> dataTypeDefinitions, int userId = 0);
|
void Save(IEnumerable<IDataTypeDefinition> dataTypeDefinitions, int userId = 0);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Saves a collection of <see cref="IDataTypeDefinition"/>
|
/// Saves a collection of <see cref="IDataTypeDefinition"/>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="dataTypeDefinitions"><see cref="IDataTypeDefinition"/> to save</param>
|
/// <param name="dataTypeDefinitions"><see cref="IDataTypeDefinition"/> to save</param>
|
||||||
/// <param name="userId">Id of the user issueing the save</param>
|
/// <param name="userId">Id of the user issueing the save</param>
|
||||||
/// <param name="raiseEvents">Boolean indicating whether or not to raise events</param>
|
/// <param name="raiseEvents">Boolean indicating whether or not to raise events</param>
|
||||||
void Save(IEnumerable<IDataTypeDefinition> dataTypeDefinitions, int userId, bool raiseEvents);
|
void Save(IEnumerable<IDataTypeDefinition> dataTypeDefinitions, int userId, bool raiseEvents);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Deletes an <see cref="IDataTypeDefinition"/>
|
/// Deletes an <see cref="IDataTypeDefinition"/>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// Please note that deleting a <see cref="IDataTypeDefinition"/> will remove
|
/// Please note that deleting a <see cref="IDataTypeDefinition"/> will remove
|
||||||
/// all the <see cref="PropertyType"/> data that references this <see cref="IDataTypeDefinition"/>.
|
/// all the <see cref="PropertyType"/> data that references this <see cref="IDataTypeDefinition"/>.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <param name="dataTypeDefinition"><see cref="IDataTypeDefinition"/> to delete</param>
|
/// <param name="dataTypeDefinition"><see cref="IDataTypeDefinition"/> to delete</param>
|
||||||
/// <param name="userId">Id of the user issueing the deletion</param>
|
/// <param name="userId">Id of the user issueing the deletion</param>
|
||||||
void Delete(IDataTypeDefinition dataTypeDefinition, int userId = 0);
|
void Delete(IDataTypeDefinition dataTypeDefinition, int userId = 0);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the <see cref="IDataType"/> specified by it's unique ID
|
/// Gets the <see cref="IDataType"/> specified by it's unique ID
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="id">Id of the DataType, which corresponds to the Guid Id of the control</param>
|
/// <param name="id">Id of the DataType, which corresponds to the Guid Id of the control</param>
|
||||||
/// <returns><see cref="IDataType"/> object</returns>
|
/// <returns><see cref="IDataType"/> object</returns>
|
||||||
[Obsolete("IDataType is obsolete and is no longer used, it will be removed from the codebase in future versions")]
|
[Obsolete("IDataType is obsolete and is no longer used, it will be removed from the codebase in future versions")]
|
||||||
IDataType GetDataTypeById(Guid id);
|
IDataType GetDataTypeById(Guid id);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a complete list of all registered <see cref="IDataType"/>'s
|
/// Gets a complete list of all registered <see cref="IDataType"/>'s
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>An enumerable list of <see cref="IDataType"/> objects</returns>
|
/// <returns>An enumerable list of <see cref="IDataType"/> objects</returns>
|
||||||
[Obsolete("IDataType is obsolete and is no longer used, it will be removed from the codebase in future versions")]
|
[Obsolete("IDataType is obsolete and is no longer used, it will be removed from the codebase in future versions")]
|
||||||
IEnumerable<IDataType> GetAllDataTypes();
|
IEnumerable<IDataType> GetAllDataTypes();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a <see cref="IDataTypeDefinition"/> by its control Id
|
/// Gets a <see cref="IDataTypeDefinition"/> by its control Id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="id">Id of the DataType control</param>
|
/// <param name="id">Id of the DataType control</param>
|
||||||
/// <returns><see cref="IDataTypeDefinition"/></returns>
|
/// <returns><see cref="IDataTypeDefinition"/></returns>
|
||||||
[Obsolete("Property editor's are defined by a string alias from version 7 onwards, use the overload GetDataTypeDefinitionByPropertyEditorAlias instead")]
|
[Obsolete("Property editor's are defined by a string alias from version 7 onwards, use the overload GetDataTypeDefinitionByPropertyEditorAlias instead")]
|
||||||
IEnumerable<IDataTypeDefinition> GetDataTypeDefinitionByControlId(Guid id);
|
IEnumerable<IDataTypeDefinition> GetDataTypeDefinitionByControlId(Guid id);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a <see cref="IDataTypeDefinition"/> by its control Id
|
/// Gets a <see cref="IDataTypeDefinition"/> by its control Id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="propertyEditorAlias">Alias of the property editor</param>
|
/// <param name="propertyEditorAlias">Alias of the property editor</param>
|
||||||
/// <returns>Collection of <see cref="IDataTypeDefinition"/> objects with a matching contorl id</returns>
|
/// <returns>Collection of <see cref="IDataTypeDefinition"/> objects with a matching contorl id</returns>
|
||||||
IEnumerable<IDataTypeDefinition> GetDataTypeDefinitionByPropertyEditorAlias(string propertyEditorAlias);
|
IEnumerable<IDataTypeDefinition> GetDataTypeDefinitionByPropertyEditorAlias(string propertyEditorAlias);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets all values for an <see cref="IDataTypeDefinition"/>
|
/// Gets all values for an <see cref="IDataTypeDefinition"/>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="id">Id of the <see cref="IDataTypeDefinition"/> to retrieve prevalues from</param>
|
/// <param name="id">Id of the <see cref="IDataTypeDefinition"/> to retrieve prevalues from</param>
|
||||||
/// <returns>An enumerable list of string values</returns>
|
/// <returns>An enumerable list of string values</returns>
|
||||||
IEnumerable<string> GetPreValuesByDataTypeId(int id);
|
IEnumerable<string> GetPreValuesByDataTypeId(int id);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a pre-value collection by data type id
|
/// Gets a pre-value collection by data type id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="id"></param>
|
/// <param name="id"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
PreValueCollection GetPreValuesCollectionByDataTypeId(int id);
|
PreValueCollection GetPreValuesCollectionByDataTypeId(int id);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Saves a list of PreValues for a given DataTypeDefinition
|
/// Saves a list of PreValues for a given DataTypeDefinition
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="dataTypeId">Id of the DataTypeDefinition to save PreValues for</param>
|
/// <param name="dataTypeId">Id of the DataTypeDefinition to save PreValues for</param>
|
||||||
/// <param name="values">List of string values to save</param>
|
/// <param name="values">List of string values to save</param>
|
||||||
[Obsolete("This should no longer be used, use the alternative SavePreValues or SaveDataTypeAndPreValues methods instead. This will only insert pre-values without keys")]
|
[Obsolete("This should no longer be used, use the alternative SavePreValues or SaveDataTypeAndPreValues methods instead. This will only insert pre-values without keys")]
|
||||||
void SavePreValues(int dataTypeId, IEnumerable<string> values);
|
void SavePreValues(int dataTypeId, IEnumerable<string> values);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Saves a list of PreValues for a given DataTypeDefinition
|
/// Saves a list of PreValues for a given DataTypeDefinition
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="dataTypeId">Id of the DataTypeDefinition to save PreValues for</param>
|
/// <param name="dataTypeId">Id of the DataTypeDefinition to save PreValues for</param>
|
||||||
/// <param name="values">List of key/value pairs to save</param>
|
/// <param name="values">List of key/value pairs to save</param>
|
||||||
void SavePreValues(int dataTypeId, IDictionary<string, PreValue> values);
|
void SavePreValues(int dataTypeId, IDictionary<string, PreValue> values);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Saves a list of PreValues for a given DataTypeDefinition
|
/// Saves a list of PreValues for a given DataTypeDefinition
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="dataTypeDefinition">The DataTypeDefinition to save PreValues for</param>
|
/// <param name="dataTypeDefinition">The DataTypeDefinition to save PreValues for</param>
|
||||||
/// <param name="values">List of key/value pairs to save</param>
|
/// <param name="values">List of key/value pairs to save</param>
|
||||||
void SavePreValues(IDataTypeDefinition dataTypeDefinition, IDictionary<string, PreValue> values);
|
void SavePreValues(IDataTypeDefinition dataTypeDefinition, IDictionary<string, PreValue> values);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Saves the data type and it's prevalues
|
/// Saves the data type and it's prevalues
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="dataTypeDefinition"></param>
|
/// <param name="dataTypeDefinition"></param>
|
||||||
/// <param name="values"></param>
|
/// <param name="values"></param>
|
||||||
/// <param name="userId"></param>
|
/// <param name="userId"></param>
|
||||||
void SaveDataTypeAndPreValues(IDataTypeDefinition dataTypeDefinition, IDictionary<string, PreValue> values, int userId = 0);
|
void SaveDataTypeAndPreValues(IDataTypeDefinition dataTypeDefinition, IDictionary<string, PreValue> values, int userId = 0);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a specific PreValue by its Id
|
/// Gets a specific PreValue by its Id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="id">Id of the PreValue to retrieve the value from</param>
|
/// <param name="id">Id of the PreValue to retrieve the value from</param>
|
||||||
/// <returns>PreValue as a string</returns>
|
/// <returns>PreValue as a string</returns>
|
||||||
string GetPreValueAsString(int id);
|
string GetPreValueAsString(int id);
|
||||||
|
|
||||||
Attempt<OperationStatus<MoveOperationStatusType>> Move(IDataTypeDefinition toMove, int parentId);
|
Attempt<OperationStatus<MoveOperationStatusType>> Move(IDataTypeDefinition toMove, int parentId);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,298 +1,306 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Umbraco.Core.Models;
|
using System.ComponentModel;
|
||||||
using Umbraco.Core.Models.EntityBase;
|
using Umbraco.Core.Models;
|
||||||
using Umbraco.Core.Persistence.DatabaseModelDefinitions;
|
using Umbraco.Core.Models.EntityBase;
|
||||||
|
using Umbraco.Core.Persistence.DatabaseModelDefinitions;
|
||||||
namespace Umbraco.Core.Services
|
|
||||||
{
|
namespace Umbraco.Core.Services
|
||||||
public interface IEntityService
|
{
|
||||||
{
|
public interface IEntityService
|
||||||
/// <summary>
|
{
|
||||||
/// Returns true if the entity exists
|
/// <summary>
|
||||||
/// </summary>
|
/// Returns true if the entity exists
|
||||||
/// <param name="key"></param>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <param name="key"></param>
|
||||||
bool Exists(Guid key);
|
/// <returns></returns>
|
||||||
|
bool Exists(Guid key);
|
||||||
/// <summary>
|
|
||||||
/// Returns true if the entity exists
|
/// <summary>
|
||||||
/// </summary>
|
/// Returns true if the entity exists
|
||||||
/// <param name="id"></param>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <param name="id"></param>
|
||||||
bool Exists(int id);
|
/// <returns></returns>
|
||||||
|
bool Exists(int id);
|
||||||
/// <summary>
|
|
||||||
/// Returns the integer id for a given GUID
|
/// <summary>
|
||||||
/// </summary>
|
/// Returns the integer id for a given GUID
|
||||||
/// <param name="key"></param>
|
/// </summary>
|
||||||
/// <param name="umbracoObjectType"></param>
|
/// <param name="key"></param>
|
||||||
/// <returns></returns>
|
/// <param name="umbracoObjectType"></param>
|
||||||
|
/// <returns></returns>
|
||||||
Attempt<int> GetIdForKey(Guid key, UmbracoObjectTypes umbracoObjectType);
|
Attempt<int> GetIdForKey(Guid key, UmbracoObjectTypes umbracoObjectType);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the integer id for a given Udi
|
/// Returns the integer id for a given Udi
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="udi"></param>
|
/// <param name="udi"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
Attempt<int> GetIdForUdi(Udi udi);
|
Attempt<int> GetIdForUdi(Udi udi);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the GUID for a given integer id
|
/// Returns the GUID for a given integer id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="id"></param>
|
/// <param name="id"></param>
|
||||||
/// <param name="umbracoObjectType"></param>
|
/// <param name="umbracoObjectType"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
Attempt<Guid> GetKeyForId(int id, UmbracoObjectTypes umbracoObjectType);
|
Attempt<Guid> GetKeyForId(int id, UmbracoObjectTypes umbracoObjectType);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets an UmbracoEntity by its Id, and optionally loads the complete object graph.
|
/// Gets an UmbracoEntity by its Id, and optionally loads the complete object graph.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>
|
/// <returns>
|
||||||
/// 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);
|
||||||
IUmbracoEntity GetByKey(Guid key, bool loadBaseType = true);
|
|
||||||
|
[Obsolete("Use the overload that doesn't specify loadBaseType instead, loadBaseType will not affect any results")]
|
||||||
/// <summary>
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||||
/// Gets an UmbracoEntity by its Id, and optionally loads the complete object graph.
|
IUmbracoEntity GetByKey(Guid key, bool loadBaseType = true);
|
||||||
/// </summary>
|
|
||||||
/// <returns>
|
/// <summary>
|
||||||
/// By default this will load the base type <see cref="IUmbracoEntity"/> with a minimum set of properties.
|
/// Gets an UmbracoEntity by its Id, and optionally loads the complete object graph.
|
||||||
/// </returns>
|
/// </summary>
|
||||||
/// <param name="id">Id of the object to retrieve</param>
|
/// <returns>
|
||||||
/// <param name="loadBaseType">Optional bool to load the complete object graph when set to <c>False</c>.</param>
|
/// By default this will load the base type <see cref="IUmbracoEntity"/> with a minimum set of properties.
|
||||||
/// <returns>An <see cref="IUmbracoEntity"/></returns>
|
/// </returns>
|
||||||
IUmbracoEntity Get(int id, bool loadBaseType = true);
|
/// <param name="id">Id of the object to retrieve</param>
|
||||||
|
/// <returns>An <see cref="IUmbracoEntity"/></returns>
|
||||||
/// <summary>
|
IUmbracoEntity Get(int id);
|
||||||
/// Gets an UmbracoEntity by its Id and UmbracoObjectType, and optionally loads the complete object graph.
|
|
||||||
/// </summary>
|
[Obsolete("Use the overload that doesn't specify loadBaseType instead, loadBaseType will not affect any results")]
|
||||||
/// <returns>
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||||
/// By default this will load the base type <see cref="IUmbracoEntity"/> with a minimum set of properties.
|
IUmbracoEntity Get(int id, bool loadBaseType = true);
|
||||||
/// </returns>
|
|
||||||
/// <param name="key">Unique Id of the object to retrieve</param>
|
/// <summary>
|
||||||
/// <param name="umbracoObjectType">UmbracoObjectType of the entity to retrieve</param>
|
/// Gets an UmbracoEntity by its Id and UmbracoObjectType, and optionally loads the complete object graph.
|
||||||
/// <param name="loadBaseType">Optional bool to load the complete object graph when set to <c>False</c>.</param>
|
/// </summary>
|
||||||
/// <returns>An <see cref="IUmbracoEntity"/></returns>
|
/// <returns>
|
||||||
IUmbracoEntity GetByKey(Guid key, UmbracoObjectTypes umbracoObjectType, bool loadBaseType = true);
|
/// By default this will load the base type <see cref="IUmbracoEntity"/> with a minimum set of properties.
|
||||||
|
/// </returns>
|
||||||
/// <summary>
|
/// <param name="key">Unique Id of the object to retrieve</param>
|
||||||
/// Gets an UmbracoEntity by its Id and UmbracoObjectType, and optionally loads the complete object graph.
|
/// <param name="umbracoObjectType">UmbracoObjectType of the entity to retrieve</param>
|
||||||
/// </summary>
|
/// <returns>An <see cref="IUmbracoEntity"/></returns>
|
||||||
/// <returns>
|
IUmbracoEntity GetByKey(Guid key, UmbracoObjectTypes umbracoObjectType);
|
||||||
/// By default this will load the base type <see cref="IUmbracoEntity"/> with a minimum set of properties.
|
|
||||||
/// </returns>
|
[Obsolete("Use the overload that doesn't specify loadBaseType instead, loadBaseType will not affect any results")]
|
||||||
/// <param name="id">Id of the object to retrieve</param>
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||||
/// <param name="umbracoObjectType">UmbracoObjectType of the entity to retrieve</param>
|
IUmbracoEntity GetByKey(Guid key, UmbracoObjectTypes umbracoObjectType, bool loadBaseType = true);
|
||||||
/// <param name="loadBaseType">Optional bool to load the complete object graph when set to <c>False</c>.</param>
|
|
||||||
/// <returns>An <see cref="IUmbracoEntity"/></returns>
|
[Obsolete("Use the overload that doesn't specify loadBaseType instead, loadBaseType will not affect any results")]
|
||||||
IUmbracoEntity Get(int id, UmbracoObjectTypes umbracoObjectType, bool loadBaseType = true);
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||||
|
IUmbracoEntity GetByKey<T>(Guid key, bool loadBaseType = true) where T : IUmbracoEntity;
|
||||||
/// <summary>
|
|
||||||
/// Gets an UmbracoEntity by its Id and specified Type. Optionally loads the complete object graph.
|
/// <summary>
|
||||||
/// </summary>
|
/// Gets an UmbracoEntity by its Id and UmbracoObjectType, and optionally loads the complete object graph.
|
||||||
/// <returns>
|
/// </summary>
|
||||||
/// By default this will load the base type <see cref="IUmbracoEntity"/> with a minimum set of properties.
|
/// <returns>
|
||||||
/// </returns>
|
/// By default this will load the base type <see cref="IUmbracoEntity"/> with a minimum set of properties.
|
||||||
/// <typeparam name="T">Type of the model to retrieve. Must be based on an <see cref="IUmbracoEntity"/></typeparam>
|
/// </returns>
|
||||||
/// <param name="key">Unique 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>
|
/// <param name="umbracoObjectType">UmbracoObjectType of the entity to retrieve</param>
|
||||||
/// <returns>An <see cref="IUmbracoEntity"/></returns>
|
/// <returns>An <see cref="IUmbracoEntity"/></returns>
|
||||||
IUmbracoEntity GetByKey<T>(Guid key, bool loadBaseType = true) where T : IUmbracoEntity;
|
IUmbracoEntity Get(int id, UmbracoObjectTypes umbracoObjectType);
|
||||||
|
|
||||||
/// <summary>
|
[Obsolete("Use the overload that doesn't specify loadBaseType instead, loadBaseType will not affect any results")]
|
||||||
/// Gets an UmbracoEntity by its Id and specified Type. Optionally loads the complete object graph.
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||||
/// </summary>
|
IUmbracoEntity Get(int id, UmbracoObjectTypes umbracoObjectType, bool loadBaseType = true);
|
||||||
/// <returns>
|
|
||||||
/// By default this will load the base type <see cref="IUmbracoEntity"/> with a minimum set of properties.
|
/// <summary>
|
||||||
/// </returns>
|
/// Gets an UmbracoEntity by its Id and specified Type. Optionally loads the complete object graph.
|
||||||
/// <typeparam name="T">Type of the model to retrieve. Must be based on an <see cref="IUmbracoEntity"/></typeparam>
|
/// </summary>
|
||||||
/// <param name="id">Id of the object to retrieve</param>
|
/// <returns>
|
||||||
/// <param name="loadBaseType">Optional bool to load the complete object graph when set to <c>False</c>.</param>
|
/// By default this will load the base type <see cref="IUmbracoEntity"/> with a minimum set of properties.
|
||||||
/// <returns>An <see cref="IUmbracoEntity"/></returns>
|
/// </returns>
|
||||||
IUmbracoEntity Get<T>(int id, bool loadBaseType = true) where T : IUmbracoEntity;
|
/// <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>
|
||||||
/// <summary>
|
/// <returns>An <see cref="IUmbracoEntity"/></returns>
|
||||||
/// Gets the parent of entity by its id
|
IUmbracoEntity Get<T>(int id) where T : IUmbracoEntity;
|
||||||
/// </summary>
|
|
||||||
/// <param name="id">Id of the entity to retrieve the Parent for</param>
|
[Obsolete("Use the overload that doesn't specify loadBaseType instead, loadBaseType will not affect any results")]
|
||||||
/// <returns>An <see cref="IUmbracoEntity"/></returns>
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||||
IUmbracoEntity GetParent(int id);
|
IUmbracoEntity Get<T>(int id, bool loadBaseType = true) where T : IUmbracoEntity;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the parent of entity by its id and UmbracoObjectType
|
/// Gets the parent of entity by its id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="id">Id of the entity to retrieve the Parent for</param>
|
/// <param name="id">Id of the entity to retrieve the Parent for</param>
|
||||||
/// <param name="umbracoObjectType">UmbracoObjectType of the parent to retrieve</param>
|
/// <returns>An <see cref="IUmbracoEntity"/></returns>
|
||||||
/// <returns>An <see cref="IUmbracoEntity"/></returns>
|
IUmbracoEntity GetParent(int id);
|
||||||
IUmbracoEntity GetParent(int id, UmbracoObjectTypes umbracoObjectType);
|
|
||||||
|
/// <summary>
|
||||||
/// <summary>
|
/// Gets the parent of entity by its id and UmbracoObjectType
|
||||||
/// Gets a collection of children by the parents Id
|
/// </summary>
|
||||||
/// </summary>
|
/// <param name="id">Id of the entity to retrieve the Parent for</param>
|
||||||
/// <param name="parentId">Id of the parent to retrieve children for</param>
|
/// <param name="umbracoObjectType">UmbracoObjectType of the parent to retrieve</param>
|
||||||
/// <returns>An enumerable list of <see cref="IUmbracoEntity"/> objects</returns>
|
/// <returns>An <see cref="IUmbracoEntity"/></returns>
|
||||||
IEnumerable<IUmbracoEntity> GetChildren(int parentId);
|
IUmbracoEntity GetParent(int id, UmbracoObjectTypes umbracoObjectType);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a collection of children by the parents Id and UmbracoObjectType
|
/// Gets a collection of children by the parents Id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="parentId">Id of the parent to retrieve children for</param>
|
/// <param name="parentId">Id of the parent to retrieve children for</param>
|
||||||
/// <param name="umbracoObjectType">UmbracoObjectType of the children to retrieve</param>
|
/// <returns>An enumerable list of <see cref="IUmbracoEntity"/> objects</returns>
|
||||||
/// <returns>An enumerable list of <see cref="IUmbracoEntity"/> objects</returns>
|
IEnumerable<IUmbracoEntity> GetChildren(int parentId);
|
||||||
IEnumerable<IUmbracoEntity> GetChildren(int parentId, UmbracoObjectTypes umbracoObjectType);
|
|
||||||
|
/// <summary>
|
||||||
/// <summary>
|
/// Gets a collection of children by the parents Id and UmbracoObjectType
|
||||||
/// Returns a paged collection of children
|
/// </summary>
|
||||||
/// </summary>
|
/// <param name="parentId">Id of the parent to retrieve children for</param>
|
||||||
/// <param name="parentId">The parent id to return children for</param>
|
/// <param name="umbracoObjectType">UmbracoObjectType of the children to retrieve</param>
|
||||||
/// <param name="umbracoObjectType"></param>
|
/// <returns>An enumerable list of <see cref="IUmbracoEntity"/> objects</returns>
|
||||||
/// <param name="pageIndex"></param>
|
IEnumerable<IUmbracoEntity> GetChildren(int parentId, UmbracoObjectTypes umbracoObjectType);
|
||||||
/// <param name="pageSize"></param>
|
|
||||||
/// <param name="totalRecords"></param>
|
/// <summary>
|
||||||
/// <param name="orderBy"></param>
|
/// Returns a paged collection of children
|
||||||
/// <param name="orderDirection"></param>
|
/// </summary>
|
||||||
/// <param name="filter"></param>
|
/// <param name="parentId">The parent id to return children for</param>
|
||||||
/// <returns></returns>
|
/// <param name="umbracoObjectType"></param>
|
||||||
IEnumerable<IUmbracoEntity> GetPagedChildren(int parentId, UmbracoObjectTypes umbracoObjectType, long pageIndex, int pageSize, out long totalRecords,
|
/// <param name="pageIndex"></param>
|
||||||
string orderBy = "SortOrder", Direction orderDirection = Direction.Ascending, string filter = "");
|
/// <param name="pageSize"></param>
|
||||||
|
/// <param name="totalRecords"></param>
|
||||||
/// <summary>
|
/// <param name="orderBy"></param>
|
||||||
/// Returns a paged collection of descendants
|
/// <param name="orderDirection"></param>
|
||||||
/// </summary>
|
/// <param name="filter"></param>
|
||||||
/// <param name="id"></param>
|
/// <returns></returns>
|
||||||
/// <param name="umbracoObjectType"></param>
|
IEnumerable<IUmbracoEntity> GetPagedChildren(int parentId, UmbracoObjectTypes umbracoObjectType, long pageIndex, int pageSize, out long totalRecords,
|
||||||
/// <param name="pageIndex"></param>
|
string orderBy = "SortOrder", Direction orderDirection = Direction.Ascending, string filter = "");
|
||||||
/// <param name="pageSize"></param>
|
|
||||||
/// <param name="totalRecords"></param>
|
/// <summary>
|
||||||
/// <param name="orderBy"></param>
|
/// Returns a paged collection of descendants
|
||||||
/// <param name="orderDirection"></param>
|
/// </summary>
|
||||||
/// <param name="filter"></param>
|
/// <param name="id"></param>
|
||||||
/// <returns></returns>
|
/// <param name="umbracoObjectType"></param>
|
||||||
IEnumerable<IUmbracoEntity> GetPagedDescendants(int id, UmbracoObjectTypes umbracoObjectType, long pageIndex, int pageSize, out long totalRecords,
|
/// <param name="pageIndex"></param>
|
||||||
string orderBy = "path", Direction orderDirection = Direction.Ascending, string filter = "");
|
/// <param name="pageSize"></param>
|
||||||
|
/// <param name="totalRecords"></param>
|
||||||
/// <summary>
|
/// <param name="orderBy"></param>
|
||||||
/// Returns a paged collection of descendants
|
/// <param name="orderDirection"></param>
|
||||||
/// </summary>
|
/// <param name="filter"></param>
|
||||||
IEnumerable<IUmbracoEntity> GetPagedDescendants(IEnumerable<int> ids, UmbracoObjectTypes umbracoObjectType, long pageIndex, int pageSize, out long totalRecords,
|
/// <returns></returns>
|
||||||
string orderBy = "path", Direction orderDirection = Direction.Ascending, string filter = "");
|
IEnumerable<IUmbracoEntity> GetPagedDescendants(int id, UmbracoObjectTypes umbracoObjectType, long pageIndex, int pageSize, out long totalRecords,
|
||||||
|
string orderBy = "path", Direction orderDirection = Direction.Ascending, string filter = "");
|
||||||
/// <summary>
|
|
||||||
/// Returns a paged collection of descendants from the root
|
/// <summary>
|
||||||
/// </summary>
|
/// Returns a paged collection of descendants
|
||||||
/// <param name="umbracoObjectType"></param>
|
/// </summary>
|
||||||
/// <param name="pageIndex"></param>
|
IEnumerable<IUmbracoEntity> GetPagedDescendants(IEnumerable<int> ids, UmbracoObjectTypes umbracoObjectType, long pageIndex, int pageSize, out long totalRecords,
|
||||||
/// <param name="pageSize"></param>
|
string orderBy = "path", Direction orderDirection = Direction.Ascending, string filter = "");
|
||||||
/// <param name="totalRecords"></param>
|
|
||||||
/// <param name="orderBy"></param>
|
/// <summary>
|
||||||
/// <param name="orderDirection"></param>
|
/// Returns a paged collection of descendants from the root
|
||||||
/// <param name="filter"></param>
|
/// </summary>
|
||||||
/// <param name="includeTrashed">true/false to include trashed objects</param>
|
/// <param name="umbracoObjectType"></param>
|
||||||
/// <returns></returns>
|
/// <param name="pageIndex"></param>
|
||||||
IEnumerable<IUmbracoEntity> GetPagedDescendantsFromRoot(UmbracoObjectTypes umbracoObjectType, long pageIndex, int pageSize, out long totalRecords,
|
/// <param name="pageSize"></param>
|
||||||
string orderBy = "path", Direction orderDirection = Direction.Ascending, string filter = "", bool includeTrashed = true);
|
/// <param name="totalRecords"></param>
|
||||||
|
/// <param name="orderBy"></param>
|
||||||
/// <summary>
|
/// <param name="orderDirection"></param>
|
||||||
/// Gets a collection of descendents by the parents Id
|
/// <param name="filter"></param>
|
||||||
/// </summary>
|
/// <param name="includeTrashed">true/false to include trashed objects</param>
|
||||||
/// <param name="id">Id of entity to retrieve descendents for</param>
|
/// <returns></returns>
|
||||||
/// <returns>An enumerable list of <see cref="IUmbracoEntity"/> objects</returns>
|
IEnumerable<IUmbracoEntity> GetPagedDescendantsFromRoot(UmbracoObjectTypes umbracoObjectType, long pageIndex, int pageSize, out long totalRecords,
|
||||||
IEnumerable<IUmbracoEntity> GetDescendents(int id);
|
string orderBy = "path", Direction orderDirection = Direction.Ascending, string filter = "", bool includeTrashed = true);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a collection of descendents by the parents Id
|
/// Gets a collection of descendents by the parents Id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="id">Id of entity to retrieve descendents for</param>
|
/// <param name="id">Id of entity to retrieve descendents for</param>
|
||||||
/// <param name="umbracoObjectType">UmbracoObjectType of the descendents to retrieve</param>
|
/// <returns>An enumerable list of <see cref="IUmbracoEntity"/> objects</returns>
|
||||||
/// <returns>An enumerable list of <see cref="IUmbracoEntity"/> objects</returns>
|
IEnumerable<IUmbracoEntity> GetDescendents(int id);
|
||||||
IEnumerable<IUmbracoEntity> GetDescendents(int id, UmbracoObjectTypes umbracoObjectType);
|
|
||||||
|
/// <summary>
|
||||||
/// <summary>
|
/// Gets a collection of descendents by the parents Id
|
||||||
/// Gets a collection of the entities at the root, which corresponds to the entities with a Parent Id of -1.
|
/// </summary>
|
||||||
/// </summary>
|
/// <param name="id">Id of entity to retrieve descendents for</param>
|
||||||
/// <param name="umbracoObjectType">UmbracoObjectType of the root entities to retrieve</param>
|
/// <param name="umbracoObjectType">UmbracoObjectType of the descendents to retrieve</param>
|
||||||
/// <returns>An enumerable list of <see cref="IUmbracoEntity"/> objects</returns>
|
/// <returns>An enumerable list of <see cref="IUmbracoEntity"/> objects</returns>
|
||||||
IEnumerable<IUmbracoEntity> GetRootEntities(UmbracoObjectTypes umbracoObjectType);
|
IEnumerable<IUmbracoEntity> GetDescendents(int id, UmbracoObjectTypes umbracoObjectType);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a collection of all <see cref="IUmbracoEntity"/> of a given type.
|
/// Gets a collection of the entities at the root, which corresponds to the entities with a Parent Id of -1.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <typeparam name="T">Type of the entities to retrieve</typeparam>
|
/// <param name="umbracoObjectType">UmbracoObjectType of the root entities to retrieve</param>
|
||||||
/// <returns>An enumerable list of <see cref="IUmbracoEntity"/> objects</returns>
|
/// <returns>An enumerable list of <see cref="IUmbracoEntity"/> objects</returns>
|
||||||
IEnumerable<IUmbracoEntity> GetAll<T>(params int[] ids) where T : IUmbracoEntity;
|
IEnumerable<IUmbracoEntity> GetRootEntities(UmbracoObjectTypes umbracoObjectType);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a collection of all <see cref="IUmbracoEntity"/> of a given type.
|
/// Gets a collection of all <see cref="IUmbracoEntity"/> of a given type.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="umbracoObjectType">UmbracoObjectType of the entities to return</param>
|
/// <typeparam name="T">Type of the entities to retrieve</typeparam>
|
||||||
/// <param name="ids"></param>
|
/// <returns>An enumerable list of <see cref="IUmbracoEntity"/> objects</returns>
|
||||||
/// <returns>An enumerable list of <see cref="IUmbracoEntity"/> objects</returns>
|
IEnumerable<IUmbracoEntity> GetAll<T>(params int[] ids) where T : IUmbracoEntity;
|
||||||
IEnumerable<IUmbracoEntity> GetAll(UmbracoObjectTypes umbracoObjectType, params int[] ids);
|
|
||||||
|
/// <summary>
|
||||||
/// <summary>
|
/// Gets a collection of all <see cref="IUmbracoEntity"/> of a given type.
|
||||||
/// Gets a collection of all <see cref="IUmbracoEntity"/> of a given type.
|
/// </summary>
|
||||||
/// </summary>
|
/// <param name="umbracoObjectType">UmbracoObjectType of the entities to return</param>
|
||||||
/// <param name="umbracoObjectType">UmbracoObjectType of the entities to return</param>
|
/// <param name="ids"></param>
|
||||||
/// <param name="keys"></param>
|
/// <returns>An enumerable list of <see cref="IUmbracoEntity"/> objects</returns>
|
||||||
/// <returns>An enumerable list of <see cref="IUmbracoEntity"/> objects</returns>
|
IEnumerable<IUmbracoEntity> GetAll(UmbracoObjectTypes umbracoObjectType, params int[] ids);
|
||||||
IEnumerable<IUmbracoEntity> GetAll(UmbracoObjectTypes umbracoObjectType, Guid[] keys);
|
|
||||||
|
/// <summary>
|
||||||
/// <summary>
|
/// Gets a collection of all <see cref="IUmbracoEntity"/> of a given type.
|
||||||
/// Gets a collection of <see cref="IUmbracoEntity"/>
|
/// </summary>
|
||||||
/// </summary>
|
/// <param name="umbracoObjectType">UmbracoObjectType of the entities to return</param>
|
||||||
/// <param name="objectTypeId">Guid id of the UmbracoObjectType</param>
|
/// <param name="keys"></param>
|
||||||
/// <param name="ids"></param>
|
/// <returns>An enumerable list of <see cref="IUmbracoEntity"/> objects</returns>
|
||||||
/// <returns>An enumerable list of <see cref="IUmbracoEntity"/> objects</returns>
|
IEnumerable<IUmbracoEntity> GetAll(UmbracoObjectTypes umbracoObjectType, Guid[] keys);
|
||||||
IEnumerable<IUmbracoEntity> GetAll(Guid objectTypeId, params int[] ids);
|
|
||||||
|
/// <summary>
|
||||||
/// <summary>
|
/// Gets a collection of <see cref="IUmbracoEntity"/>
|
||||||
/// Gets paths for entities.
|
/// </summary>
|
||||||
/// </summary>
|
/// <param name="objectTypeId">Guid id of the UmbracoObjectType</param>
|
||||||
IEnumerable<EntityPath> GetAllPaths(UmbracoObjectTypes umbracoObjectType, params int[] ids);
|
/// <param name="ids"></param>
|
||||||
|
/// <returns>An enumerable list of <see cref="IUmbracoEntity"/> objects</returns>
|
||||||
/// <summary>
|
IEnumerable<IUmbracoEntity> GetAll(Guid objectTypeId, params int[] ids);
|
||||||
/// Gets paths for entities.
|
|
||||||
/// </summary>
|
/// <summary>
|
||||||
IEnumerable<EntityPath> GetAllPaths(UmbracoObjectTypes umbracoObjectType, params Guid[] keys);
|
/// Gets paths for entities.
|
||||||
|
/// </summary>
|
||||||
/// <summary>
|
IEnumerable<EntityPath> GetAllPaths(UmbracoObjectTypes umbracoObjectType, params int[] ids);
|
||||||
/// Gets the UmbracoObjectType from the integer id of an IUmbracoEntity.
|
|
||||||
/// </summary>
|
/// <summary>
|
||||||
/// <param name="id">Id of the entity</param>
|
/// Gets paths for entities.
|
||||||
/// <returns><see cref="UmbracoObjectTypes"/></returns>
|
/// </summary>
|
||||||
UmbracoObjectTypes GetObjectType(int id);
|
IEnumerable<EntityPath> GetAllPaths(UmbracoObjectTypes umbracoObjectType, params Guid[] keys);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the UmbracoObjectType from an IUmbracoEntity.
|
/// Gets the UmbracoObjectType from the integer id of an IUmbracoEntity.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="entity"><see cref="IUmbracoEntity"/></param>
|
/// <param name="id">Id of the entity</param>
|
||||||
/// <returns><see cref="UmbracoObjectTypes"/></returns>
|
/// <returns><see cref="UmbracoObjectTypes"/></returns>
|
||||||
UmbracoObjectTypes GetObjectType(IUmbracoEntity entity);
|
UmbracoObjectTypes GetObjectType(int id);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the Type of an entity by its Id
|
/// Gets the UmbracoObjectType from an IUmbracoEntity.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="id">Id of the entity</param>
|
/// <param name="entity"><see cref="IUmbracoEntity"/></param>
|
||||||
/// <returns>Type of the entity</returns>
|
/// <returns><see cref="UmbracoObjectTypes"/></returns>
|
||||||
Type GetEntityType(int id);
|
UmbracoObjectTypes GetObjectType(IUmbracoEntity entity);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the Type of an entity by its <see cref="UmbracoObjectTypes"/>
|
/// Gets the Type of an entity by its Id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="umbracoObjectType"><see cref="UmbracoObjectTypes"/></param>
|
/// <param name="id">Id of the entity</param>
|
||||||
/// <returns>Type of the entity</returns>
|
/// <returns>Type of the entity</returns>
|
||||||
Type GetEntityType(UmbracoObjectTypes umbracoObjectType);
|
Type GetEntityType(int id);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Reserves an identifier for a key.
|
/// Gets the Type of an entity by its <see cref="UmbracoObjectTypes"/>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="key">They key.</param>
|
/// <param name="umbracoObjectType"><see cref="UmbracoObjectTypes"/></param>
|
||||||
/// <returns>The identifier.</returns>
|
/// <returns>Type of the entity</returns>
|
||||||
/// <remarks>When a new content or a media is saved with the key, it will have the reserved identifier.</remarks>
|
Type GetEntityType(UmbracoObjectTypes umbracoObjectType);
|
||||||
int ReserveId(Guid key);
|
|
||||||
}
|
/// <summary>
|
||||||
}
|
/// Reserves an identifier for a key.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="key">They key.</param>
|
||||||
|
/// <returns>The identifier.</returns>
|
||||||
|
/// <remarks>When a new content or a media is saved with the key, it will have the reserved identifier.</remarks>
|
||||||
|
int ReserveId(Guid key);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,306 +1,325 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Umbraco.Core.Models;
|
using System.ComponentModel;
|
||||||
using Umbraco.Core.Models.EntityBase;
|
using Umbraco.Core.Models;
|
||||||
|
using Umbraco.Core.Models.EntityBase;
|
||||||
namespace Umbraco.Core.Services
|
|
||||||
{
|
namespace Umbraco.Core.Services
|
||||||
public interface IRelationService : IService
|
{
|
||||||
{
|
public interface IRelationService : IService
|
||||||
/// <summary>
|
{
|
||||||
/// Gets a <see cref="Relation"/> by its Id
|
/// <summary>
|
||||||
/// </summary>
|
/// Gets a <see cref="Relation"/> by its Id
|
||||||
/// <param name="id">Id of the <see cref="Relation"/></param>
|
/// </summary>
|
||||||
/// <returns>A <see cref="Relation"/> object</returns>
|
/// <param name="id">Id of the <see cref="Relation"/></param>
|
||||||
IRelation GetById(int id);
|
/// <returns>A <see cref="Relation"/> object</returns>
|
||||||
|
IRelation GetById(int id);
|
||||||
/// <summary>
|
|
||||||
/// Gets a <see cref="RelationType"/> by its Id
|
/// <summary>
|
||||||
/// </summary>
|
/// Gets a <see cref="RelationType"/> by its Id
|
||||||
/// <param name="id">Id of the <see cref="RelationType"/></param>
|
/// </summary>
|
||||||
/// <returns>A <see cref="RelationType"/> object</returns>
|
/// <param name="id">Id of the <see cref="RelationType"/></param>
|
||||||
IRelationType GetRelationTypeById(int id);
|
/// <returns>A <see cref="RelationType"/> object</returns>
|
||||||
|
IRelationType GetRelationTypeById(int id);
|
||||||
/// <summary>
|
|
||||||
/// Gets a <see cref="RelationType"/> by its Id
|
/// <summary>
|
||||||
/// </summary>
|
/// Gets a <see cref="RelationType"/> by its Id
|
||||||
/// <param name="id">Id of the <see cref="RelationType"/></param>
|
/// </summary>
|
||||||
/// <returns>A <see cref="RelationType"/> object</returns>
|
/// <param name="id">Id of the <see cref="RelationType"/></param>
|
||||||
IRelationType GetRelationTypeById(Guid id);
|
/// <returns>A <see cref="RelationType"/> object</returns>
|
||||||
|
IRelationType GetRelationTypeById(Guid id);
|
||||||
/// <summary>
|
|
||||||
/// Gets a <see cref="RelationType"/> by its Alias
|
/// <summary>
|
||||||
/// </summary>
|
/// Gets a <see cref="RelationType"/> by its Alias
|
||||||
/// <param name="alias">Alias of the <see cref="RelationType"/></param>
|
/// </summary>
|
||||||
/// <returns>A <see cref="RelationType"/> object</returns>
|
/// <param name="alias">Alias of the <see cref="RelationType"/></param>
|
||||||
IRelationType GetRelationTypeByAlias(string alias);
|
/// <returns>A <see cref="RelationType"/> object</returns>
|
||||||
|
IRelationType GetRelationTypeByAlias(string alias);
|
||||||
/// <summary>
|
|
||||||
/// Gets all <see cref="Relation"/> objects
|
/// <summary>
|
||||||
/// </summary>
|
/// Gets all <see cref="Relation"/> objects
|
||||||
/// <param name="ids">Optional array of integer ids to return relations for</param>
|
/// </summary>
|
||||||
/// <returns>An enumerable list of <see cref="Relation"/> objects</returns>
|
/// <param name="ids">Optional array of integer ids to return relations for</param>
|
||||||
IEnumerable<IRelation> GetAllRelations(params int[] ids);
|
/// <returns>An enumerable list of <see cref="Relation"/> objects</returns>
|
||||||
|
IEnumerable<IRelation> GetAllRelations(params int[] ids);
|
||||||
/// <summary>
|
|
||||||
/// Gets all <see cref="Relation"/> objects by their <see cref="RelationType"/>
|
/// <summary>
|
||||||
/// </summary>
|
/// Gets all <see cref="Relation"/> objects by their <see cref="RelationType"/>
|
||||||
/// <param name="relationType"><see cref="RelationType"/> to retrieve Relations for</param>
|
/// </summary>
|
||||||
/// <returns>An enumerable list of <see cref="Relation"/> objects</returns>
|
/// <param name="relationType"><see cref="RelationType"/> to retrieve Relations for</param>
|
||||||
IEnumerable<IRelation> GetAllRelationsByRelationType(RelationType relationType);
|
/// <returns>An enumerable list of <see cref="Relation"/> objects</returns>
|
||||||
|
IEnumerable<IRelation> GetAllRelationsByRelationType(RelationType relationType);
|
||||||
/// <summary>
|
|
||||||
/// Gets all <see cref="Relation"/> objects by their <see cref="RelationType"/>'s Id
|
/// <summary>
|
||||||
/// </summary>
|
/// Gets all <see cref="Relation"/> objects by their <see cref="RelationType"/>'s Id
|
||||||
/// <param name="relationTypeId">Id of the <see cref="RelationType"/> to retrieve Relations for</param>
|
/// </summary>
|
||||||
/// <returns>An enumerable list of <see cref="Relation"/> objects</returns>
|
/// <param name="relationTypeId">Id of the <see cref="RelationType"/> to retrieve Relations for</param>
|
||||||
IEnumerable<IRelation> GetAllRelationsByRelationType(int relationTypeId);
|
/// <returns>An enumerable list of <see cref="Relation"/> objects</returns>
|
||||||
|
IEnumerable<IRelation> GetAllRelationsByRelationType(int relationTypeId);
|
||||||
/// <summary>
|
|
||||||
/// Gets all <see cref="Relation"/> objects
|
/// <summary>
|
||||||
/// </summary>
|
/// Gets all <see cref="Relation"/> objects
|
||||||
/// <param name="ids">Optional array of integer ids to return relationtypes for</param>
|
/// </summary>
|
||||||
/// <returns>An enumerable list of <see cref="RelationType"/> objects</returns>
|
/// <param name="ids">Optional array of integer ids to return relationtypes for</param>
|
||||||
IEnumerable<IRelationType> GetAllRelationTypes(params int[] ids);
|
/// <returns>An enumerable list of <see cref="RelationType"/> objects</returns>
|
||||||
|
IEnumerable<IRelationType> GetAllRelationTypes(params int[] ids);
|
||||||
/// <summary>
|
|
||||||
/// Gets a list of <see cref="Relation"/> objects by their parent Id
|
/// <summary>
|
||||||
/// </summary>
|
/// Gets a list of <see cref="Relation"/> objects by their parent Id
|
||||||
/// <param name="id">Id of the parent to retrieve relations for</param>
|
/// </summary>
|
||||||
/// <returns>An enumerable list of <see cref="Relation"/> objects</returns>
|
/// <param name="id">Id of the parent to retrieve relations for</param>
|
||||||
IEnumerable<IRelation> GetByParentId(int id);
|
/// <returns>An enumerable list of <see cref="Relation"/> objects</returns>
|
||||||
|
IEnumerable<IRelation> GetByParentId(int id);
|
||||||
/// <summary>
|
|
||||||
/// Gets a list of <see cref="Relation"/> objects by their parent entity
|
/// <summary>
|
||||||
/// </summary>
|
/// Gets a list of <see cref="Relation"/> objects by their parent entity
|
||||||
/// <param name="parent">Parent Entity to retrieve relations for</param>
|
/// </summary>
|
||||||
/// <returns>An enumerable list of <see cref="Relation"/> objects</returns>
|
/// <param name="parent">Parent Entity to retrieve relations for</param>
|
||||||
IEnumerable<IRelation> GetByParent(IUmbracoEntity parent);
|
/// <returns>An enumerable list of <see cref="Relation"/> objects</returns>
|
||||||
|
IEnumerable<IRelation> GetByParent(IUmbracoEntity parent);
|
||||||
/// <summary>
|
|
||||||
/// Gets a list of <see cref="Relation"/> objects by their parent entity
|
/// <summary>
|
||||||
/// </summary>
|
/// Gets a list of <see cref="Relation"/> objects by their parent entity
|
||||||
/// <param name="parent">Parent Entity to retrieve relations for</param>
|
/// </summary>
|
||||||
/// <param name="relationTypeAlias">Alias of the type of relation to retrieve</param>
|
/// <param name="parent">Parent Entity to retrieve relations for</param>
|
||||||
/// <returns>An enumerable list of <see cref="Relation"/> objects</returns>
|
/// <param name="relationTypeAlias">Alias of the type of relation to retrieve</param>
|
||||||
IEnumerable<IRelation> GetByParent(IUmbracoEntity parent, string relationTypeAlias);
|
/// <returns>An enumerable list of <see cref="Relation"/> objects</returns>
|
||||||
|
IEnumerable<IRelation> GetByParent(IUmbracoEntity parent, string relationTypeAlias);
|
||||||
/// <summary>
|
|
||||||
/// Gets a list of <see cref="Relation"/> objects by their child Id
|
/// <summary>
|
||||||
/// </summary>
|
/// Gets a list of <see cref="Relation"/> objects by their child Id
|
||||||
/// <param name="id">Id of the child to retrieve relations for</param>
|
/// </summary>
|
||||||
/// <returns>An enumerable list of <see cref="Relation"/> objects</returns>
|
/// <param name="id">Id of the child to retrieve relations for</param>
|
||||||
IEnumerable<IRelation> GetByChildId(int id);
|
/// <returns>An enumerable list of <see cref="Relation"/> objects</returns>
|
||||||
|
IEnumerable<IRelation> GetByChildId(int id);
|
||||||
/// <summary>
|
|
||||||
/// Gets a list of <see cref="Relation"/> objects by their child Entity
|
/// <summary>
|
||||||
/// </summary>
|
/// Gets a list of <see cref="Relation"/> objects by their child Entity
|
||||||
/// <param name="child">Child Entity to retrieve relations for</param>
|
/// </summary>
|
||||||
/// <returns>An enumerable list of <see cref="Relation"/> objects</returns>
|
/// <param name="child">Child Entity to retrieve relations for</param>
|
||||||
IEnumerable<IRelation> GetByChild(IUmbracoEntity child);
|
/// <returns>An enumerable list of <see cref="Relation"/> objects</returns>
|
||||||
|
IEnumerable<IRelation> GetByChild(IUmbracoEntity child);
|
||||||
/// <summary>
|
|
||||||
/// Gets a list of <see cref="Relation"/> objects by their child Entity
|
/// <summary>
|
||||||
/// </summary>
|
/// Gets a list of <see cref="Relation"/> objects by their child Entity
|
||||||
/// <param name="child">Child Entity to retrieve relations for</param>
|
/// </summary>
|
||||||
/// <param name="relationTypeAlias">Alias of the type of relation to retrieve</param>
|
/// <param name="child">Child Entity to retrieve relations for</param>
|
||||||
/// <returns>An enumerable list of <see cref="Relation"/> objects</returns>
|
/// <param name="relationTypeAlias">Alias of the type of relation to retrieve</param>
|
||||||
IEnumerable<IRelation> GetByChild(IUmbracoEntity child, string relationTypeAlias);
|
/// <returns>An enumerable list of <see cref="Relation"/> objects</returns>
|
||||||
|
IEnumerable<IRelation> GetByChild(IUmbracoEntity child, string relationTypeAlias);
|
||||||
/// <summary>
|
|
||||||
/// Gets a list of <see cref="Relation"/> objects by their child or parent Id.
|
/// <summary>
|
||||||
/// Using this method will get you all relations regards of it being a child or parent relation.
|
/// Gets a list of <see cref="Relation"/> objects by their child or parent Id.
|
||||||
/// </summary>
|
/// Using this method will get you all relations regards of it being a child or parent relation.
|
||||||
/// <param name="id">Id of the child or parent to retrieve relations for</param>
|
/// </summary>
|
||||||
/// <returns>An enumerable list of <see cref="Relation"/> objects</returns>
|
/// <param name="id">Id of the child or parent to retrieve relations for</param>
|
||||||
IEnumerable<IRelation> GetByParentOrChildId(int id);
|
/// <returns>An enumerable list of <see cref="Relation"/> objects</returns>
|
||||||
|
IEnumerable<IRelation> GetByParentOrChildId(int id);
|
||||||
IEnumerable<IRelation> GetByParentOrChildId(int id, string relationTypeAlias);
|
|
||||||
|
IEnumerable<IRelation> GetByParentOrChildId(int id, string relationTypeAlias);
|
||||||
/// <summary>
|
|
||||||
/// Gets a list of <see cref="Relation"/> objects by the Name of the <see cref="RelationType"/>
|
/// <summary>
|
||||||
/// </summary>
|
/// Gets a list of <see cref="Relation"/> objects by the Name of the <see cref="RelationType"/>
|
||||||
/// <param name="relationTypeName">Name of the <see cref="RelationType"/> to retrieve Relations for</param>
|
/// </summary>
|
||||||
/// <returns>An enumerable list of <see cref="Relation"/> objects</returns>
|
/// <param name="relationTypeName">Name of the <see cref="RelationType"/> to retrieve Relations for</param>
|
||||||
IEnumerable<IRelation> GetByRelationTypeName(string relationTypeName);
|
/// <returns>An enumerable list of <see cref="Relation"/> objects</returns>
|
||||||
|
IEnumerable<IRelation> GetByRelationTypeName(string relationTypeName);
|
||||||
/// <summary>
|
|
||||||
/// Gets a list of <see cref="Relation"/> objects by the Alias of the <see cref="RelationType"/>
|
/// <summary>
|
||||||
/// </summary>
|
/// Gets a list of <see cref="Relation"/> objects by the Alias of the <see cref="RelationType"/>
|
||||||
/// <param name="relationTypeAlias">Alias of the <see cref="RelationType"/> to retrieve Relations for</param>
|
/// </summary>
|
||||||
/// <returns>An enumerable list of <see cref="Relation"/> objects</returns>
|
/// <param name="relationTypeAlias">Alias of the <see cref="RelationType"/> to retrieve Relations for</param>
|
||||||
IEnumerable<IRelation> GetByRelationTypeAlias(string relationTypeAlias);
|
/// <returns>An enumerable list of <see cref="Relation"/> objects</returns>
|
||||||
|
IEnumerable<IRelation> GetByRelationTypeAlias(string relationTypeAlias);
|
||||||
/// <summary>
|
|
||||||
/// Gets a list of <see cref="Relation"/> objects by the Id of the <see cref="RelationType"/>
|
/// <summary>
|
||||||
/// </summary>
|
/// Gets a list of <see cref="Relation"/> objects by the Id of the <see cref="RelationType"/>
|
||||||
/// <param name="relationTypeId">Id of the <see cref="RelationType"/> to retrieve Relations for</param>
|
/// </summary>
|
||||||
/// <returns>An enumerable list of <see cref="Relation"/> objects</returns>
|
/// <param name="relationTypeId">Id of the <see cref="RelationType"/> to retrieve Relations for</param>
|
||||||
IEnumerable<IRelation> GetByRelationTypeId(int relationTypeId);
|
/// <returns>An enumerable list of <see cref="Relation"/> objects</returns>
|
||||||
|
IEnumerable<IRelation> GetByRelationTypeId(int relationTypeId);
|
||||||
/// <summary>
|
|
||||||
/// Gets the Child object from a Relation as an <see cref="IUmbracoEntity"/>
|
/// <summary>
|
||||||
/// </summary>
|
/// Gets the Child object from a Relation as an <see cref="IUmbracoEntity"/>
|
||||||
/// <param name="relation">Relation to retrieve child object from</param>
|
/// </summary>
|
||||||
/// <param name="loadBaseType">Optional bool to load the complete object graph when set to <c>False</c></param>
|
/// <param name="relation">Relation to retrieve child object from</param>
|
||||||
/// <returns>An <see cref="IUmbracoEntity"/></returns>
|
/// <returns>An <see cref="IUmbracoEntity"/></returns>
|
||||||
IUmbracoEntity GetChildEntityFromRelation(IRelation relation, bool loadBaseType = false);
|
IUmbracoEntity GetChildEntityFromRelation(IRelation relation);
|
||||||
|
|
||||||
/// <summary>
|
[Obsolete("Use the overload that doesn't specify loadBaseType instead, loadBaseType will not affect any results")]
|
||||||
/// Gets the Parent object from a Relation as an <see cref="IUmbracoEntity"/>
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||||
/// </summary>
|
IUmbracoEntity GetChildEntityFromRelation(IRelation relation, bool loadBaseType = false);
|
||||||
/// <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>
|
/// <summary>
|
||||||
/// <returns>An <see cref="IUmbracoEntity"/></returns>
|
/// Gets the Parent object from a Relation as an <see cref="IUmbracoEntity"/>
|
||||||
IUmbracoEntity GetParentEntityFromRelation(IRelation relation, bool loadBaseType = false);
|
/// </summary>
|
||||||
|
/// <param name="relation">Relation to retrieve parent object from</param>
|
||||||
/// <summary>
|
/// <returns>An <see cref="IUmbracoEntity"/></returns>
|
||||||
/// Gets the Parent and Child objects from a Relation as a <see cref="Tuple"/>"/> with <see cref="IUmbracoEntity"/>.
|
IUmbracoEntity GetParentEntityFromRelation(IRelation relation);
|
||||||
/// </summary>
|
|
||||||
/// <param name="relation">Relation to retrieve parent and child object from</param>
|
[Obsolete("Use the overload that doesn't specify loadBaseType instead, loadBaseType will not affect any results")]
|
||||||
/// <param name="loadBaseType">Optional bool to load the complete object graph when set to <c>False</c></param>
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||||
/// <returns>Returns a Tuple with Parent (item1) and Child (item2)</returns>
|
IUmbracoEntity GetParentEntityFromRelation(IRelation relation, bool loadBaseType = false);
|
||||||
Tuple<IUmbracoEntity, IUmbracoEntity> GetEntitiesFromRelation(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 Child objects from a list of Relations as a list of <see cref="IUmbracoEntity"/> objects.
|
/// </summary>
|
||||||
/// </summary>
|
/// <param name="relation">Relation to retrieve parent and child object from</param>
|
||||||
/// <param name="relations">List of relations to retrieve child objects from</param>
|
/// <returns>Returns a Tuple with Parent (item1) and Child (item2)</returns>
|
||||||
/// <param name="loadBaseType">Optional bool to load the complete object graph when set to <c>False</c></param>
|
Tuple<IUmbracoEntity, IUmbracoEntity> GetEntitiesFromRelation(IRelation relation);
|
||||||
/// <returns>An enumerable list of <see cref="IUmbracoEntity"/></returns>
|
|
||||||
IEnumerable<IUmbracoEntity> GetChildEntitiesFromRelations(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)]
|
||||||
/// <summary>
|
Tuple<IUmbracoEntity, IUmbracoEntity> GetEntitiesFromRelation(IRelation relation, bool loadBaseType = false);
|
||||||
/// 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>
|
/// Gets the Child objects from a list of Relations as a list of <see cref="IUmbracoEntity"/> objects.
|
||||||
/// <param name="loadBaseType">Optional bool to load the complete object graph when set to <c>False</c></param>
|
/// </summary>
|
||||||
/// <returns>An enumerable list of <see cref="IUmbracoEntity"/></returns>
|
/// <param name="relations">List of relations to retrieve child objects from</param>
|
||||||
IEnumerable<IUmbracoEntity> GetParentEntitiesFromRelations(IEnumerable<IRelation> relations,
|
/// <returns>An enumerable list of <see cref="IUmbracoEntity"/></returns>
|
||||||
bool loadBaseType = false);
|
IEnumerable<IUmbracoEntity> GetChildEntitiesFromRelations(IEnumerable<IRelation> relations);
|
||||||
|
|
||||||
/// <summary>
|
[Obsolete("Use the overload that doesn't specify loadBaseType instead, loadBaseType will not affect any results")]
|
||||||
/// Gets the Parent and Child objects from a list of Relations as a list of <see cref="IUmbracoEntity"/> objects.
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||||
/// </summary>
|
IEnumerable<IUmbracoEntity> GetChildEntitiesFromRelations(IEnumerable<IRelation> relations, bool loadBaseType = false);
|
||||||
/// <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>
|
/// <summary>
|
||||||
/// <returns>An enumerable list of <see cref="Tuple"/> with <see cref="IUmbracoEntity"/></returns>
|
/// Gets the Parent objects from a list of Relations as a list of <see cref="IUmbracoEntity"/> objects.
|
||||||
IEnumerable<Tuple<IUmbracoEntity, IUmbracoEntity>> GetEntitiesFromRelations(
|
/// </summary>
|
||||||
IEnumerable<IRelation> relations,
|
/// <param name="relations">List of relations to retrieve parent objects from</param>
|
||||||
bool loadBaseType = false);
|
/// <returns>An enumerable list of <see cref="IUmbracoEntity"/></returns>
|
||||||
|
IEnumerable<IUmbracoEntity> GetParentEntitiesFromRelations(IEnumerable<IRelation> relations);
|
||||||
/// <summary>
|
|
||||||
/// Relates two objects by their entity Ids.
|
[Obsolete("Use the overload that doesn't specify loadBaseType instead, loadBaseType will not affect any results")]
|
||||||
/// </summary>
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||||
/// <param name="parentId">Id of the parent</param>
|
IEnumerable<IUmbracoEntity> GetParentEntitiesFromRelations(IEnumerable<IRelation> relations, bool loadBaseType = false);
|
||||||
/// <param name="childId">Id of the child</param>
|
|
||||||
/// <param name="relationType">The type of relation to create</param>
|
/// <summary>
|
||||||
/// <returns>The created <see cref="Relation"/></returns>
|
/// Gets the Parent and Child objects from a list of Relations as a list of <see cref="IUmbracoEntity"/> objects.
|
||||||
IRelation Relate(int parentId, int childId, IRelationType relationType);
|
/// </summary>
|
||||||
|
/// <param name="relations">List of relations to retrieve parent and child objects from</param>
|
||||||
/// <summary>
|
/// <param name="loadBaseType">Optional bool to load the complete object graph when set to <c>False</c></param>
|
||||||
/// Relates two objects that are based on the <see cref="IUmbracoEntity"/> interface.
|
IEnumerable<Tuple<IUmbracoEntity, IUmbracoEntity>> GetEntitiesFromRelations(
|
||||||
/// </summary>
|
IEnumerable<IRelation> relations);
|
||||||
/// <param name="parent">Parent entity</param>
|
|
||||||
/// <param name="child">Child entity</param>
|
[Obsolete("Use the overload that doesn't specify loadBaseType instead, loadBaseType will not affect any results")]
|
||||||
/// <param name="relationType">The type of relation to create</param>
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||||
/// <returns>The created <see cref="Relation"/></returns>
|
IEnumerable<Tuple<IUmbracoEntity, IUmbracoEntity>> GetEntitiesFromRelations(
|
||||||
IRelation Relate(IUmbracoEntity parent, IUmbracoEntity child, IRelationType relationType);
|
IEnumerable<IRelation> relations,
|
||||||
|
bool loadBaseType = false);
|
||||||
/// <summary>
|
|
||||||
/// Relates two objects by their entity Ids.
|
/// <summary>
|
||||||
/// </summary>
|
/// Relates two objects by their entity Ids.
|
||||||
/// <param name="parentId">Id of the parent</param>
|
/// </summary>
|
||||||
/// <param name="childId">Id of the child</param>
|
/// <param name="parentId">Id of the parent</param>
|
||||||
/// <param name="relationTypeAlias">Alias of the type of relation to create</param>
|
/// <param name="childId">Id of the child</param>
|
||||||
/// <returns>The created <see cref="Relation"/></returns>
|
/// <param name="relationType">The type of relation to create</param>
|
||||||
IRelation Relate(int parentId, int childId, string relationTypeAlias);
|
/// <returns>The created <see cref="Relation"/></returns>
|
||||||
|
IRelation Relate(int parentId, int childId, IRelationType relationType);
|
||||||
/// <summary>
|
|
||||||
/// Relates two objects that are based on the <see cref="IUmbracoEntity"/> interface.
|
/// <summary>
|
||||||
/// </summary>
|
/// Relates two objects that are based on the <see cref="IUmbracoEntity"/> interface.
|
||||||
/// <param name="parent">Parent entity</param>
|
/// </summary>
|
||||||
/// <param name="child">Child entity</param>
|
/// <param name="parent">Parent entity</param>
|
||||||
/// <param name="relationTypeAlias">Alias of the type of relation to create</param>
|
/// <param name="child">Child entity</param>
|
||||||
/// <returns>The created <see cref="Relation"/></returns>
|
/// <param name="relationType">The type of relation to create</param>
|
||||||
IRelation Relate(IUmbracoEntity parent, IUmbracoEntity child, string relationTypeAlias);
|
/// <returns>The created <see cref="Relation"/></returns>
|
||||||
|
IRelation Relate(IUmbracoEntity parent, IUmbracoEntity child, IRelationType relationType);
|
||||||
/// <summary>
|
|
||||||
/// Checks whether any relations exists for the passed in <see cref="RelationType"/>.
|
/// <summary>
|
||||||
/// </summary>
|
/// Relates two objects by their entity Ids.
|
||||||
/// <param name="relationType"><see cref="RelationType"/> to check for relations</param>
|
/// </summary>
|
||||||
/// <returns>Returns <c>True</c> if any relations exists for the given <see cref="RelationType"/>, otherwise <c>False</c></returns>
|
/// <param name="parentId">Id of the parent</param>
|
||||||
bool HasRelations(IRelationType relationType);
|
/// <param name="childId">Id of the child</param>
|
||||||
|
/// <param name="relationTypeAlias">Alias of the type of relation to create</param>
|
||||||
/// <summary>
|
/// <returns>The created <see cref="Relation"/></returns>
|
||||||
/// Checks whether any relations exists for the passed in Id.
|
IRelation Relate(int parentId, int childId, string relationTypeAlias);
|
||||||
/// </summary>
|
|
||||||
/// <param name="id">Id of an object to check relations for</param>
|
/// <summary>
|
||||||
/// <returns>Returns <c>True</c> if any relations exists with the given Id, otherwise <c>False</c></returns>
|
/// Relates two objects that are based on the <see cref="IUmbracoEntity"/> interface.
|
||||||
bool IsRelated(int id);
|
/// </summary>
|
||||||
|
/// <param name="parent">Parent entity</param>
|
||||||
/// <summary>
|
/// <param name="child">Child entity</param>
|
||||||
/// Checks whether two items are related
|
/// <param name="relationTypeAlias">Alias of the type of relation to create</param>
|
||||||
/// </summary>
|
/// <returns>The created <see cref="Relation"/></returns>
|
||||||
/// <param name="parentId">Id of the Parent relation</param>
|
IRelation Relate(IUmbracoEntity parent, IUmbracoEntity child, string relationTypeAlias);
|
||||||
/// <param name="childId">Id of the Child relation</param>
|
|
||||||
/// <returns>Returns <c>True</c> if any relations exists with the given Ids, otherwise <c>False</c></returns>
|
/// <summary>
|
||||||
bool AreRelated(int parentId, int childId);
|
/// Checks whether any relations exists for the passed in <see cref="RelationType"/>.
|
||||||
|
/// </summary>
|
||||||
/// <summary>
|
/// <param name="relationType"><see cref="RelationType"/> to check for relations</param>
|
||||||
/// Checks whether two items are related
|
/// <returns>Returns <c>True</c> if any relations exists for the given <see cref="RelationType"/>, otherwise <c>False</c></returns>
|
||||||
/// </summary>
|
bool HasRelations(IRelationType relationType);
|
||||||
/// <param name="parent">Parent entity</param>
|
|
||||||
/// <param name="child">Child entity</param>
|
/// <summary>
|
||||||
/// <returns>Returns <c>True</c> if any relations exist between the entities, otherwise <c>False</c></returns>
|
/// Checks whether any relations exists for the passed in Id.
|
||||||
bool AreRelated(IUmbracoEntity parent, IUmbracoEntity child);
|
/// </summary>
|
||||||
|
/// <param name="id">Id of an object to check relations for</param>
|
||||||
/// <summary>
|
/// <returns>Returns <c>True</c> if any relations exists with the given Id, otherwise <c>False</c></returns>
|
||||||
/// Checks whether two items are related
|
bool IsRelated(int id);
|
||||||
/// </summary>
|
|
||||||
/// <param name="parent">Parent entity</param>
|
/// <summary>
|
||||||
/// <param name="child">Child entity</param>
|
/// Checks whether two items are related
|
||||||
/// <param name="relationTypeAlias">Alias of the type of relation to create</param>
|
/// </summary>
|
||||||
/// <returns>Returns <c>True</c> if any relations exist between the entities, otherwise <c>False</c></returns>
|
/// <param name="parentId">Id of the Parent relation</param>
|
||||||
bool AreRelated(IUmbracoEntity parent, IUmbracoEntity child, string relationTypeAlias);
|
/// <param name="childId">Id of the Child relation</param>
|
||||||
|
/// <returns>Returns <c>True</c> if any relations exists with the given Ids, otherwise <c>False</c></returns>
|
||||||
/// <summary>
|
bool AreRelated(int parentId, int childId);
|
||||||
/// Checks whether two items are related
|
|
||||||
/// </summary>
|
/// <summary>
|
||||||
/// <param name="parentId">Id of the Parent relation</param>
|
/// Checks whether two items are related
|
||||||
/// <param name="childId">Id of the Child relation</param>
|
/// </summary>
|
||||||
/// <param name="relationTypeAlias">Alias of the type of relation to create</param>
|
/// <param name="parent">Parent entity</param>
|
||||||
/// <returns>Returns <c>True</c> if any relations exist between the entities, otherwise <c>False</c></returns>
|
/// <param name="child">Child entity</param>
|
||||||
bool AreRelated(int parentId, int childId, string relationTypeAlias);
|
/// <returns>Returns <c>True</c> if any relations exist between the entities, otherwise <c>False</c></returns>
|
||||||
|
bool AreRelated(IUmbracoEntity parent, IUmbracoEntity child);
|
||||||
/// <summary>
|
|
||||||
/// Saves a <see cref="Relation"/>
|
/// <summary>
|
||||||
/// </summary>
|
/// Checks whether two items are related
|
||||||
/// <param name="relation">Relation to save</param>
|
/// </summary>
|
||||||
void Save(IRelation relation);
|
/// <param name="parent">Parent entity</param>
|
||||||
|
/// <param name="child">Child entity</param>
|
||||||
/// <summary>
|
/// <param name="relationTypeAlias">Alias of the type of relation to create</param>
|
||||||
/// Saves a <see cref="RelationType"/>
|
/// <returns>Returns <c>True</c> if any relations exist between the entities, otherwise <c>False</c></returns>
|
||||||
/// </summary>
|
bool AreRelated(IUmbracoEntity parent, IUmbracoEntity child, string relationTypeAlias);
|
||||||
/// <param name="relationType">RelationType to Save</param>
|
|
||||||
void Save(IRelationType relationType);
|
/// <summary>
|
||||||
|
/// Checks whether two items are related
|
||||||
/// <summary>
|
/// </summary>
|
||||||
/// Deletes a <see cref="Relation"/>
|
/// <param name="parentId">Id of the Parent relation</param>
|
||||||
/// </summary>
|
/// <param name="childId">Id of the Child relation</param>
|
||||||
/// <param name="relation">Relation to Delete</param>
|
/// <param name="relationTypeAlias">Alias of the type of relation to create</param>
|
||||||
void Delete(IRelation relation);
|
/// <returns>Returns <c>True</c> if any relations exist between the entities, otherwise <c>False</c></returns>
|
||||||
|
bool AreRelated(int parentId, int childId, string relationTypeAlias);
|
||||||
/// <summary>
|
|
||||||
/// Deletes a <see cref="RelationType"/>
|
/// <summary>
|
||||||
/// </summary>
|
/// Saves a <see cref="Relation"/>
|
||||||
/// <param name="relationType">RelationType to Delete</param>
|
/// </summary>
|
||||||
void Delete(IRelationType relationType);
|
/// <param name="relation">Relation to save</param>
|
||||||
|
void Save(IRelation relation);
|
||||||
/// <summary>
|
|
||||||
/// Deletes all <see cref="Relation"/> objects based on the passed in <see cref="RelationType"/>
|
/// <summary>
|
||||||
/// </summary>
|
/// Saves a <see cref="RelationType"/>
|
||||||
/// <param name="relationType"><see cref="RelationType"/> to Delete Relations for</param>
|
/// </summary>
|
||||||
void DeleteRelationsOfType(IRelationType relationType);
|
/// <param name="relationType">RelationType to Save</param>
|
||||||
}
|
void Save(IRelationType relationType);
|
||||||
}
|
|
||||||
|
/// <summary>
|
||||||
|
/// Deletes a <see cref="Relation"/>
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="relation">Relation to Delete</param>
|
||||||
|
void Delete(IRelation relation);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Deletes a <see cref="RelationType"/>
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="relationType">RelationType to Delete</param>
|
||||||
|
void Delete(IRelationType relationType);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Deletes all <see cref="Relation"/> objects based on the passed in <see cref="RelationType"/>
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="relationType"><see cref="RelationType"/> to Delete Relations for</param>
|
||||||
|
void DeleteRelationsOfType(IRelationType relationType);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -124,40 +124,52 @@ 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)
|
{
|
||||||
{
|
var notification = notifications[0];
|
||||||
// continue if there's no notification for this user
|
var isMatched = false;
|
||||||
if (notifications[i].UserId != user.Id) continue; // next user
|
|
||||||
|
|
||||||
for (var j = 0; j < entitiesL.Count; j++)
|
|
||||||
{
|
|
||||||
var content = entitiesL[j];
|
|
||||||
var path = paths[j];
|
|
||||||
|
|
||||||
// test if the notification applies to the path ie to this entity
|
|
||||||
if (path.Contains(notifications[i].EntityId) == false) continue; // next entity
|
|
||||||
|
|
||||||
if (prevVersionDictionary.ContainsKey(content.Id) == false)
|
|
||||||
{
|
|
||||||
prevVersionDictionary[content.Id] = GetPreviousVersion(content.Id);
|
|
||||||
}
|
|
||||||
|
|
||||||
// queue notification
|
|
||||||
var req = CreateNotificationRequest(operatingUser, user, content, prevVersionDictionary[content.Id], actionName, http, createSubject, createBody);
|
|
||||||
Enqueue(req);
|
|
||||||
}
|
|
||||||
|
|
||||||
// skip other notifications for this user, essentially this means moving i to the next index of notifications
|
|
||||||
// for the next user.
|
|
||||||
do
|
|
||||||
{
|
|
||||||
i++;
|
|
||||||
} while (i < notifications.Count && notifications[i].UserId == user.Id);
|
|
||||||
|
|
||||||
if (i >= notifications.Count) break; // break if no more notifications
|
|
||||||
}
|
|
||||||
|
|
||||||
|
// 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++)
|
||||||
|
{
|
||||||
|
var content = entitiesL[j];
|
||||||
|
var path = paths[j];
|
||||||
|
|
||||||
|
// test if the notification applies to the path ie to this entity
|
||||||
|
if (path.Contains(notification.EntityId) == false) continue; // next entity
|
||||||
|
|
||||||
|
isMatched = true;
|
||||||
|
|
||||||
|
if (prevVersionDictionary.ContainsKey(content.Id) == false)
|
||||||
|
{
|
||||||
|
prevVersionDictionary[content.Id] = GetPreviousVersion(content.Id);
|
||||||
|
}
|
||||||
|
|
||||||
|
// queue notification
|
||||||
|
var req = CreateNotificationRequest(operatingUser, user, content, prevVersionDictionary[content.Id], actionName, http, createSubject, createBody);
|
||||||
|
Enqueue(req);
|
||||||
|
|
||||||
|
// don't process any further entities as a notification has been sent
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
// when a match has been found, skip other notifications for user.
|
||||||
|
if (isMatched)
|
||||||
|
{
|
||||||
|
notifications.RemoveAll(x => x.UserId == notification.UserId);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
notifications.Remove(notification);
|
||||||
|
}
|
||||||
|
|
||||||
// load more users if any
|
// load more users if any
|
||||||
id = users.Count == pagesz ? users.Last().Id + 1 : -1;
|
id = users.Count == pagesz ? users.Last().Id + 1 : -1;
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -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 {
|
||||||
|
|||||||
@@ -177,18 +177,7 @@ 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,20 +239,10 @@ 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();
|
||||||
Debug.Print(json);
|
Debug.Print(json);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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]
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -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) {
|
||||||
|
|||||||
+5
-5
@@ -12,7 +12,7 @@ function treeSearchBox(localizationService, searchService, $q) {
|
|||||||
searchFromName: "@",
|
searchFromName: "@",
|
||||||
showSearch: "@",
|
showSearch: "@",
|
||||||
section: "@",
|
section: "@",
|
||||||
ignoreUserStartNodes: "@",
|
datatypeId: "@",
|
||||||
hideSearchCallback: "=",
|
hideSearchCallback: "=",
|
||||||
searchCallback: "="
|
searchCallback: "="
|
||||||
},
|
},
|
||||||
@@ -62,10 +62,10 @@ 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) {
|
||||||
scope.searchCallback(data);
|
scope.searchCallback(data);
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -3,8 +3,8 @@
|
|||||||
* @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 = {};
|
||||||
|
|
||||||
@@ -13,11 +13,11 @@ function mediaHelper(umbRequestHelper) {
|
|||||||
* @ngdoc function
|
* @ngdoc function
|
||||||
* @name umbraco.services.mediaHelper#getImagePropertyValue
|
* @name umbraco.services.mediaHelper#getImagePropertyValue
|
||||||
* @methodOf umbraco.services.mediaHelper
|
* @methodOf umbraco.services.mediaHelper
|
||||||
* @function
|
* @function
|
||||||
*
|
*
|
||||||
* @description
|
* @description
|
||||||
* Returns the file path associated with the media property if there is one
|
* Returns the file path associated with the media property if there is one
|
||||||
*
|
*
|
||||||
* @param {object} options Options object
|
* @param {object} options Options object
|
||||||
* @param {object} options.mediaModel The media object to retrieve the image path from
|
* @param {object} options.mediaModel The media object to retrieve the image path from
|
||||||
* @param {object} options.imageOnly Optional, if true then will only return a path if the media item is an image
|
* @param {object} options.imageOnly Optional, if true then will only return a path if the media item is an image
|
||||||
@@ -75,16 +75,16 @@ function mediaHelper(umbRequestHelper) {
|
|||||||
|
|
||||||
return "";
|
return "";
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ngdoc function
|
* @ngdoc function
|
||||||
* @name umbraco.services.mediaHelper#getImagePropertyValue
|
* @name umbraco.services.mediaHelper#getImagePropertyValue
|
||||||
* @methodOf umbraco.services.mediaHelper
|
* @methodOf umbraco.services.mediaHelper
|
||||||
* @function
|
* @function
|
||||||
*
|
*
|
||||||
* @description
|
* @description
|
||||||
* Returns the actual image path associated with the image property if there is one
|
* Returns the actual image path associated with the image property if there is one
|
||||||
*
|
*
|
||||||
* @param {object} options Options object
|
* @param {object} options Options object
|
||||||
* @param {object} options.imageModel The media object to retrieve the image path from
|
* @param {object} options.imageModel The media object to retrieve the image path from
|
||||||
*/
|
*/
|
||||||
@@ -104,11 +104,11 @@ function mediaHelper(umbRequestHelper) {
|
|||||||
* @ngdoc function
|
* @ngdoc function
|
||||||
* @name umbraco.services.mediaHelper#getThumbnail
|
* @name umbraco.services.mediaHelper#getThumbnail
|
||||||
* @methodOf umbraco.services.mediaHelper
|
* @methodOf umbraco.services.mediaHelper
|
||||||
* @function
|
* @function
|
||||||
*
|
*
|
||||||
* @description
|
* @description
|
||||||
* formats the display model used to display the content to the model used to save the content
|
* formats the display model used to display the content to the model used to save the content
|
||||||
*
|
*
|
||||||
* @param {object} options Options object
|
* @param {object} options Options object
|
||||||
* @param {object} options.imageModel The media object to retrieve the image path from
|
* @param {object} options.imageModel The media object to retrieve the image path from
|
||||||
*/
|
*/
|
||||||
@@ -133,54 +133,50 @@ function mediaHelper(umbRequestHelper) {
|
|||||||
* @ngdoc function
|
* @ngdoc function
|
||||||
* @name umbraco.services.mediaHelper#resolveFileFromEntity
|
* @name umbraco.services.mediaHelper#resolveFileFromEntity
|
||||||
* @methodOf umbraco.services.mediaHelper
|
* @methodOf umbraco.services.mediaHelper
|
||||||
* @function
|
* @function
|
||||||
*
|
*
|
||||||
* @description
|
* @description
|
||||||
* Gets the media file url for a media entity returned with the entityResource
|
* Gets the media file url for a media entity returned with the entityResource
|
||||||
*
|
*
|
||||||
* @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;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ngdoc function
|
* @ngdoc function
|
||||||
* @name umbraco.services.mediaHelper#resolveFile
|
* @name umbraco.services.mediaHelper#resolveFile
|
||||||
* @methodOf umbraco.services.mediaHelper
|
* @methodOf umbraco.services.mediaHelper
|
||||||
* @function
|
* @function
|
||||||
*
|
*
|
||||||
* @description
|
* @description
|
||||||
* Gets the media file url for a media object returned with the mediaResource
|
* Gets the media file url for a media object returned with the mediaResource
|
||||||
*
|
*
|
||||||
* @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
|
||||||
*/
|
*/
|
||||||
/*jshint loopfunc: true */
|
/*jshint loopfunc: true */
|
||||||
resolveFile : function(mediaItem, thumbnail){
|
resolveFile : function(mediaItem, thumbnail){
|
||||||
|
|
||||||
function iterateProps(props){
|
function iterateProps(props){
|
||||||
var res = null;
|
var res = null;
|
||||||
for(var resolver in _mediaFileResolvers) {
|
for(var resolver in _mediaFileResolvers) {
|
||||||
@@ -191,7 +187,7 @@ function mediaHelper(umbRequestHelper) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
//we either have properties raw on the object, or spread out on tabs
|
//we either have properties raw on the object, or spread out on tabs
|
||||||
@@ -208,7 +204,7 @@ function mediaHelper(umbRequestHelper) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
},
|
},
|
||||||
|
|
||||||
/*jshint loopfunc: true */
|
/*jshint loopfunc: true */
|
||||||
@@ -246,11 +242,11 @@ function mediaHelper(umbRequestHelper) {
|
|||||||
* @ngdoc function
|
* @ngdoc function
|
||||||
* @name umbraco.services.mediaHelper#scaleToMaxSize
|
* @name umbraco.services.mediaHelper#scaleToMaxSize
|
||||||
* @methodOf umbraco.services.mediaHelper
|
* @methodOf umbraco.services.mediaHelper
|
||||||
* @function
|
* @function
|
||||||
*
|
*
|
||||||
* @description
|
* @description
|
||||||
* Finds the corrct max width and max height, given maximum dimensions and keeping aspect ratios
|
* Finds the corrct max width and max height, given maximum dimensions and keeping aspect ratios
|
||||||
*
|
*
|
||||||
* @param {number} maxSize Maximum width & height
|
* @param {number} maxSize Maximum width & height
|
||||||
* @param {number} width Current width
|
* @param {number} width Current width
|
||||||
* @param {number} height Current height
|
* @param {number} height Current height
|
||||||
@@ -289,11 +285,11 @@ function mediaHelper(umbRequestHelper) {
|
|||||||
* @ngdoc function
|
* @ngdoc function
|
||||||
* @name umbraco.services.mediaHelper#getThumbnailFromPath
|
* @name umbraco.services.mediaHelper#getThumbnailFromPath
|
||||||
* @methodOf umbraco.services.mediaHelper
|
* @methodOf umbraco.services.mediaHelper
|
||||||
* @function
|
* @function
|
||||||
*
|
*
|
||||||
* @description
|
* @description
|
||||||
* Returns the path to the thumbnail version of a given media library image path
|
* Returns the path to the thumbnail version of a given media library image path
|
||||||
*
|
*
|
||||||
* @param {string} imagePath Image path, ex: /media/1234/my-image.jpg
|
* @param {string} imagePath Image path, ex: /media/1234/my-image.jpg
|
||||||
*/
|
*/
|
||||||
getThumbnailFromPath: function (imagePath) {
|
getThumbnailFromPath: function (imagePath) {
|
||||||
@@ -319,11 +315,11 @@ function mediaHelper(umbRequestHelper) {
|
|||||||
* @ngdoc function
|
* @ngdoc function
|
||||||
* @name umbraco.services.mediaHelper#detectIfImageByExtension
|
* @name umbraco.services.mediaHelper#detectIfImageByExtension
|
||||||
* @methodOf umbraco.services.mediaHelper
|
* @methodOf umbraco.services.mediaHelper
|
||||||
* @function
|
* @function
|
||||||
*
|
*
|
||||||
* @description
|
* @description
|
||||||
* Returns true/false, indicating if the given path has an allowed image extension
|
* Returns true/false, indicating if the given path has an allowed image extension
|
||||||
*
|
*
|
||||||
* @param {string} imagePath Image path, ex: /media/1234/my-image.jpg
|
* @param {string} imagePath Image path, ex: /media/1234/my-image.jpg
|
||||||
*/
|
*/
|
||||||
detectIfImageByExtension: function (imagePath) {
|
detectIfImageByExtension: function (imagePath) {
|
||||||
@@ -331,7 +327,7 @@ function mediaHelper(umbRequestHelper) {
|
|||||||
if (!imagePath) {
|
if (!imagePath) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
var lowered = imagePath.toLowerCase();
|
var lowered = imagePath.toLowerCase();
|
||||||
var ext = lowered.substr(lowered.lastIndexOf(".") + 1);
|
var ext = lowered.substr(lowered.lastIndexOf(".") + 1);
|
||||||
return ("," + Umbraco.Sys.ServerVariables.umbracoSettings.imageFileTypes + ",").indexOf("," + ext + ",") !== -1;
|
return ("," + Umbraco.Sys.ServerVariables.umbracoSettings.imageFileTypes + ",").indexOf("," + ext + ",") !== -1;
|
||||||
@@ -388,6 +384,6 @@ function mediaHelper(umbRequestHelper) {
|
|||||||
var ext = lowered.substr(lowered.lastIndexOf(".") + 1);
|
var ext = lowered.substr(lowered.lastIndexOf(".") + 1);
|
||||||
return ext;
|
return ext;
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
}angular.module('umbraco.services').factory('mediaHelper', mediaHelper);
|
}angular.module('umbraco.services').factory('mediaHelper', mediaHelper);
|
||||||
|
|||||||
@@ -1,174 +1,160 @@
|
|||||||
/**
|
/**
|
||||||
* @ngdoc service
|
* @ngdoc service
|
||||||
* @name umbraco.services.searchService
|
* @name umbraco.services.searchService
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* @description
|
* @description
|
||||||
* Service for handling the main application search, can currently search content, media and members
|
* Service for handling the main application search, can currently search content, media and members
|
||||||
*
|
*
|
||||||
* ##usage
|
* ##usage
|
||||||
* To use, simply inject the searchService into any controller that needs it, and make
|
* To use, simply inject the searchService into any controller that needs it, and make
|
||||||
* sure the umbraco.services module is accesible - which it should be by default.
|
* sure the umbraco.services module is accesible - which it should be by default.
|
||||||
*
|
*
|
||||||
* <pre>
|
* <pre>
|
||||||
* searchService.searchMembers({term: 'bob'}).then(function(results){
|
* searchService.searchMembers({term: 'bob'}).then(function(results){
|
||||||
* angular.forEach(results, function(result){
|
* angular.forEach(results, function(result){
|
||||||
* //returns:
|
* //returns:
|
||||||
* {name: "name", id: 1234, menuUrl: "url", editorPath: "url", metaData: {}, subtitle: "/path/etc" }
|
* {name: "name", id: 1234, menuUrl: "url", editorPath: "url", metaData: {}, subtitle: "/path/etc" }
|
||||||
* })
|
* })
|
||||||
* var result =
|
* var result =
|
||||||
* })
|
* })
|
||||||
* </pre>
|
* </pre>
|
||||||
*/
|
*/
|
||||||
angular.module('umbraco.services')
|
angular.module('umbraco.services')
|
||||||
.factory('searchService', function ($q, $log, entityResource, contentResource, umbRequestHelper, $injector, searchResultFormatter) {
|
.factory('searchService', function ($q, $log, entityResource, contentResource, umbRequestHelper, $injector, searchResultFormatter) {
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ngdoc method
|
* @ngdoc method
|
||||||
* @name umbraco.services.searchService#searchMembers
|
* @name umbraco.services.searchService#searchMembers
|
||||||
* @methodOf umbraco.services.searchService
|
* @methodOf umbraco.services.searchService
|
||||||
*
|
*
|
||||||
* @description
|
* @description
|
||||||
* Searches the default member search index
|
* Searches the default member search index
|
||||||
* @param {Object} args argument object
|
* @param {Object} args argument object
|
||||||
* @param {String} args.term seach term
|
* @param {String} args.term seach term
|
||||||
* @returns {Promise} returns promise containing all matching members
|
* @returns {Promise} returns promise containing all matching members
|
||||||
*/
|
*/
|
||||||
searchMembers: function (args) {
|
searchMembers: function (args) {
|
||||||
|
|
||||||
if (!args.term) {
|
if (!args.term) {
|
||||||
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
|
_.each(data, function (item) {
|
||||||
}
|
searchResultFormatter.configureMemberResult(item);
|
||||||
|
});
|
||||||
return entityResource.search(args.term, "Member", options).then(function (data) {
|
return data;
|
||||||
_.each(data, function (item) {
|
});
|
||||||
searchResultFormatter.configureMemberResult(item);
|
},
|
||||||
});
|
|
||||||
return data;
|
/**
|
||||||
});
|
* @ngdoc method
|
||||||
},
|
* @name umbraco.services.searchService#searchContent
|
||||||
|
* @methodOf umbraco.services.searchService
|
||||||
/**
|
*
|
||||||
* @ngdoc method
|
* @description
|
||||||
* @name umbraco.services.searchService#searchContent
|
* Searches the default internal content search index
|
||||||
* @methodOf umbraco.services.searchService
|
* @param {Object} args argument object
|
||||||
*
|
* @param {String} args.term seach term
|
||||||
* @description
|
* @returns {Promise} returns promise containing all matching content items
|
||||||
* Searches the default internal content search index
|
*/
|
||||||
* @param {Object} args argument object
|
searchContent: function (args) {
|
||||||
* @param {String} args.term seach term
|
|
||||||
* @returns {Promise} returns promise containing all matching content items
|
if (!args.term) {
|
||||||
*/
|
throw "args.term is required";
|
||||||
searchContent: function (args) {
|
}
|
||||||
|
|
||||||
if (!args.term) {
|
return entityResource.search(args.term, "Document", args.searchFrom, args.canceler, args.dataTypeId).then(function (data) {
|
||||||
throw "args.term is required";
|
_.each(data, function (item) {
|
||||||
}
|
searchResultFormatter.configureContentResult(item);
|
||||||
|
});
|
||||||
var options = {
|
return data;
|
||||||
searchFrom: args.searchFrom,
|
});
|
||||||
ignoreUserStartNodes: args.ignoreUserStartNodes
|
},
|
||||||
}
|
|
||||||
|
/**
|
||||||
return entityResource.search(args.term, "Document", options, args.canceler).then(function (data) {
|
* @ngdoc method
|
||||||
_.each(data, function (item) {
|
* @name umbraco.services.searchService#searchMedia
|
||||||
searchResultFormatter.configureContentResult(item);
|
* @methodOf umbraco.services.searchService
|
||||||
});
|
*
|
||||||
return data;
|
* @description
|
||||||
});
|
* Searches the default media search index
|
||||||
},
|
* @param {Object} args argument object
|
||||||
|
* @param {String} args.term seach term
|
||||||
/**
|
* @returns {Promise} returns promise containing all matching media items
|
||||||
* @ngdoc method
|
*/
|
||||||
* @name umbraco.services.searchService#searchMedia
|
searchMedia: function (args) {
|
||||||
* @methodOf umbraco.services.searchService
|
|
||||||
*
|
if (!args.term) {
|
||||||
* @description
|
throw "args.term is required";
|
||||||
* Searches the default media search index
|
}
|
||||||
* @param {Object} args argument object
|
|
||||||
* @param {String} args.term seach term
|
return entityResource.search(args.term, "Media", args.searchFrom, args.canceler, args.dataTypeId).then(function (data) {
|
||||||
* @returns {Promise} returns promise containing all matching media items
|
_.each(data, function (item) {
|
||||||
*/
|
searchResultFormatter.configureMediaResult(item);
|
||||||
searchMedia: function (args) {
|
});
|
||||||
|
return data;
|
||||||
if (!args.term) {
|
});
|
||||||
throw "args.term is required";
|
},
|
||||||
}
|
|
||||||
|
/**
|
||||||
var options = {
|
* @ngdoc method
|
||||||
searchFrom: args.searchFrom,
|
* @name umbraco.services.searchService#searchAll
|
||||||
ignoreUserStartNodes: args.ignoreUserStartNodes
|
* @methodOf umbraco.services.searchService
|
||||||
}
|
*
|
||||||
|
* @description
|
||||||
return entityResource.search(args.term, "Media", options).then(function (data) {
|
* Searches all available indexes and returns all results in one collection
|
||||||
_.each(data, function (item) {
|
* @param {Object} args argument object
|
||||||
searchResultFormatter.configureMediaResult(item);
|
* @param {String} args.term seach term
|
||||||
});
|
* @returns {Promise} returns promise containing all matching items
|
||||||
return data;
|
*/
|
||||||
});
|
searchAll: function (args) {
|
||||||
},
|
|
||||||
|
if (!args.term) {
|
||||||
/**
|
throw "args.term is required";
|
||||||
* @ngdoc method
|
}
|
||||||
* @name umbraco.services.searchService#searchAll
|
|
||||||
* @methodOf umbraco.services.searchService
|
return entityResource.searchAll(args.term, args.canceler).then(function (data) {
|
||||||
*
|
|
||||||
* @description
|
_.each(data, function (resultByType) {
|
||||||
* Searches all available indexes and returns all results in one collection
|
|
||||||
* @param {Object} args argument object
|
|
||||||
* @param {String} args.term seach term
|
|
||||||
* @returns {Promise} returns promise containing all matching items
|
|
||||||
*/
|
|
||||||
searchAll: function (args) {
|
|
||||||
|
|
||||||
if (!args.term) {
|
|
||||||
throw "args.term is required";
|
|
||||||
}
|
|
||||||
|
|
||||||
return entityResource.searchAll(args.term, args.canceler).then(function (data) {
|
|
||||||
|
|
||||||
_.each(data, function (resultByType) {
|
|
||||||
|
|
||||||
//we need to format the search result data to include things like the subtitle, urls, etc...
|
//we need to format the search result data to include things like the subtitle, urls, etc...
|
||||||
// this is done with registered angular services as part of the SearchableTreeAttribute, if that
|
// this is done with registered angular services as part of the SearchableTreeAttribute, if that
|
||||||
// is not found, than we format with the default formatter
|
// is not found, than we format with the default formatter
|
||||||
var formatterMethod = searchResultFormatter.configureDefaultResult;
|
var formatterMethod = searchResultFormatter.configureDefaultResult;
|
||||||
//check if a custom formatter is specified...
|
//check if a custom formatter is specified...
|
||||||
if (resultByType.jsSvc) {
|
if (resultByType.jsSvc) {
|
||||||
var searchFormatterService = $injector.get(resultByType.jsSvc);
|
var searchFormatterService = $injector.get(resultByType.jsSvc);
|
||||||
if (searchFormatterService) {
|
if (searchFormatterService) {
|
||||||
if (!resultByType.jsMethod) {
|
if (!resultByType.jsMethod) {
|
||||||
resultByType.jsMethod = "format";
|
resultByType.jsMethod = "format";
|
||||||
}
|
}
|
||||||
formatterMethod = searchFormatterService[resultByType.jsMethod];
|
formatterMethod = searchFormatterService[resultByType.jsMethod];
|
||||||
|
|
||||||
if (!formatterMethod) {
|
if (!formatterMethod) {
|
||||||
throw "The method " + resultByType.jsMethod + " on the angular service " + resultByType.jsSvc + " could not be found";
|
throw "The method " + resultByType.jsMethod + " on the angular service " + resultByType.jsSvc + " could not be found";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//now apply the formatter for each result
|
//now apply the formatter for each result
|
||||||
_.each(resultByType.results, function (item) {
|
_.each(resultByType.results, function (item) {
|
||||||
formatterMethod.apply(this, [item, resultByType.treeAlias, resultByType.appAlias]);
|
formatterMethod.apply(this, [item, resultByType.treeAlias, resultByType.appAlias]);
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
});
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
//TODO: This doesn't do anything!
|
//TODO: This doesn't do anything!
|
||||||
setCurrent: function (sectionAlias) {
|
setCurrent: function (sectionAlias) {
|
||||||
|
|
||||||
var currentSection = sectionAlias;
|
var currentSection = sectionAlias;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -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) {
|
||||||
@@ -796,4 +803,4 @@ function treeService($q, treeResource, iconHelper, notificationsService, eventsS
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
angular.module('umbraco.services').factory('treeService', treeService);
|
angular.module('umbraco.services').factory('treeService', treeService);
|
||||||
|
|||||||
@@ -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,170 +1,171 @@
|
|||||||
//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...";
|
||||||
localizationService.localize("general_search").then(function (value) {
|
localizationService.localize("general_search").then(function (value) {
|
||||||
searchText = value + "...";
|
searchText = value + "...";
|
||||||
});
|
});
|
||||||
|
|
||||||
$scope.dialogTreeEventHandler = $({});
|
$scope.dialogTreeEventHandler = $({});
|
||||||
$scope.target = {};
|
$scope.target = {};
|
||||||
$scope.searchInfo = {
|
$scope.searchInfo = {
|
||||||
searchFromId: null,
|
searchFromId: null,
|
||||||
searchFromName: null,
|
searchFromName: null,
|
||||||
showSearch: false,
|
showSearch: false,
|
||||||
results: [],
|
dataTypeId: ($scope.model && $scope.model.dataTypeId) ? $scope.model.dataTypeId : null,
|
||||||
selectedSearchResults: []
|
results: [],
|
||||||
}
|
selectedSearchResults: []
|
||||||
|
}
|
||||||
if (dialogOptions.currentTarget) {
|
|
||||||
$scope.target = dialogOptions.currentTarget;
|
if (dialogOptions.currentTarget) {
|
||||||
|
$scope.target = dialogOptions.currentTarget;
|
||||||
//if we have a node ID, we fetch the current node to build the form data
|
|
||||||
if ($scope.target.id || $scope.target.udi) {
|
//if we have a node ID, we fetch the current node to build the form data
|
||||||
|
if ($scope.target.id || $scope.target.udi) {
|
||||||
var id = $scope.target.udi ? $scope.target.udi : $scope.target.id;
|
|
||||||
|
var id = $scope.target.udi ? $scope.target.udi : $scope.target.id;
|
||||||
if (!$scope.target.path) {
|
|
||||||
entityResource.getPath(id, "Document").then(function (path) {
|
if (!$scope.target.path) {
|
||||||
$scope.target.path = path;
|
entityResource.getPath(id, "Document").then(function (path) {
|
||||||
//now sync the tree to this path
|
$scope.target.path = path;
|
||||||
$scope.dialogTreeEventHandler.syncTree({
|
//now sync the tree to this path
|
||||||
path: $scope.target.path,
|
$scope.dialogTreeEventHandler.syncTree({
|
||||||
tree: "content"
|
path: $scope.target.path,
|
||||||
});
|
tree: "content"
|
||||||
});
|
});
|
||||||
}
|
});
|
||||||
|
}
|
||||||
// if a link exists, get the properties to build the anchor name list
|
|
||||||
contentResource.getById(id).then(function (resp) {
|
// if a link exists, get the properties to build the anchor name list
|
||||||
$scope.anchorValues = tinyMceService.getAnchorNames(JSON.stringify(resp.properties));
|
entityResource.getUrlAndAnchors(id).then(function(resp){
|
||||||
$scope.target.url = resp.urls[0];
|
$scope.anchorValues = resp.anchorValues;
|
||||||
});
|
$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 ?
|
||||||
var indexOfAnchor = $scope.target.url.search(/(#|\?)/);
|
var indexOfAnchor = $scope.target.url.search(/(#|\?)/);
|
||||||
if (indexOfAnchor > -1) {
|
if (indexOfAnchor > -1) {
|
||||||
// populate the anchor
|
// populate the anchor
|
||||||
$scope.target.anchor = $scope.target.url.substring(indexOfAnchor);
|
$scope.target.anchor = $scope.target.url.substring(indexOfAnchor);
|
||||||
// then rewrite the model and populate the link
|
// then rewrite the model and populate the link
|
||||||
$scope.target.url = $scope.target.url.substring(0, indexOfAnchor);
|
$scope.target.url = $scope.target.url.substring(0, indexOfAnchor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dialogOptions.anchors) {
|
if (dialogOptions.anchors) {
|
||||||
$scope.anchorValues = dialogOptions.anchors;
|
$scope.anchorValues = dialogOptions.anchors;
|
||||||
}
|
}
|
||||||
|
|
||||||
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;
|
||||||
} else {
|
} else {
|
||||||
eventsService.emit("dialogs.linkPicker.select", args);
|
eventsService.emit("dialogs.linkPicker.select", args);
|
||||||
|
|
||||||
if ($scope.currentNode) {
|
if ($scope.currentNode) {
|
||||||
//un-select if there's a current one selected
|
//un-select if there's a current one selected
|
||||||
$scope.currentNode.selected = false;
|
$scope.currentNode.selected = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.currentNode = args.node;
|
$scope.currentNode = args.node;
|
||||||
$scope.currentNode.selected = true;
|
$scope.currentNode.selected = true;
|
||||||
$scope.target.id = args.node.id;
|
$scope.target.id = args.node.id;
|
||||||
$scope.target.udi = args.node.udi;
|
$scope.target.udi = args.node.udi;
|
||||||
$scope.target.name = args.node.name;
|
$scope.target.name = args.node.name;
|
||||||
|
|
||||||
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)) {
|
||||||
delete $scope.target.isMedia;
|
delete $scope.target.isMedia;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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 a custom
|
//check if any of the items are list views, if so we need to add a custom
|
||||||
// child: A node to activate the search
|
// child: A node to activate 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,
|
||||||
name: searchText,
|
name: searchText,
|
||||||
metaData: {
|
metaData: {
|
||||||
listViewNode: child
|
listViewNode: child
|
||||||
},
|
},
|
||||||
cssClass: "icon umb-tree-icon sprTree icon-search",
|
cssClass: "icon umb-tree-icon sprTree icon-search",
|
||||||
cssClasses: ["not-published"]
|
cssClasses: ["not-published"]
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.switchToMediaPicker = function () {
|
$scope.switchToMediaPicker = function () {
|
||||||
userService.getCurrentUser().then(function (userData) {
|
userService.getCurrentUser().then(function (userData) {
|
||||||
dialogService.mediaPicker({
|
dialogService.mediaPicker({
|
||||||
startNodeId: userData.startMediaIds.length == 0 ? -1 : userData.startMediaIds[0],
|
startNodeId: userData.startMediaIds.length == 0 ? -1 : userData.startMediaIds[0],
|
||||||
callback: function (media) {
|
callback: function (media) {
|
||||||
$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;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.hideSearch = function () {
|
$scope.hideSearch = function () {
|
||||||
$scope.searchInfo.showSearch = false;
|
$scope.searchInfo.showSearch = false;
|
||||||
$scope.searchInfo.searchFromId = null;
|
$scope.searchInfo.searchFromId = null;
|
||||||
$scope.searchInfo.searchFromName = null;
|
$scope.searchInfo.searchFromName = null;
|
||||||
$scope.searchInfo.results = [];
|
$scope.searchInfo.results = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
// method to select a search result
|
// method to select a search result
|
||||||
$scope.selectResult = function (evt, result) {
|
$scope.selectResult = function (evt, result) {
|
||||||
result.selected = result.selected === true ? false : true;
|
result.selected = result.selected === true ? false : true;
|
||||||
nodeSelectHandler(evt, {
|
nodeSelectHandler(evt, {
|
||||||
event: evt,
|
event: evt,
|
||||||
node: result
|
node: result
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
//callback when there are search results
|
//callback when there are search results
|
||||||
$scope.onSearchResults = function (results) {
|
$scope.onSearchResults = function (results) {
|
||||||
$scope.searchInfo.results = results;
|
$scope.searchInfo.results = results;
|
||||||
$scope.searchInfo.showSearch = true;
|
$scope.searchInfo.showSearch = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.dialogTreeEventHandler.bind("treeNodeSelect", nodeSelectHandler);
|
$scope.dialogTreeEventHandler.bind("treeNodeSelect", nodeSelectHandler);
|
||||||
$scope.dialogTreeEventHandler.bind("treeNodeExpanded", nodeExpandedHandler);
|
$scope.dialogTreeEventHandler.bind("treeNodeExpanded", nodeExpandedHandler);
|
||||||
|
|
||||||
$scope.$on('$destroy', function () {
|
$scope.$on('$destroy', function () {
|
||||||
$scope.dialogTreeEventHandler.unbind("treeNodeSelect", nodeSelectHandler);
|
$scope.dialogTreeEventHandler.unbind("treeNodeSelect", nodeSelectHandler);
|
||||||
$scope.dialogTreeEventHandler.unbind("treeNodeExpanded", nodeExpandedHandler);
|
$scope.dialogTreeEventHandler.unbind("treeNodeExpanded", nodeExpandedHandler);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,86 +1,87 @@
|
|||||||
<div class="umb-panel" ng-controller="Umbraco.Dialogs.LinkPickerController">
|
<div class="umb-panel" ng-controller="Umbraco.Dialogs.LinkPickerController">
|
||||||
<div class="umb-panel-body no-header with-footer compact">
|
<div class="umb-panel-body no-header with-footer compact">
|
||||||
<umb-pane>
|
<umb-pane>
|
||||||
<umb-control-group label="@defaultdialogs_urlLinkPicker" class="umb-property--pull">
|
<umb-control-group label="@defaultdialogs_urlLinkPicker" class="umb-property--pull">
|
||||||
<input type="text"
|
<input type="text"
|
||||||
localize="placeholder"
|
localize="placeholder"
|
||||||
placeholder="@general_url"
|
placeholder="@general_url"
|
||||||
class="umb-editor umb-textstring"
|
class="umb-editor umb-textstring"
|
||||||
ng-model="target.url"
|
ng-model="target.url"
|
||||||
ng-disabled="target.id || target.udi" />
|
ng-disabled="target.id || target.udi" />
|
||||||
</umb-control-group>
|
</umb-control-group>
|
||||||
|
|
||||||
<umb-control-group label="@defaultdialogs_anchorLinkPicker" class="umb-property--push">
|
<umb-control-group label="@defaultdialogs_anchorLinkPicker" class="umb-property--push">
|
||||||
<input type="text"
|
<input type="text"
|
||||||
list="anchors"
|
list="anchors"
|
||||||
localize="placeholder"
|
localize="placeholder"
|
||||||
placeholder="@placeholders_anchor"
|
placeholder="@placeholders_anchor"
|
||||||
class="umb-editor umb-textstring"
|
class="umb-editor umb-textstring"
|
||||||
ng-model="target.anchor" />
|
ng-model="target.anchor" />
|
||||||
|
|
||||||
<datalist id="anchors">
|
<datalist id="anchors">
|
||||||
<option value="{{a}}" ng-repeat="a in anchorValues"></option>
|
<option value="{{a}}" ng-repeat="a in anchorValues"></option>
|
||||||
</datalist>
|
</datalist>
|
||||||
</umb-control-group>
|
</umb-control-group>
|
||||||
|
|
||||||
<umb-control-group label="@defaultdialogs_nodeNameLinkPicker">
|
<umb-control-group label="@defaultdialogs_nodeNameLinkPicker">
|
||||||
<input type="text"
|
<input type="text"
|
||||||
localize="placeholder"
|
localize="placeholder"
|
||||||
placeholder="@placeholders_entername"
|
placeholder="@placeholders_entername"
|
||||||
class="umb-editor umb-textstring"
|
class="umb-editor umb-textstring"
|
||||||
ng-model="target.name" />
|
ng-model="target.name" />
|
||||||
</umb-control-group>
|
</umb-control-group>
|
||||||
|
|
||||||
<umb-control-group label="@content_target">
|
<umb-control-group label="@content_target">
|
||||||
<select class="umb-editor umb-dropdown" ng-model="target.target">
|
<select class="umb-editor umb-dropdown" ng-model="target.target">
|
||||||
<option value=""></option>
|
<option value=""></option>
|
||||||
<option value="_blank"><localize key="defaultdialogs_openInNewWindow">Opens the linked document in a new window or tab</localize></option>
|
<option value="_blank"><localize key="defaultdialogs_openInNewWindow">Opens the linked document in a new window or tab</localize></option>
|
||||||
</select>
|
</select>
|
||||||
</umb-control-group>
|
</umb-control-group>
|
||||||
</umb-pane>
|
</umb-pane>
|
||||||
|
|
||||||
<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}}"
|
||||||
show-search="{{searchInfo.showSearch}}"
|
datatype-id="{{searchInfo.dataTypeId}}"
|
||||||
section="{{section}}">
|
show-search="{{searchInfo.showSearch}}"
|
||||||
</umb-tree-search-box>
|
section="{{section}}">
|
||||||
|
</umb-tree-search-box>
|
||||||
<br/>
|
|
||||||
|
<br/>
|
||||||
<umb-tree-search-results ng-if="searchInfo.showSearch"
|
|
||||||
results="searchInfo.results"
|
<umb-tree-search-results ng-if="searchInfo.showSearch"
|
||||||
select-result-callback="selectResult">
|
results="searchInfo.results"
|
||||||
</umb-tree-search-results>
|
select-result-callback="selectResult">
|
||||||
|
</umb-tree-search-results>
|
||||||
<div ng-hide="searchInfo.showSearch">
|
|
||||||
<umb-tree section="content"
|
<div ng-hide="searchInfo.showSearch">
|
||||||
hideheader="true"
|
<umb-tree section="content"
|
||||||
hideoptions="true"
|
hideheader="true"
|
||||||
eventhandler="dialogTreeEventHandler"
|
hideoptions="true"
|
||||||
isdialog="true"
|
eventhandler="dialogTreeEventHandler"
|
||||||
enablecheckboxes="true">
|
isdialog="true"
|
||||||
</umb-tree>
|
enablecheckboxes="true">
|
||||||
</div>
|
</umb-tree>
|
||||||
|
</div>
|
||||||
</div>
|
|
||||||
|
</div>
|
||||||
<div class="umb-panel-footer">
|
|
||||||
<div class="umb-el-wrap umb-panel-buttons">
|
<div class="umb-panel-footer">
|
||||||
<div class="btn-toolbar umb-btn-toolbar pull-right">
|
<div class="umb-el-wrap umb-panel-buttons">
|
||||||
<a href ng-click="close()" class="btn btn-link">
|
<div class="btn-toolbar umb-btn-toolbar pull-right">
|
||||||
<localize key="general_cancel">Cancel</localize>
|
<a href ng-click="close()" class="btn btn-link">
|
||||||
</a>
|
<localize key="general_cancel">Cancel</localize>
|
||||||
<a href ng-click="switchToMediaPicker()" class="btn">
|
</a>
|
||||||
<localize key="defaultdialogs_selectMedia">Select media</localize>
|
<a href ng-click="switchToMediaPicker()" class="btn">
|
||||||
</a>
|
<localize key="defaultdialogs_selectMedia">Select media</localize>
|
||||||
<button
|
</a>
|
||||||
class="btn btn-primary"
|
<button
|
||||||
ng-click="submit(target)">
|
class="btn btn-primary"
|
||||||
<localize key="buttons_select">Select</localize>
|
ng-click="submit(target)">
|
||||||
</button>
|
<localize key="buttons_select">Select</localize>
|
||||||
</div>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|||||||
@@ -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>
|
||||||
@@ -35,4 +35,4 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,134 +1,140 @@
|
|||||||
//used for the media picker dialog
|
//used for the media picker dialog
|
||||||
angular.module("umbraco")
|
angular.module("umbraco")
|
||||||
.controller("Umbraco.Dialogs.MediaPickerController",
|
.controller("Umbraco.Dialogs.MediaPickerController",
|
||||||
function($scope, mediaResource, umbRequestHelper, entityResource, $log, mediaHelper, mediaTypeHelper, eventsService, treeService) {
|
function($scope, mediaResource, umbRequestHelper, entityResource, $log, mediaHelper, mediaTypeHelper, eventsService, treeService) {
|
||||||
|
|
||||||
var dialogOptions = $scope.dialogOptions;
|
var dialogOptions = $scope.dialogOptions;
|
||||||
|
|
||||||
$scope.onlyImages = dialogOptions.onlyImages;
|
$scope.onlyImages = dialogOptions.onlyImages;
|
||||||
$scope.showDetails = dialogOptions.showDetails;
|
$scope.showDetails = dialogOptions.showDetails;
|
||||||
$scope.multiPicker = (dialogOptions.multiPicker && dialogOptions.multiPicker !== "0") ? true : false;
|
$scope.multiPicker = (dialogOptions.multiPicker && dialogOptions.multiPicker !== "0") ? true : false;
|
||||||
$scope.startNodeId = dialogOptions.startNodeId ? dialogOptions.startNodeId : -1;
|
$scope.startNodeId = dialogOptions.startNodeId ? dialogOptions.startNodeId : -1;
|
||||||
$scope.cropSize = dialogOptions.cropSize;
|
$scope.cropSize = dialogOptions.cropSize;
|
||||||
|
|
||||||
//preload selected item
|
//preload selected item
|
||||||
$scope.target = undefined;
|
$scope.target = undefined;
|
||||||
if (dialogOptions.currentTarget) {
|
if (dialogOptions.currentTarget) {
|
||||||
$scope.target = dialogOptions.currentTarget;
|
$scope.target = dialogOptions.currentTarget;
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.acceptedMediatypes = [];
|
$scope.acceptedMediatypes = [];
|
||||||
mediaTypeHelper.getAllowedImagetypes($scope.startNodeId)
|
mediaTypeHelper.getAllowedImagetypes($scope.startNodeId)
|
||||||
.then(function(types) {
|
.then(function(types) {
|
||||||
$scope.acceptedMediatypes = types;
|
$scope.acceptedMediatypes = types;
|
||||||
});
|
});
|
||||||
|
|
||||||
$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(e) {
|
$scope.submitFolder = function(e) {
|
||||||
if (e.keyCode === 13) {
|
if (e.keyCode === 13) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
||||||
mediaResource
|
mediaResource
|
||||||
.addFolder($scope.newFolderName, $scope.currentFolder.id)
|
.addFolder($scope.newFolderName, $scope.currentFolder.id)
|
||||||
.then(function(data) {
|
.then(function(data) {
|
||||||
$scope.showFolderInput = false;
|
$scope.showFolderInput = false;
|
||||||
$scope.newFolderName = "";
|
$scope.newFolderName = "";
|
||||||
|
|
||||||
//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
|
||||||
childrenOf: data.parentId //clear the children of the parent
|
childrenOf: data.parentId //clear the children of the parent
|
||||||
});
|
});
|
||||||
|
|
||||||
$scope.gotoFolder(data);
|
$scope.gotoFolder(data);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.gotoFolder = function(folder) {
|
$scope.gotoFolder = function(folder) {
|
||||||
if (!folder) {
|
if (!folder) {
|
||||||
folder = { id: -1, name: "Media", icon: "icon-folder" };
|
folder = { id: -1, name: "Media", icon: "icon-folder" };
|
||||||
}
|
}
|
||||||
|
|
||||||
if (folder.id > 0) {
|
if (folder.id > 0) {
|
||||||
entityResource.getAncestors(folder.id, "media")
|
entityResource.getAncestors(folder.id, "media")
|
||||||
.then(function(anc) {
|
.then(function(anc) {
|
||||||
// anc.splice(0,1);
|
// anc.splice(0,1);
|
||||||
$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;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
mediaTypeHelper.getAllowedImagetypes(folder.id)
|
mediaTypeHelper.getAllowedImagetypes(folder.id)
|
||||||
.then(function(types) {
|
.then(function(types) {
|
||||||
$scope.acceptedMediatypes = types;
|
$scope.acceptedMediatypes = types;
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
$scope.path = [];
|
$scope.path = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
//mediaResource.rootMedia()
|
//mediaResource.rootMedia()
|
||||||
mediaResource.getChildren(folder.id)
|
entityResource.getChildren(folder.id, "Media")
|
||||||
.then(function(data) {
|
.then(function(data) {
|
||||||
$scope.searchTerm = "";
|
for (i=0;i<data.length;i++){
|
||||||
$scope.images = data.items ? data.items : [];
|
if(data[i].metaData.MediaPath){
|
||||||
});
|
data[i].thumbnail = mediaHelper.resolveFileFromEntity(data[i], true);
|
||||||
|
data[i].image = mediaHelper.resolveFileFromEntity(data[i], false);
|
||||||
$scope.currentFolder = folder;
|
}
|
||||||
};
|
}
|
||||||
|
$scope.searchTerm = "";
|
||||||
|
$scope.images = data ? data : [];
|
||||||
$scope.clickHandler = function(image, ev, select) {
|
});
|
||||||
ev.preventDefault();
|
|
||||||
|
$scope.currentFolder = folder;
|
||||||
if (image.isFolder && !select) {
|
};
|
||||||
$scope.gotoFolder(image);
|
|
||||||
} else {
|
|
||||||
eventsService.emit("dialogs.mediaPicker.select", image);
|
$scope.clickHandler = function(image, ev, select) {
|
||||||
|
ev.preventDefault();
|
||||||
//we have 3 options add to collection (if multi) show details, or submit it right back to the callback
|
|
||||||
if ($scope.multiPicker) {
|
if (image.isFolder && !select) {
|
||||||
$scope.select(image);
|
$scope.gotoFolder(image);
|
||||||
image.cssclass = ($scope.dialogData.selection.indexOf(image) > -1) ? "selected" : "";
|
} else {
|
||||||
} else if ($scope.showDetails) {
|
eventsService.emit("dialogs.mediaPicker.select", image);
|
||||||
$scope.target = image;
|
|
||||||
$scope.target.url = mediaHelper.resolveFile(image);
|
//we have 3 options add to collection (if multi) show details, or submit it right back to the callback
|
||||||
} else {
|
if ($scope.multiPicker) {
|
||||||
$scope.submit(image);
|
$scope.select(image);
|
||||||
}
|
image.cssclass = ($scope.dialogData.selection.indexOf(image) > -1) ? "selected" : "";
|
||||||
}
|
} else if ($scope.showDetails) {
|
||||||
};
|
$scope.target = image;
|
||||||
|
$scope.target.url = mediaHelper.resolveFile(image);
|
||||||
$scope.exitDetails = function() {
|
} else {
|
||||||
if (!$scope.currentFolder) {
|
$scope.submit(image);
|
||||||
$scope.gotoFolder();
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
$scope.target = undefined;
|
|
||||||
};
|
$scope.exitDetails = function() {
|
||||||
|
if (!$scope.currentFolder) {
|
||||||
$scope.onUploadComplete = function() {
|
$scope.gotoFolder();
|
||||||
$scope.gotoFolder($scope.currentFolder);
|
}
|
||||||
};
|
|
||||||
|
$scope.target = undefined;
|
||||||
$scope.onFilesQueue = function() {
|
};
|
||||||
$scope.activeDrag = false;
|
|
||||||
};
|
$scope.onUploadComplete = function() {
|
||||||
|
$scope.gotoFolder($scope.currentFolder);
|
||||||
//default root item
|
};
|
||||||
if (!$scope.target) {
|
|
||||||
$scope.gotoFolder({ id: $scope.startNodeId, name: "Media", icon: "icon-folder" });
|
$scope.onFilesQueue = function() {
|
||||||
}
|
$scope.activeDrag = false;
|
||||||
});
|
};
|
||||||
|
|
||||||
|
//default root item
|
||||||
|
if (!$scope.target) {
|
||||||
|
$scope.gotoFolder({ id: $scope.startNodeId, name: "Media", icon: "icon-folder" });
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|||||||
@@ -1,431 +1,431 @@
|
|||||||
//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,
|
||||||
searchFromName: null,
|
searchFromName: null,
|
||||||
showSearch: false,
|
showSearch: false,
|
||||||
results: [],
|
results: [],
|
||||||
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;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (dialogOptions.filter.startsWith("!")) {
|
if (dialogOptions.filter.startsWith("!")) {
|
||||||
dialogOptions.filterExclude = true;
|
dialogOptions.filterExclude = true;
|
||||||
dialogOptions.filter = dialogOptions.filter.substring(1);
|
dialogOptions.filter = dialogOptions.filter.substring(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
//used advanced filtering
|
//used advanced filtering
|
||||||
if (dialogOptions.filter.startsWith("{")) {
|
if (dialogOptions.filter.startsWith("{")) {
|
||||||
dialogOptions.filterAdvanced = true;
|
dialogOptions.filterAdvanced = true;
|
||||||
//convert to object
|
//convert to object
|
||||||
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
|
||||||
|
|
||||||
//unselect
|
//unselect
|
||||||
select(args.node.name, args.node.id);
|
select(args.node.name, args.node.id);
|
||||||
|
|
||||||
//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);
|
||||||
|
|
||||||
if (args.node.filtered) {
|
if (args.node.filtered) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//This is a tree node, so we don't have an entity to pass in, it will need to be looked up
|
//This is a tree node, so we don't have an entity to pass in, it will need to be looked up
|
||||||
//from the server in this method.
|
//from the server in this method.
|
||||||
select(args.node.name, args.node.id);
|
select(args.node.name, args.node.id);
|
||||||
|
|
||||||
//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);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$scope.searchInfo.selectedSearchResults = _.reject($scope.searchInfo.selectedSearchResults, function(i) {
|
$scope.searchInfo.selectedSearchResults = _.reject($scope.searchInfo.selectedSearchResults, function(i) {
|
||||||
return i.id == result.id;
|
return i.id == result.id;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
//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
|
||||||
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 the curr node exists in selected search results, ensure it's checked
|
//if the curr node exists in selected search results, ensure it's checked
|
||||||
if (exists) {
|
if (exists) {
|
||||||
child.selected = true;
|
child.selected = true;
|
||||||
}
|
}
|
||||||
//if the curr node does not exist in the selected search result, and the curr node is a child of a list view search result
|
//if the curr node does not exist in the selected search result, and the curr node is a child of a list view search result
|
||||||
else if (child.metaData.isSearchResult) {
|
else if (child.metaData.isSearchResult) {
|
||||||
//if this tree node is under a list view it means that the node was added
|
//if this tree node is under a list view it means that the node was added
|
||||||
// to the tree dynamically under the list view that was searched, so we actually want to remove
|
// to the tree dynamically under the list view that was searched, so we actually want to remove
|
||||||
// it all together from the tree
|
// it all together from the tree
|
||||||
var listView = child.parent();
|
var listView = child.parent();
|
||||||
listView.children = _.reject(listView.children, function(c) {
|
listView.children = _.reject(listView.children, function(c) {
|
||||||
return c.id == child.id;
|
return c.id == child.id;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
//check if the current node is a list view and if so, check if there's any new results
|
//check if the current node is a list view and if so, check if there's any new results
|
||||||
// that need to be added as child nodes to it based on search results selected
|
// that need to be added as child nodes to it based on search results selected
|
||||||
if (child.metaData.isContainer) {
|
if (child.metaData.isContainer) {
|
||||||
|
|
||||||
child.cssClasses = _.reject(child.cssClasses, function(c) {
|
child.cssClasses = _.reject(child.cssClasses, function(c) {
|
||||||
return c === 'tree-node-slide-up-hide-active';
|
return c === 'tree-node-slide-up-hide-active';
|
||||||
});
|
});
|
||||||
|
|
||||||
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) {
|
||||||
var childExists = _.find(child.children, function(c) {
|
var childExists = _.find(child.children, function(c) {
|
||||||
return c.id == item.id;
|
return c.id == item.id;
|
||||||
});
|
});
|
||||||
if (!childExists) {
|
if (!childExists) {
|
||||||
var parent = child;
|
var parent = child;
|
||||||
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 parent;
|
return parent;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
//recurse
|
//recurse
|
||||||
if (child.children && child.children.length > 0) {
|
if (child.children && child.children.length > 0) {
|
||||||
checkChildren(child.children);
|
checkChildren(child.children);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
checkChildren(tree.root.children);
|
checkChildren(tree.root.children);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$scope.searchInfo.showSearch = false;
|
$scope.searchInfo.showSearch = false;
|
||||||
$scope.searchInfo.searchFromId = dialogOptions.startNodeId;
|
$scope.searchInfo.searchFromId = dialogOptions.startNodeId;
|
||||||
$scope.searchInfo.searchFromName = null;
|
$scope.searchInfo.searchFromName = null;
|
||||||
$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>
|
||||||
|
|||||||
+21
-16
@@ -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,12 +133,12 @@ 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;
|
||||||
|
|
||||||
// make sure the content tree has nothing highlighted
|
// make sure the content tree has nothing highlighted
|
||||||
$scope.dialogTreeEventHandler.syncTree({
|
$scope.dialogTreeEventHandler.syncTree({
|
||||||
path: "-1",
|
path: "-1",
|
||||||
tree: "content"
|
tree: "content"
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|
||||||
|
|||||||
+439
-426
@@ -1,426 +1,439 @@
|
|||||||
//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");
|
||||||
}
|
}
|
||||||
|
|
||||||
var dialogOptions = $scope.model;
|
var dialogOptions = $scope.model;
|
||||||
|
|
||||||
$scope.disableFolderSelect = dialogOptions.disableFolderSelect;
|
$scope.disableFolderSelect = dialogOptions.disableFolderSelect;
|
||||||
$scope.onlyImages = dialogOptions.onlyImages;
|
$scope.onlyImages = dialogOptions.onlyImages;
|
||||||
$scope.showDetails = dialogOptions.showDetails;
|
$scope.showDetails = dialogOptions.showDetails;
|
||||||
$scope.multiPicker = (dialogOptions.multiPicker && dialogOptions.multiPicker !== "0") ? true : false;
|
$scope.multiPicker = (dialogOptions.multiPicker && dialogOptions.multiPicker !== "0") ? true : false;
|
||||||
$scope.startNodeId = dialogOptions.startNodeId ? dialogOptions.startNodeId : -1;
|
$scope.startNodeId = dialogOptions.startNodeId ? dialogOptions.startNodeId : -1;
|
||||||
$scope.cropSize = dialogOptions.cropSize;
|
$scope.cropSize = dialogOptions.cropSize;
|
||||||
$scope.lastOpenedNode = localStorageService.get("umbLastOpenedMediaNodeId");
|
$scope.lastOpenedNode = localStorageService.get("umbLastOpenedMediaNodeId");
|
||||||
$scope.lockedFolder = true;
|
$scope.lockedFolder = true;
|
||||||
|
|
||||||
var userStartNodes = [];
|
var userStartNodes = [];
|
||||||
|
|
||||||
var umbracoSettings = Umbraco.Sys.ServerVariables.umbracoSettings;
|
var umbracoSettings = Umbraco.Sys.ServerVariables.umbracoSettings;
|
||||||
var allowedUploadFiles = mediaHelper.formatFileTypes(umbracoSettings.allowedUploadFiles);
|
var allowedUploadFiles = mediaHelper.formatFileTypes(umbracoSettings.allowedUploadFiles);
|
||||||
if ($scope.onlyImages) {
|
if ($scope.onlyImages) {
|
||||||
$scope.acceptedFileTypes = mediaHelper.formatFileTypes(umbracoSettings.imageFileTypes);
|
$scope.acceptedFileTypes = mediaHelper.formatFileTypes(umbracoSettings.imageFileTypes);
|
||||||
} else {
|
} else {
|
||||||
// Use whitelist of allowed file types if provided
|
// Use whitelist of allowed file types if provided
|
||||||
if (allowedUploadFiles !== '') {
|
if (allowedUploadFiles !== '') {
|
||||||
$scope.acceptedFileTypes = allowedUploadFiles;
|
$scope.acceptedFileTypes = allowedUploadFiles;
|
||||||
} else {
|
} else {
|
||||||
// If no whitelist, we pass in a blacklist by adding ! to the file extensions, allowing everything EXCEPT for disallowedUploadFiles
|
// If no whitelist, we pass in a blacklist by adding ! to the file extensions, allowing everything EXCEPT for disallowedUploadFiles
|
||||||
$scope.acceptedFileTypes = !mediaHelper.formatFileTypes(umbracoSettings.disallowedUploadFiles);
|
$scope.acceptedFileTypes = !mediaHelper.formatFileTypes(umbracoSettings.disallowedUploadFiles);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.maxFileSize = umbracoSettings.maxFileSize + "KB";
|
$scope.maxFileSize = umbracoSettings.maxFileSize + "KB";
|
||||||
|
|
||||||
$scope.model.selectedImages = [];
|
$scope.model.selectedImages = [];
|
||||||
|
|
||||||
$scope.acceptedMediatypes = [];
|
$scope.acceptedMediatypes = [];
|
||||||
mediaTypeHelper.getAllowedImagetypes($scope.startNodeId)
|
mediaTypeHelper.getAllowedImagetypes($scope.startNodeId)
|
||||||
.then(function(types) {
|
.then(function (types) {
|
||||||
$scope.acceptedMediatypes = types;
|
$scope.acceptedMediatypes = types;
|
||||||
});
|
});
|
||||||
|
|
||||||
$scope.searchOptions = {
|
var dataTypeId = null;
|
||||||
pageNumber: 1,
|
if($scope.model && $scope.model.dataTypeId) {
|
||||||
pageSize: 100,
|
dataTypeId = $scope.model.dataTypeId;
|
||||||
totalItems: 0,
|
}
|
||||||
totalPages: 0,
|
$scope.searchOptions = {
|
||||||
filter: '',
|
pageNumber: 1,
|
||||||
ignoreUserStartNodes: $scope.model.ignoreUserStartNodes
|
pageSize: 100,
|
||||||
};
|
totalItems: 0,
|
||||||
|
totalPages: 0,
|
||||||
//preload selected item
|
filter: '',
|
||||||
$scope.target = undefined;
|
dataTypeId: dataTypeId
|
||||||
if (dialogOptions.currentTarget) {
|
};
|
||||||
$scope.target = dialogOptions.currentTarget;
|
|
||||||
}
|
//preload selected item
|
||||||
|
$scope.target = undefined;
|
||||||
function onInit() {
|
if (dialogOptions.currentTarget) {
|
||||||
userService.getCurrentUser().then(function (userData) {
|
$scope.target = dialogOptions.currentTarget;
|
||||||
userStartNodes = userData.startMediaIds;
|
}
|
||||||
|
|
||||||
if ($scope.startNodeId !== -1) {
|
function onInit() {
|
||||||
entityResource.getById($scope.startNodeId, "media")
|
userService.getCurrentUser().then(function (userData) {
|
||||||
.then(function (ent) {
|
userStartNodes = userData.startMediaIds;
|
||||||
$scope.startNodeId = ent.id;
|
|
||||||
run();
|
if ($scope.startNodeId !== -1) {
|
||||||
});
|
entityResource.getById($scope.startNodeId, "media")
|
||||||
} else {
|
.then(function (ent) {
|
||||||
run();
|
$scope.startNodeId = ent.id;
|
||||||
}
|
run();
|
||||||
});
|
});
|
||||||
}
|
} else {
|
||||||
|
run();
|
||||||
function run() {
|
}
|
||||||
//default root item
|
});
|
||||||
if (!$scope.target) {
|
}
|
||||||
if ($scope.lastOpenedNode && $scope.lastOpenedNode !== -1) {
|
|
||||||
entityResource.getById($scope.lastOpenedNode, "media")
|
function run() {
|
||||||
.then(ensureWithinStartNode, gotoStartNode);
|
//default root item
|
||||||
} else {
|
if (!$scope.target) {
|
||||||
gotoStartNode();
|
if ($scope.lastOpenedNode && $scope.lastOpenedNode !== -1) {
|
||||||
}
|
entityResource.getById($scope.lastOpenedNode, "media")
|
||||||
} else {
|
.then(ensureWithinStartNode, gotoStartNode);
|
||||||
//if a target is specified, go look it up - generally this target will just contain ids not the actual full
|
} else {
|
||||||
//media object so we need to look it up
|
gotoStartNode();
|
||||||
var id = $scope.target.udi ? $scope.target.udi : $scope.target.id
|
}
|
||||||
var altText = $scope.target.altText;
|
} else {
|
||||||
if (id) {
|
//if a target is specified, go look it up - generally this target will just contain ids not the actual full
|
||||||
mediaResource.getById(id)
|
//media object so we need to look it up
|
||||||
.then(function (node) {
|
var id = $scope.target.udi ? $scope.target.udi : $scope.target.id
|
||||||
$scope.target = node;
|
var altText = $scope.target.altText;
|
||||||
if (ensureWithinStartNode(node)) {
|
if (id) {
|
||||||
selectImage(node);
|
entityResource.getById(id, "Media")
|
||||||
$scope.target.url = mediaHelper.resolveFile(node);
|
.then(function (node) {
|
||||||
$scope.target.altText = altText;
|
$scope.target = node;
|
||||||
$scope.openDetailsDialog();
|
if (ensureWithinStartNode(node)) {
|
||||||
}
|
selectImage(node);
|
||||||
},
|
$scope.target.url = mediaHelper.resolveFile(node);
|
||||||
gotoStartNode);
|
$scope.target.altText = altText;
|
||||||
} else {
|
$scope.openDetailsDialog();
|
||||||
gotoStartNode();
|
}
|
||||||
}
|
},
|
||||||
}
|
gotoStartNode);
|
||||||
}
|
} else {
|
||||||
|
gotoStartNode();
|
||||||
$scope.upload = function(v) {
|
}
|
||||||
angular.element(".umb-file-dropzone-directive .file-select").click();
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
$scope.dragLeave = function(el, event) {
|
$scope.upload = function (v) {
|
||||||
$scope.activeDrag = false;
|
angular.element(".umb-file-dropzone-directive .file-select").click();
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.dragEnter = function(el, event) {
|
$scope.dragLeave = function (el, event) {
|
||||||
$scope.activeDrag = true;
|
$scope.activeDrag = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.submitFolder = function() {
|
$scope.dragEnter = function (el, event) {
|
||||||
if ($scope.newFolderName) {
|
$scope.activeDrag = true;
|
||||||
$scope.creatingFolder = true;
|
};
|
||||||
mediaResource
|
|
||||||
.addFolder($scope.newFolderName, $scope.currentFolder.id)
|
$scope.submitFolder = function () {
|
||||||
.then(function(data) {
|
if ($scope.newFolderName) {
|
||||||
//we've added a new folder so lets clear the tree cache for that specific item
|
$scope.creatingFolder = true;
|
||||||
treeService.clearCache({
|
mediaResource
|
||||||
cacheKey: "__media", //this is the main media tree cache key
|
.addFolder($scope.newFolderName, $scope.currentFolder.id)
|
||||||
childrenOf: data.parentId //clear the children of the parent
|
.then(function (data) {
|
||||||
});
|
//we've added a new folder so lets clear the tree cache for that specific item
|
||||||
$scope.creatingFolder = false;
|
treeService.clearCache({
|
||||||
$scope.gotoFolder(data);
|
cacheKey: "__media", //this is the main media tree cache key
|
||||||
$scope.showFolderInput = false;
|
childrenOf: data.parentId //clear the children of the parent
|
||||||
$scope.newFolderName = "";
|
});
|
||||||
});
|
$scope.creatingFolder = false;
|
||||||
} else {
|
$scope.gotoFolder(data);
|
||||||
$scope.showFolderInput = false;
|
$scope.showFolderInput = false;
|
||||||
}
|
$scope.newFolderName = "";
|
||||||
};
|
});
|
||||||
|
} else {
|
||||||
$scope.enterSubmitFolder = function(event) {
|
$scope.showFolderInput = false;
|
||||||
if (event.keyCode === 13) {
|
}
|
||||||
$scope.submitFolder();
|
};
|
||||||
event.stopPropagation();
|
|
||||||
}
|
$scope.enterSubmitFolder = function (event) {
|
||||||
};
|
if (event.keyCode === 13) {
|
||||||
|
$scope.submitFolder();
|
||||||
$scope.gotoFolder = function(folder) {
|
event.stopPropagation();
|
||||||
if (!$scope.multiPicker) {
|
}
|
||||||
deselectAllImages($scope.model.selectedImages);
|
};
|
||||||
}
|
|
||||||
|
$scope.gotoFolder = function (folder) {
|
||||||
if (!folder) {
|
if (!$scope.multiPicker) {
|
||||||
folder = { id: -1, name: "Media", icon: "icon-folder" };
|
deselectAllImages($scope.model.selectedImages);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (folder.id > 0) {
|
if (!folder) {
|
||||||
entityResource.getAncestors(folder.id, "media", { ignoreUserStartNodes: $scope.model.ignoreUserStartNodes })
|
folder = { id: -1, name: "Media", icon: "icon-folder" };
|
||||||
.then(function(anc) {
|
}
|
||||||
$scope.path = _.filter(anc,
|
|
||||||
function(f) {
|
if (folder.id > 0) {
|
||||||
return f.path.indexOf($scope.startNodeId) !== -1;
|
|
||||||
});
|
entityResource.getAncestors(folder.id, "media", { dataTypeId: dataTypeId })
|
||||||
});
|
.then(function (anc) {
|
||||||
|
$scope.path = _.filter(anc,
|
||||||
} else {
|
function (f) {
|
||||||
$scope.path = [];
|
return f.path.indexOf($scope.startNodeId) !== -1;
|
||||||
}
|
});
|
||||||
|
});
|
||||||
mediaTypeHelper.getAllowedImagetypes(folder.id)
|
|
||||||
.then(function (types) {
|
} else {
|
||||||
$scope.acceptedMediatypes = types;
|
$scope.path = [];
|
||||||
});
|
}
|
||||||
|
|
||||||
$scope.lockedFolder = (folder.id === -1 && $scope.model.startNodeIsVirtual) || hasFolderAccess(folder) === false;
|
mediaTypeHelper.getAllowedImagetypes(folder.id)
|
||||||
|
.then(function (types) {
|
||||||
$scope.currentFolder = folder;
|
$scope.acceptedMediatypes = types;
|
||||||
localStorageService.set("umbLastOpenedMediaNodeId", folder.id);
|
});
|
||||||
return getChildren(folder.id);
|
|
||||||
};
|
$scope.lockedFolder = (folder.id === -1 && $scope.model.startNodeIsVirtual) || hasFolderAccess(folder) === false;
|
||||||
|
|
||||||
$scope.clickHandler = function(image, event, index) {
|
$scope.currentFolder = folder;
|
||||||
if (image.isFolder) {
|
localStorageService.set("umbLastOpenedMediaNodeId", folder.id);
|
||||||
if ($scope.disableFolderSelect) {
|
return getChildren(folder.id);
|
||||||
$scope.gotoFolder(image);
|
};
|
||||||
} else {
|
|
||||||
eventsService.emit("dialogs.mediaPicker.select", image);
|
$scope.clickHandler = function (image, event, index) {
|
||||||
selectImage(image);
|
if (image.isFolder) {
|
||||||
}
|
if ($scope.disableFolderSelect) {
|
||||||
} else {
|
$scope.gotoFolder(image);
|
||||||
eventsService.emit("dialogs.mediaPicker.select", image);
|
} else {
|
||||||
if ($scope.showDetails) {
|
eventsService.emit("dialogs.mediaPicker.select", image);
|
||||||
|
selectImage(image);
|
||||||
$scope.target = image;
|
}
|
||||||
|
} else {
|
||||||
// handle both entity and full media object
|
eventsService.emit("dialogs.mediaPicker.select", image);
|
||||||
if (image.image) {
|
if ($scope.showDetails) {
|
||||||
$scope.target.url = image.image;
|
|
||||||
} else {
|
$scope.target = image;
|
||||||
$scope.target.url = mediaHelper.resolveFile(image);
|
|
||||||
}
|
// handle both entity and full media object
|
||||||
|
if (image.image) {
|
||||||
$scope.openDetailsDialog();
|
$scope.target.url = image.image;
|
||||||
} else {
|
} else {
|
||||||
selectImage(image);
|
$scope.target.url = mediaHelper.resolveFile(image);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
};
|
$scope.openDetailsDialog();
|
||||||
|
} else {
|
||||||
$scope.clickItemName = function(item) {
|
selectImage(image);
|
||||||
if (item.isFolder) {
|
}
|
||||||
$scope.gotoFolder(item);
|
}
|
||||||
}
|
};
|
||||||
};
|
|
||||||
|
$scope.clickItemName = function (item) {
|
||||||
function selectImage(image) {
|
if (item.isFolder) {
|
||||||
if (image.selected) {
|
$scope.gotoFolder(item);
|
||||||
for (var i = 0; $scope.model.selectedImages.length > i; i++) {
|
}
|
||||||
var imageInSelection = $scope.model.selectedImages[i];
|
};
|
||||||
if (image.key === imageInSelection.key) {
|
|
||||||
image.selected = false;
|
function selectImage(image) {
|
||||||
$scope.model.selectedImages.splice(i, 1);
|
if (image.selected) {
|
||||||
}
|
for (var i = 0; $scope.model.selectedImages.length > i; i++) {
|
||||||
}
|
var imageInSelection = $scope.model.selectedImages[i];
|
||||||
} else {
|
if (image.key === imageInSelection.key) {
|
||||||
if (!$scope.multiPicker) {
|
image.selected = false;
|
||||||
deselectAllImages($scope.model.selectedImages);
|
$scope.model.selectedImages.splice(i, 1);
|
||||||
}
|
}
|
||||||
image.selected = true;
|
}
|
||||||
$scope.model.selectedImages.push(image);
|
} else {
|
||||||
}
|
if (!$scope.multiPicker) {
|
||||||
}
|
deselectAllImages($scope.model.selectedImages);
|
||||||
|
}
|
||||||
function deselectAllImages(images) {
|
image.selected = true;
|
||||||
for (var i = 0; i < images.length; i++) {
|
$scope.model.selectedImages.push(image);
|
||||||
var image = images[i];
|
}
|
||||||
image.selected = false;
|
}
|
||||||
}
|
|
||||||
images.length = 0;
|
function deselectAllImages(images) {
|
||||||
}
|
for (var i = 0; i < images.length; i++) {
|
||||||
|
var image = images[i];
|
||||||
$scope.onUploadComplete = function(files) {
|
image.selected = false;
|
||||||
$scope.gotoFolder($scope.currentFolder).then(function() {
|
}
|
||||||
if (files.length === 1 && $scope.model.selectedImages.length === 0) {
|
images.length = 0;
|
||||||
var image = $scope.images[$scope.images.length - 1];
|
}
|
||||||
$scope.target = image;
|
|
||||||
$scope.target.url = mediaHelper.resolveFile(image);
|
$scope.onUploadComplete = function (files) {
|
||||||
selectImage(image);
|
$scope.gotoFolder($scope.currentFolder).then(function () {
|
||||||
}
|
if (files.length === 1 && $scope.model.selectedImages.length === 0) {
|
||||||
});
|
var image = $scope.images[$scope.images.length - 1];
|
||||||
};
|
$scope.target = image;
|
||||||
|
$scope.target.url = mediaHelper.resolveFile(image);
|
||||||
$scope.onFilesQueue = function() {
|
selectImage(image);
|
||||||
$scope.activeDrag = false;
|
}
|
||||||
};
|
});
|
||||||
|
};
|
||||||
function ensureWithinStartNode(node) {
|
|
||||||
// make sure that last opened node is on the same path as start node
|
$scope.onFilesQueue = function () {
|
||||||
var nodePath = node.path.split(",");
|
$scope.activeDrag = false;
|
||||||
|
};
|
||||||
// also make sure the node is not trashed
|
|
||||||
if (nodePath.indexOf($scope.startNodeId.toString()) !== -1 && node.trashed === false) {
|
function ensureWithinStartNode(node) {
|
||||||
$scope.gotoFolder({ id: $scope.lastOpenedNode, name: "Media", icon: "icon-folder" });
|
// make sure that last opened node is on the same path as start node
|
||||||
return true;
|
var nodePath = node.path.split(",");
|
||||||
} else {
|
|
||||||
$scope.gotoFolder({ id: $scope.startNodeId, name: "Media", icon: "icon-folder" });
|
// also make sure the node is not trashed
|
||||||
return false;
|
if (nodePath.indexOf($scope.startNodeId.toString()) !== -1 && node.trashed === false) {
|
||||||
}
|
$scope.gotoFolder({ id: $scope.lastOpenedNode, name: "Media", icon: "icon-folder", path: node.path });
|
||||||
}
|
return true;
|
||||||
|
} else {
|
||||||
function hasFolderAccess(node) {
|
$scope.gotoFolder({ id: $scope.startNodeId, name: "Media", icon: "icon-folder" });
|
||||||
var nodePath = node.path ? node.path.split(',') : [node.id];
|
return false;
|
||||||
|
}
|
||||||
for (var i = 0; i < nodePath.length; i++) {
|
}
|
||||||
if (userStartNodes.indexOf(parseInt(nodePath[i])) !== -1)
|
|
||||||
return true;
|
function hasFolderAccess(node) {
|
||||||
}
|
var nodePath = node.path ? node.path.split(',') : [node.id];
|
||||||
|
|
||||||
return false;
|
for (var i = 0; i < nodePath.length; i++) {
|
||||||
}
|
if (userStartNodes.indexOf(parseInt(nodePath[i])) !== -1)
|
||||||
|
return true;
|
||||||
function gotoStartNode(err) {
|
}
|
||||||
$scope.gotoFolder({ id: $scope.startNodeId, name: "Media", icon: "icon-folder" });
|
|
||||||
}
|
return false;
|
||||||
|
}
|
||||||
$scope.openDetailsDialog = function() {
|
|
||||||
|
function gotoStartNode(err) {
|
||||||
$scope.mediaPickerDetailsOverlay = {};
|
$scope.gotoFolder({ id: $scope.startNodeId, name: "Media", icon: "icon-folder" });
|
||||||
$scope.mediaPickerDetailsOverlay.show = true;
|
}
|
||||||
|
|
||||||
$scope.mediaPickerDetailsOverlay.submit = function(model) {
|
$scope.openDetailsDialog = function () {
|
||||||
$scope.model.selectedImages.push($scope.target);
|
|
||||||
$scope.model.submit($scope.model);
|
$scope.mediaPickerDetailsOverlay = {};
|
||||||
|
$scope.mediaPickerDetailsOverlay.show = true;
|
||||||
$scope.mediaPickerDetailsOverlay.show = false;
|
|
||||||
$scope.mediaPickerDetailsOverlay = null;
|
$scope.mediaPickerDetailsOverlay.submit = function (model) {
|
||||||
};
|
$scope.model.selectedImages.push($scope.target);
|
||||||
|
$scope.model.submit($scope.model);
|
||||||
$scope.mediaPickerDetailsOverlay.close = function(oldModel) {
|
|
||||||
$scope.mediaPickerDetailsOverlay.show = false;
|
$scope.mediaPickerDetailsOverlay.show = false;
|
||||||
$scope.mediaPickerDetailsOverlay = null;
|
$scope.mediaPickerDetailsOverlay = null;
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
$scope.mediaPickerDetailsOverlay.close = function (oldModel) {
|
||||||
var debounceSearchMedia = _.debounce(function() {
|
$scope.mediaPickerDetailsOverlay.show = false;
|
||||||
$scope.$apply(function() {
|
$scope.mediaPickerDetailsOverlay = null;
|
||||||
if ($scope.searchOptions.filter) {
|
};
|
||||||
searchMedia();
|
};
|
||||||
} else {
|
|
||||||
// reset pagination
|
var debounceSearchMedia = _.debounce(function () {
|
||||||
$scope.searchOptions = {
|
$scope.$apply(function () {
|
||||||
pageNumber: 1,
|
if ($scope.searchOptions.filter) {
|
||||||
pageSize: 100,
|
searchMedia();
|
||||||
totalItems: 0,
|
} else {
|
||||||
totalPages: 0,
|
|
||||||
filter: '',
|
// reset pagination
|
||||||
ignoreUserStartNodes: $scope.model.ignoreUserStartNodes
|
$scope.searchOptions = {
|
||||||
};
|
pageNumber: 1,
|
||||||
getChildren($scope.currentFolder.id);
|
pageSize: 100,
|
||||||
}
|
totalItems: 0,
|
||||||
});
|
totalPages: 0,
|
||||||
}, 500);
|
filter: '',
|
||||||
|
dataTypeId: dataTypeId
|
||||||
$scope.changeSearch = function() {
|
};
|
||||||
$scope.loading = true;
|
getChildren($scope.currentFolder.id);
|
||||||
debounceSearchMedia();
|
}
|
||||||
};
|
});
|
||||||
|
}, 500);
|
||||||
$scope.toggle = function() {
|
|
||||||
// Make sure to activate the changeSearch function everytime the toggle is clicked
|
$scope.changeSearch = function () {
|
||||||
$scope.changeSearch();
|
$scope.loading = true;
|
||||||
}
|
debounceSearchMedia();
|
||||||
|
};
|
||||||
$scope.changePagination = function(pageNumber) {
|
|
||||||
$scope.loading = true;
|
$scope.toggle = function () {
|
||||||
$scope.searchOptions.pageNumber = pageNumber;
|
// Make sure to activate the changeSearch function everytime the toggle is clicked
|
||||||
searchMedia();
|
$scope.changeSearch();
|
||||||
};
|
}
|
||||||
|
|
||||||
function searchMedia() {
|
$scope.changePagination = function (pageNumber) {
|
||||||
$scope.loading = true;
|
$scope.loading = true;
|
||||||
entityResource.getPagedDescendants($scope.currentFolder.id, "Media", $scope.searchOptions)
|
$scope.searchOptions.pageNumber = pageNumber;
|
||||||
.then(function(data) {
|
searchMedia();
|
||||||
// update image data to work with image grid
|
};
|
||||||
angular.forEach(data.items,
|
|
||||||
function(mediaItem) {
|
function searchMedia() {
|
||||||
// set thumbnail and src
|
$scope.loading = true;
|
||||||
mediaItem.thumbnail = mediaHelper.resolveFileFromEntity(mediaItem, true);
|
entityResource.getPagedDescendants($scope.currentFolder.id, "Media", $scope.searchOptions)
|
||||||
mediaItem.image = mediaHelper.resolveFileFromEntity(mediaItem, false);
|
.then(function (data) {
|
||||||
// set properties to match a media object
|
// update image data to work with image grid
|
||||||
mediaItem.properties = [];
|
angular.forEach(data.items,
|
||||||
if (mediaItem.metaData) {
|
function (mediaItem) {
|
||||||
if (mediaItem.metaData.umbracoWidth && mediaItem.metaData.umbracoHeight) {
|
// set thumbnail and src
|
||||||
mediaItem.properties.push({
|
mediaItem.thumbnail = mediaHelper.resolveFileFromEntity(mediaItem, true);
|
||||||
alias: "umbracoWidth",
|
mediaItem.image = mediaHelper.resolveFileFromEntity(mediaItem, false);
|
||||||
value: mediaItem.metaData.umbracoWidth.Value
|
// set properties to match a media object
|
||||||
});
|
mediaItem.properties = [];
|
||||||
mediaItem.properties.push({
|
if (mediaItem.metaData) {
|
||||||
alias: "umbracoHeight",
|
if (mediaItem.metaData.umbracoWidth && mediaItem.metaData.umbracoHeight) {
|
||||||
value: mediaItem.metaData.umbracoHeight.Value
|
mediaItem.properties.push({
|
||||||
});
|
alias: "umbracoWidth",
|
||||||
}
|
value: mediaItem.metaData.umbracoWidth.Value
|
||||||
if (mediaItem.metaData.umbracoFile) {
|
});
|
||||||
mediaItem.properties.push({
|
mediaItem.properties.push({
|
||||||
alias: "umbracoFile",
|
alias: "umbracoHeight",
|
||||||
editor: mediaItem.metaData.umbracoFile.PropertyEditorAlias,
|
value: mediaItem.metaData.umbracoHeight.Value
|
||||||
value: mediaItem.metaData.umbracoFile.Value
|
});
|
||||||
});
|
}
|
||||||
}
|
if (mediaItem.metaData.umbracoFile) {
|
||||||
}
|
mediaItem.properties.push({
|
||||||
});
|
alias: "umbracoFile",
|
||||||
// update images
|
editor: mediaItem.metaData.umbracoFile.PropertyEditorAlias,
|
||||||
$scope.images = data.items ? data.items : [];
|
value: mediaItem.metaData.umbracoFile.Value
|
||||||
// update pagination
|
});
|
||||||
if (data.pageNumber > 0)
|
}
|
||||||
$scope.searchOptions.pageNumber = data.pageNumber;
|
}
|
||||||
if (data.pageSize > 0)
|
});
|
||||||
$scope.searchOptions.pageSize = data.pageSize;
|
// update images
|
||||||
$scope.searchOptions.totalItems = data.totalItems;
|
$scope.images = data.items ? data.items : [];
|
||||||
$scope.searchOptions.totalPages = data.totalPages;
|
// update pagination
|
||||||
// set already selected images to selected
|
if (data.pageNumber > 0)
|
||||||
preSelectImages();
|
$scope.searchOptions.pageNumber = data.pageNumber;
|
||||||
$scope.loading = false;
|
if (data.pageSize > 0)
|
||||||
});
|
$scope.searchOptions.pageSize = data.pageSize;
|
||||||
}
|
$scope.searchOptions.totalItems = data.totalItems;
|
||||||
|
$scope.searchOptions.totalPages = data.totalPages;
|
||||||
function getChildren(id) {
|
// set already selected images to selected
|
||||||
$scope.loading = true;
|
preSelectImages();
|
||||||
return mediaResource.getChildren(id, { ignoreUserStartNodes: $scope.model.ignoreUserStartNodes })
|
$scope.loading = false;
|
||||||
.then(function(data) {
|
});
|
||||||
$scope.searchOptions.filter = "";
|
}
|
||||||
$scope.images = data.items ? data.items : [];
|
|
||||||
// set already selected images to selected
|
function getChildren(id) {
|
||||||
preSelectImages();
|
$scope.loading = true;
|
||||||
$scope.loading = false;
|
return entityResource.getChildren(id, "Media", $scope.searchOptions)
|
||||||
});
|
.then(function (data) {
|
||||||
}
|
|
||||||
|
for (var i = 0; i < data.length; i++) {
|
||||||
function preSelectImages() {
|
if (data[i].metaData.MediaPath !== null) {
|
||||||
for (var folderImageIndex = 0; folderImageIndex < $scope.images.length; folderImageIndex++) {
|
data[i].thumbnail = mediaHelper.resolveFileFromEntity(data[i], true);
|
||||||
var folderImage = $scope.images[folderImageIndex];
|
data[i].image = mediaHelper.resolveFileFromEntity(data[i], false);
|
||||||
var imageIsSelected = false;
|
}
|
||||||
|
}
|
||||||
if ($scope.model && angular.isArray($scope.model.selectedImages)) {
|
$scope.searchOptions.filter = "";
|
||||||
for (var selectedImageIndex = 0;
|
$scope.images = data ? data : [];
|
||||||
selectedImageIndex < $scope.model.selectedImages.length;
|
// set already selected images to selected
|
||||||
selectedImageIndex++) {
|
preSelectImages();
|
||||||
var selectedImage = $scope.model.selectedImages[selectedImageIndex];
|
$scope.loading = false;
|
||||||
|
});
|
||||||
if (folderImage.key === selectedImage.key) {
|
}
|
||||||
imageIsSelected = true;
|
|
||||||
}
|
function preSelectImages() {
|
||||||
}
|
for (var folderImageIndex = 0; folderImageIndex < $scope.images.length; folderImageIndex++) {
|
||||||
}
|
var folderImage = $scope.images[folderImageIndex];
|
||||||
|
var imageIsSelected = false;
|
||||||
if (imageIsSelected) {
|
|
||||||
folderImage.selected = true;
|
if ($scope.model && angular.isArray($scope.model.selectedImages)) {
|
||||||
}
|
for (var selectedImageIndex = 0;
|
||||||
}
|
selectedImageIndex < $scope.model.selectedImages.length;
|
||||||
}
|
selectedImageIndex++) {
|
||||||
|
var selectedImage = $scope.model.selectedImages[selectedImageIndex];
|
||||||
onInit();
|
|
||||||
|
if (folderImage.key === selectedImage.key) {
|
||||||
});
|
imageIsSelected = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (imageIsSelected) {
|
||||||
|
folderImage.selected = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onInit();
|
||||||
|
|
||||||
|
});
|
||||||
|
|||||||
+531
-530
File diff suppressed because it is too large
Load Diff
@@ -1,56 +1,56 @@
|
|||||||
<div ng-controller="Umbraco.Overlays.TreePickerController">
|
<div ng-controller="Umbraco.Overlays.TreePickerController">
|
||||||
|
|
||||||
<div ng-hide="miniListView">
|
<div ng-hide="miniListView">
|
||||||
|
|
||||||
<div class="umb-control-group">
|
<div class="umb-control-group">
|
||||||
<umb-tree-search-box
|
<umb-tree-search-box
|
||||||
ng-if="enableSearh"
|
ng-if="enableSearh"
|
||||||
hide-search-callback="hideSearch"
|
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}}"
|
||||||
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>
|
||||||
|
|
||||||
<umb-tree-search-results
|
<umb-tree-search-results
|
||||||
ng-if="searchInfo.showSearch"
|
ng-if="searchInfo.showSearch"
|
||||||
results="searchInfo.results"
|
results="searchInfo.results"
|
||||||
select-result-callback="selectResult">
|
select-result-callback="selectResult">
|
||||||
</umb-tree-search-results>
|
</umb-tree-search-results>
|
||||||
|
|
||||||
<umb-empty-state ng-if="!hasItems && emptyStateMessage" position="center">
|
<umb-empty-state ng-if="!hasItems && emptyStateMessage" position="center">
|
||||||
{{ emptyStateMessage }}
|
{{ emptyStateMessage }}
|
||||||
</umb-empty-state>
|
</umb-empty-state>
|
||||||
|
|
||||||
<div ng-if="treeReady" ng-hide="searchInfo.showSearch" ng-animate="'tree-fade-out'">
|
<div ng-if="treeReady" ng-hide="searchInfo.showSearch" ng-animate="'tree-fade-out'">
|
||||||
<umb-tree
|
<umb-tree
|
||||||
section="{{section}}"
|
section="{{section}}"
|
||||||
treealias="{{treeAlias}}"
|
treealias="{{treeAlias}}"
|
||||||
hideheader="{{hideHeader}}"
|
hideheader="{{hideHeader}}"
|
||||||
hideoptions="true"
|
hideoptions="true"
|
||||||
isdialog="true"
|
isdialog="true"
|
||||||
onlyinitialized="{{onlyInitialized}}"
|
onlyinitialized="{{onlyInitialized}}"
|
||||||
customtreeparams="{{customTreeParams}}"
|
customtreeparams="{{customTreeParams}}"
|
||||||
eventhandler="dialogTreeEventHandler"
|
eventhandler="dialogTreeEventHandler"
|
||||||
enablelistviewsearch="true"
|
enablelistviewsearch="true"
|
||||||
enablelistviewexpand="true"
|
enablelistviewexpand="true"
|
||||||
enablecheckboxes="{{multiPicker}}">
|
enablecheckboxes="{{multiPicker}}">
|
||||||
</umb-tree>
|
</umb-tree>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<umb-mini-list-view
|
<umb-mini-list-view
|
||||||
ng-if="miniListView"
|
ng-if="miniListView"
|
||||||
node="miniListView"
|
node="miniListView"
|
||||||
entity-type="{{entityType}}"
|
entity-type="{{entityType}}"
|
||||||
start-node-id="model.startNodeId"
|
start-node-id="model.startNodeId"
|
||||||
on-select="selectListViewNode(node)"
|
on-select="selectListViewNode(node)"
|
||||||
on-close="closeMiniListView()"
|
on-close="closeMiniListView()"
|
||||||
entity-type-filter="filter">
|
entity-type-filter="filter">
|
||||||
</umb-mini-list-view>
|
</umb-mini-list-view>
|
||||||
|
|
||||||
</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) {
|
||||||
|
|
||||||
|
|||||||
+367
-366
@@ -1,366 +1,367 @@
|
|||||||
//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
|
||||||
|
|
||||||
function contentPickerController($scope, entityResource, editorState, iconHelper, $routeParams, angularHelper, navigationService, $location, miniEditorHelper, localizationService) {
|
function contentPickerController($scope, entityResource, editorState, iconHelper, $routeParams, angularHelper, navigationService, $location, miniEditorHelper, localizationService) {
|
||||||
|
|
||||||
var unsubscribe;
|
var unsubscribe;
|
||||||
|
|
||||||
function subscribe() {
|
function subscribe() {
|
||||||
unsubscribe = $scope.$on("formSubmitting", function (ev, args) {
|
unsubscribe = $scope.$on("formSubmitting", function (ev, args) {
|
||||||
var currIds = _.map($scope.renderModel, function (i) {
|
var currIds = _.map($scope.renderModel, function (i) {
|
||||||
return $scope.model.config.idType === "udi" ? i.udi : i.id;
|
return $scope.model.config.idType === "udi" ? i.udi : i.id;
|
||||||
});
|
});
|
||||||
$scope.model.value = trim(currIds.join(), ",");
|
$scope.model.value = trim(currIds.join(), ",");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function trim(str, chr) {
|
function trim(str, chr) {
|
||||||
var rgxtrim = (!chr) ? new RegExp('^\\s+|\\s+$', 'g') : new RegExp('^' + chr + '+|' + chr + '+$', 'g');
|
var rgxtrim = (!chr) ? new RegExp('^\\s+|\\s+$', 'g') : new RegExp('^' + chr + '+|' + chr + '+$', 'g');
|
||||||
return str.replace(rgxtrim, '');
|
return str.replace(rgxtrim, '');
|
||||||
}
|
}
|
||||||
|
|
||||||
function startWatch() {
|
function startWatch() {
|
||||||
//We need to watch our renderModel so that we can update the underlying $scope.model.value properly, this is required
|
//We need to watch our renderModel so that we can update the underlying $scope.model.value properly, this is required
|
||||||
// because the ui-sortable doesn't dispatch an event after the digest of the sort operation. Any of the events for UI sortable
|
// because the ui-sortable doesn't dispatch an event after the digest of the sort operation. Any of the events for UI sortable
|
||||||
// occur after the DOM has updated but BEFORE the digest has occured so the model has NOT changed yet - it even states so in the docs.
|
// occur after the DOM has updated but BEFORE the digest has occured so the model has NOT changed yet - it even states so in the docs.
|
||||||
// In their source code there is no event so we need to just subscribe to our model changes here.
|
// In their source code there is no event so we need to just subscribe to our model changes here.
|
||||||
//This also makes it easier to manage models, we update one and the rest will just work.
|
//This also makes it easier to manage models, we update one and the rest will just work.
|
||||||
$scope.$watch(function () {
|
$scope.$watch(function () {
|
||||||
//return the joined Ids as a string to watch
|
//return the joined Ids as a string to watch
|
||||||
return _.map($scope.renderModel, function (i) {
|
return _.map($scope.renderModel, function (i) {
|
||||||
return $scope.model.config.idType === "udi" ? i.udi : i.id;
|
return $scope.model.config.idType === "udi" ? i.udi : i.id;
|
||||||
}).join();
|
}).join();
|
||||||
}, function (newVal) {
|
}, function (newVal) {
|
||||||
var currIds = _.map($scope.renderModel, function (i) {
|
var currIds = _.map($scope.renderModel, function (i) {
|
||||||
return $scope.model.config.idType === "udi" ? i.udi : i.id;
|
return $scope.model.config.idType === "udi" ? i.udi : i.id;
|
||||||
});
|
});
|
||||||
$scope.model.value = trim(currIds.join(), ",");
|
$scope.model.value = trim(currIds.join(), ",");
|
||||||
|
|
||||||
//Validate!
|
//Validate!
|
||||||
if ($scope.model.config && $scope.model.config.minNumber && parseInt($scope.model.config.minNumber) > $scope.renderModel.length) {
|
if ($scope.model.config && $scope.model.config.minNumber && parseInt($scope.model.config.minNumber) > $scope.renderModel.length) {
|
||||||
$scope.contentPickerForm.minCount.$setValidity("minCount", false);
|
$scope.contentPickerForm.minCount.$setValidity("minCount", false);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$scope.contentPickerForm.minCount.$setValidity("minCount", true);
|
$scope.contentPickerForm.minCount.$setValidity("minCount", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($scope.model.config && $scope.model.config.maxNumber && parseInt($scope.model.config.maxNumber) < $scope.renderModel.length) {
|
if ($scope.model.config && $scope.model.config.maxNumber && parseInt($scope.model.config.maxNumber) < $scope.renderModel.length) {
|
||||||
$scope.contentPickerForm.maxCount.$setValidity("maxCount", false);
|
$scope.contentPickerForm.maxCount.$setValidity("maxCount", false);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$scope.contentPickerForm.maxCount.$setValidity("maxCount", true);
|
$scope.contentPickerForm.maxCount.$setValidity("maxCount", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
setSortingState($scope.renderModel);
|
setSortingState($scope.renderModel);
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.renderModel = [];
|
$scope.renderModel = [];
|
||||||
|
|
||||||
$scope.dialogEditor = editorState && editorState.current && editorState.current.isDialogEditor === true;
|
$scope.dialogEditor = editorState && editorState.current && editorState.current.isDialogEditor === true;
|
||||||
|
|
||||||
//the default pre-values
|
//the default pre-values
|
||||||
var defaultConfig = {
|
var defaultConfig = {
|
||||||
multiPicker: false,
|
multiPicker: false,
|
||||||
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
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// sortable options
|
// sortable options
|
||||||
$scope.sortableOptions = {
|
$scope.sortableOptions = {
|
||||||
axis: "y",
|
axis: "y",
|
||||||
containment: "parent",
|
containment: "parent",
|
||||||
distance: 10,
|
distance: 10,
|
||||||
opacity: 0.7,
|
opacity: 0.7,
|
||||||
tolerance: "pointer",
|
tolerance: "pointer",
|
||||||
scroll: true,
|
scroll: true,
|
||||||
zIndex: 6000,
|
zIndex: 6000,
|
||||||
update: function (e, ui) {
|
update: function (e, ui) {
|
||||||
angularHelper.getCurrentForm($scope).$setDirty();
|
angularHelper.getCurrentForm($scope).$setDirty();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
if ($scope.model.config) {
|
if ($scope.model.config) {
|
||||||
//merge the server config on top of the default config, then set the server config to use the result
|
//merge the server config on top of the default config, then set the server config to use the result
|
||||||
$scope.model.config = angular.extend(defaultConfig, $scope.model.config);
|
$scope.model.config = angular.extend(defaultConfig, $scope.model.config);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Umbraco persists boolean for prevalues as "0" or "1" so we need to convert that!
|
//Umbraco persists boolean for prevalues as "0" or "1" so we need to convert that!
|
||||||
$scope.model.config.multiPicker = ($scope.model.config.multiPicker === "1" ? true : false);
|
$scope.model.config.multiPicker = ($scope.model.config.multiPicker === "1" ? true : false);
|
||||||
$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;
|
|
||||||
|
//the dialog options for the picker
|
||||||
//the dialog options for the picker
|
var dialogOptions = {
|
||||||
var dialogOptions = {
|
multiPicker: $scope.model.config.multiPicker,
|
||||||
multiPicker: $scope.model.config.multiPicker,
|
entityType: entityType,
|
||||||
entityType: entityType,
|
filterCssClass: "not-allowed not-published",
|
||||||
filterCssClass: "not-allowed not-published",
|
startNodeId: null,
|
||||||
startNodeId: null,
|
currentNode: editorState ? editorState.current : null,
|
||||||
currentNode: editorState ? editorState.current : null,
|
callback: function (data) {
|
||||||
callback: function (data) {
|
if (angular.isArray(data)) {
|
||||||
if (angular.isArray(data)) {
|
_.each(data, function (item, i) {
|
||||||
_.each(data, function (item, i) {
|
$scope.add(item);
|
||||||
$scope.add(item);
|
});
|
||||||
});
|
} else {
|
||||||
} else {
|
$scope.clear();
|
||||||
$scope.clear();
|
$scope.add(data);
|
||||||
$scope.add(data);
|
}
|
||||||
}
|
angularHelper.getCurrentForm($scope).$setDirty();
|
||||||
angularHelper.getCurrentForm($scope).$setDirty();
|
},
|
||||||
},
|
treeAlias: $scope.model.config.startNode.type,
|
||||||
treeAlias: $scope.model.config.startNode.type,
|
section: $scope.model.config.startNode.type,
|
||||||
section: $scope.model.config.startNode.type,
|
idType: "int"
|
||||||
idType: "int"
|
};
|
||||||
};
|
|
||||||
|
//since most of the pre-value config's are used in the dialog options (i.e. maxNumber, minNumber, etc...) we'll merge the
|
||||||
//since most of the pre-value config's are used in the dialog options (i.e. maxNumber, minNumber, etc...) we'll merge the
|
// pre-value config on to the dialog options
|
||||||
// pre-value config on to the dialog options
|
angular.extend(dialogOptions, $scope.model.config);
|
||||||
angular.extend(dialogOptions, $scope.model.config);
|
|
||||||
|
//We need to manually handle the filter for members here since the tree displayed is different and only contains
|
||||||
//We need to manually handle the filter for members here since the tree displayed is different and only contains
|
// searchable list views
|
||||||
// searchable list views
|
if (entityType === "Member") {
|
||||||
if (entityType === "Member") {
|
//first change the not allowed filter css class
|
||||||
//first change the not allowed filter css class
|
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;
|
}
|
||||||
}
|
if (!currFilter) {
|
||||||
if (!currFilter) {
|
return false;
|
||||||
return false;
|
}
|
||||||
}
|
//now we need to filter based on what is stored in the pre-vals, this logic duplicates what is in the treepicker.controller,
|
||||||
//now we need to filter based on what is stored in the pre-vals, this logic duplicates what is in the treepicker.controller,
|
// but not much we can do about that since members require special filtering.
|
||||||
// but not much we can do about that since members require special filtering.
|
var filterItem = currFilter.toLowerCase().split(',');
|
||||||
var filterItem = currFilter.toLowerCase().split(',');
|
var found = filterItem.indexOf(i.metaData.contentType.toLowerCase()) >= 0;
|
||||||
var found = filterItem.indexOf(i.metaData.contentType.toLowerCase()) >= 0;
|
if (!currFilter.startsWith("!") && !found || currFilter.startsWith("!") && found) {
|
||||||
if (!currFilter.startsWith("!") && !found || currFilter.startsWith("!") && found) {
|
return true;
|
||||||
return true;
|
}
|
||||||
}
|
|
||||||
|
return false;
|
||||||
return false;
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
if ($routeParams.section === "settings" && $routeParams.tree === "documentTypes") {
|
||||||
if ($routeParams.section === "settings" && $routeParams.tree === "documentTypes") {
|
//if the content-picker is being rendered inside the document-type editor, we don't need to process the startnode query
|
||||||
//if the content-picker is being rendered inside the document-type editor, we don't need to process the startnode query
|
dialogOptions.startNodeId = -1;
|
||||||
dialogOptions.startNodeId = -1;
|
} else if ($scope.model.config.startNode.query) {
|
||||||
} else if ($scope.model.config.startNode.query) {
|
//if we have a query for the startnode, we will use that.
|
||||||
//if we have a query for the startnode, we will use that.
|
var rootId = $routeParams.id;
|
||||||
var rootId = $routeParams.id;
|
entityResource.getByQuery($scope.model.config.startNode.query, rootId, "Document").then(function (ent) {
|
||||||
entityResource.getByQuery($scope.model.config.startNode.query, rootId, "Document").then(function (ent) {
|
dialogOptions.startNodeId = $scope.model.config.idType === "udi" ? ent.udi : ent.id;
|
||||||
dialogOptions.startNodeId = $scope.model.config.idType === "udi" ? ent.udi : ent.id;
|
});
|
||||||
});
|
}
|
||||||
}
|
else {
|
||||||
else {
|
dialogOptions.startNodeId = $scope.model.config.startNode.id;
|
||||||
dialogOptions.startNodeId = $scope.model.config.startNode.id;
|
}
|
||||||
}
|
|
||||||
|
//dialog
|
||||||
//dialog
|
$scope.openContentPicker = function () {
|
||||||
$scope.openContentPicker = function() {
|
|
||||||
$scope.contentPickerOverlay = dialogOptions;
|
$scope.contentPickerOverlay = dialogOptions;
|
||||||
$scope.contentPickerOverlay.view = "treepicker";
|
$scope.contentPickerOverlay.view = "treepicker";
|
||||||
$scope.contentPickerOverlay.show = true;
|
$scope.contentPickerOverlay.show = true;
|
||||||
|
$scope.contentPickerOverlay.dataTypeId = ($scope.model && $scope.model.dataTypeId) ? $scope.model.dataTypeId : null;
|
||||||
$scope.contentPickerOverlay.submit = function(model) {
|
|
||||||
|
$scope.contentPickerOverlay.submit = function (model) {
|
||||||
if (angular.isArray(model.selection)) {
|
|
||||||
_.each(model.selection, function (item, i) {
|
if (angular.isArray(model.selection)) {
|
||||||
$scope.add(item);
|
_.each(model.selection, function (item, i) {
|
||||||
});
|
$scope.add(item);
|
||||||
angularHelper.getCurrentForm($scope).$setDirty();
|
});
|
||||||
}
|
angularHelper.getCurrentForm($scope).$setDirty();
|
||||||
|
}
|
||||||
$scope.contentPickerOverlay.show = false;
|
|
||||||
$scope.contentPickerOverlay = null;
|
$scope.contentPickerOverlay.show = false;
|
||||||
}
|
$scope.contentPickerOverlay = null;
|
||||||
|
}
|
||||||
$scope.contentPickerOverlay.close = function(oldModel) {
|
|
||||||
$scope.contentPickerOverlay.show = false;
|
$scope.contentPickerOverlay.close = function (oldModel) {
|
||||||
$scope.contentPickerOverlay = null;
|
$scope.contentPickerOverlay.show = false;
|
||||||
}
|
$scope.contentPickerOverlay = null;
|
||||||
|
}
|
||||||
};
|
|
||||||
|
};
|
||||||
$scope.remove = function (index) {
|
|
||||||
$scope.renderModel.splice(index, 1);
|
$scope.remove = function (index) {
|
||||||
angularHelper.getCurrentForm($scope).$setDirty();
|
$scope.renderModel.splice(index, 1);
|
||||||
};
|
angularHelper.getCurrentForm($scope).$setDirty();
|
||||||
|
};
|
||||||
$scope.showNode = function (index) {
|
|
||||||
var item = $scope.renderModel[index];
|
$scope.showNode = function (index) {
|
||||||
var id = item.id;
|
var item = $scope.renderModel[index];
|
||||||
var section = $scope.model.config.startNode.type.toLowerCase();
|
var id = item.id;
|
||||||
|
var section = $scope.model.config.startNode.type.toLowerCase();
|
||||||
entityResource.getPath(id, entityType).then(function (path) {
|
|
||||||
navigationService.changeSection(section);
|
entityResource.getPath(id, entityType).then(function (path) {
|
||||||
navigationService.showTree(section, {
|
navigationService.changeSection(section);
|
||||||
tree: section, path: path, forceReload: false, activate: true
|
navigationService.showTree(section, {
|
||||||
});
|
tree: section, path: path, forceReload: false, activate: true
|
||||||
var routePath = section + "/" + section + "/edit/" + id.toString();
|
});
|
||||||
$location.path(routePath).search("");
|
var routePath = section + "/" + section + "/edit/" + id.toString();
|
||||||
});
|
$location.path(routePath).search("");
|
||||||
}
|
});
|
||||||
|
}
|
||||||
$scope.add = function (item) {
|
|
||||||
var currIds = _.map($scope.renderModel, function (i) {
|
$scope.add = function (item) {
|
||||||
return $scope.model.config.idType === "udi" ? i.udi : i.id;
|
var currIds = _.map($scope.renderModel, function (i) {
|
||||||
});
|
return $scope.model.config.idType === "udi" ? i.udi : i.id;
|
||||||
|
});
|
||||||
var itemId = $scope.model.config.idType === "udi" ? item.udi : item.id;
|
|
||||||
|
var itemId = $scope.model.config.idType === "udi" ? item.udi : item.id;
|
||||||
if (currIds.indexOf(itemId) < 0) {
|
|
||||||
setEntityUrl(item);
|
if (currIds.indexOf(itemId) < 0) {
|
||||||
}
|
setEntityUrl(item);
|
||||||
};
|
}
|
||||||
|
};
|
||||||
$scope.clear = function () {
|
|
||||||
$scope.renderModel = [];
|
$scope.clear = function () {
|
||||||
};
|
$scope.renderModel = [];
|
||||||
|
};
|
||||||
$scope.openMiniEditor = function(node) {
|
|
||||||
miniEditorHelper.launchMiniEditor(node).then(function(updatedNode){
|
$scope.openMiniEditor = function (node) {
|
||||||
// update the node
|
miniEditorHelper.launchMiniEditor(node).then(function (updatedNode) {
|
||||||
node.name = updatedNode.name;
|
// update the node
|
||||||
node.published = updatedNode.hasPublishedVersion;
|
node.name = updatedNode.name;
|
||||||
if(entityType !== "Member") {
|
node.published = updatedNode.hasPublishedVersion;
|
||||||
entityResource.getUrl(updatedNode.id, entityType).then(function(data){
|
if (entityType !== "Member") {
|
||||||
node.url = data;
|
entityResource.getUrl(updatedNode.id, entityType).then(function (data) {
|
||||||
});
|
node.url = data;
|
||||||
}
|
});
|
||||||
});
|
}
|
||||||
};
|
});
|
||||||
|
};
|
||||||
//when the scope is destroyed we need to unsubscribe
|
|
||||||
$scope.$on('$destroy', function () {
|
//when the scope is destroyed we need to unsubscribe
|
||||||
if(unsubscribe) {
|
$scope.$on('$destroy', function () {
|
||||||
unsubscribe();
|
if (unsubscribe) {
|
||||||
}
|
unsubscribe();
|
||||||
});
|
}
|
||||||
|
});
|
||||||
var modelIds = $scope.model.value ? $scope.model.value.split(',') : [];
|
|
||||||
|
var modelIds = $scope.model.value ? $scope.model.value.split(',') : [];
|
||||||
//load current data if anything selected
|
|
||||||
if (modelIds.length > 0) {
|
//load current data if anything selected
|
||||||
entityResource.getByIds(modelIds, entityType).then(function(data) {
|
if (modelIds.length > 0) {
|
||||||
|
entityResource.getByIds(modelIds, entityType).then(function (data) {
|
||||||
_.each(modelIds,
|
|
||||||
function(id, i) {
|
_.each(modelIds,
|
||||||
var entity = _.find(data,
|
function (id, i) {
|
||||||
function(d) {
|
var entity = _.find(data,
|
||||||
return $scope.model.config.idType === "udi" ? (d.udi == id) : (d.id == id);
|
function (d) {
|
||||||
});
|
return $scope.model.config.idType === "udi" ? (d.udi == id) : (d.id == id);
|
||||||
|
});
|
||||||
if (entity) {
|
|
||||||
setEntityUrl(entity);
|
if (entity) {
|
||||||
}
|
setEntityUrl(entity);
|
||||||
|
}
|
||||||
});
|
|
||||||
|
});
|
||||||
//everything is loaded, start the watch on the model
|
|
||||||
startWatch();
|
//everything is loaded, start the watch on the model
|
||||||
subscribe();
|
startWatch();
|
||||||
});
|
subscribe();
|
||||||
}
|
});
|
||||||
else {
|
}
|
||||||
//everything is loaded, start the watch on the model
|
else {
|
||||||
startWatch();
|
//everything is loaded, start the watch on the model
|
||||||
subscribe();
|
startWatch();
|
||||||
}
|
subscribe();
|
||||||
|
}
|
||||||
function setEntityUrl(entity) {
|
|
||||||
|
function setEntityUrl(entity) {
|
||||||
// get url for content and media items
|
|
||||||
if(entityType !== "Member") {
|
// get url for content and media items
|
||||||
entityResource.getUrl(entity.id, entityType).then(function(data){
|
if (entityType !== "Member") {
|
||||||
// update url
|
entityResource.getUrl(entity.id, entityType).then(function (data) {
|
||||||
angular.forEach($scope.renderModel, function(item){
|
// update url
|
||||||
if (item.id === entity.id) {
|
angular.forEach($scope.renderModel, function (item) {
|
||||||
if (entity.trashed) {
|
if (item.id === entity.id) {
|
||||||
item.url = localizationService.dictionary.general_recycleBin;
|
if (entity.trashed) {
|
||||||
} else {
|
item.url = localizationService.dictionary.general_recycleBin;
|
||||||
item.url = data;
|
} else {
|
||||||
}
|
item.url = data;
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
});
|
});
|
||||||
}
|
});
|
||||||
|
}
|
||||||
// add the selected item to the renderModel
|
|
||||||
// if it needs to show a url the item will get
|
// add the selected item to the renderModel
|
||||||
// updated when the url comes back from server
|
// if it needs to show a url the item will get
|
||||||
addSelectedItem(entity);
|
// updated when the url comes back from server
|
||||||
|
addSelectedItem(entity);
|
||||||
}
|
|
||||||
|
}
|
||||||
function addSelectedItem(item) {
|
|
||||||
|
function addSelectedItem(item) {
|
||||||
// set icon
|
|
||||||
if(item.icon) {
|
// set icon
|
||||||
item.icon = iconHelper.convertFromLegacyIcon(item.icon);
|
if (item.icon) {
|
||||||
}
|
item.icon = iconHelper.convertFromLegacyIcon(item.icon);
|
||||||
|
}
|
||||||
// set default icon
|
|
||||||
if (!item.icon) {
|
// set default icon
|
||||||
switch (entityType) {
|
if (!item.icon) {
|
||||||
case "Document":
|
switch (entityType) {
|
||||||
item.icon = "icon-document";
|
case "Document":
|
||||||
break;
|
item.icon = "icon-document";
|
||||||
case "Media":
|
break;
|
||||||
item.icon = "icon-picture";
|
case "Media":
|
||||||
break;
|
item.icon = "icon-picture";
|
||||||
case "Member":
|
break;
|
||||||
item.icon = "icon-user";
|
case "Member":
|
||||||
break;
|
item.icon = "icon-user";
|
||||||
}
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
$scope.renderModel.push({
|
|
||||||
"name": item.name,
|
$scope.renderModel.push({
|
||||||
"id": item.id,
|
"name": item.name,
|
||||||
"udi": item.udi,
|
"id": item.id,
|
||||||
"icon": item.icon,
|
"udi": item.udi,
|
||||||
"path": item.path,
|
"icon": item.icon,
|
||||||
"url": item.url,
|
"path": item.path,
|
||||||
"trashed": item.trashed,
|
"url": item.url,
|
||||||
"published": (item.metaData && item.metaData.IsPublished === false && entityType === "Document") ? false : true
|
"trashed": item.trashed,
|
||||||
// only content supports published/unpublished content so we set everything else to published so the UI looks correct
|
"published": (item.metaData && item.metaData.IsPublished === false && entityType === "Document") ? false : true
|
||||||
});
|
// only content supports published/unpublished content so we set everything else to published so the UI looks correct
|
||||||
|
});
|
||||||
}
|
|
||||||
|
}
|
||||||
function setSortingState(items) {
|
|
||||||
// disable sorting if the list only consist of one item
|
function setSortingState(items) {
|
||||||
if(items.length > 1) {
|
// disable sorting if the list only consist of one item
|
||||||
$scope.sortableOptions.disabled = false;
|
if (items.length > 1) {
|
||||||
} else {
|
$scope.sortableOptions.disabled = false;
|
||||||
$scope.sortableOptions.disabled = true;
|
} else {
|
||||||
}
|
$scope.sortableOptions.disabled = true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
|
||||||
|
}
|
||||||
angular.module('umbraco').controller("Umbraco.PropertyEditors.ContentPickerController", contentPickerController);
|
|
||||||
|
angular.module('umbraco').controller("Umbraco.PropertyEditors.ContentPickerController", contentPickerController);
|
||||||
|
|||||||
+6
-7
@@ -1,11 +1,9 @@
|
|||||||
angular.module("umbraco")
|
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;
|
||||||
|
|||||||
+24
-18
@@ -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;
|
||||||
}
|
}
|
||||||
@@ -40,10 +46,10 @@
|
|||||||
vm.mediaPickerOverlay = {
|
vm.mediaPickerOverlay = {
|
||||||
currentTarget: currentTarget,
|
currentTarget: currentTarget,
|
||||||
onlyImages: true,
|
onlyImages: true,
|
||||||
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) {
|
||||||
|
|||||||
+185
-184
@@ -1,184 +1,185 @@
|
|||||||
//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) {
|
|
||||||
$scope.model.config.startNodeId = -1;
|
if ( $scope.model.config.ignoreUserStartNodes === "1") {
|
||||||
$scope.model.config.startNodeIsVirtual = true;
|
$scope.model.config.startNodeId = -1;
|
||||||
|
$scope.model.config.startNodeIsVirtual = true;
|
||||||
} else {
|
|
||||||
userService.getCurrentUser().then(function (userData) {
|
} else {
|
||||||
$scope.model.config.startNodeId = userData.startMediaIds.length !== 1 ? -1 : userData.startMediaIds[0];
|
userService.getCurrentUser().then(function (userData) {
|
||||||
$scope.model.config.startNodeIsVirtual = userData.startMediaIds.length !== 1;
|
$scope.model.config.startNodeId = userData.startMediaIds.length !== 1 ? -1 : userData.startMediaIds[0];
|
||||||
});
|
$scope.model.config.startNodeIsVirtual = userData.startMediaIds.length !== 1;
|
||||||
}
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
function setupViewModel() {
|
|
||||||
$scope.mediaItems = [];
|
function setupViewModel() {
|
||||||
$scope.ids = [];
|
$scope.mediaItems = [];
|
||||||
|
$scope.ids = [];
|
||||||
$scope.isMultiPicker = multiPicker;
|
|
||||||
|
$scope.isMultiPicker = multiPicker;
|
||||||
if ($scope.model.value) {
|
|
||||||
var ids = $scope.model.value.split(',');
|
if ($scope.model.value) {
|
||||||
|
var ids = $scope.model.value.split(',');
|
||||||
//NOTE: We need to use the entityResource NOT the mediaResource here because
|
|
||||||
// the mediaResource has server side auth configured for which the user must have
|
//NOTE: We need to use the entityResource NOT the mediaResource here because
|
||||||
// access to the media section, if they don't they'll get auth errors. The entityResource
|
// the mediaResource has server side auth configured for which the user must have
|
||||||
// acts differently in that it allows access if the user has access to any of the apps that
|
// access to the media section, if they don't they'll get auth errors. The entityResource
|
||||||
// might require it's use. Therefore we need to use the metaData property to get at the thumbnail
|
// acts differently in that it allows access if the user has access to any of the apps that
|
||||||
// value.
|
// might require it's use. Therefore we need to use the metaData property to get at the thumbnail
|
||||||
|
// value.
|
||||||
entityResource.getByIds(ids, "Media").then(function(medias) {
|
|
||||||
|
entityResource.getByIds(ids, "Media").then(function(medias) {
|
||||||
// The service only returns item results for ids that exist (deleted items are silently ignored).
|
|
||||||
// This results in the picked items value to be set to contain only ids of picked items that could actually be found.
|
// The service only returns item results for ids that exist (deleted items are silently ignored).
|
||||||
// Since a referenced item could potentially be restored later on, instead of changing the selected values here based
|
// This results in the picked items value to be set to contain only ids of picked items that could actually be found.
|
||||||
// on whether the items exist during a save event - we should keep "placeholder" items for picked items that currently
|
// Since a referenced item could potentially be restored later on, instead of changing the selected values here based
|
||||||
// could not be fetched. This will preserve references and ensure that the state of an item does not differ depending
|
// on whether the items exist during a save event - we should keep "placeholder" items for picked items that currently
|
||||||
// on whether it is simply resaved or not.
|
// could not be fetched. This will preserve references and ensure that the state of an item does not differ depending
|
||||||
// This is done by remapping the int/guid ids into a new array of items, where we create "Deleted item" placeholders
|
// on whether it is simply resaved or not.
|
||||||
// when there is no match for a selected id. This will ensure that the values being set on save, are the same as before.
|
// This is done by remapping the int/guid ids into a new array of items, where we create "Deleted item" placeholders
|
||||||
|
// when there is no match for a selected id. This will ensure that the values being set on save, are the same as before.
|
||||||
medias = _.map(ids,
|
|
||||||
function(id) {
|
medias = _.map(ids,
|
||||||
var found = _.find(medias,
|
function(id) {
|
||||||
function(m) {
|
var found = _.find(medias,
|
||||||
// We could use coercion (two ='s) here .. but not sure if this works equally well in all browsers and
|
function(m) {
|
||||||
// it's prone to someone "fixing" it at some point without knowing the effects. Rather use toString()
|
// We could use coercion (two ='s) here .. but not sure if this works equally well in all browsers and
|
||||||
// compares and be completely sure it works.
|
// it's prone to someone "fixing" it at some point without knowing the effects. Rather use toString()
|
||||||
return m.udi.toString() === id.toString() || m.id.toString() === id.toString();
|
// compares and be completely sure it works.
|
||||||
});
|
return m.udi.toString() === id.toString() || m.id.toString() === id.toString();
|
||||||
if (found) {
|
});
|
||||||
return found;
|
if (found) {
|
||||||
} else {
|
return found;
|
||||||
return {
|
} else {
|
||||||
name: localizationService.dictionary.mediaPicker_deletedItem,
|
return {
|
||||||
id: $scope.model.config.idType !== "udi" ? id : null,
|
name: localizationService.dictionary.mediaPicker_deletedItem,
|
||||||
udi: $scope.model.config.idType === "udi" ? id : null,
|
id: $scope.model.config.idType !== "udi" ? id : null,
|
||||||
icon: "icon-picture",
|
udi: $scope.model.config.idType === "udi" ? id : null,
|
||||||
thumbnail: null,
|
icon: "icon-picture",
|
||||||
trashed: true
|
thumbnail: null,
|
||||||
};
|
trashed: true
|
||||||
}
|
};
|
||||||
});
|
}
|
||||||
|
});
|
||||||
_.each(medias,
|
|
||||||
function(media, i) {
|
_.each(medias,
|
||||||
// if there is no thumbnail, try getting one if the media is not a placeholder item
|
function(media, i) {
|
||||||
if (!media.thumbnail && media.id && media.metaData) {
|
// if there is no thumbnail, try getting one if the media is not a placeholder item
|
||||||
media.thumbnail = mediaHelper.resolveFileFromEntity(media, true);
|
if (!media.thumbnail && media.id && media.metaData) {
|
||||||
}
|
media.thumbnail = mediaHelper.resolveFileFromEntity(media, true);
|
||||||
|
}
|
||||||
$scope.mediaItems.push(media);
|
|
||||||
|
$scope.mediaItems.push(media);
|
||||||
if ($scope.model.config.idType === "udi") {
|
|
||||||
$scope.ids.push(media.udi);
|
if ($scope.model.config.idType === "udi") {
|
||||||
} else {
|
$scope.ids.push(media.udi);
|
||||||
$scope.ids.push(media.id);
|
} else {
|
||||||
}
|
$scope.ids.push(media.id);
|
||||||
});
|
}
|
||||||
|
});
|
||||||
$scope.sync();
|
|
||||||
});
|
$scope.sync();
|
||||||
}
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
setupViewModel();
|
|
||||||
|
setupViewModel();
|
||||||
$scope.remove = function(index) {
|
|
||||||
$scope.mediaItems.splice(index, 1);
|
$scope.remove = function(index) {
|
||||||
$scope.ids.splice(index, 1);
|
$scope.mediaItems.splice(index, 1);
|
||||||
$scope.sync();
|
$scope.ids.splice(index, 1);
|
||||||
};
|
$scope.sync();
|
||||||
|
};
|
||||||
$scope.goToItem = function(item) {
|
|
||||||
$location.path('media/media/edit/' + item.id);
|
$scope.goToItem = function(item) {
|
||||||
};
|
$location.path('media/media/edit/' + item.id);
|
||||||
|
};
|
||||||
$scope.add = function() {
|
|
||||||
|
$scope.add = function() {
|
||||||
$scope.mediaPickerOverlay = {
|
|
||||||
view: "mediapicker",
|
$scope.mediaPickerOverlay = {
|
||||||
title: "Select media",
|
view: "mediapicker",
|
||||||
startNodeId: $scope.model.config.startNodeId,
|
title: "Select media",
|
||||||
startNodeIsVirtual: $scope.model.config.startNodeIsVirtual,
|
startNodeId: $scope.model.config.startNodeId,
|
||||||
ignoreUserStartNodes: ignoreUserStartNodes,
|
startNodeIsVirtual: $scope.model.config.startNodeIsVirtual,
|
||||||
multiPicker: multiPicker,
|
dataTypeId: ($scope.model && $scope.model.dataTypeId) ? $scope.model.dataTypeId : null,
|
||||||
onlyImages: onlyImages,
|
multiPicker: multiPicker,
|
||||||
disableFolderSelect: disableFolderSelect,
|
onlyImages: onlyImages,
|
||||||
show: true,
|
disableFolderSelect: disableFolderSelect,
|
||||||
submit: function(model) {
|
show: true,
|
||||||
|
submit: function(model) {
|
||||||
_.each(model.selectedImages, function(media, i) {
|
|
||||||
// if there is no thumbnail, try getting one if the media is not a placeholder item
|
_.each(model.selectedImages, function(media, i) {
|
||||||
if (!media.thumbnail && media.id && media.metaData) {
|
// if there is no thumbnail, try getting one if the media is not a placeholder item
|
||||||
media.thumbnail = mediaHelper.resolveFileFromEntity(media, true);
|
if (!media.thumbnail && media.id && media.metaData) {
|
||||||
}
|
media.thumbnail = mediaHelper.resolveFileFromEntity(media, true);
|
||||||
|
}
|
||||||
$scope.mediaItems.push(media);
|
|
||||||
|
$scope.mediaItems.push(media);
|
||||||
if ($scope.model.config.idType === "udi") {
|
|
||||||
$scope.ids.push(media.udi);
|
if ($scope.model.config.idType === "udi") {
|
||||||
}
|
$scope.ids.push(media.udi);
|
||||||
else {
|
}
|
||||||
$scope.ids.push(media.id);
|
else {
|
||||||
}
|
$scope.ids.push(media.id);
|
||||||
});
|
}
|
||||||
|
});
|
||||||
$scope.sync();
|
|
||||||
|
$scope.sync();
|
||||||
$scope.mediaPickerOverlay.show = false;
|
|
||||||
$scope.mediaPickerOverlay = null;
|
$scope.mediaPickerOverlay.show = false;
|
||||||
}
|
$scope.mediaPickerOverlay = null;
|
||||||
};
|
}
|
||||||
};
|
};
|
||||||
|
};
|
||||||
$scope.sortableOptions = {
|
|
||||||
disabled: !$scope.isMultiPicker,
|
$scope.sortableOptions = {
|
||||||
items: "li:not(.add-wrapper)",
|
disabled: !$scope.isMultiPicker,
|
||||||
cancel: ".unsortable",
|
items: "li:not(.add-wrapper)",
|
||||||
update: function(e, ui) {
|
cancel: ".unsortable",
|
||||||
var r = [];
|
update: function(e, ui) {
|
||||||
// TODO: Instead of doing this with a half second delay would be better to use a watch like we do in the
|
var r = [];
|
||||||
// content picker. Then we don't have to worry about setting ids, render models, models, we just set one and let the
|
// TODO: Instead of doing this with a half second delay would be better to use a watch like we do in the
|
||||||
// watch do all the rest.
|
// content picker. Then we don't have to worry about setting ids, render models, models, we just set one and let the
|
||||||
$timeout(function(){
|
// watch do all the rest.
|
||||||
angular.forEach($scope.mediaItems, function(value, key) {
|
$timeout(function(){
|
||||||
r.push($scope.model.config.idType === "udi" ? value.udi : value.id);
|
angular.forEach($scope.mediaItems, function(value, key) {
|
||||||
});
|
r.push($scope.model.config.idType === "udi" ? value.udi : value.id);
|
||||||
$scope.ids = r;
|
});
|
||||||
$scope.sync();
|
$scope.ids = r;
|
||||||
}, 500, false);
|
$scope.sync();
|
||||||
}
|
}, 500, false);
|
||||||
};
|
}
|
||||||
|
};
|
||||||
$scope.sync = function() {
|
|
||||||
$scope.model.value = $scope.ids.join();
|
$scope.sync = function() {
|
||||||
};
|
$scope.model.value = $scope.ids.join();
|
||||||
|
};
|
||||||
$scope.showAdd = function () {
|
|
||||||
if (!multiPicker) {
|
$scope.showAdd = function () {
|
||||||
if ($scope.model.value && $scope.model.value !== "") {
|
if (!multiPicker) {
|
||||||
return false;
|
if ($scope.model.value && $scope.model.value !== "") {
|
||||||
}
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
}
|
||||||
};
|
return true;
|
||||||
|
};
|
||||||
//here we declare a special method which will be called whenever the value has changed from the server
|
|
||||||
//this is instead of doing a watch on the model.value = faster
|
//here we declare a special method which will be called whenever the value has changed from the server
|
||||||
$scope.model.onValueChanged = function (newVal, oldVal) {
|
//this is instead of doing a watch on the model.value = faster
|
||||||
//update the display val again if it has changed from the server
|
$scope.model.onValueChanged = function (newVal, oldVal) {
|
||||||
setupViewModel();
|
//update the display val again if it has changed from the server
|
||||||
};
|
setupViewModel();
|
||||||
});
|
};
|
||||||
|
});
|
||||||
|
|||||||
+3
-2
@@ -67,11 +67,12 @@ function multiUrlPickerController($scope, angularHelper, localizationService, en
|
|||||||
url: link.url,
|
url: link.url,
|
||||||
target: link.target
|
target: link.target
|
||||||
} : null;
|
} : null;
|
||||||
|
|
||||||
$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) {
|
||||||
|
|||||||
+246
-242
@@ -1,242 +1,246 @@
|
|||||||
angular.module("umbraco")
|
angular.module("umbraco")
|
||||||
.controller("Umbraco.PropertyEditors.RelatedLinksController",
|
.controller("Umbraco.PropertyEditors.RelatedLinksController",
|
||||||
function ($rootScope, $scope, dialogService, iconHelper) {
|
function ($rootScope, $scope, dialogService, iconHelper) {
|
||||||
|
|
||||||
if (!$scope.model.value) {
|
if (!$scope.model.value) {
|
||||||
$scope.model.value = [];
|
$scope.model.value = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.model.config.max = isNumeric($scope.model.config.max) && $scope.model.config.max !== 0 ? $scope.model.config.max : Number.MAX_VALUE;
|
$scope.model.config.max = isNumeric($scope.model.config.max) && $scope.model.config.max !== 0 ? $scope.model.config.max : Number.MAX_VALUE;
|
||||||
|
|
||||||
$scope.newCaption = '';
|
$scope.newCaption = '';
|
||||||
$scope.newLink = 'http://';
|
$scope.newLink = 'http://';
|
||||||
$scope.newNewWindow = false;
|
$scope.newNewWindow = false;
|
||||||
$scope.newInternal = null;
|
$scope.newInternal = null;
|
||||||
$scope.newInternalName = '';
|
$scope.newInternalName = '';
|
||||||
$scope.newInternalIcon = null;
|
$scope.newInternalIcon = null;
|
||||||
$scope.addExternal = true;
|
$scope.addExternal = true;
|
||||||
$scope.currentEditLink = null;
|
$scope.currentEditLink = null;
|
||||||
$scope.hasError = false;
|
$scope.hasError = false;
|
||||||
|
|
||||||
$scope.internal = function($event) {
|
var dataTypeId = ($scope.model && $scope.model.dataTypeId) ? $scope.model.dataTypeId : null;
|
||||||
$scope.currentEditLink = null;
|
|
||||||
|
$scope.internal = function($event) {
|
||||||
$scope.contentPickerOverlay = {};
|
|
||||||
$scope.contentPickerOverlay.view = "contentpicker";
|
$scope.currentEditLink = null;
|
||||||
$scope.contentPickerOverlay.multiPicker = false;
|
|
||||||
$scope.contentPickerOverlay.show = true;
|
$scope.contentPickerOverlay = {};
|
||||||
$scope.contentPickerOverlay.ignoreUserStartNodes = $scope.model.config.ignoreUserStartNodes === "1" ? true: false;
|
$scope.contentPickerOverlay.view = "contentpicker";
|
||||||
$scope.contentPickerOverlay.idType = $scope.model.config.idType ? $scope.model.config.idType : "int";
|
$scope.contentPickerOverlay.multiPicker = false;
|
||||||
|
$scope.contentPickerOverlay.show = true;
|
||||||
$scope.contentPickerOverlay.submit = function(model) {
|
$scope.contentPickerOverlay.dataTypeId = dataTypeId;
|
||||||
|
$scope.contentPickerOverlay.idType = $scope.model.config.idType ? $scope.model.config.idType : "int";
|
||||||
select(model.selection[0]);
|
|
||||||
|
$scope.contentPickerOverlay.submit = function(model) {
|
||||||
$scope.contentPickerOverlay.show = false;
|
|
||||||
$scope.contentPickerOverlay = null;
|
select(model.selection[0]);
|
||||||
};
|
|
||||||
|
$scope.contentPickerOverlay.show = false;
|
||||||
$scope.contentPickerOverlay.close = function(oldModel) {
|
$scope.contentPickerOverlay = null;
|
||||||
$scope.contentPickerOverlay.show = false;
|
};
|
||||||
$scope.contentPickerOverlay = null;
|
|
||||||
};
|
$scope.contentPickerOverlay.close = function(oldModel) {
|
||||||
|
$scope.contentPickerOverlay.show = false;
|
||||||
$event.preventDefault();
|
$scope.contentPickerOverlay = null;
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.selectInternal = function ($event, link) {
|
$event.preventDefault();
|
||||||
$scope.currentEditLink = link;
|
};
|
||||||
|
|
||||||
$scope.contentPickerOverlay = {};
|
$scope.selectInternal = function ($event, link) {
|
||||||
$scope.contentPickerOverlay.view = "contentpicker";
|
|
||||||
$scope.contentPickerOverlay.multiPicker = false;
|
$scope.currentEditLink = link;
|
||||||
$scope.contentPickerOverlay.show = true;
|
|
||||||
$scope.contentPickerOverlay.ignoreUserStartNodes = $scope.model.config.ignoreUserStartNodes === "1" ? true : false;
|
$scope.contentPickerOverlay = {};
|
||||||
$scope.contentPickerOverlay.idType = $scope.model.config.idType ? $scope.model.config.idType : "int";
|
$scope.contentPickerOverlay.view = "contentpicker";
|
||||||
|
$scope.contentPickerOverlay.multiPicker = false;
|
||||||
$scope.contentPickerOverlay.submit = function(model) {
|
$scope.contentPickerOverlay.show = true;
|
||||||
|
$scope.contentPickerOverlay.dataTypeId = dataTypeId;
|
||||||
select(model.selection[0]);
|
$scope.contentPickerOverlay.idType = $scope.model.config.idType ? $scope.model.config.idType : "int";
|
||||||
|
|
||||||
$scope.contentPickerOverlay.show = false;
|
$scope.contentPickerOverlay.submit = function(model) {
|
||||||
$scope.contentPickerOverlay = null;
|
|
||||||
};
|
select(model.selection[0]);
|
||||||
|
|
||||||
$scope.contentPickerOverlay.close = function(oldModel) {
|
$scope.contentPickerOverlay.show = false;
|
||||||
$scope.contentPickerOverlay.show = false;
|
$scope.contentPickerOverlay = null;
|
||||||
$scope.contentPickerOverlay = null;
|
};
|
||||||
};
|
|
||||||
|
$scope.contentPickerOverlay.close = function(oldModel) {
|
||||||
$event.preventDefault();
|
$scope.contentPickerOverlay.show = false;
|
||||||
|
$scope.contentPickerOverlay = null;
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.edit = function (idx) {
|
$event.preventDefault();
|
||||||
for (var i = 0; i < $scope.model.value.length; i++) {
|
|
||||||
$scope.model.value[i].edit = false;
|
};
|
||||||
}
|
|
||||||
$scope.model.value[idx].edit = true;
|
$scope.edit = function (idx) {
|
||||||
};
|
for (var i = 0; i < $scope.model.value.length; i++) {
|
||||||
|
$scope.model.value[i].edit = false;
|
||||||
$scope.saveEdit = function (idx) {
|
}
|
||||||
$scope.model.value[idx].title = $scope.model.value[idx].caption;
|
$scope.model.value[idx].edit = true;
|
||||||
$scope.model.value[idx].edit = false;
|
};
|
||||||
};
|
|
||||||
|
$scope.saveEdit = function (idx) {
|
||||||
$scope.delete = function (idx) {
|
$scope.model.value[idx].title = $scope.model.value[idx].caption;
|
||||||
$scope.model.value.splice(idx, 1);
|
$scope.model.value[idx].edit = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.add = function ($event) {
|
$scope.delete = function (idx) {
|
||||||
if (!angular.isArray($scope.model.value)) {
|
$scope.model.value.splice(idx, 1);
|
||||||
$scope.model.value = [];
|
};
|
||||||
}
|
|
||||||
|
$scope.add = function ($event) {
|
||||||
if ($scope.newCaption == "") {
|
if (!angular.isArray($scope.model.value)) {
|
||||||
$scope.hasError = true;
|
$scope.model.value = [];
|
||||||
} else {
|
}
|
||||||
if ($scope.addExternal) {
|
|
||||||
var newExtLink = new function() {
|
if ($scope.newCaption == "") {
|
||||||
this.caption = $scope.newCaption;
|
$scope.hasError = true;
|
||||||
this.link = $scope.newLink;
|
} else {
|
||||||
this.newWindow = $scope.newNewWindow;
|
if ($scope.addExternal) {
|
||||||
this.edit = false;
|
var newExtLink = new function() {
|
||||||
this.isInternal = false;
|
this.caption = $scope.newCaption;
|
||||||
this.type = "external";
|
this.link = $scope.newLink;
|
||||||
this.title = $scope.newCaption;
|
this.newWindow = $scope.newNewWindow;
|
||||||
};
|
this.edit = false;
|
||||||
$scope.model.value.push(newExtLink);
|
this.isInternal = false;
|
||||||
} else {
|
this.type = "external";
|
||||||
var newIntLink = new function() {
|
this.title = $scope.newCaption;
|
||||||
this.caption = $scope.newCaption;
|
};
|
||||||
this.link = $scope.newInternal;
|
$scope.model.value.push(newExtLink);
|
||||||
this.newWindow = $scope.newNewWindow;
|
} else {
|
||||||
this.internal = $scope.newInternal;
|
var newIntLink = new function() {
|
||||||
this.edit = false;
|
this.caption = $scope.newCaption;
|
||||||
this.isInternal = true;
|
this.link = $scope.newInternal;
|
||||||
this.internalName = $scope.newInternalName;
|
this.newWindow = $scope.newNewWindow;
|
||||||
this.internalIcon = $scope.newInternalIcon;
|
this.internal = $scope.newInternal;
|
||||||
this.type = "internal";
|
this.edit = false;
|
||||||
this.title = $scope.newCaption;
|
this.isInternal = true;
|
||||||
};
|
this.internalName = $scope.newInternalName;
|
||||||
$scope.model.value.push(newIntLink);
|
this.internalIcon = $scope.newInternalIcon;
|
||||||
}
|
this.type = "internal";
|
||||||
$scope.newCaption = '';
|
this.title = $scope.newCaption;
|
||||||
$scope.newLink = 'http://';
|
};
|
||||||
$scope.newNewWindow = false;
|
$scope.model.value.push(newIntLink);
|
||||||
$scope.newInternal = null;
|
}
|
||||||
$scope.newInternalName = '';
|
$scope.newCaption = '';
|
||||||
$scope.newInternalIcon = null;
|
$scope.newLink = 'http://';
|
||||||
}
|
$scope.newNewWindow = false;
|
||||||
$event.preventDefault();
|
$scope.newInternal = null;
|
||||||
};
|
$scope.newInternalName = '';
|
||||||
|
$scope.newInternalIcon = null;
|
||||||
$scope.switch = function ($event) {
|
}
|
||||||
$scope.addExternal = !$scope.addExternal;
|
$event.preventDefault();
|
||||||
$event.preventDefault();
|
};
|
||||||
};
|
|
||||||
|
$scope.switch = function ($event) {
|
||||||
$scope.switchLinkType = function ($event, link) {
|
$scope.addExternal = !$scope.addExternal;
|
||||||
link.isInternal = !link.isInternal;
|
$event.preventDefault();
|
||||||
link.type = link.isInternal ? "internal" : "external";
|
};
|
||||||
if (!link.isInternal)
|
|
||||||
link.link = $scope.newLink;
|
$scope.switchLinkType = function ($event, link) {
|
||||||
$event.preventDefault();
|
link.isInternal = !link.isInternal;
|
||||||
};
|
link.type = link.isInternal ? "internal" : "external";
|
||||||
|
if (!link.isInternal)
|
||||||
$scope.move = function (index, direction) {
|
link.link = $scope.newLink;
|
||||||
var temp = $scope.model.value[index];
|
$event.preventDefault();
|
||||||
$scope.model.value[index] = $scope.model.value[index + direction];
|
};
|
||||||
$scope.model.value[index + direction] = temp;
|
|
||||||
};
|
$scope.move = function (index, direction) {
|
||||||
|
var temp = $scope.model.value[index];
|
||||||
//helper for determining if a user can add items
|
$scope.model.value[index] = $scope.model.value[index + direction];
|
||||||
$scope.canAdd = function () {
|
$scope.model.value[index + direction] = temp;
|
||||||
return $scope.model.config.max <= 0 || $scope.model.config.max > countVisible();
|
};
|
||||||
}
|
|
||||||
|
//helper for determining if a user can add items
|
||||||
//helper that returns if an item can be sorted
|
$scope.canAdd = function () {
|
||||||
$scope.canSort = function () {
|
return $scope.model.config.max <= 0 || $scope.model.config.max > countVisible();
|
||||||
return countVisible() > 1;
|
}
|
||||||
}
|
|
||||||
|
//helper that returns if an item can be sorted
|
||||||
$scope.sortableOptions = {
|
$scope.canSort = function () {
|
||||||
axis: 'y',
|
return countVisible() > 1;
|
||||||
handle: '.handle',
|
}
|
||||||
cursor: 'move',
|
|
||||||
cancel: '.no-drag',
|
$scope.sortableOptions = {
|
||||||
containment: 'parent',
|
axis: 'y',
|
||||||
placeholder: 'sortable-placeholder',
|
handle: '.handle',
|
||||||
forcePlaceholderSize: true,
|
cursor: 'move',
|
||||||
helper: function (e, ui) {
|
cancel: '.no-drag',
|
||||||
// When sorting table rows, the cells collapse. This helper fixes that: https://www.foliotek.com/devblog/make-table-rows-sortable-using-jquery-ui-sortable/
|
containment: 'parent',
|
||||||
ui.children().each(function () {
|
placeholder: 'sortable-placeholder',
|
||||||
$(this).width($(this).width());
|
forcePlaceholderSize: true,
|
||||||
});
|
helper: function (e, ui) {
|
||||||
return ui;
|
// When sorting table rows, the cells collapse. This helper fixes that: https://www.foliotek.com/devblog/make-table-rows-sortable-using-jquery-ui-sortable/
|
||||||
},
|
ui.children().each(function () {
|
||||||
items: '> tr:not(.unsortable)',
|
$(this).width($(this).width());
|
||||||
tolerance: 'pointer',
|
});
|
||||||
update: function (e, ui) {
|
return ui;
|
||||||
// Get the new and old index for the moved element (using the URL as the identifier)
|
},
|
||||||
var newIndex = ui.item.index();
|
items: '> tr:not(.unsortable)',
|
||||||
var movedLinkUrl = ui.item.attr('data-link');
|
tolerance: 'pointer',
|
||||||
var originalIndex = getElementIndexByUrl(movedLinkUrl);
|
update: function (e, ui) {
|
||||||
|
// Get the new and old index for the moved element (using the URL as the identifier)
|
||||||
// Move the element in the model
|
var newIndex = ui.item.index();
|
||||||
var movedElement = $scope.model.value[originalIndex];
|
var movedLinkUrl = ui.item.attr('data-link');
|
||||||
$scope.model.value.splice(originalIndex, 1);
|
var originalIndex = getElementIndexByUrl(movedLinkUrl);
|
||||||
$scope.model.value.splice(newIndex, 0, movedElement);
|
|
||||||
},
|
// Move the element in the model
|
||||||
start: function (e, ui) {
|
var movedElement = $scope.model.value[originalIndex];
|
||||||
//ui.placeholder.html("<td colspan='5'></td>");
|
$scope.model.value.splice(originalIndex, 1);
|
||||||
|
$scope.model.value.splice(newIndex, 0, movedElement);
|
||||||
// Build a placeholder cell that spans all the cells in the row: https://stackoverflow.com/questions/25845310/jquery-ui-sortable-and-table-cell-size
|
},
|
||||||
var cellCount = 0;
|
start: function (e, ui) {
|
||||||
$('td, th', ui.helper).each(function () {
|
//ui.placeholder.html("<td colspan='5'></td>");
|
||||||
// For each td or th try and get it's colspan attribute, and add that or 1 to the total
|
|
||||||
var colspan = 1;
|
// Build a placeholder cell that spans all the cells in the row: https://stackoverflow.com/questions/25845310/jquery-ui-sortable-and-table-cell-size
|
||||||
var colspanAttr = $(this).attr('colspan');
|
var cellCount = 0;
|
||||||
if (colspanAttr > 1) {
|
$('td, th', ui.helper).each(function () {
|
||||||
colspan = colspanAttr;
|
// For each td or th try and get it's colspan attribute, and add that or 1 to the total
|
||||||
}
|
var colspan = 1;
|
||||||
cellCount += colspan;
|
var colspanAttr = $(this).attr('colspan');
|
||||||
});
|
if (colspanAttr > 1) {
|
||||||
|
colspan = colspanAttr;
|
||||||
// Add the placeholder UI - note that this is the item's content, so td rather than tr - and set height of tr
|
}
|
||||||
ui.placeholder.html('<td colspan="' + cellCount + '"></td>').height(ui.item.height());
|
cellCount += colspan;
|
||||||
}
|
});
|
||||||
};
|
|
||||||
|
// Add the placeholder UI - note that this is the item's content, so td rather than tr - and set height of tr
|
||||||
//helper to count what is visible
|
ui.placeholder.html('<td colspan="' + cellCount + '"></td>').height(ui.item.height());
|
||||||
function countVisible() {
|
}
|
||||||
return $scope.model.value.length;
|
};
|
||||||
}
|
|
||||||
|
//helper to count what is visible
|
||||||
function isNumeric(n) {
|
function countVisible() {
|
||||||
return !isNaN(parseFloat(n)) && isFinite(n);
|
return $scope.model.value.length;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getElementIndexByUrl(url) {
|
function isNumeric(n) {
|
||||||
for (var i = 0; i < $scope.model.value.length; i++) {
|
return !isNaN(parseFloat(n)) && isFinite(n);
|
||||||
if ($scope.model.value[i].link == url) {
|
}
|
||||||
return i;
|
|
||||||
}
|
function getElementIndexByUrl(url) {
|
||||||
}
|
for (var i = 0; i < $scope.model.value.length; i++) {
|
||||||
|
if ($scope.model.value[i].link == url) {
|
||||||
return -1;
|
return i;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
function select(data) {
|
|
||||||
if ($scope.currentEditLink != null) {
|
return -1;
|
||||||
$scope.currentEditLink.internal = $scope.model.config.idType === "udi" ? data.udi : data.id;
|
}
|
||||||
$scope.currentEditLink.internalName = data.name;
|
|
||||||
$scope.currentEditLink.internalIcon = iconHelper.convertFromLegacyIcon(data.icon);
|
function select(data) {
|
||||||
$scope.currentEditLink.link = $scope.model.config.idType === "udi" ? data.udi : data.id;
|
if ($scope.currentEditLink != null) {
|
||||||
} else {
|
$scope.currentEditLink.internal = $scope.model.config.idType === "udi" ? data.udi : data.id;
|
||||||
$scope.newInternal = $scope.model.config.idType === "udi" ? data.udi : data.id;
|
$scope.currentEditLink.internalName = data.name;
|
||||||
$scope.newInternalName = data.name;
|
$scope.currentEditLink.internalIcon = iconHelper.convertFromLegacyIcon(data.icon);
|
||||||
$scope.newInternalIcon = iconHelper.convertFromLegacyIcon(data.icon);
|
$scope.currentEditLink.link = $scope.model.config.idType === "udi" ? data.udi : data.id;
|
||||||
}
|
} else {
|
||||||
}
|
$scope.newInternal = $scope.model.config.idType === "udi" ? data.udi : data.id;
|
||||||
});
|
$scope.newInternalName = data.name;
|
||||||
|
$scope.newInternalIcon = iconHelper.convertFromLegacyIcon(data.icon);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|||||||
@@ -1,403 +1,411 @@
|
|||||||
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;
|
||||||
|
|
||||||
//To id the html textarea we need to use the datetime ticks because we can have multiple rte's per a single property alias
|
//To id the html textarea we need to use the datetime ticks because we can have multiple rte's per a single property alias
|
||||||
// because now we have to support having 2x (maybe more at some stage) content editors being displayed at once. This is because
|
// because now we have to support having 2x (maybe more at some stage) content editors being displayed at once. This is because
|
||||||
// we have this mini content editor panel that can be launched with MNTP.
|
// we have this mini content editor panel that can be launched with MNTP.
|
||||||
var d = new Date();
|
var d = new Date();
|
||||||
var n = d.getTime();
|
var n = d.getTime();
|
||||||
$scope.textAreaHtmlId = $scope.model.alias + "_" + n + "_rte";
|
$scope.textAreaHtmlId = $scope.model.alias + "_" + n + "_rte";
|
||||||
|
|
||||||
function syncContent(editor){
|
function syncContent(editor){
|
||||||
editor.save();
|
editor.save();
|
||||||
angularHelper.safeApply($scope, function () {
|
angularHelper.safeApply($scope, function () {
|
||||||
$scope.model.value = editor.getContent();
|
$scope.model.value = editor.getContent();
|
||||||
});
|
});
|
||||||
|
|
||||||
//make the form dirty manually so that the track changes works, setting our model doesn't trigger
|
//make the form dirty manually so that the track changes works, setting our model doesn't trigger
|
||||||
// the angular bits because tinymce replaces the textarea.
|
// the angular bits because tinymce replaces the textarea.
|
||||||
angularHelper.getCurrentForm($scope).$setDirty();
|
angularHelper.getCurrentForm($scope).$setDirty();
|
||||||
}
|
}
|
||||||
|
|
||||||
tinyMceService.configuration().then(function (tinyMceConfig) {
|
tinyMceService.configuration().then(function (tinyMceConfig) {
|
||||||
|
|
||||||
//config value from general tinymce.config file
|
//config value from general tinymce.config file
|
||||||
var validElements = tinyMceConfig.validElements;
|
var validElements = tinyMceConfig.validElements;
|
||||||
|
|
||||||
//These are absolutely required in order for the macros to render inline
|
//These are absolutely required in order for the macros to render inline
|
||||||
//we put these as extended elements because they get merged on top of the normal allowed elements by tiny mce
|
//we put these as extended elements because they get merged on top of the normal allowed elements by tiny mce
|
||||||
var extendedValidElements = "@[id|class|style],-div[id|dir|class|align|style],ins[datetime|cite],-ul[class|style],-li[class|style],span[id|class|style]";
|
var extendedValidElements = "@[id|class|style],-div[id|dir|class|align|style],ins[datetime|cite],-ul[class|style],-li[class|style],span[id|class|style]";
|
||||||
|
|
||||||
var invalidElements = tinyMceConfig.inValidElements;
|
var invalidElements = tinyMceConfig.inValidElements;
|
||||||
var plugins = _.map(tinyMceConfig.plugins, function (plugin) {
|
var plugins = _.map(tinyMceConfig.plugins, function (plugin) {
|
||||||
if (plugin.useOnFrontend) {
|
if (plugin.useOnFrontend) {
|
||||||
return plugin.name;
|
return plugin.name;
|
||||||
}
|
}
|
||||||
}).join(" ");
|
}).join(" ");
|
||||||
|
|
||||||
var editorConfig = $scope.model.config.editor;
|
var editorConfig = $scope.model.config.editor;
|
||||||
if (!editorConfig || angular.isString(editorConfig)) {
|
if (!editorConfig || angular.isString(editorConfig)) {
|
||||||
editorConfig = tinyMceService.defaultPrevalues();
|
editorConfig = tinyMceService.defaultPrevalues();
|
||||||
}
|
}
|
||||||
|
|
||||||
//config value on the data type
|
//config value on the data type
|
||||||
var toolbar = editorConfig.toolbar.join(" | ");
|
var toolbar = editorConfig.toolbar.join(" | ");
|
||||||
var stylesheets = [];
|
var stylesheets = [];
|
||||||
var styleFormats = [];
|
var styleFormats = [];
|
||||||
var await = [];
|
var await = [];
|
||||||
if (!editorConfig.maxImageSize && editorConfig.maxImageSize != 0) {
|
if (!editorConfig.maxImageSize && editorConfig.maxImageSize != 0) {
|
||||||
editorConfig.maxImageSize = tinyMceService.defaultPrevalues().maxImageSize;
|
editorConfig.maxImageSize = tinyMceService.defaultPrevalues().maxImageSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
//queue file loading
|
var dataTypeId = ($scope.model && $scope.model.dataTypeId) ? $scope.model.dataTypeId : null;
|
||||||
if (typeof tinymce === "undefined") { // Don't reload tinymce if already loaded
|
|
||||||
await.push(assetsService.loadJs("lib/tinymce/tinymce.min.js", $scope));
|
//queue file loading
|
||||||
}
|
if (typeof tinymce === "undefined") { // Don't reload tinymce if already loaded
|
||||||
|
await.push(assetsService.loadJs("lib/tinymce/tinymce.min.js", $scope));
|
||||||
//queue rules loading
|
}
|
||||||
angular.forEach(editorConfig.stylesheets, function (val, key) {
|
|
||||||
stylesheets.push(Umbraco.Sys.ServerVariables.umbracoSettings.cssPath + "/" + val + ".css?" + new Date().getTime());
|
//queue rules loading
|
||||||
await.push(stylesheetResource.getRulesByName(val).then(function (rules) {
|
angular.forEach(editorConfig.stylesheets, function (val, key) {
|
||||||
angular.forEach(rules, function (rule) {
|
stylesheets.push(Umbraco.Sys.ServerVariables.umbracoSettings.cssPath + "/" + val + ".css?" + new Date().getTime());
|
||||||
var r = {};
|
await.push(stylesheetResource.getRulesByName(val).then(function (rules) {
|
||||||
r.title = rule.name;
|
angular.forEach(rules, function (rule) {
|
||||||
if (rule.selector[0] == ".") {
|
var r = {};
|
||||||
r.inline = "span";
|
r.title = rule.name;
|
||||||
r.classes = rule.selector.substring(1);
|
if (rule.selector[0] == ".") {
|
||||||
}
|
r.inline = "span";
|
||||||
else if (rule.selector[0] == "#") {
|
r.classes = rule.selector.substring(1);
|
||||||
r.inline = "span";
|
}
|
||||||
r.attributes = { id: rule.selector.substring(1) };
|
else if (rule.selector[0] == "#") {
|
||||||
}
|
r.inline = "span";
|
||||||
else if (rule.selector[0] != "." && rule.selector.indexOf(".") > -1) {
|
r.attributes = { id: rule.selector.substring(1) };
|
||||||
var split = rule.selector.split(".");
|
}
|
||||||
r.block = split[0];
|
else if (rule.selector[0] != "." && rule.selector.indexOf(".") > -1) {
|
||||||
r.classes = rule.selector.substring(rule.selector.indexOf(".") + 1).replace(".", " ");
|
var split = rule.selector.split(".");
|
||||||
}
|
r.block = split[0];
|
||||||
else if (rule.selector[0] != "#" && rule.selector.indexOf("#") > -1) {
|
r.classes = rule.selector.substring(rule.selector.indexOf(".") + 1).replace(".", " ");
|
||||||
var split = rule.selector.split("#");
|
}
|
||||||
r.block = split[0];
|
else if (rule.selector[0] != "#" && rule.selector.indexOf("#") > -1) {
|
||||||
r.classes = rule.selector.substring(rule.selector.indexOf("#") + 1);
|
var split = rule.selector.split("#");
|
||||||
}
|
r.block = split[0];
|
||||||
else {
|
r.classes = rule.selector.substring(rule.selector.indexOf("#") + 1);
|
||||||
r.block = rule.selector;
|
}
|
||||||
}
|
else {
|
||||||
|
r.block = rule.selector;
|
||||||
styleFormats.push(r);
|
}
|
||||||
});
|
|
||||||
}));
|
styleFormats.push(r);
|
||||||
});
|
});
|
||||||
|
}));
|
||||||
|
});
|
||||||
//stores a reference to the editor
|
|
||||||
var tinyMceEditor = null;
|
|
||||||
|
//stores a reference to the editor
|
||||||
// these languages are available for localization
|
var tinyMceEditor = null;
|
||||||
var availableLanguages = [
|
|
||||||
'da',
|
// these languages are available for localization
|
||||||
'de',
|
var availableLanguages = [
|
||||||
'en',
|
'da',
|
||||||
'en_us',
|
'de',
|
||||||
'fi',
|
'en',
|
||||||
'fr',
|
'en_us',
|
||||||
'he',
|
'fi',
|
||||||
'it',
|
'fr',
|
||||||
'ja',
|
'he',
|
||||||
'nl',
|
'it',
|
||||||
'no',
|
'ja',
|
||||||
'pl',
|
'nl',
|
||||||
'pt',
|
'no',
|
||||||
'ru',
|
'pl',
|
||||||
'sv',
|
'pt',
|
||||||
'zh'
|
'ru',
|
||||||
];
|
'sv',
|
||||||
|
'zh'
|
||||||
//define fallback language
|
];
|
||||||
var language = 'en_us';
|
|
||||||
//get locale from angular and match tinymce format. Angular localization is always in the format of ru-ru, de-de, en-gb, etc.
|
//define fallback language
|
||||||
//wheras tinymce is in the format of ru, de, en, en_us, etc.
|
var language = 'en_us';
|
||||||
var localeId = $locale.id.replace('-', '_');
|
//get locale from angular and match tinymce format. Angular localization is always in the format of ru-ru, de-de, en-gb, etc.
|
||||||
//try matching the language using full locale format
|
//wheras tinymce is in the format of ru, de, en, en_us, etc.
|
||||||
var languageMatch = _.find(availableLanguages, function(o) { return o === localeId; });
|
var localeId = $locale.id.replace('-', '_');
|
||||||
//if no matches, try matching using only the language
|
//try matching the language using full locale format
|
||||||
if (languageMatch === undefined) {
|
var languageMatch = _.find(availableLanguages, function(o) { return o === localeId; });
|
||||||
var localeParts = localeId.split('_');
|
//if no matches, try matching using only the language
|
||||||
languageMatch = _.find(availableLanguages, function(o) { return o === localeParts[0]; });
|
if (languageMatch === undefined) {
|
||||||
}
|
var localeParts = localeId.split('_');
|
||||||
//if a match was found - set the language
|
languageMatch = _.find(availableLanguages, function(o) { return o === localeParts[0]; });
|
||||||
if (languageMatch !== undefined) {
|
}
|
||||||
language = languageMatch;
|
//if a match was found - set the language
|
||||||
}
|
if (languageMatch !== undefined) {
|
||||||
|
language = languageMatch;
|
||||||
//wait for queue to end
|
}
|
||||||
$q.all(await).then(function () {
|
|
||||||
|
//wait for queue to end
|
||||||
//create a baseline Config to exten upon
|
$q.all(await).then(function () {
|
||||||
var baseLineConfigObj = {
|
|
||||||
mode: "exact",
|
//create a baseline Config to exten upon
|
||||||
skin: "umbraco",
|
var baseLineConfigObj = {
|
||||||
plugins: plugins,
|
mode: "exact",
|
||||||
valid_elements: validElements,
|
skin: "umbraco",
|
||||||
invalid_elements: invalidElements,
|
plugins: plugins,
|
||||||
extended_valid_elements: extendedValidElements,
|
valid_elements: validElements,
|
||||||
menubar: false,
|
invalid_elements: invalidElements,
|
||||||
statusbar: false,
|
extended_valid_elements: extendedValidElements,
|
||||||
relative_urls: false,
|
menubar: false,
|
||||||
height: editorConfig.dimensions.height,
|
statusbar: false,
|
||||||
width: editorConfig.dimensions.width,
|
relative_urls: false,
|
||||||
maxImageSize: editorConfig.maxImageSize,
|
height: editorConfig.dimensions.height,
|
||||||
toolbar: toolbar,
|
width: editorConfig.dimensions.width,
|
||||||
content_css: stylesheets,
|
maxImageSize: editorConfig.maxImageSize,
|
||||||
style_formats: styleFormats,
|
toolbar: toolbar,
|
||||||
language: language,
|
content_css: stylesheets,
|
||||||
//see http://archive.tinymce.com/wiki.php/Configuration:cache_suffix
|
style_formats: styleFormats,
|
||||||
cache_suffix: "?umb__rnd=" + Umbraco.Sys.ServerVariables.application.cacheBuster
|
language: language,
|
||||||
};
|
//see http://archive.tinymce.com/wiki.php/Configuration:cache_suffix
|
||||||
|
cache_suffix: "?umb__rnd=" + Umbraco.Sys.ServerVariables.application.cacheBuster
|
||||||
if (tinyMceConfig.customConfig) {
|
};
|
||||||
|
|
||||||
//if there is some custom config, we need to see if the string value of each item might actually be json and if so, we need to
|
if (tinyMceConfig.customConfig) {
|
||||||
// convert it to json instead of having it as a string since this is what tinymce requires
|
|
||||||
for (var i in tinyMceConfig.customConfig) {
|
//if there is some custom config, we need to see if the string value of each item might actually be json and if so, we need to
|
||||||
var val = tinyMceConfig.customConfig[i];
|
// convert it to json instead of having it as a string since this is what tinymce requires
|
||||||
if (val) {
|
for (var i in tinyMceConfig.customConfig) {
|
||||||
val = val.toString().trim();
|
var val = tinyMceConfig.customConfig[i];
|
||||||
if (val.detectIsJson()) {
|
if (val) {
|
||||||
try {
|
val = val.toString().trim();
|
||||||
tinyMceConfig.customConfig[i] = JSON.parse(val);
|
if (val.detectIsJson()) {
|
||||||
//now we need to check if this custom config key is defined in our baseline, if it is we don't want to
|
try {
|
||||||
//overwrite the baseline config item if it is an array, we want to concat the items in the array, otherwise
|
tinyMceConfig.customConfig[i] = JSON.parse(val);
|
||||||
//if it's an object it will overwrite the baseline
|
//now we need to check if this custom config key is defined in our baseline, if it is we don't want to
|
||||||
if (angular.isArray(baseLineConfigObj[i]) && angular.isArray(tinyMceConfig.customConfig[i])) {
|
//overwrite the baseline config item if it is an array, we want to concat the items in the array, otherwise
|
||||||
//concat it and below this concat'd array will overwrite the baseline in angular.extend
|
//if it's an object it will overwrite the baseline
|
||||||
tinyMceConfig.customConfig[i] = baseLineConfigObj[i].concat(tinyMceConfig.customConfig[i]);
|
if (angular.isArray(baseLineConfigObj[i]) && angular.isArray(tinyMceConfig.customConfig[i])) {
|
||||||
}
|
//concat it and below this concat'd array will overwrite the baseline in angular.extend
|
||||||
}
|
tinyMceConfig.customConfig[i] = baseLineConfigObj[i].concat(tinyMceConfig.customConfig[i]);
|
||||||
catch (e) {
|
}
|
||||||
//cannot parse, we'll just leave it
|
}
|
||||||
}
|
catch (e) {
|
||||||
}
|
//cannot parse, we'll just leave it
|
||||||
if (val === "true") {
|
}
|
||||||
tinyMceConfig.customConfig[i] = true;
|
}
|
||||||
}
|
if (val === "true") {
|
||||||
if (val === "false") {
|
tinyMceConfig.customConfig[i] = true;
|
||||||
tinyMceConfig.customConfig[i] = false;
|
}
|
||||||
}
|
if (val === "false") {
|
||||||
}
|
tinyMceConfig.customConfig[i] = false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
angular.extend(baseLineConfigObj, tinyMceConfig.customConfig);
|
}
|
||||||
}
|
|
||||||
|
angular.extend(baseLineConfigObj, tinyMceConfig.customConfig);
|
||||||
//set all the things that user configs should not be able to override
|
}
|
||||||
baseLineConfigObj.elements = $scope.textAreaHtmlId; //this is the exact textarea id to replace!
|
|
||||||
baseLineConfigObj.setup = function (editor) {
|
//set all the things that user configs should not be able to override
|
||||||
|
baseLineConfigObj.elements = $scope.textAreaHtmlId; //this is the exact textarea id to replace!
|
||||||
//set the reference
|
baseLineConfigObj.setup = function (editor) {
|
||||||
tinyMceEditor = editor;
|
|
||||||
|
//set the reference
|
||||||
//enable browser based spell checking
|
tinyMceEditor = editor;
|
||||||
editor.on('init', function (e) {
|
|
||||||
editor.getBody().setAttribute('spellcheck', true);
|
//enable browser based spell checking
|
||||||
});
|
editor.on('init', function (e) {
|
||||||
|
editor.getBody().setAttribute('spellcheck', true);
|
||||||
//We need to listen on multiple things here because of the nature of tinymce, it doesn't
|
});
|
||||||
//fire events when you think!
|
|
||||||
//The change event doesn't fire when content changes, only when cursor points are changed and undo points
|
//We need to listen on multiple things here because of the nature of tinymce, it doesn't
|
||||||
//are created. the blur event doesn't fire if you insert content into the editor with a button and then
|
//fire events when you think!
|
||||||
//press save.
|
//The change event doesn't fire when content changes, only when cursor points are changed and undo points
|
||||||
//We have a couple of options, one is to do a set timeout and check for isDirty on the editor, or we can
|
//are created. the blur event doesn't fire if you insert content into the editor with a button and then
|
||||||
//listen to both change and blur and also on our own 'saving' event. I think this will be best because a
|
//press save.
|
||||||
//timer might end up using unwanted cpu and we'd still have to listen to our saving event in case they clicked
|
//We have a couple of options, one is to do a set timeout and check for isDirty on the editor, or we can
|
||||||
//save before the timeout elapsed.
|
//listen to both change and blur and also on our own 'saving' event. I think this will be best because a
|
||||||
|
//timer might end up using unwanted cpu and we'd still have to listen to our saving event in case they clicked
|
||||||
//TODO: We need to re-enable something like this to ensure the track changes is working with tinymce
|
//save before the timeout elapsed.
|
||||||
// so we can detect if the form is dirty or not, Per has some better events to use as this one triggers
|
|
||||||
// even if you just enter/exit with mouse cursuor which doesn't really mean it's changed.
|
//TODO: We need to re-enable something like this to ensure the track changes is working with tinymce
|
||||||
// see: http://issues.umbraco.org/issue/U4-4485
|
// so we can detect if the form is dirty or not, Per has some better events to use as this one triggers
|
||||||
//var alreadyDirty = false;
|
// even if you just enter/exit with mouse cursuor which doesn't really mean it's changed.
|
||||||
//editor.on('change', function (e) {
|
// see: http://issues.umbraco.org/issue/U4-4485
|
||||||
// angularHelper.safeApply($scope, function () {
|
//var alreadyDirty = false;
|
||||||
// $scope.model.value = editor.getContent();
|
//editor.on('change', function (e) {
|
||||||
|
// angularHelper.safeApply($scope, function () {
|
||||||
// if (!alreadyDirty) {
|
// $scope.model.value = editor.getContent();
|
||||||
// //make the form dirty manually so that the track changes works, setting our model doesn't trigger
|
|
||||||
// // the angular bits because tinymce replaces the textarea.
|
// if (!alreadyDirty) {
|
||||||
// var currForm = angularHelper.getCurrentForm($scope);
|
// //make the form dirty manually so that the track changes works, setting our model doesn't trigger
|
||||||
// currForm.$setDirty();
|
// // the angular bits because tinymce replaces the textarea.
|
||||||
// alreadyDirty = true;
|
// var currForm = angularHelper.getCurrentForm($scope);
|
||||||
// }
|
// currForm.$setDirty();
|
||||||
|
// alreadyDirty = true;
|
||||||
// });
|
// }
|
||||||
//});
|
|
||||||
|
// });
|
||||||
//when we leave the editor (maybe)
|
//});
|
||||||
editor.on('blur', function (e) {
|
|
||||||
editor.save();
|
//when we leave the editor (maybe)
|
||||||
angularHelper.safeApply($scope, function () {
|
editor.on('blur', function (e) {
|
||||||
$scope.model.value = editor.getContent();
|
editor.save();
|
||||||
});
|
angularHelper.safeApply($scope, function () {
|
||||||
});
|
$scope.model.value = editor.getContent();
|
||||||
|
});
|
||||||
//when buttons modify content
|
});
|
||||||
editor.on('ExecCommand', function (e) {
|
|
||||||
syncContent(editor);
|
//when buttons modify content
|
||||||
});
|
editor.on('ExecCommand', function (e) {
|
||||||
|
syncContent(editor);
|
||||||
// Update model on keypress
|
});
|
||||||
editor.on('KeyUp', function (e) {
|
|
||||||
syncContent(editor);
|
// Update model on keypress
|
||||||
});
|
editor.on('KeyUp', function (e) {
|
||||||
|
syncContent(editor);
|
||||||
// Update model on change, i.e. copy/pasted text, plugins altering content
|
});
|
||||||
editor.on('SetContent', function (e) {
|
|
||||||
if (!e.initial) {
|
// Update model on change, i.e. copy/pasted text, plugins altering content
|
||||||
syncContent(editor);
|
editor.on('SetContent', function (e) {
|
||||||
}
|
if (!e.initial) {
|
||||||
});
|
syncContent(editor);
|
||||||
|
}
|
||||||
|
});
|
||||||
editor.on('ObjectResized', function (e) {
|
|
||||||
var qs = "?width=" + e.width + "&height=" + e.height + "&mode=max";
|
|
||||||
var srcAttr = $(e.target).attr("src");
|
editor.on('ObjectResized', function (e) {
|
||||||
var path = srcAttr.split("?")[0];
|
var qs = "?width=" + e.width + "&height=" + e.height + "&mode=max";
|
||||||
$(e.target).attr("data-mce-src", path + qs);
|
var srcAttr = $(e.target).attr("src");
|
||||||
|
var path = srcAttr.split("?")[0];
|
||||||
syncContent(editor);
|
$(e.target).attr("data-mce-src", path + qs);
|
||||||
});
|
|
||||||
|
syncContent(editor);
|
||||||
tinyMceService.createLinkPicker(editor, $scope, function(currentTarget, anchorElement) {
|
});
|
||||||
$scope.linkPickerOverlay = {
|
|
||||||
view: "linkpicker",
|
tinyMceService.createLinkPicker(editor, $scope, function(currentTarget, anchorElement) {
|
||||||
currentTarget: currentTarget,
|
|
||||||
anchors: editorState.current ? tinyMceService.getAnchorNames(JSON.stringify(editorState.current.properties)) : [],
|
entityResource.getAnchors($scope.model.value).then(function(anchorValues){
|
||||||
ignoreUserStartNodes: $scope.model.config.ignoreUserStartNodes === "1",
|
|
||||||
show: true,
|
$scope.linkPickerOverlay = {
|
||||||
submit: function(model) {
|
view: "linkpicker",
|
||||||
tinyMceService.insertLinkInEditor(editor, model.target, anchorElement);
|
currentTarget: currentTarget,
|
||||||
$scope.linkPickerOverlay.show = false;
|
anchors: anchorValues,
|
||||||
$scope.linkPickerOverlay = null;
|
dataTypeId: dataTypeId,
|
||||||
}
|
ignoreUserStartNodes: $scope.model.config.ignoreUserStartNodes,
|
||||||
};
|
show: true,
|
||||||
});
|
submit: function(model) {
|
||||||
|
tinyMceService.insertLinkInEditor(editor, model.target, anchorElement);
|
||||||
//Create the insert media plugin
|
$scope.linkPickerOverlay.show = false;
|
||||||
tinyMceService.createMediaPicker(editor, $scope, function(currentTarget, userData){
|
$scope.linkPickerOverlay = null;
|
||||||
var ignoreUserStartNodes = false;
|
}
|
||||||
var startNodeId = userData.startMediaIds.length !== 1 ? -1 : userData.startMediaIds[0];
|
};
|
||||||
var startNodeIsVirtual = userData.startMediaIds.length !== 1;
|
});
|
||||||
|
|
||||||
if ($scope.model.config.ignoreUserStartNodes === "1") {
|
|
||||||
ignoreUserStartNodes = true;
|
|
||||||
startNodeId = -1;
|
});
|
||||||
startNodeIsVirtual = true;
|
|
||||||
}
|
//Create the insert media plugin
|
||||||
|
tinyMceService.createMediaPicker(editor, $scope, function(currentTarget, userData){
|
||||||
$scope.mediaPickerOverlay = {
|
var startNodeId = userData.startMediaIds.length !== 1 ? -1 : userData.startMediaIds[0];
|
||||||
currentTarget: currentTarget,
|
var startNodeIsVirtual = userData.startMediaIds.length !== 1;
|
||||||
onlyImages: true,
|
|
||||||
showDetails: true,
|
if ($scope.model.config.ignoreUserStartNodes === "1") {
|
||||||
disableFolderSelect: true,
|
startNodeId = -1;
|
||||||
startNodeId: startNodeId,
|
startNodeIsVirtual = true;
|
||||||
startNodeIsVirtual: startNodeIsVirtual,
|
}
|
||||||
ignoreUserStartNodes: ignoreUserStartNodes,
|
|
||||||
view: "mediapicker",
|
$scope.mediaPickerOverlay = {
|
||||||
show: true,
|
currentTarget: currentTarget,
|
||||||
submit: function(model) {
|
onlyImages: true,
|
||||||
tinyMceService.insertMediaInEditor(editor, model.selectedImages[0]);
|
showDetails: true,
|
||||||
$scope.mediaPickerOverlay.show = false;
|
disableFolderSelect: true,
|
||||||
$scope.mediaPickerOverlay = null;
|
startNodeId: startNodeId,
|
||||||
}
|
startNodeIsVirtual: startNodeIsVirtual,
|
||||||
};
|
dataTypeId: dataTypeId,
|
||||||
|
view: "mediapicker",
|
||||||
});
|
show: true,
|
||||||
|
submit: function(model) {
|
||||||
//Create the embedded plugin
|
tinyMceService.insertMediaInEditor(editor, model.selectedImages[0]);
|
||||||
tinyMceService.createInsertEmbeddedMedia(editor, $scope, function() {
|
$scope.mediaPickerOverlay.show = false;
|
||||||
|
$scope.mediaPickerOverlay = null;
|
||||||
$scope.embedOverlay = {
|
}
|
||||||
view: "embed",
|
};
|
||||||
show: true,
|
|
||||||
submit: function(model) {
|
});
|
||||||
tinyMceService.insertEmbeddedMediaInEditor(editor, model.embed.preview);
|
|
||||||
$scope.embedOverlay.show = false;
|
//Create the embedded plugin
|
||||||
$scope.embedOverlay = null;
|
tinyMceService.createInsertEmbeddedMedia(editor, $scope, function() {
|
||||||
}
|
|
||||||
};
|
$scope.embedOverlay = {
|
||||||
|
view: "embed",
|
||||||
});
|
show: true,
|
||||||
|
submit: function(model) {
|
||||||
|
tinyMceService.insertEmbeddedMediaInEditor(editor, model.embed.preview);
|
||||||
//Create the insert macro plugin
|
$scope.embedOverlay.show = false;
|
||||||
tinyMceService.createInsertMacro(editor, $scope, function(dialogData) {
|
$scope.embedOverlay = null;
|
||||||
|
}
|
||||||
$scope.macroPickerOverlay = {
|
};
|
||||||
view: "macropicker",
|
|
||||||
dialogData: dialogData,
|
});
|
||||||
show: true,
|
|
||||||
submit: function(model) {
|
|
||||||
var macroObject = macroService.collectValueData(model.selectedMacro, model.macroParams, dialogData.renderingEngine);
|
//Create the insert macro plugin
|
||||||
tinyMceService.insertMacroInEditor(editor, macroObject, $scope);
|
tinyMceService.createInsertMacro(editor, $scope, function(dialogData) {
|
||||||
$scope.macroPickerOverlay.show = false;
|
|
||||||
$scope.macroPickerOverlay = null;
|
$scope.macroPickerOverlay = {
|
||||||
}
|
view: "macropicker",
|
||||||
};
|
dialogData: dialogData,
|
||||||
|
show: true,
|
||||||
});
|
submit: function(model) {
|
||||||
};
|
var macroObject = macroService.collectValueData(model.selectedMacro, model.macroParams, dialogData.renderingEngine);
|
||||||
|
tinyMceService.insertMacroInEditor(editor, macroObject, $scope);
|
||||||
/** Loads in the editor */
|
$scope.macroPickerOverlay.show = false;
|
||||||
function loadTinyMce() {
|
$scope.macroPickerOverlay = null;
|
||||||
|
}
|
||||||
//we need to add a timeout here, to force a redraw so TinyMCE can find
|
};
|
||||||
//the elements needed
|
|
||||||
$timeout(function () {
|
});
|
||||||
tinymce.DOM.events.domLoaded = true;
|
};
|
||||||
tinymce.init(baseLineConfigObj);
|
|
||||||
|
/** Loads in the editor */
|
||||||
$scope.isLoading = false;
|
function loadTinyMce() {
|
||||||
|
|
||||||
}, 200, false);
|
//we need to add a timeout here, to force a redraw so TinyMCE can find
|
||||||
}
|
//the elements needed
|
||||||
|
$timeout(function () {
|
||||||
|
tinymce.DOM.events.domLoaded = true;
|
||||||
|
tinymce.init(baseLineConfigObj);
|
||||||
|
|
||||||
loadTinyMce();
|
$scope.isLoading = false;
|
||||||
|
|
||||||
//here we declare a special method which will be called whenever the value has changed from the server
|
}, 200, false);
|
||||||
//this is instead of doing a watch on the model.value = faster
|
}
|
||||||
$scope.model.onValueChanged = function (newVal, oldVal) {
|
|
||||||
//update the display val again if it has changed from the server;
|
|
||||||
//uses an empty string in the editor when the value is null
|
|
||||||
tinyMceEditor.setContent(newVal || "", { format: 'raw' });
|
|
||||||
//we need to manually fire this event since it is only ever fired based on loading from the DOM, this
|
loadTinyMce();
|
||||||
// is required for our plugins listening to this event to execute
|
|
||||||
tinyMceEditor.fire('LoadContent', null);
|
//here we declare a special method which will be called whenever the value has changed from the server
|
||||||
};
|
//this is instead of doing a watch on the model.value = faster
|
||||||
|
$scope.model.onValueChanged = function (newVal, oldVal) {
|
||||||
//listen for formSubmitting event (the result is callback used to remove the event subscription)
|
//update the display val again if it has changed from the server;
|
||||||
var unsubscribe = $scope.$on("formSubmitting", function () {
|
//uses an empty string in the editor when the value is null
|
||||||
//TODO: Here we should parse out the macro rendered content so we can save on a lot of bytes in data xfer
|
tinyMceEditor.setContent(newVal || "", { format: 'raw' });
|
||||||
// we do parse it out on the server side but would be nice to do that on the client side before as well.
|
//we need to manually fire this event since it is only ever fired based on loading from the DOM, this
|
||||||
if (tinyMceEditor !== undefined && tinyMceEditor != null && !$scope.isLoading) {
|
// is required for our plugins listening to this event to execute
|
||||||
$scope.model.value = tinyMceEditor.getContent();
|
tinyMceEditor.fire('LoadContent', null);
|
||||||
}
|
};
|
||||||
});
|
|
||||||
|
//listen for formSubmitting event (the result is callback used to remove the event subscription)
|
||||||
//when the element is disposed we need to unsubscribe!
|
var unsubscribe = $scope.$on("formSubmitting", function () {
|
||||||
// NOTE: this is very important otherwise if this is part of a modal, the listener still exists because the dom
|
//TODO: Here we should parse out the macro rendered content so we can save on a lot of bytes in data xfer
|
||||||
// element might still be there even after the modal has been hidden.
|
// we do parse it out on the server side but would be nice to do that on the client side before as well.
|
||||||
$scope.$on('$destroy', function () {
|
if (tinyMceEditor !== undefined && tinyMceEditor != null && !$scope.isLoading) {
|
||||||
unsubscribe();
|
$scope.model.value = tinyMceEditor.getContent();
|
||||||
if (tinyMceEditor !== undefined && tinyMceEditor != null) {
|
}
|
||||||
tinyMceEditor.destroy();
|
});
|
||||||
}
|
|
||||||
});
|
//when the element is disposed we need to unsubscribe!
|
||||||
});
|
// NOTE: this is very important otherwise if this is part of a modal, the listener still exists because the dom
|
||||||
});
|
// element might still be there even after the modal has been hidden.
|
||||||
|
$scope.$on('$destroy', function () {
|
||||||
});
|
unsubscribe();
|
||||||
|
if (tinyMceEditor !== undefined && tinyMceEditor != null) {
|
||||||
|
tinyMceEditor.destroy();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|
||||||
@@ -457,11 +469,11 @@
|
|||||||
<caching configSource="config\imageprocessor\cache.config" />
|
<caching configSource="config\imageprocessor\cache.config" />
|
||||||
<processing configSource="config\imageprocessor\processing.config" />
|
<processing configSource="config\imageprocessor\processing.config" />
|
||||||
</imageProcessor>
|
</imageProcessor>
|
||||||
|
|
||||||
<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))
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user