Compare commits
101 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d4d21c18b2 | |||
| f809dec874 | |||
| 2477500045 | |||
| ca1b05e30d | |||
| 5c09ba9a2d | |||
| 5f67e85471 | |||
| d9228c368f | |||
| 41b8de09b7 | |||
| bbf06cd13d | |||
| 639cb17741 | |||
| 50035eae49 | |||
| 2d857a8635 | |||
| 3040d362ef | |||
| 1ec7cd3b89 | |||
| 368954226a | |||
| b01b4f7aa7 | |||
| 49a699c858 | |||
| 22cf59345c | |||
| 16a46a4ea4 | |||
| c0df3e0202 | |||
| 507c6c23b9 | |||
| 3daf936623 | |||
| 033f981718 | |||
| 76358e3e13 | |||
| 35c0eb3b0c | |||
| 7fad8ca98b | |||
| a2da27121e | |||
| 23ec07276a | |||
| 96cec0b407 | |||
| 47b94e68e3 | |||
| 0f4b1752e0 | |||
| b2c604f7b3 | |||
| 818d22ba61 | |||
| 27fdb1ebab | |||
| 86ce48ddc8 | |||
| 2161ec98b0 | |||
| 52292cab60 | |||
| a6768263d3 | |||
| e66306978a | |||
| 7f22809ebf | |||
| 302ebde422 | |||
| cf5624f377 | |||
| f386c9d024 | |||
| 530fcf0ea3 | |||
| 26e4091f28 | |||
| 32f86f750e | |||
| b8304c03ee | |||
| aaa4469def | |||
| baa0069262 | |||
| 9ac4c7aef5 | |||
| cb2a35594f | |||
| dd501d0198 | |||
| b724d8fb32 | |||
| 7c6aee17e9 | |||
| 5e2c3a0a8b | |||
| f5121bd183 | |||
| 51b5334126 | |||
| 120bdca9eb | |||
| a5041aa34e | |||
| d3780848dc | |||
| 9d15228c68 | |||
| c9c3623457 | |||
| e0a483ca48 | |||
| 95eb00a81c | |||
| 3921b0974e | |||
| 2cd07c841f | |||
| 8f80f0e95c | |||
| 73ac2c0309 | |||
| a5ddb6c818 | |||
| 458e61e049 | |||
| 0815842640 | |||
| 53b31a5c1b | |||
| a4098b5d25 | |||
| 33ff82e766 | |||
| 5fd90e1c13 | |||
| a6eaec9ecb | |||
| f5553bcc06 | |||
| e0c68a8e1c | |||
| 5212d17f49 | |||
| dc2554c6d0 | |||
| 159d605434 | |||
| 5c0c33a46b | |||
| a1ee352514 | |||
| a8ad8c2a43 | |||
| afbe3ca3b9 | |||
| 32d6f2e50c | |||
| 9909f5b6be | |||
| 6281268954 | |||
| af51465a6a | |||
| c2057656bc | |||
| 09a4e33f3f | |||
| c12f9d0272 | |||
| d2d1843e03 | |||
| a89a122b09 | |||
| e5e22f75fc | |||
| cab21e9d48 | |||
| 2e7c26fcc0 | |||
| 0f6c41679c | |||
| 777d397ae7 | |||
| 41258104f6 | |||
| 08a8e6b816 |
+81
@@ -0,0 +1,81 @@
|
||||
*.obj
|
||||
*.pdb
|
||||
*.user
|
||||
*.aps
|
||||
*.pch
|
||||
*.vspscc
|
||||
[Bb]in
|
||||
[Db]ebug*/
|
||||
obj/
|
||||
[Rr]elease*/
|
||||
_ReSharper*/
|
||||
_NCrunch_*/
|
||||
*.ncrunchsolution
|
||||
*.ncrunchsolution.user
|
||||
*.ncrunchproject
|
||||
*.crunchsolution.cache
|
||||
[Tt]est[Rr]esult*
|
||||
[Bb]uild[Ll]og.*
|
||||
*.[Pp]ublish.xml
|
||||
*.suo
|
||||
[sS]ource
|
||||
[sS]andbox
|
||||
umbraco.config
|
||||
*.vs10x
|
||||
App_Data/TEMP/*
|
||||
[Uu]mbraco/[Pp]resentation/[Uu]mbraco/[Pp]lugins/*
|
||||
[Uu]mbraco/[Pp]resentation/[Uu]ser[Cc]ontrols/*
|
||||
[Uu]mbraco/[Pp]resentation/[Ss]cripts/*
|
||||
[Uu]mbraco/[Pp]resentation/[Ff]onts/*
|
||||
[Uu]mbraco/[Pp]resentation/[Cc]ss/*
|
||||
|
||||
src/Umbraco.Web.UI/[Cc]ss/*
|
||||
src/Umbraco.Web.UI/App_Code/*
|
||||
src/Umbraco.Web.UI/App_Data/*
|
||||
src/Umbraco.Tests/App_Data/*
|
||||
src/Umbraco.Web.UI/[Mm]edia/*
|
||||
src/Umbraco.Web.UI/[Mm]aster[Pp]ages/*
|
||||
src/Umbraco.Web.UI/[Mm]acro[Ss]cripts/*
|
||||
src/Umbraco.Web.UI/[Xx]slt/*
|
||||
src/Umbraco.Web.UI/[Ii]mages/*
|
||||
src/Umbraco.Web.UI/[Ss]cripts/*
|
||||
src/Umbraco.Web.UI/Web.*.config.transformed
|
||||
|
||||
umbraco/presentation/umbraco/plugins/uComponents/uComponentsInstaller.ascx
|
||||
umbraco/presentation/packages/uComponents/MultiNodePicker/CustomTreeService.asmx
|
||||
_BuildOutput/*
|
||||
build/UmbracoCms.AllBinaries*zip
|
||||
build/UmbracoCms.WebPI*zip
|
||||
build/UmbracoCms*zip
|
||||
build/*.nupkg
|
||||
src/Umbraco.Tests/config/applications.config
|
||||
src/Umbraco.Tests/config/trees.config
|
||||
src/Umbraco.Web.UI/web.config
|
||||
*.orig
|
||||
src/Umbraco.Tests/config/404handlers.config
|
||||
src/Umbraco.Web.UI/[Vv]iews/*.cshtml
|
||||
src/Umbraco.Web.UI/[Vv]iews/*.vbhtml
|
||||
src/Umbraco.Tests/[Cc]onfig/umbracoSettings.config
|
||||
src/Umbraco.Web.UI/[Vv]iews/*
|
||||
src/packages/
|
||||
src/packages/repositories.config
|
||||
|
||||
src/Umbraco.Web.UI/[Ww]eb.config
|
||||
*.transformed
|
||||
webpihash.txt
|
||||
|
||||
node_modules
|
||||
src/Umbraco.Web.UI/[Uu]mbraco/[Ll]ib/*
|
||||
src/Umbraco.Web.UI/[Uu]mbraco/[Jj]s/umbraco.*
|
||||
src/Umbraco.Web.UI/[Uu]mbraco/[Jj]s/routes.js
|
||||
src/Umbraco.Web.UI/[Uu]mbraco/[Jj]s/main.js
|
||||
src/Umbraco.Web.UI/[Uu]mbraco/[Jj]s/app.js
|
||||
src/Umbraco.Web.UI/[Uu]mbraco/[Vv]iews/**/*.js
|
||||
src/Umbraco.Web.UI/[Uu]mbraco/[Vv]iews/**/*.css
|
||||
src/Umbraco.Web.UI/[Uu]mbraco/[Vv]iews/**/*.html
|
||||
src/Umbraco.Web.UI/[Uu]mbraco/[Aa]ssets/*
|
||||
src/Umbraco.Web.UI.Client/[Bb]uild/*
|
||||
src/Umbraco.Web.UI.Client/[Bb]uild/[Bb]elle/
|
||||
src/Umbraco.Web.UI/[Uu]ser[Cc]ontrols/
|
||||
build/_BuildOutput/
|
||||
tools/NDepend/
|
||||
@@ -1,70 +0,0 @@
|
||||
syntax: regexp
|
||||
^src/packages/(?!repositories.config$)
|
||||
web.Template.[a-zA-Z0-9]*.Debug.config
|
||||
|
||||
syntax: glob
|
||||
*.obj
|
||||
*.pdb
|
||||
*.user
|
||||
*.aps
|
||||
*.pch
|
||||
*.vspscc
|
||||
[Bb]in
|
||||
[Db]ebug*/
|
||||
obj/
|
||||
[Rr]elease*/
|
||||
_ReSharper*/
|
||||
_NCrunch_*/
|
||||
*.ncrunchsolution
|
||||
*.ncrunchsolution.user
|
||||
*.ncrunchproject
|
||||
*.crunchsolution.cache
|
||||
[Tt]est[Rr]esult*
|
||||
[Bb]uild[Ll]og.*
|
||||
*.[Pp]ublish.xml
|
||||
*.suo
|
||||
[sS]ource
|
||||
[sS]andbox
|
||||
umbraco.config
|
||||
*.vs10x
|
||||
App_Data\TEMP\*
|
||||
umbraco\presentation\umbraco\plugins\*
|
||||
umbraco\presentation\usercontrols\*
|
||||
umbraco\presentation\scripts\*
|
||||
umbraco\presentation\fonts\*
|
||||
umbraco\presentation\css\*
|
||||
|
||||
src\Umbraco.Web.UI\[Cc]ss\*
|
||||
src\Umbraco.Web.UI\App_Code\*
|
||||
src\Umbraco.Web.UI\App_Data\*
|
||||
src\Umbraco.Tests\App_Data\*
|
||||
src\Umbraco.Web.UI\[Mm]edia\*
|
||||
src\Umbraco.Web.UI\[Mm]aster[Pp]ages\*
|
||||
src\Umbraco.Web.UI\[Mm]acro[Ss]cripts\*
|
||||
src\Umbraco.Web.UI\[Xx]slt\*
|
||||
src\Umbraco.Web.UI\[Ii]mages\*
|
||||
src\Umbraco.Web.UI\[Ss]cripts\*
|
||||
src\Umbraco.Web.UI\Web.*.config.transformed
|
||||
|
||||
umbraco\presentation\umbraco\plugins\uComponents\uComponentsInstaller.ascx
|
||||
umbraco\presentation\packages\uComponents\MultiNodePicker\CustomTreeService.asmx
|
||||
_BuildOutput/*
|
||||
*.ncrunchsolution
|
||||
build/UmbracoCms.AllBinaries*zip
|
||||
build/UmbracoCms.WebPI*zip
|
||||
build/UmbracoCms*zip
|
||||
build/*.nupkg
|
||||
src/Umbraco.Tests/config/applications.config
|
||||
src/Umbraco.Tests/config/trees.config
|
||||
src/Umbraco.Web.UI/web.config
|
||||
*.orig
|
||||
src/Umbraco.Tests/config/404handlers.config
|
||||
src/Umbraco.Web.UI/Views/*.cshtml
|
||||
src/Umbraco.Web.UI/Views/*.vbhtml
|
||||
src/Umbraco.Tests/config/umbracoSettings.config
|
||||
src/Umbraco.Web.UI/App_Plugins/*
|
||||
src/Umbraco.Web.UI/Views/*
|
||||
src/packages/
|
||||
|
||||
src\Umbraco.Web.UI\[W]eb.config
|
||||
*.transformed
|
||||
@@ -1,33 +0,0 @@
|
||||
d0aba247db91d1b70c39c6397b965ca370a67497 Sprint-Juno-A
|
||||
0b8f67be2ca8faf008151d87f232c698de69e735 Release-4.5.0
|
||||
5960c073250926d202861a09472f5f334da6e283 Sprint-Juno-B
|
||||
f15d4ff81a8368e9d42788f7e0ae726f7a70a3b1 Release-4.0.3
|
||||
283065df4d3c27245267709dd2644a479c4f62a5 Release-4.0.4.2
|
||||
ffc34b23e1a03785e4098afa4290d8c03cf10115 Release-4.5.2
|
||||
d03fcffb8834a9583a56813bb44b6abbd9f042cc Release-4.6.0
|
||||
1809f7b2593270c192cd47bdcfdb392100686f79 4.7.2
|
||||
488779dec0ceb1d2874bcef906241b919325c904 4.8.0-beta
|
||||
096f20bb0575d6199f20fcb3147b63554e765a74 Release-4.8.0
|
||||
8f8a203857886b373148af29edd57460a42940be Release-4.8.1
|
||||
de73e687ddf6086ed52b6554676c1632865d07f2 Release-4.9.0
|
||||
8d7d8609e2e4b971da99cd97f72132ce85ce3333 Release-4.9.1
|
||||
f6da531fbb4c251ff61d314e2a7effb13c71e74a Release-4.10.0
|
||||
20e4dff821d8ac2527a5353618fa1a23ea1d8b34 Release-4.11.0
|
||||
7f827760cb49d749616859f528d19dde64807947 Release-4.11.1
|
||||
7f827760cb49d749616859f528d19dde64807947 Release-4.11.1
|
||||
6eb5f2fb5a88aa29ea544499df9160a1b31b5638 Release-4.11.1
|
||||
73711b806a4044dbf0d7d7c095ddfdda23b09932 4.11.2
|
||||
73711b806a4044dbf0d7d7c095ddfdda23b09932 4.11.2
|
||||
0000000000000000000000000000000000000000 4.11.2
|
||||
73711b806a4044dbf0d7d7c095ddfdda23b09932 Release-4.11.2
|
||||
77db220b89e166b3c0736ed321ecfd6416cddbcd Release-4.11.2.1
|
||||
54cde33b809dcb3a1f7e7ae0d5375f6dd0d89c8d Release-4.11.2.2
|
||||
ff3bb24ea0c915878396a6ae27f1ff164e8ac150 Release-6.0.0-beta
|
||||
56015ac26f5ab60e3c61b1d09075297b660afa07 Release-6.0.0-RC
|
||||
1719fbd857f28b376639ac2aa0abada0ef2e7560 Release-6.0.0
|
||||
e02f5aebb87e3f07d27376647756caa9762931d8 Release-4.11.4
|
||||
14338b0ab1738fbd8987677ecdb9a73d79fc229d release-4.11.6
|
||||
ce47176bc6b9298741783e20f1fe2672c811f744 release-4.11.7
|
||||
b247b35d821144849f551e02da8ba719f91d5fb0 Release-6.0.2
|
||||
aed55cba29009ad3db48880a7cfb66407ce9805f release-6.0.3
|
||||
0dee9964687ea51ea797984cf7cce3655d6a6558 release-6.0.4
|
||||
@@ -0,0 +1,33 @@
|
||||
Umbraco CMS
|
||||
===========
|
||||
## Watch a five minute introduction video ##
|
||||
|
||||
[](http://umbraco.org/help-and-support/video-tutorials/getting-started/what-is-umbraco)
|
||||
|
||||
## Umbraco - the simple, flexible and friendly ASP.NET CMS ##
|
||||
|
||||
**More than 177,000 sites trust Umbraco**
|
||||
|
||||
For the first time on the Microsoft platform a free user and developer friendly CMS that makes it quick and easy to create websites - or a breeze to build complex web applications. Umbraco has award-winning integration capabilities and supports your ASP.NET User and Custom Controls out of the box. It's a developers dream and your users will love it too.
|
||||
|
||||
Used by more than 177,000 active websites including [http://daviscup.com](http://daviscup.com), [http://heinz.com](http://heinz.com), [http://peugeot.com](http://peugeot.com), [http://www.hersheys.com/](http://www.hersheys.com/) and **The Official ASP.NET and IIS.NET website from Microsoft** ([http://asp.net](http://asp.net) / [http://iis.net](http://iis.net)) you can be sure that the technology is proven, stable and scales.
|
||||
|
||||
To view more examples please visit [http://umbraco.com/why-umbraco/#caseStudies](http://umbraco.com/why-umbraco/#caseStudies)
|
||||
|
||||
## Downloading ##
|
||||
|
||||
The downloadable Umbraco releases live at [http://our.umbraco.org/contribute/releases](http://our.umbraco.org/contribute/releases).
|
||||
|
||||
## Forums ##
|
||||
|
||||
We have a forum running on [http://our.umbraco.org](http://our.umbraco.org). The discussions group on [Google Groups](https://groups.google.com/forum/#!forum/umbraco-dev) is for discussions on developing the core, and not on Umbraco-implementations or extensions in general. For those topics, please use [http://our.umbraco.org](http://our.umbraco.org).
|
||||
|
||||
## Contribute to Umbraco ##
|
||||
|
||||
If you want to contribute back to Umbraco you should check out our [guide to contributing](http://our.umbraco.org/contribute).
|
||||
|
||||
## Found a bug? ##
|
||||
|
||||
Another way you can contribute to Umbraco is by providing issue reports, for information on how to submit an issue report refer to our [online guide for reporting issues](http://our.umbraco.org/contribute/report-an-issue-or-request-a-feature).
|
||||
|
||||
To view existing issues please visit [http://issues.umbraco.org](http://issues.umbraco.org)
|
||||
+3
-1
@@ -1,10 +1,12 @@
|
||||
@ECHO OFF
|
||||
SET release=6.0.6
|
||||
SET release=6.0.7
|
||||
SET comment=
|
||||
SET version=%release%
|
||||
|
||||
IF [%comment%] EQU [] (SET version=%release%) ELSE (SET version=%release%-%comment%)
|
||||
|
||||
ReplaceIISExpressPortNumber.exe ..\src\Umbraco.Web.UI\Umbraco.Web.UI.csproj %release%
|
||||
|
||||
%windir%\Microsoft.NET\Framework\v4.0.30319\msbuild.exe "Build.proj" /p:BUILD_RELEASE=%release% /p:BUILD_COMMENT=%comment%
|
||||
|
||||
echo This file is only here so that the containing folder will be included in the NuGet package, it is safe to delete. > .\_BuildOutput\WebApp\App_Code\dummy.txt
|
||||
|
||||
+20
-1
@@ -82,6 +82,7 @@
|
||||
<SolutionBinFolder>$(BuildFolder)bin\</SolutionBinFolder>
|
||||
<WebAppFolder>$(BuildFolder)WebApp\</WebAppFolder>
|
||||
<WebPiFolder>$(BuildFolder)WebPi\</WebPiFolder>
|
||||
<ConfigsFolder>$(BuildFolder)Configs\</ConfigsFolder>
|
||||
<SolutionBinFolderRelativeToProjects>$(BuildFolderRelativeToProjects)bin\</SolutionBinFolderRelativeToProjects>
|
||||
<SolutionBinFolderAbsolutePath>$(BuildFolderAbsolutePath)bin\</SolutionBinFolderAbsolutePath>
|
||||
<WebAppFolderRelativeToProjects>$(BuildFolderRelativeToProjects)WebApp\</WebAppFolderRelativeToProjects>
|
||||
@@ -194,7 +195,7 @@
|
||||
</Target>
|
||||
|
||||
<!-- Copy the transformed web.config file to the root -->
|
||||
<Target Name="CopyTransformedWebConfig" DependsOnTargets="CopyXmlDocumentation">
|
||||
<Target Name="CopyTransformedWebConfig" DependsOnTargets="CopyTransformedConfig">
|
||||
<ItemGroup>
|
||||
<WebConfigFile Include="..\src\Umbraco.Web.UI\web.$(BuildConfiguration).Config.transformed" />
|
||||
</ItemGroup>
|
||||
@@ -205,6 +206,24 @@
|
||||
SkipUnchangedFiles="false" />
|
||||
</Target>
|
||||
|
||||
<!-- Copy the config files and rename them to *.config.transform -->
|
||||
<Target Name="CopyTransformedConfig" DependsOnTargets="CopyXmlDocumentation">
|
||||
<ItemGroup>
|
||||
<ConfigFiles Include="$(WebAppFolder)config\*.config" />
|
||||
<WebConfigTransformFile Include="$(WebAppFolder)Web.config" />
|
||||
</ItemGroup>
|
||||
|
||||
<Copy SourceFiles="@(ConfigFiles)"
|
||||
DestinationFiles="@(ConfigFiles->'$(ConfigsFolder)\%(RecursiveDir)%(Filename)%(Extension)')"
|
||||
OverwriteReadOnlyFiles="true"
|
||||
SkipUnchangedFiles="false" />
|
||||
|
||||
<Copy SourceFiles="@(WebConfigTransformFile)"
|
||||
DestinationFiles="$(ConfigsFolder)Web.config.transform"
|
||||
OverwriteReadOnlyFiles="true"
|
||||
SkipUnchangedFiles="false" />
|
||||
</Target>
|
||||
|
||||
<!-- Copy the xml documentation to the bin folder -->
|
||||
<Target Name="CopyXmlDocumentation" DependsOnTargets="CompileProjects">
|
||||
<ItemGroup>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
||||
<metadata>
|
||||
<id>UmbracoCms.Core</id>
|
||||
<version>6.0.0-alpha</version>
|
||||
<version>6.0.7</version>
|
||||
<title>Umbraco Cms Core Binaries</title>
|
||||
<authors>Morten Christensen</authors>
|
||||
<owners>Umbraco HQ</owners>
|
||||
@@ -15,9 +15,13 @@
|
||||
<language>en-US</language>
|
||||
<tags>umbraco</tags>
|
||||
<dependencies>
|
||||
<dependency id="Microsoft.AspNet.Mvc" version="[4.0.20710.0]" />
|
||||
<dependency id="Microsoft.AspNet.Mvc" version="4.0" />
|
||||
<dependency id="ServiceStack.Text" version="3.9.21" />
|
||||
<dependency id="Microsoft.AspNet.Mvc.FixedDisplayModes" version="1.0.0" />
|
||||
<dependency id="HtmlAgilityPack" version="1.4.5" />
|
||||
<dependency id="Lucene.Net" version="[2.9.4.1]" />
|
||||
<dependency id="SharpZipLib" version="0.86.0" />
|
||||
<dependency id="MySql.Data" version="[6.6,6.7)" />
|
||||
</dependencies>
|
||||
</metadata>
|
||||
<files>
|
||||
@@ -31,16 +35,11 @@
|
||||
<file src="..\_BuildOutput\WebApp\bin\controls.xml" target="lib\controls.xml" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\CookComputing.XmlRpcV2.dll" target="lib\CookComputing.XmlRpcV2.dll" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\Examine.dll" target="lib\Examine.dll" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\HtmlAgilityPack.dll" target="lib\HtmlAgilityPack.dll" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\ICSharpCode.SharpZipLib.dll" target="lib\ICSharpCode.SharpZipLib.dll" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\interfaces.dll" target="lib\interfaces.dll" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\interfaces.xml" target="lib\interfaces.xml" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\log4net.dll" target="lib\log4net.dll" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\Lucene.Net.dll" target="lib\Lucene.Net.dll" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\Lucene.Net.xml" target="lib\Lucene.Net.xml" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\Microsoft.ApplicationBlocks.Data.dll" target="lib\Microsoft.ApplicationBlocks.Data.dll" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\Microsoft.Web.Helpers.dll" target="lib\Microsoft.Web.Helpers.dll" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\MySql.Data.dll" target="lib\MySql.Data.dll" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\Our.Umbraco.uGoLive.47x.dll" target="lib\Our.Umbraco.uGoLive.47x.dll" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\Our.Umbraco.uGoLive.Checks.dll" target="lib\Our.Umbraco.uGoLive.Checks.dll" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\Our.Umbraco.uGoLive.dll" target="lib\Our.Umbraco.uGoLive.dll" />
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
||||
<metadata>
|
||||
<id>UmbracoCms</id>
|
||||
<version>6.0.0-alpha</version>
|
||||
<version>6.0.7</version>
|
||||
<title>Umbraco Cms</title>
|
||||
<authors>Morten Christensen</authors>
|
||||
<owners>Umbraco HQ</owners>
|
||||
@@ -21,14 +21,14 @@
|
||||
<files>
|
||||
<file src="..\_BuildOutput\WebApp\bin\amd64\**" target="Content\bin\amd64" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\x86\**" target="Content\bin\x86" />
|
||||
<file src="..\_BuildOutput\WebApp\config\*.config" target="Content\config" />
|
||||
<file src="..\_BuildOutput\Configs\**" target="Content\config" exclude="..\_BuildOutput\Configs\Web.config.transform" />
|
||||
<file src="..\_BuildOutput\WebApp\css\**" target="Content\css" />
|
||||
<file src="..\_BuildOutput\WebApp\macroScripts\**" target="Content\macroScripts" />
|
||||
<file src="..\_BuildOutput\WebApp\masterpages\**" target="Content\masterpages" />
|
||||
<file src="..\_BuildOutput\WebApp\media\**" target="Content\media" />
|
||||
<file src="..\_BuildOutput\WebApp\scripts\**" target="Content\scripts" />
|
||||
<file src="..\_BuildOutput\WebApp\usercontrols\**" target="Content\usercontrols" />
|
||||
<file src="..\_BuildOutput\WebApp\Views\**" target="Content\Views" />
|
||||
<file src="..\_BuildOutput\WebApp\Views\**" target="Content\Views" exclude="..\_BuildOutput\WebApp\Views\Web.config" />
|
||||
<file src="..\_BuildOutput\WebApp\xslt\**" target="Content\xslt" />
|
||||
<file src="..\_BuildOutput\WebApp\default.aspx" target="Content\default.aspx" />
|
||||
<file src="..\_BuildOutput\WebApp\Web.config" target="Content\Web.config" />
|
||||
@@ -36,7 +36,7 @@
|
||||
<file src="..\_BuildOutput\WebApp\App_Code\**" target="UmbracoFiles\App_Code" />
|
||||
<file src="..\_BuildOutput\WebApp\App_Data\**" target="UmbracoFiles\App_Data" />
|
||||
<file src="..\_BuildOutput\WebApp\App_Plugins\**" target="UmbracoFiles\App_Plugins" />
|
||||
<file src="..\_BuildOutput\WebApp\config\**" target="UmbracoFiles\config" />
|
||||
<file src="..\_BuildOutput\WebApp\config\splashes\**" target="UmbracoFiles\config\splashes" />
|
||||
<file src="..\_BuildOutput\WebApp\install\**" target="UmbracoFiles\install" />
|
||||
<file src="..\_BuildOutput\WebApp\umbraco\**" target="UmbracoFiles\umbraco" />
|
||||
<file src="..\_BuildOutput\WebApp\umbraco_client\**" target="UmbracoFiles\umbraco_client" />
|
||||
|
||||
@@ -1,15 +1,18 @@
|
||||
A note about running Umbraco from Visual Studio.
|
||||
|
||||
When upgrading your website using nuget a backup of config files and web.config will be created and the files will
|
||||
be overwritten with those from the current release. This means that you'll have to merge the files if you made any
|
||||
changes to the previous config files.
|
||||
When upgrading your website using nuget a backup of config files and web.config will be created. Only the web.config will
|
||||
be overwritten by default to ensure that it has the necessary settings from the current release. This means that you'll
|
||||
have to merge the files if you made any changes to the previous config files.
|
||||
The config files found in the config folder will usually not be changed for patch releases, so they can usually be skipped,
|
||||
but the web.config will have to have its previous "umbracoConfigurationStatus"-appsetting and "umbracoDbDSN" connection string
|
||||
copied over (as a minimum).
|
||||
|
||||
It's not possible to create a deploy package from Visual Studio, which contains everything out of the box. This is
|
||||
due to a number of files and folders that are not added to the Visual Studio project. These folders include:
|
||||
install, umbraco and umbraco_client.
|
||||
A custom deploy script will be added in a later release.
|
||||
|
||||
Please read the release notes on Codeplex:
|
||||
http://umbraco.codeplex.com/releases
|
||||
Please read the release notes on our.umbraco.org:
|
||||
http://our.umbraco.org/contribute/releases
|
||||
|
||||
- Umbraco
|
||||
Binary file not shown.
Binary file not shown.
@@ -17,7 +17,8 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup Condition=" '$(PackageSources)' == '' ">
|
||||
<!-- Package sources used to restore packages. By default will used the registered sources under %APPDATA%\NuGet\NuGet.Config -->
|
||||
<!-- Package sources used to restore packages. By default, registered sources under %APPDATA%\NuGet\NuGet.Config will be used -->
|
||||
<!-- The official NuGet package source (https://nuget.org/api/v2/) will be excluded if package sources are specified and it does not appear in the list -->
|
||||
<!--
|
||||
<PackageSource Include="https://nuget.org/api/v2/" />
|
||||
<PackageSource Include="https://my-nuget-source/nuget/" />
|
||||
@@ -54,10 +55,10 @@
|
||||
<BuildCommand>$(NuGetCommand) pack "$(ProjectPath)" -p Configuration=$(Configuration) -o "$(PackageOutputDir)" -symbols</BuildCommand>
|
||||
|
||||
<!-- We need to ensure packages are restored prior to assembly resolve -->
|
||||
<ResolveReferencesDependsOn Condition="$(RestorePackages) == 'true'">
|
||||
<BuildDependsOn Condition="$(RestorePackages) == 'true'">
|
||||
RestorePackages;
|
||||
$(ResolveReferencesDependsOn);
|
||||
</ResolveReferencesDependsOn>
|
||||
$(BuildDependsOn);
|
||||
</BuildDependsOn>
|
||||
|
||||
<!-- Make the build depend on restore packages -->
|
||||
<BuildDependsOn Condition="$(BuildPackage) == 'true'">
|
||||
@@ -75,7 +76,7 @@
|
||||
This effectively acts as a lock that makes sure that the download operation will only happen once and all
|
||||
parallel builds will have to wait for it to complete.
|
||||
-->
|
||||
<MsBuild Targets="_DownloadNuGet" Projects="$(MSBuildThisFileFullPath)" Properties="Configuration=NOT_IMPORTANT" />
|
||||
<MsBuild Targets="_DownloadNuGet" Projects="$(MSBuildThisFileFullPath)" Properties="Configuration=NOT_IMPORTANT;DownloadNuGetExe=$(DownloadNuGetExe)" />
|
||||
</Target>
|
||||
|
||||
<Target Name="_DownloadNuGet">
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace Umbraco.Core.Configuration
|
||||
{
|
||||
public class UmbracoVersion
|
||||
{
|
||||
private static readonly Version Version = new Version("6.0.6");
|
||||
private static readonly Version Version = new Version("6.0.7");
|
||||
|
||||
/// <summary>
|
||||
/// Gets the current version of Umbraco.
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Drawing2D;
|
||||
using System.Drawing.Imaging;
|
||||
@@ -14,11 +15,56 @@ using Umbraco.Core.Media;
|
||||
using Umbraco.Core.Models.Membership;
|
||||
using Umbraco.Core.Persistence;
|
||||
using Umbraco.Core.Persistence.UnitOfWork;
|
||||
using Umbraco.Core.Services;
|
||||
|
||||
namespace Umbraco.Core.Models
|
||||
{
|
||||
public static class ContentExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Checks if the IContentBase has children
|
||||
/// </summary>
|
||||
/// <param name="content"></param>
|
||||
/// <param name="services"></param>
|
||||
/// <returns></returns>
|
||||
/// <remarks>
|
||||
/// This is a bit of a hack because we need to type check!
|
||||
/// </remarks>
|
||||
internal static bool HasChildren(IContentBase content, ServiceContext services)
|
||||
{
|
||||
if (content is IContent)
|
||||
{
|
||||
return services.ContentService.HasChildren(content.Id);
|
||||
}
|
||||
if (content is IMedia)
|
||||
{
|
||||
return services.MediaService.HasChildren(content.Id);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the children for the content base item
|
||||
/// </summary>
|
||||
/// <param name="content"></param>
|
||||
/// <param name="services"></param>
|
||||
/// <returns></returns>
|
||||
/// <remarks>
|
||||
/// This is a bit of a hack because we need to type check!
|
||||
/// </remarks>
|
||||
internal static IEnumerable<IContentBase> Children(IContentBase content, ServiceContext services)
|
||||
{
|
||||
if (content is IContent)
|
||||
{
|
||||
return services.ContentService.GetChildren(content.Id);
|
||||
}
|
||||
if (content is IMedia)
|
||||
{
|
||||
return services.MediaService.GetChildren(content.Id);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set property values by alias with an annonymous object
|
||||
/// </summary>
|
||||
|
||||
@@ -408,6 +408,15 @@ namespace Umbraco.Core.Models
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Removes a PropertyGroup from the current ContentType
|
||||
/// </summary>
|
||||
/// <param name="propertyGroupName">Name of the <see cref="PropertyGroup"/> to remove</param>
|
||||
public void RemovePropertyGroup(string propertyGroupName)
|
||||
{
|
||||
PropertyGroups.RemoveItem(propertyGroupName);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets the ParentId from the lazy integer id
|
||||
/// </summary>
|
||||
/// <param name="id">Id of the Parent</param>
|
||||
|
||||
@@ -20,8 +20,10 @@ namespace Umbraco.Core.Models
|
||||
{
|
||||
}
|
||||
|
||||
protected ContentTypeCompositionBase(IContentTypeBase parent) : base(parent)
|
||||
protected ContentTypeCompositionBase(IContentTypeComposition parent)
|
||||
: base(parent)
|
||||
{
|
||||
AddContentType(parent);
|
||||
}
|
||||
|
||||
private static readonly PropertyInfo ContentTypeCompositionSelector =
|
||||
@@ -73,7 +75,7 @@ namespace Umbraco.Core.Models
|
||||
if (contentType.ContentTypeComposition.Any(x => x.CompositionAliases().Any(ContentTypeCompositionExists)))
|
||||
return false;
|
||||
|
||||
if (!ContentTypeCompositionExists(contentType.Alias))
|
||||
if (ContentTypeCompositionExists(contentType.Alias) == false)
|
||||
{
|
||||
_contentTypeComposition.Add(contentType);
|
||||
OnPropertyChanged(ContentTypeCompositionSelector);
|
||||
|
||||
@@ -65,6 +65,12 @@ namespace Umbraco.Core.Models
|
||||
void RemovePropertyType(string propertyTypeAlias);
|
||||
|
||||
/// <summary>
|
||||
/// Removes a PropertyGroup from the current ContentType
|
||||
/// </summary>
|
||||
/// <param name="propertyGroupName">Name of the <see cref="PropertyGroup"/> to remove</param>
|
||||
void RemovePropertyGroup(string propertyGroupName);
|
||||
|
||||
/// <summary>
|
||||
/// Sets the ParentId from the lazy integer id
|
||||
/// </summary>
|
||||
/// <param name="id">Id of the Parent</param>
|
||||
|
||||
@@ -97,6 +97,14 @@ namespace Umbraco.Core.Models
|
||||
return this.Any(x => x.Name == groupName);
|
||||
}
|
||||
|
||||
public void RemoveItem(string propertyGroupName)
|
||||
{
|
||||
var key = IndexOfKey(propertyGroupName);
|
||||
//Only removes an item if the key was found
|
||||
if (key != -1)
|
||||
RemoveItem(key);
|
||||
}
|
||||
|
||||
public int IndexOfKey(string key)
|
||||
{
|
||||
for (var i = 0; i < this.Count; i++)
|
||||
|
||||
@@ -66,17 +66,18 @@ namespace Umbraco.Core.Persistence.Factories
|
||||
if (property.HasIdentity)
|
||||
dto.Id = property.Id;
|
||||
|
||||
if (property.DataTypeDatabaseType == DataTypeDatabaseType.Integer && property.Value != null && string.IsNullOrWhiteSpace(property.Value.ToString()) == false)
|
||||
if (property.DataTypeDatabaseType == DataTypeDatabaseType.Integer)
|
||||
{
|
||||
if (property.Value is bool)
|
||||
if (property.Value is bool || property.PropertyType.DataTypeId == new Guid("38b352c1-e9f8-4fd8-9324-9a2eab06d97a"))
|
||||
{
|
||||
int val = Convert.ToInt32(property.Value);
|
||||
dto.Integer = val;
|
||||
dto.Integer = property.Value != null && string.IsNullOrEmpty(property.Value.ToString())
|
||||
? 0
|
||||
: Convert.ToInt32(property.Value);
|
||||
}
|
||||
else
|
||||
{
|
||||
int val;
|
||||
if (int.TryParse(property.Value.ToString(), out val))
|
||||
if ((property.Value != null && string.IsNullOrWhiteSpace(property.Value.ToString()) == false) && int.TryParse(property.Value.ToString(), out val))
|
||||
{
|
||||
dto.Integer = val;
|
||||
}
|
||||
|
||||
@@ -27,6 +27,8 @@ namespace Umbraco.Core.Persistence.Repositories
|
||||
{
|
||||
_contentTypeRepository = contentTypeRepository;
|
||||
_templateRepository = templateRepository;
|
||||
|
||||
EnsureUniqueNaming = true;
|
||||
}
|
||||
|
||||
public ContentRepository(IDatabaseUnitOfWork work, IRepositoryCacheProvider cache, IContentTypeRepository contentTypeRepository, ITemplateRepository templateRepository)
|
||||
@@ -34,8 +36,12 @@ namespace Umbraco.Core.Persistence.Repositories
|
||||
{
|
||||
_contentTypeRepository = contentTypeRepository;
|
||||
_templateRepository = templateRepository;
|
||||
|
||||
EnsureUniqueNaming = true;
|
||||
}
|
||||
|
||||
public bool EnsureUniqueNaming { get; set; }
|
||||
|
||||
#region Overrides of RepositoryBase<IContent>
|
||||
|
||||
protected override IContent PerformGet(int id)
|
||||
@@ -180,6 +186,9 @@ namespace Umbraco.Core.Persistence.Repositories
|
||||
{
|
||||
((Content)entity).AddingEntity();
|
||||
|
||||
//Ensure unique name on the same level
|
||||
entity.Name = EnsureUniqueNodeName(entity.ParentId, entity.Name);
|
||||
|
||||
var factory = new ContentFactory(NodeObjectTypeId, entity.Id);
|
||||
var dto = factory.BuildDto(entity);
|
||||
|
||||
@@ -260,6 +269,9 @@ namespace Umbraco.Core.Persistence.Repositories
|
||||
entity.UpdateDate = DateTime.Now;
|
||||
}
|
||||
|
||||
//Ensure unique name on the same level
|
||||
entity.Name = EnsureUniqueNodeName(entity.ParentId, entity.Name, entity.Id);
|
||||
|
||||
//Look up parent to get and set the correct Path and update SortOrder if ParentId has changed
|
||||
if (((ICanBeDirty)entity).IsPropertyDirty("ParentId"))
|
||||
{
|
||||
@@ -487,5 +499,77 @@ namespace Umbraco.Core.Persistence.Repositories
|
||||
|
||||
return new PropertyCollection(properties);
|
||||
}
|
||||
|
||||
private string EnsureUniqueNodeName(int parentId, string nodeName, int id = 0)
|
||||
{
|
||||
if (EnsureUniqueNaming == false)
|
||||
return nodeName;
|
||||
|
||||
var sql = new Sql();
|
||||
sql.Select("*")
|
||||
.From<NodeDto>()
|
||||
.Where<NodeDto>(x => x.ParentId == parentId && x.Text.StartsWith(nodeName));
|
||||
|
||||
int uniqueNumber = 1;
|
||||
var currentName = nodeName;
|
||||
|
||||
var dtos = Database.Fetch<NodeDto>(sql);
|
||||
if (dtos.Any())
|
||||
{
|
||||
var results = dtos.OrderBy(x => x.Text, new SimilarNodeNameComparer());
|
||||
foreach (var dto in results)
|
||||
{
|
||||
if(id != 0 && id == dto.NodeId) continue;
|
||||
|
||||
if (dto.Text.ToLowerInvariant().Equals(currentName.ToLowerInvariant()))
|
||||
{
|
||||
currentName = nodeName + string.Format(" ({0})", uniqueNumber);
|
||||
uniqueNumber++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return currentName;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Comparer that takes into account the duplicate index of a node name
|
||||
/// This is needed as a normal alphabetic sort would go Page (1), Page (10), Page (2) etc.
|
||||
/// </summary>
|
||||
private class SimilarNodeNameComparer : IComparer<string>
|
||||
{
|
||||
public int Compare(string x, string y)
|
||||
{
|
||||
if (x.LastIndexOf(')') == x.Length - 1 && y.LastIndexOf(')') == y.Length - 1)
|
||||
{
|
||||
if (x.ToLower().Substring(0, x.LastIndexOf('(')) == y.ToLower().Substring(0, y.LastIndexOf('(')))
|
||||
{
|
||||
int xDuplicateIndex = ExtractDuplicateIndex(x);
|
||||
int yDuplicateIndex = ExtractDuplicateIndex(y);
|
||||
|
||||
if (xDuplicateIndex != 0 && yDuplicateIndex != 0)
|
||||
{
|
||||
return xDuplicateIndex.CompareTo(yDuplicateIndex);
|
||||
}
|
||||
}
|
||||
}
|
||||
return String.Compare(x.ToLower(), y.ToLower(), StringComparison.Ordinal);
|
||||
}
|
||||
|
||||
private int ExtractDuplicateIndex(string text)
|
||||
{
|
||||
int index = 0;
|
||||
|
||||
if (text.LastIndexOf('(') != -1 && text.LastIndexOf('(') < text.Length - 2)
|
||||
{
|
||||
int startPos = text.LastIndexOf('(') + 1;
|
||||
int length = text.Length - 1 - startPos;
|
||||
|
||||
int.TryParse(text.Substring(startPos, length), out index);
|
||||
}
|
||||
|
||||
return index;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -189,7 +189,7 @@ namespace Umbraco.Core.Persistence.Repositories
|
||||
.Where<NodeDto>(x => x.NodeObjectType == new Guid("C66BA18E-EAF3-4CFF-8A22-41B16D66A972"))
|
||||
.Where<ContentDto>(x => x.ContentTypeId == entity.Id);
|
||||
|
||||
var contentDtos = Database.Fetch<DocumentDto, ContentVersionDto, ContentDto, NodeDto>(sql);
|
||||
var contentDtos = Database.Fetch<ContentDto, NodeDto>(sql);
|
||||
//Loop through all tracked keys, which corresponds to the ContentTypes that has been removed from the composition
|
||||
foreach (var key in compositionBase.RemovedContentTypeKeyTracker)
|
||||
{
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace Umbraco.Core.Persistence
|
||||
uow,
|
||||
RuntimeCacheProvider.Current,
|
||||
CreateContentTypeRepository(uow),
|
||||
CreateTemplateRepository(uow));
|
||||
CreateTemplateRepository(uow)) { EnsureUniqueNaming = Umbraco.Core.Configuration.UmbracoSettings.EnsureUniqueNaming };
|
||||
}
|
||||
|
||||
public virtual IContentTypeRepository CreateContentTypeRepository(IDatabaseUnitOfWork uow)
|
||||
|
||||
@@ -301,7 +301,7 @@ namespace Umbraco.Core.Services
|
||||
using (var repository = _repositoryFactory.CreateContentRepository(_uowProvider.GetUnitOfWork()))
|
||||
{
|
||||
var query = Query<IContent>.Builder.Where(x => x.ParentId == id);
|
||||
var contents = repository.GetByQuery(query);
|
||||
var contents = repository.GetByQuery(query).OrderBy(x => x.SortOrder);
|
||||
|
||||
return contents;
|
||||
}
|
||||
@@ -952,7 +952,10 @@ namespace Umbraco.Core.Services
|
||||
var uow = _uowProvider.GetUnitOfWork();
|
||||
using (var repository = _repositoryFactory.CreateContentRepository(uow))
|
||||
{
|
||||
content.WriterId = userId;
|
||||
// Update the create author and last edit author
|
||||
copy.CreatorId = userId;
|
||||
copy.WriterId = userId;
|
||||
|
||||
repository.AddOrUpdate(copy);
|
||||
uow.Commit();
|
||||
|
||||
@@ -1027,7 +1030,7 @@ namespace Umbraco.Core.Services
|
||||
}
|
||||
|
||||
//Look for children and copy those as well
|
||||
var children = GetChildren(content.Id).OrderBy(x => x.SortOrder);
|
||||
var children = GetChildren(content.Id);
|
||||
foreach (var child in children)
|
||||
{
|
||||
Copy(child, copy.Id, relateToOriginal, userId);
|
||||
@@ -1088,6 +1091,7 @@ namespace Umbraco.Core.Services
|
||||
{
|
||||
content.WriterId = userId;
|
||||
content.CreatorId = userId;
|
||||
content.ChangePublishedState(PublishedState.Unpublished);
|
||||
|
||||
repository.AddOrUpdate(content);
|
||||
uow.Commit();
|
||||
@@ -1102,7 +1106,7 @@ namespace Umbraco.Core.Services
|
||||
|
||||
/// <summary>
|
||||
/// Sorts a collection of <see cref="IContent"/> objects by updating the SortOrder according
|
||||
/// to the ordering of items in the passed in <see cref="SortedSet{T}"/>.
|
||||
/// to the ordering of items in the passed in <see cref="IEnumerable{T}"/>.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Using this method will ensure that the Published-state is maintained upon sorting
|
||||
@@ -1112,7 +1116,7 @@ namespace Umbraco.Core.Services
|
||||
/// <param name="userId"></param>
|
||||
/// <param name="raiseEvents"></param>
|
||||
/// <returns>True if sorting succeeded, otherwise False</returns>
|
||||
public bool Sort(SortedSet<IContent> items, int userId = 0, bool raiseEvents = true)
|
||||
public bool Sort(IEnumerable<IContent> items, int userId = 0, bool raiseEvents = true)
|
||||
{
|
||||
if (raiseEvents)
|
||||
{
|
||||
|
||||
@@ -300,7 +300,7 @@ namespace Umbraco.Core.Services
|
||||
|
||||
/// <summary>
|
||||
/// Sorts a collection of <see cref="IContent"/> objects by updating the SortOrder according
|
||||
/// to the ordering of items in the passed in <see cref="SortedSet{T}"/>.
|
||||
/// to the ordering of items in the passed in <see cref="IEnumerable{T}"/>.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Using this method will ensure that the Published-state is maintained upon sorting
|
||||
@@ -310,7 +310,7 @@ namespace Umbraco.Core.Services
|
||||
/// <param name="userId"></param>
|
||||
/// <param name="raiseEvents"></param>
|
||||
/// <returns>True if sorting succeeded, otherwise False</returns>
|
||||
bool Sort(SortedSet<IContent> items, int userId = 0, bool raiseEvents = true);
|
||||
bool Sort(IEnumerable<IContent> items, int userId = 0, bool raiseEvents = true);
|
||||
|
||||
/// <summary>
|
||||
/// Creates and saves an <see cref="IContent"/> object using the alias of the <see cref="IContentType"/>
|
||||
|
||||
@@ -197,13 +197,13 @@ namespace Umbraco.Core.Services
|
||||
|
||||
/// <summary>
|
||||
/// Sorts a collection of <see cref="IMedia"/> objects by updating the SortOrder according
|
||||
/// to the ordering of items in the passed in <see cref="SortedSet{T}"/>.
|
||||
/// to the ordering of items in the passed in <see cref="IEnumerable{T}"/>.
|
||||
/// </summary>
|
||||
/// <param name="items"></param>
|
||||
/// <param name="userId"></param>
|
||||
/// <param name="raiseEvents"></param>
|
||||
/// <returns>True if sorting succeeded, otherwise False</returns>
|
||||
bool Sort(SortedSet<IMedia> items, int userId = 0, bool raiseEvents = true);
|
||||
bool Sort(IEnumerable<IMedia> items, int userId = 0, bool raiseEvents = true);
|
||||
|
||||
/// <summary>
|
||||
/// Creates an <see cref="IMedia"/> object using the alias of the <see cref="IMediaType"/>
|
||||
|
||||
@@ -711,13 +711,13 @@ namespace Umbraco.Core.Services
|
||||
|
||||
/// <summary>
|
||||
/// Sorts a collection of <see cref="IMedia"/> objects by updating the SortOrder according
|
||||
/// to the ordering of items in the passed in <see cref="SortedSet{T}"/>.
|
||||
/// to the ordering of items in the passed in <see cref="IEnumerable{T}"/>.
|
||||
/// </summary>
|
||||
/// <param name="items"></param>
|
||||
/// <param name="userId"></param>
|
||||
/// <param name="raiseEvents"></param>
|
||||
/// <returns>True if sorting succeeded, otherwise False</returns>
|
||||
public bool Sort(SortedSet<IMedia> items, int userId = 0, bool raiseEvents = true)
|
||||
public bool Sort(IEnumerable<IMedia> items, int userId = 0, bool raiseEvents = true)
|
||||
{
|
||||
if (raiseEvents)
|
||||
{
|
||||
|
||||
@@ -321,7 +321,7 @@ namespace Umbraco.Core.Services
|
||||
foreach (var templateElement in allowedTemplatesElement.Elements("Template"))
|
||||
{
|
||||
var alias = templateElement.Value;
|
||||
var template = _fileService.GetTemplate(alias);
|
||||
var template = _fileService.GetTemplate(alias.ToSafeAlias());
|
||||
if (template != null)
|
||||
{
|
||||
if(allowedTemplates.Any(x => x.Id == template.Id)) continue;
|
||||
@@ -341,7 +341,7 @@ namespace Umbraco.Core.Services
|
||||
|
||||
if (string.IsNullOrEmpty(defaultTemplateElement.Value) == false)
|
||||
{
|
||||
var defaultTemplate = _fileService.GetTemplate(defaultTemplateElement.Value);
|
||||
var defaultTemplate = _fileService.GetTemplate(defaultTemplateElement.Value.ToSafeAlias());
|
||||
if (defaultTemplate != null)
|
||||
{
|
||||
contentType.SetDefaultTemplate(defaultTemplate);
|
||||
|
||||
@@ -870,5 +870,34 @@ namespace Umbraco.Core
|
||||
|
||||
return alias;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// An extension method that returns a new string in which all occurrences of a
|
||||
/// specified string in the current instance are replaced with another specified string.
|
||||
/// StringComparison specifies the type of search to use for the specified string.
|
||||
/// </summary>
|
||||
/// <param name="source">Current instance of the string</param>
|
||||
/// <param name="oldString">Specified string to replace</param>
|
||||
/// <param name="newString">Specified string to inject</param>
|
||||
/// <param name="stringComparison">String Comparison object to specify search type</param>
|
||||
/// <returns>Updated string</returns>
|
||||
public static string Replace(this string source, string oldString, string newString, StringComparison stringComparison)
|
||||
{
|
||||
var index = source.IndexOf(oldString, stringComparison);
|
||||
|
||||
// Determine if we found a match
|
||||
var matchFound = index >= 0;
|
||||
|
||||
if (matchFound)
|
||||
{
|
||||
// Remove the old text
|
||||
source = source.Remove(index, oldString.Length);
|
||||
|
||||
// Add the replacemenet text
|
||||
source = source.Insert(index, newString);
|
||||
}
|
||||
|
||||
return source;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -508,7 +508,7 @@ namespace Umbraco.Core
|
||||
foreach (var typeToSearch in subTypesToSearch)
|
||||
{
|
||||
//recursively find the types inheriting from this sub type in the other non-scanned assemblies.
|
||||
var foundTypes = GetClasses(typeToSearch, otherAssemblies, onlyConcreteClasses);
|
||||
var foundTypes = GetClasses(typeToSearch, otherAssemblies, onlyConcreteClasses, additionalFilter);
|
||||
foundAssignableTypes.AddRange(foundTypes);
|
||||
}
|
||||
|
||||
|
||||
@@ -696,7 +696,6 @@
|
||||
<Compile Include="Xml\DynamicContext.cs" />
|
||||
<Compile Include="Xml\XmlNamespaces.cs" />
|
||||
<Compile Include="Xml\XmlNodeListFactory.cs" />
|
||||
<Compile Include="Xml\XmlNodeExtensions.cs" />
|
||||
<Compile Include="Xml\XPathVariable.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Xml;
|
||||
using System.Xml.XPath;
|
||||
|
||||
// source: mvpxml.codeplex.com
|
||||
|
||||
namespace Umbraco.Core.Xml
|
||||
{
|
||||
internal static class XmlNodeExtensions
|
||||
{
|
||||
static XPathNodeIterator Select(string expression, XPathNavigator source, params XPathVariable[] variables)
|
||||
{
|
||||
var expr = source.Compile(expression);
|
||||
var context = new DynamicContext();
|
||||
foreach (var variable in variables)
|
||||
context.AddVariable(variable.Name, variable.Value);
|
||||
expr.SetContext(context);
|
||||
return source.Select(expr);
|
||||
}
|
||||
|
||||
public static XmlNodeList SelectNodes(this XmlNode source, string expression, IEnumerable<XPathVariable> variables)
|
||||
{
|
||||
var av = variables == null ? null : variables.ToArray();
|
||||
return SelectNodes(source, expression, av);
|
||||
}
|
||||
|
||||
public static XmlNodeList SelectNodes(this XmlNode source, string expression, params XPathVariable[] variables)
|
||||
{
|
||||
if (variables == null || variables.Length == 0 || variables[0] == null)
|
||||
return source.SelectNodes(expression);
|
||||
|
||||
var iterator = Select(expression, source.CreateNavigator(), variables);
|
||||
return XmlNodeListFactory.CreateNodeList(iterator);
|
||||
}
|
||||
|
||||
public static XmlNode SelectSingleNode(this XmlNode source, string expression, IEnumerable<XPathVariable> variables)
|
||||
{
|
||||
var av = variables == null ? null : variables.ToArray();
|
||||
return SelectSingleNode(source, expression, av);
|
||||
}
|
||||
|
||||
public static XmlNode SelectSingleNode(this XmlNode source, string expression, params XPathVariable[] variables)
|
||||
{
|
||||
if (variables == null || variables.Length == 0 || variables[0] == null)
|
||||
return source.SelectSingleNode(expression);
|
||||
|
||||
return SelectNodes(source, expression, variables).Cast<XmlNode>().FirstOrDefault();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,10 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Xml;
|
||||
using System.Xml.Linq;
|
||||
using System.Xml.XPath;
|
||||
using Umbraco.Core.Xml;
|
||||
|
||||
namespace Umbraco.Core
|
||||
{
|
||||
@@ -9,6 +13,45 @@ namespace Umbraco.Core
|
||||
/// </summary>
|
||||
internal static class XmlExtensions
|
||||
{
|
||||
static XPathNodeIterator Select(string expression, XPathNavigator source, params XPathVariable[] variables)
|
||||
{
|
||||
var expr = source.Compile(expression);
|
||||
var context = new DynamicContext();
|
||||
foreach (var variable in variables)
|
||||
context.AddVariable(variable.Name, variable.Value);
|
||||
expr.SetContext(context);
|
||||
return source.Select(expr);
|
||||
}
|
||||
|
||||
public static XmlNodeList SelectNodes(this XmlNode source, string expression, IEnumerable<XPathVariable> variables)
|
||||
{
|
||||
var av = variables == null ? null : variables.ToArray();
|
||||
return SelectNodes(source, expression, av);
|
||||
}
|
||||
|
||||
public static XmlNodeList SelectNodes(this XmlNode source, string expression, params XPathVariable[] variables)
|
||||
{
|
||||
if (variables == null || variables.Length == 0 || variables[0] == null)
|
||||
return source.SelectNodes(expression);
|
||||
|
||||
var iterator = Select(expression, source.CreateNavigator(), variables);
|
||||
return XmlNodeListFactory.CreateNodeList(iterator);
|
||||
}
|
||||
|
||||
public static XmlNode SelectSingleNode(this XmlNode source, string expression, IEnumerable<XPathVariable> variables)
|
||||
{
|
||||
var av = variables == null ? null : variables.ToArray();
|
||||
return SelectSingleNode(source, expression, av);
|
||||
}
|
||||
|
||||
public static XmlNode SelectSingleNode(this XmlNode source, string expression, params XPathVariable[] variables)
|
||||
{
|
||||
if (variables == null || variables.Length == 0 || variables[0] == null)
|
||||
return source.SelectSingleNode(expression);
|
||||
|
||||
return SelectNodes(source, expression, variables).Cast<XmlNode>().FirstOrDefault();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Converts from an XDocument to an XmlDocument
|
||||
/// </summary>
|
||||
|
||||
@@ -3,6 +3,7 @@ using System.Xml;
|
||||
using NUnit.Framework;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Core.Configuration;
|
||||
using Umbraco.Tests.PublishedContent;
|
||||
using Umbraco.Tests.TestHelpers;
|
||||
using Umbraco.Web;
|
||||
using Umbraco.Web.Routing;
|
||||
@@ -11,7 +12,7 @@ using umbraco.BusinessLogic;
|
||||
namespace Umbraco.Tests.ContentStores
|
||||
{
|
||||
[TestFixture]
|
||||
public class PublishContentStoreTests
|
||||
public class PublishContentStoreTests
|
||||
{
|
||||
private FakeHttpContextFactory _httpContextFactory;
|
||||
private UmbracoContext _umbracoContext;
|
||||
@@ -74,6 +75,8 @@ namespace Umbraco.Tests.ContentStores
|
||||
_umbracoContext = new UmbracoContext(_httpContextFactory.HttpContext,
|
||||
new ApplicationContext(),
|
||||
new DefaultRoutesCache(false));
|
||||
|
||||
UmbracoSettings.UseLegacyXmlSchema = false;
|
||||
|
||||
_umbracoContext.GetXmlDelegate = () =>
|
||||
{
|
||||
|
||||
@@ -68,7 +68,141 @@ namespace Umbraco.Tests.Services
|
||||
Assert.That(ctHomePage.HasIdentity, Is.True);
|
||||
Assert.That(homeDoc.HasIdentity, Is.True);
|
||||
Assert.That(homeDoc.ContentTypeId, Is.EqualTo(ctHomePage.Id));
|
||||
Assert.That(addedContentType, Is.True);
|
||||
Assert.That(addedContentType, Is.False);//False because its already added via the ContentType ctor
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Can_Remove_ContentType_Composition_From_ContentType()
|
||||
{
|
||||
//Test for U4-2234
|
||||
var cts = ServiceContext.ContentTypeService;
|
||||
//Arrange
|
||||
var component = CreateComponent();
|
||||
cts.Save(component);
|
||||
var banner = CreateBannerComponent(component);
|
||||
cts.Save(banner);
|
||||
var site = CreateSite();
|
||||
cts.Save(site);
|
||||
var homepage = CreateHomepage(site);
|
||||
cts.Save(homepage);
|
||||
|
||||
//Add banner to homepage
|
||||
var added = homepage.AddContentType(banner);
|
||||
cts.Save(homepage);
|
||||
|
||||
//Assert composition
|
||||
var bannerExists = homepage.ContentTypeCompositionExists(banner.Alias);
|
||||
var bannerPropertyExists = homepage.CompositionPropertyTypes.Any(x => x.Alias.Equals("bannerName"));
|
||||
Assert.That(added, Is.True);
|
||||
Assert.That(bannerExists, Is.True);
|
||||
Assert.That(bannerPropertyExists, Is.True);
|
||||
Assert.That(homepage.CompositionPropertyTypes.Count(), Is.EqualTo(6));
|
||||
|
||||
//Remove banner from homepage
|
||||
var removed = homepage.RemoveContentType(banner.Alias);
|
||||
cts.Save(homepage);
|
||||
|
||||
//Assert composition
|
||||
var bannerStillExists = homepage.ContentTypeCompositionExists(banner.Alias);
|
||||
var bannerPropertyStillExists = homepage.CompositionPropertyTypes.Any(x => x.Alias.Equals("bannerName"));
|
||||
Assert.That(removed, Is.True);
|
||||
Assert.That(bannerStillExists, Is.False);
|
||||
Assert.That(bannerPropertyStillExists, Is.False);
|
||||
Assert.That(homepage.CompositionPropertyTypes.Count(), Is.EqualTo(4));
|
||||
}
|
||||
|
||||
private ContentType CreateComponent()
|
||||
{
|
||||
var component = new ContentType(-1)
|
||||
{
|
||||
Alias = "component",
|
||||
Name = "Component",
|
||||
Description = "ContentType used for Component grouping",
|
||||
Icon = ".sprTreeDoc3",
|
||||
Thumbnail = "doc.png",
|
||||
SortOrder = 1,
|
||||
CreatorId = 0,
|
||||
Trashed = false
|
||||
};
|
||||
|
||||
var contentCollection = new PropertyTypeCollection();
|
||||
contentCollection.Add(new PropertyType(new Guid(), DataTypeDatabaseType.Ntext) { Alias = "componentGroup", Name = "Component Group", Description = "", HelpText = "", Mandatory = false, SortOrder = 1, DataTypeDefinitionId = -88 });
|
||||
component.PropertyGroups.Add(new PropertyGroup(contentCollection) { Name = "Component", SortOrder = 1 });
|
||||
|
||||
return component;
|
||||
}
|
||||
|
||||
private ContentType CreateBannerComponent(ContentType parent)
|
||||
{
|
||||
var banner = new ContentType(parent)
|
||||
{
|
||||
Alias = "banner",
|
||||
Name = "Banner Component",
|
||||
Description = "ContentType used for Banner Component",
|
||||
Icon = ".sprTreeDoc3",
|
||||
Thumbnail = "doc.png",
|
||||
SortOrder = 1,
|
||||
CreatorId = 0,
|
||||
Trashed = false
|
||||
};
|
||||
|
||||
var propertyType = new PropertyType(new Guid(), DataTypeDatabaseType.Ntext)
|
||||
{
|
||||
Alias = "bannerName",
|
||||
Name = "Banner Name",
|
||||
Description = "",
|
||||
HelpText = "",
|
||||
Mandatory = false,
|
||||
SortOrder = 2,
|
||||
DataTypeDefinitionId = -88
|
||||
};
|
||||
banner.AddPropertyType(propertyType, "Component");
|
||||
return banner;
|
||||
}
|
||||
|
||||
private ContentType CreateSite()
|
||||
{
|
||||
var site = new ContentType(-1)
|
||||
{
|
||||
Alias = "site",
|
||||
Name = "Site",
|
||||
Description = "ContentType used for Site inheritence",
|
||||
Icon = ".sprTreeDoc3",
|
||||
Thumbnail = "doc.png",
|
||||
SortOrder = 2,
|
||||
CreatorId = 0,
|
||||
Trashed = false
|
||||
};
|
||||
|
||||
var contentCollection = new PropertyTypeCollection();
|
||||
contentCollection.Add(new PropertyType(new Guid(), DataTypeDatabaseType.Ntext) { Alias = "hostname", Name = "Hostname", Description = "", HelpText = "", Mandatory = false, SortOrder = 1, DataTypeDefinitionId = -88 });
|
||||
site.PropertyGroups.Add(new PropertyGroup(contentCollection) { Name = "Site Settings", SortOrder = 1 });
|
||||
|
||||
return site;
|
||||
}
|
||||
|
||||
private ContentType CreateHomepage(ContentType parent)
|
||||
{
|
||||
var contentType = new ContentType(parent)
|
||||
{
|
||||
Alias = "homepage",
|
||||
Name = "Homepage",
|
||||
Description = "ContentType used for the Homepage",
|
||||
Icon = ".sprTreeDoc3",
|
||||
Thumbnail = "doc.png",
|
||||
SortOrder = 1,
|
||||
CreatorId = 0,
|
||||
Trashed = false
|
||||
};
|
||||
|
||||
var contentCollection = new PropertyTypeCollection();
|
||||
contentCollection.Add(new PropertyType(new Guid(), DataTypeDatabaseType.Ntext) { Alias = "title", Name = "Title", Description = "", HelpText = "", Mandatory = false, SortOrder = 1, DataTypeDefinitionId = -88 });
|
||||
contentCollection.Add(new PropertyType(new Guid(), DataTypeDatabaseType.Ntext) { Alias = "bodyText", Name = "Body Text", Description = "", HelpText = "", Mandatory = false, SortOrder = 2, DataTypeDefinitionId = -87 });
|
||||
contentCollection.Add(new PropertyType(new Guid(), DataTypeDatabaseType.Ntext) { Alias = "author", Name = "Author", Description = "Name of the author", HelpText = "", Mandatory = false, SortOrder = 3, DataTypeDefinitionId = -88 });
|
||||
|
||||
contentType.PropertyGroups.Add(new PropertyGroup(contentCollection) { Name = "Content", SortOrder = 1 });
|
||||
|
||||
return contentType;
|
||||
}
|
||||
|
||||
private IEnumerable<IContentType> CreateContentTypeHierarchy()
|
||||
|
||||
@@ -447,7 +447,9 @@ namespace Umbraco.Tests
|
||||
"HtmlAgilityPack.",
|
||||
"TidyNet.",
|
||||
"ICSharpCode.",
|
||||
"CookComputing."
|
||||
"CookComputing.",
|
||||
/* Mono */
|
||||
"MonoDevelop.NUnit"
|
||||
};
|
||||
|
||||
public static IEnumerable<Type> FindClassesOfTypeWithAttribute<T, TAttribute>()
|
||||
|
||||
@@ -334,6 +334,13 @@
|
||||
<DependentUpon>EditMacro.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Umbraco\Dialogs\MoveOrCopy.aspx.cs">
|
||||
<DependentUpon>moveOrCopy.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Umbraco\Dialogs\MoveOrCopy.aspx.designer.cs">
|
||||
<DependentUpon>moveOrCopy.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Umbraco\dialogs\Sort.aspx.cs">
|
||||
<DependentUpon>sort.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
@@ -2353,7 +2360,9 @@
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
<Content Include="Config\404handlers.config" />
|
||||
<Content Include="Config\Dashboard.config" />
|
||||
<Content Include="Config\Dashboard.config">
|
||||
<SubType>Designer</SubType>
|
||||
</Content>
|
||||
<Content Include="Config\metablogConfig.config" />
|
||||
<Content Include="Config\restExtensions.config">
|
||||
<SubType>Designer</SubType>
|
||||
@@ -2399,9 +2408,9 @@ xcopy "$(ProjectDir)"..\packages\SqlServerCE.4.0.0.0\x86\*.* "$(TargetDir)x86\"
|
||||
<WebProjectProperties>
|
||||
<UseIIS>True</UseIIS>
|
||||
<AutoAssignPort>True</AutoAssignPort>
|
||||
<DevelopmentServerPort>61637</DevelopmentServerPort>
|
||||
<DevelopmentServerPort>6070</DevelopmentServerPort>
|
||||
<DevelopmentServerVPath>/</DevelopmentServerVPath>
|
||||
<IISUrl>http://localhost:61639/</IISUrl>
|
||||
<IISUrl>http://localhost:6070</IISUrl>
|
||||
<NTLMAuthentication>False</NTLMAuthentication>
|
||||
<UseCustomServer>False</UseCustomServer>
|
||||
<CustomServerUrl>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<!--
|
||||
For full details of the client dependency framework, visit
|
||||
the CodePlex site @ http://clientdependency.codeplex.com
|
||||
https://github.com/Shandem/ClientDependency
|
||||
It manages CSS and JS file dependencies per control without having to worry about duplicates.
|
||||
It also manages the combination, compression and minification of all JS & CSS files.
|
||||
|
||||
@@ -12,24 +12,38 @@ NOTES:
|
||||
-->
|
||||
<clientDependency version="1" fileDependencyExtensions=".js,.css">
|
||||
|
||||
<!--
|
||||
This section is used for Web Forms only, the enableCompositeFiles="true" is optional and by default is set to true.
|
||||
The LoaderControlProvider is set to default, the javascriptPlaceHolderId, cssPlaceHolderId attributes are optional and default to what is listed below. If using
|
||||
this provider, then you must specify both PlaceHolder controls on your page in order to render the JS/CSS.
|
||||
-->
|
||||
<fileRegistration defaultProvider="LoaderControlProvider">
|
||||
<providers>
|
||||
<add name="PageHeaderProvider" type="ClientDependency.Core.FileRegistration.Providers.PageHeaderProvider, ClientDependency.Core"/>
|
||||
<add name="LazyLoadProvider" type="ClientDependency.Core.FileRegistration.Providers.LazyLoadProvider, ClientDependency.Core"/>
|
||||
<add name="LoaderControlProvider" type="ClientDependency.Core.FileRegistration.Providers.LoaderControlProvider, ClientDependency.Core"/>
|
||||
<add name="PageHeaderProvider" type="ClientDependency.Core.FileRegistration.Providers.PageHeaderProvider, ClientDependency.Core" />
|
||||
<add name="LazyLoadProvider" type="ClientDependency.Core.FileRegistration.Providers.LazyLoadProvider, ClientDependency.Core" />
|
||||
<add name="LoaderControlProvider" type="ClientDependency.Core.FileRegistration.Providers.LoaderControlProvider, ClientDependency.Core" />
|
||||
<add name="PlaceHolderProvider" type="ClientDependency.Core.FileRegistration.Providers.PlaceHolderProvider, ClientDependency.Core" enableCompositeFiles="true" javascriptPlaceHolderId="JavaScriptPlaceHolder" cssPlaceHolderId="CssPlaceHolder" />
|
||||
<!-- Used for loading dependencies in Canvas mode -->
|
||||
<add name="CanvasProvider" type="umbraco.presentation.LiveEditing.CanvasClientDependencyProvider, umbraco" />
|
||||
</providers>
|
||||
</fileRegistration>
|
||||
|
||||
<!--
|
||||
The composite file section configures the compression/combination/minification of files.
|
||||
You can enable/disable minification of either JS/CSS files and you can enable/disable the
|
||||
persistence of composite files. By default, minification and persistence is enabled. Persisting files
|
||||
means that the system is going to save the output of the compressed/combined/minified files
|
||||
to disk so that on any subsequent request (when output cache expires) that these files don't have
|
||||
to be recreated again and will be based on the persisted file on disk. This saves on processing time.
|
||||
-->
|
||||
<!-- This section is used for MVC only -->
|
||||
<mvc defaultRenderer="StandardRenderer">
|
||||
<renderers>
|
||||
<add name="StandardRenderer" type="ClientDependency.Core.FileRegistration.Providers.StandardRenderer, ClientDependency.Core" />
|
||||
<add name="LazyLoadRenderer" type="ClientDependency.Core.FileRegistration.Providers.LazyLoadRenderer, ClientDependency.Core" />
|
||||
</renderers>
|
||||
</mvc>
|
||||
|
||||
<!--
|
||||
The composite file section configures the compression/combination/minification of files.
|
||||
You can enable/disable minification of either JS/CSS files and you can enable/disable the
|
||||
persistence of composite files. By default, minification and persistence is enabled. Persisting files
|
||||
means that the system is going to save the output of the compressed/combined/minified files
|
||||
to disk so that on any subsequent request (when output cache expires) that these files don't have
|
||||
to be recreated again and will be based on the persisted file on disk. This saves on processing time.
|
||||
-->
|
||||
<compositeFiles defaultProvider="defaultFileProcessingProvider" compositeFileHandlerPath="~/DependencyHandler.axd">
|
||||
<fileProcessingProviders>
|
||||
<add name="CompositeFileProcessor"
|
||||
@@ -38,30 +52,42 @@ NOTES:
|
||||
enableJsMinify="true"
|
||||
persistFiles="true"
|
||||
compositeFilePath="~/App_Data/TEMP/ClientDependency"
|
||||
urlType="Base64QueryStrings" />
|
||||
bundleDomains="localhost:123456"
|
||||
urlType="Base64QueryStrings"
|
||||
pathUrlFormat="{dependencyId}/{version}/{type}"/>
|
||||
</fileProcessingProviders>
|
||||
|
||||
<!-- A file map provider stores references to dependency files by an id to be used in the handler URL when using the MappedId Url type -->
|
||||
<fileMapProviders>
|
||||
<add name="XmlFileMap"
|
||||
type="ClientDependency.Core.CompositeFiles.Providers.XmlFileMapper, ClientDependency.Core"
|
||||
mapPath="~/App_Data/TEMP/ClientDependency" />
|
||||
</fileMapProviders>
|
||||
|
||||
<!--
|
||||
Defines the mime types to compress when requested by the client.
|
||||
Path is a regex selector, or a * can be used as in place of 'any'.
|
||||
Generally mime types are only set by client browsers in the request for things
|
||||
such as JSON or XML ajax requests.
|
||||
-->
|
||||
Defines the mime types to compress when requested by the client.
|
||||
Path is a regex selector, or a * can be used as in place of 'any'.
|
||||
Generally mime types are only set by client browsers in the request for things
|
||||
such as JSON or XML ajax requests.
|
||||
-->
|
||||
<mimeTypeCompression>
|
||||
<!-- Compress all json requests for the tree -->
|
||||
<add type="application/json" path="^.*?/webservices/Tree.*" />
|
||||
</mimeTypeCompression>
|
||||
|
||||
<!--
|
||||
Defines the paths to match on to enable rogue file compression.
|
||||
Path is a regex selector, or a * can be used as in place of 'any'.
|
||||
jsExt and cssExt are comma seperated list of extensions to match to have the dependencies
|
||||
replaced with the composite file handler. You can even include ASP.Net web service JS proxies.
|
||||
-->
|
||||
<rogueFileCompression>
|
||||
<!--<add path="*" compressJs="true" compressCss="true" jsExt=".js,asmx/js" cssExt=".css">
|
||||
<exclusions>
|
||||
<add path="^.*test.aspx.*"/>
|
||||
</exclusions>
|
||||
</add>-->
|
||||
</rogueFileCompression>
|
||||
|
||||
</compositeFiles>
|
||||
|
||||
<!-- ClientDependency also supports the ASP.Net MVC framework, see codeplex URL for full details -->
|
||||
<!--
|
||||
<mvc defaultRenderer="StandardRenderer">
|
||||
<renderers>
|
||||
<add name="StandardRenderer" type="ClientDependency.Core.Mvc.Providers.StandardRenderer, ClientDependency.Core"/>
|
||||
<add name="LazyLoadRenderer" type="ClientDependency.Core.Mvc.Providers.LazyLoadRenderer, ClientDependency.Core"/>
|
||||
</renderers>
|
||||
</mvc>
|
||||
-->
|
||||
|
||||
</clientDependency>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<!--
|
||||
For full details of the client dependency framework, visit
|
||||
the CodePlex site @ http://clientdependency.codeplex.com
|
||||
https://github.com/Shandem/ClientDependency
|
||||
It manages CSS and JS file dependencies per control without having to worry about duplicates.
|
||||
It also manages the combination, compression and minification of all JS & CSS files.
|
||||
|
||||
@@ -10,8 +10,13 @@ NOTES:
|
||||
* Compression/Combination/Minification is not enabled unless debug="false" is specified on the 'compiliation' element in the web.config
|
||||
* A new version will invalidate both client and server cache and create new persisted files
|
||||
-->
|
||||
<clientDependency version="5" fileDependencyExtensions=".js,.css">
|
||||
<clientDependency version="7" fileDependencyExtensions=".js,.css">
|
||||
|
||||
<!--
|
||||
This section is used for Web Forms only, the enableCompositeFiles="true" is optional and by default is set to true.
|
||||
The LoaderControlProvider is set to default, the javascriptPlaceHolderId, cssPlaceHolderId attributes are optional and default to what is listed below. If using
|
||||
this provider, then you must specify both PlaceHolder controls on your page in order to render the JS/CSS.
|
||||
-->
|
||||
<fileRegistration defaultProvider="LoaderControlProvider">
|
||||
<providers>
|
||||
<add name="PageHeaderProvider" type="ClientDependency.Core.FileRegistration.Providers.PageHeaderProvider, ClientDependency.Core" />
|
||||
@@ -31,17 +36,17 @@ NOTES:
|
||||
</renderers>
|
||||
</mvc>
|
||||
|
||||
<!--
|
||||
The composite file section configures the compression/combination/minification of files.
|
||||
You can enable/disable minification of either JS/CSS files and you can enable/disable the
|
||||
persistence of composite files. By default, minification and persistence is enabled. Persisting files
|
||||
means that the system is going to save the output of the compressed/combined/minified files
|
||||
to disk so that on any subsequent request (when output cache expires) that these files don't have
|
||||
to be recreated again and will be based on the persisted file on disk. This saves on processing time.
|
||||
-->
|
||||
<compositeFiles defaultProvider="defaultFileProcessingProvider" compositeFileHandlerPath="~/DependencyHandler.axd">
|
||||
<!--
|
||||
The composite file section configures the compression/combination/minification of files.
|
||||
You can enable/disable minification of either JS/CSS files and you can enable/disable the
|
||||
persistence of composite files. By default, minification and persistence is enabled. Persisting files
|
||||
means that the system is going to save the output of the compressed/combined/minified files
|
||||
to disk so that on any subsequent request (when output cache expires) that these files don't have
|
||||
to be recreated again and will be based on the persisted file on disk. This saves on processing time.
|
||||
-->
|
||||
<compositeFiles defaultProvider="defaultFileProcessingProvider" compositeFileHandlerPath="~/DependencyHandler.axd">
|
||||
<fileProcessingProviders>
|
||||
<add name="CompositeFileProcessor" type="ClientDependency.Core.CompositeFiles.Providers.CompositeFileProcessingProvider, ClientDependency.Core" enableCssMinify="true" enableJsMinify="true" persistFiles="true" compositeFilePath="~/App_Data/TEMP/ClientDependency" urlType="Base64QueryStrings" />
|
||||
<add name="CompositeFileProcessor" type="ClientDependency.Core.CompositeFiles.Providers.CompositeFileProcessingProvider, ClientDependency.Core" enableCssMinify="true" enableJsMinify="true" persistFiles="true" compositeFilePath="~/App_Data/TEMP/ClientDependency" bundleDomains="localhost:123456" urlType="Base64QueryStrings" pathUrlFormat="{dependencyId}/{version}/{type}" />
|
||||
</fileProcessingProviders>
|
||||
|
||||
<!-- A file map provider stores references to dependency files by an id to be used in the handler URL when using the MappedId Url type -->
|
||||
@@ -49,17 +54,31 @@ NOTES:
|
||||
<add name="XmlFileMap" type="ClientDependency.Core.CompositeFiles.Providers.XmlFileMapper, ClientDependency.Core" mapPath="~/App_Data/TEMP/ClientDependency" />
|
||||
</fileMapProviders>
|
||||
|
||||
<!--
|
||||
Defines the mime types to compress when requested by the client.
|
||||
Path is a regex selector, or a * can be used as in place of 'any'.
|
||||
Generally mime types are only set by client browsers in the request for things
|
||||
such as JSON or XML ajax requests.
|
||||
-->
|
||||
<!--
|
||||
Defines the mime types to compress when requested by the client.
|
||||
Path is a regex selector, or a * can be used as in place of 'any'.
|
||||
Generally mime types are only set by client browsers in the request for things
|
||||
such as JSON or XML ajax requests.
|
||||
-->
|
||||
<mimeTypeCompression>
|
||||
<!-- Compress all json requests for the tree -->
|
||||
<add type="application/json" path="^.*?/webservices/Tree.*" />
|
||||
</mimeTypeCompression>
|
||||
|
||||
</compositeFiles>
|
||||
<!--
|
||||
Defines the paths to match on to enable rogue file compression.
|
||||
Path is a regex selector, or a * can be used as in place of 'any'.
|
||||
jsExt and cssExt are comma seperated list of extensions to match to have the dependencies
|
||||
replaced with the composite file handler. You can even include ASP.Net web service JS proxies.
|
||||
-->
|
||||
<rogueFileCompression>
|
||||
<!--<add path="*" compressJs="true" compressCss="true" jsExt=".js,asmx/js" cssExt=".css">
|
||||
<exclusions>
|
||||
<add path="^.*test.aspx.*"/>
|
||||
</exclusions>
|
||||
</add>-->
|
||||
</rogueFileCompression>
|
||||
|
||||
</compositeFiles>
|
||||
|
||||
</clientDependency>
|
||||
|
||||
@@ -22,4 +22,8 @@ More information and documentation can be found on CodePlex: http://umbracoexami
|
||||
<add Name="nodeTypeAlias" />
|
||||
</IndexAttributeFields>
|
||||
</IndexSet>
|
||||
|
||||
<!-- Default Indexset for external searches, this indexes all fields on all types of nodes-->
|
||||
<IndexSet SetName="ExternalIndexSet" IndexPath="~/App_Data/TEMP/ExamineIndexes/External/" />
|
||||
|
||||
</ExamineLuceneIndexSets>
|
||||
@@ -1,3 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<urlrewritingnet xmlns="http://www.urlrewriting.net/schemas/config/2006/07">
|
||||
<rewrites>
|
||||
<!--
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<urlrewritingnet xmlns="http://www.urlrewriting.net/schemas/config/2006/07">
|
||||
<rewrites>
|
||||
<!--
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<microsoft.scripting>
|
||||
<languages>
|
||||
<language names="IronPython;Python;py" extensions=".py" displayName="IronPython 2.6" type="IronPython.Runtime.PythonContext, IronPython, Version=2.6.10920.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<microsoft.scripting>
|
||||
<languages>
|
||||
<language names="IronPython;Python;py" extensions=".py" displayName="IronPython 2.6" type="IronPython.Runtime.PythonContext, IronPython, Version=2.6.10920.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
<div class="row">
|
||||
<asp:label AssociatedControlID="tb_email" runat="server">Email:</asp:label>
|
||||
<span><asp:TextBox ID="tb_email" CssClass="text" type="text" Text="admin@domain.com" runat="server" /></span>
|
||||
<span><asp:TextBox ID="tb_email" CssClass="text" type="text" Text="admin@example.com" runat="server" /></span>
|
||||
<asp:RequiredFieldValidator Display="Dynamic" CssClass="invalidaing" ControlToValidate="tb_email" runat="server" ErrorMessage="Email is a mandatory field" />
|
||||
</div>
|
||||
|
||||
|
||||
@@ -432,13 +432,13 @@ Dette er en automatisk mail for at fortælle at handlingen '%1%'
|
||||
er blevet udført på siden '%2%'
|
||||
af brugeren '%3%'
|
||||
|
||||
Gå til http://%4%/umbraco/default.aspx?section=content&id=%5% for at redigere.
|
||||
Gå til http://%4%/default.aspx?section=content&id=%5% for at redigere.
|
||||
|
||||
Ha' en dejlig dag!
|
||||
|
||||
Mange hilsner fra umbraco robotten
|
||||
]]></key>
|
||||
<key alias="mailBodyHtml"><![CDATA[<p>Hej %0%</p> <p>Dette er en automatisk mail for at informere dig om at opgaven <strong>'%1%'</strong> er blevet udførtpå siden <a href="%7%"><strong>'%2%'</strong></a> af brugeren <strong>'%3%'</strong> </p> <div style="margin: 8px 0; padding: 8px; display: block;"> <br /> <a style="color: white; font-weight: bold; background-color: #66cc66; text-decoration : none; margin-right: 20px; border: 8px solid #66cc66; width: 150px;" href="http://%4%/umbraco/actions/publish.aspx?id=%5%"> PUBLISÉr </a> <a style="color: white; font-weight: bold; background-color: #5372c3; text-decoration : none; margin-right: 20px; border: 8px solid #5372c3; width: 150px;" href="http://%4%/umbraco/actions/editContent.aspx?id=%5%"> RET </a> <a style="color: white; font-weight: bold; background-color: #ca4a4a; text-decoration : none; margin-right: 20px; border: 8px solid #ca4a4a; width: 150px;" href="http://%4%/umbraco/actions/delete.aspx?id=%5%"> SLET </a> <br /> </div> <p> <h3>Opdateringssammendrag:</h3> <table style="width: 100%;"> %6% </table> </p> <div style="margin: 8px 0; padding: 8px; display: block;"> <br /> <a style="color: white; font-weight: bold; background-color: #66cc66; text-decoration : none; margin-right: 20px; border: 8px solid #66cc66; width: 150px;" href="http://%4%/umbraco/actions/publish.aspx?id=%5%"> PUBLISÉR </a> <a style="color: white; font-weight: bold; background-color: #5372c3; text-decoration : none; margin-right: 20px; border: 8px solid #5372c3; width: 150px;" href="http://%4%/umbraco/actions/editContent.aspx?id=%5%"> RET </a> <a style="color: white; font-weight: bold; background-color: #ca4a4a; text-decoration : none; margin-right: 20px; border: 8px solid #ca4a4a; width: 150px;" href="http://%4%/umbraco/actions/delete.aspx?id=%5%"> SLET </a> <br /> </div> <p>Hav en fortsat god dag!<br /><br /> De bedste hilsner fra umbraco robotten </p>]]></key>
|
||||
<key alias="mailBodyHtml"><![CDATA[<p>Hej %0%</p> <p>Dette er en automatisk mail for at informere dig om at opgaven <strong>'%1%'</strong> er blevet udførtpå siden <a href="%7%"><strong>'%2%'</strong></a> af brugeren <strong>'%3%'</strong> </p> <div style="margin: 8px 0; padding: 8px; display: block;"> <br /> <a style="color: white; font-weight: bold; background-color: #66cc66; text-decoration : none; margin-right: 20px; border: 8px solid #66cc66; width: 150px;" href="http://%4%/actions/publish.aspx?id=%5%"> PUBLISÉr </a> <a style="color: white; font-weight: bold; background-color: #5372c3; text-decoration : none; margin-right: 20px; border: 8px solid #5372c3; width: 150px;" href="http://%4%/actions/editContent.aspx?id=%5%"> RET </a> <a style="color: white; font-weight: bold; background-color: #ca4a4a; text-decoration : none; margin-right: 20px; border: 8px solid #ca4a4a; width: 150px;" href="http://%4%/actions/delete.aspx?id=%5%"> SLET </a> <br /> </div> <p> <h3>Opdateringssammendrag:</h3> <table style="width: 100%;"> %6% </table> </p> <div style="margin: 8px 0; padding: 8px; display: block;"> <br /> <a style="color: white; font-weight: bold; background-color: #66cc66; text-decoration : none; margin-right: 20px; border: 8px solid #66cc66; width: 150px;" href="http://%4%/actions/publish.aspx?id=%5%"> PUBLISÉR </a> <a style="color: white; font-weight: bold; background-color: #5372c3; text-decoration : none; margin-right: 20px; border: 8px solid #5372c3; width: 150px;" href="http://%4%/actions/editContent.aspx?id=%5%"> RET </a> <a style="color: white; font-weight: bold; background-color: #ca4a4a; text-decoration : none; margin-right: 20px; border: 8px solid #ca4a4a; width: 150px;" href="http://%4%/actions/delete.aspx?id=%5%"> SLET </a> <br /> </div> <p>Hav en fortsat god dag!<br /><br /> De bedste hilsner fra umbraco robotten </p>]]></key>
|
||||
<key alias="mailSubject">[%0%] Notificering om %1% udført på %2%</key>
|
||||
<key alias="notifications">Notificeringer</key>
|
||||
</area>
|
||||
|
||||
@@ -463,7 +463,7 @@ Hallo %0%,
|
||||
|
||||
die Aufgabe '%1%' (von Benutzer '%3%') an der Seite '%2%' wurde ausgeführt.
|
||||
|
||||
Zum Bearbeiten verwenden Sie bitte diesen Link: http://%4%/umbraco/actions/editContent.aspx?id=%5%
|
||||
Zum Bearbeiten verwenden Sie bitte diesen Link: http://%4%/actions/editContent.aspx?id=%5%
|
||||
|
||||
Einen schönen Tag wünscht
|
||||
Ihr freundlicher Umbraco-Robot
|
||||
@@ -474,9 +474,9 @@ Ihr freundlicher Umbraco-Robot
|
||||
<p>die Aufgabe <strong>'%1%'</strong> (von Benutzer '%3%') an der Seite <a href="%7%"><strong>'%2%'</strong></a> wurde ausgeführt.</p>
|
||||
<div style="margin: 8px 0; padding: 8px; display: block;">
|
||||
<br />
|
||||
<a style="color: white; font-weight: bold; background-color: #66cc66; text-decoration : none; margin-right: 20px; border: 8px solid #66cc66; width: 150px;" href="http://%4%/umbraco/actions/publish.aspx?id=%5%"> VERÖFFENTLICHEN </a>
|
||||
<a style="color: white; font-weight: bold; background-color: #5372c3; text-decoration : none; margin-right: 20px; border: 8px solid #5372c3; width: 150px;" href="http://%4%/umbraco/actions/editContent.aspx?id=%5%"> BEARBEITEN </a>
|
||||
<a style="color: white; font-weight: bold; background-color: #ca4a4a; text-decoration : none; margin-right: 20px; border: 8px solid #ca4a4a; width: 150px;" href="http://%4%/umbraco/actions/delete.aspx?id=%5%"> LÖSCHEN </a>
|
||||
<a style="color: white; font-weight: bold; background-color: #66cc66; text-decoration : none; margin-right: 20px; border: 8px solid #66cc66; width: 150px;" href="http://%4%/actions/publish.aspx?id=%5%"> VERÖFFENTLICHEN </a>
|
||||
<a style="color: white; font-weight: bold; background-color: #5372c3; text-decoration : none; margin-right: 20px; border: 8px solid #5372c3; width: 150px;" href="http://%4%/actions/editContent.aspx?id=%5%"> BEARBEITEN </a>
|
||||
<a style="color: white; font-weight: bold; background-color: #ca4a4a; text-decoration : none; margin-right: 20px; border: 8px solid #ca4a4a; width: 150px;" href="http://%4%/actions/delete.aspx?id=%5%"> LÖSCHEN </a>
|
||||
<br />
|
||||
</div>
|
||||
<p>
|
||||
@@ -487,9 +487,9 @@ Ihr freundlicher Umbraco-Robot
|
||||
</p>
|
||||
<div style="margin: 8px 0; padding: 8px; display: block;">
|
||||
<br />
|
||||
<a style="color: white; font-weight: bold; background-color: #66cc66; text-decoration : none; margin-right: 20px; border: 8px solid #66cc66; width: 150px;" href="http://%4%/umbraco/actions/publish.aspx?id=%5%"> VERÖFFENTLICHEN </a>
|
||||
<a style="color: white; font-weight: bold; background-color: #5372c3; text-decoration : none; margin-right: 20px; border: 8px solid #5372c3; width: 150px;" href="http://%4%/umbraco/actions/editContent.aspx?id=%5%"> BEARBEITEN </a>
|
||||
<a style="color: white; font-weight: bold; background-color: #ca4a4a; text-decoration : none; margin-right: 20px; border: 8px solid #ca4a4a; width: 150px;" href="http://%4%/umbraco/actions/delete.aspx?id=%5%"> LÖSCHEN </a>
|
||||
<a style="color: white; font-weight: bold; background-color: #66cc66; text-decoration : none; margin-right: 20px; border: 8px solid #66cc66; width: 150px;" href="http://%4%/actions/publish.aspx?id=%5%"> VERÖFFENTLICHEN </a>
|
||||
<a style="color: white; font-weight: bold; background-color: #5372c3; text-decoration : none; margin-right: 20px; border: 8px solid #5372c3; width: 150px;" href="http://%4%/actions/editContent.aspx?id=%5%"> BEARBEITEN </a>
|
||||
<a style="color: white; font-weight: bold; background-color: #ca4a4a; text-decoration : none; margin-right: 20px; border: 8px solid #ca4a4a; width: 150px;" href="http://%4%/actions/delete.aspx?id=%5%"> LÖSCHEN </a>
|
||||
<br />
|
||||
</div>
|
||||
<p>Einen schönen Tag wünscht<br />Ihr freundlicher Umbraco-Robot</p>
|
||||
|
||||
@@ -627,6 +627,7 @@ To manage your website, simply open the umbraco back office and start adding con
|
||||
<key alias="packageUpgradeInstructions">Upgrade instructions</key>
|
||||
<key alias="packageUpgradeText"> There's an upgrade available for this package. You can download it directly from the umbraco package repository.</key>
|
||||
<key alias="packageVersion">Package version</key>
|
||||
<key alias="packageVersionHistory">Package version history</key>
|
||||
<key alias="viewPackageWebsite">View package website</key>
|
||||
</area>
|
||||
<area alias="paste">
|
||||
|
||||
@@ -534,7 +534,7 @@ Pour gerer votre site, accéder simplement au back office et commencez à contri
|
||||
|
||||
Ceci est un email automatique pour vous informer que la tâche '%1%' a été activée sur la page '%2%' par l'utilisateur '%3%'
|
||||
|
||||
Allez à http://%4%/umbraco/actions/editContent.aspx?id=%5% pour éditer.
|
||||
Allez à http://%4%/actions/editContent.aspx?id=%5% pour éditer.
|
||||
|
||||
Bonne journée!
|
||||
|
||||
@@ -550,9 +550,9 @@ Pour gerer votre site, accéder simplement au back office et commencez à contri
|
||||
</p>
|
||||
<div class="buttons">
|
||||
<br />
|
||||
<a class="buttonPublish" href="http://%4%/umbraco/actions/publish.aspx?id=%5%"> PUBLIER </a>
|
||||
<a class="buttonEdit" href="http://%4%/umbraco/actions/editContent.aspx?id=%5%"> EDITER </a>
|
||||
<a class="buttonDelete" href="http://%4%/umbraco/actions/delete.aspx?id=%5%"> SUPPRIMER </a>
|
||||
<a class="buttonPublish" href="http://%4%/actions/publish.aspx?id=%5%"> PUBLIER </a>
|
||||
<a class="buttonEdit" href="http://%4%/actions/editContent.aspx?id=%5%"> EDITER </a>
|
||||
<a class="buttonDelete" href="http://%4%/actions/delete.aspx?id=%5%"> SUPPRIMER </a>
|
||||
<br />
|
||||
</div>
|
||||
<p>
|
||||
@@ -564,9 +564,9 @@ Pour gerer votre site, accéder simplement au back office et commencez à contri
|
||||
|
||||
<div class="buttons">
|
||||
<br />
|
||||
<a class="buttonPublish" href="http://%4%/umbraco/actions/publish.aspx?id=%5%"> PUBLIER </a>
|
||||
<a class="buttonEdit" href="http://%4%/umbraco/actions/editContent.aspx?id=%5%"> EDITER </a>
|
||||
<a class="buttonDelete" href="http://%4%/umbraco/actions/delete.aspx?id=%5%"> SUPPRIMER </a>
|
||||
<a class="buttonPublish" href="http://%4%/actions/publish.aspx?id=%5%"> PUBLIER </a>
|
||||
<a class="buttonEdit" href="http://%4%/actions/editContent.aspx?id=%5%"> EDITER </a>
|
||||
<a class="buttonDelete" href="http://%4%/actions/delete.aspx?id=%5%"> SUPPRIMER </a>
|
||||
<br />
|
||||
</div>
|
||||
|
||||
|
||||
@@ -452,9 +452,9 @@ Echter, Runway biedt een gemakkelijke basis om je snel op weg te helpen. Als je
|
||||
</p>
|
||||
<div class="buttons">
|
||||
<br />
|
||||
<a class="buttonPublish" href="http://%4%/umbraco/actions/publish.aspx?id=%5%"> PUBLISH </a>
|
||||
<a class="buttonEdit" href="http://%4%/umbraco/actions/editContent.aspx?id=%5%"> EDIT </a>
|
||||
<a class="buttonDelete" href="http://%4%/umbraco/actions/delete.aspx?id=%5%"> DELETE </a>
|
||||
<a class="buttonPublish" href="http://%4%/actions/publish.aspx?id=%5%"> PUBLISH </a>
|
||||
<a class="buttonEdit" href="http://%4%/actions/editContent.aspx?id=%5%"> EDIT </a>
|
||||
<a class="buttonDelete" href="http://%4%/actions/delete.aspx?id=%5%"> DELETE </a>
|
||||
<br />
|
||||
</div>
|
||||
<p>
|
||||
@@ -466,9 +466,9 @@ Echter, Runway biedt een gemakkelijke basis om je snel op weg te helpen. Als je
|
||||
|
||||
<div class="buttons">
|
||||
<br />
|
||||
<a class="buttonPublish" href="http://%4%/umbraco/actions/publish.aspx?id=%5%"> PUBLISH </a>
|
||||
<a class="buttonEdit" href="http://%4%/umbraco/actions/editContent.aspx?id=%5%"> EDIT </a>
|
||||
<a class="buttonDelete" href="http://%4%/umbraco/actions/delete.aspx?id=%5%"> DELETE </a>
|
||||
<a class="buttonPublish" href="http://%4%/actions/publish.aspx?id=%5%"> PUBLISH </a>
|
||||
<a class="buttonEdit" href="http://%4%/actions/editContent.aspx?id=%5%"> EDIT </a>
|
||||
<a class="buttonDelete" href="http://%4%/actions/delete.aspx?id=%5%"> DELETE </a>
|
||||
<br />
|
||||
</div>
|
||||
|
||||
|
||||
@@ -433,7 +433,7 @@ Dette er en automatisk mail for å informere om at handlingen '%1%'
|
||||
er utført på siden '%2%'
|
||||
av brukeren '%3%'
|
||||
|
||||
Gå til http://%4%/umbraco/default.aspx?section=content&id=%5% for å redigere.
|
||||
Gå til http://%4%/default.aspx?section=content&id=%5% for å redigere.
|
||||
|
||||
Ha en fin dag!
|
||||
|
||||
@@ -447,9 +447,9 @@ Vennlig hilsen umbraco roboten
|
||||
</p>
|
||||
<div style="margin: 8px 0; padding: 8px; display: block;">
|
||||
<br />
|
||||
<a style="color: white; font-weight: bold; background-color: #66cc66; text-decoration : none; margin-right: 20px; border: 8px solid #66cc66; width: 150px;" href="http://%4%/umbraco/actions/publish.aspx?id=%5%"> PUBLISER </a>
|
||||
<a style="color: white; font-weight: bold; background-color: #5372c3; text-decoration : none; margin-right: 20px; border: 8px solid #5372c3; width: 150px;" href="http://%4%/umbraco/actions/editContent.aspx?id=%5%"> REDIGER </a>
|
||||
<a style="color: white; font-weight: bold; background-color: #ca4a4a; text-decoration : none; margin-right: 20px; border: 8px solid #ca4a4a; width: 150px;" href="http://%4%/umbraco/actions/delete.aspx?id=%5%"> SLETT </a>
|
||||
<a style="color: white; font-weight: bold; background-color: #66cc66; text-decoration : none; margin-right: 20px; border: 8px solid #66cc66; width: 150px;" href="http://%4%/actions/publish.aspx?id=%5%"> PUBLISER </a>
|
||||
<a style="color: white; font-weight: bold; background-color: #5372c3; text-decoration : none; margin-right: 20px; border: 8px solid #5372c3; width: 150px;" href="http://%4%/actions/editContent.aspx?id=%5%"> REDIGER </a>
|
||||
<a style="color: white; font-weight: bold; background-color: #ca4a4a; text-decoration : none; margin-right: 20px; border: 8px solid #ca4a4a; width: 150px;" href="http://%4%/actions/delete.aspx?id=%5%"> SLETT </a>
|
||||
<br />
|
||||
</div>
|
||||
<p>
|
||||
@@ -461,9 +461,9 @@ Vennlig hilsen umbraco roboten
|
||||
|
||||
<div style="margin: 8px 0; padding: 8px; display: block;">
|
||||
<br />
|
||||
<a style="color: white; font-weight: bold; background-color: #66cc66; text-decoration : none; margin-right: 20px; border: 8px solid #66cc66; width: 150px;" href="http://%4%/umbraco/actions/publish.aspx?id=%5%"> PUBLISER </a>
|
||||
<a style="color: white; font-weight: bold; background-color: #5372c3; text-decoration : none; margin-right: 20px; border: 8px solid #5372c3; width: 150px;" href="http://%4%/umbraco/actions/editContent.aspx?id=%5%"> REDIGER </a>
|
||||
<a style="color: white; font-weight: bold; background-color: #ca4a4a; text-decoration : none; margin-right: 20px; border: 8px solid #ca4a4a; width: 150px;" href="http://%4%/umbraco/actions/delete.aspx?id=%5%"> SLETT </a>
|
||||
<a style="color: white; font-weight: bold; background-color: #66cc66; text-decoration : none; margin-right: 20px; border: 8px solid #66cc66; width: 150px;" href="http://%4%/actions/publish.aspx?id=%5%"> PUBLISER </a>
|
||||
<a style="color: white; font-weight: bold; background-color: #5372c3; text-decoration : none; margin-right: 20px; border: 8px solid #5372c3; width: 150px;" href="http://%4%/actions/editContent.aspx?id=%5%"> REDIGER </a>
|
||||
<a style="color: white; font-weight: bold; background-color: #ca4a4a; text-decoration : none; margin-right: 20px; border: 8px solid #ca4a4a; width: 150px;" href="http://%4%/actions/delete.aspx?id=%5%"> SLETT </a>
|
||||
<br />
|
||||
</div>
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
<div style="margin-right: 15px;">
|
||||
<asp:Button id="sbmt" Runat="server" style="Width: 90px; margin-right: 6px;" onclick="sbmt_Click"></asp:Button>
|
||||
<em> or </em>
|
||||
<em> <%= umbraco.ui.Text("or") %> </em>
|
||||
<a href="#" style="color: Blue; margin-left: 6px;" onclick="UmbClientMgr.closeModalWindow()"><%=umbraco.ui.Text("cancel")%></a>
|
||||
|
||||
<!--
|
||||
|
||||
@@ -56,7 +56,17 @@
|
||||
|
||||
|
||||
</cc2:Pane>
|
||||
|
||||
|
||||
<cc2:Pane ID="pane_versions" runat="server" Text="Package version history" Visible="false">
|
||||
<cc2:PropertyPanel ID="pp_versions" runat="server">
|
||||
<asp:Repeater ID="rptr_versions" runat="server">
|
||||
<HeaderTemplate><ul></HeaderTemplate>
|
||||
<ItemTemplate><li><a href="installedPackage.aspx?id=<%# ((umbraco.cms.businesslogic.packager.InstalledPackage)Container.DataItem).Data.Id %>"><%# ((umbraco.cms.businesslogic.packager.InstalledPackage)Container.DataItem).Data.Version %></a></li></ItemTemplate>
|
||||
<FooterTemplate></ul></FooterTemplate>
|
||||
</asp:Repeater>
|
||||
</cc2:PropertyPanel>
|
||||
</cc2:Pane>
|
||||
|
||||
<cc2:Pane ID="pane_options" runat="server" Text="Package options">
|
||||
<table border="0" style="width: 100%;">
|
||||
<tr><td class="propertyHeader" valign="top">
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="EditRelationType.aspx.cs" Inherits="umbraco.cms.presentation.developer.RelationTypes.EditRelationType" MasterPageFile="/umbraco/masterpages/umbracoPage.Master" %>
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="EditRelationType.aspx.cs" Inherits="umbraco.cms.presentation.developer.RelationTypes.EditRelationType" MasterPageFile="../../masterpages/umbracoPage.Master" %>
|
||||
<%@ Register TagPrefix="umb" Namespace="umbraco.uicontrols" Assembly="controls" %>
|
||||
|
||||
<asp:Content ID="headContent" ContentPlaceHolderID="head" runat="server">
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="NewRelationType.aspx.cs" Inherits="umbraco.cms.presentation.developer.RelationTypes.NewRelationType" MasterPageFile="/umbraco/masterpages/umbracoPage.Master"%>
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="NewRelationType.aspx.cs" Inherits="umbraco.cms.presentation.developer.RelationTypes.NewRelationType" MasterPageFile="../../masterpages/umbracoPage.Master"%>
|
||||
<%@ Register TagPrefix="umb" Namespace="umbraco.uicontrols" Assembly="controls" %>
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
|
||||
namespace Umbraco.Web.UI.Umbraco.Dialogs
|
||||
{
|
||||
public partial class MoveOrCopy : global::umbraco.dialogs.moveOrCopy
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Umbraco.Web.UI.Umbraco.Dialogs {
|
||||
|
||||
|
||||
public partial class MoveOrCopy {
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
<%@ Page Language="c#" CodeBehind="moveOrCopy.aspx.cs" MasterPageFile="../masterpages/umbracoDialog.Master" AutoEventWireup="True" Inherits="umbraco.dialogs.moveOrCopy" %>
|
||||
<%@ Page Language="c#" CodeBehind="moveOrCopy.aspx.cs" MasterPageFile="../masterpages/umbracoDialog.Master" AutoEventWireup="True" Inherits="Umbraco.Web.UI.Umbraco.Dialogs.MoveOrCopy" %>
|
||||
<%@ Register TagPrefix="umb" Namespace="ClientDependency.Core.Controls" Assembly="ClientDependency.Core" %>
|
||||
<%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %>
|
||||
<%@ Register Src="../controls/Tree/TreeControl.ascx" TagName="TreeControl" TagPrefix="umbraco" %>
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@
|
||||
|
||||
@* Get the property alias we want to filter on from the macro parameter *@
|
||||
var propertyAlias = Parameter.propertyAlias;
|
||||
var selection = Model.Children.Where("Visible").OrderBy(propertyAlias)
|
||||
var selection = Model.Children.Where("Visible").OrderBy(propertyAlias);
|
||||
}
|
||||
|
||||
|
||||
|
||||
+7
-1
@@ -10,9 +10,15 @@
|
||||
|
||||
@{
|
||||
@*Build a query and return the visible items *@
|
||||
var selection= Model.Textpages.Where(query).Where("Visible");
|
||||
var selection= Model.Textpages.Where("Visible");
|
||||
|
||||
@*
|
||||
Example of more querying, if you have a true/false property with the alias of shouldBeFeatured:
|
||||
var selection= Model.Textpages.Where("shouldBeFeatured == true").Where("Visible");
|
||||
*@
|
||||
}
|
||||
|
||||
|
||||
@*Determine if there are any nodes in the selection, then render list *@
|
||||
@if(selection.Any()){
|
||||
|
||||
|
||||
+7
-11
@@ -1,25 +1,21 @@
|
||||
@inherits PartialViewMacroPage
|
||||
@using Umbraco.Cms.Web
|
||||
@using Umbraco.Cms.Web.Macros
|
||||
@using Umbraco.Framework
|
||||
|
||||
@inherits umbraco.MacroEngines.DynamicNodeContext
|
||||
|
||||
@* Ensure that the Current Page has children, where the property umbracoNaviHide is not True *@
|
||||
@if (CurrentPage.Children.Where("umbracoNaviHide != @0", "True").Any())
|
||||
@if (Model.Children.Where("Visible").Any())
|
||||
{
|
||||
@* Get the first page in the children, where the property umbracoNaviHide is not True *@
|
||||
var naviLevel = CurrentPage.Children.Where("umbracoNaviHide != @0", "True").First().Level;
|
||||
var naviLevel = Model.Children.Where("Visible").First().Level;
|
||||
|
||||
@* Add in level for a CSS hook *@
|
||||
<ul class="level-@naviLevel">
|
||||
@* For each child page under the root node, where the property umbracoNaviHide is not True *@
|
||||
@foreach (var childPage in CurrentPage.Children.Where("umbracoNaviHide != @0", "True"))
|
||||
@foreach (var childPage in Model.Children.Where("Visible"))
|
||||
{
|
||||
<li>
|
||||
<a href="@childPage.Url">@childPage.Name</a>
|
||||
|
||||
@* if the current page has any children, where the property umbracoNaviHide is not True *@
|
||||
@if (childPage.Children.Where("umbracoNaviHide != @0", "True").Any())
|
||||
@if (childPage.Children.Where("Visible").Any())
|
||||
{
|
||||
@* Call our helper to display the children *@
|
||||
@childPages(childPage.Children)
|
||||
@@ -40,13 +36,13 @@
|
||||
|
||||
@* Add in level for a CSS hook *@
|
||||
<ul class="level-@(naviLevel)">
|
||||
@foreach (var page in pages.Where("umbracoNaviHide != @0", "True"))
|
||||
@foreach (var page in pages.Where("Visible"))
|
||||
{
|
||||
<li>
|
||||
<a href="@page.Url">@page.Name</a>
|
||||
|
||||
@* if the current page has any children, where the property umbracoNaviHide is not True *@
|
||||
@if (page.Children.Where("umbracoNaviHide != @0", "True").Any())
|
||||
@if (page.Children.Where("Visible").Any())
|
||||
{
|
||||
@* Call our helper to display the children *@
|
||||
@childPages(page.Children)
|
||||
|
||||
@@ -10,25 +10,25 @@
|
||||
<table cellspacing="0" cellpadding="4" border="0">
|
||||
<tr>
|
||||
<th width="30%">
|
||||
<%=umbraco.ui.Text("name", UmbracoUser)%>:
|
||||
<%=umbraco.ui.Text("name", base.getUser())%>:
|
||||
</th>
|
||||
<td class="propertyContent">
|
||||
<asp:TextBox ID="NameTxt" Width="350px" runat="server" /><br />
|
||||
<small><%=umbraco.ui.Text("stylesheet", "nameHelp", UmbracoUser)%></small>
|
||||
<small><%=umbraco.ui.Text("stylesheet", "nameHelp", base.getUser())%></small>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th width="30%">
|
||||
<%=umbraco.ui.Text("alias", UmbracoUser)%>:
|
||||
<%=umbraco.ui.Text("alias", base.getUser())%>:
|
||||
</th>
|
||||
<td class="propertyContent">
|
||||
<asp:TextBox ID="AliasTxt" Width="350px" runat="server" /><br />
|
||||
<small><%=umbraco.ui.Text("stylesheet", "aliasHelp", UmbracoUser)%></small>
|
||||
<small><%=umbraco.ui.Text("stylesheet", "aliasHelp", base.getUser())%></small>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th width="30%">
|
||||
<%=umbraco.ui.Text("styles", UmbracoUser)%>:
|
||||
<%=umbraco.ui.Text("styles", base.getUser())%>:
|
||||
</th>
|
||||
<td class="propertyContent">
|
||||
<asp:TextBox ID="Content" Style="width: 350px" TextMode="MultiLine" runat="server" />
|
||||
@@ -38,7 +38,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<th width="30%">
|
||||
<%=umbraco.ui.Text("preview", UmbracoUser)%>:
|
||||
<%=umbraco.ui.Text("preview", base.getUser())%>:
|
||||
</th>
|
||||
<td class="propertyContent">
|
||||
<div id="preview" style="padding: 10px; border: 1px solid #ccc; width: 330px;">
|
||||
|
||||
@@ -111,16 +111,16 @@ Umbraco.Application.Actions = function () {
|
||||
this._currApp = whichApp.toLowerCase();
|
||||
|
||||
if (this._currApp != 'media' && this._currApp != 'content' && this._currApp != 'member') {
|
||||
jQuery("#buttonCreate").attr("disabled", "true");
|
||||
jQuery("#buttonCreate").attr("disabled", "true").fadeOut(400);
|
||||
jQuery("#FindDocuments .umbracoSearchHolder").fadeOut(400);
|
||||
}
|
||||
else {
|
||||
// create button should still remain disabled for the memebers section
|
||||
if (this._currApp == 'member') {
|
||||
jQuery("#buttonCreate").attr("disabled", "true");
|
||||
jQuery("#buttonCreate").attr("disabled", "true").css("display", "inline-block").css("visibility", "hidden");
|
||||
}
|
||||
else {
|
||||
jQuery("#buttonCreate").removeAttr("disabled");
|
||||
jQuery("#buttonCreate").removeAttr("disabled").fadeIn(500).css("visibility", "visible");
|
||||
}
|
||||
jQuery("#FindDocuments .umbracoSearchHolder").fadeIn(500);
|
||||
//need to set the recycle bin node id based on app
|
||||
|
||||
@@ -178,7 +178,7 @@ Umbraco.Sys.registerNamespace("Umbraco.Controls");
|
||||
var overlay = $("<div class='upload-overlay'>" +
|
||||
"<div class='upload-panel'>" +
|
||||
instructions +
|
||||
"<form action=\"/umbraco/webservices/MediaUploader.ashx?format=json&action=upload&parentNodeId=" + this._parentId + "\" method=\"post\" enctype=\"multipart/form-data\">" +
|
||||
"<form action=\"" + self._opts.umbracoPath + "/webservices/MediaUploader.ashx?format=json&action=upload&parentNodeId=" + this._parentId + "\" method=\"post\" enctype=\"multipart/form-data\">" +
|
||||
"<input id='fileupload' type='file' name='file' multiple>" +
|
||||
"<input type='hidden' name='name' />" +
|
||||
"<input type='hidden' name='replaceExisting' />" +
|
||||
|
||||
@@ -167,13 +167,6 @@
|
||||
<add name="UmbracoRoleProvider" type="umbraco.providers.members.UmbracoRoleProvider" />
|
||||
</providers>
|
||||
</roleManager>
|
||||
<!-- Sitemap provider-->
|
||||
<siteMap defaultProvider="UmbracoSiteMapProvider" enabled="true">
|
||||
<providers>
|
||||
<clear />
|
||||
<add name="UmbracoSiteMapProvider" type="umbraco.presentation.nodeFactory.UmbracoSiteMapProvider" defaultDescriptionAlias="description" securityTrimmingEnabled="true" />
|
||||
</providers>
|
||||
</siteMap>
|
||||
</system.web>
|
||||
|
||||
<!-- ASPNETAJAX -->
|
||||
@@ -190,7 +183,7 @@
|
||||
<add name="UrlRewriteModule" type="UrlRewritingNet.Web.UrlRewriteModule, UrlRewritingNet.UrlRewriter" />
|
||||
|
||||
<remove name="UmbracoModule" />
|
||||
<add name=" UmbracoModule" type="Umbraco.Web.UmbracoModule,umbraco" />
|
||||
<add name="UmbracoModule" type="Umbraco.Web.UmbracoModule,umbraco" />
|
||||
|
||||
<remove name="ScriptModule" />
|
||||
<add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
|
||||
@@ -290,4 +283,4 @@
|
||||
</pages>
|
||||
</system.web.webPages.razor>
|
||||
|
||||
</configuration>
|
||||
</configuration>
|
||||
|
||||
@@ -5,6 +5,7 @@ using System.Xml;
|
||||
using System.Xml.Linq;
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Core.Xml;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Web.Routing;
|
||||
using umbraco;
|
||||
using umbraco.NodeFactory;
|
||||
|
||||
@@ -1,84 +1,97 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Specialized;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using Umbraco.Core.Media;
|
||||
using umbraco;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Specialized;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using Umbraco.Core.Media;
|
||||
using umbraco;
|
||||
|
||||
namespace Umbraco.Web.Media
|
||||
{
|
||||
public class ImageUrl
|
||||
{
|
||||
[Obsolete("Use TryGetImageUrl() instead")]
|
||||
public static string GetImageUrl(string specifiedSrc, string field, string provider, string parameters, int? nodeId = null)
|
||||
{
|
||||
string url;
|
||||
var found = TryGetImageUrl(specifiedSrc, field, provider, parameters, nodeId, out url);
|
||||
|
||||
return found ? url : string.Empty;
|
||||
}
|
||||
|
||||
namespace Umbraco.Web.Media
|
||||
{
|
||||
public class ImageUrl
|
||||
{
|
||||
public static string GetImageUrl(string specifiedSrc, string field, string provider, string parameters, int? nodeId = null)
|
||||
public static bool TryGetImageUrl(string specifiedSrc, string field, string provider, string parameters, int? nodeId, out string url)
|
||||
{
|
||||
string url;
|
||||
|
||||
var imageUrlProvider = GetProvider(provider);
|
||||
|
||||
var parsedParameters = string.IsNullOrEmpty(parameters) ? new NameValueCollection() : HttpUtility.ParseQueryString(parameters);
|
||||
|
||||
var queryValues = parsedParameters.Keys.Cast<string>().ToDictionary(key => key, key => parsedParameters[key]);
|
||||
|
||||
if (string.IsNullOrEmpty(field))
|
||||
{
|
||||
url = imageUrlProvider.GetImageUrlFromFileName(specifiedSrc, queryValues);
|
||||
}
|
||||
else
|
||||
{
|
||||
var fieldValue = string.Empty;
|
||||
if (nodeId.HasValue)
|
||||
var imageUrlProvider = GetProvider(provider);
|
||||
|
||||
var parsedParameters = string.IsNullOrEmpty(parameters) ? new NameValueCollection() : HttpUtility.ParseQueryString(parameters);
|
||||
|
||||
var queryValues = parsedParameters.Keys.Cast<string>().ToDictionary(key => key, key => parsedParameters[key]);
|
||||
|
||||
if (string.IsNullOrEmpty(field))
|
||||
{
|
||||
url = imageUrlProvider.GetImageUrlFromFileName(specifiedSrc, queryValues);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
var fieldValue = string.Empty;
|
||||
if (nodeId.HasValue)
|
||||
{
|
||||
var contentFromCache = GetContentFromCache(nodeId.GetValueOrDefault(), field);
|
||||
if (contentFromCache != null)
|
||||
{
|
||||
fieldValue = contentFromCache.ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
var itemPage = new page(content.Instance.XmlContent.GetElementById(nodeId.GetValueOrDefault().ToString(CultureInfo.InvariantCulture)));
|
||||
var value = itemPage.Elements[field];
|
||||
fieldValue = value != null ? value.ToString() : string.Empty;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var context = HttpContext.Current;
|
||||
if (context != null)
|
||||
{
|
||||
var elements = context.Items["pageElements"] as Hashtable;
|
||||
if (elements != null)
|
||||
{
|
||||
var value = elements[field];
|
||||
fieldValue = value != null ? value.ToString() : string.Empty;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(fieldValue))
|
||||
{
|
||||
var contentFromCache = GetContentFromCache(nodeId.GetValueOrDefault(), field);
|
||||
if (contentFromCache != null)
|
||||
{
|
||||
fieldValue = contentFromCache.ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
var itemPage = new page(content.Instance.XmlContent.GetElementById(nodeId.GetValueOrDefault().ToString(CultureInfo.InvariantCulture)));
|
||||
var value = itemPage.Elements[field];
|
||||
fieldValue = value != null ? value.ToString() : string.Empty;
|
||||
}
|
||||
int mediaId;
|
||||
url = int.TryParse(fieldValue, out mediaId)
|
||||
? imageUrlProvider.GetImageUrlFromMedia(mediaId, queryValues)
|
||||
: imageUrlProvider.GetImageUrlFromFileName(fieldValue, queryValues);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
var context = HttpContext.Current;
|
||||
if (context != null)
|
||||
{
|
||||
var elements = context.Items["pageElements"] as Hashtable;
|
||||
if (elements != null)
|
||||
{
|
||||
var value = elements[field];
|
||||
fieldValue = value != null ? value.ToString() : string.Empty;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int mediaId;
|
||||
url = int.TryParse(fieldValue, out mediaId)
|
||||
? imageUrlProvider.GetImageUrlFromMedia(mediaId, queryValues)
|
||||
: imageUrlProvider.GetImageUrlFromFileName(fieldValue, queryValues);
|
||||
}
|
||||
|
||||
return url;
|
||||
}
|
||||
|
||||
private static IImageUrlProvider GetProvider(string provider)
|
||||
{
|
||||
return ImageUrlProviderResolver.Current.GetProvider(provider);
|
||||
}
|
||||
|
||||
private static object GetContentFromCache(int nodeIdInt, string field)
|
||||
{
|
||||
var context = HttpContext.Current;
|
||||
|
||||
if (context == null)
|
||||
return string.Empty;
|
||||
|
||||
var content = context.Cache[String.Format("contentItem{0}_{1}", nodeIdInt.ToString(CultureInfo.InvariantCulture), field)];
|
||||
return content;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
url = string.Empty;
|
||||
return false;
|
||||
}
|
||||
|
||||
private static IImageUrlProvider GetProvider(string provider)
|
||||
{
|
||||
return ImageUrlProviderResolver.Current.GetProvider(provider);
|
||||
}
|
||||
|
||||
private static object GetContentFromCache(int nodeIdInt, string field)
|
||||
{
|
||||
var context = HttpContext.Current;
|
||||
|
||||
if (context == null)
|
||||
return string.Empty;
|
||||
|
||||
var content = context.Cache[String.Format("contentItem{0}_{1}", nodeIdInt.ToString(CultureInfo.InvariantCulture), field)];
|
||||
return content;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,91 +1,91 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Xml.XPath;
|
||||
using Umbraco.Core.Media;
|
||||
using umbraco;
|
||||
|
||||
namespace Umbraco.Web.Media.ImageUrlProviders
|
||||
{
|
||||
public class ImageUrlProvider : IImageUrlProvider
|
||||
{
|
||||
public const string DefaultName = "umbracoUpload";
|
||||
|
||||
public string Name
|
||||
{
|
||||
get { return DefaultName; }
|
||||
}
|
||||
|
||||
public string GetImageUrlFromMedia(int mediaId, IDictionary<string, string> parameters)
|
||||
{
|
||||
var url = string.Empty;
|
||||
|
||||
var nodeIterator = library.GetMedia(mediaId, false);
|
||||
|
||||
if (nodeIterator.Current != null)
|
||||
{
|
||||
var filename = GetProperty(nodeIterator, "umbracoFile");
|
||||
var withThumb = AddThumbInfo(filename, parameters);
|
||||
url = AddCropInfo(withThumb, parameters);
|
||||
}
|
||||
|
||||
return url;
|
||||
}
|
||||
|
||||
public string GetImageUrlFromFileName(string specifiedSrc, IDictionary<string, string> parameters)
|
||||
{
|
||||
var withThumb = AddThumbInfo(specifiedSrc, parameters);
|
||||
return AddCropInfo(withThumb, parameters);
|
||||
}
|
||||
|
||||
private static string AddThumbInfo(string filename, IDictionary<string, string> parameters)
|
||||
{
|
||||
var thumb = string.Empty;
|
||||
if (parameters.ContainsKey("thumb"))
|
||||
thumb = parameters["thumb"];
|
||||
|
||||
if (!string.IsNullOrEmpty(thumb))
|
||||
{
|
||||
var lastIndexOf = filename.LastIndexOf('.');
|
||||
var name = filename.Substring(0, lastIndexOf);
|
||||
var extension = filename.Substring(lastIndexOf, filename.Length - lastIndexOf);
|
||||
return string.Format("{0}_thumb_{1}{2}", name, thumb, extension);
|
||||
}
|
||||
return filename;
|
||||
}
|
||||
|
||||
private static string AddCropInfo(string filename, IDictionary<string, string> parameters)
|
||||
{
|
||||
var crop = string.Empty;
|
||||
if (parameters.ContainsKey("crop"))
|
||||
crop = parameters["crop"];
|
||||
|
||||
if (!string.IsNullOrEmpty(crop))
|
||||
{
|
||||
var lastIndexOf = filename.LastIndexOf('.');
|
||||
var name = filename.Substring(0, lastIndexOf);
|
||||
|
||||
//var extension = filename.Substring(lastIndexOf, filename.Length - lastIndexOf);
|
||||
//Built in cropper currently always uses jpg as an extension
|
||||
|
||||
const string extension = ".jpg";
|
||||
return string.Format("{0}_{1}{2}", name, crop, extension);
|
||||
}
|
||||
|
||||
return filename;
|
||||
}
|
||||
|
||||
|
||||
private static string GetProperty(XPathNodeIterator nodeIterator, string fileProp)
|
||||
{
|
||||
var xpath = UmbracoSettings.UseLegacyXmlSchema
|
||||
? string.Format(".//data[@alias = '{0}']", fileProp)
|
||||
: string.Format(".//{0}", fileProp);
|
||||
|
||||
var file = string.Empty;
|
||||
var selectSingleNode = nodeIterator.Current.SelectSingleNode(xpath);
|
||||
if (selectSingleNode != null)
|
||||
file = selectSingleNode.InnerXml;
|
||||
|
||||
return file;
|
||||
}
|
||||
}
|
||||
using System.Collections.Generic;
|
||||
using System.Xml.XPath;
|
||||
using Umbraco.Core.Media;
|
||||
using umbraco;
|
||||
|
||||
namespace Umbraco.Web.Media.ImageUrlProviders
|
||||
{
|
||||
public class ImageUrlProvider : IImageUrlProvider
|
||||
{
|
||||
public const string DefaultName = "umbracoUpload";
|
||||
|
||||
public string Name
|
||||
{
|
||||
get { return DefaultName; }
|
||||
}
|
||||
|
||||
public string GetImageUrlFromMedia(int mediaId, IDictionary<string, string> parameters)
|
||||
{
|
||||
var url = string.Empty;
|
||||
|
||||
var nodeIterator = library.GetMedia(mediaId, false);
|
||||
|
||||
if (nodeIterator.Current != null)
|
||||
{
|
||||
var filename = GetProperty(nodeIterator, "umbracoFile");
|
||||
var withThumb = AddThumbInfo(filename, parameters);
|
||||
url = AddCropInfo(withThumb, parameters);
|
||||
}
|
||||
|
||||
return url;
|
||||
}
|
||||
|
||||
public string GetImageUrlFromFileName(string specifiedSrc, IDictionary<string, string> parameters)
|
||||
{
|
||||
var withThumb = AddThumbInfo(specifiedSrc, parameters);
|
||||
return AddCropInfo(withThumb, parameters);
|
||||
}
|
||||
|
||||
private static string AddThumbInfo(string filename, IDictionary<string, string> parameters)
|
||||
{
|
||||
var thumb = string.Empty;
|
||||
if (parameters.ContainsKey("thumb"))
|
||||
thumb = parameters["thumb"];
|
||||
|
||||
if (!string.IsNullOrEmpty(thumb) && filename.Contains("."))
|
||||
{
|
||||
var lastIndexOf = filename.LastIndexOf('.');
|
||||
var name = filename.Substring(0, lastIndexOf);
|
||||
var extension = filename.Substring(lastIndexOf, filename.Length - lastIndexOf);
|
||||
return string.Format("{0}_thumb_{1}{2}", name, thumb, extension);
|
||||
}
|
||||
return filename;
|
||||
}
|
||||
|
||||
private static string AddCropInfo(string filename, IDictionary<string, string> parameters)
|
||||
{
|
||||
var crop = string.Empty;
|
||||
if (parameters.ContainsKey("crop"))
|
||||
crop = parameters["crop"];
|
||||
|
||||
if (!string.IsNullOrEmpty(crop) && filename.Contains("."))
|
||||
{
|
||||
var lastIndexOf = filename.LastIndexOf('.');
|
||||
var name = filename.Substring(0, lastIndexOf);
|
||||
|
||||
//var extension = filename.Substring(lastIndexOf, filename.Length - lastIndexOf);
|
||||
//Built in cropper currently always uses jpg as an extension
|
||||
|
||||
const string extension = ".jpg";
|
||||
return string.Format("{0}_{1}{2}", name, crop, extension);
|
||||
}
|
||||
|
||||
return filename;
|
||||
}
|
||||
|
||||
|
||||
private static string GetProperty(XPathNodeIterator nodeIterator, string fileProp)
|
||||
{
|
||||
var xpath = UmbracoSettings.UseLegacyXmlSchema
|
||||
? string.Format(".//data[@alias = '{0}']", fileProp)
|
||||
: string.Format(".//{0}", fileProp);
|
||||
|
||||
var file = string.Empty;
|
||||
var selectSingleNode = nodeIterator.Current.SelectSingleNode(xpath);
|
||||
if (selectSingleNode != null)
|
||||
file = selectSingleNode.InnerXml;
|
||||
|
||||
return file;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,7 +7,7 @@ using Umbraco.Core.Configuration;
|
||||
|
||||
namespace Umbraco.Web.Mvc
|
||||
{
|
||||
internal static class AreaRegistrationExtensions
|
||||
internal static class AreaRegistrationExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Creates a custom individual route for the specified controller plugin. Individual routes
|
||||
@@ -31,7 +31,7 @@ namespace Umbraco.Web.Mvc
|
||||
string umbracoTokenValue = "backoffice")
|
||||
{
|
||||
Mandate.ParameterNotNullOrEmpty(controllerName, "controllerName");
|
||||
Mandate.ParameterNotNullOrEmpty(controllerSuffixName, "controllerSuffixName");
|
||||
Mandate.ParameterNotNull(controllerSuffixName, "controllerSuffixName");
|
||||
Mandate.ParameterNotNullOrEmpty(defaultAction, "defaultAction");
|
||||
Mandate.ParameterNotNull(controllerType, "controllerType");
|
||||
Mandate.ParameterNotNull(routes, "routes");
|
||||
@@ -60,13 +60,18 @@ namespace Umbraco.Web.Mvc
|
||||
{ "id", defaultId }
|
||||
});
|
||||
|
||||
//constraints: only match controllers ending with 'controllerSuffixName' and only match this controller's ID for this route
|
||||
controllerPluginRoute.Constraints = new RouteValueDictionary(
|
||||
new Dictionary<string, object>
|
||||
//Don't look anywhere else except this namespace!
|
||||
controllerPluginRoute.DataTokens.Add("UseNamespaceFallback", false);
|
||||
|
||||
//constraints: only match controllers ending with 'controllerSuffixName' and only match this controller's ID for this route
|
||||
if (controllerSuffixName.IsNullOrWhiteSpace() == false)
|
||||
{
|
||||
controllerPluginRoute.Constraints = new RouteValueDictionary(
|
||||
new Dictionary<string, object>
|
||||
{
|
||||
{ "controller", @"(\w+)" + controllerSuffixName }
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
//match this area
|
||||
controllerPluginRoute.DataTokens.Add("area", area.AreaName);
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
using System.Web.Mvc;
|
||||
using Umbraco.Core.Configuration;
|
||||
using Umbraco.Web.Install;
|
||||
|
||||
namespace Umbraco.Web.Mvc
|
||||
{
|
||||
/// <summary>
|
||||
/// An area registration for back office components
|
||||
/// </summary>
|
||||
internal class BackOfficeArea : AreaRegistration
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Create the routes for the area
|
||||
/// </summary>
|
||||
/// <param name="context"></param>
|
||||
/// <remarks>
|
||||
/// By using the context to register the routes it means that the area is already applied to them all
|
||||
/// and that the namespaces searched for the controllers are ONLY the ones specified.
|
||||
/// </remarks>
|
||||
public override void RegisterArea(AreaRegistrationContext context)
|
||||
{
|
||||
//Create the install routes
|
||||
context.MapRoute(
|
||||
"Umbraco_install_packages",
|
||||
"Install/PackageInstaller/{action}/{id}",
|
||||
new {controller = "InstallPackage", action = "Index", id = UrlParameter.Optional},
|
||||
new[] {typeof (InstallPackageController).Namespace});
|
||||
|
||||
//Create the REST/web/script service routes
|
||||
context.MapRoute(
|
||||
"Umbraco_web_services",
|
||||
GlobalSettings.UmbracoMvcArea + "/RestServices/{controller}/{action}/{id}",
|
||||
new {controller = "SaveFileController", action = "Index", id = UrlParameter.Optional},
|
||||
//look in this namespace for controllers
|
||||
new[] {"Umbraco.Web.WebServices"});
|
||||
}
|
||||
|
||||
public override string AreaName
|
||||
{
|
||||
get { return GlobalSettings.UmbracoMvcArea; }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using System.Web.Mvc;
|
||||
using Umbraco.Web.Models;
|
||||
|
||||
namespace Umbraco.Web.Mvc
|
||||
{
|
||||
/// <summary>
|
||||
/// The interface that must be implemented for a controller to be designated to execute for route hijacking
|
||||
/// </summary>
|
||||
public interface IRenderMvcController : IController
|
||||
{
|
||||
/// <summary>
|
||||
/// The default action to render the front-end view
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
/// <returns></returns>
|
||||
ActionResult Index(RenderModel model);
|
||||
}
|
||||
}
|
||||
@@ -67,7 +67,7 @@ namespace Umbraco.Web.Mvc
|
||||
{
|
||||
foreach (var s in surfaceControllers)
|
||||
{
|
||||
this.RouteControllerPlugin(s.ControllerName, s.ControllerType, routes, "Surface", "Index", UrlParameter.Optional, "surface");
|
||||
this.RouteControllerPlugin(s.ControllerName, s.ControllerType, routes, "", "Index", UrlParameter.Optional, "surface");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,8 +22,8 @@ namespace Umbraco.Web.Mvc
|
||||
//now we need to check if it exists, if not we need to return the Index by default
|
||||
if (ad == null)
|
||||
{
|
||||
//check if the controller is an instance of RenderMvcController
|
||||
if (controllerContext.Controller is RenderMvcController)
|
||||
//check if the controller is an instance of IRenderMvcController
|
||||
if (controllerContext.Controller is IRenderMvcController)
|
||||
{
|
||||
return new ReflectedActionDescriptor(controllerContext.Controller.GetType().GetMethod("Index"), "Index", controllerDescriptor);
|
||||
}
|
||||
|
||||
@@ -54,12 +54,24 @@ namespace Umbraco.Web.Mvc
|
||||
/// The controller.
|
||||
/// </returns>
|
||||
/// <param name="requestContext">The request context.</param><param name="controllerName">The name of the controller.</param>
|
||||
/// <remarks>
|
||||
/// We always set the correct ActionInvoker on our custom created controller, this is very important for route hijacking!
|
||||
/// </remarks>
|
||||
public virtual IController CreateController(RequestContext requestContext, string controllerName)
|
||||
{
|
||||
Type controllerType = GetControllerType(requestContext, controllerName) ??
|
||||
_innerFactory.GetControllerType(requestContext, ControllerExtensions.GetControllerName(typeof(RenderMvcController)));
|
||||
|
||||
return _innerFactory.GetControllerInstance(requestContext, controllerType);
|
||||
var instance = _innerFactory.GetControllerInstance(requestContext, controllerType);
|
||||
|
||||
var controllerInstance = instance as Controller;
|
||||
if (controllerInstance != null)
|
||||
{
|
||||
//set the action invoker!
|
||||
controllerInstance.ActionInvoker = new RenderActionInvoker();
|
||||
}
|
||||
|
||||
return instance;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -11,8 +11,11 @@ using Umbraco.Web.Routing;
|
||||
|
||||
namespace Umbraco.Web.Mvc
|
||||
{
|
||||
public class RenderMvcController : Controller
|
||||
{
|
||||
/// <summary>
|
||||
/// The default controller that is executed for rendering MVC content in Umbraco
|
||||
/// </summary>
|
||||
public class RenderMvcController : Controller, IRenderMvcController
|
||||
{
|
||||
|
||||
public RenderMvcController()
|
||||
{
|
||||
|
||||
@@ -155,7 +155,7 @@ namespace Umbraco.Web.Mvc
|
||||
ReservedAdditionalKeys.Area }.Contains(x.Key)))
|
||||
{
|
||||
// Populate route with additional values which aren't reserved values so they eventually to action parameters
|
||||
requestContext.RouteData.Values.Add(item.Key, item.Value);
|
||||
requestContext.RouteData.Values[item.Key] = item.Value;
|
||||
}
|
||||
|
||||
//return the proxy info without the surface id... could be a local controller.
|
||||
@@ -239,11 +239,11 @@ namespace Umbraco.Web.Mvc
|
||||
if (controller != null)
|
||||
{
|
||||
|
||||
//ensure the controller is of type 'RenderMvcController'
|
||||
if (controller is RenderMvcController)
|
||||
//ensure the controller is of type 'IRenderMvcController' and ControllerBase
|
||||
if (controller is IRenderMvcController && controller is ControllerBase)
|
||||
{
|
||||
//set the controller and name to the custom one
|
||||
def.Controller = (ControllerBase)controller;
|
||||
def.Controller = (ControllerBase)controller;
|
||||
def.ControllerName = ControllerExtensions.GetControllerName(controller.GetType());
|
||||
if (def.ControllerName != defaultControllerName)
|
||||
{
|
||||
@@ -253,10 +253,11 @@ namespace Umbraco.Web.Mvc
|
||||
else
|
||||
{
|
||||
LogHelper.Warn<RenderRouteHandler>(
|
||||
"The current Document Type {0} matches a locally declared controller of type {1}. Custom Controllers for Umbraco routing must inherit from '{2}'.",
|
||||
"The current Document Type {0} matches a locally declared controller of type {1}. Custom Controllers for Umbraco routing must implement '{2}' and inherit from '{3}'.",
|
||||
() => publishedContentRequest.PublishedContent.DocumentTypeAlias,
|
||||
() => controller.GetType().FullName,
|
||||
() => typeof(RenderMvcController).FullName);
|
||||
() => typeof(IRenderMvcController).FullName,
|
||||
() => typeof(ControllerBase).FullName);
|
||||
//exit as we cannnot route to the custom controller, just route to the standard one.
|
||||
return def;
|
||||
}
|
||||
|
||||
@@ -4,6 +4,8 @@ using System.Web.Routing;
|
||||
|
||||
namespace Umbraco.Web.Mvc
|
||||
{
|
||||
//NOTE: We currently are not using this at all and should/could probably remove it!
|
||||
|
||||
/// <summary>
|
||||
/// Creates SurfaceControllers
|
||||
/// </summary>
|
||||
|
||||
@@ -278,6 +278,8 @@
|
||||
<Compile Include="DefaultPublishedMediaStore.cs" />
|
||||
<Compile Include="Dictionary\UmbracoCultureDictionary.cs" />
|
||||
<Compile Include="Dictionary\UmbracoCultureDictionaryFactory.cs" />
|
||||
<Compile Include="Mvc\BackOfficeArea.cs" />
|
||||
<Compile Include="Mvc\IRenderMvcController.cs" />
|
||||
<Compile Include="Mvc\UmbracoAuthorizeAttribute.cs" />
|
||||
<Compile Include="Mvc\NotChildAction.cs" />
|
||||
<Compile Include="Mvc\UmbracoAuthorizedController.cs" />
|
||||
@@ -366,6 +368,9 @@
|
||||
<Compile Include="umbraco.presentation\umbraco\controls\ContentTypeControlNew.ascx.cs">
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="umbraco.presentation\umbraco\dialogs\moveOrCopy.aspx.cs">
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="umbraco.presentation\umbraco\dialogs\sort.aspx.cs">
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
@@ -420,9 +425,9 @@
|
||||
<Compile Include="umbraco.presentation\umbraco\settings\modals\ShowUmbracoTags.aspx.cs">
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="umbraco.presentation\umbraco\settings\stylesheet\editstylesheet.aspx.cs">
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="umbraco.presentation\umbraco\settings\stylesheet\editstylesheet.aspx.cs">
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="umbraco.presentation\umbraco\settings\stylesheet\property\EditStyleSheetProperty.aspx.cs">
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
@@ -1246,13 +1251,6 @@
|
||||
<Compile Include="umbraco.presentation\umbraco\dialogs\insertTable.aspx.designer.cs">
|
||||
<DependentUpon>insertTable.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="umbraco.presentation\umbraco\dialogs\moveOrCopy.aspx.cs">
|
||||
<DependentUpon>moveOrCopy.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="umbraco.presentation\umbraco\dialogs\moveOrCopy.aspx.designer.cs">
|
||||
<DependentUpon>moveOrCopy.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="umbraco.presentation\umbraco\dialogs\notifications.aspx.cs">
|
||||
<DependentUpon>notifications.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
@@ -1919,7 +1917,6 @@
|
||||
<Content Include="umbraco.presentation\umbraco\dialogs\importDocumenttype.aspx" />
|
||||
<Content Include="umbraco.presentation\umbraco\dialogs\insertMacro.aspx" />
|
||||
<Content Include="umbraco.presentation\umbraco\dialogs\insertTable.aspx" />
|
||||
<Content Include="umbraco.presentation\umbraco\dialogs\moveOrCopy.aspx" />
|
||||
<Content Include="umbraco.presentation\umbraco\dialogs\notifications.aspx" />
|
||||
<Content Include="umbraco.presentation\umbraco\developer\Packages\installer.aspx" />
|
||||
<Content Include="umbraco.presentation\umbraco\dialogs\protectPage.aspx" />
|
||||
@@ -1941,7 +1938,7 @@
|
||||
<Content Include="umbraco.presentation\install\steps\welcome.ascx">
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Content>
|
||||
<Content Include="umbraco.presentation\umbraco\cacheBrowser.aspx" />
|
||||
<Content Include="umbraco.presentation\umbraco\cacheBrowser.aspx" />
|
||||
<Content Include="umbraco.presentation\umbraco\members\ViewMembers.aspx" />
|
||||
<Content Include="umbraco.presentation\umbraco\plugins\tinymce3\insertImage.aspx">
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
|
||||
@@ -319,11 +319,19 @@ namespace Umbraco.Web
|
||||
LegacyAttributes = attributesForItem
|
||||
};
|
||||
|
||||
//this is here to figure out if this request is in the context of a partial
|
||||
if (_umbracoContext.PublishedContentRequest.PublishedContent.Id != currentPage.Id)
|
||||
//here we are going to check if we are in the context of an Umbraco routed page, if we are we
|
||||
//will leave the NodeId empty since the underlying ItemRenderer will work ever so slightly faster
|
||||
//since it already knows about the current page. Otherwise, we'll assign the id based on our
|
||||
//currently assigned node. The PublishedContentRequest will be null if:
|
||||
// * we are rendering a partial view or child action
|
||||
// * we are rendering a view from a custom route
|
||||
if (_umbracoContext.PublishedContentRequest == null
|
||||
|| _umbracoContext.PublishedContentRequest.PublishedContent.Id != currentPage.Id)
|
||||
{
|
||||
item.NodeId = currentPage.Id.ToString();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
var containerPage = new FormlessPage();
|
||||
containerPage.Controls.Add(item);
|
||||
|
||||
|
||||
@@ -431,9 +431,16 @@ namespace Umbraco.Web
|
||||
app.PreSendRequestHeaders += (sender, args) =>
|
||||
{
|
||||
var httpContext = ((HttpApplication)sender).Context;
|
||||
httpContext.Response.Headers.Remove("Server");
|
||||
//this doesn't normally work since IIS sets it but we'll keep it here anyways.
|
||||
httpContext.Response.Headers.Remove("X-Powered-By");
|
||||
try
|
||||
{
|
||||
httpContext.Response.Headers.Remove("Server");
|
||||
//this doesn't normally work since IIS sets it but we'll keep it here anyways.
|
||||
httpContext.Response.Headers.Remove("X-Powered-By");
|
||||
}
|
||||
catch (PlatformNotSupportedException ex)
|
||||
{
|
||||
// can't remove headers this way on IIS6 or cassini.
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -30,10 +30,10 @@ namespace Umbraco.Web
|
||||
{
|
||||
private readonly bool _isForTesting;
|
||||
|
||||
public WebBootManager(UmbracoApplicationBase umbracoApplication)
|
||||
public WebBootManager(UmbracoApplicationBase umbracoApplication)
|
||||
: this(umbracoApplication, false)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -41,10 +41,10 @@ namespace Umbraco.Web
|
||||
/// </summary>
|
||||
/// <param name="umbracoApplication"></param>
|
||||
/// <param name="isForTesting"></param>
|
||||
internal WebBootManager(UmbracoApplicationBase umbracoApplication, bool isForTesting)
|
||||
internal WebBootManager(UmbracoApplicationBase umbracoApplication, bool isForTesting)
|
||||
: base(umbracoApplication)
|
||||
{
|
||||
_isForTesting = isForTesting;
|
||||
_isForTesting = isForTesting;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -52,7 +52,7 @@ namespace Umbraco.Web
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public override IBootManager Initialize()
|
||||
{
|
||||
{
|
||||
base.Initialize();
|
||||
|
||||
// Backwards compatibility - set the path and URL type for ClientDependency 1.5.1 [LK]
|
||||
@@ -130,43 +130,36 @@ namespace Umbraco.Web
|
||||
);
|
||||
defaultRoute.RouteHandler = new RenderRouteHandler(ControllerBuilder.Current.GetControllerFactory());
|
||||
|
||||
//Create the install routes
|
||||
var installPackageRoute = RouteTable.Routes.MapRoute(
|
||||
"Umbraco_install_packages",
|
||||
"Install/PackageInstaller/{action}/{id}",
|
||||
new { controller = "InstallPackage", action = "Index", id = UrlParameter.Optional }
|
||||
);
|
||||
installPackageRoute.DataTokens.Add("area", umbracoPath);
|
||||
//register all back office routes
|
||||
RouteBackOfficeControllers();
|
||||
|
||||
//Create the REST/web/script service routes
|
||||
var webServiceRoutes = RouteTable.Routes.MapRoute(
|
||||
"Umbraco_web_services",
|
||||
umbracoPath + "/RestServices/{controller}/{action}/{id}",
|
||||
new {controller = "SaveFileController", action = "Index", id = UrlParameter.Optional},
|
||||
//VERY IMPORTANT! for this route, only match controllers in this namespace!
|
||||
new string[] { "Umbraco.Web.WebServices" }
|
||||
);
|
||||
webServiceRoutes.DataTokens.Add("area", umbracoPath);
|
||||
//plugin controllers must come first because the next route will catch many things
|
||||
RoutePluginControllers();
|
||||
}
|
||||
|
||||
//we need to find the surface controllers and route them
|
||||
var surfaceControllers = SurfaceControllerResolver.Current.RegisteredSurfaceControllers.ToArray();
|
||||
private void RouteBackOfficeControllers()
|
||||
{
|
||||
var backOfficeArea = new BackOfficeArea();
|
||||
RouteTable.Routes.RegisterArea(backOfficeArea);
|
||||
}
|
||||
|
||||
//local surface controllers do not contain the attribute
|
||||
var localSurfaceControlleres = surfaceControllers.Where(x => PluginController.GetMetadata(x).AreaName.IsNullOrWhiteSpace());
|
||||
foreach (var s in localSurfaceControlleres)
|
||||
private void RoutePluginControllers()
|
||||
{
|
||||
var umbracoPath = GlobalSettings.UmbracoMvcArea;
|
||||
|
||||
//we need to find the plugin controllers and route them
|
||||
var pluginControllers =
|
||||
SurfaceControllerResolver.Current.RegisteredSurfaceControllers.ToArray();
|
||||
|
||||
//local controllers do not contain the attribute
|
||||
var localControllers = pluginControllers.Where(x => PluginController.GetMetadata(x).AreaName.IsNullOrWhiteSpace());
|
||||
foreach (var s in localControllers)
|
||||
{
|
||||
var meta = PluginController.GetMetadata(s);
|
||||
var route = RouteTable.Routes.MapRoute(
|
||||
string.Format("umbraco-{0}-{1}", "surface", meta.ControllerName),
|
||||
umbracoPath + "/Surface/" + meta.ControllerName + "/{action}/{id}",//url to match
|
||||
new { controller = meta.ControllerName, action = "Index", id = UrlParameter.Optional },
|
||||
new[] { meta.ControllerNamespace }); //only match this namespace
|
||||
route.DataTokens.Add("umbraco", "surface"); //ensure the umbraco token is set
|
||||
RouteLocalSurfaceController(s, umbracoPath);
|
||||
}
|
||||
|
||||
//need to get the plugin controllers that are unique to each area (group by)
|
||||
//TODO: One day when we have more plugin controllers, we will need to do a group by on ALL of them to pass into the ctor of PluginControllerArea
|
||||
var pluginSurfaceControlleres = surfaceControllers.Where(x => !PluginController.GetMetadata(x).AreaName.IsNullOrWhiteSpace());
|
||||
var pluginSurfaceControlleres = pluginControllers.Where(x => !PluginController.GetMetadata(x).AreaName.IsNullOrWhiteSpace());
|
||||
var groupedAreas = pluginSurfaceControlleres.GroupBy(controller => PluginController.GetMetadata(controller).AreaName);
|
||||
//loop through each area defined amongst the controllers
|
||||
foreach (var g in groupedAreas)
|
||||
@@ -178,7 +171,17 @@ namespace Umbraco.Web
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void RouteLocalSurfaceController(Type controller, string umbracoPath)
|
||||
{
|
||||
var meta = PluginController.GetMetadata(controller);
|
||||
var route = RouteTable.Routes.MapRoute(
|
||||
string.Format("umbraco-{0}-{1}", "surface", meta.ControllerName),
|
||||
umbracoPath + "/Surface/" + meta.ControllerName + "/{action}/{id}",//url to match
|
||||
new { controller = meta.ControllerName, action = "Index", id = UrlParameter.Optional },
|
||||
new[] { meta.ControllerNamespace }); //look in this namespace to create the controller
|
||||
route.DataTokens.Add("umbraco", "surface"); //ensure the umbraco token is set
|
||||
route.DataTokens.Add("UseNamespaceFallback", false); //Don't look anywhere else except this namespace!
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes all web based and core resolves
|
||||
@@ -212,7 +215,7 @@ namespace Umbraco.Web
|
||||
|
||||
// the legacy 404 will run from within LookupByNotFoundHandlers below
|
||||
// so for the time being there is no last chance lookup
|
||||
LastChanceLookupResolver.Current = new LastChanceLookupResolver();
|
||||
LastChanceLookupResolver.Current = new LastChanceLookupResolver();
|
||||
|
||||
DocumentLookupsResolver.Current = new DocumentLookupsResolver(
|
||||
//add all known resolvers in the correct order, devs can then modify this list on application startup either by binding to events
|
||||
|
||||
@@ -415,7 +415,24 @@ namespace umbraco
|
||||
}
|
||||
else
|
||||
{
|
||||
//check the current parent id
|
||||
var currParentId = currentNode.AttributeValue<int>("parentID");
|
||||
|
||||
//update the node with it's new values
|
||||
TransferValuesFromDocumentXmlToPublishedXml(docNode, currentNode);
|
||||
|
||||
//If the node is being moved we also need to ensure that it exists under the new parent!
|
||||
// http://issues.umbraco.org/issue/U4-2312
|
||||
// we were never checking this before and instead simply changing the parentId value but not
|
||||
// changing the actual parent.
|
||||
|
||||
//check the new parent
|
||||
if (currParentId != currentNode.AttributeValue<int>("parentID"))
|
||||
{
|
||||
//ok, we've actually got to move the node
|
||||
parentNode.AppendChild(currentNode);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// TODO: Update with new schema!
|
||||
|
||||
@@ -31,6 +31,7 @@ using umbraco.NodeFactory;
|
||||
using umbraco.presentation.templateControls;
|
||||
using Content = umbraco.cms.businesslogic.Content;
|
||||
using Macro = umbraco.cms.businesslogic.macro.Macro;
|
||||
using MacroErrorEventArgs = Umbraco.Core.Events.MacroErrorEventArgs;
|
||||
|
||||
namespace umbraco
|
||||
{
|
||||
@@ -1535,7 +1536,6 @@ namespace umbraco
|
||||
{
|
||||
Mandate.ParameterNotNullOrEmpty(fileName, "fileName");
|
||||
Mandate.ParameterNotNull(model, "model");
|
||||
Mandate.ParameterNotNull(pageElements, "pageElements");
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
@@ -12,7 +12,8 @@ namespace umbraco.ActionHandlers
|
||||
/// It ensures that new content nodes gets a unique name, and thereby avoiding conflictiong URLs.
|
||||
/// It can be disabled in the umbracoSettings.config file.
|
||||
/// </summary>
|
||||
public class umbEnsureUniqueName : umbraco.BusinessLogic.Actions.IActionHandler
|
||||
[Obsolete("This handler is no longer used")]
|
||||
public class umbEnsureUniqueName : IActionHandler
|
||||
{
|
||||
public umbEnsureUniqueName()
|
||||
{
|
||||
@@ -82,7 +83,7 @@ namespace umbraco.ActionHandlers
|
||||
/// <returns></returns>
|
||||
public interfaces.IAction[] ReturnActions()
|
||||
{
|
||||
interfaces.IAction[] _retVal = { ActionNew.Instance };
|
||||
interfaces.IAction[] _retVal = { };
|
||||
return _retVal;
|
||||
}
|
||||
|
||||
|
||||
@@ -89,7 +89,8 @@ function openMedia(id) {
|
||||
{
|
||||
if (dd.ContentType.Alias.ToLower() == "folder")
|
||||
{
|
||||
xNode.Action = "javascript:jQuery('.umbTree #" + dd.Id.ToString() + "').click();";
|
||||
//#U4-2254 - Inspiration to use void from here: http://stackoverflow.com/questions/4924383/jquery-object-object-error
|
||||
xNode.Action = "javascript:void jQuery('.umbTree #" + dd.Id.ToString() + "').click();";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -1,28 +1,13 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Xml;
|
||||
using System.Configuration;
|
||||
using umbraco.BasePages;
|
||||
using umbraco.BusinessLogic;
|
||||
using umbraco.businesslogic;
|
||||
using umbraco.cms.businesslogic;
|
||||
using umbraco.cms.businesslogic.cache;
|
||||
using umbraco.cms.businesslogic.contentitem;
|
||||
using umbraco.cms.businesslogic.datatype;
|
||||
using umbraco.cms.businesslogic.language;
|
||||
using umbraco.cms.businesslogic.media;
|
||||
using umbraco.cms.businesslogic.member;
|
||||
using umbraco.cms.businesslogic.property;
|
||||
using umbraco.cms.businesslogic.web;
|
||||
using umbraco.interfaces;
|
||||
using umbraco.DataLayer;
|
||||
using umbraco.BusinessLogic.Utils;
|
||||
using umbraco.cms.businesslogic.packager;
|
||||
using umbraco.cms.presentation.Trees;
|
||||
using umbraco.interfaces;
|
||||
|
||||
namespace umbraco
|
||||
{
|
||||
@@ -63,18 +48,24 @@ namespace umbraco
|
||||
switch (m_packageType)
|
||||
{
|
||||
case "installed":
|
||||
foreach (cms.businesslogic.packager.InstalledPackage p in cms.businesslogic.packager.InstalledPackage.GetAllInstalledPackages())
|
||||
Version v;
|
||||
// Display the unique packages, ordered by the latest version number. [LK 2013-06-10]
|
||||
var uniquePackages = InstalledPackage.GetAllInstalledPackages()
|
||||
.OrderByDescending(x => Version.TryParse(x.Data.Version, out v) ? v : new Version())
|
||||
.GroupBy(x => x.Data.Name)
|
||||
.Select(x => x.First())
|
||||
.OrderBy(x => x.Data.Id);
|
||||
foreach (var p in uniquePackages)
|
||||
{
|
||||
XmlTreeNode xNode = XmlTreeNode.Create(this);
|
||||
xNode.NodeID = PACKAGE_TREE_PREFIX + p.Data.Id.ToString();
|
||||
var xNode = XmlTreeNode.Create(this);
|
||||
xNode.NodeID = string.Concat(PACKAGE_TREE_PREFIX, p.Data.Id);
|
||||
xNode.Text = p.Data.Name;
|
||||
xNode.Action = "javascript:openInstalledPackage('" + p.Data.Id.ToString() + "');";
|
||||
xNode.Action = string.Format("javascript:openInstalledPackage('{0}');", p.Data.Id);
|
||||
xNode.Icon = "package.gif";
|
||||
xNode.OpenIcon = "package.gif";
|
||||
xNode.NodeType = "createdPackageInstance";
|
||||
xNode.Menu = null;
|
||||
tree.Add(xNode);
|
||||
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
+1
-1
@@ -223,7 +223,7 @@ namespace umbraco.controls.GenericProperties
|
||||
checkMandatory.Checked = true;
|
||||
|
||||
// validation
|
||||
if (_pt != null && _pt.ValidationRegExp != "")
|
||||
if (_pt != null && string.IsNullOrEmpty(_pt.ValidationRegExp) == false)
|
||||
tbValidation.Text = _pt.ValidationRegExp;
|
||||
|
||||
// description
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace umbraco
|
||||
|
||||
public bool Save()
|
||||
{
|
||||
string[] scriptFileAr = _alias.Split('¤');
|
||||
string[] scriptFileAr = _alias.Split('\u00A4');
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
<div style="margin-right: 15px;">
|
||||
<asp:Button id="sbmt" Runat="server" style="Width: 90px; margin-right: 6px;" onclick="sbmt_Click"></asp:Button>
|
||||
<em> or </em>
|
||||
<em> <%= umbraco.ui.Text("or") %> </em>
|
||||
<a href="#" style="color: Blue; margin-left: 6px;" onclick="UmbClientMgr.closeModalWindow()"><%=umbraco.ui.Text("cancel")%></a>
|
||||
|
||||
<!--
|
||||
|
||||
@@ -123,7 +123,7 @@ namespace umbraco.cms.presentation.create.controls
|
||||
/// <param name="e"></param>
|
||||
protected void EmailExistsCheck(object sender, ServerValidateEventArgs e)
|
||||
{
|
||||
if (Email.Text != "" && Member.GetMemberFromEmail(Email.Text.ToLower()) != null)
|
||||
if (Email.Text != "" && Member.GetMemberFromEmail(Email.Text.ToLower()) != null && Membership.Providers[Member.UmbracoMemberProviderName].RequiresUniqueEmail)
|
||||
e.IsValid = false;
|
||||
else
|
||||
e.IsValid = true;
|
||||
|
||||
+11
-1
@@ -56,7 +56,17 @@
|
||||
|
||||
|
||||
</cc2:Pane>
|
||||
|
||||
|
||||
<cc2:Pane ID="pane_versions" runat="server" Text="Package version history" Visible="false">
|
||||
<cc2:PropertyPanel ID="pp_versions" runat="server">
|
||||
<asp:Repeater ID="rptr_versions" runat="server">
|
||||
<HeaderTemplate><ul></HeaderTemplate>
|
||||
<ItemTemplate><li><a href="#"><%# ((InstalledPackage)Container.DataItem).Data.Name %></a></li></ItemTemplate>
|
||||
<FooterTemplate></ul></FooterTemplate>
|
||||
</asp:Repeater>
|
||||
</cc2:PropertyPanel>
|
||||
</cc2:Pane>
|
||||
|
||||
<cc2:Pane ID="pane_options" runat="server" Text="Package options">
|
||||
<table border="0" style="width: 100%;">
|
||||
<tr><td class="propertyHeader" valign="top">
|
||||
|
||||
+16
@@ -335,6 +335,20 @@ namespace umbraco.presentation.developer.packages
|
||||
bt_uninstall.Visible = false;
|
||||
pane_uninstall.Visible = false;
|
||||
}
|
||||
|
||||
// List the package version history [LK 2013-067-10]
|
||||
Version v;
|
||||
var packageVersionHistory = cms.businesslogic.packager.InstalledPackage.GetAllInstalledPackages()
|
||||
.Where(x => x.Data.Id != _pack.Data.Id && string.Equals(x.Data.Name, _pack.Data.Name, StringComparison.OrdinalIgnoreCase))
|
||||
.OrderBy(x => Version.TryParse(x.Data.Version, out v) ? v : new Version());
|
||||
|
||||
if (packageVersionHistory != null && packageVersionHistory.Count() > 0)
|
||||
{
|
||||
rptr_versions.DataSource = packageVersionHistory;
|
||||
rptr_versions.DataBind();
|
||||
|
||||
pane_versions.Visible = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -613,6 +627,8 @@ namespace umbraco.presentation.developer.packages
|
||||
pp_upgradeInstruction.Text = ui.Text("packager", "packageUpgradeInstructions");
|
||||
bt_gotoUpgrade.Text = ui.Text("packager", "packageUpgradeDownload");
|
||||
|
||||
pane_versions.Text = ui.Text("packager", "packageVersionHistory");
|
||||
|
||||
pane_noItems.Text = ui.Text("packager", "packageNoItemsHeader");
|
||||
|
||||
pane_uninstall.Text = ui.Text("packager", "packageUninstallHeader");
|
||||
|
||||
Generated
+28
-2
@@ -1,10 +1,9 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.4200
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@@ -175,6 +174,33 @@ namespace umbraco.presentation.developer.packages {
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Literal lt_readme;
|
||||
|
||||
/// <summary>
|
||||
/// pane_versions control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::umbraco.uicontrols.Pane pane_versions;
|
||||
|
||||
/// <summary>
|
||||
/// pp_versions control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::umbraco.uicontrols.PropertyPanel pp_versions;
|
||||
|
||||
/// <summary>
|
||||
/// rptr_versions control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Repeater rptr_versions;
|
||||
|
||||
/// <summary>
|
||||
/// pane_options control.
|
||||
/// </summary>
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="EditRelationType.aspx.cs" Inherits="umbraco.cms.presentation.developer.RelationTypes.EditRelationType" MasterPageFile="/umbraco/masterpages/umbracoPage.Master" %>
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="EditRelationType.aspx.cs" Inherits="umbraco.cms.presentation.developer.RelationTypes.EditRelationType" MasterPageFile="../../masterpages/umbracoPage.Master" %>
|
||||
<%@ Register TagPrefix="umb" Namespace="umbraco.uicontrols" Assembly="controls" %>
|
||||
|
||||
<asp:Content ID="headContent" ContentPlaceHolderID="head" runat="server">
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="NewRelationType.aspx.cs" Inherits="umbraco.cms.presentation.developer.RelationTypes.NewRelationType" MasterPageFile="/umbraco/masterpages/umbracoPage.Master"%>
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="NewRelationType.aspx.cs" Inherits="umbraco.cms.presentation.developer.RelationTypes.NewRelationType" MasterPageFile="../../masterpages/umbracoPage.Master"%>
|
||||
<%@ Register TagPrefix="umb" Namespace="umbraco.uicontrols" Assembly="controls" %>
|
||||
|
||||
|
||||
|
||||
@@ -1,91 +0,0 @@
|
||||
<%@ Page Language="c#" CodeBehind="moveOrCopy.aspx.cs" MasterPageFile="../masterpages/umbracoDialog.Master" AutoEventWireup="True" Inherits="umbraco.dialogs.moveOrCopy" %>
|
||||
<%@ Register TagPrefix="umb" Namespace="ClientDependency.Core.Controls" Assembly="ClientDependency.Core" %>
|
||||
<%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %>
|
||||
<%@ Register Src="../controls/Tree/TreeControl.ascx" TagName="TreeControl" TagPrefix="umbraco" %>
|
||||
|
||||
<asp:Content ContentPlaceHolderID="head" runat="server">
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
function dialogHandler(id) {
|
||||
document.getElementById("copyTo").value = id;
|
||||
document.getElementById("<%= ok.ClientID %>").disabled = false;
|
||||
|
||||
// Get node name by xmlrequest
|
||||
if (id > 0)
|
||||
umbraco.presentation.webservices.CMSNode.GetNodeName('<%=umbraco.BasePages.BasePage.umbracoUserContextID%>', id, updateName);
|
||||
else{
|
||||
//document.getElementById("pageNameContent").innerHTML = "'<strong><%=umbraco.ui.Text(umbraco.helper.Request("app"))%></strong>' <%= umbraco.ui.Text("moveOrCopy","nodeSelected") %>";
|
||||
|
||||
jQuery("#pageNameContent").html("<strong><%=umbraco.ui.Text(umbraco.helper.Request("app"))%></strong> <%= umbraco.ui.Text("moveOrCopy","nodeSelected") %>");
|
||||
jQuery("#pageNameHolder").attr("class","success");
|
||||
}
|
||||
}
|
||||
|
||||
var actionIsValid = true;
|
||||
|
||||
function updateName(result) {
|
||||
if(actionIsValid)
|
||||
{
|
||||
jQuery("#pageNameContent").html("'<strong>" + result + "</strong>' <%= umbraco.ui.Text("moveOrCopy","nodeSelected") %>");
|
||||
jQuery("#pageNameHolder").attr("class","success");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function notValid()
|
||||
{
|
||||
jQuery("#pageNameHolder").attr("class", "error");
|
||||
jQuery("#pageNameContent").html("<%= umbraco.ui.Text("moveOrCopy","notValid") %>");
|
||||
actionIsValid = false;
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<style type="text/css">
|
||||
.propertyItemheader
|
||||
{
|
||||
width: 180px !important;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ContentPlaceHolderID="body" runat="server">
|
||||
<umb:JsInclude ID="JsInclude1" runat="server" FilePath="js/umbracoCheckKeys.js" PathNameAlias="UmbracoRoot"/>
|
||||
|
||||
<input type="hidden" id="copyTo" name="copyTo" />
|
||||
<cc1:Feedback ID="feedback" runat="server" />
|
||||
<cc1:Pane ID="pane_form" runat="server" Visible="false">
|
||||
<cc1:PropertyPanel runat="server" Style="overflow: auto; height: 220px;position: relative;">
|
||||
<umbraco:TreeControl runat="server" ID="JTree" App='<%#umbraco.helper.Request("app") %>'
|
||||
IsDialog="true" DialogMode="id" ShowContextMenu="false" FunctionToCall="dialogHandler"
|
||||
Height="200"></umbraco:TreeControl>
|
||||
</cc1:PropertyPanel>
|
||||
<cc1:PropertyPanel runat="server" ID="pp_relate" Text="relateToOriginal">
|
||||
<asp:CheckBox runat="server" ID="RelateDocuments" Checked="false" />
|
||||
</cc1:PropertyPanel>
|
||||
</cc1:Pane>
|
||||
<asp:PlaceHolder ID="pane_form_notice" runat="server" Visible="false">
|
||||
<div class="notice" id="pageNameHolder" style="margin-top: 10px;">
|
||||
<p id="pageNameContent">
|
||||
<%= umbraco.ui.Text("moveOrCopy","noNodeSelected") %></p>
|
||||
</div>
|
||||
</asp:PlaceHolder>
|
||||
<cc1:Pane ID="pane_settings" runat="server" Visible="false">
|
||||
<cc1:PropertyPanel ID="PropertyPanel1" runat="server" Text="Master Document Type">
|
||||
<asp:ListBox ID="masterType" runat="server" CssClass="bigInput" Rows="1" SelectionMode="Single"></asp:ListBox>
|
||||
</cc1:PropertyPanel>
|
||||
<cc1:PropertyPanel runat="server" Text="Name">
|
||||
<asp:TextBox ID="rename" runat="server" Style="width: 350px;" CssClass="bigInput"></asp:TextBox><asp:RequiredFieldValidator ID="RequiredFieldValidator1" ErrorMessage="*" ControlToValidate="rename" runat="server">*</asp:RequiredFieldValidator>
|
||||
</cc1:PropertyPanel>
|
||||
</cc1:Pane>
|
||||
<asp:Panel ID="panel_buttons" runat="server">
|
||||
<p>
|
||||
<asp:Button ID="ok" runat="server" CssClass="guiInputButton" OnClick="HandleMoveOrCopy"></asp:Button>
|
||||
<em>
|
||||
<%=umbraco.ui.Text("general", "or", this.getUser())%></em> <a href="#" style="color: blue" onclick="UmbClientMgr.closeModalWindow()">
|
||||
<%=umbraco.ui.Text("general", "cancel", this.getUser())%></a>
|
||||
</p>
|
||||
</asp:Panel>
|
||||
</asp:Content>
|
||||
@@ -1,17 +1,19 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Xml;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Core.IO;
|
||||
using Umbraco.Core.Models;
|
||||
using umbraco.BasePages;
|
||||
using umbraco.cms.businesslogic.web;
|
||||
using umbraco.presentation;
|
||||
using umbraco.cms.businesslogic.media;
|
||||
using System.Linq;
|
||||
using umbraco.cms.businesslogic;
|
||||
using umbraco.cms.presentation.user;
|
||||
using umbraco.interfaces;
|
||||
using Umbraco.Web;
|
||||
|
||||
namespace umbraco.dialogs
|
||||
{
|
||||
@@ -22,13 +24,13 @@ namespace umbraco.dialogs
|
||||
{
|
||||
|
||||
protected override void OnInit(EventArgs e)
|
||||
{
|
||||
{
|
||||
CurrentApp = Request["app"];
|
||||
|
||||
base.OnInit(e);
|
||||
}
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
JTree.DataBind();
|
||||
|
||||
@@ -48,7 +50,7 @@ namespace umbraco.dialogs
|
||||
ok.Text = ui.Text("general", "ok", this.getUser());
|
||||
ok.Attributes.Add("style", "width: 60px");
|
||||
|
||||
var documentType = new DocumentType(int.Parse(helper.Request("id")));
|
||||
var documentType = new DocumentType(int.Parse(Request.GetItemAsString("id")));
|
||||
|
||||
//Load master types...
|
||||
masterType.Attributes.Add("style", "width: 350px;");
|
||||
@@ -72,81 +74,74 @@ namespace umbraco.dialogs
|
||||
pane_settings.Visible = false;
|
||||
|
||||
// Caption and properies on BUTTON
|
||||
ok.Text = ui.Text("general", "ok", this.getUser());
|
||||
ok.Text = ui.Text("general", "ok", getUser());
|
||||
ok.Attributes.Add("style", "width: 60px");
|
||||
ok.Attributes.Add("disabled", "true");
|
||||
|
||||
var cmsNode = new CMSNode(int.Parse(helper.Request("id")));
|
||||
IContentBase currContent;
|
||||
if (CurrentApp == "content")
|
||||
{
|
||||
currContent = Services.ContentService.GetById(Request.GetItemAs<int>("id"));
|
||||
}
|
||||
else
|
||||
{
|
||||
currContent = Services.MediaService.GetById(Request.GetItemAs<int>("id"));
|
||||
}
|
||||
|
||||
var validAction = true;
|
||||
if (CurrentApp == "content" && cmsNode.HasChildren)
|
||||
validAction = ValidAction(helper.Request("mode") == "cut" ? 'M' : 'O');
|
||||
|
||||
|
||||
if (helper.Request("mode") == "cut")
|
||||
if (CurrentApp == "content" && Umbraco.Core.Models.ContentExtensions.HasChildren(currContent, Services))
|
||||
{
|
||||
pane_form.Text = ui.Text("moveOrCopy", "moveTo", cmsNode.Text, base.getUser());
|
||||
validAction = ValidAction(currContent, Request.GetItemAsString("mode") == "cut" ? 'M' : 'O');
|
||||
}
|
||||
|
||||
if (Request.GetItemAsString("mode") == "cut")
|
||||
{
|
||||
pane_form.Text = ui.Text("moveOrCopy", "moveTo", currContent.Name, getUser());
|
||||
pp_relate.Visible = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
pane_form.Text = ui.Text("moveOrCopy", "copyTo", cmsNode.Text, base.getUser());
|
||||
pane_form.Text = ui.Text("moveOrCopy", "copyTo", currContent.Name, getUser());
|
||||
pp_relate.Visible = true;
|
||||
}
|
||||
|
||||
if (validAction == false)
|
||||
{
|
||||
ScriptManager.RegisterStartupScript(this, this.GetType(), "notvalid", "notValid();", true);
|
||||
ScriptManager.RegisterStartupScript(this, GetType(), "notvalid", "notValid();", true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private bool ValidAction(char actionLetter)
|
||||
private bool ValidAction(IContentBase cmsNode, char actionLetter)
|
||||
{
|
||||
var cmsNode = new CMSNode(int.Parse(helper.Request("id")));
|
||||
var currentAction = BusinessLogic.Actions.Action.GetPermissionAssignable().First(a => a.Letter == actionLetter);
|
||||
return CheckPermissions(cmsNode, currentAction);
|
||||
}
|
||||
|
||||
private bool CheckPermissions(CMSNode node, IAction currentAction)
|
||||
{
|
||||
private bool CheckPermissions(IContentBase node, IAction currentAction)
|
||||
{
|
||||
var currUserPermissions = new UserPermissions(CurrentUser);
|
||||
var lstCurrUserActions = currUserPermissions.GetExistingNodePermission(node.Id);
|
||||
|
||||
if (lstCurrUserActions.Contains(currentAction) == false)
|
||||
return false;
|
||||
|
||||
if (node.HasChildren)
|
||||
|
||||
if (Umbraco.Core.Models.ContentExtensions.HasChildren(node, Services))
|
||||
{
|
||||
foreach (CMSNode child in node.Children)
|
||||
if (CheckPermissions(child, currentAction) == false)
|
||||
return false;
|
||||
return Umbraco.Core.Models.ContentExtensions.Children(node, Services)
|
||||
.All(child => CheckPermissions(child, currentAction));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
//PPH moving multiple nodes and publishing them aswell.
|
||||
private void handleChildNodes(cms.businesslogic.web.Document document)
|
||||
{
|
||||
//store children array here because iterating over an Array object is very inneficient.
|
||||
var children = document.Children;
|
||||
foreach (Document child in children.Where(child => child.Published))
|
||||
{
|
||||
child.Publish(new BusinessLogic.User(0));
|
||||
|
||||
//using library.publish to support load balancing.
|
||||
library.UpdateDocumentCache(child.Id);
|
||||
if (child.HasChildren)
|
||||
handleChildNodes(child);
|
||||
}
|
||||
}
|
||||
|
||||
//PPH Handle doctype copies..
|
||||
private void HandleDocumentTypeCopy()
|
||||
{
|
||||
var documentType = new DocumentType(int.Parse(helper.Request("id")));
|
||||
var documentType = new DocumentType(int.Parse(Request.GetItemAsString("id")));
|
||||
|
||||
//Documentype exists.. create new doc type...
|
||||
var alias = rename.Text;
|
||||
@@ -200,53 +195,66 @@ namespace umbraco.dialogs
|
||||
public void HandleMoveOrCopy(object sender, EventArgs e)
|
||||
{
|
||||
if (CurrentApp == "settings")
|
||||
HandleDocumentTypeCopy();
|
||||
else
|
||||
HandleDocumentTypeCopy();
|
||||
else
|
||||
HandleDocumentMoveOrCopy();
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnPreRender(EventArgs e)
|
||||
{
|
||||
base.OnPreRender(e);
|
||||
ScriptManager.GetCurrent(Page).Services.Add(new ServiceReference("../webservices/cmsnode.asmx"));
|
||||
ScriptManager.GetCurrent(Page).Services.Add(new ServiceReference("../webservices/legacyAjaxCalls.asmx"));
|
||||
}
|
||||
base.OnPreRender(e);
|
||||
ScriptManager.GetCurrent(Page).Services.Add(new ServiceReference("../webservices/cmsnode.asmx"));
|
||||
ScriptManager.GetCurrent(Page).Services.Add(new ServiceReference("../webservices/legacyAjaxCalls.asmx"));
|
||||
}
|
||||
|
||||
private void HandleDocumentMoveOrCopy()
|
||||
{
|
||||
if (helper.Request("copyTo") != "" && helper.Request("id") != "")
|
||||
if (Request.GetItemAsString("copyTo") != "" && Request.GetItemAsString("id") != "")
|
||||
{
|
||||
// Check if the current node is allowed at new position
|
||||
var nodeAllowed = false;
|
||||
|
||||
var currentNode = new cms.businesslogic.Content(int.Parse(helper.Request("id")));
|
||||
|
||||
var newNode = new cms.businesslogic.Content(int.Parse(helper.Request("copyTo")));
|
||||
IContentBase currContent;
|
||||
IContentBase parentContent;
|
||||
IContentTypeBase parentContentType;
|
||||
if (CurrentApp == "content")
|
||||
{
|
||||
currContent = Services.ContentService.GetById(Request.GetItemAs<int>("id"));
|
||||
parentContent = Services.ContentService.GetById(Request.GetItemAs<int>("copyTo"));
|
||||
parentContentType = Services.ContentTypeService.GetContentType(parentContent.ContentTypeId);
|
||||
}
|
||||
else
|
||||
{
|
||||
currContent = Services.MediaService.GetById(Request.GetItemAs<int>("id"));
|
||||
parentContent = Services.MediaService.GetById(Request.GetItemAs<int>("copyTo"));
|
||||
parentContentType = Services.ContentTypeService.GetMediaType(parentContent.ContentTypeId);
|
||||
}
|
||||
|
||||
// Check on contenttypes
|
||||
if (int.Parse(helper.Request("copyTo")) == -1)
|
||||
if (Request.GetItemAs<int>("copyTo") == -1)
|
||||
{
|
||||
nodeAllowed = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (newNode.ContentType.AllowedChildContentTypeIDs.Where(c => c == currentNode.ContentType.Id).Any())
|
||||
var allowedChildContentTypeIds = parentContentType.AllowedContentTypes.Select(x => x.Id).ToArray();
|
||||
if (allowedChildContentTypeIds.Any(x => x.Value == currContent.ContentTypeId))
|
||||
{
|
||||
nodeAllowed = true;
|
||||
}
|
||||
|
||||
if (nodeAllowed == false)
|
||||
{
|
||||
feedback.Text = ui.Text("moveOrCopy", "notAllowedByContentType", base.getUser());
|
||||
feedback.Text = ui.Text("moveOrCopy", "notAllowedByContentType", getUser());
|
||||
feedback.type = uicontrols.Feedback.feedbacktype.error;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Check on paths
|
||||
if ((string.Format(",{0},", newNode.Path)).IndexOf(string.Format(",{0},", currentNode.Id)) > -1)
|
||||
if ((string.Format(",{0},", parentContent.Path)).IndexOf(string.Format(",{0},", currContent.Id)) > -1)
|
||||
{
|
||||
nodeAllowed = false;
|
||||
feedback.Text = ui.Text("moveOrCopy", "notAllowedByPath", base.getUser());
|
||||
feedback.Text = ui.Text("moveOrCopy", "notAllowedByPath", getUser());
|
||||
feedback.type = uicontrols.Feedback.feedbacktype.error;
|
||||
}
|
||||
}
|
||||
@@ -258,46 +266,171 @@ namespace umbraco.dialogs
|
||||
pane_form_notice.Visible = false;
|
||||
panel_buttons.Visible = false;
|
||||
|
||||
var newNodeCaption = newNode.Id == -1 ? ui.Text(CurrentApp) : newNode.Text;
|
||||
var newNodeCaption = Request.GetItemAs<int>("copyTo") == -1
|
||||
? ui.Text(CurrentApp)
|
||||
: parentContent.Name;
|
||||
|
||||
string[] nodes = { currentNode.Text, newNodeCaption };
|
||||
string[] nodes = { currContent.Name, newNodeCaption };
|
||||
|
||||
if (Request["mode"] == "cut")
|
||||
{
|
||||
if (CurrentApp == "content")
|
||||
{
|
||||
//PPH changed this to document instead of cmsNode to handle republishing.
|
||||
var documentId = int.Parse(helper.Request("id"));
|
||||
var document = new Document(documentId);
|
||||
document.Move(int.Parse(helper.Request("copyTo")));
|
||||
library.RefreshContent();
|
||||
Services.ContentService.Move((IContent)currContent, Request.GetItemAs<int>("copyTo"), getUser().Id);
|
||||
}
|
||||
else
|
||||
{
|
||||
var media = new Media(int.Parse(UmbracoContext.Current.Request["id"]));
|
||||
media.Move(int.Parse(UmbracoContext.Current.Request["copyTo"]));
|
||||
media = new Media(int.Parse(UmbracoContext.Current.Request["id"]));
|
||||
media.XmlGenerate(new XmlDocument());
|
||||
library.ClearLibraryCacheForMedia(media.Id);
|
||||
Services.MediaService.Move((IMedia)currContent, Request.GetItemAs<int>("copyTo"), getUser().Id);
|
||||
library.ClearLibraryCacheForMedia(currContent.Id);
|
||||
}
|
||||
|
||||
feedback.Text = ui.Text("moveOrCopy", "moveDone", nodes, getUser()) + "</p><p><a href='#' onclick='" + ClientTools.Scripts.CloseModalWindow() + "'>" + ui.Text("closeThisWindow") + "</a>";
|
||||
feedback.type = uicontrols.Feedback.feedbacktype.success;
|
||||
|
||||
// refresh tree
|
||||
ClientTools.MoveNode(currentNode.Id.ToString(), newNode.Path);
|
||||
ClientTools.MoveNode(currContent.Id.ToString(), parentContent.Path);
|
||||
}
|
||||
else
|
||||
{
|
||||
var document = new Document(int.Parse(helper.Request("id")));
|
||||
document.Copy(int.Parse(helper.Request("copyTo")), this.getUser(), RelateDocuments.Checked);
|
||||
feedback.Text = ui.Text("moveOrCopy", "copyDone", nodes, base.getUser()) + "</p><p><a href='#' onclick='" + ClientTools.Scripts.CloseModalWindow() + "'>" + ui.Text("closeThisWindow") + "</a>";
|
||||
//NOTE: We ONLY support Copy on content not media for some reason.
|
||||
|
||||
Services.ContentService.Copy((IContent)currContent, Request.GetItemAs<int>("copyTo"), RelateDocuments.Checked, getUser().Id);
|
||||
|
||||
feedback.Text = ui.Text("moveOrCopy", "copyDone", nodes, getUser()) + "</p><p><a href='#' onclick='" + ClientTools.Scripts.CloseModalWindow() + "'>" + ui.Text("closeThisWindow") + "</a>";
|
||||
feedback.type = uicontrols.Feedback.feedbacktype.success;
|
||||
ClientTools.CopyNode(currentNode.Id.ToString(), newNode.Path);
|
||||
|
||||
// refresh tree
|
||||
ClientTools.CopyNode(currContent.Id.ToString(), parentContent.Path);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// JsInclude1 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::ClientDependency.Core.Controls.JsInclude JsInclude1;
|
||||
|
||||
/// <summary>
|
||||
/// feedback control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::umbraco.uicontrols.Feedback feedback;
|
||||
|
||||
/// <summary>
|
||||
/// pane_form control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::umbraco.uicontrols.Pane pane_form;
|
||||
|
||||
/// <summary>
|
||||
/// JTree control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::umbraco.controls.Tree.TreeControl JTree;
|
||||
|
||||
/// <summary>
|
||||
/// pp_relate control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::umbraco.uicontrols.PropertyPanel pp_relate;
|
||||
|
||||
/// <summary>
|
||||
/// RelateDocuments control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.CheckBox RelateDocuments;
|
||||
|
||||
/// <summary>
|
||||
/// pane_form_notice control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.PlaceHolder pane_form_notice;
|
||||
|
||||
/// <summary>
|
||||
/// pane_settings control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::umbraco.uicontrols.Pane pane_settings;
|
||||
|
||||
/// <summary>
|
||||
/// PropertyPanel1 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::umbraco.uicontrols.PropertyPanel PropertyPanel1;
|
||||
|
||||
/// <summary>
|
||||
/// masterType control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.ListBox masterType;
|
||||
|
||||
/// <summary>
|
||||
/// rename control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox rename;
|
||||
|
||||
/// <summary>
|
||||
/// RequiredFieldValidator1 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator1;
|
||||
|
||||
/// <summary>
|
||||
/// panel_buttons control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Panel panel_buttons;
|
||||
|
||||
/// <summary>
|
||||
/// ok control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Button ok;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
-141
@@ -1,141 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace umbraco.dialogs {
|
||||
|
||||
|
||||
public partial class moveOrCopy {
|
||||
|
||||
/// <summary>
|
||||
/// JsInclude1 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::ClientDependency.Core.Controls.JsInclude JsInclude1;
|
||||
|
||||
/// <summary>
|
||||
/// feedback control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::umbraco.uicontrols.Feedback feedback;
|
||||
|
||||
/// <summary>
|
||||
/// pane_form control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::umbraco.uicontrols.Pane pane_form;
|
||||
|
||||
/// <summary>
|
||||
/// JTree control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::umbraco.controls.Tree.TreeControl JTree;
|
||||
|
||||
/// <summary>
|
||||
/// pp_relate control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::umbraco.uicontrols.PropertyPanel pp_relate;
|
||||
|
||||
/// <summary>
|
||||
/// RelateDocuments control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.CheckBox RelateDocuments;
|
||||
|
||||
/// <summary>
|
||||
/// pane_form_notice control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.PlaceHolder pane_form_notice;
|
||||
|
||||
/// <summary>
|
||||
/// pane_settings control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::umbraco.uicontrols.Pane pane_settings;
|
||||
|
||||
/// <summary>
|
||||
/// PropertyPanel1 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::umbraco.uicontrols.PropertyPanel PropertyPanel1;
|
||||
|
||||
/// <summary>
|
||||
/// masterType control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.ListBox masterType;
|
||||
|
||||
/// <summary>
|
||||
/// rename control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox rename;
|
||||
|
||||
/// <summary>
|
||||
/// RequiredFieldValidator1 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator1;
|
||||
|
||||
/// <summary>
|
||||
/// panel_buttons control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Panel panel_buttons;
|
||||
|
||||
/// <summary>
|
||||
/// ok control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Button ok;
|
||||
}
|
||||
}
|
||||
@@ -78,7 +78,7 @@ namespace umbraco.cms.presentation
|
||||
else
|
||||
{
|
||||
var children = contentService.GetChildren(parentId);
|
||||
foreach (var child in children.OrderBy(x => x.SortOrder))
|
||||
foreach (var child in children)
|
||||
_nodes.Add(CreateNode(child.Id, child.SortOrder, child.Name, child.CreateDate, icon));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@ namespace umbraco.cms.presentation.members
|
||||
|
||||
protected PlaceHolder MemberPasswordTxt = new PlaceHolder();
|
||||
protected TextBox MemberEmail = new TextBox();
|
||||
protected CustomValidator MemberEmailExistCheck = new CustomValidator();
|
||||
protected controls.DualSelectbox _memberGroups = new controls.DualSelectbox();
|
||||
|
||||
|
||||
@@ -65,8 +66,15 @@ namespace umbraco.cms.presentation.members
|
||||
MemberLoginNameVal.EnableClientScript = false;
|
||||
MemberLoginNameVal.Display = ValidatorDisplay.Dynamic;
|
||||
|
||||
MemberEmailExistCheck.ErrorMessage = ui.Text("errorHandling", "errorExistsWithoutTab", "E-mail", BasePages.UmbracoEnsuredPage.CurrentUser);
|
||||
MemberEmailExistCheck.EnableClientScript = false;
|
||||
MemberEmailExistCheck.ValidateEmptyText = false;
|
||||
MemberEmailExistCheck.ControlToValidate = MemberEmail.ID;
|
||||
MemberEmailExistCheck.ServerValidate += MemberEmailExistCheck_ServerValidate;
|
||||
|
||||
_contentControl.PropertiesPane.addProperty(ui.Text("login"), ph);
|
||||
_contentControl.PropertiesPane.addProperty(ui.Text("password"), MemberPasswordTxt);
|
||||
_contentControl.PropertiesPane.addProperty("", MemberEmailExistCheck);
|
||||
_contentControl.PropertiesPane.addProperty("Email", MemberEmail);
|
||||
}
|
||||
else
|
||||
@@ -132,6 +140,22 @@ namespace umbraco.cms.presentation.members
|
||||
|
||||
}
|
||||
|
||||
void MemberEmailExistCheck_ServerValidate(object source, ServerValidateEventArgs args)
|
||||
{
|
||||
var oldEmail = MemberEmail.Text.ToLower();
|
||||
var newEmail = _document.Email.ToLower();
|
||||
var requireUniqueEmail = Membership.Providers[Member.UmbracoMemberProviderName].RequiresUniqueEmail;
|
||||
var howManyMembersWithEmail = Member.GetMembersFromEmail(newEmail).Length;
|
||||
if (((oldEmail == newEmail && howManyMembersWithEmail > 1) ||
|
||||
(oldEmail != newEmail && howManyMembersWithEmail > 0))
|
||||
&& requireUniqueEmail)
|
||||
// If the value hasn't changed and there are more than 1 member with that email, then false
|
||||
// If the value has changed and there are any member with that new email, then false
|
||||
args.IsValid = false;
|
||||
else
|
||||
args.IsValid = true;
|
||||
}
|
||||
|
||||
void MenuSaveClick(object sender, ImageClickEventArgs e)
|
||||
{
|
||||
|
||||
|
||||
@@ -1,25 +1,30 @@
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.HtmlControls;
|
||||
using Umbraco.Core.Media;
|
||||
using Umbraco.Web.Media;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.HtmlControls;
|
||||
using Umbraco.Core.Media;
|
||||
using Umbraco.Web.Media;
|
||||
|
||||
namespace umbraco.presentation.templateControls
|
||||
{
|
||||
public class Image : HtmlImage
|
||||
{
|
||||
public string NodeId { get; set; }
|
||||
public string Field { get; set; }
|
||||
public string Provider { get; set; }
|
||||
public string Parameters { get; set; }
|
||||
|
||||
protected override void Render(HtmlTextWriter writer)
|
||||
{
|
||||
int id;
|
||||
bool hasid = int.TryParse(NodeId, out id);
|
||||
int? nodeId = hasid ? id : (int?)null;
|
||||
|
||||
namespace umbraco.presentation.templateControls
|
||||
{
|
||||
public class Image : HtmlImage
|
||||
{
|
||||
public string NodeId { get; set; }
|
||||
public string Field { get; set; }
|
||||
public string Provider { get; set; }
|
||||
public string Parameters { get; set; }
|
||||
|
||||
protected override void Render(HtmlTextWriter writer)
|
||||
{
|
||||
int id;
|
||||
bool hasid = int.TryParse(NodeId, out id);
|
||||
int? nodeId = hasid ? id : (int?) null;
|
||||
|
||||
Src = ImageUrl.GetImageUrl(Src, Field, Provider, Parameters, nodeId);
|
||||
base.Render(writer);
|
||||
}
|
||||
}
|
||||
string url;
|
||||
bool imageFound = ImageUrl.TryGetImageUrl(Src, Field, Provider, Parameters, nodeId, out url);
|
||||
Src = url;
|
||||
if (imageFound)
|
||||
{
|
||||
base.Render(writer);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user