Compare commits

...

92 Commits

Author SHA1 Message Date
Sebastiaan Janssen e6337b8f14 Properly reference uGoLive MyGet package 2013-02-01 08:38:13 -01:00
Sebastiaan Janssen 2be785ace3 Merge 2013-02-01 08:16:18 -01:00
Sebastiaan Janssen 5e2d991fab Update uGoLive 2013-02-01 08:16:10 -01:00
Morten Christensen 536cb4caf1 Fixes U4-1571 2013-02-01 07:42:51 -01:00
Morten Christensen 27745ea141 Fixes U4-1483 2013-02-01 07:35:48 -01:00
Sebastiaan Janssen 5289c55740 Translation updates 2013-02-01 07:24:21 -01:00
Sebastiaan Janssen 791773fc8a Add some more translations 2013-02-01 07:23:33 -01:00
Shannon Deminick 1da27e6c2b Removes all upgrade script stuff since we've deployed the fix in a package. 2013-02-01 06:42:42 +06:00
Shannon Deminick a909b7904e Fixes uGoLive ascx 2013-02-01 05:29:54 +06:00
Shannon Deminick 1b1abce7da Merge 2013-01-31 04:48:29 +06:00
Shannon Deminick fbc10be381 Reverted logic of Document to be what it used to be... Published and HasPublishedVersion() are the same and will
return the same thing, though we've kept the lazy loading and optimizations.
2013-01-31 04:46:51 +06:00
Shannon Deminick 61f2647b62 missing file 2013-01-31 04:26:47 +06:00
Shannon Deminick a5bea7fc59 Added the ability to automate any c# scripts for an upgrade process. I realize this is superceded already in 6.0
but we need a way to do this in 4.x too especially for this release since we need to run a script to fix some db
issues. I've added a framework using an UpgradeScriptManager and another install step + unit tests for some of the
UpgradeScriptManager methods.
2013-01-31 04:26:37 +06:00
Sebastiaan Janssen b9be5c2561 Also implement optimization in fdfa687e6f41 to v4: no need to try and republish
the child pages if the page you are trying to publish was already published
2013-01-30 15:01:38 -01:00
Shannon Deminick 97556de447 Changed methods created yesterday to internal so we can port to 6+ nicely. 2013-01-30 18:58:42 +06:00
netaddicts d5bde0d8df Makes sure preview is not using cached versions of any macro 2013-01-24 11:00:15 -01:00
Sebastiaan Janssen cc5ca0b5fe Fixing U4-359 Previewing new nested pages doesn't work 2013-01-30 09:21:43 -01:00
Shannon Deminick 0cb9cc6840 just cleaned up some code formatting. 2013-01-30 07:59:15 +06:00
Shannon Deminick d38d7b1ff4 Updates all code calling UnPublishSingleNode & UpdateDocumentCache to pass in the already existing Document object if there is one
instead of the ID... this'll save a another ton of SQL calls.
2013-01-30 07:59:03 +06:00
Shannon Deminick 2d87f933d5 Updates Document's Published property to return true if the document is 100% published (viewable on the front-end)
Reverts Document's HasPublishedVersion() to return true if the document has any published version (may or may not be viewable on the front-end)
Updates the Document's new UpdatePublishedOnDescendants to set both the Published and PathPublished fields.
Reverts some stuff in the editContent to use HasPublishedContent() to set the _documentHasPublishedVersion field.
Reverts the BaseContentTree to use the Published property now that it returns the correct value.
Updates the editContent method to use the UpdateDocumentCache overload accepting an object so there's not another N+1 SQL call made.
2013-01-30 07:57:31 +06:00
Shannon Deminick a734a0cff7 Fixes unit tests for Umbraco_Route_User_Defined_Controller_Action 2013-01-30 05:37:32 +06:00
Shannon Deminick d0ace55d03 Fixes: #U4-1593 - Content tree doesn't check for correct publish state. 2013-01-30 05:04:31 +06:00
Shannon Deminick 3fda0308ac Fixes: #U4-1594 - SQL for SqlOptimizedSingle not correct for published state
Fixes: #U4-1596 - new GetPathPublishedDescendants method on Document for optimizations
Fixes: #U4-1595 - Obsoletes HasPublishedVersion() method and ensures lazy loading of Published property,
as well as ensuring that the backing property is set correctly on first load (optmization)
Fixes: #U4-1597 - PathPublished property should be set in an optimized way and/or lazy loaded if it cannot be
2013-01-30 04:56:28 +06:00
Shannon Deminick d796b2afc1 Fixes: #U4-1170 - template with hyphen or dash 2013-01-29 21:19:16 +06:00
Shannon Deminick f95cfc2ee0 Changes v4.x config transforms 2013-01-29 21:18:17 +06:00
Shannon Deminick c5d1439422 Fixes: #U4-1458 - due to a null check on PublishedContentRequest on UmbracoContext 2013-01-29 08:35:09 +06:00
Shannon Deminick 5e9f4559b6 Fixes: #U4-1536 2013-01-29 07:49:14 +06:00
Shannon Deminick 4bbb0441a6 Merge 2013-01-29 05:50:50 +06:00
Shannon Deminick 4cf1d7d9a4 Fixes: #U4-1577 - HasPublishedVersion checks for trashed 2013-01-29 05:48:18 +06:00
Shannon Deminick a6a3ddca75 Fixes: #U4-1580 - m_SQLOptimizedMany includes the 'trashed' flag which can be used by business logic. 2013-01-29 05:37:14 +06:00
Shannon Deminick 27cfa85d3a Fixes: #U4-1579 - moving a node doesn't update the descendants of that node's level or path. 2013-01-29 04:39:44 +06:00
Shannon Deminick a9e1e7b634 Updating: #U4-1491 - Updated HasPublishedVersion() to ensure it checks for 'newest' 2013-01-29 03:42:58 +06:00
leekelleher 9f5f920c81 MNTP: Corrected a typo in the example XPath (additional apostrophe) 2013-01-28 17:18:20 +00:00
Shannon Deminick f9a0d91299 Fixes: #U4-1527 - Creates a public property on UmbracoHelper to return the currently assigned IPublishedContent of the UmbracoHelper. 2013-01-25 06:04:10 +03:00
Shannon Deminick 82c2560822 Ensures all resolvers are sealed. Changes CacheRefreshersResolver, DataTypesResolver, MacroFieldEditorsResolver, PackageActionsResolver, ActionsResolver
to all be lazy resolvers as they are not needed instantly on app startup (not needed by the front-end) This will
make app startup a lot quicker. Fixes ActionsResolver to not use the PluginManager to resolve the types when it
is instantiating them since these are passed in the ctor. Updates all unit tests to use lazy delegate for these resolvers
and they are all passing.
2013-01-23 18:40:40 +03:00
Shannon Deminick f467b8cb6c Adds more functionality for LazyManyObjectsResolverBase - adding type list delegates for lazy resolution. 2013-01-23 17:39:07 +03:00
Shannon Deminick aea1a03453 Updates ManyObjectsResolverBase to properly check for resolution freezing and fixes a few issues found regarding
inheritance in complex situations like the new LazyManyObjectsResolverBase.
Creates the new LazyManyObjectsResolverBase to lazily resolve types in order to create them. This is for
work item : #U4-1522
Adds unit test to support.
2013-01-23 07:45:00 +03:00
Shannon Deminick 1568e5f19c updated comments. 2013-01-23 01:44:01 +03:00
Shannon Deminick 8dff47db78 Merge 2013-01-23 01:39:45 +03:00
Shannon Deminick 987e48733a Merge 2013-01-23 01:39:25 +03:00
pcw@pcw-PC.shout.local ac5142443a Fixed EncryptWithMachineKey to handle values longer than FormsAuthentication.Encrypt max length limit
http://issues.umbraco.org/issue/U4-1455
2013-01-15 20:40:28 +00:00
pcw@pcw-PC.shout.local 44360d83aa Fixed EncryptWithMachineKey to handle values longer than FormsAuthentication.Encrypt max length limit
http://issues.umbraco.org/issue/U4-1455
2013-01-15 20:20:05 +00:00
pcw@pcw-PC.shout.local 021cb817d4 Fixed EncryptWithMachineKey to handle values longer than FormsAuthentication.Encrypt max length limit
http://issues.umbraco.org/issue/U4-1455
2013-01-15 20:17:12 +00:00
pcw@pcw-PC.shout.local f4f91fba78 Fixed EncryptWithMachineKey to handle values longer than FormsAuthentication.Encrypt max length limit
http://issues.umbraco.org/issue/U4-1455
2013-01-15 20:09:29 +00:00
pcw@pcw-PC.shout.local dec5e8ad6c Fixed EncryptWithMachineKey to handle values longer than FormsAuthentication.Encrypt max length limit
http://issues.umbraco.org/issue/U4-1455
2013-01-15 20:07:07 +00:00
Sebastiaan Janssen a6b2196c10 Make sure the filename gets set correctly if we're building the release locally 2013-01-15 16:18:24 -01:00
NielsHartvig@UMBRACORATI.localdomain 4cff3a3c28 Fixed U4-1439 4.11.2 DataEditorSetting not working for UserControl wrapper. 2013-01-15 13:18:37 -01:00
Shannon Deminick 5458c9a310 Adds Encryption/Decryption string extension methods that work in medium trust, with unit tests. 2013-01-15 01:35:10 +03:00
Shannon Deminick 0045ec353f Apply patch for #U4-1156 - IFileSystem public changes. 2013-01-15 01:27:44 +03:00
Shannon Deminick 716d3e95f1 Imported patches from 6.0 for #U4-1453, #U4-1454 2013-01-15 00:58:11 +03:00
Shannon Deminick beeb28f390 Fixes #U4-1467 2013-01-15 00:23:40 +03:00
Sebastiaan Janssen 080e8816a5 Remove non-existing files from project.. 2013-01-14 17:01:32 -01:00
Sebastiaan Janssen f7eb323bd5 Updated razor templates 2013-01-14 14:04:33 -01:00
Sebastiaan Janssen 0f484fdf49 Improve build so that you can't forget to set the version number, the version in
GlobalSettings.cs will be updated with the version configured in build.bat
2013-01-14 10:55:59 -01:00
Sebastiaan Janssen d779422bf4 U4-1457 Missing File for "English (US)" Language Option 2013-01-14 09:08:23 -01:00
Stephan 11ea698969 U4-1017 - more explicit error message on internal cache errors 2013-01-12 10:40:42 -01:00
Shannon Deminick 0e0e6b5c41 Fixes: #U4-1451 2013-01-13 23:24:02 +03:00
Sebastiaan Janssen 4c218621c6 Fixes: #U4-1405 - Added DynamicXmlConverter's 2013-01-14 08:57:49 -01:00
Sebastiaan Janssen c150a91e50 Update uGoLive & Fixes U4-1447 uGolive result: Unable to find node
/configuration/system.web/compilation/@debug in config file web.config
2013-01-14 08:43:50 -01:00
Sebastiaan Janssen 7be9a0a987 Update version to 4.11.4 2013-01-14 08:42:54 -01:00
Sebastiaan Janssen 50589c0911 Removed tag Release-4.11.3.1 2013-01-12 17:30:08 -01:00
Sebastiaan Janssen e61ae618e8 Added tag Release-4.11.3.1 for changeset e4d0c7e74055 2013-01-12 17:30:05 -01:00
Sebastiaan Janssen 930e6a0989 Forgot some parenthesis .. 2013-01-12 17:29:48 -01:00
Sebastiaan Janssen 7c50b32684 Merge with 4.11.3 2013-01-12 17:06:10 -01:00
Sebastiaan Janssen 0f7daf7ebd Closing branch 4.11.3 2013-01-12 17:05:45 -01:00
Sebastiaan Janssen 12cbc2a9c5 Added tag Release-4.11.3 for changeset baa44b79cf90 2013-01-12 17:04:25 -01:00
Sebastiaan Janssen 959d263619 Update the build files to build more automatically (like v6) 2013-01-12 17:02:52 -01:00
Sebastiaan Janssen 6a1fb52b25 Fixes U4-1442 This must be a bug. 4.11.2.2 can't create Macro. 2013-01-12 14:41:21 -01:00
Sebastiaan Janssen 18cd043421 Open branch for 4.11.3 and updated version number 2013-01-12 14:24:27 -01:00
Sebastiaan Janssen ddb2f82aba Added tag Release-4.11.2.2 for changeset 54cde33b809d 2013-01-11 12:31:27 -01:00
Sebastiaan Janssen 6c99e7951f Forgot to update the version for 4.11.2.1 - oops.. Updating again! 2013-01-11 12:25:23 -01:00
Sebastiaan Janssen e44e745761 Merge with 4.11.2 2013-01-11 09:35:46 -01:00
Sebastiaan Janssen 30c11439e4 Re-closing branch 4.11.2 2013-01-11 09:34:55 -01:00
Sebastiaan Janssen 0883f621f6 Update NuGet and making automation better for the dummy files 2013-01-11 09:24:47 -01:00
Sebastiaan Janssen 2d0784d1e5 Added tag Release-4.11.2.1 for changeset 77db220b89e1 2013-01-11 08:31:58 -01:00
Stephan 6cb3fcf9ad U4-1411 - fix post-4.9 regression in NotFoundHandler url 2013-01-08 16:41:31 -01:00
Sebastiaan Janssen e5878554bd Fixes U4-1482 Regression - RTE unable to edit hyperlink on image 2013-01-21 14:21:29 -01:00
Sebastiaan Janssen 44c8c4b5b8 Revert 024896ba7bcf as it's a breaking change 2013-01-18 08:47:38 -01:00
Shannon Deminick c0b5525dd7 Removed 'Boot' method from WebBootManager as it was never supposed to be there in the first place.
Removed test code from 'SurfaceController'.
Added comments to IApplicationEventHandler.
2013-01-18 02:31:51 +03:00
Sebastiaan Janssen 36f8a8e1dd Fixed U4-1492 Insert image in RTE gives null reference error 2013-01-17 14:17:04 -01:00
Sebastiaan Janssen 16f73b56ab Weird failing test for getting the date of a file, works only 10% of the time.. 2013-01-17 09:53:47 -01:00
Sebastiaan Janssen 47dc2e6214 Merge 2013-01-17 09:18:12 -01:00
Sebastiaan Janssen c6483f0380 Revert e4bb9041cf54 as it was a breaking change 2013-01-17 09:16:45 -01:00
NielsHartvig@UMBRACORATI.localdomain 168b38b2a3 Update to U4-1485 for 4.11.4 2013-01-17 08:47:42 -01:00
NielsHartvig@UMBRACORATI.localdomain 70ca4ac913 Fixes U4-1485 Booting.aspx has potential Open Redirect flaw 2013-01-17 08:38:09 -01:00
Sebastiaan Janssen 72099192b5 My bad, teamcity wasn't building the test project before running tests :) 2013-01-16 17:01:00 -01:00
Sebastiaan Janssen ea48128869 The nunit console runner is being such a tease, ignoring the [Ignore] attribute 2013-01-16 16:44:50 -01:00
Sebastiaan Janssen f0b22146c8 Ignore tests that have been failing for AGES 2013-01-16 16:31:15 -01:00
Sebastiaan Janssen fe0d94687a Use the original workaround for now 2013-01-16 16:25:54 -01:00
Sebastiaan Janssen 238c3d38e8 Un-ignore .exe files 2013-01-16 15:37:31 -01:00
Sebastiaan Janssen 6af4f1f2c6 Corrected the path for the tools folder 2013-01-16 15:21:43 -01:00
Sebastiaan Janssen e215fb056f Work around for TeamCity NUnit test runner see:
http://umbraco.com/follow-us/blog-archive/2013/1/16/make-teamcity-respect-failing-nunit-tests-and-stop-the-build.aspx
2013-01-16 15:19:45 -01:00
162 changed files with 13591 additions and 1841 deletions
+3 -2
View File
@@ -2,7 +2,6 @@
syntax: glob
*.obj
*.exe
*.pdb
*.user
*.aps
@@ -58,4 +57,6 @@ src/Umbraco.Tests/config/umbracoSettings.config
src/Umbraco.Web.UI/App_Plugins/*
src/Umbraco.Web.UI/Views/*
src\Umbraco.Web.UI\[W]eb.config
src\Umbraco.Web.UI\[W]eb.config
src/packages/
build/*.zip
+6
View File
@@ -20,3 +20,9 @@ f6da531fbb4c251ff61d314e2a7effb13c71e74a Release-4.10.0
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
baa44b79cf90a60631e38e11f771c200b08a4583 Release-4.11.3
e4d0c7e740555d8707ba71f55a623a3f96da8e65 Release-4.11.3.1
e4d0c7e740555d8707ba71f55a623a3f96da8e65 Release-4.11.3.1
0000000000000000000000000000000000000000 Release-4.11.3.1
-3
View File
@@ -1,3 +0,0 @@
NuGet.exe pack NuSpecs\UmbracoCms.Core.nuspec
NuGet.exe pack NuSpecs\UmbracoCms.nuspec
REM pause
+17 -1
View File
@@ -1,5 +1,21 @@
@ECHO OFF
%windir%\Microsoft.NET\Framework\v4.0.30319\msbuild.exe "Build.proj"
set version=4.11.4
%windir%\Microsoft.NET\Framework\v4.0.30319\msbuild.exe "Build.proj" /p:BUILD_RELEASE=%version%
echo This file is only here so that the containing folder will be included in the NuGet package, it is safe to delete. > .\_BuildOutput\WebApp\App_Code\dummy.txt
echo This file is only here so that the containing folder will be included in the NuGet package, it is safe to delete. > .\_BuildOutput\WebApp\App_Data\dummy.txt
echo This file is only here so that the containing folder will be included in the NuGet package, it is safe to delete. > .\_BuildOutput\WebApp\App_Plugins\dummy.txt
echo This file is only here so that the containing folder will be included in the NuGet package, it is safe to delete. > .\_BuildOutput\WebApp\css\dummy.txt
echo This file is only here so that the containing folder will be included in the NuGet package, it is safe to delete. > .\_BuildOutput\WebApp\macroScripts\dummy.txt
echo This file is only here so that the containing folder will be included in the NuGet package, it is safe to delete. > .\_BuildOutput\WebApp\masterpages\dummy.txt
echo This file is only here so that the containing folder will be included in the NuGet package, it is safe to delete. > .\_BuildOutput\WebApp\media\dummy.txt
echo This file is only here so that the containing folder will be included in the NuGet package, it is safe to delete. > .\_BuildOutput\WebApp\scripts\dummy.txt
echo This file is only here so that the containing folder will be included in the NuGet package, it is safe to delete. > .\_BuildOutput\WebApp\usercontrols\dummy.txt
echo This file is only here so that the containing folder will be included in the NuGet package, it is safe to delete. > .\_BuildOutput\WebApp\xslt\dummy.txt
NuGet.exe pack NuSpecs\UmbracoCms.Core.nuspec -Version %version%
NuGet.exe pack NuSpecs\UmbracoCms.nuspec -Version %version%
if ERRORLEVEL 1 goto :showerror
+11 -1
View File
@@ -24,6 +24,9 @@
<PropertyGroup Condition="'$(BUILD_NUMBER)'!=''">
<DECIMAL_BUILD_NUMBER>.$(BUILD_NUMBER)</DECIMAL_BUILD_NUMBER>
</PropertyGroup>
<PropertyGroup Condition="'$(BUILD_RELEASE)'!=''">
<DECIMAL_BUILD_NUMBER>.$(BUILD_RELEASE)</DECIMAL_BUILD_NUMBER>
</PropertyGroup>
<PropertyGroup>
<BuildConfiguration>Release</BuildConfiguration>
@@ -160,7 +163,7 @@
<Message Text="Finished offsetting timestamps" Importance="high" />
</Target>
<Target Name="CompileProjects">
<Target Name="CompileProjects" DependsOnTargets="SetVersionNumber">
<Message Text="Compiling web project to build\$(BuildFolder)" Importance="high" />
<!-- For UseWPP_CopyWebApplication=True see http://stackoverflow.com/questions/1983575/copywebapplication-with-web-config-transformations -->
@@ -232,6 +235,13 @@
<Message Text="Finished compiling projects" Importance="high" />
</Target>
<Target Name="SetVersionNumber" Condition="'$(BUILD_RELEASE)'!=''">
<!-- Match & replace 3 and 4 digit version numbers and -beta (if it's there) -->
<FileUpdate Files="..\src\Umbraco.Core\Configuration\GlobalSettings.cs"
Regex="(\d+)\.(\d+)\.(\d+)(.(\d+))?(-([a-zA-Z]+))?"
ReplacementText="$(BUILD_RELEASE)"/>
</Target>
<Target Name="AfterBuild">
<Message Text="Hi" />
</Target>
+2 -1
View File
@@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>UmbracoCms.Core</id>
<version>4.11.2</version>
<version>$version$</version>
<title>Umbraco Cms Core Binaries</title>
<authors>Morten Christensen</authors>
<owners>Umbraco HQ</owners>
@@ -26,6 +26,7 @@
<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\Lucene.Net.dll" target="lib\Lucene.Net.dll" />
<file src="..\_BuildOutput\WebApp\bin\log4net.dll" target="lib\log4net.dll" />
<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\Microsoft.Web.Infrastructure.dll" target="lib\Microsoft.Web.Infrastructure.dll" />
+5 -2
View File
@@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>UmbracoCms</id>
<version>4.11.2</version>
<version>$version$</version>
<title>Umbraco Cms</title>
<authors>Morten Christensen</authors>
<owners>Umbraco HQ</owners>
@@ -15,7 +15,7 @@
<language>en-US</language>
<tags>umbraco</tags>
<dependencies>
<dependency id="UmbracoCms.Core" version="4.11.2" />
<dependency id="UmbracoCms.Core" version="$version$" />
</dependencies>
</metadata>
<files>
@@ -27,16 +27,19 @@
<file src="..\_BuildOutput\WebApp\scripts\**" target="Content\scripts" />
<file src="..\_BuildOutput\WebApp\usercontrols\**" target="Content\usercontrols" />
<file src="..\_BuildOutput\WebApp\xslt\**" target="Content\xslt" />
<file src="..\_BuildOutput\WebApp\Views\**" target="Content\Views" />
<file src="..\_BuildOutput\WebApp\default.aspx" target="Content\default.aspx" />
<file src="..\_BuildOutput\WebApp\Web.config" target="Content\Web.config" />
<file src="..\_BuildOutput\WebApp\App_Browsers\**" target="UmbracoFiles\App_Browsers" />
<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\install\**" target="UmbracoFiles\install" />
<file src="..\_BuildOutput\WebApp\umbraco\**" target="UmbracoFiles\umbraco" />
<file src="..\_BuildOutput\WebApp\umbraco_client\**" target="UmbracoFiles\umbraco_client" />
<file src="..\_BuildOutput\WebApp\Web.config" target="UmbracoFiles\Web.config" />
<file src="..\_BuildOutput\WebApp\Global.asax" target="UmbracoFiles\Global.asax" />
<file src="tools\install.ps1" target="tools\install.ps1" />
<file src="tools\Readme.txt" target="tools\Readme.txt" />
</files>
Binary file not shown.
Binary file not shown.
Binary file not shown.
+4 -4
View File
@@ -9,14 +9,14 @@ namespace Umbraco.Core
/// <summary>
/// A resolver to return all IAction objects
/// </summary>
internal sealed class ActionsResolver : ManyObjectsResolverBase<ActionsResolver, IAction>
internal sealed class ActionsResolver : LazyManyObjectsResolverBase<ActionsResolver, IAction>
{
/// <summary>
/// Constructor
/// </summary>
/// <param name="packageActions"></param>
internal ActionsResolver(IEnumerable<Type> packageActions)
internal ActionsResolver(Func<IEnumerable<Type>> packageActions)
: base(packageActions)
{
@@ -34,9 +34,9 @@ namespace Umbraco.Core
}
protected override IEnumerable<IAction> CreateInstances()
{
{
var actions = new List<IAction>();
var foundIActions = PluginManager.Current.ResolveActions();
var foundIActions = InstanceTypes;
foreach (var type in foundIActions)
{
IAction typeInstance;
+1 -1
View File
@@ -17,7 +17,7 @@ namespace Umbraco.Core
/// Constructor
/// </summary>
/// <param name="refreshers"></param>
internal CacheRefreshersResolver(IEnumerable<Type> refreshers)
internal CacheRefreshersResolver(Func<IEnumerable<Type>> refreshers)
: base(refreshers)
{
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
@@ -28,7 +28,7 @@ namespace Umbraco.Core.Configuration
#region Private static fields
// CURRENT UMBRACO VERSION ID
private const string CurrentUmbracoVersion = "4.11.2";
private const string CurrentUmbracoVersion = "4.11.4";
private static string _reservedUrlsCache;
private static string _reservedPathsCache;
@@ -181,7 +181,7 @@ namespace Umbraco.Core.Configuration
SaveSetting("umbracoConfigurationStatus", value);
}
}
/// <summary>
/// Saves a setting into the configuration file.
/// </summary>
+5 -5
View File
@@ -94,19 +94,19 @@ namespace Umbraco.Core
protected virtual void InitializeResolvers()
{
CacheRefreshersResolver.Current = new CacheRefreshersResolver(
PluginManager.Current.ResolveCacheRefreshers());
() => PluginManager.Current.ResolveCacheRefreshers());
DataTypesResolver.Current = new DataTypesResolver(
PluginManager.Current.ResolveDataTypes());
() => PluginManager.Current.ResolveDataTypes());
MacroFieldEditorsResolver.Current = new MacroFieldEditorsResolver(
PluginManager.Current.ResolveMacroRenderings());
() => PluginManager.Current.ResolveMacroRenderings());
PackageActionsResolver.Current = new PackageActionsResolver(
PluginManager.Current.ResolvePackageActions());
() => PluginManager.Current.ResolvePackageActions());
ActionsResolver.Current = new ActionsResolver(
PluginManager.Current.ResolveActions());
() => PluginManager.Current.ResolveActions());
PropertyEditorValueConvertersResolver.Current = new PropertyEditorValueConvertersResolver(
PluginManager.Current.ResolvePropertyEditorValueConverters());
+1 -1
View File
@@ -16,7 +16,7 @@ namespace Umbraco.Core
/// Constructor
/// </summary>
/// <param name="dataTypes"></param>
internal DataTypesResolver(IEnumerable<Type> dataTypes)
internal DataTypesResolver(Func<IEnumerable<Type>> dataTypes)
: base(dataTypes)
{
@@ -5,7 +5,7 @@ namespace Umbraco.Core.Dictionary
/// <summary>
/// Resolves the current CultureDictionaryFactory
/// </summary>
internal class CultureDictionaryFactoryResolver : SingleObjectResolverBase<CultureDictionaryFactoryResolver, ICultureDictionaryFactory>
internal sealed class CultureDictionaryFactoryResolver : SingleObjectResolverBase<CultureDictionaryFactoryResolver, ICultureDictionaryFactory>
{
internal CultureDictionaryFactoryResolver(ICultureDictionaryFactory factory)
: base(factory)
+2 -1
View File
@@ -5,6 +5,7 @@ using System.Collections.Specialized;
using System.Linq;
using System.Text;
using System.Web.Mvc;
using System.Web;
namespace Umbraco.Core
{
@@ -158,7 +159,7 @@ namespace Umbraco.Core
var builder = new StringBuilder();
foreach (var i in d)
{
builder.Append(String.Format("{0}={1}&", i.Key, i.Value));
builder.Append(String.Format("{0}={1}&", HttpUtility.UrlEncode(i.Key), i.Value == null ? string.Empty : HttpUtility.UrlEncode(i.Value.ToString())));
}
return builder.ToString().TrimEnd('&');
}
+78 -78
View File
@@ -72,51 +72,51 @@ namespace Umbraco.Core.Dynamics
return true; //anyway
}
//ok, now lets try to match by member, property, extensino method
var attempt = DynamicInstanceHelper.TryInvokeMember(this, binder, args, new[]
//ok, now lets try to match by member, property, extensino method
var attempt = DynamicInstanceHelper.TryInvokeMember(this, binder, args, new[]
{
typeof (IEnumerable<DynamicXml>),
typeof (IEnumerable<XElement>),
typeof (DynamicXml)
});
if (attempt.Success)
{
result = attempt.Result.ObjectResult;
if (attempt.Success)
{
result = attempt.Result.ObjectResult;
//need to check the return type and possibly cast if result is from an extension method found
if (attempt.Result.Reason == DynamicInstanceHelper.TryInvokeMemberSuccessReason.FoundExtensionMethod)
{
//if the result is already a DynamicXml instance, then we do not need to cast
if (attempt.Result.ObjectResult != null && !(attempt.Result.ObjectResult is DynamicXml))
{
if (attempt.Result.ObjectResult is XElement)
{
result = new DynamicXml((XElement)attempt.Result.ObjectResult);
}
else if (attempt.Result.ObjectResult is IEnumerable<XElement>)
{
result = ((IEnumerable<XElement>)attempt.Result.ObjectResult).Select(x => new DynamicXml(x));
}
else if (attempt.Result.ObjectResult is IEnumerable<DynamicXml>)
{
result = ((IEnumerable<DynamicXml>)attempt.Result.ObjectResult).Select(x => new DynamicXml(x.BaseElement));
}
}
}
return true;
}
//need to check the return type and possibly cast if result is from an extension method found
if (attempt.Result.Reason == DynamicInstanceHelper.TryInvokeMemberSuccessReason.FoundExtensionMethod)
{
//if the result is already a DynamicXml instance, then we do not need to cast
if (attempt.Result.ObjectResult != null && !(attempt.Result.ObjectResult is DynamicXml))
{
if (attempt.Result.ObjectResult is XElement)
{
result = new DynamicXml((XElement)attempt.Result.ObjectResult);
}
else if (attempt.Result.ObjectResult is IEnumerable<XElement>)
{
result = ((IEnumerable<XElement>)attempt.Result.ObjectResult).Select(x => new DynamicXml(x));
}
else if (attempt.Result.ObjectResult is IEnumerable<DynamicXml>)
{
result = ((IEnumerable<DynamicXml>)attempt.Result.ObjectResult).Select(x => new DynamicXml(x.BaseElement));
}
}
}
return true;
}
//this is the result of an extension method execution gone wrong so we return dynamic null
if (attempt.Result.Reason == DynamicInstanceHelper.TryInvokeMemberSuccessReason.FoundExtensionMethod
&& attempt.Error != null && attempt.Error is TargetInvocationException)
{
result = new DynamicNull();
return true;
}
//this is the result of an extension method execution gone wrong so we return dynamic null
if (attempt.Result.Reason == DynamicInstanceHelper.TryInvokeMemberSuccessReason.FoundExtensionMethod
&& attempt.Error != null && attempt.Error is TargetInvocationException)
{
result = new DynamicNull();
return true;
}
result = null;
return false;
result = null;
return false;
}
public override bool TryGetMember(GetMemberBinder binder, out object result)
@@ -228,40 +228,40 @@ namespace Umbraco.Core.Dynamics
return new DynamicXml(this.BaseElement.XPathSelectElements(expression).FirstOrDefault());
}
IEnumerator<XElement> IEnumerable<XElement>.GetEnumerator()
{
return this.BaseElement.Elements().GetEnumerator();
}
IEnumerator<XElement> IEnumerable<XElement>.GetEnumerator()
{
return this.BaseElement.Elements().GetEnumerator();
}
public IEnumerator<DynamicXml> GetEnumerator()
{
return this.BaseElement.Elements().Select(e => new DynamicXml(e)).GetEnumerator();
}
public IEnumerator<DynamicXml> GetEnumerator()
{
return this.BaseElement.Elements().Select(e => new DynamicXml(e)).GetEnumerator();
}
IEnumerator IEnumerable.GetEnumerator()
{
return GetEnumerator();
}
IEnumerator IEnumerable.GetEnumerator()
{
return GetEnumerator();
}
public int Count()
{
return ((IEnumerable<XElement>)this).Count();
return ((IEnumerable<XElement>)this).Count();
}
public bool Any()
{
return ((IEnumerable<XElement>)this).Any();
return ((IEnumerable<XElement>)this).Any();
}
public IEnumerable<DynamicXml> Take(int count)
{
return ((IEnumerable<DynamicXml>)this).Take(count);
}
public IEnumerable<DynamicXml> Take(int count)
{
return ((IEnumerable<DynamicXml>)this).Take(count);
}
public IEnumerable<DynamicXml> Skip(int count)
{
return ((IEnumerable<DynamicXml>)this).Skip(count);
}
public IEnumerable<DynamicXml> Skip(int count)
{
return ((IEnumerable<DynamicXml>)this).Skip(count);
}
public bool IsNull()
{
@@ -503,72 +503,72 @@ namespace Umbraco.Core.Dynamics
public HtmlString IsDescendant(DynamicXml other, string valueIfTrue)
{
var ancestors = this.Ancestors();
return IsHelper(n => ancestors.FirstOrDefault(ancestor => ancestor.BaseElement == other.BaseElement) != null, valueIfTrue);
return IsHelper(n => ancestors.FirstOrDefault(ancestor => ancestor.BaseElement == other.BaseElement) != null, valueIfTrue);
}
public HtmlString IsDescendant(DynamicXml other, string valueIfTrue, string valueIfFalse)
{
var ancestors = this.Ancestors();
return IsHelper(n => ancestors.FirstOrDefault(ancestor => ancestor.BaseElement == other.BaseElement) != null, valueIfTrue, valueIfFalse);
return IsHelper(n => ancestors.FirstOrDefault(ancestor => ancestor.BaseElement == other.BaseElement) != null, valueIfTrue, valueIfFalse);
}
public bool IsDescendantOrSelf(DynamicXml other)
{
var ancestors = this.AncestorsOrSelf();
return IsHelper(n => ancestors.FirstOrDefault(ancestor => ancestor.BaseElement == other.BaseElement) != null);
return IsHelper(n => ancestors.FirstOrDefault(ancestor => ancestor.BaseElement == other.BaseElement) != null);
}
public HtmlString IsDescendantOrSelf(DynamicXml other, string valueIfTrue)
{
var ancestors = this.AncestorsOrSelf();
return IsHelper(n => ancestors.FirstOrDefault(ancestor => ancestor.BaseElement == other.BaseElement) != null, valueIfTrue);
return IsHelper(n => ancestors.FirstOrDefault(ancestor => ancestor.BaseElement == other.BaseElement) != null, valueIfTrue);
}
public HtmlString IsDescendantOrSelf(DynamicXml other, string valueIfTrue, string valueIfFalse)
{
var ancestors = this.AncestorsOrSelf();
return IsHelper(n => ancestors.FirstOrDefault(ancestor => ancestor.BaseElement == other.BaseElement) != null, valueIfTrue, valueIfFalse);
return IsHelper(n => ancestors.FirstOrDefault(ancestor => ancestor.BaseElement == other.BaseElement) != null, valueIfTrue, valueIfFalse);
}
public bool IsAncestor(DynamicXml other)
{
var descendants = this.Descendants();
return IsHelper(n => descendants.FirstOrDefault(descendant => descendant.BaseElement == other.BaseElement) != null);
return IsHelper(n => descendants.FirstOrDefault(descendant => descendant.BaseElement == other.BaseElement) != null);
}
public HtmlString IsAncestor(DynamicXml other, string valueIfTrue)
{
var descendants = this.Descendants();
return IsHelper(n => descendants.FirstOrDefault(descendant => descendant.BaseElement == other.BaseElement) != null, valueIfTrue);
return IsHelper(n => descendants.FirstOrDefault(descendant => descendant.BaseElement == other.BaseElement) != null, valueIfTrue);
}
public HtmlString IsAncestor(DynamicXml other, string valueIfTrue, string valueIfFalse)
{
var descendants = this.Descendants();
return IsHelper(n => descendants.FirstOrDefault(descendant => descendant.BaseElement == other.BaseElement) != null, valueIfTrue, valueIfFalse);
return IsHelper(n => descendants.FirstOrDefault(descendant => descendant.BaseElement == other.BaseElement) != null, valueIfTrue, valueIfFalse);
}
public bool IsAncestorOrSelf(DynamicXml other)
{
var descendants = this.DescendantsOrSelf();
return IsHelper(n => descendants.FirstOrDefault(descendant => descendant.BaseElement == other.BaseElement) != null);
return IsHelper(n => descendants.FirstOrDefault(descendant => descendant.BaseElement == other.BaseElement) != null);
}
public HtmlString IsAncestorOrSelf(DynamicXml other, string valueIfTrue)
{
var descendants = this.DescendantsOrSelf();
return IsHelper(n => descendants.FirstOrDefault(descendant => descendant.BaseElement == other.BaseElement) != null, valueIfTrue);
return IsHelper(n => descendants.FirstOrDefault(descendant => descendant.BaseElement == other.BaseElement) != null, valueIfTrue);
}
public HtmlString IsAncestorOrSelf(DynamicXml other, string valueIfTrue, string valueIfFalse)
{
var descendants = this.DescendantsOrSelf();
return IsHelper(n => descendants.FirstOrDefault(descendant => descendant.BaseElement == other.BaseElement) != null, valueIfTrue, valueIfFalse);
return IsHelper(n => descendants.FirstOrDefault(descendant => descendant.BaseElement == other.BaseElement) != null, valueIfTrue, valueIfFalse);
}
public IEnumerable<DynamicXml> Descendants()
{
return Descendants(n => true);
}
public IEnumerable<DynamicXml> Descendants(Func<XElement, bool> func)
public IEnumerable<DynamicXml> Descendants(Func<XElement, bool> func)
{
var flattenedNodes = this.BaseElement.Elements().Map(func, (XElement n) => { return n.Elements(); });
return flattenedNodes.ToList().ConvertAll(n => new DynamicXml(n));
}
public IEnumerable<DynamicXml> DescendantsOrSelf()
public IEnumerable<DynamicXml> DescendantsOrSelf()
{
return DescendantsOrSelf(n => true);
}
public IEnumerable<DynamicXml> DescendantsOrSelf(Func<XElement, bool> func)
public IEnumerable<DynamicXml> DescendantsOrSelf(Func<XElement, bool> func)
{
var flattenedNodes = this.BaseElement.Elements().Map(func, (XElement n) => { return n.Elements(); });
var list = new List<DynamicXml>();
@@ -576,11 +576,11 @@ namespace Umbraco.Core.Dynamics
list.AddRange(flattenedNodes.ToList().ConvertAll(n => new DynamicXml(n)));
return list;
}
public IEnumerable<DynamicXml> Ancestors()
public IEnumerable<DynamicXml> Ancestors()
{
return Ancestors(item => true);
}
public IEnumerable<DynamicXml> Ancestors(Func<XElement, bool> func)
public IEnumerable<DynamicXml> Ancestors(Func<XElement, bool> func)
{
var ancestorList = new List<XElement>();
var node = this.BaseElement;
@@ -611,11 +611,11 @@ namespace Umbraco.Core.Dynamics
ancestorList.Reverse();
return ancestorList.ConvertAll(item => new DynamicXml(item));
}
public IEnumerable<DynamicXml> AncestorsOrSelf()
public IEnumerable<DynamicXml> AncestorsOrSelf()
{
return AncestorsOrSelf(item => true);
}
public IEnumerable<DynamicXml> AncestorsOrSelf(Func<XElement, bool> func)
public IEnumerable<DynamicXml> AncestorsOrSelf(Func<XElement, bool> func)
{
List<XElement> ancestorList = new List<XElement>();
var node = this.BaseElement;
@@ -730,6 +730,6 @@ namespace Umbraco.Core.Dynamics
}
}
}
}
+1 -2
View File
@@ -15,8 +15,7 @@ namespace Umbraco.Core.IO
///
/// This abstract class just wraps the 'real' IFileSystem object passed in to its constructor.
/// </remarks>
[UmbracoExperimentalFeature("http://issues.umbraco.org/issue/U4-1156", "Will be declared public after 4.10")]
internal abstract class FileSystemWrapper : IFileSystem
public abstract class FileSystemWrapper : IFileSystem
{
private readonly IFileSystem _wrapped;
+2 -3
View File
@@ -4,9 +4,8 @@ using System.IO;
using Umbraco.Core.CodeAnnotations;
namespace Umbraco.Core.IO
{
[UmbracoExperimentalFeature("http://issues.umbraco.org/issue/U4-1156", "Will be declared public after 4.10")]
internal interface IFileSystem
{
public interface IFileSystem
{
IEnumerable<string> GetDirectories(string path);
+1 -2
View File
@@ -11,8 +11,7 @@ namespace Umbraco.Core.IO
/// A custom file system provider for media
/// </summary>
[FileSystemProvider("media")]
[UmbracoExperimentalFeature("http://issues.umbraco.org/issue/U4-1156", "Will be declared public after 4.10")]
internal class MediaFileSystem : FileSystemWrapper
public class MediaFileSystem : FileSystemWrapper
{
public MediaFileSystem(IFileSystem wrapped)
: base(wrapped)
+3 -4
View File
@@ -9,16 +9,15 @@ using Umbraco.Core.Logging;
namespace Umbraco.Core.IO
{
[UmbracoExperimentalFeature("http://issues.umbraco.org/issue/U4-1156", "Will be declared public after 4.10")]
internal class PhysicalFileSystem : IFileSystem
public class PhysicalFileSystem : IFileSystem
{
private readonly string _rootPath;
private readonly string _rootUrl;
public PhysicalFileSystem(string virtualRoot)
{
_rootPath = System.Web.Hosting.HostingEnvironment.MapPath(virtualRoot);
_rootUrl = VirtualPathUtility.ToAbsolute(virtualRoot);
_rootPath = IOHelper.MapPath(virtualRoot);
_rootUrl = IOHelper.ResolveUrl(virtualRoot);
}
public PhysicalFileSystem(string rootPath, string rootUrl)
@@ -0,0 +1,235 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Web;
namespace Umbraco.Core.ObjectResolution
{
/// <summary>
/// A base class for lazily resolving types for a resolver
/// </summary>
/// <typeparam name="TResolver"></typeparam>
/// <typeparam name="TResolved"></typeparam>
/// <remarks>
/// This is a special case resolver for when types get lazily resolved in order to resolve the actual types. This is useful
/// for when there is some processing overhead (i.e. Type finding in assemblies) to return the Types used to instantiate the instances.
/// In some these cases we don't want to have to type find during application startup, only when we need to resolve the instances.
///
/// Important notes about this resolver: This does not support Insert or Remove and therefore does not support any ordering unless
/// the types are marked with the WeightedPluginAttribute.
/// </remarks>
internal abstract class LazyManyObjectsResolverBase<TResolver, TResolved> : ManyObjectsResolverBase<TResolver, TResolved>
where TResolved : class
where TResolver : class
{
#region Constructors
protected LazyManyObjectsResolverBase(ObjectLifetimeScope scope = ObjectLifetimeScope.Application)
: base(scope)
{
}
protected LazyManyObjectsResolverBase(HttpContextBase httpContext)
: base(httpContext)
{
}
/// <summary>
/// Constructor accepting a list of lazy types
/// </summary>
/// <param name="listOfLazyTypes"></param>
/// <param name="scope"></param>
protected LazyManyObjectsResolverBase(IEnumerable<Lazy<Type>> listOfLazyTypes, ObjectLifetimeScope scope = ObjectLifetimeScope.Application)
: this(scope)
{
AddTypes(listOfLazyTypes);
}
/// <summary>
/// Constructor accepting a delegate to return a list of types
/// </summary>
/// <param name="typeListDelegate"></param>
/// <param name="scope"></param>
protected LazyManyObjectsResolverBase(Func<IEnumerable<Type>> typeListDelegate, ObjectLifetimeScope scope = ObjectLifetimeScope.Application)
: this(scope)
{
_listOfTypeListDelegates.Add(typeListDelegate);
}
/// <summary>
/// Constructor accepting a list of lazy types
/// </summary>
/// <param name="httpContext"></param>
/// <param name="listOfLazyTypes"></param>
protected LazyManyObjectsResolverBase(HttpContextBase httpContext, IEnumerable<Lazy<Type>> listOfLazyTypes)
: this(httpContext)
{
AddTypes(listOfLazyTypes);
}
/// <summary>
/// Constructor accepting a delegate to return a list of types
/// </summary>
/// <param name="httpContext"></param>
/// <param name="typeListDelegate"></param>
protected LazyManyObjectsResolverBase(HttpContextBase httpContext, Func<IEnumerable<Type>> typeListDelegate)
: this(httpContext)
{
_listOfTypeListDelegates.Add(typeListDelegate);
}
#endregion
private readonly List<Lazy<Type>> _lazyTypeList = new List<Lazy<Type>>();
private readonly List<Func<IEnumerable<Type>>> _listOfTypeListDelegates = new List<Func<IEnumerable<Type>>>();
private List<Type> _resolvedTypes = null;
private readonly ReaderWriterLockSlim _typeResolutionLock = new ReaderWriterLockSlim();
/// <summary>
/// Used for unit tests
/// </summary>
internal bool HasResolvedTypes
{
get { return _resolvedTypes != null; }
}
/// <summary>
/// Once this is called this will resolve all types registered in the lazy list
/// </summary>
protected override IEnumerable<Type> InstanceTypes
{
get
{
using (var lck = new UpgradeableReadLock(_typeResolutionLock))
{
var lazyTypeList = _lazyTypeList.Select(x => x.Value).ToArray();
var listofTypeListDelegates = _listOfTypeListDelegates.SelectMany(x => x()).ToArray();
//we need to validate each resolved type now since we could not do it before when inserting the lazy delegates
if (!HasResolvedTypes)
{
lck.UpgradeToWriteLock();
_resolvedTypes = new List<Type>();
//first iterate the lazy type list
foreach (var l in lazyTypeList)
{
UpdateUniqueList(_resolvedTypes, l);
}
//next iterate the list of list type delegates
foreach (var l in listofTypeListDelegates)
{
UpdateUniqueList(_resolvedTypes, l);
}
}
return _resolvedTypes;
}
}
}
private void UpdateUniqueList(List<Type> uniqueList, Type toAdd)
{
EnsureCorrectType(toAdd);
if (uniqueList.Contains(toAdd))
{
throw new InvalidOperationException("The Type " + toAdd + " already exists in the collection");
}
uniqueList.Add(toAdd);
}
/// <summary>
/// Allows adding of multiple lazy types at once
/// </summary>
/// <param name="types"></param>
protected void AddTypes(IEnumerable<Lazy<Type>> types)
{
EnsureAddSupport();
EnsureResolutionNotFrozen();
using (GetWriteLock())
{
foreach (var t in types)
{
_lazyTypeList.Add(t);
}
}
}
/// <summary>
/// Adds a type list delegate to the collection
/// </summary>
/// <param name="typeListDelegate"></param>
public void AddTypeListDelegate(Func<IEnumerable<Type>> typeListDelegate)
{
EnsureAddSupport();
EnsureResolutionNotFrozen();
using (GetWriteLock())
{
_listOfTypeListDelegates.Add(typeListDelegate);
}
}
/// <summary>
/// Adds a lazy type to the list
/// </summary>
/// <param name="value"></param>
public void AddType(Lazy<Type> value)
{
EnsureAddSupport();
EnsureResolutionNotFrozen();
using (GetWriteLock())
{
_lazyTypeList.Add(value);
}
}
/// <summary>
/// Converts the static type added to a lazy type and adds it to the internal list
/// </summary>
/// <param name="value"></param>
public override void AddType(Type value)
{
AddType(new Lazy<Type>(() => value));
}
/// <summary>
/// Clears all lazy types
/// </summary>
public override void Clear()
{
EnsureClearSupport();
EnsureResolutionNotFrozen();
using (GetWriteLock())
{
_lazyTypeList.Clear();
}
}
/// <summary>
/// Does not support removal
/// </summary>
protected override bool SupportsRemove
{
get { return false; }
}
/// <summary>
/// Does not support insert
/// </summary>
protected override bool SupportsInsert
{
get { return false; }
}
}
}
@@ -17,7 +17,7 @@ namespace Umbraco.Core.ObjectResolution
/// these old classes don't contain metadata, the objects need to be instantiated first to get their metadata, we then store this
/// for use in the GetById method.
/// </remarks>
internal abstract class LegacyTransientObjectsResolver<TResolver, TResolved> : ManyObjectsResolverBase<TResolver, TResolved>
internal abstract class LegacyTransientObjectsResolver<TResolver, TResolved> : LazyManyObjectsResolverBase<TResolver, TResolved>
where TResolved : class
where TResolver : class
{
@@ -27,16 +27,15 @@ namespace Umbraco.Core.ObjectResolution
/// <summary>
/// Constructor
/// </summary>
/// <param name="refreshers"></param>
/// <param name="types"></param>
/// <remarks>
/// We are creating Transient instances (new instances each time) because this is how the legacy code worked and
/// I don't want to muck anything up by changing them to application based instances.
/// TODO: However, it would make much more sense to do this and would speed up the application plus this would make the GetById method much easier.
/// </remarks>
protected LegacyTransientObjectsResolver(IEnumerable<Type> refreshers)
: base(ObjectLifetimeScope.Transient) // new objects every time
{
AddTypes(refreshers);
protected LegacyTransientObjectsResolver(Func<IEnumerable<Type>> types)
: base(types, ObjectLifetimeScope.Transient) // new objects every time
{
}
#endregion
@@ -55,7 +54,7 @@ namespace Umbraco.Core.ObjectResolution
protected abstract Guid GetUniqueIdentifier(TResolved obj);
/// <summary>
/// Returns a new ICacheRefresher instance by id
/// Returns a new TResolved instance by id
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using Umbraco.Core.Macros;
@@ -14,14 +15,14 @@ namespace Umbraco.Core.ObjectResolution
/// Much of this classes methods are based on legacy code from umbraco.editorControls.macrocontainer.MacroControlFactory
/// this code should probably be reviewed and cleaned up if necessary.
/// </remarks>
internal sealed class MacroFieldEditorsResolver : ManyObjectsResolverBase<MacroFieldEditorsResolver, IMacroGuiRendering>
internal sealed class MacroFieldEditorsResolver : LazyManyObjectsResolverBase<MacroFieldEditorsResolver, IMacroGuiRendering>
{
/// <summary>
/// Constructor
/// </summary>
/// <param name="macroEditors"></param>
internal MacroFieldEditorsResolver(IEnumerable<Type> macroEditors)
internal MacroFieldEditorsResolver(Func<IEnumerable<Type>> macroEditors)
: base(macroEditors, ObjectLifetimeScope.Transient)
{
@@ -56,7 +57,7 @@ namespace Umbraco.Core.ObjectResolution
/// </remarks>
internal List<Type> MacroControlTypes
{
get { return InstanceTypes; }
get { return InstanceTypes.ToList(); }
}
/// <summary>
@@ -6,14 +6,14 @@ using System.Web;
namespace Umbraco.Core.ObjectResolution
{
internal abstract class ManyObjectsResolverBase<TResolver, TResolved> : ResolverBase<TResolver>
where TResolved : class
where TResolver : class
{
private List<TResolved> _applicationInstances = null;
private readonly ReaderWriterLockSlim _lock = new ReaderWriterLockSlim();
private readonly List<Type> _instanceTypes = new List<Type>();
#region Constructors
@@ -34,7 +34,7 @@ namespace Umbraco.Core.ObjectResolution
}
LifetimeScope = scope;
InstanceTypes = new List<Type>();
_instanceTypes = new List<Type>();
}
/// <summary>
@@ -48,7 +48,7 @@ namespace Umbraco.Core.ObjectResolution
if (httpContext == null) throw new ArgumentNullException("httpContext");
LifetimeScope = ObjectLifetimeScope.HttpRequest;
CurrentHttpContext = httpContext;
InstanceTypes = new List<Type>();
_instanceTypes = new List<Type>();
}
/// <summary>
@@ -58,8 +58,8 @@ namespace Umbraco.Core.ObjectResolution
/// <param name="scope">If set to true will resolve singleton objects which will be created once for the lifetime of the application</param>
protected ManyObjectsResolverBase(IEnumerable<Type> value, ObjectLifetimeScope scope = ObjectLifetimeScope.Application)
: this(scope)
{
InstanceTypes = new List<Type>(value);
{
_instanceTypes = new List<Type>(value);
}
/// <summary>
@@ -71,7 +71,7 @@ namespace Umbraco.Core.ObjectResolution
protected ManyObjectsResolverBase(HttpContextBase httpContext, IEnumerable<Type> value)
: this(httpContext)
{
InstanceTypes = new List<Type>(value);
_instanceTypes = new List<Type>(value);
}
#endregion
@@ -83,7 +83,10 @@ namespace Umbraco.Core.ObjectResolution
/// <summary>
/// Returns the list of Types registered that instances will be created from
/// </summary>
protected List<Type> InstanceTypes { get; private set; }
protected virtual IEnumerable<Type> InstanceTypes
{
get { return _instanceTypes; }
}
/// <summary>
/// Returns the Current HttpContextBase used to construct this object if one exists.
@@ -97,11 +100,7 @@ namespace Umbraco.Core.ObjectResolution
protected ObjectLifetimeScope LifetimeScope { get; private set; }
private int _defaultPluginWeight = 10;
private bool _supportsAdd = true;
private bool _supportsInsert = true;
private bool _supportsClear = true;
private bool _supportsRemove = true;
/// <summary>
/// Used in conjunction with GetSortedValues and WeightedPluginAttribute, if any of the objects
/// being resolved do not contain the WeightedPluginAttribute then this will be the default weight applied
@@ -189,15 +188,16 @@ namespace Umbraco.Core.ObjectResolution
/// Removes a type.
/// </summary>
/// <param name="value">The type to remove.</param>
public void RemoveType(Type value)
public virtual void RemoveType(Type value)
{
if (!SupportsRemove)
throw new InvalidOperationException("This resolver does not support Removing types");
EnsureRemoveSupport();
using (new WriteLock(_lock))
EnsureResolutionNotFrozen();
using (GetWriteLock())
{
EnsureCorrectType(value);
InstanceTypes.Remove(value);
_instanceTypes.Remove(value);
}
}
@@ -215,8 +215,12 @@ namespace Umbraco.Core.ObjectResolution
/// </summary>
/// <param name="types"></param>
protected void AddTypes(IEnumerable<Type> types)
{
using (var l = new WriteLock(_lock))
{
EnsureAddSupport();
EnsureResolutionNotFrozen();
using (GetWriteLock())
{
foreach(var t in types)
{
@@ -225,7 +229,7 @@ namespace Umbraco.Core.ObjectResolution
{
throw new InvalidOperationException("The Type " + t + " already exists in the collection");
};
InstanceTypes.Add(t);
_instanceTypes.Add(t);
}
}
}
@@ -234,19 +238,20 @@ namespace Umbraco.Core.ObjectResolution
/// Adds a Type to the end of the list.
/// </summary>
/// <param name="value">The object to be added.</param>
public void AddType(Type value)
public virtual void AddType(Type value)
{
if (!SupportsAdd)
throw new InvalidOperationException("This resolver does not support Adding new types");
EnsureAddSupport();
using (var l = new WriteLock(_lock))
EnsureResolutionNotFrozen();
using (GetWriteLock())
{
EnsureCorrectType(value);
if (InstanceTypes.Contains(value))
{
throw new InvalidOperationException("The Type " + value + " already exists in the collection");
};
InstanceTypes.Add(value);
_instanceTypes.Add(value);
}
}
@@ -262,14 +267,15 @@ namespace Umbraco.Core.ObjectResolution
/// <summary>
/// Clears the list.
/// </summary>
public void Clear()
public virtual void Clear()
{
if (!SupportsClear)
throw new InvalidOperationException("This resolver does not support Clearing types");
EnsureClearSupport();
using (new WriteLock(_lock))
EnsureResolutionNotFrozen();
using (GetWriteLock())
{
InstanceTypes.Clear();
_instanceTypes.Clear();
}
}
@@ -278,12 +284,13 @@ namespace Umbraco.Core.ObjectResolution
/// </summary>
/// <param name="index">The zero-based index at which the object should be inserted.</param>
/// <param name="value">The object to insert.</param>
public void InsertType(int index, Type value)
public virtual void InsertType(int index, Type value)
{
if (!SupportsInsert)
throw new InvalidOperationException("This resolver does not support Inserting new types");
EnsureInsertSupport();
using (var l = new UpgradeableReadLock(_lock))
EnsureResolutionNotFrozen();
using (var l = GetWriteLock())
{
EnsureCorrectType(value);
if (InstanceTypes.Contains(value))
@@ -291,8 +298,7 @@ namespace Umbraco.Core.ObjectResolution
throw new InvalidOperationException("The Type " + value + " already exists in the collection");
};
l.UpgradeToWriteLock();
InstanceTypes.Insert(index, value);
_instanceTypes.Insert(index, value);
}
}
@@ -306,7 +312,65 @@ namespace Umbraco.Core.ObjectResolution
InsertType(index, typeof (T));
}
private void EnsureCorrectType(Type t)
/// <summary>
/// Returns a WriteLock to use when modifying collections
/// </summary>
/// <returns></returns>
protected WriteLock GetWriteLock()
{
return new WriteLock(_lock);
}
/// <summary>
/// Throws an exception if resolution is frozen
/// </summary>
protected void EnsureResolutionNotFrozen()
{
if (Resolution.IsFrozen)
throw new InvalidOperationException("The type list cannot be modified after resolution has been frozen");
}
/// <summary>
/// Throws an exception if this does not support Remove
/// </summary>
protected void EnsureRemoveSupport()
{
if (!SupportsRemove)
throw new InvalidOperationException("This resolver does not support Removing types");
}
/// <summary>
/// Throws an exception if this does not support Clear
/// </summary>
protected void EnsureClearSupport()
{
if (!SupportsClear)
throw new InvalidOperationException("This resolver does not support Clearing types");
}
/// <summary>
/// Throws an exception if this does not support Add
/// </summary>
protected void EnsureAddSupport()
{
if (!SupportsAdd)
throw new InvalidOperationException("This resolver does not support Adding new types");
}
/// <summary>
/// Throws an exception if this does not support insert
/// </summary>
protected void EnsureInsertSupport()
{
if (!SupportsInsert)
throw new InvalidOperationException("This resolver does not support Inserting new types");
}
/// <summary>
/// Throws an exception if the type is not of the TResolved type
/// </summary>
/// <param name="t"></param>
protected void EnsureCorrectType(Type t)
{
if (!TypeHelper.IsTypeAssignableFrom<TResolved>(t))
throw new InvalidOperationException("The resolver " + this.GetType() + " can only accept types of " + typeof(TResolved) + ". The Type passed in to this method is " + t);
@@ -314,22 +378,22 @@ namespace Umbraco.Core.ObjectResolution
protected virtual bool SupportsAdd
{
get { return _supportsAdd; }
get { return true; }
}
protected virtual bool SupportsInsert
{
get { return _supportsInsert; }
get { return true; }
}
protected virtual bool SupportsClear
{
get { return _supportsClear; }
get { return true; }
}
protected virtual bool SupportsRemove
{
get { return _supportsRemove; }
get { return true; }
}
}
}
+2 -2
View File
@@ -8,14 +8,14 @@ namespace Umbraco.Core
/// <summary>
/// A resolver to return all IPackageAction objects
/// </summary>
internal sealed class PackageActionsResolver : ManyObjectsResolverBase<PackageActionsResolver, IPackageAction>
internal sealed class PackageActionsResolver : LazyManyObjectsResolverBase<PackageActionsResolver, IPackageAction>
{
/// <summary>
/// Constructor
/// </summary>
/// <param name="packageActions"></param>
internal PackageActionsResolver(IEnumerable<Type> packageActions)
internal PackageActionsResolver(Func<IEnumerable<Type>> packageActions)
: base(packageActions)
{
@@ -7,7 +7,7 @@ namespace Umbraco.Core.PropertyEditors
/// <summary>
/// Manages the list of IPropertyEditorValueConverter's
/// </summary>
internal class PropertyEditorValueConvertersResolver : ManyObjectsResolverBase<PropertyEditorValueConvertersResolver, IPropertyEditorValueConverter>
internal sealed class PropertyEditorValueConvertersResolver : ManyObjectsResolverBase<PropertyEditorValueConvertersResolver, IPropertyEditorValueConverter>
{
public PropertyEditorValueConvertersResolver(IEnumerable<Type> converters)
: base(converters)
+60
View File
@@ -9,6 +9,7 @@ using System.Security.Cryptography;
using System.Text;
using System.Text.RegularExpressions;
using System.Web;
using System.Web.Security;
namespace Umbraco.Core
{
@@ -18,6 +19,65 @@ namespace Umbraco.Core
///</summary>
public static class StringExtensions
{
/// <summary>
/// Encrypt the string using the MachineKey in medium trust
/// </summary>
/// <param name="value">The string value to be encrypted.</param>
/// <returns></returns>
public static string EncryptWithMachineKey(this string value)
{
if (value == null)
return null;
string valueToEncrypt = value;
List<string> parts = new List<string>();
const int EncrpytBlockSize = 500;
while (valueToEncrypt.Length > EncrpytBlockSize)
{
parts.Add(valueToEncrypt.Substring(0, EncrpytBlockSize));
valueToEncrypt = valueToEncrypt.Remove(0, EncrpytBlockSize);
}
if (valueToEncrypt.Length > 0)
{
parts.Add(valueToEncrypt);
}
StringBuilder encrpytedValue = new StringBuilder();
foreach (var part in parts)
{
var encrpytedBlock = FormsAuthentication.Encrypt(new FormsAuthenticationTicket(0, string.Empty, DateTime.Now, DateTime.MaxValue, false, part));
encrpytedValue.AppendLine(encrpytedBlock);
}
return encrpytedValue.ToString().TrimEnd();
}
/// <summary>
/// Decrypt the encrypted string using the Machine key in medium trust
/// </summary>
/// <param name="value">The string value to be decrypted</param>
/// <returns></returns>
public static string DecryptWithMachineKey(this string value)
{
if (value == null)
return null;
string[] parts = value.Split('\n');
StringBuilder decryptedValue = new StringBuilder();
foreach (var part in parts)
{
decryptedValue.Append(FormsAuthentication.Decrypt(part.TrimEnd()).UserData);
}
return decryptedValue.ToString();
}
//this is from SqlMetal and just makes it a bit of fun to allow pluralisation
public static string MakePluralName(this string name)
{
+1
View File
@@ -70,6 +70,7 @@
<Compile Include="HashCodeCombiner.cs" />
<Compile Include="IO\FileSystemWrapper.cs" />
<Compile Include="Media\IImageUrlProvider.cs" />
<Compile Include="ObjectResolution\LazyManyObjectsResolverbase.cs" />
<Compile Include="PublishedContentExtensions.cs" />
<Compile Include="Dictionary\ICultureDictionary.cs" />
<Compile Include="Dynamics\ClassFactory.cs" />
@@ -26,6 +26,7 @@ namespace Umbraco.Tests.BusinessLogic
CreateNew();
}
[Ignore]
[Test()]
public void Dictionary_Get_Top_Level_Items()
{
@@ -42,6 +43,7 @@ namespace Umbraco.Tests.BusinessLogic
/// Creates a new dictionary entry, adds values for all languages assigned, then deletes the
/// entry and ensure that all other data is gone too.
///</summary>
[Ignore]
[Test()]
public void Dictionary_Create_Add_Text_And_Delete()
{
@@ -64,6 +66,7 @@ namespace Umbraco.Tests.BusinessLogic
/// <summary>
///A test for IsTopMostItem
///</summary>
[Ignore]
[Test()]
public void Dictionary_IsTopMostItem()
{
@@ -85,6 +88,7 @@ namespace Umbraco.Tests.BusinessLogic
/// <summary>
/// Test the Parent and Children properties and ensures that the relationships work both ways
///</summary>
[Ignore]
[Test()]
public void Dictionary_Parent_Child_Relationship()
{
@@ -115,6 +119,7 @@ namespace Umbraco.Tests.BusinessLogic
/// <summary>
/// Deletes a parent with existing children and ensures they are all gone.
/// </summary>
[Ignore]
[Test()]
public void Dictionary_Delete_Parent_With_Children()
{
@@ -166,6 +171,7 @@ namespace Umbraco.Tests.BusinessLogic
/// <summary>
/// Guid constructor test
///</summary>
[Ignore]
[Test()]
public void Dictionary_Contructor_Guid()
{
@@ -183,6 +189,7 @@ namespace Umbraco.Tests.BusinessLogic
/// <summary>
/// key constructor test
/// </summary>
[Ignore]
[Test()]
public void Dictionary_Contructor_Key()
{
@@ -200,6 +207,7 @@ namespace Umbraco.Tests.BusinessLogic
/// <summary>
///A test for ToXml
///</summary>
[Ignore]
[Test()]
public void Dictionary_ToXml()
{
@@ -227,6 +235,7 @@ namespace Umbraco.Tests.BusinessLogic
/// <summary>
///A test to change the key of an element
///</summary>
[Ignore]
[Test()]
public void Dictionary_Change_Key()
{
@@ -26,7 +26,7 @@ namespace Umbraco.Tests
};
CacheRefreshersResolver.Current = new CacheRefreshersResolver(
PluginManager.Current.ResolveCacheRefreshers());
() => PluginManager.Current.ResolveCacheRefreshers());
Resolution.Freeze();
}
+1 -1
View File
@@ -28,7 +28,7 @@ namespace Umbraco.Tests
};
DataTypesResolver.Current = new DataTypesResolver(
PluginManager.Current.ResolveDataTypes());
() => PluginManager.Current.ResolveDataTypes());
Resolution.Freeze();
}
@@ -104,7 +104,8 @@ namespace Umbraco.Tests.IO
_fileSystem.DeleteDirectory("test", true);
}
[Ignore]
[Test]
public void Can_Get_File_Dates()
{
+7
View File
@@ -13,6 +13,13 @@ namespace Umbraco.Tests.IO
public class IOHelperTest
{
[Test]
public void IOHelper_ResolveUrl()
{
var result = IOHelper.ResolveUrl("~/Scripts");
Assert.AreEqual("/Scripts", result);
}
/// <summary>
///A test for MapPath verifying that HttpContext method (which includes vdirs) matches non-HttpContext method
///</summary>
@@ -199,6 +199,7 @@ namespace Umbraco.Tests.PublishedContent
Assert.AreEqual(4444, result.Id);
}
[Ignore]
[Test]
public void Complex_Linq()
{
@@ -228,6 +229,7 @@ namespace Umbraco.Tests.PublishedContent
Assert.AreEqual(3, doc.Index());
}
[Ignore]
[Test]
public void Is_First()
{
@@ -241,6 +243,7 @@ namespace Umbraco.Tests.PublishedContent
Assert.IsFalse(doc.IsFirst());
}
[Ignore]
[Test]
public void Is_Not_First()
{
@@ -254,6 +257,7 @@ namespace Umbraco.Tests.PublishedContent
Assert.IsTrue(doc.IsNotFirst());
}
[Ignore]
[Test]
public void Is_Position()
{
@@ -415,6 +419,7 @@ namespace Umbraco.Tests.PublishedContent
Assert.AreEqual("<div>This is some content</div>", asDynamic.Content.ToString());
}
[Ignore]
[Test]
public void Get_Children_With_Pluralized_Alias()
{
@@ -442,6 +447,7 @@ namespace Umbraco.Tests.PublishedContent
Assert.AreEqual("Custom data with same property name as the member name", asDynamic.GetPropertyValue("CreatorName"));
}
[Ignore]
[Test]
public void GetPropertyValue_Reflected()
{
@@ -462,6 +468,7 @@ namespace Umbraco.Tests.PublishedContent
Assert.AreEqual("admin", asDynamic.CreatorName);
}
[Ignore]
[Test]
public void Get_Member_Property()
{
@@ -7,139 +7,139 @@ using System.Linq;
namespace Umbraco.Tests.PublishedContent
{
[TestFixture]
public class DynamicXmlTests
{
[TestFixture]
public class DynamicXmlTests
{
[Test]
public void Custom_Extension_Method_Legacy()
{
var xml = "<DAMP fullMedia=\"\"><mediaItem><Image id=\"1057\" version=\"d58d5c16-153e-4896-892f-a722e45a69af\" parentID=\"-1\" level=\"1\" writerID=\"0\" nodeType=\"1032\" template=\"0\" sortOrder=\"1\" createDate=\"2012-11-05T16:55:29\" updateDate=\"2012-11-05T16:55:44\" nodeName=\"test12\" urlName=\"test12\" writerName=\"admin\" nodeTypeAlias=\"Image\" path=\"-1,1057\"><umbracoFile>/media/54/tulips.jpg</umbracoFile><umbracoWidth>1024</umbracoWidth><umbracoHeight>768</umbracoHeight><umbracoBytes>620888</umbracoBytes><umbracoExtension>jpg</umbracoExtension><newsCrops><crops date=\"2012-11-05T16:55:34\"><crop name=\"thumbCrop\" x=\"154\" y=\"1\" x2=\"922\" y2=\"768\" url=\"/media/54/tulips_thumbCrop.jpg\" /></crops></newsCrops></Image></mediaItem><mediaItem><Image id=\"1055\" version=\"4df1f08a-3552-45f2-b4bf-fa980c762f4a\" parentID=\"-1\" level=\"1\" writerID=\"0\" nodeType=\"1032\" template=\"0\" sortOrder=\"1\" createDate=\"2012-11-05T16:29:58\" updateDate=\"2012-11-05T16:30:27\" nodeName=\"Test\" urlName=\"test\" writerName=\"admin\" nodeTypeAlias=\"Image\" path=\"-1,1055\"><umbracoFile>/media/41/hydrangeas.jpg</umbracoFile><umbracoWidth>1024</umbracoWidth><umbracoHeight>768</umbracoHeight><umbracoBytes>595284</umbracoBytes><umbracoExtension>jpg</umbracoExtension><newsCrops><crops date=\"2012-11-05T16:30:18\"><crop name=\"thumbCrop\" x=\"133\" y=\"0\" x2=\"902\" y2=\"768\" url=\"/media/41/hydrangeas_thumbCrop.jpg\" /></crops></newsCrops></Image></mediaItem></DAMP>";
var typedXml = new global::umbraco.MacroEngines.DynamicXml(xml);
dynamic dynamicXml = typedXml;
[Test]
public void Custom_Extension_Method_Legacy()
{
var xml = "<DAMP fullMedia=\"\"><mediaItem><Image id=\"1057\" version=\"d58d5c16-153e-4896-892f-a722e45a69af\" parentID=\"-1\" level=\"1\" writerID=\"0\" nodeType=\"1032\" template=\"0\" sortOrder=\"1\" createDate=\"2012-11-05T16:55:29\" updateDate=\"2012-11-05T16:55:44\" nodeName=\"test12\" urlName=\"test12\" writerName=\"admin\" nodeTypeAlias=\"Image\" path=\"-1,1057\"><umbracoFile>/media/54/tulips.jpg</umbracoFile><umbracoWidth>1024</umbracoWidth><umbracoHeight>768</umbracoHeight><umbracoBytes>620888</umbracoBytes><umbracoExtension>jpg</umbracoExtension><newsCrops><crops date=\"2012-11-05T16:55:34\"><crop name=\"thumbCrop\" x=\"154\" y=\"1\" x2=\"922\" y2=\"768\" url=\"/media/54/tulips_thumbCrop.jpg\" /></crops></newsCrops></Image></mediaItem><mediaItem><Image id=\"1055\" version=\"4df1f08a-3552-45f2-b4bf-fa980c762f4a\" parentID=\"-1\" level=\"1\" writerID=\"0\" nodeType=\"1032\" template=\"0\" sortOrder=\"1\" createDate=\"2012-11-05T16:29:58\" updateDate=\"2012-11-05T16:30:27\" nodeName=\"Test\" urlName=\"test\" writerName=\"admin\" nodeTypeAlias=\"Image\" path=\"-1,1055\"><umbracoFile>/media/41/hydrangeas.jpg</umbracoFile><umbracoWidth>1024</umbracoWidth><umbracoHeight>768</umbracoHeight><umbracoBytes>595284</umbracoBytes><umbracoExtension>jpg</umbracoExtension><newsCrops><crops date=\"2012-11-05T16:30:18\"><crop name=\"thumbCrop\" x=\"133\" y=\"0\" x2=\"902\" y2=\"768\" url=\"/media/41/hydrangeas_thumbCrop.jpg\" /></crops></newsCrops></Image></mediaItem></DAMP>";
var typedXml = new global::umbraco.MacroEngines.DynamicXml(xml);
dynamic dynamicXml = typedXml;
//we haven't explicitly defined ElementAt so this will dynamically invoke this method
var element = dynamicXml.ElementAt(0);
//we haven't explicitly defined ElementAt so this will dynamically invoke this method
var element = dynamicXml.ElementAt(0);
Assert.AreEqual("1057", Enumerable.First(element.BaseElement.Elements()).Attribute("id").Value);
}
Assert.AreEqual("1057", Enumerable.First(element.BaseElement.Elements()).Attribute("id").Value);
}
[Test]
public void Custom_Extension_Method()
{
var xml = "<DAMP fullMedia=\"\"><mediaItem><Image id=\"1057\" version=\"d58d5c16-153e-4896-892f-a722e45a69af\" parentID=\"-1\" level=\"1\" writerID=\"0\" nodeType=\"1032\" template=\"0\" sortOrder=\"1\" createDate=\"2012-11-05T16:55:29\" updateDate=\"2012-11-05T16:55:44\" nodeName=\"test12\" urlName=\"test12\" writerName=\"admin\" nodeTypeAlias=\"Image\" path=\"-1,1057\"><umbracoFile>/media/54/tulips.jpg</umbracoFile><umbracoWidth>1024</umbracoWidth><umbracoHeight>768</umbracoHeight><umbracoBytes>620888</umbracoBytes><umbracoExtension>jpg</umbracoExtension><newsCrops><crops date=\"2012-11-05T16:55:34\"><crop name=\"thumbCrop\" x=\"154\" y=\"1\" x2=\"922\" y2=\"768\" url=\"/media/54/tulips_thumbCrop.jpg\" /></crops></newsCrops></Image></mediaItem><mediaItem><Image id=\"1055\" version=\"4df1f08a-3552-45f2-b4bf-fa980c762f4a\" parentID=\"-1\" level=\"1\" writerID=\"0\" nodeType=\"1032\" template=\"0\" sortOrder=\"1\" createDate=\"2012-11-05T16:29:58\" updateDate=\"2012-11-05T16:30:27\" nodeName=\"Test\" urlName=\"test\" writerName=\"admin\" nodeTypeAlias=\"Image\" path=\"-1,1055\"><umbracoFile>/media/41/hydrangeas.jpg</umbracoFile><umbracoWidth>1024</umbracoWidth><umbracoHeight>768</umbracoHeight><umbracoBytes>595284</umbracoBytes><umbracoExtension>jpg</umbracoExtension><newsCrops><crops date=\"2012-11-05T16:30:18\"><crop name=\"thumbCrop\" x=\"133\" y=\"0\" x2=\"902\" y2=\"768\" url=\"/media/41/hydrangeas_thumbCrop.jpg\" /></crops></newsCrops></Image></mediaItem></DAMP>";
var typedXml = new DynamicXml(xml);
dynamic dynamicXml = typedXml;
[Test]
public void Custom_Extension_Method()
{
var xml = "<DAMP fullMedia=\"\"><mediaItem><Image id=\"1057\" version=\"d58d5c16-153e-4896-892f-a722e45a69af\" parentID=\"-1\" level=\"1\" writerID=\"0\" nodeType=\"1032\" template=\"0\" sortOrder=\"1\" createDate=\"2012-11-05T16:55:29\" updateDate=\"2012-11-05T16:55:44\" nodeName=\"test12\" urlName=\"test12\" writerName=\"admin\" nodeTypeAlias=\"Image\" path=\"-1,1057\"><umbracoFile>/media/54/tulips.jpg</umbracoFile><umbracoWidth>1024</umbracoWidth><umbracoHeight>768</umbracoHeight><umbracoBytes>620888</umbracoBytes><umbracoExtension>jpg</umbracoExtension><newsCrops><crops date=\"2012-11-05T16:55:34\"><crop name=\"thumbCrop\" x=\"154\" y=\"1\" x2=\"922\" y2=\"768\" url=\"/media/54/tulips_thumbCrop.jpg\" /></crops></newsCrops></Image></mediaItem><mediaItem><Image id=\"1055\" version=\"4df1f08a-3552-45f2-b4bf-fa980c762f4a\" parentID=\"-1\" level=\"1\" writerID=\"0\" nodeType=\"1032\" template=\"0\" sortOrder=\"1\" createDate=\"2012-11-05T16:29:58\" updateDate=\"2012-11-05T16:30:27\" nodeName=\"Test\" urlName=\"test\" writerName=\"admin\" nodeTypeAlias=\"Image\" path=\"-1,1055\"><umbracoFile>/media/41/hydrangeas.jpg</umbracoFile><umbracoWidth>1024</umbracoWidth><umbracoHeight>768</umbracoHeight><umbracoBytes>595284</umbracoBytes><umbracoExtension>jpg</umbracoExtension><newsCrops><crops date=\"2012-11-05T16:30:18\"><crop name=\"thumbCrop\" x=\"133\" y=\"0\" x2=\"902\" y2=\"768\" url=\"/media/41/hydrangeas_thumbCrop.jpg\" /></crops></newsCrops></Image></mediaItem></DAMP>";
var typedXml = new DynamicXml(xml);
//we haven't explicitly defined ElementAt so this will dynamically invoke this method
var element = dynamicXml.ElementAt(0);
dynamic dynamicXml = typedXml;
Assert.AreEqual("1057", Enumerable.First(element.BaseElement.Elements()).Attribute("id").Value);
}
//we haven't explicitly defined ElementAt so this will dynamically invoke this method
var element = dynamicXml.ElementAt(0);
[Test]
public void Take_Legacy()
{
var xml = "<DAMP fullMedia=\"\"><mediaItem><Image id=\"1057\" version=\"d58d5c16-153e-4896-892f-a722e45a69af\" parentID=\"-1\" level=\"1\" writerID=\"0\" nodeType=\"1032\" template=\"0\" sortOrder=\"1\" createDate=\"2012-11-05T16:55:29\" updateDate=\"2012-11-05T16:55:44\" nodeName=\"test12\" urlName=\"test12\" writerName=\"admin\" nodeTypeAlias=\"Image\" path=\"-1,1057\"><umbracoFile>/media/54/tulips.jpg</umbracoFile><umbracoWidth>1024</umbracoWidth><umbracoHeight>768</umbracoHeight><umbracoBytes>620888</umbracoBytes><umbracoExtension>jpg</umbracoExtension><newsCrops><crops date=\"2012-11-05T16:55:34\"><crop name=\"thumbCrop\" x=\"154\" y=\"1\" x2=\"922\" y2=\"768\" url=\"/media/54/tulips_thumbCrop.jpg\" /></crops></newsCrops></Image></mediaItem><mediaItem><Image id=\"1055\" version=\"4df1f08a-3552-45f2-b4bf-fa980c762f4a\" parentID=\"-1\" level=\"1\" writerID=\"0\" nodeType=\"1032\" template=\"0\" sortOrder=\"1\" createDate=\"2012-11-05T16:29:58\" updateDate=\"2012-11-05T16:30:27\" nodeName=\"Test\" urlName=\"test\" writerName=\"admin\" nodeTypeAlias=\"Image\" path=\"-1,1055\"><umbracoFile>/media/41/hydrangeas.jpg</umbracoFile><umbracoWidth>1024</umbracoWidth><umbracoHeight>768</umbracoHeight><umbracoBytes>595284</umbracoBytes><umbracoExtension>jpg</umbracoExtension><newsCrops><crops date=\"2012-11-05T16:30:18\"><crop name=\"thumbCrop\" x=\"133\" y=\"0\" x2=\"902\" y2=\"768\" url=\"/media/41/hydrangeas_thumbCrop.jpg\" /></crops></newsCrops></Image></mediaItem></DAMP>";
var typedXml = new global::umbraco.MacroEngines.DynamicXml(xml);
dynamic dynamicXml = typedXml;
var typedTaken = typedXml.Take(1);
var dynamicTaken = dynamicXml.Take(1);
Assert.AreEqual("1057", Enumerable.First(element.BaseElement.Elements()).Attribute("id").Value);
}
Assert.AreEqual(1, typedTaken.Count());
Assert.AreEqual(1, Enumerable.Count(dynamicTaken));
[Test]
public void Take_Legacy()
{
var xml = "<DAMP fullMedia=\"\"><mediaItem><Image id=\"1057\" version=\"d58d5c16-153e-4896-892f-a722e45a69af\" parentID=\"-1\" level=\"1\" writerID=\"0\" nodeType=\"1032\" template=\"0\" sortOrder=\"1\" createDate=\"2012-11-05T16:55:29\" updateDate=\"2012-11-05T16:55:44\" nodeName=\"test12\" urlName=\"test12\" writerName=\"admin\" nodeTypeAlias=\"Image\" path=\"-1,1057\"><umbracoFile>/media/54/tulips.jpg</umbracoFile><umbracoWidth>1024</umbracoWidth><umbracoHeight>768</umbracoHeight><umbracoBytes>620888</umbracoBytes><umbracoExtension>jpg</umbracoExtension><newsCrops><crops date=\"2012-11-05T16:55:34\"><crop name=\"thumbCrop\" x=\"154\" y=\"1\" x2=\"922\" y2=\"768\" url=\"/media/54/tulips_thumbCrop.jpg\" /></crops></newsCrops></Image></mediaItem><mediaItem><Image id=\"1055\" version=\"4df1f08a-3552-45f2-b4bf-fa980c762f4a\" parentID=\"-1\" level=\"1\" writerID=\"0\" nodeType=\"1032\" template=\"0\" sortOrder=\"1\" createDate=\"2012-11-05T16:29:58\" updateDate=\"2012-11-05T16:30:27\" nodeName=\"Test\" urlName=\"test\" writerName=\"admin\" nodeTypeAlias=\"Image\" path=\"-1,1055\"><umbracoFile>/media/41/hydrangeas.jpg</umbracoFile><umbracoWidth>1024</umbracoWidth><umbracoHeight>768</umbracoHeight><umbracoBytes>595284</umbracoBytes><umbracoExtension>jpg</umbracoExtension><newsCrops><crops date=\"2012-11-05T16:30:18\"><crop name=\"thumbCrop\" x=\"133\" y=\"0\" x2=\"902\" y2=\"768\" url=\"/media/41/hydrangeas_thumbCrop.jpg\" /></crops></newsCrops></Image></mediaItem></DAMP>";
var typedXml = new global::umbraco.MacroEngines.DynamicXml(xml);
dynamic dynamicXml = typedXml;
var typedTaken = typedXml.Take(1);
var dynamicTaken = dynamicXml.Take(1);
Assert.AreEqual("1057", typedTaken.ElementAt(0).BaseElement.Elements().First().Attribute("id").Value);
Assert.AreEqual("1057", Enumerable.First(Enumerable.ElementAt(dynamicTaken, 0).BaseElement.Elements()).Attribute("id").Value);
}
Assert.AreEqual(1, typedTaken.Count());
Assert.AreEqual(1, Enumerable.Count(dynamicTaken));
[Test]
public void Take()
{
var xml = "<DAMP fullMedia=\"\"><mediaItem><Image id=\"1057\" version=\"d58d5c16-153e-4896-892f-a722e45a69af\" parentID=\"-1\" level=\"1\" writerID=\"0\" nodeType=\"1032\" template=\"0\" sortOrder=\"1\" createDate=\"2012-11-05T16:55:29\" updateDate=\"2012-11-05T16:55:44\" nodeName=\"test12\" urlName=\"test12\" writerName=\"admin\" nodeTypeAlias=\"Image\" path=\"-1,1057\"><umbracoFile>/media/54/tulips.jpg</umbracoFile><umbracoWidth>1024</umbracoWidth><umbracoHeight>768</umbracoHeight><umbracoBytes>620888</umbracoBytes><umbracoExtension>jpg</umbracoExtension><newsCrops><crops date=\"2012-11-05T16:55:34\"><crop name=\"thumbCrop\" x=\"154\" y=\"1\" x2=\"922\" y2=\"768\" url=\"/media/54/tulips_thumbCrop.jpg\" /></crops></newsCrops></Image></mediaItem><mediaItem><Image id=\"1055\" version=\"4df1f08a-3552-45f2-b4bf-fa980c762f4a\" parentID=\"-1\" level=\"1\" writerID=\"0\" nodeType=\"1032\" template=\"0\" sortOrder=\"1\" createDate=\"2012-11-05T16:29:58\" updateDate=\"2012-11-05T16:30:27\" nodeName=\"Test\" urlName=\"test\" writerName=\"admin\" nodeTypeAlias=\"Image\" path=\"-1,1055\"><umbracoFile>/media/41/hydrangeas.jpg</umbracoFile><umbracoWidth>1024</umbracoWidth><umbracoHeight>768</umbracoHeight><umbracoBytes>595284</umbracoBytes><umbracoExtension>jpg</umbracoExtension><newsCrops><crops date=\"2012-11-05T16:30:18\"><crop name=\"thumbCrop\" x=\"133\" y=\"0\" x2=\"902\" y2=\"768\" url=\"/media/41/hydrangeas_thumbCrop.jpg\" /></crops></newsCrops></Image></mediaItem></DAMP>";
var typedXml = new DynamicXml(xml);
dynamic dynamicXml = typedXml;
var typedTaken = typedXml.Take(1);
var dynamicTaken = dynamicXml.Take(1);
Assert.AreEqual("1057", typedTaken.ElementAt(0).BaseElement.Elements().First().Attribute("id").Value);
Assert.AreEqual("1057", Enumerable.First(Enumerable.ElementAt(dynamicTaken, 0).BaseElement.Elements()).Attribute("id").Value);
}
Assert.AreEqual(1, typedTaken.Count());
Assert.AreEqual(1, Enumerable.Count(dynamicTaken));
[Test]
public void Take()
{
var xml = "<DAMP fullMedia=\"\"><mediaItem><Image id=\"1057\" version=\"d58d5c16-153e-4896-892f-a722e45a69af\" parentID=\"-1\" level=\"1\" writerID=\"0\" nodeType=\"1032\" template=\"0\" sortOrder=\"1\" createDate=\"2012-11-05T16:55:29\" updateDate=\"2012-11-05T16:55:44\" nodeName=\"test12\" urlName=\"test12\" writerName=\"admin\" nodeTypeAlias=\"Image\" path=\"-1,1057\"><umbracoFile>/media/54/tulips.jpg</umbracoFile><umbracoWidth>1024</umbracoWidth><umbracoHeight>768</umbracoHeight><umbracoBytes>620888</umbracoBytes><umbracoExtension>jpg</umbracoExtension><newsCrops><crops date=\"2012-11-05T16:55:34\"><crop name=\"thumbCrop\" x=\"154\" y=\"1\" x2=\"922\" y2=\"768\" url=\"/media/54/tulips_thumbCrop.jpg\" /></crops></newsCrops></Image></mediaItem><mediaItem><Image id=\"1055\" version=\"4df1f08a-3552-45f2-b4bf-fa980c762f4a\" parentID=\"-1\" level=\"1\" writerID=\"0\" nodeType=\"1032\" template=\"0\" sortOrder=\"1\" createDate=\"2012-11-05T16:29:58\" updateDate=\"2012-11-05T16:30:27\" nodeName=\"Test\" urlName=\"test\" writerName=\"admin\" nodeTypeAlias=\"Image\" path=\"-1,1055\"><umbracoFile>/media/41/hydrangeas.jpg</umbracoFile><umbracoWidth>1024</umbracoWidth><umbracoHeight>768</umbracoHeight><umbracoBytes>595284</umbracoBytes><umbracoExtension>jpg</umbracoExtension><newsCrops><crops date=\"2012-11-05T16:30:18\"><crop name=\"thumbCrop\" x=\"133\" y=\"0\" x2=\"902\" y2=\"768\" url=\"/media/41/hydrangeas_thumbCrop.jpg\" /></crops></newsCrops></Image></mediaItem></DAMP>";
var typedXml = new DynamicXml(xml);
dynamic dynamicXml = typedXml;
var typedTaken = typedXml.Take(1);
var dynamicTaken = dynamicXml.Take(1);
Assert.AreEqual("1057", typedTaken.ElementAt(0).BaseElement.Elements().First().Attribute("id").Value);
Assert.AreEqual("1057", Enumerable.First(Enumerable.ElementAt(dynamicTaken, 0).BaseElement.Elements()).Attribute("id").Value);
}
Assert.AreEqual(1, typedTaken.Count());
Assert.AreEqual(1, Enumerable.Count(dynamicTaken));
[Test]
public void Ensure_Legacy_Objects_Are_Returned()
{
var xml = "<DAMP fullMedia=\"\"><mediaItem><Image id=\"1057\" version=\"d58d5c16-153e-4896-892f-a722e45a69af\" parentID=\"-1\" level=\"1\" writerID=\"0\" nodeType=\"1032\" template=\"0\" sortOrder=\"1\" createDate=\"2012-11-05T16:55:29\" updateDate=\"2012-11-05T16:55:44\" nodeName=\"test12\" urlName=\"test12\" writerName=\"admin\" nodeTypeAlias=\"Image\" path=\"-1,1057\"><umbracoFile>/media/54/tulips.jpg</umbracoFile><umbracoWidth>1024</umbracoWidth><umbracoHeight>768</umbracoHeight><umbracoBytes>620888</umbracoBytes><umbracoExtension>jpg</umbracoExtension><newsCrops><crops date=\"2012-11-05T16:55:34\"><crop name=\"thumbCrop\" x=\"154\" y=\"1\" x2=\"922\" y2=\"768\" url=\"/media/54/tulips_thumbCrop.jpg\" /></crops></newsCrops></Image></mediaItem><mediaItem><Image id=\"1055\" version=\"4df1f08a-3552-45f2-b4bf-fa980c762f4a\" parentID=\"-1\" level=\"1\" writerID=\"0\" nodeType=\"1032\" template=\"0\" sortOrder=\"1\" createDate=\"2012-11-05T16:29:58\" updateDate=\"2012-11-05T16:30:27\" nodeName=\"Test\" urlName=\"test\" writerName=\"admin\" nodeTypeAlias=\"Image\" path=\"-1,1055\"><umbracoFile>/media/41/hydrangeas.jpg</umbracoFile><umbracoWidth>1024</umbracoWidth><umbracoHeight>768</umbracoHeight><umbracoBytes>595284</umbracoBytes><umbracoExtension>jpg</umbracoExtension><newsCrops><crops date=\"2012-11-05T16:30:18\"><crop name=\"thumbCrop\" x=\"133\" y=\"0\" x2=\"902\" y2=\"768\" url=\"/media/41/hydrangeas_thumbCrop.jpg\" /></crops></newsCrops></Image></mediaItem></DAMP>";
var mediaItems = new global::umbraco.MacroEngines.DynamicXml(xml);
//Debug.WriteLine("full xml = {0}", mediaItems.ToXml());
Assert.AreEqual("1057", typedTaken.ElementAt(0).BaseElement.Elements().First().Attribute("id").Value);
Assert.AreEqual("1057", Enumerable.First(Enumerable.ElementAt(dynamicTaken, 0).BaseElement.Elements()).Attribute("id").Value);
}
if (mediaItems.Count() != 0)
{
foreach (dynamic item in mediaItems)
{
Type itemType = item.GetType();
Debug.WriteLine("item type = {0}", itemType);
dynamic image = item.Image;
[Test]
public void Ensure_Legacy_Objects_Are_Returned()
{
var xml = "<DAMP fullMedia=\"\"><mediaItem><Image id=\"1057\" version=\"d58d5c16-153e-4896-892f-a722e45a69af\" parentID=\"-1\" level=\"1\" writerID=\"0\" nodeType=\"1032\" template=\"0\" sortOrder=\"1\" createDate=\"2012-11-05T16:55:29\" updateDate=\"2012-11-05T16:55:44\" nodeName=\"test12\" urlName=\"test12\" writerName=\"admin\" nodeTypeAlias=\"Image\" path=\"-1,1057\"><umbracoFile>/media/54/tulips.jpg</umbracoFile><umbracoWidth>1024</umbracoWidth><umbracoHeight>768</umbracoHeight><umbracoBytes>620888</umbracoBytes><umbracoExtension>jpg</umbracoExtension><newsCrops><crops date=\"2012-11-05T16:55:34\"><crop name=\"thumbCrop\" x=\"154\" y=\"1\" x2=\"922\" y2=\"768\" url=\"/media/54/tulips_thumbCrop.jpg\" /></crops></newsCrops></Image></mediaItem><mediaItem><Image id=\"1055\" version=\"4df1f08a-3552-45f2-b4bf-fa980c762f4a\" parentID=\"-1\" level=\"1\" writerID=\"0\" nodeType=\"1032\" template=\"0\" sortOrder=\"1\" createDate=\"2012-11-05T16:29:58\" updateDate=\"2012-11-05T16:30:27\" nodeName=\"Test\" urlName=\"test\" writerName=\"admin\" nodeTypeAlias=\"Image\" path=\"-1,1055\"><umbracoFile>/media/41/hydrangeas.jpg</umbracoFile><umbracoWidth>1024</umbracoWidth><umbracoHeight>768</umbracoHeight><umbracoBytes>595284</umbracoBytes><umbracoExtension>jpg</umbracoExtension><newsCrops><crops date=\"2012-11-05T16:30:18\"><crop name=\"thumbCrop\" x=\"133\" y=\"0\" x2=\"902\" y2=\"768\" url=\"/media/41/hydrangeas_thumbCrop.jpg\" /></crops></newsCrops></Image></mediaItem></DAMP>";
var mediaItems = new global::umbraco.MacroEngines.DynamicXml(xml);
//Debug.WriteLine("full xml = {0}", mediaItems.ToXml());
Type imageType = image.GetType();
Debug.WriteLine("image type = {0}", imageType);
//ensure they are the same
Assert.AreEqual(itemType, imageType);
if (mediaItems.Count() != 0)
{
foreach (dynamic item in mediaItems)
{
Type itemType = item.GetType();
Debug.WriteLine("item type = {0}", itemType);
dynamic image = item.Image;
//ensure they are legacy
Assert.AreEqual(typeof(global::umbraco.MacroEngines.DynamicXml), itemType);
Assert.AreEqual(typeof(global::umbraco.MacroEngines.DynamicXml), imageType);
}
}
}
Type imageType = image.GetType();
Debug.WriteLine("image type = {0}", imageType);
/// <summary>
/// Test the current Core class
/// </summary>
[Test]
public void Find_Test_Core_Class()
{
RunFindTest(x => new DynamicXml(x));
}
//ensure they are the same
Assert.AreEqual(itemType, imageType);
/// <summary>
/// Tests the macroEngines legacy class
/// </summary>
[Test]
public void Find_Test_Legacy_Class()
{
RunFindTest(x => new global::umbraco.MacroEngines.DynamicXml(x));
}
//ensure they are legacy
Assert.AreEqual(typeof(global::umbraco.MacroEngines.DynamicXml), itemType);
Assert.AreEqual(typeof(global::umbraco.MacroEngines.DynamicXml), imageType);
}
}
}
private void RunFindTest(Func<string, dynamic> getDynamicXml)
{
var xmlstring = @"<test>
/// <summary>
/// Test the current Core class
/// </summary>
[Test]
public void Find_Test_Core_Class()
{
RunFindTest(x => new DynamicXml(x));
}
/// <summary>
/// Tests the macroEngines legacy class
/// </summary>
[Test]
public void Find_Test_Legacy_Class()
{
RunFindTest(x => new global::umbraco.MacroEngines.DynamicXml(x));
}
private void RunFindTest(Func<string, dynamic> getDynamicXml)
{
var xmlstring = @"<test>
<item id='1' name='test 1' value='found 1'/>
<item id='2' name='test 2' value='found 2'/>
<item id='3' name='test 3' value='found 3'/>
</test>";
dynamic dXml = getDynamicXml(xmlstring);
dynamic dXml = getDynamicXml(xmlstring);
var result1 = dXml.Find("@name", "test 1");
var result2 = dXml.Find("@name", "test 2");
var result3 = dXml.Find("@name", "test 3");
var result4 = dXml.Find("@name", "dont find");
var result1 = dXml.Find("@name", "test 1");
var result2 = dXml.Find("@name", "test 2");
var result3 = dXml.Find("@name", "test 3");
var result4 = dXml.Find("@name", "dont find");
Assert.AreEqual("found 1", result1.value);
Assert.AreEqual("found 2", result2.value);
Assert.AreEqual("found 3", result3.value);
Assert.Throws<RuntimeBinderException>(() =>
{
//this will throw because result4 is not found
var temp = result4.value;
});
}
Assert.AreEqual("found 1", result1.value);
Assert.AreEqual("found 2", result2.value);
Assert.AreEqual("found 3", result3.value);
Assert.Throws<RuntimeBinderException>(() =>
{
//this will throw because result4 is not found
var temp = result4.value;
});
}
}
}
}
@@ -68,7 +68,8 @@ namespace Umbraco.Tests.PublishedContent
Assert.IsNotNull(doc);
return doc;
}
[Ignore]
[Test]
public void Type_Test()
{
@@ -78,6 +79,7 @@ namespace Umbraco.Tests.PublishedContent
Assert.AreEqual("John Smith", result[1].ArticleAuthor);
}
[Ignore]
[Test]
public void As_Test()
{
@@ -27,7 +27,7 @@ namespace Umbraco.Tests.Resolvers
};
ActionsResolver.Current = new ActionsResolver(
PluginManager.Current.ResolveActions());
() => PluginManager.Current.ResolveActions());
Resolution.Freeze();
}
@@ -0,0 +1,143 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using NUnit.Framework;
using Umbraco.Core;
using Umbraco.Core.ObjectResolution;
namespace Umbraco.Tests.Resolvers
{
[TestFixture]
public class LazyManyObjectResolverTests
{
[SetUp]
public void Initialize()
{
}
[TearDown]
public void TearDown()
{
Resolution.IsFrozen = false;
}
[Test]
public void Ensure_Lazy_Type_Resolution()
{
var resolver = new LazyResolver(new[] {new Lazy<Type>(() => typeof (TransientObject3))});
resolver.AddType<TransientObject1>();
resolver.AddType(new Lazy<Type>(() => typeof(TransientObject2)));
Resolution.Freeze();
Assert.IsFalse(resolver.HasResolvedTypes);
var instances1 = resolver.Objects;
Assert.IsTrue(resolver.HasResolvedTypes);
Assert.AreEqual(3, instances1.Count());
Assert.IsTrue(instances1.Select(x => x.GetType()).ContainsAll(new []{typeof(TransientObject1), typeof(TransientObject2), typeof(TransientObject3)}));
}
[Test]
public void Type_List_Delegates_Combination()
{
Func<IEnumerable<Type>> types = () => new[] { typeof(TransientObject3), typeof(TransientObject2) };
var resolver = new LazyResolver(types);
resolver.AddTypeListDelegate(() => new[] { typeof(TransientObject1)});
Resolution.Freeze();
var instances1 = resolver.Objects;
Assert.AreEqual(3, instances1.Count());
Assert.IsTrue(instances1.Select(x => x.GetType()).ContainsAll(new[] { typeof(TransientObject1), typeof(TransientObject2), typeof(TransientObject3) }));
}
[Test]
public void Type_List_Delegates_And_Lazy_Type_Combination()
{
Func<IEnumerable<Type>> types = () => new[] { typeof(TransientObject3) };
var resolver = new LazyResolver(types);
resolver.AddType(new Lazy<Type>(() => typeof(TransientObject2)));
resolver.AddType<TransientObject1>();
Resolution.Freeze();
var instances1 = resolver.Objects;
Assert.AreEqual(3, instances1.Count());
Assert.IsTrue(instances1.Select(x => x.GetType()).ContainsAll(new[] { typeof(TransientObject1), typeof(TransientObject2), typeof(TransientObject3) }));
}
[Test]
public void Throws_If_Duplication()
{
Func<IEnumerable<Type>> types = () => new[] { typeof(TransientObject3), typeof(TransientObject2), typeof(TransientObject1) };
var resolver = new LazyResolver(types);
//duplicate, but will not throw here
resolver.AddType<TransientObject1>();
Resolution.Freeze();
Assert.Throws<InvalidOperationException>(() =>
{
var instances = resolver.Objects;
});
}
#region Test classes
private interface ITestInterface
{
}
private class TransientObject1 : ITestInterface
{
}
private class TransientObject2 : ITestInterface
{
}
private class TransientObject3 : ITestInterface
{
}
private sealed class LazyResolver : LazyManyObjectsResolverBase<LazyResolver, ITestInterface>
{
public LazyResolver()
: base(ObjectLifetimeScope.Transient)
{
}
public LazyResolver(IEnumerable<Lazy<Type>> values)
:base (values, ObjectLifetimeScope.Transient)
{
}
public LazyResolver(Func<IEnumerable<Type>> typeList)
: base(typeList, ObjectLifetimeScope.Transient)
{
}
public IEnumerable<ITestInterface> Objects
{
get { return Values; }
}
}
#endregion
}
}
@@ -27,7 +27,7 @@ namespace Umbraco.Tests.Resolvers
};
MacroFieldEditorsResolver.Current = new MacroFieldEditorsResolver(
PluginManager.Current.ResolveMacroRenderings());
() => PluginManager.Current.ResolveMacroRenderings());
Resolution.Freeze();
}
@@ -73,7 +73,7 @@ namespace Umbraco.Tests.Resolvers
Assert.IsFalse(object.ReferenceEquals(instances1.Single(), instances3.Single()));
}
#region
#region Test classes
private interface ITestInterface
{
@@ -27,7 +27,7 @@ namespace Umbraco.Tests.Resolvers
};
PackageActionsResolver.Current = new PackageActionsResolver(
PluginManager.Current.ResolvePackageActions());
() => PluginManager.Current.ResolvePackageActions());
Resolution.Freeze();
}
@@ -23,7 +23,8 @@ namespace Umbraco.Tests.Routing
{
get { return false; }
}
[Ignore]
[TestCase("/", 1046)]
[TestCase("/default.aspx", 1046)] //this one is actually rather important since this is the path that comes through when we are running in pre-IIS 7 for the root document '/' !
[TestCase("/Sub1", 1173)]
@@ -35,7 +36,6 @@ namespace Umbraco.Tests.Routing
// we've made it return "/test-page" => we have to support that url back in the lookup...
[TestCase("/home", 1046)]
[TestCase("/test-page", 1172)]
public void Match_Document_By_Url_Hide_Top_Level(string urlString, int expectedId)
{
var routingContext = GetRoutingContext(urlString);
@@ -57,6 +57,7 @@ namespace Umbraco.Tests.Routing
}
}
[Ignore]
[TestCase("/", 1046)]
[TestCase("/default.aspx", 1046)] //this one is actually rather important since this is the path that comes through when we are running in pre-IIS 7 for the root document '/' !
[TestCase("/home", 1046)]
@@ -64,7 +64,8 @@ namespace Umbraco.Tests.Routing
}
//test all template name styles to match the ActionName
[TestCase("home-page")]
[TestCase("home-\\234^^*32page")]
[TestCase("home-page")]
[TestCase("Home-Page")]
[TestCase("HomePage")]
[TestCase("homePage")]
@@ -84,7 +85,9 @@ namespace Umbraco.Tests.Routing
handler.GetHandlerForRoute(routingContext.UmbracoContext.HttpContext.Request.RequestContext, docRequest);
Assert.AreEqual("CustomDocument", routeData.Values["controller"].ToString());
Assert.AreEqual("HomePage", routeData.Values["action"].ToString());
Assert.AreEqual(
global::umbraco.cms.helpers.Casing.SafeAlias(templateName),
routeData.Values["action"].ToString());
}
@@ -10,6 +10,38 @@ namespace Umbraco.Tests
[TestFixture]
public class StringExtensionsTests
{
[TestCase("This is a string to encrypt")]
[TestCase("This is a string to encrypt\nThis is a second line")]
[TestCase(" White space is preserved ")]
[TestCase("\nWhite space is preserved\n")]
public void Encrypt_And_Decrypt(string input)
{
var encrypted = input.EncryptWithMachineKey();
var decrypted = encrypted.DecryptWithMachineKey();
Assert.AreNotEqual(input, encrypted);
Assert.AreEqual(input, decrypted);
}
[Test()]
public void Encrypt_And_Decrypt_Long_Value()
{
// Generate a really long string
char[] chars = { 'a', 'b', 'c', '1', '2', '3', '\n' };
string valueToTest = string.Empty;
// Create a string 7035 chars long
for (int i = 0; i < 1005; i++)
for (int j = 0; j < chars.Length; j++)
valueToTest += chars[j].ToString();
var encrypted = valueToTest.ToString().EncryptWithMachineKey();
var decrypted = encrypted.DecryptWithMachineKey();
Assert.AreNotEqual(valueToTest, encrypted);
Assert.AreEqual(valueToTest, decrypted);
}
[TestCase("Hello this is my string", " string", "Hello this is my")]
[TestCase("Hello this is my string strung", " string", "Hello this is my string strung")]
[TestCase("Hello this is my string string", " string", "Hello this is my")]
+19
View File
@@ -0,0 +1,19 @@
<Project DefaultTargets="RunTests" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<MSBuildCommunityTasksPath>..\..\tools\MSBuildCommunityTasks</MSBuildCommunityTasksPath>
</PropertyGroup>
<Import Project="$(MSBuildCommunityTasksPath)\MSBuild.Community.Tasks.Targets" />
<Target Name="RunTests">
<ItemGroup>
<TestAssemblies Include=".\bin\Debug\Umbraco.Tests.dll" />
</ItemGroup>
<NUnit ToolPath="..\..\tools\NUnit\" Assemblies="@(TestAssemblies)" OutputXmlFile=".\NUnitTestResults.xml" />
</Target>
</Project>
+1
View File
@@ -86,6 +86,7 @@
<Compile Include="ObjectExtensionsTests.cs" />
<Compile Include="ContentStores\PublishContentStoreTests.cs" />
<Compile Include="DataTypeFactoryTests.cs" />
<Compile Include="Resolvers\LazyManyObjectResolverTests.cs" />
<Compile Include="Routing\LookupByNiceUrlWithDomainsTests.cs" />
<Compile Include="Routing\NiceUrlsProviderWithDomainsTests.cs" />
<Compile Include="Routing\uQueryGetNodeIdByUrlTests.cs" />
+21 -13
View File
@@ -128,13 +128,13 @@
<HintPath>..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
</Reference>
<Reference Include="Our.Umbraco.uGoLive">
<HintPath>..\..\lib\Our.Umbraco.uGoLive.dll</HintPath>
<HintPath>..\packages\uGoLive.1.4.0\lib\Our.Umbraco.uGoLive.dll</HintPath>
</Reference>
<Reference Include="Our.Umbraco.uGoLive.47x">
<HintPath>..\..\lib\Our.Umbraco.uGoLive.47x.dll</HintPath>
<HintPath>..\packages\uGoLive.1.4.0\lib\Our.Umbraco.uGoLive.47x.dll</HintPath>
</Reference>
<Reference Include="Our.Umbraco.uGoLive.Checks">
<HintPath>..\..\lib\Our.Umbraco.uGoLive.Checks.dll</HintPath>
<HintPath>..\packages\uGoLive.1.4.0\lib\Our.Umbraco.uGoLive.Checks.dll</HintPath>
</Reference>
<Reference Include="System">
<Name>System</Name>
@@ -655,6 +655,7 @@
<Content Include="umbraco_client\tinymce3\langs\da.js" />
<Content Include="umbraco_client\tinymce3\langs\de.js" />
<Content Include="umbraco_client\tinymce3\langs\en.js" />
<Content Include="umbraco_client\tinymce3\langs\en_us.js" />
<Content Include="umbraco_client\tinymce3\langs\fi.js" />
<Content Include="umbraco_client\tinymce3\langs\fr.js" />
<Content Include="umbraco_client\tinymce3\langs\he.js" />
@@ -1805,6 +1806,23 @@
<DependentUpon>applications.config</DependentUpon>
<SubType>Designer</SubType>
</None>
<Content Include="Umbraco\scripting\templates\cshtml\EmptyTemplate.cshtml">
<SubType>Code</SubType>
</Content>
<Content Include="Umbraco\scripting\templates\cshtml\Gallery.cshtml" />
<Content Include="Umbraco\scripting\templates\cshtml\ListAncestorsFromCurrentPage.cshtml" />
<Content Include="Umbraco\scripting\templates\cshtml\ListChildPagesFromChangeableSource.cshtml" />
<Content Include="Umbraco\scripting\templates\cshtml\ListChildPagesFromCurrentPage.cshtml" />
<Content Include="Umbraco\scripting\templates\cshtml\ListChildPagesOrderedByDate.cshtml" />
<Content Include="Umbraco\scripting\templates\cshtml\ListChildPagesOrderedByName.cshtml" />
<Content Include="Umbraco\scripting\templates\cshtml\ListChildPagesOrderedByProperty.cshtml" />
<Content Include="Umbraco\scripting\templates\cshtml\ListChildPagesWithDoctype.cshtml" />
<Content Include="Umbraco\scripting\templates\cshtml\ListDescendantsFromCurrentPage.cshtml" />
<Content Include="Umbraco\scripting\templates\cshtml\ListImagesFromMediaFolder.cshtml">
<SubType>Code</SubType>
</Content>
<Content Include="Umbraco\scripting\templates\cshtml\MultinodeTree-picker.cshtml" />
<Content Include="Umbraco\scripting\templates\cshtml\TwitterFeed.cshtml" />
<None Include="umbraco_client\CodeMirror\js\mode\coffeescript\LICENSE" />
<None Include="umbraco_client\CodeMirror\js\mode\pascal\LICENSE" />
<None Include="umbraco_client\CodeMirror\js\mode\perl\LICENSE" />
@@ -1828,14 +1846,8 @@
<Content Include="Umbraco\masterpages\umbracoDialog.Master" />
<Content Include="Umbraco\Search\QuickSearchHandler.ashx" />
<Content Include="Umbraco\scripting\templates\cshtml\Breadcrumb.cshtml" />
<Content Include="Umbraco\scripting\templates\cshtml\ListSubPagesByDateAndLimit.cshtml" />
<Content Include="Umbraco\scripting\templates\cshtml\Macro-Parameters.cshtml" />
<Content Include="Umbraco\scripting\templates\cshtml\Media.cshtml" />
<Content Include="Umbraco\scripting\templates\cshtml\Navigation.cshtml" />
<Content Include="Umbraco\scripting\templates\cshtml\Paging.cshtml" />
<Content Include="Umbraco\scripting\templates\cshtml\SelectChildrenByDocumentType.cshtml" />
<Content Include="Umbraco\scripting\templates\cshtml\SiteMap.cshtml" />
<Content Include="Umbraco\scripting\templates\cshtml\UsingRelatedLinks.cshtml" />
<None Include="Umbraco\scripting\templates\py\SubpagesAsThumnbnails.py" />
<None Include="Umbraco\scripting\templates\py\SubpagesFromAChangeableSource.py" />
<None Include="Umbraco\scripting\templates\py\SubpagesFromCurrentPage.py" />
@@ -2288,10 +2300,6 @@
<None Include="web.Template.UMBRACOELISE.Debug.config">
<DependentUpon>Web.Template.config</DependentUpon>
</None>
<None Include="web.Template.UMBRACORATI.Debug.config">
<DependentUpon>Web.Template.config</DependentUpon>
<SubType>Designer</SubType>
</None>
<None Include="web.Template.ssaolap01.Debug.config">
<DependentUpon>Web.Template.config</DependentUpon>
</None>
@@ -1,15 +1,22 @@
<%@ Page Language="C#" AutoEventWireup="true" Inherits="System.Web.UI.Page" %>
<%
// NH: Adds this inline check to avoid a simple codebehind file in the legacy project!
if (!umbraco.cms.helpers.url.ValidateProxyUrl(Request["url"], Request.Url.AbsoluteUri))
{
throw new ArgumentException("Can't redirect to the requested url - it's not local or an approved proxy url", "url");
}
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>The website is restarting</title>
<META HTTP-EQUIV=REFRESH CONTENT="10; URL=<%=Request["url"] %>">
<meta http-equiv="REFRESH" content="10; URL=<%=Request["url"] %>">
</head>
<body>
<h1>The website is restarting</h1>
<p>Please wait for 10s while we prepare to serve the page you have requested...</p>
<p style="border-top: 1px solid #ccc; padding-top: 10px;">
<small>You can modify the design of this page by editing /config/splashes/booting.aspx</small>
</p>
+1 -2
View File
@@ -1,10 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<!--<package id="ClientDependency" version="1.5.1.0" targetFramework="net40" />
<package id="ClientDependency-Mvc" version="1.5.1.0" targetFramework="net40" />-->
<package id="log4net" version="2.0.0" targetFramework="net40" />
<package id="Microsoft.AspNet.Mvc" version="3.0.20105.1" targetFramework="net40" />
<package id="Microsoft.AspNet.Razor" version="1.0.20105.408" targetFramework="net40" />
<package id="Microsoft.AspNet.WebPages" version="1.0.20105.408" targetFramework="net40" />
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net40" />
<package id="uGoLive" version="1.4.0" targetFramework="net40" />
</packages>
@@ -103,6 +103,7 @@
<key alias="nodeName">Page Title</key>
<key alias="otherElements">Properties</key>
<key alias="parentNotPublished">This document is published but is not visible because the parent '%0%' is unpublished</key>
<key alias="parentNotPublishedAnomaly">Oops: this document is published but is not in the cache (internal error)</key>
<key alias="publish">Publish</key>
<key alias="publishStatus">Publication Status</key>
<key alias="releaseDate">Publish at</key>
@@ -963,4 +964,4 @@ To manage your website, simply open the umbraco back office and start adding con
<key alias="userTypes">User types</key>
<key alias="writer">Writer</key>
</area>
</language>
</language>
@@ -102,6 +102,7 @@
<key alias="nodeName">Page Title</key>
<key alias="otherElements">Properties</key>
<key alias="parentNotPublished">This document is published but is not visible because the parent '%0%' is unpublished</key>
<key alias="parentNotPublishedAnomaly">Oops: this document is published but is not in the cache (internal error)</key>
<key alias="publish">Publish</key>
<key alias="publishStatus">Publication Status</key>
<key alias="releaseDate">Publish at</key>
@@ -961,4 +962,4 @@ To manage your website, simply open the umbraco back office and start adding con
<key alias="userTypes">User types</key>
<key alias="writer">Writer</key>
</area>
</language>
</language>
@@ -659,6 +659,10 @@ Per gestire il tuo sito web, è sufficiente aprire il back office di Umbraco e i
<key alias="fileSavedHeader"><![CDATA[File salvato]]></key>
<key alias="fileSavedText"><![CDATA[File salvato con successo]]></key>
<key alias="languageSaved"><![CDATA[Lingua salvata]]></key>
<key alias="partialViewSavedHeader">Partial view salvata</key>
<key alias="partialViewSavedText">Partial view salvata senza errori!</key>
<key alias="partialViewErrorHeader">Partial view non salvata</key>
<key alias="partialViewErrorText">Errore durante il salvataggio del file.</key>
<key alias="pythonErrorHeader"><![CDATA[Script Python non salvato]]></key>
<key alias="pythonErrorText"><![CDATA[A causa di un errore lo script Python non può essere salvato]]></key>
<key alias="pythonSavedHeader"><![CDATA[Script Python salvato]]></key>
+29 -5
View File
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<language alias="ja" intName="Japanese" localName="日本語" lcid="17" culture="ja-JP">
<creator>
<name>umbraco</name>
@@ -15,8 +15,6 @@
<key alias="disable">無効</key>
<key alias="emptyTrashcan">ごみ箱を空にする</key>
<key alias="exportDocumentType">ドキュメントタイプの書出</key>
<key alias="exportDocumentTypeAsCode">.NETの書き出し</key>
<key alias="exportDocumentTypeAsCode-Full">.NETの書き出し</key>
<key alias="importDocumentType">ドキュメントタイプの読込</key>
<key alias="importPackage">パッケージの読み込み</key>
<key alias="liveEdit">ライブ編集</key>
@@ -25,6 +23,7 @@
<key alias="notify">メール通知</key>
<key alias="protect">一般公開</key>
<key alias="publish">公開</key>
<key alias="unpublish">公開を止める</key>
<key alias="refreshNode">最新の情報に更新</key>
<key alias="republish">サイトのリフレッシュ</key>
<key alias="rights">アクセス権</key>
@@ -38,6 +37,7 @@
</area>
<area alias="assignDomain">
<key alias="addNew">ドメインの割り当て</key>
<key alias="invalidDomain">適当でないホスト名</key>
<key alias="domain">ドメイン</key>
<key alias="domainCreated">ドメイン '%0%' が新たに割り当てられました</key>
<key alias="domainDeleted">ドメイン '%0%' は削除されました</key>
@@ -71,6 +71,7 @@
<key alias="saveAndPublish">保存及び公開</key>
<key alias="saveToPublish">保存して承認に送る</key>
<key alias="showPage">プレビュー</key>
<key alias="showPageDisabled">テンプレートが指定されていないのでプレビューは無効になっています</key>
<key alias="styleChoose">スタイルの選択</key>
<key alias="styleShow">スタイルの表示</key>
<key alias="tableInsert">表の挿入</key>
@@ -90,6 +91,7 @@
<key alias="itemNotPublished">このページは公開されていません</key>
<key alias="lastPublished">公開日時</key>
<key alias="mediatype">メディアタイプ</key>
<key alias="mediaLinks">メディアの項目へのリンク</key>
<key alias="membergroup">メンバーグループ</key>
<key alias="memberrole">役割</key>
<key alias="membertype">メンバータイプ</key>
@@ -324,6 +326,7 @@
<key alias="welcome">ようこそ...</key>
<key alias="width"></key>
<key alias="yes">はい</key>
<key alias="folder">フォルダー</key>
</area>
<area alias="graphicheadline">
<key alias="backgroundcolor">背景色</key>
@@ -482,6 +485,7 @@ Runwayをインストールして作られた新しいウェブサイトがど
<key alias="notAllowedByContentType">現在のノードは、ドキュメントタイプの設定により選択されたノードの子になることはできません。</key>
<key alias="notAllowedByPath">ノードは、自分のサブページには移動できません</key>
<key alias="notValid">子ドキュメントで権限がないので、その操作はできません。</key>
<key alias="relateToOriginal">コピーしたものを元と関係づける</key>
</area>
<area alias="notifications">
<key alias="editNotifications">%0% への通知を編集</key>
@@ -586,8 +590,13 @@ Runwayをインストールして作られた新しいウェブサイトがど
</area>
<area alias="publish">
<key alias="contentPublishedFailedByEvent"><![CDATA[
サードパーティのエクステンションがキャンセルされたので、%0% は発行できませんでした。
サードパーティのエクステンションがキャンセルされたので、%0% は公開できませんでした。
]]></key>
<key alias="contentPublishedFailedByParent">
<![CDATA[
親ページが公開されていないので、%0% は公開できませんでした。
]]>
</key>
<key alias="includeUnpublished">非公開の子ページも含めます</key>
<key alias="inProgress">公開を進めています - 少々お待ちください...</key>
<key alias="inProgressCounter">%1% ページ中 %0% ページが公開されました...</key>
@@ -648,6 +657,9 @@ Runwayをインストールして作られた新しいウェブサイトがど
<key alias="tab">タブ</key>
<key alias="tabname">タブの名前</key>
<key alias="tabs">タブ</key>
<key alias="contentTypeEnabled">マスターコンテンツタイプが有効</key>
<key alias="contentTypeUses">このコンテンツタイプの使用</key>
<key alias="asAContentMasterType">マスターコンテンツタイプについては、マスターコンテンツタイプからのタブは表示されず、マスターコンテンツタイプでのみ編集することができます。</key>
</area>
<area alias="sort">
<key alias="sortDone">ソートが完了しました。</key>
@@ -682,6 +694,7 @@ Runwayをインストールして作られた新しいウェブサイトがど
<key alias="editTemplateSaved">テンプレートを保存しました</key>
<key alias="editUserError">ユーザーの保存時にエラーが発生しました (ログを確認してください)</key>
<key alias="editUserSaved">ユーザーを保存しました</key>
<key alias="editUserTypeSaved">ユーザータイプを保存しました</key>
<key alias="fileErrorHeader">ファイルは未保存です</key>
<key alias="fileErrorText">ファイルを保存できません。アクセス権を確認してください。</key>
<key alias="fileSavedHeader">ファイルを保存しました</key>
@@ -700,6 +713,11 @@ Runwayをインストールして作られた新しいウェブサイトがど
<key alias="xsltPermissionErrorText">XSLTを保存できません。アクセス権を確認してください。</key>
<key alias="xsltSavedHeader">XSLTを保存しました</key>
<key alias="xsltSavedText">XSLTにエラーはありません</key>
<key alias="contentUnpublished">コンテンツは公開されていません</key>
<key alias="partialViewSavedHeader">部分ビュー保存しました</key>
<key alias="partialViewSavedText">部分ビューをエラーなしで保存しました!</key>
<key alias="partialViewErrorHeader">部分ビューは保存されていません</key>
<key alias="partialViewErrorText">ファイルを保存するときにエラーが発生しました。</key>
</area>
<area alias="stylesheet">
<key alias="aliasHelp">CSSシンタックスを使用 例: h1, .redHeader, .blueTex</key>
@@ -727,6 +745,7 @@ Runwayをインストールして作られた新しいウェブサイトがど
<key alias="chooseField">フィールドの選択</key>
<key alias="convertLineBreaks">改行コードの変換</key>
<key alias="convertLineBreaksHelp">改行コードをhtmlタグ &amp;lt;br&amp;gt; に変換する</key>
<key alias="customFields">カスタムフィールド</key>
<key alias="dateOnly">日付のみ表示</key>
<key alias="formatAsDate">日付の形式</key>
<key alias="htmlEncode">HTMLエンコード</key>
@@ -740,6 +759,7 @@ Runwayをインストールして作られた新しいウェブサイトがど
<key alias="recursive">再帰的</key>
<key alias="removeParagraph">段落タグの消去</key>
<key alias="removeParagraphHelp">段落タグ &amp;lt;P&amp;gt; を消去します</key>
<key alias="standardFields">標準フィールド</key>
<key alias="uppercase">大文字変換</key>
<key alias="urlEncode">URLエンコード</key>
<key alias="urlEncodeHelp">文字列をURLで使用可能な文字列に変換する</key>
@@ -833,6 +853,8 @@ Runwayをインストールして作られた新しいウェブサイトがど
<key alias="administrators">管理者</key>
<key alias="categoryField">フィールドのカテゴリー</key>
<key alias="changePassword">パスワードの変更</key>
<key alias="newPassword">新パスワード</key>
<key alias="confirmNewPassword">新パスワードの確認</key>
<key alias="changePasswordDescription">Umbracoの管理画面にアクセスするためのパスワードを変更するには、以下のフォームに新しいパスワード入力して「パスワードの変更」ボタンをクリックしてください。</key>
<key alias="contentChannel">コンテントチャンネル</key>
<key alias="defaultToLiveEditing">ログオン後ライブ編集にリダイレクト</key>
@@ -851,6 +873,8 @@ Runwayをインストールして作られた新しいウェブサイトがど
<key alias="passwordConfirm">新しいパスワードの確認</key>
<key alias="passwordEnterNew">新しいパスワードの入力</key>
<key alias="passwordIsBlank">パスワードは空白にできません!</key>
<key alias="passwordCurrent">現在のパスワード</key>
<key alias="passwordInvalid">現在のパスワードが正しくない</key>
<key alias="passwordIsDifferent">新しいパスワードと確認のパスワードが一致しません。再度入力してください!</key>
<key alias="passwordMismatch">確認のパスワードは新しいパスワードと一致しません!</key>
<key alias="permissionReplaceChildren">子ノードのアクセス権を置き換える</key>
@@ -864,4 +888,4 @@ Runwayをインストールして作られた新しいウェブサイトがど
<key alias="userTypes">ユーザーの種類</key>
<key alias="writer">投稿者</key>
</area>
</language>
</language>
@@ -32,6 +32,7 @@
<key alias="sort">Сортировать</key>
<key alias="toPublish">Направить на публикацию</key>
<key alias="translate">Перевести</key>
<key alias="unpublish">Скрыть</key>
<key alias="update">Обновить</key>
</area>
<area alias="assignDomain">
@@ -682,6 +683,7 @@
<key alias="contentTypeTabCreated">Вкладка создана</key>
<key alias="contentTypeTabDeleted">Вкладка удалена</key>
<key alias="contentTypeTabDeletedText">Вкладка с идентификатором (id): %0% удалена</key>
<key alias="contentUnpublished">Документ скрыт (публикация отменена)</key>
<key alias="cssErrorHeader">Стиль CSS не сохранен</key>
<key alias="cssSavedHeader">Стиль CSS сохранен</key>
<key alias="cssSavedText">Стиль CSS сохранен без ошибок</key>
@@ -706,6 +708,10 @@
<key alias="fileSavedHeader">Файл сохранен</key>
<key alias="fileSavedText">Файл сохранен без ошибок</key>
<key alias="languageSaved">Язык сохранен</key>
<key alias="partialViewErrorHeader">Представление не сохранено</key>
<key alias="partialViewErrorText">Произошла ошибка при сохранении файла</key>
<key alias="partialViewSavedHeader">Представление сохранено</key>
<key alias="partialViewSavedText">Представление сохранено без ошибок</key>
<key alias="pythonErrorHeader">Cкрипт Python не сохранен</key>
<key alias="pythonErrorText">Cкрипт Python не может быть сохранен в связи с ошибками</key>
<key alias="pythonSavedHeader">Cкрипт Python сохранен</key>
@@ -869,7 +875,7 @@
<key alias="loginname">Имя входа (логин)</key>
<key alias="mediastartnode">Начальный узел в Медиа-библиотеке</key>
<key alias="modules">Разделы</key>
<key alias="newPassword">Сменить пароль</key>
<key alias="newPassword">Новый пароль</key>
<key alias="noConsole">Отключить доступ к административной панели Umbraco</key>
<key alias="password">Пароль</key>
<key alias="passwordChanged">Ваш пароль доступа изменен!</key>
+14 -10
View File
@@ -501,13 +501,13 @@
<p>您好!这是一封自动发送的邮件,告诉您任务<strong>'%1%'</strong>已在<a href="%7%"><strong>'%2%'</strong></a>被用户<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%">&nbsp;&nbsp;PUBLISH&nbsp;&nbsp;</a> &nbsp;
<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%">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;EDIT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a> &nbsp;
<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%">&nbsp;&nbsp;&nbsp;&nbsp;DELETE&nbsp;&nbsp;&nbsp;&nbsp;</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%">&nbsp;&nbsp;发布&nbsp;&nbsp;</a> &nbsp;
<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%">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;编辑&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a> &nbsp;
<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%">&nbsp;&nbsp;&nbsp;&nbsp;删除&nbsp;&nbsp;&nbsp;&nbsp;</a>
<br />
</div>
<p>
<h3>Update summary:</h3>
<h3>更新概况:</h3>
<table style="width: 100%;">
%6%
</table>
@@ -515,14 +515,14 @@
<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%">&nbsp;&nbsp;PUBLISH&nbsp;&nbsp;</a> &nbsp;
<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%">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;EDIT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a> &nbsp;
<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%">&nbsp;&nbsp;&nbsp;&nbsp;DELETE&nbsp;&nbsp;&nbsp;&nbsp;</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%">&nbsp;&nbsp;发布&nbsp;&nbsp;</a> &nbsp;
<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%">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;编辑&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a> &nbsp;
<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%">&nbsp;&nbsp;&nbsp;&nbsp;删除&nbsp;&nbsp;&nbsp;&nbsp;</a>
<br />
</div>
<p>Have a nice day!<br /><br />
Cheers from the umbraco robot
<p>祝您愉快!<br /><br />
该信息由系统自动发送
</p>
]]></key>
<key alias="mailSubject">在 %2%[%0%] 关于 %1% 的通告已执行。</key>
@@ -709,6 +709,10 @@
<key alias="xsltPermissionErrorText">XSLT无法保存,请检查权限。</key>
<key alias="xsltSavedHeader">XSLT已保存</key>
<key alias="xsltSavedText">XSLT无错误</key>
<key alias="partialViewSavedHeader">Partial视图已保存</key>
<key alias="partialViewSavedText">Partial视图保存,无错误。</key>
<key alias="partialViewErrorHeader">Partial视图未保存</key>
<key alias="partialViewErrorText">Partial视图因为错误未能保存</key>
</area>
<area alias="stylesheet">
<key alias="aliasHelp">使用CSS语法,如:h1、.redHeader、.blueTex。</key>
@@ -878,4 +882,4 @@
<key alias="userTypes">用户类型</key>
<key alias="writer">撰稿人</key>
</area>
</language>
</language>
@@ -33,8 +33,9 @@ namespace Umbraco.Web.UI.Umbraco.Developer.Macros
{
base.PopulateFieldsOnLoad(macro, macroAssemblyValue, macroTypeValue);
//check if the ScriptingFile property contains the MacroPartials path
if (macro.ScriptingFile.StartsWith(SystemDirectories.MvcViews + "/MacroPartials/")
|| (Regex.IsMatch(macro.ScriptingFile, "~/App_Plugins/.+?/Views/MacroPartials", RegexOptions.Compiled)))
if (macro.ScriptingFile.IsNullOrWhiteSpace() == false &&
(macro.ScriptingFile.StartsWith(SystemDirectories.MvcViews + "/MacroPartials/")
|| (Regex.IsMatch(macro.ScriptingFile, "~/App_Plugins/.+?/Views/MacroPartials", RegexOptions.Compiled))))
{
macroPython.Text = "";
SelectedPartialView.Text = macro.ScriptingFile;
@@ -1,4 +1,4 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Dashboard.ascx.cs" Inherits="Our.Umbraco.uGoLive.Web.Umbraco.Plugins.uGoLive.Dashboard" %>
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Dashboard.ascx.cs" Inherits="Our.Umbraco.uGoLive.Web.Umbraco.Plugins.uGoLive.Dashboard" %>
<%@ Import Namespace="umbraco.IO" %>
<%@ Import Namespace="Our.Umbraco.uGoLive.Web" %>
<link href="../umbraco_client/propertypane/style.css" rel="stylesheet" />
@@ -24,7 +24,7 @@
</script>
<div class="uGoLive">
<div class="uGoLive" id="uGoLive">
<div class="propertypane">
<div>
<div class="propertyItem">
@@ -1,21 +1,24 @@
@inherits umbraco.MacroEngines.DynamicNodeContext
@*
BREADCRUMB
=================================
This snippet makes a breadcrumb of parents using an unordred html list.
How it works:
- It uses the Ancestors() method to get all parents and then generates links so the visitor get go back
- Finally it outputs the name of the current page (without a link)
NOTE: It is safe to remove this comment (anything between @ * * @), the code that generates the list is only the below!
*@
@inherits umbraco.MacroEngines.DynamicNodeContext
<ul>
@foreach(var level in @Model.Ancestors().Where("Visible"))
@if (Model.Ancestors().Any())
{
<li><a href="@level.Url">@level.Name</a></li>
<ul class="breadcrumb">
@* For each page in the ancestors collection which have been ordered by Level (so we start with the highest top node first) *@
@foreach (var page in Model.Ancestors().OrderBy("Level"))
{
<li><a href="@page.Url">@page.Name</a> <span class="divider">/</span></li>
}
<li>@Model.Name</li>
@* Display the current page as the last item in the list *@
<li class="active">@Model.Name</li>
</ul>
}
@@ -0,0 +1,17 @@
@inherits umbraco.MacroEngines.DynamicNodeContext
@*
Model = The current page the macro is executed on
@Model.bodyText
Parameter = collection of parameter values passed from the macro
@Paramter.myParam
Library = utillity library with common methods
@Library.NodeById(1233)
*@
@* The fun starts here *@
@@ -0,0 +1,32 @@
@inherits umbraco.MacroEngines.DynamicNodeContext
@*
Macro to display a gallery from a media folder. Add the below parameter to the macro
and use it to point the macro at a specific media folder to display it's content as
a simple list.
Macro Parameters To Create, for this macro to work:
Show:True Alias:mediaId Name:Media Folder ID Type:MediaCurrent
*@
@if (Parameter.mediaId != null)
{
@* Get the media folder as a dynamic node *@
var mediaFolder = Library.MediaById(Parameter.mediaId);
if (mediaFolder.Children.Any())
{
<ul class="thumbnails">
@* for each item in children of the selected media folder *@
@foreach (var mediaItem in mediaFolder.Children)
{
<li class="span2">
<a href="@mediaItem.umbracoFile" class="thumbnail">
<img src="@mediaItem.umbracoFile" alt="@mediaItem.Name" />
</a>
</li>
}
</ul>
}
}
@@ -0,0 +1,16 @@
@inherits umbraco.MacroEngines.DynamicNodeContext
@* Check the current page has ancestors *@
@if (Model.Ancestors().Any())
{
<ul>
@* For each page in the ancestors collection which have been ordered by Level (so we start with the highest top node first) *@
@foreach (var page in Model.Ancestors().OrderBy("Level"))
{
<li><a href="@page.Url">@page.Name</a> &raquo;</li>
}
@* Display the current page as the last item in the list *@
<li>@Model.Name</li>
</ul>
}
@@ -0,0 +1,26 @@
@inherits umbraco.MacroEngines.DynamicNodeContext
@*
=== Macro Parameters To Create ===
Show:True Alias:nodeId Name:Node ID Type:Content Picker
*@
@{
var startNodeID = Parameter.nodeId;
}
@if (startNodeID != null)
{
@* Get the start node as a dynamic node *@
var startNode = Library.NodeById(startNodeID);
if (startNode.Children.Where("Visible").Any())
{
<ul>
@foreach (var page in startNode.Children.Where("Visible"))
{
<li><a href="@page.Url">@page.Name</a></li>
}
</ul>
}
}
@@ -0,0 +1,16 @@
@inherits umbraco.MacroEngines.DynamicNodeContext
@* Ensure that the Current Page has children, where the property umbracoNaviHide is not True *@
@if (Model.Children.Where("Visible").Any())
{
<ul>
@* For each child page under the root node, where the property umbracoNaviHide is not True *@
@foreach (var childPage in Model.Children.Where("Visible"))
{
<li>
<a href="@childPage.Url">@childPage.Name</a>
</li>
}
</ul>
}
@@ -0,0 +1,11 @@
@inherits umbraco.MacroEngines.DynamicNodeContext
<ul>
@*OrderBy() takes the property to sort by and optionally order desc/asc *@
@foreach (var page in Model.Children.Where("Visible").OrderBy("CreateDate desc"))
{
<li><a href="@page.Url">@page.Name</a></li>
}
</ul>
@@ -0,0 +1,10 @@
@inherits umbraco.MacroEngines.DynamicNodeContext
<ul>
@*OrderBy() takes the property to sort by*@
@foreach (var page in Model.Children.Where("Visible").OrderBy("Name"))
{
<li><a href="@page.Url">@page.Name</a></li>
}
</ul>
@@ -0,0 +1,22 @@
@inherits umbraco.MacroEngines.DynamicNodeContext
@*
Macro parameter to be set on the macro
Show:True Alias:propertyAlias Name:Property Alias Type:Textstring
*@
@{
@* 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)
}
<ul>
@foreach (var page in selection)
{
<li><a href="@page.Url">@page.Name</a></li>
}
</ul>
@@ -0,0 +1,26 @@
@inherits umbraco.MacroEngines.DynamicNodeContext
@*
This snippet shows how simple it is to fetch only children of a certain Document Type using Razor. Instead of
calling .Children, simply call .AliasOfDocumentType in plural.
For instance .Textpages or .NewsArticles (you can find the alias of your Document Type by editing it in the
Settings section).
*@
@{
@*Build a query and return the visible items *@
var selection= Model.Textpages.Where(query).Where("Visible");
}
@*Determine if there are any nodes in the selection, then render list *@
@if(selection.Any()){
<ul>
@foreach(var page in selection){
<li><a href="@page.Url">@page.Name</a></li>
}
</ul>
}
@@ -0,0 +1,58 @@
@inherits PartialViewMacroPage
@using Umbraco.Cms.Web
@using Umbraco.Cms.Web.Macros
@using Umbraco.Framework
@* Ensure that the Current Page has children, where the property umbracoNaviHide is not True *@
@if (CurrentPage.Children.Where("umbracoNaviHide != @0", "True").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;
@* 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"))
{
<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())
{
@* Call our helper to display the children *@
@childPages(childPage.Children)
}
</li>
}
</ul>
}
@helper childPages(dynamic pages)
{
@* Ensure that we have a collection of pages *@
if (pages.Any())
{
@* Get the first page in pages and get the level *@
var naviLevel = pages.First().Level;
@* Add in level for a CSS hook *@
<ul class="level-@(naviLevel)">
@foreach (var page in pages.Where("umbracoNaviHide != @0", "True"))
{
<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())
{
@* Call our helper to display the children *@
@childPages(page.Children)
}
</li>
}
</ul>
}
}
@@ -0,0 +1,26 @@
@inherits umbraco.MacroEngines.DynamicNodeContext
@*
Macro Parameters To Create, for this macro to work:
Show:True Alias:mediaId Name:Media Folder ID Type:MediaCurrent
*@
@if (Parameter.mediaId != null)
{
@* Get the media folder as a dynamic node *@
var mediaFolder = Library.MediaById(Parameter.mediaId);
if (mediaFolder.Children.Any())
{
<ul>
@* for each item in children of the selected media folder *@
@foreach (var mediaItem in mediaFolder.Children)
{
<li><img src="@mediaItem.umbracoFile" alt="@mediaItem.Name" /></li>
}
</ul>
}
}
@@ -1,22 +0,0 @@
@*
LIST SUBPAGES BY LIMIT AND DATETIME
===================================
This snippet shows how easy it is to combine different queries. It lists the children of the currentpage which is
visible and then grabs a specified number of items sorted by the day they're updated.
How it works:
- It uses the Take() method to specify a maximum number of items to output
- It adds a OrderBy() to sort the items. You can even combine this, for instance OrderBy("UpdateDate, Name desc")
NOTE: It is safe to remove this comment (anything between @ * * @), the code that generates the list is only the below!
*@
@inherits umbraco.MacroEngines.DynamicNodeContext
@{ var numberOfItems = 10; }
<ul>
@foreach (var item in @Model.Children.Where("Visible").OrderBy("UpdateDate").Take(numberOfItems))
{
<li><a href="@item.Url">@item.Name</a></li>
}
</ul>
@@ -1,16 +0,0 @@
@*
MACRO PARAMETERS
===================================
This snippet is a very simple example on how to grab values specified via Macro Parameters. Macro Parameters are
'attributes' that can be added to Macros (doesn't make sense when Razor is used inline) that makes it possible to
re-use macros for multiple purposes. When you add a Macro Parameter to a Macro, the user can send different values
to the Macro when it's inserted. Macro Parameters in Razor can be accessed via the Parameter property.
How it works:
- In this example it'll output the value specified in a Macro Parameter with the alias 'Who'.
NOTE: It is safe to remove this comment (anything between @ * * @), the code that generates the list is only the below!
*@
<h3>Hello @Parameter.Who</h3>
@@ -1,34 +0,0 @@
@*
USING MEDIA
=================================
This snippet shows two ways of working with referenced media. Media is referenced from a page using a property with
the type of 'MediaPicker' (or similar for instance MultiNodePicker in uComponents).
How it works:
- First we check that there's a property on the current page called 'relatedMedia' and that it has a selected value
- In the first example we simply needs the path of the media which is stored in the property 'umbracoFile' and the
media is referenced in the property with the alias of 'relatedMedia'. One line is all it takes!
- In the second example we store the referenced media in a variable as we'd like to get not just the path but also
the name of the media for the friendly alt attribute.
NOTE: It is safe to remove this comment (anything between @ * * @), the code that generates the list is only the below!
*@
@inherits umbraco.MacroEngines.DynamicNodeContext
@if (Model.HasProperty("relatedMedia") && Model.RelatedMedia != 0) {
<p>Simple: <br />
<img src='@Model.Media("relatedMedia", "umbracoFile")' />
</p>
<p>Advanced: <br />
@{
var image = @Model.Media("relatedMedia");
}
<img src='@image.UmbracoFile' alt='@image.Name' />
</p>
} else {
<p>
This page doesn't contain a MediaPicker property with the alias of 'RelatedMedia'
or No image is selected on this page
</p>
}
@@ -0,0 +1,25 @@
@inherits umbraco.MacroEngines.DynamicNodeContext
@*
Macro to list nodes from a Multinode tree picker, using the pickers default settings.
Content Values stored as xml.
To get it working with any site's data structure, simply set the selection equal to the property which has the
multinode treepicker.
*@
@{
var selection = Model.PropertyWithPicker;
}
@* Lists each selected value from the picker as a link *@
<ul>
@foreach(var id in selection){
@*For each link, get the node, and display its name and url*@
var node = Library.NodeById(id.InnerText);
<li><a href="@node.Url">@node.Name</a></li>
}
</ul>
@@ -1,36 +1,20 @@
@inherits umbraco.MacroEngines.DynamicNodeContext
@*
NAVIGATION BY LEVEL
=================================
This snippet makes it easy to do navigation based lists! It'll automatically list all children of a page with a certain
level in the hierarchy that's published and visible (it'll filter out any pages with a property named "umbracoNaviHide"
that's set to 'true'.
How to Customize for re-use (only applies to Macros, not if you insert this snippet directly in a template):
- If you add a Macro Parameter with the alias of "Level" you can use this macro for both level 1 and level 2 navigations
- If you add a Macro Parameter with the alias of "ulClass" you can specify different css classes for the <UL/> element
How it works:
- The first two lines (var level... and var ulClass) assigns default values if none is specified via Macro Parameters
- Then it finds the correct parent based on the level and assigns it to the 'parent' variable.
- Then it runs through all the visible children in the foreach loop and outputs a list item
- Inside the list item it checks if the page added to the list is a parent of the current page. Then it marks it 'selected'
NOTE: It is safe to remove this comment (anything between @ * * @), the code that generates the list is only the below!
Macro to display child pages below the root page of a standard website.
Also highlights the current active page/section in the navigation with
the css class "current".
*@
@inherits umbraco.MacroEngines.DynamicNodeContext
@{
var level = String.IsNullOrEmpty(Parameter.Level) ? 1 : int.Parse(Parameter.Level);
var ulClass = String.IsNullOrEmpty(Parameter.UlClass) ? "" : String.Format(" class=\"{0}\"", Parameter.UlClass);
var parent = @Model.AncestorOrSelf(level);
if (parent != null) {
<ul@Html.Raw(ulClass)>
@foreach (var item in parent.Children.Where("Visible")) {
var selected = Array.IndexOf(Model.Path.Split(','), item.Id.ToString()) >= 0 ? " class=\"selected\"" : "";
<li@Html.Raw(selected)>
<a href="@item.Url">@item.Name</a>
</li>
@*Get the root of the website *@
var root = Model.AncestorOrSelf(1);
}
<ul>
@foreach (var page in root.Children.Where("Visible"))
{
<li class="@page.IsAncestorOrSelf(Model, "current", "")""><a href="@page.Url">@page.Name</a></li>
}
</ul>
}
}
@@ -1,83 +0,0 @@
@*
HOW TO DO PAGING
=================================
This an example of how to do paging of content including a Google style page navigation. You likely want to
modify the query (first line, assigned to the 'pagesToList' variable) and the output made within the foreach
loop (<li> ... </li>)
How to Customize for re-use (only applies to Macros, not if you insert this snippet directly in a template):
- You can customize the number of items per page by adding a Macro Parameter with the alias of "ItemsPerPage"
- You can customize the labels of previous/next by adding Macro Parameters with the alias of "PreviousLabel" and
"NextLabel"
How it works:
- The pages to display is added to the variable 'pagesToList'. To change what pages to list, simply update the query
- The next part assigns the number of items and the previous/next labels using either default values or Macro Parameters
- Then it's using a bit of math to calculate how many pages and what should currently be displayed
- In the first <p /> element, a summary is printed. This could likely be removed
- In the <ul /> the magic happens. Notice how it's using Skip() and Take() to jump to the relevant items and iterate
over the number of items to display
- In the end it added a Google style page navigation (<<Previous 1 2 3 4 Next >>)
NOTE: It is safe to remove this comment (anything between @ * * @), the code that generates the list is only the below!
*@
@inherits umbraco.MacroEngines.DynamicNodeContext
@{
var pagesToList = @Model.Children;
// configuration
var itemsPerPage = String.IsNullOrEmpty(Parameter.ItemsPerPage) ? 3 : int.Parse(Parameter.ItemsPerPage);
var previousLabel = String.IsNullOrEmpty(Parameter.PreviousLabel) ? "Previous" : Parameter.PreviousLabel;
var nextLabel = String.IsNullOrEmpty(Parameter.NextLabel) ? "Next" : Parameter.NextLabel;
// paging calculations
var numberOfItems = pagesToList.Count();
int currentPage = 1;
if (!int.TryParse(HttpContext.Current.Request.QueryString["Page"], out currentPage)) {
currentPage = 1;
}
currentPage--;
var numberOfPages = numberOfItems % itemsPerPage == 0 ? Math.Ceiling((decimal)(numberOfItems / itemsPerPage)) : Math.Ceiling((decimal)(numberOfItems / itemsPerPage))+1;
<p>
Total Items: @numberOfItems <br />
Items per Page: @itemsPerPage<br />
Pages: @numberOfPages;<br />
Current Page: @(currentPage)
</p>
<ul>
@foreach(var item in pagesToList.Skip(currentPage*itemsPerPage).Take(itemsPerPage))
{
<li>@item.Name</li>
}
</ul>
<p class="pagingPages">
@{
// Google style paging links
if (currentPage > 0) {
<a href="?page=@(currentPage)">&laquo; @previousLabel</a>
} else {
<span class="pagingDisabled">&laquo; @previousLabel</span>
}
var Pages = Enumerable.Range(1, (int)numberOfPages);
foreach(var number in Pages) {
if (number-1 != currentPage) {
<a href="?page=@number">@number</a>
} else {
@number
}
@Html.Raw("&nbsp&nbsp");
}
if (currentPage < Pages.Count()-1) {
<a href="?page=@(currentPage+2)">@nextLabel &raquo;</a>
} else {
<span class="pagingDisabled">@nextLabel &raquo;</span>
}
}
</p>
}
@@ -1,16 +0,0 @@
@*
LIST CHILDREN BY TYPE
=================================
This snippet shows how simple it is to fetch only children of a certain Document Type using Razor. Instead of
calling .Children, simply call .AliasOfDocumentType (even works in plural for readability)!
For instance .Textpage or .Textpages (you can find the alias of your Document Type by editing it in the
Settings section).
NOTE: It is safe to remove this comment (anything between @ * * @), the code that generates the list is only the below!
*@
<ul>
@foreach (var item in @Model.Textpages.Where("Visible"))
{
<li><a href="@item.Url">@item.Name</a></li>
}
</ul>
@@ -1,44 +1,38 @@
@*
SITEMAP
=================================
This snippet generates a complete sitemap of all pages that are published and visible (it'll filter out any
pages with a property named "umbracoNaviHide" that's set to 'true'). It's also a great example on how to make
helper methods in Razor and how to pass values to your '.Where' filters.
How to Customize for re-use (only applies to Macros, not if you insert this snippet directly in a template):
- If you add a Macro Parameter with the alias of "MaxLevelForSitemap" which specifies how deep in the hierarchy to traverse
How it works:
- The first line (var maxLevelForSitemap) assigns default values if none is specified via Macro Parameters
- Next is a helper method 'traverse' which uses recursion to keep making new lists for each level in the sitemap
- Inside the the 'traverse' method there's an example of using a 'Dictionary' to pass the 'maxLevelForSitemap' to
the .Where filter
- Finally the 'traverse' method is called taking the very top node of the website by calling AncesterOrSelf()
NOTE: It is safe to remove this comment (anything between @ * * @), the code that generates the list is only the below!
*@
@inherits umbraco.MacroEngines.DynamicNodeContext
@{
@* Walk up the tree from the current page to get the root node *@
var rootNode = Model.AncestorOrself(1);
}
@*Render the sitemap by passing the root node to the traverse helper*@
<div class="sitemap">
@traverse(@Model.AncestorOrSelf())
</div>
@*Helper method to travers through all descendants*@
@helper traverse(dynamic node){
@*If a MaxLevelForSitemap parameter is passed to the macro, otherwise default to 4 levels*@
var maxLevelForSitemap = String.IsNullOrEmpty(Parameter.MaxLevelForSitemap) ? 4 : int.Parse(Parameter.MaxLevelForSitemap);
var values = new Dictionary<string,object>();
values.Add("maxLevelForSitemap", maxLevelForSitemap) ;
@*Select visible children *@
var items = node.Children.Where("Visible").Where("Level <= " + maxLevelForSitemap);
var items = node.Children.Where("Visible").Where("Level <= maxLevelForSitemap", values);
if (items.Count() > 0) {
@*If any items are returned, render a list *@
if (items.Any()) {
<ul>
@foreach (var item in items) {
<li>
<li class="level-@item.Level">
<a href="@item.Url">@item.Name</a>
@*Run the traverse helper again *@
@traverse(item)
</li>
}
</ul>
}
}
<div class="sitemap">
@traverse(@Model.AncestorOrSelf())
</div>
}
@@ -0,0 +1,217 @@
@inherits umbraco.MacroEngines.DynamicNodeContext
@{
@*
Macro Parameters To Create
Show:True Alias:twitterUsername Name:Twitter Username Type:Textstring Defaults to: umbraco
Show:True Alias:includeRTs Name:Include Retweets Type:Textstring Defaults to: false
Show:True Alias:excludeReplies Name:Exclude Replies Type:Textstring Defaults to: false
Show:True Alias:noTweets Name:Number of Tweets Type:Integer Defaults to: 1
*@
var twitterUsername = String.IsNullOrEmpty(Parameter.twitterUsername) ? "umbraco" : Parameter.twitterUsername;
var includeRTs = String.IsNullOrEmpty(Parameter.includeRTs) ? false : Parameter.includeRTs;
var excludeReplies = String.IsNullOrEmpty(Parameter.excludeReplies) ? false : Parameter.excludeReplies;
var noTweets = String.IsNullOrEmpty(Parameter.noTweets) ? 1 : Parameter.noTweets;
@* Twitter JSON URL *@
var twitterURL = string.Format(
"https://api.twitter.com/1/statuses/user_timeline.json?screen_name={0}&include_rts={1}&exclude_replies={2}&include_entities=1&count={3}",
twitterUsername,
includeRTs,
excludeReplies,
noTweets);
}
@* Fetch the JSON from Twitters API *@
@using (var client = new System.Net.WebClient())
{
@* Fetch the JSON from Twitter *@
var response = client.DownloadString(new Uri(twitterURL));
@* Decode the JSON so we can interate over it *@
var tweets = Json.Decode(response);
<ul>
@foreach (var tweet in tweets)
{
<li>
@* Tweet with formatted links *@
<h3>@formatLinks(tweet.text, tweet.entities)</h3>
<p>
@* Format Tweet Date and ouput as 24/03/12 @14:05 *@
<em>@formatDate(tweet.created_at).ToString("dd/MM/yy @ HH:mm")</em>
</p>
<p>
@* Profile Image *@
<img src="@tweet.user.profile_image_url" alt="@tweet.user.Name" />
@* Your real name (not profile name) *@
<strong>@tweet.user.name</strong>
</p>
@* Google Map (if tweet has geo info) *@
@if (tweet.geo != null)
{
@Html.Raw(displayMap(tweet.geo));
}
@* Dislay Image (if tweet has image attached *@
@if (tweet.entities.media != null)
{
<a href="@tweet.entities.media[0].media_url" target="_blank">
<img src="@tweet.entities.media[0].media_url:thumb" />
</a>
}
</li>
}
</ul>
}
@functions
{
DateTime formatDate(string twitterDate)
{
//Example tweet date
//Fri Mar 02 16:09:35 +0000 2012
//ddd MMM dd HH:mm:ss zz00 yyyy
DateTime tweetDate = DateTime.ParseExact(twitterDate, "ddd MMM dd HH:mm:ss zz00 yyyy", null);
return tweetDate;
}
String displayMap(dynamic geo)
{
//Get the lat & long values
var tweetLat = geo.coordinates[0];
var tweetLong = geo.coordinates[1];
//Format the string to return the image
var googleMap = string.Format("http://maps.googleapis.com/maps/api/staticmap?center={0},{1}&zoom=14&size=250x250&maptype=roadmap&sensor=false&markers={0}, {1}", tweetLat, tweetLong);
var mapImage = string.Format("<img src='{0}' alt='map' />", googleMap);
return mapImage;
}
IHtmlString formatLinks(string tweet, dynamic entities)
{
//A List of tweet entities so we can sort all of them
IList<tweetEntity> tweetEntities = new List<tweetEntity>();
//Get URLs
var links = entities.urls;
//Check we have links to loop over
if (links != null)
{
//For each link in the collection of links
foreach (var link in links)
{
var startPosition = link.indices[0];
var endPosition = link.indices[1];
var length = endPosition - startPosition;
var url = link.url; //The short t.co link
var displayURL = link.display_url; //A friendly version of the full link (may be truncated)
var newText = string.Format("<a href='{0}' target='_blank'>{1}</a>", url, displayURL);
var oldText = tweet.Substring(startPosition, length);
//Create a new entity
tweetEntity entity = new tweetEntity();
entity.startPosition = startPosition;
entity.endPosition = endPosition;
entity.newText = newText;
entity.oldText = oldText;
//Add it to the collection
tweetEntities.Add(entity);
}
}
//Get user mentions (@umbraco)
var mentions = entities.user_mentions;
//Check we have mentions to loop over
if (mentions != null)
{
//For each mention in the collection of mentions
foreach (var mention in mentions)
{
var startPosition = mention.indices[0];
var endPosition = mention.indices[1];
var length = endPosition - startPosition;
var username = mention.screen_name;
var newText = string.Format("<a href='http://twitter.com/{0}' target='_blank'>@{0}</a>", username);
var oldText = tweet.Substring(startPosition, length);
//Create a new entity
tweetEntity entity = new tweetEntity();
entity.startPosition = startPosition;
entity.endPosition = endPosition;
entity.newText = newText;
entity.oldText = oldText;
//Add to collection
tweetEntities.Add(entity);
}
}
//Get hashtags
var hashtags = entities.hashtags;
//Check we have hash to loop over
if (hashtags != null)
{
foreach (var hash in hashtags)
{
var startPosition = hash.indices[0];
var endPosition = hash.indices[1];
var length = endPosition - startPosition;
var hashtag = hash.text;
var newText = string.Format("<a href='http://twitter.com/search/%23{0}' target='_blank'>#{0}</a>", hashtag);
var oldText = tweet.Substring(startPosition, length);
//Create a new entity
tweetEntity entity = new tweetEntity();
entity.startPosition = startPosition;
entity.endPosition = endPosition;
entity.newText = newText;
entity.oldText = oldText;
//Add to collection
tweetEntities.Add(entity);
}
}
//For each item in the tweet entities in reverse order
//If we update the string in reverse order the remaining start/end indexs will still be correct
foreach (var item in tweetEntities.OrderByDescending(x => x.startPosition))
{
//Lets update the tweet text
tweet = tweet.Replace(item.oldText, item.newText);
}
//Return the new tweet with all the links added in
return Html.Raw(tweet);
}
public class tweetEntity
{
public int startPosition { get; set; }
public int endPosition { get; set; }
public string oldText { get; set; }
public string newText { get; set; }
}
}
@@ -1,37 +0,0 @@
@*
USING RELATED LINKS (AND OTHER XML BASED TYPES
==============================================
This snippet shows how to work with properties that stores multiple values in XML such as the "Related Links" data type.
When the Razor (or in fact the 'DynamicNode') detected XML, it automatically makes it possible to navigate the xml by
using the name of the XML elements as properties. Be aware that the first xml element (the container) is always skipped
and that the properties are case sensitive!
How it works:
- First we check if there's a property on the current page (Model) named 'relatedLinks'
- Then we loop through the XML elements of the property 'RelatedLinks' (ie. all the links)
- For each link we check if it should be opened in a new window (stored in an XML attribute called 'newwindow' which is
automatically translated into a property '.newwindow' by DynamicNode
- Then we test if the link type is a internal or external link, and if it's an internal link we use the NiceUrl helper
method to convert the id of the page to a SEO friendly url
NOTE: It is safe to remove this comment (anything between @ * * @), the code that generates the list is only the below!
*@
@inherits umbraco.MacroEngines.DynamicNodeContext
@{
if (Model.HasProperty("relatedLinks")) {
<ul>
@foreach (var link in @Model.RelatedLinks) {
string target = link.newwindow == "1" ? " target=\"_blank\"" : "";
<li>
@if (link.type == "internal") {
<a href="@umbraco.library.NiceUrl(int.Parse(link.link))"@Html.Raw(target)>@link.title</a>
} else {
<a href="@link.link"@Html.Raw(target)>@link.title</a>
}
</li>
}
</ul>
}
}
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
tinyMCE.addI18n('en_us.advhr_dlg',{size:"Height",noshade:"No Shadow",width:"Width",normal:"Normal",widthunits:"Units"});
@@ -0,0 +1 @@
tinyMCE.addI18n('en_us.advimage_dlg',{"image_list":"Image List","align_right":"Right","align_left":"Left","align_textbottom":"Text Bottom","align_texttop":"Text Top","align_bottom":"Bottom","align_middle":"Middle","align_top":"Top","align_baseline":"Baseline",align:"Alignment",hspace:"Horizontal Space",vspace:"Vertical Space",dimensions:"Dimensions",border:"Border",list:"Image List",alt:"Image Description",src:"Image URL","dialog_title":"Insert/Edit Image","missing_alt":"Are you sure you want to continue without including an Image Description? Without it the image may not be accessible to some users with disabilities, or to those using a text browser, or browsing the Web with images turned off.","example_img":"Appearance Preview Image",misc:"Miscellaneous",mouseout:"For Mouse Out",mouseover:"For Mouse Over","alt_image":"Alternative Image","swap_image":"Swap Image",map:"Image Map",id:"ID",rtl:"Right to Left",ltr:"Left to Right",classes:"Classes",style:"Style","long_desc":"Long Description Link",langcode:"Language Code",langdir:"Language Direction","constrain_proportions":"Constrain Proportions",preview:"Preview",title:"Title",general:"General","tab_advanced":"Advanced","tab_appearance":"Appearance","tab_general":"General",width:"Width",height:"Height"});
@@ -0,0 +1 @@
tinyMCE.addI18n('en_us.advlink_dlg',{"target_name":"Target Name",classes:"Classes",style:"Style",id:"ID","popup_position":"Position (X/Y)",langdir:"Language Direction","popup_size":"Size","popup_dependent":"Dependent (Mozilla/Firefox Only)","popup_resizable":"Make Window Resizable","popup_location":"Show Location Bar","popup_menubar":"Show Menu Bar","popup_toolbar":"Show Toolbars","popup_statusbar":"Show Status Bar","popup_scrollbars":"Show Scrollbars","popup_return":"Insert \'return false\'","popup_name":"Window Name","popup_url":"Popup URL",popup:"JavaScript Popup","target_blank":"Open in New Window","target_top":"Open in Top Frame (Replaces All Frames)","target_parent":"Open in Parent Window/Frame","target_same":"Open in This Window/Frame","anchor_names":"Anchors","popup_opts":"Options","advanced_props":"Advanced Properties","event_props":"Events","popup_props":"Popup Properties","general_props":"General Properties","advanced_tab":"Advanced","events_tab":"Events","popup_tab":"Popup","general_tab":"General",list:"Link List","is_external":"The URL you entered seems to be an external link. Do you want to add the required http:// prefix?","is_email":"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?",titlefield:"Title",target:"Target",url:"Link URL",title:"Insert/Edit Link","link_list":"Link List",rtl:"Right to Left",ltr:"Left to Right",accesskey:"AccessKey",tabindex:"TabIndex",rev:"Relationship Target to Page",rel:"Relationship Page to Target",mime:"Target MIME Type",encoding:"Target Character Encoding",langcode:"Language Code","target_langcode":"Target Language",width:"Width",height:"Height"});
@@ -0,0 +1,4 @@
tinyMCE.addI18n('en_us.autosave',{
restore_content: "Restore auto-saved content",
warning_message: "If you restore the saved content, you will lose all the content that is currently in the editor.\n\nAre you sure you want to restore the saved content?"
});
@@ -0,0 +1 @@
tinyMCE.addI18n('en_us.emotions_dlg',{cry:"Cry",cool:"Cool",desc:"Emotions",title:"Insert Emotion",usage:"Use left and right arrows to navigate.",yell:"Yell",wink:"Wink",undecided:"Undecided","tongue_out":"Tongue Out",surprised:"Surprised",smile:"Smile",sealed:"Sealed","money_mouth":"Money Mouth",laughing:"Laughing",kiss:"Kiss",innocent:"Innocent",frown:"Frown","foot_in_mouth":"Foot in Mouth",embarassed:"Embarassed"});
@@ -0,0 +1 @@
tinyMCE.addI18n('en_us.fullpage_dlg',{title:"Document Properties","meta_tab":"General","appearance_tab":"Appearance","advanced_tab":"Advanced","meta_props":"Meta Information",langprops:"Language and Encoding","meta_title":"Title","meta_keywords":"Keywords","meta_description":"Description","meta_robots":"Robots",doctypes:"Doctype",langcode:"Language Code",langdir:"Language Direction",ltr:"Left to Right",rtl:"Right to Left","xml_pi":"XML Declaration",encoding:"Character Encoding","appearance_bgprops":"Background Properties","appearance_marginprops":"Body Margins","appearance_linkprops":"Link Colors","appearance_textprops":"Text Properties",bgcolor:"Background Color",bgimage:"Background Image","left_margin":"Left Margin","right_margin":"Right Margin","top_margin":"Top Margin","bottom_margin":"Bottom Margin","text_color":"Text Color","font_size":"Font Size","font_face":"Font Face","link_color":"Link Color","hover_color":"Hover Color","visited_color":"Visited Color","active_color":"Active Color",textcolor:"Color",fontsize:"Font Size",fontface:"Font Family","meta_index_follow":"Index and Follow the Links","meta_index_nofollow":"Index and Don\'t Follow the Links","meta_noindex_follow":"Do Not Index but Follow the Links","meta_noindex_nofollow":"Do Not Index and Don\'t Follow the Links","appearance_style":"Stylesheet and Style Properties",stylesheet:"Stylesheet",style:"Style",author:"Author",copyright:"Copyright",add:"Add New Element",remove:"Remove Selected Element",moveup:"Move Selected Element Up",movedown:"Move Selected Element Down","head_elements":"Head Elements",info:"Information","add_title":"Title Element","add_meta":"Meta Element","add_script":"Script Element","add_style":"Style Element","add_link":"Link Element","add_base":"Base Element","add_comment":"Comment Node","title_element":"Title Element","script_element":"Script Element","style_element":"Style Element","base_element":"Base Element","link_element":"Link Element","meta_element":"Meta Element","comment_element":"Comment",src:"Source",language:"Language",href:"HREF",target:"Target",type:"Type",charset:"Charset",defer:"Defer",media:"Media",properties:"Properties",name:"Name",value:"Value",content:"Content",rel:"Rel",rev:"Rev",hreflang:"HREF Lang","general_props":"General","advanced_props":"Advanced"});
@@ -0,0 +1 @@
tinyMCE.addI18n('en_us.media_dlg',{list:"List",file:"File/URL",advanced:"Advanced",general:"General",title:"Insert/Edit Embedded Media","align_top_left":"Top Left","align_center":"Center","align_left":"Left","align_bottom":"Bottom","align_right":"Right","align_top":"Top","qt_stream_warn":"Streamed RTSP resources should be added to the QT Source field under the Advanced tab.\nYou should also add a non-streamed version to the Source field.",qtsrc:"QT Source",progress:"Progress",sound:"Sound",swstretchvalign:"Stretch V-Align",swstretchhalign:"Stretch H-Align",swstretchstyle:"Stretch Style",scriptcallbacks:"Script Callbacks","align_top_right":"Top Right",uimode:"UI Mode",rate:"Rate",playcount:"Play Count",defaultframe:"Default Frame",currentposition:"Current Position",currentmarker:"Current Marker",captioningid:"Captioning ID",baseurl:"Base URL",balance:"Balance",windowlessvideo:"Windowless Video",stretchtofit:"Stretch to Fit",mute:"Mute",invokeurls:"Invoke URLs",fullscreen:"Full Screen",enabled:"Enabled",autostart:"Auto Start",volume:"Volume",target:"Target",qtsrcchokespeed:"Choke Speed",href:"HREF",endtime:"End Time",starttime:"Start Time",enablejavascript:"Enable JavaScript",correction:"No Correction",targetcache:"Target Cache",playeveryframe:"Play Every Frame",kioskmode:"Kiosk Mode",controller:"Controller",menu:"Show Menu",loop:"Loop",play:"Auto Play",hspace:"H-Space",vspace:"V-Space","class_name":"Class",name:"Name",id:"ID",type:"Type",size:"Dimensions",preview:"Preview","constrain_proportions":"Constrain Proportions",controls:"Controls",numloop:"Num Loops",console:"Console",cache:"Cache",autohref:"Auto HREF",liveconnect:"SWLiveConnect",flashvars:"Flash Vars",base:"Base",bgcolor:"Background",wmode:"WMode",salign:"SAlign",align:"Align",scale:"Scale",quality:"Quality",shuffle:"Shuffle",prefetch:"Prefetch",nojava:"No Java",maintainaspect:"Maintain Aspect",imagestatus:"Image Status",center:"Center",autogotourl:"Auto Goto URL","shockwave_options":"Shockwave Options","rmp_options":"Real Media Player Options","wmp_options":"Windows Media Player Options","qt_options":"QuickTime Options","flash_options":"Flash Options",hidden:"Hidden","align_bottom_left":"Bottom Left","align_bottom_right":"Bottom Right","html5_video_options":"HTML5 Video Options",altsource1:"Alternative source 1",altsource2:"Alternative source 2",preload:"Preload",poster:"Poster",source:"Source","html5_audio_options":"Audio Options","preload_none":"Don\'t Preload","preload_metadata":"Preload video metadata","preload_auto":"Let user\'s browser decide", "embedded_audio_options":"Embedded Audio Options", video:"HTML5 Video", audio:"HTML5 Audio", flash:"Flash", quicktime:"QuickTime", shockwave:"Shockwave", windowsmedia:"Windows Media", realmedia:"Real Media", iframe:"Iframe", embeddedaudio:"Embedded Audio" });
@@ -0,0 +1 @@
tinyMCE.addI18n('fi.media_dlg',{list:"Lista",file:"Tiedosto/URL",advanced:"Edistyneet",general:"Yleiset",title:"Lis\u00e4\u00e4/muokkaa upotettua mediaa","align_top_left":"Yl\u00e4-vasemmalla","align_center":"Keskell\u00e4","align_left":"Vasemmalla","align_bottom":"Alhaalla","align_right":"Oikealla","align_top":"Ylh\u00e4\u00e4ll\u00e4","qt_stream_warn":"Streamatut rtsp-resurssit tulisi lis\u00e4t\u00e4 QT Src -kentt\u00e4\u00e4n edistynyt-v\u00e4lilehdelle.\nSinun kannattaa lis\u00e4t\u00e4 my\u00f6s ei-streamattu versio Src-kentt\u00e4\u00e4n.",qtsrc:"QT Src",progress:"Eteneminen",sound:"\u00c4\u00e4ni",swstretchvalign:"Venyt\u00e4 pystysuunnassa",swstretchhalign:"Venyt\u00e4 vaakasuunnassa",swstretchstyle:"Venytystyyli",scriptcallbacks:"Skriptin takaisinkutsut","align_top_right":"Yl\u00e4-oikealla",uimode:"UI-moodi",rate:"Rate",playcount:"Toistolaskin",defaultframe:"Oletusruutu",currentposition:"T\u00e4m\u00e4nhetkinen sijainti",currentmarker:"T\u00e4m\u00e4nhetkinen merkki",captioningid:"Otsikointi-id",baseurl:"Perus URL-osoitteet",balance:"Tasapaino",windowlessvideo:"Ikkunaton video",stretchtofit:"Venyt\u00e4 sopimaan",mute:"Hiljennys",invokeurls:"Kutsu URL-osoitteet",fullscreen:"Kokoruutu",enabled:"P\u00e4\u00e4ll\u00e4",autostart:"Automaattinen aloitus",volume:"\u00c4\u00e4nen voimakkuus",target:"Kohde",qtsrcchokespeed:"Choke-nopeus",href:"Href",endtime:"Lopetusaika",starttime:"Aloitusaika",enablejavascript:"Salli JavaScript",correction:"Ei korjausta",targetcache:"Kohteen v\u00e4limuisti",playeveryframe:"Toista jokainen ruutu",kioskmode:"Kioskitila",controller:"Ohjain",menu:"N\u00e4yt\u00e4 valikko",loop:"Silmukka",play:"Automaattinen toisto",hspace:"Vaakatason tila",vspace:"Pystytason tila","class_name":"Luokka",name:"Nimi",id:"Tunniste",type:"Tyyppi",size:"Mitat",preview:"Esikatselu","constrain_proportions":"S\u00e4ilyt\u00e4 mittasuhteet",controls:"Kontrollit",numloop:"Toistojen m\u00e4\u00e4r\u00e4",console:"Konsoli",cache:"V\u00e4limuisti",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"Flash-muuttujat",base:"Perusta",bgcolor:"Tausta",wmode:"WMode",salign:"SAlign",align:"Tasaus",scale:"Skaala",quality:"Laatu",shuffle:"Sekoita",prefetch:"Esinouda",nojava:"Ei Javaa",maintainaspect:"S\u00e4ilyt\u00e4 kuvasuhde",imagestatus:"Kuvan tila",center:"Keskit\u00e4",autogotourl:"Mene automaattisesti URL:iin","shockwave_options":"Shockwaven asetukset","rmp_options":"Real media playerin asetukset","wmp_options":"Windows media playerin asetukset","qt_options":"Quicktimen asetukset","flash_options":"Flashin asetukset",hidden:"Piilotettu","align_bottom_left":"Ala-vasemmalla","align_bottom_right":"Ala-oikealla",flash:"flash",quicktime:"quicktime","embedded_audio_options":"Upotetun \u00e4\u00e4nen asetukset",windowsmedia:"windowsmedia",realmedia:"realmedia",shockwave:"shockwave",audio:"audio",video:"video","html5_video_options":"HTML5 videoasetukset",altsource1:"Vaihtoehtoinen l\u00e4hde 1",altsource2:"Vaihtoehtoinen l\u00e4hde 2",preload:"Esilataa",poster:"Posteri",source:"L\u00e4hde","html5_audio_options":"\u00c4\u00e4niasetukset","preload_none":"\u00c4l\u00e4 esilataa","preload_metadata":"Esilataa videon metatiedot","preload_auto":"Anna k\u00e4ytt\u00e4j\u00e4n selaimen p\u00e4\u00e4tt\u00e4\u00e4",iframe:"iframe",embeddedaudio:"upotettu audio"});
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
tinyMCE.addI18n('pl.media_dlg',{list:"Lista",file:"Plik/URL",advanced:"Zaawansowane",general:"G\u0142\u00f3wne",title:"Wstaw/Edytuj wbudowane media","align_top_left":"G\u00f3rny lewy","align_center":"\u015arodek","align_left":"Lewo","align_bottom":"D\u00f3\u0142","align_right":"Prawo","align_top":"G\u00f3ra","qt_stream_warn":"Emitowane \u017ar\u00f3d\u0142a rtsp powinny by\u0107 dodane do pola QT Src w zak\u0142adce zaawansowane.nPowiniene\u015b r\u00f3wnie\u017c doda\u0107 niestrumieniow\u0105 wersj\u0119 do pola Src.",qtsrc:"QT Src",progress:"Post\u0119p",sound:"D\u017awi\u0119k",swstretchvalign:"Wyr\u00f3wnaj w pionie",swstretchhalign:"Wyr\u00f3wnaj w poziomie",swstretchstyle:"Styl rozci\u0105gania",scriptcallbacks:"Funkcje zwrotne skryptu","align_top_right":"G\u00f3rny prawy",uimode:"Tryb UI",rate:"Tempo",playcount:"Ilo\u015b\u0107 odtworze\u0144",defaultframe:"Domy\u015blna ramka",currentposition:"Aktualna pozycja",currentmarker:"Aktualny znacznik",captioningid:"Captioning id",baseurl:"Base URL",balance:"Balans",windowlessvideo:"Wideo bez okienka",stretchtofit:"Rozci\u0105gnij aby dopasowa\u0107",mute:"Wycisz",invokeurls:"Odwo\u0142aj si\u0119 do URLi",fullscreen:"Pe\u0142ny ekran",enabled:"Aktywny",autostart:"Auto start",volume:"G\u0142o\u015bno\u015b\u0107",target:"Cel",qtsrcchokespeed:"Choke speed",href:"Href",endtime:"Ko\u0144cowy czas",starttime:"Pocz\u0105tkowy czas",enablejavascript:"W\u0142\u0105cz JavaScript",correction:"Bez korekcji",targetcache:"Target cache",playeveryframe:"Odtwarzaj ka\u017cd\u0105 ramk\u0119",kioskmode:"Tryb kiosku",controller:"Kontroler",menu:"Poka\u017c menu",loop:"Zap\u0119tlenie",play:"Autoodtwarzanie",hspace:"H-Space",vspace:"V-Space","class_name":"Klasa",name:"Nazwa",id:"Id",type:"Typ",size:"Wymiary",preview:"Podgl\u0105d","constrain_proportions":"Zachowaj proporcje",controls:"Controls",numloop:"Liczba powt\u00f3rze\u0144",console:"Konsola",cache:"Cache",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"Flashvars",base:"Baza",bgcolor:"T\u0142o",wmode:"WMode",salign:"SAlign",align:"Wyr\u00f3wnaj",scale:"Skala",quality:"Jako\u015b\u0107",shuffle:"Losuj",prefetch:"Prze\u0142aduj",nojava:"Bez javy",maintainaspect:"Utrzymaj aspekt",imagestatus:"Obraz statusu",center:"Wy\u015brodkuj",autogotourl:"Automatycznie przejd\u017a pod adres","shockwave_options":"Opcje Shockwave","rmp_options":"Opcje Real media player","wmp_options":"Opcje Windows media player","qt_options":"Opcje Quicktime","flash_options":"Opcje flasha",hidden:"Ukryty","align_bottom_left":"Dolny lewy","align_bottom_right":"Dolny prawy",flash:"flash",quicktime:"quicktime","embedded_audio_options":"Opcje Embedded Audio",windowsmedia:"windowsmedia",realmedia:"realmedia",shockwave:"shockwave",audio:"audio",video:"video","html5_video_options":"Opcje HTML5 Video",altsource1:"Alternatywne \u017ar\u00f3d\u0142o 1",altsource2:"Alternatywne \u017ar\u00f3d\u0142o 2",preload:"Prze\u0142aduj",poster:"Obraz",source:"\u0179r\u00f3d\u0142o","html5_audio_options":"Opcje audio","preload_none":"Nie \u0142\u0105duj wst\u0119pnie","preload_metadata":"\u0141aduj wst\u0119pnie metadane video","preload_auto":"Pozw\u00f3l zdecydowa\u0107 przegl\u0105darce u\u017cytkownika",iframe:"iframe",embeddedaudio:"embeddedaudio"});
@@ -0,0 +1 @@
tinyMCE.addI18n('pt.media_dlg',{list:"Lista",file:"Arquivo/URL",advanced:"Avan\u00e7ado",general:"Geral",title:"Inserir/Editar m\u00eddia embutida","align_top_left":"Topo esquerda","align_center":"Centro","align_left":"Esquerda","align_bottom":"Abaixo","align_right":"Direita","align_top":"Topo","qt_stream_warn":"Fluxos de recursos RTSP devem ser acrescentados ao campo QT Src no Modo Avan\u00e7ado.\nUma vers\u00e3o sem fluxo tamb\u00e9m deve ser acrescentada ao campo Src.",qtsrc:"QT Src",progress:"Progresso",sound:"Som",swstretchvalign:"For\u00e7ar V-Alinhamento",swstretchhalign:"For\u00e7ar H-Alinhamento",swstretchstyle:"For\u00e7ar Estilo",scriptcallbacks:"Retornos de chamada de script","align_top_right":"Topo direita",uimode:"Modo UI",rate:"Taxa",playcount:"Contagem de ouvintes",defaultframe:"Frame padr\u00e3o",currentposition:"Posi\u00e7\u00e3o atual",currentmarker:"Marcador atual",captioningid:"Id de legenda",baseurl:"URL Base",balance:"Stereo",windowlessvideo:"V\u00eddeo sem janela",stretchtofit:"Estender",mute:"Mudo",invokeurls:"Chamar URLs",fullscreen:"Tela inteira",enabled:"Ativado",autostart:"Execu\u00e7\u00e3o autom\u00e1tica",volume:"Volume",target:"Alvo",qtsrcchokespeed:"Diminuir Velocidade",href:"Link",endtime:"Hora do fim",starttime:"Hora de in\u00edcio",enablejavascript:"Permitir JavaScript",correction:"Sem correc\u00e7\u00f5es",targetcache:"Cache alvo",playeveryframe:"Executar todas as frames",kioskmode:"Modo Kiosk",controller:"Controlador",menu:"Mostrar menu",loop:"Repeti\u00e7\u00e3o autom\u00e1tica",play:"Execu\u00e7\u00e3o autom\u00e1tica",hspace:"Espa\u00e7o horizontal",vspace:"Espa\u00e7o vertical","class_name":"Classe",name:"Nome",id:"ID",type:"Tipo",size:"Dimens\u00f5es",preview:"Previs\u00e3o","constrain_proportions":"Manter propor\u00e7\u00f5es",controls:"Controles",numloop:"Repeti\u00e7\u00f5es",console:"Console",cache:"Cache",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"Flash Vars",base:"Base",bgcolor:"Fundo",wmode:"WMode",salign:"SAlign",align:"Alinhamento",scale:"Escala",quality:"Qualidade",shuffle:"Aleat\u00f3rio",prefetch:"Pr\u00e9-buscar",nojava:"Sem Java",maintainaspect:"Manter aspecto",imagestatus:"Status da imagem",center:"Centro",autogotourl:"Auto abrir URL","shockwave_options":"Op\u00e7\u00f5es Shockwave","rmp_options":"Op\u00e7\u00f5es Real Media Player","wmp_options":"Op\u00e7\u00f5es Windows Media Player","qt_options":"Op\u00e7\u00f5es Quicktime","flash_options":"Op\u00e7\u00f5es Flash",hidden:"Oculto","align_bottom_left":"Abaixo esquerda","align_bottom_right":"Abaixo direita",flash:"flash",quicktime:"quicktime","embedded_audio_options":"Op\u00e7\u00f5es de \u00c1udio Embutido",windowsmedia:"windowsmedia",realmedia:"realmedia",shockwave:"shockware",audio:"\u00e1udio",video:"v\u00eddeo","html5_video_options":"Op\u00e7\u00f5es de v\u00eddeo HTML5",altsource1:"C\u00f3digo alternativo 1",altsource2:"C\u00f3digo alternativo 2",preload:"Pr\u00e9-carregar",poster:"Poster",source:"Fonte","html5_audio_options":"Op\u00e7\u00f5es de Audio","preload_none":"N\u00e3o Pr\u00e9-carregar","preload_metadata":"Pr\u00e9-carregar metadata de v\u00eddeo","preload_auto":"Deixar que navegador do usu\u00e1rio decida",iframe:"iframe",embeddedaudio:"\u00e1udio embutido"});
@@ -0,0 +1 @@
tinyMCE.addI18n('zh-cn.media_dlg',{list:"\u5217\u8868",file:"\u6587\u4ef6/URL",advanced:"\u9ad8\u7ea7",general:"\u666e\u901a",title:"\u63d2\u5165/\u7f16\u8f91 \u5d4c\u5165\u5f0f\u5a92\u4f53","align_top_left":"\u5de6\u4e0a","align_center":"\u5c45\u4e2d","align_left":"\u5c45\u5de6","align_bottom":"\u5c45\u4e0b","align_right":"\u5c45\u53f3","align_top":"\u5c45\u4e0a","qt_stream_warn":"\u6d41\u5a92\u4f53RTSP\u8d44\u6e90\u5e94\u6dfb\u52a0\u5230\u9ad8\u7ea7\u9009\u9879\u7684QT\u8d44\u6e90\u4e2d\u3002n\u540c\u65f6\uff0c\u60a8\u4e5f\u53ef\u4ee5\u5728\u8fd9\u91cc\u52a0\u5165\u4e00\u4e2a\u975e\u6d41\u5a92\u4f53\u3002",qtsrc:"QT\u8d44\u6e90",progress:"\u8fdb\u5ea6",sound:"\u58f0\u97f3",swstretchvalign:"\u5782\u76f4\u62c9\u4f38",swstretchhalign:"\u6c34\u5e73\u62c9\u4f38",swstretchstyle:"\u62c9\u4f38\u65b9\u5f0f",scriptcallbacks:"\u811a\u672c\u56de\u8c03","align_top_right":"\u53f3\u4e0a",uimode:"\u5916\u89c2\u6a21\u5f0f",rate:"\u6bd4\u7387",playcount:"\u64ad\u653e\u6b21\u6570",defaultframe:"\u9ed8\u8ba4\u5e27",currentposition:"\u5f53\u524d\u4f4d\u7f6e",currentmarker:"\u5f53\u524d\u6807\u8bb0",captioningid:"\u5b57\u5e55ID",baseurl:"\u57fa\u7840\u8def\u5f84",balance:"\u5e73\u8861",windowlessvideo:"\u65e0\u8fb9\u6846",stretchtofit:"\u62c9\u4f38\u5230\u9002\u5408",mute:"\u9759\u97f3",invokeurls:"\u5f15\u7528URL",fullscreen:"\u5168\u5c4f",enabled:"\u542f\u7528",autostart:"\u81ea\u52a8\u64ad\u653e",volume:"\u97f3\u91cf",target:"\u76ee\u6807",qtsrcchokespeed:"\u9650\u5236\u901f\u5ea6",href:"\u8d85\u94fe\u63a5",endtime:"\u7ed3\u675f\u65f6\u95f4",starttime:"\u5f00\u59cb\u65f6\u95f4",enablejavascript:"\u542f\u7528JavaScript",correction:"\u65e0\u4fee\u6b63",targetcache:"\u76ee\u6807\u7f13\u5b58",playeveryframe:"\u9010\u5e27\u64ad\u653e",kioskmode:"\u5168\u5c4f\u6a21\u5f0f",controller:"\u63a7\u5236\u53f0",menu:"\u663e\u793a\u83dc\u5355",loop:"\u5faa\u73af",play:"\u81ea\u52a8\u64ad\u653e",hspace:"\u6c34\u5e73\u8ddd\u79bb",vspace:"\u5782\u76f4\u8ddd\u79bb","class_name":"\u7c7b\u522b",name:"\u540d\u79f0",id:"ID",type:"\u7c7b\u578b",size:"\u5c3a\u5bf8",preview:"\u9884\u89c8","constrain_proportions":"\u4fdd\u6301\u6bd4\u4f8b",controls:"\u64ad\u653e\u63a7\u5236",numloop:"\u5faa\u73af\u6b21\u6570",console:"\u63a7\u5236\u53f0",cache:"\u7f13\u5b58",autohref:"\u81ea\u52a8\u8df3\u8f6c",liveconnect:"JavaScript\u5f00\u542f",flashvars:"Flash\u53d8\u91cf",base:"\u57fa\u7840\u8def\u5f84",bgcolor:"\u80cc\u666f",wmode:"\u7a97\u4f53\u6a21\u5f0f",salign:"\u5a92\u4f53\u5bf9\u9f50",align:"\u6587\u672c\u5bf9\u9f50",scale:"\u7f29\u653e",quality:"\u753b\u8d28",shuffle:"\u968f\u673a",prefetch:"\u9884\u52a0\u8f7d",nojava:"\u65e0java",maintainaspect:"\u4fdd\u6301\u5916\u89c2",imagestatus:"\u56fe\u7247\u72b6\u6001",center:"\u5c45\u4e2d",autogotourl:"\u81ea\u52a8\u8f6c\u5230URL","shockwave_options":"Shockwave\u9009\u9879","rmp_options":"Real media player\u9009\u9879","wmp_options":"Windows media player\u9009\u9879","qt_options":"Quicktime\u9009\u9879","flash_options":"Flash\u9009\u9879",hidden:"\u9690\u85cf","align_bottom_left":"\u5de6\u4e0b","align_bottom_right":"\u53f3\u4e0b","html5_video_options":"HTML5\u89c6\u9891\u9009\u9879",altsource1:"\u66ff\u4ee3\u8d44\u6e901",altsource2:"\u66ff\u4ee3\u8d44\u6e902",preload:"\u9884\u52a0\u8f7d",poster:"\u6d77\u62a5",source:"\u8d44\u6e90","html5_audio_options":"Audio Options","preload_none":"Don\'t Preload","preload_metadata":"Preload video metadata","preload_auto":"Let user\'s browser decide"});
@@ -0,0 +1 @@
tinyMCE.addI18n('en_us.paste_dlg',{"word_title":"Use Ctrl+V on your keyboard to paste the text into the window.","text_linebreaks":"Keep Linebreaks","text_title":"Use Ctrl+V on your keyboard to paste the text into the window."});
@@ -0,0 +1 @@
tinyMCE.addI18n('en_us.searchreplace_dlg',{findwhat:"Find What",replacewith:"Replace with",direction:"Direction",up:"Up",down:"Down",mcase:"Match Case",findnext:"Find Next",allreplaced:"All occurrences of the search string were replaced.","searchnext_desc":"Find Again",notfound:"The search has been completed. The search string could not be found.","search_title":"Find","replace_title":"Find/Replace",replaceall:"Replace All",replace:"Replace"});
@@ -0,0 +1 @@
tinyMCE.addI18n('en_us.style_dlg',{"text_lineheight":"Line Height","text_variant":"Variant","text_style":"Style","text_weight":"Weight","text_size":"Size","text_font":"Font","text_props":"Text","positioning_tab":"Positioning","list_tab":"List","border_tab":"Border","box_tab":"Box","block_tab":"Block","background_tab":"Background","text_tab":"Text",apply:"Apply",toggle_insert_span:"Insert span at selection",title:"Edit CSS Style",clip:"Clip",placement:"Placement",overflow:"Overflow",zindex:"Z-index",visibility:"Visibility","positioning_type":"Type",position:"Position","bullet_image":"Bullet Image","list_type":"Type",color:"Color",height:"Height",width:"Width",style:"Style",margin:"Margin",left:"Left",bottom:"Bottom",right:"Right",top:"Top",same:"Same for All",padding:"Padding","box_clear":"Clear","box_float":"Float","box_height":"Height","box_width":"Width","block_display":"Display","block_whitespace":"Whitespace","block_text_indent":"Text Indent","block_text_align":"Text Align","block_vertical_alignment":"Vertical Alignment","block_letterspacing":"Letter Spacing","block_wordspacing":"Word Spacing","background_vpos":"Vertical Position","background_hpos":"Horizontal Position","background_attachment":"Attachment","background_repeat":"Repeat","background_image":"Background Image","background_color":"Background Color","text_none":"None","text_blink":"Blink","text_case":"Case","text_striketrough":"Strikethrough","text_underline":"Underline","text_overline":"Overline","text_decoration":"Decoration","text_color":"Color",text:"Text",background:"Background",block:"Block",box:"Box",border:"Border",list:"List"});
@@ -0,0 +1 @@
tinyMCE.addI18n('en_us.table_dlg',{"rules_border":"border","rules_box":"box","rules_vsides":"vsides","rules_rhs":"rhs","rules_lhs":"lhs","rules_hsides":"hsides","rules_below":"below","rules_above":"above","rules_void":"void",rules:"Rules","frame_all":"all","frame_cols":"cols","frame_rows":"rows","frame_groups":"groups","frame_none":"none",frame:"Frame",caption:"Table Caption","missing_scope":"Are you sure you want to continue without specifying a scope for this table header cell. Without it, it may be difficult for some users with disabilities to understand the content or data displayed of the table.","cell_limit":"You\'ve exceeded the maximum number of cells of {$cells}.","row_limit":"You\'ve exceeded the maximum number of rows of {$rows}.","col_limit":"You\'ve exceeded the maximum number of columns of {$cols}.",colgroup:"Col Group",rowgroup:"Row Group",scope:"Scope",tfoot:"Footer",tbody:"Body",thead:"Header","row_all":"Update All Rows in Table","row_even":"Update Even Rows in Table","row_odd":"Update Odd Rows in Table","row_row":"Update Current Row","cell_all":"Update All Cells in Table","cell_row":"Update All Cells in Row","cell_cell":"Update Current Cell",th:"Header",td:"Data",summary:"Summary",bgimage:"Background Image",rtl:"Right to Left",ltr:"Left to Right",mime:"Target MIME Type",langcode:"Language Code",langdir:"Language Direction",style:"Style",id:"ID","merge_cells_title":"Merge Table Cells",bgcolor:"Background Color",bordercolor:"Border Color","align_bottom":"Bottom","align_top":"Top",valign:"Vertical Alignment","cell_type":"Cell Type","cell_title":"Table Cell Properties","row_title":"Table Row Properties","align_middle":"Center","align_right":"Right","align_left":"Left","align_default":"Default",align:"Alignment",border:"Border",cellpadding:"Cell Padding",cellspacing:"Cell Spacing",rows:"Rows",cols:"Columns",height:"Height",width:"Width",title:"Insert/Edit Table",rowtype:"Row Type","advanced_props":"Advanced Properties","general_props":"General Properties","advanced_tab":"Advanced","general_tab":"General","cell_col":"Update all cells in column"});
@@ -0,0 +1 @@
tinyMCE.addI18n('en_us.template_dlg',{title:"Templates",label:"Template","desc_label":"Description",desc:"Insert Predefined Template Content",select:"Select a Template",preview:"Preview",warning:"Warning: Updating a template with a different one may cause data loss.","mdate_format":"%Y-%m-%d %H:%M:%S","cdate_format":"%Y-%m-%d %H:%M:%S","months_long":"January,February,March,April,May,June,July,August,September,October,November,December","months_short":"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec","day_long":"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday","day_short":"Sun,Mon,Tue,Wed,Thu,Fri,Sat,Sun"});

Some files were not shown because too many files have changed in this diff Show More