diff --git a/.editorconfig b/.editorconfig index e99299d699..208052cbb7 100644 --- a/.editorconfig +++ b/.editorconfig @@ -3,7 +3,7 @@ root=true [*] end_of_line = lf indent_style = space -indent_size = 2 +indent_size = 4 trim_trailing_whitespace = true [*.{cs,cshtml,csx,vb,vbx,vbhtml,fs,fsx,txt,ps1,sql}] diff --git a/.gitignore b/.gitignore index 18239100ad..7f7fd2bf6e 100644 --- a/.gitignore +++ b/.gitignore @@ -143,5 +143,6 @@ build/csharp-docs.zip build/msbuild.log .vs/ src/packages/ +src/PrecompiledWeb/* build/tools/ src/PrecompiledWeb/* diff --git a/build/Build.bat b/build/Build.bat index f26c4877cd..da34691c3d 100644 --- a/build/Build.bat +++ b/build/Build.bat @@ -125,22 +125,12 @@ IF NOT EXIST "%nuGetExecutable%" ( powershell -Command "(New-Object Net.WebClient).DownloadFile('https://dist.nuget.org/win-x86-commandline/latest/nuget.exe', '%nuGetExecutable%')" ) -:: We need 7za.exe for BuildBelle.bat -IF NOT EXIST "%toolsFolder%7za.exe" ( - ECHO 7zip not found - fetching now - "%nuGetExecutable%" install 7-Zip.CommandLine -OutputDirectory tools -Verbosity quiet -) - :: We need vswhere.exe for VS2017+ IF NOT EXIST "%toolsFolder%vswhere.exe" ( ECHO vswhere not found - fetching now "%nuGetExecutable%" install vswhere -OutputDirectory tools -Verbosity quiet ) -:: Put 7za.exe and vswhere.exe in a predictable path (not version specific) -FOR /f "delims=" %%A in ('dir "%toolsFolder%7-Zip.CommandLine.*" /b') DO SET "sevenZipExePath=%toolsFolder%%%A\" -MOVE "%sevenZipExePath%tools\7za.exe" "%toolsFolder%7za.exe" - FOR /f "delims=" %%A in ('dir "%toolsFolder%vswhere.*" /b') DO SET "vswhereExePath=%toolsFolder%%%A\" MOVE "%vswhereExePath%tools\vswhere.exe" "%toolsFolder%vswhere.exe" diff --git a/build/BuildBelle.bat b/build/BuildBelle.bat index 78b7736c2b..750ffae6b2 100644 --- a/build/BuildBelle.bat +++ b/build/BuildBelle.bat @@ -8,6 +8,22 @@ ECHO Current folder: %CD% SET nodeFileName=node-v6.9.1-win-x86.7z SET nodeExtractFolder=%toolsFolder%node.js.691 +SET nuGetExecutable=%CD%\tools\nuget.exe +IF NOT EXIST "%nuGetExecutable%" ( + ECHO Downloading https://dist.nuget.org/win-x86-commandline/latest/nuget.exe to %nuGetExecutable% + powershell -Command "(New-Object Net.WebClient).DownloadFile('https://dist.nuget.org/win-x86-commandline/latest/nuget.exe', '%nuGetExecutable%')" +) + +:: We need 7za.exe for BuildBelle.bat +IF NOT EXIST "%toolsFolder%7za.exe" ( + ECHO 7zip not found - fetching now + "%nuGetExecutable%" install 7-Zip.CommandLine -OutputDirectory tools -Verbosity quiet +) + +:: Put 7za.exe and vswhere.exe in a predictable path (not version specific) +FOR /f "delims=" %%A in ('dir "%toolsFolder%7-Zip.CommandLine.*" /b') DO SET "sevenZipExePath=%toolsFolder%%%A\" +MOVE "%sevenZipExePath%tools\7za.exe" "%toolsFolder%7za.exe" + IF NOT EXIST "%nodeExtractFolder%" ( ECHO Downloading http://nodejs.org/dist/v6.9.1/%nodeFileName% to %toolsFolder%%nodeFileName% powershell -Command "(New-Object Net.WebClient).DownloadFile('http://nodejs.org/dist/v6.9.1/%nodeFileName%', '%toolsFolder%%nodeFileName%')" @@ -16,13 +32,6 @@ IF NOT EXIST "%nodeExtractFolder%" ( ) FOR /f "delims=" %%A in ('dir "%nodeExtractFolder%\node*" /b') DO SET "nodePath=%nodeExtractFolder%\%%A" - -SET nuGetExecutable=%CD%\tools\nuget.exe -IF NOT EXIST "%nuGetExecutable%" ( - ECHO Downloading https://dist.nuget.org/win-x86-commandline/latest/nuget.exe to %nuGetExecutable% - powershell -Command "(New-Object Net.WebClient).DownloadFile('https://dist.nuget.org/win-x86-commandline/latest/nuget.exe', '%nuGetExecutable%')" -) - SET drive=%CD:~0,2% SET nuGetFolder=%drive%\packages\ FOR /f "delims=" %%A in ('dir "%nuGetFolder%npm.*" /b') DO SET "npmPath=%nuGetFolder%%%A\" diff --git a/build/NuSpecs/UmbracoCms.Core.nuspec b/build/NuSpecs/UmbracoCms.Core.nuspec index 8fb7cdf2dc..e42b8cf237 100644 --- a/build/NuSpecs/UmbracoCms.Core.nuspec +++ b/build/NuSpecs/UmbracoCms.Core.nuspec @@ -21,9 +21,9 @@ - - - + + + diff --git a/build/NuSpecs/tools/Web.config.install.xdt b/build/NuSpecs/tools/Web.config.install.xdt index 2ef6d38009..315fbf8890 100644 --- a/build/NuSpecs/tools/Web.config.install.xdt +++ b/build/NuSpecs/tools/Web.config.install.xdt @@ -370,19 +370,19 @@ - + - + - + - + diff --git a/build/NuSpecs/tools/trees.config.install.xdt b/build/NuSpecs/tools/trees.config.install.xdt index 7d41835fb1..65aa9c2b53 100644 --- a/build/NuSpecs/tools/trees.config.install.xdt +++ b/build/NuSpecs/tools/trees.config.install.xdt @@ -102,15 +102,16 @@ xdt:Transform="Remove" /> - + + - + - + xdt:Transform="Remove" /> - + - + - + - + diff --git a/src/SolutionInfo.cs b/src/SolutionInfo.cs index fe3be21eb7..faf7c348e2 100644 --- a/src/SolutionInfo.cs +++ b/src/SolutionInfo.cs @@ -11,5 +11,5 @@ using System.Resources; [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyFileVersion("7.6.4")] -[assembly: AssemblyInformationalVersion("7.6.4")] \ No newline at end of file +[assembly: AssemblyFileVersion("7.7.0")] +[assembly: AssemblyInformationalVersion("7.7.0-beta001")] \ No newline at end of file diff --git a/src/Umbraco.Core/Cache/CacheKeys.cs b/src/Umbraco.Core/Cache/CacheKeys.cs index 81fe4dc2f2..c9991ba45a 100644 --- a/src/Umbraco.Core/Cache/CacheKeys.cs +++ b/src/Umbraco.Core/Cache/CacheKeys.cs @@ -55,8 +55,10 @@ namespace Umbraco.Core.Cache [Obsolete("This is no longer used and will be removed from the codebase in the future")] [EditorBrowsable(EditorBrowsableState.Never)] public const string UserCacheKey = "UmbracoUser"; - - public const string UserPermissionsCacheKey = "UmbracoUserPermissions"; + + [Obsolete("This is no longer used and will be removed from the codebase in the future")] + [EditorBrowsable(EditorBrowsableState.Never)] + public const string UserGroupPermissionsCacheKey = "UmbracoUserGroupPermissions"; [UmbracoWillObsolete("This cache key is only used for legacy business logic caching, remove in v8")] public const string ContentTypeCacheKey = "UmbracoContentType"; diff --git a/src/Umbraco.Core/CodeAnnotations/ActionMetadataAttribute.cs b/src/Umbraco.Core/CodeAnnotations/ActionMetadataAttribute.cs new file mode 100644 index 0000000000..697c6b7652 --- /dev/null +++ b/src/Umbraco.Core/CodeAnnotations/ActionMetadataAttribute.cs @@ -0,0 +1,34 @@ +using System; + +namespace Umbraco.Core.CodeAnnotations +{ + [AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)] + internal class ActionMetadataAttribute : Attribute + { + public string Category { get; private set; } + public string Name { get; private set; } + + /// + /// Constructor used to assign a Category, since no name is assigned it will try to be translated from the language files based on the action's alias + /// + /// + public ActionMetadataAttribute(string category) + { + if (string.IsNullOrWhiteSpace(category)) throw new ArgumentException("Value cannot be null or whitespace.", "category"); + Category = category; + } + + /// + /// Constructor used to assign an explicit name and category + /// + /// + /// + public ActionMetadataAttribute(string category, string name) + { + if (string.IsNullOrWhiteSpace(category)) throw new ArgumentException("Value cannot be null or whitespace.", "category"); + if (string.IsNullOrWhiteSpace(name)) throw new ArgumentException("Value cannot be null or whitespace.", "name"); + Category = category; + Name = name; + } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Configuration/GlobalSettings.cs b/src/Umbraco.Core/Configuration/GlobalSettings.cs index acbf0065c0..02f3322ec9 100644 --- a/src/Umbraco.Core/Configuration/GlobalSettings.cs +++ b/src/Umbraco.Core/Configuration/GlobalSettings.cs @@ -2,6 +2,7 @@ using System; using System.Collections.Generic; using System.Configuration; using System.Linq; +using System.Net.Configuration; using System.Web; using System.Web.Configuration; using System.Web.Hosting; @@ -42,7 +43,6 @@ namespace Umbraco.Core.Configuration //ensure the built on (non-changeable) reserved paths are there at all times private const string StaticReservedPaths = "~/app_plugins/,~/install/,"; private const string StaticReservedUrls = "~/config/splashes/booting.aspx,~/config/splashes/noNodes.aspx,~/VSEnterpriseHelper.axd,"; - #endregion /// @@ -53,6 +53,7 @@ namespace Umbraco.Core.Configuration _reservedUrlsCache = null; _reservedPaths = null; _reservedUrls = null; + HasSmtpServer = null; } /// @@ -64,7 +65,26 @@ namespace Umbraco.Core.Configuration ResetInternal(); } - /// + public static bool HasSmtpServerConfigured(string appPath) + { + if (HasSmtpServer.HasValue) return HasSmtpServer.Value; + + var config = WebConfigurationManager.OpenWebConfiguration(appPath); + var settings = (MailSettingsSectionGroup)config.GetSectionGroup("system.net/mailSettings"); + if (settings == null || settings.Smtp == null) return false; + if (settings.Smtp.SpecifiedPickupDirectory != null && string.IsNullOrEmpty(settings.Smtp.SpecifiedPickupDirectory.PickupDirectoryLocation) == false) + return true; + if (settings.Smtp.Network != null && string.IsNullOrEmpty(settings.Smtp.Network.Host) == false) + return true; + return false; + } + + /// + /// For testing only + /// + internal static bool? HasSmtpServer { get; set; } + + /// /// Gets the reserved urls from web.config. /// /// The reserved urls. diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/HelpElement.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/HelpElement.cs index cc4d459359..eb1e452100 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/HelpElement.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/HelpElement.cs @@ -1,8 +1,12 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; +using System.ComponentModel; using System.Configuration; namespace Umbraco.Core.Configuration.UmbracoSettings { + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("This is no longer used and will be removed in future versions")] internal class HelpElement : ConfigurationElement, IHelpSection { [ConfigurationProperty("defaultUrl", DefaultValue = "http://our.umbraco.org/wiki/umbraco-help/{0}/{1}")] diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/IHelpSection.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/IHelpSection.cs index 61be2dfaf2..dc9b6af437 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/IHelpSection.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/IHelpSection.cs @@ -1,7 +1,11 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; +using System.ComponentModel; namespace Umbraco.Core.Configuration.UmbracoSettings -{ +{ + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("This is no longer used and will be removed in future versions")] public interface IHelpSection : IUmbracoConfigurationSection { string DefaultUrl { get; } diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/ILink.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/ILink.cs index d2afec55f3..689878cf0d 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/ILink.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/ILink.cs @@ -1,5 +1,10 @@ -namespace Umbraco.Core.Configuration.UmbracoSettings +using System; +using System.ComponentModel; + +namespace Umbraco.Core.Configuration.UmbracoSettings { + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("This is no longer used and will be removed in future versions")] public interface ILink { string Application { get; } diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/IUmbracoSettingsSection.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/IUmbracoSettingsSection.cs index 899de7d1f9..cd4db216ab 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/IUmbracoSettingsSection.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/IUmbracoSettingsSection.cs @@ -1,4 +1,7 @@ -namespace Umbraco.Core.Configuration.UmbracoSettings +using System; +using System.ComponentModel; + +namespace Umbraco.Core.Configuration.UmbracoSettings { public interface IUmbracoSettingsSection : IUmbracoConfigurationSection { @@ -24,6 +27,8 @@ IProvidersSection Providers { get; } + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("This is no longer used and will be removed in future versions")] IHelpSection Help { get; } IWebRoutingSection WebRouting { get; } diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/LinkElement.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/LinkElement.cs index 31b4aa3e93..ad1655dfb0 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/LinkElement.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/LinkElement.cs @@ -1,7 +1,11 @@ -using System.Configuration; +using System; +using System.ComponentModel; +using System.Configuration; namespace Umbraco.Core.Configuration.UmbracoSettings { + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("This is no longer used and will be removed in future versions")] internal class LinkElement : ConfigurationElement, ILink { [ConfigurationProperty("application")] diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/LinksCollection.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/LinksCollection.cs index 5c317790cb..485c8e4bbd 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/LinksCollection.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/LinksCollection.cs @@ -1,8 +1,12 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; +using System.ComponentModel; using System.Configuration; namespace Umbraco.Core.Configuration.UmbracoSettings { + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("This is no longer used and will be removed in future versions")] internal class LinksCollection : ConfigurationElementCollection, IEnumerable { protected override ConfigurationElement CreateNewElement() diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/UmbracoSettingsSection.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/UmbracoSettingsSection.cs index dd6fed5cd5..2c4751f580 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/UmbracoSettingsSection.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/UmbracoSettingsSection.cs @@ -1,4 +1,5 @@ using System; +using System.ComponentModel; using System.Configuration; using System.Linq; @@ -183,6 +184,8 @@ namespace Umbraco.Core.Configuration.UmbracoSettings get { return Providers; } } + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("This is no longer used and will be removed in future versions")] IHelpSection IUmbracoSettingsSection.Help { get { return Help; } diff --git a/src/Umbraco.Core/Configuration/UmbracoVersion.cs b/src/Umbraco.Core/Configuration/UmbracoVersion.cs index 85b9bf3685..707c241074 100644 --- a/src/Umbraco.Core/Configuration/UmbracoVersion.cs +++ b/src/Umbraco.Core/Configuration/UmbracoVersion.cs @@ -6,7 +6,7 @@ namespace Umbraco.Core.Configuration { public class UmbracoVersion { - private static readonly Version Version = new Version("7.6.4"); + private static readonly Version Version = new Version("7.7.0"); /// /// Gets the current version of Umbraco. @@ -24,7 +24,7 @@ namespace Umbraco.Core.Configuration /// Gets the version comment (like beta or RC). /// /// The version comment. - public static string CurrentComment { get { return ""; } } + public static string CurrentComment { get { return "beta001"; } } // Get the version of the umbraco.dll by looking at a class in that dll // Had to do it like this due to medium trust issues, see: http://haacked.com/archive/2010/11/04/assembly-location-and-medium-trust.aspx diff --git a/src/Umbraco.Core/Constants-Applications.cs b/src/Umbraco.Core/Constants-Applications.cs index d98c12aeb1..3911a6d204 100644 --- a/src/Umbraco.Core/Constants-Applications.cs +++ b/src/Umbraco.Core/Constants-Applications.cs @@ -123,6 +123,8 @@ public const string Scripts = "scripts"; + public const string Users = "users"; + //TODO: Fill in the rest! } } diff --git a/src/Umbraco.Core/Constants-Conventions.cs b/src/Umbraco.Core/Constants-Conventions.cs index 2e3d652d7e..b59b7e487e 100644 --- a/src/Umbraco.Core/Constants-Conventions.cs +++ b/src/Umbraco.Core/Constants-Conventions.cs @@ -12,6 +12,14 @@ namespace Umbraco.Core /// public static class Conventions { + internal static class PermissionCategories + { + public const string ContentCategory = "content"; + public const string AdministrationCategory = "administration"; + public const string StructureCategory = "structure"; + public const string OtherCategory = "other"; + } + public static class PublicAccess { public const string MemberUsernameRuleType = "MemberUsername"; diff --git a/src/Umbraco.Core/Constants-Security.cs b/src/Umbraco.Core/Constants-Security.cs index bd2e1c5acf..83059dbcbb 100644 --- a/src/Umbraco.Core/Constants-Security.cs +++ b/src/Umbraco.Core/Constants-Security.cs @@ -8,12 +8,17 @@ namespace Umbraco.Core public static class Security { + public const string AdminGroupAlias = "admin"; + public const string BackOfficeAuthenticationType = "UmbracoBackOffice"; public const string BackOfficeExternalAuthenticationType = "UmbracoExternalCookie"; public const string BackOfficeExternalCookieName = "UMB_EXTLOGIN"; public const string BackOfficeTokenAuthenticationType = "UmbracoBackOfficeToken"; public const string BackOfficeTwoFactorAuthenticationType = "UmbracoTwoFactorCookie"; + internal const string EmptyPasswordPrefix = "___UIDEMPTYPWORD__"; + internal const string ForceReAuthFlag = "umbraco-force-auth"; + /// /// The prefix used for external identity providers for their authentication type /// diff --git a/src/Umbraco.Core/EnumerableExtensions.cs b/src/Umbraco.Core/EnumerableExtensions.cs index e8565f3bc7..79a703ca5f 100644 --- a/src/Umbraco.Core/EnumerableExtensions.cs +++ b/src/Umbraco.Core/EnumerableExtensions.cs @@ -111,6 +111,9 @@ namespace Umbraco.Core /// public static bool ContainsAll(this IEnumerable source, IEnumerable other) { + if (source == null) throw new ArgumentNullException("source"); + if (other == null) throw new ArgumentNullException("other"); + return other.Except(source).Any() == false; } diff --git a/src/Umbraco.Core/ExpressionHelper.cs b/src/Umbraco.Core/ExpressionHelper.cs index c34c4591b8..75dd63a0df 100644 --- a/src/Umbraco.Core/ExpressionHelper.cs +++ b/src/Umbraco.Core/ExpressionHelper.cs @@ -217,8 +217,21 @@ namespace Umbraco.Core public static MemberInfo GetMemberInfo(Expression> fromExpression) { if (fromExpression == null) return null; - var body = fromExpression.Body as MemberExpression; - return body != null ? body.Member : null; + + MemberExpression me; + switch (fromExpression.Body.NodeType) + { + case ExpressionType.Convert: + case ExpressionType.ConvertChecked: + var ue = fromExpression.Body as UnaryExpression; + me = ((ue != null) ? ue.Operand : null) as MemberExpression; + break; + default: + me = fromExpression.Body as MemberExpression; + break; + } + + return me != null ? me.Member : null; } /// diff --git a/src/Umbraco.Core/IO/FileSystemProviderManager.cs b/src/Umbraco.Core/IO/FileSystemProviderManager.cs index df922fb2b0..d2ae8a0612 100644 --- a/src/Umbraco.Core/IO/FileSystemProviderManager.cs +++ b/src/Umbraco.Core/IO/FileSystemProviderManager.cs @@ -19,6 +19,8 @@ namespace Umbraco.Core.IO private ShadowWrapper _macroPartialFileSystem; private ShadowWrapper _partialViewsFileSystem; + private ShadowWrapper _macroScriptsFileSystem; + private ShadowWrapper _userControlsFileSystem; private ShadowWrapper _stylesheetsFileSystem; private ShadowWrapper _scriptsFileSystem; private ShadowWrapper _xsltFileSystem; @@ -61,6 +63,8 @@ namespace Umbraco.Core.IO { var macroPartialFileSystem = new PhysicalFileSystem(SystemDirectories.MacroPartials); var partialViewsFileSystem = new PhysicalFileSystem(SystemDirectories.PartialViews); + var macroScriptsFileSystem = new PhysicalFileSystem(SystemDirectories.MacroScripts); + var userControlsFileSystem = new PhysicalFileSystem(SystemDirectories.UserControls); var stylesheetsFileSystem = new PhysicalFileSystem(SystemDirectories.Css); var scriptsFileSystem = new PhysicalFileSystem(SystemDirectories.Scripts); var xsltFileSystem = new PhysicalFileSystem(SystemDirectories.Xslt); @@ -69,6 +73,8 @@ namespace Umbraco.Core.IO _macroPartialFileSystem = new ShadowWrapper(macroPartialFileSystem, "Views/MacroPartials", ScopeProvider); _partialViewsFileSystem = new ShadowWrapper(partialViewsFileSystem, "Views/Partials", ScopeProvider); + _macroScriptsFileSystem = new ShadowWrapper(macroScriptsFileSystem, "macroScripts", ScopeProvider); + _userControlsFileSystem = new ShadowWrapper(userControlsFileSystem, "usercontrols", ScopeProvider); _stylesheetsFileSystem = new ShadowWrapper(stylesheetsFileSystem, "css", ScopeProvider); _scriptsFileSystem = new ShadowWrapper(scriptsFileSystem, "scripts", ScopeProvider); _xsltFileSystem = new ShadowWrapper(xsltFileSystem, "xslt", ScopeProvider); @@ -85,6 +91,10 @@ namespace Umbraco.Core.IO public IFileSystem2 MacroPartialsFileSystem { get { return _macroPartialFileSystem; } } public IFileSystem2 PartialViewsFileSystem { get { return _partialViewsFileSystem; } } + // Legacy /macroScripts folder + public IFileSystem2 MacroScriptsFileSystem { get { return _macroScriptsFileSystem; } } + // Legacy /usercontrols folder + public IFileSystem2 UserControlsFileSystem { get { return _userControlsFileSystem; } } public IFileSystem2 StylesheetsFileSystem { get { return _stylesheetsFileSystem; } } public IFileSystem2 ScriptsFileSystem { get { return _scriptsFileSystem; } } public IFileSystem2 XsltFileSystem { get { return _xsltFileSystem; } } @@ -252,13 +262,15 @@ namespace Umbraco.Core.IO internal ICompletable Shadow(Guid id) { var typed = _wrappers.ToArray(); - var wrappers = new ShadowWrapper[typed.Length + 7]; + var wrappers = new ShadowWrapper[typed.Length + 9]; var i = 0; while (i < typed.Length) wrappers[i] = typed[i++]; wrappers[i++] = _macroPartialFileSystem; + wrappers[i++] = _macroScriptsFileSystem; wrappers[i++] = _partialViewsFileSystem; wrappers[i++] = _stylesheetsFileSystem; wrappers[i++] = _scriptsFileSystem; + wrappers[i++] = _userControlsFileSystem; wrappers[i++] = _xsltFileSystem; wrappers[i++] = _masterPagesFileSystem; wrappers[i] = _mvcViewsFileSystem; diff --git a/src/Umbraco.Core/Models/Content.cs b/src/Umbraco.Core/Models/Content.cs index cef06ec4f7..70cb877183 100644 --- a/src/Umbraco.Core/Models/Content.cs +++ b/src/Umbraco.Core/Models/Content.cs @@ -23,7 +23,7 @@ namespace Umbraco.Core.Models private DateTime? _expireDate; private int _writer; private string _nodeName;//NOTE Once localization is introduced this will be the non-localized Node Name. - private bool _permissionsChanged; + /// /// Constructor for creating a Content object /// @@ -32,7 +32,7 @@ namespace Umbraco.Core.Models /// ContentType for the current Content object public Content(string name, IContent parent, IContentType contentType) : this(name, parent, contentType, new PropertyCollection()) - { + { } /// @@ -68,7 +68,7 @@ namespace Umbraco.Core.Models /// Id of the Parent content /// ContentType for the current Content object /// Collection of properties - public Content(string name, int parentId, IContentType contentType, PropertyCollection properties) + public Content(string name, int parentId, IContentType contentType, PropertyCollection properties) : base(name, parentId, contentType, properties) { Mandate.ParameterNotNull(contentType, "contentType"); @@ -87,7 +87,6 @@ namespace Umbraco.Core.Models public readonly PropertyInfo ExpireDateSelector = ExpressionHelper.GetPropertyInfo(x => x.ExpireDate); public readonly PropertyInfo WriterSelector = ExpressionHelper.GetPropertyInfo(x => x.WriterId); public readonly PropertyInfo NodeNameSelector = ExpressionHelper.GetPropertyInfo(x => x.NodeName); - public readonly PropertyInfo PermissionsChangedSelector = ExpressionHelper.GetPropertyInfo(x => x.PermissionsChanged); } /// @@ -95,7 +94,7 @@ namespace Umbraco.Core.Models /// This is used to override the default one from the ContentType. /// /// - /// If no template is explicitly set on the Content object, + /// If no template is explicitly set on the Content object, /// the Default template from the ContentType will be returned. /// [DataMember] @@ -197,15 +196,6 @@ namespace Umbraco.Core.Models set { SetPropertyValueAndDetectChanges(value, ref _nodeName, Ps.Value.NodeNameSelector); } } - /// - /// Used internally to track if permissions have been changed during the saving process for this entity - /// - [IgnoreDataMember] - internal bool PermissionsChanged - { - get { return _permissionsChanged; } - set { SetPropertyValueAndDetectChanges(value, ref _permissionsChanged, Ps.Value.PermissionsChangedSelector); } - } /// /// Gets the ContentType used by this content object @@ -293,7 +283,7 @@ namespace Umbraco.Core.Models ChangePublishedState(PublishedState.Unpublished); } } - + /// /// Method to call when Entity is being updated /// diff --git a/src/Umbraco.Core/Models/ContentType.cs b/src/Umbraco.Core/Models/ContentType.cs index 88c498a147..81b5272a58 100644 --- a/src/Umbraco.Core/Models/ContentType.cs +++ b/src/Umbraco.Core/Models/ContentType.cs @@ -54,6 +54,11 @@ namespace Umbraco.Core.Models { public readonly PropertyInfo DefaultTemplateSelector = ExpressionHelper.GetPropertyInfo(x => x.DefaultTemplateId); public readonly PropertyInfo AllowedTemplatesSelector = ExpressionHelper.GetPropertyInfo>(x => x.AllowedTemplates); + + //Custom comparer for enumerable + public readonly DelegateEqualityComparer> TemplateComparer = new DelegateEqualityComparer>( + (templates, enumerable) => templates.UnsortedSequenceEqual(enumerable), + templates => templates.GetHashCode()); } /// @@ -91,10 +96,7 @@ namespace Umbraco.Core.Models set { SetPropertyValueAndDetectChanges(value, ref _allowedTemplates, Ps.Value.AllowedTemplatesSelector, - //Custom comparer for enumerable - new DelegateEqualityComparer>( - (templates, enumerable) => templates.UnsortedSequenceEqual(enumerable), - templates => templates.GetHashCode())); + Ps.Value.TemplateComparer); } } diff --git a/src/Umbraco.Core/Models/ContentTypeBase.cs b/src/Umbraco.Core/Models/ContentTypeBase.cs index 88476f946d..db0bc0e900 100644 --- a/src/Umbraco.Core/Models/ContentTypeBase.cs +++ b/src/Umbraco.Core/Models/ContentTypeBase.cs @@ -88,6 +88,12 @@ namespace Umbraco.Core.Models public readonly PropertyInfo PropertyGroupCollectionSelector = ExpressionHelper.GetPropertyInfo(x => x.PropertyGroups); public readonly PropertyInfo PropertyTypeCollectionSelector = ExpressionHelper.GetPropertyInfo>(x => x.PropertyTypes); public readonly PropertyInfo HasPropertyTypeBeenRemovedSelector = ExpressionHelper.GetPropertyInfo(x => x.HasPropertyTypeBeenRemoved); + + //Custom comparer for enumerable + public readonly DelegateEqualityComparer> ContentTypeSortComparer = + new DelegateEqualityComparer>( + (sorts, enumerable) => sorts.UnsortedSequenceEqual(enumerable), + sorts => sorts.GetHashCode()); } @@ -254,7 +260,7 @@ namespace Umbraco.Core.Models set { SetPropertyValueAndDetectChanges(value, ref _trashed, Ps.Value.TrashedSelector); } } - private IDictionary _additionalData; + private readonly IDictionary _additionalData; /// /// Some entities may expose additional data that other's might not, this custom data will be available in this collection /// @@ -273,11 +279,8 @@ namespace Umbraco.Core.Models get { return _allowedContentTypes; } set { - SetPropertyValueAndDetectChanges(value, ref _allowedContentTypes, Ps.Value.AllowedContentTypesSelector, - //Custom comparer for enumerable - new DelegateEqualityComparer>( - (sorts, enumerable) => sorts.UnsortedSequenceEqual(enumerable), - sorts => sorts.GetHashCode())); + SetPropertyValueAndDetectChanges(value, ref _allowedContentTypes, Ps.Value.AllowedContentTypesSelector, + Ps.Value.ContentTypeSortComparer); } } diff --git a/src/Umbraco.Core/Models/DictionaryItem.cs b/src/Umbraco.Core/Models/DictionaryItem.cs index 42b047e35b..d5fcc89994 100644 --- a/src/Umbraco.Core/Models/DictionaryItem.cs +++ b/src/Umbraco.Core/Models/DictionaryItem.cs @@ -37,6 +37,12 @@ namespace Umbraco.Core.Models public readonly PropertyInfo ParentIdSelector = ExpressionHelper.GetPropertyInfo(x => x.ParentId); public readonly PropertyInfo ItemKeySelector = ExpressionHelper.GetPropertyInfo(x => x.ItemKey); public readonly PropertyInfo TranslationsSelector = ExpressionHelper.GetPropertyInfo>(x => x.Translations); + + //Custom comparer for enumerable + public readonly DelegateEqualityComparer> DictionaryTranslationComparer = + new DelegateEqualityComparer>( + (enumerable, translations) => enumerable.UnsortedSequenceEqual(translations), + enumerable => enumerable.GetHashCode()); } /// @@ -79,10 +85,7 @@ namespace Umbraco.Core.Models } SetPropertyValueAndDetectChanges(asArray, ref _translations, Ps.Value.TranslationsSelector, - //Custom comparer for enumerable - new DelegateEqualityComparer>( - (enumerable, translations) => enumerable.UnsortedSequenceEqual(translations), - enumerable => enumerable.GetHashCode())); + Ps.Value.DictionaryTranslationComparer); } } } diff --git a/src/Umbraco.Core/Models/EntityBase/Entity.cs b/src/Umbraco.Core/Models/EntityBase/Entity.cs index d4da2676c1..3e7770088b 100644 --- a/src/Umbraco.Core/Models/EntityBase/Entity.cs +++ b/src/Umbraco.Core/Models/EntityBase/Entity.cs @@ -119,7 +119,7 @@ namespace Umbraco.Core.Models.EntityBase if (IsPropertyDirty("CreateDate") == false || _createDate == default(DateTime)) CreateDate = DateTime.Now; if (IsPropertyDirty("UpdateDate") == false || _updateDate == default(DateTime)) - UpdateDate = CreateDate; + UpdateDate = DateTime.Now; } /// @@ -129,6 +129,10 @@ namespace Umbraco.Core.Models.EntityBase { if (IsPropertyDirty("UpdateDate") == false || _updateDate == default(DateTime)) UpdateDate = DateTime.Now; + + //this is just in case + if (_createDate == default(DateTime)) + CreateDate = DateTime.Now; } /// diff --git a/src/Umbraco.Core/Models/EntityBase/EntityPath.cs b/src/Umbraco.Core/Models/EntityBase/EntityPath.cs new file mode 100644 index 0000000000..368d6bd87b --- /dev/null +++ b/src/Umbraco.Core/Models/EntityBase/EntityPath.cs @@ -0,0 +1,8 @@ +namespace Umbraco.Core.Models.EntityBase +{ + public class EntityPath + { + public int Id { get; set; } + public string Path { get; set; } + } +} diff --git a/src/Umbraco.Core/Models/IUserControl.cs b/src/Umbraco.Core/Models/IUserControl.cs new file mode 100644 index 0000000000..2660567258 --- /dev/null +++ b/src/Umbraco.Core/Models/IUserControl.cs @@ -0,0 +1,7 @@ +namespace Umbraco.Core.Models +{ + public interface IUserControl : IFile + { + + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Models/Identity/BackOfficeIdentityUser.cs b/src/Umbraco.Core/Models/Identity/BackOfficeIdentityUser.cs index 50dc7d06f8..1b0459781e 100644 --- a/src/Umbraco.Core/Models/Identity/BackOfficeIdentityUser.cs +++ b/src/Umbraco.Core/Models/Identity/BackOfficeIdentityUser.cs @@ -2,23 +2,69 @@ using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Collections.Specialized; +using System.Linq; +using System.Reflection; using System.Security.Claims; using System.Threading.Tasks; using Microsoft.AspNet.Identity; +using Umbraco.Core.Models.EntityBase; +using Umbraco.Core.Models.Membership; using Umbraco.Core.Security; namespace Umbraco.Core.Models.Identity { - public class BackOfficeIdentityUser : IdentityUser, IdentityUserClaim> + public class BackOfficeIdentityUser : IdentityUser, IdentityUserClaim>, IRememberBeingDirty { - - public BackOfficeIdentityUser() + /// + /// Used to construct a new instance without an identity + /// + /// + /// This is allowed to be null (but would need to be filled in if trying to persist this instance) + /// + /// + public static BackOfficeIdentityUser CreateNew(string username, string email, string culture) { - StartMediaId = -1; - StartContentId = -1; - Culture = Configuration.GlobalSettings.DefaultUILanguage; + if (string.IsNullOrWhiteSpace(username)) throw new ArgumentException("Value cannot be null or whitespace.", "username"); + if (string.IsNullOrWhiteSpace(culture)) throw new ArgumentException("Value cannot be null or whitespace.", "culture"); + + var user = new BackOfficeIdentityUser(); + user.DisableChangeTracking(); + user._userName = username; + user._email = email; + //we are setting minvalue here because the default is "0" which is the id of the admin user + //which we cannot allow because the admin user will always exist + user._id = int.MinValue; + user._hasIdentity = false; + user._culture = culture; + user.EnableChangeTracking(); + return user; } + private BackOfficeIdentityUser() + { + } + + /// + /// Creates an existing user with the specified groups + /// + /// + /// + public BackOfficeIdentityUser(int userId, IEnumerable groups) + { + _startMediaIds = new int[] { }; + _startContentIds = new int[] { }; + _groups = new IReadOnlyUserGroup[] { }; + _allowedSections = new string[] { }; + _culture = Configuration.GlobalSettings.DefaultUILanguage; + _groups = groups.ToArray(); + _roles = new ObservableCollection>(_groups.Select(x => new IdentityUserRole + { + RoleId = x.Alias, + UserId = userId.ToString() + })); + _roles.CollectionChanged += _roles_CollectionChanged; + } + public virtual async Task GenerateUserIdentityAsync(BackOfficeUserManager manager) { // NOTE the authenticationType must match the umbraco one @@ -27,16 +73,155 @@ namespace Umbraco.Core.Models.Identity return userIdentity; } + /// + /// Returns true if an Id has been set on this object this will be false if the object is new and not peristed to the database + /// + public bool HasIdentity + { + get { return _hasIdentity; } + } + + public int[] CalculatedMediaStartNodeIds { get; internal set; } + public int[] CalculatedContentStartNodeIds { get; internal set; } + + public override int Id + { + get { return _id; } + set + { + _id = value; + _hasIdentity = true; + } + } + + /// + /// Override Email so we can track changes to it + /// + public override string Email + { + get { return _email; } + set { _tracker.SetPropertyValueAndDetectChanges(value, ref _email, Ps.Value.EmailSelector); } + } + + /// + /// Override UserName so we can track changes to it + /// + public override string UserName + { + get { return _userName; } + set { _tracker.SetPropertyValueAndDetectChanges(value, ref _userName, Ps.Value.UserNameSelector); } + } + + /// + /// Override LastLoginDateUtc so we can track changes to it + /// + public override DateTime? LastLoginDateUtc + { + get { return _lastLoginDateUtc; } + set { _tracker.SetPropertyValueAndDetectChanges(value, ref _lastLoginDateUtc, Ps.Value.LastLoginDateUtcSelector); } + } + + /// + /// Override EmailConfirmed so we can track changes to it + /// + public override bool EmailConfirmed + { + get { return _emailConfirmed; } + set { _tracker.SetPropertyValueAndDetectChanges(value, ref _emailConfirmed, Ps.Value.EmailConfirmedSelector); } + } + /// /// Gets/sets the user's real name /// - public string Name { get; set; } - public int StartContentId { get; set; } - public int StartMediaId { get; set; } - public string[] AllowedSections { get; set; } - public string Culture { get; set; } + public string Name + { + get { return _name; } + set { _tracker.SetPropertyValueAndDetectChanges(value, ref _name, Ps.Value.NameSelector); } + } - public string UserTypeAlias { get; set; } + /// + /// Override AccessFailedCount so we can track changes to it + /// + public override int AccessFailedCount + { + get { return _accessFailedCount; } + set { _tracker.SetPropertyValueAndDetectChanges(value, ref _accessFailedCount, Ps.Value.AccessFailedCountSelector); } + } + + /// + /// Override PasswordHash so we can track changes to it + /// + public override string PasswordHash + { + get { return _passwordHash; } + set { _tracker.SetPropertyValueAndDetectChanges(value, ref _passwordHash, Ps.Value.PasswordHashSelector); } + } + + + /// + /// Content start nodes assigned to the User (not ones assigned to the user's groups) + /// + public int[] StartContentIds + { + get { return _startContentIds; } + set + { + if (value == null) value = new int[0]; + _tracker.SetPropertyValueAndDetectChanges(value, ref _startContentIds, Ps.Value.StartContentIdsSelector, Ps.Value.StartIdsComparer); + } + } + + /// + /// Media start nodes assigned to the User (not ones assigned to the user's groups) + /// + public int[] StartMediaIds + { + get { return _startMediaIds; } + set + { + if (value == null) value = new int[0]; + _tracker.SetPropertyValueAndDetectChanges(value, ref _startMediaIds, Ps.Value.StartMediaIdsSelector, Ps.Value.StartIdsComparer); + } + } + + /// + /// This is a readonly list of the user's allowed sections which are based on it's user groups + /// + public string[] AllowedSections + { + get { return _allowedSections ?? (_allowedSections = _groups.SelectMany(x => x.AllowedSections).Distinct().ToArray()); } + } + + public string Culture + { + get { return _culture; } + set { _tracker.SetPropertyValueAndDetectChanges(value, ref _culture, Ps.Value.CultureSelector); } + } + + public IReadOnlyUserGroup[] Groups + { + get { return _groups; } + set + { + //so they recalculate + _allowedSections = null; + + //now clear all roles and re-add them + _roles.CollectionChanged -= _roles_CollectionChanged; + _roles.Clear(); + foreach (var identityUserRole in _groups.Select(x => new IdentityUserRole + { + RoleId = x.Alias, + UserId = Id.ToString() + })) + { + _roles.Add(identityUserRole); + } + _roles.CollectionChanged += _roles_CollectionChanged; + + _tracker.SetPropertyValueAndDetectChanges(value, ref _groups, Ps.Value.GroupsSelector, Ps.Value.GroupsComparer); + } + } /// /// Lockout is always enabled @@ -44,7 +229,7 @@ namespace Umbraco.Core.Models.Identity public override bool LockoutEnabled { get { return true; } - set + set { //do nothing } @@ -82,16 +267,42 @@ namespace Umbraco.Core.Models.Identity return _logins; } } - - public bool LoginsChanged { get; private set; } - + void Logins_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e) { - LoginsChanged = true; + _tracker.OnPropertyChanged(Ps.Value.LoginsSelector); } - private ObservableCollection _logins; - private Lazy> _getLogins; + private void _roles_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e) + { + _tracker.OnPropertyChanged(Ps.Value.RolesSelector); + } + + private readonly ObservableCollection> _roles; + + /// + /// helper method to easily add a role without having to deal with IdentityUserRole{T} + /// + /// + /// + /// Adding a role this way will not reflect on the user's group's collection or it's allowed sections until the user is persisted + /// + public void AddRole(string role) + { + Roles.Add(new IdentityUserRole + { + UserId = this.Id.ToString(), + RoleId = role + }); + } + + /// + /// Override Roles because the value of these are the user's group aliases + /// + public override ICollection> Roles + { + get { return _roles; } + } /// /// Used to set a lazy call back to populate the user's Login list @@ -101,6 +312,128 @@ namespace Umbraco.Core.Models.Identity { if (callback == null) throw new ArgumentNullException("callback"); _getLogins = callback; + } + + #region Change tracking + + public void DisableChangeTracking() + { + _tracker.DisableChangeTracking(); } + + public void EnableChangeTracking() + { + _tracker.EnableChangeTracking(); + } + + /// + /// Since this class only has change tracking turned on for Email/Username this will return true if either of those have changed + /// + /// + public bool IsDirty() + { + return _tracker.IsDirty(); + } + + /// + /// Returns true if the specified property is dirty + /// + /// + /// + public bool IsPropertyDirty(string propName) + { + return _tracker.IsPropertyDirty(propName); + } + + /// + /// Resets dirty properties + /// + void ICanBeDirty.ResetDirtyProperties() + { + _tracker.ResetDirtyProperties(); + } + + bool IRememberBeingDirty.WasDirty() + { + return _tracker.WasDirty(); + } + + bool IRememberBeingDirty.WasPropertyDirty(string propertyName) + { + return _tracker.WasPropertyDirty(propertyName); + } + + void IRememberBeingDirty.ForgetPreviouslyDirtyProperties() + { + _tracker.ForgetPreviouslyDirtyProperties(); + } + + public void ResetDirtyProperties(bool rememberPreviouslyChangedProperties) + { + _tracker.ResetDirtyProperties(rememberPreviouslyChangedProperties); + } + + private static readonly Lazy Ps = new Lazy(); + private class PropertySelectors + { + public readonly PropertyInfo EmailSelector = ExpressionHelper.GetPropertyInfo(x => x.Email); + public readonly PropertyInfo UserNameSelector = ExpressionHelper.GetPropertyInfo(x => x.UserName); + public readonly PropertyInfo LastLoginDateUtcSelector = ExpressionHelper.GetPropertyInfo(x => x.LastLoginDateUtc); + public readonly PropertyInfo EmailConfirmedSelector = ExpressionHelper.GetPropertyInfo(x => x.EmailConfirmed); + public readonly PropertyInfo NameSelector = ExpressionHelper.GetPropertyInfo(x => x.Name); + public readonly PropertyInfo AccessFailedCountSelector = ExpressionHelper.GetPropertyInfo(x => x.AccessFailedCount); + public readonly PropertyInfo PasswordHashSelector = ExpressionHelper.GetPropertyInfo(x => x.PasswordHash); + public readonly PropertyInfo CultureSelector = ExpressionHelper.GetPropertyInfo(x => x.Culture); + public readonly PropertyInfo StartMediaIdsSelector = ExpressionHelper.GetPropertyInfo(x => x.StartMediaIds); + public readonly PropertyInfo StartContentIdsSelector = ExpressionHelper.GetPropertyInfo(x => x.StartContentIds); + public readonly PropertyInfo GroupsSelector = ExpressionHelper.GetPropertyInfo(x => x.Groups); + public readonly PropertyInfo LoginsSelector = ExpressionHelper.GetPropertyInfo>(x => x.Logins); + public readonly PropertyInfo RolesSelector = ExpressionHelper.GetPropertyInfo>>(x => x.Roles); + + //Custom comparer for enumerables + public readonly DelegateEqualityComparer GroupsComparer = new DelegateEqualityComparer( + (groups, enumerable) => groups.Select(x => x.Alias).UnsortedSequenceEqual(enumerable.Select(x => x.Alias)), + groups => groups.GetHashCode()); + public readonly DelegateEqualityComparer StartIdsComparer = new DelegateEqualityComparer( + (groups, enumerable) => groups.UnsortedSequenceEqual(enumerable), + groups => groups.GetHashCode()); + + } + + private readonly ChangeTracker _tracker = new ChangeTracker(); + private string _email; + private string _userName; + private int _id; + private bool _hasIdentity = false; + private DateTime? _lastLoginDateUtc; + private bool _emailConfirmed; + private string _name; + private int _accessFailedCount; + private string _passwordHash; + private string _culture; + private ObservableCollection _logins; + private Lazy> _getLogins; + private IReadOnlyUserGroup[] _groups; + private string[] _allowedSections; + private int[] _startMediaIds; + private int[] _startContentIds; + + /// + /// internal class used to track changes for properties that have it enabled + /// + private class ChangeTracker : TracksChangesEntityBase + { + /// + /// Make this public so that it's usable + /// + /// + public new void OnPropertyChanged(PropertyInfo propertyInfo) + { + base.OnPropertyChanged(propertyInfo); + } + } + #endregion + + } } \ No newline at end of file diff --git a/src/Umbraco.Core/Models/Identity/IdentityModelMappings.cs b/src/Umbraco.Core/Models/Identity/IdentityModelMappings.cs index fab34e5f17..1b73ed5821 100644 --- a/src/Umbraco.Core/Models/Identity/IdentityModelMappings.cs +++ b/src/Umbraco.Core/Models/Identity/IdentityModelMappings.cs @@ -1,7 +1,7 @@ using System; using System.Linq; using AutoMapper; - +using Umbraco.Core.Models.EntityBase; using Umbraco.Core.Models.Mapping; using Umbraco.Core.Models.Membership; using Umbraco.Core.Security; @@ -13,28 +13,42 @@ namespace Umbraco.Core.Models.Identity public override void ConfigureMappings(IConfiguration config, ApplicationContext applicationContext) { config.CreateMap() + .BeforeMap((user, identityUser) => + { + identityUser.DisableChangeTracking(); + }) + .ConstructUsing(user => new BackOfficeIdentityUser(user.Id, user.Groups)) .ForMember(user => user.LastLoginDateUtc, expression => expression.MapFrom(user => user.LastLoginDate.ToUniversalTime())) .ForMember(user => user.Email, expression => expression.MapFrom(user => user.Email)) + .ForMember(user => user.EmailConfirmed, expression => expression.MapFrom(user => user.EmailConfirmedDate.HasValue)) .ForMember(user => user.Id, expression => expression.MapFrom(user => user.Id)) .ForMember(user => user.LockoutEndDateUtc, expression => expression.MapFrom(user => user.IsLockedOut ? DateTime.MaxValue.ToUniversalTime() : (DateTime?)null)) .ForMember(user => user.UserName, expression => expression.MapFrom(user => user.Username)) .ForMember(user => user.PasswordHash, expression => expression.MapFrom(user => GetPasswordHash(user.RawPasswordValue))) .ForMember(user => user.Culture, expression => expression.MapFrom(user => user.GetUserCulture(applicationContext.Services.TextService))) .ForMember(user => user.Name, expression => expression.MapFrom(user => user.Name)) - .ForMember(user => user.StartMediaId, expression => expression.MapFrom(user => user.StartMediaId)) - .ForMember(user => user.StartContentId, expression => expression.MapFrom(user => user.StartContentId)) - .ForMember(user => user.UserTypeAlias, expression => expression.MapFrom(user => user.UserType.Alias)) + .ForMember(user => user.StartMediaIds, expression => expression.MapFrom(user => user.StartMediaIds)) + .ForMember(user => user.StartContentIds, expression => expression.MapFrom(user => user.StartContentIds)) .ForMember(user => user.AccessFailedCount, expression => expression.MapFrom(user => user.FailedPasswordAttempts)) - .ForMember(user => user.AllowedSections, expression => expression.MapFrom(user => user.AllowedSections.ToArray())); - + .ForMember(user => user.CalculatedContentStartNodeIds, expression => expression.MapFrom(user => user.CalculateContentStartNodeIds(applicationContext.Services.EntityService))) + .ForMember(user => user.CalculatedMediaStartNodeIds, expression => expression.MapFrom(user => user.CalculateMediaStartNodeIds(applicationContext.Services.EntityService))) + .ForMember(user => user.AllowedSections, expression => expression.MapFrom(user => user.AllowedSections.ToArray())) + .AfterMap((user, identityUser) => + { + identityUser.ResetDirtyProperties(true); + identityUser.EnableChangeTracking(); + }); + config.CreateMap() .ConstructUsing((BackOfficeIdentityUser user) => new UserData(Guid.NewGuid().ToString("N"))) //this is the 'session id' .ForMember(detail => detail.Id, opt => opt.MapFrom(user => user.Id)) .ForMember(detail => detail.AllowedApplications, opt => opt.MapFrom(user => user.AllowedSections)) + .ForMember(detail => detail.Roles, opt => opt.MapFrom(user => user.Roles.Select(x => x.RoleId).ToArray())) .ForMember(detail => detail.RealName, opt => opt.MapFrom(user => user.Name)) - .ForMember(detail => detail.Roles, opt => opt.MapFrom(user => new[] { user.UserTypeAlias })) - .ForMember(detail => detail.StartContentNode, opt => opt.MapFrom(user => user.StartContentId)) - .ForMember(detail => detail.StartMediaNode, opt => opt.MapFrom(user => user.StartMediaId)) + //When mapping to UserData which is used in the authcookie we want ALL start nodes including ones defined on the groups + .ForMember(detail => detail.StartContentNodes, opt => opt.MapFrom(user => user.CalculatedContentStartNodeIds)) + //When mapping to UserData which is used in the authcookie we want ALL start nodes including ones defined on the groups + .ForMember(detail => detail.StartMediaNodes, opt => opt.MapFrom(user => user.CalculatedMediaStartNodeIds)) .ForMember(detail => detail.Username, opt => opt.MapFrom(user => user.UserName)) .ForMember(detail => detail.Culture, opt => opt.MapFrom(user => user.Culture)) .ForMember(detail => detail.SessionId, opt => opt.MapFrom(user => user.SecurityStamp.IsNullOrWhiteSpace() ? Guid.NewGuid().ToString("N") : user.SecurityStamp)); @@ -42,7 +56,7 @@ namespace Umbraco.Core.Models.Identity private string GetPasswordHash(string storedPass) { - return storedPass.StartsWith("___UIDEMPTYPWORD__") ? null : storedPass; + return storedPass.StartsWith(Constants.Security.EmptyPasswordPrefix) ? null : storedPass; } } } \ No newline at end of file diff --git a/src/Umbraco.Core/Models/Member.cs b/src/Umbraco.Core/Models/Member.cs index 02d6b9aece..1ed11af93e 100644 --- a/src/Umbraco.Core/Models/Member.cs +++ b/src/Umbraco.Core/Models/Member.cs @@ -109,6 +109,30 @@ namespace Umbraco.Core.Models IsApproved = true; } + /// + /// Constructor for creating a Member object + /// + /// + /// + /// + /// + /// The password value passed in to this parameter should be the encoded/encrypted/hashed format of the member's password + /// + /// + /// + public Member(string name, string email, string username, string rawPasswordValue, IMemberType contentType, bool isApproved) + : base(name, -1, contentType, new PropertyCollection()) + { + Mandate.ParameterNotNull(contentType, "contentType"); + + _contentTypeAlias = contentType.Alias; + _contentType = contentType; + _email = email; + _username = username; + _rawPasswordValue = rawPasswordValue; + IsApproved = isApproved; + } + private static readonly Lazy Ps = new Lazy(); private class PropertySelectors diff --git a/src/Umbraco.Core/Models/Membership/ContentPermissionSet.cs b/src/Umbraco.Core/Models/Membership/ContentPermissionSet.cs new file mode 100644 index 0000000000..ca0a910c05 --- /dev/null +++ b/src/Umbraco.Core/Models/Membership/ContentPermissionSet.cs @@ -0,0 +1,54 @@ +using System; +using System.Collections.Generic; +using Umbraco.Core.Models.EntityBase; + +namespace Umbraco.Core.Models.Membership +{ + /// + /// Represents an -> user group & permission key value pair collection + /// + /// + /// This implements purely so it can be used with the repository layer which is why it's explicitly implemented. + /// + public class ContentPermissionSet : EntityPermissionSet, IAggregateRoot + { + private readonly IContent _content; + + public ContentPermissionSet(IContent content, EntityPermissionCollection permissionsSet) + : base(content.Id, permissionsSet) + { + _content = content; + } + + public override int EntityId + { + get { return _content.Id; } + } + + #region Explicit implementation of IAggregateRoot + int IEntity.Id + { + get { return EntityId; } + set { throw new NotImplementedException(); } + } + + bool IEntity.HasIdentity + { + get { return EntityId > 0; } + } + + Guid IEntity.Key { get; set; } + + DateTime IEntity.CreateDate { get; set; } + + DateTime IEntity.UpdateDate { get; set; } + + DateTime? IDeletableEntity.DeletedDate { get; set; } + + object IDeepCloneable.DeepClone() + { + throw new NotImplementedException(); + } + #endregion + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Models/Membership/EntityPermission.cs b/src/Umbraco.Core/Models/Membership/EntityPermission.cs index 7ab1ddc817..8f609c0e13 100644 --- a/src/Umbraco.Core/Models/Membership/EntityPermission.cs +++ b/src/Umbraco.Core/Models/Membership/EntityPermission.cs @@ -1,26 +1,66 @@ -using System.Collections; +using System; namespace Umbraco.Core.Models.Membership { /// - /// Represents a user -> entity permission + /// Represents an entity permission (defined on the user group and derived to retrieve permissions for a given user) /// - public class EntityPermission + public class EntityPermission : IEquatable { - public EntityPermission(int userId, int entityId, string[] assignedPermissions) + public EntityPermission(int groupId, int entityId, string[] assignedPermissions) { - UserId = userId; + UserGroupId = groupId; EntityId = entityId; AssignedPermissions = assignedPermissions; + IsDefaultPermissions = false; + } + + public EntityPermission(int groupId, int entityId, string[] assignedPermissions, bool isDefaultPermissions) + { + UserGroupId = groupId; + EntityId = entityId; + AssignedPermissions = assignedPermissions; + IsDefaultPermissions = isDefaultPermissions; } - public int UserId { get; private set; } public int EntityId { get; private set; } + public int UserGroupId { get; private set; } /// /// The assigned permissions for the user/entity combo /// public string[] AssignedPermissions { get; private set; } + + /// + /// True if the permissions assigned to this object are the group's default permissions and not explicitly defined permissions + /// + /// + /// This will be the case when looking up entity permissions and falling back to the default permissions + /// + public bool IsDefaultPermissions { get; private set; } + + public bool Equals(EntityPermission other) + { + if (ReferenceEquals(null, other)) return false; + if (ReferenceEquals(this, other)) return true; + return EntityId == other.EntityId && UserGroupId == other.UserGroupId; + } + + public override bool Equals(object obj) + { + if (ReferenceEquals(null, obj)) return false; + if (ReferenceEquals(this, obj)) return true; + if (obj.GetType() != this.GetType()) return false; + return Equals((EntityPermission) obj); + } + + public override int GetHashCode() + { + unchecked + { + return (EntityId * 397) ^ UserGroupId; + } + } } } \ No newline at end of file diff --git a/src/Umbraco.Core/Models/Membership/EntityPermissionCollection.cs b/src/Umbraco.Core/Models/Membership/EntityPermissionCollection.cs new file mode 100644 index 0000000000..5fca079cfc --- /dev/null +++ b/src/Umbraco.Core/Models/Membership/EntityPermissionCollection.cs @@ -0,0 +1,34 @@ +using System.Collections.Generic; +using System.Linq; + +namespace Umbraco.Core.Models.Membership +{ + /// + /// A of + /// + public class EntityPermissionCollection : HashSet + { + public EntityPermissionCollection() + { + } + + public EntityPermissionCollection(IEnumerable collection) : base(collection) + { + } + + /// + /// Returns the aggregate permissions in the permission set + /// + /// + /// + /// This value is only calculated once + /// + public IEnumerable GetAllPermissions() + { + return _aggregatePermissions ?? (_aggregatePermissions = + this.SelectMany(x => x.AssignedPermissions).Distinct().ToArray()); + } + + private string[] _aggregatePermissions; + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Models/Membership/EntityPermissionSet.cs b/src/Umbraco.Core/Models/Membership/EntityPermissionSet.cs index c4669caf59..c33c4aa315 100644 --- a/src/Umbraco.Core/Models/Membership/EntityPermissionSet.cs +++ b/src/Umbraco.Core/Models/Membership/EntityPermissionSet.cs @@ -1,59 +1,55 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; +using System.Linq; namespace Umbraco.Core.Models.Membership { /// - /// Represents an entity -> user & permission key value pair collection - /// + /// Represents an entity -> user group & permission key value pair collection + /// public class EntityPermissionSet { + private static readonly Lazy EmptyInstance = new Lazy(() => new EntityPermissionSet(-1, new EntityPermissionCollection())); + /// + /// Returns an empty permission set + /// + /// + public static EntityPermissionSet Empty() + { + return EmptyInstance.Value; + } + + public EntityPermissionSet(int entityId, EntityPermissionCollection permissionsSet) + { + EntityId = entityId; + PermissionsSet = permissionsSet; + } + /// /// The entity id with permissions assigned /// - public int EntityId { get; private set; } + public virtual int EntityId { get; private set; } /// - /// The key/value pairs of user id & single permission + /// The key/value pairs of user group id & single permission /// - public IEnumerable UserPermissionsSet { get; private set; } + public EntityPermissionCollection PermissionsSet { get; private set; } - public EntityPermissionSet(int entityId, IEnumerable userPermissionsSet) + + /// + /// Returns the aggregate permissions in the permission set + /// + /// + /// + /// This value is only calculated once + /// + public IEnumerable GetAllPermissions() { - EntityId = entityId; - UserPermissionsSet = userPermissionsSet; + return PermissionsSet.GetAllPermissions(); } - public class UserPermission - { - public UserPermission(int userId, string permission) - { - UserId = userId; - Permission = permission; - } - public int UserId { get; private set; } - public string Permission { get; private set; } - protected bool Equals(UserPermission other) - { - return UserId == other.UserId && string.Equals(Permission, other.Permission); - } - public override bool Equals(object obj) - { - if (ReferenceEquals(null, obj)) return false; - if (ReferenceEquals(this, obj)) return true; - if (obj.GetType() != this.GetType()) return false; - return Equals((UserPermission) obj); - } - - public override int GetHashCode() - { - unchecked - { - return (UserId*397) ^ Permission.GetHashCode(); - } - } - } } } \ No newline at end of file diff --git a/src/Umbraco.Core/Models/Membership/IProfile.cs b/src/Umbraco.Core/Models/Membership/IProfile.cs index 749c3371b8..0e6267a10b 100644 --- a/src/Umbraco.Core/Models/Membership/IProfile.cs +++ b/src/Umbraco.Core/Models/Membership/IProfile.cs @@ -1,15 +1,11 @@ namespace Umbraco.Core.Models.Membership { /// - /// Defines the the Profile interface - /// - /// - /// This interface is pretty useless but has been exposed publicly from 6.x so we're stuck with it. It would make more sense - /// if the Id was an int but since it's not people have to cast it to int all of the time! - /// + /// Defines the the User Profile interface + /// public interface IProfile { - object Id { get; set; } - string Name { get; set; } + int Id { get; } + string Name { get; } } } \ No newline at end of file diff --git a/src/Umbraco.Core/Models/Membership/IReadOnlyUserGroup.cs b/src/Umbraco.Core/Models/Membership/IReadOnlyUserGroup.cs new file mode 100644 index 0000000000..deebc03401 --- /dev/null +++ b/src/Umbraco.Core/Models/Membership/IReadOnlyUserGroup.cs @@ -0,0 +1,31 @@ +using System.Collections.Generic; + +namespace Umbraco.Core.Models.Membership +{ + /// + /// A readonly user group providing basic information + /// + public interface IReadOnlyUserGroup + { + string Name { get; } + string Icon { get; } + int Id { get; } + int? StartContentId { get; } + int? StartMediaId { get; } + + /// + /// The alias + /// + string Alias { get; } + + /// + /// The set of default permissions + /// + /// + /// By default each permission is simply a single char but we've made this an enumerable{string} to support a more flexible permissions structure in the future. + /// + IEnumerable Permissions { get; set; } + + IEnumerable AllowedSections { get; } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Models/Membership/IUser.cs b/src/Umbraco.Core/Models/Membership/IUser.cs index f1f9c23971..2a1d904ecc 100644 --- a/src/Umbraco.Core/Models/Membership/IUser.cs +++ b/src/Umbraco.Core/Models/Membership/IUser.cs @@ -1,6 +1,7 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; +using System.ComponentModel; using Umbraco.Core.Models.EntityBase; -using Umbraco.Core.Persistence.Mappers; namespace Umbraco.Core.Models.Membership { @@ -10,29 +11,39 @@ namespace Umbraco.Core.Models.Membership /// Will be left internal until a proper Membership implementation is part of the roadmap public interface IUser : IMembershipUser, IRememberBeingDirty, ICanBeDirty { + UserState UserState { get; } + string Name { get; set; } int SessionTimeout { get; set; } - int StartContentId { get; set; } - int StartMediaId { get; set; } - string Language { get; set; } + int[] StartContentIds { get; set; } + int[] StartMediaIds { get; set; } + string Language { get; set; } + + [Obsolete("This should not be used it exists for legacy reasons only, use user groups instead, it will be removed in future versions")] + [EditorBrowsable(EditorBrowsableState.Never)] + IUserType UserType { get; set; } + + DateTime? EmailConfirmedDate { get; set; } + DateTime? InvitedDate { get; set; } + + /// + /// Gets the groups that user is part of + /// + IEnumerable Groups { get; } + + void RemoveGroup(string group); + void ClearGroups(); + void AddGroup(IReadOnlyUserGroup group); - /// - /// Gets/sets the user type for the user - /// - IUserType UserType { get; set; } - - //TODO: This should be a private set - /// - /// The default permission set for the user - /// - /// - /// Currently in umbraco each permission is a single char but with an Enumerable{string} collection this allows for flexible changes to this in the future - /// - IEnumerable DefaultPermissions { get; set; } - IEnumerable AllowedSections { get; } + + [Obsolete("This should not be used it exists for legacy reasons only, use user groups instead, it will be removed in future versions")] + [EditorBrowsable(EditorBrowsableState.Never)] void RemoveAllowedSection(string sectionAlias); - void AddAllowedSection(string sectionAlias); + + [Obsolete("This should not be used it exists for legacy reasons only, use user groups instead, it will be removed in future versions")] + [EditorBrowsable(EditorBrowsableState.Never)] + void AddAllowedSection(string sectionAlias); /// /// Exposes the basic profile data @@ -43,5 +54,10 @@ namespace Umbraco.Core.Models.Membership /// The security stamp used by ASP.Net identity /// string SecurityStamp { get; set; } + + /// + /// Will hold the media file system relative path of the users custom avatar if they uploaded one + /// + string Avatar { get; set; } } } \ No newline at end of file diff --git a/src/Umbraco.Core/Models/Membership/IUserGroup.cs b/src/Umbraco.Core/Models/Membership/IUserGroup.cs new file mode 100644 index 0000000000..0282073a2e --- /dev/null +++ b/src/Umbraco.Core/Models/Membership/IUserGroup.cs @@ -0,0 +1,44 @@ +using System.Collections.Generic; +using Umbraco.Core.Models.EntityBase; + +namespace Umbraco.Core.Models.Membership +{ + public interface IUserGroup : IAggregateRoot + { + string Alias { get; set; } + + int? StartContentId { get; set; } + int? StartMediaId { get; set; } + + /// + /// The icon + /// + string Icon { get; set; } + + /// + /// The name + /// + string Name { get; set; } + + /// + /// The set of default permissions + /// + /// + /// By default each permission is simply a single char but we've made this an enumerable{string} to support a more flexible permissions structure in the future. + /// + IEnumerable Permissions { get; set; } + + IEnumerable AllowedSections { get; } + + void RemoveAllowedSection(string sectionAlias); + + void AddAllowedSection(string sectionAlias); + + void ClearAllowedSections(); + + /// + /// Specifies the number of users assigned to this group + /// + int UserCount { get; } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Models/Membership/IUserType.cs b/src/Umbraco.Core/Models/Membership/IUserType.cs index fe678afd2b..ba004cea4a 100644 --- a/src/Umbraco.Core/Models/Membership/IUserType.cs +++ b/src/Umbraco.Core/Models/Membership/IUserType.cs @@ -1,28 +1,17 @@ -using System.Collections.Generic; -using Umbraco.Core.Models.EntityBase; -using Umbraco.Core.Persistence.Mappers; - -namespace Umbraco.Core.Models.Membership -{ - - public interface IUserType : IAggregateRoot - { - /// - /// The user type alias - /// - string Alias { get; set; } - - /// - /// The user type name - /// - string Name { get; set; } - - /// - /// The set of default permissions for the user type - /// - /// - /// By default each permission is simply a single char but we've made this an enumerable{string} to support a more flexible permissions structure in the future. - /// - IEnumerable Permissions { get; set; } - } +using System; +using System.Collections.Generic; +using System.ComponentModel; +using Umbraco.Core.Models.EntityBase; + +namespace Umbraco.Core.Models.Membership +{ + [Obsolete("This should not be used it exists for legacy reasons only, use user groups instead, it will be removed in future versions")] + [EditorBrowsable(EditorBrowsableState.Never)] + public interface IUserType : IAggregateRoot + { + string Alias { get; set; } + string Name { get; set; } + IEnumerable Permissions { get; set; } + + } } \ No newline at end of file diff --git a/src/Umbraco.Core/Models/Membership/ReadOnlyUserGroup.cs b/src/Umbraco.Core/Models/Membership/ReadOnlyUserGroup.cs new file mode 100644 index 0000000000..ceb2671067 --- /dev/null +++ b/src/Umbraco.Core/Models/Membership/ReadOnlyUserGroup.cs @@ -0,0 +1,70 @@ +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Umbraco.Core.Models.Membership +{ + public class ReadOnlyUserGroup : IReadOnlyUserGroup, IEquatable + { + public ReadOnlyUserGroup(int id, string name, string icon, int? startContentId, int? startMediaId, string @alias, + IEnumerable allowedSections, IEnumerable permissions) + { + Name = name; + Icon = icon; + Id = id; + Alias = alias; + AllowedSections = allowedSections.ToArray(); + Permissions = permissions.ToArray(); + + //Zero is invalid and will be treated as Null + StartContentId = startContentId == 0 ? null : startContentId; + StartMediaId = startMediaId == 0 ? null : startMediaId; + } + + public int Id { get; private set; } + public string Name { get; private set; } + public string Icon { get; private set; } + public int? StartContentId { get; private set; } + public int? StartMediaId { get; private set; } + public string Alias { get; private set; } + + /// + /// The set of default permissions + /// + /// + /// By default each permission is simply a single char but we've made this an enumerable{string} to support a more flexible permissions structure in the future. + /// + public IEnumerable Permissions { get; set; } + public IEnumerable AllowedSections { get; private set; } + + public bool Equals(ReadOnlyUserGroup other) + { + if (ReferenceEquals(null, other)) return false; + if (ReferenceEquals(this, other)) return true; + return string.Equals(Alias, other.Alias); + } + + public override bool Equals(object obj) + { + if (ReferenceEquals(null, obj)) return false; + if (ReferenceEquals(this, obj)) return true; + if (obj.GetType() != this.GetType()) return false; + return Equals((ReadOnlyUserGroup) obj); + } + + public override int GetHashCode() + { + return Alias.GetHashCode(); + } + + public static bool operator ==(ReadOnlyUserGroup left, ReadOnlyUserGroup right) + { + return Equals(left, right); + } + + public static bool operator !=(ReadOnlyUserGroup left, ReadOnlyUserGroup right) + { + return !Equals(left, right); + } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Models/Membership/UmbracoMembershipUser.cs b/src/Umbraco.Core/Models/Membership/UmbracoMembershipUser.cs index ada2a7102d..0ada5c3d0e 100644 --- a/src/Umbraco.Core/Models/Membership/UmbracoMembershipUser.cs +++ b/src/Umbraco.Core/Models/Membership/UmbracoMembershipUser.cs @@ -34,12 +34,11 @@ namespace Umbraco.Core.Models.Membership /// The last lockout date. /// The full name. /// The language. - /// Type of the user. /// public UmbracoMembershipUser(string providerName, string name, object providerUserKey, string email, string passwordQuestion, string comment, bool isApproved, bool isLockedOut, DateTime creationDate, DateTime lastLoginDate, DateTime lastActivityDate, DateTime lastPasswordChangedDate, - DateTime lastLockoutDate, string fullName, string language, IUserType userType, T user) + DateTime lastLockoutDate, string fullName, string language, T user) : base( providerName, name, providerUserKey, email, passwordQuestion, comment, isApproved, isLockedOut, creationDate, lastLoginDate, lastActivityDate, lastPasswordChangedDate, lastLockoutDate) { diff --git a/src/Umbraco.Core/Models/Membership/User.cs b/src/Umbraco.Core/Models/Membership/User.cs index cadda14508..aeb3148ceb 100644 --- a/src/Umbraco.Core/Models/Membership/User.cs +++ b/src/Umbraco.Core/Models/Membership/User.cs @@ -2,13 +2,14 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Collections.Specialized; +using System.ComponentModel; using System.Linq; using System.Reflection; using System.Runtime.Serialization; using Umbraco.Core.Configuration; +using Umbraco.Core.Logging; using Umbraco.Core.Models.EntityBase; - namespace Umbraco.Core.Models.Membership { /// @@ -18,64 +19,107 @@ namespace Umbraco.Core.Models.Membership [DataContract(IsReference = true)] public class User : Entity, IUser { - public User(IUserType userType) + /// + /// Constructor for creating a new/empty user + /// + public User() { - if (userType == null) throw new ArgumentNullException("userType"); - - _userType = userType; - _defaultPermissions = _userType.Permissions == null ? Enumerable.Empty() : new List(_userType.Permissions); - //Groups = new List { userType }; SessionTimeout = 60; - _sectionCollection = new ObservableCollection(); - _addedSections = new List(); - _removedSections = new List(); + _userGroups = new HashSet(); _language = GlobalSettings.DefaultUILanguage; - _sectionCollection.CollectionChanged += SectionCollectionChanged; _isApproved = true; _isLockedOut = false; - _startContentId = -1; - _startMediaId = -1; + _startContentIds = new int[] { }; + _startMediaIds = new int[] { }; //cannot be null _rawPasswordValue = ""; } - public User(string name, string email, string username, string rawPasswordValue, IUserType userType) - : this(userType) + /// + /// Constructor for creating a new/empty user + /// + /// + /// + /// + /// + public User(string name, string email, string username, string rawPasswordValue) + : this() { + if (string.IsNullOrWhiteSpace(name)) throw new ArgumentException("Value cannot be null or whitespace.", "name"); + if (string.IsNullOrWhiteSpace(email)) throw new ArgumentException("Value cannot be null or whitespace.", "email"); + if (string.IsNullOrWhiteSpace(username)) throw new ArgumentException("Value cannot be null or whitespace.", "username"); + if (string.IsNullOrEmpty(rawPasswordValue)) throw new ArgumentException("Value cannot be null or empty.", "rawPasswordValue"); + _name = name; _email = email; _username = username; _rawPasswordValue = rawPasswordValue; + _userGroups = new HashSet(); _isApproved = true; _isLockedOut = false; - _startContentId = -1; - _startMediaId = -1; + _startContentIds = new int[] { }; + _startMediaIds = new int[] { }; + + } + + /// + /// Constructor for creating a new User instance for an existing user + /// + /// + /// + /// + /// + /// + /// + /// + /// + public User(int id, string name, string email, string username, string rawPasswordValue, IEnumerable userGroups, int[] startContentIds, int[] startMediaIds) + : this() + { + //we allow whitespace for this value so just check null + if (rawPasswordValue == null) throw new ArgumentNullException("rawPasswordValue"); + if (userGroups == null) throw new ArgumentNullException("userGroups"); + if (startContentIds == null) throw new ArgumentNullException("startContentIds"); + if (startMediaIds == null) throw new ArgumentNullException("startMediaIds"); + if (string.IsNullOrWhiteSpace(name)) throw new ArgumentException("Value cannot be null or whitespace.", "name"); + if (string.IsNullOrWhiteSpace(username)) throw new ArgumentException("Value cannot be null or whitespace.", "username"); + + Id = id; + _name = name; + _email = email; + _username = username; + _rawPasswordValue = rawPasswordValue; + _userGroups = new HashSet(userGroups); + _isApproved = true; + _isLockedOut = false; + _startContentIds = startContentIds; + _startMediaIds = startMediaIds; } - private IUserType _userType; private string _name; private string _securityStamp; - private List _addedSections; - private List _removedSections; - private ObservableCollection _sectionCollection; + private string _avatar; private int _sessionTimeout; - private int _startContentId; - private int _startMediaId; + private int[] _startContentIds; + private int[] _startMediaIds; private int _failedLoginAttempts; private string _username; + private DateTime? _emailConfirmedDate; + private DateTime? _invitedDate; private string _email; private string _rawPasswordValue; + private IEnumerable _allowedSections; + private HashSet _userGroups; private bool _isApproved; private bool _isLockedOut; private string _language; private DateTime _lastPasswordChangedDate; private DateTime _lastLoginDate; private DateTime _lastLockoutDate; - - private IEnumerable _defaultPermissions; - private bool _defaultToLiveEditing; + private IDictionary _additionalData; + private object _additionalDataLock = new object(); private static readonly Lazy Ps = new Lazy(); @@ -87,10 +131,10 @@ namespace Umbraco.Core.Models.Membership public readonly PropertyInfo LastPasswordChangeDateSelector = ExpressionHelper.GetPropertyInfo(x => x.LastPasswordChangeDate); public readonly PropertyInfo SecurityStampSelector = ExpressionHelper.GetPropertyInfo(x => x.SecurityStamp); + public readonly PropertyInfo AvatarSelector = ExpressionHelper.GetPropertyInfo(x => x.Avatar); public readonly PropertyInfo SessionTimeoutSelector = ExpressionHelper.GetPropertyInfo(x => x.SessionTimeout); - public readonly PropertyInfo StartContentIdSelector = ExpressionHelper.GetPropertyInfo(x => x.StartContentId); - public readonly PropertyInfo StartMediaIdSelector = ExpressionHelper.GetPropertyInfo(x => x.StartMediaId); - public readonly PropertyInfo AllowedSectionsSelector = ExpressionHelper.GetPropertyInfo>(x => x.AllowedSections); + public readonly PropertyInfo StartContentIdSelector = ExpressionHelper.GetPropertyInfo(x => x.StartContentIds); + public readonly PropertyInfo StartMediaIdSelector = ExpressionHelper.GetPropertyInfo(x => x.StartMediaIds); public readonly PropertyInfo NameSelector = ExpressionHelper.GetPropertyInfo(x => x.Name); public readonly PropertyInfo UsernameSelector = ExpressionHelper.GetPropertyInfo(x => x.Username); @@ -99,9 +143,18 @@ namespace Umbraco.Core.Models.Membership public readonly PropertyInfo IsLockedOutSelector = ExpressionHelper.GetPropertyInfo(x => x.IsLockedOut); public readonly PropertyInfo IsApprovedSelector = ExpressionHelper.GetPropertyInfo(x => x.IsApproved); public readonly PropertyInfo LanguageSelector = ExpressionHelper.GetPropertyInfo(x => x.Language); + public readonly PropertyInfo EmailConfirmedDateSelector = ExpressionHelper.GetPropertyInfo(x => x.EmailConfirmedDate); + public readonly PropertyInfo InvitedDateSelector = ExpressionHelper.GetPropertyInfo(x => x.InvitedDate); public readonly PropertyInfo DefaultToLiveEditingSelector = ExpressionHelper.GetPropertyInfo(x => x.DefaultToLiveEditing); - public readonly PropertyInfo UserTypeSelector = ExpressionHelper.GetPropertyInfo(x => x.UserType); + + public readonly PropertyInfo UserGroupsSelector = ExpressionHelper.GetPropertyInfo>(x => x.Groups); + + //Custom comparer for enumerable + public readonly DelegateEqualityComparer> IntegerEnumerableComparer = + new DelegateEqualityComparer>( + (enum1, enum2) => enum1.UnsortedSequenceEqual(enum2), + enum1 => enum1.GetHashCode()); } #region Implementation of IMembershipUser @@ -112,8 +165,19 @@ namespace Umbraco.Core.Models.Membership get { return Id; } set { throw new NotSupportedException("Cannot set the provider user key for a user"); } } - - + + [DataMember] + public DateTime? EmailConfirmedDate + { + get { return _emailConfirmedDate; } + set { SetPropertyValueAndDetectChanges(value, ref _emailConfirmedDate, Ps.Value.EmailConfirmedDateSelector); } + } + [DataMember] + public DateTime? InvitedDate + { + get { return _invitedDate; } + set { SetPropertyValueAndDetectChanges(value, ref _invitedDate, Ps.Value.InvitedDateSelector); } + } [DataMember] public string Username { @@ -189,6 +253,22 @@ namespace Umbraco.Core.Models.Membership #region Implementation of IUser + public UserState UserState + { + get + { + if (LastLoginDate == default(DateTime) && IsApproved == false && InvitedDate != null) + return UserState.Invited; + + if (IsLockedOut) + return UserState.LockedOut; + if (IsApproved == false) + return UserState.Disabled; + + return UserState.Active; + } + } + [DataMember] public string Name { @@ -198,28 +278,171 @@ namespace Umbraco.Core.Models.Membership public IEnumerable AllowedSections { - get { return _sectionCollection; } + get { return _allowedSections ?? (_allowedSections = new List(_userGroups.SelectMany(x => x.AllowedSections).Distinct())); } } - public void RemoveAllowedSection(string sectionAlias) + [Obsolete("This should not be used it exists for legacy reasons only, use user groups instead, it will be removed in future versions")] + [EditorBrowsable(EditorBrowsableState.Never)] + IUserType IUser.UserType { - if (_sectionCollection.Contains(sectionAlias)) + get { - _sectionCollection.Remove(sectionAlias); + //the best we can do here is to return the user's first user group as a IUserType object + //but we should attempt to return any group that is the built in ones first + var groups = Groups.ToArray(); + if (groups.Length == 0) + { + //In backwards compatibility land, a user type cannot be null! so we need to return a fake one. + return new UserType + { + Alias = "temp", + Id = int.MinValue, + Key = Guid.Empty, + CreateDate = default(DateTime), + DeletedDate = null, + Name = "Temp", + Permissions = new List(), + UpdateDate = default(DateTime) + }; + } + var builtIns = new[] { Constants.Security.AdminGroupAlias, "writer", "editor", "translator" }; + var foundBuiltIn = groups.FirstOrDefault(x => builtIns.Contains(x.Alias)); + IUserGroup realGroup; + if (foundBuiltIn != null) + { + //if the group isn't IUserGroup we'll need to look it up + realGroup = foundBuiltIn as IUserGroup ?? ApplicationContext.Current.Services.UserService.GetUserGroupById(foundBuiltIn.Id); + + //return a mapped version of the group + return new UserType + { + Alias = realGroup.Alias, + Id = realGroup.Id, + Key = realGroup.Key, + CreateDate = realGroup.CreateDate, + DeletedDate = realGroup.DeletedDate, + Name = realGroup.Name, + Permissions = realGroup.Permissions, + UpdateDate = realGroup.UpdateDate + }; + } + + //otherwise return the first + //if the group isn't IUserGroup we'll need to look it up + realGroup = groups[0] as IUserGroup ?? ApplicationContext.Current.Services.UserService.GetUserGroupById(groups[0].Id); + //return a mapped version of the group + return new UserType + { + Alias = realGroup.Alias, + Id = realGroup.Id, + Key = realGroup.Key, + CreateDate = realGroup.CreateDate, + DeletedDate = realGroup.DeletedDate, + Name = realGroup.Name, + Permissions = realGroup.Permissions, + UpdateDate = realGroup.UpdateDate + }; } + set + { + //if old APIs are still using this lets first check if the user is part of the user group with the alias specified + if (Groups.Any(x => x.Alias == value.Alias)) + return; + + //the only other option we have here is to lookup the group (and we'll need to use singletons here :( ) + var found = ApplicationContext.Current.Services.UserService.GetUserGroupByAlias(value.Alias); + if (found == null) + throw new InvalidOperationException("No user group was found with the alias " + value.Alias + ", this API (IUser.UserType) is obsolete, use user groups instead"); + + //if it's found, all we can do is add it, we can't really replace them + AddGroup(found.ToReadOnlyGroup()); + } + } + + [Obsolete("This should not be used it exists for legacy reasons only, use user groups instead, it will be removed in future versions")] + [EditorBrowsable(EditorBrowsableState.Never)] + void IUser.RemoveAllowedSection(string sectionAlias) + { + //don't do anything if they aren't allowed it already + if (AllowedSections.Contains(sectionAlias) == false) + return; + + var groups = Groups.ToArray(); + //our only option here is to check if a custom group is created for this user, if so we can remove it from that group, otherwise we'll throw + //now we'll check if the user has a special 1:1 user group created for itself. This will occur if this method is used and also during an upgrade. + //this comes in the alias form of userName + 'Group' + var customUserGroup = groups.FirstOrDefault(x => x.Alias == (Username + "Group")); + if (customUserGroup != null) + { + //if the group isn't IUserGroup we'll need to look it up + var realGroup = customUserGroup as IUserGroup ?? ApplicationContext.Current.Services.UserService.GetUserGroupById(customUserGroup.Id); + realGroup.RemoveAllowedSection(sectionAlias); + //now we need to flag this for saving (hack!) + GroupsToSave.Add(realGroup); + } + else + { + throw new InvalidOperationException("Cannot remove the allowed section using this obsolete API. Modify the user's groups instead"); + } + } - public void AddAllowedSection(string sectionAlias) + [Obsolete("This should not be used it exists for legacy reasons only, use user groups instead, it will be removed in future versions")] + [EditorBrowsable(EditorBrowsableState.Never)] + void IUser.AddAllowedSection(string sectionAlias) { - if (_sectionCollection.Contains(sectionAlias) == false) + //don't do anything if they are allowed it already + if (AllowedSections.Contains(sectionAlias)) + return; + + //This is here for backwards compat only. + //First we'll check if the user is part of the 'admin' group. If so then we can ensure that the admin group has this section available to it. + //otherwise, the only thing we can do is create a custom user group for this user and add this section. + //We are checking for admin here because if the user is an admin and an allowed section is being added, then it's assumed it's to be added + //for the whole admin group (i.e. Forms installer does this for admins) + var groups = Groups.ToArray(); + var admin = groups.FirstOrDefault(x => x.Alias == Constants.Security.AdminGroupAlias); + if (admin != null) + { + //if the group isn't IUserGroup we'll need to look it up + var realGroup = admin as IUserGroup ?? ApplicationContext.Current.Services.UserService.GetUserGroupById(admin.Id); + realGroup.AddAllowedSection(sectionAlias); + //now we need to flag this for saving (hack!) + GroupsToSave.Add(realGroup); + } + + //now we'll check if the user has a special 1:1 user group created for itself. This will occur if this method is used and also during an upgrade. + //this comes in the alias form of userName + 'Group' + var customUserGroup = groups.FirstOrDefault(x => x.Alias == (Username + "Group")); + if (customUserGroup != null) { - _sectionCollection.Add(sectionAlias); - } - } + //if the group isn't IUserGroup we'll need to look it up + var realGroup = customUserGroup as IUserGroup ?? ApplicationContext.Current.Services.UserService.GetUserGroupById(customUserGroup.Id); + realGroup.AddAllowedSection(sectionAlias); + //now we need to flag this for saving (hack!) + GroupsToSave.Add(realGroup); + } + + //ok, so the user doesn't have a 1:1 group, we'll need to flag it for creation + var newUserGroup = new UserGroup + { + Alias = Username + "Group", + Name = "Group for " + Username + }; + newUserGroup.AddAllowedSection(sectionAlias); + GroupsToSave.Add(newUserGroup); + } + + /// + /// This used purely for hacking backwards compatibility into this class for < 7.7 compat + /// + [DoNotClone] + [IgnoreDataMember] + internal List GroupsToSave = new List(); public IProfile ProfileData { - get { return new UserProfile(this); } + get { return new WrappedUserProfile(this); } } /// @@ -232,21 +455,12 @@ namespace Umbraco.Core.Models.Membership set { SetPropertyValueAndDetectChanges(value, ref _securityStamp, Ps.Value.SecurityStampSelector); } } - /// - /// Used internally to check if we need to add a section in the repository to the db - /// - internal IEnumerable AddedSections + [DataMember] + public string Avatar { - get { return _addedSections; } - } - - /// - /// Used internally to check if we need to remove a section in the repository to the db - /// - internal IEnumerable RemovedSections - { - get { return _removedSections; } - } + get { return _avatar; } + set { SetPropertyValueAndDetectChanges(value, ref _avatar, Ps.Value.AvatarSelector); } + } /// /// Gets or sets the session timeout. @@ -268,10 +482,11 @@ namespace Umbraco.Core.Models.Membership /// The start content id. /// [DataMember] - public int StartContentId + [DoNotClone] + public int[] StartContentIds { - get { return _startContentId; } - set { SetPropertyValueAndDetectChanges(value, ref _startContentId, Ps.Value.StartContentIdSelector); } + get { return _startContentIds; } + set { SetPropertyValueAndDetectChanges(value, ref _startContentIds, Ps.Value.StartContentIdSelector, Ps.Value.IntegerEnumerableComparer); } } /// @@ -281,10 +496,11 @@ namespace Umbraco.Core.Models.Membership /// The start media id. /// [DataMember] - public int StartMediaId + [DoNotClone] + public int[] StartMediaIds { - get { return _startMediaId; } - set { SetPropertyValueAndDetectChanges(value, ref _startMediaId, Ps.Value.StartMediaIdSelector); } + get { return _startMediaIds; } + set { SetPropertyValueAndDetectChanges(value, ref _startMediaIds, Ps.Value.StartMediaIdSelector, Ps.Value.IntegerEnumerableComparer); } } [DataMember] @@ -294,14 +510,6 @@ namespace Umbraco.Core.Models.Membership set { SetPropertyValueAndDetectChanges(value, ref _language, Ps.Value.LanguageSelector); } } - //TODO: This should be a private set - [DataMember] - public IEnumerable DefaultPermissions - { - get { return _defaultPermissions;} - set { _defaultPermissions = value; } - } - [IgnoreDataMember] internal bool DefaultToLiveEditing { @@ -309,78 +517,107 @@ namespace Umbraco.Core.Models.Membership set { SetPropertyValueAndDetectChanges(value, ref _defaultToLiveEditing, Ps.Value.DefaultToLiveEditingSelector); } } - [IgnoreDataMember] - public IUserType UserType + /// + /// Gets the groups that user is part of + /// + [DataMember] + public IEnumerable Groups { - get { return _userType; } - set + get { return _userGroups; } + } + + public void RemoveGroup(string group) + { + foreach (var userGroup in _userGroups.ToArray()) { - if (value.HasIdentity == false) + if (userGroup.Alias == group) { - throw new InvalidOperationException("Cannot assign a User Type that has not been persisted"); + _userGroups.Remove(userGroup); + //reset this flag so it's rebuilt with the assigned groups + _allowedSections = null; + OnPropertyChanged(Ps.Value.UserGroupsSelector); } - - SetPropertyValueAndDetectChanges(value, ref _userType, Ps.Value.UserTypeSelector); } } + public void ClearGroups() + { + if (_userGroups.Count > 0) + { + _userGroups.Clear(); + //reset this flag so it's rebuilt with the assigned groups + _allowedSections = null; + OnPropertyChanged(Ps.Value.UserGroupsSelector); + } + } + + public void AddGroup(IReadOnlyUserGroup group) + { + if (_userGroups.Add(group)) + { + //reset this flag so it's rebuilt with the assigned groups + _allowedSections = null; + OnPropertyChanged(Ps.Value.UserGroupsSelector); + } + } + #endregion /// - /// Whenever resetting occurs, clear the remembered add/removed collections, even if - /// rememberPreviouslyChangedProperties is true, the AllowedSections property will still - /// be flagged as dirty. + /// This is used as an internal cache for this entity - specifically for calculating start nodes so we don't re-calculated all of the time /// - /// - public override void ResetDirtyProperties(bool rememberPreviouslyChangedProperties) + [IgnoreDataMember] + [DoNotClone] + internal IDictionary AdditionalData { - _addedSections.Clear(); - _removedSections.Clear(); - base.ResetDirtyProperties(rememberPreviouslyChangedProperties); - } - - /// - /// Handles the collection changed event in order for us to flag the AllowedSections property as changed - /// - /// - /// - void SectionCollectionChanged(object sender, NotifyCollectionChangedEventArgs e) - { - OnPropertyChanged(Ps.Value.AllowedSectionsSelector); - - if (e.Action == NotifyCollectionChangedAction.Add) + get { - var item = e.NewItems.Cast().First(); - - if (_addedSections.Contains(item) == false) + lock (_additionalDataLock) { - _addedSections.Add(item); + return _additionalData ?? (_additionalData = new Dictionary()); } } - else if (e.Action == NotifyCollectionChangedAction.Remove) - { - var item = e.OldItems.Cast().First(); - - if (_removedSections.Contains(item) == false) - { - _removedSections.Add(item); - } - - } } + [IgnoreDataMember] + [DoNotClone] + internal object AdditionalDataLock { get { return _additionalDataLock; } } + public override object DeepClone() { var clone = (User)base.DeepClone(); //turn off change tracking clone.DisableChangeTracking(); + //manually clone the start node props + clone._startContentIds = _startContentIds.ToArray(); + clone._startMediaIds = _startMediaIds.ToArray(); + + // this value has been cloned and points to the same object + // which obviously is bad - needs to point to a new object + clone._additionalDataLock = new object(); + + if (_additionalData != null) + { + // clone._additionalData points to the same dictionary, which is bad, because + // changing one clone impacts all of them - so we need to reset it with a fresh + // dictionary that will contain the same values - and, if some values are deep + // cloneable, they should be deep-cloned too + var cloneAdditionalData = clone._additionalData = new Dictionary(); + + lock (_additionalDataLock) + { + foreach (var kvp in _additionalData) + { + var deepCloneable = kvp.Value as IDeepCloneable; + cloneAdditionalData[kvp.Key] = deepCloneable == null ? kvp.Value : deepCloneable.DeepClone(); + } + } + } + //need to create new collections otherwise they'll get copied by ref - clone._addedSections = new List(); - clone._removedSections = new List(); - clone._sectionCollection = new ObservableCollection(_sectionCollection.ToList()); - clone._defaultPermissions = new List(_defaultPermissions.ToList()); + clone._userGroups = new HashSet(_userGroups); + clone._allowedSections = _allowedSections != null ? new List(_allowedSections) : null; //re-create the event handler - clone._sectionCollection.CollectionChanged += clone.SectionCollectionChanged; //this shouldn't really be needed since we're not tracking clone.ResetDirtyProperties(false); //re-enable tracking @@ -392,28 +629,26 @@ namespace Umbraco.Core.Models.Membership /// /// Internal class used to wrap the user in a profile /// - private class UserProfile : IProfile + private class WrappedUserProfile : IProfile { private readonly IUser _user; - public UserProfile(IUser user) + public WrappedUserProfile(IUser user) { _user = user; } - public object Id + public int Id { get { return _user.Id; } - set { _user.Id = (int)value; } } public string Name { get { return _user.Name; } - set { _user.Name = value; } } - protected bool Equals(UserProfile other) + private bool Equals(WrappedUserProfile other) { return _user.Equals(other._user); } @@ -423,7 +658,7 @@ namespace Umbraco.Core.Models.Membership if (ReferenceEquals(null, obj)) return false; if (ReferenceEquals(this, obj)) return true; if (obj.GetType() != this.GetType()) return false; - return Equals((UserProfile) obj); + return Equals((WrappedUserProfile) obj); } public override int GetHashCode() diff --git a/src/Umbraco.Core/Models/Membership/UserGroup.cs b/src/Umbraco.Core/Models/Membership/UserGroup.cs index b0f10d9ff1..012e9b6cc2 100644 --- a/src/Umbraco.Core/Models/Membership/UserGroup.cs +++ b/src/Umbraco.Core/Models/Membership/UserGroup.cs @@ -1,20 +1,155 @@ using System; +using System.Collections.Generic; +using System.Reflection; using System.Runtime.Serialization; using Umbraco.Core.Models.EntityBase; +using Umbraco.Core.Strings; namespace Umbraco.Core.Models.Membership { /// /// Represents a Group for a Backoffice User /// - /// - /// Should be internal until a proper user/membership implementation - /// is part of the roadmap. - /// [Serializable] [DataContract(IsReference = true)] - internal class UserGroup : Entity + internal class UserGroup : Entity, IUserGroup, IReadOnlyUserGroup { - //Add UserCollection ? + private int? _startContentId; + private int? _startMediaId; + private string _alias; + private string _icon; + private string _name; + private IEnumerable _permissions; + private readonly List _sectionCollection; + + private static readonly Lazy Ps = new Lazy(); + + private class PropertySelectors + { + public readonly PropertyInfo NameSelector = ExpressionHelper.GetPropertyInfo(x => x.Name); + public readonly PropertyInfo AliasSelector = ExpressionHelper.GetPropertyInfo(x => x.Alias); + public readonly PropertyInfo PermissionsSelector = ExpressionHelper.GetPropertyInfo>(x => x.Permissions); + public readonly PropertyInfo IconSelector = ExpressionHelper.GetPropertyInfo(x => x.Icon); + public readonly PropertyInfo StartContentIdSelector = ExpressionHelper.GetPropertyInfo(x => x.StartContentId); + public readonly PropertyInfo StartMediaIdSelector = ExpressionHelper.GetPropertyInfo(x => x.StartMediaId); + + //Custom comparer for enumerable + public readonly DelegateEqualityComparer> StringEnumerableComparer = + new DelegateEqualityComparer>( + (enum1, enum2) => enum1.UnsortedSequenceEqual(enum2), + enum1 => enum1.GetHashCode()); + } + + /// + /// Constructor to create a new user group + /// + public UserGroup() + { + _sectionCollection = new List(); + } + + /// + /// Constructor to create an existing user group + /// + /// + /// + /// + /// + /// + public UserGroup(int userCount, string alias, string name, IEnumerable permissions, string icon) + : this() + { + UserCount = userCount; + _alias = alias; + _name = name; + _permissions = permissions; + _icon = icon; + } + + [DataMember] + public int? StartMediaId + { + get { return _startMediaId; } + set { SetPropertyValueAndDetectChanges(value, ref _startMediaId, Ps.Value.StartMediaIdSelector); } + } + + [DataMember] + public int? StartContentId + { + get { return _startContentId; } + set { SetPropertyValueAndDetectChanges(value, ref _startContentId, Ps.Value.StartContentIdSelector); } + } + + [DataMember] + public string Icon + { + get { return _icon; } + set { SetPropertyValueAndDetectChanges(value, ref _icon, Ps.Value.IconSelector); } + } + + [DataMember] + public string Alias + { + get { return _alias; } + set + { + SetPropertyValueAndDetectChanges( + value.ToCleanString(CleanStringType.Alias | CleanStringType.UmbracoCase), + ref _alias, + Ps.Value.AliasSelector); + } + } + + [DataMember] + public string Name + { + get { return _name; } + set { SetPropertyValueAndDetectChanges(value, ref _name, Ps.Value.NameSelector); } + } + + /// + /// The set of default permissions for the user group + /// + /// + /// By default each permission is simply a single char but we've made this an enumerable{string} to support a more flexible permissions structure in the future. + /// + [DataMember] + public IEnumerable Permissions + { + get { return _permissions; } + set + { + SetPropertyValueAndDetectChanges(value, ref _permissions, Ps.Value.PermissionsSelector, + Ps.Value.StringEnumerableComparer); + } + } + + public IEnumerable AllowedSections + { + get { return _sectionCollection; } + } + + public void RemoveAllowedSection(string sectionAlias) + { + if (_sectionCollection.Contains(sectionAlias)) + { + _sectionCollection.Remove(sectionAlias); + } + } + + public void AddAllowedSection(string sectionAlias) + { + if (_sectionCollection.Contains(sectionAlias) == false) + { + _sectionCollection.Add(sectionAlias); + } + } + + public void ClearAllowedSections() + { + _sectionCollection.Clear(); + } + + public int UserCount { get; private set; } } } \ No newline at end of file diff --git a/src/Umbraco.Core/Models/Membership/UserGroupExtensions.cs b/src/Umbraco.Core/Models/Membership/UserGroupExtensions.cs new file mode 100644 index 0000000000..ff2d302581 --- /dev/null +++ b/src/Umbraco.Core/Models/Membership/UserGroupExtensions.cs @@ -0,0 +1,26 @@ +using Umbraco.Core.Models.Rdbms; +using System.Linq; + +namespace Umbraco.Core.Models.Membership +{ + internal static class UserGroupExtensions + { + public static IReadOnlyUserGroup ToReadOnlyGroup(this IUserGroup group) + { + //this will generally always be the case + var readonlyGroup = group as IReadOnlyUserGroup; + if (readonlyGroup != null) return readonlyGroup; + + //otherwise create one + return new ReadOnlyUserGroup(group.Id, group.Name, group.Icon, group.StartContentId, group.StartMediaId, group.Alias, group.AllowedSections, group.Permissions); + } + + public static IReadOnlyUserGroup ToReadOnlyGroup(this UserGroupDto group) + { + return new ReadOnlyUserGroup(group.Id, group.Name, group.Icon, + group.StartContentId, group.StartMediaId, group.Alias, + group.UserGroup2AppDtos.Select(x => x.AppAlias).ToArray(), + group.DefaultPermissions == null ? Enumerable.Empty() : group.DefaultPermissions.ToCharArray().Select(x => x.ToString())); + } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Models/Membership/UserProfile.cs b/src/Umbraco.Core/Models/Membership/UserProfile.cs new file mode 100644 index 0000000000..d32854ab1b --- /dev/null +++ b/src/Umbraco.Core/Models/Membership/UserProfile.cs @@ -0,0 +1,46 @@ +using System; + +namespace Umbraco.Core.Models.Membership +{ + internal class UserProfile : IProfile, IEquatable + { + public UserProfile(int id, string name) + { + Id = id; + Name = name; + } + + public int Id { get; private set; } + public string Name { get; private set; } + + public bool Equals(UserProfile other) + { + if (ReferenceEquals(null, other)) return false; + if (ReferenceEquals(this, other)) return true; + return Id == other.Id; + } + + public override bool Equals(object obj) + { + if (ReferenceEquals(null, obj)) return false; + if (ReferenceEquals(this, obj)) return true; + if (obj.GetType() != this.GetType()) return false; + return Equals((UserProfile) obj); + } + + public override int GetHashCode() + { + return Id; + } + + public static bool operator ==(UserProfile left, UserProfile right) + { + return Equals(left, right); + } + + public static bool operator !=(UserProfile left, UserProfile right) + { + return Equals(left, right) == false; + } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Models/Membership/UserState.cs b/src/Umbraco.Core/Models/Membership/UserState.cs new file mode 100644 index 0000000000..5f6ee1615a --- /dev/null +++ b/src/Umbraco.Core/Models/Membership/UserState.cs @@ -0,0 +1,14 @@ +namespace Umbraco.Core.Models.Membership +{ + /// + /// The state of a user + /// + public enum UserState + { + All = -1, + Active = 0, + Disabled = 1, + LockedOut = 2, + Invited = 3 + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Models/Membership/UserType.cs b/src/Umbraco.Core/Models/Membership/UserType.cs index 01183e9d9d..13865efed9 100644 --- a/src/Umbraco.Core/Models/Membership/UserType.cs +++ b/src/Umbraco.Core/Models/Membership/UserType.cs @@ -1,72 +1,68 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Reflection; -using System.Runtime.Serialization; -using Umbraco.Core.Models.EntityBase; -using Umbraco.Core.Persistence.Mappers; -using Umbraco.Core.Strings; - -namespace Umbraco.Core.Models.Membership -{ - /// - /// Represents the Type for a Backoffice User - /// - [Serializable] - [DataContract(IsReference = true)] - internal class UserType : Entity, IUserType - { - private string _alias; - private string _name; - private IEnumerable _permissions; - - private static readonly Lazy Ps = new Lazy(); - - private class PropertySelectors - { - public readonly PropertyInfo NameSelector = ExpressionHelper.GetPropertyInfo(x => x.Name); - public readonly PropertyInfo AliasSelector = ExpressionHelper.GetPropertyInfo(x => x.Alias); - public readonly PropertyInfo PermissionsSelector = ExpressionHelper.GetPropertyInfo>(x => x.Permissions); - } - - [DataMember] - public string Alias - { - get { return _alias; } - set - { - SetPropertyValueAndDetectChanges( - value.ToCleanString(CleanStringType.Alias | CleanStringType.UmbracoCase), - ref _alias, - Ps.Value.AliasSelector); - } - } - - [DataMember] - public string Name - { - get { return _name; } - set { SetPropertyValueAndDetectChanges(value, ref _name, Ps.Value.NameSelector); } - } - - /// - /// The set of default permissions for the user type - /// - /// - /// By default each permission is simply a single char but we've made this an enumerable{string} to support a more flexible permissions structure in the future. - /// - [DataMember] - public IEnumerable Permissions - { - get { return _permissions; } - set - { - SetPropertyValueAndDetectChanges(value, ref _permissions, Ps.Value.PermissionsSelector, - //Custom comparer for enumerable - new DelegateEqualityComparer>( - (enum1, enum2) => enum1.UnsortedSequenceEqual(enum2), - enum1 => enum1.GetHashCode())); - } - } - } +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Reflection; +using System.Runtime.Serialization; +using Umbraco.Core.Models.EntityBase; +using Umbraco.Core.Strings; + +namespace Umbraco.Core.Models.Membership +{ + [Obsolete("This should not be used it exists for legacy reasons only, use user groups instead, it will be removed in future versions")] + [EditorBrowsable(EditorBrowsableState.Never)] + [Serializable] + [DataContract(IsReference = true)] + internal class UserType : Entity, IUserType + { + private string _alias; + private string _name; + private IEnumerable _permissions; + private static readonly Lazy Ps = new Lazy(); + private class PropertySelectors + { + public readonly PropertyInfo NameSelector = ExpressionHelper.GetPropertyInfo(x => x.Name); + public readonly PropertyInfo AliasSelector = ExpressionHelper.GetPropertyInfo(x => x.Alias); + public readonly PropertyInfo PermissionsSelector = ExpressionHelper.GetPropertyInfo>(x => x.Permissions); + } + + [DataMember] + public string Alias + { + get { return _alias; } + set + { + SetPropertyValueAndDetectChanges( + value.ToCleanString(CleanStringType.Alias | CleanStringType.UmbracoCase), + ref _alias, + Ps.Value.AliasSelector); + } + } + + [DataMember] + public string Name + { + get { return _name; } + set { SetPropertyValueAndDetectChanges(value, ref _name, Ps.Value.NameSelector); } + } + + /// + /// The set of default permissions for the user type + /// + /// + /// By default each permission is simply a single char but we've made this an enumerable{string} to support a more flexible permissions structure in the future. + /// + [DataMember] + public IEnumerable Permissions + { + get { return _permissions; } + set + { + SetPropertyValueAndDetectChanges(value, ref _permissions, Ps.Value.PermissionsSelector, + //Custom comparer for enumerable + new DelegateEqualityComparer>( + (enum1, enum2) => enum1.UnsortedSequenceEqual(enum2), + enum1 => enum1.GetHashCode())); + } + } + } } \ No newline at end of file diff --git a/src/Umbraco.Core/Models/PartialViewType.cs b/src/Umbraco.Core/Models/PartialViewType.cs index 6204b6e165..6740d1fdd9 100644 --- a/src/Umbraco.Core/Models/PartialViewType.cs +++ b/src/Umbraco.Core/Models/PartialViewType.cs @@ -4,6 +4,7 @@ { Unknown = 0, // default PartialView = 1, - PartialViewMacro = 2 + PartialViewMacro = 2, + MacroScript = 3 } } diff --git a/src/Umbraco.Core/Models/Property.cs b/src/Umbraco.Core/Models/Property.cs index dff6a712c7..5df2eaae90 100644 --- a/src/Umbraco.Core/Models/Property.cs +++ b/src/Umbraco.Core/Models/Property.cs @@ -49,36 +49,36 @@ namespace Umbraco.Core.Models { public readonly PropertyInfo ValueSelector = ExpressionHelper.GetPropertyInfo(x => x.Value); public readonly PropertyInfo VersionSelector = ExpressionHelper.GetPropertyInfo(x => x.Version); - } - private static readonly DelegateEqualityComparer ValueComparer = new DelegateEqualityComparer( - (o, o1) => - { - if (o == null && o1 == null) return true; - - //custom comparer for strings. - if (o is string || o1 is string) + public readonly DelegateEqualityComparer PropertyValueComparer = new DelegateEqualityComparer( + (o, o1) => { - //if one is null and another is empty then they are the same - if ((o as string).IsNullOrWhiteSpace() && (o1 as string).IsNullOrWhiteSpace()) + if (o == null && o1 == null) return true; + + //custom comparer for strings. + if (o is string || o1 is string) { - return true; + //if one is null and another is empty then they are the same + if ((o as string).IsNullOrWhiteSpace() && (o1 as string).IsNullOrWhiteSpace()) + { + return true; + } + if (o == null || o1 == null) return false; + return o.Equals(o1); } + if (o == null || o1 == null) return false; + + //Custom comparer for enumerable if it is enumerable + var enum1 = o as IEnumerable; + var enum2 = o1 as IEnumerable; + if (enum1 != null && enum2 != null) + { + return enum1.Cast().UnsortedSequenceEqual(enum2.Cast()); + } return o.Equals(o1); - } - - if (o == null || o1 == null) return false; - - //Custom comparer for enumerable if it is enumerable - var enum1 = o as IEnumerable; - var enum2 = o1 as IEnumerable; - if (enum1 != null && enum2 != null) - { - return enum1.Cast().UnsortedSequenceEqual(enum2.Cast()); - } - return o.Equals(o1); - }, o => o.GetHashCode()); + }, o => o.GetHashCode()); + } /// /// Returns the instance of the tag support, by default tags are not enabled @@ -200,7 +200,7 @@ namespace Umbraco.Core.Models } } - SetPropertyValueAndDetectChanges(value, ref _value, Ps.Value.ValueSelector, ValueComparer); + SetPropertyValueAndDetectChanges(value, ref _value, Ps.Value.ValueSelector, Ps.Value.PropertyValueComparer); } } diff --git a/src/Umbraco.Core/Models/Rdbms/DictionaryDto.cs b/src/Umbraco.Core/Models/Rdbms/DictionaryDto.cs index 712d1937a9..1e1940ad8d 100644 --- a/src/Umbraco.Core/Models/Rdbms/DictionaryDto.cs +++ b/src/Umbraco.Core/Models/Rdbms/DictionaryDto.cs @@ -24,7 +24,8 @@ namespace Umbraco.Core.Models.Rdbms public Guid? Parent { get; set; } [Column("key")] - [Length(1000)] + [Length(450)] + [Index(IndexTypes.NonClustered, Name = "IX_cmsDictionary_key")] public string Key { get; set; } [ResultColumn] diff --git a/src/Umbraco.Core/Models/Rdbms/User2UserGroupDto.cs b/src/Umbraco.Core/Models/Rdbms/User2UserGroupDto.cs new file mode 100644 index 0000000000..afdbf661b5 --- /dev/null +++ b/src/Umbraco.Core/Models/Rdbms/User2UserGroupDto.cs @@ -0,0 +1,19 @@ +using Umbraco.Core.Persistence; +using Umbraco.Core.Persistence.DatabaseAnnotations; + +namespace Umbraco.Core.Models.Rdbms +{ + [TableName("umbracoUser2UserGroup")] + [ExplicitColumns] + internal class User2UserGroupDto + { + [Column("userId")] + [PrimaryKeyColumn(AutoIncrement = false, Name = "PK_user2userGroup", OnColumns = "userId, userGroupId")] + [ForeignKey(typeof(UserDto))] + public int UserId { get; set; } + + [Column("userGroupId")] + [ForeignKey(typeof(UserGroupDto))] + public int UserGroupId { get; set; } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Models/Rdbms/UserDto.cs b/src/Umbraco.Core/Models/Rdbms/UserDto.cs index 05a93c86bf..75de20d626 100644 --- a/src/Umbraco.Core/Models/Rdbms/UserDto.cs +++ b/src/Umbraco.Core/Models/Rdbms/UserDto.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using Umbraco.Core.Persistence; using Umbraco.Core.Persistence.DatabaseAnnotations; +using Umbraco.Core.Persistence.DatabaseModelDefinitions; namespace Umbraco.Core.Models.Rdbms { @@ -10,6 +11,12 @@ namespace Umbraco.Core.Models.Rdbms [ExplicitColumns] internal class UserDto { + public UserDto() + { + UserGroupDtos = new List(); + UserStartNodeDtos = new HashSet(); + } + [Column("id")] [PrimaryKeyColumn(Name = "PK_user")] public int Id { get; set; } @@ -21,18 +28,7 @@ namespace Umbraco.Core.Models.Rdbms [Column("userNoConsole")] [Constraint(Default = "0")] public bool NoConsole { get; set; } - - [Column("userType")] - [ForeignKey(typeof(UserTypeDto))] - public short Type { get; set; } - - [Column("startStructureID")] - public int ContentStartId { get; set; } - - [Column("startMediaID")] - [NullSetting(NullSetting = NullSettings.Null)] - public int? MediaStartId { get; set; } - + [Column("userName")] public string UserName { get; set; } @@ -44,6 +40,14 @@ namespace Umbraco.Core.Models.Rdbms [Column("userPassword")] [Length(500)] public string Password { get; set; } + + /// + /// This will represent a JSON structure of how the password has been created (i.e hash algorithm, iterations) + /// + [Column("passwordConfig")] + [NullSetting(NullSetting = NullSettings.Null)] + [Length(500)] + public string PasswordConfig { get; set; } [Column("userEmail")] public string Email { get; set; } @@ -73,8 +77,36 @@ namespace Umbraco.Core.Models.Rdbms [Column("lastLoginDate")] [NullSetting(NullSetting = NullSettings.Null)] public DateTime? LastLoginDate { get; set; } - + + [Column("emailConfirmedDate")] + [NullSetting(NullSetting = NullSettings.Null)] + public DateTime? EmailConfirmedDate { get; set; } + + [Column("invitedDate")] + [NullSetting(NullSetting = NullSettings.Null)] + public DateTime? InvitedDate { get; set; } + + [Column("createDate")] + [NullSetting(NullSetting = NullSettings.NotNull)] + [Constraint(Default = SystemMethods.CurrentDateTime)] + public DateTime CreateDate { get; set; } + + [Column("updateDate")] + [NullSetting(NullSetting = NullSettings.NotNull)] + [Constraint(Default = SystemMethods.CurrentDateTime)] + public DateTime UpdateDate { get; set; } + + /// + /// Will hold the media file system relative path of the users custom avatar if they uploaded one + /// + [Column("avatar")] + [NullSetting(NullSetting = NullSettings.Null)] + public string Avatar { get; set; } + [ResultColumn] - public List User2AppDtos { get; set; } + public List UserGroupDtos { get; set; } + + [ResultColumn] + public HashSet UserStartNodeDtos { get; set; } } } \ No newline at end of file diff --git a/src/Umbraco.Core/Models/Rdbms/User2AppDto.cs b/src/Umbraco.Core/Models/Rdbms/UserGroup2AppDto.cs similarity index 54% rename from src/Umbraco.Core/Models/Rdbms/User2AppDto.cs rename to src/Umbraco.Core/Models/Rdbms/UserGroup2AppDto.cs index eafc6be230..14fc60e197 100644 --- a/src/Umbraco.Core/Models/Rdbms/User2AppDto.cs +++ b/src/Umbraco.Core/Models/Rdbms/UserGroup2AppDto.cs @@ -1,20 +1,19 @@ -using Umbraco.Core.Persistence; -using Umbraco.Core.Persistence.DatabaseAnnotations; - -namespace Umbraco.Core.Models.Rdbms -{ - [TableName("umbracoUser2app")] - [PrimaryKey("user", autoIncrement = false)] - [ExplicitColumns] - internal class User2AppDto - { - [Column("user")] - [PrimaryKeyColumn(AutoIncrement = false, Name = "PK_user2app", OnColumns = "user, app")] - [ForeignKey(typeof(UserDto))] - public int UserId { get; set; } - - [Column("app")] - [Length(50)] - public string AppAlias { get; set; } - } +using Umbraco.Core.Persistence; +using Umbraco.Core.Persistence.DatabaseAnnotations; + +namespace Umbraco.Core.Models.Rdbms +{ + [TableName("umbracoUserGroup2App")] + [ExplicitColumns] + internal class UserGroup2AppDto + { + [Column("userGroupId")] + [PrimaryKeyColumn(AutoIncrement = false, Name = "PK_userGroup2App", OnColumns = "userGroupId, app")] + [ForeignKey(typeof(UserGroupDto))] + public int UserGroupId { get; set; } + + [Column("app")] + [Length(50)] + public string AppAlias { get; set; } + } } \ No newline at end of file diff --git a/src/Umbraco.Core/Models/Rdbms/User2NodePermissionDto.cs b/src/Umbraco.Core/Models/Rdbms/UserGroup2NodePermissionDto.cs similarity index 59% rename from src/Umbraco.Core/Models/Rdbms/User2NodePermissionDto.cs rename to src/Umbraco.Core/Models/Rdbms/UserGroup2NodePermissionDto.cs index f0d769a21e..8c75dcf4f7 100644 --- a/src/Umbraco.Core/Models/Rdbms/User2NodePermissionDto.cs +++ b/src/Umbraco.Core/Models/Rdbms/UserGroup2NodePermissionDto.cs @@ -3,15 +3,14 @@ using Umbraco.Core.Persistence.DatabaseAnnotations; namespace Umbraco.Core.Models.Rdbms { - [TableName("umbracoUser2NodePermission")] - [PrimaryKey("userId", autoIncrement = false)] + [TableName("umbracoUserGroup2NodePermission")] [ExplicitColumns] - internal class User2NodePermissionDto + internal class UserGroup2NodePermissionDto { - [Column("userId")] - [PrimaryKeyColumn(AutoIncrement = false, Name = "PK_umbracoUser2NodePermission", OnColumns = "userId, nodeId, permission")] - [ForeignKey(typeof(UserDto))] - public int UserId { get; set; } + [Column("userGroupId")] + [PrimaryKeyColumn(AutoIncrement = false, Name = "PK_umbracoUserGroup2NodePermission", OnColumns = "userGroupId, nodeId, permission")] + [ForeignKey(typeof(UserGroupDto))] + public int UserGroupId { get; set; } [Column("nodeId")] [ForeignKey(typeof(NodeDto))] diff --git a/src/Umbraco.Core/Models/Rdbms/UserGroupDto.cs b/src/Umbraco.Core/Models/Rdbms/UserGroupDto.cs new file mode 100644 index 0000000000..fdad78bfcd --- /dev/null +++ b/src/Umbraco.Core/Models/Rdbms/UserGroupDto.cs @@ -0,0 +1,69 @@ +using System; +using System.Collections.Generic; +using Umbraco.Core.Persistence; +using Umbraco.Core.Persistence.DatabaseAnnotations; +using Umbraco.Core.Persistence.DatabaseModelDefinitions; + +namespace Umbraco.Core.Models.Rdbms +{ + [TableName("umbracoUserGroup")] + [PrimaryKey("id")] + [ExplicitColumns] + internal class UserGroupDto + { + public UserGroupDto() + { + UserGroup2AppDtos = new List(); + } + + [Column("id")] + [PrimaryKeyColumn(IdentitySeed = 5)] + public int Id { get; set; } + + [Column("userGroupAlias")] + [Length(200)] + [Index(IndexTypes.UniqueNonClustered, Name = "IX_umbracoUserGroup_userGroupAlias")] + public string Alias { get; set; } + + [Column("userGroupName")] + [Length(200)] + [Index(IndexTypes.UniqueNonClustered, Name = "IX_umbracoUserGroup_userGroupName")] + public string Name { get; set; } + + [Column("userGroupDefaultPermissions")] + [Length(50)] + [NullSetting(NullSetting = NullSettings.Null)] + public string DefaultPermissions { get; set; } + + [Column("createDate")] + [NullSetting(NullSetting = NullSettings.NotNull)] + [Constraint(Default = SystemMethods.CurrentDateTime)] + public DateTime CreateDate { get; set; } + + [Column("updateDate")] + [NullSetting(NullSetting = NullSettings.NotNull)] + [Constraint(Default = SystemMethods.CurrentDateTime)] + public DateTime UpdateDate { get; set; } + + [Column("icon")] + [NullSetting(NullSetting = NullSettings.Null)] + public string Icon { get; set; } + + [Column("startContentId")] + [NullSetting(NullSetting = NullSettings.Null)] + public int? StartContentId { get; set; } + + [Column("startMediaId")] + [NullSetting(NullSetting = NullSettings.Null)] + public int? StartMediaId { get; set; } + + [ResultColumn] + public List UserGroup2AppDtos { get; set; } + + /// + /// This is only relevant when this column is included in the results (i.e. GetUserGroupsWithUserCounts) + /// + [ResultColumn] + public int UserCount { get; set; } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Models/Rdbms/UserStartNodeDto.cs b/src/Umbraco.Core/Models/Rdbms/UserStartNodeDto.cs new file mode 100644 index 0000000000..fa8af80759 --- /dev/null +++ b/src/Umbraco.Core/Models/Rdbms/UserStartNodeDto.cs @@ -0,0 +1,67 @@ +using System; +using Umbraco.Core.Persistence; +using Umbraco.Core.Persistence.DatabaseAnnotations; + +namespace Umbraco.Core.Models.Rdbms +{ + [TableName("umbracoUserStartNode")] + [PrimaryKey("id", autoIncrement = true)] + [ExplicitColumns] + internal class UserStartNodeDto : IEquatable + { + [Column("id")] + [PrimaryKeyColumn(Name = "PK_userStartNode")] + public int Id { get; set; } + + [Column("userId")] + [NullSetting(NullSetting = NullSettings.NotNull)] + [ForeignKey(typeof(UserDto))] + public int UserId { get; set; } + + [Column("startNode")] + [NullSetting(NullSetting = NullSettings.NotNull)] + [ForeignKey(typeof(NodeDto))] + public int StartNode { get; set; } + + [Column("startNodeType")] + [NullSetting(NullSetting = NullSettings.NotNull)] + [Index(IndexTypes.UniqueNonClustered, ForColumns = "startNodeType, startNode, userId", Name = "IX_umbracoUserStartNode_startNodeType")] + public int StartNodeType { get; set; } + + public enum StartNodeTypeValue + { + Content = 1, + Media = 2 + } + + public bool Equals(UserStartNodeDto other) + { + if (ReferenceEquals(null, other)) return false; + if (ReferenceEquals(this, other)) return true; + return Id == other.Id; + } + + public override bool Equals(object obj) + { + if (ReferenceEquals(null, obj)) return false; + if (ReferenceEquals(this, obj)) return true; + if (obj.GetType() != this.GetType()) return false; + return Equals((UserStartNodeDto) obj); + } + + public override int GetHashCode() + { + return Id; + } + + public static bool operator ==(UserStartNodeDto left, UserStartNodeDto right) + { + return Equals(left, right); + } + + public static bool operator !=(UserStartNodeDto left, UserStartNodeDto right) + { + return !Equals(left, right); + } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Models/Rdbms/UserTypeDto.cs b/src/Umbraco.Core/Models/Rdbms/UserTypeDto.cs index d3268a14fb..cff36f6c32 100644 --- a/src/Umbraco.Core/Models/Rdbms/UserTypeDto.cs +++ b/src/Umbraco.Core/Models/Rdbms/UserTypeDto.cs @@ -1,8 +1,10 @@ -using Umbraco.Core.Persistence; +using System; +using Umbraco.Core.Persistence; using Umbraco.Core.Persistence.DatabaseAnnotations; namespace Umbraco.Core.Models.Rdbms { + [Obsolete("Table no longer exists as of 7.6 - retained only to support migrations from previous versions")] [TableName("umbracoUserType")] [PrimaryKey("id")] [ExplicitColumns] diff --git a/src/Umbraco.Core/Models/UmbracoObjectTypes.cs b/src/Umbraco.Core/Models/UmbracoObjectTypes.cs index 9de461c7bb..3a196dda00 100644 --- a/src/Umbraco.Core/Models/UmbracoObjectTypes.cs +++ b/src/Umbraco.Core/Models/UmbracoObjectTypes.cs @@ -38,14 +38,6 @@ namespace Umbraco.Core.Models [UmbracoUdiType(Constants.UdiEntityType.Document)] Document, - /// - /// Document - /// - [UmbracoObjectType(Constants.ObjectTypes.DocumentBlueprint, typeof(IContent))] - [FriendlyName("DocumentBlueprint")] - [UmbracoUdiType(Constants.UdiEntityType.DocumentBluePrint)] - DocumentBlueprint, - /// /// Media /// @@ -193,6 +185,14 @@ namespace Umbraco.Core.Models /// [UmbracoObjectType(Constants.ObjectTypes.Language)] [FriendlyName("Language")] - Language + Language, + + /// + /// Document + /// + [UmbracoObjectType(Constants.ObjectTypes.DocumentBlueprint, typeof(IContent))] + [FriendlyName("DocumentBlueprint")] + [UmbracoUdiType(Constants.UdiEntityType.DocumentBluePrint)] + DocumentBlueprint } } \ No newline at end of file diff --git a/src/Umbraco.Core/Models/UmbracoObjectTypesExtensions.cs b/src/Umbraco.Core/Models/UmbracoObjectTypesExtensions.cs index 5f92e6425e..bacac30396 100644 --- a/src/Umbraco.Core/Models/UmbracoObjectTypesExtensions.cs +++ b/src/Umbraco.Core/Models/UmbracoObjectTypesExtensions.cs @@ -68,15 +68,14 @@ namespace Umbraco.Core.Models { return UmbracoObjectTypeCache.GetOrAdd(umbracoObjectType, types => { - var type = typeof(UmbracoObjectTypes); - var memInfo = type.GetMember(umbracoObjectType.ToString()); - var attributes = memInfo[0].GetCustomAttributes(typeof(UmbracoObjectTypeAttribute), - false); + var type = typeof (UmbracoObjectTypes); + var memberInfo = type.GetMember(umbracoObjectType.ToString()); + var attributes = memberInfo[0].GetCustomAttributes(typeof (UmbracoObjectTypeAttribute), false); if (attributes.Length == 0) return Guid.Empty; - var attribute = ((UmbracoObjectTypeAttribute)attributes[0]); + var attribute = (UmbracoObjectTypeAttribute) attributes[0]; if (attribute == null) return Guid.Empty; diff --git a/src/Umbraco.Core/Models/UserControl.cs b/src/Umbraco.Core/Models/UserControl.cs new file mode 100644 index 0000000000..6af4cd74cc --- /dev/null +++ b/src/Umbraco.Core/Models/UserControl.cs @@ -0,0 +1,32 @@ +using System; +using System.Runtime.Serialization; + +namespace Umbraco.Core.Models +{ + /// + /// Represents a UserControl file + /// + [Serializable] + [DataContract(IsReference = true)] + public class UserControl : File, IUserControl + { + public UserControl(string path) + : this(path, (Func)null) + { } + + internal UserControl(string path, Func getFileContent) + : base(path, getFileContent) + { } + + /// + /// Indicates whether the current entity has an identity, which in this case is a path/name. + /// + /// + /// Overrides the default Entity identity check. + /// + public override bool HasIdentity + { + get { return string.IsNullOrEmpty(Path) == false; } + } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Models/UserExtensions.cs b/src/Umbraco.Core/Models/UserExtensions.cs index ece63b4889..9fd97585c8 100644 --- a/src/Umbraco.Core/Models/UserExtensions.cs +++ b/src/Umbraco.Core/Models/UserExtensions.cs @@ -1,5 +1,11 @@ using System; +using System.Collections.Generic; using System.Globalization; +using System.Linq; +using System.Net; +using Umbraco.Core.Cache; +using Umbraco.Core.IO; +using Umbraco.Core.Models.Identity; using Umbraco.Core.Models.Membership; using Umbraco.Core.Services; @@ -7,12 +13,81 @@ namespace Umbraco.Core.Models { public static class UserExtensions { + /// + /// Tries to lookup the user's gravatar to see if the endpoint can be reached, if so it returns the valid URL + /// + /// + /// + /// + /// + /// A list of 5 different sized avatar URLs + /// + internal static string[] GetCurrentUserAvatarUrls(this IUser user, IUserService userService, ICacheProvider staticCache) + { + //check if the user has explicitly removed all avatars including a gravatar, this will be possible and the value will be "none" + if (user.Avatar == "none") + { + return new string[0]; + } + + if (user.Avatar.IsNullOrWhiteSpace()) + { + var gravatarHash = user.Email.ToMd5(); + var gravatarUrl = "https://www.gravatar.com/avatar/" + gravatarHash + "?d=404"; + + //try gravatar + var gravatarAccess = staticCache.GetCacheItem("UserAvatar" + user.Id, () => + { + // Test if we can reach this URL, will fail when there's network or firewall errors + var request = (HttpWebRequest)WebRequest.Create(gravatarUrl); + // Require response within 10 seconds + request.Timeout = 10000; + try + { + using ((HttpWebResponse)request.GetResponse()) { } + } + catch (Exception) + { + // There was an HTTP or other error, return an null instead + return false; + } + return true; + }); + + if (gravatarAccess) + { + return new[] + { + gravatarUrl + "&s=30", + gravatarUrl + "&s=60", + gravatarUrl + "&s=90", + gravatarUrl + "&s=150", + gravatarUrl + "&s=300" + }; + } + + return new string[0]; + } + + //use the custom avatar + var avatarUrl = FileSystemProviderManager.Current.MediaFileSystem.GetUrl(user.Avatar); + return new[] + { + avatarUrl + "?width=30&height=30&mode=crop", + avatarUrl + "?width=60&height=60&mode=crop", + avatarUrl + "?width=90&height=90&mode=crop", + avatarUrl + "?width=150&height=150&mode=crop", + avatarUrl + "?width=300&height=300&mode=crop" + }; + + } + /// /// Returns the culture info associated with this user, based on the language they're assigned to in the back office /// /// /// - /// + /// public static CultureInfo GetUserCulture(this IUser user, ILocalizedTextService textService) { if (user == null) throw new ArgumentNullException("user"); @@ -25,7 +100,7 @@ namespace Umbraco.Core.Models try { var culture = CultureInfo.GetCultureInfo(userLanguage.Replace("_", "-")); - //TODO: This is a hack because we store the user language as 2 chars instead of the full culture + //TODO: This is a hack because we store the user language as 2 chars instead of the full culture // which is actually stored in the language files (which are also named with 2 chars!) so we need to attempt // to convert to a supported full culture var result = textService.ConvertToSupportedCultureWithRegionCode(culture); @@ -38,50 +113,59 @@ namespace Umbraco.Core.Models } } - /// - /// Checks if the user has access to the content item based on their start noe - /// - /// - /// - /// - internal static bool HasPathAccess(this IUser user, IContent content) + internal static bool HasContentRootAccess(this IUser user, IEntityService entityService) { - if (user == null) throw new ArgumentNullException("user"); - if (content == null) throw new ArgumentNullException("content"); - return HasPathAccess(content.Path, user.StartContentId, Constants.System.RecycleBinContent); + return HasPathAccess(Constants.System.Root.ToInvariantString(), user.CalculateContentStartNodeIds(entityService), Constants.System.RecycleBinContent); } - internal static bool HasPathAccess(string path, int startNodeId, int recycleBinId) + internal static bool HasContentBinAccess(this IUser user, IEntityService entityService) { - Mandate.ParameterNotNullOrEmpty(path, "path"); + return HasPathAccess(Constants.System.RecycleBinContent.ToInvariantString(), user.CalculateContentStartNodeIds(entityService), Constants.System.RecycleBinContent); + } + + internal static bool HasMediaRootAccess(this IUser user, IEntityService entityService) + { + return HasPathAccess(Constants.System.Root.ToInvariantString(), user.CalculateMediaStartNodeIds(entityService), Constants.System.RecycleBinMedia); + } + + internal static bool HasMediaBinAccess(this IUser user, IEntityService entityService) + { + return HasPathAccess(Constants.System.RecycleBinMedia.ToInvariantString(), user.CalculateMediaStartNodeIds(entityService), Constants.System.RecycleBinMedia); + } + + internal static bool HasPathAccess(this IUser user, IContent content, IEntityService entityService) + { + return HasPathAccess(content.Path, user.CalculateContentStartNodeIds(entityService), Constants.System.RecycleBinContent); + } + + internal static bool HasPathAccess(this IUser user, IMedia media, IEntityService entityService) + { + return HasPathAccess(media.Path, user.CalculateMediaStartNodeIds(entityService), Constants.System.RecycleBinMedia); + } + + internal static bool HasPathAccess(string path, int[] startNodeIds, int recycleBinId) + { + if (string.IsNullOrWhiteSpace(path)) throw new ArgumentException("Value cannot be null or whitespace.", "path"); + + // check for no access + if (startNodeIds.Length == 0) + return false; + + // check for root access + if (startNodeIds.Contains(Constants.System.Root)) + return true; var formattedPath = "," + path + ","; - var formattedStartNodeId = "," + startNodeId.ToInvariantString() + ","; - var formattedRecycleBinId = "," + recycleBinId.ToInvariantString() + ","; - //only users with root access have access to the recycle bin - if (formattedPath.Contains(formattedRecycleBinId)) - { - return startNodeId == Constants.System.Root; - } + // only users with root access have access to the recycle bin, + // if the above check didn't pass then access is denied + if (formattedPath.Contains("," + recycleBinId + ",")) + return false; - return formattedPath.Contains(formattedStartNodeId); + // check for a start node in the path + return startNodeIds.Any(x => formattedPath.Contains("," + x + ",")); } - /// - /// Checks if the user has access to the media item based on their start noe - /// - /// - /// - /// - internal static bool HasPathAccess(this IUser user, IMedia media) - { - if (user == null) throw new ArgumentNullException("user"); - if (media == null) throw new ArgumentNullException("media"); - return HasPathAccess(media.Path, user.StartMediaId, Constants.System.RecycleBinMedia); - } - - /// /// Determines whether this user is an admin. /// @@ -92,7 +176,133 @@ namespace Umbraco.Core.Models public static bool IsAdmin(this IUser user) { if (user == null) throw new ArgumentNullException("user"); - return user.UserType.Alias == "admin"; + return user.Groups != null && user.Groups.Any(x => x.Alias == Constants.Security.AdminGroupAlias); + } + + // calc. start nodes, combining groups' and user's, and excluding what's in the bin + public static int[] CalculateContentStartNodeIds(this IUser user, IEntityService entityService) + { + const string cacheKey = "AllContentStartNodes"; + //try to look them up from cache so we don't recalculate + var valuesInUserCache = FromUserCache(user, cacheKey); + if (valuesInUserCache != null) return valuesInUserCache; + + var gsn = user.Groups.Where(x => x.StartContentId.HasValue).Select(x => x.StartContentId.Value).Distinct().ToArray(); + var usn = user.StartContentIds; + var vals = CombineStartNodes(UmbracoObjectTypes.Document, gsn, usn, entityService); + ToUserCache(user, cacheKey, vals); + return vals; + } + + // calc. start nodes, combining groups' and user's, and excluding what's in the bin + public static int[] CalculateMediaStartNodeIds(this IUser user, IEntityService entityService) + { + const string cacheKey = "AllMediaStartNodes"; + //try to look them up from cache so we don't recalculate + var valuesInUserCache = FromUserCache(user, cacheKey); + if (valuesInUserCache != null) return valuesInUserCache; + + var gsn = user.Groups.Where(x => x.StartMediaId.HasValue).Select(x => x.StartMediaId.Value).Distinct().ToArray(); + var usn = user.StartMediaIds; + var vals = CombineStartNodes(UmbracoObjectTypes.Media, gsn, usn, entityService); + ToUserCache(user, cacheKey, vals); + return vals; + } + + private static int[] FromUserCache(IUser user, string cacheKey) + { + var entityUser = user as User; + if (entityUser == null) return null; + + lock (entityUser.AdditionalDataLock) + { + object allContentStartNodes; + return entityUser.AdditionalData.TryGetValue(cacheKey, out allContentStartNodes) + ? allContentStartNodes as int[] + : null; + } + } + + private static void ToUserCache(IUser user, string cacheKey, int[] vals) + { + var entityUser = user as User; + if (entityUser == null) return; + + lock (entityUser.AdditionalDataLock) + { + entityUser.AdditionalData[cacheKey] = vals; + } + } + + private static bool StartsWithPath(string test, string path) + { + return test.StartsWith(path) && test.Length > path.Length && test[path.Length] == ','; + } + + private static string GetBinPath(UmbracoObjectTypes objectType) + { + var binPath = Constants.System.Root + ","; + switch (objectType) + { + case UmbracoObjectTypes.Document: + binPath += Constants.System.RecycleBinContent; + break; + case UmbracoObjectTypes.Media: + binPath += Constants.System.RecycleBinMedia; + break; + default: + throw new ArgumentOutOfRangeException("objectType"); + } + return binPath; + } + + internal static int[] CombineStartNodes(UmbracoObjectTypes objectType, int[] groupSn, int[] userSn, IEntityService entityService) + { + // assume groupSn and userSn each don't contain duplicates + + var asn = groupSn.Concat(userSn).Distinct().ToArray(); + var paths = entityService.GetAllPaths(objectType, asn).ToDictionary(x => x.Id, x => x.Path); + + paths[Constants.System.Root] = Constants.System.Root.ToString(); // entityService does not get that one + + var binPath = GetBinPath(objectType); + + var lsn = new List(); + foreach (var sn in groupSn) + { + string snp; + if (paths.TryGetValue(sn, out snp) == false) continue; // ignore rogue node (no path) + + if (StartsWithPath(snp, binPath)) continue; // ignore bin + + if (lsn.Any(x => StartsWithPath(snp, paths[x]))) continue; // skip if something above this sn + lsn.RemoveAll(x => StartsWithPath(paths[x], snp)); // remove anything below this sn + lsn.Add(sn); + } + + var usn = new List(); + foreach (var sn in userSn) + { + if (groupSn.Contains(sn)) continue; // ignore, already there + + string snp; + if (paths.TryGetValue(sn, out snp) == false) continue; // ignore rogue node (no path) + + if (StartsWithPath(snp, binPath)) continue; // ignore bin + + if (usn.Any(x => StartsWithPath(paths[x], snp))) continue; // skip if something below this sn + usn.RemoveAll(x => StartsWithPath(snp, paths[x])); // remove anything above this sn + usn.Add(sn); + } + + foreach (var sn in usn) + { + var snp = paths[sn]; // has to be here now + lsn.RemoveAll(x => StartsWithPath(snp, paths[x]) || StartsWithPath(paths[x], snp)); // remove anything above or below this sn + lsn.Add(sn); + } + + return lsn.ToArray(); } } } \ No newline at end of file diff --git a/src/Umbraco.Core/Persistence/Factories/UmbracoEntityFactory.cs b/src/Umbraco.Core/Persistence/Factories/UmbracoEntityFactory.cs index ded7c60676..86594836db 100644 --- a/src/Umbraco.Core/Persistence/Factories/UmbracoEntityFactory.cs +++ b/src/Umbraco.Core/Persistence/Factories/UmbracoEntityFactory.cs @@ -36,7 +36,7 @@ namespace Umbraco.Core.Persistence.Factories entity.DisableChangeTracking(); entity.CreateDate = d.createDate; - entity.CreatorId = d.nodeUser; + entity.CreatorId = d.nodeUser == null ? 0 : d.nodeUser; entity.Id = d.id; entity.Key = d.uniqueID; entity.Level = d.level; diff --git a/src/Umbraco.Core/Persistence/Factories/UserFactory.cs b/src/Umbraco.Core/Persistence/Factories/UserFactory.cs index 0a13c82447..e4e0d939f7 100644 --- a/src/Umbraco.Core/Persistence/Factories/UserFactory.cs +++ b/src/Umbraco.Core/Persistence/Factories/UserFactory.cs @@ -7,47 +7,35 @@ using Umbraco.Core.Models.Rdbms; namespace Umbraco.Core.Persistence.Factories { - internal class UserFactory + internal static class UserFactory { - private readonly IUserType _userType; - - public UserFactory(IUserType userType) + public static IUser BuildEntity(UserDto dto) { - _userType = userType; - } - - #region Implementation of IEntityFactory - - public IUser BuildEntity(UserDto dto) - { - var guidId = dto.Id.ToGuid(); - var user = new User(_userType); + var guidId = dto.Id.ToGuid(); + + var user = new User(dto.Id, dto.UserName, dto.Email, dto.Login,dto.Password, + dto.UserGroupDtos.Select(x => x.ToReadOnlyGroup()).ToArray(), + dto.UserStartNodeDtos.Where(x => x.StartNodeType == (int)UserStartNodeDto.StartNodeTypeValue.Content).Select(x => x.StartNode).ToArray(), + dto.UserStartNodeDtos.Where(x => x.StartNodeType == (int)UserStartNodeDto.StartNodeTypeValue.Media).Select(x => x.StartNode).ToArray()); try { user.DisableChangeTracking(); - - user.Id = dto.Id; + user.Key = guidId; - user.StartContentId = dto.ContentStartId; - user.StartMediaId = dto.MediaStartId.HasValue ? dto.MediaStartId.Value : -1; - user.RawPasswordValue = dto.Password; - user.Username = dto.Login; - user.Name = dto.UserName; user.IsLockedOut = dto.NoConsole; user.IsApproved = dto.Disabled == false; - user.Email = dto.Email; user.Language = dto.UserLanguage; user.SecurityStamp = dto.SecurityStampToken; user.FailedPasswordAttempts = dto.FailedLoginAttempts ?? 0; user.LastLockoutDate = dto.LastLockoutDate ?? DateTime.MinValue; user.LastLoginDate = dto.LastLoginDate ?? DateTime.MinValue; user.LastPasswordChangeDate = dto.LastPasswordChangeDate ?? DateTime.MinValue; - - foreach (var app in dto.User2AppDtos) - { - user.AddAllowedSection(app.AppAlias); - } + user.CreateDate = dto.CreateDate; + user.UpdateDate = dto.UpdateDate; + user.Avatar = dto.Avatar; + user.EmailConfirmedDate = dto.EmailConfirmedDate; + user.InvitedDate = dto.InvitedDate; //on initial construction we don't want to have dirty properties tracked // http://issues.umbraco.org/issue/U4-1946 @@ -61,48 +49,55 @@ namespace Umbraco.Core.Persistence.Factories } } - public UserDto BuildDto(IUser entity) + public static UserDto BuildDto(IUser entity) { var dto = new UserDto - { - ContentStartId = entity.StartContentId, - MediaStartId = entity.StartMediaId, - Disabled = entity.IsApproved == false, - Email = entity.Email, - Login = entity.Username, - NoConsole = entity.IsLockedOut, - Password = entity.RawPasswordValue, - UserLanguage = entity.Language, - UserName = entity.Name, - Type = short.Parse(entity.UserType.Id.ToString(CultureInfo.InvariantCulture)), - User2AppDtos = new List(), - SecurityStampToken = entity.SecurityStamp, - FailedLoginAttempts = entity.FailedPasswordAttempts, - LastLockoutDate = entity.LastLockoutDate == DateTime.MinValue ? (DateTime?)null : entity.LastLockoutDate, - LastLoginDate = entity.LastLoginDate == DateTime.MinValue ? (DateTime?)null : entity.LastLoginDate, - LastPasswordChangeDate = entity.LastPasswordChangeDate == DateTime.MinValue ? (DateTime?)null : entity.LastPasswordChangeDate, - }; + { + Disabled = entity.IsApproved == false, + Email = entity.Email, + Login = entity.Username, + NoConsole = entity.IsLockedOut, + Password = entity.RawPasswordValue, + UserLanguage = entity.Language, + UserName = entity.Name, + SecurityStampToken = entity.SecurityStamp, + FailedLoginAttempts = entity.FailedPasswordAttempts, + LastLockoutDate = entity.LastLockoutDate == DateTime.MinValue ? (DateTime?)null : entity.LastLockoutDate, + LastLoginDate = entity.LastLoginDate == DateTime.MinValue ? (DateTime?)null : entity.LastLoginDate, + LastPasswordChangeDate = entity.LastPasswordChangeDate == DateTime.MinValue ? (DateTime?)null : entity.LastPasswordChangeDate, + CreateDate = entity.CreateDate, + UpdateDate = entity.UpdateDate, + Avatar = entity.Avatar, + EmailConfirmedDate = entity.EmailConfirmedDate, + InvitedDate = entity.InvitedDate + }; - foreach (var app in entity.AllowedSections) + foreach (var startNodeId in entity.StartContentIds) { - var appDto = new User2AppDto - { - AppAlias = app - }; - if (entity.HasIdentity) + dto.UserStartNodeDtos.Add(new UserStartNodeDto { - appDto.UserId = (int) entity.Id; - } + StartNode = startNodeId, + StartNodeType = (int)UserStartNodeDto.StartNodeTypeValue.Content, + UserId = entity.Id + }); + } - dto.User2AppDtos.Add(appDto); + foreach (var startNodeId in entity.StartMediaIds) + { + dto.UserStartNodeDtos.Add(new UserStartNodeDto + { + StartNode = startNodeId, + StartNodeType = (int)UserStartNodeDto.StartNodeTypeValue.Media, + UserId = entity.Id + }); } if (entity.HasIdentity) + { dto.Id = entity.Id.SafeCast(); + } return dto; - } - - #endregion + } } } \ No newline at end of file diff --git a/src/Umbraco.Core/Persistence/Factories/UserGroupFactory.cs b/src/Umbraco.Core/Persistence/Factories/UserGroupFactory.cs new file mode 100644 index 0000000000..f4ecffca54 --- /dev/null +++ b/src/Umbraco.Core/Persistence/Factories/UserGroupFactory.cs @@ -0,0 +1,80 @@ +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using Umbraco.Core.Models.Membership; +using Umbraco.Core.Models.Rdbms; + +namespace Umbraco.Core.Persistence.Factories +{ + internal static class UserGroupFactory + { + public static IUserGroup BuildEntity(UserGroupDto dto) + { + var userGroup = new UserGroup(dto.UserCount, dto.Alias, dto.Name, + dto.DefaultPermissions.IsNullOrWhiteSpace() + ? Enumerable.Empty() + : dto.DefaultPermissions.ToCharArray().Select(x => x.ToString(CultureInfo.InvariantCulture)).ToList(), + dto.Icon); + + try + { + userGroup.DisableChangeTracking(); + userGroup.Id = dto.Id; + userGroup.CreateDate = dto.CreateDate; + userGroup.UpdateDate = dto.UpdateDate; + userGroup.StartContentId = dto.StartContentId; + userGroup.StartMediaId = dto.StartMediaId; + if (dto.UserGroup2AppDtos != null) + { + foreach (var app in dto.UserGroup2AppDtos) + { + userGroup.AddAllowedSection(app.AppAlias); + } + } + + userGroup.ResetDirtyProperties(false); + return userGroup; + } + finally + { + userGroup.EnableChangeTracking(); + } + } + + public static UserGroupDto BuildDto(IUserGroup entity) + { + var dto = new UserGroupDto + { + Alias = entity.Alias, + DefaultPermissions = entity.Permissions == null ? "" : string.Join("", entity.Permissions), + Name = entity.Name, + UserGroup2AppDtos = new List(), + CreateDate = entity.CreateDate, + UpdateDate = entity.UpdateDate, + Icon = entity.Icon, + StartMediaId = entity.StartMediaId, + StartContentId = entity.StartContentId + }; + + foreach (var app in entity.AllowedSections) + { + var appDto = new UserGroup2AppDto + { + AppAlias = app + }; + if (entity.HasIdentity) + { + appDto.UserGroupId = entity.Id; + } + + dto.UserGroup2AppDtos.Add(appDto); + } + + if (entity.HasIdentity) + dto.Id = short.Parse(entity.Id.ToString()); + + return dto; + } + + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Persistence/Factories/UserSectionFactory.cs b/src/Umbraco.Core/Persistence/Factories/UserSectionFactory.cs deleted file mode 100644 index 0e6a17594f..0000000000 --- a/src/Umbraco.Core/Persistence/Factories/UserSectionFactory.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System.Collections.Generic; -using System.Linq; -using AutoMapper; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Membership; -using Umbraco.Core.Models.Rdbms; - -namespace Umbraco.Core.Persistence.Factories -{ - internal class UserSectionFactory - { - private readonly IUser _user; - - public UserSectionFactory(IUser user) - { - _user = user; - } - - public IEnumerable BuildEntity(IEnumerable dto) - { - return dto.Select(x => x.AppAlias); - } - - public IEnumerable BuildDto(IEnumerable entity) - { - return entity.Select(x => new User2AppDto - { - //NOTE: We're force casting to int here! this might not work in the future - UserId = (int)_user.Id, - AppAlias = x - }); - } - - } -} \ No newline at end of file diff --git a/src/Umbraco.Core/Persistence/Factories/UserTypeFactory.cs b/src/Umbraco.Core/Persistence/Factories/UserTypeFactory.cs deleted file mode 100644 index 5f9cfac994..0000000000 --- a/src/Umbraco.Core/Persistence/Factories/UserTypeFactory.cs +++ /dev/null @@ -1,54 +0,0 @@ -using System.Globalization; -using System.Linq; -using Umbraco.Core.Models.Membership; -using Umbraco.Core.Models.Rdbms; - -namespace Umbraco.Core.Persistence.Factories -{ - internal class UserTypeFactory - { - #region Implementation of IEntityFactory - - public IUserType BuildEntity(UserTypeDto dto) - { - var userType = new UserType(); - - try - { - userType.DisableChangeTracking(); - - userType.Alias = dto.Alias; - userType.Id = dto.Id; - userType.Name = dto.Name; - userType.Permissions = dto.DefaultPermissions.IsNullOrWhiteSpace() - ? Enumerable.Empty() - : dto.DefaultPermissions.ToCharArray().Select(x => x.ToString(CultureInfo.InvariantCulture)); - //on initial construction we don't want to have dirty properties tracked - // http://issues.umbraco.org/issue/U4-1946 - userType.ResetDirtyProperties(false); - return userType; - } - finally - { - userType.EnableChangeTracking(); - } - } - - public UserTypeDto BuildDto(IUserType entity) - { - var userType = new UserTypeDto - { - Alias = entity.Alias, - DefaultPermissions = entity.Permissions == null ? "" : string.Join("", entity.Permissions), - Name = entity.Name - }; - - if(entity.HasIdentity) - userType.Id = short.Parse(entity.Id.ToString()); - - return userType; - } - - #endregion - } -} \ No newline at end of file diff --git a/src/Umbraco.Core/Persistence/Mappers/ExternalLoginMapper.cs b/src/Umbraco.Core/Persistence/Mappers/ExternalLoginMapper.cs new file mode 100644 index 0000000000..c4226797e2 --- /dev/null +++ b/src/Umbraco.Core/Persistence/Mappers/ExternalLoginMapper.cs @@ -0,0 +1,35 @@ +using System.Collections.Concurrent; +using Umbraco.Core.Models.Identity; +using Umbraco.Core.Models.Rdbms; + +namespace Umbraco.Core.Persistence.Mappers +{ + [MapperFor(typeof(IIdentityUserLogin))] + [MapperFor(typeof(IdentityUserLogin))] + public sealed class ExternalLoginMapper : BaseMapper + { + private static readonly ConcurrentDictionary PropertyInfoCacheInstance = new ConcurrentDictionary(); + public ExternalLoginMapper() + { + BuildMap(); + } + + #region Overrides of BaseMapper + + internal override ConcurrentDictionary PropertyInfoCache + { + get { return PropertyInfoCacheInstance; } + } + + internal override void BuildMap() + { + CacheMap(src => src.Id, dto => dto.Id); + CacheMap(src => src.CreateDate, dto => dto.CreateDate); + CacheMap(src => src.LoginProvider, dto => dto.LoginProvider); + CacheMap(src => src.ProviderKey, dto => dto.ProviderKey); + CacheMap(src => src.UserId, dto => dto.UserId); + } + + #endregion + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Persistence/Mappers/UserTypeMapper.cs b/src/Umbraco.Core/Persistence/Mappers/UserGroupMapper.cs similarity index 53% rename from src/Umbraco.Core/Persistence/Mappers/UserTypeMapper.cs rename to src/Umbraco.Core/Persistence/Mappers/UserGroupMapper.cs index 82f362b6f4..cd376e79a9 100644 --- a/src/Umbraco.Core/Persistence/Mappers/UserTypeMapper.cs +++ b/src/Umbraco.Core/Persistence/Mappers/UserGroupMapper.cs @@ -1,44 +1,43 @@ -using System; -using System.Collections.Concurrent; -using System.Linq.Expressions; -using Umbraco.Core.Models.Membership; -using Umbraco.Core.Models.Rdbms; - -namespace Umbraco.Core.Persistence.Mappers -{ - /// - /// Represents a to DTO mapper used to translate the properties of the public api - /// implementation to that of the database's DTO as sql: [tableName].[columnName]. - /// - [MapperFor(typeof(IUserType))] - [MapperFor(typeof(UserType))] - public sealed class UserTypeMapper : BaseMapper - { - private static readonly ConcurrentDictionary PropertyInfoCacheInstance = new ConcurrentDictionary(); - - //NOTE: its an internal class but the ctor must be public since we're using Activator.CreateInstance to create it - // otherwise that would fail because there is no public constructor. - public UserTypeMapper() - { - BuildMap(); - } - - #region Overrides of BaseMapper - - internal override ConcurrentDictionary PropertyInfoCache - { - get { return PropertyInfoCacheInstance; } - } - - internal override void BuildMap() - { - CacheMap(src => src.Id, dto => dto.Id); - CacheMap(src => src.Alias, dto => dto.Alias); - CacheMap(src => src.Name, dto => dto.Name); - CacheMap(src => src.Permissions, dto => dto.DefaultPermissions); - } - - - #endregion - } +using System.Collections.Concurrent; +using Umbraco.Core.Models.Membership; +using Umbraco.Core.Models.Rdbms; + +namespace Umbraco.Core.Persistence.Mappers +{ + /// + /// Represents a to DTO mapper used to translate the properties of the public api + /// implementation to that of the database's DTO as sql: [tableName].[columnName]. + /// + [MapperFor(typeof(IUserGroup))] + [MapperFor(typeof(UserGroup))] + public sealed class UserGroupMapper : BaseMapper + { + private static readonly ConcurrentDictionary PropertyInfoCacheInstance = new ConcurrentDictionary(); + + //NOTE: its an internal class but the ctor must be public since we're using Activator.CreateInstance to create it + // otherwise that would fail because there is no public constructor. + public UserGroupMapper() + { + BuildMap(); + } + + #region Overrides of BaseMapper + + internal override ConcurrentDictionary PropertyInfoCache + { + get { return PropertyInfoCacheInstance; } + } + + internal override void BuildMap() + { + CacheMap(src => src.Id, dto => dto.Id); + CacheMap(src => src.Alias, dto => dto.Alias); + CacheMap(src => src.Name, dto => dto.Name); + CacheMap(src => src.Icon, dto => dto.Icon); + CacheMap(src => src.StartContentId, dto => dto.StartContentId); + CacheMap(src => src.StartMediaId, dto => dto.StartMediaId); + } + + #endregion + } } \ No newline at end of file diff --git a/src/Umbraco.Core/Persistence/Mappers/UserMapper.cs b/src/Umbraco.Core/Persistence/Mappers/UserMapper.cs index 0ffd6cbfe1..9d30f571b4 100644 --- a/src/Umbraco.Core/Persistence/Mappers/UserMapper.cs +++ b/src/Umbraco.Core/Persistence/Mappers/UserMapper.cs @@ -1,41 +1,11 @@ using System; using System.Collections.Concurrent; using System.Linq.Expressions; -using Umbraco.Core.Models.Identity; using Umbraco.Core.Models.Membership; using Umbraco.Core.Models.Rdbms; namespace Umbraco.Core.Persistence.Mappers { - [MapperFor(typeof(IIdentityUserLogin))] - [MapperFor(typeof(IdentityUserLogin))] - public sealed class ExternalLoginMapper : BaseMapper - { - private static readonly ConcurrentDictionary PropertyInfoCacheInstance = new ConcurrentDictionary(); - public ExternalLoginMapper() - { - BuildMap(); - } - - #region Overrides of BaseMapper - - internal override ConcurrentDictionary PropertyInfoCache - { - get { return PropertyInfoCacheInstance; } - } - - internal override void BuildMap() - { - CacheMap(src => src.Id, dto => dto.Id); - CacheMap(src => src.CreateDate, dto => dto.CreateDate); - CacheMap(src => src.LoginProvider, dto => dto.LoginProvider); - CacheMap(src => src.ProviderKey, dto => dto.ProviderKey); - CacheMap(src => src.UserId, dto => dto.UserId); - } - - #endregion - } - [MapperFor(typeof(IUser))] [MapperFor(typeof(User))] public sealed class UserMapper : BaseMapper @@ -64,13 +34,16 @@ namespace Umbraco.Core.Persistence.Mappers CacheMap(src => src.RawPasswordValue, dto => dto.Password); CacheMap(src => src.Name, dto => dto.UserName); //NOTE: This column in the db is *not* used! - //CacheMap(src => src.DefaultPermissions, dto => dto.DefaultPermissions); - CacheMap(src => src.StartMediaId, dto => dto.MediaStartId); - CacheMap(src => src.StartContentId, dto => dto.ContentStartId); + //CacheMap(src => src.DefaultPermissions, dto => dto.DefaultPermissions); CacheMap(src => src.IsApproved, dto => dto.Disabled); CacheMap(src => src.IsLockedOut, dto => dto.NoConsole); - CacheMap(src => src.UserType, dto => dto.Type); CacheMap(src => src.Language, dto => dto.UserLanguage); + CacheMap(src => src.CreateDate, dto => dto.CreateDate); + CacheMap(src => src.UpdateDate, dto => dto.UpdateDate); + CacheMap(src => src.LastLockoutDate, dto => dto.LastLockoutDate); + CacheMap(src => src.LastLoginDate, dto => dto.LastLoginDate); + CacheMap(src => src.LastPasswordChangeDate, dto => dto.LastPasswordChangeDate); + CacheMap(src => src.SecurityStamp, dto => dto.SecurityStampToken); } #endregion diff --git a/src/Umbraco.Core/Persistence/Migrations/Initial/BaseDataCreation.cs b/src/Umbraco.Core/Persistence/Migrations/Initial/BaseDataCreation.cs index 2e32adcb54..87d628569b 100644 --- a/src/Umbraco.Core/Persistence/Migrations/Initial/BaseDataCreation.cs +++ b/src/Umbraco.Core/Persistence/Migrations/Initial/BaseDataCreation.cs @@ -48,14 +48,19 @@ namespace Umbraco.Core.Persistence.Migrations.Initial CreateUmbracoUserData(); } - if (tableName.Equals("umbracoUserType")) + if (tableName.Equals("umbracoUserGroup")) { - CreateUmbracoUserTypeData(); + CreateUmbracoUserGroupData(); } - if (tableName.Equals("umbracoUser2app")) + if (tableName.Equals("umbracoUser2UserGroup")) { - CreateUmbracoUser2AppData(); + CreateUmbracoUser2UserGroupData(); + } + + if (tableName.Equals("umbracoUserGroup2App")) + { + CreateUmbracoUserGroup2AppData(); } if (tableName.Equals("cmsPropertyTypeGroup")) @@ -164,27 +169,34 @@ namespace Umbraco.Core.Persistence.Migrations.Initial private void CreateUmbracoUserData() { - _database.Insert("umbracoUser", "id", false, new UserDto { Id = 0, Disabled = false, NoConsole = false, Type = 1, ContentStartId = -1, MediaStartId = -1, UserName = "Administrator", Login = "admin", Password = "default", Email = "", UserLanguage = "en" }); - //_database.Update("SET id = @IdAfter WHERE id = @IdBefore AND userLogin = @Login", new { IdAfter = 0, IdBefore = 1, Login = "admin" }); + _database.Insert("umbracoUser", "id", false, new UserDto { Id = 0, Disabled = false, NoConsole = false, UserName = "Administrator", Login = "admin", Password = "default", Email = "", UserLanguage = "en", CreateDate = DateTime.Now, UpdateDate = DateTime.Now }); } - private void CreateUmbracoUserTypeData() + private void CreateUmbracoUserGroupData() { - _database.Insert("umbracoUserType", "id", false, new UserTypeDto { Id = 1, Alias = "admin", Name = "Administrators", DefaultPermissions = "CADMOSKTPIURZ:5F7ï" }); - _database.Insert("umbracoUserType", "id", false, new UserTypeDto { Id = 2, Alias = "writer", Name = "Writer", DefaultPermissions = "CAH:F" }); - _database.Insert("umbracoUserType", "id", false, new UserTypeDto { Id = 3, Alias = "editor", Name = "Editors", DefaultPermissions = "CADMOSKTPUZ:5Fï" }); - _database.Insert("umbracoUserType", "id", false, new UserTypeDto { Id = 4, Alias = "translator", Name = "Translator", DefaultPermissions = "AF" }); + _database.Insert("umbracoUserGroup", "id", false, new UserGroupDto { Id = 1, StartMediaId = -1, StartContentId = -1, Alias = Constants.Security.AdminGroupAlias, Name = "Administrators", DefaultPermissions = "CADMOSKTPIURZ:5F7ï", CreateDate = DateTime.Now, UpdateDate = DateTime.Now, Icon = "icon-medal" }); + _database.Insert("umbracoUserGroup", "id", false, new UserGroupDto { Id = 2, StartMediaId = -1, StartContentId = -1, Alias = "writer", Name = "Writers", DefaultPermissions = "CAH:F", CreateDate = DateTime.Now, UpdateDate = DateTime.Now, Icon = "icon-edit" }); + _database.Insert("umbracoUserGroup", "id", false, new UserGroupDto { Id = 3, StartMediaId = -1, StartContentId = -1, Alias = "editor", Name = "Editors", DefaultPermissions = "CADMOSKTPUZ:5Fï", CreateDate = DateTime.Now, UpdateDate = DateTime.Now, Icon = "icon-tools" }); + _database.Insert("umbracoUserGroup", "id", false, new UserGroupDto { Id = 4, StartMediaId = -1, StartContentId = -1, Alias = "translator", Name = "Translators", DefaultPermissions = "AF", CreateDate = DateTime.Now, UpdateDate = DateTime.Now, Icon = "icon-globe" }); } - private void CreateUmbracoUser2AppData() + private void CreateUmbracoUser2UserGroupData() { - _database.Insert("umbracoUser2app", "user", false, new User2AppDto { UserId = 0, AppAlias = Constants.Applications.Content }); - _database.Insert("umbracoUser2app", "user", false, new User2AppDto { UserId = 0, AppAlias = Constants.Applications.Developer }); - _database.Insert("umbracoUser2app", "user", false, new User2AppDto { UserId = 0, AppAlias = Constants.Applications.Media }); - _database.Insert("umbracoUser2app", "user", false, new User2AppDto { UserId = 0, AppAlias = Constants.Applications.Members }); - _database.Insert("umbracoUser2app", "user", false, new User2AppDto { UserId = 0, AppAlias = Constants.Applications.Settings }); - _database.Insert("umbracoUser2app", "user", false, new User2AppDto { UserId = 0, AppAlias = Constants.Applications.Users }); - _database.Insert("umbracoUser2app", "user", false, new User2AppDto { UserId = 0, AppAlias = Constants.Applications.Forms }); + _database.Insert(new User2UserGroupDto { UserGroupId = 1, UserId = 0 }); + } + + private void CreateUmbracoUserGroup2AppData() + { + _database.Insert(new UserGroup2AppDto { UserGroupId = 1, AppAlias = Constants.Applications.Content }); + _database.Insert(new UserGroup2AppDto { UserGroupId = 1, AppAlias = Constants.Applications.Media }); + _database.Insert(new UserGroup2AppDto { UserGroupId = 1, AppAlias = Constants.Applications.Settings }); + _database.Insert(new UserGroup2AppDto { UserGroupId = 1, AppAlias = Constants.Applications.Developer }); + _database.Insert(new UserGroup2AppDto { UserGroupId = 1, AppAlias = Constants.Applications.Users }); + _database.Insert(new UserGroup2AppDto { UserGroupId = 1, AppAlias = Constants.Applications.Members }); + _database.Insert(new UserGroup2AppDto { UserGroupId = 2, AppAlias = Constants.Applications.Content }); + _database.Insert(new UserGroup2AppDto { UserGroupId = 3, AppAlias = Constants.Applications.Content }); + _database.Insert(new UserGroup2AppDto { UserGroupId = 3, AppAlias = Constants.Applications.Media }); + _database.Insert(new UserGroup2AppDto { UserGroupId = 4, AppAlias = Constants.Applications.Translation }); } private void CreateCmsPropertyTypeGroupData() diff --git a/src/Umbraco.Core/Persistence/Migrations/Initial/DatabaseSchemaCreation.cs b/src/Umbraco.Core/Persistence/Migrations/Initial/DatabaseSchemaCreation.cs index 83ae1de7e1..d23b23b4b6 100644 --- a/src/Umbraco.Core/Persistence/Migrations/Initial/DatabaseSchemaCreation.cs +++ b/src/Umbraco.Core/Persistence/Migrations/Initial/DatabaseSchemaCreation.cs @@ -67,15 +67,15 @@ namespace Umbraco.Core.Persistence.Migrations.Initial {28, typeof (TagDto)}, {29, typeof (TagRelationshipDto)}, - {31, typeof (UserTypeDto)}, + // Removed in 7.6 {31, typeof (UserTypeDto)}, {32, typeof (UserDto)}, {33, typeof (TaskTypeDto)}, {34, typeof (TaskDto)}, {35, typeof (ContentType2ContentTypeDto)}, {36, typeof (ContentTypeAllowedContentTypeDto)}, - {37, typeof (User2AppDto)}, + // Removed in 7.6 {37, typeof (User2AppDto)}, {38, typeof (User2NodeNotifyDto)}, - {39, typeof (User2NodePermissionDto)}, + // Removed in 7.6 {39, typeof (User2NodePermissionDto)}, {40, typeof (ServerRegistrationDto)}, {41, typeof (AccessDto)}, {42, typeof (AccessRuleDto)}, @@ -85,7 +85,12 @@ namespace Umbraco.Core.Persistence.Migrations.Initial //46, removed: UmbracoDeployChecksumDto //47, removed: UmbracoDeployDependencyDto {48, typeof (RedirectUrlDto) }, - {49, typeof (LockDto) } + {49, typeof (LockDto) }, + {50, typeof (UserGroupDto) }, + {51, typeof (User2UserGroupDto) }, + {52, typeof (UserGroup2NodePermissionDto) }, + {53, typeof (UserGroup2AppDto) }, + {54, typeof (UserStartNodeDto) }, }; #endregion diff --git a/src/Umbraco.Core/Persistence/Migrations/Initial/DatabaseSchemaResult.cs b/src/Umbraco.Core/Persistence/Migrations/Initial/DatabaseSchemaResult.cs index a34db10839..c11c413f56 100644 --- a/src/Umbraco.Core/Persistence/Migrations/Initial/DatabaseSchemaResult.cs +++ b/src/Umbraco.Core/Persistence/Migrations/Initial/DatabaseSchemaResult.cs @@ -142,6 +142,12 @@ namespace Umbraco.Core.Persistence.Migrations.Initial return new Version(7, 5, 0); } + //if the error is for umbracoUserGroup it must be the previous version to 7.7 since that is when it is added + if (Errors.Any(x => x.Item1.Equals("Table") && (x.Item2.InvariantEquals("umbracoUserStartNode")))) + { + return new Version(7, 6, 0); + } + return UmbracoVersion.Current; } diff --git a/src/Umbraco.Core/Persistence/Migrations/Upgrades/TargetVersionSevenFiveZero/AddRedirectUrlTable.cs b/src/Umbraco.Core/Persistence/Migrations/Upgrades/TargetVersionSevenFiveZero/AddRedirectUrlTable.cs index 829631c7f4..94bac477f2 100644 --- a/src/Umbraco.Core/Persistence/Migrations/Upgrades/TargetVersionSevenFiveZero/AddRedirectUrlTable.cs +++ b/src/Umbraco.Core/Persistence/Migrations/Upgrades/TargetVersionSevenFiveZero/AddRedirectUrlTable.cs @@ -33,7 +33,7 @@ namespace Umbraco.Core.Persistence.Migrations.Upgrades.TargetVersionSevenFiveZer return null; localContext.Delete.Table(umbracoRedirectUrlTableName); } - + localContext.Create.Table(umbracoRedirectUrlTableName) .WithColumn("id").AsGuid().NotNullable().PrimaryKey("PK_" + umbracoRedirectUrlTableName) .WithColumn("createDateUtc").AsDateTime().NotNullable() diff --git a/src/Umbraco.Core/Persistence/Migrations/Upgrades/TargetVersionSevenSevenZero/AddIndexToDictionaryKeyColumn.cs b/src/Umbraco.Core/Persistence/Migrations/Upgrades/TargetVersionSevenSevenZero/AddIndexToDictionaryKeyColumn.cs new file mode 100644 index 0000000000..8d708a18ea --- /dev/null +++ b/src/Umbraco.Core/Persistence/Migrations/Upgrades/TargetVersionSevenSevenZero/AddIndexToDictionaryKeyColumn.cs @@ -0,0 +1,63 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.Remoting.Contexts; +using System.Text; +using System.Threading.Tasks; +using Umbraco.Core.Logging; +using Umbraco.Core.Persistence.SqlSyntax; + +namespace Umbraco.Core.Persistence.Migrations.Upgrades.TargetVersionSevenSevenZero +{ + [Migration("7.7.0", 5, Constants.System.UmbracoMigrationName)] + public class AddIndexToDictionaryKeyColumn : MigrationBase + { + public AddIndexToDictionaryKeyColumn(ISqlSyntaxProvider sqlSyntax, ILogger logger) + : base(sqlSyntax, logger) + { } + + public override void Up() + { + Execute.Code(database => + { + //Now we need to check if we can actually do this because we won't be able to if there's data in there that is too long + var colLen = (SqlSyntax is MySqlSyntaxProvider) + ? database.ExecuteScalar(string.Format("select max(LENGTH({0})) from cmsDictionary", SqlSyntax.GetQuotedColumnName("key"))) + : database.ExecuteScalar(string.Format("select max(datalength({0})) from cmsDictionary", SqlSyntax.GetQuotedColumnName("key"))); + + if (colLen < 900 == false && colLen != null) + { + return null; + } + + var dbIndexes = SqlSyntax.GetDefinedIndexesDefinitions(Context.Database); + + //make sure it doesn't already exist + if (dbIndexes.Any(x => x.IndexName.InvariantEquals("IX_cmsDictionary_key")) == false) + { + var localContext = new LocalMigrationContext(Context.CurrentDatabaseProvider, database, SqlSyntax, Logger); + + //we can apply the index + localContext.Create.Index("IX_cmsDictionary_key").OnTable("cmsDictionary") + .OnColumn("key") + .Ascending() + .WithOptions() + .NonClustered(); + + return localContext.GetSql(); + } + + return null; + + }); + + + } + + public override void Down() + { + Delete.Index("IX_cmsDictionary_key").OnTable("cmsDictionary"); + } + + } +} diff --git a/src/Umbraco.Core/Persistence/Migrations/Upgrades/TargetVersionSevenSevenZero/AddUserGroupTables.cs b/src/Umbraco.Core/Persistence/Migrations/Upgrades/TargetVersionSevenSevenZero/AddUserGroupTables.cs new file mode 100644 index 0000000000..d1cf0a40d9 --- /dev/null +++ b/src/Umbraco.Core/Persistence/Migrations/Upgrades/TargetVersionSevenSevenZero/AddUserGroupTables.cs @@ -0,0 +1,184 @@ +using System; +using System.Data; +using System.Linq; +using Umbraco.Core.Configuration; +using Umbraco.Core.Logging; +using Umbraco.Core.Models; +using Umbraco.Core.Models.Rdbms; +using Umbraco.Core.Persistence.SqlSyntax; + +namespace Umbraco.Core.Persistence.Migrations.Upgrades.TargetVersionSevenSevenZero +{ + [Migration("7.7.0", 1, Constants.System.UmbracoMigrationName)] + public class AddUserGroupTables : MigrationBase + { + public AddUserGroupTables(ISqlSyntaxProvider sqlSyntax, ILogger logger) + : base(sqlSyntax, logger) + { } + + public override void Up() + { + var tables = SqlSyntax.GetTablesInSchema(Context.Database).ToArray(); + var constraints = SqlSyntax.GetConstraintsPerColumn(Context.Database).Distinct().ToArray(); + + if (AddNewTables(tables)) + { + MigrateUserPermissions(); + MigrateUserTypesToGroups(); + DeleteOldTables(tables, constraints); + SetDefaultIcons(); + } + } + + private void SetDefaultIcons() + { + Execute.Sql(string.Format("UPDATE umbracoUserGroup SET icon = '{0}' WHERE userGroupAlias = '{1}'", "", Constants.Security.AdminGroupAlias)); + Execute.Sql(string.Format("UPDATE umbracoUserGroup SET icon = '{0}' WHERE userGroupAlias = '{1}'", "icon-edit", "writer")); + Execute.Sql(string.Format("UPDATE umbracoUserGroup SET icon = '{0}' WHERE userGroupAlias = '{1}'", "icon-tools", "editor")); + Execute.Sql(string.Format("UPDATE umbracoUserGroup SET icon = '{0}' WHERE userGroupAlias = '{1}'", "icon-globe", "translator")); + } + + private bool AddNewTables(string[] tables) + { + var updated = false; + if (tables.InvariantContains("umbracoUserGroup") == false) + { + Create.Table(); + updated = true; + } + + if (tables.InvariantContains("umbracoUser2UserGroup") == false) + { + Create.Table(); + updated = true; + } + + if (tables.InvariantContains("umbracoUserGroup2App") == false) + { + Create.Table(); + updated = true; + } + + if (tables.InvariantContains("umbracoUserGroup2NodePermission") == false) + { + Create.Table(); + updated = true; + } + + + + return updated; + } + + private void MigrateUserTypesToGroups() + { + // Create a user group for each user type + Execute.Sql(@"INSERT INTO umbracoUserGroup (userGroupAlias, userGroupName, userGroupDefaultPermissions) + SELECT userTypeAlias, userTypeName, userTypeDefaultPermissions + FROM umbracoUserType"); + + // Add each user to the group created from their type + Execute.Sql(@"INSERT INTO umbracoUser2UserGroup (userId, userGroupId) + SELECT u.id, ug.id + FROM umbracoUser u + INNER JOIN umbracoUserType ut ON ut.id = u.userType + INNER JOIN umbracoUserGroup ug ON ug.userGroupAlias = ut.userTypeAlias"); + + // Add the built-in administrator account to all apps + Execute.Sql(@"INSERT INTO umbracoUserGroup2app (userGroupId,app) + SELECT ug.id, app + FROM umbracoUserGroup ug + INNER JOIN umbracoUser2UserGroup u2ug ON u2ug.userGroupId = ug.id + INNER JOIN umbracoUser u ON u.id = u2ug.userId + INNER JOIN umbracoUser2app u2a ON u2a." + SqlSyntax.GetQuotedColumnName("user") + @" = u.id + WHERE u.id = 0"); + + // Rename some groups for consistency (plural form) + Execute.Sql("UPDATE umbracoUserGroup SET userGroupName = 'Writers' WHERE userGroupAlias = 'writer'"); + Execute.Sql("UPDATE umbracoUserGroup SET userGroupName = 'Translators' WHERE userGroupAlias = 'translator'"); + + //Ensure all built in groups have a start node of -1 + Execute.Sql("UPDATE umbracoUserGroup SET startContentId = -1 WHERE userGroupAlias = 'editor'"); + Execute.Sql("UPDATE umbracoUserGroup SET startMediaId = -1 WHERE userGroupAlias = 'editor'"); + Execute.Sql("UPDATE umbracoUserGroup SET startContentId = -1 WHERE userGroupAlias = 'writer'"); + Execute.Sql("UPDATE umbracoUserGroup SET startMediaId = -1 WHERE userGroupAlias = 'writer'"); + Execute.Sql("UPDATE umbracoUserGroup SET startContentId = -1 WHERE userGroupAlias = 'translator'"); + Execute.Sql("UPDATE umbracoUserGroup SET startMediaId = -1 WHERE userGroupAlias = 'translator'"); + Execute.Sql("UPDATE umbracoUserGroup SET startContentId = -1 WHERE userGroupAlias = 'admin'"); + Execute.Sql("UPDATE umbracoUserGroup SET startMediaId = -1 WHERE userGroupAlias = 'admin'"); + } + + private void MigrateUserPermissions() + { + // Create user group records for all non-admin users that have specific permissions set + Execute.Sql(@"INSERT INTO umbracoUserGroup(userGroupAlias, userGroupName) + SELECT userName + 'Group', 'Group for ' + userName + FROM umbracoUser + WHERE (id IN ( + SELECT " + SqlSyntax.GetQuotedColumnName("user") + @" + FROM umbracoUser2app + ) OR id IN ( + SELECT userid + FROM umbracoUser2NodePermission + )) + AND id > 0"); + + // Associate those groups with the users + Execute.Sql(@"INSERT INTO umbracoUser2UserGroup (userId, userGroupId) + SELECT u.id, ug.id + FROM umbracoUser u + INNER JOIN umbracoUserGroup ug ON ug.userGroupAlias = userName + 'Group'"); + + // Create node permissions on the groups + Execute.Sql(@"INSERT INTO umbracoUserGroup2NodePermission (userGroupId,nodeId,permission) + SELECT ug.id, nodeId, permission + FROM umbracoUserGroup ug + INNER JOIN umbracoUser2UserGroup u2ug ON u2ug.userGroupId = ug.id + INNER JOIN umbracoUser u ON u.id = u2ug.userId + INNER JOIN umbracoUser2NodePermission u2np ON u2np.userId = u.id + WHERE ug.userGroupAlias NOT IN ( + SELECT userTypeAlias + FROM umbracoUserType + )"); + + // Create app permissions on the groups + Execute.Sql(@"INSERT INTO umbracoUserGroup2app (userGroupId,app) + SELECT ug.id, app + FROM umbracoUserGroup ug + INNER JOIN umbracoUser2UserGroup u2ug ON u2ug.userGroupId = ug.id + INNER JOIN umbracoUser u ON u.id = u2ug.userId + INNER JOIN umbracoUser2app u2a ON u2a." + SqlSyntax.GetQuotedColumnName("user") + @" = u.id + WHERE ug.userGroupAlias NOT IN ( + SELECT userTypeAlias + FROM umbracoUserType + )"); + } + + private void DeleteOldTables(string[] tables, Tuple[] constraints) + { + if (tables.InvariantContains("umbracoUser2App")) + { + Delete.Table("umbracoUser2App"); + } + + if (tables.InvariantContains("umbracoUser2NodePermission")) + { + Delete.Table("umbracoUser2NodePermission"); + } + + if (tables.InvariantContains("umbracoUserType") && tables.InvariantContains("umbracoUser")) + { + if (constraints.Any(x => x.Item1.InvariantEquals("umbracoUser") && x.Item3.InvariantEquals("FK_umbracoUser_umbracoUserType_id"))) + { + Delete.ForeignKey("FK_umbracoUser_umbracoUserType_id").OnTable("umbracoUser"); + } + + Delete.Column("userType").FromTable("umbracoUser"); + Delete.Table("umbracoUserType"); + } + } + + public override void Down() + { } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Persistence/Migrations/Upgrades/TargetVersionSevenSevenZero/AddUserStartNodeTable.cs b/src/Umbraco.Core/Persistence/Migrations/Upgrades/TargetVersionSevenSevenZero/AddUserStartNodeTable.cs new file mode 100644 index 0000000000..086949663b --- /dev/null +++ b/src/Umbraco.Core/Persistence/Migrations/Upgrades/TargetVersionSevenSevenZero/AddUserStartNodeTable.cs @@ -0,0 +1,49 @@ +using System.Linq; +using Umbraco.Core.Logging; +using Umbraco.Core.Models.Rdbms; +using Umbraco.Core.Persistence.SqlSyntax; + +namespace Umbraco.Core.Persistence.Migrations.Upgrades.TargetVersionSevenSevenZero +{ + [Migration("7.7.0", 2, Constants.System.UmbracoMigrationName)] + public class AddUserStartNodeTable : MigrationBase + { + public AddUserStartNodeTable(ISqlSyntaxProvider sqlSyntax, ILogger logger) : base(sqlSyntax, logger) + { + } + + public override void Up() + { + var tables = SqlSyntax.GetTablesInSchema(Context.Database).ToArray(); + + if (tables.InvariantContains("umbracoUserStartNode") == false) + { + Create.Table(); + + MigrateUserStartNodes(); + + //now remove the old columns + + Delete.Column("startStructureID").FromTable("umbracoUser"); + Delete.Column("startMediaID").FromTable("umbracoUser"); + } + } + + private void MigrateUserStartNodes() + { + Execute.Sql(@"INSERT INTO umbracoUserStartNode (userId, startNode, startNodeType) + SELECT id, startStructureID, 1 + FROM umbracoUser + WHERE startStructureID IS NOT NULL AND startStructureID > 0 AND startStructureID IN (SELECT id FROM umbracoNode WHERE nodeObjectType='" + Constants.ObjectTypes.Document + "')"); + + Execute.Sql(@"INSERT INTO umbracoUserStartNode (userId, startNode, startNodeType) + SELECT id, startMediaID, 2 + FROM umbracoUser + WHERE startMediaID IS NOT NULL AND startMediaID > 0 AND startMediaID IN (SELECT id FROM umbracoNode WHERE nodeObjectType='" + Constants.ObjectTypes.Media + "')"); + } + + public override void Down() + { + } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Persistence/Migrations/Upgrades/TargetVersionSevenSevenZero/EnsureContentTemplatePermissions.cs b/src/Umbraco.Core/Persistence/Migrations/Upgrades/TargetVersionSevenSevenZero/EnsureContentTemplatePermissions.cs new file mode 100644 index 0000000000..5ce33abf63 --- /dev/null +++ b/src/Umbraco.Core/Persistence/Migrations/Upgrades/TargetVersionSevenSevenZero/EnsureContentTemplatePermissions.cs @@ -0,0 +1,40 @@ +using System.Linq; +using Umbraco.Core.Logging; +using Umbraco.Core.Models.Rdbms; +using Umbraco.Core.Persistence.SqlSyntax; + +namespace Umbraco.Core.Persistence.Migrations.Upgrades.TargetVersionSevenSevenZero +{ + /// + /// Ensures the built-in user groups have the blueprint permission by default on upgrade + /// + [Migration("7.7.0", 6, Constants.System.UmbracoMigrationName)] + public class EnsureContentTemplatePermissions : MigrationBase + { + public EnsureContentTemplatePermissions(ISqlSyntaxProvider sqlSyntax, ILogger logger) : base(sqlSyntax, logger) + { + } + + public override void Up() + { + var userGroups = Context.Database.Fetch( + new Sql().Select("*") + .From(SqlSyntax) + .Where(x => x.Alias == "admin" || x.Alias == "editor", SqlSyntax)); + foreach (var userGroup in userGroups) + { + if (userGroup.DefaultPermissions.Contains('') == false) + { + userGroup.DefaultPermissions += ""; + Update.Table("umbracoUserGroup") + .Set(new {userGroupDefaultPermissions = userGroup.DefaultPermissions}) + .Where(new {id = userGroup.Id}); + } + } + } + + public override void Down() + { + } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Persistence/Migrations/Upgrades/TargetVersionSevenSevenZero/ReduceDictionaryKeyColumnsSize.cs b/src/Umbraco.Core/Persistence/Migrations/Upgrades/TargetVersionSevenSevenZero/ReduceDictionaryKeyColumnsSize.cs new file mode 100644 index 0000000000..a707e4687a --- /dev/null +++ b/src/Umbraco.Core/Persistence/Migrations/Upgrades/TargetVersionSevenSevenZero/ReduceDictionaryKeyColumnsSize.cs @@ -0,0 +1,51 @@ +using System.Linq; +using Umbraco.Core.Logging; +using Umbraco.Core.Persistence.SqlSyntax; + +namespace Umbraco.Core.Persistence.Migrations.Upgrades.TargetVersionSevenSevenZero +{ + [Migration("7.7.0", 4, Constants.System.UmbracoMigrationName)] + public class ReduceDictionaryKeyColumnsSize : MigrationBase + { + public ReduceDictionaryKeyColumnsSize(ISqlSyntaxProvider sqlSyntax, ILogger logger) + : base(sqlSyntax, logger) + { } + + public override void Up() + { + //Now we need to check if we can actually do this because we won't be able to if there's data in there that is too long + + Execute.Code(database => + { + var dbIndexes = SqlSyntax.GetDefinedIndexesDefinitions(database); + + var colLen = (SqlSyntax is MySqlSyntaxProvider) + ? database.ExecuteScalar(string.Format("select max(LENGTH({0})) from cmsDictionary", SqlSyntax.GetQuotedColumnName("key"))) + : database.ExecuteScalar(string.Format("select max(datalength({0})) from cmsDictionary", SqlSyntax.GetQuotedColumnName("key"))); + + if (colLen < 900 == false) return null; + + var localContext = new LocalMigrationContext(Context.CurrentDatabaseProvider, database, SqlSyntax, Logger); + + //if it exists we need to drop it first + if (dbIndexes.Any(x => x.IndexName.InvariantEquals("IX_cmsDictionary_key"))) + { + localContext.Delete.Index("IX_cmsDictionary_key").OnTable("cmsDictionary"); + } + + //we can apply the col length change + localContext.Alter.Table("cmsDictionary") + .AlterColumn("key") + .AsString(450) + .NotNullable(); + + return localContext.GetSql(); + }); + } + + public override void Down() + { + + } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Persistence/Migrations/Upgrades/TargetVersionSevenSevenZero/UpdateUserTables.cs b/src/Umbraco.Core/Persistence/Migrations/Upgrades/TargetVersionSevenSevenZero/UpdateUserTables.cs new file mode 100644 index 0000000000..3374e4a53f --- /dev/null +++ b/src/Umbraco.Core/Persistence/Migrations/Upgrades/TargetVersionSevenSevenZero/UpdateUserTables.cs @@ -0,0 +1,53 @@ +using System.Linq; +using System.Web.Security; +using Newtonsoft.Json; +using Umbraco.Core.Logging; +using Umbraco.Core.Persistence.DatabaseModelDefinitions; +using Umbraco.Core.Persistence.SqlSyntax; +using Umbraco.Core.Security; + +namespace Umbraco.Core.Persistence.Migrations.Upgrades.TargetVersionSevenSevenZero +{ + [Migration("7.7.0", 0, Constants.System.UmbracoMigrationName)] + public class UpdateUserTables : MigrationBase + { + public UpdateUserTables(ISqlSyntaxProvider sqlSyntax, ILogger logger) : base(sqlSyntax, logger) + { + } + + public override void Up() + { + //Don't exeucte if the column is already there + var columns = SqlSyntax.GetColumnsInSchema(Context.Database).ToArray(); + + if (columns.Any(x => x.TableName.InvariantEquals("umbracoUser") && x.ColumnName.InvariantEquals("createDate")) == false) + Create.Column("createDate").OnTable("umbracoUser").AsDateTime().NotNullable().WithDefault(SystemMethods.CurrentDateTime); + + if (columns.Any(x => x.TableName.InvariantEquals("umbracoUser") && x.ColumnName.InvariantEquals("updateDate")) == false) + Create.Column("updateDate").OnTable("umbracoUser").AsDateTime().NotNullable().WithDefault(SystemMethods.CurrentDateTime); + + if (columns.Any(x => x.TableName.InvariantEquals("umbracoUser") && x.ColumnName.InvariantEquals("emailConfirmedDate")) == false) + Create.Column("emailConfirmedDate").OnTable("umbracoUser").AsDateTime().Nullable(); + + if (columns.Any(x => x.TableName.InvariantEquals("umbracoUser") && x.ColumnName.InvariantEquals("invitedDate")) == false) + Create.Column("invitedDate").OnTable("umbracoUser").AsDateTime().Nullable(); + + if (columns.Any(x => x.TableName.InvariantEquals("umbracoUser") && x.ColumnName.InvariantEquals("passwordConfig")) == false) + { + Create.Column("passwordConfig").OnTable("umbracoUser").AsString(500).Nullable(); + //Check if we have a known config, we only want to store config for hashing + var membershipProvider = MembershipProviderExtensions.GetUsersMembershipProvider(); + if (membershipProvider.PasswordFormat == MembershipPasswordFormat.Hashed) + { + var json = JsonConvert.SerializeObject(new { hashAlgorithm = Membership.HashAlgorithmType }); + Execute.Sql("UPDATE umbracoUser SET passwordConfig = '" + json + "'"); + } + } + + } + + public override void Down() + { + } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Persistence/Migrations/Upgrades/TargetVersionSevenThreeZero/UpdateUniqueIdToHaveCorrectIndexType.cs b/src/Umbraco.Core/Persistence/Migrations/Upgrades/TargetVersionSevenThreeZero/UpdateUniqueIdToHaveCorrectIndexType.cs index 79d7b3111c..dc8415a9f8 100644 --- a/src/Umbraco.Core/Persistence/Migrations/Upgrades/TargetVersionSevenThreeZero/UpdateUniqueIdToHaveCorrectIndexType.cs +++ b/src/Umbraco.Core/Persistence/Migrations/Upgrades/TargetVersionSevenThreeZero/UpdateUniqueIdToHaveCorrectIndexType.cs @@ -1,5 +1,4 @@ using System.Linq; -using Umbraco.Core.Configuration; using Umbraco.Core.Logging; using Umbraco.Core.Persistence.DatabaseModelDefinitions; using Umbraco.Core.Persistence.SqlSyntax; @@ -11,15 +10,11 @@ namespace Umbraco.Core.Persistence.Migrations.Upgrades.TargetVersionSevenThreeZe { public UpdateUniqueIdToHaveCorrectIndexType(ISqlSyntaxProvider sqlSyntax, ILogger logger) : base(sqlSyntax, logger) - { - } + { } - //see: http://issues.umbraco.org/issue/U4-6188, http://issues.umbraco.org/issue/U4-6187 public override void Up() { - - - var dbIndexes = SqlSyntax.GetDefinedIndexes(Context.Database) + var indexes = SqlSyntax.GetDefinedIndexes(Context.Database) .Select(x => new DbIndexDefinition() { TableName = x.Item1, @@ -28,24 +23,19 @@ namespace Umbraco.Core.Persistence.Migrations.Upgrades.TargetVersionSevenThreeZe IsUnique = x.Item4 }).ToArray(); - //must be non-nullable + // drop the index if it exists + if (indexes.Any(x => x.IndexName.InvariantEquals("IX_umbracoNodeUniqueID"))) + Delete.Index("IX_umbracoNodeUniqueID").OnTable("umbracoNode"); + + // set uniqueID to be non-nullable + // the index *must* be dropped else 'one or more objects access this column' exception Alter.Table("umbracoNode").AlterColumn("uniqueID").AsGuid().NotNullable(); - //make sure it already exists - if (dbIndexes.Any(x => x.IndexName.InvariantEquals("IX_umbracoNodeUniqueID"))) - { - Delete.Index("IX_umbracoNodeUniqueID").OnTable("umbracoNode"); - } - //make sure it doesn't already exist - if (dbIndexes.Any(x => x.IndexName.InvariantEquals("IX_umbracoNode_uniqueID")) == false) - { - //must be a uniqe index - Create.Index("IX_umbracoNode_uniqueID").OnTable("umbracoNode").OnColumn("uniqueID").Unique(); - } + // create the index + Create.Index("IX_umbracoNode_uniqueID").OnTable("umbracoNode").OnColumn("uniqueID").Unique(); } public override void Down() - { - } + { } } } \ No newline at end of file diff --git a/src/Umbraco.Core/Persistence/Querying/IQuery.cs b/src/Umbraco.Core/Persistence/Querying/IQuery.cs index ae986baddc..cd08274c1b 100644 --- a/src/Umbraco.Core/Persistence/Querying/IQuery.cs +++ b/src/Umbraco.Core/Persistence/Querying/IQuery.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; using System.Linq.Expressions; namespace Umbraco.Core.Persistence.Querying @@ -16,6 +17,11 @@ namespace Umbraco.Core.Persistence.Querying /// This instance so calls to this method are chainable IQuery Where(Expression> predicate); - + /// + /// Adds a set of OR-ed where clauses to the query. + /// + /// + /// This instance so calls to this method are chainable. + IQuery WhereAny(IEnumerable>> predicates); } } \ No newline at end of file diff --git a/src/Umbraco.Core/Persistence/Querying/Query.cs b/src/Umbraco.Core/Persistence/Querying/Query.cs index 6213ca5ed6..d49296c6d0 100644 --- a/src/Umbraco.Core/Persistence/Querying/Query.cs +++ b/src/Umbraco.Core/Persistence/Querying/Query.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Linq; using System.Linq.Expressions; +using System.Text; namespace Umbraco.Core.Persistence.Querying { @@ -39,6 +40,50 @@ namespace Umbraco.Core.Persistence.Querying return this; } + /// + /// Adds a set of OR-ed where clauses to the query. + /// + /// + /// This instance so calls to this method are chainable. + public virtual IQuery WhereAny(IEnumerable>> predicates) + { + if (predicates == null) return this; + + StringBuilder sb = null; + List parameters = null; + Sql sql = null; + foreach (var predicate in predicates) + { + // see notes in Where() + var expressionHelper = new ModelToSqlExpressionVisitor(); + var whereExpression = expressionHelper.Visit(predicate); + + if (sb == null) + { + sb = new StringBuilder("("); + parameters = new List(); + sql = new Sql(); + } + else + { + sb.Append(" OR "); + sql.Append(" OR "); + } + + sb.Append(whereExpression); + parameters.AddRange(expressionHelper.GetSqlParameters()); + sql.Append(whereExpression, expressionHelper.GetSqlParameters()); + } + + if (sb == null) return this; + + sb.Append(")"); + //_wheres.Add(Tuple.Create(sb.ToString(), parameters.ToArray())); + _wheres.Add(Tuple.Create("(" + sql.SQL + ")", sql.Arguments)); + + return this; + } + /// /// Returns all translated where clauses and their sql parameters /// diff --git a/src/Umbraco.Core/Persistence/Relators/UserGroupRelator.cs b/src/Umbraco.Core/Persistence/Relators/UserGroupRelator.cs new file mode 100644 index 0000000000..fdea52498a --- /dev/null +++ b/src/Umbraco.Core/Persistence/Relators/UserGroupRelator.cs @@ -0,0 +1,105 @@ +using System; +using System.Collections.Generic; +using Umbraco.Core.Models.Rdbms; + +namespace Umbraco.Core.Persistence.Relators +{ + internal class UserGroupRelator + { + private UserDto _currentUser; + + internal UserDto Map(UserDto user, UserGroupDto group, UserGroup2AppDto section, UserStartNodeDto startNode) + { + // Terminating call. Since we can return null from this function + // we need to be ready for PetaPoco to callback later with null + // parameters + if (user == null) + return _currentUser; + + // Is this the same User as the current one we're processing + if (_currentUser != null && _currentUser.Id == user.Id) + { + AddOrUpdateGroup(group, section); + AddOrUpdateStartNode(startNode); + + // Return null to indicate we're not done with this object yet + return null; + } + + // This is a different user to the current one, or this is the + // first time through and we don't have one yet + + // Save the current user + var prev = _currentUser; + + // Setup the new current user + _currentUser = user; + _currentUser.UserGroupDtos = new List(); + _currentUser.UserStartNodeDtos = new HashSet(); + + AddOrUpdateGroup(group, section); + AddOrUpdateStartNode(startNode); + + // Return the now populated previous user (or null if first time through) + return prev; + } + + private void AddOrUpdateStartNode(UserStartNodeDto startNode) + { + //this can be null since we are left joining + if (startNode == null || startNode.Id == default(int)) + return; + + //add the current (new) start node - this is a hashset so it will only allow unique rows so no need to check for existence + _currentUser.UserStartNodeDtos.Add(startNode); + } + + private void AddOrUpdateGroup(UserGroupDto group, UserGroup2AppDto section) + { + //I don't even think this situation can happen but if it could, we'd want the section added to the latest group check if this is a new group + if (group == null && section != null) + { + AddSection(section); + } + + //this can be null since we are doing a left join + if (group == null || group.Alias.IsNullOrWhiteSpace()) + return; + + //check if this is a new group + var latestGroup = _currentUser.UserGroupDtos.Count > 0 + ? _currentUser.UserGroupDtos[_currentUser.UserGroupDtos.Count - 1] + : null; + + if (latestGroup == null || latestGroup.Id != group.Id) + { + //add the current (new) group + _currentUser.UserGroupDtos.Add(group); + } + + AddSection(section); + } + + private void AddSection(UserGroup2AppDto section) + { + //this can be null since we are left joining + if (section == null || section.AppAlias.IsNullOrWhiteSpace()) + return; + + var latestGroup = _currentUser.UserGroupDtos.Count > 0 + ? _currentUser.UserGroupDtos[_currentUser.UserGroupDtos.Count - 1] + : null; + + if (latestGroup == null || latestGroup.Id != section.UserGroupId) + throw new InvalidOperationException("The user group and section info don't match"); + + if (latestGroup.UserGroup2AppDtos == null) + latestGroup.UserGroup2AppDtos = new List(); + + //add it if it doesn't exist + if (latestGroup.UserGroup2AppDtos.TrueForAll(dto => dto.AppAlias != section.AppAlias)) + latestGroup.UserGroup2AppDtos.Add(section); + } + + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Persistence/Relators/UserSectionRelator.cs b/src/Umbraco.Core/Persistence/Relators/UserGroupSectionRelator.cs similarity index 56% rename from src/Umbraco.Core/Persistence/Relators/UserSectionRelator.cs rename to src/Umbraco.Core/Persistence/Relators/UserGroupSectionRelator.cs index 923348e729..9b96bf6a8d 100644 --- a/src/Umbraco.Core/Persistence/Relators/UserSectionRelator.cs +++ b/src/Umbraco.Core/Persistence/Relators/UserGroupSectionRelator.cs @@ -1,50 +1,50 @@ -using System.Collections.Generic; -using Umbraco.Core.Models.Rdbms; - -namespace Umbraco.Core.Persistence.Relators -{ - internal class UserSectionRelator - { - internal UserDto Current; - - internal UserDto Map(UserDto a, User2AppDto p) - { - // Terminating call. Since we can return null from this function - // we need to be ready for PetaPoco to callback later with null - // parameters - if (a == null) - return Current; - - // Is this the same DictionaryItem as the current one we're processing - if (Current != null && Current.Id == a.Id) - { - if (p.AppAlias.IsNullOrWhiteSpace() == false) - { - // Yes, just add this User2AppDto to the current item's collection - Current.User2AppDtos.Add(p); - } - - // Return null to indicate we're not done with this User yet - return null; - } - - // This is a different User to the current one, or this is the - // first time through and we don't have one yet - - // Save the current User - var prev = Current; - - // Setup the new current User - Current = a; - Current.User2AppDtos = new List(); - //this can be null since we are doing a left join - if (p.AppAlias.IsNullOrWhiteSpace() == false) - { - Current.User2AppDtos.Add(p); - } - - // Return the now populated previous User (or null if first time through) - return prev; - } - } +using System.Collections.Generic; +using Umbraco.Core.Models.Rdbms; + +namespace Umbraco.Core.Persistence.Relators +{ + internal class UserGroupSectionRelator + { + internal UserGroupDto Current; + + internal UserGroupDto Map(UserGroupDto a, UserGroup2AppDto p) + { + // Terminating call. Since we can return null from this function + // we need to be ready for PetaPoco to callback later with null + // parameters + if (a == null) + return Current; + + // Is this the same object as the current one we're processing + if (Current != null && Current.Id == a.Id) + { + if (p.AppAlias.IsNullOrWhiteSpace() == false) + { + // Yes, just add this to the current item's collection + Current.UserGroup2AppDtos.Add(p); + } + + // Return null to indicate we're not done with this User yet + return null; + } + + // This is a different object to the current one, or this is the + // first time through and we don't have one yet + + // Save the current instance + var prev = Current; + + // Setup the new current instance + Current = a; + Current.UserGroup2AppDtos = new List(); + //this can be null since we are doing a left join + if (p.AppAlias.IsNullOrWhiteSpace() == false) + { + Current.UserGroup2AppDtos.Add(p); + } + + // Return the now populated previous user group (or null if first time through) + return prev; + } + } } \ No newline at end of file diff --git a/src/Umbraco.Core/Persistence/Repositories/ContentBlueprintRepository.cs b/src/Umbraco.Core/Persistence/Repositories/ContentBlueprintRepository.cs new file mode 100644 index 0000000000..4c9021d20a --- /dev/null +++ b/src/Umbraco.Core/Persistence/Repositories/ContentBlueprintRepository.cs @@ -0,0 +1,31 @@ +using System; +using Umbraco.Core.Configuration.UmbracoSettings; +using Umbraco.Core.Logging; +using Umbraco.Core.Persistence.SqlSyntax; +using Umbraco.Core.Persistence.UnitOfWork; + +namespace Umbraco.Core.Persistence.Repositories +{ + /// + /// Override the base content repository so we can change the node object type + /// + /// + /// It would be nicer if we could separate most of this down into a smaller version of the ContentRepository class, however to do that + /// requires quite a lot of work since we'd need to re-organize the interhitance quite a lot or create a helper class to perform a lot of the underlying logic. + /// + /// TODO: Create a helper method to contain most of the underlying logic for the ContentRepository + /// + internal class ContentBlueprintRepository : ContentRepository + { + public ContentBlueprintRepository(IScopeUnitOfWork work, CacheHelper cacheHelper, ILogger logger, ISqlSyntaxProvider syntaxProvider, IContentTypeRepository contentTypeRepository, ITemplateRepository templateRepository, ITagRepository tagRepository, IContentSection contentSection) + : base(work, cacheHelper, logger, syntaxProvider, contentTypeRepository, templateRepository, tagRepository, contentSection) + { + } + + protected override Guid NodeObjectTypeId + { + get { return Constants.ObjectTypes.DocumentBlueprintGuid; } + } + + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Persistence/Repositories/ContentRepository.cs b/src/Umbraco.Core/Persistence/Repositories/ContentRepository.cs index 949d1d07fb..addd0bc925 100644 --- a/src/Umbraco.Core/Persistence/Repositories/ContentRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/ContentRepository.cs @@ -20,28 +20,6 @@ using Umbraco.Core.Persistence.UnitOfWork; namespace Umbraco.Core.Persistence.Repositories { - /// - /// Override the base content repository so we can change the node object type - /// - /// - /// It would be nicer if we could separate most of this down into a smaller version of the ContentRepository class, however to do that - /// requires quite a lot of work since we'd need to re-organize the interhitance quite a lot or create a helper class to perform a lot of the underlying logic. - /// - /// TODO: Create a helper method to conain most of the underlying logic for the ContentRepository - /// - internal class ContentBlueprintRepository : ContentRepository - { - public ContentBlueprintRepository(IScopeUnitOfWork work, CacheHelper cacheHelper, ILogger logger, ISqlSyntaxProvider syntaxProvider, IContentTypeRepository contentTypeRepository, ITemplateRepository templateRepository, ITagRepository tagRepository, IContentSection contentSection) : base(work, cacheHelper, logger, syntaxProvider, contentTypeRepository, templateRepository, tagRepository, contentSection) - { - } - - protected override Guid NodeObjectTypeId - { - get { return Constants.ObjectTypes.DocumentBlueprintGuid; } - } - - } - /// /// Represents a repository for doing CRUD operations for /// @@ -50,9 +28,9 @@ namespace Umbraco.Core.Persistence.Repositories private readonly IContentTypeRepository _contentTypeRepository; private readonly ITemplateRepository _templateRepository; private readonly ITagRepository _tagRepository; - private readonly CacheHelper _cacheHelper; private readonly ContentPreviewRepository _contentPreviewRepository; private readonly ContentXmlRepository _contentXmlRepository; + private readonly PermissionRepository _permissionRepository; public ContentRepository(IScopeUnitOfWork work, CacheHelper cacheHelper, ILogger logger, ISqlSyntaxProvider syntaxProvider, IContentTypeRepository contentTypeRepository, ITemplateRepository templateRepository, ITagRepository tagRepository, IContentSection contentSection) : base(work, cacheHelper, logger, syntaxProvider, contentSection) @@ -63,10 +41,10 @@ namespace Umbraco.Core.Persistence.Repositories _contentTypeRepository = contentTypeRepository; _templateRepository = templateRepository; _tagRepository = tagRepository; - _cacheHelper = cacheHelper; _contentPreviewRepository = new ContentPreviewRepository(work, CacheHelper.NoCache, logger, syntaxProvider); _contentXmlRepository = new ContentXmlRepository(work, CacheHelper.NoCache, logger, syntaxProvider); - + _permissionRepository = new PermissionRepository(UnitOfWork, cacheHelper, Logger, SqlSyntax); + EnsureUniqueNaming = true; } @@ -204,7 +182,7 @@ namespace Umbraco.Core.Persistence.Repositories "DELETE FROM umbracoRedirectUrl WHERE contentKey IN (SELECT uniqueID FROM umbracoNode WHERE id = @Id)", "DELETE FROM cmsTask WHERE nodeId = @Id", "DELETE FROM umbracoUser2NodeNotify WHERE nodeId = @Id", - "DELETE FROM umbracoUser2NodePermission WHERE nodeId = @Id", + "DELETE FROM umbracoUserGroup2NodePermission WHERE nodeId = @Id", "DELETE FROM umbracoRelation WHERE parentId = @Id", "DELETE FROM umbracoRelation WHERE childId = @Id", "DELETE FROM cmsTagRelationship WHERE nodeId = @Id", @@ -468,26 +446,7 @@ namespace Umbraco.Core.Persistence.Repositories entity.Id = nodeDto.NodeId; //Set Id on entity to ensure an Id is set entity.Path = nodeDto.Path; entity.SortOrder = sortOrder; - entity.Level = level; - - //Assign the same permissions to it as the parent node - // http://issues.umbraco.org/issue/U4-2161 - var permissionsRepo = new PermissionRepository(UnitOfWork, _cacheHelper, SqlSyntax); - var parentPermissions = permissionsRepo.GetPermissionsForEntity(entity.ParentId).ToArray(); - //if there are parent permissions then assign them, otherwise leave null and permissions will become the - // user's default permissions. - if (parentPermissions.Any()) - { - var userPermissions = ( - from perm in parentPermissions - from p in perm.AssignedPermissions - select new EntityPermissionSet.UserPermission(perm.UserId, p)).ToList(); - - permissionsRepo.ReplaceEntityPermissions(new EntityPermissionSet(entity.Id, userPermissions)); - //flag the entity's permissions changed flag so we can track those changes. - //Currently only used for the cache refreshers to detect if we should refresh all user permissions cache. - ((Content)entity).PermissionsChanged = true; - } + entity.Level = level; //Create the Content specific data - cmsContent var contentDto = dto.ContentVersionDto.ContentDto; @@ -661,7 +620,7 @@ namespace Umbraco.Core.Persistence.Repositories if (contentVerDto != null) { contentVersionDto.Id = contentVerDto.Id; - Database.Update(contentVersionDto); + Database.Update(contentVersionDto); } Database.Update(dto); @@ -863,8 +822,7 @@ order by umbracoNode.{2}, umbracoNode.parentID, umbracoNode.sortOrder", public void ReplaceContentPermissions(EntityPermissionSet permissionSet) { - var repo = new PermissionRepository(UnitOfWork, _cacheHelper, SqlSyntax); - repo.ReplaceEntityPermissions(permissionSet); + _permissionRepository.ReplaceEntityPermissions(permissionSet); } public void ClearPublished(IContent content) @@ -874,22 +832,25 @@ order by umbracoNode.{2}, umbracoNode.parentID, umbracoNode.sortOrder", } /// - /// Assigns a single permission to the current content item for the specified user ids + /// Assigns a single permission to the current content item for the specified user group ids /// /// /// - /// - public void AssignEntityPermission(IContent entity, char permission, IEnumerable userIds) - { - var repo = new PermissionRepository(UnitOfWork, _cacheHelper, SqlSyntax); - repo.AssignEntityPermission(entity, permission, userIds); + /// + public void AssignEntityPermission(IContent entity, char permission, IEnumerable groupIds) + { + _permissionRepository.AssignEntityPermission(entity, permission, groupIds); } - public IEnumerable GetPermissionsForEntity(int entityId) + /// + /// Gets the explicit list of permissions for the content item + /// + /// + /// + public EntityPermissionCollection GetPermissionsForEntity(int entityId) { - var repo = new PermissionRepository(UnitOfWork, _cacheHelper, SqlSyntax); - return repo.GetPermissionsForEntity(entityId); - } + return _permissionRepository.GetPermissionsForEntity(entityId); + } /// /// Adds/updates content/published xml @@ -901,6 +862,15 @@ order by umbracoNode.{2}, umbracoNode.parentID, umbracoNode.sortOrder", _contentXmlRepository.AddOrUpdate(new ContentXmlEntity(content, xml)); } + /// + /// Used to add/update a permission for a content item + /// + /// + public void AddOrUpdatePermissions(ContentPermissionSet permission) + { + _permissionRepository.AddOrUpdate(permission); + } + /// /// Used to remove the content xml for a content item /// @@ -942,9 +912,9 @@ order by umbracoNode.{2}, umbracoNode.parentID, umbracoNode.sortOrder", var filterSql = new Sql().Append("AND (cmsDocument.newest = 1)"); if (filter != null) { - foreach (var filterClaus in filter.GetWhereClauses()) + foreach (var filterClause in filter.GetWhereClauses()) { - filterSql.Append(string.Format("AND ({0})", filterClaus.Item1), filterClaus.Item2); + filterSql.Append(string.Format("AND ({0})", filterClause.Item1), filterClause.Item2); } } diff --git a/src/Umbraco.Core/Persistence/Repositories/ContentTypeRepository.cs b/src/Umbraco.Core/Persistence/Repositories/ContentTypeRepository.cs index 96641ba715..4756d39d83 100644 --- a/src/Umbraco.Core/Persistence/Repositories/ContentTypeRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/ContentTypeRepository.cs @@ -148,7 +148,7 @@ namespace Umbraco.Core.Persistence.Repositories var list = new List { "DELETE FROM umbracoUser2NodeNotify WHERE nodeId = @Id", - "DELETE FROM umbracoUser2NodePermission WHERE nodeId = @Id", + "DELETE FROM umbracoUserGroup2NodePermission WHERE nodeId = @Id", "DELETE FROM cmsTagRelationship WHERE nodeId = @Id", "DELETE FROM cmsContentTypeAllowedContentType WHERE Id = @Id", "DELETE FROM cmsContentTypeAllowedContentType WHERE AllowedId = @Id", diff --git a/src/Umbraco.Core/Persistence/Repositories/DataTypeDefinitionRepository.cs b/src/Umbraco.Core/Persistence/Repositories/DataTypeDefinitionRepository.cs index 1690b36148..8c263f4211 100644 --- a/src/Umbraco.Core/Persistence/Repositories/DataTypeDefinitionRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/DataTypeDefinitionRepository.cs @@ -208,7 +208,7 @@ AND umbracoNode.id <> @id", throw new DuplicateNameException("A data type with the name " + entity.Name + " already exists"); } - //Updates Modified date and Version Guid + //Updates Modified date ((DataTypeDefinition)entity).UpdatingEntity(); //Look up parent to get and set the correct Path if ParentId has changed @@ -248,7 +248,7 @@ AND umbracoNode.id <> @id", Database.Delete("WHERE nodeId = @Id", new { Id = entity.Id }); //Remove Permissions - Database.Delete("WHERE nodeId = @Id", new { Id = entity.Id }); + Database.Delete("WHERE nodeId = @Id", new { Id = entity.Id }); //Remove associated tags Database.Delete("WHERE nodeId = @Id", new { Id = entity.Id }); diff --git a/src/Umbraco.Core/Persistence/Repositories/EntityRepository.cs b/src/Umbraco.Core/Persistence/Repositories/EntityRepository.cs index 4e6bf6ee70..8f3b65595b 100644 --- a/src/Umbraco.Core/Persistence/Repositories/EntityRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/EntityRepository.cs @@ -56,9 +56,9 @@ namespace Umbraco.Core.Persistence.Repositories { if (filter != null) { - foreach (var filterClaus in filter.GetWhereClauses()) + foreach (var filterClause in filter.GetWhereClauses()) { - sql.Where(filterClaus.Item1, filterClaus.Item2); + sql.Where(filterClause.Item1, filterClause.Item2); } } }, objectTypeId); @@ -149,9 +149,9 @@ namespace Umbraco.Core.Persistence.Repositories { if (filter != null) { - foreach (var filterClaus in filter.GetWhereClauses()) + foreach (var filterClause in filter.GetWhereClauses()) { - sql.Where(filterClaus.Item1, filterClaus.Item2); + sql.Where(filterClause.Item1, filterClause.Item2); } } }, objectTypeId); @@ -256,32 +256,22 @@ namespace Umbraco.Core.Persistence.Repositories public virtual IEnumerable GetAll(Guid objectTypeId, params int[] ids) { - if (ids.Any()) - { - return PerformGetAll(objectTypeId, sql1 => sql1.Where(" umbracoNode.id in (@ids)", new {ids = ids})); - } - else - { - return PerformGetAll(objectTypeId); - } + return ids.Any() + ? PerformGetAll(objectTypeId, sql => sql.Where(" umbracoNode.id in (@ids)", new { ids })) + : PerformGetAll(objectTypeId); } public virtual IEnumerable GetAll(Guid objectTypeId, params Guid[] keys) { - if (keys.Any()) - { - return PerformGetAll(objectTypeId, sql1 => sql1.Where(" umbracoNode.uniqueID in (@keys)", new { keys = keys })); - } - else - { - return PerformGetAll(objectTypeId); - } + return keys.Any() + ? PerformGetAll(objectTypeId, sql => sql.Where(" umbracoNode.uniqueID in (@keys)", new { keys })) + : PerformGetAll(objectTypeId); } private IEnumerable PerformGetAll(Guid objectTypeId, Action filter = null) { - bool isContent = objectTypeId == Constants.ObjectTypes.DocumentGuid || objectTypeId == Constants.ObjectTypes.DocumentBlueprintGuid; - bool isMedia = objectTypeId == Constants.ObjectTypes.MediaGuid; + var isContent = objectTypeId == Constants.ObjectTypes.DocumentGuid || objectTypeId == Constants.ObjectTypes.DocumentBlueprintGuid; + var isMedia = objectTypeId == Constants.ObjectTypes.MediaGuid; var sql = GetFullSqlForEntityType(isContent, isMedia, objectTypeId, filter); var factory = new UmbracoEntityFactory(); @@ -306,6 +296,26 @@ namespace Umbraco.Core.Persistence.Repositories } } + public virtual IEnumerable GetAllPaths(Guid objectTypeId, params int[] ids) + { + return ids.Any() + ? PerformGetAllPaths(objectTypeId, sql => sql.Append(" AND umbracoNode.id in (@ids)", new { ids })) + : PerformGetAllPaths(objectTypeId); + } + + public virtual IEnumerable GetAllPaths(Guid objectTypeId, params Guid[] keys) + { + return keys.Any() + ? PerformGetAllPaths(objectTypeId, sql => sql.Append(" AND umbracoNode.uniqueID in (@keys)", new { keys })) + : PerformGetAllPaths(objectTypeId); + } + + private IEnumerable PerformGetAllPaths(Guid objectTypeId, Action filter = null) + { + var sql = new Sql("SELECT id, path FROM umbracoNode WHERE umbracoNode.nodeObjectType=@type", new { type = objectTypeId }); + if (filter != null) filter(sql); + return _work.Database.Fetch(sql); + } public virtual IEnumerable GetByQuery(IQuery query) { diff --git a/src/Umbraco.Core/Persistence/Repositories/Interfaces/IContentRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Interfaces/IContentRepository.cs index 00e0868ef0..c44c8ac1dc 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Interfaces/IContentRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Interfaces/IContentRepository.cs @@ -49,19 +49,26 @@ namespace Umbraco.Core.Persistence.Repositories IEnumerable GetByPublishedVersion(IQuery query); /// - /// Assigns a single permission to the current content item for the specified user ids + /// Assigns a single permission to the current content item for the specified user group ids /// /// /// - /// - void AssignEntityPermission(IContent entity, char permission, IEnumerable userIds); + /// + void AssignEntityPermission(IContent entity, char permission, IEnumerable groupIds); /// - /// Gets the list of permissions for the content item + /// Gets the explicit list of permissions for the content item /// /// /// - IEnumerable GetPermissionsForEntity(int entityId); + EntityPermissionCollection GetPermissionsForEntity(int entityId); + + ///// + ///// Gets the implicit/inherited list of permissions for the content item + ///// + ///// + ///// + //IEnumerable GetPermissionsForPath(string path); /// /// Used to add/update published xml for the content item @@ -70,6 +77,12 @@ namespace Umbraco.Core.Persistence.Repositories /// void AddOrUpdateContentXml(IContent content, Func xml); + /// + /// Used to add/update a permission for a content item + /// + /// + void AddOrUpdatePermissions(ContentPermissionSet permission); + /// /// Used to remove the content xml for a content item /// diff --git a/src/Umbraco.Core/Persistence/Repositories/Interfaces/IEntityRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Interfaces/IEntityRepository.cs index 54e86e64d4..b26afea909 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Interfaces/IEntityRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Interfaces/IEntityRepository.cs @@ -17,6 +17,9 @@ namespace Umbraco.Core.Persistence.Repositories IEnumerable GetByQuery(IQuery query); IEnumerable GetByQuery(IQuery query, Guid objectTypeId); + IEnumerable GetAllPaths(Guid objectTypeId, params int[] ids); + IEnumerable GetAllPaths(Guid objectTypeId, params Guid[] keys); + /// /// Gets paged results /// diff --git a/src/Umbraco.Core/Persistence/Repositories/Interfaces/IUserControlRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Interfaces/IUserControlRepository.cs new file mode 100644 index 0000000000..7efb29b0a5 --- /dev/null +++ b/src/Umbraco.Core/Persistence/Repositories/Interfaces/IUserControlRepository.cs @@ -0,0 +1,13 @@ +using System.IO; +using Umbraco.Core.Models; + +namespace Umbraco.Core.Persistence.Repositories +{ + public interface IUserControlRepository : IRepository + { + bool ValidateUserControl(UserControl userControl); + Stream GetFileContentStream(string filepath); + void SetFileContent(string filepath, Stream content); + long GetFileSize(string filepath); + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Persistence/Repositories/Interfaces/IUserGroupRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Interfaces/IUserGroupRepository.cs new file mode 100644 index 0000000000..dd6188e31c --- /dev/null +++ b/src/Umbraco.Core/Persistence/Repositories/Interfaces/IUserGroupRepository.cs @@ -0,0 +1,60 @@ +using System.Collections.Generic; +using Umbraco.Core.Models.Membership; + +namespace Umbraco.Core.Persistence.Repositories +{ + public interface IUserGroupRepository : IRepositoryQueryable + { + /// + /// Gets a group by it's alias + /// + /// + /// + IUserGroup Get(string alias); + + /// + /// This is useful when an entire section is removed from config + /// + /// + IEnumerable GetGroupsAssignedToSection(string sectionAlias); + + /// + /// Used to add or update a user group and assign users to it + /// + /// + /// + void AddOrUpdateGroupWithUsers(IUserGroup userGroup, int[] userIds); + + /// + /// Gets explicilty defined permissions for the group for specified entities + /// + /// + /// Array of entity Ids, if empty will return permissions for the group for all entities + EntityPermissionCollection GetPermissions(int[] groupIds, params int[] entityIds); + + /// + /// Gets explicilt and default permissions (if requested) permissions for the group for specified entities + /// + /// + /// If true will include the group's default permissions if no permissions are explicitly assigned + /// Array of entity Ids, if empty will return permissions for the group for all entities + EntityPermissionCollection GetPermissions(IReadOnlyUserGroup[] groups, bool fallbackToDefaultPermissions, params int[] nodeIds); + + /// + /// Replaces the same permission set for a single group to any number of entities + /// + /// Id of group + /// Permissions as enumerable list of + /// Specify the nodes to replace permissions for. If nothing is specified all permissions are removed. + void ReplaceGroupPermissions(int groupId, IEnumerable permissions, params int[] entityIds); + + /// + /// Assigns the same permission set for a single group to any number of entities + /// + /// Id of group + /// Permissions as enumerable list of + /// Specify the nodes to replace permissions for + void AssignGroupPermission(int groupId, char permission, params int[] entityIds); + + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Persistence/Repositories/Interfaces/IUserRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Interfaces/IUserRepository.cs index 542cceac40..bb31f35014 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Interfaces/IUserRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Interfaces/IUserRepository.cs @@ -1,7 +1,9 @@ using System; using System.Collections.Generic; +using System.ComponentModel; using System.Linq.Expressions; using Umbraco.Core.Models.Membership; +using Umbraco.Core.Persistence.DatabaseModelDefinitions; using Umbraco.Core.Persistence.Querying; namespace Umbraco.Core.Persistence.Repositories @@ -21,47 +23,65 @@ namespace Umbraco.Core.Persistence.Repositories /// /// bool Exists(string username); - + /// - /// This is useful when an entire section is removed from config + /// Gets a list of objects associated with a given group /// - /// - IEnumerable GetUsersAssignedToSection(string sectionAlias); + /// Id of group + IEnumerable GetAllInGroup(int groupId); /// - /// Gets paged member results + /// Gets a list of objects not associated with a given group + /// + /// Id of group + IEnumerable GetAllNotInGroup(int groupId); + + [Obsolete("Use the overload with long operators instead")] + [EditorBrowsable(EditorBrowsableState.Never)] + IEnumerable GetPagedResultsByQuery(IQuery query, int pageIndex, int pageSize, out int totalRecords, Expression> orderBy); + + /// + /// Gets paged user results /// /// /// /// /// /// + /// + /// + /// Optional parameter to filter by specified user groups + /// Optional parameter to filter by specfied user state /// - IEnumerable GetPagedResultsByQuery(IQuery query, int pageIndex, int pageSize, out int totalRecords, Expression> orderBy); - - - /// - /// Gets the user permissions for the specified entities - /// - /// - /// - /// - IEnumerable GetUserPermissionsForEntities(int userId, params int[] entityIds); + IEnumerable GetPagedResultsByQuery(IQuery query, long pageIndex, int pageSize, out long totalRecords, Expression> orderBy, Direction orderDirection, string[] userGroups = null, UserState[] userState = null, IQuery filter = null); /// - /// Replaces the same permission set for a single user to any number of entities + /// Returns a user by username /// - /// - /// - /// - void ReplaceUserPermissions(int userId, IEnumerable permissions, params int[] entityIds); + /// + /// + /// This is only used for a shim in order to upgrade to 7.7 + /// + /// + /// A non cached instance + /// + IUser GetByUsername(string username, bool includeSecurityData); /// - /// Assigns the same permission set for a single user to any number of entities + /// Returns a user by id /// - /// - /// - /// - void AssignUserPermission(int userId, char permission, params int[] entityIds); + /// + /// + /// This is only used for a shim in order to upgrade to 7.7 + /// + /// + /// A non cached instance + /// + IUser Get(int id, bool includeSecurityData); + + IProfile GetProfile(string username); + IProfile GetProfile(int id); + IDictionary GetUserStates(); + } } \ No newline at end of file diff --git a/src/Umbraco.Core/Persistence/Repositories/Interfaces/IUserTypeRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Interfaces/IUserTypeRepository.cs deleted file mode 100644 index 43b6709aa7..0000000000 --- a/src/Umbraco.Core/Persistence/Repositories/Interfaces/IUserTypeRepository.cs +++ /dev/null @@ -1,9 +0,0 @@ -using Umbraco.Core.Models.Membership; - -namespace Umbraco.Core.Persistence.Repositories -{ - public interface IUserTypeRepository : IRepositoryQueryable - { - - } -} \ No newline at end of file diff --git a/src/Umbraco.Core/Persistence/Repositories/MacroScriptRepository.cs b/src/Umbraco.Core/Persistence/Repositories/MacroScriptRepository.cs new file mode 100644 index 0000000000..0f335173ad --- /dev/null +++ b/src/Umbraco.Core/Persistence/Repositories/MacroScriptRepository.cs @@ -0,0 +1,15 @@ +using Umbraco.Core.IO; +using Umbraco.Core.Models; +using Umbraco.Core.Persistence.UnitOfWork; + +namespace Umbraco.Core.Persistence.Repositories +{ + internal class MacroScriptRepository : PartialViewRepository + { + public MacroScriptRepository(IUnitOfWork work, IFileSystem fileSystem) + : base(work, fileSystem) + { } + + protected override PartialViewType ViewType { get { return PartialViewType.MacroScript; } } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Persistence/Repositories/MediaRepository.cs b/src/Umbraco.Core/Persistence/Repositories/MediaRepository.cs index c9f06c6c75..ee413c2a59 100644 --- a/src/Umbraco.Core/Persistence/Repositories/MediaRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/MediaRepository.cs @@ -117,7 +117,7 @@ namespace Umbraco.Core.Persistence.Repositories { "DELETE FROM cmsTask WHERE nodeId = @Id", "DELETE FROM umbracoUser2NodeNotify WHERE nodeId = @Id", - "DELETE FROM umbracoUser2NodePermission WHERE nodeId = @Id", + "DELETE FROM umbracoUserGroup2NodePermission WHERE nodeId = @Id", "DELETE FROM umbracoRelation WHERE parentId = @Id", "DELETE FROM umbracoRelation WHERE childId = @Id", "DELETE FROM cmsTagRelationship WHERE nodeId = @Id", @@ -540,9 +540,9 @@ namespace Umbraco.Core.Persistence.Repositories var filterSql = new Sql(); if (filter != null) { - foreach (var filterClaus in filter.GetWhereClauses()) + foreach (var filterClause in filter.GetWhereClauses()) { - filterSql.Append(string.Format("AND ({0})", filterClaus.Item1), filterClaus.Item2); + filterSql.Append(string.Format("AND ({0})", filterClause.Item1), filterClause.Item2); } } diff --git a/src/Umbraco.Core/Persistence/Repositories/MediaTypeRepository.cs b/src/Umbraco.Core/Persistence/Repositories/MediaTypeRepository.cs index 11542673be..6ac920d6d9 100644 --- a/src/Umbraco.Core/Persistence/Repositories/MediaTypeRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/MediaTypeRepository.cs @@ -101,7 +101,7 @@ namespace Umbraco.Core.Persistence.Repositories var list = new List { "DELETE FROM umbracoUser2NodeNotify WHERE nodeId = @Id", - "DELETE FROM umbracoUser2NodePermission WHERE nodeId = @Id", + "DELETE FROM umbracoUserGroup2NodePermission WHERE nodeId = @Id", "DELETE FROM cmsTagRelationship WHERE nodeId = @Id", "DELETE FROM cmsContentTypeAllowedContentType WHERE Id = @Id", "DELETE FROM cmsContentTypeAllowedContentType WHERE AllowedId = @Id", diff --git a/src/Umbraco.Core/Persistence/Repositories/MemberGroupRepository.cs b/src/Umbraco.Core/Persistence/Repositories/MemberGroupRepository.cs index e9438b56f6..9e29cf0d83 100644 --- a/src/Umbraco.Core/Persistence/Repositories/MemberGroupRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/MemberGroupRepository.cs @@ -88,7 +88,7 @@ namespace Umbraco.Core.Persistence.Repositories var list = new[] { "DELETE FROM umbracoUser2NodeNotify WHERE nodeId = @Id", - "DELETE FROM umbracoUser2NodePermission WHERE nodeId = @Id", + "DELETE FROM umbracoUserGroup2NodePermission WHERE nodeId = @Id", "DELETE FROM umbracoRelation WHERE parentId = @Id", "DELETE FROM umbracoRelation WHERE childId = @Id", "DELETE FROM cmsTagRelationship WHERE nodeId = @Id", diff --git a/src/Umbraco.Core/Persistence/Repositories/MemberRepository.cs b/src/Umbraco.Core/Persistence/Repositories/MemberRepository.cs index 2ef795282b..9f35f8c592 100644 --- a/src/Umbraco.Core/Persistence/Repositories/MemberRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/MemberRepository.cs @@ -160,7 +160,7 @@ namespace Umbraco.Core.Persistence.Repositories { "DELETE FROM cmsTask WHERE nodeId = @Id", "DELETE FROM umbracoUser2NodeNotify WHERE nodeId = @Id", - "DELETE FROM umbracoUser2NodePermission WHERE nodeId = @Id", + "DELETE FROM umbracoUserGroup2NodePermission WHERE nodeId = @Id", "DELETE FROM umbracoRelation WHERE parentId = @Id", "DELETE FROM umbracoRelation WHERE childId = @Id", "DELETE FROM cmsTagRelationship WHERE nodeId = @Id", @@ -592,9 +592,9 @@ namespace Umbraco.Core.Persistence.Repositories var filterSql = new Sql(); if (filter != null) { - foreach (var filterClaus in filter.GetWhereClauses()) + foreach (var filterClause in filter.GetWhereClauses()) { - filterSql.Append(string.Format("AND ({0})", filterClaus.Item1), filterClaus.Item2); + filterSql.Append(string.Format("AND ({0})", filterClause.Item1), filterClause.Item2); } } diff --git a/src/Umbraco.Core/Persistence/Repositories/MemberTypeRepository.cs b/src/Umbraco.Core/Persistence/Repositories/MemberTypeRepository.cs index 8d489644b5..5865878aa9 100644 --- a/src/Umbraco.Core/Persistence/Repositories/MemberTypeRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/MemberTypeRepository.cs @@ -128,7 +128,7 @@ namespace Umbraco.Core.Persistence.Repositories var list = new List { "DELETE FROM umbracoUser2NodeNotify WHERE nodeId = @Id", - "DELETE FROM umbracoUser2NodePermission WHERE nodeId = @Id", + "DELETE FROM umbracoUserGroup2NodePermission WHERE nodeId = @Id", "DELETE FROM cmsTagRelationship WHERE nodeId = @Id", "DELETE FROM cmsContentTypeAllowedContentType WHERE Id = @Id", "DELETE FROM cmsContentTypeAllowedContentType WHERE AllowedId = @Id", diff --git a/src/Umbraco.Core/Persistence/Repositories/PermissionRepository.cs b/src/Umbraco.Core/Persistence/Repositories/PermissionRepository.cs index 3d6acb777b..edf0274832 100644 --- a/src/Umbraco.Core/Persistence/Repositories/PermissionRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/PermissionRepository.cs @@ -1,7 +1,5 @@ using System; -using System.Collections; using System.Collections.Generic; -using System.Dynamic; using System.Globalization; using System.Linq; using System.Text; @@ -12,9 +10,11 @@ using Umbraco.Core.Models.Membership; using Umbraco.Core.Models.Rdbms; using Umbraco.Core.Persistence.SqlSyntax; using Umbraco.Core.Persistence.UnitOfWork; -using Umbraco.Core.Services; using CacheKeys = Umbraco.Core.Cache.CacheKeys; using Umbraco.Core.Cache; +using Umbraco.Core.Logging; +using Umbraco.Core.Models; +using Umbraco.Core.Persistence.Querying; namespace Umbraco.Core.Persistence.Repositories { @@ -22,200 +22,209 @@ namespace Umbraco.Core.Persistence.Repositories /// A repository that exposes functionality to modify assigned permissions to a node /// /// - internal class PermissionRepository + /// + /// This repo implements the base class so that permissions can be queued to be persisted + /// like the normal repository pattern but the standard repository Get commands don't apply and will throw + /// + internal class PermissionRepository : PetaPocoRepositoryBase where TEntity : class, IAggregateRoot { - private readonly IScopeUnitOfWork _unitOfWork; - private readonly IRuntimeCacheProvider _runtimeCache; - private readonly ISqlSyntaxProvider _sqlSyntax; - internal PermissionRepository(IScopeUnitOfWork unitOfWork, CacheHelper cache, ISqlSyntaxProvider sqlSyntax) + public PermissionRepository(IScopeUnitOfWork work, CacheHelper cache, ILogger logger, ISqlSyntaxProvider sqlSyntax) + : base(work, cache, logger, sqlSyntax) { - _unitOfWork = unitOfWork; - //Make this repository use an isolated cache - _runtimeCache = cache.IsolatedRuntimeCache.GetOrCreateCache(); - _sqlSyntax = sqlSyntax; + } /// - /// Returns permissions for a given user for any number of nodes + /// Returns explicitly defined permissions for a user group for any number of nodes /// - /// + /// + /// The group ids to lookup permissions for + /// /// /// - public IEnumerable GetUserPermissionsForEntities(int userId, params int[] entityIds) - { - var entityIdKey = string.Join(",", entityIds.Select(x => x.ToString(CultureInfo.InvariantCulture))); - return _runtimeCache.GetCacheItem>( - string.Format("{0}{1}{2}", CacheKeys.UserPermissionsCacheKey, userId, entityIdKey), - () => - { + /// + /// This method will not support passing in more than 2000 group Ids + /// + public EntityPermissionCollection GetPermissionsForEntities(int[] groupIds, params int[] entityIds) + { + var result = new EntityPermissionCollection(); - var whereBuilder = new StringBuilder(); - - //where userId = @userId AND - whereBuilder.Append(_sqlSyntax.GetQuotedColumnName("userId")); - whereBuilder.Append("="); - whereBuilder.Append(userId); + foreach (var groupOfGroupIds in groupIds.InGroupsOf(2000)) + { + //copy local + var localIds = groupOfGroupIds.ToArray(); - if (entityIds.Any()) - { - whereBuilder.Append(" AND "); - - //where nodeId = @nodeId1 OR nodeId = @nodeId2, etc... - whereBuilder.Append("("); - for (var index = 0; index < entityIds.Length; index++) - { - var entityId = entityIds[index]; - whereBuilder.Append(_sqlSyntax.GetQuotedColumnName("nodeId")); - whereBuilder.Append("="); - whereBuilder.Append(entityId); - if (index < entityIds.Length - 1) - { - whereBuilder.Append(" OR "); - } - } - whereBuilder.Append(")"); - } - - var sql = new Sql(); + if (entityIds.Length == 0) + { + var sql = new Sql(); sql.Select("*") - .From() - .Where(whereBuilder.ToString()); - - //ToArray() to ensure it's all fetched from the db once. - var result = _unitOfWork.Database.Fetch(sql).ToArray(); - return ConvertToPermissionList(result); - - }, - //Since this cache can be quite large (http://issues.umbraco.org/issue/U4-2161) we will only have this exist in cache for 20 minutes, - // then it will refresh from the database. - new TimeSpan(0, 20, 0), - //Since this cache can be quite large (http://issues.umbraco.org/issue/U4-2161) we will make this priority below average - priority: CacheItemPriority.BelowNormal); - - } - + .From(SqlSyntax) + .Where(dto => localIds.Contains(dto.UserGroupId), SqlSyntax); + var permissions = UnitOfWork.Database.Fetch(sql); + foreach (var permission in ConvertToPermissionList(permissions)) + { + result.Add(permission); + } + } + else + { + //iterate in groups of 2000 since we don't want to exceed the max SQL param count + foreach (var groupOfEntityIds in entityIds.InGroupsOf(2000)) + { + var ids = groupOfEntityIds; + var sql = new Sql(); + sql.Select("*") + .From(SqlSyntax) + .Where(dto => localIds.Contains(dto.UserGroupId) && ids.Contains(dto.NodeId), SqlSyntax); + var permissions = UnitOfWork.Database.Fetch(sql); + foreach (var permission in ConvertToPermissionList(permissions)) + { + result.Add(permission); + } + } + } + } + + return result; + } + /// - /// Returns permissions for all users for a given entity + /// Returns permissions directly assigned to the content items for all user groups /// - /// + /// /// - public IEnumerable GetPermissionsForEntity(int entityId) + public IEnumerable GetPermissionsForEntities(int[] entityIds) { var sql = new Sql(); sql.Select("*") - .From() - .Where(dto => dto.NodeId == entityId) - .OrderBy(dto => dto.NodeId); + .From(SqlSyntax) + .Where(dto => entityIds.Contains(dto.NodeId), SqlSyntax) + .OrderBy(dto => dto.NodeId, SqlSyntax); - //ToArray() to ensure it's all fetched from the db once. - var result = _unitOfWork.Database.Fetch(sql).ToArray(); + var result = UnitOfWork.Database.Fetch(sql); + return ConvertToPermissionList(result); + } + + /// + /// Returns permissions directly assigned to the content item for all user groups + /// + /// + /// + public EntityPermissionCollection GetPermissionsForEntity(int entityId) + { + var sql = new Sql(); + sql.Select("*") + .From(SqlSyntax) + .Where(dto => dto.NodeId == entityId, SqlSyntax) + .OrderBy(dto => dto.NodeId, SqlSyntax); + + var result = UnitOfWork.Database.Fetch(sql); return ConvertToPermissionList(result); } /// - /// Assigns the same permission set for a single user to any number of entities + /// Assigns the same permission set for a single group to any number of entities /// - /// + /// /// /// /// /// This will first clear the permissions for this user and entities and recreate them /// - public void ReplaceUserPermissions(int userId, IEnumerable permissions, params int[] entityIds) + public void ReplacePermissions(int groupId, IEnumerable permissions, params int[] entityIds) { - var db = _unitOfWork.Database; + if (entityIds.Length == 0) + return; - //we need to batch these in groups of 2000 so we don't exceed the max 2100 limit + var db = UnitOfWork.Database; + + //we need to batch these in groups of 2000 so we don't exceed the max 2100 limit + var sql = "DELETE FROM umbracoUserGroup2NodePermission WHERE userGroupId = @groupId AND nodeId in (@nodeIds)"; foreach (var idGroup in entityIds.InGroupsOf(2000)) - { - db.Execute("DELETE FROM umbracoUser2NodePermission WHERE userId=@userId AND nodeId in (@nodeIds)", - new { userId = userId, nodeIds = idGroup }); - } - - var toInsert = new List(); + { + db.Execute(sql, new { groupId = groupId, nodeIds = idGroup }); + } + + var toInsert = new List(); foreach (var p in permissions) { foreach (var e in entityIds) - { - toInsert.Add(new User2NodePermissionDto + { + toInsert.Add(new UserGroup2NodePermissionDto { NodeId = e, - Permission = p.ToString(CultureInfo.InvariantCulture), - UserId = userId + Permission = p.ToString(CultureInfo.InvariantCulture), + UserGroupId = groupId }); } } - _unitOfWork.Database.BulkInsertRecords(toInsert, _sqlSyntax); - - //Raise the event - _unitOfWork.Events.Dispatch(AssignedPermissions, this, new SaveEventArgs(ConvertToPermissionList(toInsert), false)); + UnitOfWork.Database.BulkInsertRecords(toInsert, SqlSyntax); + } /// /// Assigns one permission for a user to many entities /// - /// + /// /// /// - public void AssignUserPermission(int userId, char permission, params int[] entityIds) + public void AssignPermission(int groupId, char permission, params int[] entityIds) { - var db = _unitOfWork.Database; - db.Execute("DELETE FROM umbracoUser2NodePermission WHERE userId=@userId AND permission=@permission AND nodeId in (@entityIds)", - new - { - userId = userId, - permission = permission.ToString(CultureInfo.InvariantCulture), - entityIds = entityIds - }); - - var actions = entityIds.Select(id => new User2NodePermissionDto + var db = UnitOfWork.Database; + var sql = "DELETE FROM umbracoUserGroup2NodePermission WHERE userGroupId = @groupId AND permission=@permission AND nodeId in (@entityIds)"; + db.Execute(sql, + new + { + groupId = groupId, + permission = permission.ToString(CultureInfo.InvariantCulture), + entityIds = entityIds + }); + + var actions = entityIds.Select(id => new UserGroup2NodePermissionDto { NodeId = id, - Permission = permission.ToString(CultureInfo.InvariantCulture), - UserId = userId + Permission = permission.ToString(CultureInfo.InvariantCulture), + UserGroupId = groupId }).ToArray(); - _unitOfWork.Database.BulkInsertRecords(actions, _sqlSyntax); + UnitOfWork.Database.BulkInsertRecords(actions, SqlSyntax); - //Raise the event - _unitOfWork.Events.Dispatch(AssignedPermissions, this, new SaveEventArgs(ConvertToPermissionList(actions), false)); - } - - /// - /// Assigns one permission to an entity for multiple users - /// - /// - /// - /// - public void AssignEntityPermission(TEntity entity, char permission, IEnumerable userIds) - { - var db = _unitOfWork.Database; - db.Execute("DELETE FROM umbracoUser2NodePermission WHERE nodeId=@nodeId AND permission=@permission AND userId in (@userIds)", - new - { - nodeId = entity.Id, - permission = permission.ToString(CultureInfo.InvariantCulture), - userIds = userIds - }); - - var actions = userIds.Select(id => new User2NodePermissionDto - { - NodeId = entity.Id, - Permission = permission.ToString(CultureInfo.InvariantCulture), - UserId = id - }).ToArray(); - - _unitOfWork.Database.BulkInsertRecords(actions, _sqlSyntax); - - //Raise the event - _unitOfWork.Events.Dispatch(AssignedPermissions, this, new SaveEventArgs(ConvertToPermissionList(actions), false)); } /// - /// Assigns permissions to an entity for multiple users/permission entries + /// Assigns one permission to an entity for multiple groups + /// + /// + /// + /// + public void AssignEntityPermission(TEntity entity, char permission, IEnumerable groupIds) + { + var db = UnitOfWork.Database; + var sql = "DELETE FROM umbracoUserGroup2NodePermission WHERE nodeId = @nodeId AND permission = @permission AND userGroupId in (@groupIds)"; + db.Execute(sql, + new + { + nodeId = entity.Id, + permission = permission.ToString(CultureInfo.InvariantCulture), + groupIds = groupIds + }); + + var actions = groupIds.Select(id => new UserGroup2NodePermissionDto + { + NodeId = entity.Id, + Permission = permission.ToString(CultureInfo.InvariantCulture), + UserGroupId = id + }).ToArray(); + + UnitOfWork.Database.BulkInsertRecords(actions, SqlSyntax); + + } + + /// + /// Assigns permissions to an entity for multiple group/permission entries /// /// /// @@ -224,38 +233,113 @@ namespace Umbraco.Core.Persistence.Repositories /// public void ReplaceEntityPermissions(EntityPermissionSet permissionSet) { - var db = _unitOfWork.Database; - db.Execute("DELETE FROM umbracoUser2NodePermission WHERE nodeId=@nodeId", new { nodeId = permissionSet.EntityId }); + var db = UnitOfWork.Database; + var sql = "DELETE FROM umbracoUserGroup2NodePermission WHERE nodeId = @nodeId"; + db.Execute(sql, new { nodeId = permissionSet.EntityId }); - var actions = permissionSet.UserPermissionsSet.Select(p => new User2NodePermissionDto + var toInsert = new List(); + foreach (var entityPermission in permissionSet.PermissionsSet) { - NodeId = permissionSet.EntityId, - Permission = p.Permission, - UserId = p.UserId - }).ToArray(); + foreach (var permission in entityPermission.AssignedPermissions) + { + toInsert.Add(new UserGroup2NodePermissionDto + { + NodeId = permissionSet.EntityId, + Permission = permission, + UserGroupId = entityPermission.UserGroupId + }); + } + } - _unitOfWork.Database.BulkInsertRecords(actions, _sqlSyntax); + UnitOfWork.Database.BulkInsertRecords(toInsert, SqlSyntax); - //Raise the event - _unitOfWork.Events.Dispatch(AssignedPermissions, this, new SaveEventArgs(ConvertToPermissionList(actions), false)); } - private static IEnumerable ConvertToPermissionList(IEnumerable result) + + #region Not implemented (don't need to for the purposes of this repo) + protected override ContentPermissionSet PerformGet(int id) { - var permissions = new List(); + throw new NotImplementedException(); + } + + protected override IEnumerable PerformGetAll(params int[] ids) + { + throw new NotImplementedException(); + } + + protected override IEnumerable PerformGetByQuery(IQuery query) + { + throw new NotImplementedException(); + } + + protected override Sql GetBaseQuery(bool isCount) + { + throw new NotImplementedException(); + } + + protected override string GetBaseWhereClause() + { + throw new NotImplementedException(); + } + + protected override IEnumerable GetDeleteClauses() + { + return new List(); + } + + protected override Guid NodeObjectTypeId + { + get { throw new NotImplementedException(); } + } + + protected override void PersistDeletedItem(ContentPermissionSet entity) + { + throw new NotImplementedException(); + } + + #endregion + + /// + /// Used to add or update entity permissions during a content item being updated + /// + /// + protected override void PersistNewItem(ContentPermissionSet entity) + { + //does the same thing as update + PersistUpdatedItem(entity); + } + + /// + /// Used to add or update entity permissions during a content item being updated + /// + /// + protected override void PersistUpdatedItem(ContentPermissionSet entity) + { + var asAggregateRoot = (IAggregateRoot)entity; + if (asAggregateRoot.HasIdentity == false) + { + throw new InvalidOperationException("Cannot create permissions for an entity without an Id"); + } + + ReplaceEntityPermissions(entity); + } + + private static EntityPermissionCollection ConvertToPermissionList(IEnumerable result) + { + var permissions = new EntityPermissionCollection(); var nodePermissions = result.GroupBy(x => x.NodeId); foreach (var np in nodePermissions) { - var userPermissions = np.GroupBy(x => x.UserId); - foreach (var up in userPermissions) + var userGroupPermissions = np.GroupBy(x => x.UserGroupId); + foreach (var permission in userGroupPermissions) { - var perms = up.Select(x => x.Permission).ToArray(); - permissions.Add(new EntityPermission(up.Key, up.First().NodeId, perms)); + var perms = permission.Select(x => x.Permission).Distinct().ToArray(); + permissions.Add(new EntityPermission(permission.Key, np.Key, perms)); } } - return permissions; - } - public static event TypedEventHandler, SaveEventArgs> AssignedPermissions; + return permissions; + } + } } \ No newline at end of file diff --git a/src/Umbraco.Core/Persistence/Repositories/RecycleBinRepository.cs b/src/Umbraco.Core/Persistence/Repositories/RecycleBinRepository.cs index 1d3c5d6670..efb7487fdf 100644 --- a/src/Umbraco.Core/Persistence/Repositories/RecycleBinRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/RecycleBinRepository.cs @@ -44,7 +44,7 @@ namespace Umbraco.Core.Persistence.Repositories { FormatDeleteStatement("cmsTask", "nodeId"), FormatDeleteStatement("umbracoUser2NodeNotify", "nodeId"), - FormatDeleteStatement("umbracoUser2NodePermission", "nodeId"), + FormatDeleteStatement("umbracoUserGroup2NodePermission", "nodeId"), @"DELETE FROM umbracoAccessRule WHERE umbracoAccessRule.accessId IN ( SELECT TB1.id FROM umbracoAccess as TB1 INNER JOIN umbracoNode as TB2 ON TB1.nodeId = TB2.id diff --git a/src/Umbraco.Core/Persistence/Repositories/SimpleGetRepository.cs b/src/Umbraco.Core/Persistence/Repositories/SimpleGetRepository.cs index 67c9149422..28e676743f 100644 --- a/src/Umbraco.Core/Persistence/Repositories/SimpleGetRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/SimpleGetRepository.cs @@ -66,7 +66,7 @@ namespace Umbraco.Core.Persistence.Repositories return Database.Fetch(sql).Select(ConvertToEntity); } - protected override sealed IEnumerable PerformGetByQuery(IQuery query) + protected sealed override IEnumerable PerformGetByQuery(IQuery query) { var sqlClause = GetBaseQuery(false); var translator = new SqlTranslator(sqlClause, query); @@ -76,22 +76,22 @@ namespace Umbraco.Core.Persistence.Repositories #region Not implemented and not required - protected override sealed IEnumerable GetDeleteClauses() + protected sealed override IEnumerable GetDeleteClauses() { throw new NotImplementedException(); } - protected override sealed Guid NodeObjectTypeId + protected sealed override Guid NodeObjectTypeId { get { throw new NotImplementedException(); } } - protected override sealed void PersistNewItem(TEntity entity) + protected sealed override void PersistNewItem(TEntity entity) { throw new NotImplementedException(); } - protected override sealed void PersistUpdatedItem(TEntity entity) + protected sealed override void PersistUpdatedItem(TEntity entity) { throw new NotImplementedException(); } diff --git a/src/Umbraco.Core/Persistence/Repositories/TemplateRepository.cs b/src/Umbraco.Core/Persistence/Repositories/TemplateRepository.cs index 7f265aceb7..2c49965d11 100644 --- a/src/Umbraco.Core/Persistence/Repositories/TemplateRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/TemplateRepository.cs @@ -126,7 +126,7 @@ namespace Umbraco.Core.Persistence.Repositories var list = new List { "DELETE FROM umbracoUser2NodeNotify WHERE nodeId = @Id", - "DELETE FROM umbracoUser2NodePermission WHERE nodeId = @Id", + "DELETE FROM umbracoUserGroup2NodePermission WHERE nodeId = @Id", "UPDATE cmsDocument SET templateId = NULL WHERE templateId = @Id", "DELETE FROM cmsDocumentType WHERE templateNodeId = @Id", "DELETE FROM cmsTemplate WHERE nodeId = @Id", diff --git a/src/Umbraco.Core/Persistence/Repositories/UserControlRepository.cs b/src/Umbraco.Core/Persistence/Repositories/UserControlRepository.cs new file mode 100644 index 0000000000..77ad09cb57 --- /dev/null +++ b/src/Umbraco.Core/Persistence/Repositories/UserControlRepository.cs @@ -0,0 +1,135 @@ +using System.Collections.Generic; +using System.IO; +using System.Linq; +using Umbraco.Core.IO; +using Umbraco.Core.Models; +using Umbraco.Core.Persistence.UnitOfWork; + +namespace Umbraco.Core.Persistence.Repositories +{ + /// + /// Represents the UserControl Repository + /// + internal class UserControlRepository : FileRepository, IUserControlRepository + { + public UserControlRepository(IUnitOfWork work, IFileSystem fileSystem) + : base(work, fileSystem) + { + } + + public override UserControl Get(string id) + { + var path = FileSystem.GetRelativePath(id); + + path = path.EnsureEndsWith(".ascx"); + + if (FileSystem.FileExists(path) == false) + return null; + + var created = FileSystem.GetCreated(path).UtcDateTime; + var updated = FileSystem.GetLastModified(path).UtcDateTime; + + var userControl = new UserControl(path, file => GetFileContent(file.OriginalPath)) + { + Key = path.EncodeAsGuid(), + CreateDate = created, + UpdateDate = updated, + Id = path.GetHashCode(), + VirtualPath = FileSystem.GetUrl(path) + }; + + //on initial construction we don't want to have dirty properties tracked + // http://issues.umbraco.org/issue/U4-1946 + userControl.ResetDirtyProperties(false); + + return userControl; + } + + public override void AddOrUpdate(UserControl entity) + { + base.AddOrUpdate(entity); + + // ensure that from now on, content is lazy-loaded + if (entity.GetFileContent == null) + entity.GetFileContent = file => GetFileContent(file.OriginalPath); + } + + public override IEnumerable GetAll(params string[] ids) + { + ids = ids + .Select(x => StringExtensions.EnsureEndsWith(x, ".ascx")) + .Distinct() + .ToArray(); + + if (ids.Any()) + { + foreach (var id in ids) + { + yield return Get(id); + } + } + else + { + var files = FindAllFiles("", "*.ascx"); + foreach (var file in files) + { + yield return Get(file); + } + } + } + + /// + /// Gets a list of all that exist at the relative path specified. + /// + /// + /// If null or not specified, will return the UserControl files at the root path relative to the IFileSystem + /// + /// + public IEnumerable GetUserControlsAtPath(string rootPath = null) + { + return FileSystem.GetFiles(rootPath ?? string.Empty, "*.ascx").Select(Get); + } + + private static readonly List ValidExtensions = new List { "ascx" }; + + public bool ValidateUserControl(UserControl userControl) + { + // get full path + string fullPath; + try + { + // may throw for security reasons + fullPath = FileSystem.GetFullPath(userControl.Path); + } + catch + { + return false; + } + + // validate path and extension + var validDir = SystemDirectories.UserControls; + var isValidPath = IOHelper.VerifyEditPath(fullPath, validDir); + var isValidExtension = IOHelper.VerifyFileExtension(userControl.Path, ValidExtensions); + return isValidPath && isValidExtension; + } + + public Stream GetFileContentStream(string filepath) + { + if (FileSystem.FileExists(filepath) == false) return null; + + try + { + return FileSystem.OpenFile(filepath); + } + catch + { + return null; // deal with race conds + } + } + + public void SetFileContent(string filepath, Stream content) + { + FileSystem.AddFile(filepath, content, true); + } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Persistence/Repositories/UserGroupRepository.cs b/src/Umbraco.Core/Persistence/Repositories/UserGroupRepository.cs new file mode 100644 index 0000000000..be7a31e298 --- /dev/null +++ b/src/Umbraco.Core/Persistence/Repositories/UserGroupRepository.cs @@ -0,0 +1,459 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using Umbraco.Core.Logging; +using Umbraco.Core.Models; +using Umbraco.Core.Cache; +using Umbraco.Core.Models.EntityBase; +using Umbraco.Core.Models.Membership; +using Umbraco.Core.Models.Rdbms; +using Umbraco.Core.Persistence.Factories; +using Umbraco.Core.Persistence.Querying; +using Umbraco.Core.Persistence.Relators; +using Umbraco.Core.Persistence.SqlSyntax; +using Umbraco.Core.Persistence.UnitOfWork; + +namespace Umbraco.Core.Persistence.Repositories +{ + /// + /// Represents the UserGroupRepository for doing CRUD operations for + /// + internal class UserGroupRepository : PetaPocoRepositoryBase, IUserGroupRepository + { + private readonly CacheHelper _cacheHelper; + private readonly UserGroupWithUsersRepository _userGroupWithUsersRepository; + private readonly PermissionRepository _permissionRepository; + + public UserGroupRepository(IScopeUnitOfWork work, CacheHelper cacheHelper, ILogger logger, ISqlSyntaxProvider sqlSyntax) + : base(work, cacheHelper, logger, sqlSyntax) + { + _cacheHelper = cacheHelper; + _userGroupWithUsersRepository = new UserGroupWithUsersRepository(this, work, cacheHelper, logger, sqlSyntax); + _permissionRepository = new PermissionRepository(work, _cacheHelper, logger, sqlSyntax); + } + + public const string GetByAliasCacheKeyPrefix = "UserGroupRepository_GetByAlias_"; + public static string GetByAliasCacheKey(string alias) + { + return GetByAliasCacheKeyPrefix + alias; + } + + public IUserGroup Get(string alias) + { + try + { + //need to do a simple query to get the id - put this cache + var id = IsolatedCache.GetCacheItem(GetByAliasCacheKey(alias), () => + { + var groupId = Database.ExecuteScalar("SELECT id FROM umbracoUserGroup WHERE userGroupAlias=@alias", new { alias = alias }); + if (groupId.HasValue == false) throw new InvalidOperationException("No group found with alias " + alias); + return groupId.Value; + }); + + //return from the normal method which will cache + return Get(id); + } + catch (InvalidOperationException) + { + //if this is caught it's because we threw this in the caching method + return null; + } + } + + public IEnumerable GetGroupsAssignedToSection(string sectionAlias) + { + //Here we're building up a query that looks like this, a sub query is required because the resulting structure + // needs to still contain all of the section rows per user group. + + //SELECT * + //FROM [umbracoUserGroup] + //LEFT JOIN [umbracoUserGroup2App] + //ON [umbracoUserGroup].[id] = [umbracoUserGroup2App].[user] + //WHERE umbracoUserGroup.id IN (SELECT umbracoUserGroup.id + // FROM [umbracoUserGroup] + // LEFT JOIN [umbracoUserGroup2App] + // ON [umbracoUserGroup].[id] = [umbracoUserGroup2App].[user] + // WHERE umbracoUserGroup2App.app = 'content') + + var sql = GetBaseQuery(false); + var innerSql = GetBaseQuery("umbracoUserGroup.id"); + innerSql.Where("umbracoUserGroup2App.app = " + SqlSyntax.GetQuotedValue(sectionAlias)); + sql.Where(string.Format("umbracoUserGroup.id IN ({0})", innerSql.SQL)); + AppendGroupBy(sql); + //must be included for relator to work + sql.OrderBy(x => x.Id, SqlSyntax); + + return ConvertFromDtos(Database.Fetch(new UserGroupSectionRelator().Map, sql)); + } + + public void AddOrUpdateGroupWithUsers(IUserGroup userGroup, int[] userIds) + { + _userGroupWithUsersRepository.AddOrUpdate(new UserGroupWithUsers(userGroup, userIds)); + } + + + /// + /// Gets explicilty defined permissions for the group for specified entities + /// + /// + /// Array of entity Ids, if empty will return permissions for the group for all entities + public EntityPermissionCollection GetPermissions(int[] groupIds, params int[] entityIds) + { + return _permissionRepository.GetPermissionsForEntities(groupIds, entityIds); + } + + /// + /// Gets explicilt and default permissions (if requested) permissions for the group for specified entities + /// + /// + /// If true will include the group's default permissions if no permissions are explicitly assigned + /// Array of entity Ids, if empty will return permissions for the group for all entities + public EntityPermissionCollection GetPermissions(IReadOnlyUserGroup[] groups, bool fallbackToDefaultPermissions, params int[] nodeIds) + { + if (groups == null) throw new ArgumentNullException("groups"); + + var groupIds = groups.Select(x => x.Id).ToArray(); + var explicitPermissions = GetPermissions(groupIds, nodeIds); + var result = new EntityPermissionCollection(explicitPermissions); + + // If requested, and no permissions are assigned to a particular node, then we will fill in those permissions with the group's defaults + if (fallbackToDefaultPermissions) + { + //if no node ids are passed in, then we need to determine the node ids for the explicit permissions set + nodeIds = nodeIds.Length == 0 + ? explicitPermissions.Select(x => x.EntityId).Distinct().ToArray() + : nodeIds; + + //if there are still no nodeids we can just exit + if (nodeIds.Length == 0) + return result; + + foreach (var group in groups) + { + foreach (var nodeId in nodeIds) + { + //TODO: We could/should change the EntityPermissionsCollection into a KeyedCollection and they key could be + // a struct of the nodeid + groupid so then we don't actually allocate this class just to check if it's not + // going to be included in the result! + + var defaultPermission = new EntityPermission(group.Id, nodeId, group.Permissions.ToArray(), isDefaultPermissions: true); + //Since this is a hashset, this will not add anything that already exists by group/node combination + result.Add(defaultPermission); + } + } + } + return result; + } + + /// + /// Replaces the same permission set for a single group to any number of entities + /// + /// Id of group + /// Permissions as enumerable list of If nothing is specified all permissions are removed. + /// Specify the nodes to replace permissions for. + public void ReplaceGroupPermissions(int groupId, IEnumerable permissions, params int[] entityIds) + { + _permissionRepository.ReplacePermissions(groupId, permissions, entityIds); + } + + /// + /// Assigns the same permission set for a single group to any number of entities + /// + /// Id of group + /// Permissions as enumerable list of + /// Specify the nodes to replace permissions for + public void AssignGroupPermission(int groupId, char permission, params int[] entityIds) + { + _permissionRepository.AssignPermission(groupId, permission, entityIds); + } + + #region Overrides of RepositoryBase + + protected override IUserGroup PerformGet(int id) + { + var sql = GetBaseQuery(false); + sql.Where(GetBaseWhereClause(), new { Id = id }); + AppendGroupBy(sql); + //must be included for relator to work + sql.OrderBy(x => x.Id, SqlSyntax); + + var dto = Database.Fetch(new UserGroupSectionRelator().Map, sql).FirstOrDefault(); + + if (dto == null) + return null; + + var userGroup = UserGroupFactory.BuildEntity(dto); + return userGroup; + } + + protected override IEnumerable PerformGetAll(params int[] ids) + { + var sql = GetBaseQuery(false); + + if (ids.Any()) + { + sql.Where("umbracoUserGroup.id in (@ids)", new { ids = ids }); + } + else + { + sql.Where(x => x.Id >= 0); + } + AppendGroupBy(sql); + //must be included for relator to work + sql.OrderBy(x => x.Id, SqlSyntax); + + var dtos = Database.Fetch(new UserGroupSectionRelator().Map, sql); + return ConvertFromDtos(dtos); + } + + protected override IEnumerable PerformGetByQuery(IQuery query) + { + var sqlClause = GetBaseQuery(false); + var translator = new SqlTranslator(sqlClause, query); + var sql = translator.Translate(); + AppendGroupBy(sql); + //must be included for relator to work + sql.OrderBy(x => x.Id, SqlSyntax); + + var dtos = Database.Fetch(new UserGroupSectionRelator().Map, sql); + return ConvertFromDtos(dtos); + } + + #endregion + + #region Overrides of PetaPocoRepositoryBase + + protected override Sql GetBaseQuery(bool isCount) + { + var sql = new Sql(); + if (isCount) + { + sql.Select("COUNT(*)").From(); + } + else + { + return GetBaseQuery(@"umbracoUserGroup.createDate, umbracoUserGroup.icon, umbracoUserGroup.id, umbracoUserGroup.startContentId, +umbracoUserGroup.startMediaId, umbracoUserGroup.updateDate, umbracoUserGroup.userGroupAlias, umbracoUserGroup.userGroupDefaultPermissions, +umbracoUserGroup.userGroupName, COUNT(umbracoUser.id) AS UserCount, umbracoUserGroup2App.app, umbracoUserGroup2App.userGroupId"); + } + return sql; + } + + protected Sql GetBaseQuery(string columns) + { + var sql = new Sql(); + sql.Select(columns) + .From() + .LeftJoin() + .On(left => left.Id, right => right.UserGroupId) + .LeftJoin() + .On(left => left.UserGroupId, right => right.Id) + .LeftJoin() + .On(left => left.Id, right => right.UserId); + + return sql; + } + + private void AppendGroupBy(Sql sql) + { + sql.GroupBy(@"umbracoUserGroup.createDate, umbracoUserGroup.icon, umbracoUserGroup.id, umbracoUserGroup.startContentId, +umbracoUserGroup.startMediaId, umbracoUserGroup.updateDate, umbracoUserGroup.userGroupAlias, umbracoUserGroup.userGroupDefaultPermissions, +umbracoUserGroup.userGroupName, umbracoUserGroup2App.app, umbracoUserGroup2App.userGroupId"); + } + + protected override string GetBaseWhereClause() + { + return "umbracoUserGroup.id = @Id"; + } + + protected override IEnumerable GetDeleteClauses() + { + var list = new List + { + "DELETE FROM umbracoUser2UserGroup WHERE userGroupId = @Id", + "DELETE FROM umbracoUserGroup2App WHERE userGroupId = @Id", + "DELETE FROM umbracoUserGroup2NodePermission WHERE userGroupId = @Id", + "DELETE FROM umbracoUserGroup WHERE id = @Id" + }; + return list; + } + + protected override Guid NodeObjectTypeId + { + get { throw new NotImplementedException(); } + } + + protected override void PersistNewItem(IUserGroup entity) + { + ((UserGroup)entity).AddingEntity(); + + var userGroupDto = UserGroupFactory.BuildDto(entity); + + var id = Convert.ToInt32(Database.Insert(userGroupDto)); + entity.Id = id; + + PersistAllowedSections(entity); + } + + protected override void PersistUpdatedItem(IUserGroup entity) + { + ((UserGroup)entity).UpdatingEntity(); + + var userGroupDto = UserGroupFactory.BuildDto(entity); + + Database.Update(userGroupDto); + + PersistAllowedSections(entity); + } + + private void PersistAllowedSections(IUserGroup entity) + { + var userGroup = (UserGroup)entity; + + // First delete all + Database.Delete("WHERE UserGroupId = @UserGroupId", + new { UserGroupId = userGroup.Id }); + + // Then re-add any associated with the group + foreach (var app in userGroup.AllowedSections) + { + var dto = new UserGroup2AppDto + { + UserGroupId = userGroup.Id, + AppAlias = app + }; + Database.Insert(dto); + } + } + + #endregion + + private static IEnumerable ConvertFromDtos(IEnumerable dtos) + { + return dtos.Select(UserGroupFactory.BuildEntity); + } + + /// + /// used to persist a user group with associated users at once + /// + private class UserGroupWithUsers : Entity, IAggregateRoot + { + public UserGroupWithUsers(IUserGroup userGroup, int[] userIds) + { + UserGroup = userGroup; + UserIds = userIds; + } + + public override bool HasIdentity + { + get { return UserGroup.HasIdentity; } + protected set + { + throw new NotSupportedException(); + } + } + + public IUserGroup UserGroup { get; private set; } + public int[] UserIds { get; private set; } + + } + + /// + /// used to persist a user group with associated users at once + /// + private class UserGroupWithUsersRepository : PetaPocoRepositoryBase + { + private readonly UserGroupRepository _userGroupRepo; + + public UserGroupWithUsersRepository(UserGroupRepository userGroupRepo, IScopeUnitOfWork work, CacheHelper cache, ILogger logger, ISqlSyntaxProvider sqlSyntax) + : base(work, cache, logger, sqlSyntax) + { + _userGroupRepo = userGroupRepo; + } + + #region Not implemented (don't need to for the purposes of this repo) + protected override UserGroupWithUsers PerformGet(int id) + { + throw new NotImplementedException(); + } + protected override IEnumerable PerformGetAll(params int[] ids) + { + throw new NotImplementedException(); + } + protected override IEnumerable PerformGetByQuery(IQuery query) + { + throw new NotImplementedException(); + } + protected override Sql GetBaseQuery(bool isCount) + { + throw new NotImplementedException(); + } + protected override string GetBaseWhereClause() + { + throw new NotImplementedException(); + } + protected override IEnumerable GetDeleteClauses() + { + throw new NotImplementedException(); + } + protected override Guid NodeObjectTypeId + { + get { throw new NotImplementedException(); } + } + #endregion + + protected override void PersistNewItem(UserGroupWithUsers entity) + { + //save the user group + _userGroupRepo.PersistNewItem(entity.UserGroup); + if (entity.UserIds != null) + { + //now the user association + RemoveAllUsersFromGroup(entity.UserGroup.Id); + AddUsersToGroup(entity.UserGroup.Id, entity.UserIds); + } + + } + + protected override void PersistUpdatedItem(UserGroupWithUsers entity) + { + //save the user group + _userGroupRepo.PersistUpdatedItem(entity.UserGroup); + if (entity.UserIds != null) + { + //now the user association + RemoveAllUsersFromGroup(entity.UserGroup.Id); + AddUsersToGroup(entity.UserGroup.Id, entity.UserIds); + } + } + + /// + /// Removes all users from a group + /// + /// Id of group + private void RemoveAllUsersFromGroup(int groupId) + { + Database.Delete("WHERE userGroupId = @GroupId", new { GroupId = groupId }); + } + + /// + /// Adds a set of users to a group + /// + /// Id of group + /// Ids of users + private void AddUsersToGroup(int groupId, int[] userIds) + { + //TODO: Check if the user exists? + foreach (var userId in userIds) + { + var dto = new User2UserGroupDto + { + UserGroupId = groupId, + UserId = userId, + }; + Database.Insert(dto); + } + } + } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Persistence/Repositories/UserRepository.cs b/src/Umbraco.Core/Persistence/Repositories/UserRepository.cs index 10758be578..204e17aff7 100644 --- a/src/Umbraco.Core/Persistence/Repositories/UserRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/UserRepository.cs @@ -1,20 +1,23 @@ using System; using System.Collections.Generic; +using System.ComponentModel; using System.Linq; using System.Linq.Expressions; -using Umbraco.Core; +using System.Text; +using System.Web.Security; +using Newtonsoft.Json; using Umbraco.Core.Logging; -using Umbraco.Core.Models; using Umbraco.Core.Models.EntityBase; using Umbraco.Core.Models.Membership; using Umbraco.Core.Models.Rdbms; - +using Umbraco.Core.Persistence.DatabaseModelDefinitions; using Umbraco.Core.Persistence.Factories; using Umbraco.Core.Persistence.Mappers; using Umbraco.Core.Persistence.Querying; using Umbraco.Core.Persistence.Relators; using Umbraco.Core.Persistence.SqlSyntax; using Umbraco.Core.Persistence.UnitOfWork; +using Umbraco.Core.Security; namespace Umbraco.Core.Persistence.Repositories { @@ -23,73 +26,220 @@ namespace Umbraco.Core.Persistence.Repositories /// internal class UserRepository : PetaPocoRepositoryBase, IUserRepository { - private readonly IUserTypeRepository _userTypeRepository; - private readonly CacheHelper _cacheHelper; - - public UserRepository(IScopeUnitOfWork work, CacheHelper cacheHelper, ILogger logger, ISqlSyntaxProvider sqlSyntax, IUserTypeRepository userTypeRepository) + private readonly IDictionary _passwordConfiguration; + + /// + /// Constructor + /// + /// + /// + /// + /// + /// + /// A dictionary specifying the configuration for user passwords. If this is null then no password configuration will be persisted or read. + /// + public UserRepository(IScopeUnitOfWork work, CacheHelper cacheHelper, ILogger logger, ISqlSyntaxProvider sqlSyntax, + IDictionary passwordConfiguration = null) : base(work, cacheHelper, logger, sqlSyntax) { - _userTypeRepository = userTypeRepository; - _cacheHelper = cacheHelper; + _passwordConfiguration = passwordConfiguration; } #region Overrides of RepositoryBase protected override IUser PerformGet(int id) { - var sql = GetBaseQuery(false); + var sql = GetQueryWithGroups(); sql.Where(GetBaseWhereClause(), new { Id = id }); - //must be sorted this way for the relator to work - sql.OrderBy(x => x.Id, SqlSyntax); + sql //must be included for relator to work + .OrderBy(d => d.Id, SqlSyntax) + .OrderBy(d => d.Id, SqlSyntax) + .OrderBy(d => d.Id, SqlSyntax); - var dto = Database.Fetch(new UserSectionRelator().Map, sql).FirstOrDefault(); - + var dto = Database.Fetch(new UserGroupRelator().Map, sql) + .FirstOrDefault(); + if (dto == null) return null; - var userType = _userTypeRepository.Get(dto.Type); - var userFactory = new UserFactory(userType); - var user = userFactory.BuildEntity(dto); - + var user = UserFactory.BuildEntity(dto); return user; } + /// + /// Returns a user by username + /// + /// + /// + /// Can be used for slightly faster user lookups if the result doesn't require security data (i.e. groups, apps & start nodes). + /// This is really only used for a shim in order to upgrade to 7.6. + /// + /// + /// A non cached instance + /// + public IUser GetByUsername(string username, bool includeSecurityData) + { + UserDto dto; + if (includeSecurityData) + { + var sql = GetQueryWithGroups(); + sql.Where(userDto => userDto.Login == username, SqlSyntax); + sql //must be included for relator to work + .OrderBy(d => d.Id, SqlSyntax) + .OrderBy(d => d.Id, SqlSyntax) + .OrderBy(d => d.Id, SqlSyntax); + dto = Database + .Fetch( + new UserGroupRelator().Map, sql) + .FirstOrDefault(); + } + else + { + var sql = GetBaseQuery("umbracoUser.*"); + sql.Where(userDto => userDto.Login == username, SqlSyntax); + dto = Database.FirstOrDefault(sql); + } + + if (dto == null) + return null; + + var user = UserFactory.BuildEntity(dto); + return user; + } + + /// + /// Returns a user by id + /// + /// + /// + /// This is really only used for a shim in order to upgrade to 7.6 but could be used + /// for slightly faster user lookups if the result doesn't require security data (i.e. groups, apps & start nodes) + /// + /// + /// A non cached instance + /// + public IUser Get(int id, bool includeSecurityData) + { + UserDto dto; + if (includeSecurityData) + { + var sql = GetQueryWithGroups(); + sql.Where(GetBaseWhereClause(), new { Id = id }); + sql //must be included for relator to work + .OrderBy(d => d.Id, SqlSyntax) + .OrderBy(d => d.Id, SqlSyntax) + .OrderBy(d => d.Id, SqlSyntax); + dto = Database + .Fetch( + new UserGroupRelator().Map, sql) + .FirstOrDefault(); + } + else + { + var sql = GetBaseQuery("umbracoUser.*"); + sql.Where(GetBaseWhereClause(), new { Id = id }); + dto = Database.FirstOrDefault(sql); + } + + if (dto == null) + return null; + + var user = UserFactory.BuildEntity(dto); + return user; + } + + public IProfile GetProfile(string username) + { + var sql = GetBaseQuery(false).Where(userDto => userDto.UserName == username, SqlSyntax); + + var dto = Database.Fetch(sql) + .FirstOrDefault(); + + if (dto == null) + return null; + + return new UserProfile(dto.Id, dto.UserName); + } + + public IProfile GetProfile(int id) + { + var sql = GetBaseQuery(false).Where(userDto => userDto.Id == id, SqlSyntax); + + var dto = Database.Fetch(sql) + .FirstOrDefault(); + + if (dto == null) + return null; + + return new UserProfile(dto.Id, dto.UserName); + } + + public IDictionary GetUserStates() + { + var sql = @"SELECT '1CountOfAll' AS colName, COUNT(id) AS num FROM umbracoUser +UNION +SELECT '2CountOfActive' AS colName, COUNT(id) AS num FROM umbracoUser WHERE userDisabled = 0 AND userNoConsole = 0 AND lastLoginDate IS NOT NULL +UNION +SELECT '3CountOfDisabled' AS colName, COUNT(id) AS num FROM umbracoUser WHERE userDisabled = 1 +UNION +SELECT '4CountOfLockedOut' AS colName, COUNT(id) AS num FROM umbracoUser WHERE userNoConsole = 1 +UNION +SELECT '5CountOfInvited' AS colName, COUNT(id) AS num FROM umbracoUser WHERE lastLoginDate IS NULL AND userDisabled = 1 AND invitedDate IS NOT NULL +ORDER BY colName"; + + var result = Database.Fetch(sql); + + return new Dictionary + { + {UserState.All, result[0].num}, + {UserState.Active, result[1].num}, + {UserState.Disabled, result[2].num}, + {UserState.LockedOut, result[3].num}, + {UserState.Invited, result[4].num} + }; + } + protected override IEnumerable PerformGetAll(params int[] ids) { - var sql = GetBaseQuery(false); - + var sql = GetQueryWithGroups(); if (ids.Any()) { - sql.Where("umbracoUser.id in (@ids)", new {ids = ids}); + sql.Where("umbracoUser.id in (@ids)", new { ids = ids }); } - - //must be sorted this way for the relator to work - sql.OrderBy(x => x.Id, SqlSyntax); - - return ConvertFromDtos(Database.Fetch(new UserSectionRelator().Map, sql)) - .ToArray(); // important so we don't iterate twice, if we don't do this we can end up with null values in cache if we were caching. - } - + sql //must be included for relator to work + .OrderBy(d => d.Id, SqlSyntax) + .OrderBy(d => d.Id, SqlSyntax) + .OrderBy(d => d.Id, SqlSyntax); + + var users = ConvertFromDtos(Database.Fetch(new UserGroupRelator().Map, sql)) + .ToArray(); // important so we don't iterate twice, if we don't do this we can end up with null values in cache if we were caching. + + return users; + } + protected override IEnumerable PerformGetByQuery(IQuery query) { - var sqlClause = GetBaseQuery(false); + var sqlClause = GetQueryWithGroups(); var translator = new SqlTranslator(sqlClause, query); var sql = translator.Translate(); + sql //must be included for relator to work + .OrderBy(d => d.Id, SqlSyntax) + .OrderBy(d => d.Id, SqlSyntax) + .OrderBy(d => d.Id, SqlSyntax); - //must be sorted this way for the relator to work - sql.OrderBy(x => x.Id, SqlSyntax); - - var dtos = Database.Fetch(new UserSectionRelator().Map, sql) + var dtos = Database.Fetch(new UserGroupRelator().Map, sql) .DistinctBy(x => x.Id); - return ConvertFromDtos(dtos) - .ToArray(); // important so we don't iterate twice, if we don't do this we can end up with null values in cache if we were caching. - } - + var users = ConvertFromDtos(dtos) + .ToArray(); // important so we don't iterate twice, if we don't do this we can end up with null values in cache if we were caching. + + return users; + } + #endregion - + #region Overrides of PetaPocoRepositoryBase - + protected override Sql GetBaseQuery(bool isCount) { var sql = new Sql(); @@ -103,14 +253,36 @@ namespace Umbraco.Core.Persistence.Repositories } return sql; } + + /// + /// A query to return a user with it's groups and with it's groups sections + /// + /// + private Sql GetQueryWithGroups() + { + //base query includes user groups + var sql = GetBaseQuery("umbracoUser.*, umbracoUserGroup.*, umbracoUserGroup2App.*, umbracoUserStartNode.*"); + AddGroupLeftJoin(sql); + return sql; + } + + private void AddGroupLeftJoin(Sql sql) + { + sql.LeftJoin(SqlSyntax) + .On(SqlSyntax, dto => dto.UserId, dto => dto.Id) + .LeftJoin(SqlSyntax) + .On(SqlSyntax, dto => dto.Id, dto => dto.UserGroupId) + .LeftJoin(SqlSyntax) + .On(SqlSyntax, dto => dto.UserGroupId, dto => dto.Id) + .LeftJoin(SqlSyntax) + .On(SqlSyntax, dto => dto.UserId, dto => dto.Id); + } private Sql GetBaseQuery(string columns) { var sql = new Sql(); sql.Select(columns) - .From() - .LeftJoin() - .On(left => left.Id, right => right.UserId); + .From(); return sql; } @@ -121,103 +293,146 @@ namespace Umbraco.Core.Persistence.Repositories } protected override IEnumerable GetDeleteClauses() - { + { var list = new List - { - "DELETE FROM cmsTask WHERE userId = @Id", - "DELETE FROM cmsTask WHERE parentUserId = @Id", - "DELETE FROM umbracoUser2NodePermission WHERE userId = @Id", - "DELETE FROM umbracoUser2NodeNotify WHERE userId = @Id", - "DELETE FROM umbracoUser2app WHERE " + SqlSyntax.GetQuotedColumnName("user") + "=@Id", - "DELETE FROM umbracoUser WHERE id = @Id", - "DELETE FROM umbracoExternalLogin WHERE id = @Id" - }; + { + "DELETE FROM cmsTask WHERE userId = @Id", + "DELETE FROM cmsTask WHERE parentUserId = @Id", + "DELETE FROM umbracoUser2UserGroup WHERE userId = @Id", + "DELETE FROM umbracoUser2NodeNotify WHERE userId = @Id", + "DELETE FROM umbracoUser WHERE id = @Id", + "DELETE FROM umbracoExternalLogin WHERE id = @Id" + }; return list; } protected override Guid NodeObjectTypeId { get { throw new NotImplementedException(); } - } - + } + protected override void PersistNewItem(IUser entity) { - var userFactory = new UserFactory(entity.UserType); - - //ensure security stamp if non + ((User)entity).AddingEntity(); + + //ensure security stamp if non if (entity.SecurityStamp.IsNullOrWhiteSpace()) { entity.SecurityStamp = Guid.NewGuid().ToString(); - } - - var userDto = userFactory.BuildDto(entity); + } + + var userDto = UserFactory.BuildDto(entity); + + //Check if we have a known config, we only want to store config for hashing + //TODO: This logic will need to be updated when we do http://issues.umbraco.org/issue/U4-10089 + if (_passwordConfiguration != null && _passwordConfiguration.Count > 0) + { + var json = JsonConvert.SerializeObject(_passwordConfiguration); + userDto.PasswordConfig = json; + } var id = Convert.ToInt32(Database.Insert(userDto)); entity.Id = id; - foreach (var sectionDto in userDto.User2AppDtos) + if (entity.IsPropertyDirty("StartContentIds") || entity.IsPropertyDirty("StartMediaIds")) { - //need to set the id explicitly here - sectionDto.UserId = id; - Database.Insert(sectionDto); - } + if (entity.IsPropertyDirty("StartContentIds")) + { + AddingOrUpdateStartNodes(entity, Enumerable.Empty(), UserStartNodeDto.StartNodeTypeValue.Content, entity.StartContentIds); + } + if (entity.IsPropertyDirty("StartMediaIds")) + { + AddingOrUpdateStartNodes(entity, Enumerable.Empty(), UserStartNodeDto.StartNodeTypeValue.Media, entity.StartMediaIds); + } + } + + if (entity.IsPropertyDirty("Groups")) + { + //lookup all assigned + var assigned = entity.Groups == null || entity.Groups.Any() == false + ? new List() + : Database.Fetch("SELECT * FROM umbracoUserGroup WHERE userGroupAlias IN (@aliases)", new { aliases = entity.Groups.Select(x => x.Alias) }); + + foreach (var groupDto in assigned) + { + var dto = new User2UserGroupDto + { + UserGroupId = groupDto.Id, + UserId = entity.Id + }; + Database.Insert(dto); + } + } entity.ResetDirtyProperties(); } protected override void PersistUpdatedItem(IUser entity) { - var userFactory = new UserFactory(entity.UserType); - - //ensure security stamp if non + //Updates Modified date + ((User)entity).UpdatingEntity(); + + //ensure security stamp if non if (entity.SecurityStamp.IsNullOrWhiteSpace()) { entity.SecurityStamp = Guid.NewGuid().ToString(); } - var userDto = userFactory.BuildDto(entity); - - var dirtyEntity = (ICanBeDirty)entity; - - //build list of columns to check for saving - we don't want to save the password if it hasn't changed! - //List the columns to save, NOTE: would be nice to not have hard coded strings here but no real good way around that + var userDto = UserFactory.BuildDto(entity); + + //build list of columns to check for saving - we don't want to save the password if it hasn't changed! + //List the columns to save, NOTE: would be nice to not have hard coded strings here but no real good way around that var colsToSave = new Dictionary() { {"userDisabled", "IsApproved"}, {"userNoConsole", "IsLockedOut"}, - {"userType", "UserType"}, {"startStructureID", "StartContentId"}, {"startMediaID", "StartMediaId"}, {"userName", "Name"}, - {"userLogin", "Username"}, - {"userEmail", "Email"}, + {"userLogin", "Username"}, + {"userEmail", "Email"}, {"userLanguage", "Language"}, {"securityStampToken", "SecurityStamp"}, {"lastLockoutDate", "LastLockoutDate"}, {"lastPasswordChangeDate", "LastPasswordChangeDate"}, {"lastLoginDate", "LastLoginDate"}, {"failedLoginAttempts", "FailedPasswordAttempts"}, + {"createDate", "CreateDate"}, + {"updateDate", "UpdateDate"}, + {"avatar", "Avatar"}, + {"emailConfirmedDate", "EmailConfirmedDate"}, + {"invitedDate", "InvitedDate"} }; //create list of properties that have changed var changedCols = colsToSave - .Where(col => dirtyEntity.IsPropertyDirty(col.Value)) + .Where(col => entity.IsPropertyDirty(col.Value)) .Select(col => col.Key) .ToList(); // DO NOT update the password if it has not changed or if it is null or empty - if (dirtyEntity.IsPropertyDirty("RawPasswordValue") && entity.RawPasswordValue.IsNullOrWhiteSpace() == false) + if (entity.IsPropertyDirty("RawPasswordValue") && entity.RawPasswordValue.IsNullOrWhiteSpace() == false) { changedCols.Add("userPassword"); //special case - when using ASP.Net identity the user manager will take care of updating the security stamp, however // when not using ASP.Net identity (i.e. old membership providers), we'll need to take care of updating this manually // so we can just detect if that property is dirty, if it's not we'll set it manually - if (dirtyEntity.IsPropertyDirty("SecurityStamp") == false) + if (entity.IsPropertyDirty("SecurityStamp") == false) { userDto.SecurityStampToken = entity.SecurityStamp = Guid.NewGuid().ToString(); changedCols.Add("securityStampToken"); } + + //Check if we have a known config, we only want to store config for hashing + //TODO: This logic will need to be updated when we do http://issues.umbraco.org/issue/U4-10089 + if (_passwordConfiguration != null && _passwordConfiguration.Count > 0) + { + var json = JsonConvert.SerializeObject(_passwordConfiguration); + userDto.PasswordConfig = json; + + changedCols.Add("passwordConfig"); + } } //only update the changed cols @@ -225,43 +440,67 @@ namespace Umbraco.Core.Persistence.Repositories { Database.Update(userDto, changedCols); } - - //update the sections if they've changed - var user = (User)entity; - if (user.IsPropertyDirty("AllowedSections")) + + if (entity.IsPropertyDirty("StartContentIds") || entity.IsPropertyDirty("StartMediaIds")) { - //now we need to delete any applications that have been removed - foreach (var section in user.RemovedSections) + var assignedStartNodes = Database.Fetch("SELECT * FROM umbracoUserStartNode WHERE userId = @userId", new { userId = entity.Id }); + if (entity.IsPropertyDirty("StartContentIds")) { - //we need to manually delete thsi record because it has a composite key - Database.Delete("WHERE app=@Section AND " + SqlSyntax.GetQuotedColumnName("user") + "=@UserId", - new { Section = section, UserId = (int)user.Id }); + AddingOrUpdateStartNodes(entity, assignedStartNodes, UserStartNodeDto.StartNodeTypeValue.Content, entity.StartContentIds); } - - //for any that exist on the object, we need to determine if we need to update or insert - //NOTE: the User2AppDtos collection wil always be equal to the User.AllowedSections - foreach (var sectionDto in userDto.User2AppDtos) + if (entity.IsPropertyDirty("StartMediaIds")) { - //if something has been added then insert it - if (user.AddedSections.Contains(sectionDto.AppAlias)) - { - //we need to insert since this was added - Database.Insert(sectionDto); - } - else - { - //we need to manually update this record because it has a composite key - Database.Update("SET app=@Section WHERE app=@Section AND " + SqlSyntax.GetQuotedColumnName("user") + "=@UserId", - new { Section = sectionDto.AppAlias, UserId = sectionDto.UserId }); - } + AddingOrUpdateStartNodes(entity, assignedStartNodes, UserStartNodeDto.StartNodeTypeValue.Media, entity.StartMediaIds); } + } - + if (entity.IsPropertyDirty("Groups")) + { + //lookup all assigned + var assigned = entity.Groups == null || entity.Groups.Any() == false + ? new List() + : Database.Fetch("SELECT * FROM umbracoUserGroup WHERE userGroupAlias IN (@aliases)", new { aliases = entity.Groups.Select(x => x.Alias) }); + + //first delete all + //TODO: We could do this a nicer way instead of "Nuke and Pave" + Database.Delete("WHERE UserId = @UserId", new { UserId = entity.Id }); + + foreach (var groupDto in assigned) + { + var dto = new User2UserGroupDto + { + UserGroupId = groupDto.Id, + UserId = entity.Id + }; + Database.Insert(dto); + } } entity.ResetDirtyProperties(); } + private void AddingOrUpdateStartNodes(IEntity entity, IEnumerable current, UserStartNodeDto.StartNodeTypeValue startNodeType, int[] entityStartIds) + { + var assignedIds = current.Where(x => x.StartNodeType == (int)startNodeType).Select(x => x.StartNode).ToArray(); + + //remove the ones not assigned to the entity + var toDelete = assignedIds.Except(entityStartIds).ToArray(); + if (toDelete.Length > 0) + Database.Delete("WHERE UserId = @UserId AND startNode IN (@startNodes)", new { UserId = entity.Id, startNodes = toDelete }); + //add the ones not currently in the db + var toAdd = entityStartIds.Except(assignedIds).ToArray(); + foreach (var i in toAdd) + { + var dto = new UserStartNodeDto + { + StartNode = i, + StartNodeType = (int)startNodeType, + UserId = entity.Id + }; + Database.Insert(dto); + } + } + #endregion #region Implementation of IUserRepository @@ -287,51 +526,84 @@ namespace Umbraco.Core.Persistence.Repositories .Where(x => x.UserName == username); return Database.ExecuteScalar(sql) > 0; + } + + /// + /// Gets a list of objects associated with a given group + /// + /// Id of group + public IEnumerable GetAllInGroup(int groupId) + { + return GetAllInOrNotInGroup(groupId, true); } - public IEnumerable GetUsersAssignedToSection(string sectionAlias) + /// + /// Gets a list of objects not associated with a given group + /// + /// Id of group + public IEnumerable GetAllNotInGroup(int groupId) { - //Here we're building up a query that looks like this, a sub query is required because the resulting structure - // needs to still contain all of the section rows per user. + return GetAllInOrNotInGroup(groupId, false); + } - //SELECT * - //FROM [umbracoUser] - //LEFT JOIN [umbracoUser2app] - //ON [umbracoUser].[id] = [umbracoUser2app].[user] - //WHERE umbracoUser.id IN (SELECT umbracoUser.id - // FROM [umbracoUser] - // LEFT JOIN [umbracoUser2app] - // ON [umbracoUser].[id] = [umbracoUser2app].[user] - // WHERE umbracoUser2app.app = 'content') + private IEnumerable GetAllInOrNotInGroup(int groupId, bool include) + { + var sql = new Sql(); + sql.Select("*") + .From(); - var sql = GetBaseQuery(false); - var innerSql = GetBaseQuery("umbracoUser.id"); - innerSql.Where("umbracoUser2app.app = " + SqlSyntax.GetQuotedValue(sectionAlias)); - sql.Where(string.Format("umbracoUser.id IN ({0})", innerSql.SQL)); - //must be sorted this way for the relator to work - sql.OrderBy(x => x.Id, SqlSyntax); + var innerSql = new Sql(); + innerSql.Select("umbracoUser.id") + .From() + .LeftJoin() + .On(left => left.Id, right => right.UserId) + .Where("umbracoUser2UserGroup.userGroupId = " + groupId); - return ConvertFromDtos(Database.Fetch(new UserSectionRelator().Map, sql)); + sql.Where(string.Format("umbracoUser.id {0} ({1})", + include ? "IN" : "NOT IN", + innerSql.SQL)); + return ConvertFromDtos(Database.Fetch(sql)); + } + + [Obsolete("Use the overload with long operators instead")] + [EditorBrowsable(EditorBrowsableState.Never)] + public IEnumerable GetPagedResultsByQuery(IQuery query, int pageIndex, int pageSize, out int totalRecords, Expression> orderBy) + { + if (orderBy == null) throw new ArgumentNullException("orderBy"); + + // get the referenced column name and find the corresp mapped column name + var expressionMember = ExpressionHelper.GetMemberInfo(orderBy); + var mapper = MappingResolver.Current.ResolveMapperByType(typeof(IUser)); + var mappedField = mapper.Map(expressionMember.Name); + + if (mappedField.IsNullOrWhiteSpace()) + throw new ArgumentException("Could not find a mapping for the column specified in the orderBy clause"); + + long tr; + var results = GetPagedResultsByQuery(query, Convert.ToInt64(pageIndex), pageSize, out tr, mappedField, Direction.Ascending); + totalRecords = Convert.ToInt32(tr); + return results; } /// /// Gets paged user results /// - /// - /// The where clause, if this is null all records are queried - /// + /// /// /// /// /// + /// + /// Optional parameter to filter by specified user groups + /// Optional parameter to filter by specfied user state + /// /// /// /// The query supplied will ONLY work with data specifically on the umbracoUser table because we are using PetaPoco paging (SQL paging) /// - public IEnumerable GetPagedResultsByQuery(IQuery query, int pageIndex, int pageSize, out int totalRecords, Expression> orderBy) + public IEnumerable GetPagedResultsByQuery(IQuery query, long pageIndex, int pageSize, out long totalRecords, Expression> orderBy, Direction orderDirection, string[] userGroups = null, UserState[] userState = null, IQuery filter = null) { - if (orderBy == null) - throw new ArgumentNullException("orderBy"); + if (orderBy == null) throw new ArgumentNullException("orderBy"); // get the referenced column name and find the corresp mapped column name var expressionMember = ExpressionHelper.GetMemberInfo(orderBy); @@ -341,29 +613,180 @@ namespace Umbraco.Core.Persistence.Repositories if (mappedField.IsNullOrWhiteSpace()) throw new ArgumentException("Could not find a mapping for the column specified in the orderBy clause"); - var sql = new Sql() - .Select("umbracoUser.Id") - .From(SqlSyntax); + return GetPagedResultsByQuery(query, pageIndex, pageSize, out totalRecords, mappedField, orderDirection, userGroups, userState, filter); + } + + + + private IEnumerable GetPagedResultsByQuery(IQuery query, long pageIndex, int pageSize, out long totalRecords, string orderBy, Direction orderDirection, + string[] userGroups = null, + UserState[] userState = null, + IQuery filter = null) + { + if (string.IsNullOrWhiteSpace(orderBy)) throw new ArgumentException("Value cannot be null or whitespace.", "orderBy"); - var idsQuery = query == null ? sql : new SqlTranslator(sql, query).Translate(); - // need to ensure the order by is in brackets, see: https://github.com/toptensoftware/PetaPoco/issues/177 - idsQuery.OrderBy("(" + mappedField + ")"); - var page = Database.Page(pageIndex + 1, pageSize, idsQuery); - totalRecords = Convert.ToInt32(page.TotalItems); + Sql filterSql = null; + if (filter != null || (userGroups != null && userGroups.Length > 0) || (userState != null && userState.Length > 0 && userState.Contains(UserState.All) == false)) + filterSql = new Sql(); - if (totalRecords == 0) - return Enumerable.Empty(); + if (filter != null) + { + foreach (var filterClause in filter.GetWhereClauses()) + { + filterSql.Append(string.Format("AND ({0})", filterClause.Item1), filterClause.Item2); + } + } + if (userGroups != null && userGroups.Length > 0) + { + var subQuery = @"AND (umbracoUser.id IN (SELECT DISTINCT umbracoUser.id + FROM umbracoUser + INNER JOIN umbracoUser2UserGroup ON umbracoUser2UserGroup.userId = umbracoUser.id + INNER JOIN umbracoUserGroup ON umbracoUserGroup.id = umbracoUser2UserGroup.userGroupId + WHERE umbracoUserGroup.userGroupAlias IN (@userGroups)))"; + filterSql.Append(subQuery, new { userGroups = userGroups }); + } + if (userState != null && userState.Length > 0) + { + //the "ALL" state doesn't require any filtering so we ignore that, if it exists in the list we don't do any filtering + if (userState.Contains(UserState.All) == false) + { + var sb = new StringBuilder("("); + var appended = false; - // now get the actual users and ensure they are ordered properly (same clause) - var ids = page.Items.ToArray(); - return ids.Length == 0 ? Enumerable.Empty() : GetAll(ids).OrderBy(orderBy.Compile()); + if (userState.Contains(UserState.Active)) + { + sb.Append("(userDisabled = 0 AND userNoConsole = 0 AND lastLoginDate IS NOT NULL)"); + appended = true; + } + if (userState.Contains(UserState.Disabled)) + { + if (appended) sb.Append(" OR "); + sb.Append("(userDisabled = 1)"); + } + if (userState.Contains(UserState.LockedOut)) + { + if (appended) sb.Append(" OR "); + sb.Append("(userNoConsole = 1)"); + } + if (userState.Contains(UserState.Invited)) + { + if (appended) sb.Append(" OR "); + sb.Append("(lastLoginDate IS NULL AND userDisabled = 1 AND invitedDate IS NOT NULL)"); + } + + sb.Append(")"); + + filterSql.Append("AND " + sb); + } + } + + // Get base query for returning IDs + var sqlBaseIds = GetBaseQuery("id"); + + if (query == null) query = new Query(); + var translatorIds = new SqlTranslator(sqlBaseIds, query); + var sqlQueryIds = translatorIds.Translate(); + + //get sorted and filtered sql + var sqlNodeIdsWithSort = GetSortedSqlForPagedResults( + GetFilteredSqlForPagedResults(sqlQueryIds, filterSql), + orderDirection, orderBy); + + // Get page of results and total count + var pagedResult = Database.Page(pageIndex + 1, pageSize, sqlNodeIdsWithSort); + totalRecords = Convert.ToInt32(pagedResult.TotalItems); + + //NOTE: We need to check the actual items returned, not the 'totalRecords', that is because if you request a page number + // that doesn't actually have any data on it, the totalRecords will still indicate there are records but there are none in + // the pageResult. + if (pagedResult.Items.Any()) + { + //Create the inner paged query that was used above to get the paged result, we'll use that as the inner sub query + var args = sqlNodeIdsWithSort.Arguments; + string sqlStringCount, sqlStringPage; + Database.BuildPageQueries(pageIndex * pageSize, pageSize, sqlNodeIdsWithSort.SQL, ref args, out sqlStringCount, out sqlStringPage); + + var sqlQueryFull = GetBaseQuery("umbracoUser.*, umbracoUserGroup.*, umbracoUserGroup2App.*, umbracoUserStartNode.*"); + + var fullQueryWithPagedInnerJoin = sqlQueryFull + .Append("INNER JOIN (") + //join the paged query with the paged query arguments + .Append(sqlStringPage, args) + .Append(") temp ") + .Append("ON umbracoUser.id = temp.id"); + + AddGroupLeftJoin(fullQueryWithPagedInnerJoin); + + //get sorted and filtered sql + var fullQuery = GetSortedSqlForPagedResults( + GetFilteredSqlForPagedResults(fullQueryWithPagedInnerJoin, filterSql), + orderDirection, orderBy); + + var users = ConvertFromDtos(Database.Fetch(new UserGroupRelator().Map, fullQuery)) + .ToArray(); // important so we don't iterate twice, if we don't do this we can end up with null values in cache if we were caching. + + return users; + } + + return Enumerable.Empty(); } + private Sql GetFilteredSqlForPagedResults(Sql sql, Sql filterSql) + { + Sql filteredSql; + + // Apply filter + if (filterSql != null) + { + var sqlFilter = " WHERE " + filterSql.SQL.TrimStart("AND "); + + //NOTE: this is certainly strange - NPoco handles this much better but we need to re-create the sql + // instance a couple of times to get the parameter order correct, for some reason the first + // time the arguments don't show up correctly but the SQL argument parameter names are actually updated + // accordingly - so we re-create it again. In v8 we don't need to do this and it's already taken care of. + + filteredSql = new Sql(sql.SQL, sql.Arguments); + var args = filteredSql.Arguments.Concat(filterSql.Arguments).ToArray(); + filteredSql = new Sql( + string.Format("{0} {1}", filteredSql.SQL, sqlFilter), + args); + filteredSql = new Sql(filteredSql.SQL, args); + } + else + { + //copy to var so that the original isn't changed + filteredSql = new Sql(sql.SQL, sql.Arguments); + } + return filteredSql; + } + + private Sql GetSortedSqlForPagedResults(Sql sql, Direction orderDirection, string orderBy) + { + //copy to var so that the original isn't changed + var sortedSql = new Sql(sql.SQL, sql.Arguments); + + // Apply order according to parameters + if (string.IsNullOrEmpty(orderBy) == false) + { + //each order by param needs to be in a bracket! see: https://github.com/toptensoftware/PetaPoco/issues/177 + var orderByParams = new[] { string.Format("({0})", orderBy) }; + if (orderDirection == Direction.Ascending) + { + sortedSql.OrderBy(orderByParams); + } + else + { + sortedSql.OrderByDescending(orderByParams); + } + } + return sortedSql; + } + internal IEnumerable GetNextUsers(int id, int count) { var idsQuery = new Sql() - .Select("umbracoUser.Id") + .Select("umbracoUser.id") .From(SqlSyntax) .Where(x => x.Id >= id) .OrderBy(x => x.Id, SqlSyntax); @@ -375,68 +798,20 @@ namespace Umbraco.Core.Persistence.Repositories return ids.Length == 0 ? Enumerable.Empty() : GetAll(ids).OrderBy(x => x.Id); } - /// - /// Returns permissions for a given user for any number of nodes - /// - /// - /// - /// - public IEnumerable GetUserPermissionsForEntities(int userId, params int[] entityIds) - { - var repo = new PermissionRepository(UnitOfWork, _cacheHelper, SqlSyntax); - return repo.GetUserPermissionsForEntities(userId, entityIds); - } - - /// - /// Replaces the same permission set for a single user to any number of entities - /// - /// - /// - /// - public void ReplaceUserPermissions(int userId, IEnumerable permissions, params int[] entityIds) - { - var repo = new PermissionRepository(UnitOfWork, _cacheHelper, SqlSyntax); - repo.ReplaceUserPermissions(userId, permissions, entityIds); - } - - /// - /// Assigns the same permission set for a single user to any number of entities - /// - /// - /// - /// - public void AssignUserPermission(int userId, char permission, params int[] entityIds) - { - var repo = new PermissionRepository(UnitOfWork, _cacheHelper, SqlSyntax); - repo.AssignUserPermission(userId, permission, entityIds); - } - #endregion private IEnumerable ConvertFromDtos(IEnumerable dtos) { - var userTypeIds = dtos.Select(x => Convert.ToInt32(x.Type)).ToArray(); - - var allUserTypes = userTypeIds.Length == 0 ? Enumerable.Empty() : _userTypeRepository.GetAll(userTypeIds); - - return dtos.Select(dto => - { - var userType = allUserTypes.Single(x => x.Id == dto.Type); - - var userFactory = new UserFactory(userType); - return userFactory.BuildEntity(dto); - }); + return dtos.Select(UserFactory.BuildEntity); } - /// - /// Dispose disposable properties - /// - /// - /// Ensure the unit of work is disposed - /// - protected override void DisposeResources() - { - _userTypeRepository.Dispose(); - } + //private IEnumerable ConvertFromDtos(IEnumerable dtos) + //{ + // return dtos.Select(dto => + // { + // var userGroupFactory = new UserGroupFactory(); + // return userGroupFactory.BuildEntity(dto); + // }); + //} } } \ No newline at end of file diff --git a/src/Umbraco.Core/Persistence/Repositories/UserTypeRepository.cs b/src/Umbraco.Core/Persistence/Repositories/UserTypeRepository.cs deleted file mode 100644 index 81e3a5765e..0000000000 --- a/src/Umbraco.Core/Persistence/Repositories/UserTypeRepository.cs +++ /dev/null @@ -1,114 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using Umbraco.Core.Logging; -using Umbraco.Core.Models.Membership; -using Umbraco.Core.Models.Rdbms; - -using Umbraco.Core.Persistence.Factories; -using Umbraco.Core.Persistence.Querying; -using Umbraco.Core.Persistence.SqlSyntax; -using Umbraco.Core.Persistence.UnitOfWork; - -namespace Umbraco.Core.Persistence.Repositories -{ - /// - /// Represents the UserTypeRepository for doing CRUD operations for - /// - internal class UserTypeRepository : PetaPocoRepositoryBase, IUserTypeRepository - { - public UserTypeRepository(IScopeUnitOfWork work, CacheHelper cache, ILogger logger, ISqlSyntaxProvider sqlSyntax) - : base(work, cache, logger, sqlSyntax) - { - } - - #region Overrides of RepositoryBase - - protected override IUserType PerformGet(int id) - { - return GetAll(new[] {id}).FirstOrDefault(); - } - - protected override IEnumerable PerformGetAll(params int[] ids) - { - var userTypeFactory = new UserTypeFactory(); - - var sql = GetBaseQuery(false); - - if (ids.Any()) - { - sql.Where("umbracoUserType.id in (@ids)", new { ids = ids }); - } - else - { - sql.Where(x => x.Id >= 0); - } - - var dtos = Database.Fetch(sql); - return dtos.Select(userTypeFactory.BuildEntity).ToArray(); - } - - protected override IEnumerable PerformGetByQuery(IQuery query) - { - var userTypeFactory = new UserTypeFactory(); - var sqlClause = GetBaseQuery(false); - var translator = new SqlTranslator(sqlClause, query); - var sql = translator.Translate(); - - var dtos = Database.Fetch(sql); - - return dtos.Select(userTypeFactory.BuildEntity).ToArray(); - } - - #endregion - - #region Overrides of PetaPocoRepositoryBase - - protected override Sql GetBaseQuery(bool isCount) - { - var sql = new Sql(); - sql.Select(isCount ? "COUNT(*)" : "*") - .From(); - return sql; - } - - protected override string GetBaseWhereClause() - { - return "umbracoUserType.id = @Id"; - } - - protected override IEnumerable GetDeleteClauses() - { - var list = new List - { - "DELETE FROM umbracoUser WHERE userType = @Id", - "DELETE FROM umbracoUserType WHERE id = @Id" - }; - return list; - } - - protected override Guid NodeObjectTypeId - { - get { throw new NotImplementedException(); } - } - - protected override void PersistNewItem(IUserType entity) - { - var userTypeFactory = new UserTypeFactory(); - var userTypeDto = userTypeFactory.BuildDto(entity); - - var id = Convert.ToInt32(Database.Insert(userTypeDto)); - entity.Id = id; - } - - protected override void PersistUpdatedItem(IUserType entity) - { - var userTypeFactory = new UserTypeFactory(); - var userTypeDto = userTypeFactory.BuildDto(entity); - - Database.Update(userTypeDto); - } - - #endregion - } -} \ No newline at end of file diff --git a/src/Umbraco.Core/Persistence/RepositoryFactory.cs b/src/Umbraco.Core/Persistence/RepositoryFactory.cs index 114d3ee95f..34a4b1a612 100644 --- a/src/Umbraco.Core/Persistence/RepositoryFactory.cs +++ b/src/Umbraco.Core/Persistence/RepositoryFactory.cs @@ -1,6 +1,7 @@ using Umbraco.Core.Configuration; using System; using System.ComponentModel; +using System.Web.Security; using Umbraco.Core.Cache; using Umbraco.Core.Configuration.UmbracoSettings; using Umbraco.Core.IO; @@ -9,6 +10,7 @@ using Umbraco.Core.Logging; using Umbraco.Core.Persistence.Repositories; using Umbraco.Core.Persistence.SqlSyntax; using Umbraco.Core.Persistence.UnitOfWork; +using Umbraco.Core.Security; namespace Umbraco.Core.Persistence { @@ -248,6 +250,18 @@ namespace Umbraco.Core.Persistence return new PartialViewMacroRepository(uow, FileSystemProviderManager.Current.MacroPartialsFileSystem); } + [Obsolete("MacroScripts are obsolete - this is for backwards compatibility with upgraded sites.")] + internal virtual IPartialViewRepository CreateMacroScriptRepository(IUnitOfWork uow) + { + return new MacroScriptRepository(uow, FileSystemProviderManager.Current.MacroScriptsFileSystem); + } + + [Obsolete("UserControls are obsolete - this is for backwards compatibility with upgraded sites.")] + internal virtual IUserControlRepository CreateUserControlRepository(IUnitOfWork uow) + { + return new UserControlRepository(uow, FileSystemProviderManager.Current.UserControlsFileSystem); + } + public virtual IStylesheetRepository CreateStylesheetRepository(IUnitOfWork uow) { return new StylesheetRepository(uow, FileSystemProviderManager.Current.StylesheetsFileSystem); @@ -292,23 +306,28 @@ namespace Umbraco.Core.Persistence _logger, _sqlSyntax); } - public virtual IUserTypeRepository CreateUserTypeRepository(IScopeUnitOfWork uow) + public virtual IUserGroupRepository CreateUserGroupRepository(IScopeUnitOfWork uow) { - return new UserTypeRepository( + return new UserGroupRepository( uow, - //There's not many user types but we query on users all the time so the result needs to be cached _cacheHelper, _logger, _sqlSyntax); } public virtual IUserRepository CreateUserRepository(IScopeUnitOfWork uow) { + var userMembershipProvider = MembershipProviderExtensions.GetUsersMembershipProvider(); + var passwordConfig = userMembershipProvider == null || userMembershipProvider.PasswordFormat != MembershipPasswordFormat.Hashed + ? null + : new System.Collections.Generic.Dictionary {{"hashAlgorithm", Membership.HashAlgorithmType}}; + return new UserRepository( uow, //Need to cache users - we look up user information more than anything in the back office! _cacheHelper, - _logger, _sqlSyntax, - CreateUserTypeRepository(uow)); + _logger, + _sqlSyntax, + passwordConfig); } internal virtual IMacroRepository CreateMacroRepository(IScopeUnitOfWork uow) diff --git a/src/Umbraco.Core/PluginManager.cs b/src/Umbraco.Core/PluginManager.cs index 3eb0f2a018..fe9236c58c 100644 --- a/src/Umbraco.Core/PluginManager.cs +++ b/src/Umbraco.Core/PluginManager.cs @@ -277,7 +277,7 @@ namespace Umbraco.Core uniqInfos.Add(info.FullName); hashCombiner.AddFileSystemItem(info); } - } + } return ConvertHashToInt64(hashCombiner.GetCombinedHashCode()); } @@ -336,6 +336,9 @@ namespace Umbraco.Core #region Cache + private const int ListFileOpenReadTimeout = 4000; // milliseconds + private const int ListFileOpenWriteTimeout = 2000; // milliseconds + /// /// Attemps to retrieve the list of types from the cache. /// @@ -381,7 +384,7 @@ namespace Umbraco.Core if (File.Exists(filePath) == false) return cache; - using (var stream = File.OpenRead(filePath)) + using (var stream = GetFileStream(filePath, FileMode.Open, FileAccess.Read, FileShare.Read, ListFileOpenReadTimeout)) using (var reader = new StreamReader(stream)) { while (true) @@ -451,7 +454,7 @@ namespace Umbraco.Core { var filePath = GetPluginListFilePath(); - using (var stream = File.Open(filePath, FileMode.Create, FileAccess.ReadWrite)) + using (var stream = GetFileStream(filePath, FileMode.Create, FileAccess.Write, FileShare.None, ListFileOpenWriteTimeout)) using (var writer = new StreamWriter(stream)) { foreach (var typeList in _types.Values) @@ -471,7 +474,28 @@ namespace Umbraco.Core // at the moment we write the cache to disk every time we update it. ideally we defer the writing // since all the updates are going to happen in a row when Umbraco starts. that being said, the // file is small enough, so it is not a priority. - WriteCache(); + WriteCache(); + } + + private static Stream GetFileStream(string path, FileMode fileMode, FileAccess fileAccess, FileShare fileShare, int timeoutMilliseconds) + { + const int pauseMilliseconds = 250; + var attempts = timeoutMilliseconds / pauseMilliseconds; + while (true) + { + try + { + return new FileStream(path, fileMode, fileAccess, fileShare); + } + catch + { + if (--attempts == 0) + throw; + + LogHelper.Debug(string.Format("Attempted to get filestream for file {0} failed, {1} attempts left, pausing for {2} milliseconds", path, attempts, pauseMilliseconds)); + Thread.Sleep(pauseMilliseconds); + } + } } #endregion diff --git a/src/Umbraco.Core/Properties/AssemblyInfo.cs b/src/Umbraco.Core/Properties/AssemblyInfo.cs index 7d94f51fbe..35ff0beb22 100644 --- a/src/Umbraco.Core/Properties/AssemblyInfo.cs +++ b/src/Umbraco.Core/Properties/AssemblyInfo.cs @@ -39,7 +39,6 @@ using System.Security.Permissions; [assembly: InternalsVisibleTo("UmbracoExamine")] [assembly: InternalsVisibleTo("Concorde.Sync")] -[assembly: InternalsVisibleTo("Umbraco.VisualStudio")] [assembly: InternalsVisibleTo("Umbraco.Courier.Core")] [assembly: InternalsVisibleTo("Umbraco.Courier.Persistence")] @@ -52,4 +51,8 @@ using System.Security.Permissions; [assembly: InternalsVisibleTo("Umbraco.Forms.Web")] //allow this to be mocked in our unit tests -[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2")] \ No newline at end of file +[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2")] + +//allow custom unit-testing code to access internals through custom adapters +[assembly: InternalsVisibleTo("Umbraco.VisualStudio")] // backwards compat. +[assembly: InternalsVisibleTo("Umbraco.UnitTesting.Adapter")] // new, more imperative name diff --git a/src/Umbraco.Core/PropertyEditors/PropertyEditorAttribute.cs b/src/Umbraco.Core/PropertyEditors/PropertyEditorAttribute.cs index 41e4ccc74e..ec87af29ad 100644 --- a/src/Umbraco.Core/PropertyEditors/PropertyEditorAttribute.cs +++ b/src/Umbraco.Core/PropertyEditors/PropertyEditorAttribute.cs @@ -26,7 +26,7 @@ namespace Umbraco.Core.PropertyEditors public PropertyEditorAttribute(string alias, string name) { - Mandate.ParameterNotNullOrEmpty(alias, "id"); + Mandate.ParameterNotNullOrEmpty(alias, "alias"); Mandate.ParameterNotNullOrEmpty(name, "name"); Alias = alias; @@ -82,4 +82,4 @@ namespace Umbraco.Core.PropertyEditors /// public string Group { get; set; } } -} \ No newline at end of file +} diff --git a/src/Umbraco.Core/PropertyEditors/ValueConverters/DecimalValueConverter.cs b/src/Umbraco.Core/PropertyEditors/ValueConverters/DecimalValueConverter.cs index 89af76ea12..10b3b7188e 100644 --- a/src/Umbraco.Core/PropertyEditors/ValueConverters/DecimalValueConverter.cs +++ b/src/Umbraco.Core/PropertyEditors/ValueConverters/DecimalValueConverter.cs @@ -22,7 +22,7 @@ namespace Umbraco.Core.PropertyEditors.ValueConverters if (sourceString != null) { decimal d; - return (decimal.TryParse(sourceString, NumberStyles.AllowDecimalPoint, CultureInfo.InvariantCulture, out d)) ? d : 0M; + return (decimal.TryParse(sourceString, NumberStyles.AllowDecimalPoint | NumberStyles.AllowLeadingSign, CultureInfo.InvariantCulture, out d)) ? d : 0M; } // in the database an a decimal is an a decimal diff --git a/src/Umbraco.Core/Security/ActiveDirectoryBackOfficeUserPasswordChecker.cs b/src/Umbraco.Core/Security/ActiveDirectoryBackOfficeUserPasswordChecker.cs index 819fa87a56..25bf983d29 100644 --- a/src/Umbraco.Core/Security/ActiveDirectoryBackOfficeUserPasswordChecker.cs +++ b/src/Umbraco.Core/Security/ActiveDirectoryBackOfficeUserPasswordChecker.cs @@ -1,4 +1,5 @@ -using System.Configuration; +using System; +using System.Configuration; using System.DirectoryServices.AccountManagement; using System.Threading.Tasks; using Umbraco.Core.Models.Identity; @@ -7,8 +8,10 @@ namespace Umbraco.Core.Security { public class ActiveDirectoryBackOfficeUserPasswordChecker : IBackOfficeUserPasswordChecker { - public virtual string ActiveDirectoryDomain { - get { + public virtual string ActiveDirectoryDomain + { + get + { return ConfigurationManager.AppSettings["ActiveDirectoryDomain"]; } } @@ -18,7 +21,13 @@ namespace Umbraco.Core.Security bool isValid; using (var pc = new PrincipalContext(ContextType.Domain, ActiveDirectoryDomain)) { - isValid = pc.ValidateCredentials(user.UserName, password); + isValid = pc.ValidateCredentials(user.UserName, password); + } + + if (isValid && user.HasIdentity == false) + { + //TODO: the user will need to be created locally (i.e. auto-linked) + throw new NotImplementedException("The user " + user.UserName + " does not exist locally and currently the " + typeof(ActiveDirectoryBackOfficeUserPasswordChecker) + " doesn't support auto-linking, see http://issues.umbraco.org/issue/U4-10181"); } var result = isValid diff --git a/src/Umbraco.Core/Security/AuthenticationExtensions.cs b/src/Umbraco.Core/Security/AuthenticationExtensions.cs index 17cea2976c..3ded4d9eab 100644 --- a/src/Umbraco.Core/Security/AuthenticationExtensions.cs +++ b/src/Umbraco.Core/Security/AuthenticationExtensions.cs @@ -218,7 +218,7 @@ namespace Umbraco.Core.Security public static bool RenewUmbracoAuthTicket(this HttpContextBase http) { if (http == null) throw new ArgumentNullException("http"); - http.Items["umbraco-force-auth"] = true; + http.Items[Constants.Security.ForceReAuthFlag] = true; return true; } @@ -230,7 +230,7 @@ namespace Umbraco.Core.Security internal static bool RenewUmbracoAuthTicket(this HttpContext http) { if (http == null) throw new ArgumentNullException("http"); - http.Items["umbraco-force-auth"] = true; + http.Items[Constants.Security.ForceReAuthFlag] = true; return true; } diff --git a/src/Umbraco.Core/Security/BackOfficeClaimsIdentityFactory.cs b/src/Umbraco.Core/Security/BackOfficeClaimsIdentityFactory.cs index 7c2373a000..d28f259466 100644 --- a/src/Umbraco.Core/Security/BackOfficeClaimsIdentityFactory.cs +++ b/src/Umbraco.Core/Security/BackOfficeClaimsIdentityFactory.cs @@ -33,10 +33,10 @@ namespace Umbraco.Core.Security Username = user.UserName, RealName = user.Name, AllowedApplications = user.AllowedSections, - Culture = user.Culture, + Culture = user.Culture, Roles = user.Roles.Select(x => x.RoleId).ToArray(), - StartContentNode = user.StartContentId, - StartMediaNode = user.StartMediaId, + StartContentNodes = user.CalculatedContentStartNodeIds, + StartMediaNodes = user.CalculatedMediaStartNodeIds, SessionId = user.SecurityStamp }); diff --git a/src/Umbraco.Core/Security/BackOfficeSignInManager.cs b/src/Umbraco.Core/Security/BackOfficeSignInManager.cs index 9a6f9cceb3..3d56ffc102 100644 --- a/src/Umbraco.Core/Security/BackOfficeSignInManager.cs +++ b/src/Umbraco.Core/Security/BackOfficeSignInManager.cs @@ -101,21 +101,28 @@ namespace Umbraco.Core.Security { return SignInStatus.Failure; } + var user = await UserManager.FindByNameAsync(userName); - if (user == null) - { - return SignInStatus.Failure; - } - if (await UserManager.IsLockedOutAsync(user.Id)) - { - return SignInStatus.LockedOut; - } + + //if the user is null, create an empty one which can be used for auto-linking + if (user == null) + user = BackOfficeIdentityUser.CreateNew(userName, null, GlobalSettings.DefaultUILanguage); + + //check the password for the user, this will allow a developer to auto-link + //an account if they have specified an IBackOfficeUserPasswordChecker if (await UserManager.CheckPasswordAsync(user, password)) { + //the underlying call to this will query the user by Id which IS cached! + if (await UserManager.IsLockedOutAsync(user.Id)) + { + return SignInStatus.LockedOut; + } + await UserManager.ResetAccessFailedCountAsync(user.Id); return await SignInOrTwoFactor(user, isPersistent); } - if (shouldLockout) + + if (user.HasIdentity && shouldLockout) { // If lockout is requested, increment access failed count which might lock out the user await UserManager.AccessFailedAsync(user.Id); @@ -125,7 +132,7 @@ namespace Umbraco.Core.Security } } return SignInStatus.Failure; - } + } /// /// Borrowed from Micorosoft's underlying sign in manager which is not flexible enough to tell it to use a different cookie type diff --git a/src/Umbraco.Core/Security/BackOfficeUserManager.cs b/src/Umbraco.Core/Security/BackOfficeUserManager.cs index 2b68fd07eb..76cf2971ea 100644 --- a/src/Umbraco.Core/Security/BackOfficeUserManager.cs +++ b/src/Umbraco.Core/Security/BackOfficeUserManager.cs @@ -34,17 +34,20 @@ namespace Umbraco.Core.Security } #region Static Create methods + /// /// Creates a BackOfficeUserManager instance with all default options and the default BackOfficeUserManager /// /// /// + /// /// /// /// public static BackOfficeUserManager Create( IdentityFactoryOptions options, IUserService userService, + IEntityService entityService, IExternalLoginService externalLoginService, MembershipProviderBase membershipProvider) { @@ -52,7 +55,7 @@ namespace Umbraco.Core.Security if (userService == null) throw new ArgumentNullException("userService"); if (externalLoginService == null) throw new ArgumentNullException("externalLoginService"); - var manager = new BackOfficeUserManager(new BackOfficeUserStore(userService, externalLoginService, membershipProvider)); + var manager = new BackOfficeUserManager(new BackOfficeUserStore(userService, entityService, externalLoginService, membershipProvider)); manager.InitUserManager(manager, membershipProvider, options); return manager; } @@ -90,6 +93,7 @@ namespace Umbraco.Core.Security base.InitUserManager(manager, membershipProvider, options.DataProtectionProvider); } + } /// @@ -103,6 +107,7 @@ namespace Umbraco.Core.Security { } + #region What we support do not currently //NOTE: Not sure if we really want/need to ever support this @@ -136,7 +141,9 @@ namespace Umbraco.Core.Security /// Initializes the user manager with the correct options /// /// - /// + /// + /// The for the users called UsersMembershipProvider + /// /// /// protected void InitUserManager( @@ -145,25 +152,17 @@ namespace Umbraco.Core.Security IDataProtectionProvider dataProtectionProvider) { // Configure validation logic for usernames - manager.UserValidator = new UserValidator(manager) + manager.UserValidator = new BackOfficeUserValidator(manager) { AllowOnlyAlphanumericUserNames = false, RequireUniqueEmail = true }; // Configure validation logic for passwords - manager.PasswordValidator = new PasswordValidator - { - RequiredLength = membershipProvider.MinRequiredPasswordLength, - RequireNonLetterOrDigit = membershipProvider.MinRequiredNonAlphanumericCharacters > 0, - RequireDigit = false, - RequireLowercase = false, - RequireUppercase = false - //TODO: Do we support the old regex match thing that membership providers used? - }; + manager.PasswordValidator = new MembershipProviderPasswordValidator(membershipProvider); //use a custom hasher based on our membership provider - manager.PasswordHasher = new MembershipPasswordHasher(membershipProvider); + manager.PasswordHasher = GetDefaultPasswordHasher(membershipProvider); if (dataProtectionProvider != null) { @@ -199,6 +198,76 @@ namespace Umbraco.Core.Security //manager.SmsService = new SmsService(); } + /// + /// This will determine which password hasher to use based on what is defined in config + /// + /// + protected virtual IPasswordHasher GetDefaultPasswordHasher(MembershipProviderBase provider) + { + //if the current user membership provider is unkown (this would be rare), then return the default password hasher + if (provider.IsUmbracoUsersProvider() == false) + return new PasswordHasher(); + + //if the configured provider has legacy features enabled, then return the membership provider password hasher + if (provider.AllowManuallyChangingPassword || provider.DefaultUseLegacyEncoding) + return new MembershipProviderPasswordHasher(provider); + + //we can use the user aware password hasher (which will be the default and preferred way) + return new UserAwareMembershipProviderPasswordHasher(provider); + } + + /// + /// Gets/sets the default back office user password checker + /// + public IBackOfficeUserPasswordChecker BackOfficeUserPasswordChecker { get; set; } + + /// + /// Helper method to generate a password for a user based on the current password validator + /// + /// + public string GeneratePassword() + { + var passwordValidator = PasswordValidator as PasswordValidator; + + if (passwordValidator == null) + { + var membershipPasswordHasher = PasswordHasher as IMembershipProviderPasswordHasher; + + //get the real password validator, this should not be null but in some very rare cases it could be, in which case + //we need to create a default password validator to use since we have no idea what it actually is or what it's rules are + //this is an Edge Case! + passwordValidator = PasswordValidator as PasswordValidator + ?? (membershipPasswordHasher != null + ? new MembershipProviderPasswordValidator(membershipPasswordHasher.MembershipProvider) + : new PasswordValidator()); + } + + var password = Membership.GeneratePassword( + passwordValidator.RequiredLength, + passwordValidator.RequireNonLetterOrDigit ? 2 : 0); + + var random = new Random(); + + var passwordChars = password.ToCharArray(); + + if (passwordValidator.RequireDigit && passwordChars.ContainsAny(Enumerable.Range(48, 58).Select(x => (char)x))) + password += Convert.ToChar(random.Next(48, 58)); // 0-9 + + if (passwordValidator.RequireLowercase && passwordChars.ContainsAny(Enumerable.Range(97, 123).Select(x => (char)x))) + password += Convert.ToChar(random.Next(97, 123)); // a-z + + if (passwordValidator.RequireUppercase && passwordChars.ContainsAny(Enumerable.Range(65, 91).Select(x => (char)x))) + password += Convert.ToChar(random.Next(65, 91)); // A-Z + + if (passwordValidator.RequireNonLetterOrDigit && passwordChars.ContainsAny(Enumerable.Range(33, 48).Select(x => (char)x))) + password += Convert.ToChar(random.Next(33, 48)); // symbols !"#$%&'()*+,-./ + + return password; + } + + + #region Overrides for password logic + /// /// Logic used to validate a username and password /// @@ -224,19 +293,109 @@ namespace Umbraco.Core.Security if (BackOfficeUserPasswordChecker != null) { var result = await BackOfficeUserPasswordChecker.CheckPasswordAsync(user, password); + + if (user.HasIdentity == false) + { + return false; + } + //if the result indicates to not fallback to the default, then return true if the credentials are valid if (result != BackOfficeUserPasswordCheckerResult.FallbackToDefaultChecker) { return result == BackOfficeUserPasswordCheckerResult.ValidCredentials; } } + + //we cannot proceed if the user passed in does not have an identity + if (user.HasIdentity == false) + return false; + //use the default behavior return await base.CheckPasswordAsync(user, password); } + public override Task ChangePasswordAsync(int userId, string currentPassword, string newPassword) + { + return base.ChangePasswordAsync(userId, currentPassword, newPassword); + } + /// - /// Gets/sets the default back office user password checker + /// Override to determine how to hash the password /// - public IBackOfficeUserPasswordChecker BackOfficeUserPasswordChecker { get; set; } + /// + /// + /// + /// + protected override async Task VerifyPasswordAsync(IUserPasswordStore store, T user, string password) + { + var userAwarePasswordHasher = PasswordHasher as IUserAwarePasswordHasher; + if (userAwarePasswordHasher == null) + return await base.VerifyPasswordAsync(store, user, password); + + var hash = await store.GetPasswordHashAsync(user); + return userAwarePasswordHasher.VerifyHashedPassword(user, hash, password) != PasswordVerificationResult.Failed; + } + + /// + /// Override to determine how to hash the password + /// + /// + /// + /// + /// + /// + /// This method is called anytime the password needs to be hashed for storage (i.e. including when reset password is used) + /// + protected override async Task UpdatePassword(IUserPasswordStore passwordStore, T user, string newPassword) + { + var userAwarePasswordHasher = PasswordHasher as IUserAwarePasswordHasher; + if (userAwarePasswordHasher == null) + return await base.UpdatePassword(passwordStore, user, newPassword); + + var result = await PasswordValidator.ValidateAsync(newPassword); + if (result.Succeeded == false) + return result; + + await passwordStore.SetPasswordHashAsync(user, userAwarePasswordHasher.HashPassword(user, newPassword)); + await UpdateSecurityStampInternal(user); + return IdentityResult.Success; + + + } + + /// + /// This is copied from the underlying .NET base class since they decied to not expose it + /// + /// + /// + private async Task UpdateSecurityStampInternal(BackOfficeIdentityUser user) + { + if (SupportsUserSecurityStamp == false) + return; + await GetSecurityStore().SetSecurityStampAsync(user, NewSecurityStamp()); + } + + /// + /// This is copied from the underlying .NET base class since they decied to not expose it + /// + /// + private IUserSecurityStampStore GetSecurityStore() + { + var store = Store as IUserSecurityStampStore; + if (store == null) + throw new NotSupportedException("The current user store does not implement " + typeof(IUserSecurityStampStore<>)); + return store; + } + + /// + /// This is copied from the underlying .NET base class since they decied to not expose it + /// + /// + private static string NewSecurityStamp() + { + return Guid.NewGuid().ToString(); + } + + #endregion } } diff --git a/src/Umbraco.Core/Security/BackOfficeUserStore.cs b/src/Umbraco.Core/Security/BackOfficeUserStore.cs index 7d5774c870..9e8d5c6170 100644 --- a/src/Umbraco.Core/Security/BackOfficeUserStore.cs +++ b/src/Umbraco.Core/Security/BackOfficeUserStore.cs @@ -8,9 +8,13 @@ using System.Web.Security; using AutoMapper; using Microsoft.AspNet.Identity; using Microsoft.Owin; +using Umbraco.Core.Models; +using Umbraco.Core.Models.EntityBase; using Umbraco.Core.Models.Identity; using Umbraco.Core.Models.Membership; using Umbraco.Core.Services; +using IUser = Umbraco.Core.Models.Membership.IUser; +using Task = System.Threading.Tasks.Task; namespace Umbraco.Core.Security { @@ -30,12 +34,14 @@ namespace Umbraco.Core.Security //IQueryableUserStore { private readonly IUserService _userService; + private readonly IEntityService _entityService; private readonly IExternalLoginService _externalLoginService; private bool _disposed = false; - public BackOfficeUserStore(IUserService userService, IExternalLoginService externalLoginService, MembershipProviderBase usersMembershipProvider) + public BackOfficeUserStore(IUserService userService, IEntityService entityService, IExternalLoginService externalLoginService, MembershipProviderBase usersMembershipProvider) { _userService = userService; + _entityService = entityService; _externalLoginService = externalLoginService; if (userService == null) throw new ArgumentNullException("userService"); if (usersMembershipProvider == null) throw new ArgumentNullException("usersMembershipProvider"); @@ -68,41 +74,33 @@ namespace Umbraco.Core.Security ThrowIfDisposed(); if (user == null) throw new ArgumentNullException("user"); - var userType = _userService.GetUserTypeByAlias( - user.UserTypeAlias.IsNullOrWhiteSpace() ? _userService.GetDefaultMemberType() : user.UserTypeAlias); - - var member = new User(userType) - { - DefaultToLiveEditing = false, - Email = user.Email, - Language = user.Culture ?? Configuration.GlobalSettings.DefaultUILanguage, - Name = user.Name, - Username = user.UserName, - StartContentId = user.StartContentId == 0 ? -1 : user.StartContentId, - StartMediaId = user.StartMediaId == 0 ? -1 : user.StartMediaId, - IsLockedOut = user.IsLockedOut, - IsApproved = true - }; - - UpdateMemberProperties(member, user); - //the password must be 'something' it could be empty if authenticating // with an external provider so we'll just generate one and prefix it, the // prefix will help us determine if the password hasn't actually been specified yet. - if (member.RawPasswordValue.IsNullOrWhiteSpace()) + //this will hash the guid with a salt so should be nicely random + var aspHasher = new PasswordHasher(); + var emptyPasswordValue = Constants.Security.EmptyPasswordPrefix + + aspHasher.HashPassword(Guid.NewGuid().ToString("N")); + + var userEntity = new User(user.Name, user.Email, user.UserName, emptyPasswordValue) { - //this will hash the guid with a salt so should be nicely random - var aspHasher = new PasswordHasher(); - member.RawPasswordValue = "___UIDEMPTYPWORD__" + - aspHasher.HashPassword(Guid.NewGuid().ToString("N")); + DefaultToLiveEditing = false, + Language = user.Culture ?? Configuration.GlobalSettings.DefaultUILanguage, + StartContentIds = user.StartContentIds ?? new int[] { }, + StartMediaIds = user.StartMediaIds ?? new int[] { }, + IsLockedOut = user.IsLockedOut, + }; - } - _userService.Save(member); + UpdateMemberProperties(userEntity, user); + + //TODO: We should deal with Roles --> User Groups here which we currently are not doing - if (member.Id == 0) throw new DataException("Could not create the user, check logs for details"); + _userService.Save(userEntity); + + if (userEntity.Id == 0) throw new DataException("Could not create the user, check logs for details"); //re-assign id - user.Id = member.Id; + user.Id = userEntity.Id; return Task.FromResult(0); } @@ -131,7 +129,7 @@ namespace Umbraco.Core.Security _userService.Save(found); } - if (user.LoginsChanged) + if (user.IsPropertyDirty("Logins")) { var logins = await GetLoginsAsync(user); _externalLoginService.SaveUserLogins(found.Id, logins); @@ -199,7 +197,7 @@ namespace Umbraco.Core.Security return await Task.FromResult(result); } - + /// /// Set the user password hash /// @@ -209,7 +207,7 @@ namespace Umbraco.Core.Security { ThrowIfDisposed(); if (user == null) throw new ArgumentNullException("user"); - if (passwordHash.IsNullOrWhiteSpace()) throw new ArgumentNullException("passwordHash"); + if (string.IsNullOrEmpty(passwordHash)) throw new ArgumentException("Value cannot be null or empty.", "passwordHash"); user.PasswordHash = passwordHash; @@ -225,7 +223,7 @@ namespace Umbraco.Core.Security { ThrowIfDisposed(); if (user == null) throw new ArgumentNullException("user"); - + return Task.FromResult(user.PasswordHash); } @@ -239,7 +237,7 @@ namespace Umbraco.Core.Security ThrowIfDisposed(); if (user == null) throw new ArgumentNullException("user"); - return Task.FromResult(user.PasswordHash.IsNullOrWhiteSpace() == false); + return Task.FromResult(string.IsNullOrEmpty(user.PasswordHash) == false); } /// @@ -279,7 +277,9 @@ namespace Umbraco.Core.Security public Task GetEmailConfirmedAsync(BackOfficeIdentityUser user) { ThrowIfDisposed(); - throw new NotImplementedException(); + if (user == null) throw new ArgumentNullException("user"); + + return Task.FromResult(user.EmailConfirmed); } /// @@ -290,7 +290,8 @@ namespace Umbraco.Core.Security public Task SetEmailConfirmedAsync(BackOfficeIdentityUser user, bool confirmed) { ThrowIfDisposed(); - throw new NotImplementedException(); + user.EmailConfirmed = confirmed; + return Task.FromResult(0); } /// @@ -374,12 +375,17 @@ namespace Umbraco.Core.Security var result = _externalLoginService.Find(login).ToArray(); if (result.Any()) { - //return the first member that matches the result - var output = (from l in result - select _userService.GetUserById(l.UserId) - into user - where user != null - select Mapper.Map(user)).FirstOrDefault(); + //return the first user that matches the result + BackOfficeIdentityUser output = null; + foreach (var l in result) + { + var user = _userService.GetUserById(l.UserId); + if (user != null) + { + output = Mapper.Map(user); + break; + } + } return Task.FromResult(AssignLoginsCallback(output)); } @@ -389,63 +395,49 @@ namespace Umbraco.Core.Security /// - /// Adds a user to a role (section) + /// Adds a user to a role (user group) /// /// /// public Task AddToRoleAsync(BackOfficeIdentityUser user, string roleName) - { + { ThrowIfDisposed(); if (user == null) throw new ArgumentNullException("user"); + if (string.IsNullOrWhiteSpace(roleName)) throw new ArgumentException("Value cannot be null or whitespace.", "roleName"); - if (user.AllowedSections.InvariantContains(roleName)) return Task.FromResult(0); - - var asInt = user.Id.TryConvertTo(); - if (asInt == false) + var userRole = user.Roles.SingleOrDefault(r => r.RoleId == roleName); + + if (userRole == null) { - throw new InvalidOperationException("The user id must be an integer to work with the Umbraco"); - } - - var found = _userService.GetUserById(asInt.Result); - - if (found != null) - { - found.AddAllowedSection(roleName); + user.AddRole(roleName); } return Task.FromResult(0); } /// - /// Removes the role (allowed section) for the user + /// Removes the role (user group) for the user /// /// /// public Task RemoveFromRoleAsync(BackOfficeIdentityUser user, string roleName) - { + { ThrowIfDisposed(); if (user == null) throw new ArgumentNullException("user"); + if (string.IsNullOrWhiteSpace(roleName)) throw new ArgumentException("Value cannot be null or whitespace.", "roleName"); - if (user.AllowedSections.InvariantContains(roleName) == false) return Task.FromResult(0); + var userRole = user.Roles.SingleOrDefault(r => r.RoleId == roleName); - var asInt = user.Id.TryConvertTo(); - if (asInt == false) + if (userRole != null) { - throw new InvalidOperationException("The user id must be an integer to work with the Umbraco"); - } - - var found = _userService.GetUserById(asInt.Result); - - if (found != null) - { - found.RemoveAllowedSection(roleName); + user.Roles.Remove(userRole); } return Task.FromResult(0); } /// - /// Returns the roles for this user + /// Returns the roles (user groups) for this user /// /// /// @@ -453,7 +445,7 @@ namespace Umbraco.Core.Security { ThrowIfDisposed(); if (user == null) throw new ArgumentNullException("user"); - return Task.FromResult((IList)user.AllowedSections.ToList()); + return Task.FromResult((IList)user.Roles.Select(x => x.RoleId).ToList()); } /// @@ -465,7 +457,7 @@ namespace Umbraco.Core.Security { ThrowIfDisposed(); if (user == null) throw new ArgumentNullException("user"); - return Task.FromResult(user.AllowedSections.InvariantContains(roleName)); + return Task.FromResult(user.Roles.Select(x => x.RoleId).InvariantContains(roleName)); } /// @@ -620,28 +612,40 @@ namespace Umbraco.Core.Security } #endregion - private bool UpdateMemberProperties(Models.Membership.IUser user, BackOfficeIdentityUser identityUser) + private bool UpdateMemberProperties(IUser user, BackOfficeIdentityUser identityUser) { var anythingChanged = false; - //don't assign anything if nothing has changed as this will trigger - //the track changes of the model - if ((user.LastLoginDate != default(DateTime) && identityUser.LastLoginDateUtc.HasValue == false) + + //don't assign anything if nothing has changed as this will trigger the track changes of the model + + if (identityUser.IsPropertyDirty("LastLoginDateUtc") + || (user.LastLoginDate != default(DateTime) && identityUser.LastLoginDateUtc.HasValue == false) || identityUser.LastLoginDateUtc.HasValue && user.LastLoginDate.ToUniversalTime() != identityUser.LastLoginDateUtc.Value) { anythingChanged = true; user.LastLoginDate = identityUser.LastLoginDateUtc.Value.ToLocalTime(); } - if (user.Name != identityUser.Name && identityUser.Name.IsNullOrWhiteSpace() == false) + if (identityUser.IsPropertyDirty("EmailConfirmed") + || (user.EmailConfirmedDate.HasValue && user.EmailConfirmedDate.Value != default(DateTime) && identityUser.EmailConfirmed == false) + || ((user.EmailConfirmedDate.HasValue == false || user.EmailConfirmedDate.Value == default(DateTime)) && identityUser.EmailConfirmed)) + { + anythingChanged = true; + user.EmailConfirmedDate = identityUser.EmailConfirmed ? (DateTime?)DateTime.Now : null; + } + if (identityUser.IsPropertyDirty("Name") + && user.Name != identityUser.Name && identityUser.Name.IsNullOrWhiteSpace() == false) { anythingChanged = true; user.Name = identityUser.Name; } - if (user.Email != identityUser.Email && identityUser.Email.IsNullOrWhiteSpace() == false) + if (identityUser.IsPropertyDirty("Email") + && user.Email != identityUser.Email && identityUser.Email.IsNullOrWhiteSpace() == false) { anythingChanged = true; user.Email = identityUser.Email; } - if (user.FailedPasswordAttempts != identityUser.AccessFailedCount) + if (identityUser.IsPropertyDirty("AccessFailedCount") + && user.FailedPasswordAttempts != identityUser.AccessFailedCount) { anythingChanged = true; user.FailedPasswordAttempts = identityUser.AccessFailedCount; @@ -658,51 +662,81 @@ namespace Umbraco.Core.Security } } - if (user.Username != identityUser.UserName && identityUser.UserName.IsNullOrWhiteSpace() == false) + if (identityUser.IsPropertyDirty("UserName") + && user.Username != identityUser.UserName && identityUser.UserName.IsNullOrWhiteSpace() == false) { anythingChanged = true; user.Username = identityUser.UserName; } - if (user.RawPasswordValue != identityUser.PasswordHash && identityUser.PasswordHash.IsNullOrWhiteSpace() == false) + if (identityUser.IsPropertyDirty("PasswordHash") + && user.RawPasswordValue != identityUser.PasswordHash && identityUser.PasswordHash.IsNullOrWhiteSpace() == false) { anythingChanged = true; user.RawPasswordValue = identityUser.PasswordHash; } - if (user.Language != identityUser.Culture && identityUser.Culture.IsNullOrWhiteSpace() == false) + if (identityUser.IsPropertyDirty("Culture") + && user.Language != identityUser.Culture && identityUser.Culture.IsNullOrWhiteSpace() == false) { anythingChanged = true; user.Language = identityUser.Culture; } - if (user.StartMediaId != identityUser.StartMediaId) + if (identityUser.IsPropertyDirty("StartMediaIds") + && user.StartMediaIds.UnsortedSequenceEqual(identityUser.StartMediaIds) == false) { anythingChanged = true; - user.StartMediaId = identityUser.StartMediaId; + user.StartMediaIds = identityUser.StartMediaIds; } - if (user.StartContentId != identityUser.StartContentId) + if (identityUser.IsPropertyDirty("StartContentIds") + && user.StartContentIds.UnsortedSequenceEqual(identityUser.StartContentIds) == false) { anythingChanged = true; - user.StartContentId = identityUser.StartContentId; + user.StartContentIds = identityUser.StartContentIds; } if (user.SecurityStamp != identityUser.SecurityStamp) { anythingChanged = true; user.SecurityStamp = identityUser.SecurityStamp; } - - if (user.AllowedSections.ContainsAll(identityUser.AllowedSections) == false - || identityUser.AllowedSections.ContainsAll(user.AllowedSections) == false) + + //TODO: Fix this for Groups too + if (identityUser.IsPropertyDirty("Roles") || identityUser.IsPropertyDirty("Groups")) { - anythingChanged = true; - foreach (var allowedSection in user.AllowedSections) + var userGroupAliases = user.Groups.Select(x => x.Alias).ToArray(); + + var identityUserRoles = identityUser.Roles.Select(x => x.RoleId).ToArray(); + var identityUserGroups = identityUser.Groups.Select(x => x.Alias).ToArray(); + + var combinedAliases = identityUserRoles.Union(identityUserGroups).ToArray(); + + if (userGroupAliases.ContainsAll(combinedAliases) == false + || combinedAliases.ContainsAll(userGroupAliases) == false) { - user.RemoveAllowedSection(allowedSection); - } - foreach (var allowedApplication in identityUser.AllowedSections) - { - user.AddAllowedSection(allowedApplication); + anythingChanged = true; + + //clear out the current groups (need to ToArray since we are modifying the iterator) + user.ClearGroups(); + + //go lookup all these groups + var groups = _userService.GetUserGroupsByAlias(combinedAliases).Select(x => x.ToReadOnlyGroup()).ToArray(); + + //use all of the ones assigned and add them + foreach (var group in groups) + { + user.AddGroup(group); + } + + //re-assign + identityUser.Groups = groups; } } + + //we should re-set the calculated start nodes + identityUser.CalculatedMediaStartNodeIds = user.CalculateMediaStartNodeIds(_entityService); + identityUser.CalculatedContentStartNodeIds = user.CalculateContentStartNodeIds(_entityService); + + //reset all changes + identityUser.ResetDirtyProperties(false); return anythingChanged; } @@ -713,7 +747,6 @@ namespace Umbraco.Core.Security if (_disposed) throw new ObjectDisposedException(GetType().Name); } - - + } } \ No newline at end of file diff --git a/src/Umbraco.Core/Security/BackOfficeUserValidator.cs b/src/Umbraco.Core/Security/BackOfficeUserValidator.cs new file mode 100644 index 0000000000..58319e95a7 --- /dev/null +++ b/src/Umbraco.Core/Security/BackOfficeUserValidator.cs @@ -0,0 +1,29 @@ +using System.Threading.Tasks; +using Microsoft.AspNet.Identity; +using Umbraco.Core.Models.EntityBase; +using Umbraco.Core.Models.Identity; + +namespace Umbraco.Core.Security +{ + /// + /// Custom validator to not validate a user's username or email if they haven't changed + /// + /// + internal class BackOfficeUserValidator : UserValidator + where T : BackOfficeIdentityUser + { + public BackOfficeUserValidator(UserManager manager) : base(manager) + { + } + + public override async Task ValidateAsync(T item) + { + //Don't validate if the user's email or username hasn't changed otherwise it's just wasting SQL queries. + if (item.IsPropertyDirty("Email") || item.IsPropertyDirty("UserName")) + { + return await base.ValidateAsync(item); + } + return IdentityResult.Success; + } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Security/EmailService.cs b/src/Umbraco.Core/Security/EmailService.cs index 807d528f3d..f8f9af10ae 100644 --- a/src/Umbraco.Core/Security/EmailService.cs +++ b/src/Umbraco.Core/Security/EmailService.cs @@ -1,6 +1,7 @@ using System.Net.Mail; using System.Threading.Tasks; using Microsoft.AspNet.Identity; +using Umbraco.Core.Configuration; namespace Umbraco.Core.Security { @@ -8,18 +9,33 @@ namespace Umbraco.Core.Security { public async Task SendAsync(IdentityMessage message) { - using (var client = new SmtpClient()) - using (var mailMessage = new MailMessage()) + var mailMessage = new MailMessage( + UmbracoConfig.For.UmbracoSettings().Content.NotificationEmailAddress, + message.Destination, + message.Subject, + message.Body) { - mailMessage.Body = message.Body; - mailMessage.To.Add(message.Destination); - mailMessage.Subject = message.Subject; + IsBodyHtml = message.Body.IsNullOrWhiteSpace() == false + && message.Body.Contains("<") && message.Body.Contains(" public interface IBackOfficeUserPasswordChecker { + /// + /// Checks a password for a user + /// + /// + /// + /// + /// + /// This will allow a developer to auto-link a local account which is required if the user queried doesn't exist locally. + /// The user parameter will always contain the username, if the user doesn't exist locally, the other properties will not be filled in. + /// A developer can then create a local account by filling in the properties and using UserManager.CreateAsync + /// Task CheckPasswordAsync(BackOfficeIdentityUser user, string password); } } \ No newline at end of file diff --git a/src/Umbraco.Core/Security/IMembershipProviderPasswordHasher.cs b/src/Umbraco.Core/Security/IMembershipProviderPasswordHasher.cs new file mode 100644 index 0000000000..42715d280a --- /dev/null +++ b/src/Umbraco.Core/Security/IMembershipProviderPasswordHasher.cs @@ -0,0 +1,12 @@ +using Microsoft.AspNet.Identity; + +namespace Umbraco.Core.Security +{ + /// + /// A password hasher that is based on the rules configured for a membership provider + /// + public interface IMembershipProviderPasswordHasher : IPasswordHasher + { + MembershipProviderBase MembershipProvider { get; } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Security/IUserAwarePasswordHasher.cs b/src/Umbraco.Core/Security/IUserAwarePasswordHasher.cs new file mode 100644 index 0000000000..cea4d5a144 --- /dev/null +++ b/src/Umbraco.Core/Security/IUserAwarePasswordHasher.cs @@ -0,0 +1,18 @@ +using System; +using Microsoft.AspNet.Identity; + +namespace Umbraco.Core.Security +{ + /// + /// A password hasher that is User aware so that it can process the hashing based on the user's settings + /// + /// + /// + public interface IUserAwarePasswordHasher + where TUser : class, IUser + where TKey : IEquatable + { + string HashPassword(TUser user, string password); + PasswordVerificationResult VerifyHashedPassword(TUser user, string hashedPassword, string providedPassword); + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Security/MembershipPasswordHasher.cs b/src/Umbraco.Core/Security/MembershipPasswordHasher.cs deleted file mode 100644 index 56daa3efdd..0000000000 --- a/src/Umbraco.Core/Security/MembershipPasswordHasher.cs +++ /dev/null @@ -1,31 +0,0 @@ -using Microsoft.AspNet.Identity; - -namespace Umbraco.Core.Security -{ - /// - /// A custom password hasher that conforms to the current password hashing done in Umbraco - /// - internal class MembershipPasswordHasher : IPasswordHasher - { - private readonly MembershipProviderBase _provider; - - public MembershipPasswordHasher(MembershipProviderBase provider) - { - _provider = provider; - } - - public string HashPassword(string password) - { - return _provider.HashPasswordForStorage(password); - } - - public PasswordVerificationResult VerifyHashedPassword(string hashedPassword, string providedPassword) - { - return _provider.VerifyPassword(providedPassword, hashedPassword) - ? PasswordVerificationResult.Success - : PasswordVerificationResult.Failed; - } - - - } -} \ No newline at end of file diff --git a/src/Umbraco.Core/Security/MembershipProviderBase.cs b/src/Umbraco.Core/Security/MembershipProviderBase.cs index 4d4dad3fe8..982ced30c7 100644 --- a/src/Umbraco.Core/Security/MembershipProviderBase.cs +++ b/src/Umbraco.Core/Security/MembershipProviderBase.cs @@ -28,23 +28,24 @@ namespace Umbraco.Core.Security public bool VerifyPassword(string password, string hashedPassword) { + if (string.IsNullOrWhiteSpace(hashedPassword)) throw new ArgumentException("Value cannot be null or whitespace.", "hashedPassword"); return CheckPassword(password, hashedPassword); } /// - /// Providers can override this setting, default is 7 + /// Providers can override this setting, default is 10 /// public virtual int DefaultMinPasswordLength { - get { return 7; } + get { return 10; } } /// - /// Providers can override this setting, default is 1 + /// Providers can override this setting, default is 0 /// public virtual int DefaultMinNonAlphanumericChars { - get { return 1; } + get { return 0; } } /// @@ -224,7 +225,7 @@ namespace Umbraco.Core.Security base.Initialize(name, config); _enablePasswordRetrieval = config.GetValue("enablePasswordRetrieval", false); - _enablePasswordReset = config.GetValue("enablePasswordReset", false); + _enablePasswordReset = config.GetValue("enablePasswordReset", true); _requiresQuestionAndAnswer = config.GetValue("requiresQuestionAndAnswer", false); _requiresUniqueEmail = config.GetValue("requiresUniqueEmail", true); _maxInvalidPasswordAttempts = GetIntValue(config, "maxInvalidPasswordAttempts", 5, false, 0); @@ -733,6 +734,7 @@ namespace Umbraco.Core.Security /// protected internal bool CheckPassword(string password, string dbPassword) { + if (string.IsNullOrWhiteSpace(dbPassword)) throw new ArgumentException("Value cannot be null or whitespace.", "dbPassword"); switch (PasswordFormat) { case MembershipPasswordFormat.Encrypted: @@ -794,6 +796,7 @@ namespace Umbraco.Core.Security /// internal string StoredPassword(string storedString, out string salt) { + if (string.IsNullOrWhiteSpace(storedString)) throw new ArgumentException("Value cannot be null or whitespace.", "storedString"); if (UseLegacyEncoding) { salt = string.Empty; diff --git a/src/Umbraco.Core/Security/MembershipProviderExtensions.cs b/src/Umbraco.Core/Security/MembershipProviderExtensions.cs index 645de22ab8..7f787050d4 100644 --- a/src/Umbraco.Core/Security/MembershipProviderExtensions.cs +++ b/src/Umbraco.Core/Security/MembershipProviderExtensions.cs @@ -1,16 +1,11 @@ using System; -using System.Collections.Generic; -using System.Linq; using System.Security.Principal; -using System.Text; using System.Threading; -using System.Threading.Tasks; using System.Web; using System.Web.Hosting; using System.Web.Security; using Umbraco.Core.Configuration; using Umbraco.Core.Models; -using Umbraco.Core.Security; using Umbraco.Core.Services; namespace Umbraco.Core.Security @@ -31,13 +26,14 @@ namespace Umbraco.Core.Security if (userService == null) return canReset; - //we need to check for the special case in which a user is an admin - in which acse they can reset the password even if EnablePasswordReset == false + //we need to check for the special case in which a user is an admin - in which case they can reset the password even if EnablePasswordReset == false if (provider.EnablePasswordReset == false) { var identity = Thread.CurrentPrincipal.GetUmbracoIdentity(); if (identity != null) { - var user = userService.GetByUsername(identity.Username); + var user = userService.GetUserById(identity.Id.TryConvertTo().Result); + if (user == null) throw new InvalidOperationException("No user with username " + identity.Username + " found"); var userIsAdmin = user.IsAdmin(); if (userIsAdmin) { @@ -70,7 +66,7 @@ namespace Umbraco.Core.Security } /// - /// Method to get the Umbraco Members membership provider based on it's alias + /// Method to get the Umbraco Members membership provider based on its alias /// /// public static MembershipProvider GetMembersMembershipProvider() @@ -83,7 +79,7 @@ namespace Umbraco.Core.Security } /// - /// Method to get the Umbraco Users membership provider based on it's alias + /// Method to get the Umbraco Users membership provider based on its alias /// /// public static MembershipProvider GetUsersMembershipProvider() @@ -167,6 +163,5 @@ namespace Umbraco.Core.Security { return (UmbracoMembershipProviderBase)membershipProvider; } - } } diff --git a/src/Umbraco.Core/Security/MembershipProviderPasswordHasher.cs b/src/Umbraco.Core/Security/MembershipProviderPasswordHasher.cs new file mode 100644 index 0000000000..f518f99c55 --- /dev/null +++ b/src/Umbraco.Core/Security/MembershipProviderPasswordHasher.cs @@ -0,0 +1,34 @@ +using Microsoft.AspNet.Identity; + +namespace Umbraco.Core.Security +{ + /// + /// A password hasher that conforms to the password hashing done with membership providers + /// + public class MembershipProviderPasswordHasher : IMembershipProviderPasswordHasher + { + /// + /// Exposes the underlying MembershipProvider + /// + public MembershipProviderBase MembershipProvider { get; private set; } + + public MembershipProviderPasswordHasher(MembershipProviderBase provider) + { + MembershipProvider = provider; + } + + public string HashPassword(string password) + { + return MembershipProvider.HashPasswordForStorage(password); + } + + public PasswordVerificationResult VerifyHashedPassword(string hashedPassword, string providedPassword) + { + return MembershipProvider.VerifyPassword(providedPassword, hashedPassword) + ? PasswordVerificationResult.Success + : PasswordVerificationResult.Failed; + } + + + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Security/MembershipProviderPasswordValidator.cs b/src/Umbraco.Core/Security/MembershipProviderPasswordValidator.cs new file mode 100644 index 0000000000..3331116b4e --- /dev/null +++ b/src/Umbraco.Core/Security/MembershipProviderPasswordValidator.cs @@ -0,0 +1,38 @@ +using System.Threading.Tasks; +using System.Web.Security; +using Microsoft.AspNet.Identity; + +namespace Umbraco.Core.Security +{ + /// + /// Ensure that both the normal password validator rules are processed along with the underlying memberhsip provider rules + /// + public class MembershipProviderPasswordValidator : PasswordValidator + { + public MembershipProvider Provider { get; private set; } + + public MembershipProviderPasswordValidator(MembershipProvider provider) + { + Provider = provider; + + RequiredLength = Provider.MinRequiredPasswordLength; + RequireNonLetterOrDigit = Provider.MinRequiredNonAlphanumericCharacters > 0; + RequireDigit = false; + RequireLowercase = false; + RequireUppercase = false; + } + + public override async Task ValidateAsync(string item) + { + var result = await base.ValidateAsync(item); + if (result.Succeeded == false) + return result; + var providerValidate = MembershipProviderBase.IsPasswordValid(item, Provider.MinRequiredNonAlphanumericCharacters, Provider.PasswordStrengthRegularExpression, Provider.MinRequiredPasswordLength); + if (providerValidate.Success == false) + { + return IdentityResult.Failed("Could not set password, password rules violated: " + providerValidate.Result); + } + return IdentityResult.Success; + } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Security/UmbracoBackOfficeIdentity.cs b/src/Umbraco.Core/Security/UmbracoBackOfficeIdentity.cs index 1bc9902da5..39931341fa 100644 --- a/src/Umbraco.Core/Security/UmbracoBackOfficeIdentity.cs +++ b/src/Umbraco.Core/Security/UmbracoBackOfficeIdentity.cs @@ -48,12 +48,20 @@ namespace Umbraco.Core.Security || realName == null || session == null) throw new InvalidOperationException("Cannot create a " + typeof(UmbracoBackOfficeIdentity) + " from " + typeof(ClaimsIdentity) + " since there are missing required claims"); - int startContentIdAsInt; - int startMediaIdAsInt; - if (int.TryParse(startContentId, out startContentIdAsInt) == false || int.TryParse(startMediaId, out startMediaIdAsInt) == false) + int[] startContentIdsAsInt; + int[] startMediaIdsAsInt; + if (startContentId.DetectIsJson() == false || startMediaId.DetectIsJson() == false) + throw new InvalidOperationException("Cannot create a " + typeof(UmbracoBackOfficeIdentity) + " from " + typeof(ClaimsIdentity) + " since the data is not formatted correctly - either content or media start Ids are not JSON"); + + try { - throw new InvalidOperationException("Cannot create a " + typeof(UmbracoBackOfficeIdentity) + " from " + typeof(ClaimsIdentity) + " since the data is not formatted correctly"); + startContentIdsAsInt = JsonConvert.DeserializeObject(startContentId); + startMediaIdsAsInt = JsonConvert.DeserializeObject(startMediaId); } + catch (Exception e) + { + throw new InvalidOperationException("Cannot create a " + typeof(UmbracoBackOfficeIdentity) + " from " + typeof(ClaimsIdentity) + " since the data is not formatted correctly - either content or media start Ids could not be parsed as JSON", e); + } var roles = identity.FindAll(x => x.Type == DefaultRoleClaimType).Select(role => role.Value).ToList(); var allowedApps = identity.FindAll(x => x.Type == Constants.Security.AllowedApplicationsClaimType).Select(app => app.Value).ToList(); @@ -67,8 +75,8 @@ namespace Umbraco.Core.Security Roles = roles.ToArray(), Username = username, RealName = realName, - StartContentNode = startContentIdAsInt, - StartMediaNode = startMediaIdAsInt + StartContentNodes = startContentIdsAsInt, + StartMediaNodes = startMediaIdsAsInt }; return new UmbracoBackOfficeIdentity(identity, userData); @@ -202,10 +210,10 @@ namespace Umbraco.Core.Security AddClaim(new Claim(ClaimTypes.GivenName, UserData.RealName, ClaimValueTypes.String, Issuer, Issuer, this)); if (HasClaim(x => x.Type == Constants.Security.StartContentNodeIdClaimType) == false) - AddClaim(new Claim(Constants.Security.StartContentNodeIdClaimType, StartContentNode.ToInvariantString(), ClaimValueTypes.Integer32, Issuer, Issuer, this)); + AddClaim(new Claim(Constants.Security.StartContentNodeIdClaimType, JsonConvert.SerializeObject(StartContentNodes), ClaimValueTypes.Integer32, Issuer, Issuer, this)); if (HasClaim(x => x.Type == Constants.Security.StartMediaNodeIdClaimType) == false) - AddClaim(new Claim(Constants.Security.StartMediaNodeIdClaimType, StartMediaNode.ToInvariantString(), ClaimValueTypes.Integer32, Issuer, Issuer, this)); + AddClaim(new Claim(Constants.Security.StartMediaNodeIdClaimType, JsonConvert.SerializeObject(StartMediaNodes), ClaimValueTypes.Integer32, Issuer, Issuer, this)); if (HasClaim(x => x.Type == ClaimTypes.Locality) == false) AddClaim(new Claim(ClaimTypes.Locality, Culture, ClaimValueTypes.String, Issuer, Issuer, this)); @@ -259,14 +267,14 @@ namespace Umbraco.Core.Security get { return _currentIssuer; } } - public int StartContentNode + public int[] StartContentNodes { - get { return UserData.StartContentNode; } + get { return UserData.StartContentNodes; } } - public int StartMediaNode + public int[] StartMediaNodes { - get { return UserData.StartMediaNode; } + get { return UserData.StartMediaNodes; } } public string[] AllowedApplications diff --git a/src/Umbraco.Core/Security/UserAwareMembershipProviderPasswordHasher.cs b/src/Umbraco.Core/Security/UserAwareMembershipProviderPasswordHasher.cs new file mode 100644 index 0000000000..7d19d72c3c --- /dev/null +++ b/src/Umbraco.Core/Security/UserAwareMembershipProviderPasswordHasher.cs @@ -0,0 +1,30 @@ +using System; +using Microsoft.AspNet.Identity; +using Umbraco.Core.Models.Identity; + +namespace Umbraco.Core.Security +{ + /// + /// The default password hasher that is User aware so that it can process the hashing based on the user's settings + /// + public class UserAwareMembershipProviderPasswordHasher : MembershipProviderPasswordHasher, IUserAwarePasswordHasher + { + public UserAwareMembershipProviderPasswordHasher(MembershipProviderBase provider) : base(provider) + { + } + + public string HashPassword(BackOfficeIdentityUser user, string password) + { + //TODO: Implement the logic for this, we need to lookup the password format for the user and hash accordingly: http://issues.umbraco.org/issue/U4-10089 + //NOTE: For now this just falls back to the hashing we are currently using + return base.HashPassword(password); + } + + public PasswordVerificationResult VerifyHashedPassword(BackOfficeIdentityUser user, string hashedPassword, string providedPassword) + { + //TODO: Implement the logic for this, we need to lookup the password format for the user and hash accordingly: http://issues.umbraco.org/issue/U4-10089 + //NOTE: For now this just falls back to the hashing we are currently using + return base.VerifyHashedPassword(hashedPassword, providedPassword); + } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Security/UserData.cs b/src/Umbraco.Core/Security/UserData.cs index 407d2782dd..8761ada847 100644 --- a/src/Umbraco.Core/Security/UserData.cs +++ b/src/Umbraco.Core/Security/UserData.cs @@ -46,12 +46,18 @@ namespace Umbraco.Core.Security [DataMember(Name = "name")] public string RealName { get; set; } - + + /// + /// The start nodes on the UserData object for the auth ticket contains all of the user's start nodes including ones assigned to their user groups + /// [DataMember(Name = "startContent")] - public int StartContentNode { get; set; } - + public int[] StartContentNodes { get; set; } + + /// + /// The start nodes on the UserData object for the auth ticket contains all of the user's start nodes including ones assigned to their user groups + /// [DataMember(Name = "startMedia")] - public int StartMediaNode { get; set; } + public int[] StartMediaNodes { get; set; } [DataMember(Name = "allowedApps")] public string[] AllowedApplications { get; set; } diff --git a/src/Umbraco.Core/Services/ContentService.cs b/src/Umbraco.Core/Services/ContentService.cs index d92f9a558f..491e03a065 100644 --- a/src/Umbraco.Core/Services/ContentService.cs +++ b/src/Umbraco.Core/Services/ContentService.cs @@ -114,27 +114,27 @@ namespace Umbraco.Core.Services } /// - /// Assigns a single permission to the current content item for the specified user ids + /// Assigns a single permission to the current content item for the specified group ids /// /// /// - /// - public void AssignContentPermission(IContent entity, char permission, IEnumerable userIds) + /// + public void AssignContentPermission(IContent entity, char permission, IEnumerable groupIds) { using (var uow = UowProvider.GetUnitOfWork()) { var repository = RepositoryFactory.CreateContentRepository(uow); - repository.AssignEntityPermission(entity, permission, userIds); + repository.AssignEntityPermission(entity, permission, groupIds); uow.Commit(); } } /// - /// Gets the list of permissions for the content item + /// Returns implicit/inherited permissions assigned to the content item for all user groups /// /// /// - public IEnumerable GetPermissionsForEntity(IContent content) + public EntityPermissionCollection GetPermissionsForEntity(IContent content) { using (var uow = UowProvider.GetUnitOfWork(readOnly: true)) { @@ -1671,9 +1671,21 @@ namespace Umbraco.Core.Services // Update the create author and last edit author copy.CreatorId = userId; copy.WriterId = userId; + + //get the current permissions, if there are any explicit ones they need to be copied + var currentPermissions = GetPermissionsForEntity(content); + currentPermissions.RemoveWhere(p => p.IsDefaultPermissions); repository.AddOrUpdate(copy); - repository.AddOrUpdatePreviewXml(copy, c => _entitySerializer.Serialize(this, _dataTypeService, _userService, c)); + repository.AddOrUpdatePreviewXml(copy, c => _entitySerializer.Serialize(this, _dataTypeService, _userService, c)); + + //add permissions + if (currentPermissions.Count > 0) + { + var permissionSet = new ContentPermissionSet(copy, currentPermissions); + repository.AddOrUpdatePermissions(permissionSet); + } + uow.Commit(); // todo - this should flush, not commit //Special case for the associated tags diff --git a/src/Umbraco.Core/Services/ContentServiceExtensions.cs b/src/Umbraco.Core/Services/ContentServiceExtensions.cs index d2ce1de2f8..b3380cf1bf 100644 --- a/src/Umbraco.Core/Services/ContentServiceExtensions.cs +++ b/src/Umbraco.Core/Services/ContentServiceExtensions.cs @@ -17,7 +17,7 @@ namespace Umbraco.Core.Services /// public static void RemoveContentPermissions(this IContentService contentService, int contentId) { - contentService.ReplaceContentPermissions(new EntityPermissionSet(contentId, Enumerable.Empty())); + contentService.ReplaceContentPermissions(new EntityPermissionSet(contentId, new EntityPermissionCollection())); } /// diff --git a/src/Umbraco.Core/Services/EntityService.cs b/src/Umbraco.Core/Services/EntityService.cs index 04d6c276b2..6e4b5ef17c 100644 --- a/src/Umbraco.Core/Services/EntityService.cs +++ b/src/Umbraco.Core/Services/EntityService.cs @@ -1,5 +1,8 @@ using System; using System.Collections.Generic; +using System.Linq; +using System.Linq.Expressions; +using System.Text; using Umbraco.Core.Cache; using Umbraco.Core.CodeAnnotations; using Umbraco.Core.Events; @@ -361,6 +364,46 @@ namespace Umbraco.Core.Services return contents; } } + /// + /// Returns a paged collection of descendants. + /// + public IEnumerable GetPagedDescendants(IEnumerable ids, UmbracoObjectTypes umbracoObjectType, long pageIndex, int pageSize, out long totalRecords, + string orderBy = "path", Direction orderDirection = Direction.Ascending, string filter = "") + { + totalRecords = 0; + + var idsA = ids.ToArray(); + if (idsA.Length == 0) + return Enumerable.Empty(); + + var objectTypeId = umbracoObjectType.GetGuid(); + + using (var uow = UowProvider.GetUnitOfWork(readOnly: true)) + { + var repository = RepositoryFactory.CreateEntityRepository(uow); + + var query = Query.Builder; + if (idsA.All(x => x != Constants.System.Root)) + { + var clauses = new List>>(); + foreach (var id in idsA) + { + var qid = id; + clauses.Add(x => x.Path.SqlContains(string.Format(",{0},", qid), TextColumnType.NVarchar) || x.Path.SqlEndsWith(string.Format(",{0}", qid), TextColumnType.NVarchar)); + } + query.WhereAny(clauses); + } + + IQuery filterQuery = null; + if (filter.IsNullOrWhiteSpace() == false) + { + filterQuery = Query.Builder.Where(x => x.Name.Contains(filter)); + } + + var contents = repository.GetPagedResultsByQuery(query, objectTypeId, pageIndex, pageSize, out totalRecords, orderBy, orderDirection, filterQuery); + return contents; + } + } /// /// Returns a paged collection of descendants from the root @@ -523,6 +566,42 @@ namespace Umbraco.Core.Services } } + public virtual IEnumerable GetAllPaths(UmbracoObjectTypes umbracoObjectType, params int[] ids) + { + var entityType = GetEntityType(umbracoObjectType); + var typeFullName = entityType.FullName; + Mandate.That(_supportedObjectTypes.ContainsKey(typeFullName), () => + { + throw new NotSupportedException + ("The passed in type is not supported"); + }); + + var objectTypeId = umbracoObjectType.GetGuid(); + using (var uow = UowProvider.GetUnitOfWork(readOnly: true)) + { + var repository = RepositoryFactory.CreateEntityRepository(uow); + return repository.GetAllPaths(objectTypeId, ids); + } + } + + public virtual IEnumerable GetAllPaths(UmbracoObjectTypes umbracoObjectType, params Guid[] keys) + { + var entityType = GetEntityType(umbracoObjectType); + var typeFullName = entityType.FullName; + Mandate.That(_supportedObjectTypes.ContainsKey(typeFullName), () => + { + throw new NotSupportedException + ("The passed in type is not supported"); + }); + + var objectTypeId = umbracoObjectType.GetGuid(); + using (var uow = UowProvider.GetUnitOfWork(readOnly: true)) + { + var repository = RepositoryFactory.CreateEntityRepository(uow); + return repository.GetAllPaths(objectTypeId, keys); + } + } + /// /// Gets a collection of /// diff --git a/src/Umbraco.Core/Services/FileService.cs b/src/Umbraco.Core/Services/FileService.cs index 28fb07fe9e..4833401df8 100644 --- a/src/Umbraco.Core/Services/FileService.cs +++ b/src/Umbraco.Core/Services/FileService.cs @@ -621,6 +621,34 @@ namespace Umbraco.Core.Services } } + public Stream GetMacroScriptFileContentStream(string filepath) + { + using (var uow = UowProvider.GetUnitOfWork(readOnly: true)) + { + var repository = RepositoryFactory.CreateMacroScriptRepository(uow); + return repository.GetFileContentStream(filepath); + } + } + + public void SetMacroScriptFileContent(string filepath, Stream content) + { + using (var uow = UowProvider.GetUnitOfWork()) + { + var repository = RepositoryFactory.CreateMacroScriptRepository(uow); + repository.SetFileContent(filepath, content); + uow.Commit(); + } + } + + public long GetMacroScriptFileSize(string filepath) + { + using (var uow = UowProvider.GetUnitOfWork(readOnly: true)) + { + var repository = RepositoryFactory.CreateMacroScriptRepository(uow); + return repository.GetFileSize(filepath); + } + } + #endregion public Stream GetStylesheetFileContentStream(string filepath) @@ -679,6 +707,34 @@ namespace Umbraco.Core.Services } } + public Stream GetUserControlFileContentStream(string filepath) + { + using (var uow = UowProvider.GetUnitOfWork(readOnly: true)) + { + var repository = RepositoryFactory.CreateUserControlRepository(uow); + return repository.GetFileContentStream(filepath); + } + } + + public void SetUserControlFileContent(string filepath, Stream content) + { + using (var uow = UowProvider.GetUnitOfWork()) + { + var repository = RepositoryFactory.CreateUserControlRepository(uow); + repository.SetFileContent(filepath, content); + uow.Commit(); + } + } + + public long GetUserControlFileSize(string filepath) + { + using (var uow = UowProvider.GetUnitOfWork(readOnly: true)) + { + var repository = RepositoryFactory.CreateUserControlRepository(uow); + return repository.GetFileSize(filepath); + } + } + public Stream GetXsltFileContentStream(string filepath) { using (var uow = UowProvider.GetUnitOfWork(readOnly: true)) @@ -783,6 +839,26 @@ namespace Umbraco.Core.Services } } + [Obsolete("MacroScripts are obsolete - this is for backwards compatibility with upgraded sites.")] + public IPartialView GetMacroScript(string path) + { + using (var uow = UowProvider.GetUnitOfWork(readOnly: true)) + { + var repository = RepositoryFactory.CreateMacroScriptRepository(uow); + return repository.Get(path); + } + } + + [Obsolete("UserControls are obsolete - this is for backwards compatibility with upgraded sites.")] + public IUserControl GetUserControl(string path) + { + using (var uow = UowProvider.GetUnitOfWork(readOnly: true)) + { + var repository = RepositoryFactory.CreateUserControlRepository(uow); + return repository.Get(path); + } + } + public IEnumerable GetPartialViewMacros(params string[] names) { using (var uow = UowProvider.GetUnitOfWork(readOnly: true)) diff --git a/src/Umbraco.Core/Services/IContentService.cs b/src/Umbraco.Core/Services/IContentService.cs index b5416e750f..b048046ac0 100644 --- a/src/Umbraco.Core/Services/IContentService.cs +++ b/src/Umbraco.Core/Services/IContentService.cs @@ -137,25 +137,25 @@ namespace Umbraco.Core.Services /// /// Used to bulk update the permissions set for a content item. This will replace all permissions - /// assigned to an entity with a list of user id & permission pairs. + /// assigned to an entity with a list of user group id & permission pairs. /// /// void ReplaceContentPermissions(EntityPermissionSet permissionSet); /// - /// Assigns a single permission to the current content item for the specified user ids + /// Assigns a single permission to the current content item for the specified user group ids /// /// /// - /// - void AssignContentPermission(IContent entity, char permission, IEnumerable userIds); + /// + void AssignContentPermission(IContent entity, char permission, IEnumerable groupIds); /// - /// Gets the list of permissions for the content item + /// Returns implicit/inherited permissions assigned to the content item for all user groups /// /// /// - IEnumerable GetPermissionsForEntity(IContent content); + EntityPermissionCollection GetPermissionsForEntity(IContent content); bool SendToPublication(IContent content, int userId = 0); diff --git a/src/Umbraco.Core/Services/IEntityService.cs b/src/Umbraco.Core/Services/IEntityService.cs index 82e5227cf2..3136a49bf3 100644 --- a/src/Umbraco.Core/Services/IEntityService.cs +++ b/src/Umbraco.Core/Services/IEntityService.cs @@ -175,6 +175,12 @@ namespace Umbraco.Core.Services IEnumerable GetPagedDescendants(int id, UmbracoObjectTypes umbracoObjectType, long pageIndex, int pageSize, out long totalRecords, string orderBy = "path", Direction orderDirection = Direction.Ascending, string filter = ""); + /// + /// Returns a paged collection of descendants + /// + IEnumerable GetPagedDescendants(IEnumerable ids, UmbracoObjectTypes umbracoObjectType, long pageIndex, int pageSize, out long totalRecords, + string orderBy = "path", Direction orderDirection = Direction.Ascending, string filter = ""); + /// /// Returns a paged collection of descendants from the root /// @@ -243,6 +249,16 @@ namespace Umbraco.Core.Services /// An enumerable list of objects IEnumerable GetAll(Guid objectTypeId, params int[] ids); + /// + /// Gets paths for entities. + /// + IEnumerable GetAllPaths(UmbracoObjectTypes umbracoObjectType, params int[] ids); + + /// + /// Gets paths for entities. + /// + IEnumerable GetAllPaths(UmbracoObjectTypes umbracoObjectType, params Guid[] keys); + /// /// Gets the UmbracoObjectType from the integer id of an IUmbracoEntity. /// diff --git a/src/Umbraco.Core/Services/IFileService.cs b/src/Umbraco.Core/Services/IFileService.cs index e8f1065219..74de0861d8 100644 --- a/src/Umbraco.Core/Services/IFileService.cs +++ b/src/Umbraco.Core/Services/IFileService.cs @@ -17,6 +17,10 @@ namespace Umbraco.Core.Services void DeletePartialViewMacroFolder(string folderPath); IPartialView GetPartialView(string path); IPartialView GetPartialViewMacro(string path); + [Obsolete("MacroScripts are obsolete - this is for backwards compatibility with upgraded sites.")] + IPartialView GetMacroScript(string path); + [Obsolete("UserControls are obsolete - this is for backwards compatibility with upgraded sites.")] + IUserControl GetUserControl(string path); IEnumerable GetPartialViewMacros(params string[] names); IXsltFile GetXsltFile(string path); IEnumerable GetXsltFiles(params string[] names); @@ -263,6 +267,27 @@ namespace Umbraco.Core.Services /// The size of the template. long GetTemplateFileSize(string filepath); + /// + /// Gets the content of a macroscript as a stream. + /// + /// The filesystem path to the macroscript. + /// The content of the macroscript. + Stream GetMacroScriptFileContentStream(string filepath); + + /// + /// Sets the content of a macroscript. + /// + /// The filesystem path to the macroscript. + /// The content of the macroscript. + void SetMacroScriptFileContent(string filepath, Stream content); + + /// + /// Gets the size of a macroscript. + /// + /// The filesystem path to the macroscript. + /// The size of the macroscript. + long GetMacroScriptFileSize(string filepath); + /// /// Gets the content of a stylesheet as a stream. /// @@ -305,6 +330,27 @@ namespace Umbraco.Core.Services /// The size of the script file. long GetScriptFileSize(string filepath); + /// + /// Gets the content of a usercontrol as a stream. + /// + /// The filesystem path to the usercontrol. + /// The content of the usercontrol. + Stream GetUserControlFileContentStream(string filepath); + + /// + /// Sets the content of a usercontrol. + /// + /// The filesystem path to the usercontrol. + /// The content of the usercontrol. + void SetUserControlFileContent(string filepath, Stream content); + + /// + /// Gets the size of a usercontrol. + /// + /// The filesystem path to the usercontrol. + /// The size of the usercontrol. + long GetUserControlFileSize(string filepath); + /// /// Gets the content of a XSLT file as a stream. /// diff --git a/src/Umbraco.Core/Services/IMembershipMemberService.cs b/src/Umbraco.Core/Services/IMembershipMemberService.cs index 801f88d9ac..b42e2ed9ef 100644 --- a/src/Umbraco.Core/Services/IMembershipMemberService.cs +++ b/src/Umbraco.Core/Services/IMembershipMemberService.cs @@ -46,14 +46,6 @@ namespace Umbraco.Core.Services /// with number of Members or Users for passed in type int GetCount(MemberCountType countType); - /// - /// Gets the default MemberType alias - /// - /// By default we'll return the 'writer', but we need to check it exists. If it doesn't we'll - /// return the first type that is not an admin, otherwise if there's only one we will return that one. - /// Alias of the default MemberType - string GetDefaultMemberType(); - /// /// Checks if a Member with the username exists /// @@ -72,6 +64,18 @@ namespace Umbraco.Core.Services /// T CreateWithIdentity(string username, string email, string passwordValue, string memberTypeAlias); + /// + /// Creates and persists a new + /// + /// An can be of type or + /// Username of the to create + /// Email of the to create + /// This value should be the encoded/encrypted/hashed value for the password that will be stored in the database + /// Alias of the Type + /// IsApproved of the to create + /// + T CreateWithIdentity(string username, string email, string passwordValue, string memberTypeAlias, bool isApproved); + /// /// Gets an by its provider key /// @@ -121,6 +125,14 @@ namespace Umbraco.Core.Services /// Default is True otherwise set to False to not raise events void Save(IEnumerable entities, bool raiseEvents = true); + /// + /// Gets the default MemberType alias + /// + /// By default we'll return the 'writer', but we need to check it exists. If it doesn't we'll + /// return the first type that is not an admin, otherwise if there's only one we will return that one. + /// Alias of the default MemberType + string GetDefaultMemberType(); + /// /// Finds a list of objects by a partial email string /// diff --git a/src/Umbraco.Core/Services/IMembershipUserService.cs b/src/Umbraco.Core/Services/IMembershipUserService.cs index 182d08f9bd..4143a871bf 100644 --- a/src/Umbraco.Core/Services/IMembershipUserService.cs +++ b/src/Umbraco.Core/Services/IMembershipUserService.cs @@ -1,3 +1,4 @@ +using System.Collections.Generic; using Umbraco.Core.Models.Membership; namespace Umbraco.Core.Services @@ -18,8 +19,7 @@ namespace Umbraco.Core.Services /// Id of the user once its been created. /// Username of the User to create /// Email of the User to create - /// which the User should be based on /// - IUser CreateUserWithIdentity(string username, string email, IUserType userType); + IUser CreateUserWithIdentity(string username, string email); } } \ No newline at end of file diff --git a/src/Umbraco.Core/Services/ISectionService.cs b/src/Umbraco.Core/Services/ISectionService.cs index df5c89d4bf..d726179224 100644 --- a/src/Umbraco.Core/Services/ISectionService.cs +++ b/src/Umbraco.Core/Services/ISectionService.cs @@ -22,7 +22,7 @@ namespace Umbraco.Core.Services IEnumerable
GetSections(); /// - /// Get the user's allowed sections + /// Get the user group's allowed sections /// /// /// diff --git a/src/Umbraco.Core/Services/IUserService.cs b/src/Umbraco.Core/Services/IUserService.cs index 7353f44cb8..4cf20afa5f 100644 --- a/src/Umbraco.Core/Services/IUserService.cs +++ b/src/Umbraco.Core/Services/IUserService.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using System.Linq; using Umbraco.Core.Models.Membership; +using Umbraco.Core.Persistence.DatabaseModelDefinitions; namespace Umbraco.Core.Services { @@ -9,6 +10,29 @@ namespace Umbraco.Core.Services ///
public interface IUserService : IMembershipUserService { + /// + /// This is basically facets of UserStates key = state, value = count + /// + IDictionary GetUserStates(); + + /// + /// Get paged users + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + IEnumerable GetAll(long pageIndex, int pageSize, out long totalRecords, + string orderBy, Direction orderDirection, + UserState[] userState = null, + string[] userGroups = null, + string filter = ""); + /// /// This is simply a helper method which essentially just wraps the MembershipProvider's ChangePassword method /// @@ -45,95 +69,143 @@ namespace Umbraco.Core.Services ///
/// Id of the user to retrieve /// - IUser GetUserById(int id); - + IUser GetUserById(int id); + /// - /// Removes a specific section from all users + /// Gets a users by Id + /// + /// Ids of the users to retrieve + /// + IEnumerable GetUsersById(params int[] ids); + + /// + /// Removes a specific section from all user groups /// /// This is useful when an entire section is removed from config /// Alias of the section to remove - void DeleteSectionFromAllUsers(string sectionAlias); - + void DeleteSectionFromAllUserGroups(string sectionAlias); + /// - /// Add a specific section to all users or those specified as parameters - /// - /// This is useful when a new section is created to allow specific users accessing it - /// Alias of the section to add - /// Specifiying nothing will add the section to all user - void AddSectionToAllUsers(string sectionAlias, params int[] userIds); - - /// - /// Get permissions set for a user and optional node ids + /// Get explicitly assigned permissions for a user and optional node ids /// /// If no permissions are found for a particular entity then the user's default permissions will be applied /// User to retrieve permissions for - /// Specifiying nothing will return all user permissions for all nodes + /// Specifiying nothing will return all user permissions for all nodes that have explicit permissions defined /// An enumerable list of - IEnumerable GetPermissions(IUser user, params int[] nodeIds); + /// + /// This will return the default permissions for the user's groups for node ids that don't have explicitly defined permissions + /// + EntityPermissionCollection GetPermissions(IUser user, params int[] nodeIds); /// - /// Replaces the same permission set for a single user to any number of entities + /// Get explicitly assigned permissions for groups and optional node Ids + /// + /// + /// + /// Flag indicating if we want to include the default group permissions for each result if there are not explicit permissions set + /// + /// Specifiying nothing will return all permissions for all nodes + /// An enumerable list of + EntityPermissionCollection GetPermissions(IUserGroup[] groups, bool fallbackToDefaultPermissions, params int[] nodeIds); + + /// + /// Gets the implicit/inherited permissions for the user for the given path + /// + /// User to check permissions for + /// Path to check permissions for + EntityPermissionSet GetPermissionsForPath(IUser user, string path); + + /// + /// Gets the permissions for the provided groups and path + /// + /// + /// Path to check permissions for + /// + /// Flag indicating if we want to include the default group permissions for each result if there are not explicit permissions set + /// + EntityPermissionSet GetPermissionsForPath(IUserGroup[] groups, string path, bool fallbackToDefaultPermissions = false); + + /// + /// Replaces the same permission set for a single group to any number of entities /// - /// Id of the user + /// Id of the group /// /// Permissions as enumerable list of , - /// if no permissions are specified then all permissions for this node are removed for this user + /// if no permissions are specified then all permissions for this node are removed for this group /// /// Specify the nodes to replace permissions for. If nothing is specified all permissions are removed. - /// If no 'entityIds' are specified all permissions will be removed for the specified user. - void ReplaceUserPermissions(int userId, IEnumerable permissions, params int[] entityIds); + /// If no 'entityIds' are specified all permissions will be removed for the specified group. + void ReplaceUserGroupPermissions(int groupId, IEnumerable permissions, params int[] entityIds); /// - /// Assigns the same permission set for a single user to any number of entities + /// Assigns the same permission set for a single user group to any number of entities /// - /// Id of the user + /// Id of the group /// /// Specify the nodes to replace permissions for - void AssignUserPermission(int userId, char permission, params int[] entityIds); - - #region User types + void AssignUserGroupPermission(int groupId, char permission, params int[] entityIds); /// - /// Gets all UserTypes or thosed specified as parameters + /// Gets a list of objects associated with a given group /// - /// Optional Ids of UserTypes to retrieve - /// An enumerable list of - IEnumerable GetAllUserTypes(params int[] ids); + /// Id of group + /// + IEnumerable GetAllInGroup(int groupId); + + /// + /// Gets a list of objects not associated with a given group + /// + /// Id of group + /// + IEnumerable GetAllNotInGroup(int groupId); + + #region User groups + + /// + /// Gets all UserGroups or those specified as parameters + /// + /// Optional Ids of UserGroups to retrieve + /// An enumerable list of + IEnumerable GetAllUserGroups(params int[] ids); /// - /// Gets a UserType by its Alias + /// Gets a UserGroup by its Alias /// - /// Alias of the UserType to retrieve - /// - IUserType GetUserTypeByAlias(string alias); + /// Alias of the UserGroup to retrieve + /// + IEnumerable GetUserGroupsByAlias(params string[] alias); /// - /// Gets a UserType by its Id + /// Gets a UserGroup by its Alias /// - /// Id of the UserType to retrieve - /// - IUserType GetUserTypeById(int id); + /// Name of the UserGroup to retrieve + /// + IUserGroup GetUserGroupByAlias(string name); /// - /// Gets a UserType by its Name + /// Gets a UserGroup by its Id /// - /// Name of the UserType to retrieve - /// - IUserType GetUserTypeByName(string name); - + /// Id of the UserGroup to retrieve + /// + IUserGroup GetUserGroupById(int id); + /// - /// Saves a UserType + /// Saves a UserGroup /// - /// UserType to save + /// UserGroup to save + /// + /// If null than no changes are made to the users who are assigned to this group, however if a value is passed in + /// than all users will be removed from this group and only these users will be added + /// /// Optional parameter to raise events. /// Default is True otherwise set to False to not raise events - void SaveUserType(IUserType userType, bool raiseEvents = true); + void Save(IUserGroup userGroup, int[] userIds = null, bool raiseEvents = true); /// - /// Deletes a UserType + /// Deletes a UserGroup /// - /// UserType to delete - void DeleteUserType(IUserType userType); + /// UserGroup to delete + void DeleteUserGroup(IUserGroup userGroup); #endregion } diff --git a/src/Umbraco.Core/Services/MemberService.cs b/src/Umbraco.Core/Services/MemberService.cs index ca1f27129c..26e74f66cc 100644 --- a/src/Umbraco.Core/Services/MemberService.cs +++ b/src/Umbraco.Core/Services/MemberService.cs @@ -826,6 +826,22 @@ namespace Umbraco.Core.Services return CreateMemberWithIdentity(username, email, username, passwordValue, memberType); } + /// + /// Creates and persists a new + /// + /// An can be of type or + /// Username of the to create + /// Email of the to create + /// This value should be the encoded/encrypted/hashed value for the password that will be stored in the database + /// Alias of the Type + /// Is the member approved + /// + IMember IMembershipMemberService.CreateWithIdentity(string username, string email, string passwordValue, string memberTypeAlias, bool isApproved) + { + var memberType = FindMemberTypeByAlias(memberTypeAlias); + return CreateMemberWithIdentity(username, email, username, passwordValue, memberType, isApproved); + } + /// /// Creates and persists a Member /// @@ -836,12 +852,13 @@ namespace Umbraco.Core.Services /// Name of the Member to create /// This value should be the encoded/encrypted/hashed value for the password that will be stored in the database /// MemberType the Member should be based on + /// Optional IsApproved of the Member to create /// - private IMember CreateMemberWithIdentity(string username, string email, string name, string passwordValue, IMemberType memberType) + private IMember CreateMemberWithIdentity(string username, string email, string name, string passwordValue, IMemberType memberType, bool isApproved = true) { if (memberType == null) throw new ArgumentNullException("memberType"); - var member = new Member(name, email.ToLower().Trim(), username, passwordValue, memberType); + var member = new Member(name, email.ToLower().Trim(), username, passwordValue, memberType, isApproved); using (var uow = UowProvider.GetUnitOfWork()) { diff --git a/src/Umbraco.Core/Services/SectionService.cs b/src/Umbraco.Core/Services/SectionService.cs index 9cf540374e..b99181376c 100644 --- a/src/Umbraco.Core/Services/SectionService.cs +++ b/src/Umbraco.Core/Services/SectionService.cs @@ -182,7 +182,6 @@ namespace Umbraco.Core.Services /// public IEnumerable
GetAllowedSections(int userId) { - var user = _userService.GetUserById(userId); if (user == null) { @@ -210,7 +209,9 @@ namespace Umbraco.Core.Services /// The application icon, which has to be located in umbraco/images/tray folder. public void MakeNew(string name, string alias, string icon) { - MakeNew(name, alias, icon, GetSections().Max(x => x.SortOrder) + 1); + var sections = GetSections(); + var nextSortOrder = sections.Any() ? sections.Max(x => x.SortOrder) + 1 : 1; + MakeNew(name, alias, icon, nextSortOrder); } /// @@ -250,7 +251,7 @@ namespace Umbraco.Core.Services using (var uow = _uowProvider.GetUnitOfWork()) { uow.Database.Execute( - "delete from umbracoUser2App where app = @appAlias", + "delete from umbracoUserGroup2App where app = @appAlias", new { appAlias = section.Alias }); uow.Commit(); } diff --git a/src/Umbraco.Core/Services/UserService.cs b/src/Umbraco.Core/Services/UserService.cs index dd9892e47c..d642da795d 100644 --- a/src/Umbraco.Core/Services/UserService.cs +++ b/src/Umbraco.Core/Services/UserService.cs @@ -1,12 +1,19 @@ using System; using System.Collections.Generic; +using System.ComponentModel; using System.Data.Common; +using System.Data.SqlClient; +using System.Data.SqlServerCe; +using System.Globalization; using System.Linq; +using System.Linq.Expressions; using Umbraco.Core.Configuration; using Umbraco.Core.Events; using Umbraco.Core.Logging; +using Umbraco.Core.Models; using Umbraco.Core.Models.Membership; using Umbraco.Core.Persistence; +using Umbraco.Core.Persistence.DatabaseModelDefinitions; using Umbraco.Core.Persistence.Querying; using Umbraco.Core.Persistence.Repositories; using Umbraco.Core.Persistence.UnitOfWork; @@ -19,7 +26,6 @@ namespace Umbraco.Core.Services /// public class UserService : ScopeRepositoryService, IUserService { - //TODO: We need to change the isUpgrading flag to use an app state enum as described here: http://issues.umbraco.org/issue/U4-6816 // in the meantime, we will use a boolean which we are currently using during upgrades to ensure that a user object is not persisted during this phase, otherwise // exceptions can occur if the db is not in it's correct state. @@ -33,40 +39,6 @@ namespace Umbraco.Core.Services #region Implementation of IMembershipUserService - /// - /// Gets the default MemberType alias - /// - /// By default we'll return the 'writer', but we need to check it exists. If it doesn't we'll - /// return the first type that is not an admin, otherwise if there's only one we will return that one. - /// Alias of the default MemberType - public string GetDefaultMemberType() - { - using (var uow = UowProvider.GetUnitOfWork(readOnly: true)) - { - var repository = RepositoryFactory.CreateUserTypeRepository(uow); - - var types = repository.GetAll().Select(x => x.Alias).ToArray(); - - if (types.Any() == false) - { - throw new EntityNotFoundException("No member types could be resolved"); - } - - if (types.InvariantContains("writer")) - { - return types.First(x => x.InvariantEquals("writer")); - } - - //first that is not admin - if (types.Length == 1) - { - return types.First(); - } - //first that is not admin - return types.First(x => x.InvariantEquals("admin") == false); - } - } - /// /// Checks if a User with the username exists /// @@ -87,11 +59,23 @@ namespace Umbraco.Core.Services /// The user will be saved in the database and returned with an Id /// Username of the user to create /// Email of the user to create - /// which the User should be based on /// - public IUser CreateUserWithIdentity(string username, string email, IUserType userType) + public IUser CreateUserWithIdentity(string username, string email) { - return CreateUserWithIdentity(username, email, "", userType); + return CreateUserWithIdentity(username, email, string.Empty); + } + + /// + /// Creates and persists a new + /// + /// Username of the to create + /// Email of the to create + /// This value should be the encoded/encrypted/hashed value for the password that will be stored in the database + /// Not used for users + /// + IUser IMembershipMemberService.CreateWithIdentity(string username, string email, string passwordValue, string memberTypeAlias) + { + return CreateUserWithIdentity(username, email, passwordValue); } /// @@ -101,16 +85,11 @@ namespace Umbraco.Core.Services /// Email of the to create /// This value should be the encoded/encrypted/hashed value for the password that will be stored in the database /// Alias of the Type + /// Is the member approved /// - IUser IMembershipMemberService.CreateWithIdentity(string username, string email, string passwordValue, string memberTypeAlias) + IUser IMembershipMemberService.CreateWithIdentity(string username, string email, string passwordValue, string memberTypeAlias, bool isApproved) { - var userType = GetUserTypeByAlias(memberTypeAlias); - if (userType == null) - { - throw new EntityNotFoundException("The user type " + memberTypeAlias + " could not be resolved"); - } - - return CreateUserWithIdentity(username, email, passwordValue, userType); + return CreateUserWithIdentity(username, email, passwordValue, isApproved); } /// @@ -121,12 +100,10 @@ namespace Umbraco.Core.Services /// Username of the Member to create /// Email of the Member to create /// This value should be the encoded/encrypted/hashed value for the password that will be stored in the database - /// MemberType the Member should be based on + /// Is the user approved /// - private IUser CreateUserWithIdentity(string username, string email, string passwordValue, IUserType userType) + private IUser CreateUserWithIdentity(string username, string email, string passwordValue, bool isApproved = true) { - if (userType == null) throw new ArgumentNullException("userType"); - if (string.IsNullOrWhiteSpace(username)) { throw new ArgumentException("Cannot create user with empty username."); @@ -141,22 +118,17 @@ namespace Umbraco.Core.Services if (loginExists) throw new ArgumentException("Login already exists"); - var user = new User(userType) + var user = new User { DefaultToLiveEditing = false, Email = email, Language = GlobalSettings.DefaultUILanguage, Name = username, RawPasswordValue = passwordValue, - Username = username, - StartContentId = -1, - StartMediaId = -1, + Username = username, IsLockedOut = false, - IsApproved = true + IsApproved = isApproved }; - //adding default sections content and media - user.AddAllowedSection("content"); - user.AddAllowedSection("media"); if (uow.Events.DispatchCancelable(SavingUser, this, new SaveEventArgs(user))) { @@ -183,7 +155,8 @@ namespace Umbraco.Core.Services using (var uow = UowProvider.GetUnitOfWork(readOnly: true)) { var repository = RepositoryFactory.CreateUserRepository(uow); - return repository.Get(id); + var result = repository.Get(id); + return result; } } @@ -228,8 +201,28 @@ namespace Umbraco.Core.Services using (var uow = UowProvider.GetUnitOfWork(readOnly: true)) { var repository = RepositoryFactory.CreateUserRepository(uow); - var query = Query.Builder.Where(x => x.Username.Equals(username)); - return repository.GetByQuery(query).FirstOrDefault(); + + try + { + return repository.GetByUsername(username, includeSecurityData: true); + } + catch (Exception ex) + { + if (ex is SqlException || ex is SqlCeException) + { + //we need to handle this one specific case which is when we are upgrading to 7.7 since the user group + //tables don't exist yet. This is the 'easiest' way to deal with this without having to create special + //version checks in the BackOfficeSignInManager and calling into other special overloads that we'd need + //like "GetUserById(int id, bool includeSecurityData)" which may cause confusion because the result of + //that method would not be cached. + if (ApplicationContext.Current.IsUpgrading) + { + //NOTE: this will not be cached + return repository.GetByUsername(username, includeSecurityData: false); + } + } + throw; + } } } @@ -240,23 +233,13 @@ namespace Umbraco.Core.Services public void Delete(IUser membershipUser) { //disable - membershipUser.IsApproved = false; - //can't rename if it's going to take up too many chars - if (membershipUser.Username.Length + 9 <= 125) - { - membershipUser.Username = DateTime.Now.ToString("yyyyMMdd") + "_" + membershipUser.Username; - } + membershipUser.IsApproved = false; + Save(membershipUser); - } - - /// - /// This is simply a helper method which essentially just wraps the MembershipProvider's ChangePassword method - /// - /// - /// This method exists so that Umbraco developers can use one entry point to create/update users if they choose to. - /// - /// The user to save the password for - /// The password to save + } + + [Obsolete("ASP.NET Identity APIs like the BackOfficeUserManager should be used to manage passwords, this will not work with correct security practices because you would need the existing password")] + [EditorBrowsable(EditorBrowsableState.Never)] public void SavePassword(IUser user, string password) { if (user == null) throw new ArgumentNullException("user"); @@ -335,6 +318,18 @@ namespace Umbraco.Core.Services var repository = RepositoryFactory.CreateUserRepository(uow); repository.AddOrUpdate(entity); + + //Now we have to check for backwards compat hacks + var explicitUser = entity as User; + if (explicitUser != null && explicitUser.GroupsToSave.Count > 0) + { + var groupRepository = RepositoryFactory.CreateUserGroupRepository(uow); + foreach (var userGroup in explicitUser.GroupsToSave) + { + groupRepository.AddOrUpdate(userGroup); + } + } + try { // try to flush the unit of work @@ -380,17 +375,28 @@ namespace Umbraco.Core.Services } } var repository = RepositoryFactory.CreateUserRepository(uow); - foreach (var member in asArray) + var groupRepository = RepositoryFactory.CreateUserGroupRepository(uow); + foreach (var user in asArray) { - if (string.IsNullOrWhiteSpace(member.Username)) + if (string.IsNullOrWhiteSpace(user.Username)) { throw new ArgumentException("Cannot save user with empty username."); } - if (string.IsNullOrWhiteSpace(member.Name)) + if (string.IsNullOrWhiteSpace(user.Name)) { throw new ArgumentException("Cannot save user with empty name."); } - repository.AddOrUpdate(member); + repository.AddOrUpdate(user); + + //Now we have to check for backwards compat hacks + var explicitUser = user as User; + if (explicitUser != null && explicitUser.GroupsToSave.Count > 0) + { + foreach (var userGroup in explicitUser.GroupsToSave) + { + groupRepository.AddOrUpdate(userGroup); + } + } } //commit the whole lot in one go uow.Commit(); @@ -398,8 +404,15 @@ namespace Umbraco.Core.Services if (raiseEvents) uow.Events.Dispatch(SavedUser, this, new SaveEventArgs(asArray, false)); } + } - + /// + /// This is just the default user group that the membership provider will use + /// + /// + public string GetDefaultMemberType() + { + return "writer"; } /// @@ -533,6 +546,67 @@ namespace Umbraco.Core.Services } } + public IDictionary GetUserStates() + { + using (var uow = UowProvider.GetUnitOfWork(readOnly: true)) + { + var repository = RepositoryFactory.CreateUserRepository(uow); + return repository.GetUserStates(); + } + } + + public IEnumerable GetAll(long pageIndex, int pageSize, out long totalRecords, string orderBy, Direction orderDirection, UserState[] userState = null, string[] userGroups = null, string filter = "") + { + using (var uow = UowProvider.GetUnitOfWork(readOnly: true)) + { + Expression> sort; + switch (orderBy.ToUpperInvariant()) + { + case "USERNAME": + sort = member => member.Username; + break; + case "LANGUAGE": + sort = member => member.Language; + break; + case "NAME": + sort = member => member.Name; + break; + case "EMAIL": + sort = member => member.Email; + break; + case "ID": + sort = member => member.Id; + break; + case "CREATEDATE": + sort = member => member.CreateDate; + break; + case "UPDATEDATE": + sort = member => member.UpdateDate; + break; + case "ISAPPROVED": + sort = member => member.IsApproved; + break; + case "ISLOCKEDOUT": + sort = member => member.IsLockedOut; + break; + case "LASTLOGINDATE": + sort = member => member.LastLoginDate; + break; + default: + throw new IndexOutOfRangeException("The orderBy parameter " + orderBy + " is not valid"); + } + + IQuery filterQuery = null; + if (filter.IsNullOrWhiteSpace() == false) + { + filterQuery = Query.Builder.Where(x => x.Name.Contains(filter) || x.Username.Contains(filter)); + } + + var repository = RepositoryFactory.CreateUserRepository(uow); + return repository.GetPagedResultsByQuery(null, pageIndex, pageSize, out totalRecords, sort, orderDirection, userGroups, userState, filterQuery); + } + } + /// /// Gets a list of paged objects /// @@ -558,10 +632,38 @@ namespace Umbraco.Core.Services } } + /// + /// Gets a list of objects associated with a given group + /// + /// Id of group + /// + public IEnumerable GetAllInGroup(int groupId) + { + var uow = UowProvider.GetUnitOfWork(); + using (var repository = RepositoryFactory.CreateUserRepository(uow)) + { + return repository.GetAllInGroup(groupId); + } + } + + /// + /// Gets a list of objects not associated with a given group + /// + /// Id of group + /// + public IEnumerable GetAllNotInGroup(int groupId) + { + var uow = UowProvider.GetUnitOfWork(); + using (var repository = RepositoryFactory.CreateUserRepository(uow)) + { + return repository.GetAllNotInGroup(groupId); + } + } + #endregion - + #region Implementation of IUserService - + /// /// Gets an IProfile by User Id. /// @@ -569,8 +671,11 @@ namespace Umbraco.Core.Services /// public IProfile GetProfileById(int id) { - var user = GetUserById(id); - return user.ProfileData; + using (var uow = UowProvider.GetUnitOfWork(readOnly: true)) + { + var repository = RepositoryFactory.CreateUserRepository(uow); + return repository.GetProfile(id); + } } /// @@ -580,8 +685,11 @@ namespace Umbraco.Core.Services /// public IProfile GetProfileByUserName(string username) { - var user = GetByUsername(username); - return user.ProfileData; + using (var uow = UowProvider.GetUnitOfWork(readOnly: true)) + { + var repository = RepositoryFactory.CreateUserRepository(uow); + return repository.GetProfile(username); + } } /// @@ -594,142 +702,203 @@ namespace Umbraco.Core.Services using (var uow = UowProvider.GetUnitOfWork(readOnly: true)) { var repository = RepositoryFactory.CreateUserRepository(uow); - return repository.Get(id); + try + { + var result = repository.Get(id); + return result; + } + catch (Exception ex) + { + if (ex is SqlException || ex is SqlCeException) + { + //we need to handle this one specific case which is when we are upgrading to 7.7 since the user group + //tables don't exist yet. This is the 'easiest' way to deal with this without having to create special + //version checks in the BackOfficeSignInManager and calling into other special overloads that we'd need + //like "GetUserById(int id, bool includeSecurityData)" which may cause confusion because the result of + //that method would not be cached. + if (ApplicationContext.Current.IsUpgrading) + { + //NOTE: this will not be cached + return repository.Get(id, includeSecurityData: false); + } + } + throw; + } } - } + } - /// - /// Replaces the same permission set for a single user to any number of entities - /// - /// If no 'entityIds' are specified all permissions will be removed for the specified user. - /// Id of the user - /// Permissions as enumerable list of - /// Specify the nodes to replace permissions for. If nothing is specified all permissions are removed. - public void ReplaceUserPermissions(int userId, IEnumerable permissions, params int[] entityIds) + public IEnumerable GetUsersById(params int[] ids) { - using (var uow = UowProvider.GetUnitOfWork()) - { - var repository = RepositoryFactory.CreateUserRepository(uow); - repository.ReplaceUserPermissions(userId, permissions, entityIds); - uow.Commit(); - } - } + if (ids.Length <= 0) return Enumerable.Empty(); - /// - /// Assigns the same permission set for a single user to any number of entities - /// - /// Id of the user - /// - /// Specify the nodes to replace permissions for - public void AssignUserPermission(int userId, char permission, params int[] entityIds) - { - using (var uow = UowProvider.GetUnitOfWork()) - { - var repository = RepositoryFactory.CreateUserRepository(uow); - repository.AssignUserPermission(userId, permission, entityIds); - uow.Commit(); - } - } - - /// - /// Gets all UserTypes or thosed specified as parameters - /// - /// Optional Ids of UserTypes to retrieve - /// An enumerable list of - public IEnumerable GetAllUserTypes(params int[] ids) - { using (var uow = UowProvider.GetUnitOfWork(readOnly: true)) { - var repository = RepositoryFactory.CreateUserTypeRepository(uow); + var repository = RepositoryFactory.CreateUserRepository(uow); return repository.GetAll(ids); } } /// - /// Gets a UserType by its Alias + /// Replaces the same permission set for a single group to any number of entities /// - /// Alias of the UserType to retrieve - /// - public IUserType GetUserTypeByAlias(string alias) + /// If no 'entityIds' are specified all permissions will be removed for the specified group. + /// Id of the group + /// Permissions as enumerable list of If nothing is specified all permissions are removed. + /// Specify the nodes to replace permissions for. + public void ReplaceUserGroupPermissions(int groupId, IEnumerable permissions, params int[] entityIds) { - using (var uow = UowProvider.GetUnitOfWork(readOnly: true)) + if (entityIds.Length == 0) + return; + + using (var uow = UowProvider.GetUnitOfWork()) { - var repository = RepositoryFactory.CreateUserTypeRepository(uow); - var query = Query.Builder.Where(x => x.Alias == alias); - return repository.GetByQuery(query).SingleOrDefault(); + var repository = RepositoryFactory.CreateUserGroupRepository(uow); + repository.ReplaceGroupPermissions(groupId, permissions, entityIds); + uow.Commit(); + + uow.Events.Dispatch(UserGroupPermissionsAssigned, this, new SaveEventArgs( + entityIds.Select( + x => new EntityPermission( + groupId, + x, + permissions.Select(p => p.ToString(CultureInfo.InvariantCulture)).ToArray())) + .ToArray(), false)); } } /// - /// Gets a UserType by its Id + /// Assigns the same permission set for a single user group to any number of entities /// - /// Id of the UserType to retrieve - /// - public IUserType GetUserTypeById(int id) + /// Id of the user group + /// + /// Specify the nodes to replace permissions for + public void AssignUserGroupPermission(int groupId, char permission, params int[] entityIds) + { + if (entityIds.Length == 0) + return; + + using (var uow = UowProvider.GetUnitOfWork()) + { + var repository = RepositoryFactory.CreateUserGroupRepository(uow); + repository.AssignGroupPermission(groupId, permission, entityIds); + uow.Commit(); + + uow.Events.Dispatch(UserGroupPermissionsAssigned, this, new SaveEventArgs( + entityIds.Select( + x => new EntityPermission( + groupId, + x, + new[] {permission.ToString(CultureInfo.InvariantCulture)})) + .ToArray(), false)); + } + } + + /// + /// Gets all UserGroups or those specified as parameters + /// + /// Optional Ids of UserGroups to retrieve + /// An enumerable list of + public IEnumerable GetAllUserGroups(params int[] ids) { using (var uow = UowProvider.GetUnitOfWork(readOnly: true)) { - var repository = RepositoryFactory.CreateUserTypeRepository(uow); + var repository = RepositoryFactory.CreateUserGroupRepository(uow); + return repository.GetAll(ids).OrderBy(x => x.Name); + } + } + + public IEnumerable GetUserGroupsByAlias(params string[] aliases) + { + if (aliases.Length == 0) return Enumerable.Empty(); + + using (var uow = UowProvider.GetUnitOfWork(readOnly: true)) + { + var repository = RepositoryFactory.CreateUserGroupRepository(uow); + var query = Query.Builder.Where(x => aliases.SqlIn(x.Alias)); + var contents = repository.GetByQuery(query); + return contents.ToArray(); + } + } + + /// + /// Gets a UserGroup by its Alias + /// + /// Alias of the UserGroup to retrieve + /// + public IUserGroup GetUserGroupByAlias(string alias) + { + if (string.IsNullOrWhiteSpace(alias)) throw new ArgumentException("Value cannot be null or whitespace.", "alias"); + + using (var uow = UowProvider.GetUnitOfWork(readOnly: true)) + { + var repository = RepositoryFactory.CreateUserGroupRepository(uow); + var query = Query.Builder.Where(x => x.Alias == alias); + var contents = repository.GetByQuery(query); + return contents.FirstOrDefault(); + } + } + + /// + /// Gets a UserGroup by its Id + /// + /// Id of the UserGroup to retrieve + /// + public IUserGroup GetUserGroupById(int id) + { + using (var uow = UowProvider.GetUnitOfWork(readOnly: true)) + { + var repository = RepositoryFactory.CreateUserGroupRepository(uow); return repository.Get(id); } } /// - /// Gets a UserType by its Name + /// Saves a UserGroup /// - /// Name of the UserType to retrieve - /// - public IUserType GetUserTypeByName(string name) - { - using (var uow = UowProvider.GetUnitOfWork(readOnly: true)) - { - var repository = RepositoryFactory.CreateUserTypeRepository(uow); - var query = Query.Builder.Where(x => x.Name == name); - return repository.GetByQuery(query).SingleOrDefault(); - } - } - - /// - /// Saves a UserType - /// - /// UserType to save + /// UserGroup to save + /// + /// If null than no changes are made to the users who are assigned to this group, however if a value is passed in + /// than all users will be removed from this group and only these users will be added + /// /// Optional parameter to raise events. /// Default is True otherwise set to False to not raise events - public void SaveUserType(IUserType userType, bool raiseEvents = true) + public void Save(IUserGroup userGroup, int[] userIds = null, bool raiseEvents = true) { using (var uow = UowProvider.GetUnitOfWork()) { - if (raiseEvents && uow.Events.DispatchCancelable(SavingUserType, this, new SaveEventArgs(userType))) + if (raiseEvents && uow.Events.DispatchCancelable(SavingUserGroup, this, new SaveEventArgs(userGroup))) { uow.Commit(); return; } - var repository = RepositoryFactory.CreateUserTypeRepository(uow); - repository.AddOrUpdate(userType); + var repository = RepositoryFactory.CreateUserGroupRepository(uow); + repository.AddOrUpdateGroupWithUsers(userGroup, userIds); + uow.Commit(); + if (raiseEvents) - uow.Events.Dispatch(SavedUserType, this, new SaveEventArgs(userType, false)); + uow.Events.Dispatch(SavedUserGroup, this, new SaveEventArgs(userGroup, false)); } } /// - /// Deletes a UserType + /// Deletes a UserGroup /// - /// UserType to delete - public void DeleteUserType(IUserType userType) + /// UserGroup to delete + public void DeleteUserGroup(IUserGroup userGroup) { using (var uow = UowProvider.GetUnitOfWork()) { - if (uow.Events.DispatchCancelable(DeletingUserType, this, new DeleteEventArgs(userType))) + if (uow.Events.DispatchCancelable(DeletingUserGroup, this, new DeleteEventArgs(userGroup))) { uow.Commit(); return; } - var repository = RepositoryFactory.CreateUserTypeRepository(uow); - repository.Delete(userType); + var repository = RepositoryFactory.CreateUserGroupRepository(uow); + repository.Delete(userGroup); uow.Commit(); - uow.Events.Dispatch(DeletedUserType, this, new DeleteEventArgs(userType, false)); + uow.Events.Dispatch(DeletedUserGroup, this, new DeleteEventArgs(userGroup, false)); } } @@ -738,78 +907,278 @@ namespace Umbraco.Core.Services /// /// This is useful when an entire section is removed from config /// Alias of the section to remove - public void DeleteSectionFromAllUsers(string sectionAlias) + public void DeleteSectionFromAllUserGroups(string sectionAlias) { using (var uow = UowProvider.GetUnitOfWork()) { - var repository = RepositoryFactory.CreateUserRepository(uow); - var assignedUsers = repository.GetUsersAssignedToSection(sectionAlias); - foreach (var user in assignedUsers) + var repository = RepositoryFactory.CreateUserGroupRepository(uow); + var assignedGroups = repository.GetGroupsAssignedToSection(sectionAlias); + foreach (var group in assignedGroups) { //now remove the section for each user and commit - user.RemoveAllowedSection(sectionAlias); - repository.AddOrUpdate(user); + group.RemoveAllowedSection(sectionAlias); + repository.AddOrUpdate(group); } + uow.Commit(); //TODO: Events? } - } - + } + /// - /// Add a specific section to all users or those specified as parameters + /// Get explicitly assigned permissions for a user and optional node ids /// - /// This is useful when a new section is created to allow specific users accessing it - /// Alias of the section to add - /// Specifiying nothing will add the section to all user - public void AddSectionToAllUsers(string sectionAlias, params int[] userIds) - { - using (var uow = UowProvider.GetUnitOfWork()) - { - var repository = RepositoryFactory.CreateUserRepository(uow); - IEnumerable users; - if (userIds.Any()) - { - users = repository.GetAll(userIds); - } - else - { - users = repository.GetAll(); - } - foreach (var user in users.Where(u => u.AllowedSections.InvariantContains(sectionAlias) == false)) - { - //now add the section for each user and commit - user.AddAllowedSection(sectionAlias); - repository.AddOrUpdate(user); - } - uow.Commit(); - //TODO: Events? - } - } - - /// - /// Get permissions set for a user and optional node ids - /// - /// If no permissions are found for a particular entity then the user's default permissions will be applied /// User to retrieve permissions for - /// Specifiying nothing will return all user permissions for all nodes + /// Specifiying nothing will return all permissions for all nodes /// An enumerable list of - public IEnumerable GetPermissions(IUser user, params int[] nodeIds) + public EntityPermissionCollection GetPermissions(IUser user, params int[] nodeIds) { using (var uow = UowProvider.GetUnitOfWork(readOnly: true)) { - var repository = RepositoryFactory.CreateUserRepository(uow); - var explicitPermissions = repository.GetUserPermissionsForEntities(user.Id, nodeIds); + var repository = RepositoryFactory.CreateUserGroupRepository(uow); - //if no permissions are assigned to a particular node then we will fill in those permissions with the user's defaults - var result = new List(explicitPermissions); - var missingIds = nodeIds.Except(result.Select(x => x.EntityId)); - foreach (var id in missingIds) + return repository.GetPermissions(user.Groups.ToArray(), true, nodeIds); + } + } + + /// + /// Get explicitly assigned permissions for a group and optional node Ids + /// + /// Groups to retrieve permissions for + /// + /// Flag indicating if we want to include the default group permissions for each result if there are not explicit permissions set + /// + /// Specifiying nothing will return all permissions for all nodes + /// An enumerable list of + private IEnumerable GetPermissions(IReadOnlyUserGroup[] groups, bool fallbackToDefaultPermissions, params int[] nodeIds) + { + if (groups == null) throw new ArgumentNullException("group"); + + using (var uow = UowProvider.GetUnitOfWork(readOnly: true)) + { + var repository = RepositoryFactory.CreateUserGroupRepository(uow); + return repository.GetPermissions(groups, fallbackToDefaultPermissions, nodeIds); + } + } + + /// + /// Get explicitly assigned permissions for a group and optional node Ids + /// + /// + /// + /// Flag indicating if we want to include the default group permissions for each result if there are not explicit permissions set + /// + /// Specifiying nothing will return all permissions for all nodes + /// An enumerable list of + public EntityPermissionCollection GetPermissions(IUserGroup[] groups, bool fallbackToDefaultPermissions, params int[] nodeIds) + { + if (groups == null) throw new ArgumentNullException("groups"); + using (var uow = UowProvider.GetUnitOfWork(readOnly: true)) + { + var repository = RepositoryFactory.CreateUserGroupRepository(uow); + return repository.GetPermissions(groups.Select(x => x.ToReadOnlyGroup()).ToArray(), fallbackToDefaultPermissions, nodeIds); + } + } + + /// + /// Gets the implicit/inherited permissions for the user for the given path + /// + /// User to check permissions for + /// Path to check permissions for + public EntityPermissionSet GetPermissionsForPath(IUser user, string path) + { + var nodeIds = path.GetIdsFromPathReversed(); + + if (nodeIds.Length == 0) + return EntityPermissionSet.Empty(); + + //collect all permissions structures for all nodes for all groups belonging to the user + var groupPermissions = GetPermissionsForPath(user.Groups.ToArray(), nodeIds, fallbackToDefaultPermissions: true).ToArray(); + + return CalculatePermissionsForPathForUser(groupPermissions, nodeIds); + } + + /// + /// Gets the permissions for the provided group and path + /// + /// + /// Path to check permissions for + /// + /// Flag indicating if we want to include the default group permissions for each result if there are not explicit permissions set + /// + /// String indicating permissions for provided user and path + public EntityPermissionSet GetPermissionsForPath(IUserGroup[] groups, string path, bool fallbackToDefaultPermissions = false) + { + var nodeIds = path.GetIdsFromPathReversed(); + + if (nodeIds.Length == 0) + return EntityPermissionSet.Empty(); + + //collect all permissions structures for all nodes for all groups + var groupPermissions = GetPermissionsForPath(groups.Select(x => x.ToReadOnlyGroup()).ToArray(), nodeIds, fallbackToDefaultPermissions: true).ToArray(); + + return CalculatePermissionsForPathForUser(groupPermissions, nodeIds); + } + + private EntityPermissionCollection GetPermissionsForPath(IReadOnlyUserGroup[] groups, int[] pathIds, bool fallbackToDefaultPermissions = false) + { + if (pathIds.Length == 0) + return new EntityPermissionCollection(Enumerable.Empty()); + + //get permissions for all nodes in the path by group + var permissions = GetPermissions(groups, fallbackToDefaultPermissions, pathIds) + .GroupBy(x => x.UserGroupId); + + return new EntityPermissionCollection( + permissions.Select(x => GetPermissionsForPathForGroup(x, pathIds, fallbackToDefaultPermissions))); + } + + /// + /// This performs the calculations for inherited nodes based on this http://issues.umbraco.org/issue/U4-10075#comment=67-40085 + /// + /// + /// + /// + internal static EntityPermissionSet CalculatePermissionsForPathForUser( + EntityPermission[] groupPermissions, + int[] pathIds) + { + // not sure this will ever happen, it shouldn't since this should return defaults, but maybe those are empty? + if (groupPermissions.Length == 0 || pathIds.Length == 0) + return EntityPermissionSet.Empty(); + + //The actual entity id being looked at (deepest part of the path) + var entityId = pathIds[0]; + + var resultPermissions = new EntityPermissionCollection(); + + //create a grouped by dictionary of another grouped by dictionary + var permissionsByGroup = groupPermissions + .GroupBy(x => x.UserGroupId) + .ToDictionary( + x => x.Key, + x => x.GroupBy(a => a.EntityId).ToDictionary(a => a.Key, a => a.ToArray())); + + //iterate through each group + foreach (var byGroup in permissionsByGroup) + { + var added = false; + + //iterate deepest to shallowest + foreach (var pathId in pathIds) { - result.Add(new EntityPermission(user.Id, id, user.DefaultPermissions.ToArray())); + EntityPermission[] permissionsForNodeAndGroup; + if (byGroup.Value.TryGetValue(pathId, out permissionsForNodeAndGroup) == false) + continue; + + //In theory there will only be one EntityPermission in this group + // but there's nothing stopping the logic of this method + // from having more so we deal with it here + foreach (var entityPermission in permissionsForNodeAndGroup) + { + if (entityPermission.IsDefaultPermissions == false) + { + //explicit permision found so we'll append it and move on, the collection is a hashset anyways + //so only supports adding one element per groupid/contentid + resultPermissions.Add(entityPermission); + added = true; + break; + } + } + + //if the permission has been added for this group and this branch then we can exit this loop + if (added) + break; } - return result; + if (added == false && byGroup.Value.Count > 0) + { + //if there was no explicit permissions assigned in this branch for this group, then we will + //add the group's default permissions + resultPermissions.Add(byGroup.Value[entityId][0]); + } + + } + + var permissionSet = new EntityPermissionSet(entityId, resultPermissions); + return permissionSet; + } + + /// + /// Returns the resulting permission set for a group for the path based on all permissions provided for the branch + /// + /// + /// The collective set of permissions provided to calculate the resulting permissions set for the path + /// based on a single group + /// + /// Must be ordered deepest to shallowest (right to left) + /// + /// Flag indicating if we want to include the default group permissions for each result if there are not explicit permissions set + /// + /// + internal static EntityPermission GetPermissionsForPathForGroup( + IEnumerable pathPermissions, + int[] pathIds, + bool fallbackToDefaultPermissions = false) + { + //get permissions for all nodes in the path + var permissionsByEntityId = pathPermissions.ToDictionary(x => x.EntityId, x => x); + + //then the permissions assigned to the path will be the 'deepest' node found that has permissions + foreach (var id in pathIds) + { + EntityPermission permission; + if (permissionsByEntityId.TryGetValue(id, out permission)) + { + //don't return the default permissions if that is the one assigned here (we'll do that below if nothing was found) + if (permission.IsDefaultPermissions == false) + return permission; + } } + + //if we've made it here it means that no implicit/inherited permissions were found so we return the defaults if that is specified + if (fallbackToDefaultPermissions == false) + return null; + + return permissionsByEntityId[pathIds[0]]; + } + + /// + /// Checks in a set of permissions associated with a user for those related to a given nodeId + /// + /// The set of permissions + /// The node Id + /// The permissions to return + /// True if permissions for the given path are found + public static bool TryGetAssignedPermissionsForNode(IList permissions, + int nodeId, + out string assignedPermissions) + { + if (permissions.Any(x => x.EntityId == nodeId)) + { + var found = permissions.First(x => x.EntityId == nodeId); + var assignedPermissionsArray = found.AssignedPermissions.ToList(); + + // Working with permissions assigned directly to a user AND to their groups, so maybe several per node + // and we need to get the most permissive set + foreach (var permission in permissions.Where(x => x.EntityId == nodeId).Skip(1)) + { + AddAdditionalPermissions(assignedPermissionsArray, permission.AssignedPermissions); + } + + assignedPermissions = string.Join("", assignedPermissionsArray); + return true; + } + + assignedPermissions = string.Empty; + return false; + } + + private static void AddAdditionalPermissions(List assignedPermissions, string[] additionalPermissions) + { + var permissionsToAdd = additionalPermissions + .Where(x => assignedPermissions.Contains(x) == false); + assignedPermissions.AddRange(permissionsToAdd); } #endregion @@ -837,21 +1206,25 @@ namespace Umbraco.Core.Services /// /// Occurs before Save /// - public static event TypedEventHandler> SavingUserType; + public static event TypedEventHandler> SavingUserGroup; /// /// Occurs after Save /// - public static event TypedEventHandler> SavedUserType; + public static event TypedEventHandler> SavedUserGroup; /// /// Occurs before Delete /// - public static event TypedEventHandler> DeletingUserType; + public static event TypedEventHandler> DeletingUserGroup; /// /// Occurs after Delete /// - public static event TypedEventHandler> DeletedUserType; + public static event TypedEventHandler> DeletedUserGroup; + + //TODO: still don't know if we need this yet unless we start caching permissions, but that also means we'll need another + // event on the ContentService since there's a method there to modify node permissions too, or we can proxy events if needed. + internal static event TypedEventHandler> UserGroupPermissionsAssigned; } } diff --git a/src/Umbraco.Core/Services/UserServiceExtensions.cs b/src/Umbraco.Core/Services/UserServiceExtensions.cs index afb679afa1..e53a24527f 100644 --- a/src/Umbraco.Core/Services/UserServiceExtensions.cs +++ b/src/Umbraco.Core/Services/UserServiceExtensions.cs @@ -4,27 +4,56 @@ using Umbraco.Core.Models.Membership; namespace Umbraco.Core.Services { - internal static class UserServiceExtensions + public static class UserServiceExtensions { /// - /// Remove all permissions for this user for all nodes specified + /// Get explicitly assigned permissions for a group and optional node Ids /// - /// - /// - /// - public static void RemoveUserPermissions(this IUserService userService, int userId, params int[] entityIds) + /// + /// + /// + /// Flag indicating if we want to include the default group permissions for each result if there are not explicit permissions set + /// + /// Specifiying nothing will return all permissions for all nodes + /// An enumerable list of + public static EntityPermissionCollection GetPermissions(this IUserService service, IUserGroup group, bool fallbackToDefaultPermissions, params int[] nodeIds) { - userService.ReplaceUserPermissions(userId, new char[] {}, entityIds); + return service.GetPermissions(new[] {group}, fallbackToDefaultPermissions, nodeIds); } /// - /// Remove all permissions for this user for all nodes + /// Gets the permissions for the provided group and path + /// + /// + /// + /// Path to check permissions for + /// + /// Flag indicating if we want to include the default group permissions for each result if there are not explicit permissions set + /// + public static EntityPermissionSet GetPermissionsForPath(this IUserService service, IUserGroup group, string path, bool fallbackToDefaultPermissions = false) + { + return service.GetPermissionsForPath(new[] { group }, path, fallbackToDefaultPermissions); + } + + /// + /// Remove all permissions for this user group for all nodes specified /// /// - /// - public static void RemoveUserPermissions(this IUserService userService, int userId) + /// + /// + public static void RemoveUserGroupPermissions(this IUserService userService, int groupId, params int[] entityIds) { - userService.ReplaceUserPermissions(userId, new char[] { }); + userService.ReplaceUserGroupPermissions(groupId, new char[] {}, entityIds); + } + + /// + /// Remove all permissions for this user group for all nodes + /// + /// + /// + public static void RemoveUserGroupPermissions(this IUserService userService, int groupId) + { + userService.ReplaceUserGroupPermissions(groupId, new char[] { }); } /// @@ -36,7 +65,7 @@ namespace Umbraco.Core.Services /// To maintain compatibility we have to check the login name if the provider key lookup fails but otherwise /// we'll store the provider user key in the login column. /// - public static IUser CreateUserMappingForCustomProvider(this IUserService userService, MembershipUser member) + internal static IUser CreateUserMappingForCustomProvider(this IUserService userService, MembershipUser member) { if (member == null) throw new ArgumentNullException("member"); @@ -51,18 +80,11 @@ namespace Umbraco.Core.Services if (found == null) { - var writer = userService.GetUserTypeByAlias("writer"); - if (writer == null) - { - throw new InvalidOperationException("Could not map the custom user to an Umbraco user, no 'writer' user type could be found"); - } var user = new User( member.UserName, member.Email ?? Guid.NewGuid().ToString("N") + "@example.com", //email cannot be empty member.ProviderUserKey == null ? member.UserName : member.ProviderUserKey.ToString(), - Guid.NewGuid().ToString("N"), //pass cannot be empty - writer); - user.AddAllowedSection(Constants.Applications.Content); + Guid.NewGuid().ToString("N")); //pass cannot be empty userService.Save(user); return user; } diff --git a/src/Umbraco.Core/StringExtensions.cs b/src/Umbraco.Core/StringExtensions.cs index dba7f2cfee..0780fe799c 100644 --- a/src/Umbraco.Core/StringExtensions.cs +++ b/src/Umbraco.Core/StringExtensions.cs @@ -41,6 +41,22 @@ namespace Umbraco.Core ToCSharpEscapeChars[escape[0]] = escape[1]; } + /// + /// Convert a path to node ids in the order from right to left (deepest to shallowest) + /// + /// + /// + internal static int[] GetIdsFromPathReversed(this string path) + { + var nodeIds = path.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries) + .Select(x => x.TryConvertTo()) + .Where(x => x.Success) + .Select(x => x.Result) + .Reverse() + .ToArray(); + return nodeIds; + } + /// /// Removes new lines and tabs /// diff --git a/src/Umbraco.Core/TypeFinder.cs b/src/Umbraco.Core/TypeFinder.cs index 2af6e99cc7..ab2b24392e 100644 --- a/src/Umbraco.Core/TypeFinder.cs +++ b/src/Umbraco.Core/TypeFinder.cs @@ -7,6 +7,7 @@ using System.Security; using System.Text; using System.Web; using System.Web.Compilation; +using System.Web.Hosting; using Umbraco.Core.IO; using Umbraco.Core.Logging; @@ -44,7 +45,7 @@ namespace Umbraco.Core HashSet assemblies = null; try { - var isHosted = HttpContext.Current != null; + var isHosted = HttpContext.Current != null || HostingEnvironment.IsHosted; try { diff --git a/src/Umbraco.Core/UdiEntityType.cs b/src/Umbraco.Core/UdiEntityType.cs index 36f3debfeb..30c9f5513a 100644 --- a/src/Umbraco.Core/UdiEntityType.cs +++ b/src/Umbraco.Core/UdiEntityType.cs @@ -73,6 +73,10 @@ namespace Umbraco.Core [UdiType(UdiType.StringUdi)] public const string AnyString = "any-string"; // that one is for tests + [UdiType(UdiType.StringUdi)] + public const string Language = "language"; + [UdiType(UdiType.StringUdi)] + public const string MacroScript = "macroscript"; [UdiType(UdiType.StringUdi)] public const string MediaFile = "media-file"; [UdiType(UdiType.StringUdi)] @@ -86,9 +90,9 @@ namespace Umbraco.Core [UdiType(UdiType.StringUdi)] public const string PartialViewMacro = "partial-view-macro"; [UdiType(UdiType.StringUdi)] - public const string Xslt = "xslt"; + public const string UserControl = "usercontrol"; [UdiType(UdiType.StringUdi)] - public const string Language = "language"; + public const string Xslt = "xslt"; public static string FromUmbracoObjectType(UmbracoObjectTypes umbracoObjectType) { diff --git a/src/Umbraco.Core/UdiGetterExtensions.cs b/src/Umbraco.Core/UdiGetterExtensions.cs index d663acba9d..4ae6b05dca 100644 --- a/src/Umbraco.Core/UdiGetterExtensions.cs +++ b/src/Umbraco.Core/UdiGetterExtensions.cs @@ -190,6 +190,17 @@ namespace Umbraco.Core return new GuidUdi(Constants.UdiEntityType.Macro, entity.Key).EnsureClosed(); } + /// + /// Gets the entity identifier of the entity. + /// + /// The entity. + /// The entity identifier of the entity. + public static StringUdi GetUdi(this IUserControl entity) + { + if (entity == null) throw new ArgumentNullException("entity"); + return new StringUdi(Constants.UdiEntityType.UserControl, entity.Path.TrimStart('/')).EnsureClosed(); + } + /// /// Gets the entity identifier of the entity. /// diff --git a/src/Umbraco.Core/Umbraco.Core.csproj b/src/Umbraco.Core/Umbraco.Core.csproj index 4f98de7746..743eced669 100644 --- a/src/Umbraco.Core/Umbraco.Core.csproj +++ b/src/Umbraco.Core/Umbraco.Core.csproj @@ -70,21 +70,17 @@ ..\packages\Microsoft.AspNet.Identity.Owin.2.2.1\lib\net45\Microsoft.AspNet.Identity.Owin.dll True - - ..\packages\Microsoft.Owin.3.0.1\lib\net45\Microsoft.Owin.dll - True + + ..\packages\Microsoft.Owin.3.1.0\lib\net45\Microsoft.Owin.dll - - ..\packages\Microsoft.Owin.Security.3.0.1\lib\net45\Microsoft.Owin.Security.dll - True + + ..\packages\Microsoft.Owin.Security.3.1.0\lib\net45\Microsoft.Owin.Security.dll - - ..\packages\Microsoft.Owin.Security.Cookies.3.0.1\lib\net45\Microsoft.Owin.Security.Cookies.dll - True + + ..\packages\Microsoft.Owin.Security.Cookies.3.1.0\lib\net45\Microsoft.Owin.Security.Cookies.dll - - ..\packages\Microsoft.Owin.Security.OAuth.3.0.1\lib\net45\Microsoft.Owin.Security.OAuth.dll - True + + ..\packages\Microsoft.Owin.Security.OAuth.3.1.0\lib\net45\Microsoft.Owin.Security.OAuth.dll ..\packages\MiniProfiler.2.1.0\lib\net40\MiniProfiler.dll @@ -118,6 +114,7 @@ + @@ -178,6 +175,7 @@ + @@ -352,8 +350,21 @@ + + + + + + + + + + + + + @@ -458,6 +469,7 @@ + @@ -488,6 +500,11 @@ + + + + + @@ -502,13 +519,21 @@ + + + + + + + + @@ -528,6 +553,7 @@ + @@ -571,8 +597,11 @@ + + + @@ -585,15 +614,20 @@ + + + + + @@ -636,11 +670,16 @@ + - + + + + + @@ -867,10 +906,8 @@ - - @@ -902,7 +939,6 @@ - @@ -979,7 +1015,6 @@ - @@ -1001,7 +1036,6 @@ - @@ -1149,7 +1183,6 @@ - @@ -1177,7 +1210,6 @@ - @@ -1196,7 +1228,6 @@ - @@ -1319,11 +1350,8 @@ - - - diff --git a/src/Umbraco.Core/app.config b/src/Umbraco.Core/app.config index 9bec1bdd87..5d31bd6363 100644 --- a/src/Umbraco.Core/app.config +++ b/src/Umbraco.Core/app.config @@ -16,19 +16,19 @@ - + - + - + - + diff --git a/src/Umbraco.Core/packages.config b/src/Umbraco.Core/packages.config index dd00d61ea6..c883ef1361 100644 --- a/src/Umbraco.Core/packages.config +++ b/src/Umbraco.Core/packages.config @@ -7,10 +7,10 @@ - - - - + + + + diff --git a/src/Umbraco.Tests.Benchmarks/App.config b/src/Umbraco.Tests.Benchmarks/App.config index b63af79365..e29f2348e4 100644 --- a/src/Umbraco.Tests.Benchmarks/App.config +++ b/src/Umbraco.Tests.Benchmarks/App.config @@ -13,19 +13,19 @@ - + - + - + - + diff --git a/src/Umbraco.Tests.Benchmarks/Umbraco.Tests.Benchmarks.csproj b/src/Umbraco.Tests.Benchmarks/Umbraco.Tests.Benchmarks.csproj index f474e79876..64fef90ffa 100644 --- a/src/Umbraco.Tests.Benchmarks/Umbraco.Tests.Benchmarks.csproj +++ b/src/Umbraco.Tests.Benchmarks/Umbraco.Tests.Benchmarks.csproj @@ -116,7 +116,6 @@ - @@ -136,10 +135,6 @@ - - - - diff --git a/src/Umbraco.Tests/App.config b/src/Umbraco.Tests/App.config index 84256a1e9b..c8cf96e618 100644 --- a/src/Umbraco.Tests/App.config +++ b/src/Umbraco.Tests/App.config @@ -1,215 +1,225 @@  - + - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +
+ - - - - - - - - + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + + + - + + + - + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + - + + + + - + - + - + - + - + - + - + - + - + - - - - - - - - - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + diff --git a/src/Umbraco.Tests/Cache/CacheRefresherEventHandlerTests.cs b/src/Umbraco.Tests/Cache/CacheRefresherEventHandlerTests.cs index a5036188fd..c0ead52e79 100644 --- a/src/Umbraco.Tests/Cache/CacheRefresherEventHandlerTests.cs +++ b/src/Umbraco.Tests/Cache/CacheRefresherEventHandlerTests.cs @@ -31,13 +31,11 @@ namespace Umbraco.Tests.Cache new EventDefinition(null, ServiceContext.SectionService, new EventArgs(), "Deleted"), new EventDefinition(null, ServiceContext.SectionService, new EventArgs(), "New"), - - new EventDefinition>(null, ServiceContext.UserService, new SaveEventArgs(Enumerable.Empty())), - new EventDefinition>(null, ServiceContext.UserService, new DeleteEventArgs(Enumerable.Empty())), - + new EventDefinition>(null, ServiceContext.UserService, new SaveEventArgs(Enumerable.Empty())), new EventDefinition>(null, ServiceContext.UserService, new DeleteEventArgs(Enumerable.Empty())), - new EventDefinition>(null, ServiceContext.UserService, new DeleteEventArgs(Enumerable.Empty())), + new EventDefinition>(null, ServiceContext.UserService, new SaveEventArgs(Enumerable.Empty())), + new EventDefinition>(null, ServiceContext.UserService, new DeleteEventArgs(Enumerable.Empty())), new EventDefinition>(null, ServiceContext.LocalizationService, new SaveEventArgs(Enumerable.Empty())), new EventDefinition>(null, ServiceContext.LocalizationService, new DeleteEventArgs(Enumerable.Empty())), diff --git a/src/Umbraco.Tests/Configurations/UmbracoSettings/HelpElementDefaultTests.cs b/src/Umbraco.Tests/Configurations/UmbracoSettings/HelpElementDefaultTests.cs deleted file mode 100644 index 7f4e6481de..0000000000 --- a/src/Umbraco.Tests/Configurations/UmbracoSettings/HelpElementDefaultTests.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System.Linq; -using NUnit.Framework; - -namespace Umbraco.Tests.Configurations.UmbracoSettings -{ - [TestFixture] - public class HelpElementDefaultTests : HelpElementTests - { - protected override bool TestingDefaults - { - get { return true; } - } - - [Test] - public override void Links() - { - Assert.IsTrue(SettingsSection.Help.Links.Count() == 0); - } - } -} \ No newline at end of file diff --git a/src/Umbraco.Tests/Configurations/UmbracoSettings/HelpElementTests.cs b/src/Umbraco.Tests/Configurations/UmbracoSettings/HelpElementTests.cs deleted file mode 100644 index ba43db8cf0..0000000000 --- a/src/Umbraco.Tests/Configurations/UmbracoSettings/HelpElementTests.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System.Linq; -using NUnit.Framework; - -namespace Umbraco.Tests.Configurations.UmbracoSettings -{ - [TestFixture] - public class HelpElementTests : UmbracoSettingsTests - { - [Test] - public void DefaultUrl() - { - Assert.IsTrue(SettingsSection.Help.DefaultUrl == "http://our.umbraco.org/wiki/umbraco-help/{0}/{1}"); - } - - [Test] - public virtual void Links() - { - Assert.IsTrue(SettingsSection.Help.Links.Count() == 2); - Assert.IsTrue(SettingsSection.Help.Links.ElementAt(0).Application == "content"); - Assert.IsTrue(SettingsSection.Help.Links.ElementAt(0).ApplicationUrl == "dashboard.aspx"); - Assert.IsTrue(SettingsSection.Help.Links.ElementAt(0).Language == "en"); - Assert.IsTrue(SettingsSection.Help.Links.ElementAt(0).UserType == "Administrators"); - Assert.IsTrue(SettingsSection.Help.Links.ElementAt(0).HelpUrl == "http://www.xyz.no?{0}/{1}/{2}/{3}"); - Assert.IsTrue(SettingsSection.Help.Links.ElementAt(1).Application == "media"); - Assert.IsTrue(SettingsSection.Help.Links.ElementAt(1).ApplicationUrl == "dashboard2.aspx"); - Assert.IsTrue(SettingsSection.Help.Links.ElementAt(1).Language == "ch"); - Assert.IsTrue(SettingsSection.Help.Links.ElementAt(1).UserType == "Writers"); - Assert.IsTrue(SettingsSection.Help.Links.ElementAt(1).HelpUrl == "http://www.abc.no?{0}/{1}/{2}/{3}"); - } - } -} \ No newline at end of file diff --git a/src/Umbraco.Tests/Configurations/UmbracoSettings/umbracoSettings.config b/src/Umbraco.Tests/Configurations/UmbracoSettings/umbracoSettings.config index a6f9826492..a89a6e4d71 100644 --- a/src/Umbraco.Tests/Configurations/UmbracoSettings/umbracoSettings.config +++ b/src/Umbraco.Tests/Configurations/UmbracoSettings/umbracoSettings.config @@ -237,13 +237,6 @@ - - - - - - - +
Copy me!
+ + + + + + + + + + + + + + + + + +

Controller example

+
+    (function () {
+        "use strict";
+
+        function Controller() {
+
+            var vm = this;
+
+            vm.copyText = "Copy text without element";
+            vm.cutText = "Text to cut";
+
+            vm.copySuccess = copySuccess;
+            vm.copyError = copyError;
+
+            function copySuccess() {
+                vm.clipboardButtonState = "success";
+            }
+            
+            function copyError() {
+                vm.clipboardButtonState = "error";
+            }
+
+        }
+
+        angular.module("umbraco").controller("My.ClipBoardController", Controller);
+
+    })();
+
+ +@param {callback} umbClipboardSuccess (expression): Callback function when the content is copied. +@param {callback} umbClipboardError (expression): Callback function if the copy fails. +@param {string} umbClipboardTarget (attribute): The target element to copy. +@param {string} umbClipboardAction (attribute): Specify if you want to copy or cut content ("copy", "cut"). Cut only works on input and textarea elements. +@param {string} umbClipboardText (attribute): Use this attribute if you don't have an element to copy from. + +**/ + +(function () { + 'use strict'; + + function umbClipboardDirective($timeout, assetsService) { + + function link(scope, element, attrs, ctrl) { + + var clipboard; + var target = element[0]; + + assetsService.loadJs("lib/clipboard/clipboard.min.js") + .then(function () { + + if(scope.umbClipboardTarget) { + target.setAttribute("data-clipboard-target", scope.umbClipboardTarget); + } + + if(scope.umbClipboardAction) { + target.setAttribute("data-clipboard-action", scope.umbClipboardAction); + } + + if(scope.umbClipboardText) { + target.setAttribute("data-clipboard-text", scope.umbClipboardText); + } + + clipboard = new Clipboard(target); + + clipboard.on('success', function (e) { + e.clearSelection(); + if (scope.umbClipboardSuccess) { + scope.$apply(function () { + scope.umbClipboardSuccess({ e: e }); + }); + } + }); + + clipboard.on('error', function (e) { + if (scope.umbClipboardError) { + scope.$apply(function () { + scope.umbClipboardError({ e: e }); + }); + } + }); + + }); + + // clean up + scope.$on('$destroy', function(){ + clipboard.destroy(); + }); + + } + + //////////// + + var directive = { + restrict: 'A', + scope: { + umbClipboardSuccess: '&?', + umbClipboardError: '&?', + umbClipboardTarget: "@?", + umbClipboardAction: "@?", + umbClipboardText: "=?" + }, + link: link + }; + + return directive; + } + + angular.module('umbraco.directives').directive('umbClipboard', umbClipboardDirective); + +})(); diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/umbdropdown.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/umbdropdown.directive.js new file mode 100644 index 0000000000..d6006114a6 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/umbdropdown.directive.js @@ -0,0 +1,133 @@ +/** +@ngdoc directive +@name umbraco.directives.directive:umbDropdown +@restrict E +@scope + +@description +Added in versions 7.7.0: Use this component to render a dropdown menu. + +

Markup example

+
+    
+ +
+ + + + + + + {{ item.name }} + + + +
+ +
+
+ +

Controller example

+
+    (function () {
+        "use strict";
+
+        function Controller() {
+
+            var vm = this;
+
+            vm.dropdownOpen = false;
+            vm.items = [
+                { "name": "Item 1" },
+                { "name": "Item 2" },
+                { "name": "Item 3" }
+            ];
+
+            vm.toggle = toggle;
+            vm.close = close;
+            vm.select = select;
+
+            function toggle() {
+                vm.dropdownOpen = true;
+            }
+
+            function close() {
+                vm.dropdownOpen = false;
+            }
+
+            function select(item) {
+                // Do your magic here
+            }
+
+        }
+
+        angular.module("umbraco").controller("MyDropdown.Controller", Controller);
+    })();
+
+ +

Use in combination with

+
    +
  • {@link umbraco.directives.directive:umbDropdownItem umbDropdownItem}
  • +
  • {@link umbraco.directives.directive:umbKeyboardList umbKeyboardList}
  • +
+ +@param {callback} onClose Callback when the dropdown menu closes. When you click outside or press esc. + +**/ + +(function() { + 'use strict'; + + function umbDropdown($document) { + + function link(scope, element, attr, ctrl) { + + scope.close = function() { + if (scope.onClose) { + scope.onClose(); + } + }; + + // Handle keydown events + function keydown(event) { + // press escape + if(event.keyCode === 27) { + scope.onClose(); + } + } + + // Stop to listen typing. + function stopListening() { + $document.off('keydown', keydown); + } + + // Start listening to key typing. + $document.on('keydown', keydown); + + // Stop listening when scope is destroyed. + scope.$on('$destroy', stopListening); + + } + + var directive = { + restrict: 'E', + replace: true, + transclude: true, + templateUrl: 'views/components/umb-dropdown.html', + scope: { + onClose: "&" + }, + link: link + }; + + return directive; + + } + + angular.module('umbraco.directives').directive('umbDropdown', umbDropdown); + +})(); diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/umbdropdownitem.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/umbdropdownitem.directive.js new file mode 100644 index 0000000000..59b2b827eb --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/umbdropdownitem.directive.js @@ -0,0 +1,29 @@ +/** +@ngdoc directive +@name umbraco.directives.directive:umbDropdownItem +@restrict E + +@description +Added in versions 7.7.0: Use this directive to construct a dropdown item. See documentation for {@link umbraco.directives.directive:umbDropdown umbDropdown}. + +**/ + +(function() { + 'use strict'; + + function umbDropdownItem() { + + var directive = { + restrict: 'E', + replace: true, + transclude: true, + templateUrl: 'views/components/umb-dropdown-item.html', + }; + + return directive; + + } + + angular.module('umbraco.directives').directive('umbDropdownItem', umbDropdownItem); + +})(); diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/umbnodepreview.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/umbnodepreview.directive.js index 77f6f06a30..d98246ac42 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/umbnodepreview.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/umbnodepreview.directive.js @@ -82,8 +82,10 @@ @param {boolean} sortable (binding): Will add a move cursor on the node preview. Can used in combination with ui-sortable. @param {boolean} allowRemove (binding): Show/Hide the remove button. @param {boolean} allowOpen (binding): Show/Hide the open button. +@param {boolean} allowEdit (binding): Show/Hide the edit button (Added in version 7.7.0). @param {function} onRemove (expression): Callback function when the remove button is clicked. @param {function} onOpen (expression): Callback function when the open button is clicked. +@param {function} onEdit (expression): Callback function when the edit button is clicked (Added in version 7.7.0). **/ (function () { @@ -92,7 +94,9 @@ function NodePreviewDirective() { function link(scope, el, attr, ctrl) { - + if (!scope.editLabelKey) { + scope.editLabelKey = "general_edit"; + } } var directive = { @@ -103,12 +107,15 @@ icon: "=?", name: "=", description: "=?", + permissions: "=?", published: "=?", sortable: "=?", allowOpen: "=?", allowRemove: "=?", + allowEdit: "=?", onOpen: "&?", - onRemove: "&?" + onRemove: "&?", + onEdit: "&?" }, link: link }; diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/umbprogressbar.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/umbprogressbar.directive.js index 77bab9f023..59f51fca3f 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/umbprogressbar.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/umbprogressbar.directive.js @@ -16,6 +16,8 @@ Use this directive to generate a progress bar. @param {number} percentage (attribute): The progress in percentage. +@param {string} size (attribute): The size (s, m). + **/ (function() { @@ -28,7 +30,8 @@ Use this directive to generate a progress bar. replace: true, templateUrl: 'views/components/umb-progress-bar.html', scope: { - percentage: "@" + percentage: "@", + size: "@?" } }; diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/upload/umbfiledropzone.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/upload/umbfiledropzone.directive.js index 6cafa05bc8..6619af3cc0 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/upload/umbfiledropzone.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/upload/umbfiledropzone.directive.js @@ -142,12 +142,14 @@ angular.module("umbraco.directives") file: file }) .progress(function(evt) { - // calculate progress in percentage - var progressPercentage = parseInt(100.0 * evt.loaded / evt.total, 10); - // set percentage property on file - file.uploadProgress = progressPercentage; - // set uploading status on file - file.uploadStatus = "uploading"; + if (file.uploadStat !== "done" && file.uploadStat !== "error") { + // calculate progress in percentage + var progressPercentage = parseInt(100.0 * evt.loaded / evt.total, 10); + // set percentage property on file + file.uploadProgress = progressPercentage; + // set uploading status on file + file.uploadStatus = "uploading"; + } }) .success(function(data, status, headers, config) { if (data.notifications && data.notifications.length > 0) { @@ -160,6 +162,7 @@ angular.module("umbraco.directives") } else { // set done status on file file.uploadStatus = "done"; + file.uploadProgress = 100; // set date/time for when done - used for sorting file.doneDate = new Date(); // Put the file in the done pool diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/users/changepassword.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/users/changepassword.directive.js new file mode 100644 index 0000000000..f2834e4a36 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/users/changepassword.directive.js @@ -0,0 +1,171 @@ +(function () { + 'use strict'; + + function ChangePasswordController($scope) { + + function resetModel(isNew) { + //the model config will contain an object, if it does not we'll create defaults + //NOTE: We will not support doing the password regex on the client side because the regex on the server side + //based on the membership provider cannot always be ported to js from .net directly. + /* + { + hasPassword: true/false, + requiresQuestionAnswer: true/false, + enableReset: true/false, + enablePasswordRetrieval: true/false, + minPasswordLength: 10 + } + */ + + //set defaults if they are not available + if ($scope.config.disableToggle === undefined) { + $scope.config.disableToggle = false; + } + if ($scope.config.hasPassword === undefined) { + $scope.config.hasPassword = false; + } + if ($scope.config.enablePasswordRetrieval === undefined) { + $scope.config.enablePasswordRetrieval = true; + } + if ($scope.config.requiresQuestionAnswer === undefined) { + $scope.config.requiresQuestionAnswer = false; + } + if ($scope.config.enableReset === undefined) { + $scope.config.enableReset = true; + } + if ($scope.config.minPasswordLength === undefined) { + $scope.config.minPasswordLength = 0; + } + + //set the model defaults + if (!angular.isObject($scope.passwordValues)) { + //if it's not an object then just create a new one + $scope.passwordValues = { + newPassword: null, + oldPassword: null, + reset: null, + answer: null + }; + } + else { + //just reset the values + + if (!isNew) { + //if it is new, then leave the generated pass displayed + $scope.passwordValues.newPassword = null; + $scope.passwordValues.oldPassword = null; + } + $scope.passwordValues.reset = null; + $scope.passwordValues.answer = null; + } + + //the value to compare to match passwords + if (!isNew) { + $scope.confirm = ""; + } + else if ($scope.passwordValues.newPassword && $scope.passwordValues.newPassword.length > 0) { + //if it is new and a new password has been set, then set the confirm password too + $scope.confirm = $scope.passwordValues.newPassword; + } + + } + + resetModel($scope.isNew); + + //if there is no password saved for this entity , it must be new so we do not allow toggling of the change password, it is always there + //with validators turned on. + $scope.changing = $scope.config.disableToggle === true || !$scope.config.hasPassword; + + //we're not currently changing so set the model to null + if (!$scope.changing) { + $scope.passwordValues = null; + } + + $scope.doChange = function () { + resetModel(); + $scope.changing = true; + //if there was a previously generated password displaying, clear it + $scope.passwordValues.generatedPassword = null; + }; + + $scope.cancelChange = function () { + $scope.changing = false; + //set model to null + $scope.passwordValues = null; + }; + + var unsubscribe = []; + + //listen for the saved event, when that occurs we'll + //change to changing = false; + unsubscribe.push($scope.$on("formSubmitted", function () { + if ($scope.config.disableToggle === false) { + $scope.changing = false; + } + })); + unsubscribe.push($scope.$on("formSubmitting", function () { + //if there was a previously generated password displaying, clear it + if ($scope.changing && $scope.passwordValues) { + $scope.passwordValues.generatedPassword = null; + } + else if (!$scope.changing) { + //we are not changing, so the model needs to be null + $scope.passwordValues = null; + } + })); + + //when the scope is destroyed we need to unsubscribe + $scope.$on('$destroy', function () { + for (var u in unsubscribe) { + unsubscribe[u](); + } + }); + + $scope.showReset = function () { + return $scope.config.enableReset; + }; + + $scope.showOldPass = function () { + return $scope.config.hasPassword && + !$scope.config.allowManuallyChangingPassword && + !$scope.config.enablePasswordRetrieval && !$scope.passwordValues.reset; + }; + + $scope.showNewPass = function () { + return !$scope.passwordValues.reset; + }; + + $scope.showConfirmPass = function () { + return !$scope.passwordValues.reset; + }; + + //TODO: I don't think we need this or the cancel button, this can be up to the editor rendering this directive + $scope.showCancelBtn = function () { + return $scope.config.disableToggle !== true && $scope.config.hasPassword; + }; + + } + + function ChangePasswordDirective() { + + var directive = { + restrict: 'E', + replace: true, + templateUrl: 'views/components/users/change-password.html', + controller: 'Umbraco.Editors.Users.ChangePasswordDirectiveController', + scope: { + isNew: "=?", + passwordValues: "=", + config: "=" + } + }; + + return directive; + + } + + angular.module('umbraco.directives').controller('Umbraco.Editors.Users.ChangePasswordDirectiveController', ChangePasswordController); + angular.module('umbraco.directives').directive('changePassword', ChangePasswordDirective); + + +})(); \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/users/umbpermission.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/users/umbpermission.directive.js new file mode 100644 index 0000000000..bae87789ca --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/users/umbpermission.directive.js @@ -0,0 +1,36 @@ +(function () { + 'use strict'; + + function PermissionDirective() { + + function link(scope, el, attr, ctrl) { + + scope.change = function() { + scope.selected = !scope.selected; + if(scope.onChange) { + scope.onChange({'selected': scope.selected}); + } + }; + + } + + var directive = { + restrict: 'E', + replace: true, + templateUrl: 'views/components/users/umb-permission.html', + scope: { + name: "=", + description: "=?", + selected: "=", + onChange: "&" + }, + link: link + }; + + return directive; + + } + + angular.module('umbraco.directives').directive('umbPermission', PermissionDirective); + +})(); \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/users/umbusergrouppreview.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/users/umbusergrouppreview.directive.js new file mode 100644 index 0000000000..7a777b76c5 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/users/umbusergrouppreview.directive.js @@ -0,0 +1,36 @@ +(function () { + 'use strict'; + + function UserGroupPreviewDirective() { + + function link(scope, el, attr, ctrl) { + + } + + var directive = { + restrict: 'E', + replace: true, + templateUrl: 'views/components/users/umb-user-group-preview.html', + scope: { + icon: "=?", + name: "=", + description: "=?", + sections: "=?", + contentStartNode: "=?", + mediaStartNode: "=?", + permissions: "=?", + allowRemove: "=?", + allowEdit: "=?", + onRemove: "&?", + onEdit: "&?" + }, + link: link + }; + + return directive; + + } + + angular.module('umbraco.directives').directive('umbUserGroupPreview', UserGroupPreviewDirective); + +})(); \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/users/umbuserpreview.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/users/umbuserpreview.directive.js new file mode 100644 index 0000000000..634decfa3d --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/users/umbuserpreview.directive.js @@ -0,0 +1,29 @@ +(function () { + 'use strict'; + + function UserPreviewDirective() { + + function link(scope, el, attr, ctrl) { + + } + + var directive = { + restrict: 'E', + replace: true, + templateUrl: 'views/components/users/umb-user-preview.html', + scope: { + avatars: "=?", + name: "=", + allowRemove: "=?", + onRemove: "&?" + }, + link: link + }; + + return directive; + + } + + angular.module('umbraco.directives').directive('umbUserPreview', UserPreviewDirective); + +})(); \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/util/umbkeyboardlist.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/util/umbkeyboardlist.directive.js new file mode 100644 index 0000000000..187228f0c4 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/common/directives/util/umbkeyboardlist.directive.js @@ -0,0 +1,115 @@ +/** +@ngdoc directive +@name umbraco.directives.directive:umbKeyboardList +@restrict E + +@description +Added in versions 7.7.0: Use this directive to add arrow up and down keyboard shortcuts to a list. Use this together with the {@link umbraco.directives.directive:umbDropdown umbDropdown} component to make easy accessible dropdown menus. + +

Markup example

+
+    
+ +
+
+ +

Use in combination with

+
    +
  • {@link umbraco.directives.directive:umbDropdown umbDropdown}
  • +
+ +**/ + +angular.module('umbraco.directives') + .directive('umbKeyboardList', ['$document', '$timeout', function ($document, $timeout) { + + return { + restrict: 'A', + link: function (scope, element, attr) { + + var listItems = []; + var currentIndex = 0; + var focusSet = false; + + $timeout(function(){ + // get list of all links in the list + listItems = element.find("li a"); + }); + + // Handle keydown events + function keydown(event) { + $timeout(function(){ + checkFocus(); + // arrow down + if (event.keyCode === 40) { + arrowDown(); + } + // arrow up + if (event.keyCode === 38) { + arrowUp(); + } + }); + } + + function checkFocus() { + var found = false; + + // check if any element has focus + angular.forEach(listItems, function (item, index) { + if ($(item).is(":focus")) { + // if an element already has focus set the + // currentIndex so we navigate from that element + currentIndex = index; + focusSet = true; + found = true; + } + }); + + // If we don't find an element with focus we reset the currentIndex and the focusSet flag + // we do this because you can have navigated away from the list with tab and we want to reset it if you navigate back + if (!found) { + currentIndex = 0; + focusSet = false; + } + } + + function arrowDown() { + if (currentIndex < listItems.length - 1) { + // only bump the current index if the focus is already + // set else we just want to focus the first element + if (focusSet) { + currentIndex++; + } + listItems[currentIndex].focus(); + focusSet = true; + } + } + + function arrowUp() { + if (currentIndex > 0) { + currentIndex--; + listItems[currentIndex].focus(); + } + } + + // Stop to listen typing. + function stopListening() { + $document.off('keydown', keydown); + } + + // Start listening to key typing. + $document.on('keydown', keydown); + + // Stop listening when scope is destroyed. + scope.$on('$destroy', stopListening); + + } + }; + }]); \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/validation/valcompare.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/validation/valcompare.directive.js index 1a36dcc24f..195c70ce0f 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/validation/valcompare.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/validation/valcompare.directive.js @@ -1,11 +1,13 @@ angular.module('umbraco.directives.validation') .directive('valCompare',function () { return { - require: "ngModel", - link: function (scope, elem, attrs, ctrl) { - - //TODO: Pretty sure this should be done using a requires ^form in the directive declaration - var otherInput = elem.inheritedData("$formController")[attrs.valCompare]; + require: ["ngModel", "^form"], + link: function (scope, elem, attrs, ctrls) { + + var ctrl = ctrls[0]; + var formCtrl = ctrls[1]; + + var otherInput = formCtrl[attrs.valCompare]; ctrl.$parsers.push(function(value) { if(value === otherInput.$viewValue) { diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/validation/valsubview.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/validation/valsubview.directive.js index 916b933063..98c4c6768f 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/validation/valsubview.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/validation/valsubview.directive.js @@ -12,6 +12,11 @@ function link(scope, el, attr, ctrl) { + //if there are no containing form or valFormManager controllers, then we do nothing + if (!ctrl || !angular.isArray(ctrl) || ctrl.length !== 2 || !ctrl[0] || !ctrl[1]) { + return; + } + var valFormManager = ctrl[1]; scope.subView.hasError = false; @@ -36,7 +41,7 @@ } var directive = { - require: ['^form', '^valFormManager'], + require: ['?^form', '?^valFormManager'], restrict: "A", link: link }; diff --git a/src/Umbraco.Web.UI.Client/src/common/filters/preserveNewLineInHtml.filter.js b/src/Umbraco.Web.UI.Client/src/common/filters/preserveNewLineInHtml.filter.js new file mode 100644 index 0000000000..8105282020 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/common/filters/preserveNewLineInHtml.filter.js @@ -0,0 +1,15 @@ +/** +* @ngdoc filter +* @name umbraco.filters.preserveNewLineInHtml +* @description +* Used when rendering a string as HTML (i.e. with ng-bind-html) to convert line-breaks to
tags +**/ +angular.module("umbraco.filters").filter('preserveNewLineInHtml', function () { + return function (text) { + if (!text) { + return ''; + } + return text.replace(/\n/g, '
'); + }; +}); + \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/common/filters/umbwordlimit.filter.js b/src/Umbraco.Web.UI.Client/src/common/filters/umbwordlimit.filter.js new file mode 100644 index 0000000000..c02624409f --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/common/filters/umbwordlimit.filter.js @@ -0,0 +1,38 @@ +/** + * @ngdoc filter + * @name umbraco.filters.filter:umbWordLimit + * @namespace umbWordLimitFilter + * + * @description + * Limits the number of words in a string to the passed in value + */ + +(function () { + 'use strict'; + + function umbWordLimitFilter() { + return function (collection, property) { + + if (!angular.isString(collection)) { + return collection; + } + + if (angular.isUndefined(property)) { + return collection; + } + + var newString = ""; + var array = []; + + array = collection.split(" ", property); + array.length = property; + newString = array.join(" "); + + return newString; + + }; + } + + angular.module('umbraco.filters').filter('umbWordLimit', umbWordLimitFilter); + +})(); \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/common/resources/auth.resource.js b/src/Umbraco.Web.UI.Client/src/common/resources/auth.resource.js index 40f1dbb807..3680b32245 100644 --- a/src/Umbraco.Web.UI.Client/src/common/resources/auth.resource.js +++ b/src/Umbraco.Web.UI.Client/src/common/resources/auth.resource.js @@ -11,391 +11,423 @@ */ function authResource($q, $http, umbRequestHelper, angularHelper) { - return { + return { - get2FAProviders: function () { - - return umbRequestHelper.resourcePromise( - $http.get( - umbRequestHelper.getApiUrl( - "authenticationApiBaseUrl", - "Get2FAProviders")), - 'Could not retrive two factor provider info'); - }, + get2FAProviders: function () { - send2FACode: function (provider) { + return umbRequestHelper.resourcePromise( + $http.get( + umbRequestHelper.getApiUrl( + "authenticationApiBaseUrl", + "Get2FAProviders")), + 'Could not retrive two factor provider info'); + }, - return umbRequestHelper.resourcePromise( - $http.post( - umbRequestHelper.getApiUrl( - "authenticationApiBaseUrl", - "PostSend2FACode"), - angular.toJson(provider)), - 'Could not send code'); - }, + send2FACode: function (provider) { - verify2FACode: function (provider, code) { + return umbRequestHelper.resourcePromise( + $http.post( + umbRequestHelper.getApiUrl( + "authenticationApiBaseUrl", + "PostSend2FACode"), + angular.toJson(provider)), + 'Could not send code'); + }, - return umbRequestHelper.resourcePromise( - $http.post( - umbRequestHelper.getApiUrl( - "authenticationApiBaseUrl", - "PostVerify2FACode"), - { - code: code, - provider: provider - }), - 'Could not verify code'); - }, + verify2FACode: function (provider, code) { - /** - * @ngdoc method - * @name umbraco.resources.authResource#performLogin - * @methodOf umbraco.resources.authResource - * - * @description - * Logs the Umbraco backoffice user in if the credentials are good - * - * ##usage - *
-         * authResource.performLogin(login, password)
-         *    .then(function(data) {
-         *        //Do stuff for login...
-         *    });
-         * 
- * @param {string} login Username of backoffice user - * @param {string} password Password of backoffice user - * @returns {Promise} resourcePromise object - * - */ - performLogin: function (username, password) { - - if (!username || !password) { - return angularHelper.rejectedPromise({ - errorMsg: 'Username or password cannot be empty' - }); + return umbRequestHelper.resourcePromise( + $http.post( + umbRequestHelper.getApiUrl( + "authenticationApiBaseUrl", + "PostVerify2FACode"), + { + code: code, + provider: provider + }), + 'Could not verify code'); + }, + + /** + * @ngdoc method + * @name umbraco.resources.authResource#performLogin + * @methodOf umbraco.resources.authResource + * + * @description + * Logs the Umbraco backoffice user in if the credentials are good + * + * ##usage + *
+     * authResource.performLogin(login, password)
+     *    .then(function(data) {
+     *        //Do stuff for login...
+     *    });
+     * 
+ * @param {string} login Username of backoffice user + * @param {string} password Password of backoffice user + * @returns {Promise} resourcePromise object + * + */ + performLogin: function (username, password) { + + if (!username || !password) { + return angularHelper.rejectedPromise({ + errorMsg: 'Username or password cannot be empty' + }); + } + + return umbRequestHelper.resourcePromise( + $http.post( + umbRequestHelper.getApiUrl( + "authenticationApiBaseUrl", + "PostLogin"), { + username: username, + password: password + }), + 'Login failed for user ' + username); + }, + + /** + * There are not parameters for this since when the user has clicked on their invite email they will be partially + * logged in (but they will not be approved) so we need to use this method to verify the non approved logged in user's details. + * Using the getCurrentUser will not work since that only works for approved users + * @returns {} + */ + getCurrentInvitedUser: function () { + return umbRequestHelper.resourcePromise( + $http.get( + umbRequestHelper.getApiUrl( + "authenticationApiBaseUrl", + "GetCurrentInvitedUser")), + 'Failed to verify invite'); + }, + + /** + * @ngdoc method + * @name umbraco.resources.authResource#performRequestPasswordReset + * @methodOf umbraco.resources.authResource + * + * @description + * Checks to see if the provided email address is a valid user account and sends a link + * to allow them to reset their password + * + * ##usage + *
+     * authResource.performRequestPasswordReset(email)
+     *    .then(function(data) {
+     *        //Do stuff for password reset request...
+     *    });
+     * 
+ * @param {string} email Email address of backoffice user + * @returns {Promise} resourcePromise object + * + */ + performRequestPasswordReset: function (email) { + + if (!email) { + return angularHelper.rejectedPromise({ + errorMsg: 'Email address cannot be empty' + }); + } + + //TODO: This validation shouldn't really be done here, the validation on the login dialog + // is pretty hacky which is why this is here, ideally validation on the login dialog would + // be done properly. + var emailRegex = /\S+@\S+\.\S+/; + if (!emailRegex.test(email)) { + return angularHelper.rejectedPromise({ + errorMsg: 'Email address is not valid' + }); + } + + return umbRequestHelper.resourcePromise( + $http.post( + umbRequestHelper.getApiUrl( + "authenticationApiBaseUrl", + "PostRequestPasswordReset"), { + email: email + }), + 'Request password reset failed for email ' + email); + }, + + /** + * @ngdoc method + * @name umbraco.resources.authResource#performValidatePasswordResetCode + * @methodOf umbraco.resources.authResource + * + * @description + * Checks to see if the provided password reset code is valid + * + * ##usage + *
+     * authResource.performValidatePasswordResetCode(resetCode)
+     *    .then(function(data) {
+     *        //Allow reset of password
+     *    });
+     * 
+ * @param {integer} userId User Id + * @param {string} resetCode Password reset code + * @returns {Promise} resourcePromise object + * + */ + performValidatePasswordResetCode: function (userId, resetCode) { + + if (!userId) { + return angularHelper.rejectedPromise({ + errorMsg: 'User Id cannot be empty' + }); + } + + if (!resetCode) { + return angularHelper.rejectedPromise({ + errorMsg: 'Reset code cannot be empty' + }); + } + + return umbRequestHelper.resourcePromise( + $http.post( + umbRequestHelper.getApiUrl( + "authenticationApiBaseUrl", + "PostValidatePasswordResetCode"), + { + userId: userId, + resetCode: resetCode + }), + 'Password reset code validation failed for userId ' + userId + ', code' + resetCode); + }, + + /** + * @ngdoc method + * @name umbraco.resources.currentUserResource#getMembershipProviderConfig + * @methodOf umbraco.resources.currentUserResource + * + * @description + * Gets the configuration of the user membership provider which is used to configure the change password form + */ + getMembershipProviderConfig: function () { + return umbRequestHelper.resourcePromise( + $http.get( + umbRequestHelper.getApiUrl( + "authenticationApiBaseUrl", + "GetMembershipProviderConfig")), + 'Failed to retrieve membership provider config'); + }, + + /** + * @ngdoc method + * @name umbraco.resources.authResource#performSetPassword + * @methodOf umbraco.resources.authResource + * + * @description + * Checks to see if the provided password reset code is valid and sets the user's password + * + * ##usage + *
+     * authResource.performSetPassword(userId, password, confirmPassword, resetCode)
+     *    .then(function(data) {
+     *        //Password set
+     *    });
+     * 
+ * @param {integer} userId User Id + * @param {string} password New password + * @param {string} confirmPassword Confirmation of new password + * @param {string} resetCode Password reset code + * @returns {Promise} resourcePromise object + * + */ + performSetPassword: function (userId, password, confirmPassword, resetCode) { + + if (userId === undefined || userId === null) { + return angularHelper.rejectedPromise({ + errorMsg: 'User Id cannot be empty' + }); + } + + if (!password) { + return angularHelper.rejectedPromise({ + errorMsg: 'Password cannot be empty' + }); + } + + if (password !== confirmPassword) { + return angularHelper.rejectedPromise({ + errorMsg: 'Password and confirmation do not match' + }); + } + + if (!resetCode) { + return angularHelper.rejectedPromise({ + errorMsg: 'Reset code cannot be empty' + }); + } + + return umbRequestHelper.resourcePromise( + $http.post( + umbRequestHelper.getApiUrl( + "authenticationApiBaseUrl", + "PostSetPassword"), + { + userId: userId, + password: password, + resetCode: resetCode + }), + 'Password reset code validation failed for userId ' + userId); + }, + + unlinkLogin: function (loginProvider, providerKey) { + if (!loginProvider || !providerKey) { + return angularHelper.rejectedPromise({ + errorMsg: 'loginProvider or providerKey cannot be empty' + }); + } + + return umbRequestHelper.resourcePromise( + $http.post( + umbRequestHelper.getApiUrl( + "authenticationApiBaseUrl", + "PostUnLinkLogin"), { + loginProvider: loginProvider, + providerKey: providerKey + }), + 'Unlinking login provider failed'); + }, + + /** + * @ngdoc method + * @name umbraco.resources.authResource#performLogout + * @methodOf umbraco.resources.authResource + * + * @description + * Logs out the Umbraco backoffice user + * + * ##usage + *
+     * authResource.performLogout()
+     *    .then(function(data) {
+     *        //Do stuff for logging out...
+     *    });
+     * 
+ * @returns {Promise} resourcePromise object + * + */ + performLogout: function () { + return umbRequestHelper.resourcePromise( + $http.post( + umbRequestHelper.getApiUrl( + "authenticationApiBaseUrl", + "PostLogout"))); + }, + + /** + * @ngdoc method + * @name umbraco.resources.authResource#getCurrentUser + * @methodOf umbraco.resources.authResource + * + * @description + * Sends a request to the server to get the current user details, will return a 401 if the user is not logged in + * + * ##usage + *
+     * authResource.getCurrentUser()
+     *    .then(function(data) {
+     *        //Do stuff for fetching the current logged in Umbraco backoffice user
+     *    });
+     * 
+ * @returns {Promise} resourcePromise object + * + */ + getCurrentUser: function () { + + return umbRequestHelper.resourcePromise( + $http.get( + umbRequestHelper.getApiUrl( + "authenticationApiBaseUrl", + "GetCurrentUser")), + 'Server call failed for getting current user'); + }, + + getCurrentUserLinkedLogins: function () { + + return umbRequestHelper.resourcePromise( + $http.get( + umbRequestHelper.getApiUrl( + "authenticationApiBaseUrl", + "GetCurrentUserLinkedLogins")), + 'Server call failed for getting current users linked logins'); + }, + + /** + * @ngdoc method + * @name umbraco.resources.authResource#isAuthenticated + * @methodOf umbraco.resources.authResource + * + * @description + * Checks if the user is logged in or not - does not return 401 or 403 + * + * ##usage + *
+     * authResource.isAuthenticated()
+     *    .then(function(data) {
+     *        //Do stuff to check if user is authenticated
+     *    });
+     * 
+ * @returns {Promise} resourcePromise object + * + */ + isAuthenticated: function () { + + return umbRequestHelper.resourcePromise( + $http.get( + umbRequestHelper.getApiUrl( + "authenticationApiBaseUrl", + "IsAuthenticated")), + { + success: function (data, status, headers, config) { + //if the response is false, they are not logged in so return a rejection + if (data === false || data === "false") { + return $q.reject('User is not logged in'); } + return data; + }, + error: function (data, status, headers, config) { + return { + errorMsg: 'Server call failed for checking authentication', + data: data, + status: status + }; + } + }); + }, - return umbRequestHelper.resourcePromise( - $http.post( - umbRequestHelper.getApiUrl( - "authenticationApiBaseUrl", - "PostLogin"), { - username: username, - password: password - }), - 'Login failed for user ' + username); - }, + /** + * @ngdoc method + * @name umbraco.resources.authResource#getRemainingTimeoutSeconds + * @methodOf umbraco.resources.authResource + * + * @description + * Gets the user's remaining seconds before their login times out + * + * ##usage + *
+     * authResource.getRemainingTimeoutSeconds()
+     *    .then(function(data) {
+     *        //Number of seconds is returned
+     *    });
+     * 
+ * @returns {Promise} resourcePromise object + * + */ + getRemainingTimeoutSeconds: function () { - /** - * @ngdoc method - * @name umbraco.resources.authResource#performRequestPasswordReset - * @methodOf umbraco.resources.authResource - * - * @description - * Checks to see if the provided email address is a valid user account and sends a link - * to allow them to reset their password - * - * ##usage - *
-         * authResource.performRequestPasswordReset(email)
-         *    .then(function(data) {
-         *        //Do stuff for password reset request...
-         *    });
-         * 
- * @param {string} email Email address of backoffice user - * @returns {Promise} resourcePromise object - * - */ - performRequestPasswordReset: function (email) { + return umbRequestHelper.resourcePromise( + $http.get( + umbRequestHelper.getApiUrl( + "authenticationApiBaseUrl", + "GetRemainingTimeoutSeconds")), + 'Server call failed for checking remaining seconds'); + } - if (!email) { - return angularHelper.rejectedPromise({ - errorMsg: 'Email address cannot be empty' - }); - } - - //TODO: This validation shouldn't really be done here, the validation on the login dialog - // is pretty hacky which is why this is here, ideally validation on the login dialog would - // be done properly. - var emailRegex = /\S+@\S+\.\S+/; - if (!emailRegex.test(email)) { - return angularHelper.rejectedPromise({ - errorMsg: 'Email address is not valid' - }); - } - - return umbRequestHelper.resourcePromise( - $http.post( - umbRequestHelper.getApiUrl( - "authenticationApiBaseUrl", - "PostRequestPasswordReset"), { - email: email - }), - 'Request password reset failed for email ' + email); - }, - - /** - * @ngdoc method - * @name umbraco.resources.authResource#performValidatePasswordResetCode - * @methodOf umbraco.resources.authResource - * - * @description - * Checks to see if the provided password reset code is valid - * - * ##usage - *
-         * authResource.performValidatePasswordResetCode(resetCode)
-         *    .then(function(data) {
-         *        //Allow reset of password
-         *    });
-         * 
- * @param {integer} userId User Id - * @param {string} resetCode Password reset code - * @returns {Promise} resourcePromise object - * - */ - performValidatePasswordResetCode: function (userId, resetCode) { - - if (!userId) { - return angularHelper.rejectedPromise({ - errorMsg: 'User Id cannot be empty' - }); - } - - if (!resetCode) { - return angularHelper.rejectedPromise({ - errorMsg: 'Reset code cannot be empty' - }); - } - - return umbRequestHelper.resourcePromise( - $http.post( - umbRequestHelper.getApiUrl( - "authenticationApiBaseUrl", - "PostValidatePasswordResetCode"), - { - userId: userId, - resetCode: resetCode - }), - 'Password reset code validation failed for userId ' + userId + ', code' + resetCode); - }, - - /** - * @ngdoc method - * @name umbraco.resources.authResource#performSetPassword - * @methodOf umbraco.resources.authResource - * - * @description - * Checks to see if the provided password reset code is valid and sets the user's password - * - * ##usage - *
-         * authResource.performSetPassword(userId, password, confirmPassword, resetCode)
-         *    .then(function(data) {
-         *        //Password set
-         *    });
-         * 
- * @param {integer} userId User Id - * @param {string} password New password - * @param {string} confirmPassword Confirmation of new password - * @param {string} resetCode Password reset code - * @returns {Promise} resourcePromise object - * - */ - performSetPassword: function (userId, password, confirmPassword, resetCode) { - - if (userId === undefined || userId === null) { - return angularHelper.rejectedPromise({ - errorMsg: 'User Id cannot be empty' - }); - } - - if (!password) { - return angularHelper.rejectedPromise({ - errorMsg: 'Password cannot be empty' - }); - } - - if (password !== confirmPassword) { - return angularHelper.rejectedPromise({ - errorMsg: 'Password and confirmation do not match' - }); - } - - if (!resetCode) { - return angularHelper.rejectedPromise({ - errorMsg: 'Reset code cannot be empty' - }); - } - - return umbRequestHelper.resourcePromise( - $http.post( - umbRequestHelper.getApiUrl( - "authenticationApiBaseUrl", - "PostSetPassword"), - { - userId: userId, - password: password, - resetCode: resetCode - }), - 'Password reset code validation failed for userId ' + userId); - }, - - unlinkLogin: function (loginProvider, providerKey) { - if (!loginProvider || !providerKey) { - return angularHelper.rejectedPromise({ - errorMsg: 'loginProvider or providerKey cannot be empty' - }); - } - - return umbRequestHelper.resourcePromise( - $http.post( - umbRequestHelper.getApiUrl( - "authenticationApiBaseUrl", - "PostUnLinkLogin"), { - loginProvider: loginProvider, - providerKey: providerKey - }), - 'Unlinking login provider failed'); - }, - - /** - * @ngdoc method - * @name umbraco.resources.authResource#performLogout - * @methodOf umbraco.resources.authResource - * - * @description - * Logs out the Umbraco backoffice user - * - * ##usage - *
-         * authResource.performLogout()
-         *    .then(function(data) {
-         *        //Do stuff for logging out...
-         *    });
-         * 
- * @returns {Promise} resourcePromise object - * - */ - performLogout: function() { - return umbRequestHelper.resourcePromise( - $http.post( - umbRequestHelper.getApiUrl( - "authenticationApiBaseUrl", - "PostLogout"))); - }, - - /** - * @ngdoc method - * @name umbraco.resources.authResource#getCurrentUser - * @methodOf umbraco.resources.authResource - * - * @description - * Sends a request to the server to get the current user details, will return a 401 if the user is not logged in - * - * ##usage - *
-         * authResource.getCurrentUser()
-         *    .then(function(data) {
-         *        //Do stuff for fetching the current logged in Umbraco backoffice user
-         *    });
-         * 
- * @returns {Promise} resourcePromise object - * - */ - getCurrentUser: function () { - - return umbRequestHelper.resourcePromise( - $http.get( - umbRequestHelper.getApiUrl( - "authenticationApiBaseUrl", - "GetCurrentUser")), - 'Server call failed for getting current user'); - }, - - getCurrentUserLinkedLogins: function () { - - return umbRequestHelper.resourcePromise( - $http.get( - umbRequestHelper.getApiUrl( - "authenticationApiBaseUrl", - "GetCurrentUserLinkedLogins")), - 'Server call failed for getting current users linked logins'); - }, - - /** - * @ngdoc method - * @name umbraco.resources.authResource#isAuthenticated - * @methodOf umbraco.resources.authResource - * - * @description - * Checks if the user is logged in or not - does not return 401 or 403 - * - * ##usage - *
-         * authResource.isAuthenticated()
-         *    .then(function(data) {
-         *        //Do stuff to check if user is authenticated
-         *    });
-         * 
- * @returns {Promise} resourcePromise object - * - */ - isAuthenticated: function () { - - return umbRequestHelper.resourcePromise( - $http.get( - umbRequestHelper.getApiUrl( - "authenticationApiBaseUrl", - "IsAuthenticated")), - { - success: function (data, status, headers, config) { - //if the response is false, they are not logged in so return a rejection - if (data === false || data === "false") { - return $q.reject('User is not logged in'); - } - return data; - }, - error: function (data, status, headers, config) { - return { - errorMsg: 'Server call failed for checking authentication', - data: data, - status: status - }; - } - }); - }, - - /** - * @ngdoc method - * @name umbraco.resources.authResource#getRemainingTimeoutSeconds - * @methodOf umbraco.resources.authResource - * - * @description - * Gets the user's remaining seconds before their login times out - * - * ##usage - *
-         * authResource.getRemainingTimeoutSeconds()
-         *    .then(function(data) {
-         *        //Number of seconds is returned
-         *    });
-         * 
- * @returns {Promise} resourcePromise object - * - */ - getRemainingTimeoutSeconds: function () { - - return umbRequestHelper.resourcePromise( - $http.get( - umbRequestHelper.getApiUrl( - "authenticationApiBaseUrl", - "GetRemainingTimeoutSeconds")), - 'Server call failed for checking remaining seconds'); - } - - }; + }; } angular.module('umbraco.resources').factory('authResource', authResource); diff --git a/src/Umbraco.Web.UI.Client/src/common/resources/content.resource.js b/src/Umbraco.Web.UI.Client/src/common/resources/content.resource.js index e629bb0beb..d24a29dc61 100644 --- a/src/Umbraco.Web.UI.Client/src/common/resources/content.resource.js +++ b/src/Umbraco.Web.UI.Client/src/common/resources/content.resource.js @@ -40,6 +40,25 @@ function contentResource($q, $http, umbDataFormatter, umbRequestHelper) { return { + + savePermissions: function (saveModel) { + if (!saveModel) { + throw "saveModel cannot be null"; + } + if (!saveModel.contentId) { + throw "saveModel.contentId cannot be null"; + } + if (!saveModel.permissions) { + throw "saveModel.permissions cannot be null"; + } + + return umbRequestHelper.resourcePromise( + $http.post(umbRequestHelper.getApiUrl("contentApiBaseUrl", "PostSaveUserGroupPermissions"), + saveModel), + 'Failed to save permissions'); + }, + + getRecycleBin: function () { return umbRequestHelper.resourcePromise( $http.get( @@ -554,6 +573,15 @@ function contentResource($q, $http, umbDataFormatter, umbRequestHelper) { 'Failed to check permission for item ' + id); }, + getDetailedPermissions: function (contentId) { + return umbRequestHelper.resourcePromise( + $http.get( + umbRequestHelper.getApiUrl( + "contentApiBaseUrl", + "GetDetailedPermissions", { contentId: contentId })), + 'Failed to retrieve permissions for content item ' + contentId); + }, + getPermissions: function (nodeIds) { return umbRequestHelper.resourcePromise( $http.post( diff --git a/src/Umbraco.Web.UI.Client/src/common/resources/currentuser.resource.js b/src/Umbraco.Web.UI.Client/src/common/resources/currentuser.resource.js index 5375c9507b..fadbb88bb7 100644 --- a/src/Umbraco.Web.UI.Client/src/common/resources/currentuser.resource.js +++ b/src/Umbraco.Web.UI.Client/src/common/resources/currentuser.resource.js @@ -7,47 +7,46 @@ **/ function currentUserResource($q, $http, umbRequestHelper) { - //the factory object returned - return { - - /** - * @ngdoc method - * @name umbraco.resources.currentUserResource#changePassword - * @methodOf umbraco.resources.currentUserResource - * - * @description - * Changes the current users password - * - * @returns {Promise} resourcePromise object containing the user array. - * - */ - changePassword: function (changePasswordArgs) { - return umbRequestHelper.resourcePromise( - $http.post( - umbRequestHelper.getApiUrl( - "currentUserApiBaseUrl", - "PostChangePassword"), - changePasswordArgs), - 'Failed to change password'); - }, - - /** - * @ngdoc method - * @name umbraco.resources.currentUserResource#getMembershipProviderConfig - * @methodOf umbraco.resources.currentUserResource - * - * @description - * Gets the configuration of the user membership provider which is used to configure the change password form - */ - getMembershipProviderConfig: function () { - return umbRequestHelper.resourcePromise( - $http.get( - umbRequestHelper.getApiUrl( - "currentUserApiBaseUrl", - "GetMembershipProviderConfig")), - 'Failed to retrieve membership provider config'); - }, - }; + //the factory object returned + return { + + performSetInvitedUserPassword: function (newPassword) { + + if (!newPassword) { + return angularHelper.rejectedPromise({ errorMsg: 'newPassword cannot be empty' }); + } + + return umbRequestHelper.resourcePromise( + $http.post( + umbRequestHelper.getApiUrl( + "currentUserApiBaseUrl", + "PostSetInvitedUserPassword"), + angular.toJson(newPassword)), + 'Failed to change password'); + }, + + /** + * @ngdoc method + * @name umbraco.resources.currentUserResource#changePassword + * @methodOf umbraco.resources.currentUserResource + * + * @description + * Changes the current users password + * + * @returns {Promise} resourcePromise object containing the user array. + * + */ + changePassword: function (changePasswordArgs) { + return umbRequestHelper.resourcePromise( + $http.post( + umbRequestHelper.getApiUrl( + "currentUserApiBaseUrl", + "PostChangePassword"), + changePasswordArgs), + 'Failed to change password'); + } + + }; } angular.module('umbraco.resources').factory('currentUserResource', currentUserResource); diff --git a/src/Umbraco.Web.UI.Client/src/common/resources/section.resource.js b/src/Umbraco.Web.UI.Client/src/common/resources/section.resource.js index a2a911ff50..23fab36897 100644 --- a/src/Umbraco.Web.UI.Client/src/common/resources/section.resource.js +++ b/src/Umbraco.Web.UI.Client/src/common/resources/section.resource.js @@ -14,14 +14,22 @@ function sectionResource($q, $http, umbRequestHelper) { return { /** Loads in the data to display the section list */ getSections: function () { - return umbRequestHelper.resourcePromise( $http.get( umbRequestHelper.getApiUrl( "sectionApiBaseUrl", "GetSections")), 'Failed to retrieve data for sections'); - + }, + + /** Loads in all available sections */ + getAllSections: function () { + return umbRequestHelper.resourcePromise( + $http.get( + umbRequestHelper.getApiUrl( + "sectionApiBaseUrl", + "GetAllSections")), + 'Failed to retrieve data for sections'); } }; } diff --git a/src/Umbraco.Web.UI.Client/src/common/resources/user.resource.js b/src/Umbraco.Web.UI.Client/src/common/resources/user.resource.js deleted file mode 100644 index 0c6f851eb0..0000000000 --- a/src/Umbraco.Web.UI.Client/src/common/resources/user.resource.js +++ /dev/null @@ -1,25 +0,0 @@ -/** - * @ngdoc service - * @name umbraco.resources.userResource - **/ -function userResource($q, $http, umbDataFormatter, umbRequestHelper) { - - return { - - disableUser: function (userId) { - - if (!userId) { - throw "userId not specified"; - } - - return umbRequestHelper.resourcePromise( - $http.post( - umbRequestHelper.getApiUrl( - "userApiBaseUrl", - "PostDisableUser", [{ userId: userId }])), - 'Failed to disable the user ' + userId); - } - }; -} - -angular.module('umbraco.resources').factory('userResource', userResource); diff --git a/src/Umbraco.Web.UI.Client/src/common/resources/usergroups.resource.js b/src/Umbraco.Web.UI.Client/src/common/resources/usergroups.resource.js new file mode 100644 index 0000000000..90d9e58736 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/common/resources/usergroups.resource.js @@ -0,0 +1,87 @@ +/** + * @ngdoc service + * @name umbraco.resources.usersResource + * @function + * + * @description + * Used by the users section to get users and send requests to create, invite, delete, etc. users. + */ +(function () { + 'use strict'; + + function userGroupsResource($http, umbRequestHelper, $q, umbDataFormatter) { + + function getUserGroupScaffold() { + + return umbRequestHelper.resourcePromise( + $http.get( + umbRequestHelper.getApiUrl( + "userGroupsApiBaseUrl", + "GetEmptyUserGroup")), + 'Failed to get the user group scaffold'); + } + + function saveUserGroup(userGroup, isNew) { + if (!userGroup) { + throw "userGroup not specified"; + } + + //need to convert the user data into the correctly formatted save data - it is *not* the same and we don't want to over-post + var formattedSaveData = umbDataFormatter.formatUserGroupPostData(userGroup, "save" + (isNew ? "New" : "")); + + return umbRequestHelper.resourcePromise( + $http.post( + umbRequestHelper.getApiUrl( + "userGroupsApiBaseUrl", + "PostSaveUserGroup"), + formattedSaveData), + "Failed to save user group"); + } + + function getUserGroup(id) { + + return umbRequestHelper.resourcePromise( + $http.get( + umbRequestHelper.getApiUrl( + "userGroupsApiBaseUrl", + "GetUserGroup", + { id: id })), + "Failed to retrieve data for user group " + id); + + } + + function getUserGroups() { + return umbRequestHelper.resourcePromise( + $http.get( + umbRequestHelper.getApiUrl( + "userGroupsApiBaseUrl", + "GetUserGroups")), + "Failed to retrieve user groups"); + } + + function deleteUserGroups(userGroupIds) { + var query = "userGroupIds=" + userGroupIds.join("&userGroupIds="); + return umbRequestHelper.resourcePromise( + $http.post( + umbRequestHelper.getApiUrl( + "userGroupsApiBaseUrl", + "PostDeleteUserGroups", + query)), + 'Failed to delete user groups'); + } + + var resource = { + saveUserGroup: saveUserGroup, + getUserGroup: getUserGroup, + getUserGroups: getUserGroups, + getUserGroupScaffold: getUserGroupScaffold, + deleteUserGroups: deleteUserGroups + }; + + return resource; + + } + + angular.module('umbraco.resources').factory('userGroupsResource', userGroupsResource); + +})(); diff --git a/src/Umbraco.Web.UI.Client/src/common/resources/users.resource.js b/src/Umbraco.Web.UI.Client/src/common/resources/users.resource.js new file mode 100644 index 0000000000..0acd30afe0 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/common/resources/users.resource.js @@ -0,0 +1,203 @@ +/** + * @ngdoc service + * @name umbraco.resources.usersResource + * @function + * + * @description + * Used by the users section to get users and send requests to create, invite, delete, etc. users. + */ +(function () { + 'use strict'; + + function usersResource($http, umbRequestHelper, $q, umbDataFormatter) { + + function clearAvatar(userId) { + + return umbRequestHelper.resourcePromise( + $http.post( + umbRequestHelper.getApiUrl( + "userApiBaseUrl", + "PostClearAvatar", + { id: userId })), + 'Failed to clear the user avatar ' + userId); + } + + function disableUsers(userIds) { + if (!userIds) { + throw "userIds not specified"; + } + + //we need to create a custom query string for the usergroup array, so create it now and we can append the user groups if needed + var qry = "userIds=" + userIds.join("&userIds="); + + + return umbRequestHelper.resourcePromise( + $http.post( + umbRequestHelper.getApiUrl( + "userApiBaseUrl", + "PostDisableUsers", qry)), + 'Failed to disable the users ' + userIds.join(",")); + } + + function enableUsers(userIds) { + if (!userIds) { + throw "userIds not specified"; + } + + //we need to create a custom query string for the usergroup array, so create it now and we can append the user groups if needed + var qry = "userIds=" + userIds.join("&userIds="); + + return umbRequestHelper.resourcePromise( + $http.post( + umbRequestHelper.getApiUrl( + "userApiBaseUrl", + "PostEnableUsers", qry)), + 'Failed to enable the users ' + userIds.join(",")); + } + + function setUserGroupsOnUsers(userGroups, userIds) { + var userGroupAliases = userGroups.map(function(o) { return o.alias; }); + var query = "userGroupAliases=" + userGroupAliases.join("&userGroupAliases=") + "&userIds=" + userIds.join("&userIds="); + return umbRequestHelper.resourcePromise( + $http.post( + umbRequestHelper.getApiUrl( + "userApiBaseUrl", + "PostSetUserGroupsOnUsers", + query)), + 'Failed to set user groups ' + userGroupAliases.join(",") + ' on the users ' + userIds.join(",")); + } + + function getPagedResults(options) { + var defaults = { + pageSize: 25, + pageNumber: 1, + filter: '', + orderDirection: "Ascending", + orderBy: "Username", + userGroups: [], + userStates: [] + }; + if (options === undefined) { + options = {}; + } + //overwrite the defaults if there are any specified + angular.extend(defaults, options); + //now copy back to the options we will use + options = defaults; + //change asc/desct + if (options.orderDirection === "asc") { + options.orderDirection = "Ascending"; + } + else if (options.orderDirection === "desc") { + options.orderDirection = "Descending"; + } + + var params = { + pageNumber: options.pageNumber, + pageSize: options.pageSize, + orderBy: options.orderBy, + orderDirection: options.orderDirection, + filter: options.filter + }; + //we need to create a custom query string for the usergroup array, so create it now and we can append the user groups if needed + var qry = umbRequestHelper.dictionaryToQueryString(params); + if (options.userGroups.length > 0) { + //we need to create a custom query string for an array + qry += "&userGroups=" + options.userGroups.join("&userGroups="); + } + if (options.userStates.length > 0) { + //we need to create a custom query string for an array + qry += "&userStates=" + options.userStates.join("&userStates="); + } + + return umbRequestHelper.resourcePromise( + $http.get( + umbRequestHelper.getApiUrl( + "userApiBaseUrl", + "GetPagedUsers", + qry)), + 'Failed to retrieve users paged result'); + } + + function getUser(userId) { + + return umbRequestHelper.resourcePromise( + $http.get( + umbRequestHelper.getApiUrl( + "userApiBaseUrl", + "GetById", + { id: userId })), + "Failed to retrieve data for user " + userId); + } + + function createUser(user) { + if (!user) { + throw "user not specified"; + } + + //need to convert the user data into the correctly formatted save data - it is *not* the same and we don't want to over-post + var formattedSaveData = umbDataFormatter.formatUserPostData(user); + + return umbRequestHelper.resourcePromise( + $http.post( + umbRequestHelper.getApiUrl( + "userApiBaseUrl", + "PostCreateUser"), + formattedSaveData), + "Failed to save user"); + } + + function inviteUser(user) { + if (!user) { + throw "user not specified"; + } + + //need to convert the user data into the correctly formatted save data - it is *not* the same and we don't want to over-post + var formattedSaveData = umbDataFormatter.formatUserPostData(user); + + return umbRequestHelper.resourcePromise( + $http.post( + umbRequestHelper.getApiUrl( + "userApiBaseUrl", + "PostInviteUser"), + formattedSaveData), + "Failed to invite user"); + } + + function saveUser(user) { + if (!user) { + throw "user not specified"; + } + + //need to convert the user data into the correctly formatted save data - it is *not* the same and we don't want to over-post + var formattedSaveData = umbDataFormatter.formatUserPostData(user); + + return umbRequestHelper.resourcePromise( + $http.post( + umbRequestHelper.getApiUrl( + "userApiBaseUrl", + "PostSaveUser"), + formattedSaveData), + "Failed to save user"); + } + + + var resource = { + disableUsers: disableUsers, + enableUsers: enableUsers, + setUserGroupsOnUsers: setUserGroupsOnUsers, + getPagedResults: getPagedResults, + getUser: getUser, + createUser: createUser, + inviteUser: inviteUser, + saveUser: saveUser, + clearAvatar: clearAvatar + }; + + return resource; + + } + + angular.module('umbraco.resources').factory('usersResource', usersResource); + +})(); diff --git a/src/Umbraco.Web.UI.Client/src/common/security/securityinterceptor.js b/src/Umbraco.Web.UI.Client/src/common/security/securityinterceptor.js index 024e8d5a43..6f5712a78d 100644 --- a/src/Umbraco.Web.UI.Client/src/common/security/securityinterceptor.js +++ b/src/Umbraco.Web.UI.Client/src/common/security/securityinterceptor.js @@ -1,6 +1,6 @@ angular.module('umbraco.security.interceptor') // This http interceptor listens for authentication successes and failures - .factory('securityInterceptor', ['$injector', 'securityRetryQueue', 'notificationsService', 'requestInterceptorFilter', function ($injector, queue, notifications, requestInterceptorFilter) { + .factory('securityInterceptor', ['$injector', 'securityRetryQueue', 'notificationsService', 'eventsService', 'requestInterceptorFilter', function ($injector, queue, notifications, eventsService, requestInterceptorFilter) { return function(promise) { return promise.then( @@ -16,6 +16,12 @@ angular.module('umbraco.security.interceptor') userService.setUserTimeout(headers["x-umb-user-seconds"]); } + //this checks if the user's values have changed, in which case we need to update the user details throughout + //the back office similar to how we do when a user logs in + if (headers["x-umb-user-modified"]) { + eventsService.emit("app.userRefresh"); + } + return promise; }, function(originalResponse) { // Intercept failed requests @@ -39,7 +45,7 @@ angular.module('umbraco.security.interceptor') } //A 401 means that the user is not logged in - if (originalResponse.status === 401) { + if (originalResponse.status === 401 && !originalResponse.config.url.endsWith("umbraco/backoffice/UmbracoApi/Authentication/GetCurrentUser")) { var userService = $injector.get('userService'); // see above @@ -96,7 +102,18 @@ angular.module('umbraco.security.interceptor') }); }; }]) - + //used to set headers on all requests where necessary + .factory('umbracoRequestInterceptor', function ($q, queryStrings) { + return { + //dealing with requests: + 'request': function(config) { + if (queryStrings.getParams().umbDebug === "true" || queryStrings.getParams().umbdebug === "true") { + config.headers["X-UMB-DEBUG"] = "true"; + } + return config; + } + }; + }) .value('requestInterceptorFilter', function() { return ["www.gravatar.com"]; }) @@ -104,4 +121,5 @@ angular.module('umbraco.security.interceptor') // We have to add the interceptor to the queue as a string because the interceptor depends upon service instances that are not available in the config block. .config(['$httpProvider', function ($httpProvider) { $httpProvider.responseInterceptors.push('securityInterceptor'); + $httpProvider.interceptors.push('umbracoRequestInterceptor'); }]); diff --git a/src/Umbraco.Web.UI.Client/src/common/services/contenteditinghelper.service.js b/src/Umbraco.Web.UI.Client/src/common/services/contenteditinghelper.service.js index 020ac9c710..d1014adc69 100644 --- a/src/Umbraco.Web.UI.Client/src/common/services/contenteditinghelper.service.js +++ b/src/Umbraco.Web.UI.Client/src/common/services/contenteditinghelper.service.js @@ -28,7 +28,8 @@ function contentEditingHelper(fileManager, $q, $location, $routeParams, notifica return { - /** Used by the content editor and mini content editor to perform saving operations */ + /** Used by the content editor and mini content editor to perform saving operations */ + //TODO: Make this a more helpful/reusable method for other form operations! we can simplify this form most forms contentEditorPerformSave: function (args) { if (!angular.isObject(args)) { throw "args must be an object"; diff --git a/src/Umbraco.Web.UI.Client/src/common/services/events.service.js b/src/Umbraco.Web.UI.Client/src/common/services/events.service.js index 5c1f606614..174cc8abe2 100644 --- a/src/Umbraco.Web.UI.Client/src/common/services/events.service.js +++ b/src/Umbraco.Web.UI.Client/src/common/services/events.service.js @@ -6,7 +6,10 @@ app.ready app.authenticated app.notAuthenticated - app.closeDialogs + app.closeDialogs + app.ysod + app.reInitialize + app.userRefresh */ function eventsService($q, $rootScope) { diff --git a/src/Umbraco.Web.UI.Client/src/common/services/formhelper.service.js b/src/Umbraco.Web.UI.Client/src/common/services/formhelper.service.js index 9dfa440a0e..5d5b509315 100644 --- a/src/Umbraco.Web.UI.Client/src/common/services/formhelper.service.js +++ b/src/Umbraco.Web.UI.Client/src/common/services/formhelper.service.js @@ -102,15 +102,24 @@ function formHelper(angularHelper, serverValidationManager, $timeout, notificati //clear the status args.scope[args.statusPropertyName] = null; - if (angular.isArray(args.notifications)) { - for (var i = 0; i < args.notifications.length; i++) { - notificationsService.showNotification(args.notifications[i]); - } - } + this.showNotifications(args); args.scope.$broadcast("formSubmitted", { scope: args.scope }); }, - + + showNotifications: function (args) { + if (!args || !args.notifications) { + return false; + } + if (angular.isArray(args.notifications)) { + for (var i = 0; i < args.notifications.length; i++) { + notificationsService.showNotification(args.notifications[i]); + } + return true; + } + return false; + }, + /** * @ngdoc function * @name umbraco.services.formHelper#handleError diff --git a/src/Umbraco.Web.UI.Client/src/common/services/listviewhelper.service.js b/src/Umbraco.Web.UI.Client/src/common/services/listviewhelper.service.js index 0bdc3bb524..84bb4333a2 100644 --- a/src/Umbraco.Web.UI.Client/src/common/services/listviewhelper.service.js +++ b/src/Umbraco.Web.UI.Client/src/common/services/listviewhelper.service.js @@ -269,12 +269,12 @@ var isSelected = false; for (var i = 0; selection.length > i; i++) { var selectedItem = selection[i]; - if (item.id === selectedItem.id) { + if (item.id === selectedItem.id || item.key === selectedItem.key) { isSelected = true; } } if (!isSelected) { - selection.push({ id: item.id }); + selection.push({ id: item.id, key: item.key }); item.selected = true; } } diff --git a/src/Umbraco.Web.UI.Client/src/common/services/mediatypehelper.service.js b/src/Umbraco.Web.UI.Client/src/common/services/mediatypehelper.service.js index 87804c8473..7e0e1db24f 100644 --- a/src/Umbraco.Web.UI.Client/src/common/services/mediatypehelper.service.js +++ b/src/Umbraco.Web.UI.Client/src/common/services/mediatypehelper.service.js @@ -23,6 +23,10 @@ function mediaTypeHelper(mediaTypeResource, $q) { getAllowedImagetypes: function (mediaId){ //TODO: This is horribly inneficient - why make one request per type!? + //This should make a call to c# to get exactly what it's looking for instead of returning every single media type and doing + //some filtering on the client side. + //This is also called multiple times when it's not needed! Example, when launching the media picker, this will be called twice + //which means we'll be making at least 6 REST calls to fetch each media type // Get All allowedTypes return mediaTypeResource.getAllowedTypes(mediaId) diff --git a/src/Umbraco.Web.UI.Client/src/common/services/search.service.js b/src/Umbraco.Web.UI.Client/src/common/services/search.service.js index f945070a2a..c692fda7ba 100644 --- a/src/Umbraco.Web.UI.Client/src/common/services/search.service.js +++ b/src/Umbraco.Web.UI.Client/src/common/services/search.service.js @@ -21,154 +21,140 @@ * */ angular.module('umbraco.services') -.factory('searchService', function ($q, $log, entityResource, contentResource, umbRequestHelper) { + .factory('searchService', function ($q, $log, entityResource, contentResource, umbRequestHelper, $injector, searchResultFormatter) { - function configureMemberResult(member) { - member.menuUrl = umbRequestHelper.getApiUrl("memberTreeBaseUrl", "GetMenu", [{ id: member.id }, { application: 'member' }]); - member.editorPath = "member/member/edit/" + (member.key ? member.key : member.id); - angular.extend(member.metaData, { treeAlias: "member" }); - member.subTitle = member.metaData.Email; - } - - function configureMediaResult(media) - { - media.menuUrl = umbRequestHelper.getApiUrl("mediaTreeBaseUrl", "GetMenu", [{ id: media.id }, { application: 'media' }]); - media.editorPath = "media/media/edit/" + media.id; - angular.extend(media.metaData, { treeAlias: "media" }); - } - - function configureContentResult(content) { - content.menuUrl = umbRequestHelper.getApiUrl("contentTreeBaseUrl", "GetMenu", [{ id: content.id }, { application: 'content' }]); - content.editorPath = "content/content/edit/" + content.id; - angular.extend(content.metaData, { treeAlias: "content" }); - content.subTitle = content.metaData.Url; - } + return { - return { + /** + * @ngdoc method + * @name umbraco.services.searchService#searchMembers + * @methodOf umbraco.services.searchService + * + * @description + * Searches the default member search index + * @param {Object} args argument object + * @param {String} args.term seach term + * @returns {Promise} returns promise containing all matching members + */ + searchMembers: function (args) { - /** - * @ngdoc method - * @name umbraco.services.searchService#searchMembers - * @methodOf umbraco.services.searchService - * - * @description - * Searches the default member search index - * @param {Object} args argument object - * @param {String} args.term seach term - * @returns {Promise} returns promise containing all matching members - */ - searchMembers: function(args) { + if (!args.term) { + throw "args.term is required"; + } - if (!args.term) { - throw "args.term is required"; - } - - return entityResource.search(args.term, "Member", args.searchFrom).then(function (data) { - _.each(data, function(item) { - configureMemberResult(item); - }); - return data; - }); - }, - - /** - * @ngdoc method - * @name umbraco.services.searchService#searchContent - * @methodOf umbraco.services.searchService - * - * @description - * Searches the default internal content search index - * @param {Object} args argument object - * @param {String} args.term seach term - * @returns {Promise} returns promise containing all matching content items - */ - searchContent: function(args) { - - if (!args.term) { - throw "args.term is required"; - } - - return entityResource.search(args.term, "Document", args.searchFrom, args.canceler).then(function (data) { - _.each(data, function (item) { - configureContentResult(item); + return entityResource.search(args.term, "Member", args.searchFrom).then(function (data) { + _.each(data, function (item) { + configureMemberResult(item); + }); + return data; }); - return data; - }); - }, + }, - /** - * @ngdoc method - * @name umbraco.services.searchService#searchMedia - * @methodOf umbraco.services.searchService - * - * @description - * Searches the default media search index - * @param {Object} args argument object - * @param {String} args.term seach term - * @returns {Promise} returns promise containing all matching media items - */ - searchMedia: function(args) { + /** + * @ngdoc method + * @name umbraco.services.searchService#searchContent + * @methodOf umbraco.services.searchService + * + * @description + * Searches the default internal content search index + * @param {Object} args argument object + * @param {String} args.term seach term + * @returns {Promise} returns promise containing all matching content items + */ + searchContent: function (args) { - if (!args.term) { - throw "args.term is required"; - } + if (!args.term) { + throw "args.term is required"; + } - return entityResource.search(args.term, "Media", args.searchFrom).then(function (data) { - _.each(data, function (item) { - configureMediaResult(item); + return entityResource.search(args.term, "Document", args.searchFrom, args.canceler).then(function (data) { + _.each(data, function (item) { + configureContentResult(item); + }); + return data; }); - return data; - }); - }, + }, - /** - * @ngdoc method - * @name umbraco.services.searchService#searchAll - * @methodOf umbraco.services.searchService - * - * @description - * Searches all available indexes and returns all results in one collection - * @param {Object} args argument object - * @param {String} args.term seach term - * @returns {Promise} returns promise containing all matching items - */ - searchAll: function (args) { - - if (!args.term) { - throw "args.term is required"; - } + /** + * @ngdoc method + * @name umbraco.services.searchService#searchMedia + * @methodOf umbraco.services.searchService + * + * @description + * Searches the default media search index + * @param {Object} args argument object + * @param {String} args.term seach term + * @returns {Promise} returns promise containing all matching media items + */ + searchMedia: function (args) { - return entityResource.searchAll(args.term, args.canceler).then(function (data) { + if (!args.term) { + throw "args.term is required"; + } - _.each(data, function(resultByType) { - switch(resultByType.type) { - case "Document": - _.each(resultByType.results, function (item) { - configureContentResult(item); - }); - break; - case "Media": - _.each(resultByType.results, function (item) { - configureMediaResult(item); - }); - break; - case "Member": - _.each(resultByType.results, function (item) { - configureMemberResult(item); - }); - break; - } + return entityResource.search(args.term, "Media", args.searchFrom).then(function (data) { + _.each(data, function (item) { + configureMediaResult(item); + }); + return data; + }); + }, + + /** + * @ngdoc method + * @name umbraco.services.searchService#searchAll + * @methodOf umbraco.services.searchService + * + * @description + * Searches all available indexes and returns all results in one collection + * @param {Object} args argument object + * @param {String} args.term seach term + * @returns {Promise} returns promise containing all matching items + */ + searchAll: function (args) { + + if (!args.term) { + throw "args.term is required"; + } + + return entityResource.searchAll(args.term, args.canceler).then(function (data) { + + _.each(data, function (resultByType) { + + //we need to format the search result data to include things like the subtitle, urls, etc... + // this is done with registered angular services as part of the SearchableTreeAttribute, if that + // is not found, than we format with the default formatter + var formatterMethod = searchResultFormatter.configureDefaultResult; + //check if a custom formatter is specified... + if (resultByType.jsSvc) { + var searchFormatterService = $injector.get(resultByType.jsSvc); + if (searchFormatterService) { + if (!resultByType.jsMethod) { + resultByType.jsMethod = "format"; + } + formatterMethod = searchFormatterService[resultByType.jsMethod]; + + if (!formatterMethod) { + throw "The method " + resultByType.jsMethod + " on the angular service " + resultByType.jsSvc + " could not be found"; + } + } + } + //now apply the formatter for each result + _.each(resultByType.results, function (item) { + formatterMethod.apply(this, [item, resultByType.treeAlias, resultByType.appAlias]); + }); + + }); + + return data; }); - return data; - }); - - }, + }, - //TODO: This doesn't do anything! - setCurrent: function(sectionAlias) { + //TODO: This doesn't do anything! + setCurrent: function (sectionAlias) { - var currentSection = sectionAlias; - } - }; -}); \ No newline at end of file + var currentSection = sectionAlias; + } + }; + }); \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/common/services/searchresultformatter.service.js b/src/Umbraco.Web.UI.Client/src/common/services/searchresultformatter.service.js new file mode 100644 index 0000000000..9bf9f3762c --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/common/services/searchresultformatter.service.js @@ -0,0 +1,37 @@ + +function searchResultFormatter(umbRequestHelper) { + + function configureDefaultResult(content, treeAlias, appAlias) { + content.editorPath = appAlias + "/" + treeAlias + "/edit/" + content.id; + angular.extend(content.metaData, { treeAlias: treeAlias }); + } + + function configureContentResult(content, treeAlias, appAlias) { + content.menuUrl = umbRequestHelper.getApiUrl("contentTreeBaseUrl", "GetMenu", [{ id: content.id }, { application: appAlias }]); + content.editorPath = appAlias + "/" + treeAlias + "/edit/" + content.id; + angular.extend(content.metaData, { treeAlias: treeAlias }); + content.subTitle = content.metaData.Url; + } + + function configureMemberResult(member, treeAlias, appAlias) { + member.menuUrl = umbRequestHelper.getApiUrl("memberTreeBaseUrl", "GetMenu", [{ id: member.id }, { application: appAlias }]); + member.editorPath = appAlias + "/" + treeAlias + "/edit/" + (member.key ? member.key : member.id); + angular.extend(member.metaData, { treeAlias: treeAlias }); + member.subTitle = member.metaData.Email; + } + + function configureMediaResult(media, treeAlias, appAlias) { + media.menuUrl = umbRequestHelper.getApiUrl("mediaTreeBaseUrl", "GetMenu", [{ id: media.id }, { application: appAlias }]); + media.editorPath = appAlias + "/" + treeAlias + "/edit/" + media.id; + angular.extend(media.metaData, { treeAlias: treeAlias }); + } + + return { + configureContentResult: configureContentResult, + configureMemberResult: configureMemberResult, + configureMediaResult: configureMediaResult, + configureDefaultResult: configureDefaultResult + }; +} + +angular.module('umbraco.services').factory('searchResultFormatter', searchResultFormatter); \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/common/services/umbdataformatter.service.js b/src/Umbraco.Web.UI.Client/src/common/services/umbdataformatter.service.js new file mode 100644 index 0000000000..75c7b02d55 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/common/services/umbdataformatter.service.js @@ -0,0 +1,326 @@ +(function () { + 'use strict'; + + /** + * @ngdoc service + * @name umbraco.services.umbDataFormatter + * @description A helper object used to format/transform JSON Umbraco data, mostly used for persisting data to the server + **/ + function umbDataFormatter() { + return { + + formatContentTypePostData: function (displayModel, action) { + + //create the save model from the display model + var saveModel = _.pick(displayModel, + 'compositeContentTypes', 'isContainer', 'allowAsRoot', 'allowedTemplates', 'allowedContentTypes', + 'alias', 'description', 'thumbnail', 'name', 'id', 'icon', 'trashed', + 'key', 'parentId', 'alias', 'path'); + + //TODO: Map these + saveModel.allowedTemplates = _.map(displayModel.allowedTemplates, function (t) { return t.alias; }); + saveModel.defaultTemplate = displayModel.defaultTemplate ? displayModel.defaultTemplate.alias : null; + var realGroups = _.reject(displayModel.groups, function (g) { + //do not include these tabs + return g.tabState === "init"; + }); + saveModel.groups = _.map(realGroups, function (g) { + + var saveGroup = _.pick(g, 'inherited', 'id', 'sortOrder', 'name'); + + var realProperties = _.reject(g.properties, function (p) { + //do not include these properties + return p.propertyState === "init" || p.inherited === true; + }); + + var saveProperties = _.map(realProperties, function (p) { + var saveProperty = _.pick(p, 'id', 'alias', 'description', 'validation', 'label', 'sortOrder', 'dataTypeId', 'groupId', 'memberCanEdit', 'showOnMemberProfile'); + return saveProperty; + }); + + saveGroup.properties = saveProperties; + + //if this is an inherited group and there are not non-inherited properties on it, then don't send up the data + if (saveGroup.inherited === true && saveProperties.length === 0) { + return null; + } + + return saveGroup; + }); + + //we don't want any null groups + saveModel.groups = _.reject(saveModel.groups, function (g) { + return !g; + }); + + return saveModel; + }, + + /** formats the display model used to display the data type to the model used to save the data type */ + formatDataTypePostData: function (displayModel, preValues, action) { + var saveModel = { + parentId: displayModel.parentId, + id: displayModel.id, + name: displayModel.name, + selectedEditor: displayModel.selectedEditor, + //set the action on the save model + action: action, + preValues: [] + }; + for (var i = 0; i < preValues.length; i++) { + + saveModel.preValues.push({ + key: preValues[i].alias, + value: preValues[i].value + }); + } + return saveModel; + }, + + /** formats the display model used to display the user to the model used to save the user */ + formatUserPostData: function (displayModel) { + + //create the save model from the display model + var saveModel = _.pick(displayModel, 'id', 'parentId', 'name', 'username', 'culture', 'email', 'startContentIds', 'startMediaIds', 'userGroups', 'message', 'changePassword'); + + //make sure the userGroups are just a string array + var currGroups = saveModel.userGroups; + var formattedGroups = []; + for (var i = 0; i < currGroups.length; i++) { + if (!angular.isString(currGroups[i])) { + formattedGroups.push(currGroups[i].alias); + } + else { + formattedGroups.push(currGroups[i]); + } + } + saveModel.userGroups = formattedGroups; + + //make sure the startnodes are just a string array + var props = ["startContentIds", "startMediaIds"]; + for (var m = 0; m < props.length; m++) { + var startIds = saveModel[props[m]]; + if (!startIds) { + continue; + } + var formattedIds = []; + for (var j = 0; j < startIds.length; j++) { + formattedIds.push(Number(startIds[j].id)); + } + saveModel[props[m]] = formattedIds; + } + + return saveModel; + }, + + /** formats the display model used to display the user group to the model used to save the user group*/ + formatUserGroupPostData: function (displayModel, action) { + //create the save model from the display model + var saveModel = _.pick(displayModel, 'id', 'alias', 'name', 'icon', 'sections', 'users', 'defaultPermissions', 'assignedPermissions'); + + // the start nodes cannot be picked as the property name needs to change - assign manually + saveModel.startContentId = displayModel['contentStartNode']; + saveModel.startMediaId = displayModel['mediaStartNode']; + + //set the action on the save model + saveModel.action = action; + if (!saveModel.id) { + saveModel.id = 0; + } + + //the permissions need to just be the array of permission letters, currently it will be a dictionary of an array + var currDefaultPermissions = saveModel.defaultPermissions; + var saveDefaultPermissions = []; + _.each(currDefaultPermissions, function (value, key, list) { + _.each(value, function (element, index, list) { + if (element.checked) { + saveDefaultPermissions.push(element.permissionCode); + } + }); + }); + saveModel.defaultPermissions = saveDefaultPermissions; + + //now format that assigned/content permissions + var currAssignedPermissions = saveModel.assignedPermissions; + var saveAssignedPermissions = {}; + _.each(currAssignedPermissions, function (nodePermissions, index) { + saveAssignedPermissions[nodePermissions.id] = []; + _.each(nodePermissions.allowedPermissions, function (permission, index) { + if (permission.checked) { + saveAssignedPermissions[nodePermissions.id].push(permission.permissionCode); + } + }); + }); + saveModel.assignedPermissions = saveAssignedPermissions; + + + //make sure the sections are just a string array + var currSections = saveModel.sections; + var formattedSections = []; + for (var i = 0; i < currSections.length; i++) { + if (!angular.isString(currSections[i])) { + formattedSections.push(currSections[i].alias); + } + else { + formattedSections.push(currSections[i]); + } + } + saveModel.sections = formattedSections; + + //make sure the user are just an int array + var currUsers = saveModel.users; + var formattedUsers = []; + for (var j = 0; j < currUsers.length; j++) { + if (!angular.isNumber(currUsers[j])) { + formattedUsers.push(currUsers[j].id); + } + else { + formattedUsers.push(currUsers[j]); + } + } + saveModel.users = formattedUsers; + + //make sure the startnodes are just an int if one is set + var props = ["startContentId", "startMediaId"]; + for (var m = 0; m < props.length; m++) { + var startId = saveModel[props[m]]; + if (!startId) { + continue; + } + saveModel[props[m]] = startId.id; + } + + saveModel.parentId = -1; + return saveModel; + }, + + /** formats the display model used to display the member to the model used to save the member */ + formatMemberPostData: function (displayModel, action) { + //this is basically the same as for media but we need to explicitly add the username,email, password to the save model + + var saveModel = this.formatMediaPostData(displayModel, action); + + saveModel.key = displayModel.key; + + var genericTab = _.find(displayModel.tabs, function (item) { + return item.id === 0; + }); + + //map the member login, email, password and groups + var propLogin = _.find(genericTab.properties, function (item) { + return item.alias === "_umb_login"; + }); + var propEmail = _.find(genericTab.properties, function (item) { + return item.alias === "_umb_email"; + }); + var propPass = _.find(genericTab.properties, function (item) { + return item.alias === "_umb_password"; + }); + var propGroups = _.find(genericTab.properties, function (item) { + return item.alias === "_umb_membergroup"; + }); + saveModel.email = propEmail.value; + saveModel.username = propLogin.value; + saveModel.password = propPass.value; + + var selectedGroups = []; + for (var n in propGroups.value) { + if (propGroups.value[n] === true) { + selectedGroups.push(n); + } + } + saveModel.memberGroups = selectedGroups; + + //turn the dictionary into an array of pairs + var memberProviderPropAliases = _.pairs(displayModel.fieldConfig); + _.each(displayModel.tabs, function (tab) { + _.each(tab.properties, function (prop) { + var foundAlias = _.find(memberProviderPropAliases, function (item) { + return prop.alias === item[1]; + }); + if (foundAlias) { + //we know the current property matches an alias, now we need to determine which membership provider property it was for + // by looking at the key + switch (foundAlias[0]) { + case "umbracoMemberLockedOut": + saveModel.isLockedOut = prop.value.toString() === "1" ? true : false; + break; + case "umbracoMemberApproved": + saveModel.isApproved = prop.value.toString() === "1" ? true : false; + break; + case "umbracoMemberComments": + saveModel.comments = prop.value; + break; + } + } + }); + }); + + + + return saveModel; + }, + + /** formats the display model used to display the media to the model used to save the media */ + formatMediaPostData: function (displayModel, action) { + //NOTE: the display model inherits from the save model so we can in theory just post up the display model but + // we don't want to post all of the data as it is unecessary. + var saveModel = { + id: displayModel.id, + properties: [], + name: displayModel.name, + contentTypeAlias: displayModel.contentTypeAlias, + parentId: displayModel.parentId, + //set the action on the save model + action: action + }; + + _.each(displayModel.tabs, function (tab) { + + _.each(tab.properties, function (prop) { + + //don't include the custom generic tab properties + if (!prop.alias.startsWith("_umb_")) { + saveModel.properties.push({ + id: prop.id, + alias: prop.alias, + value: prop.value + }); + } + + }); + }); + + return saveModel; + }, + + /** formats the display model used to display the content to the model used to save the content */ + formatContentPostData: function (displayModel, action) { + + //this is basically the same as for media but we need to explicitly add some extra properties + var saveModel = this.formatMediaPostData(displayModel, action); + + var genericTab = _.find(displayModel.tabs, function (item) { + return item.id === 0; + }); + + var propExpireDate = _.find(genericTab.properties, function (item) { + return item.alias === "_umb_expiredate"; + }); + var propReleaseDate = _.find(genericTab.properties, function (item) { + return item.alias === "_umb_releasedate"; + }); + var propTemplate = _.find(genericTab.properties, function (item) { + return item.alias === "_umb_template"; + }); + saveModel.expireDate = propExpireDate ? propExpireDate.value : null; + saveModel.releaseDate = propReleaseDate ? propReleaseDate.value : null; + saveModel.templateAlias = propTemplate ? propTemplate.value : null; + + return saveModel; + } + }; + } + angular.module('umbraco.services').factory('umbDataFormatter', umbDataFormatter); + +})(); \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/common/services/umbrequesthelper.service.js b/src/Umbraco.Web.UI.Client/src/common/services/umbrequesthelper.service.js index a3d1e5b0c6..3732e25403 100644 --- a/src/Umbraco.Web.UI.Client/src/common/services/umbrequesthelper.service.js +++ b/src/Umbraco.Web.UI.Client/src/common/services/umbrequesthelper.service.js @@ -37,7 +37,7 @@ function umbRequestHelper($http, $q, umbDataFormatter, angularHelper, dialogServ * @function * * @description - * This will turn an array of key/value pairs into a query string + * This will turn an array of key/value pairs or a standard dictionary into a query string * * @param {Array} queryStrings An array of key/value pairs */ diff --git a/src/Umbraco.Web.UI.Client/src/common/services/user.service.js b/src/Umbraco.Web.UI.Client/src/common/services/user.service.js index 262b06dd50..f20c3df44f 100644 --- a/src/Umbraco.Web.UI.Client/src/common/services/user.service.js +++ b/src/Umbraco.Web.UI.Client/src/common/services/user.service.js @@ -1,272 +1,285 @@ angular.module('umbraco.services') - .factory('userService', function ($rootScope, eventsService, $q, $location, $log, securityRetryQueue, authResource, dialogService, $timeout, angularHelper, $http) { + .factory('userService', function ($rootScope, eventsService, $q, $location, $log, securityRetryQueue, authResource, dialogService, $timeout, angularHelper, $http) { - var currentUser = null; - var lastUserId = null; - var loginDialog = null; - - //this tracks the last date/time that the user's remainingAuthSeconds was updated from the server - // this is used so that we know when to go and get the user's remaining seconds directly. - var lastServerTimeoutSet = null; + var currentUser = null; + var lastUserId = null; + var loginDialog = null; - function openLoginDialog(isTimedOut) { - if (!loginDialog) { - loginDialog = dialogService.open({ + //this tracks the last date/time that the user's remainingAuthSeconds was updated from the server + // this is used so that we know when to go and get the user's remaining seconds directly. + var lastServerTimeoutSet = null; - //very special flag which means that global events cannot close this dialog - manualClose: true, + function openLoginDialog(isTimedOut) { + if (!loginDialog) { + loginDialog = dialogService.open({ - template: 'views/common/dialogs/login.html', - modalClass: "login-overlay", - animation: "slide", - show: true, - callback: onLoginDialogClose, - dialogData: { - isTimedOut: isTimedOut - } + //very special flag which means that global events cannot close this dialog + manualClose: true, + + template: 'views/common/dialogs/login.html', + modalClass: "login-overlay", + animation: "slide", + show: true, + callback: onLoginDialogClose, + dialogData: { + isTimedOut: isTimedOut + } + }); + } + } + + function onLoginDialogClose(success) { + loginDialog = null; + + if (success) { + securityRetryQueue.retryAll(currentUser.name); + } + else { + securityRetryQueue.cancelAll(); + $location.path('/'); + } + } + + /** + This methods will set the current user when it is resolved and + will then start the counter to count in-memory how many seconds they have + remaining on the auth session + */ + function setCurrentUser(usr) { + if (!usr.remainingAuthSeconds) { + throw "The user object is invalid, the remainingAuthSeconds is required."; + } + currentUser = usr; + lastServerTimeoutSet = new Date(); + //start the timer + countdownUserTimeout(); + } + + /** + Method to count down the current user's timeout seconds, + this will continually count down their current remaining seconds every 5 seconds until + there are no more seconds remaining. + */ + function countdownUserTimeout() { + + $timeout(function () { + + if (currentUser) { + //countdown by 5 seconds since that is how long our timer is for. + currentUser.remainingAuthSeconds -= 5; + + //if there are more than 30 remaining seconds, recurse! + if (currentUser.remainingAuthSeconds > 30) { + + //we need to check when the last time the timeout was set from the server, if + // it has been more than 30 seconds then we'll manually go and retrieve it from the + // server - this helps to keep our local countdown in check with the true timeout. + if (lastServerTimeoutSet != null) { + var now = new Date(); + var seconds = (now.getTime() - lastServerTimeoutSet.getTime()) / 1000; + + if (seconds > 30) { + + //first we'll set the lastServerTimeoutSet to null - this is so we don't get back in to this loop while we + // wait for a response from the server otherwise we'll be making double/triple/etc... calls while we wait. + lastServerTimeoutSet = null; + + //now go get it from the server + //NOTE: the safeApply because our timeout is set to not run digests (performance reasons) + angularHelper.safeApply($rootScope, function () { + authResource.getRemainingTimeoutSeconds().then(function (result) { + setUserTimeoutInternal(result); + }); }); + } } - } - function onLoginDialogClose(success) { - loginDialog = null; + //recurse the countdown! + countdownUserTimeout(); + } + else { - if (success) { - securityRetryQueue.retryAll(currentUser.name); + //we are either timed out or very close to timing out so we need to show the login dialog. + if (Umbraco.Sys.ServerVariables.umbracoSettings.keepUserLoggedIn !== true) { + //NOTE: the safeApply because our timeout is set to not run digests (performance reasons) + angularHelper.safeApply($rootScope, function () { + try { + //NOTE: We are calling this again so that the server can create a log that the timeout has expired, we + // don't actually care about this result. + authResource.getRemainingTimeoutSeconds(); + } + finally { + userAuthExpired(); + } + }); } else { - securityRetryQueue.cancelAll(); - $location.path('/'); + //we've got less than 30 seconds remaining so let's check the server + + if (lastServerTimeoutSet != null) { + //first we'll set the lastServerTimeoutSet to null - this is so we don't get back in to this loop while we + // wait for a response from the server otherwise we'll be making double/triple/etc... calls while we wait. + lastServerTimeoutSet = null; + + //now go get it from the server + //NOTE: the safeApply because our timeout is set to not run digests (performance reasons) + angularHelper.safeApply($rootScope, function () { + authResource.getRemainingTimeoutSeconds().then(function (result) { + setUserTimeoutInternal(result); + }); + }); + } + + //recurse the countdown! + countdownUserTimeout(); + } + } } + }, 5000, //every 5 seconds + false); //false = do NOT execute a digest for every iteration + } - /** - This methods will set the current user when it is resolved and - will then start the counter to count in-memory how many seconds they have - remaining on the auth session - */ - function setCurrentUser(usr) { - if (!usr.remainingAuthSeconds) { - throw "The user object is invalid, the remainingAuthSeconds is required."; - } - currentUser = usr; - lastServerTimeoutSet = new Date(); - //start the timer - countdownUserTimeout(); - } - - /** - Method to count down the current user's timeout seconds, - this will continually count down their current remaining seconds every 5 seconds until - there are no more seconds remaining. - */ - function countdownUserTimeout() { - - $timeout(function () { - - if (currentUser) { - //countdown by 5 seconds since that is how long our timer is for. - currentUser.remainingAuthSeconds -= 5; - - //if there are more than 30 remaining seconds, recurse! - if (currentUser.remainingAuthSeconds > 30) { - - //we need to check when the last time the timeout was set from the server, if - // it has been more than 30 seconds then we'll manually go and retrieve it from the - // server - this helps to keep our local countdown in check with the true timeout. - if (lastServerTimeoutSet != null) { - var now = new Date(); - var seconds = (now.getTime() - lastServerTimeoutSet.getTime()) / 1000; - - if (seconds > 30) { - - //first we'll set the lastServerTimeoutSet to null - this is so we don't get back in to this loop while we - // wait for a response from the server otherwise we'll be making double/triple/etc... calls while we wait. - lastServerTimeoutSet = null; - - //now go get it from the server - //NOTE: the safeApply because our timeout is set to not run digests (performance reasons) - angularHelper.safeApply($rootScope, function () { - authResource.getRemainingTimeoutSeconds().then(function (result) { - setUserTimeoutInternal(result); - }); - }); - } - } - - //recurse the countdown! - countdownUserTimeout(); - } - else { - - //we are either timed out or very close to timing out so we need to show the login dialog. - if (Umbraco.Sys.ServerVariables.umbracoSettings.keepUserLoggedIn !== true) { - //NOTE: the safeApply because our timeout is set to not run digests (performance reasons) - angularHelper.safeApply($rootScope, function () { - try { - //NOTE: We are calling this again so that the server can create a log that the timeout has expired, we - // don't actually care about this result. - authResource.getRemainingTimeoutSeconds(); - } - finally { - userAuthExpired(); - } - }); - } - else { - //we've got less than 30 seconds remaining so let's check the server - - if (lastServerTimeoutSet != null) { - //first we'll set the lastServerTimeoutSet to null - this is so we don't get back in to this loop while we - // wait for a response from the server otherwise we'll be making double/triple/etc... calls while we wait. - lastServerTimeoutSet = null; - - //now go get it from the server - //NOTE: the safeApply because our timeout is set to not run digests (performance reasons) - angularHelper.safeApply($rootScope, function () { - authResource.getRemainingTimeoutSeconds().then(function (result) { - setUserTimeoutInternal(result); - }); - }); - } - - //recurse the countdown! - countdownUserTimeout(); - - } - } - } - }, 5000, //every 5 seconds - false); //false = do NOT execute a digest for every iteration - } - - /** Called to update the current user's timeout */ - function setUserTimeoutInternal(newTimeout) { + /** Called to update the current user's timeout */ + function setUserTimeoutInternal(newTimeout) { - var asNumber = parseFloat(newTimeout); - if (!isNaN(asNumber) && currentUser && angular.isNumber(asNumber)) { - currentUser.remainingAuthSeconds = newTimeout; - lastServerTimeoutSet = new Date(); - } - } + var asNumber = parseFloat(newTimeout); + if (!isNaN(asNumber) && currentUser && angular.isNumber(asNumber)) { + currentUser.remainingAuthSeconds = newTimeout; + lastServerTimeoutSet = new Date(); + } + } - /** resets all user data, broadcasts the notAuthenticated event and shows the login dialog */ - function userAuthExpired(isLogout) { - //store the last user id and clear the user - if (currentUser && currentUser.id !== undefined) { - lastUserId = currentUser.id; - } + /** resets all user data, broadcasts the notAuthenticated event and shows the login dialog */ + function userAuthExpired(isLogout) { + //store the last user id and clear the user + if (currentUser && currentUser.id !== undefined) { + lastUserId = currentUser.id; + } - if (currentUser) { - currentUser.remainingAuthSeconds = 0; - } + if (currentUser) { + currentUser.remainingAuthSeconds = 0; + } - lastServerTimeoutSet = null; - currentUser = null; + lastServerTimeoutSet = null; + currentUser = null; - //broadcast a global event that the user is no longer logged in - eventsService.emit("app.notAuthenticated"); + //broadcast a global event that the user is no longer logged in + eventsService.emit("app.notAuthenticated"); - openLoginDialog(isLogout === undefined ? true : !isLogout); - } - - // Register a handler for when an item is added to the retry queue - securityRetryQueue.onItemAddedCallbacks.push(function (retryItem) { - if (securityRetryQueue.hasMore()) { - userAuthExpired(); - } - }); - - return { - - /** Internal method to display the login dialog */ - _showLoginDialog: function () { - openLoginDialog(); - }, - /** Returns a promise, sends a request to the server to check if the current cookie is authorized */ - isAuthenticated: function () { - //if we've got a current user then just return true - if (currentUser) { - var deferred = $q.defer(); - deferred.resolve(true); - return deferred.promise; - } - return authResource.isAuthenticated(); - }, - - /** Returns a promise, sends a request to the server to validate the credentials */ - authenticate: function (login, password) { - - return authResource.performLogin(login, password) - .then(this.setAuthenticationSuccessful); - }, - setAuthenticationSuccessful:function (data) { - - //when it's successful, return the user data - setCurrentUser(data); - - var result = { user: data, authenticated: true, lastUserId: lastUserId, loginType: "credentials" }; - - //broadcast a global event - eventsService.emit("app.authenticated", result); - return result; - }, - - /** Logs the user out - */ - logout: function () { - - return authResource.performLogout() - .then(function(data) { - userAuthExpired(); - //done! - return null; - }); - }, - - /** Returns the current user object in a promise */ - getCurrentUser: function (args) { - var deferred = $q.defer(); - - if (!currentUser) { - authResource.getCurrentUser() - .then(function (data) { - - var result = { user: data, authenticated: true, lastUserId: lastUserId, loginType: "implicit" }; - - //TODO: This is a mega backwards compatibility hack... These variables SHOULD NOT exist in the server variables - // since they are not supposed to be dynamic but I accidentally added them there in 7.1.5 IIRC so some people might - // now be relying on this :( - if (Umbraco && Umbraco.Sys && Umbraco.Sys.ServerVariables) { - Umbraco.Sys.ServerVariables["security"] = { - startContentId: data.startContentId, - startMediaId: data.startMediaId - }; - } - - if (args && args.broadcastEvent) { - //broadcast a global event, will inform listening controllers to load in the user specific data - eventsService.emit("app.authenticated", result); - } - - setCurrentUser(data); - - deferred.resolve(currentUser); - }); - - } - else { - deferred.resolve(currentUser); - } - - return deferred.promise; - }, - - /** Called whenever a server request is made that contains a x-umb-user-seconds response header for which we can update the user's remaining timeout seconds */ - setUserTimeout: function (newTimeout) { - setUserTimeoutInternal(newTimeout); - } - }; + openLoginDialog(isLogout === undefined ? true : !isLogout); + } + // Register a handler for when an item is added to the retry queue + securityRetryQueue.onItemAddedCallbacks.push(function (retryItem) { + if (securityRetryQueue.hasMore()) { + userAuthExpired(); + } }); + + return { + + /** Internal method to display the login dialog */ + _showLoginDialog: function () { + openLoginDialog(); + }, + /** Returns a promise, sends a request to the server to check if the current cookie is authorized */ + isAuthenticated: function () { + //if we've got a current user then just return true + if (currentUser) { + var deferred = $q.defer(); + deferred.resolve(true); + return deferred.promise; + } + return authResource.isAuthenticated(); + }, + + /** Returns a promise, sends a request to the server to validate the credentials */ + authenticate: function (login, password) { + + return authResource.performLogin(login, password) + .then(this.setAuthenticationSuccessful); + }, + setAuthenticationSuccessful: function (data) { + + //when it's successful, return the user data + setCurrentUser(data); + + var result = { user: data, authenticated: true, lastUserId: lastUserId, loginType: "credentials" }; + + //broadcast a global event + eventsService.emit("app.authenticated", result); + return result; + }, + + /** Logs the user out + */ + logout: function () { + + return authResource.performLogout() + .then(function (data) { + userAuthExpired(); + //done! + return null; + }); + }, + + /** Refreshes the current user data with the data stored for the user on the server and returns it */ + refreshCurrentUser: function() { + var deferred = $q.defer(); + + authResource.getCurrentUser() + .then(function (data) { + + var result = { user: data, authenticated: true, lastUserId: lastUserId, loginType: "implicit" }; + + setCurrentUser(data); + + deferred.resolve(currentUser); + }, function () { + //it failed, so they are not logged in + deferred.reject(); + }); + + return deferred.promise; + }, + + /** Returns the current user object in a promise */ + getCurrentUser: function (args) { + var deferred = $q.defer(); + + if (!currentUser) { + authResource.getCurrentUser() + .then(function (data) { + + var result = { user: data, authenticated: true, lastUserId: lastUserId, loginType: "implicit" }; + + if (args && args.broadcastEvent) { + //broadcast a global event, will inform listening controllers to load in the user specific data + eventsService.emit("app.authenticated", result); + } + + setCurrentUser(data); + + deferred.resolve(currentUser); + }, function () { + //it failed, so they are not logged in + deferred.reject(); + }); + + } + else { + deferred.resolve(currentUser); + } + + return deferred.promise; + }, + + /** Called whenever a server request is made that contains a x-umb-user-seconds response header for which we can update the user's remaining timeout seconds */ + setUserTimeout: function (newTimeout) { + setUserTimeoutInternal(newTimeout); + } + }; + + }); diff --git a/src/Umbraco.Web.UI.Client/src/common/services/usershelper.service.js b/src/Umbraco.Web.UI.Client/src/common/services/usershelper.service.js new file mode 100644 index 0000000000..dc0c4fe160 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/common/services/usershelper.service.js @@ -0,0 +1,67 @@ +(function () { + 'use strict'; + + function usersHelperService(localizationService) { + + var userStates = [ + { "name": "All", "key": "All"} , + { "value": 0, "name": "Active", "key": "Active", "color": "success" }, + { "value": 1, "name": "Disabled", "key": "Disabled", "color": "danger" }, + { "value": 2, "name": "Locked out", "key": "LockedOut", "color": "danger" }, + { "value": 3, "name": "Invited", "key": "Invited", "color": "warning" } + ]; + + function getUserStateFromValue(value) { + var foundUserState; + angular.forEach(userStates, function (userState) { + if(userState.value === value) { + foundUserState = userState; + } + }); + return foundUserState; + } + + function getUserStateByKey(key) { + var foundUserState; + angular.forEach(userStates, function (userState) { + if(userState.key === key) { + foundUserState = userState; + } + }); + return foundUserState; + } + + function getUserStatesFilter(userStatesObject) { + + var userStatesFilter = []; + + for (var key in userStatesObject) { + if (userStatesObject.hasOwnProperty(key)) { + var userState = getUserStateByKey(key); + if(userState) { + userState.count = userStatesObject[key]; + userStatesFilter.push(userState); + } + } + } + + return userStatesFilter; + + } + + //////////// + + var service = { + getUserStateFromValue: getUserStateFromValue, + getUserStateByKey: getUserStateByKey, + getUserStatesFilter: getUserStatesFilter + }; + + return service; + + } + + angular.module('umbraco.services').factory('usersHelper', usersHelperService); + + +})(); diff --git a/src/Umbraco.Web.UI.Client/src/common/services/util.service.js b/src/Umbraco.Web.UI.Client/src/common/services/util.service.js index 2ffecaddef..067ef60492 100644 --- a/src/Umbraco.Web.UI.Client/src/common/services/util.service.js +++ b/src/Umbraco.Web.UI.Client/src/common/services/util.service.js @@ -1,420 +1,420 @@ /*Contains multiple services for various helper tasks */ function versionHelper() { - return { + return { - //see: https://gist.github.com/TheDistantSea/8021359 - versionCompare: function(v1, v2, options) { - var lexicographical = options && options.lexicographical, - zeroExtend = options && options.zeroExtend, - v1parts = v1.split('.'), - v2parts = v2.split('.'); + //see: https://gist.github.com/TheDistantSea/8021359 + versionCompare: function (v1, v2, options) { + var lexicographical = options && options.lexicographical, + zeroExtend = options && options.zeroExtend, + v1parts = v1.split('.'), + v2parts = v2.split('.'); - function isValidPart(x) { - return (lexicographical ? /^\d+[A-Za-z]*$/ : /^\d+$/).test(x); - } + function isValidPart(x) { + return (lexicographical ? /^\d+[A-Za-z]*$/ : /^\d+$/).test(x); + } - if (!v1parts.every(isValidPart) || !v2parts.every(isValidPart)) { - return NaN; - } + if (!v1parts.every(isValidPart) || !v2parts.every(isValidPart)) { + return NaN; + } - if (zeroExtend) { - while (v1parts.length < v2parts.length) { - v1parts.push("0"); - } - while (v2parts.length < v1parts.length) { - v2parts.push("0"); - } - } - - if (!lexicographical) { - v1parts = v1parts.map(Number); - v2parts = v2parts.map(Number); - } - - for (var i = 0; i < v1parts.length; ++i) { - if (v2parts.length === i) { - return 1; - } - - if (v1parts[i] === v2parts[i]) { - continue; - } - else if (v1parts[i] > v2parts[i]) { - return 1; - } - else { - return -1; - } - } - - if (v1parts.length !== v2parts.length) { - return -1; - } - - return 0; + if (zeroExtend) { + while (v1parts.length < v2parts.length) { + v1parts.push("0"); } - }; + while (v2parts.length < v1parts.length) { + v2parts.push("0"); + } + } + + if (!lexicographical) { + v1parts = v1parts.map(Number); + v2parts = v2parts.map(Number); + } + + for (var i = 0; i < v1parts.length; ++i) { + if (v2parts.length === i) { + return 1; + } + + if (v1parts[i] === v2parts[i]) { + continue; + } + else if (v1parts[i] > v2parts[i]) { + return 1; + } + else { + return -1; + } + } + + if (v1parts.length !== v2parts.length) { + return -1; + } + + return 0; + } + }; } angular.module('umbraco.services').factory('versionHelper', versionHelper); function dateHelper() { - return { - - convertToServerStringTime: function(momentLocal, serverOffsetMinutes, format) { + return { - //get the formatted offset time in HH:mm (server time offset is in minutes) - var formattedOffset = (serverOffsetMinutes > 0 ? "+" : "-") + - moment() - .startOf('day') - .minutes(Math.abs(serverOffsetMinutes)) - .format('HH:mm'); + convertToServerStringTime: function (momentLocal, serverOffsetMinutes, format) { - var server = moment.utc(momentLocal).utcOffset(formattedOffset); - return server.format(format ? format : "YYYY-MM-DD HH:mm:ss"); - }, + //get the formatted offset time in HH:mm (server time offset is in minutes) + var formattedOffset = (serverOffsetMinutes > 0 ? "+" : "-") + + moment() + .startOf('day') + .minutes(Math.abs(serverOffsetMinutes)) + .format('HH:mm'); - convertToLocalMomentTime: function (strVal, serverOffsetMinutes) { + var server = moment.utc(momentLocal).utcOffset(formattedOffset); + return server.format(format ? format : "YYYY-MM-DD HH:mm:ss"); + }, - //get the formatted offset time in HH:mm (server time offset is in minutes) - var formattedOffset = (serverOffsetMinutes > 0 ? "+" : "-") + - moment() - .startOf('day') - .minutes(Math.abs(serverOffsetMinutes)) - .format('HH:mm'); + convertToLocalMomentTime: function (strVal, serverOffsetMinutes) { - //convert to the iso string format - var isoFormat = moment(strVal).format("YYYY-MM-DDTHH:mm:ss") + formattedOffset; + //get the formatted offset time in HH:mm (server time offset is in minutes) + var formattedOffset = (serverOffsetMinutes > 0 ? "+" : "-") + + moment() + .startOf('day') + .minutes(Math.abs(serverOffsetMinutes)) + .format('HH:mm'); - //create a moment with the iso format which will include the offset with the correct time - // then convert it to local time - return moment.parseZone(isoFormat).local(); - } + //convert to the iso string format + var isoFormat = moment(strVal).format("YYYY-MM-DDTHH:mm:ss") + formattedOffset; - }; + //create a moment with the iso format which will include the offset with the correct time + // then convert it to local time + return moment.parseZone(isoFormat).local(); + } + + }; } angular.module('umbraco.services').factory('dateHelper', dateHelper); function packageHelper(assetsService, treeService, eventsService, $templateCache) { - return { + return { - /** Called when a package is installed, this resets a bunch of data and ensures the new package assets are loaded in */ - packageInstalled: function () { + /** Called when a package is installed, this resets a bunch of data and ensures the new package assets are loaded in */ + packageInstalled: function () { - //clears the tree - treeService.clearCache(); + //clears the tree + treeService.clearCache(); - //clears the template cache - $templateCache.removeAll(); + //clears the template cache + $templateCache.removeAll(); - //emit event to notify anything else - eventsService.emit("app.reInitialize"); - } + //emit event to notify anything else + eventsService.emit("app.reInitialize"); + } - }; + }; } angular.module('umbraco.services').factory('packageHelper', packageHelper); //TODO: I believe this is obsolete function umbPhotoFolderHelper($compile, $log, $timeout, $filter, imageHelper, mediaHelper, umbRequestHelper) { - return { - /** sets the image's url, thumbnail and if its a folder */ - setImageData: function(img) { - - img.isFolder = !mediaHelper.hasFilePropertyType(img); + return { + /** sets the image's url, thumbnail and if its a folder */ + setImageData: function (img) { - if(!img.isFolder){ - img.thumbnail = mediaHelper.resolveFile(img, true); - img.image = mediaHelper.resolveFile(img, false); - } - }, + img.isFolder = !mediaHelper.hasFilePropertyType(img); - /** sets the images original size properties - will check if it is a folder and if so will just make it square */ - setOriginalSize: function(img, maxHeight) { - //set to a square by default - img.originalWidth = maxHeight; - img.originalHeight = maxHeight; + if (!img.isFolder) { + img.thumbnail = mediaHelper.resolveFile(img, true); + img.image = mediaHelper.resolveFile(img, false); + } + }, - var widthProp = _.find(img.properties, function(v) { return (v.alias === "umbracoWidth"); }); - if (widthProp && widthProp.value) { - img.originalWidth = parseInt(widthProp.value, 10); - if (isNaN(img.originalWidth)) { - img.originalWidth = maxHeight; - } - } - var heightProp = _.find(img.properties, function(v) { return (v.alias === "umbracoHeight"); }); - if (heightProp && heightProp.value) { - img.originalHeight = parseInt(heightProp.value, 10); - if (isNaN(img.originalHeight)) { - img.originalHeight = maxHeight; - } - } - }, + /** sets the images original size properties - will check if it is a folder and if so will just make it square */ + setOriginalSize: function (img, maxHeight) { + //set to a square by default + img.originalWidth = maxHeight; + img.originalHeight = maxHeight; - /** sets the image style which get's used in the angular markup */ - setImageStyle: function(img, width, height, rightMargin, bottomMargin) { - img.style = { width: width + "px", height: height + "px", "margin-right": rightMargin + "px", "margin-bottom": bottomMargin + "px" }; - img.thumbStyle = { - "background-image": "url('" + img.thumbnail + "')", - "background-repeat": "no-repeat", - "background-position": "center", - "background-size": Math.min(width, img.originalWidth) + "px " + Math.min(height, img.originalHeight) + "px" - }; - }, - - /** gets the image's scaled wdith based on the max row height */ - getScaledWidth: function(img, maxHeight) { - var scaled = img.originalWidth * maxHeight / img.originalHeight; - return scaled; - //round down, we don't want it too big even by half a pixel otherwise it'll drop to the next row - //return Math.floor(scaled); - }, - - /** returns the target row width taking into account how many images will be in the row and removing what the margin is */ - getTargetWidth: function(imgsPerRow, maxRowWidth, margin) { - //take into account the margin, we will have 1 less margin item than we have total images - return (maxRowWidth - ((imgsPerRow - 1) * margin)); - }, - - /** - This will determine the row/image height for the next collection of images which takes into account the - ideal image count per row. It will check if a row can be filled with this ideal count and if not - if there - are additional images available to fill the row it will keep calculating until they fit. - - It will return the calculated height and the number of images for the row. - - targetHeight = optional; - */ - getRowHeightForImages: function(imgs, maxRowHeight, minDisplayHeight, maxRowWidth, idealImgPerRow, margin, targetHeight) { - - var idealImages = imgs.slice(0, idealImgPerRow); - //get the target row width without margin - var targetRowWidth = this.getTargetWidth(idealImages.length, maxRowWidth, margin); - //this gets the image with the smallest height which equals the maximum we can scale up for this image block - var maxScaleableHeight = this.getMaxScaleableHeight(idealImages, maxRowHeight); - //if the max scale height is smaller than the min display height, we'll use the min display height - targetHeight = targetHeight !== undefined ? targetHeight : Math.max(maxScaleableHeight, minDisplayHeight); - - var attemptedRowHeight = this.performGetRowHeight(idealImages, targetRowWidth, minDisplayHeight, targetHeight); - - if (attemptedRowHeight != null) { - - //if this is smaller than the min display then we need to use the min display, - // which means we'll need to remove one from the row so we can scale up to fill the row - if (attemptedRowHeight < minDisplayHeight) { - - if (idealImages.length > 1) { - - //we'll generate a new targetHeight that is halfway between the max and the current and recurse, passing in a new targetHeight - targetHeight += Math.floor((maxRowHeight - targetHeight) / 2); - return this.getRowHeightForImages(imgs, maxRowHeight, minDisplayHeight, maxRowWidth, idealImgPerRow - 1, margin, targetHeight); - } - else { - //this will occur when we only have one image remaining in the row but it's still going to be too wide even when - // using the minimum display height specified. In this case we're going to have to just crop the image in it's center - // using the minimum display height and the full row width - return { height: minDisplayHeight, imgCount: 1 }; - } - } - else { - //success! - return { height: attemptedRowHeight, imgCount: idealImages.length }; - } - } - - //we know the width will fit in a row, but we now need to figure out if we can fill - // the entire row in the case that we have more images remaining than the idealImgPerRow. - - if (idealImages.length === imgs.length) { - //we have no more remaining images to fill the space, so we'll just use the calc height - return { height: targetHeight, imgCount: idealImages.length }; - } - else if (idealImages.length === 1) { - //this will occur when we only have one image remaining in the row to process but it's not really going to fit ideally - // in the row. - return { height: minDisplayHeight, imgCount: 1 }; - } - else if (idealImages.length === idealImgPerRow && targetHeight < maxRowHeight) { - - //if we're already dealing with the ideal images per row and it's not quite wide enough, we can scale up a little bit so - // long as the targetHeight is currently less than the maxRowHeight. The scale up will be half-way between our current - // target height and the maxRowHeight (we won't loop forever though - if there's a difference of 5 px we'll just quit) - - while (targetHeight < maxRowHeight && (maxRowHeight - targetHeight) > 5) { - targetHeight += Math.floor((maxRowHeight - targetHeight) / 2); - attemptedRowHeight = this.performGetRowHeight(idealImages, targetRowWidth, minDisplayHeight, targetHeight); - if (attemptedRowHeight != null) { - //success! - return { height: attemptedRowHeight, imgCount: idealImages.length }; - } - } - - //Ok, we couldn't actually scale it up with the ideal row count we'll just recurse with a lesser image count. - return this.getRowHeightForImages(imgs, maxRowHeight, minDisplayHeight, maxRowWidth, idealImgPerRow - 1, margin); - } - else if (targetHeight === maxRowHeight) { - - //This is going to happen when: - // * We can fit a list of images in a row, but they come up too short (based on minDisplayHeight) - // * Then we'll try to remove an image, but when we try to scale to fit, the width comes up too narrow but the images are already at their - // maximum height (maxRowHeight) - // * So we're stuck, we cannot precicely fit the current list of images, so we'll render a row that will be max height but won't be wide enough - // which is better than rendering a row that is shorter than the minimum since that could be quite small. - - return { height: targetHeight, imgCount: idealImages.length }; - } - else { - - //we have additional images so we'll recurse and add 1 to the idealImgPerRow until it fits - return this.getRowHeightForImages(imgs, maxRowHeight, minDisplayHeight, maxRowWidth, idealImgPerRow + 1, margin); - } - - }, - - performGetRowHeight: function(idealImages, targetRowWidth, minDisplayHeight, targetHeight) { - - var currRowWidth = 0; - - for (var i = 0; i < idealImages.length; i++) { - var scaledW = this.getScaledWidth(idealImages[i], targetHeight); - currRowWidth += scaledW; - } - - if (currRowWidth > targetRowWidth) { - //get the new scaled height to fit - var newHeight = targetRowWidth * targetHeight / currRowWidth; - - return newHeight; - } - else if (idealImages.length === 1 && (currRowWidth <= targetRowWidth) && !idealImages[0].isFolder) { - //if there is only one image, then return the target height - return targetHeight; - } - else if (currRowWidth / targetRowWidth > 0.90) { - //it's close enough, it's at least 90% of the width so we'll accept it with the target height - return targetHeight; - } - else { - //if it's not successful, return null - return null; - } - }, - - /** builds an image grid row */ - buildRow: function(imgs, maxRowHeight, minDisplayHeight, maxRowWidth, idealImgPerRow, margin, totalRemaining) { - var currRowWidth = 0; - var row = { images: [] }; - - var imageRowHeight = this.getRowHeightForImages(imgs, maxRowHeight, minDisplayHeight, maxRowWidth, idealImgPerRow, margin); - var targetWidth = this.getTargetWidth(imageRowHeight.imgCount, maxRowWidth, margin); - - var sizes = []; - //loop through the images we know fit into the height - for (var i = 0; i < imageRowHeight.imgCount; i++) { - //get the lower width to ensure it always fits - var scaledWidth = Math.floor(this.getScaledWidth(imgs[i], imageRowHeight.height)); - - if (currRowWidth + scaledWidth <= targetWidth) { - currRowWidth += scaledWidth; - sizes.push({ - width:scaledWidth, - //ensure that the height is rounded - height: Math.round(imageRowHeight.height) - }); - row.images.push(imgs[i]); - } - else if (imageRowHeight.imgCount === 1 && row.images.length === 0) { - //the image is simply too wide, we'll crop/center it - sizes.push({ - width: maxRowWidth, - //ensure that the height is rounded - height: Math.round(imageRowHeight.height) - }); - row.images.push(imgs[i]); - } - else { - //the max width has been reached - break; - } - } - - //loop through the images for the row and apply the styles - for (var j = 0; j < row.images.length; j++) { - var bottomMargin = margin; - //make the margin 0 for the last one - if (j === (row.images.length - 1)) { - margin = 0; - } - this.setImageStyle(row.images[j], sizes[j].width, sizes[j].height, margin, bottomMargin); - } - - if (row.images.length === 1 && totalRemaining > 1) { - //if there's only one image on the row and there are more images remaining, set the container to max width - row.images[0].style.width = maxRowWidth + "px"; - } - - - return row; - }, - - /** Returns the maximum image scaling height for the current image collection */ - getMaxScaleableHeight: function(imgs, maxRowHeight) { - - var smallestHeight = _.min(imgs, function(item) { return item.originalHeight; }).originalHeight; - - //adjust the smallestHeight if it is larger than the static max row height - if (smallestHeight > maxRowHeight) { - smallestHeight = maxRowHeight; - } - return smallestHeight; - }, - - /** Creates the image grid with calculated widths/heights for images to fill the grid nicely */ - buildGrid: function(images, maxRowWidth, maxRowHeight, startingIndex, minDisplayHeight, idealImgPerRow, margin,imagesOnly) { - - var rows = []; - var imagesProcessed = 0; - - //first fill in all of the original image sizes and URLs - for (var i = startingIndex; i < images.length; i++) { - var item = images[i]; - - this.setImageData(item); - this.setOriginalSize(item, maxRowHeight); - - if(imagesOnly && !item.isFolder && !item.thumbnail){ - images.splice(i, 1); - i--; - } - } - - while ((imagesProcessed + startingIndex) < images.length) { - //get the maxHeight for the current un-processed images - var currImgs = images.slice(imagesProcessed); - - //build the row - var remaining = images.length - imagesProcessed; - var row = this.buildRow(currImgs, maxRowHeight, minDisplayHeight, maxRowWidth, idealImgPerRow, margin, remaining); - if (row.images.length > 0) { - rows.push(row); - imagesProcessed += row.images.length; - } - else { - - if (currImgs.length > 0) { - throw "Could not fill grid with all images, images remaining: " + currImgs.length; - } - - //if there was nothing processed, exit - break; - } - } - - return rows; + var widthProp = _.find(img.properties, function (v) { return (v.alias === "umbracoWidth"); }); + if (widthProp && widthProp.value) { + img.originalWidth = parseInt(widthProp.value, 10); + if (isNaN(img.originalWidth)) { + img.originalWidth = maxHeight; } - }; + } + var heightProp = _.find(img.properties, function (v) { return (v.alias === "umbracoHeight"); }); + if (heightProp && heightProp.value) { + img.originalHeight = parseInt(heightProp.value, 10); + if (isNaN(img.originalHeight)) { + img.originalHeight = maxHeight; + } + } + }, + + /** sets the image style which get's used in the angular markup */ + setImageStyle: function (img, width, height, rightMargin, bottomMargin) { + img.style = { width: width + "px", height: height + "px", "margin-right": rightMargin + "px", "margin-bottom": bottomMargin + "px" }; + img.thumbStyle = { + "background-image": "url('" + img.thumbnail + "')", + "background-repeat": "no-repeat", + "background-position": "center", + "background-size": Math.min(width, img.originalWidth) + "px " + Math.min(height, img.originalHeight) + "px" + }; + }, + + /** gets the image's scaled wdith based on the max row height */ + getScaledWidth: function (img, maxHeight) { + var scaled = img.originalWidth * maxHeight / img.originalHeight; + return scaled; + //round down, we don't want it too big even by half a pixel otherwise it'll drop to the next row + //return Math.floor(scaled); + }, + + /** returns the target row width taking into account how many images will be in the row and removing what the margin is */ + getTargetWidth: function (imgsPerRow, maxRowWidth, margin) { + //take into account the margin, we will have 1 less margin item than we have total images + return (maxRowWidth - ((imgsPerRow - 1) * margin)); + }, + + /** + This will determine the row/image height for the next collection of images which takes into account the + ideal image count per row. It will check if a row can be filled with this ideal count and if not - if there + are additional images available to fill the row it will keep calculating until they fit. + + It will return the calculated height and the number of images for the row. + + targetHeight = optional; + */ + getRowHeightForImages: function (imgs, maxRowHeight, minDisplayHeight, maxRowWidth, idealImgPerRow, margin, targetHeight) { + + var idealImages = imgs.slice(0, idealImgPerRow); + //get the target row width without margin + var targetRowWidth = this.getTargetWidth(idealImages.length, maxRowWidth, margin); + //this gets the image with the smallest height which equals the maximum we can scale up for this image block + var maxScaleableHeight = this.getMaxScaleableHeight(idealImages, maxRowHeight); + //if the max scale height is smaller than the min display height, we'll use the min display height + targetHeight = targetHeight !== undefined ? targetHeight : Math.max(maxScaleableHeight, minDisplayHeight); + + var attemptedRowHeight = this.performGetRowHeight(idealImages, targetRowWidth, minDisplayHeight, targetHeight); + + if (attemptedRowHeight != null) { + + //if this is smaller than the min display then we need to use the min display, + // which means we'll need to remove one from the row so we can scale up to fill the row + if (attemptedRowHeight < minDisplayHeight) { + + if (idealImages.length > 1) { + + //we'll generate a new targetHeight that is halfway between the max and the current and recurse, passing in a new targetHeight + targetHeight += Math.floor((maxRowHeight - targetHeight) / 2); + return this.getRowHeightForImages(imgs, maxRowHeight, minDisplayHeight, maxRowWidth, idealImgPerRow - 1, margin, targetHeight); + } + else { + //this will occur when we only have one image remaining in the row but it's still going to be too wide even when + // using the minimum display height specified. In this case we're going to have to just crop the image in it's center + // using the minimum display height and the full row width + return { height: minDisplayHeight, imgCount: 1 }; + } + } + else { + //success! + return { height: attemptedRowHeight, imgCount: idealImages.length }; + } + } + + //we know the width will fit in a row, but we now need to figure out if we can fill + // the entire row in the case that we have more images remaining than the idealImgPerRow. + + if (idealImages.length === imgs.length) { + //we have no more remaining images to fill the space, so we'll just use the calc height + return { height: targetHeight, imgCount: idealImages.length }; + } + else if (idealImages.length === 1) { + //this will occur when we only have one image remaining in the row to process but it's not really going to fit ideally + // in the row. + return { height: minDisplayHeight, imgCount: 1 }; + } + else if (idealImages.length === idealImgPerRow && targetHeight < maxRowHeight) { + + //if we're already dealing with the ideal images per row and it's not quite wide enough, we can scale up a little bit so + // long as the targetHeight is currently less than the maxRowHeight. The scale up will be half-way between our current + // target height and the maxRowHeight (we won't loop forever though - if there's a difference of 5 px we'll just quit) + + while (targetHeight < maxRowHeight && (maxRowHeight - targetHeight) > 5) { + targetHeight += Math.floor((maxRowHeight - targetHeight) / 2); + attemptedRowHeight = this.performGetRowHeight(idealImages, targetRowWidth, minDisplayHeight, targetHeight); + if (attemptedRowHeight != null) { + //success! + return { height: attemptedRowHeight, imgCount: idealImages.length }; + } + } + + //Ok, we couldn't actually scale it up with the ideal row count we'll just recurse with a lesser image count. + return this.getRowHeightForImages(imgs, maxRowHeight, minDisplayHeight, maxRowWidth, idealImgPerRow - 1, margin); + } + else if (targetHeight === maxRowHeight) { + + //This is going to happen when: + // * We can fit a list of images in a row, but they come up too short (based on minDisplayHeight) + // * Then we'll try to remove an image, but when we try to scale to fit, the width comes up too narrow but the images are already at their + // maximum height (maxRowHeight) + // * So we're stuck, we cannot precicely fit the current list of images, so we'll render a row that will be max height but won't be wide enough + // which is better than rendering a row that is shorter than the minimum since that could be quite small. + + return { height: targetHeight, imgCount: idealImages.length }; + } + else { + + //we have additional images so we'll recurse and add 1 to the idealImgPerRow until it fits + return this.getRowHeightForImages(imgs, maxRowHeight, minDisplayHeight, maxRowWidth, idealImgPerRow + 1, margin); + } + + }, + + performGetRowHeight: function (idealImages, targetRowWidth, minDisplayHeight, targetHeight) { + + var currRowWidth = 0; + + for (var i = 0; i < idealImages.length; i++) { + var scaledW = this.getScaledWidth(idealImages[i], targetHeight); + currRowWidth += scaledW; + } + + if (currRowWidth > targetRowWidth) { + //get the new scaled height to fit + var newHeight = targetRowWidth * targetHeight / currRowWidth; + + return newHeight; + } + else if (idealImages.length === 1 && (currRowWidth <= targetRowWidth) && !idealImages[0].isFolder) { + //if there is only one image, then return the target height + return targetHeight; + } + else if (currRowWidth / targetRowWidth > 0.90) { + //it's close enough, it's at least 90% of the width so we'll accept it with the target height + return targetHeight; + } + else { + //if it's not successful, return null + return null; + } + }, + + /** builds an image grid row */ + buildRow: function (imgs, maxRowHeight, minDisplayHeight, maxRowWidth, idealImgPerRow, margin, totalRemaining) { + var currRowWidth = 0; + var row = { images: [] }; + + var imageRowHeight = this.getRowHeightForImages(imgs, maxRowHeight, minDisplayHeight, maxRowWidth, idealImgPerRow, margin); + var targetWidth = this.getTargetWidth(imageRowHeight.imgCount, maxRowWidth, margin); + + var sizes = []; + //loop through the images we know fit into the height + for (var i = 0; i < imageRowHeight.imgCount; i++) { + //get the lower width to ensure it always fits + var scaledWidth = Math.floor(this.getScaledWidth(imgs[i], imageRowHeight.height)); + + if (currRowWidth + scaledWidth <= targetWidth) { + currRowWidth += scaledWidth; + sizes.push({ + width: scaledWidth, + //ensure that the height is rounded + height: Math.round(imageRowHeight.height) + }); + row.images.push(imgs[i]); + } + else if (imageRowHeight.imgCount === 1 && row.images.length === 0) { + //the image is simply too wide, we'll crop/center it + sizes.push({ + width: maxRowWidth, + //ensure that the height is rounded + height: Math.round(imageRowHeight.height) + }); + row.images.push(imgs[i]); + } + else { + //the max width has been reached + break; + } + } + + //loop through the images for the row and apply the styles + for (var j = 0; j < row.images.length; j++) { + var bottomMargin = margin; + //make the margin 0 for the last one + if (j === (row.images.length - 1)) { + margin = 0; + } + this.setImageStyle(row.images[j], sizes[j].width, sizes[j].height, margin, bottomMargin); + } + + if (row.images.length === 1 && totalRemaining > 1) { + //if there's only one image on the row and there are more images remaining, set the container to max width + row.images[0].style.width = maxRowWidth + "px"; + } + + + return row; + }, + + /** Returns the maximum image scaling height for the current image collection */ + getMaxScaleableHeight: function (imgs, maxRowHeight) { + + var smallestHeight = _.min(imgs, function (item) { return item.originalHeight; }).originalHeight; + + //adjust the smallestHeight if it is larger than the static max row height + if (smallestHeight > maxRowHeight) { + smallestHeight = maxRowHeight; + } + return smallestHeight; + }, + + /** Creates the image grid with calculated widths/heights for images to fill the grid nicely */ + buildGrid: function (images, maxRowWidth, maxRowHeight, startingIndex, minDisplayHeight, idealImgPerRow, margin, imagesOnly) { + + var rows = []; + var imagesProcessed = 0; + + //first fill in all of the original image sizes and URLs + for (var i = startingIndex; i < images.length; i++) { + var item = images[i]; + + this.setImageData(item); + this.setOriginalSize(item, maxRowHeight); + + if (imagesOnly && !item.isFolder && !item.thumbnail) { + images.splice(i, 1); + i--; + } + } + + while ((imagesProcessed + startingIndex) < images.length) { + //get the maxHeight for the current un-processed images + var currImgs = images.slice(imagesProcessed); + + //build the row + var remaining = images.length - imagesProcessed; + var row = this.buildRow(currImgs, maxRowHeight, minDisplayHeight, maxRowWidth, idealImgPerRow, margin, remaining); + if (row.images.length > 0) { + rows.push(row); + imagesProcessed += row.images.length; + } + else { + + if (currImgs.length > 0) { + throw "Could not fill grid with all images, images remaining: " + currImgs.length; + } + + //if there was nothing processed, exit + break; + } + } + + return rows; + } + }; } angular.module("umbraco.services").factory("umbPhotoFolderHelper", umbPhotoFolderHelper); @@ -428,40 +428,40 @@ angular.module("umbraco.services").factory("umbPhotoFolderHelper", umbPhotoFolde */ function umbModelMapper() { - return { + return { - /** - * @ngdoc function - * @name umbraco.services.umbModelMapper#convertToEntityBasic - * @methodOf umbraco.services.umbModelMapper - * @function - * - * @description - * Converts the source model to a basic entity model, it will throw an exception if there isn't enough data to create the model. - * @param {Object} source The source model - * @param {Number} source.id The node id of the model - * @param {String} source.name The node name - * @param {String} source.icon The models icon as a css class (.icon-doc) - * @param {Number} source.parentId The parentID, if no parent, set to -1 - * @param {path} source.path comma-separated string of ancestor IDs (-1,1234,1782,1234) - */ + /** + * @ngdoc function + * @name umbraco.services.umbModelMapper#convertToEntityBasic + * @methodOf umbraco.services.umbModelMapper + * @function + * + * @description + * Converts the source model to a basic entity model, it will throw an exception if there isn't enough data to create the model. + * @param {Object} source The source model + * @param {Number} source.id The node id of the model + * @param {String} source.name The node name + * @param {String} source.icon The models icon as a css class (.icon-doc) + * @param {Number} source.parentId The parentID, if no parent, set to -1 + * @param {path} source.path comma-separated string of ancestor IDs (-1,1234,1782,1234) + */ - /** This converts the source model to a basic entity model, it will throw an exception if there isn't enough data to create the model */ - convertToEntityBasic: function (source) { - var required = ["id", "name", "icon", "parentId", "path"]; - _.each(required, function (k) { - if (!_.has(source, k)) { - throw "The source object does not contain the property " + k; - } - }); - var optional = ["metaData", "key", "alias"]; - //now get the basic object - var result = _.pick(source, required.concat(optional)); - return result; + /** This converts the source model to a basic entity model, it will throw an exception if there isn't enough data to create the model */ + convertToEntityBasic: function (source) { + var required = ["id", "name", "icon", "parentId", "path"]; + _.each(required, function (k) { + if (!_.has(source, k)) { + throw "The source object does not contain the property " + k; } + }); + var optional = ["metaData", "key", "alias"]; + //now get the basic object + var result = _.pick(source, required.concat(optional)); + return result; + } - }; + }; } angular.module('umbraco.services').factory('umbModelMapper', umbModelMapper); @@ -476,21 +476,21 @@ angular.module('umbraco.services').factory('umbModelMapper', umbModelMapper); */ function umbSessionStorage($window) { - //gets the sessionStorage object if available, otherwise just uses a normal object - // - required for unit tests. - var storage = $window['sessionStorage'] ? $window['sessionStorage'] : {}; + //gets the sessionStorage object if available, otherwise just uses a normal object + // - required for unit tests. + var storage = $window['sessionStorage'] ? $window['sessionStorage'] : {}; - return { + return { - get: function (key) { - return angular.fromJson(storage["umb_" + key]); - }, - - set : function(key, value) { - storage["umb_" + key] = angular.toJson(value); - } - - }; + get: function (key) { + return angular.fromJson(storage["umb_" + key]); + }, + + set: function (key, value) { + storage["umb_" + key] = angular.toJson(value); + } + + }; } angular.module('umbraco.services').factory('umbSessionStorage', umbSessionStorage); @@ -503,28 +503,28 @@ angular.module('umbraco.services').factory('umbSessionStorage', umbSessionStorag * used to check for updates and display a notifcation */ function updateChecker($http, umbRequestHelper) { - return { - - /** - * @ngdoc function - * @name umbraco.services.updateChecker#check - * @methodOf umbraco.services.updateChecker - * @function - * - * @description - * Called to load in the legacy tree js which is required on startup if a user is logged in or - * after login, but cannot be called until they are authenticated which is why it needs to be lazy loaded. - */ - check: function() { - - return umbRequestHelper.resourcePromise( - $http.get( - umbRequestHelper.getApiUrl( - "updateCheckApiBaseUrl", - "GetCheck")), - 'Failed to retrieve update status'); - } - }; + return { + + /** + * @ngdoc function + * @name umbraco.services.updateChecker#check + * @methodOf umbraco.services.updateChecker + * @function + * + * @description + * Called to load in the legacy tree js which is required on startup if a user is logged in or + * after login, but cannot be called until they are authenticated which is why it needs to be lazy loaded. + */ + check: function () { + + return umbRequestHelper.resourcePromise( + $http.get( + umbRequestHelper.getApiUrl( + "updateCheckApiBaseUrl", + "GetCheck")), + 'Failed to retrieve update status'); + } + }; } angular.module('umbraco.services').factory('updateChecker', updateChecker); @@ -534,250 +534,72 @@ angular.module('umbraco.services').factory('updateChecker', updateChecker); * @description A helper object used for property editors **/ function umbPropEditorHelper() { - return { - /** - * @ngdoc function - * @name getImagePropertyValue - * @methodOf umbraco.services.umbPropertyEditorHelper - * @function - * - * @description - * Returns the correct view path for a property editor, it will detect if it is a full virtual path but if not then default to the internal umbraco one - * - * @param {string} input the view path currently stored for the property editor - */ - getViewPath: function(input, isPreValue) { - var path = String(input); + return { + /** + * @ngdoc function + * @name getImagePropertyValue + * @methodOf umbraco.services.umbPropertyEditorHelper + * @function + * + * @description + * Returns the correct view path for a property editor, it will detect if it is a full virtual path but if not then default to the internal umbraco one + * + * @param {string} input the view path currently stored for the property editor + */ + getViewPath: function (input, isPreValue) { + var path = String(input); - if (path.startsWith('/')) { + if (path.startsWith('/')) { - //This is an absolute path, so just leave it - return path; - } else { + //This is an absolute path, so just leave it + return path; + } else { - if (path.indexOf("/") >= 0) { - //This is a relative path, so just leave it - return path; - } else { - if (!isPreValue) { - //i.e. views/propertyeditors/fileupload/fileupload.html - return "views/propertyeditors/" + path + "/" + path + ".html"; - } else { - //i.e. views/prevalueeditors/requiredfield.html - return "views/prevalueeditors/" + path + ".html"; - } - } - - } + if (path.indexOf("/") >= 0) { + //This is a relative path, so just leave it + return path; + } else { + if (!isPreValue) { + //i.e. views/propertyeditors/fileupload/fileupload.html + return "views/propertyeditors/" + path + "/" + path + ".html"; + } else { + //i.e. views/prevalueeditors/requiredfield.html + return "views/prevalueeditors/" + path + ".html"; + } } - }; + + } + } + }; } angular.module('umbraco.services').factory('umbPropEditorHelper', umbPropEditorHelper); - /** * @ngdoc service -* @name umbraco.services.umbDataFormatter -* @description A helper object used to format/transform JSON Umbraco data, mostly used for persisting data to the server +* @name umbraco.services.queryStrings +* @description A helper used to get query strings in the real URL (not the hash URL) **/ -function umbDataFormatter() { - return { - - formatContentTypePostData: function (displayModel, action) { +function queryStrings($window) { - //create the save model from the display model - var saveModel = _.pick(displayModel, - 'compositeContentTypes', 'isContainer', 'allowAsRoot', 'allowedTemplates', 'allowedContentTypes', - 'alias', 'description', 'thumbnail', 'name', 'id', 'icon', 'trashed', - 'key', 'parentId', 'alias', 'path'); + var pl = /\+/g; // Regex for replacing addition symbol with a space + var search = /([^&=]+)=?([^&]*)/g; + var decode = function (s) { return decodeURIComponent(s.replace(pl, " ")); }; - //TODO: Map these - saveModel.allowedTemplates = _.map(displayModel.allowedTemplates, function (t) { return t.alias; }); - saveModel.defaultTemplate = displayModel.defaultTemplate ? displayModel.defaultTemplate.alias : null; - var realGroups = _.reject(displayModel.groups, function(g) { - //do not include these tabs - return g.tabState === "init"; - }); - saveModel.groups = _.map(realGroups, function (g) { + return { + + getParams: function () { + var match; + var query = $window.location.search.substring(1); - var saveGroup = _.pick(g, 'inherited', 'id', 'sortOrder', 'name'); + var urlParams = {}; + while (match = search.exec(query)) { + urlParams[decode(match[1])] = decode(match[2]); + } - var realProperties = _.reject(g.properties, function (p) { - //do not include these properties - return p.propertyState === "init" || p.inherited === true; - }); - - var saveProperties = _.map(realProperties, function (p) { - var saveProperty = _.pick(p, 'id', 'alias', 'description', 'validation', 'label', 'sortOrder', 'dataTypeId', 'groupId', 'memberCanEdit', 'showOnMemberProfile'); - return saveProperty; - }); - - saveGroup.properties = saveProperties; - - //if this is an inherited group and there are not non-inherited properties on it, then don't send up the data - if (saveGroup.inherited === true && saveProperties.length === 0) { - return null; - } - - return saveGroup; - }); - - //we don't want any null groups - saveModel.groups = _.reject(saveModel.groups, function(g) { - return !g; - }); - - return saveModel; - }, - - /** formats the display model used to display the data type to the model used to save the data type */ - formatDataTypePostData: function(displayModel, preValues, action) { - var saveModel = { - parentId: displayModel.parentId, - id: displayModel.id, - name: displayModel.name, - selectedEditor: displayModel.selectedEditor, - //set the action on the save model - action: action, - preValues: [] - }; - for (var i = 0; i < preValues.length; i++) { - - saveModel.preValues.push({ - key: preValues[i].alias, - value: preValues[i].value - }); - } - return saveModel; - }, - - /** formats the display model used to display the member to the model used to save the member */ - formatMemberPostData: function(displayModel, action) { - //this is basically the same as for media but we need to explicitly add the username,email, password to the save model - - var saveModel = this.formatMediaPostData(displayModel, action); - - saveModel.key = displayModel.key; - - var genericTab = _.find(displayModel.tabs, function (item) { - return item.id === 0; - }); - - //map the member login, email, password and groups - var propLogin = _.find(genericTab.properties, function (item) { - return item.alias === "_umb_login"; - }); - var propEmail = _.find(genericTab.properties, function (item) { - return item.alias === "_umb_email"; - }); - var propPass = _.find(genericTab.properties, function (item) { - return item.alias === "_umb_password"; - }); - var propGroups = _.find(genericTab.properties, function (item) { - return item.alias === "_umb_membergroup"; - }); - saveModel.email = propEmail.value; - saveModel.username = propLogin.value; - saveModel.password = propPass.value; - - var selectedGroups = []; - for (var n in propGroups.value) { - if (propGroups.value[n] === true) { - selectedGroups.push(n); - } - } - saveModel.memberGroups = selectedGroups; - - //turn the dictionary into an array of pairs - var memberProviderPropAliases = _.pairs(displayModel.fieldConfig); - _.each(displayModel.tabs, function (tab) { - _.each(tab.properties, function (prop) { - var foundAlias = _.find(memberProviderPropAliases, function(item) { - return prop.alias === item[1]; - }); - if (foundAlias) { - //we know the current property matches an alias, now we need to determine which membership provider property it was for - // by looking at the key - switch (foundAlias[0]) { - case "umbracoMemberLockedOut": - saveModel.isLockedOut = prop.value.toString() === "1" ? true : false; - break; - case "umbracoMemberApproved": - saveModel.isApproved = prop.value.toString() === "1" ? true : false; - break; - case "umbracoMemberComments": - saveModel.comments = prop.value; - break; - } - } - }); - }); - - - - return saveModel; - }, - - /** formats the display model used to display the media to the model used to save the media */ - formatMediaPostData: function(displayModel, action) { - //NOTE: the display model inherits from the save model so we can in theory just post up the display model but - // we don't want to post all of the data as it is unecessary. - var saveModel = { - id: displayModel.id, - properties: [], - name: displayModel.name, - contentTypeAlias: displayModel.contentTypeAlias, - parentId: displayModel.parentId, - //set the action on the save model - action: action - }; - - _.each(displayModel.tabs, function (tab) { - - _.each(tab.properties, function (prop) { - - //don't include the custom generic tab properties - if (!prop.alias.startsWith("_umb_")) { - saveModel.properties.push({ - id: prop.id, - alias: prop.alias, - value: prop.value - }); - } - - }); - }); - - return saveModel; - }, - - /** formats the display model used to display the content to the model used to save the content */ - formatContentPostData: function (displayModel, action) { - - //this is basically the same as for media but we need to explicitly add some extra properties - var saveModel = this.formatMediaPostData(displayModel, action); - - var genericTab = _.find(displayModel.tabs, function (item) { - return item.id === 0; - }); - - var propExpireDate = _.find(genericTab.properties, function(item) { - return item.alias === "_umb_expiredate"; - }); - var propReleaseDate = _.find(genericTab.properties, function (item) { - return item.alias === "_umb_releasedate"; - }); - var propTemplate = _.find(genericTab.properties, function (item) { - return item.alias === "_umb_template"; - }); - saveModel.expireDate = propExpireDate ? propExpireDate.value : null; - saveModel.releaseDate = propReleaseDate ? propReleaseDate.value : null; - saveModel.templateAlias = propTemplate ? propTemplate.value : null; - - return saveModel; - } - }; + return urlParams; + } + }; } -angular.module('umbraco.services').factory('umbDataFormatter', umbDataFormatter); +angular.module('umbraco.services').factory('queryStrings', queryStrings); diff --git a/src/Umbraco.Web.UI.Client/src/controllers/main.controller.js b/src/Umbraco.Web.UI.Client/src/controllers/main.controller.js index 1504abf7c1..dc39678a2f 100644 --- a/src/Umbraco.Web.UI.Client/src/controllers/main.controller.js +++ b/src/Umbraco.Web.UI.Client/src/controllers/main.controller.js @@ -54,13 +54,33 @@ function MainController($scope, $rootScope, $location, $routeParams, $timeout, $ $scope.user = null; })); - //when the app is read/user is logged in, setup the data + evts.push(eventsService.on("app.userRefresh", function(evt) { + userService.refreshCurrentUser().then(function(data) { + $scope.user = data; + + //Load locale file + if ($scope.user.locale) { + tmhDynamicLocale.set($scope.user.locale); + } + + if ($scope.user.avatars) { + $scope.avatar = []; + if (angular.isArray($scope.user.avatars)) { + for (var i = 0; i < $scope.user.avatars.length; i++) { + $scope.avatar.push({ value: $scope.user.avatars[i] }); + } + } + } + }); + })); + + //when the app is ready/user is logged in, setup the data evts.push(eventsService.on("app.ready", function (evt, data) { $scope.authenticated = data.authenticated; $scope.user = data.user; - updateChecker.check().then(function(update) { + updateChecker.check().then(function (update) { if (update && update !== "null") { if (update.type !== "None") { var notification = { @@ -87,7 +107,7 @@ function MainController($scope, $rootScope, $location, $routeParams, $timeout, $ } //if this is a new login (i.e. the user entered credentials), then clear out local storage - could contain sensitive data - if (data.loginType === "credentials") { + if (data.loginType === "credentials") { localStorageService.clearAll(); } @@ -96,30 +116,15 @@ function MainController($scope, $rootScope, $location, $routeParams, $timeout, $ tmhDynamicLocale.set($scope.user.locale); } - if ($scope.user.emailHash) { + if ($scope.user.avatars) { - //let's attempt to load the avatar, it might not exist or we might not have - // internet access, well get an empty string back - $http.get(umbRequestHelper.getApiUrl("gravatarApiBaseUrl", "GetCurrentUserGravatarUrl")) - .then( - function successCallback(response) { - // if we can't download the gravatar for some reason, an null gets returned, we cannot do anything - if (response.data !== "null") { - if ($scope.user && $scope.user.emailHash) { - var avatarBaseUrl = "https://www.gravatar.com/avatar/"; - var hash = $scope.user.emailHash; + $scope.avatar = []; + if (angular.isArray($scope.user.avatars)) { + for (var i = 0; i < $scope.user.avatars.length; i++) { + $scope.avatar.push({ value: $scope.user.avatars[i] }); + } + } - $scope.avatar = [ - { value: avatarBaseUrl + hash + ".jpg?s=30&d=mm" }, - { value: avatarBaseUrl + hash + ".jpg?s=60&d=mm" }, - { value: avatarBaseUrl + hash + ".jpg?s=90&d=mm" } - ]; - } - } - - }, function errorCallback(response) { - //cannot load it from the server so we cannot do anything - }); } })); @@ -143,7 +148,7 @@ function MainController($scope, $rootScope, $location, $routeParams, $timeout, $ //register it angular.module('umbraco').controller("Umbraco.MainController", MainController). - config(function (tmhDynamicLocaleProvider) { - //Set url for locale files - tmhDynamicLocaleProvider.localeLocationPattern('lib/angular/1.1.5/i18n/angular-locale_{{locale}}.js'); - }); + config(function (tmhDynamicLocaleProvider) { + //Set url for locale files + tmhDynamicLocaleProvider.localeLocationPattern('lib/angular/1.1.5/i18n/angular-locale_{{locale}}.js'); + }); diff --git a/src/Umbraco.Web.UI.Client/src/controllers/search.controller.js b/src/Umbraco.Web.UI.Client/src/controllers/search.controller.js index 54519f353b..d5d1ca58e2 100644 --- a/src/Umbraco.Web.UI.Client/src/controllers/search.controller.js +++ b/src/Umbraco.Web.UI.Client/src/controllers/search.controller.js @@ -15,21 +15,21 @@ function SearchController($scope, searchService, $log, $location, navigationServ $scope.selectedResult = -1; - $scope.navigateResults = function(ev){ + $scope.navigateResults = function (ev) { //38: up 40: down, 13: enter - switch(ev.keyCode){ + switch (ev.keyCode) { case 38: - iterateResults(true); + iterateResults(true); break; case 40: - iterateResults(false); + iterateResults(false); break; case 13: if ($scope.selectedItem) { $location.path($scope.selectedItem.editorPath); navigationService.hideSearch(); - } + } break; } }; @@ -39,50 +39,50 @@ function SearchController($scope, searchService, $log, $location, navigationServ var groupIndex = -1; var itemIndex = -1; $scope.selectedItem = undefined; - - function iterateResults(up){ + + function iterateResults(up) { //default group - if(!group){ + if (!group) { group = $scope.groups[0]; groupIndex = 0; } - if(up){ - if(itemIndex === 0){ - if(groupIndex === 0){ - gotoGroup($scope.groups.length-1, true); - }else{ - gotoGroup(groupIndex-1, true); + if (up) { + if (itemIndex === 0) { + if (groupIndex === 0) { + gotoGroup($scope.groups.length - 1, true); + } else { + gotoGroup(groupIndex - 1, true); } - }else{ - gotoItem(itemIndex-1); + } else { + gotoItem(itemIndex - 1); } - }else{ - if(itemIndex < group.results.length-1){ - gotoItem(itemIndex+1); - }else{ - if(groupIndex === $scope.groups.length-1){ + } else { + if (itemIndex < group.results.length - 1) { + gotoItem(itemIndex + 1); + } else { + if (groupIndex === $scope.groups.length - 1) { gotoGroup(0); - }else{ - gotoGroup(groupIndex+1); + } else { + gotoGroup(groupIndex + 1); } } } } - function gotoGroup(index, up){ + function gotoGroup(index, up) { groupIndex = index; group = $scope.groups[groupIndex]; - - if(up){ - gotoItem(group.results.length-1); - }else{ - gotoItem(0); + + if (up) { + gotoItem(group.results.length - 1); + } else { + gotoItem(0); } } - function gotoItem(index){ + function gotoItem(index) { itemIndex = index; $scope.selectedItem = group.results[itemIndex]; } @@ -91,7 +91,7 @@ function SearchController($scope, searchService, $log, $location, navigationServ var canceler = null; $scope.$watch("searchTerm", _.debounce(function (newVal, oldVal) { - $scope.$apply(function() { + $scope.$apply(function () { if ($scope.searchTerm) { if (newVal !== null && newVal !== undefined && newVal !== oldVal) { $scope.isSearching = true; @@ -107,8 +107,16 @@ function SearchController($scope, searchService, $log, $location, navigationServ canceler = $q.defer(); } - searchService.searchAll({ term: $scope.searchTerm, canceler: canceler }).then(function(result) { - $scope.groups = _.filter(result, function (group) { return group.results.length > 0; }); + searchService.searchAll({ term: $scope.searchTerm, canceler: canceler }).then(function (result) { + + //result is a dictionary of group Title and it's results + var filtered = {}; + _.each(result, function (value, key) { + if (value.results.length > 0) { + filtered[key] = value; + } + }); + $scope.groups = filtered; //set back to null so it can be re-created canceler = null; }); diff --git a/src/Umbraco.Web.UI.Client/src/init.js b/src/Umbraco.Web.UI.Client/src/init.js index 016c33015d..5c70ca6a90 100644 --- a/src/Umbraco.Web.UI.Client/src/init.js +++ b/src/Umbraco.Web.UI.Client/src/init.js @@ -1,13 +1,16 @@ /** Executed when the application starts, binds to events and set global state */ -app.run(['userService', '$log', '$rootScope', '$location', 'navigationService', 'appState', 'editorState', 'fileManager', 'assetsService', 'eventsService', '$cookies', '$templateCache', 'localStorageService', - function (userService, $log, $rootScope, $location, navigationService, appState, editorState, fileManager, assetsService, eventsService, $cookies, $templateCache, localStorageService) { +app.run(['userService', '$log', '$rootScope', '$location', 'queryStrings', 'navigationService', 'appState', 'editorState', 'fileManager', 'assetsService', 'eventsService', '$cookies', '$templateCache', 'localStorageService', + function (userService, $log, $rootScope, $location, queryStrings, navigationService, appState, editorState, fileManager, assetsService, eventsService, $cookies, $templateCache, localStorageService) { //This sets the default jquery ajax headers to include our csrf token, we // need to user the beforeSend method because our token changes per user/login so // it cannot be static $.ajaxSetup({ beforeSend: function (xhr) { - xhr.setRequestHeader("X-XSRF-TOKEN", $cookies["XSRF-TOKEN"]); + xhr.setRequestHeader("X-XSRF-TOKEN", $cookies["XSRF-TOKEN"]); + if (queryStrings.getParams().umbDebug === "true" || queryStrings.getParams().umbdebug === "true") { + xhr.setRequestHeader("X-UMB-DEBUG", "true"); + } } }); diff --git a/src/Umbraco.Web.UI.Client/src/install.loader.js b/src/Umbraco.Web.UI.Client/src/install.loader.js index 869521ec7d..ead413ed3e 100644 --- a/src/Umbraco.Web.UI.Client/src/install.loader.js +++ b/src/Umbraco.Web.UI.Client/src/install.loader.js @@ -1,17 +1,19 @@ -LazyLoad.js( [ - 'lib/jquery/jquery.min.js', - /* 1.1.5 */ - 'lib/angular/1.1.5/angular.min.js', - 'lib/angular/1.1.5/angular-cookies.min.js', - 'lib/angular/1.1.5/angular-mobile.min.js', - 'lib/angular/1.1.5/angular-mocks.js', - 'lib/angular/1.1.5/angular-sanitize.min.js', - 'lib/underscore/underscore-min.js', - 'js/umbraco.installer.js', - 'js/umbraco.directives.js' - ], function () { - jQuery(document).ready(function () { - angular.bootstrap(document, ['ngSanitize', 'umbraco.install', 'umbraco.directives.validation']); - }); - } +LazyLoad.js([ + 'lib/jquery/jquery.min.js', + /* 1.1.5 */ + 'lib/angular/1.1.5/angular.min.js', + 'lib/angular/1.1.5/angular-cookies.min.js', + 'lib/angular/1.1.5/angular-mobile.min.js', + 'lib/angular/1.1.5/angular-mocks.js', + 'lib/angular/1.1.5/angular-sanitize.min.js', + 'lib/underscore/underscore-min.js', + 'lib/angular/angular-ui-sortable.js', + 'js/installer.app.js', + 'js/umbraco.directives.js', + 'js/umbraco.installer.js' +], function () { + jQuery(document).ready(function () { + angular.bootstrap(document, ['umbraco']); + }); +} ); \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/installer.app.js b/src/Umbraco.Web.UI.Client/src/installer.app.js new file mode 100644 index 0000000000..05315493b7 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/installer.app.js @@ -0,0 +1,7 @@ +var app = angular.module('umbraco', [ + 'umbraco.directives', + 'umbraco.install', + 'ngCookies', + 'ngMobile', + 'ngSanitize' +]); \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/installer/_module.js b/src/Umbraco.Web.UI.Client/src/installer/_module.js new file mode 100644 index 0000000000..03ba93c846 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/installer/_module.js @@ -0,0 +1 @@ +angular.module("umbraco.install", ["umbraco.directives"]); \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/installer/steps/database.controller.js b/src/Umbraco.Web.UI.Client/src/installer/steps/database.controller.js index 5b3e174930..c4ac65bff1 100644 --- a/src/Umbraco.Web.UI.Client/src/installer/steps/database.controller.js +++ b/src/Umbraco.Web.UI.Client/src/installer/steps/database.controller.js @@ -1,28 +1,35 @@ angular.module("umbraco.install").controller("Umbraco.Installer.DataBaseController", function($scope, $http, installerService){ $scope.checking = false; + $scope.invalidDbDns = false; + $scope.dbs = [ - {name: 'Microsoft SQL Server Compact (SQL CE)', id: 0}, - {name: 'Microsoft SQL Server', id: 1}, - { name: 'Microsoft SQL Azure', id: 3 }, - { name: 'MySQL', id: 2 }, - {name: 'Custom connection string', id: -1}]; + { name: 'Microsoft SQL Server Compact (SQL CE)', id: 0}, + { name: 'Microsoft SQL Server', id: 1}, + { name: 'Microsoft SQL Azure', id: 3 }, + { name: 'MySQL', id: 2 }, + { name: 'Custom connection string', id: -1} + ]; - if(installerService.status.current.model.dbType === undefined){ + if ( installerService.status.current.model.dbType === undefined ) { installerService.status.current.model.dbType = 0; } - $scope.validateAndForward = function(){ - if(!$scope.checking && this.myForm.$valid){ + $scope.validateAndForward = function(){ + if ( !$scope.checking && this.myForm.$valid ) { $scope.checking = true; + $scope.invalidDbDns = false; + var model = installerService.status.current.model; - $http.post(Umbraco.Sys.ServerVariables.installApiBaseUrl + "PostValidateDatabaseConnection", - model).then(function(response){ + $http.post( + Umbraco.Sys.ServerVariables.installApiBaseUrl + "PostValidateDatabaseConnection", + model ).then( function( response ) { - if(response.data === "true"){ + if ( response.data === "true" ) { installerService.forward(); - }else{ + } + else { $scope.invalidDbDns = true; } @@ -33,4 +40,4 @@ angular.module("umbraco.install").controller("Umbraco.Installer.DataBaseControll }); } }; -}); \ No newline at end of file +}); diff --git a/src/Umbraco.Web.UI.Client/src/installer/steps/starterkit.html b/src/Umbraco.Web.UI.Client/src/installer/steps/starterkit.html index 6ccf99be7f..0b9e22a0f3 100644 --- a/src/Umbraco.Web.UI.Client/src/installer/steps/starterkit.html +++ b/src/Umbraco.Web.UI.Client/src/installer/steps/starterkit.html @@ -1,16 +1,23 @@
-

Would you like to learn or demo Umbraco?

+

Install a starter website

+ +

+ Installing a starter website helps you learn how Umbraco works, and gives you a solid + and simple foundation to build on top of. +

+ + Loading... + + - {{pck.name}} -

The Starter Kit is a great way to experience some of the ways you can use Umbraco. It's a complete website with textpages, landing pages, blog, product listings and more that's easy to get started with Umbraco. -

-

- It's also a great way to learn Umbraco as the Starter Kit comes with a set of Lessons that'll teach you how to implement and extend Umbraco using short 5-15 minute tasks. -

-

- Yes, I'd like a Starter Kit -   - No thanks + No thanks, I do not want to install a starter website -

\ No newline at end of file + diff --git a/src/Umbraco.Web.UI.Client/src/less/belle.less b/src/Umbraco.Web.UI.Client/src/less/belle.less index 4d3d42b1f0..44365b95e7 100644 --- a/src/Umbraco.Web.UI.Client/src/less/belle.less +++ b/src/Umbraco.Web.UI.Client/src/less/belle.less @@ -120,18 +120,34 @@ @import "components/umb-querybuilder.less"; @import "components/umb-pagination.less"; @import "components/umb-mini-list-view.less"; +@import "components/umb-badge.less"; @import "components/umb-nested-content.less"; +@import "components/umb-checkmark.less"; +@import "components/umb-list.less"; +@import "components/umb-box.less"; @import "components/buttons/umb-button.less"; @import "components/buttons/umb-button-group.less"; @import "components/buttons/umb-era-button.less"; +@import "components/buttons/umb-toggle.less"; @import "components/notifications/umb-notifications.less"; @import "components/umb-file-dropzone.less"; @import "components/umb-node-preview.less"; @import "components/umb-mini-editor.less"; +@import "components/users/umb-user-cards.less"; +@import "components/users/umb-user-group-picker-list.less"; +@import "components/users/umb-user-group-preview.less"; +@import "components/users/umb-user-preview.less"; +@import "components/users/umb-user-picker-list.less"; +@import "components/users/umb-permission.less"; + + // Utilities +@import "utilities/layout/_display.less"; +@import "utilities/typography/_text-decoration.less"; +@import "utilities/typography/_white-space.less"; @import "utilities/_flexbox.less"; @import "utilities/_spacing.less"; @import "utilities/_text-align.less"; diff --git a/src/Umbraco.Web.UI.Client/src/less/components/buttons/umb-button.less b/src/Umbraco.Web.UI.Client/src/less/components/buttons/umb-button.less index afe050e211..82e3afbb83 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/buttons/umb-button.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/buttons/umb-button.less @@ -18,10 +18,13 @@ transition: opacity 0.25s ease; display: flex; flex-wrap: wrap; + align-items: center; + justify-content: center; } .umb-button__icon { margin-right: 5px; + line-height: 1em; } .umb-button__content.-hidden { @@ -52,7 +55,7 @@ .umb-button__progress.-white { border-color: rgba(255, 255, 255, 0.4); - border-left-color: #ffffff; + border-left-color: @white; } .umb-button__success, @@ -64,18 +67,9 @@ transform: translate(-50%, -50%); opacity: 1; font-size: 20px; - color: @green; transition: opacity 0.25s ease; } -.umb-button__success { - color: @green; -} - -.umb-button__error { - color: @red; -} - .umb-button__success.-hidden, .umb-button__error.-hidden { opacity: 0; @@ -84,7 +78,7 @@ .umb-button__success.-white, .umb-button__error.-white { - color: #ffffff; + color: @white; } .umb-button__overlay { @@ -92,7 +86,7 @@ width: 100%; height: 100%; z-index: 10; - background: #ffffff; + background: @white; opacity: 0; } @@ -104,3 +98,35 @@ transform: rotate(360deg); } } + +/* Sizes */ +.umb-button--xs { + padding: 5px 16px; + font-size: 14px; +} + +.umb-button--s { + padding: 6px 16px; + font-size: 15px; +} + +.umb-button--m { + padding: 10px 24px; + font-size: 15px; +} + +.umb-button--l { + padding: 14px 40px; + font-size: 16px; +} + +.umb-button--xl { + padding: 18px 52px; + font-size: 16px; +} + +/* types */ +.umb-button--block { + display: block; + width: 100%; +} \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/less/components/buttons/umb-toggle.less b/src/Umbraco.Web.UI.Client/src/less/components/buttons/umb-toggle.less new file mode 100644 index 0000000000..2156f75d00 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/less/components/buttons/umb-toggle.less @@ -0,0 +1,65 @@ +.umb-toggle { + display: flex; + align-items: center; +} + +.umb-toggle__handler { + display: inline-block; + width: 24px; + height: 24px; + background-color: @white; + border-radius: 50px; + transform: rotate(-45deg); +} + +.umb-toggle__toggle { + cursor: pointer; + display: inline-block; + width: 48px; + height: 24px; + background: @gray-8; + border-radius: 90px; + position: relative; +} + +.umb-toggle--checked .umb-toggle__toggle { + background-color: @green; +} + +.umb-toggle--checked .umb-toggle__handler { + transform: translate3d(24px, 0, 0) rotate(0); +} + +/* Labels */ + +.umb-toggle__label { + font-size: 12px; + color: @gray-2; +} + +.umb-toggle__label--left { + margin-right: 8px; +} + +.umb-toggle__label--right { + margin-left: 8px; +} + +/* Icons */ + +.umb-toggle__icon { + position: absolute; + top: 3px; + text-decoration: none; + transition: all 0.2s ease; +} + +.umb-toggle__icon--left { + left: 7px; + color: @white; +} + +.umb-toggle__icon--right { + right: 7px; + color: @gray-5; +} \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/less/components/umb-avatar.less b/src/Umbraco.Web.UI.Client/src/less/components/umb-avatar.less index c4414c2880..2807c2d427 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/umb-avatar.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/umb-avatar.less @@ -2,29 +2,115 @@ border-radius: 50%; width: 50px; height: 50px; + background-color: transparent; + display: flex; + align-items: center; + justify-content: center; + color: @black; + font-weight: bold; + font-size: 16px; + box-sizing: border-box; } -.umb-avatar.-xs { +/* Sizes */ + +.umb-avatar--xxs { + width: 26px; + height: 26px; + font-size: 12px; +} + +.umb-avatar--xs { width: 30px; height: 30px; + font-size: 12px; } -.umb-avatar.-s { +.umb-avatar--s { width: 40px; height: 40px; + font-size: 14px; } -.umb-avatar.-m { +.umb-avatar--m { width: 50px; height: 50px; + font-size: 16px; } -.umb-avatar.-l { +.umb-avatar--l { width: 70px; height: 70px; + font-size: 18px; } -.umb-avatar.-xl { +.umb-avatar--xl { width: 100px; height: 100px; + font-size: 20px; } + +.umb-avatar--xxl { + width: 150px; + height: 150px; + font-size: 36px; +} + +/* Colors */ + +.umb-avatar--white { + background-color: @white; + color: @black; +} + +.umb-avatar--gray { + background-color: @gray-10; + color: @black; +} + +.umb-avatar--primary { + background-color: @turquoise-l1; + color: @white; +} + +.umb-avatar--secondary { + background-color: @purple-l3; + color: @white; +} + +.umb-avatar--success { + background-color: @green-l1; + color: @white; +} + +.umb-avatar--warning { + background-color: @yellow-l1; + color: @white; +} + +.umb-avatar--danger { + background-color: @red-l1; + color: @white; +} + +/*with button*/ + +a.umb-avatar-btn { + cursor: pointer; +} +a.umb-avatar-btn:hover { + text-decoration: none; +} +a.umb-avatar-btn .umb-avatar { + border: 2px dashed #A2A1A6; +} +a.umb-avatar-btn .umb-avatar span { + font-size: 50px; + color: @gray-6; +} +a.umb-avatar-btn .umb-avatar span { + color: @gray-6; + font-size: 50px; +} + +/*border-radius: 50%; width: 100px; height: 100px; font-size: 50px; text-align: center; display: flex; align-items: center; justify-content: center; background-color: #F3F3F5; border: 2px dashed #A2A1A6; color: #A2A1A6;*/ \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/less/components/umb-badge.less b/src/Umbraco.Web.UI.Client/src/less/components/umb-badge.less new file mode 100644 index 0000000000..6998afa556 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/less/components/umb-badge.less @@ -0,0 +1,65 @@ +.umb-badge { + padding: 6px 8px; + margin: 0 5px 0 0; + color: @black; + background-color: @turquoise-washed; + border-width: 1px; + border-style: solid; + border-color: @turquoise; + display: inline-flex; + align-items: center; + justify-content: center; + text-transform: capitalize; +} + +// Colors +.umb-badge--primary { + background-color: @turquoise-washed; + border-color: @turquoise; +} + +.umb-badge--seconday { + background-color: @purple-washed; + border-color: @purple; +} + +.umb-badge--danger { + background-color: @red-washed; + border-color: @red; +} + +.umb-badge--warning { + background-color: @yellow-washed; + border-color: @yellow; +} + +.umb-badge--success { + background-color: @green-washed; + border-color: @green; +} + +// Size +.umb-badge--xs { + font-size: 13px; + padding: 1px 6px; +} + +.umb-badge--s { + font-size: 14px; + padding: 3px 6px; +} + +.umb-badge--m { + font-size: 16px; + padding: 6px 8px; +} + +.umb-badge--l { + font-size: 18px; + padding: 6px 8px; +} + +.umb-badge--xl { + font-size: 20px; + padding: 6px 8px; +} \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/less/components/umb-box.less b/src/Umbraco.Web.UI.Client/src/less/components/umb-box.less new file mode 100644 index 0000000000..cfbd929a3a --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/less/components/umb-box.less @@ -0,0 +1,20 @@ +.umb-box { + border: 1px solid @gray-8; + border-radius: 3px; + margin-bottom: 30px; +} + +.umb-box-header { + padding: 10px 20px; + background-color: @gray-10; +} + +.umb-box-header-title { + font-size: 16px; + color: @black; + font-weight: bold; +} + +.umb-box-content { + padding: 20px; +} \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/less/components/umb-breadcrumbs.less b/src/Umbraco.Web.UI.Client/src/less/components/umb-breadcrumbs.less index 2cad03a2ab..d25744a108 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/umb-breadcrumbs.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/umb-breadcrumbs.less @@ -12,7 +12,7 @@ .umb-breadcrumbs__ancestor-link, .umb-breadcrumbs__ancestor-text { - font-size: 12px; + font-size: 13px; color: @gray-3; max-width: 150px; white-space: nowrap; diff --git a/src/Umbraco.Web.UI.Client/src/less/components/umb-checkmark.less b/src/Umbraco.Web.UI.Client/src/less/components/umb-checkmark.less new file mode 100644 index 0000000000..75ac13bdd0 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/less/components/umb-checkmark.less @@ -0,0 +1,46 @@ +.umb-checkmark { + border: 2px solid @white; + width: 25px; + height: 25px; + background: @gray-7; + border-radius: 50%; + box-sizing: border-box; + display: flex; + justify-content: center; + align-items: center; + color: @white; + cursor: pointer; + font-size: 15px; +} + +.umb-checkmark--checked { + background: @green; +} + +.umb-checkmark--xs { + width: 20px; + height: 20px; + font-size: 13px; +} + +.umb-checkmark--s { + width: 25px; + height: 25px; +} + +.umb-checkmark--m { + width: 30px; + height: 30px; +} + +.umb-checkmark--l { + width: 40px; + height: 40px; + font-size: 18px; +} + +.umb-checkmark--xl { + width: 50px; + height: 50px; + font-size: 20px; +} \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/less/components/umb-list.less b/src/Umbraco.Web.UI.Client/src/less/components/umb-list.less new file mode 100644 index 0000000000..be63bb3a9c --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/less/components/umb-list.less @@ -0,0 +1,25 @@ +.umb-list-item { + border-bottom: 1px solid @gray-9; + padding-top: 15px; + padding-bottom: 15px; + display: flex; +} + +a.umb-list-item:hover, +a.umb-list-item:focus { + text-decoration: none; +} + +.umb-list-item:hover .umb-list-checkbox, +.umb-list-item--selected .umb-list-checkbox { + opacity: 1; +} + +.umb-list-checkbox { + position: absolute; + opacity: 0; +} + +.umb-list-checkbox--visible { + opacity: 1; +} \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/less/components/umb-node-preview.less b/src/Umbraco.Web.UI.Client/src/less/components/umb-node-preview.less index f0c5ed143f..65d34ba693 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/umb-node-preview.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/umb-node-preview.less @@ -1,12 +1,14 @@ .umb-node-preview { - padding: 5px 15px; - margin-bottom: 5px; - background: @gray-10; - border-radius: 3px; + padding: 7px 0; display: flex; - align-items: center; max-width: 66.6%; box-sizing: border-box; + border-bottom: 1px solid @gray-9; +} + +.umb-node-preview:last-of-type { + border-bottom: none; + margin-bottom: 7px; } .umb-node-preview--sortable { @@ -34,12 +36,12 @@ .umb-node-preview__content { flex: 1 1 auto; + margin-right: 25px; } .umb-node-preview__name { - font-size: 13px; - font-weight: bold; color: @black; + margin-top: 3px; } .umb-node-preview__description { @@ -76,7 +78,7 @@ display: flex; align-items: center; justify-content: center; - border: 1px dashed @gray-8; + border: 1px dashed @gray-7; color: @turquoise-d1; font-weight: bold; padding: 5px 15px; diff --git a/src/Umbraco.Web.UI.Client/src/less/components/umb-packages.less b/src/Umbraco.Web.UI.Client/src/less/components/umb-packages.less index e053d58a7f..9f9d288f09 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/umb-packages.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/umb-packages.less @@ -328,8 +328,8 @@ a.umb-package-details__back-link { .umb-package-details__main-content { flex: 1 1 auto; - margin-right: 40px; - width: ~"(calc(~'100%' - ~'@{sidebarwidth}' - ~'40px'))"; // Make sure that the main content area doesn't gets affected by inline styling + margin-right: 30px; + width: ~"(calc(~'100%' - ~'@{sidebarwidth}' - ~'30px'))"; // Make sure that the main content area doesn't gets affected by inline styling } .umb-package-details__sidebar { @@ -360,6 +360,7 @@ a.umb-package-details__back-link { padding: 20px; margin-bottom: 20px; border-radius: 3px; + border: 1px solid @gray-8; } .umb-package-details__section-title { diff --git a/src/Umbraco.Web.UI.Client/src/less/components/umb-progress-bar.less b/src/Umbraco.Web.UI.Client/src/less/components/umb-progress-bar.less index e4889446e8..8c15084d55 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/umb-progress-bar.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/umb-progress-bar.less @@ -18,3 +18,13 @@ width: 100%; border-radius: 10px; } + +.umb-progress-bar--s { + height: 5px; + border-radius: 5px; +} + +.umb-progress-bar--m { + height: 10px; + border-radius: 10px; +} \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/less/components/users/umb-permission.less b/src/Umbraco.Web.UI.Client/src/less/components/users/umb-permission.less new file mode 100644 index 0000000000..6e616c6baa --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/less/components/users/umb-permission.less @@ -0,0 +1,19 @@ +.umb-permission { + display: flex; + border-bottom: 1px solid @gray-9; + padding: 7px 0; + cursor: pointer; +} + +.umb-permission:last-of-type { + border-bottom: none; +} + +.umb-permission__toggle { + margin-right: 20px; +} + +.umb-permission__description { + font-size: 13px; + color: @gray-5; +} \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/less/components/users/umb-user-cards.less b/src/Umbraco.Web.UI.Client/src/less/components/users/umb-user-cards.less new file mode 100644 index 0000000000..40a85bec71 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/less/components/users/umb-user-cards.less @@ -0,0 +1,126 @@ +.umb-user-cards { + display: flex; + flex-direction: row; + flex-wrap: wrap; + margin: -10px; +} + +.umb-user-card { + padding: 10px; + box-sizing: border-box; + flex: 0 0 100%; + max-width: 100%; + display: flex; +} + +.umb-user-card:hover, +.umb-user-card:focus { + outline: none; + text-decoration: none !important; +} + +@media (min-width: 768px) { + .umb-user-card { + flex: 0 0 50%; + max-width: 50%; + } +} + +@media (min-width: 1200px) { + .umb-user-card { + flex: 0 0 33.33%; + max-width: 33.33%; + } +} + +@media (min-width: 1400px) { + .umb-user-card { + flex: 0 0 25%; + max-width: 25%; + } +} + +@media (min-width: 1700px) { + .umb-user-card { + flex: 0 0 20%; + max-width: 20%; + } +} + + +@media (min-width: 1900px) { + .umb-user-card { + flex: 0 0 16.66%; + max-width: 16.66%; + } +} + +@media (min-width: 2200px) { + .umb-user-card { + flex: 0 0 14.28%; + max-width: 14.28%; + } +} + +.umb-user-card__content { + position: relative; + padding: 15px; + flex: 1 1 auto; + background-color: @gray-10; + border: 1px solid @gray-9; + border-radius: 3px; + box-sizing: border-box; + display: flex; + flex-direction: column; + cursor: pointer; + max-width: 100%; +} + +.umb-user-card__content:hover, +.umb-user-card:focus .umb-user-card__content { + border-color: @turquoise; +} + +.umb-user-card__avatar { + margin-bottom: 10px; + margin-left: auto; + margin-right: auto; +} + +.umb-user-card__badge { + position: absolute; + top: 10px; + left: 10px; +} + +.umb-user-card__name { + font-size: 15px; + font-weight: bold; + text-align: center; + margin-bottom: 2px; + word-wrap: break-word; +} + +.umb-user-card__checkmark { + position: absolute; + top: 10px; + right: 10px; + display: none; +} + +.umb-user-card:hover .umb-user-card__checkmark, +.umb-user-card__checkmark--visible { + display: block; +} + +.umb-user-card__group { + font-size: 14px; + text-align: center; + margin-bottom: 15px; +} + +.umb-user-card__last-login { + font-size: 13px; + text-align: center; + margin-top: auto; +} \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/less/components/users/umb-user-group-picker-list.less b/src/Umbraco.Web.UI.Client/src/less/components/users/umb-user-group-picker-list.less new file mode 100644 index 0000000000..dff78ce627 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/less/components/users/umb-user-group-picker-list.less @@ -0,0 +1,38 @@ +.umb-user-group-picker-list { + display: flex; + flex-direction: column; +} + +.umb-user-group-picker-list-item { + display: flex; + margin-bottom: 5px; + padding: 10px; +} + +.umb-user-group-picker-list-item:active, +.umb-user-group-picker-list-item:focus { + text-decoration: none; +} + +.umb-user-group-picker-list-item:hover { + background-color: @gray-10; + text-decoration: none; +} + +.umb-user-group-picker-list-item__icon { + font-size: 20px; + line-height: 20px; + min-width: 20px; + margin-right: 15px; +} + +.umb-user-group-picker-list-item__name { + font-size: 15px; + margin-bottom: 3px; + font-weight: bold; +} + +.umb-user-group-picker-list-item__permission { + font-size: 13px; + color: @gray-4; +} \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/less/components/users/umb-user-group-preview.less b/src/Umbraco.Web.UI.Client/src/less/components/users/umb-user-group-preview.less new file mode 100644 index 0000000000..f39096b565 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/less/components/users/umb-user-group-preview.less @@ -0,0 +1,64 @@ +.umb-user-group-preview { + padding-top: 10px; + padding-bottom: 10px; + display: flex; + box-sizing: border-box; + border-bottom: 1px solid @gray-9; +} + +.umb-user-group-preview:last-of-type { + border-bottom: none; + margin-bottom: 10px; +} + +.umb-user-group-preview__icon { + display: flex; + width: 25px; + height: 25px; + justify-content: center; + align-items: center; + font-size: 20px; + margin-right: 10px; + flex: 0 0 auto; +} + +.umb-user-group-preview__content { + flex: 1 1 auto; + margin-right: 25px; +} + +.umb-user-group-preview__name { + font-size: 15px; + color: @black; + margin-bottom: 3px; + margin-top: 2px; +} + +.umb-user-group-preview__permission { + font-size: 13px; + color: @gray-3; +} + +.umb-user-group-preview__actions { + flex: 0 0 auto; + display: flex; + align-items: center; +} + +.umb-user-group-preview__action { + margin-left: 5px; + margin-right: 5px; + font-size: 13px; + font-weight: bold; + color: @gray-5; +} + +.umb-user-group-preview__action:hover { + color: @turquoise; + text-decoration: none; + opacity: 1; +} + +.umb-user-group-preview__action--red:hover { + color: @red; +} \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/less/components/users/umb-user-picker-list.less b/src/Umbraco.Web.UI.Client/src/less/components/users/umb-user-picker-list.less new file mode 100644 index 0000000000..2e0d79e803 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/less/components/users/umb-user-picker-list.less @@ -0,0 +1,42 @@ +.umb-user-picker-list { + display: flex; + flex-direction: column; +} + +.umb-user-picker-list-item { + display: flex; + margin-bottom: 5px; + padding: 10px; + align-items: center; +} + +.umb-user-picker-list-item:active, +.umb-user-picker-list-item:focus { + text-decoration: none; +} + +.umb-user-picker-list-item:hover { + background-color: @gray-10; + text-decoration: none; +} + +.umb-user-picker-list-item__avatar { + margin-right: 15px; + position: relative; +} + +.umb-user-picker-list-item__checkmark { + position: absolute; + bottom: -3px; + right: -3px; +} + +.umb-user-picker-list-item__group { + font-size: 14px; + color: @gray-5; +} + +.umb-user-picker-list-item__name { + font-size: 15px; + font-weight: bold; +} \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/less/components/users/umb-user-preview.less b/src/Umbraco.Web.UI.Client/src/less/components/users/umb-user-preview.less new file mode 100644 index 0000000000..f62f3afd37 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/less/components/users/umb-user-preview.less @@ -0,0 +1,50 @@ +.umb-user-preview { + padding-top: 7px; + padding-bottom: 7px; + display: flex; + box-sizing: border-box; + border-bottom: 1px solid @gray-9; +} + +.umb-user-preview:last-of-type { + border-bottom: none; + margin-bottom: 7px; +} + +.umb-user-preview__avatar { + margin-right: 10px; +} + +.umb-user-preview__content { + flex: 1 1 auto; +} + +.umb-user-preview__name { + color: @black; + margin-bottom: 3px; + margin-top: 2px; +} + +.umb-user-preview__actions { + flex: 0 0 auto; + display: flex; + align-items: center; +} + +.umb-user-preview__action { + margin-left: 5px; + margin-right: 5px; + font-size: 13px; + font-weight: bold; + color: @gray-5; +} + +.umb-user-preview__action:hover { + color: @turquoise; + text-decoration: none; + opacity: 1; +} + +.umb-user-preview__action--red:hover { + color: @red; +} \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/less/forms.less b/src/Umbraco.Web.UI.Client/src/less/forms.less index 869d0b7740..b0557954e6 100644 --- a/src/Umbraco.Web.UI.Client/src/less/forms.less +++ b/src/Umbraco.Web.UI.Client/src/less/forms.less @@ -66,8 +66,9 @@ label.control-label, .control-label { } .form-search .icon, .form-search .icon-search { position: absolute; + z-index: 1; top: 6px; - left: 4px; + left: 6px; color: @gray-8; } @@ -86,6 +87,9 @@ label.control-label, .control-label { background: @white } +.form-search .icon-search + .search-input { + padding-left: 25px !important; +} .form-search .search-input { font-weight: bold; @@ -191,7 +195,7 @@ input[type="tel"], input[type="color"], .uneditable-input { display: inline-block; - height: 30px; + height: @inputHeight; padding: 4px 6px; margin-bottom: @baseLineHeight / 2; font-size: @baseFontSize; @@ -206,7 +210,6 @@ input.-full-width-input { width: 100%; box-sizing: border-box; padding: 4px 6px; - height: 30px; } // Reset appearance properties for textual inputs and textarea @@ -579,9 +582,9 @@ input[type="checkbox"][readonly] { .add-on { display: inline-block; width: auto; - height: @baseLineHeight; - min-width: 16px; - padding: 4px 5px; + height: 22px; + min-width: 18px; + padding: 4px 6px; font-size: @baseFontSize; font-weight: normal; line-height: @baseLineHeight; @@ -653,29 +656,21 @@ input.search-query { padding-left: 14px; padding-left: 4px \9; /* IE7-8 doesn't have border-radius, so don't indent the padding */ margin: 0; // Remove the default margin on all inputs - .border-radius(0px); } /* Allow for input prepend/append in search forms */ -.form-search .input-append .search-query, -.form-search .input-prepend .search-query { - .border-radius(0); // Override due to specificity +.form-search { + .input-prepend { + .btn { + .border-radius(0 @borderRadiusSmall @borderRadiusSmall 0); + } + } + .input-append { + .btn { + .border-radius(0 @borderRadiusSmall @borderRadiusSmall 0); + } + } } -.form-search .input-append .search-query { - .border-radius(14px 0 0 14px); -} -.form-search .input-append .btn { - .border-radius(0 14px 14px 0); -} -.form-search .input-prepend .search-query { - .border-radius(0 14px 14px 0); -} -.form-search .input-prepend .btn { - .border-radius(14px 0 0 14px); -} - - - // HORIZONTAL & VERTICAL FORMS // --------------------------- @@ -819,3 +814,8 @@ legend + .control-group { } } + +/* User/group selector */ +.group-selector .group-selector-list { float: left; } +.group-selector .group-selector-list div { height: 24px; } +.group-selector .group-selector-buttons { float: left; margin: 24px 16px; } diff --git a/src/Umbraco.Web.UI.Client/src/less/main.less b/src/Umbraco.Web.UI.Client/src/less/main.less index 1b573bbe0b..699deb9b18 100644 --- a/src/Umbraco.Web.UI.Client/src/less/main.less +++ b/src/Umbraco.Web.UI.Client/src/less/main.less @@ -47,10 +47,25 @@ h5.-black { background: none; border: none } -.datepicker td.active, -.datepicker td span.active { - background: @turquoise !important; +.bootstrap-datetimepicker-widget { + td { + &.active, span.active { + background: @turquoise !important; + } + &.today:not(.active):before { + border-bottom-color: @purple-l1 !important; + } + a[data-action] { + padding: 0 !important; + } + .timepicker-hour, + .timepicker-minute, + .timepicker-second { + margin: 8px 0; + } + } } + .umb-datetime-picker div.info { vertical-align: middle } @@ -113,6 +128,19 @@ h5.-black { border: none; } +/* BLOCK MODE */ +.block-form .umb-control-group { + border-bottom: none; + margin-bottom: 10px !important; + padding-bottom: 0; +} + +.block-form .umb-control-group label .help-block, +.block-form .umb-control-group label small { + font-size: 13px; + padding-top: 2px; + margin-bottom: 5px; +} /*COMPACT MODE */ .compact .umb-pane{margin: 0px 0px 15px 0px;} diff --git a/src/Umbraco.Web.UI.Client/src/less/panel.less b/src/Umbraco.Web.UI.Client/src/less/panel.less index 6bc2a2b2de..378f6228a6 100644 --- a/src/Umbraco.Web.UI.Client/src/less/panel.less +++ b/src/Umbraco.Web.UI.Client/src/less/panel.less @@ -387,8 +387,8 @@ background: @white; border: 1px solid @gray-8; animation: fadeIn 0.5s; - flex: 0 0 55px; border-radius: 3px; + width: 55px; } .umb-panel-header-title-wrapper { @@ -446,8 +446,8 @@ input.umb-panel-header-name-input { margin-bottom: 0; font-weight: bold; box-sizing: border-box; - height: 30px; - line-height: 30px; + height: 32px; + line-height: 32px; width: 100%; &:hover { background: @white; diff --git a/src/Umbraco.Web.UI.Client/src/less/sections.less b/src/Umbraco.Web.UI.Client/src/less/sections.less index 51ec5c7436..0579d2c0c5 100644 --- a/src/Umbraco.Web.UI.Client/src/less/sections.less +++ b/src/Umbraco.Web.UI.Client/src/less/sections.less @@ -7,7 +7,7 @@ ul.sections { background: @purple; height: 100%; width: 80px; - border-right: 1px solid @purple; + border-right: 1px solid @purple-d1; } ul.sections li { @@ -22,13 +22,16 @@ ul.sections li [class^="icon-"], ul.sections li [class*=" icon-"], ul.sections li img.icon-section { font-size: 30px; - line-height: 20px; /* set line-height to ensure all icons use same line-height */ display: inline-block; margin: 1px 0 0 0; color: @purple-l2; -webkit-transition: all .3s linear; -moz-transition: all .3s linear; transition: all .3s linear; + + &, &:before { + line-height: 20px !important; /* set line-height to ensure all icons use same line-height */ + } } ul.sections:hover li [class^="icon-"], @@ -89,6 +92,10 @@ ul.sections li.avatar a img { width: 30px; } +ul.sections li.avatar a span { + opacity: 1; +} + .faded ul.sections li { opacity: 0.4 } @@ -168,7 +175,7 @@ ul.sections-tray { width: 80px; & > li:first-child > a { - border-top: 1px solid @purple; + border-top: 1px solid @purple-d1; } & > li { diff --git a/src/Umbraco.Web.UI.Client/src/less/tables.less b/src/Umbraco.Web.UI.Client/src/less/tables.less index f16447928f..57a8e0826b 100644 --- a/src/Umbraco.Web.UI.Client/src/less/tables.less +++ b/src/Umbraco.Web.UI.Client/src/less/tables.less @@ -13,6 +13,14 @@ table { border-spacing: 0; } +table thead { + background-color: @gray-10; +} + +table tr:hover { + background-color: @gray-10; +} + // BASELINE STYLES // --------------- @@ -20,13 +28,13 @@ table { .table { width: 100%; margin-bottom: @baseLineHeight; + border: 1px solid @gray-8; // Cells th, td { - padding: 8px; + padding: 10px 8px; line-height: @baseLineHeight; text-align: left; - vertical-align: top; border-top: 1px solid @tableBorder; } th { diff --git a/src/Umbraco.Web.UI.Client/src/less/tree.less b/src/Umbraco.Web.UI.Client/src/less/tree.less index df1bc4114a..e5d367bbd2 100644 --- a/src/Umbraco.Web.UI.Client/src/less/tree.less +++ b/src/Umbraco.Web.UI.Client/src/less/tree.less @@ -53,22 +53,21 @@ border-color: @turquoise-d1; } -.umb-tree li.root > div { - padding: 0; +.umb-tree li.root > div:first-child { + padding: 0; } -.umb-tree li.root > div h5 { - margin: 0; - width: 100%; - - display: flex; - align-items: center; +.umb-tree li.root > div h5, .umb-tree li.root > div h6 { + margin: 0; + width: 100%; + display: flex; + align-items: center; } -.umb-tree li.root > div h5 > a, .umb-tree-header { - display: flex; - padding: 20px 0 20px 20px; - box-sizing: border-box; +.umb-tree li.root > div:first-child h5 > a, .umb-tree-header { + display: flex; + padding: 20px 0 20px 20px; + box-sizing: border-box; } .umb-tree * { @@ -96,14 +95,22 @@ text-decoration: none } -.umb-tree div { +/*.umb-tree div.tree-node { padding: 5px 0 5px 0; position: relative; overflow: hidden; display: flex; flex-wrap: nowrap; align-items: center; +}*/ +.umb-tree div { + padding: 5px 0 5px 0; + position: relative; + overflow: hidden; + display: flex; + flex-wrap: nowrap; + align-items: center; } .umb-tree a.noSpr { @@ -192,6 +199,21 @@ /*color:@turquoise;*/ } +.umb-tree div.umb-search-group { + position: inherit; + display: inherit; +} + +.umb-tree div.umb-search-group:hover { + background: inherit; +} +.umb-tree div.umb-search-group h6 { + /*color: @gray-5;*/ + padding: 10px 0 10px 20px; + font-weight: inherit; + background:@gray-10; +} + .umb-tree .umb-search-group-item { padding-left: 20px; } diff --git a/src/Umbraco.Web.UI.Client/src/less/utilities/layout/_display.less b/src/Umbraco.Web.UI.Client/src/less/utilities/layout/_display.less new file mode 100644 index 0000000000..b156b4135b --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/less/utilities/layout/_display.less @@ -0,0 +1,41 @@ +/* + DISPLAY + Base: + d = display + Modifiers: + n = none + b = block + ib = inline-block + it = inline-table + t = table + tc = table-cell + tr = table-row + tcol = table-column + tcolg = table-column-group + Media Query Extensions: + -ns = not-small + -m = medium + -l = large +*/ + +.dn { display: none; } +.di { display: inline; } +.db { display: block; } +.dib { display: inline-block; } +.dit { display: inline-table; } +.dt { display: table; } +.dtc { display: table-cell; } +.dt-row { display: table-row; } +.dt-row-group { display: table-row-group; } +.dt-column { display: table-column; } +.dt-column-group { display: table-column-group; } + +/* + This will set table to full width and then + all cells will be equal width +*/ + +.dt--fixed { + table-layout: fixed; + width: 100%; +} \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/less/utilities/typography/_text-decoration.less b/src/Umbraco.Web.UI.Client/src/less/utilities/typography/_text-decoration.less new file mode 100644 index 0000000000..39ba646aac --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/less/utilities/typography/_text-decoration.less @@ -0,0 +1,9 @@ +/* + + TEXT DECORATION + +*/ + +.strike { text-decoration: line-through; } +.underline { text-decoration: underline; } +.no-underline { text-decoration: none; } \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/less/utilities/typography/_white-space.less b/src/Umbraco.Web.UI.Client/src/less/utilities/typography/_white-space.less new file mode 100644 index 0000000000..b8fb5ca5db --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/less/utilities/typography/_white-space.less @@ -0,0 +1,15 @@ +/* + + WHITE SPACE + +*/ + +.ws-normal { white-space: normal; } +.nowrap { white-space: nowrap; } +.pre { white-space: pre; } + +.truncate { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/less/variables.less b/src/Umbraco.Web.UI.Client/src/less/variables.less index c173f122cb..666941b914 100644 --- a/src/Umbraco.Web.UI.Client/src/less/variables.less +++ b/src/Umbraco.Web.UI.Client/src/less/variables.less @@ -190,7 +190,7 @@ @inputBorderRadius: 0; @inputDisabledBackground: @gray-10; @formActionsBackground: @gray-9; -@inputHeight: @baseLineHeight + 10px; // base line-height + 8px vertical padding + 2px top/bottom border +@inputHeight: @baseLineHeight + 12px; // base line-height + 8px vertical padding + 2px top/bottom border @controlRequiredColor: @red; diff --git a/src/Umbraco.Web.UI.Client/src/views/common/dialogs/help.controller.js b/src/Umbraco.Web.UI.Client/src/views/common/dialogs/help.controller.js index d898ec48f8..e33c37ab05 100644 --- a/src/Umbraco.Web.UI.Client/src/views/common/dialogs/help.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/common/dialogs/help.controller.js @@ -19,7 +19,6 @@ angular.module("umbraco") userService.getCurrentUser().then(function(user){ - rq.usertype = user.userType; rq.lang = user.locale; if($routeParams.url){ diff --git a/src/Umbraco.Web.UI.Client/src/views/common/dialogs/linkpicker.controller.js b/src/Umbraco.Web.UI.Client/src/views/common/dialogs/linkpicker.controller.js index 5ee103a32b..e76db90f47 100644 --- a/src/Umbraco.Web.UI.Client/src/views/common/dialogs/linkpicker.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/common/dialogs/linkpicker.controller.js @@ -108,15 +108,15 @@ angular.module("umbraco").controller("Umbraco.Dialogs.LinkPickerController", $scope.switchToMediaPicker = function () { userService.getCurrentUser().then(function (userData) { - dialogService.mediaPicker({ - startNodeId: userData.startMediaId, - callback: function (media) { - $scope.target.id = media.id; - $scope.target.isMedia = true; - $scope.target.name = media.name; - $scope.target.url = mediaHelper.resolveFile(media); - } - }); + dialogService.mediaPicker({ + startNodeId: userData.startMediaIds.length == 0 ? -1 : userData.startMediaIds[0], + callback: function(media) { + $scope.target.id = media.id; + $scope.target.isMedia = true; + $scope.target.name = media.name; + $scope.target.url = mediaHelper.resolveFile(media); + } + }); }); }; diff --git a/src/Umbraco.Web.UI.Client/src/views/common/dialogs/login.controller.js b/src/Umbraco.Web.UI.Client/src/views/common/dialogs/login.controller.js index 49db7dc191..18158a5ff2 100644 --- a/src/Umbraco.Web.UI.Client/src/views/common/dialogs/login.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/common/dialogs/login.controller.js @@ -1,237 +1,399 @@ angular.module("umbraco").controller("Umbraco.Dialogs.LoginController", - function ($scope, $cookies, localizationService, userService, externalLoginInfo, resetPasswordCodeInfo, $timeout, authResource, dialogService) { + function ($scope, $cookies, $location, currentUserResource, formHelper, mediaHelper, umbRequestHelper, Upload, localizationService, userService, externalLoginInfo, resetPasswordCodeInfo, $timeout, authResource, dialogService, $q) { - var setFieldFocus = function(form, field) { - $timeout(function() { - $("form[name='" + form + "'] input[name='" + field + "']").focus(); + $scope.invitedUser = null; + $scope.invitedUserPasswordModel = { + password: "", + confirmPassword: "", + buttonState: "", + passwordPolicies: null, + passwordPolicyText: "" + } + $scope.avatarFile = { + filesHolder: null, + uploadStatus: null, + uploadProgress: 0, + maxFileSize: Umbraco.Sys.ServerVariables.umbracoSettings.maxFileSize + "KB", + acceptedFileTypes: mediaHelper.formatFileTypes(Umbraco.Sys.ServerVariables.umbracoSettings.imageFileTypes), + uploaded: false + } + + function init() { + // Check if it is a new user + var inviteVal = $location.search().invite; + if (inviteVal && (inviteVal === "1" || inviteVal === "2")) { + + $q.all([ + //get the current invite user + authResource.getCurrentInvitedUser().then(function (data) { + $scope.invitedUser = data; + }, + function() { + //it failed so we should remove the search + $location.search('invite', null); + }), + //get the membership provider config for password policies + authResource.getMembershipProviderConfig().then(function (data) { + $scope.invitedUserPasswordModel.passwordPolicies = data; + + //localize the text + localizationService.localize("errorHandling_errorInPasswordFormat", + [ + $scope.invitedUserPasswordModel.passwordPolicies.minPasswordLength, + $scope.invitedUserPasswordModel.passwordPolicies.minNonAlphaNumericChars + ]).then(function(data) { + $scope.invitedUserPasswordModel.passwordPolicyText = data; }); + }) + ]).then(function () { + + $scope.inviteStep = Number(inviteVal); + + }); + } + } + + $scope.changeAvatar = function (files, event) { + if (files && files.length > 0) { + upload(files[0]); + } + }; + + $scope.getStarted = function() { + $location.search('invite', null); + $scope.submit(true); + } + + function upload(file) { + + $scope.avatarFile.uploadProgress = 0; + + Upload.upload({ + url: umbRequestHelper.getApiUrl("currentUserApiBaseUrl", "PostSetAvatar"), + fields: {}, + file: file + }).progress(function (evt) { + + if ($scope.avatarFile.uploadStatus !== "done" && $scope.avatarFile.uploadStatus !== "error") { + // set uploading status on file + $scope.avatarFile.uploadStatus = "uploading"; + + // calculate progress in percentage + var progressPercentage = parseInt(100.0 * evt.loaded / evt.total, 10); + + // set percentage property on file + $scope.avatarFile.uploadProgress = progressPercentage; } - var twoFactorloginDialog = null; - function show2FALoginDialog(view, callback) { - if (!twoFactorloginDialog) { - twoFactorloginDialog = dialogService.open({ + }).success(function (data, status, headers, config) { - //very special flag which means that global events cannot close this dialog - manualClose: true, - template: view, - modalClass: "login-overlay", - animation: "slide", - show: true, - callback: callback, + $scope.avatarFile.uploadProgress = 100; - }); - } + // set done status on file + $scope.avatarFile.uploadStatus = "done"; + + $scope.invitedUser.avatars = data; + + $scope.avatarFile.uploaded = true; + + }).error(function (evt, status, headers, config) { + + // set status done + $scope.avatarFile.uploadStatus = "error"; + + // If file not found, server will return a 404 and display this message + if (status === 404) { + $scope.avatarFile.serverErrorMessage = "File not found"; } - - function resetInputValidation() { - $scope.confirmPassword = ""; - $scope.password = ""; - $scope.login = ""; - if ($scope.loginForm) { - $scope.loginForm.username.$setValidity('auth', true); - $scope.loginForm.password.$setValidity('auth', true); - } - if ($scope.requestPasswordResetForm) { - $scope.requestPasswordResetForm.email.$setValidity("auth", true); - } - if ($scope.setPasswordForm) { - $scope.setPasswordForm.password.$setValidity('auth', true); - $scope.setPasswordForm.confirmPassword.$setValidity('auth', true); - } - } - - $scope.allowPasswordReset = Umbraco.Sys.ServerVariables.umbracoSettings.allowPasswordReset; - - $scope.showLogin = function () { - $scope.errorMsg = ""; - resetInputValidation(); - $scope.view = "login"; - setFieldFocus("loginForm", "username"); - } - - $scope.showRequestPasswordReset = function () { - $scope.errorMsg = ""; - resetInputValidation(); - $scope.view = "request-password-reset"; - $scope.showEmailResetConfirmation = false; - setFieldFocus("requestPasswordResetForm", "email"); - } - - $scope.showSetPassword = function () { - $scope.errorMsg = ""; - resetInputValidation(); - $scope.view = "set-password"; - setFieldFocus("setPasswordForm", "password"); - } - - var d = new Date(); - var konamiGreetings = new Array("Suze Sunday", "Malibu Monday", "Tequila Tuesday", "Whiskey Wednesday", "Negroni Day", "Fernet Friday", "Sancerre Saturday"); - var konamiMode = $cookies.konamiLogin; - if (konamiMode == "1") { - $scope.greeting = "Happy " + konamiGreetings[d.getDay()]; - } else { - localizationService.localize("login_greeting" + d.getDay()).then(function (label) { - $scope.greeting = label; - }); // weekday[d.getDay()]; - } - $scope.errorMsg = ""; - - $scope.externalLoginFormAction = Umbraco.Sys.ServerVariables.umbracoUrls.externalLoginsUrl; - $scope.externalLoginProviders = externalLoginInfo.providers; - $scope.externalLoginInfo = externalLoginInfo; - $scope.resetPasswordCodeInfo = resetPasswordCodeInfo; - $scope.backgroundImage = Umbraco.Sys.ServerVariables.umbracoSettings.loginBackgroundImage; - - $scope.activateKonamiMode = function () { - if ($cookies.konamiLogin == "1") { - // somehow I can't update the cookie value using $cookies, so going native - document.cookie = "konamiLogin=; expires=Thu, 01 Jan 1970 00:00:01 GMT;"; - document.location.reload(); - } else { - document.cookie = "konamiLogin=1; expires=Tue, 01 Jan 2030 00:00:01 GMT;"; - $scope.$apply(function () { - $scope.greeting = "Happy " + konamiGreetings[d.getDay()]; - }); - } - } - - $scope.loginSubmit = function (login, password) { - - //if the login and password are not empty we need to automatically - // validate them - this is because if there are validation errors on the server - // then the user has to change both username & password to resubmit which isn't ideal, - // so if they're not empty, we'll just make sure to set them to valid. - if (login && password && login.length > 0 && password.length > 0) { - $scope.loginForm.username.$setValidity('auth', true); - $scope.loginForm.password.$setValidity('auth', true); - } - - if ($scope.loginForm.$invalid) { - return; - } - - userService.authenticate(login, password) - .then(function(data) { - $scope.submit(true); - }, - function(reason) { - - //is Two Factor required? - if (reason.status === 402) { - $scope.errorMsg = "Additional authentication required"; - show2FALoginDialog(reason.data.twoFactorView, $scope.submit); - } - else { - $scope.errorMsg = reason.errorMsg; - - //set the form inputs to invalid - $scope.loginForm.username.$setValidity("auth", false); - $scope.loginForm.password.$setValidity("auth", false); - } - }); - - //setup a watch for both of the model values changing, if they change - // while the form is invalid, then revalidate them so that the form can - // be submitted again. - $scope.loginForm.username.$viewChangeListeners.push(function () { - if ($scope.loginForm.username.$invalid) { - $scope.loginForm.username.$setValidity('auth', true); - } - }); - $scope.loginForm.password.$viewChangeListeners.push(function () { - if ($scope.loginForm.password.$invalid) { - $scope.loginForm.password.$setValidity('auth', true); - } - }); - }; - - $scope.requestPasswordResetSubmit = function (email) { - - if (email && email.length > 0) { - $scope.requestPasswordResetForm.email.$setValidity('auth', true); - } - - $scope.showEmailResetConfirmation = false; - - if ($scope.requestPasswordResetForm.$invalid) { - return; - } - - $scope.errorMsg = ""; - - authResource.performRequestPasswordReset(email) - .then(function () { - //remove the email entered - $scope.email = ""; - $scope.showEmailResetConfirmation = true; - }, function (reason) { - $scope.errorMsg = reason.errorMsg; - $scope.requestPasswordResetForm.email.$setValidity("auth", false); - }); - - $scope.requestPasswordResetForm.email.$viewChangeListeners.push(function () { - if ($scope.requestPasswordResetForm.email.$invalid) { - $scope.requestPasswordResetForm.email.$setValidity('auth', true); - } - }); - }; - - $scope.setPasswordSubmit = function (password, confirmPassword) { - - $scope.showSetPasswordConfirmation = false; - - if (password && confirmPassword && password.length > 0 && confirmPassword.length > 0) { - $scope.setPasswordForm.password.$setValidity('auth', true); - $scope.setPasswordForm.confirmPassword.$setValidity('auth', true); - } - - if ($scope.setPasswordForm.$invalid) { - return; - } - - authResource.performSetPassword($scope.resetPasswordCodeInfo.resetCodeModel.userId, password, confirmPassword, $scope.resetPasswordCodeInfo.resetCodeModel.resetCode) - .then(function () { - $scope.showSetPasswordConfirmation = true; - $scope.resetComplete = true; - - //reset the values in the resetPasswordCodeInfo angular so if someone logs out the change password isn't shown again - resetPasswordCodeInfo.resetCodeModel = null; - - }, function (reason) { - if (reason.data && reason.data.Message) { - $scope.errorMsg = reason.data.Message; - } - else { - $scope.errorMsg = reason.errorMsg; - } - $scope.setPasswordForm.password.$setValidity("auth", false); - $scope.setPasswordForm.confirmPassword.$setValidity("auth", false); - }); - - $scope.setPasswordForm.password.$viewChangeListeners.push(function () { - if ($scope.setPasswordForm.password.$invalid) { - $scope.setPasswordForm.password.$setValidity('auth', true); - } - }); - $scope.setPasswordForm.confirmPassword.$viewChangeListeners.push(function () { - if ($scope.setPasswordForm.confirmPassword.$invalid) { - $scope.setPasswordForm.confirmPassword.$setValidity('auth', true); - } - }); - } - - - //Now, show the correct panel: - - if ($scope.resetPasswordCodeInfo.resetCodeModel) { - $scope.showSetPassword(); - } - else if ($scope.resetPasswordCodeInfo.errors.length > 0) { - $scope.view = "password-reset-code-expired"; + else if (status == 400) { + //it's a validation error + $scope.avatarFile.serverErrorMessage = evt.message; } else { - $scope.showLogin(); - } + //it's an unhandled error + //if the service returns a detailed error + if (evt.InnerException) { + $scope.avatarFile.serverErrorMessage = evt.InnerException.ExceptionMessage; - }); + //Check if its the common "too large file" exception + if (evt.InnerException.StackTrace && evt.InnerException.StackTrace.indexOf("ValidateRequestEntityLength") > 0) { + $scope.avatarFile.serverErrorMessage = "File too large to upload"; + } + + } else if (evt.Message) { + $scope.avatarFile.serverErrorMessage = evt.Message; + } + } + }); + } + + $scope.inviteSavePassword = function () { + + if (formHelper.submitForm({ scope: $scope, statusMessage: "Saving..." })) { + + $scope.invitedUserPasswordModel.buttonState = "busy"; + + currentUserResource.performSetInvitedUserPassword($scope.invitedUserPasswordModel.password) + .then(function (data) { + + //success + formHelper.resetForm({ scope: $scope, notifications: data.notifications }); + $scope.invitedUserPasswordModel.buttonState = "success"; + //set the user and set them as logged in + $scope.invitedUser = data; + userService.setAuthenticationSuccessful(data); + + $scope.inviteStep = 2; + + }, function(err) { + + //error + formHelper.handleError(err); + + $scope.invitedUserPasswordModel.buttonState = "error"; + + }); + } + }; + + var setFieldFocus = function (form, field) { + $timeout(function () { + $("form[name='" + form + "'] input[name='" + field + "']").focus(); + }); + } + + var twoFactorloginDialog = null; + function show2FALoginDialog(view, callback) { + if (!twoFactorloginDialog) { + twoFactorloginDialog = dialogService.open({ + + //very special flag which means that global events cannot close this dialog + manualClose: true, + template: view, + modalClass: "login-overlay", + animation: "slide", + show: true, + callback: callback, + + }); + } + } + + function resetInputValidation() { + $scope.confirmPassword = ""; + $scope.password = ""; + $scope.login = ""; + if ($scope.loginForm) { + $scope.loginForm.username.$setValidity('auth', true); + $scope.loginForm.password.$setValidity('auth', true); + } + if ($scope.requestPasswordResetForm) { + $scope.requestPasswordResetForm.email.$setValidity("auth", true); + } + if ($scope.setPasswordForm) { + $scope.setPasswordForm.password.$setValidity('auth', true); + $scope.setPasswordForm.confirmPassword.$setValidity('auth', true); + } + } + + $scope.allowPasswordReset = Umbraco.Sys.ServerVariables.umbracoSettings.allowPasswordReset; + + $scope.showLogin = function () { + $scope.errorMsg = ""; + resetInputValidation(); + $scope.view = "login"; + setFieldFocus("loginForm", "username"); + } + + $scope.showRequestPasswordReset = function () { + $scope.errorMsg = ""; + resetInputValidation(); + $scope.view = "request-password-reset"; + $scope.showEmailResetConfirmation = false; + setFieldFocus("requestPasswordResetForm", "email"); + } + + $scope.showSetPassword = function () { + $scope.errorMsg = ""; + resetInputValidation(); + $scope.view = "set-password"; + setFieldFocus("setPasswordForm", "password"); + } + + var d = new Date(); + var konamiGreetings = new Array("Suze Sunday", "Malibu Monday", "Tequila Tuesday", "Whiskey Wednesday", "Negroni Day", "Fernet Friday", "Sancerre Saturday"); + var konamiMode = $cookies.konamiLogin; + if (konamiMode == "1") { + $scope.greeting = "Happy " + konamiGreetings[d.getDay()]; + } else { + localizationService.localize("login_greeting" + d.getDay()).then(function (label) { + $scope.greeting = label; + }); // weekday[d.getDay()]; + } + $scope.errorMsg = ""; + + $scope.externalLoginFormAction = Umbraco.Sys.ServerVariables.umbracoUrls.externalLoginsUrl; + $scope.externalLoginProviders = externalLoginInfo.providers; + $scope.externalLoginInfo = externalLoginInfo; + $scope.resetPasswordCodeInfo = resetPasswordCodeInfo; + $scope.backgroundImage = Umbraco.Sys.ServerVariables.umbracoSettings.loginBackgroundImage; + + $scope.activateKonamiMode = function () { + if ($cookies.konamiLogin == "1") { + // somehow I can't update the cookie value using $cookies, so going native + document.cookie = "konamiLogin=; expires=Thu, 01 Jan 1970 00:00:01 GMT;"; + document.location.reload(); + } else { + document.cookie = "konamiLogin=1; expires=Tue, 01 Jan 2030 00:00:01 GMT;"; + $scope.$apply(function () { + $scope.greeting = "Happy " + konamiGreetings[d.getDay()]; + }); + } + } + + $scope.loginSubmit = function (login, password) { + + //TODO: Do validation properly like in the invite password update + + //if the login and password are not empty we need to automatically + // validate them - this is because if there are validation errors on the server + // then the user has to change both username & password to resubmit which isn't ideal, + // so if they're not empty, we'll just make sure to set them to valid. + if (login && password && login.length > 0 && password.length > 0) { + $scope.loginForm.username.$setValidity('auth', true); + $scope.loginForm.password.$setValidity('auth', true); + } + + if ($scope.loginForm.$invalid) { + return; + } + + userService.authenticate(login, password) + .then(function (data) { + $scope.submit(true); + }, + function (reason) { + + //is Two Factor required? + if (reason.status === 402) { + $scope.errorMsg = "Additional authentication required"; + show2FALoginDialog(reason.data.twoFactorView, $scope.submit); + } + else { + $scope.errorMsg = reason.errorMsg; + + //set the form inputs to invalid + $scope.loginForm.username.$setValidity("auth", false); + $scope.loginForm.password.$setValidity("auth", false); + } + }); + + //setup a watch for both of the model values changing, if they change + // while the form is invalid, then revalidate them so that the form can + // be submitted again. + $scope.loginForm.username.$viewChangeListeners.push(function () { + if ($scope.loginForm.username.$invalid) { + $scope.loginForm.username.$setValidity('auth', true); + } + }); + $scope.loginForm.password.$viewChangeListeners.push(function () { + if ($scope.loginForm.password.$invalid) { + $scope.loginForm.password.$setValidity('auth', true); + } + }); + }; + + $scope.requestPasswordResetSubmit = function (email) { + + //TODO: Do validation properly like in the invite password update + + if (email && email.length > 0) { + $scope.requestPasswordResetForm.email.$setValidity('auth', true); + } + + $scope.showEmailResetConfirmation = false; + + if ($scope.requestPasswordResetForm.$invalid) { + return; + } + + $scope.errorMsg = ""; + + authResource.performRequestPasswordReset(email) + .then(function () { + //remove the email entered + $scope.email = ""; + $scope.showEmailResetConfirmation = true; + }, function (reason) { + $scope.errorMsg = reason.errorMsg; + $scope.requestPasswordResetForm.email.$setValidity("auth", false); + }); + + $scope.requestPasswordResetForm.email.$viewChangeListeners.push(function () { + if ($scope.requestPasswordResetForm.email.$invalid) { + $scope.requestPasswordResetForm.email.$setValidity('auth', true); + } + }); + }; + + $scope.setPasswordSubmit = function (password, confirmPassword) { + + $scope.showSetPasswordConfirmation = false; + + if (password && confirmPassword && password.length > 0 && confirmPassword.length > 0) { + $scope.setPasswordForm.password.$setValidity('auth', true); + $scope.setPasswordForm.confirmPassword.$setValidity('auth', true); + } + + if ($scope.setPasswordForm.$invalid) { + return; + } + + //TODO: All of this logic can/should be shared! We should do validation the nice way instead of all of this manual stuff, see: inviteSavePassword + authResource.performSetPassword($scope.resetPasswordCodeInfo.resetCodeModel.userId, password, confirmPassword, $scope.resetPasswordCodeInfo.resetCodeModel.resetCode) + .then(function () { + $scope.showSetPasswordConfirmation = true; + $scope.resetComplete = true; + + //reset the values in the resetPasswordCodeInfo angular so if someone logs out the change password isn't shown again + resetPasswordCodeInfo.resetCodeModel = null; + + }, function (reason) { + if (reason.data && reason.data.Message) { + $scope.errorMsg = reason.data.Message; + } + else { + $scope.errorMsg = reason.errorMsg; + } + $scope.setPasswordForm.password.$setValidity("auth", false); + $scope.setPasswordForm.confirmPassword.$setValidity("auth", false); + }); + + $scope.setPasswordForm.password.$viewChangeListeners.push(function () { + if ($scope.setPasswordForm.password.$invalid) { + $scope.setPasswordForm.password.$setValidity('auth', true); + } + }); + $scope.setPasswordForm.confirmPassword.$viewChangeListeners.push(function () { + if ($scope.setPasswordForm.confirmPassword.$invalid) { + $scope.setPasswordForm.confirmPassword.$setValidity('auth', true); + } + }); + } + + + //Now, show the correct panel: + + if ($scope.resetPasswordCodeInfo.resetCodeModel) { + $scope.showSetPassword(); + } + else if ($scope.resetPasswordCodeInfo.errors.length > 0) { + $scope.view = "password-reset-code-expired"; + } + else { + $scope.showLogin(); + } + + init(); + + }); diff --git a/src/Umbraco.Web.UI.Client/src/views/common/dialogs/login.html b/src/Umbraco.Web.UI.Client/src/views/common/dialogs/login.html index 65ce1c3ecb..3af0c30a08 100644 --- a/src/Umbraco.Web.UI.Client/src/views/common/dialogs/login.html +++ b/src/Umbraco.Web.UI.Client/src/views/common/dialogs/login.html @@ -1,148 +1,238 @@ 
- -
- - - +
- + + + + + +
\ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/views/common/dialogs/rteembed.html b/src/Umbraco.Web.UI.Client/src/views/common/dialogs/rteembed.html index 9acb92401b..7bf24c086f 100644 --- a/src/Umbraco.Web.UI.Client/src/views/common/dialogs/rteembed.html +++ b/src/Umbraco.Web.UI.Client/src/views/common/dialogs/rteembed.html @@ -2,13 +2,13 @@
- -
-
-
-
- -
- - Yes, remove paragraph tags -
-
-
-
diff --git a/src/Umbraco.Web.UI.Client/src/views/common/overlays/linkpicker/linkpicker.controller.js b/src/Umbraco.Web.UI.Client/src/views/common/overlays/linkpicker/linkpicker.controller.js index fde3e4cab3..5401ae5387 100644 --- a/src/Umbraco.Web.UI.Client/src/views/common/overlays/linkpicker/linkpicker.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/common/overlays/linkpicker/linkpicker.controller.js @@ -89,23 +89,24 @@ angular.module("umbraco").controller("Umbraco.Overlays.LinkPickerController", $scope.switchToMediaPicker = function () { userService.getCurrentUser().then(function (userData) { - $scope.mediaPickerOverlay = { - view: "mediapicker", - startNodeId: userData.startMediaId, - show: true, - submit: function(model) { - var media = model.selectedImages[0]; + $scope.mediaPickerOverlay = { + view: "mediapicker", + startNodeId: userData.startMediaIds.length !== 1 ? -1 : userData.startMediaIds[0], + startNodeIsVirtual: userData.startMediaIds.length !== 1, + show: true, + submit: function(model) { + var media = model.selectedImages[0]; - $scope.model.target.id = media.id; - $scope.model.target.udi = media.udi; - $scope.model.target.isMedia = true; - $scope.model.target.name = media.name; - $scope.model.target.url = mediaHelper.resolveFile(media); + $scope.model.target.id = media.id; + $scope.model.target.udi = media.udi; + $scope.model.target.isMedia = true; + $scope.model.target.name = media.name; + $scope.model.target.url = mediaHelper.resolveFile(media); - $scope.mediaPickerOverlay.show = false; - $scope.mediaPickerOverlay = null; - } - }; + $scope.mediaPickerOverlay.show = false; + $scope.mediaPickerOverlay = null; + } + }; }); }; diff --git a/src/Umbraco.Web.UI.Client/src/views/common/overlays/mediaPicker/mediapicker.controller.js b/src/Umbraco.Web.UI.Client/src/views/common/overlays/mediaPicker/mediapicker.controller.js index 1992bed068..a6a2ddcbab 100644 --- a/src/Umbraco.Web.UI.Client/src/views/common/overlays/mediaPicker/mediapicker.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/common/overlays/mediaPicker/mediapicker.controller.js @@ -1,7 +1,7 @@ //used for the media picker dialog angular.module("umbraco") .controller("Umbraco.Overlays.MediaPickerController", - function ($scope, mediaResource, umbRequestHelper, entityResource, $log, mediaHelper, mediaTypeHelper, eventsService, treeService, $element, $timeout, $cookies, localStorageService, localizationService) { + function($scope, mediaResource, umbRequestHelper, entityResource, $log, mediaHelper, mediaTypeHelper, eventsService, treeService, $element, $timeout, $cookies, localStorageService, localizationService) { if (!$scope.model.title) { $scope.model.title = localizationService.localize("defaultdialogs_selectMedia"); @@ -16,6 +16,7 @@ angular.module("umbraco") $scope.startNodeId = dialogOptions.startNodeId ? dialogOptions.startNodeId : -1; $scope.cropSize = dialogOptions.cropSize; $scope.lastOpenedNode = localStorageService.get("umbLastOpenedMediaNodeId"); + $scope.lockedFolder = true; var umbracoSettings = Umbraco.Sys.ServerVariables.umbracoSettings; var allowedUploadFiles = mediaHelper.formatFileTypes(umbracoSettings.allowedUploadFiles); @@ -96,7 +97,6 @@ angular.module("umbraco") }; $scope.gotoFolder = function(folder) { - if (!$scope.multiPicker) { deselectAllImages($scope.model.selectedImages); } @@ -108,7 +108,6 @@ angular.module("umbraco") if (folder.id > 0) { entityResource.getAncestors(folder.id, "media") .then(function(anc) { - // anc.splice(0,1); $scope.path = _.filter(anc, function(f) { return f.path.indexOf($scope.startNodeId) !== -1; @@ -123,12 +122,14 @@ angular.module("umbraco") $scope.path = []; } - getChildren(folder.id); + $scope.lockedFolder = folder.id === -1 && $scope.model.startNodeIsVirtual; + $scope.currentFolder = folder; localStorageService.set("umbLastOpenedMediaNodeId", folder.id); + return getChildren(folder.id); }; - $scope.clickHandler = function (image, event, index) { + $scope.clickHandler = function(image, event, index) { if (image.isFolder) { if ($scope.disableFolderSelect) { $scope.gotoFolder(image); @@ -143,7 +144,7 @@ angular.module("umbraco") $scope.target = image; // handle both entity and full media object - if(image.image) { + if (image.image) { $scope.target.url = image.image; } else { $scope.target.url = mediaHelper.resolveFile(image); @@ -188,8 +189,12 @@ angular.module("umbraco") images.length = 0; } - $scope.onUploadComplete = function() { - $scope.gotoFolder($scope.currentFolder); + $scope.onUploadComplete = function(files) { + $scope.gotoFolder($scope.currentFolder).then(function() { + if (files.length === 1 && $scope.model.selectedImages.length === 0) { + selectImage($scope.images[$scope.images.length - 1]); + } + }); }; $scope.onFilesQueue = function() { @@ -203,8 +208,7 @@ angular.module("umbraco") if (nodePath.indexOf($scope.startNodeId.toString()) !== -1) { $scope.gotoFolder({ id: $scope.lastOpenedNode, name: "Media", icon: "icon-folder" }); return true; - } - else { + } else { $scope.gotoFolder({ id: $scope.startNodeId, name: "Media", icon: "icon-folder" }); return false; } @@ -219,26 +223,25 @@ angular.module("umbraco") if ($scope.lastOpenedNode && $scope.lastOpenedNode !== -1) { entityResource.getById($scope.lastOpenedNode, "media") .then(ensureWithinStartNode, gotoStartNode); - } - else { + } else { gotoStartNode(); } - } - else { + } else { //if a target is specified, go look it up - generally this target will just contain ids not the actual full //media object so we need to look it up var id = $scope.target.udi ? $scope.target.udi : $scope.target.id var altText = $scope.target.altText; mediaResource.getById(id) - .then(function (node) { - $scope.target = node; - if (ensureWithinStartNode(node)) { - selectImage(node); - $scope.target.url = mediaHelper.resolveFile(node); - $scope.target.altText = altText; - $scope.openDetailsDialog(); - } - }, gotoStartNode); + .then(function(node) { + $scope.target = node; + if (ensureWithinStartNode(node)) { + selectImage(node); + $scope.target.url = mediaHelper.resolveFile(node); + $scope.target.altText = altText; + $scope.openDetailsDialog(); + } + }, + gotoStartNode); } $scope.openDetailsDialog = function() { @@ -260,6 +263,24 @@ angular.module("umbraco") }; }; + var debounceSearchMedia = _.debounce(function() { + $scope.$apply(function() { + if ($scope.searchOptions.filter) { + searchMedia(); + } else { + // reset pagination + $scope.searchOptions = { + pageNumber: 1, + pageSize: 100, + totalItems: 0, + totalPages: 0, + filter: '' + }; + getChildren($scope.currentFolder.id); + } + }); + }, 500); + $scope.changeSearch = function() { $scope.loading = true; debounceSearchMedia(); @@ -271,50 +292,33 @@ angular.module("umbraco") searchMedia(); }; - var debounceSearchMedia = _.debounce(function () { - $scope.$apply(function () { - if ($scope.searchOptions.filter) { - searchMedia(); - } else { - // reset pagination - $scope.searchOptions = { - pageNumber: 1, - pageSize: 100, - totalItems: 0, - totalPages: 0, - filter: '' - }; - getChildren($scope.currentFolder.id); - } - }); - }, 500); - function searchMedia() { $scope.loading = true; entityResource.getPagedDescendants($scope.startNodeId, "Media", $scope.searchOptions) - .then(function (data) { + .then(function(data) { // update image data to work with image grid - angular.forEach(data.items, function(mediaItem){ - // set thumbnail and src - mediaItem.thumbnail = mediaHelper.resolveFileFromEntity(mediaItem, true); - mediaItem.image = mediaHelper.resolveFileFromEntity(mediaItem, false); - // set properties to match a media object - if (mediaItem.metaData && - mediaItem.metaData.umbracoWidth && - mediaItem.metaData.umbracoHeight) { - - mediaItem.properties = [ - { - alias: "umbracoWidth", - value: mediaItem.metaData.umbracoWidth.Value - }, - { - alias: "umbracoHeight", - value: mediaItem.metaData.umbracoHeight.Value - } - ]; - } - }); + angular.forEach(data.items, + function(mediaItem) { + // set thumbnail and src + mediaItem.thumbnail = mediaHelper.resolveFileFromEntity(mediaItem, true); + mediaItem.image = mediaHelper.resolveFileFromEntity(mediaItem, false); + // set properties to match a media object + if (mediaItem.metaData && + mediaItem.metaData.umbracoWidth && + mediaItem.metaData.umbracoHeight) { + + mediaItem.properties = [ + { + alias: "umbracoWidth", + value: mediaItem.metaData.umbracoWidth.Value + }, + { + alias: "umbracoHeight", + value: mediaItem.metaData.umbracoHeight.Value + } + ]; + } + }); // update images $scope.images = data.items ? data.items : []; // update pagination @@ -332,7 +336,7 @@ angular.module("umbraco") function getChildren(id) { $scope.loading = true; - mediaResource.getChildren(id) + return mediaResource.getChildren(id) .then(function(data) { $scope.searchOptions.filter = ""; $scope.images = data.items ? data.items : []; @@ -358,11 +362,10 @@ angular.module("umbraco") } } } - if (imageIsSelected) { folderImage.selected = true; } } } - }); + }); \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/views/common/overlays/mediaPicker/mediapicker.html b/src/Umbraco.Web.UI.Client/src/views/common/overlays/mediaPicker/mediapicker.html index c99238f2e3..8c726f4a17 100644 --- a/src/Umbraco.Web.UI.Client/src/views/common/overlays/mediaPicker/mediapicker.html +++ b/src/Umbraco.Web.UI.Client/src/views/common/overlays/mediaPicker/mediapicker.html @@ -28,10 +28,9 @@
+ disabled="lockedFolder">
@@ -49,7 +48,7 @@ / -
  • +
  • @@ -68,7 +67,7 @@
  • + + + + +
    diff --git a/src/Umbraco.Web.UI.Client/src/views/common/overlays/sectionpicker/sectionpicker.controller.js b/src/Umbraco.Web.UI.Client/src/views/common/overlays/sectionpicker/sectionpicker.controller.js new file mode 100644 index 0000000000..e13f4e6dcd --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/views/common/overlays/sectionpicker/sectionpicker.controller.js @@ -0,0 +1,87 @@ +(function () { + "use strict"; + + function SectionPickerController($scope, sectionResource, localizationService) { + + var vm = this; + + vm.sections = []; + vm.loading = false; + + vm.selectSection = selectSection; + + ////////// + + function onInit() { + + vm.loading = true; + + // set default title + if(!$scope.model.title) { + $scope.model.title = localizationService.localize("defaultdialogs_selectSections"); + } + + // make sure we can push to something + if(!$scope.model.selection) { + $scope.model.selection = []; + } + + // get sections + sectionResource.getAllSections().then(function(sections){ + vm.sections = sections; + + setSectionIcon(vm.sections); + + if($scope.model.selection && $scope.model.selection.length > 0) { + preSelect($scope.model.selection); + } + + vm.loading = false; + + }); + + } + + function preSelect(selection) { + angular.forEach(selection, function(selected){ + angular.forEach(vm.sections, function(section){ + if(selected.alias === section.alias) { + section.selected = true; + } + }); + }); + } + + function selectSection(section) { + + if(!section.selected) { + + section.selected = true; + $scope.model.selection.push(section); + + } else { + + angular.forEach($scope.model.selection, function(selectedSection, index){ + if(selectedSection.alias === section.alias) { + section.selected = false; + $scope.model.selection.splice(index, 1); + } + }); + + } + + } + + function setSectionIcon(sections) { + angular.forEach(sections, function(section) { + section.icon = "icon-section " + section.cssclass; + }); + } + + onInit(); + + } + + angular.module("umbraco").controller("Umbraco.Overlays.SectionPickerController", SectionPickerController); + +})(); diff --git a/src/Umbraco.Web.UI.Client/src/views/common/overlays/sectionpicker/sectionpicker.html b/src/Umbraco.Web.UI.Client/src/views/common/overlays/sectionpicker/sectionpicker.html new file mode 100644 index 0000000000..577dab63b2 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/views/common/overlays/sectionpicker/sectionpicker.html @@ -0,0 +1,24 @@ +
    + + + + +
    + + + +
    + +
    \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/views/common/overlays/treepicker/treepicker.controller.js b/src/Umbraco.Web.UI.Client/src/views/common/overlays/treepicker/treepicker.controller.js index 7ba8970294..b7512e1e8c 100644 --- a/src/Umbraco.Web.UI.Client/src/views/common/overlays/treepicker/treepicker.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/common/overlays/treepicker/treepicker.controller.js @@ -9,7 +9,7 @@ angular.module("umbraco").controller("Umbraco.Overlays.TreePickerController", $scope.section = dialogOptions.section; $scope.treeAlias = dialogOptions.treeAlias; $scope.multiPicker = dialogOptions.multiPicker; - $scope.hideHeader = true; + $scope.hideHeader = (typeof dialogOptions.hideHeader) === "boolean" ? dialogOptions.hideHeader : true; // if you need to load a not initialized tree set this value to false - default is true $scope.onlyInitialized = dialogOptions.onlyInitialized; $scope.searchInfo = { @@ -28,7 +28,9 @@ angular.module("umbraco").controller("Umbraco.Overlays.TreePickerController", $scope.emptyStateMessage = dialogOptions.emptyStateMessage; - //TODO: I don't think this is used or called anywhere!! + //This is called from ng-init + //it turns out it is called from the angular html : / Have a look at views/common / overlays / contentpicker / contentpicker.html you'll see ng-init. + //this is probably an anti pattern IMO and shouldn't be used $scope.init = function (contentType) { if (contentType === "content") { @@ -207,26 +209,23 @@ angular.module("umbraco").controller("Umbraco.Overlays.TreePickerController", function select(text, id, entity) { //if we get the root, we just return a constructed entity, no need for server data if (id < 0) { - if ($scope.multiPicker) { + var rootNode = { + alias: null, + icon: "icon-folder", + id: id, + name: text + }; + + if ($scope.multiPicker) { if (entity) { multiSelectItem(entity); } else { - //otherwise we have to get it from the server - entityResource.getById(id, $scope.entityType).then(function (ent) { - multiSelectItem(ent); - }); + multiSelectItem(rootNode); } - } else { - var node = { - alias: null, - icon: "icon-folder", - id: id, - name: text - }; - $scope.model.selection.push(node); + $scope.model.selection.push(rootNode); $scope.model.submit($scope.model); } } diff --git a/src/Umbraco.Web.UI.Client/src/views/common/overlays/user/user.controller.js b/src/Umbraco.Web.UI.Client/src/views/common/overlays/user/user.controller.js index 2ba14f13b6..5082543b9d 100644 --- a/src/Umbraco.Web.UI.Client/src/views/common/overlays/user/user.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/common/overlays/user/user.controller.js @@ -112,16 +112,14 @@ angular.module("umbraco") /* ---------- UPDATE PASSWORD ---------- */ - //create the initial model for change password property editor + //create the initial model for change password $scope.changePasswordModel = { - alias: "_umb_password", - view: "changepassword", config: {}, value: {} }; //go get the config for the membership provider and add it to the model - currentUserResource.getMembershipProviderConfig().then(function(data) { + authResource.getMembershipProviderConfig().then(function(data) { $scope.changePasswordModel.config = data; //ensure the hasPassword config option is set to true (the user of course has a password already assigned) //this will ensure the oldPassword is shown so they can change it diff --git a/src/Umbraco.Web.UI.Client/src/views/common/overlays/user/user.html b/src/Umbraco.Web.UI.Client/src/views/common/overlays/user/user.html index 31ff07aeb9..328bb02d76 100644 --- a/src/Umbraco.Web.UI.Client/src/views/common/overlays/user/user.html +++ b/src/Umbraco.Web.UI.Client/src/views/common/overlays/user/user.html @@ -12,7 +12,7 @@ - + + 0) { + preSelect($scope.model.selection); + } + + vm.loading = false; + + }); + + } + + function preSelect(selection) { + + angular.forEach(selection, function(selected){ + + angular.forEach(vm.userGroups, function(userGroup){ + if(selected.id === userGroup.id) { + userGroup.selected = true; + } + }); + + }); + } + + function selectUserGroup(userGroup) { + + if(!userGroup.selected) { + + userGroup.selected = true; + $scope.model.selection.push(userGroup); + + } else { + + angular.forEach($scope.model.selection, function(selectedUserGroup, index){ + if(selectedUserGroup.id === userGroup.id) { + userGroup.selected = false; + $scope.model.selection.splice(index, 1); + } + }); + + } + + } + + onInit(); + + } + + angular.module("umbraco").controller("Umbraco.Overlays.UserGroupPickerController", UserGroupPickerController); + +})(); diff --git a/src/Umbraco.Web.UI.Client/src/views/common/overlays/usergrouppicker/usergrouppicker.html b/src/Umbraco.Web.UI.Client/src/views/common/overlays/usergrouppicker/usergrouppicker.html new file mode 100644 index 0000000000..665645ad17 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/views/common/overlays/usergrouppicker/usergrouppicker.html @@ -0,0 +1,66 @@ + \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/views/common/overlays/userpicker/userpicker.controller.js b/src/Umbraco.Web.UI.Client/src/views/common/overlays/userpicker/userpicker.controller.js new file mode 100644 index 0000000000..2d55f9d431 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/views/common/overlays/userpicker/userpicker.controller.js @@ -0,0 +1,109 @@ +(function () { + "use strict"; + + function UserPickerController($scope, usersResource, localizationService) { + + var vm = this; + + vm.users = []; + vm.loading = false; + vm.usersOptions = {}; + + vm.selectUser = selectUser; + vm.searchUsers = searchUsers; + vm.changePageNumber = changePageNumber; + + ////////// + + function onInit() { + + vm.loading = true; + + // set default title + if(!$scope.model.title) { + $scope.model.title = localizationService.localize("defaultdialogs_selectUsers"); + } + + // make sure we can push to something + if(!$scope.model.selection) { + $scope.model.selection = []; + } + + // get users + getUsers(); + + } + + function preSelect(selection, users) { + angular.forEach(selection, function(selected){ + angular.forEach(users, function(user){ + if(selected.id === user.id) { + user.selected = true; + } + }); + }); + } + + function selectUser(user) { + + if(!user.selected) { + + user.selected = true; + $scope.model.selection.push(user); + + } else { + + angular.forEach($scope.model.selection, function(selectedUser, index){ + if(selectedUser.id === user.id) { + user.selected = false; + $scope.model.selection.splice(index, 1); + } + }); + + } + + } + + var search = _.debounce(function () { + $scope.$apply(function () { + getUsers(); + }); + }, 500); + + function searchUsers() { + search(); + } + + function getUsers() { + + vm.loading = true; + + // Get users + usersResource.getPagedResults(vm.usersOptions).then(function (users) { + + vm.users = users.items; + + vm.usersOptions.pageNumber = users.pageNumber; + vm.usersOptions.pageSize = users.pageSize; + vm.usersOptions.totalItems = users.totalItems; + vm.usersOptions.totalPages = users.totalPages; + + preSelect($scope.model.selection, vm.users); + + vm.loading = false; + + }); + } + + function changePageNumber(pageNumber) { + vm.usersOptions.pageNumber = pageNumber; + getUsers(); + } + + onInit(); + + } + + angular.module("umbraco").controller("Umbraco.Overlays.UserPickerController", UserPickerController); + +})(); diff --git a/src/Umbraco.Web.UI.Client/src/views/common/overlays/userpicker/userpicker.html b/src/Umbraco.Web.UI.Client/src/views/common/overlays/userpicker/userpicker.html new file mode 100644 index 0000000000..8a3300a5a6 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/views/common/overlays/userpicker/userpicker.html @@ -0,0 +1,58 @@ +
    + + + + + + +
    + + + +
    + + +
    + +
    + +
    \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/views/components/application/umb-navigation.html b/src/Umbraco.Web.UI.Client/src/views/components/application/umb-navigation.html index db8fd92008..4f07a2b976 100644 --- a/src/Umbraco.Web.UI.Client/src/views/components/application/umb-navigation.html +++ b/src/Umbraco.Web.UI.Client/src/views/components/application/umb-navigation.html @@ -1,104 +1,106 @@
    + ng-mouseleave="leaveTree($event)" ng-mouseenter="enterTree($event)"> - - + + - - } -@helper Render(dynamic item) +@helper Render(Image item) { -
  • - - @item.Name +
  • +
    } \ No newline at end of file diff --git a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListAncestorsFromCurrentPage.cshtml b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListAncestorsFromCurrentPage.cshtml old mode 100644 new mode 100755 index b7ca9d06e4..8d4d897b89 --- a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListAncestorsFromCurrentPage.cshtml +++ b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListAncestorsFromCurrentPage.cshtml @@ -1,24 +1,24 @@ @inherits Umbraco.Web.Macros.PartialViewMacroPage @* - This snippet makes a list of links to the of parents of the current page using an unordered html list. + This snippet makes a list of links to the of parents of the current page using an unordered HTML list. How it works: - It uses the Ancestors() method to get all parents and then generates links so the visitor can go back - Finally it outputs the name of the current page (without a link) *@ -@{ var selection = CurrentPage.Ancestors(); } +@{ var selection = Model.Content.Ancestors(); } @if (selection.Any()) {
      @* For each page in the ancestors collection which have been ordered by Level (so we start with the highest top node first) *@ - @foreach (var item in selection.OrderBy("Level")) + @foreach (var item in selection.OrderBy(x => x.Level)) {
    • @item.Name »
    • } @* Display the current page as the last item in the list *@ -
    • @CurrentPage.Name
    • +
    • @Model.Content.Name
    } diff --git a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListChildPagesFromChangeableSource.cshtml b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListChildPagesFromChangeableSource.cshtml old mode 100644 new mode 100755 index 2fa2aab07c..3af1291be4 --- a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListChildPagesFromChangeableSource.cshtml +++ b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListChildPagesFromChangeableSource.cshtml @@ -13,20 +13,19 @@ *@ @{ var startNodeId = Model.MacroParameters["startNodeId"]; } + @if (startNodeId != null) { @* Get the starting page *@ - var startNode = Umbraco.Content(startNodeId); - var selection = startNode.Children.Where("Visible"); + var startNode = Umbraco.TypedContent(startNodeId); + var selection = startNode.Children.Where(x => x.IsVisible()); if (selection.Any()) { } diff --git a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListChildPagesFromCurrentPage.cshtml b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListChildPagesFromCurrentPage.cshtml old mode 100644 new mode 100755 index 9bd13f68a2..09144cff47 --- a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListChildPagesFromCurrentPage.cshtml +++ b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListChildPagesFromCurrentPage.cshtml @@ -1,6 +1,14 @@ @inherits Umbraco.Web.Macros.PartialViewMacroPage -@{ var selection = CurrentPage.Children.Where("Visible"); } +@* + This snippet makes a list of links to the of children of the current page using an unordered HTML list. + + How it works: + - It uses the Children method to get all child pages + - It then generates links so the visitor can go to each page +*@ + +@{ var selection = Model.Content.Children.Where(x => x.IsVisible()); } @if (selection.Any()) { diff --git a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListChildPagesOrderedByDate.cshtml b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListChildPagesOrderedByDate.cshtml old mode 100644 new mode 100755 index c8cbdf7d32..5cd74a62f9 --- a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListChildPagesOrderedByDate.cshtml +++ b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListChildPagesOrderedByDate.cshtml @@ -1,11 +1,22 @@ @inherits Umbraco.Web.Macros.PartialViewMacroPage -@{ var selection = CurrentPage.Children.Where("Visible").OrderBy("CreateDate desc"); } -@* OrderBy() takes the property to sort by and optionally order desc/asc *@ +@* + This snippet makes a list of links to the of children of the current page using an unordered HTML list. -
      - @foreach (var item in selection) - { -
    • @item.Name
    • - } -
    + How it works: + - It uses the Children method to get all child pages + - It then uses the OrderByDescending() method, which takes the property to sort. In this case the page's creation date. + - It then generates links so the visitor can go to each page +*@ + +@{ var selection = Model.Content.Children.Where(x => x.IsVisible()).OrderByDescending(x => x.CreateDate); } + +@if (selection.Any()) +{ +
      + @foreach (var item in selection) + { +
    • @item.Name
    • + } +
    +} diff --git a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListChildPagesOrderedByName.cshtml b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListChildPagesOrderedByName.cshtml old mode 100644 new mode 100755 index da73ff8164..643855006f --- a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListChildPagesOrderedByName.cshtml +++ b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListChildPagesOrderedByName.cshtml @@ -1,11 +1,22 @@ @inherits Umbraco.Web.Mvc.UmbracoTemplatePage -@{ var selection = CurrentPage.Children.Where("Visible").OrderBy("Name"); } -@* OrderBy() takes the property to sort by *@ +@* + This snippet makes a list of links to the of children of the current page using an unordered HTML list. -
      - @foreach (var item in selection) - { -
    • @item.Name
    • - } -
    + How it works: + - It uses the Children method to get all child pages + - It then uses the OrderBy() method, which takes the property to sort. In this case, the page's name. + - It then generates links so the visitor can go to each page +*@ + +@{ var selection = Model.Content.Children.Where(x => x.IsVisible()).OrderBy(x => x.Name); } + +@if (selection.Any()) +{ +
      + @foreach (var item in selection) + { +
    • @item.Name
    • + } +
    +} diff --git a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListChildPagesOrderedByProperty.cshtml b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListChildPagesOrderedByProperty.cshtml old mode 100644 new mode 100755 index 436faf1ef5..e2eeb08204 --- a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListChildPagesOrderedByProperty.cshtml +++ b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListChildPagesOrderedByProperty.cshtml @@ -15,12 +15,15 @@ @{ var propertyAlias = Model.MacroParameters["propertyAlias"]; } @if (propertyAlias != null) { - var selection = CurrentPage.Children.Where("Visible").OrderBy(propertyAlias); + var selection = Model.Content.Children.Where(x => x.IsVisible()).OrderBy(x => x.GetPropertyValue(propertyAlias.ToString())); -
      - @foreach (var item in selection) - { -
    • @item.Name
    • - } -
    + @if (selection.Any()) + { +
      + @foreach (var item in selection) + { +
    • @item.Name
    • + } +
    + } } diff --git a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListChildPagesWithDoctype.cshtml b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListChildPagesWithDoctype.cshtml old mode 100644 new mode 100755 index 4ca6f93c71..9ac71a4fd2 --- a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListChildPagesWithDoctype.cshtml +++ b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListChildPagesWithDoctype.cshtml @@ -1,17 +1,13 @@ @inherits Umbraco.Web.Macros.PartialViewMacroPage @* - This snippet shows how simple it is to fetch only children of a certain Document Type using Razor. - Be sure to change "DocumentTypeAlias" below to match your needs, such as "TextPage" or "NewsItems". + This snippet shows how simple it is to fetch only children of a certain Document Type. + + Be sure to change "IPublishedContent" below to match your needs, such as "TextPage" or "NewsItem". (You can find the alias of your Document Type by editing it in the Settings section) *@ -@{ var selection = CurrentPage.Children("DocumentTypeAlias").Where("Visible"); } -@* - As an example of more querying, if you have a true/false property with the alias of shouldBeFeatured: - var selection= CurrentPage.Children("DocumentTypeAlias").Where("shouldBeFeatured == true").Where("Visible"); -*@ - +@{ var selection = Model.Content.Children().Where(x => x.IsVisible()); } @if (selection.Any()) { diff --git a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListDescendantsFromCurrentPage.cshtml b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListDescendantsFromCurrentPage.cshtml old mode 100644 new mode 100755 index 1e2274bcc0..e649328cfb --- a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListDescendantsFromCurrentPage.cshtml +++ b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListDescendantsFromCurrentPage.cshtml @@ -2,27 +2,27 @@ @* This snippet creates links for every single page (no matter how deep) below - the page currently being viewed by the website visitor, displayed as nested unordered html lists. + the page currently being viewed by the website visitor, displayed as nested unordered HTML lists. *@ -@{ var selection = CurrentPage.Children.Where("Visible"); } +@{ var selection = Model.Content.Children.Where(x => x.IsVisible()); } @* Ensure that the Current Page has children *@ @if (selection.Any()) { @* Get the first page in the children, where the property umbracoNaviHide is not True *@ - var naviLevel = CurrentPage.FirstChild().Where("Visible").Level; + var naviLevel = Model.Content.FirstChild(x => x.IsVisible()).Level; @* Add in level for a CSS hook *@
      - @* For each child page where the property umbracoNaviHide is not True *@ + @* Loop through the selection *@ @foreach (var item in selection) {
    • @item.Name @* if this child page has any children, where the property umbracoNaviHide is not True *@ - @if (item.Children.Where("Visible").Any()) + @if (item.Children.Where(x => x.IsVisible()).Any()) { @* Call our helper to display the children *@ @childPages(item.Children) @@ -33,7 +33,7 @@ } -@helper childPages(dynamic selection) +@helper childPages(IEnumerable selection) { @* Ensure that we have a collection of pages *@ if (selection.Any()) @@ -43,13 +43,13 @@ @* Add in level for a CSS hook *@
        - @foreach (var item in selection.Where("Visible")) + @foreach (var item in selection.Where(x => x.IsVisible())) {
      • @item.Name @* if the this page has any children, where the property umbracoNaviHide is not True *@ - @if (item.Children.Where("Visible").Any()) + @if (item.Children.Where(x => x.IsVisible()).Any()) { @* Call our helper to display the children *@ @childPages(item.Children) diff --git a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListImagesFromMediaFolder.cshtml b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListImagesFromMediaFolder.cshtml old mode 100644 new mode 100755 index 1549c1eed2..6e5d68b829 --- a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListImagesFromMediaFolder.cshtml +++ b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListImagesFromMediaFolder.cshtml @@ -5,7 +5,7 @@ How it works: - Confirm the macro parameter has been passed in with a value - - Loop through all the media Id's passed in (might be a single item, might be many) + - Loop through all the media Ids passed in (might be a single item, might be many) - Display any individual images, as well as any folders of images Macro Parameters To Create, for this macro to work: @@ -15,9 +15,9 @@ @{ var mediaId = Model.MacroParameters["mediaId"]; } @if (mediaId != null) { - @* Get all the media item associated with the id passed in *@ - var media = Umbraco.Media(mediaId); - var selection = media.Children("Image"); + @* Get the media item associated with the id passed in *@ + var media = Umbraco.TypedMedia(mediaId); + var selection = media.Children(); if (selection.Any()) { @@ -25,7 +25,7 @@ @foreach (var item in selection) {
      • - @item.Name + @item.Name
      • }
      diff --git a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/MultinodeTree-picker.cshtml b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/MultinodeTree-picker.cshtml old mode 100644 new mode 100755 index ae8e427449..379b5b0ea0 --- a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/MultinodeTree-picker.cshtml +++ b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/MultinodeTree-picker.cshtml @@ -1,21 +1,23 @@ @inherits Umbraco.Web.Macros.PartialViewMacroPage @* - This snippet lists the items from a Multinode tree picker, using the pickers default settings. - Content Values stored as xml. + This snippet lists the items from a Multinode tree picker, using the picker's default settings. + Content Values stored as XML. To get it working with any site's data structure, set the selection equal to the property which has the multinode treepicker (so: replace "PropertyWithPicker" with the alias of your property). *@ -@{ var selection = CurrentPage.PropertyWithPicker.Split(','); } +@{ var selection = Model.Content.GetPropertyValue>("PropertyWithPicker"); } -
        - @foreach (var id in selection) - { - var item = Umbraco.Content(id); -
      • - @item.Name -
      • - } -
      \ No newline at end of file +@if (selection.Any()) +{ +
        + @foreach (var item in selection) + { +
      • + @item.Name +
      • + } +
      +} \ No newline at end of file diff --git a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/Navigation.cshtml b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/Navigation.cshtml old mode 100644 new mode 100755 index f2a4920a12..94870a37c4 --- a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/Navigation.cshtml +++ b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/Navigation.cshtml @@ -3,16 +3,19 @@ @* This snippet displays a list of links of the pages immediately under the top-most page in the content tree. This is the home page for a standard website. - It also highlights the current active page/section in the navigation with the css class "current". + It also highlights the current active page/section in the navigation with the CSS class "current". *@ -@{ var selection = CurrentPage.Site().Children.Where("Visible"); } +@{ var selection = Model.Content.Site().Children.Where(x => x.IsVisible()); } -
        - @foreach (var item in selection) - { -
      • - @item.Name -
      • - } -
      +@if (selection.Any()) +{ +
        + @foreach (var item in selection) + { +
      • + @item.Name +
      • + } +
      +} diff --git a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/SiteMap.cshtml b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/SiteMap.cshtml old mode 100644 new mode 100755 index 0aef1eb3a4..7630b26ed1 --- a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/SiteMap.cshtml +++ b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/SiteMap.cshtml @@ -1,13 +1,13 @@ @inherits Umbraco.Web.Macros.PartialViewMacroPage @* - This snippet makes a list of links of all visible pages of the site, as nested unordered html lists. + This snippet makes a list of links of all visible pages of the site, as nested unordered HTML lists. How it works: - It uses a custom Razor helper called Traverse() to select and display the markup and links. *@ -@{ var selection = CurrentPage.Site(); } +@{ var selection = Model.Content.Site(); }
      @* Render the sitemap by passing the root node to the traverse helper, below *@ @@ -15,14 +15,14 @@
      -@* Helper method to travers through all descendants *@ -@helper Traverse(dynamic node) +@* Helper method to traverse through all descendants *@ +@helper Traverse(IPublishedContent node) { @* Update the level to reflect how deep you want the sitemap to go *@ var maxLevelForSitemap = 4; @* Select visible children *@ - var selection = node.Children.Where("Visible").Where("Level <= " + maxLevelForSitemap); + var selection = node.Children.Where(x => x.IsVisible() && x.Level <= maxLevelForSitemap); @* If any items are returned, render a list *@ if (selection.Any()) diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/cs.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/cs.xml index 3ee2c563f7..9ced35c978 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/cs.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/cs.xml @@ -32,10 +32,8 @@ Odeslat k publikování Odeslat k překladu Seřadit - Odeslat k publikování Přeložit Aktualizovat - Výchozí hodnota Přístup zakázán. @@ -911,8 +909,6 @@ Vložit za polem Vložit před polem Rekurzivní - Odstranit tagy odstavce - Odstraní jakékoliv &lt;P&gt; na začátku a na konci textu Standardní pole Velká písmena Kódování URL @@ -1039,8 +1035,6 @@ Úvodní uzel v obsahu Uživatelské jméno Oprávnění uživatele - Typ uživatele - Typy uživatelů Spisovatel Váš profil Vaše nedávná historie diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/nb.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/nb.xml index e20bbf57e5..6544daa68c 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/nb.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/nb.xml @@ -33,10 +33,8 @@ Send til publisering Send til oversetting Sorter - Send til publisering Oversett Oppdater - Standard verdi Ingen tilgang. @@ -884,8 +882,6 @@ Vennlig hilsen Umbraco roboten Sett inn etter felt Sett inn før felt Rekursivt - Fjern paragraftagger - Fjerner eventuelle <P> rundt teksten Standardfelter Store bokstaver URL koding @@ -1005,8 +1001,6 @@ Vennlig hilsen Umbraco roboten Startnode Navn Brukertillatelser - Brukertype - Brukertyper Forfatter Oversetter Endre diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/zh_tw.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/zh_tw.xml new file mode 100644 index 0000000000..83bf8b33a9 --- /dev/null +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/zh_tw.xml @@ -0,0 +1,1354 @@ + + + + The Umbraco community + http://our.umbraco.org/documentation/Extending-Umbraco/Language-Files + + + 管理主機名稱 + 跟蹤審計 + 流覽節點 + 改變文檔類型 + 複製 + 創建 + 創建擴展包 + 刪除 + 禁用 + 清空回收站 + 匯出文檔類型 + 導入文檔類型 + 導入擴展包 + 即時編輯模式 + 退出 + 移動 + 提醒 + 公眾存取權限 + 發佈 + 取消發佈 + 重新載入節點 + 重新發佈整站 + 回復 + 許可權 + 回滾 + 提交至發佈者 + 發送給翻譯 + 排序 + 提交至發佈者 + 翻譯 + 更新 + 預設值 + + + 禁止訪問 + 添加功能變數名稱 + 移除 + 錯誤的節點 + 功能變數名稱錯誤 + 功能變數名稱重複 + 語言 + 功能變數名稱 + 新功能變數名稱 '%0%' 已創建 + 功能變數名稱 '%0%' 已刪除 + 功能變數名稱 '%0%' 已使用 + 功能變數名稱 '%0%' 已更新 + 編輯當前功能變數名稱 + + 繼承 + 語言 + 或從父節點繼承文化設定。
      + 也會改變目前節點設定,除非下方網域有其他項目。]]>
      + 功能變數名稱 + + + 查看 + + + 清除選擇 + 選擇 + 選擇目前資料夾 + 做別的事情 + 粗體 + 取消段落縮進 + 插入表單字段 + 插入圖片標題 + 編輯Html + 段落縮進 + 斜體 + 居中 + 左對齊 + 右對齊 + 插入連結 + 插入本地連結(錨點) + 圓點列表 + 數字清單 + 插入巨集 + 插入圖片 + 編輯關聯 + 回到清單 + 保存 + 保存並發佈 + 保存並提交審核 + 保存清單檢視 + 預覽 + 因未設置範本無法預覽 + 選擇樣式 + 顯示樣式 + 插入表格 + 產生模組 + + + 要更改所選節點的文檔類型,先在列表中選擇合適的文檔類型。 + 然後設置當前文檔類型到新文檔類型的各欄位間的對應映射關係並保存。 + 內容已被重新發佈 + 當前屬性 + 當前類型 + 不能改變文檔類型,因為沒有可替代的類型。 + 文檔類型已更改 + 要映射的欄位 + 映射欄位 + 新範本 + 新類型 + + 內容 + 選擇新的文檔類型 + 選中文檔的類型已被成功更改為[new type],以下欄位被映射: + + 不能完成欄位映射,因為存在一個欄位映射至多欄位的問題。 + 僅顯示可作為替代的文檔類型。 + + + 已發表 + 關於本頁 + 別名 + (圖片的替代文本) + 替代連結 + 點擊編輯 + 創建者 + 創建者 + 更新者 + 創建時間 + 此文件創建的日期時間 + 文檔類型 + 編輯 + 過期於 + 該項發佈之後有更改 + 該項沒有發佈 + 最近發佈 + 沒有可供顯示的項目 + 此列表中沒有可供顯示的項目 + 媒體類型 + 媒體連結位址 + 會員組 + 角色 + 會員類型 + 沒有選擇時間 + 頁標題 + 屬性 + 該文檔不可見,因為其上級 '%0%' 未發佈。 + 糟糕:該文檔已發佈,但是沒有更新至緩存(內部錯誤) + 糟糕:沒辦法連結到此網址(內部錯誤-請參見記錄) + 糟糕:此文件已經發表,但是網址和其他內容相衝 %0% + 發佈 + 發佈狀態 + 發佈於 + 取消發表於 + 清空時間 + 排序完成 + 拖拽項目或按一下列頭即可排序,可以按住Shift多選。 + 統計 + 標題(可選) + 其他說明文字(可選) + 類型 + 取消發佈 + 最近編輯 + 本文件修改時間 + 移除文件 + 連結到文檔 + 會員組成員 + 非會員組成員 + 子項目 + 目標 + 預計發表的時間(伺服器端) + 這是什麼意思?]]> + + + 點選以便上傳 + 拖曳檔案至此... + 媒體連結 + 或按這裡選擇檔案 + 只允許檔案類型為 + 檔案大小上限為 + + + 新增一位會員 + 所有會員 + + + 您想在哪裡創建 %0% + 創建在 + 選擇類型和標題 + "文檔類型"處變更。]]> + "媒體類型"處變更。]]> + 文檔類型沒有相關範本 + 沒有資料夾 + 新資料類別 + + + 流覽您的網站 + - 隱藏 + 如果Umbraco沒有打開,您可能需要允許彈出式視窗。 + 已經在新視窗中打開 + 重啟 + 訪問 + 歡迎 + + + 留下 + 放棄變更 + 您有未存檔的變更 + 您確定要離開本頁? - 您有未存檔的變更 + + + 完成 + 刪除 %0% 個項目 + 刪除 %0% 個項目 + 刪除 %1% 個中的 %0% 個項目 + 刪除 %1% 個中的 %0% 個項目 + 已發佈 %0% 個項目 + 已發佈 %0% 個項目 + 已發佈 %1% 個中的 %0% 個項目 + 已發佈 %1% 個中的 %0% 個項目 + 取消發佈 %0% 個項目 + 取消發佈 %0% 個項目 + 取消發佈 %1 個中的 %0% 個項目 + 取消發佈 %1 個中的 %0% 個項目 + 移動 %0% 個項目 + 移動 %0% 個項目 + 移動 %1 個中的 %0% 個項目 + 移動 %1 個中的 %0% 個項目 + 複製 %0% 個項目 + 複製 %0% 個項目 + 複製 %1 個中的 %0% 個項目 + 複製 %1 個中的 %0% 個項目 + + + 錨點名稱 + 管理主機名稱 + 關閉窗口 + 您確定要刪除嗎 + 您確定要禁用嗎 + 按一下此框確定刪除%0%項 + 您確定嗎? + 您確定嗎? + 剪切 + 編輯字典項 + 編輯語言 + 插入本地連結 + 插入字元 + 插入圖片標題 + 插入圖片 + 插入連結 + 插入巨集 + 插入表格 + 最近編輯 + 連結 + 內部連結: + 本地連結請用“#”號開頭 + 在新視窗中打開? + 巨集設置 + 本巨集沒有包含您可以編輯的屬性 + 粘貼 + 編輯許可權 + 正在清空回收站,請不要關閉窗口。 + 回收站已清空 + 從回收站刪除的項目將不可恢復 + regexlib.com的網站服務目前出現些狀況,而我們無能為力。我們對此不便感到十分抱歉。]]> + 查找規則運算式來驗證輸入,如: 'email、'zip-code'、'url'。 + 移除巨集 + 必填項目 + 網站已重建索引 + 網站緩存已刷新,所有已發佈的內容更新生效。 + 網站緩存將會刷新,所有已發佈的內容將會更新。 + 表格列數 + 表格行數 + 設定預留位置代碼 以便您要在子範本中插入內容到本範本時,填入此代碼到 <asp:content /> 裡面。]]> + 選擇預留位置代碼 於此清單中。您只能選擇目前父範本中的代碼。]]> + 點擊圖片查看完整大小 + 拾取項 + 查看緩存項 + 新增資料夾... + 與原本相關 + 最友善的社群 + 頁面連結 + 打開此連結文檔至新視窗或標籤頁 + 打開此連結文檔至全新視窗 + 打開此連結文檔在原本視窗中 + 媒體連結 + 選擇媒體 + 選擇圖示 + 選擇項目 + 選擇連結 + 選擇巨集 + 選擇內容 + 選擇會員 + 選擇會員群組 + 沒有找到任何圖示 + 本巨集沒有需要參數 + 外部登入提供者 + 例外細節 + 詳細記錄 + 內部例外 + 連結您的 + 取消連結您的 + 帳戶 + 選擇編輯器 + + + %0%' 編輯不同語言版本,
      您可以在左方選單「語言」中增添新的語言 + ]]>
      + 語言名稱 + + + 輸入您的使用者名稱 + 輸入您的密碼 + 確認您的密碼 + 命名此 %0%... + 輸入一個名稱 + 標籤... + 輸入一段描述... + 搜尋請輸入... + 過濾請輸入... + 增加標籤(每個標籤後請按輸入鍵)... + 輸入您的電子郵件 + + + 允許放置於根節點 + 只有勾選「允許放置於根節點」的內容種類可以放在內容樹或媒體樹的最頂端 + 允許子項節點類型 + 文檔種類集合 + 創建 + 刪除選項卡 + 描述 + 新建選項卡 + 選項卡 + 縮略圖 + 允許清單檢視 + 允許內容項目顯示成可以排列及搜尋的清單,子項目不會被顯示 + 目前清單檢視 + 作用中的清單檢視資料類別 + 新增自訂清單檢視 + 移除自訂清單檢視 + + + 添加預設值 + 資料庫資料類型 + 資料類型唯一標識 + 渲染控制項 + 按鈕 + 允許高級設置 + 允許快顯功能表 + 插入圖片預設最大 + 關聯的樣式表 + 顯示標籤 + 寬和高 + + + 資料已保存,但是發佈前您需要修正一些錯誤: + 當前成員提供程式不支援修改密碼(EnablePasswordRetrieval的值應該為true) + %0% 已存在 + 發現錯誤: + 發現錯誤: + 密碼最少%0%位元,且至少包含%1%位元非字母數位記號 + %0% 必須是整數 + %1% 中的 %0% 欄位是必填項 + %0% 是必填項 + %1% 中的 %0% 格式不正確 + %0% 格式不正確 + + + 收到伺服器傳來的錯誤 + 該檔案類型已被管理員禁用 + 注意,儘管配置中允許CodeMirror,但是它在IE上不夠穩定,所以無法在IE運行。 + 請為新的屬性類型填寫名稱和別名! + 許可權有問題,訪問指定文檔或資料夾失敗! + 讀取片段視圖腳本錯誤(檔案:%0%) + 讀取使用者控制項 %0% 錯誤 + 讀取使用者控制項 %0% 錯誤(組件:%0%,類別:%1%) + 讀取巨集引擎腳本錯誤(檔案:%0%) + 分析XSLT檔案錯誤:%0% + 讀取XSLT檔案錯誤:%0% + 請輸入標題 + 請選擇類型 + 圖片尺寸大於原始尺寸不會提高圖片品質,您確定要把圖片尺寸變大嗎? + python腳本錯誤 + python腳本未保存,因為包含錯誤。 + 預設打開頁面不存在,請聯繫管理員 + 請先選擇內容,再設置樣式。 + 沒有可用的樣式 + 請把游標放在您要合併的兩個儲存格中的左邊儲存格 + 非合併儲存格不能分離。 + XSLT源碼出錯 + XSLT未保存,因為包含錯誤。 + 這是此屬性所使用的資料類別設定錯誤,請檢查資料類別 + + + 關於 + 操作 + 操作 + 添加 + 別名 + 所有 + 您確定嗎? + 回去 + 邊框 + + 取消 + 儲存格邊距 + 選擇 + 關閉 + 關閉窗口 + 備註 + 確認 + 強制屬性 + 繼續 + 複製 + 創建 + 資料庫 + 時間 + 默認 + 刪除 + 已刪除 + 正在刪除… + 設計 + 規格 + + 下載 + 編輯 + 已編輯 + 元素 + 郵箱 + 錯誤 + 查找文檔 + + 幫助 + 圖示 + 導入 + 內邊距 + 插入 + 安裝 + 不合格 + 對齊 + 語言 + 佈局 + 載入中 + 鎖定 + 登入 + 退出 + 登出 + 巨集 + 必要 + 移動 + 更多 + 名稱 + 新的 + 下一步 + + 屬於 + 確定 + 打開 + + 密碼 + 路徑 + 預留位置代碼 + 請稍候… + 上一步 + 屬性 + 接收資料郵箱 + 回收站 + 保持狀態中 + 重命名 + 更新 + 必要 + 重試 + 許可權 + 搜索 + 伺服器 + 顯示 + 在發送時預覽 + 大小 + 排序 + 送出 + 類型 + 輸入內容開始搜尋… + + 更新 + 更新 + 上傳 + 連結位址 + 用戶 + 用戶名 + + 查看 + 歡迎… + + + 資料夾 + 搜尋結果 + 重新排列 + 我已經完成排列 + 預覽 + 更改密碼 + + 清單檢視 + 存檔中... + 目前 + 內嵌 + 選取的 + + + + + + + + + + + 增加標籤頁 + 增加屬性 + 增加編輯器 + 增加範本 + 增加子節點 + 增加子項目 + 編輯資料類別 + 瀏覽區塊 + 捷徑 + 顯示捷徑 + 開關清單檢視 + 開關是否允許為根項目 + + + 背景色 + 粗體 + 前景色 + 字體 + 文本 + + + 頁面 + + + 無法連接到資料庫。 + 無法保存web.config檔,請手工修改。 + 發現資料庫 + 資料庫配置 + 安裝 按鈕來安裝Umbraco資料庫 %0% + ]]> + 下一步繼續。]]> + 沒有找到資料庫!請確認檔案"web.config"中的字串"connection string"是否正確。

      +

      請編輯檔案"web.config" (例如使用Visual Studio或您喜歡的編輯器),移動到檔案底部,並在名稱為"UmbracoDbDSN"的字串中設定資料庫連結資訊,並存檔。

      +

      + 點選重試按鈕當上述步驟完成。
      + + 在此查詢更多編輯web.config的資訊。

      ]]>
      + + 若需要時,請聯繫您的網路公司。如果您在本地機器或伺服器安裝的話,您也許需要聯絡系統管理者。]]> + + 點選升級按鈕來升級Umbraco資料庫 %0%

      +

      + 請別擔心 - 不會刪除任何資料而且馬上就會繼續運作! +

      + ]]>
      + 點選下一步繼續。]]> + 下一步繼續設定精靈。]]> + 預設使用者的密碼必須更改!]]> + 預設使用者已經被暫停或沒有Umbraco的使用權!

      不需更多的操作步驟。點選下一步繼續。]]> + 安裝後預設使用者的密碼已經成功修改!

      不需更多的操作步驟。點選下一步繼續。]]> + 密碼已更改 + + Umbraco新增一預設使用者,名稱為('admin'),密碼為('default')。修改此密碼是十分重要的事情。

      +

      + 這個步驟會檢查預設使用者的密碼並在需要時建議修改。 +

      + ]]>
      + 作為入門者,從視頻教程開始吧! + 點擊下一步 (或在Web.config中自行修改UmbracoConfigurationStatus),意味著您接受上述授權合約。 + 安裝失敗。 + 受影響的檔和資料夾 + 此處查看更多資訊 + 您需要對以下檔和資料夾授於ASP.NET用戶修改許可權 + 您的權限設定幾近完美!

      + 您可以正常執行Umbraco沒有任何問題,只差您將沒有辦法安裝那些建議需要全部許可權的插件。]]>
      + 如何解決 + 點擊閱讀文字版 + 影片教學來瞭解如何設定Umbraco的資料夾權限或閱讀文字版本。]]> + 您的權限可能有點小問題! +

      + 您可以正常執行Umbraco沒有任何問題,然而您將無法新增資料夾或安裝那些可以讓Umbraco發揮全力的插件。]]>
      + 您的權限設定尚未未完成! +

      + 您需要更新權限設定才能執行Umbraco。]]>
      + 您的權限設定完美無瑕!

      + 您已經準備好執行Umbraco和安裝插件!]]>
      + 解決資料夾問題 + 點此查看ASP.NET和創建資料夾的問題解決方案 + 設置資料夾許可權 + + 我要從頭開始 + 學習該怎麼做) + 您晚點仍可以選擇安裝Runway,請至開發者區域選擇安裝。 + ]]> + 您剛剛安裝了一個乾淨的系統,要繼續嗎? + “Runway”已安裝 + + 這是我們的模組推薦清單,選取您想要安裝的項目,或者至 查詢完整清單。 + ]]> + 僅推薦高級用戶使用 + 給我一個簡單的網站 + + "Runway"是一個提供基本檔案類別和範本的簡單網站。安裝程式會自動幫您設定Runway, + 但你仍可輕易編輯,擴充或移除它。它並非必要項目而且您可以在沒它的情況下完美執行Umbraco。然而, + Runway提供一個輕鬆簡便但基於寶貴經驗的平台讓您可以更快開始。 + 如果您安裝Runway,您還可以選擇名為「Runway模組」的基本區塊來加強Runway頁面。 +

      + + 內含於Runway: 首頁,準備開始頁面,模組安裝頁面。
      + 可選模組: 上方瀏覽列,網站地圖,聯絡,藝廊。 +
      + ]]>
      + “Runway”是什麼? + 步驟 1/5:接受授權合約 + 步驟 2/5:資料庫配置 + 步驟 3/5:文件許可權驗證 + 步驟 4/5:系統安全性 + 步驟 5/5:一切就緒,可以開始使用系統。 + 感謝選擇我們的產品 + 參觀您的新網站 +您剛安裝好Runway,何不瞧瞧它的模樣。]]> + 更多的幫忙與資訊 +從我們獲獎的社群得到幫助,瀏覽文件,或觀看免費影片來瞭解如何輕鬆架設網站,如何使用插件,和瞭解Umbraco項目名稱的快速上手指引。]]> + 系統 %0% 安裝完畢 + /web.config 檔案並且更新AppSetting中的字串UmbracoConfigurationStatus 內容為 '%0%'。]]> + 快速開始指引。
      如果您是Umbraco的新成員, +您可以在其中找到相當多的資源。]]>
      + 啟動Umbraco +想要管理您的網站時,只需開啟Umbraco後台便可增加內容,更新範本和樣式表,或增添新功能。]]> + 無法連接到資料庫。 + 系統版本 3 + 系統版本 4 + 觀看 +
      + 點選"下一步"來啟動精靈。]]>
      + + + 語言代碼 + 語言名稱 + + + 使用者在空閒狀態下將會自動登出 + 已更新,繼續工作。 + + + 超級星期天快樂 + 瘋狂星期一快樂 + 熱鬧星期二快樂 + 美妙星期三快樂 + 悅耳星期四快樂 + 時髦星期五快樂 + 喵喵星期六快樂 + 下方登入 + 登入使用 + 連線時間過了 + © 2001 - %0%
      Umbraco.com

      ]]>
      + 忘記密碼? + 一封內有重設密碼連結的電子郵件已經寄出給您 + 一封內有重設密碼連結的電子郵件已經寄到此信箱 + 回到登入畫面 + 請輸入新密碼 + 您的密碼已經更新 + 您點選的連結是無效或過期的 + Umbraco:重設密碼 + 您登入到後台的使用者名稱是:%0%

      點選這裡來重設您的密碼或將此連結複製/貼上到您的瀏覽器:

      %1%

      ]]>
      + + + 儀錶板 + 區域 + 內容 + + + 選擇上面的頁面… + %0% 被複製到 %1% + 將 %0% 複製到 + %0% 已被移動到 %1% + 將 %0% 移動到 + 作為內容的根結點,點“確定”。 + 尚未選擇節點,請選擇一個節點點擊“確定”。 + 類型不符不允許選擇 + 該項不能移到其子項 + 當前節點不能建在根節點下 + 您在子項的許可權不夠,不允許該操作。 + 複本和原本建立關聯 + + + 為 %0% 編寫通知 + + 哈嘍 %0%

      + +

      這是一封自動產生的信件來通知您 %1% 工作 + 已經在頁面 %2% 上由使用者 %3% 執行完成 +

      + +

      +

      更新摘要:

      + + %6% +
      +

      + + + +

      祝您有美好的一天!

      + Umbraco機器人 謹上 +

      ]]>
      + 在 %2%,[%0%] 關於 %1% 的通告已執行。 + 通知 + + + + 按鈕並點選該檔案。Umbraco擴展包通常有「.zip」的副檔名。 + ]]> + 作者 + 演示 + 文檔 + 中繼資料 + 名稱 + 擴展包不含任何項 +
      + 您可以點選下方「移除擴展包」來安全地移除此項目。]]>
      + 無可用更新 + 選項 + 說明 + 程式庫 + 確認卸載 + 已卸載 + 擴展包卸載成功 + 卸載 + + 注意: 任何文檔,媒體或需要這些項目才能運作的物件將會停止運作,並可能使得系統不穩定, + 請小心移除。若有疑慮,請聯絡擴展包作者。]]> + 從程式庫下載更新 + 更新擴展包 + 更新說明 + 擴展包有可用的更新,您可以從程式庫網站更新。 + 版本 + 版本歷史 + 訪問擴展包網站 + 擴展包已安裝 + 這個擴展包無法安裝,它需要Umbraco至少是版本 %0% + 移除中... + 下載中... + 匯入中... + 安裝中... + 重新啟動中,請稍後... + 都好了,您的瀏覽器將重新整理,請稍待... + + + 帶格式粘貼(不推薦) + 您所粘貼的文本含有特殊字元或格式,Umbraco將清除以適應網頁。 + 無格式粘貼 + 粘貼並移除格式(推薦) + + + 基於角色的保護 + 請使用Umbraco的會員群組。]]> + 使用基於角色的授權需要首先建立會員組。 + 錯誤頁 + 當用戶登錄後訪問沒有許可權的頁時顯示該頁 + 選擇限制訪問此頁的方式 + %0% 現在處於受保護狀態 + %0% 的保護被取消 + 登錄頁 + 選擇公開的登錄入口 + 取消保護 + 選擇一個包含登錄表單和提示資訊的頁 + 選擇訪問該頁的角色類型 + 為此頁設置帳號和密碼 + 單用戶保護 + 如果您只希望提供一個用戶名和密碼就能訪問 + + + + + + + + 包含未發佈的子項 + 正在發佈,請稍候… + %0% 中的 %1% 頁面已發佈… + %0% 已發佈 + %0% 及其子項已發佈 + 發佈 %0% 及其子項 + 發佈按鈕來將%0%的內容設定為公開。

      + 您可以同時發佈本頁以及其子項目若您點選下面的包含子頁。 + ]]>
      + + + 您尚未設定任何許可顏色 + + + 輸入外部連結 + 選擇內部連結 + 標題 + 連結 + 新視窗 + 輸入新標題 + 輸入連結 + + + 重設 + + + 當前版本 + 紅色 文字將不會顯示於所選版本,而綠色表示增加部分。]]> + 文檔已回滾 + 這顯示所選版本的HTML格式,如果您想要比較兩版本的差異,請使用比較檢視 + 回滾至 + 選擇版本 + 查看 + + + 編輯腳本 + + + Concierge + 內容 + Courier + 開發 + 設定精靈 + 媒體 + 會員 + 消息 + 設置 + 統計 + 翻譯 + 用戶 + 說明 + 表單 + 統計 + + + 移至 + 說明主題為 + 影片主題為 + 最好的Umbraco影片教學 + + + 預設範本 + 字典鍵 + 要導入文檔類型,請點擊“流覽”按鈕,再點擊“導入”,然後在您電腦上查找 ".udt"檔導入(下一頁中需要您再次確認) + 新建選項卡標題 + 節點類型 + 類型 + 樣式表 + 腳本 + 樣式表屬性 + 選項卡 + 選項卡標題 + 選項卡 + 主控文件類型啟動 + 該文檔類型使用 + 作為主控文件類型. 主控文件類型的標籤只能在主控文件類型裡修改。 + 沒有欄位設置在該標籤頁 + 主文檔類別 + 新增對應範本 + 增加圖示 + + + 排列順序 + 增添時間 + 排序完成。 + 上下拖拽項目或按一下列頭進行排序 +
      排序中請不要關閉視窗。]]>
      + + + 驗證 + 驗證錯誤一定要修正才能儲存項目 + 失敗 + 使用者權限不足,無法完成操作 + 已取消 + 操作被協力廠商外掛程式取消 + 發佈被協力廠商外掛程式取消 + 屬性類型已存在 + 屬性類型已創建 + 資料類別:%1%]]> + 屬性類型已刪除 + 內容類別型已保存 + 選項卡已創建 + 選項卡已刪除 + id為%0%的選項卡已刪除 + 樣式表未保存 + 樣式表已保存 + 樣式表保存,無錯誤。 + 資料類型已保存 + 字典項已保存 + 因為上級頁面未發佈導致發佈失敗! + 內容已發佈 + 公眾可見 + 內容已保存 + 請發佈以使更改生效 + 提交審核 + 更改已提交審核 + 媒體已保存 + 媒體已保存 + 會員已保存 + 樣式表屬性已保存 + 樣式表已保存 + 範本已保存 + 保存使用者出錯(請查看日誌) + 用戶已保存 + 用戶類型已保存 + 檔未保存 + 檔無法保存,請檢查許可權。 + 檔保存 + 檔保存,無錯誤。 + 語言已保存 + 媒體類別已儲存 + 會員類別已儲存 + Python腳本未保存 + Python腳本因為錯誤未能保存 + Python已保存 + Python腳本無錯誤 + 範本未保存 + 範本別名相同 + 範本已保存 + 範本保存,無錯誤。 + XSLT未保存 + XSLT有錯誤 + XSLT無法保存,請檢查許可權。 + XSLT已保存 + XSLT無錯誤 + 內容已取消發佈 + 片段視圖已保存 + 片段視圖保存,無錯誤。 + 片段視圖未保存 + 片段視圖因為錯誤未能保存 + 腳本視圖已儲存 + 腳本視圖已儲存,沒有任何錯誤! + 腳本視圖未儲存 + 儲存檔案時發生錯誤 + 儲存檔案時發生錯誤 + + + 使用CSS語法,如:h1、.redHeader、.blueTex。 + 編輯樣式表 + 編輯樣式屬性 + 編輯器中的樣式屬性名 + 預覽 + 樣式 + + + 編輯範本 + 插入內容區 + 插入內容預留位置 + 插入字典項 + 插入巨集 + 插入頁欄位 + 母版 + 範本標籤快速指南 + 範本 + + + 選擇內容類別 + 選擇排列方式 + 新增一行 + 新增內容 + 放棄內容 + 設定已儲存 + 此處不允許有內容 + 此處允許有內容 + 點選來內嵌 + 點選來插入圖片 + 圖片標題... + 在此填寫... + 網格排列方式 + 排列是指網格編輯器的整體工作區域,通常您只需要一種或兩種排列方式 + 增加網格排列方式 + 藉由設定列寬以及增加新的區域來調整排列方式 + 行設定 + 行是預先水平排列的格子 + 增加行設定 + 藉由設定小格寬度和增添小格來調整此行 + + 網格排列方式的列總數 + 設定 + 調整設定編輯器可以改變的項目 + 樣式 + 調整樣式編輯器可以改變的項目 + 當JSON格式正確時設定才可以儲存 + 允許所有編輯器 + 允許所有行設定 + 定為預設 + 選擇額外 + 選擇預設 + 已增加 + + + 組合 + 您沒有增加任何選項卡 + 增加新的選項卡 + 增加另外的選項卡 + 繼承的表格 + 增加屬性 + 必要標籤 + 允許清單檢視 + 允許內容項目顯示成可以排列及搜尋的清單,子項目不會被顯示 + 允許的範本 + 選擇哪些範本編輯器可以使用於此類別的內容 + 允許為根項目 + 允許編輯器新增此類別的內容為根項目 + 是的 - 允許此類別內容為根項目 + 允許子節點種類 + 允許某些特定種類能夠成為此種類內容的子項目 + 選擇子節點 + 從已存在的文檔類別中繼承選項卡以及屬性。新選項卡將被新增至目前文檔種類或合併至已存在同名的選項卡中。 + 此內容種類已經用於集合中,因此不能重複添加本身。 + 沒有可用於集合的內容種類。 + 可用的編輯器 + 重複使用 + 編輯器設定 + 設定 + 是,刪除 + 已移至下層 + 已複製至下層 + 選擇要移動的資料夾 + 選擇要複製的資料夾 + 至下方樹狀結構 + 所有文檔種類 + 所有文檔 + 所有媒體項目 + 使用此文檔種類的將被永久刪除,請確認您也想要將它們刪除。 + 使用此媒體種類的將被永久刪除,請確認您也想要將它們刪除。 + 使用此會員種類的將被永久刪除,請確認您也想要將它們刪除。 + 以及所有使用此種類的文件項目 + 以及所有使用此種類的媒體項目 + 以及所有使用此種類的會員項目 + 使用此編輯器將會套用新設定 + 會員可以編輯 + 顯示於會員資料 + + + 替代欄位 + 替代文本 + 大小寫 + 編碼 + 選取欄位 + 轉換分行符號 + 將換行符號取代成為HTML標籤 &lt;br&gt; + 自訂欄位 + 是,僅日期 + 格式化時間 + HTML編碼 + 將替換HTML中的特殊字元 + 將在欄位值後插入 + 將在欄位值前插入 + 小寫 + + 欄位後插入 + 欄位前插入 + 遞迴 + 標準欄位 + 大寫 + URL編碼 + 將格式化URL中的特殊字元 + 當上面欄位值為空時使用 + 該欄位僅在主欄位為空時使用 + 是,含時間,分隔符號為: + + + 標記為您的任務 + 指派給您。請按「翻譯詳情」或頁面名稱觀看包含回應的詳細檢視畫面。 + 您也可以將此頁面下載成為XML格式檔案,請按「下載XML」按鈕。
      + 若想要關閉翻譯任務,請至細節頁面點選「結束」按鈕。 + ]]>
      + 關閉任務 + 翻譯詳情 + 將翻譯任務下載為XML + 下載 XML + 下載 XML DTD + 欄位 + 包含子頁 + + [%0%]翻譯任務:%1% + 沒有翻譯員,請創建翻譯員角色的用戶。 + 您創建的任務 + 由您創建的頁面。要瀏覽包含回應的詳細檢視畫面, + 點選「詳情」或頁面名稱。您可以下載此頁面成為XML格式檔案,請點選「下載XML」連結。 + 若要關閉翻譯任務,請至詳情檢視並點選「關閉」按鈕。 + ]]> + 頁面'%0%'已經發送給翻譯 + 請選擇本內容應該被翻譯成的語言 + 發送頁面'%0%'以便翻譯 + 分配者 + 任務開啟 + 總字數 + 翻譯到 + 翻譯完成。 + 您可以流覽剛翻譯的頁面,如果原始頁存在,您將得到兩者的比較。 + 翻譯失敗,XML可能損壞了。 + 翻譯選項 + 翻譯員 + 上傳翻譯的xml + + + 緩存流覽 + 回收站 + 創建擴展包 + 資料類型 + 字典 + 已安裝的擴展包 + 安裝皮膚 + 安裝新手套件 + 語言 + 安裝本地擴展包 + 巨集 + 媒體類型 + 會員 + 會員組 + 角色 + 會員類型 + 文檔類型 + 相關類型 + 擴展包 + 擴展包 + Python文件 + 從線上程式庫安裝 + 安裝Runway + Runway模組 + Scripting文件 + 腳本 + 樣式表 + 範本 + XSLT文件 + 統計 + + + 有可用更新 + %0%已就緒,點擊這裡下載 + 無到伺服器的連接 + 檢查更新失敗 + + + 管理員 + 分類欄位 + 更改密碼 + 更改密碼 + 確認新密碼 + 要改變密碼,請在框中輸入新密碼,然後按一下“更改密碼”。 + 內容頻道 + 描述欄位 + 禁用用戶 + 文檔類型 + 編輯 + 排除欄位 + 語言 + 登錄 + 默認打開媒體項 + 區域 + 禁用後臺管理介面 + 舊的密碼 + 密碼 + 重設密碼 + 您的密碼已更改! + 重輸密碼 + 輸入新密碼 + 新密碼不能為空! + 當前密碼 + 密碼錯誤 + 新密碼和重輸入的密碼不一致,請重試! + 重輸的密碼和原密碼不一致! + 替換子項許可權設置 + 您正在修改存取權限的頁面: + 選擇要修改許可權的頁 + 搜索子物件 + 預設打開內容項 + 用戶名 + 用戶許可權 + 撰稿人 + 翻譯者 + 改變 + 您的個人檔案 + 您的歷程記錄 + 連線到期於 + + + 驗證 + 以電子郵件驗證 + 以數字驗證 + 以網址驗證 + ...或輸入自訂驗證 + 必要欄位 + + + + 數值已設為推薦值:%0% + 在設定檔 %3% 中XPath %2% 的數值設為 %1% 。 + 在設定檔 %3% 中XPath %2% 的預期值設為 %1% ,但卻是 %0%。 + 在設定檔 %3% 中XPath %2% 的值為非預期值 %0%。 + + 自訂錯誤設定為 %0% + 自訂錯誤設定為 %0。建議在上線前改為 %1%。 + 自訂錯誤成功設定為 %0% + 巨集錯誤設為 %0% + 巨集錯誤設為 %0%,如此一來,當巨集有任何錯誤時會阻止某些或全部頁面正常載入。改正會將此設定 %1%。 + 巨集錯誤已設為 %0% + + 嘗試略過IIS自訂錯誤目前設為 %0%,而且您使用的IIS版本為 %1%。 + 嘗試略過IIS自訂錯誤目前設為 %0%,然而在您使用的IIS版本為 %2% 時,建議設定是 %1%。 + 嘗試略過IIS自訂錯誤已成功設為 %0%。 + + 檔案不存在:%0%。 + '%1%'中無法找到'%0%'。]]> + 有錯誤產生,請參閱下列錯誤的紀錄:%0%。 + 成員 - 所有XML:%0%,總共:%1%,不合格:%2% + 媒體 - 所有XML:%0%,總共發佈:%1%,不合格:%2% + 內容 - 所有XML:%0%,總共發佈:%1%,不合格:%2% + 憑證驗證錯誤:%0% + 網址探查錯誤:%0% - '%1%' + 您目前使用HTTPS瀏覽本站:%0% + 在您的web.config檔案中,appSetting的umbracoUseSSL是設為false。當您開始使用HTTPS時,應將其改為 true。 + 在您的web.config檔案中,appSetting的umbracoUseSSL是設為 %0%,您的cookies %0% 標成安全。 + 無法在您的web.config檔案中,更新appSetting的umbracoUseSSL設定,錯誤訊息:%0% + + 開啟HTTPS + 在web.config檔案中,將appSetting的umbracoUseSSL設true。 + 在您的web.config檔案中,appSetting的umbracoUseSSL已設為 true,您的cookies 將被標成安全。 + 修正 + 無法修正比較種類檢查為'ShouldNotEqual'。 + 用提供的數值無法修正比較種類檢查為'ShouldEqual'。 + 沒有提供要修正檢查的數值。 + 偵錯編輯模式關閉。 + 偵錯編輯模式目前已開啟。上線前建議將其關閉。 + 偵錯編輯模式已成功關閉。 + 詳細記錄模式已關閉。 + 詳細記錄模式目前已開啟。上線前建議將其關閉。 + 詳細記錄模式已成功關閉。 + 所有資料夾已有正確權限設定。 + + %0%。]]> + %0%。如果無須寫入,不需採取行動。]]> + 所有檔案已有正確權限設定。 + + %0%。]]> + %0%。如果無須寫入,不需採取行動。]]> + X-Frame-Options 設定能控制網站是否可以被其他人IFRAMEd已找到。]]> + X-Frame-Options 設定能控制網站是否可以被其他人IFRAMEd沒有找到。]]> + 調整設定的標頭 + 在 web.config 的 httpProtocol/customHeaders 區域增加設定來防止本站被別的網站IFRAMEd。 + 在 web.config 的 httpProtocol/customHeaders 區域已經增加設定來防止本站被別的網站IFRAMEd。 + 無法更新web.config檔案,錯誤:%0% + + %0%。]]> + 在標頭中沒有找到揭露網站技術的資訊。 + 在 Web.config 檔案中,找不到 system.net/mailsettings。 + 在 Web.config 檔案中的 system.net/mailsettings,沒有設定 host 。 + SMTP設定正確,而且服務正常運作。 + SMTP伺服器 %0% : %1% 無法連接。請確認在Web.config 檔案中 system.net/mailsettings 設定正確。 + %0%。]]> + %0%。]]> + + + 停止網址追蹤器 + 啟動網址追蹤器 + 原本網址 + 轉址成 + 沒有任何轉址 + 當發佈後的頁面改名或移動時,會自動轉址至新網頁。 + 移除 + 您確定要移除從 %0% 到 %1% 的轉址嗎? + 轉址已移除。 + 移除轉址錯誤。 + + 您確定要停止轉址追蹤器? + 轉址追蹤器已停止。 + 停止轉址追蹤器錯誤,更多資訊請參閱您的紀錄檔。 + 轉址追蹤器已開啟。 + 啟動轉址追蹤器錯誤,更多資訊請參閱您的紀錄檔。 + +
      \ No newline at end of file diff --git a/src/Umbraco.Web.UI/Umbraco/create/PartialView.ascx b/src/Umbraco.Web.UI/Umbraco/create/PartialView.ascx deleted file mode 100644 index 8e8e53e196..0000000000 --- a/src/Umbraco.Web.UI/Umbraco/create/PartialView.ascx +++ /dev/null @@ -1,31 +0,0 @@ -<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="PartialView.ascx.cs" Inherits="Umbraco.Web.UI.Umbraco.Create.PartialView" %> -<%@ Import Namespace="umbraco" %> -<%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %> - - - - - * - - Cannot end with '/' or '.' - - - - - - - - - -
    • ' + (index + 1) + '
    • '; - } - }); - }); -} - -function initLightBox() { - jQuery('a.btn-preview').simpleLightbox({ - faderOpacity: 0.7, - faderBackground: '#000000', - closeLink: 'a.btn-close-box', - onClick: function () { - var link = jQuery(this); - var title = link.attr("title"); - var desc = link.siblings("div.gal-desc").html(); - var owner = link.siblings("div.gal-owner").html(); - - jQuery("#lightbox .title").text(title); - jQuery("#lightbox .create").html(owner); - jQuery("#lightbox .carusel").html(desc); - - jQuery("#lightbox footer a").click(function () { - var installLink = link.siblings("a.btn-install-gal"); - //this is f'ing nasty, we'll switch to a neater solution then an updatepanel after the beta - eval(installLink.attr('href')); - installLink.click(); - }); - } - }); -} - -/* -* jQuery Cycle Plugin (with Transition Definitions) -* Examples and documentation at: http://jquery.malsup.com/cycle/ -* Copyright (c) 2007-2010 M. Alsup -* Version: 2.88 (08-JUN-2010) -* Dual licensed under the MIT and GPL licenses. -* http://jquery.malsup.com/license.html -* Requires: jQuery v1.2.6 or later -*/ -(function ($) { var ver = "2.88"; if ($.support == undefined) { $.support = { opacity: !($.browser.msie) }; } function debug(s) { if ($.fn.cycle.debug) { log(s); } } function log() { if (window.console && window.console.log) { window.console.log("[cycle] " + Array.prototype.join.call(arguments, " ")); } } $.fn.cycle = function (options, arg2) { var o = { s: this.selector, c: this.context }; if (this.length === 0 && options != "stop") { if (!$.isReady && o.s) { log("DOM not ready, queuing slideshow"); $(function () { $(o.s, o.c).cycle(options, arg2); }); return this; } log("terminating; zero elements found by selector" + ($.isReady ? "" : " (DOM not ready)")); return this; } return this.each(function () { var opts = handleArguments(this, options, arg2); if (opts === false) { return; } opts.updateActivePagerLink = opts.updateActivePagerLink || $.fn.cycle.updateActivePagerLink; if (this.cycleTimeout) { clearTimeout(this.cycleTimeout); } this.cycleTimeout = this.cyclePause = 0; var $cont = $(this); var $slides = opts.slideExpr ? $(opts.slideExpr, this) : $cont.children(); var els = $slides.get(); if (els.length < 2) { log("terminating; too few slides: " + els.length); return; } var opts2 = buildOptions($cont, $slides, els, opts, o); if (opts2 === false) { return; } var startTime = opts2.continuous ? 10 : getTimeout(els[opts2.currSlide], els[opts2.nextSlide], opts2, !opts2.rev); if (startTime) { startTime += (opts2.delay || 0); if (startTime < 10) { startTime = 10; } debug("first timeout: " + startTime); this.cycleTimeout = setTimeout(function () { go(els, opts2, 0, (!opts2.rev && !opts.backwards)); }, startTime); } }); }; function handleArguments(cont, options, arg2) { if (cont.cycleStop == undefined) { cont.cycleStop = 0; } if (options === undefined || options === null) { options = {}; } if (options.constructor == String) { switch (options) { case "destroy": case "stop": var opts = $(cont).data("cycle.opts"); if (!opts) { return false; } cont.cycleStop++; if (cont.cycleTimeout) { clearTimeout(cont.cycleTimeout); } cont.cycleTimeout = 0; $(cont).removeData("cycle.opts"); if (options == "destroy") { destroy(opts); } return false; case "toggle": cont.cyclePause = (cont.cyclePause === 1) ? 0 : 1; checkInstantResume(cont.cyclePause, arg2, cont); return false; case "pause": cont.cyclePause = 1; return false; case "resume": cont.cyclePause = 0; checkInstantResume(false, arg2, cont); return false; case "prev": case "next": var opts = $(cont).data("cycle.opts"); if (!opts) { log('options not found, "prev/next" ignored'); return false; } $.fn.cycle[options](opts); return false; default: options = { fx: options }; } return options; } else { if (options.constructor == Number) { var num = options; options = $(cont).data("cycle.opts"); if (!options) { log("options not found, can not advance slide"); return false; } if (num < 0 || num >= options.elements.length) { log("invalid slide index: " + num); return false; } options.nextSlide = num; if (cont.cycleTimeout) { clearTimeout(cont.cycleTimeout); cont.cycleTimeout = 0; } if (typeof arg2 == "string") { options.oneTimeFx = arg2; } go(options.elements, options, 1, num >= options.currSlide); return false; } } return options; function checkInstantResume(isPaused, arg2, cont) { if (!isPaused && arg2 === true) { var options = $(cont).data("cycle.opts"); if (!options) { log("options not found, can not resume"); return false; } if (cont.cycleTimeout) { clearTimeout(cont.cycleTimeout); cont.cycleTimeout = 0; } go(options.elements, options, 1, (!opts.rev && !opts.backwards)); } } } function removeFilter(el, opts) { if (!$.support.opacity && opts.cleartype && el.style.filter) { try { el.style.removeAttribute("filter"); } catch (smother) { } } } function destroy(opts) { if (opts.next) { $(opts.next).unbind(opts.prevNextEvent); } if (opts.prev) { $(opts.prev).unbind(opts.prevNextEvent); } if (opts.pager || opts.pagerAnchorBuilder) { $.each(opts.pagerAnchors || [], function () { this.unbind().remove(); }); } opts.pagerAnchors = null; if (opts.destroy) { opts.destroy(opts); } } function buildOptions($cont, $slides, els, options, o) { var opts = $.extend({}, $.fn.cycle.defaults, options || {}, $.metadata ? $cont.metadata() : $.meta ? $cont.data() : {}); if (opts.autostop) { opts.countdown = opts.autostopCount || els.length; } var cont = $cont[0]; $cont.data("cycle.opts", opts); opts.$cont = $cont; opts.stopCount = cont.cycleStop; opts.elements = els; opts.before = opts.before ? [opts.before] : []; opts.after = opts.after ? [opts.after] : []; opts.after.unshift(function () { opts.busy = 0; }); if (!$.support.opacity && opts.cleartype) { opts.after.push(function () { removeFilter(this, opts); }); } if (opts.continuous) { opts.after.push(function () { go(els, opts, 0, (!opts.rev && !opts.backwards)); }); } saveOriginalOpts(opts); if (!$.support.opacity && opts.cleartype && !opts.cleartypeNoBg) { clearTypeFix($slides); } if ($cont.css("position") == "static") { $cont.css("position", "relative"); } if (opts.width) { $cont.width(opts.width); } if (opts.height && opts.height != "auto") { $cont.height(opts.height); } if (opts.startingSlide) { opts.startingSlide = parseInt(opts.startingSlide); } else { if (opts.backwards) { opts.startingSlide = els.length - 1; } } if (opts.random) { opts.randomMap = []; for (var i = 0; i < els.length; i++) { opts.randomMap.push(i); } opts.randomMap.sort(function (a, b) { return Math.random() - 0.5; }); opts.randomIndex = 1; opts.startingSlide = opts.randomMap[1]; } else { if (opts.startingSlide >= els.length) { opts.startingSlide = 0; } } opts.currSlide = opts.startingSlide || 0; var first = opts.startingSlide; $slides.css({ position: "absolute", top: 0, left: 0 }).hide().each(function (i) { var z; if (opts.backwards) { z = first ? i <= first ? els.length + (i - first) : first - i : els.length - i; } else { z = first ? i >= first ? els.length - (i - first) : first - i : els.length - i; } $(this).css("z-index", z); }); $(els[first]).css("opacity", 1).show(); removeFilter(els[first], opts); if (opts.fit && opts.width) { $slides.width(opts.width); } if (opts.fit && opts.height && opts.height != "auto") { $slides.height(opts.height); } var reshape = opts.containerResize && !$cont.innerHeight(); if (reshape) { var maxw = 0, maxh = 0; for (var j = 0; j < els.length; j++) { var $e = $(els[j]), e = $e[0], w = $e.outerWidth(), h = $e.outerHeight(); if (!w) { w = e.offsetWidth || e.width || $e.attr("width"); } if (!h) { h = e.offsetHeight || e.height || $e.attr("height"); } maxw = w > maxw ? w : maxw; maxh = h > maxh ? h : maxh; } if (maxw > 0 && maxh > 0) { $cont.css({ width: maxw + "px", height: maxh + "px" }); } } if (opts.pause) { $cont.hover(function () { this.cyclePause++; }, function () { this.cyclePause--; }); } if (supportMultiTransitions(opts) === false) { return false; } var requeue = false; options.requeueAttempts = options.requeueAttempts || 0; $slides.each(function () { var $el = $(this); this.cycleH = (opts.fit && opts.height) ? opts.height : ($el.height() || this.offsetHeight || this.height || $el.attr("height") || 0); this.cycleW = (opts.fit && opts.width) ? opts.width : ($el.width() || this.offsetWidth || this.width || $el.attr("width") || 0); if ($el.is("img")) { var loadingIE = ($.browser.msie && this.cycleW == 28 && this.cycleH == 30 && !this.complete); var loadingFF = ($.browser.mozilla && this.cycleW == 34 && this.cycleH == 19 && !this.complete); var loadingOp = ($.browser.opera && ((this.cycleW == 42 && this.cycleH == 19) || (this.cycleW == 37 && this.cycleH == 17)) && !this.complete); var loadingOther = (this.cycleH == 0 && this.cycleW == 0 && !this.complete); if (loadingIE || loadingFF || loadingOp || loadingOther) { if (o.s && opts.requeueOnImageNotLoaded && ++options.requeueAttempts < 100) { log(options.requeueAttempts, " - img slide not loaded, requeuing slideshow: ", this.src, this.cycleW, this.cycleH); setTimeout(function () { $(o.s, o.c).cycle(options); }, opts.requeueTimeout); requeue = true; return false; } else { log("could not determine size of image: " + this.src, this.cycleW, this.cycleH); } } } return true; }); if (requeue) { return false; } opts.cssBefore = opts.cssBefore || {}; opts.animIn = opts.animIn || {}; opts.animOut = opts.animOut || {}; $slides.not(":eq(" + first + ")").css(opts.cssBefore); if (opts.cssFirst) { $($slides[first]).css(opts.cssFirst); } if (opts.timeout) { opts.timeout = parseInt(opts.timeout); if (opts.speed.constructor == String) { opts.speed = $.fx.speeds[opts.speed] || parseInt(opts.speed); } if (!opts.sync) { opts.speed = opts.speed / 2; } var buffer = opts.fx == "shuffle" ? 500 : 250; while ((opts.timeout - opts.speed) < buffer) { opts.timeout += opts.speed; } } if (opts.easing) { opts.easeIn = opts.easeOut = opts.easing; } if (!opts.speedIn) { opts.speedIn = opts.speed; } if (!opts.speedOut) { opts.speedOut = opts.speed; } opts.slideCount = els.length; opts.currSlide = opts.lastSlide = first; if (opts.random) { if (++opts.randomIndex == els.length) { opts.randomIndex = 0; } opts.nextSlide = opts.randomMap[opts.randomIndex]; } else { if (opts.backwards) { opts.nextSlide = opts.startingSlide == 0 ? (els.length - 1) : opts.startingSlide - 1; } else { opts.nextSlide = opts.startingSlide >= (els.length - 1) ? 0 : opts.startingSlide + 1; } } if (!opts.multiFx) { var init = $.fn.cycle.transitions[opts.fx]; if ($.isFunction(init)) { init($cont, $slides, opts); } else { if (opts.fx != "custom" && !opts.multiFx) { log("unknown transition: " + opts.fx, "; slideshow terminating"); return false; } } } var e0 = $slides[first]; if (opts.before.length) { opts.before[0].apply(e0, [e0, e0, opts, true]); } if (opts.after.length > 1) { opts.after[1].apply(e0, [e0, e0, opts, true]); } if (opts.next) { $(opts.next).bind(opts.prevNextEvent, function () { return advance(opts, opts.rev ? -1 : 1); }); } if (opts.prev) { $(opts.prev).bind(opts.prevNextEvent, function () { return advance(opts, opts.rev ? 1 : -1); }); } if (opts.pager || opts.pagerAnchorBuilder) { buildPager(els, opts); } exposeAddSlide(opts, els); return opts; } function saveOriginalOpts(opts) { opts.original = { before: [], after: [] }; opts.original.cssBefore = $.extend({}, opts.cssBefore); opts.original.cssAfter = $.extend({}, opts.cssAfter); opts.original.animIn = $.extend({}, opts.animIn); opts.original.animOut = $.extend({}, opts.animOut); $.each(opts.before, function () { opts.original.before.push(this); }); $.each(opts.after, function () { opts.original.after.push(this); }); } function supportMultiTransitions(opts) { var i, tx, txs = $.fn.cycle.transitions; if (opts.fx.indexOf(",") > 0) { opts.multiFx = true; opts.fxs = opts.fx.replace(/\s*/g, "").split(","); for (i = 0; i < opts.fxs.length; i++) { var fx = opts.fxs[i]; tx = txs[fx]; if (!tx || !txs.hasOwnProperty(fx) || !$.isFunction(tx)) { log("discarding unknown transition: ", fx); opts.fxs.splice(i, 1); i--; } } if (!opts.fxs.length) { log("No valid transitions named; slideshow terminating."); return false; } } else { if (opts.fx == "all") { opts.multiFx = true; opts.fxs = []; for (p in txs) { tx = txs[p]; if (txs.hasOwnProperty(p) && $.isFunction(tx)) { opts.fxs.push(p); } } } } if (opts.multiFx && opts.randomizeEffects) { var r1 = Math.floor(Math.random() * 20) + 30; for (i = 0; i < r1; i++) { var r2 = Math.floor(Math.random() * opts.fxs.length); opts.fxs.push(opts.fxs.splice(r2, 1)[0]); } debug("randomized fx sequence: ", opts.fxs); } return true; } function exposeAddSlide(opts, els) { opts.addSlide = function (newSlide, prepend) { var $s = $(newSlide), s = $s[0]; if (!opts.autostopCount) { opts.countdown++; } els[prepend ? "unshift" : "push"](s); if (opts.els) { opts.els[prepend ? "unshift" : "push"](s); } opts.slideCount = els.length; $s.css("position", "absolute"); $s[prepend ? "prependTo" : "appendTo"](opts.$cont); if (prepend) { opts.currSlide++; opts.nextSlide++; } if (!$.support.opacity && opts.cleartype && !opts.cleartypeNoBg) { clearTypeFix($s); } if (opts.fit && opts.width) { $s.width(opts.width); } if (opts.fit && opts.height && opts.height != "auto") { $slides.height(opts.height); } s.cycleH = (opts.fit && opts.height) ? opts.height : $s.height(); s.cycleW = (opts.fit && opts.width) ? opts.width : $s.width(); $s.css(opts.cssBefore); if (opts.pager || opts.pagerAnchorBuilder) { $.fn.cycle.createPagerAnchor(els.length - 1, s, $(opts.pager), els, opts); } if ($.isFunction(opts.onAddSlide)) { opts.onAddSlide($s); } else { $s.hide(); } }; } $.fn.cycle.resetState = function (opts, fx) { fx = fx || opts.fx; opts.before = []; opts.after = []; opts.cssBefore = $.extend({}, opts.original.cssBefore); opts.cssAfter = $.extend({}, opts.original.cssAfter); opts.animIn = $.extend({}, opts.original.animIn); opts.animOut = $.extend({}, opts.original.animOut); opts.fxFn = null; $.each(opts.original.before, function () { opts.before.push(this); }); $.each(opts.original.after, function () { opts.after.push(this); }); var init = $.fn.cycle.transitions[fx]; if ($.isFunction(init)) { init(opts.$cont, $(opts.elements), opts); } }; function go(els, opts, manual, fwd) { if (manual && opts.busy && opts.manualTrump) { debug("manualTrump in go(), stopping active transition"); $(els).stop(true, true); opts.busy = false; } if (opts.busy) { debug("transition active, ignoring new tx request"); return; } var p = opts.$cont[0], curr = els[opts.currSlide], next = els[opts.nextSlide]; if (p.cycleStop != opts.stopCount || p.cycleTimeout === 0 && !manual) { return; } if (!manual && !p.cyclePause && !opts.bounce && ((opts.autostop && (--opts.countdown <= 0)) || (opts.nowrap && !opts.random && opts.nextSlide < opts.currSlide))) { if (opts.end) { opts.end(opts); } return; } var changed = false; if ((manual || !p.cyclePause) && (opts.nextSlide != opts.currSlide)) { changed = true; var fx = opts.fx; curr.cycleH = curr.cycleH || $(curr).height(); curr.cycleW = curr.cycleW || $(curr).width(); next.cycleH = next.cycleH || $(next).height(); next.cycleW = next.cycleW || $(next).width(); if (opts.multiFx) { if (opts.lastFx == undefined || ++opts.lastFx >= opts.fxs.length) { opts.lastFx = 0; } fx = opts.fxs[opts.lastFx]; opts.currFx = fx; } if (opts.oneTimeFx) { fx = opts.oneTimeFx; opts.oneTimeFx = null; } $.fn.cycle.resetState(opts, fx); if (opts.before.length) { $.each(opts.before, function (i, o) { if (p.cycleStop != opts.stopCount) { return; } o.apply(next, [curr, next, opts, fwd]); }); } var after = function () { $.each(opts.after, function (i, o) { if (p.cycleStop != opts.stopCount) { return; } o.apply(next, [curr, next, opts, fwd]); }); }; debug("tx firing; currSlide: " + opts.currSlide + "; nextSlide: " + opts.nextSlide); opts.busy = 1; if (opts.fxFn) { opts.fxFn(curr, next, opts, after, fwd, manual && opts.fastOnEvent); } else { if ($.isFunction($.fn.cycle[opts.fx])) { $.fn.cycle[opts.fx](curr, next, opts, after, fwd, manual && opts.fastOnEvent); } else { $.fn.cycle.custom(curr, next, opts, after, fwd, manual && opts.fastOnEvent); } } } if (changed || opts.nextSlide == opts.currSlide) { opts.lastSlide = opts.currSlide; if (opts.random) { opts.currSlide = opts.nextSlide; if (++opts.randomIndex == els.length) { opts.randomIndex = 0; } opts.nextSlide = opts.randomMap[opts.randomIndex]; if (opts.nextSlide == opts.currSlide) { opts.nextSlide = (opts.currSlide == opts.slideCount - 1) ? 0 : opts.currSlide + 1; } } else { if (opts.backwards) { var roll = (opts.nextSlide - 1) < 0; if (roll && opts.bounce) { opts.backwards = !opts.backwards; opts.nextSlide = 1; opts.currSlide = 0; } else { opts.nextSlide = roll ? (els.length - 1) : opts.nextSlide - 1; opts.currSlide = roll ? 0 : opts.nextSlide + 1; } } else { var roll = (opts.nextSlide + 1) == els.length; if (roll && opts.bounce) { opts.backwards = !opts.backwards; opts.nextSlide = els.length - 2; opts.currSlide = els.length - 1; } else { opts.nextSlide = roll ? 0 : opts.nextSlide + 1; opts.currSlide = roll ? els.length - 1 : opts.nextSlide - 1; } } } } if (changed && opts.pager) { opts.updateActivePagerLink(opts.pager, opts.currSlide, opts.activePagerClass); } var ms = 0; if (opts.timeout && !opts.continuous) { ms = getTimeout(els[opts.currSlide], els[opts.nextSlide], opts, fwd); } else { if (opts.continuous && p.cyclePause) { ms = 10; } } if (ms > 0) { p.cycleTimeout = setTimeout(function () { go(els, opts, 0, (!opts.rev && !opts.backwards)); }, ms); } } $.fn.cycle.updateActivePagerLink = function (pager, currSlide, clsName) { $(pager).each(function () { $(this).children().removeClass(clsName).eq(currSlide).addClass(clsName); }); }; function getTimeout(curr, next, opts, fwd) { if (opts.timeoutFn) { var t = opts.timeoutFn.call(curr, curr, next, opts, fwd); while ((t - opts.speed) < 250) { t += opts.speed; } debug("calculated timeout: " + t + "; speed: " + opts.speed); if (t !== false) { return t; } } return opts.timeout; } $.fn.cycle.next = function (opts) { advance(opts, opts.rev ? -1 : 1); }; $.fn.cycle.prev = function (opts) { advance(opts, opts.rev ? 1 : -1); }; function advance(opts, val) { var els = opts.elements; var p = opts.$cont[0], timeout = p.cycleTimeout; if (timeout) { clearTimeout(timeout); p.cycleTimeout = 0; } if (opts.random && val < 0) { opts.randomIndex--; if (--opts.randomIndex == -2) { opts.randomIndex = els.length - 2; } else { if (opts.randomIndex == -1) { opts.randomIndex = els.length - 1; } } opts.nextSlide = opts.randomMap[opts.randomIndex]; } else { if (opts.random) { opts.nextSlide = opts.randomMap[opts.randomIndex]; } else { opts.nextSlide = opts.currSlide + val; if (opts.nextSlide < 0) { if (opts.nowrap) { return false; } opts.nextSlide = els.length - 1; } else { if (opts.nextSlide >= els.length) { if (opts.nowrap) { return false; } opts.nextSlide = 0; } } } } var cb = opts.onPrevNextEvent || opts.prevNextClick; if ($.isFunction(cb)) { cb(val > 0, opts.nextSlide, els[opts.nextSlide]); } go(els, opts, 1, val >= 0); return false; } function buildPager(els, opts) { var $p = $(opts.pager); $.each(els, function (i, o) { $.fn.cycle.createPagerAnchor(i, o, $p, els, opts); }); opts.updateActivePagerLink(opts.pager, opts.startingSlide, opts.activePagerClass); } $.fn.cycle.createPagerAnchor = function (i, el, $p, els, opts) { var a; if ($.isFunction(opts.pagerAnchorBuilder)) { a = opts.pagerAnchorBuilder(i, el); debug("pagerAnchorBuilder(" + i + ", el) returned: " + a); } else { a = '' + (i + 1) + ""; } if (!a) { return; } var $a = $(a); if ($a.parents("body").length === 0) { var arr = []; if ($p.length > 1) { $p.each(function () { var $clone = $a.clone(true); $(this).append($clone); arr.push($clone[0]); }); $a = $(arr); } else { $a.appendTo($p); } } opts.pagerAnchors = opts.pagerAnchors || []; opts.pagerAnchors.push($a); $a.bind(opts.pagerEvent, function (e) { e.preventDefault(); opts.nextSlide = i; var p = opts.$cont[0], timeout = p.cycleTimeout; if (timeout) { clearTimeout(timeout); p.cycleTimeout = 0; } var cb = opts.onPagerEvent || opts.pagerClick; if ($.isFunction(cb)) { cb(opts.nextSlide, els[opts.nextSlide]); } go(els, opts, 1, opts.currSlide < i); }); if (!/^click/.test(opts.pagerEvent) && !opts.allowPagerClickBubble) { $a.bind("click.cycle", function () { return false; }); } if (opts.pauseOnPagerHover) { $a.hover(function () { opts.$cont[0].cyclePause++; }, function () { opts.$cont[0].cyclePause--; }); } }; $.fn.cycle.hopsFromLast = function (opts, fwd) { var hops, l = opts.lastSlide, c = opts.currSlide; if (fwd) { hops = c > l ? c - l : opts.slideCount - l; } else { hops = c < l ? l - c : l + opts.slideCount - c; } return hops; }; function clearTypeFix($slides) { debug("applying clearType background-color hack"); function hex(s) { s = parseInt(s).toString(16); return s.length < 2 ? "0" + s : s; } function getBg(e) { for (; e && e.nodeName.toLowerCase() != "html"; e = e.parentNode) { var v = $.css(e, "background-color"); if (v.indexOf("rgb") >= 0) { var rgb = v.match(/\d+/g); return "#" + hex(rgb[0]) + hex(rgb[1]) + hex(rgb[2]); } if (v && v != "transparent") { return v; } } return "#ffffff"; } $slides.each(function () { $(this).css("background-color", getBg(this)); }); } $.fn.cycle.commonReset = function (curr, next, opts, w, h, rev) { $(opts.elements).not(curr).hide(); opts.cssBefore.opacity = 1; opts.cssBefore.display = "block"; if (w !== false && next.cycleW > 0) { opts.cssBefore.width = next.cycleW; } if (h !== false && next.cycleH > 0) { opts.cssBefore.height = next.cycleH; } opts.cssAfter = opts.cssAfter || {}; opts.cssAfter.display = "none"; $(curr).css("zIndex", opts.slideCount + (rev === true ? 1 : 0)); $(next).css("zIndex", opts.slideCount + (rev === true ? 0 : 1)); }; $.fn.cycle.custom = function (curr, next, opts, cb, fwd, speedOverride) { var $l = $(curr), $n = $(next); var speedIn = opts.speedIn, speedOut = opts.speedOut, easeIn = opts.easeIn, easeOut = opts.easeOut; $n.css(opts.cssBefore); if (speedOverride) { if (typeof speedOverride == "number") { speedIn = speedOut = speedOverride; } else { speedIn = speedOut = 1; } easeIn = easeOut = null; } var fn = function () { $n.animate(opts.animIn, speedIn, easeIn, cb); }; $l.animate(opts.animOut, speedOut, easeOut, function () { if (opts.cssAfter) { $l.css(opts.cssAfter); } if (!opts.sync) { fn(); } }); if (opts.sync) { fn(); } }; $.fn.cycle.transitions = { fade: function ($cont, $slides, opts) { $slides.not(":eq(" + opts.currSlide + ")").css("opacity", 0); opts.before.push(function (curr, next, opts) { $.fn.cycle.commonReset(curr, next, opts); opts.cssBefore.opacity = 0; }); opts.animIn = { opacity: 1 }; opts.animOut = { opacity: 0 }; opts.cssBefore = { top: 0, left: 0 }; } }; $.fn.cycle.ver = function () { return ver; }; $.fn.cycle.defaults = { fx: "fade", timeout: 4000, timeoutFn: null, continuous: 0, speed: 1000, speedIn: null, speedOut: null, next: null, prev: null, onPrevNextEvent: null, prevNextEvent: "click.cycle", pager: null, onPagerEvent: null, pagerEvent: "click.cycle", allowPagerClickBubble: false, pagerAnchorBuilder: null, before: null, after: null, end: null, easing: null, easeIn: null, easeOut: null, shuffle: null, animIn: null, animOut: null, cssBefore: null, cssAfter: null, fxFn: null, height: "auto", startingSlide: 0, sync: 1, random: 0, fit: 0, containerResize: 1, pause: 0, pauseOnPagerHover: 0, autostop: 0, autostopCount: 0, delay: 0, slideExpr: null, cleartype: !$.support.opacity, cleartypeNoBg: false, nowrap: 0, fastOnEvent: 0, randomizeEffects: 1, rev: 0, manualTrump: true, requeueOnImageNotLoaded: true, requeueTimeout: 250, activePagerClass: "activeSlide", updateActivePagerLink: null, backwards: false }; })(jQuery); -/* -* jQuery Cycle Plugin Transition Definitions -* This script is a plugin for the jQuery Cycle Plugin -* Examples and documentation at: http://malsup.com/jquery/cycle/ -* Copyright (c) 2007-2010 M. Alsup -* Version: 2.72 -* Dual licensed under the MIT and GPL licenses: -* http://www.opensource.org/licenses/mit-license.php -* http://www.gnu.org/licenses/gpl.html -*/ -(function ($) { $.fn.cycle.transitions.none = function ($cont, $slides, opts) { opts.fxFn = function (curr, next, opts, after) { $(next).show(); $(curr).hide(); after(); }; }; $.fn.cycle.transitions.scrollUp = function ($cont, $slides, opts) { $cont.css("overflow", "hidden"); opts.before.push($.fn.cycle.commonReset); var h = $cont.height(); opts.cssBefore = { top: h, left: 0 }; opts.cssFirst = { top: 0 }; opts.animIn = { top: 0 }; opts.animOut = { top: -h }; }; $.fn.cycle.transitions.scrollDown = function ($cont, $slides, opts) { $cont.css("overflow", "hidden"); opts.before.push($.fn.cycle.commonReset); var h = $cont.height(); opts.cssFirst = { top: 0 }; opts.cssBefore = { top: -h, left: 0 }; opts.animIn = { top: 0 }; opts.animOut = { top: h }; }; $.fn.cycle.transitions.scrollLeft = function ($cont, $slides, opts) { $cont.css("overflow", "hidden"); opts.before.push($.fn.cycle.commonReset); var w = $cont.width(); opts.cssFirst = { left: 0 }; opts.cssBefore = { left: w, top: 0 }; opts.animIn = { left: 0 }; opts.animOut = { left: 0 - w }; }; $.fn.cycle.transitions.scrollRight = function ($cont, $slides, opts) { $cont.css("overflow", "hidden"); opts.before.push($.fn.cycle.commonReset); var w = $cont.width(); opts.cssFirst = { left: 0 }; opts.cssBefore = { left: -w, top: 0 }; opts.animIn = { left: 0 }; opts.animOut = { left: w }; }; $.fn.cycle.transitions.scrollHorz = function ($cont, $slides, opts) { $cont.css("overflow", "hidden").width(); opts.before.push(function (curr, next, opts, fwd) { $.fn.cycle.commonReset(curr, next, opts); opts.cssBefore.left = fwd ? (next.cycleW - 1) : (1 - next.cycleW); opts.animOut.left = fwd ? -curr.cycleW : curr.cycleW; }); opts.cssFirst = { left: 0 }; opts.cssBefore = { top: 0 }; opts.animIn = { left: 0 }; opts.animOut = { top: 0 }; }; $.fn.cycle.transitions.scrollVert = function ($cont, $slides, opts) { $cont.css("overflow", "hidden"); opts.before.push(function (curr, next, opts, fwd) { $.fn.cycle.commonReset(curr, next, opts); opts.cssBefore.top = fwd ? (1 - next.cycleH) : (next.cycleH - 1); opts.animOut.top = fwd ? curr.cycleH : -curr.cycleH; }); opts.cssFirst = { top: 0 }; opts.cssBefore = { left: 0 }; opts.animIn = { top: 0 }; opts.animOut = { left: 0 }; }; $.fn.cycle.transitions.slideX = function ($cont, $slides, opts) { opts.before.push(function (curr, next, opts) { $(opts.elements).not(curr).hide(); $.fn.cycle.commonReset(curr, next, opts, false, true); opts.animIn.width = next.cycleW; }); opts.cssBefore = { left: 0, top: 0, width: 0 }; opts.animIn = { width: "show" }; opts.animOut = { width: 0 }; }; $.fn.cycle.transitions.slideY = function ($cont, $slides, opts) { opts.before.push(function (curr, next, opts) { $(opts.elements).not(curr).hide(); $.fn.cycle.commonReset(curr, next, opts, true, false); opts.animIn.height = next.cycleH; }); opts.cssBefore = { left: 0, top: 0, height: 0 }; opts.animIn = { height: "show" }; opts.animOut = { height: 0 }; }; $.fn.cycle.transitions.shuffle = function ($cont, $slides, opts) { var i, w = $cont.css("overflow", "visible").width(); $slides.css({ left: 0, top: 0 }); opts.before.push(function (curr, next, opts) { $.fn.cycle.commonReset(curr, next, opts, true, true, true); }); if (!opts.speedAdjusted) { opts.speed = opts.speed / 2; opts.speedAdjusted = true; } opts.random = 0; opts.shuffle = opts.shuffle || { left: -w, top: 15 }; opts.els = []; for (i = 0; i < $slides.length; i++) { opts.els.push($slides[i]); } for (i = 0; i < opts.currSlide; i++) { opts.els.push(opts.els.shift()); } opts.fxFn = function (curr, next, opts, cb, fwd) { var $el = fwd ? $(curr) : $(next); $(next).css(opts.cssBefore); var count = opts.slideCount; $el.animate(opts.shuffle, opts.speedIn, opts.easeIn, function () { var hops = $.fn.cycle.hopsFromLast(opts, fwd); for (var k = 0; k < hops; k++) { fwd ? opts.els.push(opts.els.shift()) : opts.els.unshift(opts.els.pop()); } if (fwd) { for (var i = 0, len = opts.els.length; i < len; i++) { $(opts.els[i]).css("z-index", len - i + count); } } else { var z = $(curr).css("z-index"); $el.css("z-index", parseInt(z) + 1 + count); } $el.animate({ left: 0, top: 0 }, opts.speedOut, opts.easeOut, function () { $(fwd ? this : curr).hide(); if (cb) { cb(); } }); }); }; opts.cssBefore = { display: "block", opacity: 1, top: 0, left: 0 }; }; $.fn.cycle.transitions.turnUp = function ($cont, $slides, opts) { opts.before.push(function (curr, next, opts) { $.fn.cycle.commonReset(curr, next, opts, true, false); opts.cssBefore.top = next.cycleH; opts.animIn.height = next.cycleH; }); opts.cssFirst = { top: 0 }; opts.cssBefore = { left: 0, height: 0 }; opts.animIn = { top: 0 }; opts.animOut = { height: 0 }; }; $.fn.cycle.transitions.turnDown = function ($cont, $slides, opts) { opts.before.push(function (curr, next, opts) { $.fn.cycle.commonReset(curr, next, opts, true, false); opts.animIn.height = next.cycleH; opts.animOut.top = curr.cycleH; }); opts.cssFirst = { top: 0 }; opts.cssBefore = { left: 0, top: 0, height: 0 }; opts.animOut = { height: 0 }; }; $.fn.cycle.transitions.turnLeft = function ($cont, $slides, opts) { opts.before.push(function (curr, next, opts) { $.fn.cycle.commonReset(curr, next, opts, false, true); opts.cssBefore.left = next.cycleW; opts.animIn.width = next.cycleW; }); opts.cssBefore = { top: 0, width: 0 }; opts.animIn = { left: 0 }; opts.animOut = { width: 0 }; }; $.fn.cycle.transitions.turnRight = function ($cont, $slides, opts) { opts.before.push(function (curr, next, opts) { $.fn.cycle.commonReset(curr, next, opts, false, true); opts.animIn.width = next.cycleW; opts.animOut.left = curr.cycleW; }); opts.cssBefore = { top: 0, left: 0, width: 0 }; opts.animIn = { left: 0 }; opts.animOut = { width: 0 }; }; $.fn.cycle.transitions.zoom = function ($cont, $slides, opts) { opts.before.push(function (curr, next, opts) { $.fn.cycle.commonReset(curr, next, opts, false, false, true); opts.cssBefore.top = next.cycleH / 2; opts.cssBefore.left = next.cycleW / 2; opts.animIn = { top: 0, left: 0, width: next.cycleW, height: next.cycleH }; opts.animOut = { width: 0, height: 0, top: curr.cycleH / 2, left: curr.cycleW / 2 }; }); opts.cssFirst = { top: 0, left: 0 }; opts.cssBefore = { width: 0, height: 0 }; }; $.fn.cycle.transitions.fadeZoom = function ($cont, $slides, opts) { opts.before.push(function (curr, next, opts) { $.fn.cycle.commonReset(curr, next, opts, false, false); opts.cssBefore.left = next.cycleW / 2; opts.cssBefore.top = next.cycleH / 2; opts.animIn = { top: 0, left: 0, width: next.cycleW, height: next.cycleH }; }); opts.cssBefore = { width: 0, height: 0 }; opts.animOut = { opacity: 0 }; }; $.fn.cycle.transitions.blindX = function ($cont, $slides, opts) { var w = $cont.css("overflow", "hidden").width(); opts.before.push(function (curr, next, opts) { $.fn.cycle.commonReset(curr, next, opts); opts.animIn.width = next.cycleW; opts.animOut.left = curr.cycleW; }); opts.cssBefore = { left: w, top: 0 }; opts.animIn = { left: 0 }; opts.animOut = { left: w }; }; $.fn.cycle.transitions.blindY = function ($cont, $slides, opts) { var h = $cont.css("overflow", "hidden").height(); opts.before.push(function (curr, next, opts) { $.fn.cycle.commonReset(curr, next, opts); opts.animIn.height = next.cycleH; opts.animOut.top = curr.cycleH; }); opts.cssBefore = { top: h, left: 0 }; opts.animIn = { top: 0 }; opts.animOut = { top: h }; }; $.fn.cycle.transitions.blindZ = function ($cont, $slides, opts) { var h = $cont.css("overflow", "hidden").height(); var w = $cont.width(); opts.before.push(function (curr, next, opts) { $.fn.cycle.commonReset(curr, next, opts); opts.animIn.height = next.cycleH; opts.animOut.top = curr.cycleH; }); opts.cssBefore = { top: h, left: w }; opts.animIn = { top: 0, left: 0 }; opts.animOut = { top: h, left: w }; }; $.fn.cycle.transitions.growX = function ($cont, $slides, opts) { opts.before.push(function (curr, next, opts) { $.fn.cycle.commonReset(curr, next, opts, false, true); opts.cssBefore.left = this.cycleW / 2; opts.animIn = { left: 0, width: this.cycleW }; opts.animOut = { left: 0 }; }); opts.cssBefore = { width: 0, top: 0 }; }; $.fn.cycle.transitions.growY = function ($cont, $slides, opts) { opts.before.push(function (curr, next, opts) { $.fn.cycle.commonReset(curr, next, opts, true, false); opts.cssBefore.top = this.cycleH / 2; opts.animIn = { top: 0, height: this.cycleH }; opts.animOut = { top: 0 }; }); opts.cssBefore = { height: 0, left: 0 }; }; $.fn.cycle.transitions.curtainX = function ($cont, $slides, opts) { opts.before.push(function (curr, next, opts) { $.fn.cycle.commonReset(curr, next, opts, false, true, true); opts.cssBefore.left = next.cycleW / 2; opts.animIn = { left: 0, width: this.cycleW }; opts.animOut = { left: curr.cycleW / 2, width: 0 }; }); opts.cssBefore = { top: 0, width: 0 }; }; $.fn.cycle.transitions.curtainY = function ($cont, $slides, opts) { opts.before.push(function (curr, next, opts) { $.fn.cycle.commonReset(curr, next, opts, true, false, true); opts.cssBefore.top = next.cycleH / 2; opts.animIn = { top: 0, height: next.cycleH }; opts.animOut = { top: curr.cycleH / 2, height: 0 }; }); opts.cssBefore = { left: 0, height: 0 }; }; $.fn.cycle.transitions.cover = function ($cont, $slides, opts) { var d = opts.direction || "left"; var w = $cont.css("overflow", "hidden").width(); var h = $cont.height(); opts.before.push(function (curr, next, opts) { $.fn.cycle.commonReset(curr, next, opts); if (d == "right") { opts.cssBefore.left = -w; } else { if (d == "up") { opts.cssBefore.top = h; } else { if (d == "down") { opts.cssBefore.top = -h; } else { opts.cssBefore.left = w; } } } }); opts.animIn = { left: 0, top: 0 }; opts.animOut = { opacity: 1 }; opts.cssBefore = { top: 0, left: 0 }; }; $.fn.cycle.transitions.uncover = function ($cont, $slides, opts) { var d = opts.direction || "left"; var w = $cont.css("overflow", "hidden").width(); var h = $cont.height(); opts.before.push(function (curr, next, opts) { $.fn.cycle.commonReset(curr, next, opts, true, true, true); if (d == "right") { opts.animOut.left = w; } else { if (d == "up") { opts.animOut.top = -h; } else { if (d == "down") { opts.animOut.top = h; } else { opts.animOut.left = -w; } } } }); opts.animIn = { left: 0, top: 0 }; opts.animOut = { opacity: 1 }; opts.cssBefore = { top: 0, left: 0 }; }; $.fn.cycle.transitions.toss = function ($cont, $slides, opts) { var w = $cont.css("overflow", "visible").width(); var h = $cont.height(); opts.before.push(function (curr, next, opts) { $.fn.cycle.commonReset(curr, next, opts, true, true, true); if (!opts.animOut.left && !opts.animOut.top) { opts.animOut = { left: w * 2, top: -h / 2, opacity: 0 }; } else { opts.animOut.opacity = 0; } }); opts.cssBefore = { left: 0, top: 0 }; opts.animIn = { left: 0 }; }; $.fn.cycle.transitions.wipe = function ($cont, $slides, opts) { var w = $cont.css("overflow", "hidden").width(); var h = $cont.height(); opts.cssBefore = opts.cssBefore || {}; var clip; if (opts.clip) { if (/l2r/.test(opts.clip)) { clip = "rect(0px 0px " + h + "px 0px)"; } else { if (/r2l/.test(opts.clip)) { clip = "rect(0px " + w + "px " + h + "px " + w + "px)"; } else { if (/t2b/.test(opts.clip)) { clip = "rect(0px " + w + "px 0px 0px)"; } else { if (/b2t/.test(opts.clip)) { clip = "rect(" + h + "px " + w + "px " + h + "px 0px)"; } else { if (/zoom/.test(opts.clip)) { var top = parseInt(h / 2); var left = parseInt(w / 2); clip = "rect(" + top + "px " + left + "px " + top + "px " + left + "px)"; } } } } } } opts.cssBefore.clip = opts.cssBefore.clip || clip || "rect(0px 0px 0px 0px)"; var d = opts.cssBefore.clip.match(/(\d+)/g); var t = parseInt(d[0]), r = parseInt(d[1]), b = parseInt(d[2]), l = parseInt(d[3]); opts.before.push(function (curr, next, opts) { if (curr == next) { return; } var $curr = $(curr), $next = $(next); $.fn.cycle.commonReset(curr, next, opts, true, true, false); opts.cssAfter.display = "block"; var step = 1, count = parseInt((opts.speedIn / 13)) - 1; (function f() { var tt = t ? t - parseInt(step * (t / count)) : 0; var ll = l ? l - parseInt(step * (l / count)) : 0; var bb = b < h ? b + parseInt(step * ((h - b) / count || 1)) : h; var rr = r < w ? r + parseInt(step * ((w - r) / count || 1)) : w; $next.css({ clip: "rect(" + tt + "px " + rr + "px " + bb + "px " + ll + "px)" }); (step++ <= count) ? setTimeout(f, 13) : $curr.css("display", "none"); })(); }); opts.cssBefore = { display: "block", opacity: 1, top: 0, left: 0 }; opts.animIn = { left: 0 }; opts.animOut = { left: 0 }; }; })(jQuery); - - - -/* simpleLightbox v.1.2. */ -jQuery.fn.simpleLightbox = function(_options) { - // defaults options - var _options = jQuery.extend({ - lightboxContentBlock: '.lightbox', - faderOpacity: 0.5, - faderBackground: '#ffffff', - closeLink: 'a.close-btn', - href: true, - onClick: null - }, _options); - - return this.each(function(i, _this) { - var _this = jQuery(_this); - if (!_options.href) - _this.lightboxContentBlock = _options.lightboxContentBlock; - else _this.lightboxContentBlock = _this.attr('href'); - if (_this.lightboxContentBlock != '' && _this.lightboxContentBlock.length > 1) { - _this.faderOpacity = _options.faderOpacity; - _this.faderBackground = _options.faderBackground; - _this.closeLink = _options.closeLink; - var _fader; - var _lightbox = $(_this.lightboxContentBlock); - if (!jQuery('div.lightbox-fader').length) - _fader = $('body').append(''); - _fader = jQuery('div.lightbox-fader'); - _lightbox.css({ - 'zIndex': 991 - }); - _fader.css({ - opacity: _this.faderOpacity, - backgroundColor: _this.faderBackground, - display: 'none', - position: 'absolute', - top: 0, - left: 0, - zIndex: 990, - textIndent: -9999 - }).text('$nbsp'); - _lightbox.shownFlag = false; - _this.click(function() { - if (jQuery.isFunction(_options.onClick)) { - _options.onClick.apply(_this); - } - _lightbox.shownFlag = true; - _lightbox.hide(); - jQuery.fn.simpleLightbox.positionLightbox(_lightbox); - _fader.fadeIn(300, function() { - _lightbox.fadeIn(400); - jQuery.fn.simpleLightbox.positionLightbox(_lightbox); - }); - jQuery('span.playButton').click(); - return false; - }); - jQuery(_this.closeLink).click(function() { - _lightbox.fadeOut(400, function() { - _fader.fadeOut(300); - _scroll = false; - }); - return false; - }); - _fader.click(function() { - _lightbox.fadeOut(400, function() { - _fader.fadeOut(300); - }); - return false; - }); - var _scroll = false; - jQuery.fn.simpleLightbox.positionLightbox = function(_lbox) { - if (!_lbox.shownFlag) return false; - var _height = 0; - var _width = 0; - var _minWidth = $('body').innerWidth(); - if (window.innerHeight) { - _height = window.innerHeight; - _width = window.innerWidth; - } else { - _height = document.documentElement.clientHeight; - _width = document.documentElement.clientWidth; - } - var _thisHeight = _lbox.outerHeight(); - var _page = $('body'); - if (_lbox.length) { - //Fader style - if (_width < _minWidth) { - _fader.css('width', _minWidth); - } else { - _fader.css('width', '100%'); - } - ; - if (_height > _page.innerHeight()) _fader.css('height', _height); - else _fader.css('height', _page.height()); - - if (_height > _thisHeight) { - if ($.browser.msie && $.browser.version < 7) { - _lbox.css({ - position: 'absolute', - top: (document.documentElement.scrollTop + (_height - _thisHeight) / 2) + "px" - }); - } else { - _lbox.css({ - position: 'fixed', - top: ((_height - _lbox.outerHeight()) / 2) + "px" - }); - } - } else { - var _fh = parseInt(_fader.css('height')); - if (!_scroll) { - if (_fh - _thisHeight > parseInt($(document).scrollTop())) { - _fh = parseInt($(document).scrollTop()) - _scroll = _fh; - } else { - _scroll = _fh - _thisHeight; - } - } - _lbox.css({ - position: 'absolute', - top: _scroll - }); - } - if (_width > _lbox.outerWidth()) _lbox.css({ left: ((_width - _lbox.outerWidth()) / 2 + 10) + "px" }); - else _lbox.css({ position: 'absolute', left: 0 }); - } - } - - jQuery(window).resize(function() { - if (_lightbox.is(':visible')) - jQuery.fn.simpleLightbox.positionLightbox(_lightbox); - }); - jQuery(window).scroll(function() { - if (_lightbox.is(':visible')) - jQuery.fn.simpleLightbox.positionLightbox(_lightbox); - }); - - jQuery.fn.simpleLightbox.positionLightbox(_lightbox); - $(document).keydown(function(e) { - if (!e) evt = window.event; - if (e.keyCode == 27) { - _lightbox.fadeOut(400, function() { - _fader.fadeOut(300); - }); - } - }); - } - }); -}; - -function initCustomForms() { - jQuery('select.sel').selectmenu(); -} \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/Installer/js/jquery.ui.selectmenu.js b/src/Umbraco.Web.UI/umbraco_client/Installer/js/jquery.ui.selectmenu.js deleted file mode 100644 index 83f4caaa13..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/Installer/js/jquery.ui.selectmenu.js +++ /dev/null @@ -1,573 +0,0 @@ - /* - * jQuery UI selectmenu - * - * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT (MIT-LICENSE.txt) - * and GPL (GPL-LICENSE.txt) licenses. - * - * http://docs.jquery.com/UI - */ - -(function($) { - -$.widget("ui.selectmenu", { - getter: "value", - version: "1.8", - eventPrefix: "selectmenu", - options: { - transferClasses: true, - style: 'dropdown', - positionOptions: { - my: "left top", - at: "left bottom", - offset: null - }, - width: null, - menuWidth: null, - handleWidth: 26, - maxHeight: null, - icons: null, - format: null, - bgImage: function() {}, - wrapperElement: "" - }, - - _create: function() { - var self = this, o = this.options; - - // set a default id value - var selectmenuId = this.element.attr('id') || 'ui-selectmenu-' + Math.random().toString(16).slice(2, 10); - - //quick array of button and menu id's - this.ids = [selectmenuId + '-' + 'button', selectmenuId + '-' + 'menu']; - - //define safe mouseup for future toggling - this._safemouseup = true; - - //create menu button wrapper - this.newelement = $('') - .insertAfter(this.element); - // - this.newelement.wrap(o.wrapperElement); - //transfer tabindex - var tabindex = this.element.attr('tabindex'); - if(tabindex){ this.newelement.attr('tabindex', tabindex); } - - //save reference to select in data for ease in calling methods - this.newelement.data('selectelement', this.element); - - //menu icon - this.selectmenuIcon = $('') - .prependTo(this.newelement) - .addClass( (o.style == "popup")? 'ui-icon-triangle-2-n-s' : 'ui-icon-triangle-1-s' ); - - - //make associated form label trigger focus - $('label[for='+this.element.attr('id')+']') - .attr('for', this.ids[0]) - .bind('click', function(){ - self.newelement[0].focus(); - return false; - }); - - //click toggle for menu visibility - this.newelement - .bind('mousedown', function(event){ - self._toggle(event, true); - //make sure a click won't open/close instantly - if(o.style == "popup"){ - self._safemouseup = false; - setTimeout(function(){self._safemouseup = true;}, 300); - } - return false; - }) - .bind('click',function(){ - return false; - }) - .keydown(function(event){ - var ret = true; - switch (event.keyCode) { - case $.ui.keyCode.ENTER: - ret = true; - break; - case $.ui.keyCode.SPACE: - ret = false; - self._toggle(event); - break; - case $.ui.keyCode.UP: - case $.ui.keyCode.LEFT: - ret = false; - self._moveSelection(-1); - break; - case $.ui.keyCode.DOWN: - case $.ui.keyCode.RIGHT: - ret = false; - self._moveSelection(1); - break; - case $.ui.keyCode.TAB: - ret = true; - break; - default: - ret = true; - self._typeAhead(event.keyCode, 'mouseup'); - break; - } - return ret; - }) - .bind('mouseover focus', function(){ - if (!o.disabled) $(this).addClass(self.widgetBaseClass+'-focus ui-state-hover'); - }) - .bind('mouseout blur', function(){ - if (!o.disabled) $(this).removeClass(self.widgetBaseClass+'-focus ui-state-hover'); - }); - - //document click closes menu - $(document).mousedown(function(event){ - self.close(event); - }); - - //change event on original selectmenu - this.element - .click(function(){ this._refreshValue(); }) - // newelement can be null under unclear circumstances in IE8 - .focus(function () { if (this.newelement) { this.newelement[0].focus(); } }); - - //create menu portion, append to body - var cornerClass = (o.style == "dropdown")? " ui-corner-bottom" : " ui-corner-all"; - this.list = $('').appendTo('body'); - this.list.wrap(o.wrapperElement); - - //serialize selectmenu element options - var selectOptionData = []; - this.element - .find('option') - .each(function(){ - selectOptionData.push({ - value: $(this).attr('value'), - text: self._formatText(jQuery(this).text()), - selected: $(this).attr('selected'), - classes: $(this).attr('class'), - parentOptGroup: $(this).parent('optgroup').attr('label'), - bgImage: o.bgImage.call($(this)) - }); - }); - - //active state class is only used in popup style - var activeClass = (self.options.style == "popup") ? " ui-state-active" : ""; - - //write li's - for (var i = 0; i < selectOptionData.length; i++) { - var thisLi = $('
    • '+ selectOptionData[i].text +'
    • ') - .data('index',i) - .addClass(selectOptionData[i].classes) - .data('optionClasses', selectOptionData[i].classes|| '') - .mouseup(function(event){ - if(self._safemouseup){ - var changed = $(this).data('index') != self._selectedIndex(); - self.index($(this).data('index')); - self.select(event); - if(changed){ self.change(event); } - self.close(event,true); - } - return false; - }) - .click(function(){ - return false; - }) - .bind('mouseover focus', function(){ - self._selectedOptionLi().addClass(activeClass); - self._focusedOptionLi().removeClass(self.widgetBaseClass+'-item-focus ui-state-hover'); - $(this).removeClass('ui-state-active').addClass(self.widgetBaseClass + '-item-focus ui-state-hover'); - }) - .bind('mouseout blur', function(){ - if ($(this).is( self._selectedOptionLi().selector )){ $(this).addClass(activeClass); } - $(this).removeClass(self.widgetBaseClass + '-item-focus ui-state-hover'); - }); - - //optgroup or not... - if(selectOptionData[i].parentOptGroup){ - // whitespace in the optgroupname must be replaced, otherwise the li of existing optgroups are never found - var optGroupName = self.widgetBaseClass + '-group-' + selectOptionData[i].parentOptGroup.replace(/[^a-zA-Z0-9]/g, ""); - if(this.list.find('li.' + optGroupName).size()){ - this.list.find('li.' + optGroupName + ':last ul').append(thisLi); - } - else{ - $('') - .appendTo(this.list) - .find('ul') - .append(thisLi); - } - } - else{ - thisLi.appendTo(this.list); - } - - //this allows for using the scrollbar in an overflowed list - this.list.bind('mousedown mouseup', function(){return false;}); - - //append icon if option is specified - if(o.icons){ - for(var j in o.icons){ - if(thisLi.is(o.icons[j].find)){ - thisLi - .data('optionClasses', selectOptionData[i].classes + ' ' + self.widgetBaseClass + '-hasIcon') - .addClass(self.widgetBaseClass + '-hasIcon'); - var iconClass = o.icons[j].icon || ""; - thisLi - .find('a:eq(0)') - .prepend(''); - if (selectOptionData[i].bgImage) { - thisLi.find('span').css('background-image', selectOptionData[i].bgImage); - } - } - } - } - } - - //add corners to top and bottom menu items - this.list.find('li:last').addClass("ui-corner-bottom"); - if(o.style == 'popup'){ this.list.find('li:first').addClass("ui-corner-top"); } - - //transfer classes to selectmenu and list - if(o.transferClasses){ - var transferClasses = this.element.attr('class') || ''; - this.newelement.add(this.list).addClass(transferClasses); - } - - //original selectmenu width - var selectWidth = this.element.width(); - - //set menu button width - this.newelement.width( (o.width) ? o.width : selectWidth); - - //set menu width to either menuWidth option value, width option value, or select width - if(o.style == 'dropdown'){ this.list.width( (o.menuWidth) ? o.menuWidth : ((o.width) ? o.width : selectWidth)); } - else { this.list.width( (o.menuWidth) ? o.menuWidth : ((o.width) ? o.width - o.handleWidth : selectWidth - o.handleWidth)); } - - // calculate default max height - if(o.maxHeight) { - //set max height from option - if (o.maxHeight < this.list.height()){ this.list.height(o.maxHeight); } - } else { - if (!o.format && ($(window).height() / 3) < this.list.height()) { - o.maxHeight = $(window).height() / 3; - this.list.height(o.maxHeight); - } - } - //save reference to actionable li's (not group label li's) - this._optionLis = this.list.find('li:not(.'+ self.widgetBaseClass +'-group)'); - - //transfer menu click to menu button - this.list - .keydown(function(event){ - var ret = true; - switch (event.keyCode) { - case $.ui.keyCode.UP: - case $.ui.keyCode.LEFT: - ret = false; - self._moveFocus(-1); - break; - case $.ui.keyCode.DOWN: - case $.ui.keyCode.RIGHT: - ret = false; - self._moveFocus(1); - break; - case $.ui.keyCode.HOME: - ret = false; - self._moveFocus(':first'); - break; - case $.ui.keyCode.PAGE_UP: - ret = false; - self._scrollPage('up'); - break; - case $.ui.keyCode.PAGE_DOWN: - ret = false; - self._scrollPage('down'); - break; - case $.ui.keyCode.END: - ret = false; - self._moveFocus(':last'); - break; - case $.ui.keyCode.ENTER: - case $.ui.keyCode.SPACE: - ret = false; - self.close(event,true); - $(event.target).parents('li:eq(0)').trigger('mouseup'); - break; - case $.ui.keyCode.TAB: - ret = true; - self.close(event,true); - break; - case $.ui.keyCode.ESCAPE: - ret = false; - self.close(event,true); - break; - } - return ret; - }); - - //selectmenu style - if(o.style == 'dropdown'){ - this.newelement - .addClass(self.widgetBaseClass+"-dropdown"); - this.list - .addClass(self.widgetBaseClass+"-menu-dropdown"); - } - else { - this.newelement - .addClass(self.widgetBaseClass+"-popup"); - this.list - .addClass(self.widgetBaseClass+"-menu-popup"); - } - - //append status span to button - this.newelement.prepend(''+ selectOptionData[this._selectedIndex()].text +''); - - //hide original selectmenu element - this.element.hide(); - - //transfer disabled state - if(this.element.attr('disabled') == true){ this.disable(); } - - //update value - this.index(this._selectedIndex()); - - // needed when selectmenu is placed at the very bottom / top of the page - window.setTimeout(function() { - self._refreshPosition(); - }, 200); - - // needed when window is resized - $(window).resize(function(){ - self._refreshPosition(); - }); - }, - destroy: function() { - this.element.removeData(this.widgetName) - .removeClass(this.widgetBaseClass + '-disabled' + ' ' + this.namespace + '-state-disabled') - .removeAttr('aria-disabled') - .unbind("click"); - - //unbind click on label, reset its for attr - $('label[for='+this.newelement.attr('id')+']') - .attr('for',this.element.attr('id')) - .unbind('click'); - this.newelement.remove(); - // FIXME option.wrapper needs - this.list.remove(); - this.element.show(); - - // call widget destroy function - $.Widget.prototype.destroy.apply(this, arguments); - }, - _typeAhead: function(code, eventType){ - var self = this; - //define self._prevChar if needed - if(!self._prevChar){ self._prevChar = ['',0]; } - var C = String.fromCharCode(code); - c = C.toLowerCase(); - var focusFound = false; - function focusOpt(elem, ind){ - focusFound = true; - $(elem).trigger(eventType); - self._prevChar[1] = ind; - } - this.list.find('li a').each(function(i){ - if(!focusFound){ - var thisText = $(this).text(); - if( thisText.indexOf(C) == 0 || thisText.indexOf(c) == 0){ - if(self._prevChar[0] == C){ - if(self._prevChar[1] < i){ focusOpt(this,i); } - } - else{ focusOpt(this,i); } - } - } - }); - this._prevChar[0] = C; - }, - _uiHash: function(){ - var index = this.index(); - return { - index: index, - option: $("option", this.element).get(index), - value: this.element[0].value - }; - }, - open: function(event){ - var self = this; - var disabledStatus = this.newelement.attr("aria-disabled"); - if(disabledStatus != 'true'){ - this._refreshPosition(); - this._closeOthers(event); - this.newelement - .addClass('ui-state-active'); - if (self.options.wrapperElement) { - this.list.parent().appendTo('body'); - } else { - this.list.appendTo('body'); - } - this.list.addClass(self.widgetBaseClass + '-open') - .attr('aria-hidden', false) - .find('li:not(.'+ self.widgetBaseClass +'-group):eq('+ this._selectedIndex() +') a')[0].focus(); - if(this.options.style == "dropdown"){ this.newelement.removeClass('ui-corner-all').addClass('ui-corner-top'); } - this._refreshPosition(); - this._trigger("open", event, this._uiHash()); - } - }, - close: function(event, retainFocus){ - if(this.newelement.is('.ui-state-active')){ - this.newelement - .removeClass('ui-state-active'); - this.list - .attr('aria-hidden', true) - .removeClass(this.widgetBaseClass+'-open'); - if(this.options.style == "dropdown"){ this.newelement.removeClass('ui-corner-top').addClass('ui-corner-all'); } - if(retainFocus){this.newelement.focus();} - this._trigger("close", event, this._uiHash()); - } - }, - change: function(event) { - this.element.trigger('change'); - this._trigger("change", event, this._uiHash()); - }, - select: function(event) { - this._trigger("select", event, this._uiHash()); - }, - _closeOthers: function(event){ - $('.'+ this.widgetBaseClass +'.ui-state-active').not(this.newelement).each(function(){ - $(this).data('selectelement').selectmenu('close',event); - }); - $('.'+ this.widgetBaseClass +'.ui-state-hover').trigger('mouseout'); - }, - _toggle: function(event,retainFocus){ - if(this.list.is('.'+ this.widgetBaseClass +'-open')){ this.close(event,retainFocus); } - else { this.open(event); } - }, - _formatText: function(text){ - return this.options.format ? this.options.format(text) : text; - }, - _selectedIndex: function(){ - return this.element[0].selectedIndex; - }, - _selectedOptionLi: function(){ - return this._optionLis.eq(this._selectedIndex()); - }, - _focusedOptionLi: function(){ - return this.list.find('.'+ this.widgetBaseClass +'-item-focus'); - }, - _moveSelection: function(amt){ - var currIndex = parseInt(this._selectedOptionLi().data('index'), 10); - var newIndex = currIndex + amt; - return this._optionLis.eq(newIndex).trigger('mouseup'); - }, - _moveFocus: function(amt){ - if(!isNaN(amt)){ - var currIndex = parseInt(this._focusedOptionLi().data('index') || 0, 10); - var newIndex = currIndex + amt; - } - else { var newIndex = parseInt(this._optionLis.filter(amt).data('index'), 10); } - - if(newIndex < 0){ newIndex = 0; } - if(newIndex > this._optionLis.size()-1){ - newIndex = this._optionLis.size()-1; - } - var activeID = this.widgetBaseClass + '-item-' + Math.round(Math.random() * 1000); - - this._focusedOptionLi().find('a:eq(0)').attr('id',''); - this._optionLis.eq(newIndex).find('a:eq(0)').attr('id',activeID).focus(); - this.list.attr('aria-activedescendant', activeID); - }, - _scrollPage: function(direction){ - var numPerPage = Math.floor(this.list.outerHeight() / this.list.find('li:first').outerHeight()); - numPerPage = (direction == 'up') ? -numPerPage : numPerPage; - this._moveFocus(numPerPage); - }, - _setOption: function(key, value) { - this.options[key] = value; - if (key == 'disabled') { - this.close(); - this.element - .add(this.newelement) - .add(this.list) - [value ? 'addClass' : 'removeClass']( - this.widgetBaseClass + '-disabled' + ' ' + - this.namespace + '-state-disabled') - .attr("aria-disabled", value); - } - }, - index: function(newValue) { - if (arguments.length) { - this.element[0].selectedIndex = newValue; - this._refreshValue(); - } else { - return this._selectedIndex(); - } - }, - value: function(newValue) { - if (arguments.length) { - // FIXME test for number is a kind of legacy support, could be removed at any time (Dez. 2010) - if (typeof newValue == "number") { - this.index(newValue); - } else if (typeof newValue == "string") { - this.element[0].value = newValue; - this._refreshValue(); - } - } else { - return this.element[0].value; - } - }, - _refreshValue: function() { - var activeClass = (this.options.style == "popup") ? " ui-state-active" : ""; - var activeID = this.widgetBaseClass + '-item-' + Math.round(Math.random() * 1000); - //deselect previous - this.list - .find('.'+ this.widgetBaseClass +'-item-selected') - .removeClass(this.widgetBaseClass + "-item-selected" + activeClass) - .find('a') - .attr('aria-selected', 'false') - .attr('id', ''); - //select new - this._selectedOptionLi() - .addClass(this.widgetBaseClass + "-item-selected"+activeClass) - .find('a') - .attr('aria-selected', 'true') - .attr('id', activeID); - - //toggle any class brought in from option - var currentOptionClasses = this.newelement.data('optionClasses') ? this.newelement.data('optionClasses') : ""; - var newOptionClasses = this._selectedOptionLi().data('optionClasses') ? this._selectedOptionLi().data('optionClasses') : ""; - this.newelement - .removeClass(currentOptionClasses) - .data('optionClasses', newOptionClasses) - .addClass( newOptionClasses ) - .find('.'+this.widgetBaseClass+'-status') - .html( - this._selectedOptionLi() - .find('a:eq(0)') - .html() - ); - - this.list.attr('aria-activedescendant', activeID); - }, - _refreshPosition: function(){ - var o = this.options; - // if its a native pop-up we need to calculate the position of the selected li - if (o.style == "popup" && !o.positionOptions.offset) { - var selected = this.list.find('li:not(.ui-selectmenu-group):eq('+this._selectedIndex()+')'); - // var _offset = "0 -" + (selected.outerHeight() + selected.offset().top - this.list.offset().top); - var _offset = "0 -" + (selected.outerHeight() + selected.offset().top - this.list.offset().top); - } - this.list - .css({ - zIndex: this.element.zIndex() - }) - .position({ - // set options for position plugin - of: o.positionOptions.of || this.newelement, - my: o.positionOptions.my, - at: o.positionOptions.at, - offset: o.positionOptions.offset || _offset - }); - } -}); -})(jQuery); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/Jeditable/jquery.jeditable.js b/src/Umbraco.Web.UI/umbraco_client/Jeditable/jquery.jeditable.js deleted file mode 100644 index 17c3029a0a..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/Jeditable/jquery.jeditable.js +++ /dev/null @@ -1,543 +0,0 @@ -/* -* Jeditable - jQuery in place edit plugin -* -* Copyright (c) 2006-2009 Mika Tuupola, Dylan Verheul -* -* Licensed under the MIT license: -* http://www.opensource.org/licenses/mit-license.php -* -* Project home: -* http://www.appelsiini.net/projects/jeditable -* -* Based on editable by Dylan Verheul : -* http://www.dyve.net/jquery/?editable -* -*/ - -/** -* Version 1.7.1 -* -* ** means there is basic unit tests for this parameter. -* -* @name Jeditable -* @type jQuery -* @param String target (POST) URL or function to send edited content to ** -* @param Hash options additional options -* @param String options[method] method to use to send edited content (POST or PUT) ** -* @param Function options[callback] Function to run after submitting edited content ** -* @param String options[name] POST parameter name of edited content -* @param String options[id] POST parameter name of edited div id -* @param Hash options[submitdata] Extra parameters to send when submitting edited content. -* @param String options[type] text, textarea or select (or any 3rd party input type) ** -* @param Integer options[rows] number of rows if using textarea ** -* @param Integer options[cols] number of columns if using textarea ** -* @param Mixed options[height] 'auto', 'none' or height in pixels ** -* @param Mixed options[width] 'auto', 'none' or width in pixels ** -* @param String options[loadurl] URL to fetch input content before editing ** -* @param String options[loadtype] Request type for load url. Should be GET or POST. -* @param String options[loadtext] Text to display while loading external content. -* @param Mixed options[loaddata] Extra parameters to pass when fetching content before editing. -* @param Mixed options[data] Or content given as paramameter. String or function.** -* @param String options[indicator] indicator html to show when saving -* @param String options[tooltip] optional tooltip text via title attribute ** -* @param String options[event] jQuery event such as 'click' of 'dblclick' ** -* @param String options[submit] submit button value, empty means no button ** -* @param String options[cancel] cancel button value, empty means no button ** -* @param String options[cssclass] CSS class to apply to input form. 'inherit' to copy from parent. ** -* @param String options[style] Style to apply to input form 'inherit' to copy from parent. ** -* @param String options[select] true or false, when true text is highlighted ?? -* @param String options[placeholder] Placeholder text or html to insert when element is empty. ** -* @param String options[onblur] 'cancel', 'submit', 'ignore' or function ?? -* -* @param Function options[onsubmit] function(settings, original) { ... } called before submit -* @param Function options[onreset] function(settings, original) { ... } called before reset -* @param Function options[onerror] function(settings, original, xhr) { ... } called on error -* -* @param Hash options[ajaxoptions] jQuery Ajax options. See docs.jquery.com. -* -*/ - -(function ($) { - - $.fn.editable = function (target, options) { - - if ('disable' == target) { - $(this).data('disabled.editable', true); - return; - } - if ('enable' == target) { - $(this).data('disabled.editable', false); - return; - } - if ('destroy' == target) { - $(this) - .unbind($(this).data('event.editable')) - .removeData('disabled.editable') - .removeData('event.editable'); - return; - } - - var settings = $.extend({}, $.fn.editable.defaults, { target: target }, options); - - /* setup some functions */ - var plugin = $.editable.types[settings.type].plugin || function () { }; - var submit = $.editable.types[settings.type].submit || function () { }; - var buttons = $.editable.types[settings.type].buttons - || $.editable.types['defaults'].buttons; - var content = $.editable.types[settings.type].content - || $.editable.types['defaults'].content; - var element = $.editable.types[settings.type].element - || $.editable.types['defaults'].element; - var reset = $.editable.types[settings.type].reset - || $.editable.types['defaults'].reset; - var callback = settings.callback || function () { }; - var onedit = settings.onedit || function () { }; - var onsubmit = settings.onsubmit || function () { }; - var onreset = settings.onreset || function () { }; - var onerror = settings.onerror || reset; - - /* show tooltip */ - if (settings.tooltip) { - $(this).attr('title', settings.tooltip); - } - - settings.autowidth = 'auto' == settings.width; - settings.autoheight = 'auto' == settings.height; - - return this.each(function () { - - /* save this to self because this changes when scope changes */ - var self = this; - - /* inlined block elements lose their width and height after first edit */ - /* save them for later use as workaround */ - var savedwidth = $(self).width(); - var savedheight = $(self).height(); - - /* save so it can be later used by $.editable('destroy') */ - $(this).data('event.editable', settings.event); - - /* if element is empty add something clickable (if requested) */ - if (!$.trim($(this).html())) { - $(this).html(settings.placeholder); - } - - $(this).bind(settings.event, function (e) { - - /* abort if disabled for this element */ - if (true === $(this).data('disabled.editable')) { - return; - } - - /* prevent throwing an exeption if edit field is clicked again */ - if (self.editing) { - return; - } - - /* abort if onedit hook returns false */ - if (false === onedit.apply(this, [settings, self])) { - return; - } - - /* prevent default action and bubbling */ - e.preventDefault(); - e.stopPropagation(); - - /* remove tooltip */ - if (settings.tooltip) { - $(self).removeAttr('title'); - } - - /* figure out how wide and tall we are, saved width and height */ - /* are workaround for http://dev.jquery.com/ticket/2190 */ - if (0 == $(self).width()) { - //$(self).css('visibility', 'hidden'); - settings.width = savedwidth; - settings.height = savedheight; - } else { - if (settings.width != 'none') { - settings.width = - settings.autowidth ? $(self).width() : settings.width; - } - if (settings.height != 'none') { - settings.height = - settings.autoheight ? $(self).height() : settings.height; - } - } - //$(this).css('visibility', ''); - - /* remove placeholder text, replace is here because of IE */ - if ($(this).html().toLowerCase().replace(/(;|")/g, '') == - settings.placeholder.toLowerCase().replace(/(;|")/g, '')) { - $(this).html(''); - } - - self.editing = true; - self.revert = $(self).html(); - $(self).html(''); - - /* create the form object */ - var form = $('
      '); - - /* apply css or style or both */ - if (settings.cssclass) { - if ('inherit' == settings.cssclass) { - form.attr('class', $(self).attr('class')); - } else { - form.attr('class', settings.cssclass); - } - } - - if (settings.style) { - if ('inherit' == settings.style) { - form.attr('style', $(self).attr('style')); - /* IE needs the second line or display wont be inherited */ - form.css('display', $(self).css('display')); - } else { - form.attr('style', settings.style); - } - } - - /* add main input element to form and store it in input */ - var input = element.apply(form, [settings, self]); - - /* set input content via POST, GET, given data or existing value */ - var input_content; - - if (settings.loadurl) { - var t = setTimeout(function () { - input.disabled = true; - content.apply(form, [settings.loadtext, settings, self]); - }, 100); - - var loaddata = {}; - loaddata[settings.id] = self.id; - if ($.isFunction(settings.loaddata)) { - $.extend(loaddata, settings.loaddata.apply(self, [self.revert, settings])); - } else { - $.extend(loaddata, settings.loaddata); - } - $.ajax({ - type: settings.loadtype, - url: settings.loadurl, - data: loaddata, - async: false, - success: function (result) { - window.clearTimeout(t); - input_content = result; - input.disabled = false; - } - }); - } else if (settings.data) { - input_content = settings.data; - if ($.isFunction(settings.data)) { - input_content = settings.data.apply(self, [self.revert, settings]); - } - } else { - input_content = self.revert; - } - content.apply(form, [input_content, settings, self]); - - input.attr('name', settings.name); - - /* add buttons to the form */ - buttons.apply(form, [settings, self]); - - /* add created form to self */ - $(self).append(form); - - /* attach 3rd party plugin if requested */ - plugin.apply(form, [settings, self]); - - /* focus to first visible form element */ - $(':input:visible:enabled:first', form).focus(); - - /* highlight input contents when requested */ - if (settings.select) { - input.select(); - } - - /* discard changes if pressing esc */ - input.keydown(function (e) { - if (e.keyCode == 27) { - e.preventDefault(); - //self.reset(); - reset.apply(form, [settings, self]); - } - }); - - /* discard, submit or nothing with changes when clicking outside */ - /* do nothing is usable when navigating with tab */ - var t; - if ('cancel' == settings.onblur) { - input.blur(function (e) { - /* prevent canceling if submit was clicked */ - t = setTimeout(function () { - reset.apply(form, [settings, self]); - }, 500); - }); - } else if ('submit' == settings.onblur) { - input.blur(function (e) { - /* prevent double submit if submit was clicked */ - t = setTimeout(function () { - form.submit(); - }, 200); - }); - } else if ($.isFunction(settings.onblur)) { - input.blur(function (e) { - settings.onblur.apply(self, [input.val(), settings]); - }); - } else { - input.blur(function (e) { - /* TODO: maybe something here */ - }); - } - - form.submit(function (e) { - - if (t) { - clearTimeout(t); - } - - /* do no submit */ - e.preventDefault(); - - /* call before submit hook. */ - /* if it returns false abort submitting */ - if (false !== onsubmit.apply(form, [settings, self])) { - /* custom inputs call before submit hook. */ - /* if it returns false abort submitting */ - if (false !== submit.apply(form, [settings, self])) { - - /* check if given target is function */ - if ($.isFunction(settings.target)) { - var str = settings.target.apply(self, [input.val(), settings]); - $(self).html(str); - self.editing = false; - callback.apply(self, [self.innerHTML, settings]); - /* TODO: this is not dry */ - if (!$.trim($(self).html())) { - $(self).html(settings.placeholder); - } - } else { - /* add edited content and id of edited element to POST */ - var submitdata = {}; - submitdata[settings.name] = input.val(); - submitdata[settings.id] = self.id; - /* add extra data to be POST:ed */ - if ($.isFunction(settings.submitdata)) { - $.extend(submitdata, settings.submitdata.apply(self, [self.revert, settings])); - } else { - $.extend(submitdata, settings.submitdata); - } - - /* quick and dirty PUT support */ - if ('PUT' == settings.method) { - submitdata['_method'] = 'put'; - } - - /* show the saving indicator */ - $(self).html(settings.indicator); - - /* defaults for ajaxoptions */ - var ajaxoptions = { - type: 'POST', - data: submitdata, - dataType: 'html', - url: settings.target, - success: function (result, status) { - if (ajaxoptions.dataType == 'html') { - $(self).html(result); - } - self.editing = false; - callback.apply(self, [result, settings]); - if (!$.trim($(self).html())) { - $(self).html(settings.placeholder); - } - }, - error: function (xhr, status, error) { - onerror.apply(form, [settings, self, xhr]); - } - }; - - /* override with what is given in settings.ajaxoptions */ - $.extend(ajaxoptions, settings.ajaxoptions); - $.ajax(ajaxoptions); - - } - } - } - - /* show tooltip again */ - $(self).attr('title', settings.tooltip); - - return false; - }); - }); - - /* privileged methods */ - this.reset = function (form) { - /* prevent calling reset twice when blurring */ - if (this.editing) { - /* before reset hook, if it returns false abort reseting */ - if (false !== onreset.apply(form, [settings, self])) { - $(self).html(self.revert); - self.editing = false; - if (!$.trim($(self).html())) { - $(self).html(settings.placeholder); - } - /* show tooltip again */ - if (settings.tooltip) { - $(self).attr('title', settings.tooltip); - } - } - } - }; - }); - - }; - - - $.editable = { - types: { - defaults: { - element: function (settings, original) { - var input = $(''); - $(this).append(input); - return (input); - }, - content: function (string, settings, original) { - $(':input:first', this).val(string); - }, - reset: function (settings, original) { - original.reset(this); - }, - buttons: function (settings, original) { - var form = this; - if (settings.submit) { - /* if given html string use that */ - if (settings.submit.match(/>$/)) { - var submit = $(settings.submit).click(function () { - if (submit.attr("type") != "submit") { - form.submit(); - } - }); - /* otherwise use button with given string as text */ - } else { - var submit = $('
    - -
    -
    - {#fullpage_dlg.appearance_textprops} - - - - - - - - - - - - - - - - -
    - -
    - -
    - - - - - -
     
    -
    -
    - -
    - {#fullpage_dlg.appearance_bgprops} - - - - - - - - - - -
    - - - - - -
     
    -
    - - - - - -
     
    -
    -
    - -
    - {#fullpage_dlg.appearance_marginprops} - - - - - - - - - - - - - - -
    -
    - -
    - {#fullpage_dlg.appearance_linkprops} - - - - - - - - - - - - - - - - - -
    - - - - - -
    -
    - - - - - -
     
    -
    - - - - - -
     
    -
      
    -
    - -
    - {#fullpage_dlg.appearance_style} - - - - - - - - - - -
    - - - - -
     
    -
    -
    -
    - -
    - - -
    - - - diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/js/fullpage.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/js/fullpage.js deleted file mode 100644 index 3f672ad3ba..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/js/fullpage.js +++ /dev/null @@ -1,232 +0,0 @@ -/** - * fullpage.js - * - * Copyright 2009, Moxiecode Systems AB - * Released under LGPL License. - * - * License: http://tinymce.moxiecode.com/license - * Contributing: http://tinymce.moxiecode.com/contributing - */ - -(function() { - tinyMCEPopup.requireLangPack(); - - var defaultDocTypes = - 'XHTML 1.0 Transitional=,' + - 'XHTML 1.0 Frameset=,' + - 'XHTML 1.0 Strict=,' + - 'XHTML 1.1=,' + - 'HTML 4.01 Transitional=,' + - 'HTML 4.01 Strict=,' + - 'HTML 4.01 Frameset='; - - var defaultEncodings = - 'Western european (iso-8859-1)=iso-8859-1,' + - 'Central European (iso-8859-2)=iso-8859-2,' + - 'Unicode (UTF-8)=utf-8,' + - 'Chinese traditional (Big5)=big5,' + - 'Cyrillic (iso-8859-5)=iso-8859-5,' + - 'Japanese (iso-2022-jp)=iso-2022-jp,' + - 'Greek (iso-8859-7)=iso-8859-7,' + - 'Korean (iso-2022-kr)=iso-2022-kr,' + - 'ASCII (us-ascii)=us-ascii'; - - var defaultFontNames = 'Arial=arial,helvetica,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,times new roman,times,serif;Tahoma=tahoma,arial,helvetica,sans-serif;Times New Roman=times new roman,times,serif;Verdana=verdana,arial,helvetica,sans-serif;Impact=impact;WingDings=wingdings'; - var defaultFontSizes = '10px,11px,12px,13px,14px,15px,16px'; - - function setVal(id, value) { - var elm = document.getElementById(id); - - if (elm) { - value = value || ''; - - if (elm.nodeName == "SELECT") - selectByValue(document.forms[0], id, value); - else if (elm.type == "checkbox") - elm.checked = !!value; - else - elm.value = value; - } - }; - - function getVal(id) { - var elm = document.getElementById(id); - - if (elm.nodeName == "SELECT") - return elm.options[elm.selectedIndex].value; - - if (elm.type == "checkbox") - return elm.checked; - - return elm.value; - }; - - window.FullPageDialog = { - changedStyle : function() { - var val, styles = tinyMCEPopup.editor.dom.parseStyle(getVal('style')); - - setVal('fontface', styles['font-face']); - setVal('fontsize', styles['font-size']); - setVal('textcolor', styles['color']); - - if (val = styles['background-image']) - setVal('bgimage', val.replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1")); - else - setVal('bgimage', ''); - - setVal('bgcolor', styles['background-color']); - - // Reset margin form elements - setVal('topmargin', ''); - setVal('rightmargin', ''); - setVal('bottommargin', ''); - setVal('leftmargin', ''); - - // Expand margin - if (val = styles['margin']) { - val = val.split(' '); - styles['margin-top'] = val[0] || ''; - styles['margin-right'] = val[1] || val[0] || ''; - styles['margin-bottom'] = val[2] || val[0] || ''; - styles['margin-left'] = val[3] || val[0] || ''; - } - - if (val = styles['margin-top']) - setVal('topmargin', val.replace(/px/, '')); - - if (val = styles['margin-right']) - setVal('rightmargin', val.replace(/px/, '')); - - if (val = styles['margin-bottom']) - setVal('bottommargin', val.replace(/px/, '')); - - if (val = styles['margin-left']) - setVal('leftmargin', val.replace(/px/, '')); - - updateColor('bgcolor_pick', 'bgcolor'); - updateColor('textcolor_pick', 'textcolor'); - }, - - changedStyleProp : function() { - var val, dom = tinyMCEPopup.editor.dom, styles = dom.parseStyle(getVal('style')); - - styles['font-face'] = getVal('fontface'); - styles['font-size'] = getVal('fontsize'); - styles['color'] = getVal('textcolor'); - styles['background-color'] = getVal('bgcolor'); - - if (val = getVal('bgimage')) - styles['background-image'] = "url('" + val + "')"; - else - styles['background-image'] = ''; - - delete styles['margin']; - - if (val = getVal('topmargin')) - styles['margin-top'] = val + "px"; - else - styles['margin-top'] = ''; - - if (val = getVal('rightmargin')) - styles['margin-right'] = val + "px"; - else - styles['margin-right'] = ''; - - if (val = getVal('bottommargin')) - styles['margin-bottom'] = val + "px"; - else - styles['margin-bottom'] = ''; - - if (val = getVal('leftmargin')) - styles['margin-left'] = val + "px"; - else - styles['margin-left'] = ''; - - // Serialize, parse and reserialize this will compress redundant styles - setVal('style', dom.serializeStyle(dom.parseStyle(dom.serializeStyle(styles)))); - this.changedStyle(); - }, - - update : function() { - var data = {}; - - tinymce.each(tinyMCEPopup.dom.select('select,input,textarea'), function(node) { - data[node.id] = getVal(node.id); - }); - - tinyMCEPopup.editor.plugins.fullpage._dataToHtml(data); - tinyMCEPopup.close(); - } - }; - - function init() { - var form = document.forms[0], i, item, list, editor = tinyMCEPopup.editor; - - // Setup doctype select box - list = editor.getParam("fullpage_doctypes", defaultDocTypes).split(','); - for (i = 0; i < list.length; i++) { - item = list[i].split('='); - - if (item.length > 1) - addSelectValue(form, 'doctype', item[0], item[1]); - } - - // Setup fonts select box - list = editor.getParam("fullpage_fonts", defaultFontNames).split(';'); - for (i = 0; i < list.length; i++) { - item = list[i].split('='); - - if (item.length > 1) - addSelectValue(form, 'fontface', item[0], item[1]); - } - - // Setup fontsize select box - list = editor.getParam("fullpage_fontsizes", defaultFontSizes).split(','); - for (i = 0; i < list.length; i++) - addSelectValue(form, 'fontsize', list[i], list[i]); - - // Setup encodings select box - list = editor.getParam("fullpage_encodings", defaultEncodings).split(','); - for (i = 0; i < list.length; i++) { - item = list[i].split('='); - - if (item.length > 1) - addSelectValue(form, 'docencoding', item[0], item[1]); - } - - // Setup color pickers - document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor'); - document.getElementById('link_color_pickcontainer').innerHTML = getColorPickerHTML('link_color_pick','link_color'); - document.getElementById('visited_color_pickcontainer').innerHTML = getColorPickerHTML('visited_color_pick','visited_color'); - document.getElementById('active_color_pickcontainer').innerHTML = getColorPickerHTML('active_color_pick','active_color'); - document.getElementById('textcolor_pickcontainer').innerHTML = getColorPickerHTML('textcolor_pick','textcolor'); - document.getElementById('stylesheet_browsercontainer').innerHTML = getBrowserHTML('stylesheetbrowser','stylesheet','file','fullpage'); - document.getElementById('bgimage_pickcontainer').innerHTML = getBrowserHTML('bgimage_browser','bgimage','image','fullpage'); - - // Resize some elements - if (isVisible('stylesheetbrowser')) - document.getElementById('stylesheet').style.width = '220px'; - - if (isVisible('link_href_browser')) - document.getElementById('element_link_href').style.width = '230px'; - - if (isVisible('bgimage_browser')) - document.getElementById('bgimage').style.width = '210px'; - - // Update form - tinymce.each(tinyMCEPopup.getWindowArg('data'), function(value, key) { - setVal(key, value); - }); - - FullPageDialog.changedStyle(); - - // Update colors - updateColor('textcolor_pick', 'textcolor'); - updateColor('bgcolor_pick', 'bgcolor'); - updateColor('visited_color_pick', 'visited_color'); - updateColor('active_color_pick', 'active_color'); - updateColor('link_color_pick', 'link_color'); - }; - - tinyMCEPopup.onInit.add(init); -})(); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/da_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/da_dlg.js deleted file mode 100644 index 79fd65897f..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/da_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('da.fullpage_dlg',{title:"Dokumentegenskaber","meta_tab":"Generelt","appearance_tab":"Udseende","advanced_tab":"Advanceret","meta_props":"Meta-information",langprops:"Sprog og kodning","meta_title":"Titel","meta_keywords":"N\u00f8gleord","meta_description":"Beskrivelse","meta_robots":"Robots",doctypes:"Doctype",langcode:"Sprogkode",langdir:"Sprogretning",ltr:"Venstre mod h\u00f8jre",rtl:"H\u00f8jre md venstre","xml_pi":"XML declaration",encoding:"Tegns\u00e6t","appearance_bgprops":"Baggrundsegenskaber","appearance_marginprops":"Body margins","appearance_linkprops":"Link farver","appearance_textprops":"Tekstegenskaber",bgcolor:"Baggrundsfarve",bgimage:"Baggrundsbillede","left_margin":"Venstre margin","right_margin":"H\u00f8jre margin","top_margin":"Topmargin","bottom_margin":"Bundmargin","text_color":"Tekstfarve","font_size":"Skriftst\u00f8rrelse","font_face":"Skrifttype","link_color":"Linkfarve","hover_color":"Farve ved aktivering","visited_color":"Farve efter museklik","active_color":"Farve ved museklik",textcolor:"Farve",fontsize:"Skriftst\u00f8rrelse",fontface:"Skrifttype","meta_index_follow":"Indeks og f\u00f8lg links","meta_index_nofollow":"Indeks og f\u00f8lg ikke links","meta_noindex_follow":"Ingen indeks, men f\u00f8lg links","meta_noindex_nofollow":"Ingen indeks og f\u00f8lg ikke links","appearance_style":"Stylesheet og style-egenskaber",stylesheet:"Stylesheet",style:"Style",author:"Forfatter",copyright:"Copyright",add:"Tilf\u00f8j nyt element",remove:"Slet valgte element",moveup:"Flyt valgte element op",movedown:"Flyt valgte element ned","head_elements":"Hovedelement",info:"Information","add_title":"Titelelement","add_meta":"Meta-element","add_script":"Script-element","add_style":"Style-element","add_link":"Link-element","add_base":"Base-element","add_comment":"Kommentar-node","title_element":"Titelelement","script_element":"Script-element","style_element":"Style-element","base_element":"Base-element","link_element":"Link-element","meta_element":"Meta-element","comment_element":"Kommentar",src:"Src",language:"Sprog",href:"Href",target:"Destination",type:"Type",charset:"Tegns\u00e6t",defer:"Defer",media:"Media",properties:"Egenskaber",name:"Navn",value:"V\u00e6rdi",content:"Indhold",rel:"Rel",rev:"Rev",hreflang:"Href lang","general_props":"Generelt","advanced_props":"Advanceret"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/de_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/de_dlg.js deleted file mode 100644 index ecdff9ed60..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/de_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('de.fullpage_dlg',{title:"Dokument-Eigenschaften","meta_tab":"Allgemein","appearance_tab":"Aussehen","advanced_tab":"Erweitert","meta_props":"Meta-Information",langprops:"Sprache und Codierung","meta_title":"Titel","meta_keywords":"Keywords","meta_description":"Beschreibung","meta_robots":"Robots",doctypes:"DocType",langcode:"Sprachcode",langdir:"Sprachrichtung",ltr:"Links nach Rechts",rtl:"Rechts nach Links","xml_pi":"XML Deklaration",encoding:"Zeichencodierung","appearance_bgprops":"Hintergrund-Eigenschaften","appearance_marginprops":"Abst\u00e4nde des Body","appearance_linkprops":"Linkfarben","appearance_textprops":"Text-Eigenschaften",bgcolor:"Hintergrundfarbe",bgimage:"Hintergrundbild","left_margin":"Linker Abstand","right_margin":"Rechter Abstand","top_margin":"Oberer Abstand","bottom_margin":"Unterer Abstand","text_color":"Textfarbe","font_size":"Schriftgr\u00f6\u00dfe","font_face":"Schriftart","link_color":"Linkfarbe","hover_color":"Hover-Farbe","visited_color":"Visited-Farbe","active_color":"Active-Farbe",textcolor:"Farbe",fontsize:"Schriftgr\u00f6\u00dfe",fontface:"Schriftart","meta_index_follow":"Indizieren und den Links folgen","meta_index_nofollow":"Indizieren, aber den Links nicht folgen","meta_noindex_follow":"Nicht indizieren, aber den Links folgen","meta_noindex_nofollow":"Nicht indizieren und auch nicht den Links folgen","appearance_style":"CSS-Stylesheet und Stileigenschaften",stylesheet:"CSS-Stylesheet",style:"CSS-Stil",author:"Autor",copyright:"Copyright",add:"Neues Element hinzuf\u00fcgen",remove:"Ausgew\u00e4hltes Element entfernen",moveup:"Ausgew\u00e4hltes Element nach oben bewegen",movedown:"Ausgew\u00e4hltes Element nach unten bewegen","head_elements":"\u00dcberschriftenelemente",info:"Information","add_title":"Titel-Element","add_meta":"Meta-Element","add_script":"Script-Element","add_style":"Style-Element","add_link":"Link-Element","add_base":"Base-Element","add_comment":"HTML-Kommentar","title_element":"Titel-Element","script_element":"Script-Element","style_element":"Style-Element","base_element":"Base-Element","link_element":"Link-Element","meta_element":"Meta_Element","comment_element":"Kommentar",src:"Src",language:"Sprache",href:"Href",target:"Ziel",type:"Typ",charset:"Zeichensatz",defer:"Defer",media:"Media",properties:"Eigenschaften",name:"Name",value:"Wert",content:"Inhalt",rel:"Rel",rev:"Rev",hreflang:"Href lang","general_props":"Allgemein","advanced_props":"Erweitert"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/en_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/en_dlg.js deleted file mode 100644 index 516edc74fd..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/en_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('en.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"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/en_us_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/en_us_dlg.js deleted file mode 100644 index 1104f6b6d3..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/en_us_dlg.js +++ /dev/null @@ -1 +0,0 @@ -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"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/fi_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/fi_dlg.js deleted file mode 100644 index 3f1fb393ff..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/fi_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('fi.fullpage_dlg',{title:"Tiedoston asetukset","meta_tab":"Yleinen","appearance_tab":"Ulkoasu","advanced_tab":"Edistynyt","meta_props":"Metatiedot",langprops:"Kieli ja koodaus","meta_title":"Otsikko","meta_keywords":"Avainsanat","meta_description":"Kuvaus","meta_robots":"Robotit",doctypes:"Dokumenttityypit",langcode:"Kielen koodi",langdir:"Kielen suunta",ltr:"Vasemmalta oikealle",rtl:"Oikealta vasemmalle","xml_pi":"XML-ilmoitus",encoding:"Tekstin koodaus","appearance_bgprops":"Taustan asetukset","appearance_marginprops":"Body-marginaalit","appearance_linkprops":"Linkkien v\u00e4rit","appearance_textprops":"Tekstin asetukset",bgcolor:"Taustan v\u00e4ri",bgimage:"Taustakuva","left_margin":"Vasen marginaali","right_margin":"Oikea marginaali","top_margin":"Yl\u00e4marginaali","bottom_margin":"Alamarginaali","text_color":"Tekstin v\u00e4ri","font_size":"Fonttikoko","font_face":"Fontti","link_color":"Linkin v\u00e4ri","hover_color":"Hover-v\u00e4ri","visited_color":"Vierailtu v\u00e4ri","active_color":"Aktiivinen v\u00e4ri",textcolor:"V\u00e4ri",fontsize:"Fonttikoko",fontface:"Fontti","meta_index_follow":"Indeksoi ja seuraa linkkej\u00e4","meta_index_nofollow":"Indeksoi, mutta \u00e4l\u00e4 seuraa linkkej\u00e4","meta_noindex_follow":"\u00c4l\u00e4 indeksoi, mutta seuraa linkkej\u00e4.","meta_noindex_nofollow":"\u00c4l\u00e4 indeksoi, \u00e4l\u00e4k\u00e4 seuraa linkkej\u00e4","appearance_style":"Tyylitiedosto ja tyylin asetukset",stylesheet:"Tyylitiedosto",style:"Tyyli",author:"Kirjoittaja",copyright:"Copyright",add:"Lis\u00e4\u00e4 uusi elementti",remove:"Poista valittu elementti",moveup:"Siirr\u00e4 valittua elementti\u00e4 yl\u00f6s",movedown:"Siirr\u00e4 valittua elementti\u00e4 alas","head_elements":"P\u00e4\u00e4elementti",info:"Informaatio","add_title":"Otsikkoelementti","add_meta":"Meta-elementti","add_script":"Script-elementti","add_style":"Tyylielementti","add_link":"Linkkielementti","add_base":"Base-elementti","add_comment":"Yleinen elementti","title_element":"Otsikkoelementti","script_element":"Script-elementti","style_element":"Tyylielementti","base_element":"Base-elementti","link_element":"Linkkielementti","meta_element":"Meta-elementti","comment_element":"Kommentti",src:"L\u00e4hde",language:"Kieli",href:"Href",target:"Kohde",type:"Tyyppi",charset:"Kirjasintyyppi",defer:"Mukautuminen",media:"Media",properties:"Asetukset",name:"Nimi",value:"Arvo",content:"Sis\u00e4lt\u00f6",rel:"Rel",rev:"Rev",hreflang:"Href-kieli","general_props":"Yleinen","advanced_props":"Edistynyt"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/fr_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/fr_dlg.js deleted file mode 100644 index c2ddc65db0..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/fr_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('fr.fullpage_dlg',{title:"Propri\u00e9t\u00e9s du document","meta_tab":"G\u00e9n\u00e9ral","appearance_tab":"Apparence","advanced_tab":"Avanc\u00e9","meta_props":"Metadonn\u00e9es",langprops:"Langue et encodage","meta_title":"Titre","meta_keywords":"Mots-cl\u00e9s","meta_description":"Description","meta_robots":"Robots",doctypes:"Doctype",langcode:"Code de la langue",langdir:"Sens de lecture",ltr:"De gauche \u00e0 droite",rtl:"De droite \u00e0 gauche","xml_pi":"D\u00e9claration XML",encoding:"Encodage des caract\u00e8res","appearance_bgprops":"Propri\u00e9t\u00e9s du fond","appearance_marginprops":"Marge du corps de la page","appearance_linkprops":"Couleurs des liens","appearance_textprops":"Propri\u00e9t\u00e9s du texte",bgcolor:"Couleur de fond",bgimage:"Image de fond","left_margin":"Marge de gauche","right_margin":"Marge de droite","top_margin":"Marge du haut","bottom_margin":"Marge du bas","text_color":"Couleur du texte","font_size":"Taille de la police","font_face":"Nom de la police","link_color":"Couleur des liens","hover_color":"Couleur au survol","visited_color":"Couleur des liens visit\u00e9s","active_color":"Couleur du lien actif",textcolor:"Couleur",fontsize:"Taille de police",fontface:"Nom de la police","meta_index_follow":"Indexer et suivre les liens","meta_index_nofollow":"Indexer et ne pas suivre les liens","meta_noindex_follow":"Ne pas indexer et suivre les liens","meta_noindex_nofollow":"Ne pas indexer et ne pas suivre les liens","appearance_style":"Propri\u00e9t\u00e9s de la feuille de style et du style",stylesheet:"Feuille de style",style:"Style",author:"Auteur",copyright:"Copyright",add:"Ajouter un nouvel \u00e9l\u00e9ment",remove:"Retirer l\'\u00e9l\u00e9ment s\u00e9lectionn\u00e9",moveup:"D\u00e9placer l\'\u00e9l\u00e9ment s\u00e9lectionn\u00e9 vers le haut",movedown:"D\u00e9placer l\'\u00e9l\u00e9ment s\u00e9lectionn\u00e9 vers le bas","head_elements":"\u00c9l\u00e9ments d\'en-t\u00eate",info:"Information","add_title":"\u00c9l\u00e9ment de titre","add_meta":"\u00c9l\u00e9ment Meta","add_script":"\u00c9l\u00e9ment de script","add_style":"\u00c9l\u00e9ment de style","add_link":"\u00c9l\u00e9ment de lien","add_base":"\u00c9l\u00e9ment de base","add_comment":"Commentaire","title_element":"\u00c9l\u00e9ment de titre","script_element":"\u00c9l\u00e9ment de script","style_element":"\u00c9l\u00e9ment de style","base_element":"\u00c9l\u00e9ment de base","link_element":"\u00c9l\u00e9ment de lien","meta_element":"\u00c9l\u00e9ment Meta","comment_element":"Commentaire",src:"Source",language:"Langue",href:"Href",target:"Cible",type:"Type",charset:"Charset",defer:"D\u00e9f\u00e9rer",media:"M\u00e9dia",properties:"Propri\u00e9t\u00e9s",name:"Nom",value:"Valeur",content:"Contenu",rel:"Rel",rev:"Rev",hreflang:"langue Href","general_props":"G\u00e9n\u00e9ral","advanced_props":"Avanc\u00e9"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/he_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/he_dlg.js deleted file mode 100644 index 69faae39a2..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/he_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('he.fullpage_dlg',{title:"\u05de\u05d0\u05e4\u05d9\u05d9\u05e0\u05d9 \u05de\u05e1\u05de\u05da","meta_tab":"\u05db\u05dc\u05dc\u05d9","appearance_tab":"\u05de\u05e8\u05d0\u05d4","advanced_tab":"\u05de\u05ea\u05e7\u05d3\u05dd","meta_props":"\u05ea\u05d2\u05d9 \u05de\u05d8\u05d4",langprops:"\u05e9\u05e4\u05d4 \u05d5\u05e7\u05d9\u05d3\u05d5\u05d3","meta_title":"\u05db\u05d5\u05ea\u05e8\u05ea","meta_keywords":"\u05de\u05d9\u05dc\u05d5\u05ea \u05de\u05e4\u05ea\u05d7","meta_description":"\u05ea\u05d9\u05d0\u05d5\u05e8","meta_robots":"\u05e8\u05d5\u05d1\u05d5\u05d8\u05d9\u05dd",doctypes:"Doctype",langcode:"\u05e7\u05d5\u05d3 \u05d4\u05e9\u05e4\u05d4",langdir:"\u05db\u05d9\u05d5\u05d5\u05df \u05d4\u05e9\u05e4\u05d4",ltr:"\u05de\u05e9\u05de\u05d0\u05dc \u05dc\u05d9\u05de\u05d9\u05df",rtl:"\u05de\u05d9\u05de\u05d9\u05df \u05dc\u05e9\u05de\u05d0\u05dc","xml_pi":"XML declaration",encoding:"\u05e7\u05d9\u05d3\u05d5\u05d3 \u05ea\u05d5\u05d5\u05d9\u05dd","appearance_bgprops":"\u05de\u05d0\u05e4\u05d9\u05d9\u05e0\u05d9 \u05e8\u05e7\u05e2","appearance_marginprops":"Body margins","appearance_linkprops":"\u05e6\u05d1\u05e2 \u05e7\u05d9\u05e9\u05d5\u05e8\u05d9\u05dd","appearance_textprops":"Text properties",bgcolor:"\u05e6\u05d1\u05e2 \u05e8\u05e7\u05e2",bgimage:"\u05ea\u05de\u05d5\u05e0\u05ea \u05e8\u05e7\u05e2","left_margin":"\u05e9\u05d5\u05dc\u05d9\u05d9\u05dd \u05e9\u05de\u05d0\u05dc\u05d9\u05d9\u05dd","right_margin":"\u05e9\u05d5\u05dc\u05d9\u05d9\u05dd \u05d9\u05de\u05e0\u05d9\u05d9\u05dd","top_margin":"\u05e9\u05d5\u05dc\u05d9\u05d9\u05dd \u05e2\u05dc\u05d9\u05d5\u05e0\u05d9\u05dd","bottom_margin":"\u05e9\u05d5\u05dc\u05d9\u05d9\u05dd \u05ea\u05d7\u05ea\u05d9\u05d9\u05dd","text_color":"\u05e6\u05d1\u05e2 \u05d8\u05e7\u05e1\u05d8","font_size":"\u05d2\u05d5\u05d3\u05dc \u05d2\u05d5\u05e4\u05df","font_face":"\u05e1\u05d5\u05d2 \u05d2\u05d5\u05e4\u05df","link_color":"\u05e6\u05d1\u05e2 \u05e7\u05d9\u05e9\u05d5\u05e8","hover_color":"\u05e6\u05d1\u05e2 \u05e7\u05d9\u05e9\u05d5\u05e8 \u05d1\u05de\u05e2\u05d1\u05e8 \u05e2\u05db\u05d1\u05e8","visited_color":"\u05e6\u05d1\u05e2 \u05e7\u05d9\u05e9\u05d5\u05e8 \u05e9\u05e0\u05e6\u05e4\u05d4","active_color":"\u05e6\u05d1\u05e2 \u05e7\u05d9\u05e9\u05d5\u05e8 \u05e4\u05e2\u05d9\u05dc",textcolor:"\u05e6\u05d1\u05e2",fontsize:"\u05d2\u05d5\u05d3\u05dc \u05d2\u05d5\u05e4\u05df",fontface:"\u05d2\u05d5\u05e4\u05df","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:"\u05e1\u05d2\u05e0\u05d5\u05df \u05e2\u05d9\u05e6\u05d5\u05d1",style:"\u05e2\u05d9\u05e6\u05d5\u05d1",author:"\u05db\u05d5\u05ea\u05d1",copyright:"\u05d6\u05db\u05d5\u05d9\u05d5\u05ea \u05d9\u05d5\u05e6\u05e8\u05d9\u05dd",add:"\u05d4\u05d5\u05e1\u05e3 \u05d0\u05dc\u05de\u05e0\u05d8 \u05d7\u05d3\u05e9",remove:"Remove selected element",moveup:"Move selected element up",movedown:"Move selected element down","head_elements":"Head elements",info:"\u05de\u05d9\u05d3\u05e2","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":"\u05d0\u05dc\u05de\u05e0\u05d8 \u05e2\u05d9\u05e6\u05d5\u05d1","base_element":"\u05d0\u05dc\u05de\u05e0\u05d8 \u05d1\u05e1\u05d9\u05e1","link_element":"\u05d0\u05dc\u05de\u05e0\u05d8 \u05e7\u05d9\u05e9\u05d5\u05e8","meta_element":"Meta element","comment_element":"\u05ea\u05d2\u05d5\u05d1\u05d4",src:"\u05db\u05ea\u05d5\u05d1\u05ea \u05de\u05e7\u05d5\u05e8",language:"\u05e9\u05e4\u05d4",href:"HREF",target:"\u05d9\u05e2\u05d3",type:"\u05e1\u05d5\u05d2",charset:"\u05e7\u05d9\u05d3\u05d5\u05d3",defer:"Defer",media:"\u05de\u05d3\u05d9\u05d4",properties:"\u05de\u05d0\u05e4\u05d9\u05d9\u05e0\u05d9\u05dd",name:"\u05e9\u05dd",value:"\u05e2\u05e8\u05da",content:"\u05ea\u05d5\u05db\u05df",rel:"Rel",rev:"Rev",hreflang:"Href lang","general_props":"\u05db\u05dc\u05dc\u05d9","advanced_props":"\u05de\u05ea\u05e7\u05d3\u05dd"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/it_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/it_dlg.js deleted file mode 100644 index d5445e8327..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/it_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('it.fullpage_dlg',{title:"Propriet\u00e0 Documento","meta_tab":"Generale","appearance_tab":"Aspetto","advanced_tab":"Avanzate","meta_props":"Informazioni Metatag",langprops:"Lingua e codifica","meta_title":"Titolo","meta_keywords":"Parole chiave","meta_description":"Descrizione","meta_robots":"Robots",doctypes:"Doctype",langcode:"Codice lingua",langdir:"Direzione testo",ltr:"Sinistra verso destra",rtl:"Destra verso sinistra","xml_pi":"Dichiarazione XML",encoding:"Codifica carattere","appearance_bgprops":"Propriet\u00e0 sfondo","appearance_marginprops":"Margini body","appearance_linkprops":"Colori collegamenti","appearance_textprops":"Propriet\u00e0 testo",bgcolor:"Colore sfondo",bgimage:"Immagine sfondo","left_margin":"Margine sinistro","right_margin":"Margine destro","top_margin":"Margine superiore","bottom_margin":"Margine inferiore","text_color":"Colore testo","font_size":"Dimensione carattere","font_face":"Tipo carattere","link_color":"Colore collegamento","hover_color":"Colore \\\'Hover\\\'","visited_color":"Colore \\\'Visited\\\'","active_color":"Colore \\\'Active\\\'",textcolor:"Colore",fontsize:"Dimensione carattere",fontface:"Famiglia carattere","meta_index_follow":"Indicizzare e seguire collegamenti","meta_index_nofollow":"Indicizzare e non segure collegamenti","meta_noindex_follow":"Non indicizzare ma seguire collegamenti","meta_noindex_nofollow":"Non indicizzare e non seguire collegamenti","appearance_style":"Propriet\u00e0 stili e fogli di stile",stylesheet:"Fogli di stile",style:"Stile",author:"Autore",copyright:"Copyright",add:"Aggiungi nuovo elemento",remove:"Rimuovi elemento selezionato",moveup:"Sposta elemento selezionato in alto",movedown:"Sposta elemento selezionato in basso","head_elements":"Elementi Head",info:"Informazioni","add_title":"Elemento Titolo","add_meta":"Elemento Meta","add_script":"Elemento Script","add_style":"Elemento Style","add_link":"Elemento Link","add_base":"Elemento Base","add_comment":"Nodo Commento","title_element":"Elemento Titolo","script_element":"Elemento Script","style_element":"Elemento Style","base_element":"Elemento Base","link_element":"Elemento Link","meta_element":"Elemento Meta","comment_element":"Commento",src:"Sorgente",language:"Linguaggio",href:"Href",target:"Target",type:"Tipo",charset:"Set caratteri",defer:"Defer",media:"Media",properties:"Propriet\u00e0",name:"Nome",value:"Valore",content:"Contenuto",rel:"Rel",rev:"Rev",hreflang:"Href lang","general_props":"Generale","advanced_props":"Avanzate"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/ja_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/ja_dlg.js deleted file mode 100644 index 6564363051..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/ja_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('ja.fullpage_dlg',{title:"\u30da\u30fc\u30b8\u306e\u5c5e\u6027","meta_tab":"\u4e00\u822c","appearance_tab":"\u8868\u793a","advanced_tab":"\u9ad8\u5ea6\u306a\u8a2d\u5b9a","meta_props":"\u30e1\u30bf\u60c5\u5831",langprops:"\u8a00\u8a9e\u3068\u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0","meta_title":"\u30bf\u30a4\u30c8\u30eb","meta_keywords":"\u30ad\u30fc\u30ef\u30fc\u30c9","meta_description":"\u8aac\u660e","meta_robots":"\u691c\u7d22\u30ed\u30dc\u30c3\u30c8\u306e\u5236\u5fa1",doctypes:"\u6587\u66f8\u578b",langcode:"\u8a00\u8a9e\u30b3\u30fc\u30c9",langdir:"\u6587\u7ae0\u306e\u65b9\u5411",ltr:"\u5de6\u304b\u3089\u53f3",rtl:"\u53f3\u304b\u3089\u5de6","xml_pi":"XML\u5ba3\u8a00",encoding:"\u6587\u5b57\u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0","appearance_bgprops":"\u80cc\u666f\u306e\u5c5e\u6027","appearance_marginprops":"Body\u306e\u4f59\u767d","appearance_linkprops":"\u30ea\u30f3\u30af\u306e\u8272","appearance_textprops":"\u6587\u5b57\u306e\u5c5e\u6027",bgcolor:"\u80cc\u666f\u306e\u8272",bgimage:"\u80cc\u666f\u306e\u753b\u50cf","left_margin":"\u5de6\u306e\u4f59\u767d","right_margin":"\u53f3\u306e\u4f59\u767d","top_margin":"\u4e0a\u306e\u4f59\u767d","bottom_margin":"\u4e0b\u306e\u4f59\u767d","text_color":"\u6587\u5b57\u306e\u8272","font_size":"\u6587\u5b57\u306e\u5927\u304d\u3055","font_face":"\u30d5\u30a9\u30f3\u30c8","link_color":"\u30ea\u30f3\u30af\u306e\u8272","hover_color":"\u30de\u30a6\u30b9\u30ab\u30fc\u30bd\u30eb\u304c\u3042\u308b\u30ea\u30f3\u30af\u306e\u8272(hover)","visited_color":"\u65e2\u306b\u8aad\u3093\u3060\u30ea\u30f3\u30af\u306e\u8272(visited)","active_color":"\u30af\u30ea\u30c3\u30af\u3057\u305f\u77ac\u9593\u306e\u30ea\u30f3\u30af\u306e\u8272(active)",textcolor:"\u8272",fontsize:"\u6587\u5b57\u306e\u5927\u304d\u3055",fontface:"\u30d5\u30a9\u30f3\u30c8","meta_index_follow":"\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306b\u4f7f\u7528\u3057\u3066\u30ea\u30f3\u30af\u3092\u305f\u3069\u308b","meta_index_nofollow":"\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306b\u4f7f\u7528\u3057\u3066\u30ea\u30f3\u30af\u306f\u305f\u3069\u3089\u306a\u3044","meta_noindex_follow":"\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306b\u4f7f\u7528\u3057\u306a\u3044\u304c\u30ea\u30f3\u30af\u3092\u305f\u3069\u308b","meta_noindex_nofollow":"\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306b\u4f7f\u7528\u3057\u306a\u3044\u3067\u30ea\u30f3\u30af\u3082\u305f\u3069\u3089\u306a\u3044","appearance_style":"\u30b9\u30bf\u30a4\u30eb\u30b7\u30fc\u30c8\u3068\u30b9\u30bf\u30a4\u30eb\u306e\u5c5e\u6027",stylesheet:"\u30b9\u30bf\u30a4\u30eb\u30b7\u30fc\u30c8",style:"\u30b9\u30bf\u30a4\u30eb",author:"\u4f5c\u6210\u8005",copyright:"\u8457\u4f5c\u6a29",add:"\u65b0\u3057\u304f\u8981\u7d20\u3092\u8ffd\u52a0",remove:"\u9078\u629e\u3057\u305f\u8981\u7d20\u3092\u524a\u9664",moveup:"\u9078\u629e\u3057\u305f\u8981\u7d20\u3092\u4e0a\u306b\u79fb\u52d5",movedown:"\u9078\u629e\u3057\u305f\u8981\u7d20\u3092\u4e0b\u306b\u79fb\u52d5","head_elements":"Head\u8981\u7d20",info:"\u60c5\u5831","add_title":"Title\u8981\u7d20","add_meta":"Meta\u8981\u7d20","add_script":"Script\u8981\u7d20","add_style":"Style\u8981\u7d20","add_link":"Link\u8981\u7d20","add_base":"Base\u8981\u7d20","add_comment":"Comment\u30ce\u30fc\u30c9","title_element":"Title\u8981\u7d20","script_element":"Script\u8981\u7d20","style_element":"Style\u8981\u7d20","base_element":"Base\u8981\u7d20","link_element":"Link\u8981\u7d20","meta_element":"Meta\u8981\u7d20","comment_element":"\u30b3\u30e1\u30f3\u30c8",src:"src",language:"\u8a00\u8a9e",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\u306e\u8a00\u8a9e","general_props":"\u4e00\u822c","advanced_props":"\u8a73\u7d30\u306a\u8a2d\u5b9a"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/nl_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/nl_dlg.js deleted file mode 100644 index 9124146ce7..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/nl_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('nl.fullpage_dlg',{title:"Documenteigenschappen","meta_tab":"Algemeen","appearance_tab":"Weergave","advanced_tab":"Geavanceerd","meta_props":"Meta informatie",langprops:"Taal en codering","meta_title":"Titel","meta_keywords":"Sleutelwoorden","meta_description":"Beschrijving","meta_robots":"Robots",doctypes:"Doctype",langcode:"Taalcode",langdir:"Taalrichting",ltr:"Van links naar rechts",rtl:"Van rechts naar links","xml_pi":"XML toewijzing",encoding:"Karaktercodering","appearance_bgprops":"Achtergrondeigenschappen","appearance_marginprops":"Bodymarge","appearance_linkprops":"Linkkleuren","appearance_textprops":"Teksteigenschappen",bgcolor:"Achtergrondkleur",bgimage:"Achtergrondafbeelding","left_margin":"Linkermarge","right_margin":"Rechtermarge","top_margin":"Bovenmarge","bottom_margin":"Ondermarge","text_color":"Tekstkleur","font_size":"Tekengrootte","font_face":"Lettertype","link_color":"Linkkleur","hover_color":"Hoverkleur","visited_color":"Bezocht kleur","active_color":"Actieve kleur",textcolor:"Kleur",fontsize:"Tekengrootte",fontface:"Lettertype","meta_index_follow":"Links indexeren en volgen","meta_index_nofollow":"Links indexeren maar niet volgen","meta_noindex_follow":"Links volgen maar niet indexeren","meta_noindex_nofollow":"Links niet indexeren en niet volgen","appearance_style":"Stijlblad en stijleigenschappen",stylesheet:"Stijlblad",style:"Stijl",author:"Auteur",copyright:"Copyright",add:"Nieuw element toevoegen",remove:"Geselecteerde elementen verwijderen",moveup:"Geselecteerde elementen omhoog verplaatsen",movedown:"Geselecteerde elementen omlaag verplaatsen","head_elements":"Kopelementen",info:"Informatie","add_title":"Titelelement","add_meta":"Meta-element","add_script":"Scriptelement","add_style":"Stijlelement","add_link":"Linkelement","add_base":"Basiselement","add_comment":"Opmerkingknooppunt","title_element":"Titelelement","script_element":"Scriptelement","style_element":"Stijlelement","base_element":"Basiselement","link_element":"Linkelement","meta_element":"Meta-element","comment_element":"Opmerking",src:"Bron",language:"Taal",href:"HREF",target:"Doel",type:"Type",charset:"Karakterset",defer:"Uitstellen",media:"Media",properties:"Eigenschappen",name:"Naam",value:"Waarde",content:"Inhoud",rel:"Rel",rev:"Rev",hreflang:"HREF taal","general_props":"Algemeen","advanced_props":"Geavanceerd"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/no_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/no_dlg.js deleted file mode 100644 index f84cba2777..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/no_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('no.fullpage_dlg',{title:"Dokumentegenskaper","meta_tab":"Generelt","appearance_tab":"Utseende","advanced_tab":"Avansert","meta_props":"Metainformasjon",langprops:"Spr\u00e5k og koding","meta_title":"Tittel","meta_keywords":"N\u00f8kkelord","meta_description":"Beskrivelse","meta_robots":"Roboter",doctypes:"Dokumenttype",langcode:"Spr\u00e5kkode",langdir:"Skriftretning",ltr:"Venstre mot h\u00f8yre",rtl:"H\u00f8yre mot venstre","xml_pi":"XML deklarering",encoding:"Tegnkoding","appearance_bgprops":"Bakgrunnsegenskaper","appearance_marginprops":"Body marg","appearance_linkprops":"Lenkefarger","appearance_textprops":"Tekstegenskaper",bgcolor:"Bakgrunnsfarge",bgimage:"Bakgrunnsbilde","left_margin":"Venstre marg","right_margin":"H\u00f8yre marg","top_margin":"Toppmarg","bottom_margin":"Bunnmarg","text_color":"Tekstfarge","font_size":"Skriftst\u00f8rrelse","font_face":"Skrifttype","link_color":"Lenkefarge","hover_color":"Pekefarge","visited_color":"Farge for bes\u00f8kt lenke","active_color":"Farge for aktiv lenke",textcolor:"Farge",fontsize:"Skriftst\u00f8rrelse",fontface:"Skriftfamile","meta_index_follow":"Indekser og f\u00f8lg lenkene","meta_index_nofollow":"Indekser og ikke f\u00f8lg lenkene","meta_noindex_follow":"Ikke indekser, men f\u00f8lg lenkene","meta_noindex_nofollow":"Ikke indekser, og ikke f\u00f8lg lenkene","appearance_style":"Stilark og stilegenskaper",stylesheet:"Stilark",style:"Stil",author:"Forfatter",copyright:"Copyright",add:"Legg til nytt element",remove:"Fjern valgt element",moveup:"Flytt markert element opp",movedown:"Flytt markert element ned","head_elements":"Overskriftselement",info:"Informasjon","add_title":"Tittelelement","add_meta":"Metaelement","add_script":"Skriptelement","add_style":"Stilelement","add_link":"Lenkeelement","add_base":"Basiselement","add_comment":"Kommentar","title_element":"Tittelelement","script_element":"Skriptelement","style_element":"Stilelement","base_element":"Basiselement","link_element":"Lenkeelement","meta_element":"Metaelement","comment_element":"Kommentar",src:"Kilde",language:"Spr\u00e5k",href:"Href",target:"M\u00e5l",type:"Type",charset:"Tegnsett",defer:"Henstille",media:"Objekt",properties:"Egenskaper",name:"Navn",value:"Verdi",content:"Innhold",rel:"Rel",rev:"Rev",hreflang:"Href spr\u00e5k","general_props":"Generelt","advanced_props":"Avansert"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/pl_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/pl_dlg.js deleted file mode 100644 index b940052643..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/pl_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('pl.fullpage_dlg',{title:"W\u0142a\u015bciwo\u015bci dokumentu","meta_tab":"Og\u00f3lne","appearance_tab":"Wygl\u0105d","advanced_tab":"Zaawansowane","meta_props":"Meta informacje",langprops:"J\u0119zyk i kodowanie","meta_title":"Tytu\u0142","meta_keywords":"S\u0142owa kluczowe","meta_description":"Opis","meta_robots":"Roboty",doctypes:"Typ dokumentu",langcode:"Oznaczenie kodowe j\u0119zyka",langdir:"Kierunek czytania tekstu",ltr:"Kierunek z lewej do prawej",rtl:"Kierunek z prawej do lewej","xml_pi":"Deklaracja XML",encoding:"Kodowanie znak\u00f3w","appearance_bgprops":"W\u0142a\u015bciwo\u015bci t\u0142a","appearance_marginprops":"Marginesy strony","appearance_linkprops":"Kolor odno\u015bnik\u00f3w","appearance_textprops":"W\u0142a\u015bciwo\u015bci tekstu",bgcolor:"Kolor t\u0142a",bgimage:"Obrazek t\u0142a","left_margin":"Lewy margines","right_margin":"Prawy margines","top_margin":"G\u00f3rny margines","bottom_margin":"Dolny margines","text_color":"Kolor tekstu","font_size":"Rozmiar czcionki","font_face":"Czcionka","link_color":"Kolor odno\u015bnika","hover_color":"Kolor po najechaniu myszk\u0105","visited_color":"Kolor odwiedzonych link\u00f3w","active_color":"Kolor aktywnych link\u00f3w",textcolor:"Kolor",fontsize:"Rozmiar czcionki",fontface:"Rodzaj czcionki","meta_index_follow":"Indeksuj i pod\u0105\u017caj za linkami","meta_index_nofollow":"Indeksuj i nie pod\u0105\u017caj za odno\u015bnikami","meta_noindex_follow":"Nie indeksuj i pod\u0105\u017caj za odno\u015bnikami","meta_noindex_nofollow":"Nie indeksuj i nie pod\u0105\u017caj za odno\u015bnikami","appearance_style":"Arkusze i w\u0142a\u015bciwo\u015bci styl\u00f3w",stylesheet:"Arkusz styl\u00f3w",style:"Styl",author:"Autor",copyright:"Prawa autorskie",add:"Dodaj nowy element",remove:"Usu\u0144 wybrany element",moveup:"Przesu\u0144 wybrane element do g\u00f3ry",movedown:"Przesu\u0144 wybrane element w d\u00f3\u0142","head_elements":"Elementy nag\u0142\u00f3wka",info:"Informacja","add_title":"Tytu\u0142","add_meta":"Meta tag","add_script":"Skrypt","add_style":"Styl","add_link":"Odno\u015bnik","add_base":"Baza","add_comment":"Komentarz","title_element":"Tytu\u0142","script_element":"Skrypt","style_element":"Styl","base_element":"Baza","link_element":"Odno\u015bnik","meta_element":"Meta tag","comment_element":"Komentarz",src:"\u0179r\u00f3d\u0142o",language:"J\u0119zyk",href:"Odno\u015bnik",target:"Cel",type:"Typ",charset:"Kodowanie",defer:"Defer",media:"Media",properties:"W\u0142a\u015bciwo\u015bci",name:"Nazwa",value:"Warto\u015b\u0107",content:"Zawarto\u015b\u0107",rel:"Rel",rev:"Rev",hreflang:"J\u0119zyk odno\u015bnika","general_props":"G\u0142\u00f3wne","advanced_props":"Zaawansowane"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/pt_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/pt_dlg.js deleted file mode 100644 index 749f86859f..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/pt_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('pt.fullpage_dlg',{title:"Propriedades do documento","meta_tab":"Geral","appearance_tab":"Apar\u00eancia","advanced_tab":"Avan\u00e7ado","meta_props":"Meta-informa\u00e7\u00e3o",langprops:"Idioma e codifica\u00e7\u00e3o","meta_title":"T\u00edtulo","meta_keywords":"Palavras-chave","meta_description":"Descri\u00e7\u00e3o","meta_robots":"Robots",doctypes:"Doctype",langcode:"C\u00f3digo do idioma",langdir:"Dire\u00e7\u00e3o do texto",ltr:"Esquerda para direita",rtl:"Direita para esquerda","xml_pi":"Declara\u00e7\u00e3o XML",encoding:"Codifica\u00e7\u00e3o de caracteres","appearance_bgprops":"Propriedades do plano de fundo","appearance_marginprops":"Margens (BODY)","appearance_linkprops":"Cores dos links","appearance_textprops":"Propriedades de texto",bgcolor:"Cor de fundo",bgimage:"Imagem de fundo","left_margin":"Margem esquerda","right_margin":"Margem direita","top_margin":"Margem topo","bottom_margin":"Margem base","text_color":"Cor do texto","font_size":"Tamanho fonte","font_face":"Fonte","link_color":"Cores dos links","hover_color":"Hover","visited_color":"Visitado","active_color":"Ativo",textcolor:"Cor",fontsize:"Tamanho fonte",fontface:"Fonte","meta_index_follow":"Indexar e seguir os hyperlinks","meta_index_nofollow":"Indexar e n\u00e3o seguir os hyperlinks","meta_noindex_follow":"Seguir hyperlinks, mas n\u00e3o indexar","meta_noindex_nofollow":"N\u00e3o indexar / n\u00e3o seguir hyperlinks.","appearance_style":"Propriedades de folhas de estilo",stylesheet:"Folha de estilo",style:"Estilo",author:"Autor",copyright:"Copyright",add:"Acrescentar novo elemento",remove:"Remover elemento selecionado",moveup:"Subir elemento selecionado",movedown:"Descer elemento selecionado","head_elements":"Elementos HEAD",info:"Informa\u00e7\u00e3o","add_title":"TITLE","add_meta":"META","add_script":"SCRIPT","add_style":"STYLE","add_link":"LINK","add_base":"BASE","add_comment":"Coment\u00e1rio","title_element":"TITLE","script_element":"SCRIPT","style_element":"STYLE","base_element":"BASE","link_element":"LINK","meta_element":"META","comment_element":"Coment\u00e1rio",src:"src",language:"Idioma",href:"href",target:"Alvo",type:"Tipo",charset:"Charset",defer:"Adiar",media:"Media",properties:"Propriedades",name:"Nome",value:"Valor",content:"Conte\u00fado",rel:"rel",rev:"rev",hreflang:"href lang","general_props":"Geral","advanced_props":"Avan\u00e7ado"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/ru_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/ru_dlg.js deleted file mode 100644 index 67d32e6019..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/ru_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('ru.fullpage_dlg',{title:"\u0421\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430","meta_tab":"\u041e\u0431\u0449\u0435\u0435","appearance_tab":"\u0412\u0438\u0434","advanced_tab":"\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e","meta_props":"\u0426\u0435\u043b\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438",langprops:"\u042f\u0437\u044b\u043a \u0438 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f","meta_title":"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a","meta_keywords":"\u041a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0441\u043b\u043e\u0432\u0430","meta_description":"\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435","meta_robots":"\u0420\u0430\u0431\u043e\u0442\u044b",doctypes:"\u0422\u0438\u043f",langcode:"\u041a\u043e\u0434 \u044f\u0437\u044b\u043a\u0430",langdir:"\u041d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0442\u0435\u043a\u0441\u0442\u0430",ltr:"\u0421\u043b\u0435\u0432\u0430 \u043d\u0430\u043f\u0440\u0430\u0432\u043e",rtl:"\u0421\u043f\u0440\u0430\u0432\u0430 \u043d\u0430\u043b\u0435\u0432\u043e","xml_pi":"\u041e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435 XML",encoding:"\u041a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0430","appearance_bgprops":"\u0421\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0444\u043e\u043d\u0430","appearance_marginprops":"\u041e\u0442\u0441\u0442\u0443\u043f\u044b","appearance_linkprops":"\u0426\u0432\u0435\u0442 \u0441\u0441\u044b\u043b\u043e\u043a","appearance_textprops":"\u0421\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0442\u0435\u043a\u0441\u0442\u0430",bgcolor:"\u0426\u0432\u0435\u0442 \u0444\u043e\u043d\u0430",bgimage:"\u0424\u043e\u043d\u043e\u0432\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435","left_margin":"\u041e\u0442\u0441\u0442\u0443\u043f \u0441\u043b\u0435\u0432\u0430","right_margin":"\u041e\u0442\u0441\u0442\u0443\u043f \u0441\u043f\u0440\u0430\u0432\u0430","top_margin":"\u041e\u0442\u0441\u0442\u0443\u043f \u0441\u0432\u0435\u0440\u0445\u0443","bottom_margin":"\u041e\u0442\u0441\u0442\u0443\u043f \u0441\u043d\u0438\u0437\u0443","text_color":"\u0426\u0432\u0435\u0442 \u0442\u0435\u043a\u0441\u0442\u0430","font_size":"\u0420\u0430\u0437\u043c\u0435\u0440 \u0448\u0440\u0438\u0444\u0442\u0430","font_face":"\u0428\u0440\u0438\u0444\u0442","link_color":"\u0426\u0432\u0435\u0442 \u0441\u0441\u044b\u043b\u043a\u0438","hover_color":"\u0426\u0432\u0435\u0442 \u0441\u0441\u044b\u043b\u043a\u0438 \u043f\u0440\u0438 \u043d\u0430\u0432\u0435\u0434\u0435\u043d\u0438\u0438","visited_color":"\u0426\u0432\u0435\u0442 \u043d\u0430\u0436\u0430\u0442\u043e\u0439 \u0441\u0441\u044b\u043b\u043a\u0438","active_color":"\u0426\u0432\u0435\u0442 \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u0441\u0441\u044b\u043b\u043a\u0438",textcolor:"\u0426\u0432\u0435\u0442",fontsize:"\u0420\u0430\u0437\u043c\u0435\u0440 \u0448\u0440\u0438\u0444\u0442\u0430",fontface:"\u0421\u0435\u043c\u0435\u0439\u0441\u0442\u0432\u043e \u0448\u0440\u0438\u0444\u0442\u043e\u0432","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":"\u041b\u0438\u0441\u0442 \u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0441\u0442\u0438\u043b\u0435\u0439",stylesheet:"\u041b\u0438\u0441\u0442 \u0441\u0442\u0438\u043b\u0435\u0439",style:"\u0421\u0442\u0438\u043b\u044c",author:"\u0410\u0432\u0442\u043e\u0440",copyright:"\u041a\u043e\u043f\u0438\u0440\u0430\u0439\u0442",add:"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442",remove:"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442",moveup:"\u041f\u0435\u0440\u0435\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0432\u0432\u0435\u0440\u0445",movedown:"\u041f\u0435\u0440\u0435\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0432\u043d\u0438\u0437","head_elements":"\u042d\u043b\u0435\u043c\u0435\u043d\u0442 Header",info:"\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f","add_title":"\u042d\u043b\u0435\u043c\u0435\u043d\u0442 Title","add_meta":"\u042d\u043b\u0435\u043c\u0435\u043d\u0442 Meta","add_script":"\u042d\u043b\u0435\u043c\u0435\u043d\u0442 Script","add_style":"\u042d\u043b\u0435\u043c\u0435\u043d\u0442 Style","add_link":"\u042d\u043b\u0435\u043c\u0435\u043d\u0442 Link","add_base":"\u042d\u043b\u0435\u043c\u0435\u043d\u0442 Base","add_comment":"\u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439","title_element":"\u042d\u043b\u0435\u043c\u0435\u043d\u0442 Title","script_element":"\u042d\u043b\u0435\u043c\u0435\u043d\u0442 Script","style_element":"\u042d\u043b\u0435\u043c\u0435\u043d\u0442 Style","base_element":"\u042d\u043b\u0435\u043c\u0435\u043d\u0442 Base","link_element":"\u042d\u043b\u0435\u043c\u0435\u043d\u0442 Link","meta_element":"\u042d\u043b\u0435\u043c\u0435\u043d\u0442 Meta","comment_element":"\u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439",src:"Src",language:"\u042f\u0437\u044b\u043a",href:"\u0441\u0441\u044b\u043b\u043a\u0430",target:"\u0426\u0435\u043b\u044c",type:"Type",charset:"\u041a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0430",defer:"\u041e\u0442\u0441\u0440\u043e\u0447\u043a\u0430",media:"\u041c\u0435\u0434\u0438\u0430",properties:"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b",name:"\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435",value:"\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435",content:"\u0421\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435",rel:"Rel",rev:"Rev",hreflang:"\u042f\u0437\u044b\u043a \u0441\u0441\u044b\u043b\u043a\u0438","general_props":"\u041e\u0431\u0449\u0435\u0435","advanced_props":"\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e"}); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/sv_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/sv_dlg.js deleted file mode 100644 index c141b235ad..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/sv_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('sv.fullpage_dlg',{title:"Dokumentinst\u00e4llningar","meta_tab":"Generella","appearance_tab":"Utseende","advanced_tab":"Avancerat","meta_props":"Metainformation",langprops:"Spr\u00e5k och kodning","meta_title":"Titel","meta_keywords":"Nyckelord","meta_description":"Bekrivning","meta_robots":"Robots",doctypes:"Doctype",langcode:"Spr\u00e5kkod",langdir:"Skriftriktning",ltr:"V\u00e4nster till h\u00f6ger",rtl:"H\u00f6ger till v\u00e4nster","xml_pi":"XML deklaration",encoding:"Teckenkodning","appearance_bgprops":"Bakgrundsinst\u00e4llningar","appearance_marginprops":"Body marginaler","appearance_linkprops":"L\u00e4nkf\u00e4rger","appearance_textprops":"Textinst\u00e4llningar",bgcolor:"Bakgrundsf\u00e4rg",bgimage:"Bakgrundsbild","left_margin":"V\u00e4nstermarginal","right_margin":"H\u00f6germarginal","top_margin":"Toppmarginal","bottom_margin":"Bottenmarginal","text_color":"Textf\u00e4rg","font_size":"Textstorlek","font_face":"Textstil","link_color":"L\u00e4nkf\u00e4rg","hover_color":"Hover f\u00e4rg","visited_color":"Visited f\u00e4rg","active_color":"Active f\u00e4rg",textcolor:"F\u00e4rg",fontsize:"Textstorlek",fontface:"Textstil","meta_index_follow":"Indexera och f\u00f6lj l\u00e4nkar","meta_index_nofollow":"Indexera men f\u00f6lj ej l\u00e4nkar","meta_noindex_follow":"Indexera inte men f\u00f6lj l\u00e4nkar","meta_noindex_nofollow":"Indexera inte och f\u00f6lj ej l\u00e4nkar","appearance_style":"Stilmall och stilegenskaper",stylesheet:"Stilmall",style:"Stil",author:"F\u00f6rfattare",copyright:"Copyright",add:"L\u00e4gg till element",remove:"Radera det markerade elementet",moveup:"Flytta det markerade elementet upp\u00e5t",movedown:"Flytta det markerade elementet ned\u00e5t","head_elements":"Head element",info:"Information","add_title":"Titel-element","add_meta":"Meta-element","add_script":"Script-element","add_style":"Stil-element","add_link":"L\u00e4nk-element","add_base":"Base-element","add_comment":"Kommentarsnod","title_element":"Titel-element","script_element":"Script-element","style_element":"Style-element","base_element":"Base-element","link_element":"Link-element","meta_element":"Meta-element","comment_element":"Comment-element",src:"Src",language:"Spr\u00e5k",href:"Href",target:"M\u00e5l",type:"Typ",charset:"Teckenupps\u00e4ttning",defer:"Defer",media:"Media",properties:"Egenskaper",name:"Name",value:"Value",content:"Inneh\u00e5ll",rel:"Rel",rev:"Rev",hreflang:"Href lang","general_props":"Generellt","advanced_props":"Avancerat"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/zh_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/zh_dlg.js deleted file mode 100644 index de0a74ac5c..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/zh_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('zh-cn.fullpage_dlg',{title:"\u6587\u4ef6\u5c5e\u6027","meta_tab":"\u666e\u901a","appearance_tab":"\u5916\u89c2","advanced_tab":"\u9ad8\u7ea7","meta_props":"Meta\u4fe1\u606f",langprops:"\u8bed\u8a00\u548c\u7f16\u7801","meta_title":"\u6807\u9898","meta_keywords":"Meta \u5173\u952e\u5b57","meta_description":"Meta \u63cf\u8ff0","meta_robots":"\u641c\u7d22\u673a\u5668\u4eba",doctypes:"\u6587\u6863\u7c7b\u578b",langcode:"\u8bed\u8a00\u7f16\u7801",langdir:"\u8bed\u8a00\u6587\u5b57\u65b9\u5411",ltr:"\u4ece\u5de6\u5230\u53f3",rtl:"\u4ece\u53f3\u5230\u5de6","xml_pi":"XML\u7533\u660e",encoding:"\u5b57\u7b26\u7f16\u7801","appearance_bgprops":"\u80cc\u666f\u5c5e\u6027","appearance_marginprops":"\u9875\u8fb9\u8ddd","appearance_linkprops":"\u8d85\u94fe\u63a5\u989c\u8272","appearance_textprops":"\u6587\u672c\u5c5e\u6027",bgcolor:"\u80cc\u666f\u989c\u8272",bgimage:"\u80cc\u666f\u56fe\u7247","left_margin":"\u5de6\u8fb9\u8ddd","right_margin":"\u53f3\u8fb9\u8ddd","top_margin":"\u4e0a\u8fb9\u8ddd","bottom_margin":"\u4e0b\u8fb9\u8ddd","text_color":"\u6587\u672c\u989c\u8272","font_size":"\u5b57\u4f53\u5927\u5c0f","font_face":"\u5b57\u4f53","link_color":"\u8d85\u94fe\u63a5\u989c\u8272","hover_color":"Hover\u989c\u8272","visited_color":"Visited\u989c\u8272","active_color":"Active\u989c\u8272",textcolor:"\u989c\u8272",fontsize:"\u5b57\u4f53\u5927\u5c0f",fontface:"\u5b57\u4f53","meta_index_follow":"\u7d22\u5f15\u5e76\u8fde\u7ed3","meta_index_nofollow":"\u7d22\u5f15\u4f46\u4e0d\u8fde\u7ed3","meta_noindex_follow":"\u4e0d\u7d22\u5f15\u4f46\u8fde\u7ed3","meta_noindex_nofollow":"\u4e0d\u7d22\u5f15\u4e5f\u4e0d\u8fde\u7ed3","appearance_style":"\u6837\u5f0f\u8868\u4e0e\u6837\u5f0f\u5c5e\u6027",stylesheet:"\u6837\u5f0f\u8868",style:"\u6837\u5f0f",author:"\u4f5c\u8005",copyright:"\u7248\u6743\u58f0\u660e",add:"\u6dfb\u52a0\u5143\u7d20",remove:"\u5220\u9664\u9009\u62e9\u5143\u7d20",moveup:"\u4e0a\u79fb\u9009\u62e9\u5143\u7d20",movedown:"\u4e0b\u79fb\u9009\u62e9\u5143\u7d20","head_elements":"Head\u5143\u7d20",info:"\u4fe1\u606f","add_title":"Title\u5143\u7d20","add_meta":"Meta\u5143\u7d20","add_script":"Script\u5143\u7d20","add_style":"Style\u5143\u7d20","add_link":"Link\u5143\u7d20","add_base":"Base\u5143\u7d20","add_comment":"\u6ce8\u91ca","title_element":"Title\u5143\u7d20","script_element":"Script\u5143\u7d20","style_element":"Style\u5143\u7d20","base_element":"Base\u5143\u7d20","link_element":"Link\u5143\u7d20","meta_element":"Meta\u5143\u7d20","comment_element":"\u6ce8\u91ca",src:"\u5730\u5740",language:"\u8bed\u8a00",href:"Href",target:"\u76ee\u6807",type:"\u7c7b\u578b",charset:"\u5b57\u7b26\u96c6",defer:"Defer",media:"\u5a92\u4f53",properties:"\u5c5e\u6027",name:"\u540d\u79f0",value:"\u503c",content:"\u5185\u5bb9",rel:"Rel",rev:"Rev",hreflang:"Href\u8bed\u8a00","general_props":"\u5e38\u89c4","advanced_props":"\u9ad8\u7ea7"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullscreen/editor_plugin.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullscreen/editor_plugin.js deleted file mode 100644 index 1aa8cc443a..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullscreen/editor_plugin.js +++ /dev/null @@ -1 +0,0 @@ -(function(){var b=tinymce.DOM;var a=function(d,f,e){var c=function(g){var i=d.controlManager.get(g);var h=f.controlManager.get(g);if(i&&h){h.displayColor(i.value)}};c("forecolor");c("backcolor");f.setContent(d.getContent({format:"raw"}),{format:"raw"});f.selection.moveToBookmark(e);if(d.plugins.spellchecker&&f.plugins.spellchecker){f.plugins.spellchecker.setLanguage(d.plugins.spellchecker.selectedLang)}};tinymce.create("tinymce.plugins.FullScreenPlugin",{init:function(i,c){var l=this,m={},k=b.doc.documentElement,d,o,h,g,f,e,j;i.addCommand("mceFullScreen",function(){var q,r;if(i.getParam("fullscreen_is_enabled")){if(i.getParam("fullscreen_new_window")){closeFullscreen()}else{b.win.setTimeout(function(){var t=i;var s=tinyMCE.get(t.getParam("fullscreen_editor_id"));s.plugins.fullscreen.saveState(t);tinyMCE.remove(t)},10)}return}if(i.getParam("fullscreen_new_window")){l.fullscreenSettings={bookmark:i.selection.getBookmark()};q=b.win.open(c+"/fullscreen.htm","mceFullScreenPopup","fullscreen=yes,menubar=no,toolbar=no,scrollbars=no,resizable=yes,left=0,top=0,width="+screen.availWidth+",height="+screen.availHeight);try{q.resizeTo(screen.availWidth,screen.availHeight)}catch(p){}}else{o=b.getStyle(b.doc.body,"overflow",1)||"auto";h=b.getStyle(k,"overflow",1);d=b.getViewPort();g=d.x;f=d.y;if(tinymce.isOpera&&o=="visible"){o="auto"}if(tinymce.isIE&&o=="scroll"){o="auto"}if(tinymce.isIE&&(h=="visible"||h=="scroll")){h="auto"}if(o=="0px"){o=""}b.setStyle(b.doc.body,"overflow","hidden");k.style.overflow="hidden";d=b.getViewPort();b.win.scrollTo(0,0);if(tinymce.isIE){d.h-=1}if(tinymce.isIE6||document.compatMode=="BackCompat"){e="absolute;top:"+d.y}else{e="fixed;top:0"}n=b.add(b.doc.body,"div",{id:"mce_fullscreen_container",style:"position:"+e+";left:0;width:"+d.w+"px;height:"+d.h+"px;z-index:200000;"});b.add(n,"div",{id:"mce_fullscreen"});tinymce.each(i.settings,function(s,t){m[t]=s});m.id="mce_fullscreen";m.width=n.clientWidth;m.height=n.clientHeight-15;m.fullscreen_is_enabled=true;m.fullscreen_editor_id=i.id;m.theme_advanced_resizing=false;m.save_onsavecallback=function(){i.setContent(tinyMCE.get(m.id).getContent());i.execCommand("mceSave")};tinymce.each(i.getParam("fullscreen_settings"),function(t,s){m[s]=t});l.fullscreenSettings={bookmark:i.selection.getBookmark(),fullscreen_overflow:o,fullscreen_html_overflow:h,fullscreen_scrollx:g,fullscreen_scrolly:f};if(m.theme_advanced_toolbar_location==="external"){m.theme_advanced_toolbar_location="top"}tinyMCE.oldSettings=tinyMCE.settings;l.fullscreenEditor=new tinymce.Editor("mce_fullscreen",m);l.fullscreenEditor.onInit.add(function(){l.loadState(l.fullscreenEditor)});l.fullscreenEditor.render();l.fullscreenElement=new tinymce.dom.Element("mce_fullscreen_container");l.fullscreenElement.update();l.resizeFunc=tinymce.dom.Event.add(b.win,"resize",function(){var v=tinymce.DOM.getViewPort(),t=l.fullscreenEditor,s,u;s=t.dom.getSize(t.getContainer().getElementsByTagName("table")[0]);u=t.dom.getSize(t.getContainer().getElementsByTagName("iframe")[0]);t.theme.resizeTo(v.w-s.w+u.w,v.h-s.h+u.h)})}});i.addButton("fullscreen",{title:"fullscreen.desc",cmd:"mceFullScreen"});i.onNodeChange.add(function(q,p){p.setActive("fullscreen",q.getParam("fullscreen_is_enabled"))});l.loadState=function(p){if(!(p&&l.fullscreenSettings)){throw"No fullscreen editor to load to"}a(i,p,l.fullscreenSettings.bookmark);p.focus()};l.saveState=function(q){if(!(q&&l.fullscreenSettings)){throw"No fullscreen editor to restore from"}var p=l.fullscreenSettings;a(q,i,q.selection.getBookmark());if(!i.getParam("fullscreen_new_window")){tinymce.dom.Event.remove(b.win,"resize",l.resizeFunc);delete l.resizeFunc;b.remove("mce_fullscreen_container");b.doc.documentElement.style.overflow=p.fullscreen_html_overflow;b.setStyle(b.doc.body,"overflow",p.fullscreen_overflow);b.win.scrollTo(p.fullscreen_scrollx,p.fullscreen_scrolly)}tinyMCE.settings=tinyMCE.oldSettings;delete tinyMCE.oldSettings;delete l.fullscreenEditor;delete l.fullscreenElement;delete l.fullscreenSettings;b.win.setTimeout(function(){i.selection.moveToBookmark(j);i.focus()},10)}},getInfo:function(){return{longname:"Fullscreen",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/fullscreen",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("fullscreen",tinymce.plugins.FullScreenPlugin)})(); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullscreen/editor_plugin_src.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullscreen/editor_plugin_src.js deleted file mode 100644 index bec886f74f..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullscreen/editor_plugin_src.js +++ /dev/null @@ -1,234 +0,0 @@ -/** - * editor_plugin_src.js - * - * Copyright 2009, Moxiecode Systems AB - * Released under LGPL License. - * - * License: http://tinymce.moxiecode.com/license - * Contributing: http://tinymce.moxiecode.com/contributing - */ - -(function() { - var DOM = tinymce.DOM; - - // State Transfer function - var transferState = function(oldEditor, newEditor, bookmark) { - var transferColorButtonState = function(swapme) { - var c = oldEditor.controlManager.get(swapme); - var newC = newEditor.controlManager.get(swapme); - - if (c && newC) { - newC.displayColor(c.value); - } - - }; - - transferColorButtonState('forecolor'); - transferColorButtonState('backcolor'); - newEditor.setContent(oldEditor.getContent({format : 'raw'}), {format : 'raw'}); - newEditor.selection.moveToBookmark(bookmark); - - if (oldEditor.plugins.spellchecker && newEditor.plugins.spellchecker) { - newEditor.plugins.spellchecker.setLanguage(oldEditor.plugins.spellchecker.selectedLang); - } - }; - - tinymce.create('tinymce.plugins.FullScreenPlugin', { - init : function(ed, url) { - var t = this, s = {}, de = DOM.doc.documentElement, vp, fullscreen_overflow, fullscreen_html_overflow, fullscreen_scrollx, fullscreen_scrolly, posCss, bookmark; - - // Register commands - ed.addCommand('mceFullScreen', function() { - var win, oed; - - if (ed.getParam('fullscreen_is_enabled')) { - if (ed.getParam('fullscreen_new_window')) - closeFullscreen(); // Call to close in fullscreen.htm - else { - DOM.win.setTimeout(function() { - var fullscreenEditor = ed; - - // find the editor that opened this one, execute restore function there - var originalEditor = tinyMCE.get(fullscreenEditor.getParam('fullscreen_editor_id')); - originalEditor.plugins.fullscreen.saveState(fullscreenEditor); - - tinyMCE.remove(fullscreenEditor); - }, 10); - } - - return; - } - - if (ed.getParam('fullscreen_new_window')) { - t.fullscreenSettings = { - bookmark: ed.selection.getBookmark() - }; - win = DOM.win.open(url + "/fullscreen.htm", "mceFullScreenPopup", "fullscreen=yes,menubar=no,toolbar=no,scrollbars=no,resizable=yes,left=0,top=0,width=" + screen.availWidth + ",height=" + screen.availHeight); - try { - win.resizeTo(screen.availWidth, screen.availHeight); - } catch (e) { - // Ignore - } - } else { - fullscreen_overflow = DOM.getStyle(DOM.doc.body, 'overflow', 1) || 'auto'; - fullscreen_html_overflow = DOM.getStyle(de, 'overflow', 1); - vp = DOM.getViewPort(); - fullscreen_scrollx = vp.x; - fullscreen_scrolly = vp.y; - - // Fixes an Opera bug where the scrollbars doesn't reappear - if (tinymce.isOpera && fullscreen_overflow == 'visible') - fullscreen_overflow = 'auto'; - - // Fixes an IE bug where horizontal scrollbars would appear - if (tinymce.isIE && fullscreen_overflow == 'scroll') - fullscreen_overflow = 'auto'; - - // Fixes an IE bug where the scrollbars doesn't reappear - if (tinymce.isIE && (fullscreen_html_overflow == 'visible' || fullscreen_html_overflow == 'scroll')) - fullscreen_html_overflow = 'auto'; - - if (fullscreen_overflow == '0px') - fullscreen_overflow = ''; - - DOM.setStyle(DOM.doc.body, 'overflow', 'hidden'); - de.style.overflow = 'hidden'; //Fix for IE6/7 - vp = DOM.getViewPort(); - DOM.win.scrollTo(0, 0); - - if (tinymce.isIE) - vp.h -= 1; - - // Use fixed position if it exists - if (tinymce.isIE6 || document.compatMode == 'BackCompat') - posCss = 'absolute;top:' + vp.y; - else - posCss = 'fixed;top:0'; - - n = DOM.add(DOM.doc.body, 'div', { - id : 'mce_fullscreen_container', - style : 'position:' + posCss + ';left:0;width:' + vp.w + 'px;height:' + vp.h + 'px;z-index:200000;'}); - DOM.add(n, 'div', {id : 'mce_fullscreen'}); - - tinymce.each(ed.settings, function(v, n) { - s[n] = v; - }); - - s.id = 'mce_fullscreen'; - s.width = n.clientWidth; - s.height = n.clientHeight - 15; - s.fullscreen_is_enabled = true; - s.fullscreen_editor_id = ed.id; - s.theme_advanced_resizing = false; - s.save_onsavecallback = function() { - ed.setContent(tinyMCE.get(s.id).getContent()); - ed.execCommand('mceSave'); - }; - - tinymce.each(ed.getParam('fullscreen_settings'), function(v, k) { - s[k] = v; - }); - - t.fullscreenSettings = { - bookmark: ed.selection.getBookmark(), - fullscreen_overflow: fullscreen_overflow, - fullscreen_html_overflow: fullscreen_html_overflow, - fullscreen_scrollx: fullscreen_scrollx, - fullscreen_scrolly: fullscreen_scrolly - }; - - if (s.theme_advanced_toolbar_location === 'external') - s.theme_advanced_toolbar_location = 'top'; - - tinyMCE.oldSettings = tinyMCE.settings; // Store old settings, the Editor constructor overwrites them - t.fullscreenEditor = new tinymce.Editor('mce_fullscreen', s); - t.fullscreenEditor.onInit.add(function() { - t.loadState(t.fullscreenEditor); - }); - - t.fullscreenEditor.render(); - - t.fullscreenElement = new tinymce.dom.Element('mce_fullscreen_container'); - t.fullscreenElement.update(); - //document.body.overflow = 'hidden'; - - t.resizeFunc = tinymce.dom.Event.add(DOM.win, 'resize', function() { - var vp = tinymce.DOM.getViewPort(), fed = t.fullscreenEditor, outerSize, innerSize; - - // Get outer/inner size to get a delta size that can be used to calc the new iframe size - outerSize = fed.dom.getSize(fed.getContainer().getElementsByTagName('table')[0]); - innerSize = fed.dom.getSize(fed.getContainer().getElementsByTagName('iframe')[0]); - - fed.theme.resizeTo(vp.w - outerSize.w + innerSize.w, vp.h - outerSize.h + innerSize.h); - }); - } - }); - - // Register buttons - ed.addButton('fullscreen', {title : 'fullscreen.desc', cmd : 'mceFullScreen'}); - - ed.onNodeChange.add(function(ed, cm) { - cm.setActive('fullscreen', ed.getParam('fullscreen_is_enabled')); - }); - - // fullscreenEditor is a param here because in window mode we don't create it - t.loadState = function(fullscreenEditor) { - if (!(fullscreenEditor && t.fullscreenSettings)) { - throw "No fullscreen editor to load to"; - } - - transferState(ed, fullscreenEditor, t.fullscreenSettings.bookmark); - fullscreenEditor.focus(); - - }; - - // fullscreenEditor is a param here because in window mode we don't create it - t.saveState = function(fullscreenEditor) { - if (!(fullscreenEditor && t.fullscreenSettings)) { - throw "No fullscreen editor to restore from"; - } - var settings = t.fullscreenSettings; - - transferState(fullscreenEditor, ed, fullscreenEditor.selection.getBookmark()); - - // cleanup only required if window mode isn't used - if (!ed.getParam('fullscreen_new_window')) { - tinymce.dom.Event.remove(DOM.win, 'resize', t.resizeFunc); - delete t.resizeFunc; - - DOM.remove('mce_fullscreen_container'); - - DOM.doc.documentElement.style.overflow = settings.fullscreen_html_overflow; - DOM.setStyle(DOM.doc.body, 'overflow', settings.fullscreen_overflow); - DOM.win.scrollTo(settings.fullscreen_scrollx, settings.fullscreen_scrolly); - } - tinyMCE.settings = tinyMCE.oldSettings; // Restore old settings - - // clear variables - delete tinyMCE.oldSettings; - delete t.fullscreenEditor; - delete t.fullscreenElement; - delete t.fullscreenSettings; - - // allow the fullscreen editor to be removed before restoring focus and selection - DOM.win.setTimeout(function() { - ed.selection.moveToBookmark(bookmark); - ed.focus(); - }, 10); - }; - }, - - getInfo : function() { - return { - longname : 'Fullscreen', - author : 'Moxiecode Systems AB', - authorurl : 'http://tinymce.moxiecode.com', - infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/fullscreen', - version : tinymce.majorVersion + "." + tinymce.minorVersion - }; - } - }); - - // Register plugin - tinymce.PluginManager.add('fullscreen', tinymce.plugins.FullScreenPlugin); -})(); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullscreen/fullscreen.htm b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullscreen/fullscreen.htm deleted file mode 100644 index baf028b79f..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullscreen/fullscreen.htm +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - -
    - -
    - - - - - diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/iespell/editor_plugin.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/iespell/editor_plugin.js deleted file mode 100644 index e9cba106c6..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/iespell/editor_plugin.js +++ /dev/null @@ -1 +0,0 @@ -(function(){tinymce.create("tinymce.plugins.IESpell",{init:function(a,b){var c=this,d;if(!tinymce.isIE){return}c.editor=a;a.addCommand("mceIESpell",function(){try{d=new ActiveXObject("ieSpell.ieSpellExtension");d.CheckDocumentNode(a.getDoc().documentElement)}catch(f){if(f.number==-2146827859){a.windowManager.confirm(a.getLang("iespell.download"),function(e){if(e){window.open("http://www.iespell.com/download.php","ieSpellDownload","")}})}else{a.windowManager.alert("Error Loading ieSpell: Exception "+f.number)}}});a.addButton("iespell",{title:"iespell.iespell_desc",cmd:"mceIESpell"})},getInfo:function(){return{longname:"IESpell (IE Only)",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/iespell",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("iespell",tinymce.plugins.IESpell)})(); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/iespell/editor_plugin_src.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/iespell/editor_plugin_src.js deleted file mode 100644 index 1b2bb98460..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/iespell/editor_plugin_src.js +++ /dev/null @@ -1,54 +0,0 @@ -/** - * editor_plugin_src.js - * - * Copyright 2009, Moxiecode Systems AB - * Released under LGPL License. - * - * License: http://tinymce.moxiecode.com/license - * Contributing: http://tinymce.moxiecode.com/contributing - */ - -(function() { - tinymce.create('tinymce.plugins.IESpell', { - init : function(ed, url) { - var t = this, sp; - - if (!tinymce.isIE) - return; - - t.editor = ed; - - // Register commands - ed.addCommand('mceIESpell', function() { - try { - sp = new ActiveXObject("ieSpell.ieSpellExtension"); - sp.CheckDocumentNode(ed.getDoc().documentElement); - } catch (e) { - if (e.number == -2146827859) { - ed.windowManager.confirm(ed.getLang("iespell.download"), function(s) { - if (s) - window.open('http://www.iespell.com/download.php', 'ieSpellDownload', ''); - }); - } else - ed.windowManager.alert("Error Loading ieSpell: Exception " + e.number); - } - }); - - // Register buttons - ed.addButton('iespell', {title : 'iespell.iespell_desc', cmd : 'mceIESpell'}); - }, - - getInfo : function() { - return { - longname : 'IESpell (IE Only)', - author : 'Moxiecode Systems AB', - authorurl : 'http://tinymce.moxiecode.com', - infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/iespell', - version : tinymce.majorVersion + "." + tinymce.minorVersion - }; - } - }); - - // Register plugin - tinymce.PluginManager.add('iespell', tinymce.plugins.IESpell); -})(); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/editor_plugin.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/editor_plugin.js deleted file mode 100644 index 2d71a2e174..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/editor_plugin.js +++ /dev/null @@ -1 +0,0 @@ -(function(){var d=tinymce.DOM,b=tinymce.dom.Element,a=tinymce.dom.Event,e=tinymce.each,c=tinymce.is;tinymce.create("tinymce.plugins.InlinePopups",{init:function(f,g){f.onBeforeRenderUI.add(function(){f.windowManager=new tinymce.InlineWindowManager(f);d.loadCSS(g+"/skins/"+(f.settings.inlinepopups_skin||"clearlooks2")+"/window.css")})},getInfo:function(){return{longname:"InlinePopups",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/inlinepopups",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.create("tinymce.InlineWindowManager:tinymce.WindowManager",{InlineWindowManager:function(f){var g=this;g.parent(f);g.zIndex=300000;g.count=0;g.windows={}},open:function(s,j){var z=this,i,k="",r=z.editor,g=0,v=0,h,m,o,q,l,x,y,n;s=s||{};j=j||{};if(!s.inline){return z.parent(s,j)}n=z._frontWindow();if(n&&d.get(n.id+"_ifr")){n.focussedElement=d.get(n.id+"_ifr").contentWindow.document.activeElement}if(!s.type){z.bookmark=r.selection.getBookmark(1)}i=d.uniqueId("mce_inlinepopups_");h=d.getViewPort();s.width=parseInt(s.width||320);s.height=parseInt(s.height||240)+(tinymce.isIE?8:0);s.min_width=parseInt(s.min_width||150);s.min_height=parseInt(s.min_height||100);s.max_width=parseInt(s.max_width||2000);s.max_height=parseInt(s.max_height||2000);s.left=s.left||Math.round(Math.max(h.x,h.x+(h.w/2)-(s.width/2)));s.top=s.top||Math.round(Math.max(h.y,h.y+(h.h/2)-(s.height/2)));s.movable=s.resizable=true;j.mce_width=s.width;j.mce_height=s.height;j.mce_inline=true;j.mce_window_id=i;j.mce_auto_focus=s.auto_focus;z.features=s;z.params=j;z.onOpen.dispatch(z,s,j);if(s.type){k+=" mceModal";if(s.type){k+=" mce"+s.type.substring(0,1).toUpperCase()+s.type.substring(1)}s.resizable=false}if(s.statusbar){k+=" mceStatusbar"}if(s.resizable){k+=" mceResizable"}if(s.minimizable){k+=" mceMinimizable"}if(s.maximizable){k+=" mceMaximizable"}if(s.movable){k+=" mceMovable"}z._addAll(d.doc.body,["div",{id:i,role:"dialog","aria-labelledby":s.type?i+"_content":i+"_title","class":(r.settings.inlinepopups_skin||"clearlooks2")+(tinymce.isIE&&window.getSelection?" ie9":""),style:"width:100px;height:100px"},["div",{id:i+"_wrapper","class":"mceWrapper"+k},["div",{id:i+"_top","class":"mceTop"},["div",{"class":"mceLeft"}],["div",{"class":"mceCenter"}],["div",{"class":"mceRight"}],["span",{id:i+"_title"},s.title||""]],["div",{id:i+"_middle","class":"mceMiddle"},["div",{id:i+"_left","class":"mceLeft",tabindex:"0"}],["span",{id:i+"_content"}],["div",{id:i+"_right","class":"mceRight",tabindex:"0"}]],["div",{id:i+"_bottom","class":"mceBottom"},["div",{"class":"mceLeft"}],["div",{"class":"mceCenter"}],["div",{"class":"mceRight"}],["span",{id:i+"_status"},"Content"]],["a",{"class":"mceMove",tabindex:"-1",href:"javascript:;"}],["a",{"class":"mceMin",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{"class":"mceMax",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{"class":"mceMed",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{"class":"mceClose",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{id:i+"_resize_n","class":"mceResize mceResizeN",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_s","class":"mceResize mceResizeS",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_w","class":"mceResize mceResizeW",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_e","class":"mceResize mceResizeE",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_nw","class":"mceResize mceResizeNW",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_ne","class":"mceResize mceResizeNE",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_sw","class":"mceResize mceResizeSW",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_se","class":"mceResize mceResizeSE",tabindex:"-1",href:"javascript:;"}]]]);d.setStyles(i,{top:-10000,left:-10000});if(tinymce.isGecko){d.setStyle(i,"overflow","auto")}if(!s.type){g+=d.get(i+"_left").clientWidth;g+=d.get(i+"_right").clientWidth;v+=d.get(i+"_top").clientHeight;v+=d.get(i+"_bottom").clientHeight}d.setStyles(i,{top:s.top,left:s.left,width:s.width+g,height:s.height+v});y=s.url||s.file;if(y){if(tinymce.relaxedDomain){y+=(y.indexOf("?")==-1?"?":"&")+"mce_rdomain="+tinymce.relaxedDomain}y=tinymce._addVer(y)}if(!s.type){d.add(i+"_content","iframe",{id:i+"_ifr",src:'javascript:""',frameBorder:0,style:"border:0;width:10px;height:10px"});d.setStyles(i+"_ifr",{width:s.width,height:s.height});d.setAttrib(i+"_ifr","src",y)}else{d.add(i+"_wrapper","a",{id:i+"_ok","class":"mceButton mceOk",href:"javascript:;",onmousedown:"return false;"},"Ok");if(s.type=="confirm"){d.add(i+"_wrapper","a",{"class":"mceButton mceCancel",href:"javascript:;",onmousedown:"return false;"},"Cancel")}d.add(i+"_middle","div",{"class":"mceIcon"});d.setHTML(i+"_content",s.content.replace("\n","
    "));a.add(i,"keyup",function(f){var p=27;if(f.keyCode===p){s.button_func(false);return a.cancel(f)}});a.add(i,"keydown",function(f){var t,p=9;if(f.keyCode===p){t=d.select("a.mceCancel",i+"_wrapper")[0];if(t&&t!==f.target){t.focus()}else{d.get(i+"_ok").focus()}return a.cancel(f)}})}o=a.add(i,"mousedown",function(t){var u=t.target,f,p;f=z.windows[i];z.focus(i);if(u.nodeName=="A"||u.nodeName=="a"){if(u.className=="mceClose"){z.close(null,i);return a.cancel(t)}else{if(u.className=="mceMax"){f.oldPos=f.element.getXY();f.oldSize=f.element.getSize();p=d.getViewPort();p.w-=2;p.h-=2;f.element.moveTo(p.x,p.y);f.element.resizeTo(p.w,p.h);d.setStyles(i+"_ifr",{width:p.w-f.deltaWidth,height:p.h-f.deltaHeight});d.addClass(i+"_wrapper","mceMaximized")}else{if(u.className=="mceMed"){f.element.moveTo(f.oldPos.x,f.oldPos.y);f.element.resizeTo(f.oldSize.w,f.oldSize.h);f.iframeElement.resizeTo(f.oldSize.w-f.deltaWidth,f.oldSize.h-f.deltaHeight);d.removeClass(i+"_wrapper","mceMaximized")}else{if(u.className=="mceMove"){return z._startDrag(i,t,u.className)}else{if(d.hasClass(u,"mceResize")){return z._startDrag(i,t,u.className.substring(13))}}}}}}});q=a.add(i,"click",function(f){var p=f.target;z.focus(i);if(p.nodeName=="A"||p.nodeName=="a"){switch(p.className){case"mceClose":z.close(null,i);return a.cancel(f);case"mceButton mceOk":case"mceButton mceCancel":s.button_func(p.className=="mceButton mceOk");return a.cancel(f)}}});a.add([i+"_left",i+"_right"],"focus",function(p){var t=d.get(i+"_ifr");if(t){var f=t.contentWindow.document.body;var u=d.select(":input:enabled,*[tabindex=0]",f);if(p.target.id===(i+"_left")){u[u.length-1].focus()}else{u[0].focus()}}else{d.get(i+"_ok").focus()}});x=z.windows[i]={id:i,mousedown_func:o,click_func:q,element:new b(i,{blocker:1,container:r.getContainer()}),iframeElement:new b(i+"_ifr"),features:s,deltaWidth:g,deltaHeight:v};x.iframeElement.on("focus",function(){z.focus(i)});if(z.count==0&&z.editor.getParam("dialog_type","modal")=="modal"){d.add(d.doc.body,"div",{id:"mceModalBlocker","class":(z.editor.settings.inlinepopups_skin||"clearlooks2")+"_modalBlocker",style:{zIndex:z.zIndex-1}});d.show("mceModalBlocker");d.setAttrib(d.doc.body,"aria-hidden","true")}else{d.setStyle("mceModalBlocker","z-index",z.zIndex-1)}if(tinymce.isIE6||/Firefox\/2\./.test(navigator.userAgent)||(tinymce.isIE&&!d.boxModel)){d.setStyles("mceModalBlocker",{position:"absolute",left:h.x,top:h.y,width:h.w-2,height:h.h-2})}d.setAttrib(i,"aria-hidden","false");z.focus(i);z._fixIELayout(i,1);if(d.get(i+"_ok")){d.get(i+"_ok").focus()}z.count++;return x},focus:function(h){var g=this,f;if(f=g.windows[h]){f.zIndex=this.zIndex++;f.element.setStyle("zIndex",f.zIndex);f.element.update();h=h+"_wrapper";d.removeClass(g.lastId,"mceFocus");d.addClass(h,"mceFocus");g.lastId=h;if(f.focussedElement){f.focussedElement.focus()}else{if(d.get(h+"_ok")){d.get(f.id+"_ok").focus()}else{if(d.get(f.id+"_ifr")){d.get(f.id+"_ifr").focus()}}}}},_addAll:function(k,h){var g,l,f=this,j=tinymce.DOM;if(c(h,"string")){k.appendChild(j.doc.createTextNode(h))}else{if(h.length){k=k.appendChild(j.create(h[0],h[1]));for(g=2;gf){g=h;f=h.zIndex}});return g},setTitle:function(f,g){var h;f=this._findId(f);if(h=d.get(f+"_title")){h.innerHTML=d.encode(g)}},alert:function(g,f,j){var i=this,h;h=i.open({title:i,type:"alert",button_func:function(k){if(f){f.call(k||i,k)}i.close(null,h.id)},content:d.encode(i.editor.getLang(g,g)),inline:1,width:400,height:130})},confirm:function(g,f,j){var i=this,h;h=i.open({title:i,type:"confirm",button_func:function(k){if(f){f.call(k||i,k)}i.close(null,h.id)},content:d.encode(i.editor.getLang(g,g)),inline:1,width:400,height:130})},_findId:function(f){var g=this;if(typeof(f)=="string"){return f}e(g.windows,function(h){var i=d.get(h.id+"_ifr");if(i&&f==i.contentWindow){f=h.id;return false}});return f},_fixIELayout:function(i,h){var f,g;if(!tinymce.isIE6){return}e(["n","s","w","e","nw","ne","sw","se"],function(j){var k=d.get(i+"_resize_"+j);d.setStyles(k,{width:h?k.clientWidth:"",height:h?k.clientHeight:"",cursor:d.getStyle(k,"cursor",1)});d.setStyle(i+"_bottom","bottom","-1px");k=0});if(f=this.windows[i]){f.element.hide();f.element.show();e(d.select("div,a",i),function(k,j){if(k.currentStyle.backgroundImage!="none"){g=new Image();g.src=k.currentStyle.backgroundImage.replace(/url\(\"(.+)\"\)/,"$1")}});d.get(i).style.filter=""}}});tinymce.PluginManager.add("inlinepopups",tinymce.plugins.InlinePopups)})(); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/editor_plugin_src.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/editor_plugin_src.js deleted file mode 100644 index da6ee24932..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/editor_plugin_src.js +++ /dev/null @@ -1,699 +0,0 @@ -/** - * editor_plugin_src.js - * - * Copyright 2009, Moxiecode Systems AB - * Released under LGPL License. - * - * License: http://tinymce.moxiecode.com/license - * Contributing: http://tinymce.moxiecode.com/contributing - */ - -(function() { - var DOM = tinymce.DOM, Element = tinymce.dom.Element, Event = tinymce.dom.Event, each = tinymce.each, is = tinymce.is; - - tinymce.create('tinymce.plugins.InlinePopups', { - init : function(ed, url) { - // Replace window manager - ed.onBeforeRenderUI.add(function() { - ed.windowManager = new tinymce.InlineWindowManager(ed); - DOM.loadCSS(url + '/skins/' + (ed.settings.inlinepopups_skin || 'clearlooks2') + "/window.css"); - }); - }, - - getInfo : function() { - return { - longname : 'InlinePopups', - author : 'Moxiecode Systems AB', - authorurl : 'http://tinymce.moxiecode.com', - infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/inlinepopups', - version : tinymce.majorVersion + "." + tinymce.minorVersion - }; - } - }); - - tinymce.create('tinymce.InlineWindowManager:tinymce.WindowManager', { - InlineWindowManager : function(ed) { - var t = this; - - t.parent(ed); - t.zIndex = 300000; - t.count = 0; - t.windows = {}; - }, - - open : function(f, p) { - var t = this, id, opt = '', ed = t.editor, dw = 0, dh = 0, vp, po, mdf, clf, we, w, u, parentWindow; - - f = f || {}; - p = p || {}; - - // Run native windows - if (!f.inline) - return t.parent(f, p); - - parentWindow = t._frontWindow(); - if (parentWindow && DOM.get(parentWindow.id + '_ifr')) { - parentWindow.focussedElement = DOM.get(parentWindow.id + '_ifr').contentWindow.document.activeElement; - } - - // Only store selection if the type is a normal window - if (!f.type) - t.bookmark = ed.selection.getBookmark(1); - - id = DOM.uniqueId("mce_inlinepopups_"); // Use a prefix so this can't conflict with other ids - vp = DOM.getViewPort(); - f.width = parseInt(f.width || 320); - f.height = parseInt(f.height || 240) + (tinymce.isIE ? 8 : 0); - f.min_width = parseInt(f.min_width || 150); - f.min_height = parseInt(f.min_height || 100); - f.max_width = parseInt(f.max_width || 2000); - f.max_height = parseInt(f.max_height || 2000); - f.left = f.left || Math.round(Math.max(vp.x, vp.x + (vp.w / 2.0) - (f.width / 2.0))); - f.top = f.top || Math.round(Math.max(vp.y, vp.y + (vp.h / 2.0) - (f.height / 2.0))); - f.movable = f.resizable = true; - p.mce_width = f.width; - p.mce_height = f.height; - p.mce_inline = true; - p.mce_window_id = id; - p.mce_auto_focus = f.auto_focus; - - // Transpose -// po = DOM.getPos(ed.getContainer()); -// f.left -= po.x; -// f.top -= po.y; - - t.features = f; - t.params = p; - t.onOpen.dispatch(t, f, p); - - if (f.type) { - opt += ' mceModal'; - - if (f.type) - opt += ' mce' + f.type.substring(0, 1).toUpperCase() + f.type.substring(1); - - f.resizable = false; - } - - if (f.statusbar) - opt += ' mceStatusbar'; - - if (f.resizable) - opt += ' mceResizable'; - - if (f.minimizable) - opt += ' mceMinimizable'; - - if (f.maximizable) - opt += ' mceMaximizable'; - - if (f.movable) - opt += ' mceMovable'; - - // Create DOM objects - t._addAll(DOM.doc.body, - ['div', {id : id, role : 'dialog', 'aria-labelledby': f.type ? id + '_content' : id + '_title', 'class' : (ed.settings.inlinepopups_skin || 'clearlooks2') + (tinymce.isIE && window.getSelection ? ' ie9' : ''), style : 'width:100px;height:100px'}, - ['div', {id : id + '_wrapper', 'class' : 'mceWrapper' + opt}, - ['div', {id : id + '_top', 'class' : 'mceTop'}, - ['div', {'class' : 'mceLeft'}], - ['div', {'class' : 'mceCenter'}], - ['div', {'class' : 'mceRight'}], - ['span', {id : id + '_title'}, f.title || ''] - ], - - ['div', {id : id + '_middle', 'class' : 'mceMiddle'}, - ['div', {id : id + '_left', 'class' : 'mceLeft', tabindex : '0'}], - ['span', {id : id + '_content'}], - ['div', {id : id + '_right', 'class' : 'mceRight', tabindex : '0'}] - ], - - ['div', {id : id + '_bottom', 'class' : 'mceBottom'}, - ['div', {'class' : 'mceLeft'}], - ['div', {'class' : 'mceCenter'}], - ['div', {'class' : 'mceRight'}], - ['span', {id : id + '_status'}, 'Content'] - ], - - ['a', {'class' : 'mceMove', tabindex : '-1', href : 'javascript:;'}], - ['a', {'class' : 'mceMin', tabindex : '-1', href : 'javascript:;', onmousedown : 'return false;'}], - ['a', {'class' : 'mceMax', tabindex : '-1', href : 'javascript:;', onmousedown : 'return false;'}], - ['a', {'class' : 'mceMed', tabindex : '-1', href : 'javascript:;', onmousedown : 'return false;'}], - ['a', {'class' : 'mceClose', tabindex : '-1', href : 'javascript:;', onmousedown : 'return false;'}], - ['a', {id : id + '_resize_n', 'class' : 'mceResize mceResizeN', tabindex : '-1', href : 'javascript:;'}], - ['a', {id : id + '_resize_s', 'class' : 'mceResize mceResizeS', tabindex : '-1', href : 'javascript:;'}], - ['a', {id : id + '_resize_w', 'class' : 'mceResize mceResizeW', tabindex : '-1', href : 'javascript:;'}], - ['a', {id : id + '_resize_e', 'class' : 'mceResize mceResizeE', tabindex : '-1', href : 'javascript:;'}], - ['a', {id : id + '_resize_nw', 'class' : 'mceResize mceResizeNW', tabindex : '-1', href : 'javascript:;'}], - ['a', {id : id + '_resize_ne', 'class' : 'mceResize mceResizeNE', tabindex : '-1', href : 'javascript:;'}], - ['a', {id : id + '_resize_sw', 'class' : 'mceResize mceResizeSW', tabindex : '-1', href : 'javascript:;'}], - ['a', {id : id + '_resize_se', 'class' : 'mceResize mceResizeSE', tabindex : '-1', href : 'javascript:;'}] - ] - ] - ); - - DOM.setStyles(id, {top : -10000, left : -10000}); - - // Fix gecko rendering bug, where the editors iframe messed with window contents - if (tinymce.isGecko) - DOM.setStyle(id, 'overflow', 'auto'); - - // Measure borders - if (!f.type) { - dw += DOM.get(id + '_left').clientWidth; - dw += DOM.get(id + '_right').clientWidth; - dh += DOM.get(id + '_top').clientHeight; - dh += DOM.get(id + '_bottom').clientHeight; - } - - // Resize window - DOM.setStyles(id, {top : f.top, left : f.left, width : f.width + dw, height : f.height + dh}); - - u = f.url || f.file; - if (u) { - if (tinymce.relaxedDomain) - u += (u.indexOf('?') == -1 ? '?' : '&') + 'mce_rdomain=' + tinymce.relaxedDomain; - - u = tinymce._addVer(u); - } - - if (!f.type) { - DOM.add(id + '_content', 'iframe', {id : id + '_ifr', src : 'javascript:""', frameBorder : 0, style : 'border:0;width:10px;height:10px'}); - DOM.setStyles(id + '_ifr', {width : f.width, height : f.height}); - DOM.setAttrib(id + '_ifr', 'src', u); - } else { - DOM.add(id + '_wrapper', 'a', {id : id + '_ok', 'class' : 'mceButton mceOk', href : 'javascript:;', onmousedown : 'return false;'}, 'Ok'); - - if (f.type == 'confirm') - DOM.add(id + '_wrapper', 'a', {'class' : 'mceButton mceCancel', href : 'javascript:;', onmousedown : 'return false;'}, 'Cancel'); - - DOM.add(id + '_middle', 'div', {'class' : 'mceIcon'}); - DOM.setHTML(id + '_content', f.content.replace('\n', '
    ')); - - Event.add(id, 'keyup', function(evt) { - var VK_ESCAPE = 27; - if (evt.keyCode === VK_ESCAPE) { - f.button_func(false); - return Event.cancel(evt); - } - }); - - Event.add(id, 'keydown', function(evt) { - var cancelButton, VK_TAB = 9; - if (evt.keyCode === VK_TAB) { - cancelButton = DOM.select('a.mceCancel', id + '_wrapper')[0]; - if (cancelButton && cancelButton !== evt.target) { - cancelButton.focus(); - } else { - DOM.get(id + '_ok').focus(); - } - return Event.cancel(evt); - } - }); - } - - // Register events - mdf = Event.add(id, 'mousedown', function(e) { - var n = e.target, w, vp; - - w = t.windows[id]; - t.focus(id); - - if (n.nodeName == 'A' || n.nodeName == 'a') { - if (n.className == 'mceClose') { - t.close(null, id); - return Event.cancel(e); - } else if (n.className == 'mceMax') { - w.oldPos = w.element.getXY(); - w.oldSize = w.element.getSize(); - - vp = DOM.getViewPort(); - - // Reduce viewport size to avoid scrollbars - vp.w -= 2; - vp.h -= 2; - - w.element.moveTo(vp.x, vp.y); - w.element.resizeTo(vp.w, vp.h); - DOM.setStyles(id + '_ifr', {width : vp.w - w.deltaWidth, height : vp.h - w.deltaHeight}); - DOM.addClass(id + '_wrapper', 'mceMaximized'); - } else if (n.className == 'mceMed') { - // Reset to old size - w.element.moveTo(w.oldPos.x, w.oldPos.y); - w.element.resizeTo(w.oldSize.w, w.oldSize.h); - w.iframeElement.resizeTo(w.oldSize.w - w.deltaWidth, w.oldSize.h - w.deltaHeight); - - DOM.removeClass(id + '_wrapper', 'mceMaximized'); - } else if (n.className == 'mceMove') - return t._startDrag(id, e, n.className); - else if (DOM.hasClass(n, 'mceResize')) - return t._startDrag(id, e, n.className.substring(13)); - } - }); - - clf = Event.add(id, 'click', function(e) { - var n = e.target; - - t.focus(id); - - if (n.nodeName == 'A' || n.nodeName == 'a') { - switch (n.className) { - case 'mceClose': - t.close(null, id); - return Event.cancel(e); - - case 'mceButton mceOk': - case 'mceButton mceCancel': - f.button_func(n.className == 'mceButton mceOk'); - return Event.cancel(e); - } - } - }); - - // Make sure the tab order loops within the dialog. - Event.add([id + '_left', id + '_right'], 'focus', function(evt) { - var iframe = DOM.get(id + '_ifr'); - if (iframe) { - var body = iframe.contentWindow.document.body; - var focusable = DOM.select(':input:enabled,*[tabindex=0]', body); - if (evt.target.id === (id + '_left')) { - focusable[focusable.length - 1].focus(); - } else { - focusable[0].focus(); - } - } else { - DOM.get(id + '_ok').focus(); - } - }); - - // Add window - w = t.windows[id] = { - id : id, - mousedown_func : mdf, - click_func : clf, - element : new Element(id, {blocker : 1, container : ed.getContainer()}), - iframeElement : new Element(id + '_ifr'), - features : f, - deltaWidth : dw, - deltaHeight : dh - }; - - w.iframeElement.on('focus', function() { - t.focus(id); - }); - - // Setup blocker - if (t.count == 0 && t.editor.getParam('dialog_type', 'modal') == 'modal') { - DOM.add(DOM.doc.body, 'div', { - id : 'mceModalBlocker', - 'class' : (t.editor.settings.inlinepopups_skin || 'clearlooks2') + '_modalBlocker', - style : {zIndex : t.zIndex - 1} - }); - - DOM.show('mceModalBlocker'); // Reduces flicker in IE - DOM.setAttrib(DOM.doc.body, 'aria-hidden', 'true'); - } else - DOM.setStyle('mceModalBlocker', 'z-index', t.zIndex - 1); - - if (tinymce.isIE6 || /Firefox\/2\./.test(navigator.userAgent) || (tinymce.isIE && !DOM.boxModel)) - DOM.setStyles('mceModalBlocker', {position : 'absolute', left : vp.x, top : vp.y, width : vp.w - 2, height : vp.h - 2}); - - DOM.setAttrib(id, 'aria-hidden', 'false'); - t.focus(id); - t._fixIELayout(id, 1); - - // Focus ok button - if (DOM.get(id + '_ok')) - DOM.get(id + '_ok').focus(); - t.count++; - - return w; - }, - - focus : function(id) { - var t = this, w; - - if (w = t.windows[id]) { - w.zIndex = this.zIndex++; - w.element.setStyle('zIndex', w.zIndex); - w.element.update(); - - id = id + '_wrapper'; - DOM.removeClass(t.lastId, 'mceFocus'); - DOM.addClass(id, 'mceFocus'); - t.lastId = id; - - if (w.focussedElement) { - w.focussedElement.focus(); - } else if (DOM.get(id + '_ok')) { - DOM.get(w.id + '_ok').focus(); - } else if (DOM.get(w.id + '_ifr')) { - DOM.get(w.id + '_ifr').focus(); - } - } - }, - - _addAll : function(te, ne) { - var i, n, t = this, dom = tinymce.DOM; - - if (is(ne, 'string')) - te.appendChild(dom.doc.createTextNode(ne)); - else if (ne.length) { - te = te.appendChild(dom.create(ne[0], ne[1])); - - for (i=2; i ix) { - fw = w; - ix = w.zIndex; - } - }); - return fw; - }, - - setTitle : function(w, ti) { - var e; - - w = this._findId(w); - - if (e = DOM.get(w + '_title')) - e.innerHTML = DOM.encode(ti); - }, - - alert : function(txt, cb, s) { - var t = this, w; - - w = t.open({ - title : t, - type : 'alert', - button_func : function(s) { - if (cb) - cb.call(s || t, s); - - t.close(null, w.id); - }, - content : DOM.encode(t.editor.getLang(txt, txt)), - inline : 1, - width : 400, - height : 130 - }); - }, - - confirm : function(txt, cb, s) { - var t = this, w; - - w = t.open({ - title : t, - type : 'confirm', - button_func : function(s) { - if (cb) - cb.call(s || t, s); - - t.close(null, w.id); - }, - content : DOM.encode(t.editor.getLang(txt, txt)), - inline : 1, - width : 400, - height : 130 - }); - }, - - // Internal functions - - _findId : function(w) { - var t = this; - - if (typeof(w) == 'string') - return w; - - each(t.windows, function(wo) { - var ifr = DOM.get(wo.id + '_ifr'); - - if (ifr && w == ifr.contentWindow) { - w = wo.id; - return false; - } - }); - - return w; - }, - - _fixIELayout : function(id, s) { - var w, img; - - if (!tinymce.isIE6) - return; - - // Fixes the bug where hover flickers and does odd things in IE6 - each(['n','s','w','e','nw','ne','sw','se'], function(v) { - var e = DOM.get(id + '_resize_' + v); - - DOM.setStyles(e, { - width : s ? e.clientWidth : '', - height : s ? e.clientHeight : '', - cursor : DOM.getStyle(e, 'cursor', 1) - }); - - DOM.setStyle(id + "_bottom", 'bottom', '-1px'); - - e = 0; - }); - - // Fixes graphics glitch - if (w = this.windows[id]) { - // Fixes rendering bug after resize - w.element.hide(); - w.element.show(); - - // Forced a repaint of the window - //DOM.get(id).style.filter = ''; - - // IE has a bug where images used in CSS won't get loaded - // sometimes when the cache in the browser is disabled - // This fix tries to solve it by loading the images using the image object - each(DOM.select('div,a', id), function(e, i) { - if (e.currentStyle.backgroundImage != 'none') { - img = new Image(); - img.src = e.currentStyle.backgroundImage.replace(/url\(\"(.+)\"\)/, '$1'); - } - }); - - DOM.get(id).style.filter = ''; - } - } - }); - - // Register plugin - tinymce.PluginManager.add('inlinepopups', tinymce.plugins.InlinePopups); -})(); - diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/clearlooks2/img/alert.gif b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/clearlooks2/img/alert.gif deleted file mode 100644 index 219139857e..0000000000 Binary files a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/clearlooks2/img/alert.gif and /dev/null differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/clearlooks2/img/button.gif b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/clearlooks2/img/button.gif deleted file mode 100644 index f957e49a3d..0000000000 Binary files a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/clearlooks2/img/button.gif and /dev/null differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif deleted file mode 100644 index 6baf64ad32..0000000000 Binary files a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif and /dev/null differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif deleted file mode 100644 index 20acbbf7ae..0000000000 Binary files a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif and /dev/null differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/clearlooks2/img/corners.gif b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/clearlooks2/img/corners.gif deleted file mode 100644 index d5de1cc236..0000000000 Binary files a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/clearlooks2/img/corners.gif and /dev/null differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif deleted file mode 100644 index c2a2ad454d..0000000000 Binary files a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif and /dev/null differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif deleted file mode 100644 index 0b4cc3682a..0000000000 Binary files a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif and /dev/null differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/clearlooks2/window.css b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/clearlooks2/window.css deleted file mode 100644 index 74416fc131..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/clearlooks2/window.css +++ /dev/null @@ -1,90 +0,0 @@ -/* Clearlooks 2 */ - -/* Reset */ -.clearlooks2, .clearlooks2 div, .clearlooks2 span, .clearlooks2 a {vertical-align:baseline; text-align:left; position:absolute; border:0; padding:0; margin:0; background:transparent; font-family:Arial,Verdana; font-size:11px; color:#000; text-decoration:none; font-weight:normal; width:auto; height:auto; overflow:hidden; display:block} - -/* General */ -.clearlooks2 {position:absolute; direction:ltr} -.clearlooks2 .mceWrapper {position:static} -.mceEventBlocker {position:fixed; left:0; top:0; background:url(img/horizontal.gif) no-repeat 0 -75px; width:100%; height:100%} -.clearlooks2 .mcePlaceHolder {border:1px solid #000; background:#888; top:0; left:0; opacity:0.5; -ms-filter:'alpha(opacity=50)'; filter:alpha(opacity=50)} -.clearlooks2_modalBlocker {position:fixed; left:0; top:0; width:100%; height:100%; background:#FFF; opacity:0.6; -ms-filter:'alpha(opacity=60)'; filter:alpha(opacity=60); display:none} - -/* Top */ -.clearlooks2 .mceTop, .clearlooks2 .mceTop div {top:0; width:100%; height:23px} -.clearlooks2 .mceTop .mceLeft {width:6px; background:url(img/corners.gif)} -.clearlooks2 .mceTop .mceCenter {right:6px; width:100%; height:23px; background:url(img/horizontal.gif) 12px 0; clip:rect(auto auto auto 12px)} -.clearlooks2 .mceTop .mceRight {right:0; width:6px; height:23px; background:url(img/corners.gif) -12px 0} -.clearlooks2 .mceTop span {width:100%; text-align:center; vertical-align:middle; line-height:23px; font-weight:bold} -.clearlooks2 .mceFocus .mceTop .mceLeft {background:url(img/corners.gif) -6px 0} -.clearlooks2 .mceFocus .mceTop .mceCenter {background:url(img/horizontal.gif) 0 -23px} -.clearlooks2 .mceFocus .mceTop .mceRight {background:url(img/corners.gif) -18px 0} -.clearlooks2 .mceFocus .mceTop span {color:#FFF} - -/* Middle */ -.clearlooks2 .mceMiddle, .clearlooks2 .mceMiddle div {top:0} -.clearlooks2 .mceMiddle {width:100%; height:100%; clip:rect(23px auto auto auto)} -.clearlooks2 .mceMiddle .mceLeft {left:0; width:5px; height:100%; background:url(img/vertical.gif) -5px 0} -.clearlooks2 .mceMiddle span {top:23px; left:5px; width:100%; height:100%; background:#FFF} -.clearlooks2 .mceMiddle .mceRight {right:0; width:5px; height:100%; background:url(img/vertical.gif)} - -/* Bottom */ -.clearlooks2 .mceBottom, .clearlooks2 .mceBottom div {height:6px} -.clearlooks2 .mceBottom {left:0; bottom:0; width:100%} -.clearlooks2 .mceBottom div {top:0} -.clearlooks2 .mceBottom .mceLeft {left:0; width:5px; background:url(img/corners.gif) -34px -6px} -.clearlooks2 .mceBottom .mceCenter {left:5px; width:100%; background:url(img/horizontal.gif) 0 -46px} -.clearlooks2 .mceBottom .mceRight {right:0; width:5px; background: url(img/corners.gif) -34px 0} -.clearlooks2 .mceBottom span {display:none} -.clearlooks2 .mceStatusbar .mceBottom, .clearlooks2 .mceStatusbar .mceBottom div {height:23px} -.clearlooks2 .mceStatusbar .mceBottom .mceLeft {background:url(img/corners.gif) -29px 0} -.clearlooks2 .mceStatusbar .mceBottom .mceCenter {background:url(img/horizontal.gif) 0 -52px} -.clearlooks2 .mceStatusbar .mceBottom .mceRight {background:url(img/corners.gif) -24px 0} -.clearlooks2 .mceStatusbar .mceBottom span {display:block; left:7px; font-family:Arial, Verdana; font-size:11px; line-height:23px} - -/* Actions */ -.clearlooks2 a {width:29px; height:16px; top:3px;} -.clearlooks2 .mceClose {right:6px; background:url(img/buttons.gif) -87px 0} -.clearlooks2 .mceMin {display:none; right:68px; background:url(img/buttons.gif) 0 0} -.clearlooks2 .mceMed {display:none; right:37px; background:url(img/buttons.gif) -29px 0} -.clearlooks2 .mceMax {display:none; right:37px; background:url(img/buttons.gif) -58px 0} -.clearlooks2 .mceMove {display:none;width:100%;cursor:move;background:url(img/corners.gif) no-repeat -100px -100px} -.clearlooks2 .mceMovable .mceMove {display:block} -.clearlooks2 .mceFocus .mceClose {right:6px; background:url(img/buttons.gif) -87px -16px} -.clearlooks2 .mceFocus .mceMin {right:68px; background:url(img/buttons.gif) 0 -16px} -.clearlooks2 .mceFocus .mceMed {right:37px; background:url(img/buttons.gif) -29px -16px} -.clearlooks2 .mceFocus .mceMax {right:37px; background:url(img/buttons.gif) -58px -16px} -.clearlooks2 .mceFocus .mceClose:hover {right:6px; background:url(img/buttons.gif) -87px -32px} -.clearlooks2 .mceFocus .mceClose:hover {right:6px; background:url(img/buttons.gif) -87px -32px} -.clearlooks2 .mceFocus .mceMin:hover {right:68px; background:url(img/buttons.gif) 0 -32px} -.clearlooks2 .mceFocus .mceMed:hover {right:37px; background:url(img/buttons.gif) -29px -32px} -.clearlooks2 .mceFocus .mceMax:hover {right:37px; background:url(img/buttons.gif) -58px -32px} - -/* Resize */ -.clearlooks2 .mceResize {top:auto; left:auto; display:none; width:5px; height:5px; background:url(img/horizontal.gif) no-repeat 0 -75px} -.clearlooks2 .mceResizable .mceResize {display:block} -.clearlooks2 .mceResizable .mceMin, .clearlooks2 .mceMax {display:none} -.clearlooks2 .mceMinimizable .mceMin {display:block} -.clearlooks2 .mceMaximizable .mceMax {display:block} -.clearlooks2 .mceMaximized .mceMed {display:block} -.clearlooks2 .mceMaximized .mceMax {display:none} -.clearlooks2 a.mceResizeN {top:0; left:0; width:100%; cursor:n-resize} -.clearlooks2 a.mceResizeNW {top:0; left:0; cursor:nw-resize} -.clearlooks2 a.mceResizeNE {top:0; right:0; cursor:ne-resize} -.clearlooks2 a.mceResizeW {top:0; left:0; height:100%; cursor:w-resize;} -.clearlooks2 a.mceResizeE {top:0; right:0; height:100%; cursor:e-resize} -.clearlooks2 a.mceResizeS {bottom:0; left:0; width:100%; cursor:s-resize} -.clearlooks2 a.mceResizeSW {bottom:0; left:0; cursor:sw-resize} -.clearlooks2 a.mceResizeSE {bottom:0; right:0; cursor:se-resize} - -/* Alert/Confirm */ -.clearlooks2 .mceButton {font-weight:bold; bottom:10px; width:80px; height:30px; background:url(img/button.gif); line-height:30px; vertical-align:middle; text-align:center; outline:0} -.clearlooks2 .mceMiddle .mceIcon {left:15px; top:35px; width:32px; height:32px} -.clearlooks2 .mceAlert .mceMiddle span, .clearlooks2 .mceConfirm .mceMiddle span {background:transparent;left:60px; top:35px; width:320px; height:50px; font-weight:bold; overflow:auto; white-space:normal} -.clearlooks2 a:hover {font-weight:bold;} -.clearlooks2 .mceAlert .mceMiddle, .clearlooks2 .mceConfirm .mceMiddle {background:#D6D7D5} -.clearlooks2 .mceAlert .mceOk {left:50%; top:auto; margin-left: -40px} -.clearlooks2 .mceAlert .mceIcon {background:url(img/alert.gif)} -.clearlooks2 .mceConfirm .mceOk {left:50%; top:auto; margin-left: -90px} -.clearlooks2 .mceConfirm .mceCancel {left:50%; top:auto} -.clearlooks2 .mceConfirm .mceIcon {background:url(img/confirm.gif)} diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/umbraco/img/alert.gif b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/umbraco/img/alert.gif deleted file mode 100644 index 94abd08763..0000000000 Binary files a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/umbraco/img/alert.gif and /dev/null differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/umbraco/img/button.gif b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/umbraco/img/button.gif deleted file mode 100644 index e671094cb0..0000000000 Binary files a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/umbraco/img/button.gif and /dev/null differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/umbraco/img/buttons.gif b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/umbraco/img/buttons.gif deleted file mode 100644 index 6baf64ad32..0000000000 Binary files a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/umbraco/img/buttons.gif and /dev/null differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/umbraco/img/close.png b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/umbraco/img/close.png deleted file mode 100644 index cdd1ff748b..0000000000 Binary files a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/umbraco/img/close.png and /dev/null differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/umbraco/img/confirm.gif b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/umbraco/img/confirm.gif deleted file mode 100644 index 497307a85a..0000000000 Binary files a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/umbraco/img/confirm.gif and /dev/null differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/umbraco/img/corners.gif b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/umbraco/img/corners.gif deleted file mode 100644 index 878a993ec4..0000000000 Binary files a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/umbraco/img/corners.gif and /dev/null differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/umbraco/img/horizontal.gif b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/umbraco/img/horizontal.gif deleted file mode 100644 index d7ce1a707f..0000000000 Binary files a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/umbraco/img/horizontal.gif and /dev/null differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/umbraco/img/vertical.gif b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/umbraco/img/vertical.gif deleted file mode 100644 index d6ed79382f..0000000000 Binary files a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/umbraco/img/vertical.gif and /dev/null differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/umbraco/window.css b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/umbraco/window.css deleted file mode 100644 index 3cb5ca2c7c..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/umbraco/window.css +++ /dev/null @@ -1,77 +0,0 @@ -/* Umbraco */ - -/* Reset */ -.umbraco, .umbraco div, .umbraco span, .umbraco a {vertical-align:baseline; text-align:left; position:absolute; border:0; padding:0; margin:0; background:transparent; font-family:Arial,Verdana; font-size:11px; color:#000; text-decoration:none; font-weight:normal; width:auto; height:auto; overflow:hidden; display:block} - -/* General */ -.umbraco {position:absolute; direction:ltr; border: 5px solid #a3a3a3; overflow: hidden;} -.umbraco .mceWrapper {position:static;} -#mceEventBlocker{border: none !Important;} -.mceEventBlocker {position:fixed; left:0; top:0; width:100%; height:100%} -.umbraco .mcePlaceHolder {border:1px solid #a3a3a3; background:#fff; top:0; left:0;} -.umbraco_modalBlocker {position:fixed; left:0; top:0; width:100%; height:100%; display:none; background: url(../../../../../modal/modalBackground.gif)} - -/* Top */ -.umbraco .mceTop{top:0; height:15px; padding: 5px 0px 5px 0px; width: 100%; border-bottom: 1px solid #ccc; background: url(../../../../../modal/modalGradiant.gif) repeat-x;} -.umbraco .mceTop .mceLeft {display: none;} -.umbraco .mceTop .mceCenter {display: none;} -.umbraco .mceTop .mceRight {display: none;} - -.umbraco .mceTop span {color: #378080; font-weight: bold; text-align:left; vertical-align:middle; display: block; padding-left: 10px;} - -/* Middle */ -.umbraco .mceMiddle, .umbraco .mceMiddle div {top:0;} -.umbraco .mceMiddle {width:100%; height:100%; clip:rect(26px auto auto auto); background:#FFF; overflow: hidden;} -.umbraco .mceMiddle .mceLeft {display: none;} -.umbraco .mceMiddle span {top:25px; left:0px; width:100%; height:100%; background:#FFF} -.umbraco .mceMiddle .mceRight {display: none;} - -/* Bottom */ -.umbraco .mceBottom, .umbraco .mceBottom div {display: none !Important;} - -/* Actions */ -.umbraco a {width:29px; height:16px; top:3px;} -.umbraco .mceClose {right:6px; background:url(img/close.png) no-repeat} -.umbraco .mceMin {display:none; right:68px; background:url(img/buttons.gif) 0 0} -.umbraco .mceMed {display:none; right:37px; background:url(img/buttons.gif) -29px 0} -.umbraco .mceMax {display:none; right:37px; background:url(img/buttons.gif) -58px 0} -.umbraco .mceMove {display:none;width:100%;cursor:move;background:url(img/corners.gif) no-repeat -100px -100px} -.umbraco .mceMovable .mceMove {display:block} -.umbraco .mceFocus .mceClose {right:6px; top: 6px;} - -.umbraco .mceFocus .mceMin {right:68px; background:url(img/buttons.gif) 0 -16px} -.umbraco .mceFocus .mceMed {right:37px; background:url(img/buttons.gif) -29px -16px} -.umbraco .mceFocus .mceMax {right:37px; background:url(img/buttons.gif) -58px -16px} - -.umbraco .mceFocus .mceMin:hover {right:68px; background:url(img/buttons.gif) 0 -32px} -.umbraco .mceFocus .mceMed:hover {right:37px; background:url(img/buttons.gif) -29px -32px} -.umbraco .mceFocus .mceMax:hover {right:37px; background:url(img/buttons.gif) -58px -32px} - -/* Resize */ -.umbraco .mceResize {top:auto; left:auto; display:none; width:5px; height:5px; background:url(img/horizontal.gif) no-repeat 0 -75px} -.umbraco .mceResizable .mceResize {display:block} -.umbraco .mceResizable .mceMin, .umbraco .mceMax {display:none} -.umbraco .mceMinimizable .mceMin {display:block} -.umbraco .mceMaximizable .mceMax {display:block} -.umbraco .mceMaximized .mceMed {display:block} -.umbraco .mceMaximized .mceMax {display:none} -.umbraco a.mceResizeN {top:0; left:0; width:100%; cursor:n-resize} -.umbraco a.mceResizeNW {top:0; left:0; cursor:nw-resize} -.umbraco a.mceResizeNE {top:0; right:0; cursor:ne-resize} -.umbraco a.mceResizeW {top:0; left:0; height:100%; cursor:w-resize;} -.umbraco a.mceResizeE {top:0; right:0; height:100%; cursor:e-resize} -.umbraco a.mceResizeS {bottom:0; left:0; width:100%; cursor:s-resize} -.umbraco a.mceResizeSW {bottom:0; left:0; cursor:sw-resize} -.umbraco a.mceResizeSE {bottom:0; right:0; cursor:se-resize} - -/* Alert/Confirm */ -.umbraco .mceButton {font-weight:bold; bottom:10px; width:80px; height:30px; background:url(img/button.gif); line-height:30px; vertical-align:middle; text-align:center; outline:0} -.umbraco .mceMiddle .mceIcon {left:15px; top:35px; width:32px; height:32px} -.umbraco .mceAlert .mceMiddle span, .umbraco .mceConfirm .mceMiddle span {background:transparent;left:60px; top:35px; width:320px; height:50px; font-weight:bold; overflow:auto; white-space:normal} -.umbraco a:hover {font-weight:bold;} -.umbraco .mceAlert .mceMiddle, .umbraco .mceConfirm .mceMiddle {background:#D6D7D5} -.umbraco .mceAlert .mceOk {left:50%; top:auto; margin-left: -40px} -.umbraco .mceAlert .mceIcon {background:url(img/alert.gif)} -.umbraco .mceConfirm .mceOk {left:50%; top:auto; margin-left: -90px} -.umbraco .mceConfirm .mceCancel {left:50%; top:auto} -.umbraco .mceConfirm .mceIcon {background:url(img/confirm.gif)} \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/template.htm b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/template.htm deleted file mode 100644 index f9ec64219d..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/template.htm +++ /dev/null @@ -1,387 +0,0 @@ - - - -Template for dialogs - - - - -
    -
    -
    -
    -
    -
    -
    - Blured -
    - -
    -
    - Content -
    -
    - -
    -
    -
    -
    - Statusbar text. -
    - - - - - - - - - - - - - - -
    -
    - -
    -
    -
    -
    -
    -
    - Focused -
    - -
    -
    - Content -
    -
    - -
    -
    -
    -
    - Statusbar text. -
    - - - - - - - - - - - - - - -
    -
    - -
    -
    -
    -
    -
    -
    - Statusbar -
    - -
    -
    - Content -
    -
    - -
    -
    -
    -
    - Statusbar text. -
    - - - - - - - - - - - - - - -
    -
    - -
    -
    -
    -
    -
    -
    - Statusbar, Resizable -
    - -
    -
    - Content -
    -
    - -
    -
    -
    -
    - Statusbar text. -
    - - - - - - - - - - - - - - -
    -
    - -
    -
    -
    -
    -
    -
    - Resizable, Maximizable -
    - -
    -
    - Content -
    -
    - -
    -
    -
    -
    - Statusbar text. -
    - - - - - - - - - - - - - - -
    -
    - -
    -
    -
    -
    -
    -
    - Blurred, Maximizable, Statusbar, Resizable -
    - -
    -
    - Content -
    -
    - -
    -
    -
    -
    - Statusbar text. -
    - - - - - - - - - - - - - - -
    -
    - -
    -
    -
    -
    -
    -
    - Maximized, Maximizable, Minimizable -
    - -
    -
    - Content -
    -
    - -
    -
    -
    -
    - Statusbar text. -
    - - - - - - - - - - - - - - -
    -
    - -
    -
    -
    -
    -
    -
    - Blured -
    - -
    -
    - Content -
    -
    - -
    -
    -
    -
    - Statusbar text. -
    - - - - - - - - - - - - - - -
    -
    - -
    -
    -
    -
    -
    -
    - Alert -
    - -
    -
    - - This is a very long error message. This is a very long error message. - This is a very long error message. This is a very long error message. - This is a very long error message. This is a very long error message. - This is a very long error message. This is a very long error message. - This is a very long error message. This is a very long error message. - This is a very long error message. This is a very long error message. - -
    -
    -
    - -
    -
    -
    -
    -
    - - - Ok - -
    -
    - -
    -
    -
    -
    -
    -
    - Confirm -
    - -
    -
    - - This is a very long error message. This is a very long error message. - This is a very long error message. This is a very long error message. - This is a very long error message. This is a very long error message. - This is a very long error message. This is a very long error message. - This is a very long error message. This is a very long error message. - This is a very long error message. This is a very long error message. - -
    -
    -
    - -
    -
    -
    -
    -
    - - - Ok - Cancel - -
    -
    -
    - - - diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/insertdatetime/editor_plugin.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/insertdatetime/editor_plugin.js deleted file mode 100644 index 938ce6b17d..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/insertdatetime/editor_plugin.js +++ /dev/null @@ -1 +0,0 @@ -(function(){tinymce.create("tinymce.plugins.InsertDateTime",{init:function(a,b){var c=this;c.editor=a;a.addCommand("mceInsertDate",function(){var d=c._getDateTime(new Date(),a.getParam("plugin_insertdate_dateFormat",a.getLang("insertdatetime.date_fmt")));a.execCommand("mceInsertContent",false,d)});a.addCommand("mceInsertTime",function(){var d=c._getDateTime(new Date(),a.getParam("plugin_insertdate_timeFormat",a.getLang("insertdatetime.time_fmt")));a.execCommand("mceInsertContent",false,d)});a.addButton("insertdate",{title:"insertdatetime.insertdate_desc",cmd:"mceInsertDate"});a.addButton("inserttime",{title:"insertdatetime.inserttime_desc",cmd:"mceInsertTime"})},getInfo:function(){return{longname:"Insert date/time",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/insertdatetime",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_getDateTime:function(e,a){var c=this.editor;function b(g,d){g=""+g;if(g.length-1){b[e].style.zIndex=h[k];b[k].style.zIndex=h[e]}else{if(h[e]>0){b[e].style.zIndex=h[e]-1}}}else{for(g=0;gh[e]){k=g;break}}if(k>-1){b[e].style.zIndex=h[k];b[k].style.zIndex=h[e]}else{b[e].style.zIndex=h[e]+1}}c.execCommand("mceRepaint")},_getParentLayer:function(b){return this.editor.dom.getParent(b,function(c){return c.nodeType==1&&/^(absolute|relative|static)$/i.test(c.style.position)})},_insertLayer:function(){var c=this.editor,e=c.dom,d=e.getPos(e.getParent(c.selection.getNode(),"*")),b=c.getBody();c.dom.add(b,"div",{style:{position:"absolute",left:d.x,top:(d.y>20?d.y:20),width:100,height:100},"class":"mceItemVisualAid mceItemLayer"},c.selection.getContent()||c.getLang("layer.content"));if(tinymce.isIE){e.setHTML(b,b.innerHTML)}},_toggleAbsolute:function(){var b=this.editor,c=this._getParentLayer(b.selection.getNode());if(!c){c=b.dom.getParent(b.selection.getNode(),"DIV,P,IMG")}if(c){if(c.style.position.toLowerCase()=="absolute"){b.dom.setStyles(c,{position:"",left:"",top:"",width:"",height:""});b.dom.removeClass(c,"mceItemVisualAid");b.dom.removeClass(c,"mceItemLayer")}else{if(c.style.left==""){c.style.left=20+"px"}if(c.style.top==""){c.style.top=20+"px"}if(c.style.width==""){c.style.width=c.width?(c.width+"px"):"100px"}if(c.style.height==""){c.style.height=c.height?(c.height+"px"):"100px"}c.style.position="absolute";b.dom.setAttrib(c,"data-mce-style","");b.addVisual(b.getBody())}b.execCommand("mceRepaint");b.nodeChanged()}}});tinymce.PluginManager.add("layer",tinymce.plugins.Layer)})(); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/layer/editor_plugin_src.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/layer/editor_plugin_src.js deleted file mode 100644 index daed2806cb..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/layer/editor_plugin_src.js +++ /dev/null @@ -1,262 +0,0 @@ -/** - * editor_plugin_src.js - * - * Copyright 2009, Moxiecode Systems AB - * Released under LGPL License. - * - * License: http://tinymce.moxiecode.com/license - * Contributing: http://tinymce.moxiecode.com/contributing - */ - -(function() { - function findParentLayer(node) { - do { - if (node.className && node.className.indexOf('mceItemLayer') != -1) { - return node; - } - } while (node = node.parentNode); - }; - - tinymce.create('tinymce.plugins.Layer', { - init : function(ed, url) { - var t = this; - - t.editor = ed; - - // Register commands - ed.addCommand('mceInsertLayer', t._insertLayer, t); - - ed.addCommand('mceMoveForward', function() { - t._move(1); - }); - - ed.addCommand('mceMoveBackward', function() { - t._move(-1); - }); - - ed.addCommand('mceMakeAbsolute', function() { - t._toggleAbsolute(); - }); - - // Register buttons - ed.addButton('moveforward', {title : 'layer.forward_desc', cmd : 'mceMoveForward'}); - ed.addButton('movebackward', {title : 'layer.backward_desc', cmd : 'mceMoveBackward'}); - ed.addButton('absolute', {title : 'layer.absolute_desc', cmd : 'mceMakeAbsolute'}); - ed.addButton('insertlayer', {title : 'layer.insertlayer_desc', cmd : 'mceInsertLayer'}); - - ed.onInit.add(function() { - var dom = ed.dom; - - if (tinymce.isIE) - ed.getDoc().execCommand('2D-Position', false, true); - }); - - // Remove serialized styles when selecting a layer since it might be changed by a drag operation - ed.onMouseUp.add(function(ed, e) { - var layer = findParentLayer(e.target); - - if (layer) { - ed.dom.setAttrib(layer, 'data-mce-style', ''); - } - }); - - // Fixes edit focus issues with layers on Gecko - // This will enable designMode while inside a layer and disable it when outside - ed.onMouseDown.add(function(ed, e) { - var node = e.target, doc = ed.getDoc(), parent; - - if (tinymce.isGecko) { - if (findParentLayer(node)) { - if (doc.designMode !== 'on') { - doc.designMode = 'on'; - - // Repaint caret - node = doc.body; - parent = node.parentNode; - parent.removeChild(node); - parent.appendChild(node); - } - } else if (doc.designMode == 'on') { - doc.designMode = 'off'; - } - } - }); - - ed.onNodeChange.add(t._nodeChange, t); - ed.onVisualAid.add(t._visualAid, t); - }, - - getInfo : function() { - return { - longname : 'Layer', - author : 'Moxiecode Systems AB', - authorurl : 'http://tinymce.moxiecode.com', - infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/layer', - version : tinymce.majorVersion + "." + tinymce.minorVersion - }; - }, - - // Private methods - - _nodeChange : function(ed, cm, n) { - var le, p; - - le = this._getParentLayer(n); - p = ed.dom.getParent(n, 'DIV,P,IMG'); - - if (!p) { - cm.setDisabled('absolute', 1); - cm.setDisabled('moveforward', 1); - cm.setDisabled('movebackward', 1); - } else { - cm.setDisabled('absolute', 0); - cm.setDisabled('moveforward', !le); - cm.setDisabled('movebackward', !le); - cm.setActive('absolute', le && le.style.position.toLowerCase() == "absolute"); - } - }, - - // Private methods - - _visualAid : function(ed, e, s) { - var dom = ed.dom; - - tinymce.each(dom.select('div,p', e), function(e) { - if (/^(absolute|relative|fixed)$/i.test(e.style.position)) { - if (s) - dom.addClass(e, 'mceItemVisualAid'); - else - dom.removeClass(e, 'mceItemVisualAid'); - - dom.addClass(e, 'mceItemLayer'); - } - }); - }, - - _move : function(d) { - var ed = this.editor, i, z = [], le = this._getParentLayer(ed.selection.getNode()), ci = -1, fi = -1, nl; - - nl = []; - tinymce.walk(ed.getBody(), function(n) { - if (n.nodeType == 1 && /^(absolute|relative|static)$/i.test(n.style.position)) - nl.push(n); - }, 'childNodes'); - - // Find z-indexes - for (i=0; i -1) { - nl[ci].style.zIndex = z[fi]; - nl[fi].style.zIndex = z[ci]; - } else { - if (z[ci] > 0) - nl[ci].style.zIndex = z[ci] - 1; - } - } else { - // Move forward - - // Try find a higher one - for (i=0; i z[ci]) { - fi = i; - break; - } - } - - if (fi > -1) { - nl[ci].style.zIndex = z[fi]; - nl[fi].style.zIndex = z[ci]; - } else - nl[ci].style.zIndex = z[ci] + 1; - } - - ed.execCommand('mceRepaint'); - }, - - _getParentLayer : function(n) { - return this.editor.dom.getParent(n, function(n) { - return n.nodeType == 1 && /^(absolute|relative|static)$/i.test(n.style.position); - }); - }, - - _insertLayer : function() { - var ed = this.editor, dom = ed.dom, p = dom.getPos(dom.getParent(ed.selection.getNode(), '*')), body = ed.getBody(); - - ed.dom.add(body, 'div', { - style : { - position : 'absolute', - left : p.x, - top : (p.y > 20 ? p.y : 20), - width : 100, - height : 100 - }, - 'class' : 'mceItemVisualAid mceItemLayer' - }, ed.selection.getContent() || ed.getLang('layer.content')); - - // Workaround for IE where it messes up the JS engine if you insert a layer on IE 6,7 - if (tinymce.isIE) - dom.setHTML(body, body.innerHTML); - }, - - _toggleAbsolute : function() { - var ed = this.editor, le = this._getParentLayer(ed.selection.getNode()); - - if (!le) - le = ed.dom.getParent(ed.selection.getNode(), 'DIV,P,IMG'); - - if (le) { - if (le.style.position.toLowerCase() == "absolute") { - ed.dom.setStyles(le, { - position : '', - left : '', - top : '', - width : '', - height : '' - }); - - ed.dom.removeClass(le, 'mceItemVisualAid'); - ed.dom.removeClass(le, 'mceItemLayer'); - } else { - if (le.style.left == "") - le.style.left = 20 + 'px'; - - if (le.style.top == "") - le.style.top = 20 + 'px'; - - if (le.style.width == "") - le.style.width = le.width ? (le.width + 'px') : '100px'; - - if (le.style.height == "") - le.style.height = le.height ? (le.height + 'px') : '100px'; - - le.style.position = "absolute"; - - ed.dom.setAttrib(le, 'data-mce-style', ''); - ed.addVisual(ed.getBody()); - } - - ed.execCommand('mceRepaint'); - ed.nodeChanged(); - } - } - }); - - // Register plugin - tinymce.PluginManager.add('layer', tinymce.plugins.Layer); -})(); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/legacyoutput/editor_plugin.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/legacyoutput/editor_plugin.js deleted file mode 100644 index 2ed5f41ae4..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/legacyoutput/editor_plugin.js +++ /dev/null @@ -1 +0,0 @@ -(function(a){a.onAddEditor.addToTop(function(c,b){b.settings.inline_styles=false});a.create("tinymce.plugins.LegacyOutput",{init:function(b){b.onInit.add(function(){var c="p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img",e=a.explode(b.settings.font_size_style_values),d=b.schema;b.formatter.register({alignleft:{selector:c,attributes:{align:"left"}},aligncenter:{selector:c,attributes:{align:"center"}},alignright:{selector:c,attributes:{align:"right"}},alignfull:{selector:c,attributes:{align:"justify"}},bold:[{inline:"b",remove:"all"},{inline:"strong",remove:"all"},{inline:"span",styles:{fontWeight:"bold"}}],italic:[{inline:"i",remove:"all"},{inline:"em",remove:"all"},{inline:"span",styles:{fontStyle:"italic"}}],underline:[{inline:"u",remove:"all"},{inline:"span",styles:{textDecoration:"underline"},exact:true}],strikethrough:[{inline:"strike",remove:"all"},{inline:"span",styles:{textDecoration:"line-through"},exact:true}],fontname:{inline:"font",attributes:{face:"%value"}},fontsize:{inline:"font",attributes:{size:function(f){return a.inArray(e,f.value)+1}}},forecolor:{inline:"font",attributes:{color:"%value"}},hilitecolor:{inline:"font",styles:{backgroundColor:"%value"}}});a.each("b,i,u,strike".split(","),function(f){d.addValidElements(f+"[*]")});if(!d.getElementRule("font")){d.addValidElements("font[face|size|color|style]")}a.each(c.split(","),function(f){var h=d.getElementRule(f),g;if(h){if(!h.attributes.align){h.attributes.align={};h.attributesOrder.push("align")}}});b.onNodeChange.add(function(g,k){var j,f,h,i;f=g.dom.getParent(g.selection.getNode(),"font");if(f){h=f.face;i=f.size}if(j=k.get("fontselect")){j.select(function(l){return l==h})}if(j=k.get("fontsizeselect")){j.select(function(m){var l=a.inArray(e,m.fontSize);return l+1==i})}})})},getInfo:function(){return{longname:"LegacyOutput",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/legacyoutput",version:a.majorVersion+"."+a.minorVersion}}});a.PluginManager.add("legacyoutput",a.plugins.LegacyOutput)})(tinymce); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/legacyoutput/editor_plugin_src.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/legacyoutput/editor_plugin_src.js deleted file mode 100644 index 3cdcde579d..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/legacyoutput/editor_plugin_src.js +++ /dev/null @@ -1,139 +0,0 @@ -/** - * editor_plugin_src.js - * - * Copyright 2009, Moxiecode Systems AB - * Released under LGPL License. - * - * License: http://tinymce.moxiecode.com/license - * Contributing: http://tinymce.moxiecode.com/contributing - * - * This plugin will force TinyMCE to produce deprecated legacy output such as font elements, u elements, align - * attributes and so forth. There are a few cases where these old items might be needed for example in email applications or with Flash - * - * However you should NOT use this plugin if you are building some system that produces web contents such as a CMS. All these elements are - * not apart of the newer specifications for HTML and XHTML. - */ - -(function(tinymce) { - // Override inline_styles setting to force TinyMCE to produce deprecated contents - tinymce.onAddEditor.addToTop(function(tinymce, editor) { - editor.settings.inline_styles = false; - }); - - // Create the legacy ouput plugin - tinymce.create('tinymce.plugins.LegacyOutput', { - init : function(editor) { - editor.onInit.add(function() { - var alignElements = 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img', - fontSizes = tinymce.explode(editor.settings.font_size_style_values), - schema = editor.schema; - - // Override some internal formats to produce legacy elements and attributes - editor.formatter.register({ - // Change alignment formats to use the deprecated align attribute - alignleft : {selector : alignElements, attributes : {align : 'left'}}, - aligncenter : {selector : alignElements, attributes : {align : 'center'}}, - alignright : {selector : alignElements, attributes : {align : 'right'}}, - alignfull : {selector : alignElements, attributes : {align : 'justify'}}, - - // Change the basic formatting elements to use deprecated element types - bold : [ - {inline : 'b', remove : 'all'}, - {inline : 'strong', remove : 'all'}, - {inline : 'span', styles : {fontWeight : 'bold'}} - ], - italic : [ - {inline : 'i', remove : 'all'}, - {inline : 'em', remove : 'all'}, - {inline : 'span', styles : {fontStyle : 'italic'}} - ], - underline : [ - {inline : 'u', remove : 'all'}, - {inline : 'span', styles : {textDecoration : 'underline'}, exact : true} - ], - strikethrough : [ - {inline : 'strike', remove : 'all'}, - {inline : 'span', styles : {textDecoration: 'line-through'}, exact : true} - ], - - // Change font size and font family to use the deprecated font element - fontname : {inline : 'font', attributes : {face : '%value'}}, - fontsize : { - inline : 'font', - attributes : { - size : function(vars) { - return tinymce.inArray(fontSizes, vars.value) + 1; - } - } - }, - - // Setup font elements for colors as well - forecolor : {inline : 'font', attributes : {color : '%value'}}, - hilitecolor : {inline : 'font', styles : {backgroundColor : '%value'}} - }); - - // Check that deprecated elements are allowed if not add them - tinymce.each('b,i,u,strike'.split(','), function(name) { - schema.addValidElements(name + '[*]'); - }); - - // Add font element if it's missing - if (!schema.getElementRule("font")) - schema.addValidElements("font[face|size|color|style]"); - - // Add the missing and depreacted align attribute for the serialization engine - tinymce.each(alignElements.split(','), function(name) { - var rule = schema.getElementRule(name), found; - - if (rule) { - if (!rule.attributes.align) { - rule.attributes.align = {}; - rule.attributesOrder.push('align'); - } - } - }); - - // Listen for the onNodeChange event so that we can do special logic for the font size and font name drop boxes - editor.onNodeChange.add(function(editor, control_manager) { - var control, fontElm, fontName, fontSize; - - // Find font element get it's name and size - fontElm = editor.dom.getParent(editor.selection.getNode(), 'font'); - if (fontElm) { - fontName = fontElm.face; - fontSize = fontElm.size; - } - - // Select/unselect the font name in droplist - if (control = control_manager.get('fontselect')) { - control.select(function(value) { - return value == fontName; - }); - } - - // Select/unselect the font size in droplist - if (control = control_manager.get('fontsizeselect')) { - control.select(function(value) { - var index = tinymce.inArray(fontSizes, value.fontSize); - - return index + 1 == fontSize; - }); - } - }); - }); - }, - - getInfo : function() { - return { - longname : 'LegacyOutput', - author : 'Moxiecode Systems AB', - authorurl : 'http://tinymce.moxiecode.com', - infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/legacyoutput', - version : tinymce.majorVersion + "." + tinymce.minorVersion - }; - } - }); - - // Register plugin - tinymce.PluginManager.add('legacyoutput', tinymce.plugins.LegacyOutput); -})(tinymce); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/lists/editor_plugin.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/lists/editor_plugin.js deleted file mode 100644 index ec21b256ec..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/lists/editor_plugin.js +++ /dev/null @@ -1 +0,0 @@ -(function(){var e=tinymce.each,r=tinymce.dom.Event,g;function p(t,s){while(t&&(t.nodeType===8||(t.nodeType===3&&/^[ \t\n\r]*$/.test(t.nodeValue)))){t=s(t)}return t}function b(s){return p(s,function(t){return t.previousSibling})}function i(s){return p(s,function(t){return t.nextSibling})}function d(s,u,t){return s.dom.getParent(u,function(v){return tinymce.inArray(t,v)!==-1})}function n(s){return s&&(s.tagName==="OL"||s.tagName==="UL")}function c(u,v){var t,w,s;t=b(u.lastChild);while(n(t)){w=t;t=b(w.previousSibling)}if(w){s=v.create("li",{style:"list-style-type: none;"});v.split(u,w);v.insertAfter(s,w);s.appendChild(w);s.appendChild(w);u=s.previousSibling}return u}function m(t,s,u){t=a(t,s,u);return o(t,s,u)}function a(u,s,v){var t=b(u.previousSibling);if(t){return h(t,u,s?t:false,v)}else{return u}}function o(u,t,v){var s=i(u.nextSibling);if(s){return h(u,s,t?s:false,v)}else{return u}}function h(u,s,t,v){if(l(u,s,!!t,v)){return f(u,s,t)}else{if(u&&u.tagName==="LI"&&n(s)){u.appendChild(s)}}return s}function l(u,t,s,v){if(!u||!t){return false}else{if(u.tagName==="LI"&&t.tagName==="LI"){return t.style.listStyleType==="none"||j(t)}else{if(n(u)){return(u.tagName===t.tagName&&(s||u.style.listStyleType===t.style.listStyleType))||q(t)}else{return v&&u.tagName==="P"&&t.tagName==="P"}}}}function q(t){var s=i(t.firstChild),u=b(t.lastChild);return s&&u&&n(t)&&s===u&&(n(s)||s.style.listStyleType==="none"||j(s))}function j(u){var t=i(u.firstChild),s=b(u.lastChild);return t&&s&&t===s&&n(t)}function f(w,v,s){var u=b(w.lastChild),t=i(v.firstChild);if(w.tagName==="P"){w.appendChild(w.ownerDocument.createElement("br"))}while(v.firstChild){w.appendChild(v.firstChild)}if(s){w.style.listStyleType=s.style.listStyleType}v.parentNode.removeChild(v);h(u,t,false);return w}function k(t,u){var s;if(!u.is(t,"li,ol,ul")){s=u.getParent(t,"li");if(s){t=s}}return t}tinymce.create("tinymce.plugins.Lists",{init:function(y){var v="TABBING";var s="EMPTY";var J="ESCAPE";var z="PARAGRAPH";var N="UNKNOWN";var x=N;function E(U){return U.keyCode===tinymce.VK.TAB&&!(U.altKey||U.ctrlKey)&&(y.queryCommandState("InsertUnorderedList")||y.queryCommandState("InsertOrderedList"))}function w(){var U=B();var W=U.parentNode.parentNode;var V=U.parentNode.lastChild===U;return V&&!t(W)&&P(U)}function t(U){if(n(U)){return U.parentNode&&U.parentNode.tagName==="LI"}else{return U.tagName==="LI"}}function F(){return y.selection.isCollapsed()&&P(B())}function B(){var U=y.selection.getStart();return((U.tagName=="BR"||U.tagName=="")&&U.parentNode.tagName=="LI")?U.parentNode:U}function P(U){var V=U.childNodes.length;if(U.tagName==="LI"){return V==0?true:V==1&&(U.firstChild.tagName==""||U.firstChild.tagName=="BR"||H(U))}return false}function H(U){var V=tinymce.grep(U.parentNode.childNodes,function(Y){return Y.tagName=="LI"});var W=U==V[V.length-1];var X=U.firstChild;return tinymce.isIE9&&W&&(X.nodeValue==String.fromCharCode(160)||X.nodeValue==String.fromCharCode(32))}function T(U){return U.keyCode===tinymce.VK.ENTER}function A(U){return T(U)&&!U.shiftKey}function M(U){if(E(U)){return v}else{if(A(U)&&w()){return N}else{if(A(U)&&F()){return s}else{return N}}}}function D(U,V){if(x==v||x==s||tinymce.isGecko&&x==J){r.cancel(V)}}function C(){var U=y.selection.getRng(true);var V=U.startContainer;if(V.nodeType==3){var W=V.nodeValue;if(tinymce.isIE9&&W.length>1&&W.charCodeAt(W.length-1)==32){return(U.endOffset==W.length-1)}else{return(U.endOffset==W.length)}}else{if(V.nodeType==1){return U.endOffset==V.childNodes.length}}return false}function I(){var W=y.selection.getNode();var V="h1,h2,h3,h4,h5,h6,p,div";var U=y.dom.is(W,V)&&W.parentNode.tagName==="LI"&&W.parentNode.lastChild===W;return y.selection.isCollapsed()&&U&&C()}function K(W,Y){if(A(Y)&&I()){var X=W.selection.getNode();var V=W.dom.create("li");var U=W.dom.getParent(X,"li");W.dom.insertAfter(V,U);if(tinymce.isIE6||tinymce.isIE7||tinyMCE.isIE8){W.selection.setCursorLocation(V,1)}else{W.selection.setCursorLocation(V,0)}Y.preventDefault()}}function u(X,Z){var ac;if(!tinymce.isGecko){return}var V=X.selection.getStart();if(Z.keyCode!=tinymce.VK.BACKSPACE||V.tagName!=="IMG"){return}function W(ag){var ah=ag.firstChild;var af=null;do{if(!ah){break}if(ah.tagName==="LI"){af=ah}}while(ah=ah.nextSibling);return af}function ae(ag,af){while(ag.childNodes.length>0){af.appendChild(ag.childNodes[0])}}ac=V.parentNode.previousSibling;if(!ac){return}var aa;if(ac.tagName==="UL"||ac.tagName==="OL"){aa=ac}else{if(ac.previousSibling&&(ac.previousSibling.tagName==="UL"||ac.previousSibling.tagName==="OL")){aa=ac.previousSibling}else{return}}var ad=W(aa);var U=X.dom.createRng();U.setStart(ad,1);U.setEnd(ad,1);X.selection.setRng(U);X.selection.collapse(true);var Y=X.selection.getBookmark();var ab=V.parentNode.cloneNode(true);if(ab.tagName==="P"||ab.tagName==="DIV"){ae(ab,ad)}else{ad.appendChild(ab)}V.parentNode.parentNode.removeChild(V.parentNode);X.selection.moveToBookmark(Y)}function G(U){var V=y.dom.getParent(U,"ol,ul");if(V!=null){var W=V.lastChild;y.selection.setCursorLocation(W,0)}}this.ed=y;y.addCommand("Indent",this.indent,this);y.addCommand("Outdent",this.outdent,this);y.addCommand("InsertUnorderedList",function(){this.applyList("UL","OL")},this);y.addCommand("InsertOrderedList",function(){this.applyList("OL","UL")},this);y.onInit.add(function(){y.editorCommands.addCommands({outdent:function(){var V=y.selection,W=y.dom;function U(X){X=W.getParent(X,W.isBlock);return X&&(parseInt(y.dom.getStyle(X,"margin-left")||0,10)+parseInt(y.dom.getStyle(X,"padding-left")||0,10))>0}return U(V.getStart())||U(V.getEnd())||y.queryCommandState("InsertOrderedList")||y.queryCommandState("InsertUnorderedList")}},"state")});y.onKeyUp.add(function(V,W){if(x==v){V.execCommand(W.shiftKey?"Outdent":"Indent",true,null);x=N;return r.cancel(W)}else{if(x==s){var U=B();var Y=V.settings.list_outdent_on_enter===true||W.shiftKey;V.execCommand(Y?"Outdent":"Indent",true,null);if(tinymce.isIE){G(U)}return r.cancel(W)}else{if(x==J){if(tinymce.isIE6||tinymce.isIE7||tinymce.isIE8){var X=V.getDoc().createTextNode("\uFEFF");V.selection.getNode().appendChild(X)}else{if(tinymce.isIE9||tinymce.isGecko){V.execCommand("Outdent");return r.cancel(W)}}}}}});function L(V,U){var W=y.getDoc().createTextNode("\uFEFF");V.insertBefore(W,U);y.selection.setCursorLocation(W,0);y.execCommand("mceRepaint")}function R(V,X){if(T(X)){var U=B();if(U){var W=U.parentNode;var Y=W&&W.parentNode;if(Y&&Y.nodeName=="LI"&&Y.firstChild==W&&U==W.firstChild){L(Y,W)}}}}function S(V,X){if(T(X)){var U=B();if(V.dom.select("ul li",U).length===1){var W=U.firstChild;L(U,W)}}}function Q(W,aa){function X(ab){var ad=[];var ae=new tinymce.dom.TreeWalker(ab.firstChild,ab);for(var ac=ae.current();ac;ac=ae.next()){if(W.dom.is(ac,"ol,ul,li")){ad.push(ac)}}return ad}if(aa.keyCode==tinymce.VK.BACKSPACE){var U=B();if(U){var Z=W.dom.getParent(U,"ol,ul"),V=W.selection.getRng();if(Z&&Z.firstChild===U&&V.startOffset==0){var Y=X(U);Y.unshift(U);W.execCommand("Outdent",false,Y);W.undoManager.add();return r.cancel(aa)}}}}function O(V,X){var U=B();if(X.keyCode===tinymce.VK.BACKSPACE&&V.dom.is(U,"li")&&U.parentNode.firstChild!==U){if(V.dom.select("ul,ol",U).length===1){var Z=U.previousSibling;V.dom.remove(V.dom.select("br",U));V.dom.remove(U,true);var W=tinymce.grep(Z.childNodes,function(aa){return aa.nodeType===3});if(W.length===1){var Y=W[0];V.selection.setCursorLocation(Y,Y.length)}V.undoManager.add();return r.cancel(X)}}}y.onKeyDown.add(function(U,V){x=M(V)});y.onKeyDown.add(D);y.onKeyDown.add(u);y.onKeyDown.add(K);if(tinymce.isGecko){y.onKeyUp.add(R)}if(tinymce.isIE8){y.onKeyUp.add(S)}if(tinymce.isGecko||tinymce.isWebKit){y.onKeyDown.add(Q)}if(tinymce.isWebKit){y.onKeyDown.add(O)}},applyList:function(y,v){var C=this,z=C.ed,I=z.dom,s=[],H=false,u=false,w=false,B,G=z.selection.getSelectedBlocks();function E(t){if(t&&t.tagName==="BR"){I.remove(t)}}function F(M){var N=I.create(y),t;function L(O){if(O.style.marginLeft||O.style.paddingLeft){C.adjustPaddingFunction(false)(O)}}if(M.tagName==="LI"){}else{if(M.tagName==="P"||M.tagName==="DIV"||M.tagName==="BODY"){K(M,function(P,O){J(P,O,M.tagName==="BODY"?null:P.parentNode);t=P.parentNode;L(t);E(O)});if(t){if(t.tagName==="LI"&&(M.tagName==="P"||G.length>1)){I.split(t.parentNode.parentNode,t.parentNode)}m(t.parentNode,true)}return}else{t=I.create("li");I.insertAfter(t,M);t.appendChild(M);L(M);M=t}}I.insertAfter(N,M);N.appendChild(M);m(N,true);s.push(M)}function J(P,L,N){var t,O=P,M;while(!I.isBlock(P.parentNode)&&P.parentNode!==I.getRoot()){P=I.split(P.parentNode,P.previousSibling);P=P.nextSibling;O=P}if(N){t=N.cloneNode(true);P.parentNode.insertBefore(t,P);while(t.firstChild){I.remove(t.firstChild)}t=I.rename(t,"li")}else{t=I.create("li");P.parentNode.insertBefore(t,P)}while(O&&O!=L){M=O.nextSibling;t.appendChild(O);O=M}if(t.childNodes.length===0){t.innerHTML='
    '}F(t)}function K(Q,T){var N,R,O=3,L=1,t="br,ul,ol,p,div,h1,h2,h3,h4,h5,h6,table,blockquote,address,pre,form,center,dl";function P(X,U){var V=I.createRng(),W;g.keep=true;z.selection.moveToBookmark(g);g.keep=false;W=z.selection.getRng(true);if(!U){U=X.parentNode.lastChild}V.setStartBefore(X);V.setEndAfter(U);return !(V.compareBoundaryPoints(O,W)>0||V.compareBoundaryPoints(L,W)<=0)}function S(U){if(U.nextSibling){return U.nextSibling}if(!I.isBlock(U.parentNode)&&U.parentNode!==I.getRoot()){return S(U.parentNode)}}N=Q.firstChild;var M=false;e(I.select(t,Q),function(U){if(U.hasAttribute&&U.hasAttribute("_mce_bogus")){return true}if(P(N,U)){I.addClass(U,"_mce_tagged_br");N=S(U)}});M=(N&&P(N,undefined));N=Q.firstChild;e(I.select(t,Q),function(V){var U=S(V);if(V.hasAttribute&&V.hasAttribute("_mce_bogus")){return true}if(I.hasClass(V,"_mce_tagged_br")){T(N,V,R);R=null}else{R=V}N=U});if(M){T(N,undefined,R)}}function D(t){K(t,function(M,L,N){J(M,L);E(L);E(N)})}function A(t){if(tinymce.inArray(s,t)!==-1){return}if(t.parentNode.tagName===v){I.split(t.parentNode,t);F(t);o(t.parentNode,false)}s.push(t)}function x(M){var O,N,L,t;if(tinymce.inArray(s,M)!==-1){return}M=c(M,I);while(I.is(M.parentNode,"ol,ul,li")){I.split(M.parentNode,M)}s.push(M);M=I.rename(M,"p");L=m(M,false,z.settings.force_br_newlines);if(L===M){O=M.firstChild;while(O){if(I.isBlock(O)){O=I.split(O.parentNode,O);t=true;N=O.nextSibling&&O.nextSibling.firstChild}else{N=O.nextSibling;if(t&&O.tagName==="BR"){I.remove(O)}t=false}O=N}}}e(G,function(t){t=k(t,I);if(t.tagName===v||(t.tagName==="LI"&&t.parentNode.tagName===v)){u=true}else{if(t.tagName===y||(t.tagName==="LI"&&t.parentNode.tagName===y)){H=true}else{w=true}}});if(w&&!H||u||G.length===0){B={LI:A,H1:F,H2:F,H3:F,H4:F,H5:F,H6:F,P:F,BODY:F,DIV:G.length>1?F:D,defaultAction:D,elements:this.selectedBlocks()}}else{B={defaultAction:x,elements:this.selectedBlocks(),processEvenIfEmpty:true}}this.process(B)},indent:function(){var u=this.ed,w=u.dom,x=[];function s(z){var y=w.create("li",{style:"list-style-type: none;"});w.insertAfter(y,z);return y}function t(B){var y=s(B),D=w.getParent(B,"ol,ul"),C=D.tagName,E=w.getStyle(D,"list-style-type"),A={},z;if(E!==""){A.style="list-style-type: "+E+";"}z=w.create(C,A);y.appendChild(z);return z}function v(z){if(!d(u,z,x)){z=c(z,w);var y=t(z);y.appendChild(z);m(y.parentNode,false);m(y,false);x.push(z)}}this.process({LI:v,defaultAction:this.adjustPaddingFunction(true),elements:this.selectedBlocks()})},outdent:function(y,x){var w=this,u=w.ed,z=u.dom,s=[];function A(t){var C,B,D;if(!d(u,t,s)){if(z.getStyle(t,"margin-left")!==""||z.getStyle(t,"padding-left")!==""){return w.adjustPaddingFunction(false)(t)}D=z.getStyle(t,"text-align",true);if(D==="center"||D==="right"){z.setStyle(t,"text-align","left");return}t=c(t,z);C=t.parentNode;B=t.parentNode.parentNode;if(B.tagName==="P"){z.split(B,t.parentNode)}else{z.split(C,t);if(B.tagName==="LI"){z.split(B,t)}else{if(!z.is(B,"ol,ul")){z.rename(t,"p")}}}s.push(t)}}var v=x&&tinymce.is(x,"array")?x:this.selectedBlocks();this.process({LI:A,defaultAction:this.adjustPaddingFunction(false),elements:v});e(s,m)},process:function(y){var F=this,w=F.ed.selection,z=F.ed.dom,E,u;function B(t){var s=tinymce.grep(t.childNodes,function(H){return !(H.nodeName==="BR"||H.nodeName==="SPAN"&&z.getAttrib(H,"data-mce-type")=="bookmark"||H.nodeType==3&&(H.nodeValue==String.fromCharCode(160)||H.nodeValue==""))});return s.length===0}function x(s){z.removeClass(s,"_mce_act_on");if(!s||s.nodeType!==1||!y.processEvenIfEmpty&&E.length>1&&B(s)){return}s=k(s,z);var t=y[s.tagName];if(!t){t=y.defaultAction}t(s)}function v(s){F.splitSafeEach(s.childNodes,x,true)}function C(s,t){return t>=0&&s.hasChildNodes()&&t0){t=s.shift();w.removeClass(t,"_mce_act_on");u(t);s=w.select("._mce_act_on")}},adjustPaddingFunction:function(u){var s,v,t=this.ed;s=t.settings.indentation;v=/[a-z%]+/i.exec(s);s=parseInt(s,10);return function(w){var y,x;y=parseInt(t.dom.getStyle(w,"margin-left")||0,10)+parseInt(t.dom.getStyle(w,"padding-left")||0,10);if(u){x=y+s}else{x=y-s}t.dom.setStyle(w,"padding-left","");t.dom.setStyle(w,"margin-left",x>0?x+v:"")}},selectedBlocks:function(){var s=this.ed,t=s.selection.getSelectedBlocks();return t.length==0?[s.dom.getRoot()]:t},getInfo:function(){return{longname:"Lists",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/lists",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("lists",tinymce.plugins.Lists)}()); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/lists/editor_plugin_src.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/lists/editor_plugin_src.js deleted file mode 100644 index d9ea6d1793..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/lists/editor_plugin_src.js +++ /dev/null @@ -1,955 +0,0 @@ -/** - * editor_plugin_src.js - * - * Copyright 2011, Moxiecode Systems AB - * Released under LGPL License. - * - * License: http://tinymce.moxiecode.com/license - * Contributing: http://tinymce.moxiecode.com/contributing - */ - -(function() { - var each = tinymce.each, Event = tinymce.dom.Event, bookmark; - - // Skips text nodes that only contain whitespace since they aren't semantically important. - function skipWhitespaceNodes(e, next) { - while (e && (e.nodeType === 8 || (e.nodeType === 3 && /^[ \t\n\r]*$/.test(e.nodeValue)))) { - e = next(e); - } - return e; - } - - function skipWhitespaceNodesBackwards(e) { - return skipWhitespaceNodes(e, function(e) { - return e.previousSibling; - }); - } - - function skipWhitespaceNodesForwards(e) { - return skipWhitespaceNodes(e, function(e) { - return e.nextSibling; - }); - } - - function hasParentInList(ed, e, list) { - return ed.dom.getParent(e, function(p) { - return tinymce.inArray(list, p) !== -1; - }); - } - - function isList(e) { - return e && (e.tagName === 'OL' || e.tagName === 'UL'); - } - - function splitNestedLists(element, dom) { - var tmp, nested, wrapItem; - tmp = skipWhitespaceNodesBackwards(element.lastChild); - while (isList(tmp)) { - nested = tmp; - tmp = skipWhitespaceNodesBackwards(nested.previousSibling); - } - if (nested) { - wrapItem = dom.create('li', { style: 'list-style-type: none;'}); - dom.split(element, nested); - dom.insertAfter(wrapItem, nested); - wrapItem.appendChild(nested); - wrapItem.appendChild(nested); - element = wrapItem.previousSibling; - } - return element; - } - - function attemptMergeWithAdjacent(e, allowDifferentListStyles, mergeParagraphs) { - e = attemptMergeWithPrevious(e, allowDifferentListStyles, mergeParagraphs); - return attemptMergeWithNext(e, allowDifferentListStyles, mergeParagraphs); - } - - function attemptMergeWithPrevious(e, allowDifferentListStyles, mergeParagraphs) { - var prev = skipWhitespaceNodesBackwards(e.previousSibling); - if (prev) { - return attemptMerge(prev, e, allowDifferentListStyles ? prev : false, mergeParagraphs); - } else { - return e; - } - } - - function attemptMergeWithNext(e, allowDifferentListStyles, mergeParagraphs) { - var next = skipWhitespaceNodesForwards(e.nextSibling); - if (next) { - return attemptMerge(e, next, allowDifferentListStyles ? next : false, mergeParagraphs); - } else { - return e; - } - } - - function attemptMerge(e1, e2, differentStylesMasterElement, mergeParagraphs) { - if (canMerge(e1, e2, !!differentStylesMasterElement, mergeParagraphs)) { - return merge(e1, e2, differentStylesMasterElement); - } else if (e1 && e1.tagName === 'LI' && isList(e2)) { - // Fix invalidly nested lists. - e1.appendChild(e2); - } - return e2; - } - - function canMerge(e1, e2, allowDifferentListStyles, mergeParagraphs) { - if (!e1 || !e2) { - return false; - } else if (e1.tagName === 'LI' && e2.tagName === 'LI') { - return e2.style.listStyleType === 'none' || containsOnlyAList(e2); - } else if (isList(e1)) { - return (e1.tagName === e2.tagName && (allowDifferentListStyles || e1.style.listStyleType === e2.style.listStyleType)) || isListForIndent(e2); - } else return mergeParagraphs && e1.tagName === 'P' && e2.tagName === 'P'; - } - - function isListForIndent(e) { - var firstLI = skipWhitespaceNodesForwards(e.firstChild), lastLI = skipWhitespaceNodesBackwards(e.lastChild); - return firstLI && lastLI && isList(e) && firstLI === lastLI && (isList(firstLI) || firstLI.style.listStyleType === 'none' || containsOnlyAList(firstLI)); - } - - function containsOnlyAList(e) { - var firstChild = skipWhitespaceNodesForwards(e.firstChild), lastChild = skipWhitespaceNodesBackwards(e.lastChild); - return firstChild && lastChild && firstChild === lastChild && isList(firstChild); - } - - function merge(e1, e2, masterElement) { - var lastOriginal = skipWhitespaceNodesBackwards(e1.lastChild), firstNew = skipWhitespaceNodesForwards(e2.firstChild); - if (e1.tagName === 'P') { - e1.appendChild(e1.ownerDocument.createElement('br')); - } - while (e2.firstChild) { - e1.appendChild(e2.firstChild); - } - if (masterElement) { - e1.style.listStyleType = masterElement.style.listStyleType; - } - e2.parentNode.removeChild(e2); - attemptMerge(lastOriginal, firstNew, false); - return e1; - } - - function findItemToOperateOn(e, dom) { - var item; - if (!dom.is(e, 'li,ol,ul')) { - item = dom.getParent(e, 'li'); - if (item) { - e = item; - } - } - return e; - } - - tinymce.create('tinymce.plugins.Lists', { - init: function(ed) { - var LIST_TABBING = 'TABBING'; - var LIST_EMPTY_ITEM = 'EMPTY'; - var LIST_ESCAPE = 'ESCAPE'; - var LIST_PARAGRAPH = 'PARAGRAPH'; - var LIST_UNKNOWN = 'UNKNOWN'; - var state = LIST_UNKNOWN; - - function isTabInList(e) { - // Don't indent on Ctrl+Tab or Alt+Tab - return e.keyCode === tinymce.VK.TAB && !(e.altKey || e.ctrlKey) && - (ed.queryCommandState('InsertUnorderedList') || ed.queryCommandState('InsertOrderedList')); - } - - function isOnLastListItem() { - var li = getLi(); - var grandParent = li.parentNode.parentNode; - var isLastItem = li.parentNode.lastChild === li; - return isLastItem && !isNestedList(grandParent) && isEmptyListItem(li); - } - - function isNestedList(grandParent) { - if (isList(grandParent)) { - return grandParent.parentNode && grandParent.parentNode.tagName === 'LI'; - } else { - return grandParent.tagName === 'LI'; - } - } - - function isInEmptyListItem() { - return ed.selection.isCollapsed() && isEmptyListItem(getLi()); - } - - function getLi() { - var n = ed.selection.getStart(); - // Get start will return BR if the LI only contains a BR or an empty element as we use these to fix caret position - return ((n.tagName == 'BR' || n.tagName == '') && n.parentNode.tagName == 'LI') ? n.parentNode : n; - } - - function isEmptyListItem(li) { - var numChildren = li.childNodes.length; - if (li.tagName === 'LI') { - return numChildren == 0 ? true : numChildren == 1 && (li.firstChild.tagName == '' || li.firstChild.tagName == 'BR' || isEmptyIE9Li(li)); - } - return false; - } - - function isEmptyIE9Li(li) { - // only consider this to be last item if there is no list item content or that content is nbsp or space since IE9 creates these - var lis = tinymce.grep(li.parentNode.childNodes, function(n) {return n.tagName == 'LI'}); - var isLastLi = li == lis[lis.length - 1]; - var child = li.firstChild; - return tinymce.isIE9 && isLastLi && (child.nodeValue == String.fromCharCode(160) || child.nodeValue == String.fromCharCode(32)); - } - - function isEnter(e) { - return e.keyCode === tinymce.VK.ENTER; - } - - function isEnterWithoutShift(e) { - return isEnter(e) && !e.shiftKey; - } - - function getListKeyState(e) { - if (isTabInList(e)) { - return LIST_TABBING; - } else if (isEnterWithoutShift(e) && isOnLastListItem()) { - // Returns LIST_UNKNOWN since breaking out of lists is handled by the EnterKey.js logic now - //return LIST_ESCAPE; - return LIST_UNKNOWN; - } else if (isEnterWithoutShift(e) && isInEmptyListItem()) { - return LIST_EMPTY_ITEM; - } else { - return LIST_UNKNOWN; - } - } - - function cancelDefaultEvents(ed, e) { - // list escape is done manually using outdent as it does not create paragraphs correctly in td's - if (state == LIST_TABBING || state == LIST_EMPTY_ITEM || tinymce.isGecko && state == LIST_ESCAPE) { - Event.cancel(e); - } - } - - function isCursorAtEndOfContainer() { - var range = ed.selection.getRng(true); - var startContainer = range.startContainer; - if (startContainer.nodeType == 3) { - var value = startContainer.nodeValue; - if (tinymce.isIE9 && value.length > 1 && value.charCodeAt(value.length-1) == 32) { - // IE9 places a space on the end of the text in some cases so ignore last char - return (range.endOffset == value.length-1); - } else { - return (range.endOffset == value.length); - } - } else if (startContainer.nodeType == 1) { - return range.endOffset == startContainer.childNodes.length; - } - return false; - } - - /* - If we are at the end of a list item surrounded with an element, pressing enter should create a - new list item instead without splitting the element e.g. don't want to create new P or H1 tag - */ - function isEndOfListItem() { - var node = ed.selection.getNode(); - var validElements = 'h1,h2,h3,h4,h5,h6,p,div'; - var isLastParagraphOfLi = ed.dom.is(node, validElements) && node.parentNode.tagName === 'LI' && node.parentNode.lastChild === node; - return ed.selection.isCollapsed() && isLastParagraphOfLi && isCursorAtEndOfContainer(); - } - - // Creates a new list item after the current selection's list item parent - function createNewLi(ed, e) { - if (isEnterWithoutShift(e) && isEndOfListItem()) { - var node = ed.selection.getNode(); - var li = ed.dom.create("li"); - var parentLi = ed.dom.getParent(node, 'li'); - ed.dom.insertAfter(li, parentLi); - - // Move caret to new list element. - if (tinymce.isIE6 || tinymce.isIE7 || tinyMCE.isIE8) { - // Removed this line since it would create an odd < > tag and placing the caret inside an empty LI is handled and should be handled by the selection logic - //li.appendChild(ed.dom.create(" ")); // IE needs an element within the bullet point - ed.selection.setCursorLocation(li, 1); - } else { - ed.selection.setCursorLocation(li, 0); - } - e.preventDefault(); - } - } - - function imageJoiningListItem(ed, e) { - var prevSibling; - - if (!tinymce.isGecko) - return; - - var n = ed.selection.getStart(); - if (e.keyCode != tinymce.VK.BACKSPACE || n.tagName !== 'IMG') - return; - - function lastLI(node) { - var child = node.firstChild; - var li = null; - do { - if (!child) - break; - - if (child.tagName === 'LI') - li = child; - } while (child = child.nextSibling); - - return li; - } - - function addChildren(parentNode, destination) { - while (parentNode.childNodes.length > 0) - destination.appendChild(parentNode.childNodes[0]); - } - - // Check if there is a previous sibling - prevSibling = n.parentNode.previousSibling; - if (!prevSibling) - return; - - var ul; - if (prevSibling.tagName === 'UL' || prevSibling.tagName === 'OL') - ul = prevSibling; - else if (prevSibling.previousSibling && (prevSibling.previousSibling.tagName === 'UL' || prevSibling.previousSibling.tagName === 'OL')) - ul = prevSibling.previousSibling; - else - return; - - var li = lastLI(ul); - - // move the caret to the end of the list item - var rng = ed.dom.createRng(); - rng.setStart(li, 1); - rng.setEnd(li, 1); - ed.selection.setRng(rng); - ed.selection.collapse(true); - - // save a bookmark at the end of the list item - var bookmark = ed.selection.getBookmark(); - - // copy the image an its text to the list item - var clone = n.parentNode.cloneNode(true); - if (clone.tagName === 'P' || clone.tagName === 'DIV') - addChildren(clone, li); - else - li.appendChild(clone); - - // remove the old copy of the image - n.parentNode.parentNode.removeChild(n.parentNode); - - // move the caret where we saved the bookmark - ed.selection.moveToBookmark(bookmark); - } - - // fix the cursor position to ensure it is correct in IE - function setCursorPositionToOriginalLi(li) { - var list = ed.dom.getParent(li, 'ol,ul'); - if (list != null) { - var lastLi = list.lastChild; - // Removed this line since IE9 would report an DOM character error and placing the caret inside an empty LI is handled and should be handled by the selection logic - //lastLi.appendChild(ed.getDoc().createElement('')); - ed.selection.setCursorLocation(lastLi, 0); - } - } - - this.ed = ed; - ed.addCommand('Indent', this.indent, this); - ed.addCommand('Outdent', this.outdent, this); - ed.addCommand('InsertUnorderedList', function() { - this.applyList('UL', 'OL'); - }, this); - ed.addCommand('InsertOrderedList', function() { - this.applyList('OL', 'UL'); - }, this); - - ed.onInit.add(function() { - ed.editorCommands.addCommands({ - 'outdent': function() { - var sel = ed.selection, dom = ed.dom; - - function hasStyleIndent(n) { - n = dom.getParent(n, dom.isBlock); - return n && (parseInt(ed.dom.getStyle(n, 'margin-left') || 0, 10) + parseInt(ed.dom.getStyle(n, 'padding-left') || 0, 10)) > 0; - } - - return hasStyleIndent(sel.getStart()) || hasStyleIndent(sel.getEnd()) || ed.queryCommandState('InsertOrderedList') || ed.queryCommandState('InsertUnorderedList'); - } - }, 'state'); - }); - - ed.onKeyUp.add(function(ed, e) { - if (state == LIST_TABBING) { - ed.execCommand(e.shiftKey ? 'Outdent' : 'Indent', true, null); - state = LIST_UNKNOWN; - return Event.cancel(e); - } else if (state == LIST_EMPTY_ITEM) { - var li = getLi(); - var shouldOutdent = ed.settings.list_outdent_on_enter === true || e.shiftKey; - ed.execCommand(shouldOutdent ? 'Outdent' : 'Indent', true, null); - if (tinymce.isIE) { - setCursorPositionToOriginalLi(li); - } - - return Event.cancel(e); - } else if (state == LIST_ESCAPE) { - if (tinymce.isIE6 || tinymce.isIE7 || tinymce.isIE8) { - // append a zero sized nbsp so that caret is positioned correctly in IE after escaping and applying formatting. - // if there is no text then applying formatting for e.g a H1 to the P tag immediately following list after - // escaping from it will cause the caret to be positioned on the last li instead of staying the in P tag. - var n = ed.getDoc().createTextNode('\uFEFF'); - ed.selection.getNode().appendChild(n); - } else if (tinymce.isIE9 || tinymce.isGecko) { - // IE9 does not escape the list so we use outdent to do this and cancel the default behaviour - // Gecko does not create a paragraph outdenting inside a TD so default behaviour is cancelled and we outdent ourselves - ed.execCommand('Outdent'); - return Event.cancel(e); - } - } - }); - - function fixListItem(parent, reference) { - // a zero-sized non-breaking space is placed in the empty list item so that the nested list is - // displayed on the below line instead of next to it - var n = ed.getDoc().createTextNode('\uFEFF'); - parent.insertBefore(n, reference); - ed.selection.setCursorLocation(n, 0); - // repaint to remove rendering artifact. only visible when creating new list - ed.execCommand('mceRepaint'); - } - - function fixIndentedListItemForGecko(ed, e) { - if (isEnter(e)) { - var li = getLi(); - if (li) { - var parent = li.parentNode; - var grandParent = parent && parent.parentNode; - if (grandParent && grandParent.nodeName == 'LI' && grandParent.firstChild == parent && li == parent.firstChild) { - fixListItem(grandParent, parent); - } - } - } - } - - function fixIndentedListItemForIE8(ed, e) { - if (isEnter(e)) { - var li = getLi(); - if (ed.dom.select('ul li', li).length === 1) { - var list = li.firstChild; - fixListItem(li, list); - } - } - } - - function fixDeletingFirstCharOfList(ed, e) { - function listElements(li) { - var elements = []; - var walker = new tinymce.dom.TreeWalker(li.firstChild, li); - for (var node = walker.current(); node; node = walker.next()) { - if (ed.dom.is(node, 'ol,ul,li')) { - elements.push(node); - } - } - return elements; - } - - if (e.keyCode == tinymce.VK.BACKSPACE) { - var li = getLi(); - if (li) { - var list = ed.dom.getParent(li, 'ol,ul'), - rng = ed.selection.getRng(); - if (list && list.firstChild === li && rng.startOffset == 0) { - var elements = listElements(li); - elements.unshift(li); - ed.execCommand("Outdent", false, elements); - ed.undoManager.add(); - return Event.cancel(e); - } - } - } - } - - function fixDeletingEmptyLiInWebkit(ed, e) { - var li = getLi(); - if (e.keyCode === tinymce.VK.BACKSPACE && ed.dom.is(li, 'li') && li.parentNode.firstChild!==li) { - if (ed.dom.select('ul,ol', li).length === 1) { - var prevLi = li.previousSibling; - ed.dom.remove(ed.dom.select('br', li)); - ed.dom.remove(li, true); - var textNodes = tinymce.grep(prevLi.childNodes, function(n){ return n.nodeType === 3 }); - if (textNodes.length === 1) { - var textNode = textNodes[0]; - ed.selection.setCursorLocation(textNode, textNode.length); - } - ed.undoManager.add(); - return Event.cancel(e); - } - } - } - - ed.onKeyDown.add(function(_, e) { state = getListKeyState(e); }); - ed.onKeyDown.add(cancelDefaultEvents); - ed.onKeyDown.add(imageJoiningListItem); - ed.onKeyDown.add(createNewLi); - - if (tinymce.isGecko) { - ed.onKeyUp.add(fixIndentedListItemForGecko); - } - if (tinymce.isIE8) { - ed.onKeyUp.add(fixIndentedListItemForIE8); - } - if (tinymce.isGecko || tinymce.isWebKit) { - ed.onKeyDown.add(fixDeletingFirstCharOfList); - } - if (tinymce.isWebKit) { - ed.onKeyDown.add(fixDeletingEmptyLiInWebkit); - } - }, - - applyList: function(targetListType, oppositeListType) { - var t = this, ed = t.ed, dom = ed.dom, applied = [], hasSameType = false, hasOppositeType = false, hasNonList = false, actions, - selectedBlocks = ed.selection.getSelectedBlocks(); - - function cleanupBr(e) { - if (e && e.tagName === 'BR') { - dom.remove(e); - } - } - - function makeList(element) { - var list = dom.create(targetListType), li; - - function adjustIndentForNewList(element) { - // If there's a margin-left, outdent one level to account for the extra list margin. - if (element.style.marginLeft || element.style.paddingLeft) { - t.adjustPaddingFunction(false)(element); - } - } - - if (element.tagName === 'LI') { - // No change required. - } else if (element.tagName === 'P' || element.tagName === 'DIV' || element.tagName === 'BODY') { - processBrs(element, function(startSection, br) { - doWrapList(startSection, br, element.tagName === 'BODY' ? null : startSection.parentNode); - li = startSection.parentNode; - adjustIndentForNewList(li); - cleanupBr(br); - }); - if (li) { - if (li.tagName === 'LI' && (element.tagName === 'P' || selectedBlocks.length > 1)) { - dom.split(li.parentNode.parentNode, li.parentNode); - } - attemptMergeWithAdjacent(li.parentNode, true); - } - return; - } else { - // Put the list around the element. - li = dom.create('li'); - dom.insertAfter(li, element); - li.appendChild(element); - adjustIndentForNewList(element); - element = li; - } - dom.insertAfter(list, element); - list.appendChild(element); - attemptMergeWithAdjacent(list, true); - applied.push(element); - } - - function doWrapList(start, end, template) { - var li, n = start, tmp; - while (!dom.isBlock(start.parentNode) && start.parentNode !== dom.getRoot()) { - start = dom.split(start.parentNode, start.previousSibling); - start = start.nextSibling; - n = start; - } - if (template) { - li = template.cloneNode(true); - start.parentNode.insertBefore(li, start); - while (li.firstChild) dom.remove(li.firstChild); - li = dom.rename(li, 'li'); - } else { - li = dom.create('li'); - start.parentNode.insertBefore(li, start); - } - while (n && n != end) { - tmp = n.nextSibling; - li.appendChild(n); - n = tmp; - } - if (li.childNodes.length === 0) { - li.innerHTML = '
    '; - } - makeList(li); - } - - function processBrs(element, callback) { - var startSection, previousBR, END_TO_START = 3, START_TO_END = 1, - breakElements = 'br,ul,ol,p,div,h1,h2,h3,h4,h5,h6,table,blockquote,address,pre,form,center,dl'; - - function isAnyPartSelected(start, end) { - var r = dom.createRng(), sel; - bookmark.keep = true; - ed.selection.moveToBookmark(bookmark); - bookmark.keep = false; - sel = ed.selection.getRng(true); - if (!end) { - end = start.parentNode.lastChild; - } - r.setStartBefore(start); - r.setEndAfter(end); - return !(r.compareBoundaryPoints(END_TO_START, sel) > 0 || r.compareBoundaryPoints(START_TO_END, sel) <= 0); - } - - function nextLeaf(br) { - if (br.nextSibling) - return br.nextSibling; - if (!dom.isBlock(br.parentNode) && br.parentNode !== dom.getRoot()) - return nextLeaf(br.parentNode); - } - - // Split on BRs within the range and process those. - startSection = element.firstChild; - // First mark the BRs that have any part of the previous section selected. - var trailingContentSelected = false; - each(dom.select(breakElements, element), function(br) { - if (br.hasAttribute && br.hasAttribute('_mce_bogus')) { - return true; // Skip the bogus Brs that are put in to appease Firefox and Safari. - } - if (isAnyPartSelected(startSection, br)) { - dom.addClass(br, '_mce_tagged_br'); - startSection = nextLeaf(br); - } - }); - trailingContentSelected = (startSection && isAnyPartSelected(startSection, undefined)); - startSection = element.firstChild; - each(dom.select(breakElements, element), function(br) { - // Got a section from start to br. - var tmp = nextLeaf(br); - if (br.hasAttribute && br.hasAttribute('_mce_bogus')) { - return true; // Skip the bogus Brs that are put in to appease Firefox and Safari. - } - if (dom.hasClass(br, '_mce_tagged_br')) { - callback(startSection, br, previousBR); - previousBR = null; - } else { - previousBR = br; - } - startSection = tmp; - }); - if (trailingContentSelected) { - callback(startSection, undefined, previousBR); - } - } - - function wrapList(element) { - processBrs(element, function(startSection, br, previousBR) { - // Need to indent this part - doWrapList(startSection, br); - cleanupBr(br); - cleanupBr(previousBR); - }); - } - - function changeList(element) { - if (tinymce.inArray(applied, element) !== -1) { - return; - } - if (element.parentNode.tagName === oppositeListType) { - dom.split(element.parentNode, element); - makeList(element); - attemptMergeWithNext(element.parentNode, false); - } - applied.push(element); - } - - function convertListItemToParagraph(element) { - var child, nextChild, mergedElement, splitLast; - if (tinymce.inArray(applied, element) !== -1) { - return; - } - element = splitNestedLists(element, dom); - while (dom.is(element.parentNode, 'ol,ul,li')) { - dom.split(element.parentNode, element); - } - // Push the original element we have from the selection, not the renamed one. - applied.push(element); - element = dom.rename(element, 'p'); - mergedElement = attemptMergeWithAdjacent(element, false, ed.settings.force_br_newlines); - if (mergedElement === element) { - // Now split out any block elements that can't be contained within a P. - // Manually iterate to ensure we handle modifications correctly (doesn't work with tinymce.each) - child = element.firstChild; - while (child) { - if (dom.isBlock(child)) { - child = dom.split(child.parentNode, child); - splitLast = true; - nextChild = child.nextSibling && child.nextSibling.firstChild; - } else { - nextChild = child.nextSibling; - if (splitLast && child.tagName === 'BR') { - dom.remove(child); - } - splitLast = false; - } - child = nextChild; - } - } - } - - each(selectedBlocks, function(e) { - e = findItemToOperateOn(e, dom); - if (e.tagName === oppositeListType || (e.tagName === 'LI' && e.parentNode.tagName === oppositeListType)) { - hasOppositeType = true; - } else if (e.tagName === targetListType || (e.tagName === 'LI' && e.parentNode.tagName === targetListType)) { - hasSameType = true; - } else { - hasNonList = true; - } - }); - - if (hasNonList &&!hasSameType || hasOppositeType || selectedBlocks.length === 0) { - actions = { - 'LI': changeList, - 'H1': makeList, - 'H2': makeList, - 'H3': makeList, - 'H4': makeList, - 'H5': makeList, - 'H6': makeList, - 'P': makeList, - 'BODY': makeList, - 'DIV': selectedBlocks.length > 1 ? makeList : wrapList, - defaultAction: wrapList, - elements: this.selectedBlocks() - }; - } else { - actions = { - defaultAction: convertListItemToParagraph, - elements: this.selectedBlocks(), - processEvenIfEmpty: true - }; - } - this.process(actions); - }, - - indent: function() { - var ed = this.ed, dom = ed.dom, indented = []; - - function createWrapItem(element) { - var wrapItem = dom.create('li', { style: 'list-style-type: none;'}); - dom.insertAfter(wrapItem, element); - return wrapItem; - } - - function createWrapList(element) { - var wrapItem = createWrapItem(element), - list = dom.getParent(element, 'ol,ul'), - listType = list.tagName, - listStyle = dom.getStyle(list, 'list-style-type'), - attrs = {}, - wrapList; - if (listStyle !== '') { - attrs.style = 'list-style-type: ' + listStyle + ';'; - } - wrapList = dom.create(listType, attrs); - wrapItem.appendChild(wrapList); - return wrapList; - } - - function indentLI(element) { - if (!hasParentInList(ed, element, indented)) { - element = splitNestedLists(element, dom); - var wrapList = createWrapList(element); - wrapList.appendChild(element); - attemptMergeWithAdjacent(wrapList.parentNode, false); - attemptMergeWithAdjacent(wrapList, false); - indented.push(element); - } - } - - this.process({ - 'LI': indentLI, - defaultAction: this.adjustPaddingFunction(true), - elements: this.selectedBlocks() - }); - - }, - - outdent: function(ui, elements) { - var t = this, ed = t.ed, dom = ed.dom, outdented = []; - - function outdentLI(element) { - var listElement, targetParent, align; - if (!hasParentInList(ed, element, outdented)) { - if (dom.getStyle(element, 'margin-left') !== '' || dom.getStyle(element, 'padding-left') !== '') { - return t.adjustPaddingFunction(false)(element); - } - align = dom.getStyle(element, 'text-align', true); - if (align === 'center' || align === 'right') { - dom.setStyle(element, 'text-align', 'left'); - return; - } - element = splitNestedLists(element, dom); - listElement = element.parentNode; - targetParent = element.parentNode.parentNode; - if (targetParent.tagName === 'P') { - dom.split(targetParent, element.parentNode); - } else { - dom.split(listElement, element); - if (targetParent.tagName === 'LI') { - // Nested list, need to split the LI and go back out to the OL/UL element. - dom.split(targetParent, element); - } else if (!dom.is(targetParent, 'ol,ul')) { - dom.rename(element, 'p'); - } - } - outdented.push(element); - } - } - - var listElements = elements && tinymce.is(elements, 'array') ? elements : this.selectedBlocks(); - this.process({ - 'LI': outdentLI, - defaultAction: this.adjustPaddingFunction(false), - elements: listElements - }); - - each(outdented, attemptMergeWithAdjacent); - }, - - process: function(actions) { - var t = this, sel = t.ed.selection, dom = t.ed.dom, selectedBlocks, r; - - function isEmptyElement(element) { - var excludeBrsAndBookmarks = tinymce.grep(element.childNodes, function(n) { - return !(n.nodeName === 'BR' || n.nodeName === 'SPAN' && dom.getAttrib(n, 'data-mce-type') == 'bookmark' - || n.nodeType == 3 && (n.nodeValue == String.fromCharCode(160) || n.nodeValue == '')); - }); - return excludeBrsAndBookmarks.length === 0; - } - - function processElement(element) { - dom.removeClass(element, '_mce_act_on'); - if (!element || element.nodeType !== 1 || ! actions.processEvenIfEmpty && selectedBlocks.length > 1 && isEmptyElement(element)) { - return; - } - element = findItemToOperateOn(element, dom); - var action = actions[element.tagName]; - if (!action) { - action = actions.defaultAction; - } - action(element); - } - - function recurse(element) { - t.splitSafeEach(element.childNodes, processElement, true); - } - - function brAtEdgeOfSelection(container, offset) { - return offset >= 0 && container.hasChildNodes() && offset < container.childNodes.length && - container.childNodes[offset].tagName === 'BR'; - } - - function isInTable() { - var n = sel.getNode(); - var p = dom.getParent(n, 'td'); - return p !== null; - } - - selectedBlocks = actions.elements; - - r = sel.getRng(true); - if (!r.collapsed) { - if (brAtEdgeOfSelection(r.endContainer, r.endOffset - 1)) { - r.setEnd(r.endContainer, r.endOffset - 1); - sel.setRng(r); - } - if (brAtEdgeOfSelection(r.startContainer, r.startOffset)) { - r.setStart(r.startContainer, r.startOffset + 1); - sel.setRng(r); - } - } - - - if (tinymce.isIE8) { - // append a zero sized nbsp so that caret is restored correctly using bookmark - var s = t.ed.selection.getNode(); - if (s.tagName === 'LI' && !(s.parentNode.lastChild === s)) { - var i = t.ed.getDoc().createTextNode('\uFEFF'); - s.appendChild(i); - } - } - - bookmark = sel.getBookmark(); - actions.OL = actions.UL = recurse; - t.splitSafeEach(selectedBlocks, processElement); - sel.moveToBookmark(bookmark); - bookmark = null; - - // we avoid doing repaint in a table as this will move the caret out of the table in Firefox 3.6 - if (!isInTable()) { - // Avoids table or image handles being left behind in Firefox. - t.ed.execCommand('mceRepaint'); - } - }, - - splitSafeEach: function(elements, f, forceClassBase) { - if (forceClassBase || - (tinymce.isGecko && - (/Firefox\/[12]\.[0-9]/.test(navigator.userAgent) || - /Firefox\/3\.[0-4]/.test(navigator.userAgent)))) { - this.classBasedEach(elements, f); - } else { - each(elements, f); - } - }, - - classBasedEach: function(elements, f) { - var dom = this.ed.dom, nodes, element; - // Mark nodes - each(elements, function(element) { - dom.addClass(element, '_mce_act_on'); - }); - nodes = dom.select('._mce_act_on'); - while (nodes.length > 0) { - element = nodes.shift(); - dom.removeClass(element, '_mce_act_on'); - f(element); - nodes = dom.select('._mce_act_on'); - } - }, - - adjustPaddingFunction: function(isIndent) { - var indentAmount, indentUnits, ed = this.ed; - indentAmount = ed.settings.indentation; - indentUnits = /[a-z%]+/i.exec(indentAmount); - indentAmount = parseInt(indentAmount, 10); - return function(element) { - var currentIndent, newIndentAmount; - currentIndent = parseInt(ed.dom.getStyle(element, 'margin-left') || 0, 10) + parseInt(ed.dom.getStyle(element, 'padding-left') || 0, 10); - if (isIndent) { - newIndentAmount = currentIndent + indentAmount; - } else { - newIndentAmount = currentIndent - indentAmount; - } - ed.dom.setStyle(element, 'padding-left', ''); - ed.dom.setStyle(element, 'margin-left', newIndentAmount > 0 ? newIndentAmount + indentUnits : ''); - }; - }, - - selectedBlocks: function() { - var ed = this.ed, selectedBlocks = ed.selection.getSelectedBlocks(); - return selectedBlocks.length == 0 ? [ ed.dom.getRoot() ] : selectedBlocks; - }, - - getInfo: function() { - return { - longname : 'Lists', - author : 'Moxiecode Systems AB', - authorurl : 'http://tinymce.moxiecode.com', - infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/lists', - version : tinymce.majorVersion + "." + tinymce.minorVersion - }; - } - }); - tinymce.PluginManager.add("lists", tinymce.plugins.Lists); -}()); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/css/media.css b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/css/media.css deleted file mode 100644 index 0c45c7ff6d..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/css/media.css +++ /dev/null @@ -1,17 +0,0 @@ -#id, #name, #hspace, #vspace, #class_name, #align { width: 100px } -#hspace, #vspace { width: 50px } -#flash_quality, #flash_align, #flash_scale, #flash_salign, #flash_wmode { width: 100px } -#flash_base, #flash_flashvars, #html5_altsource1, #html5_altsource2, #html5_poster { width: 240px } -#width, #height { width: 40px } -#src, #media_type { width: 250px } -#class { width: 120px } -#prev { margin: 0; border: 1px solid black; width: 380px; height: 260px; overflow: auto } -.panel_wrapper div.current { height: 420px; overflow: auto } -#flash_options, #shockwave_options, #qt_options, #wmp_options, #rmp_options { display: none } -.mceAddSelectValue { background-color: #DDDDDD } -#qt_starttime, #qt_endtime, #qt_fov, #qt_href, #qt_moveid, #qt_moviename, #qt_node, #qt_pan, #qt_qtsrc, #qt_qtsrcchokespeed, #qt_target, #qt_tilt, #qt_urlsubstituten, #qt_volume { width: 70px } -#wmp_balance, #wmp_baseurl, #wmp_captioningid, #wmp_currentmarker, #wmp_currentposition, #wmp_defaultframe, #wmp_playcount, #wmp_rate, #wmp_uimode, #wmp_volume { width: 70px } -#rmp_console, #rmp_numloop, #rmp_controls, #rmp_scriptcallbacks { width: 70px } -#shockwave_swvolume, #shockwave_swframe, #shockwave_swurl, #shockwave_swstretchvalign, #shockwave_swstretchhalign, #shockwave_swstretchstyle { width: 90px } -#qt_qtsrc { width: 200px } -iframe {border: 1px solid gray} diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/editor_plugin.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/editor_plugin.js deleted file mode 100644 index 9ac42e0d21..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/editor_plugin.js +++ /dev/null @@ -1 +0,0 @@ -(function(){var b=tinymce.explode("id,name,width,height,style,align,class,hspace,vspace,bgcolor,type"),a=tinymce.makeMap(b.join(",")),f=tinymce.html.Node,d,i,h=tinymce.util.JSON,g;d=[["Flash","d27cdb6e-ae6d-11cf-96b8-444553540000","application/x-shockwave-flash","http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"],["ShockWave","166b1bca-3f9c-11cf-8075-444553540000","application/x-director","http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0"],["WindowsMedia","6bf52a52-394a-11d3-b153-00c04f79faa6,22d6f312-b0f6-11d0-94ab-0080c74c7e95,05589fa1-c356-11ce-bf01-00aa0055595a","application/x-mplayer2","http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"],["QuickTime","02bf25d5-8c17-4b23-bc80-d3488abddc6b","video/quicktime","http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0"],["RealMedia","cfcdaa03-8be4-11cf-b84b-0020afbbccfa","audio/x-pn-realaudio-plugin","http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"],["Java","8ad9c840-044e-11d1-b3e9-00805f499d93","application/x-java-applet","http://java.sun.com/products/plugin/autodl/jinstall-1_5_0-windows-i586.cab#Version=1,5,0,0"],["Silverlight","dfeaf541-f3e1-4c24-acac-99c30715084a","application/x-silverlight-2"],["Iframe"],["Video"],["EmbeddedAudio"],["Audio"]];function e(j){return typeof(j)=="string"?j.replace(/[^0-9%]/g,""):j}function c(m){var l,j,k;if(m&&!m.splice){j=[];for(k=0;true;k++){if(m[k]){j[k]=m[k]}else{break}}return j}return m}tinymce.create("tinymce.plugins.MediaPlugin",{init:function(n,j){var r=this,l={},m,p,q,k;function o(s){return s&&s.nodeName==="IMG"&&n.dom.hasClass(s,"mceItemMedia")}r.editor=n;r.url=j;i="";for(m=0;m0){O+=(O?"&":"")+P+"="+escape(Q)}});if(O.length){G.params.flashvars=O}L=p.getParam("flash_video_player_params",{allowfullscreen:true,allowscriptaccess:true});tinymce.each(L,function(Q,P){G.params[P]=""+Q})}}G=z.attr("data-mce-json");if(!G){return}G=h.parse(G);q=this.getType(z.attr("class"));B=z.attr("data-mce-style");if(!B){B=z.attr("style");if(B){B=p.dom.serializeStyle(p.dom.parseStyle(B,"img"))}}G.width=z.attr("width")||G.width;G.height=z.attr("height")||G.height;if(q.name==="Iframe"){x=new f("iframe",1);tinymce.each(b,function(n){var J=z.attr(n);if(n=="class"&&J){J=J.replace(/mceItem.+ ?/g,"")}if(J&&J.length>0){x.attr(n,J)}});for(I in G.params){x.attr(I,G.params[I])}x.attr({style:B,src:G.params.src});z.replace(x);return}if(this.editor.settings.media_use_script){x=new f("script",1).attr("type","text/javascript");y=new f("#text",3);y.value="write"+q.name+"("+h.serialize(tinymce.extend(G.params,{width:z.attr("width"),height:z.attr("height")}))+");";x.append(y);z.replace(x);return}if(q.name==="Video"&&G.video.sources[0]){C=new f("video",1).attr(tinymce.extend({id:z.attr("id"),width:e(z.attr("width")),height:e(z.attr("height")),style:B},G.video.attrs));if(G.video.attrs){l=G.video.attrs.poster}k=G.video.sources=c(G.video.sources);for(A=0;A 0) - flashVarsOutput += (flashVarsOutput ? '&' : '') + name + '=' + escape(value); - }); - - if (flashVarsOutput.length) - data.params.flashvars = flashVarsOutput; - - params = editor.getParam('flash_video_player_params', { - allowfullscreen: true, - allowscriptaccess: true - }); - - tinymce.each(params, function(value, name) { - data.params[name] = "" + value; - }); - } - }; - - data = node.attr('data-mce-json'); - if (!data) - return; - - data = JSON.parse(data); - typeItem = this.getType(node.attr('class')); - - style = node.attr('data-mce-style'); - if (!style) { - style = node.attr('style'); - - if (style) - style = editor.dom.serializeStyle(editor.dom.parseStyle(style, 'img')); - } - - // Use node width/height to override the data width/height when the placeholder is resized - data.width = node.attr('width') || data.width; - data.height = node.attr('height') || data.height; - - // Handle iframe - if (typeItem.name === 'Iframe') { - replacement = new Node('iframe', 1); - - tinymce.each(rootAttributes, function(name) { - var value = node.attr(name); - - if (name == 'class' && value) - value = value.replace(/mceItem.+ ?/g, ''); - - if (value && value.length > 0) - replacement.attr(name, value); - }); - - for (name in data.params) - replacement.attr(name, data.params[name]); - - replacement.attr({ - style: style, - src: data.params.src - }); - - node.replace(replacement); - - return; - } - - // Handle scripts - if (this.editor.settings.media_use_script) { - replacement = new Node('script', 1).attr('type', 'text/javascript'); - - value = new Node('#text', 3); - value.value = 'write' + typeItem.name + '(' + JSON.serialize(tinymce.extend(data.params, { - width: node.attr('width'), - height: node.attr('height') - })) + ');'; - - replacement.append(value); - node.replace(replacement); - - return; - } - - // Add HTML5 video element - if (typeItem.name === 'Video' && data.video.sources[0]) { - // Create new object element - video = new Node('video', 1).attr(tinymce.extend({ - id : node.attr('id'), - width: normalizeSize(node.attr('width')), - height: normalizeSize(node.attr('height')), - style : style - }, data.video.attrs)); - - // Get poster source and use that for flash fallback - if (data.video.attrs) - posterSrc = data.video.attrs.poster; - - sources = data.video.sources = toArray(data.video.sources); - for (i = 0; i < sources.length; i++) { - if (/\.mp4$/.test(sources[i].src)) - mp4Source = sources[i].src; - } - - if (!sources[0].type) { - video.attr('src', sources[0].src); - sources.splice(0, 1); - } - - for (i = 0; i < sources.length; i++) { - source = new Node('source', 1).attr(sources[i]); - source.shortEnded = true; - video.append(source); - } - - // Create flash fallback for video if we have a mp4 source - if (mp4Source) { - addPlayer(mp4Source, posterSrc); - typeItem = self.getType('flash'); - } else - data.params.src = ''; - } - - // Add HTML5 audio element - if (typeItem.name === 'Audio' && data.video.sources[0]) { - // Create new object element - audio = new Node('audio', 1).attr(tinymce.extend({ - id : node.attr('id'), - width: normalizeSize(node.attr('width')), - height: normalizeSize(node.attr('height')), - style : style - }, data.video.attrs)); - - // Get poster source and use that for flash fallback - if (data.video.attrs) - posterSrc = data.video.attrs.poster; - - sources = data.video.sources = toArray(data.video.sources); - if (!sources[0].type) { - audio.attr('src', sources[0].src); - sources.splice(0, 1); - } - - for (i = 0; i < sources.length; i++) { - source = new Node('source', 1).attr(sources[i]); - source.shortEnded = true; - audio.append(source); - } - - data.params.src = ''; - } - - if (typeItem.name === 'EmbeddedAudio') { - embed = new Node('embed', 1); - embed.shortEnded = true; - embed.attr({ - id: node.attr('id'), - width: normalizeSize(node.attr('width')), - height: normalizeSize(node.attr('height')), - style : style, - type: node.attr('type') - }); - - for (name in data.params) - embed.attr(name, data.params[name]); - - tinymce.each(rootAttributes, function(name) { - if (data[name] && name != 'type') - embed.attr(name, data[name]); - }); - - data.params.src = ''; - } - - // Do we have a params src then we can generate object - if (data.params.src) { - // Is flv movie add player for it - if (/\.flv$/i.test(data.params.src)) - addPlayer(data.params.src, ''); - - if (args && args.force_absolute) - data.params.src = editor.documentBaseURI.toAbsolute(data.params.src); - - // Create new object element - object = new Node('object', 1).attr({ - id : node.attr('id'), - width: normalizeSize(node.attr('width')), - height: normalizeSize(node.attr('height')), - style : style - }); - - tinymce.each(rootAttributes, function(name) { - var value = data[name]; - - if (name == 'class' && value) - value = value.replace(/mceItem.+ ?/g, ''); - - if (value && name != 'type') - object.attr(name, value); - }); - - // Add params - for (name in data.params) { - param = new Node('param', 1); - param.shortEnded = true; - value = data.params[name]; - - // Windows media needs to use url instead of src for the media URL - if (name === 'src' && typeItem.name === 'WindowsMedia') - name = 'url'; - - param.attr({name: name, value: value}); - object.append(param); - } - - // Setup add type and classid if strict is disabled - if (this.editor.getParam('media_strict', true)) { - object.attr({ - data: data.params.src, - type: typeItem.mimes[0] - }); - } else { - object.attr({ - classid: "clsid:" + typeItem.clsids[0], - codebase: typeItem.codebase - }); - - embed = new Node('embed', 1); - embed.shortEnded = true; - embed.attr({ - id: node.attr('id'), - width: normalizeSize(node.attr('width')), - height: normalizeSize(node.attr('height')), - style : style, - type: typeItem.mimes[0] - }); - - for (name in data.params) - embed.attr(name, data.params[name]); - - tinymce.each(rootAttributes, function(name) { - if (data[name] && name != 'type') - embed.attr(name, data[name]); - }); - - object.append(embed); - } - - // Insert raw HTML - if (data.object_html) { - value = new Node('#text', 3); - value.raw = true; - value.value = data.object_html; - object.append(value); - } - - // Append object to video element if it exists - if (video) - video.append(object); - } - - if (video) { - // Insert raw HTML - if (data.video_html) { - value = new Node('#text', 3); - value.raw = true; - value.value = data.video_html; - video.append(value); - } - } - - if (audio) { - // Insert raw HTML - if (data.video_html) { - value = new Node('#text', 3); - value.raw = true; - value.value = data.video_html; - audio.append(value); - } - } - - var n = video || audio || object || embed; - if (n) - node.replace(n); - else - node.remove(); - }, - - /** - * Converts a tinymce.html.Node video/object/embed to an img element. - * - * The video/object/embed will be converted into an image placeholder with a JSON data attribute like this: - * - * - * The JSON structure will be like this: - * {'params':{'flashvars':'something','quality':'high','src':'someurl'}, 'video':{'sources':[{src: 'someurl', type: 'video/mp4'}]}} - */ - objectToImg : function(node) { - var object, embed, video, iframe, img, name, id, width, height, style, i, html, - param, params, source, sources, data, type, lookup = this.lookup, - matches, attrs, urlConverter = this.editor.settings.url_converter, - urlConverterScope = this.editor.settings.url_converter_scope, - hspace, vspace, align, bgcolor; - - function getInnerHTML(node) { - return new tinymce.html.Serializer({ - inner: true, - validate: false - }).serialize(node); - }; - - function lookupAttribute(o, attr) { - return lookup[(o.attr(attr) || '').toLowerCase()]; - } - - function lookupExtension(src) { - var ext = src.replace(/^.*\.([^.]+)$/, '$1'); - return lookup[ext.toLowerCase() || '']; - } - - // If node isn't in document - if (!node.parent) - return; - - // Handle media scripts - if (node.name === 'script') { - if (node.firstChild) - matches = scriptRegExp.exec(node.firstChild.value); - - if (!matches) - return; - - type = matches[1]; - data = {video : {}, params : JSON.parse(matches[2])}; - width = data.params.width; - height = data.params.height; - } - - // Setup data objects - data = data || { - video : {}, - params : {} - }; - - // Setup new image object - img = new Node('img', 1); - img.attr({ - src : this.editor.theme.url + '/img/trans.gif' - }); - - // Video element - name = node.name; - if (name === 'video' || name == 'audio') { - video = node; - object = node.getAll('object')[0]; - embed = node.getAll('embed')[0]; - width = video.attr('width'); - height = video.attr('height'); - id = video.attr('id'); - data.video = {attrs : {}, sources : []}; - - // Get all video attributes - attrs = data.video.attrs; - for (name in video.attributes.map) - attrs[name] = video.attributes.map[name]; - - source = node.attr('src'); - if (source) - data.video.sources.push({src : urlConverter.call(urlConverterScope, source, 'src', node.name)}); - - // Get all sources - sources = video.getAll("source"); - for (i = 0; i < sources.length; i++) { - source = sources[i].remove(); - - data.video.sources.push({ - src: urlConverter.call(urlConverterScope, source.attr('src'), 'src', 'source'), - type: source.attr('type'), - media: source.attr('media') - }); - } - - // Convert the poster URL - if (attrs.poster) - attrs.poster = urlConverter.call(urlConverterScope, attrs.poster, 'poster', node.name); - } - - // Object element - if (node.name === 'object') { - object = node; - embed = node.getAll('embed')[0]; - } - - // Embed element - if (node.name === 'embed') - embed = node; - - // Iframe element - if (node.name === 'iframe') { - iframe = node; - type = 'Iframe'; - } - - if (object) { - // Get width/height - width = width || object.attr('width'); - height = height || object.attr('height'); - style = style || object.attr('style'); - id = id || object.attr('id'); - hspace = hspace || object.attr('hspace'); - vspace = vspace || object.attr('vspace'); - align = align || object.attr('align'); - bgcolor = bgcolor || object.attr('bgcolor'); - data.name = object.attr('name'); - - // Get all object params - params = object.getAll("param"); - for (i = 0; i < params.length; i++) { - param = params[i]; - name = param.remove().attr('name'); - - if (!excludedAttrs[name]) - data.params[name] = param.attr('value'); - } - - data.params.src = data.params.src || object.attr('data'); - } - - if (embed) { - // Get width/height - width = width || embed.attr('width'); - height = height || embed.attr('height'); - style = style || embed.attr('style'); - id = id || embed.attr('id'); - hspace = hspace || embed.attr('hspace'); - vspace = vspace || embed.attr('vspace'); - align = align || embed.attr('align'); - bgcolor = bgcolor || embed.attr('bgcolor'); - - // Get all embed attributes - for (name in embed.attributes.map) { - if (!excludedAttrs[name] && !data.params[name]) - data.params[name] = embed.attributes.map[name]; - } - } - - if (iframe) { - // Get width/height - width = normalizeSize(iframe.attr('width')); - height = normalizeSize(iframe.attr('height')); - style = style || iframe.attr('style'); - id = iframe.attr('id'); - hspace = iframe.attr('hspace'); - vspace = iframe.attr('vspace'); - align = iframe.attr('align'); - bgcolor = iframe.attr('bgcolor'); - - tinymce.each(rootAttributes, function(name) { - img.attr(name, iframe.attr(name)); - }); - - // Get all iframe attributes - for (name in iframe.attributes.map) { - if (!excludedAttrs[name] && !data.params[name]) - data.params[name] = iframe.attributes.map[name]; - } - } - - // Use src not movie - if (data.params.movie) { - data.params.src = data.params.src || data.params.movie; - delete data.params.movie; - } - - // Convert the URL to relative/absolute depending on configuration - if (data.params.src) - data.params.src = urlConverter.call(urlConverterScope, data.params.src, 'src', 'object'); - - if (video) { - if (node.name === 'video') - type = lookup.video.name; - else if (node.name === 'audio') - type = lookup.audio.name; - } - - if (object && !type) - type = (lookupAttribute(object, 'clsid') || lookupAttribute(object, 'classid') || lookupAttribute(object, 'type') || {}).name; - - if (embed && !type) - type = (lookupAttribute(embed, 'type') || lookupExtension(data.params.src) || {}).name; - - // for embedded audio we preserve the original specified type - if (embed && type == 'EmbeddedAudio') { - data.params.type = embed.attr('type'); - } - - // Replace the video/object/embed element with a placeholder image containing the data - node.replace(img); - - // Remove embed - if (embed) - embed.remove(); - - // Serialize the inner HTML of the object element - if (object) { - html = getInnerHTML(object.remove()); - - if (html) - data.object_html = html; - } - - // Serialize the inner HTML of the video element - if (video) { - html = getInnerHTML(video.remove()); - - if (html) - data.video_html = html; - } - - data.hspace = hspace; - data.vspace = vspace; - data.align = align; - data.bgcolor = bgcolor; - - // Set width/height of placeholder - img.attr({ - id : id, - 'class' : 'mceItemMedia mceItem' + (type || 'Flash'), - style : style, - width : width || (node.name == 'audio' ? "300" : "320"), - height : height || (node.name == 'audio' ? "32" : "240"), - hspace : hspace, - vspace : vspace, - align : align, - bgcolor : bgcolor, - "data-mce-json" : JSON.serialize(data, "'") - }); - } - }); - - // Register plugin - tinymce.PluginManager.add('media', tinymce.plugins.MediaPlugin); -})(); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/js/embed.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/js/embed.js deleted file mode 100644 index f8dc810527..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/js/embed.js +++ /dev/null @@ -1,73 +0,0 @@ -/** - * This script contains embed functions for common plugins. This scripts are complety free to use for any purpose. - */ - -function writeFlash(p) { - writeEmbed( - 'D27CDB6E-AE6D-11cf-96B8-444553540000', - 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0', - 'application/x-shockwave-flash', - p - ); -} - -function writeShockWave(p) { - writeEmbed( - '166B1BCA-3F9C-11CF-8075-444553540000', - 'http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0', - 'application/x-director', - p - ); -} - -function writeQuickTime(p) { - writeEmbed( - '02BF25D5-8C17-4B23-BC80-D3488ABDDC6B', - 'http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0', - 'video/quicktime', - p - ); -} - -function writeRealMedia(p) { - writeEmbed( - 'CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA', - 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0', - 'audio/x-pn-realaudio-plugin', - p - ); -} - -function writeWindowsMedia(p) { - p.url = p.src; - writeEmbed( - '6BF52A52-394A-11D3-B153-00C04F79FAA6', - 'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701', - 'application/x-mplayer2', - p - ); -} - -function writeEmbed(cls, cb, mt, p) { - var h = '', n; - - h += ''; - - h += ''); - - function get(id) { - return document.getElementById(id); - } - - function clone(obj) { - var i, len, copy, attr; - - if (null == obj || "object" != typeof obj) - return obj; - - // Handle Array - if ('length' in obj) { - copy = []; - - for (i = 0, len = obj.length; i < len; ++i) { - copy[i] = clone(obj[i]); - } - - return copy; - } - - // Handle Object - copy = {}; - for (attr in obj) { - if (obj.hasOwnProperty(attr)) - copy[attr] = clone(obj[attr]); - } - - return copy; - } - - function getVal(id) { - var elm = get(id); - - if (elm.nodeName == "SELECT") - return elm.options[elm.selectedIndex].value; - - if (elm.type == "checkbox") - return elm.checked; - - return elm.value; - } - - function setVal(id, value, name) { - if (typeof(value) != 'undefined' && value != null) { - var elm = get(id); - - if (elm.nodeName == "SELECT") - selectByValue(document.forms[0], id, value); - else if (elm.type == "checkbox") { - if (typeof(value) == 'string') { - value = value.toLowerCase(); - value = (!name && value === 'true') || (name && value === name.toLowerCase()); - } - elm.checked = !!value; - } else - elm.value = value; - } - } - - window.Media = { - init : function() { - var html, editor, self = this; - - self.editor = editor = tinyMCEPopup.editor; - - // Setup file browsers and color pickers - get('filebrowsercontainer').innerHTML = getBrowserHTML('filebrowser','src','media','media'); - get('qtsrcfilebrowsercontainer').innerHTML = getBrowserHTML('qtsrcfilebrowser','quicktime_qtsrc','media','media'); - get('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor'); - get('video_altsource1_filebrowser').innerHTML = getBrowserHTML('video_filebrowser_altsource1','video_altsource1','media','media'); - get('video_altsource2_filebrowser').innerHTML = getBrowserHTML('video_filebrowser_altsource2','video_altsource2','media','media'); - get('audio_altsource1_filebrowser').innerHTML = getBrowserHTML('audio_filebrowser_altsource1','audio_altsource1','media','media'); - get('audio_altsource2_filebrowser').innerHTML = getBrowserHTML('audio_filebrowser_altsource2','audio_altsource2','media','media'); - get('video_poster_filebrowser').innerHTML = getBrowserHTML('filebrowser_poster','video_poster','image','media'); - - html = self.getMediaListHTML('medialist', 'src', 'media', 'media'); - if (html == "") - get("linklistrow").style.display = 'none'; - else - get("linklistcontainer").innerHTML = html; - - if (isVisible('filebrowser')) - get('src').style.width = '230px'; - - if (isVisible('video_filebrowser_altsource1')) - get('video_altsource1').style.width = '220px'; - - if (isVisible('video_filebrowser_altsource2')) - get('video_altsource2').style.width = '220px'; - - if (isVisible('audio_filebrowser_altsource1')) - get('audio_altsource1').style.width = '220px'; - - if (isVisible('audio_filebrowser_altsource2')) - get('audio_altsource2').style.width = '220px'; - - if (isVisible('filebrowser_poster')) - get('video_poster').style.width = '220px'; - - editor.dom.setOuterHTML(get('media_type'), self.getMediaTypeHTML(editor)); - - self.setDefaultDialogSettings(editor); - self.data = clone(tinyMCEPopup.getWindowArg('data')); - self.dataToForm(); - self.preview(); - - updateColor('bgcolor_pick', 'bgcolor'); - }, - - insert : function() { - var editor = tinyMCEPopup.editor; - - this.formToData(); - editor.execCommand('mceRepaint'); - tinyMCEPopup.restoreSelection(); - editor.selection.setNode(editor.plugins.media.dataToImg(this.data)); - tinyMCEPopup.close(); - }, - - preview : function() { - get('prev').innerHTML = this.editor.plugins.media.dataToHtml(this.data, true); - }, - - moveStates : function(to_form, field) { - var data = this.data, editor = this.editor, - mediaPlugin = editor.plugins.media, ext, src, typeInfo, defaultStates, src; - - defaultStates = { - // QuickTime - quicktime_autoplay : true, - quicktime_controller : true, - - // Flash - flash_play : true, - flash_loop : true, - flash_menu : true, - - // WindowsMedia - windowsmedia_autostart : true, - windowsmedia_enablecontextmenu : true, - windowsmedia_invokeurls : true, - - // RealMedia - realmedia_autogotourl : true, - realmedia_imagestatus : true - }; - - function parseQueryParams(str) { - var out = {}; - - if (str) { - tinymce.each(str.split('&'), function(item) { - var parts = item.split('='); - - out[unescape(parts[0])] = unescape(parts[1]); - }); - } - - return out; - }; - - function setOptions(type, names) { - var i, name, formItemName, value, list; - - if (type == data.type || type == 'global') { - names = tinymce.explode(names); - for (i = 0; i < names.length; i++) { - name = names[i]; - formItemName = type == 'global' ? name : type + '_' + name; - - if (type == 'global') - list = data; - else if (type == 'video' || type == 'audio') { - list = data.video.attrs; - - if (!list && !to_form) - data.video.attrs = list = {}; - } else - list = data.params; - - if (list) { - if (to_form) { - setVal(formItemName, list[name], type == 'video' || type == 'audio' ? name : ''); - } else { - delete list[name]; - - value = getVal(formItemName); - if ((type == 'video' || type == 'audio') && value === true) - value = name; - - if (defaultStates[formItemName]) { - if (value !== defaultStates[formItemName]) { - value = "" + value; - list[name] = value; - } - } else if (value) { - value = "" + value; - list[name] = value; - } - } - } - } - } - } - - if (!to_form) { - data.type = get('media_type').options[get('media_type').selectedIndex].value; - data.width = getVal('width'); - data.height = getVal('height'); - - // Switch type based on extension - src = getVal('src'); - if (field == 'src') { - ext = src.replace(/^.*\.([^.]+)$/, '$1'); - if (typeInfo = mediaPlugin.getType(ext)) - data.type = typeInfo.name.toLowerCase(); - - setVal('media_type', data.type); - } - - if (data.type == "video" || data.type == "audio") { - if (!data.video.sources) - data.video.sources = []; - - data.video.sources[0] = {src: getVal('src')}; - } - } - - // Hide all fieldsets and show the one active - get('video_options').style.display = 'none'; - get('audio_options').style.display = 'none'; - get('flash_options').style.display = 'none'; - get('quicktime_options').style.display = 'none'; - get('shockwave_options').style.display = 'none'; - get('windowsmedia_options').style.display = 'none'; - get('realmedia_options').style.display = 'none'; - get('embeddedaudio_options').style.display = 'none'; - - if (get(data.type + '_options')) - get(data.type + '_options').style.display = 'block'; - - setVal('media_type', data.type); - - setOptions('flash', 'play,loop,menu,swliveconnect,quality,scale,salign,wmode,base,flashvars'); - setOptions('quicktime', 'loop,autoplay,cache,controller,correction,enablejavascript,kioskmode,autohref,playeveryframe,targetcache,scale,starttime,endtime,target,qtsrcchokespeed,volume,qtsrc'); - setOptions('shockwave', 'sound,progress,autostart,swliveconnect,swvolume,swstretchstyle,swstretchhalign,swstretchvalign'); - setOptions('windowsmedia', 'autostart,enabled,enablecontextmenu,fullscreen,invokeurls,mute,stretchtofit,windowlessvideo,balance,baseurl,captioningid,currentmarker,currentposition,defaultframe,playcount,rate,uimode,volume'); - setOptions('realmedia', 'autostart,loop,autogotourl,center,imagestatus,maintainaspect,nojava,prefetch,shuffle,console,controls,numloop,scriptcallbacks'); - setOptions('video', 'poster,autoplay,loop,muted,preload,controls'); - setOptions('audio', 'autoplay,loop,preload,controls'); - setOptions('embeddedaudio', 'autoplay,loop,controls'); - setOptions('global', 'id,name,vspace,hspace,bgcolor,align,width,height'); - - if (to_form) { - if (data.type == 'video') { - if (data.video.sources[0]) - setVal('src', data.video.sources[0].src); - - src = data.video.sources[1]; - if (src) - setVal('video_altsource1', src.src); - - src = data.video.sources[2]; - if (src) - setVal('video_altsource2', src.src); - } else if (data.type == 'audio') { - if (data.video.sources[0]) - setVal('src', data.video.sources[0].src); - - src = data.video.sources[1]; - if (src) - setVal('audio_altsource1', src.src); - - src = data.video.sources[2]; - if (src) - setVal('audio_altsource2', src.src); - } else { - // Check flash vars - if (data.type == 'flash') { - tinymce.each(editor.getParam('flash_video_player_flashvars', {url : '$url', poster : '$poster'}), function(value, name) { - if (value == '$url') - data.params.src = parseQueryParams(data.params.flashvars)[name] || data.params.src || ''; - }); - } - - setVal('src', data.params.src); - } - } else { - src = getVal("src"); - - // YouTube Embed - if (src.match(/youtube\.com\/embed\/\w+/)) { - data.width = 425; - data.height = 350; - data.params.frameborder = '0'; - data.type = 'iframe'; - setVal('src', src); - setVal('media_type', data.type); - } else { - // YouTube *NEW* - if (src.match(/youtu\.be\/[a-z1-9.-_]+/)) { - data.width = 425; - data.height = 350; - data.params.frameborder = '0'; - data.type = 'iframe'; - src = 'http://www.youtube.com/embed/' + src.match(/youtu.be\/([a-z1-9.-_]+)/)[1]; - setVal('src', src); - setVal('media_type', data.type); - } - - // YouTube - if (src.match(/youtube\.com(.+)v=([^&]+)/)) { - data.width = 425; - data.height = 350; - data.params.frameborder = '0'; - data.type = 'iframe'; - src = 'http://www.youtube.com/embed/' + src.match(/v=([^&]+)/)[1]; - setVal('src', src); - setVal('media_type', data.type); - } - } - - // Google video - if (src.match(/video\.google\.com(.+)docid=([^&]+)/)) { - data.width = 425; - data.height = 326; - data.type = 'flash'; - src = 'http://video.google.com/googleplayer.swf?docId=' + src.match(/docid=([^&]+)/)[1] + '&hl=en'; - setVal('src', src); - setVal('media_type', data.type); - } - - // Vimeo - if (src.match(/vimeo\.com\/([0-9]+)/)) { - data.width = 425; - data.height = 350; - data.params.frameborder = '0'; - data.type = 'iframe'; - src = 'http://player.vimeo.com/video/' + src.match(/vimeo.com\/([0-9]+)/)[1]; - setVal('src', src); - setVal('media_type', data.type); - } - - // stream.cz - if (src.match(/stream\.cz\/((?!object).)*\/([0-9]+)/)) { - data.width = 425; - data.height = 350; - data.params.frameborder = '0'; - data.type = 'iframe'; - src = 'http://www.stream.cz/object/' + src.match(/stream.cz\/[^/]+\/([0-9]+)/)[1]; - setVal('src', src); - setVal('media_type', data.type); - } - - // Google maps - if (src.match(/maps\.google\.([a-z]{2,3})\/maps\/(.+)msid=(.+)/)) { - data.width = 425; - data.height = 350; - data.params.frameborder = '0'; - data.type = 'iframe'; - src = 'http://maps.google.com/maps/ms?msid=' + src.match(/msid=(.+)/)[1] + "&output=embed"; - setVal('src', src); - setVal('media_type', data.type); - } - - if (data.type == 'video') { - if (!data.video.sources) - data.video.sources = []; - - data.video.sources[0] = {src : src}; - - src = getVal("video_altsource1"); - if (src) - data.video.sources[1] = {src : src}; - - src = getVal("video_altsource2"); - if (src) - data.video.sources[2] = {src : src}; - } else if (data.type == 'audio') { - if (!data.video.sources) - data.video.sources = []; - - data.video.sources[0] = {src : src}; - - src = getVal("audio_altsource1"); - if (src) - data.video.sources[1] = {src : src}; - - src = getVal("audio_altsource2"); - if (src) - data.video.sources[2] = {src : src}; - } else - data.params.src = src; - - // Set default size - setVal('width', data.width || (data.type == 'audio' ? 300 : 320)); - setVal('height', data.height || (data.type == 'audio' ? 32 : 240)); - } - }, - - dataToForm : function() { - this.moveStates(true); - }, - - formToData : function(field) { - if (field == "width" || field == "height") - this.changeSize(field); - - if (field == 'source') { - this.moveStates(false, field); - setVal('source', this.editor.plugins.media.dataToHtml(this.data)); - this.panel = 'source'; - } else { - if (this.panel == 'source') { - this.data = clone(this.editor.plugins.media.htmlToData(getVal('source'))); - this.dataToForm(); - this.panel = ''; - } - - this.moveStates(false, field); - this.preview(); - } - }, - - beforeResize : function() { - this.width = parseInt(getVal('width') || (this.data.type == 'audio' ? "300" : "320"), 10); - this.height = parseInt(getVal('height') || (this.data.type == 'audio' ? "32" : "240"), 10); - }, - - changeSize : function(type) { - var width, height, scale, size; - - if (get('constrain').checked) { - width = parseInt(getVal('width') || (this.data.type == 'audio' ? "300" : "320"), 10); - height = parseInt(getVal('height') || (this.data.type == 'audio' ? "32" : "240"), 10); - - if (type == 'width') { - this.height = Math.round((width / this.width) * height); - setVal('height', this.height); - } else { - this.width = Math.round((height / this.height) * width); - setVal('width', this.width); - } - } - }, - - getMediaListHTML : function() { - if (typeof(tinyMCEMediaList) != "undefined" && tinyMCEMediaList.length > 0) { - var html = ""; - - html += ''; - - return html; - } - - return ""; - }, - - getMediaTypeHTML : function(editor) { - function option(media_type, element) { - if (!editor.schema.getElementRule(element || media_type)) { - return ''; - } - - return '' - } - - var html = ""; - - html += ''; - return html; - }, - - setDefaultDialogSettings : function(editor) { - var defaultDialogSettings = editor.getParam("media_dialog_defaults", {}); - tinymce.each(defaultDialogSettings, function(v, k) { - setVal(k, v); - }); - } - }; - - tinyMCEPopup.requireLangPack(); - tinyMCEPopup.onInit.add(function() { - Media.init(); - }); -})(); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/da_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/da_dlg.js deleted file mode 100644 index d9a88d1fa5..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/da_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('da.media_dlg',{list:"Liste",file:"Fil/URL",advanced:"Avanceret",general:"Generelt",title:"Inds\u00e6t/rediger indlejret mediefil","align_top_left":"\u00d8verste venstre hj\u00f8rne","align_center":"Centreret","align_left":"Venstre","align_bottom":"Bund","align_right":"H\u00f8jret","align_top":"Top","qt_stream_warn":"Streamede rtsp resourcer skal tilf\u00f8jes til QT Src feltet under tabben avanceret.\nDu skal ogs\u00e5 tilf\u00f8je en ikke streamet version til Src feltet..",qtsrc:"QT Src",progress:"Fremskridt",sound:"Lyd",swstretchvalign:"Str\u00e6k V-justering",swstretchhalign:"Str\u00e6k H-justering",swstretchstyle:"Str\u00e6k stil",scriptcallbacks:"Script callbacks","align_top_right":"\u00d8verste h\u00f8jre hj\u00f8rne",uimode:"UI-tilstand",rate:"Vurder",playcount:"Afspil indhold",defaultframe:"Standard ramme",currentposition:"Aktuel position",currentmarker:"Aktuel mark\u00f8r",captioningid:"Captioning id",baseurl:"Base URL",balance:"Balance",windowlessvideo:"Vinduesl\u00f8s video",stretchtofit:"Str\u00e6k for at tilpasse",mute:"Lydl\u00f8s",invokeurls:"Aktiver URL\'er",fullscreen:"Fuldsk\u00e6rm",enabled:"Valgt",autostart:"Afspil automatisk",volume:"Lydstyrke",target:"M\u00e5l",qtsrcchokespeed:"Choke-hastighed",href:"Href",endtime:"Sluttidspunkt",starttime:"Starttidspunkt",enablejavascript:"Tillad JavaScript",correction:"Ingen korrektion",targetcache:"M\u00e5l-cache",playeveryframe:"Afsplil alle rammer",kioskmode:"Kiosk-tilstand",controller:"Controller",menu:"Vis menu",loop:"Gentag",play:"Start",hspace:"H-afstand",vspace:"V-afstand","class_name":"Klasse",name:"Navn",id:"Id",type:"Type",size:"Dimensioner",preview:"Vis udskrift","constrain_proportions":"Bevar proportioner",controls:"Kontroller",numloop:"Antal loops",console:"Konsol",cache:"Cache",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"Flashvars",base:"Base",bgcolor:"Baggrund",wmode:"WMode",salign:"SAlign",align:"Juster",scale:"Skaler",quality:"Kvalitet",shuffle:"Bland",prefetch:"Forh\u00e5ndshent",nojava:"Ingen java",maintainaspect:"Bevar aspekt",imagestatus:"Billedstatus",center:"Center",autogotourl:"Auto g\u00e5 til URL","shockwave_options":"Shockwave options","rmp_options":"Real media player egenskaber","wmp_options":"Windows media player egenskaber","qt_options":"Quicktime egenskaber","flash_options":"Flash egenskaber",hidden:"Skjul","align_bottom_left":"Nederste venstre hj\u00f8rne","align_bottom_right":"\u00d8verste h\u00f8jre hj\u00f8rne",flash:"Flash",quicktime:"Quicktime","embedded_audio_options":"Indstillinger for indlejret audio",windowsmedia:"Windows Media",realmedia:"Realmedia",shockwave:"Shockwave",audio:"Lyd",video:"Video","html5_video_options":"HTML5 Video Indstillinger",altsource1:"Alternativ kilde 1",altsource2:"Alternativ kilde 2",preload:"Forudindl\u00e6s",poster:"Poster",source:"Kilde","html5_audio_options":"Audio indstillinger","preload_none":"Preindl\u00e6s ikke","preload_metadata":"Preindl\u00e6s video metadata","preload_auto":"Lad brugerens browser v\u00e6lge",iframe:"iframe",embeddedaudio:"Indlejret lyd"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/de_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/de_dlg.js deleted file mode 100644 index 6d0de767cd..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/de_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('de.media_dlg',{list:"Liste",file:"Datei/URL",advanced:"Erweitert",general:"Allgemein",title:"Multimedia-Inhalte einf\u00fcgen/bearbeiten","align_top_left":"Oben Links","align_center":"Zentriert","align_left":"Links","align_bottom":"Unten","align_right":"Rechts","align_top":"Oben","qt_stream_warn":"In den Erweiterten Einstellungen sollten im Feld \'QT Src\' gestreamte RTSP Resourcen hinzugef\u00fcgt werden.\nZus\u00e4tzlich sollten Sie dort auch eine nicht-gestreamte Resource angeben.",qtsrc:"Angabe zu QT Src",progress:"Fortschritt",sound:"Ton",swstretchvalign:"Stretch V-Ausrichtung",swstretchhalign:"Stretch H-Ausrichtung",swstretchstyle:"Stretch-Art",scriptcallbacks:"Script callbacks","align_top_right":"Oben Rechts",uimode:"UI Modus",rate:"Rate",playcount:"Z\u00e4hler",defaultframe:"Frame-Voreinstellung",currentposition:"Aktuelle Position",currentmarker:"Aktueller Marker",captioningid:"Captioning id",baseurl:"Base URL",balance:"Balance",windowlessvideo:"Fensterloses Video",stretchtofit:"Anzeigefl\u00e4che an verf\u00fcgbaren Platz anpassen",mute:"Stumm",invokeurls:"Invoke URLs",fullscreen:"Vollbild",enabled:"Aktiviert",autostart:"Autostart",volume:"Lautst\u00e4rke",target:"Ziel",qtsrcchokespeed:"Choke speed",href:"Href",endtime:"Endzeitpunkt",starttime:"Startzeitpunkt",enablejavascript:"JavaScript aktivieren",correction:"Ohne Korrektur",targetcache:"Ziel zwischenspeichern",playeveryframe:"Jeden Frame abspielen",kioskmode:"Kioskmodus",controller:"Controller",menu:"Men\u00fc anzeigen",loop:"Wiederholung",play:"Automatisches Abspielen",hspace:"Horizontaler Abstand",vspace:"Vertikaler Abstand","class_name":"CSS-Klasse",name:"Name",id:"Id",type:"Typ",size:"Abmessungen",preview:"Vorschau","constrain_proportions":"Proportionen erhalten",controls:"Steuerung",numloop:"Anzahl Wiederholungen",console:"Konsole",cache:"Zwischenspeicher",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"Flashvariablen",base:"Base",bgcolor:"Hintergrund",wmode:"WMode",salign:"S-Ausrichtung",align:"Ausrichtung",scale:"Skalierung",quality:"Qualit\u00e4t",shuffle:"Zuf\u00e4llige Wiedergabe",prefetch:"Prefetch",nojava:"Kein Java",maintainaspect:"Bildverh\u00e4ltnis beibehalten",imagestatus:"Bildstatus",center:"Zentriert",autogotourl:"Auto goto URL","shockwave_options":"Shockwave-Optionen","rmp_options":"Optionen f\u00fcr Real Media Player","wmp_options":"Optionen f\u00fcr Windows Media Player","qt_options":"Quicktime-Optionen","flash_options":"Flash-Optionen",hidden:"Versteckt","align_bottom_left":"Unten Links","align_bottom_right":"Unten Rechts",flash:"Flash",quicktime:"QuickTime","embedded_audio_options":"Integrierte Audio Optionen",windowsmedia:"WindowsMedia",realmedia:"RealMedia",shockwave:"ShockWave",audio:"Audio",video:"Video","html5_video_options":"HTML5 Video Optionen",altsource1:"Alternative Quelle 1",altsource2:"Alternative Quelle 2",preload:"Preload",poster:"Poster",source:"Quelle","html5_audio_options":"Audio Optionen","preload_none":"Nicht vorladen","preload_metadata":"Video Metadaten vorladen","preload_auto":"Benutzer Browser entscheidet automatisch",iframe:"iFrame",embeddedaudio:"Audio (eingebunden)"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/en_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/en_dlg.js deleted file mode 100644 index 6f98f071cb..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/en_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('en.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" }); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/en_us_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/en_us_dlg.js deleted file mode 100644 index 9e5f6eecbf..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/en_us_dlg.js +++ /dev/null @@ -1 +0,0 @@ -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" }); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/es_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/es_dlg.js deleted file mode 100644 index 7765ab3307..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/es_dlg.js +++ /dev/null @@ -1,103 +0,0 @@ -tinyMCE.addI18n('es.media_dlg',{ -title:"Insertar/editar medio embebido", -general:"General", -advanced:"Avanzado", -file:"Archivo/URL", -list:"Lista", -size:"Dimensiones", -preview:"Vista Previa", -constrain_proportions:"Bloquear relaci\u00F3n de aspecto", -type:"Tipo", -id:"Id", -name:"Nombre", -class_name:"Clase", -vspace:"V-Space", -hspace:"H-Space", -play:"Comienzo Autom\u00E1tico", -loop:"Repetitivo", -menu:"Mostrar Men\u00FA", -quality:"Calidad", -scale:"Scale", -align:"Alineaci\u00F3n", -salign:"SAlign", -wmode:"WMode", -bgcolor:"Fondo", -base:"Base", -flashvars:"Flashvars", -liveconnect:"SWLiveConnect", -autohref:"AutoHREF", -cache:"Cach\u00E9", -hidden:"Hidden", -controller:"Controller", -kioskmode:"Kiosk mode", -playeveryframe:"Reproducir todo los frames", -targetcache:"Target cache", -correction:"Sin correci\u00F3n", -enablejavascript:"Habilitar JavaScript", -starttime:"Inicio", -endtime:"Fin", -href:"Href", -qtsrcchokespeed:"Vel. de choque", -target:"Target", -volume:"Volumen", -autostart:"Comienzo Autom\u00E1tico", -enabled:"Habilitado", -fullscreen:"Pantalla Completa", -invokeurls:"Invocar URLs", -mute:"Silencio", -stretchtofit:"Estirar para ajustar", -windowlessvideo:"Video sin ventana", -balance:"Balance", -baseurl:"URL Base", -captioningid:"Captioning id", -currentmarker:"Marcador actual", -currentposition:"Posici\u00F3n actual", -defaultframe:"Frame predet.", -playcount:"Cuantas reproducciones", -rate:"Ratio", -uimode:"Modo UI", -flash_options:"Opciones Flash", -qt_options:"Opciones Quicktime", -wmp_options:"Opciones Windows media player", -rmp_options:"Opciones Real media player", -shockwave_options:"Opciones Shockwave", -autogotourl:"Ir a URL autom\u00E1t.", -center:"Centrado", -imagestatus:"Estado de imagen", -maintainaspect:"Mantener aspecto", -nojava:"No java", -prefetch:"Preb\u00FAsqueda", -shuffle:"Aleatorio", -console:"Consola", -numloop:"N\u00FAm. repeticiones", -controls:"Controles", -scriptcallbacks:"Script callbacks", -swstretchstyle:"Estilo estiramiento", -swstretchhalign:"Alin. H. Estiramiento", -swstretchvalign:"Alin. V. Estiramiento", -sound:"Sonido", -progress:"Progreso", -qtsrc:"QT Src", -qt_stream_warn:"Los recursos rtsp de Streaming deber\u00EDan a\u00F1adirse en el campo QT Src de la pesta\u00F1a avanzada.\nAdem\u00E1s deber\u00EDa a\u00F1adir una versi\u00F3n no Streaming en el campo Src.", -align_top:"Arriba", -align_right:"Derecha", -align_bottom:"Debajo", -align_left:"Izquierda", -align_center:"Centrado", -align_top_left:"Arriba Izda.", -align_top_right:"Arriba Dcha.", -align_bottom_left:"Debajo Izda.", -align_bottom_right:"Debajo Dcha.", -flv_options:"Opciones Video Flash", -flv_scalemode:"Modo escalado", -flv_buffer:"Buffer", -flv_startimage:"Imagen inicio", -flv_starttime:"Tiempo inicio", -flv_defaultvolume:"Volumen predet.", -flv_hiddengui:"Ocultar GUI", -flv_autostart:"Inicio auto.", -flv_loop:"Repetitivo", -flv_showscalemodes:"Mostrar modos escala", -flv_smoothvideo:"Video suave", -flv_jscallback:"JS Callback" -}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/fi_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/fi_dlg.js deleted file mode 100644 index 2ac2fcac13..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/fi_dlg.js +++ /dev/null @@ -1 +0,0 @@ -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"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/fr_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/fr_dlg.js deleted file mode 100644 index 90b0102dd3..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/fr_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('fr.media_dlg',{list:"Liste",file:"Fichier / URL",advanced:"Avanc\u00e9",general:"G\u00e9n\u00e9ral",title:"Ins\u00e9rer / \u00e9diter un fichier m\u00e9dia","align_top_left":"En haut \u00e0 gauche","align_center":"Centr\u00e9","align_left":"Gauche","align_bottom":"Bas","align_right":"Droite","align_top":"Haut","qt_stream_warn":"Les ressources rtsp en streaming doivent \u00eatre ajout\u00e9es au champ \u00ab Source QT \u00bb dans l\'onglet avanc\u00e9.\nVous devriez aussi ajouter une version n\'\u00e9tant pas en streaming au champ \u00ab source QT \u00bb.",qtsrc:"Source QT",progress:"Progression",sound:"Son",swstretchvalign:"Stretch vertical",swstretchhalign:"Stretch horizontal",swstretchstyle:"Stretch style",scriptcallbacks:"Callback de script","align_top_right":"En haut \u00e0 droite",uimode:"Mode UI",rate:"Taux",playcount:"Compteur",defaultframe:"Image par d\u00e9faut",currentposition:"Position actuelle",currentmarker:"Marqueur actuel",captioningid:"ID sous-titrage",baseurl:"Adresse de base",balance:"Balance",windowlessvideo:"Vid\u00e9o sans fen\u00eatre",stretchtofit:"\u00c9tendre pour adapter la taille",mute:"Muet",invokeurls:"Invoquer URLs",fullscreen:"Plein \u00e9cran",enabled:"Activ\u00e9",autostart:"Lire automatiquement",volume:"Volume",target:"Cible",qtsrcchokespeed:"D\u00e9bit maximum",href:"Href",endtime:"Fin",starttime:"D\u00e9but",enablejavascript:"Activer le JavaScript",correction:"Pas de correction",targetcache:"Cache cible",playeveryframe:"Jouer toutes les images",kioskmode:"Mode kiosque",controller:"Contr\u00f4leur",menu:"Afficher le menu",loop:"Lire en boucle",play:"Lecture automatique",hspace:"Espacement horizontal",vspace:"Espacement vertical","class_name":"Classe",name:"Nom",id:"Id",type:"Type",size:"Dimensions",preview:"Pr\u00e9visualisation","constrain_proportions":"Conserver les proportions",controls:"Contr\u00f4les",numloop:"Nombre de tours",console:"Console",cache:"Cache",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"Variables flash",base:"Base",bgcolor:"Fond",wmode:"WMode",salign:"SAlign",align:"Alignement",scale:"\u00c9chelle",quality:"Qualit\u00e9",shuffle:"Al\u00e9atoire",prefetch:"Pr\u00e9chargement",nojava:"Pas java",maintainaspect:"Maintenir l\'aspect",imagestatus:"Statut de l\'image",center:"Centrer",autogotourl:"Aller automatiquement \u00e0 l\'URL","shockwave_options":"Options Shockwave","rmp_options":"Options Real media player","wmp_options":"Windows media player options","qt_options":"Options Quicktime","flash_options":"Options Flash",hidden:"Cach\u00e9","align_bottom_left":"En bas \u00e0 gauche","align_bottom_right":"En bas \u00e0 droite",flash:"flash",quicktime:"quicktime","embedded_audio_options":"Options audio int\u00e9gr\u00e9es",windowsmedia:"windowsmedia",realmedia:"realmedia",shockwave:"shockwave",audio:"audio",video:"vid\u00e9o","html5_video_options":"Options Vid\u00e9o HTML 5",altsource1:"Source alternative 1",altsource2:"Source alternative 2",preload:"Pr\u00e9chargement",poster:"Poster",source:"Source","html5_audio_options":"Options audio","preload_none":"Ne pas pr\u00e9charger","preload_metadata":"Pr\u00e9charger les m\u00e9tadonn\u00e9es vid\u00e9o","preload_auto":"Laisser le fureteur de l\'utilisateur d\u00e9cider",iframe:"iframe",embeddedaudio:"embeddedaudio"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/he_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/he_dlg.js deleted file mode 100644 index 4bd005821b..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/he_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('he.media_dlg',{list:"\u05e8\u05e9\u05d9\u05de\u05d4",file:"\u05db\u05ea\u05d5\u05d1\u05ea \u05d4\u05e7\u05d5\u05d1\u05e5",advanced:"\u05de\u05ea\u05e7\u05d3\u05dd",general:"\u05db\u05dc\u05dc\u05d9",title:"\u05d4\u05d5\u05e1\u05e4\u05ea/\u05e2\u05e8\u05d9\u05db\u05ea \u05e1\u05e8\u05d8\u05d5\u05df","align_top_left":"\u05e9\u05de\u05d0\u05dc \u05dc\u05de\u05e2\u05dc\u05d4","align_center":"\u05de\u05e8\u05db\u05d6","align_left":"\u05dc\u05e9\u05de\u05d0\u05dc","align_bottom":"\u05dc\u05de\u05d8\u05d4","align_right":"\u05d9\u05de\u05d9\u05df","align_top":"\u05dc\u05de\u05e2\u05dc\u05d4","qt_stream_warn":"Streamed rtsp resources should be added to the QT Src field under the advanced tab.\nYou should also add a non streamed version to the Src field..",qtsrc:"QT Src",progress:"\u05d4\u05ea\u05e7\u05d3\u05de\u05d5\u05ea",sound:"\u05e6\u05dc\u05d9\u05dc",swstretchvalign:"Stretch V-Align",swstretchhalign:"Stretch H-Align",swstretchstyle:"Stretch style",scriptcallbacks:"Script callbacks","align_top_right":"\u05d9\u05de\u05d9\u05df \u05dc\u05de\u05e2\u05dc\u05d4",uimode:"\u05de\u05e6\u05d1 \u05ea\u05e6\u05d5\u05d2\u05d4",rate:"\u05e7\u05e6\u05d1",playcount:"\u05de\u05e1\u05e4\u05e8 \u05d4\u05e9\u05de\u05e2\u05d5\u05ea",defaultframe:"\u05e4\u05e8\u05d9\u05d9\u05dd \u05d1\u05e8\u05d9\u05e8\u05ea \u05de\u05d7\u05d3\u05dc",currentposition:"\u05de\u05d9\u05e7\u05d5\u05dd \u05e0\u05d5\u05db\u05d7\u05d9",currentmarker:"\u05e1\u05de\u05df \u05e0\u05d5\u05db\u05d7\u05d9",captioningid:"Captioning id",baseurl:"Base URL",balance:"Balance",windowlessvideo:"Windowless video",stretchtofit:"\u05de\u05ea\u05d7 \u05dc\u05d4\u05ea\u05d0\u05de\u05d4",mute:"\u05d4\u05e9\u05ea\u05e7",invokeurls:"Invoke URLs",fullscreen:"\u05de\u05e1\u05da \u05de\u05dc\u05d0",enabled:"\u05de\u05d5\u05e4\u05e2\u05dc",autostart:"\u05d4\u05ea\u05d7\u05dc \u05d0\u05d5\u05d8\u05d5\u05de\u05d8\u05d9\u05ea",volume:"\u05e2\u05d5\u05e6\u05de\u05d4",target:"\u05de\u05d8\u05e8\u05d4",qtsrcchokespeed:"Choke speed",href:"Href",endtime:"\u05d6\u05de\u05df \u05e1\u05d9\u05d5\u05dd",starttime:"\u05d6\u05de\u05df \u05d4\u05ea\u05d7\u05dc\u05d4",enablejavascript:"\u05d0\u05e4\u05e9\u05e8 JavaScript",correction:"\u05dc\u05dc\u05d0 \u05ea\u05d9\u05e7\u05d5\u05df",targetcache:"Target cache",playeveryframe:"\u05e0\u05d2\u05df \u05db\u05dc \u05e4\u05e8\u05d9\u05d9\u05dd",kioskmode:"Kiosk mode",controller:"Controller",menu:"\u05d4\u05e6\u05d2\u05ea \u05ea\u05e4\u05e8\u05d9\u05d8",loop:"\u05e0\u05d2\u05d9\u05e0\u05d4 \u05de\u05d7\u05d6\u05d5\u05e8\u05d9\u05ea",play:"\u05e0\u05d2\u05d9\u05e0\u05d4 \u05d0\u05d5\u05d8\u05d5\u05de\u05d8\u05d9\u05ea \u05e2\u05dd \u05d4\u05d8\u05e2\u05d9\u05e0\u05d4",hspace:"\u05e8\u05d5\u05d5\u05d7 \u05d0\u05d5\u05e4\u05e7\u05d9",vspace:"\u05e8\u05d5\u05d5\u05d7 \u05d0\u05e0\u05db\u05d9","class_name":"\u05de\u05d7\u05dc\u05e7\u05d4",name:"\u05e9\u05dd",id:"Id",type:"\u05e1\u05d5\u05d2",size:"\u05e8\u05d5\u05d7\u05d1 \u05d5\u05d2\u05d5\u05d1\u05d4",preview:"\u05ea\u05e6\u05d5\u05d2\u05d4 \u05de\u05e7\u05d3\u05d9\u05de\u05d4","constrain_proportions":"\u05e9\u05de\u05d5\u05e8 \u05e2\u05dc \u05e4\u05e8\u05d5\u05e4\u05d5\u05e8\u05e6\u05d9\u05d5\u05ea",controls:"Controls",numloop:"Num loops",console:"Console",cache:"Cache",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"Flashvars",base:"\u05de\u05e7\u05d5\u05e8",bgcolor:"\u05e6\u05d1\u05e2 \u05e8\u05e7\u05e2",wmode:"WMode",salign:"SAlign",align:"\u05d9\u05d9\u05e9\u05d5\u05e8",scale:"Scale",quality:"\u05d0\u05d9\u05db\u05d5\u05ea \u05d4\u05e1\u05e8\u05d8\u05d5\u05df",shuffle:"Shuffle",prefetch:"Prefetch",nojava:"No java",maintainaspect:"Maintain aspect",imagestatus:"Image status",center:"\u05de\u05e8\u05db\u05d6",autogotourl:"Auto goto URL","shockwave_options":"\u05d0\u05e4\u05e9\u05e8\u05d5\u05d9\u05d5\u05ea Shockwave","rmp_options":"\u05d0\u05e4\u05e9\u05e8\u05d5\u05d9\u05d5\u05ea \u05e0\u05d2\u05df Real Media","wmp_options":"\u05d0\u05e4\u05e9\u05e8\u05d5\u05d9\u05d5\u05ea \u05de\u05d3\u05d9\u05d4 \u05e4\u05dc\u05d9\u05d9\u05e8","qt_options":"\u05d0\u05e4\u05e9\u05e8\u05d5\u05d9\u05d5\u05ea Quicktime","flash_options":"\u05d0\u05e4\u05e9\u05e8\u05d5\u05d9\u05d5\u05ea \u05e4\u05dc\u05d0\u05e9",hidden:"Hidden","align_bottom_left":"\u05dc\u05de\u05d8\u05d4 \u05de\u05e9\u05de\u05d0\u05dc","align_bottom_right":"\u05dc\u05de\u05d8\u05d4 \u05de\u05d9\u05de\u05d9\u05df",flash:"Flash",quicktime:"quicktime","embedded_audio_options":"\u05d0\u05e4\u05e9\u05e8\u05d5\u05d9\u05d5\u05ea \u05d0\u05d5\u05d3\u05d9\u05d5 \u05de\u05e9\u05d5\u05dc\u05d1",windowsmedia:"windowsmedia",realmedia:"realmedia",shockwave:"shockwave",audio:"audio",video:"video","html5_video_options":"\u05d0\u05e4\u05e9\u05e8\u05d5\u05d9\u05d5\u05ea \u05d5\u05d9\u05d3\u05d0\u05d5 HTML5",altsource1:"\u05de\u05e7\u05d5\u05e8 \u05d7\u05dc\u05d5\u05e4\u05d9 1",altsource2:"\u05de\u05e7\u05d5\u05e8 \u05d7\u05dc\u05d5\u05e4\u05d9 2",preload:"Preload",poster:"\u05e4\u05d5\u05e1\u05d8\u05e8",source:"\u05de\u05e7\u05d5\u05e8","html5_audio_options":"\u05d0\u05e4\u05e9\u05e8\u05d5\u05d9\u05d5\u05ea \u05d0\u05d5\u05d3\u05d9\u05d5","preload_none":"Don\'t Preload","preload_metadata":"\u05d8\u05e2\u05df \u05de\u05d8\u05d4-\u05d8\u05d0\u05d2 \u05dc\u05d5\u05d5\u05d9\u05d3\u05d0\u05d5","preload_auto":"\u05d0\u05ea\u05df \u05dc\u05d3\u05e4\u05d3\u05e4\u05df \u05dc\u05d1\u05d7\u05d5\u05e8",iframe:"iframe",embeddedaudio:"embeddedaudio "}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/it_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/it_dlg.js deleted file mode 100644 index f335edebb3..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/it_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('it.media_dlg',{list:"Lista",file:"File/URL",advanced:"Avanzate",general:"Generale",title:"Inserisci/modifica file multimediale","align_top_left":"Alto a sinistra","align_center":"Centro","align_left":"Sinistra","align_bottom":"Basso","align_right":"Destra","align_top":"Alto","qt_stream_warn":"Le risorse rstp \'streamed\' devono essere aggiunte al campo Sorgente QT nella tabella Avanzate.\nSi dovrebbe inserire anche una versione non \'streamed\' al campo Sorgente..",qtsrc:"Sorgente QT",progress:"Avanzamento",sound:"Suono",swstretchvalign:"Tratto V-Allineamento",swstretchhalign:"Tratto H-Allineamento",swstretchstyle:"Stile Tratto",scriptcallbacks:"Script richiamato","align_top_right":"Alto a destra",uimode:"Modalit\u00e0 Interfaccia Utente",rate:"Qualit\u00e0",playcount:"Conteggio esecuzione",defaultframe:"Frame predefinito",currentposition:"Posizione corrente",currentmarker:"Indicatore corrente",captioningid:"Didascalia dell\'Id",baseurl:"URL base",balance:"Bilanciamento",windowlessvideo:"Video senza finestra",stretchtofit:"Adatta dimensioni",mute:"Muto",invokeurls:"Invoca URLs",fullscreen:"Tutto schermo",enabled:"Abilitato",autostart:"Avvio automatico",volume:"Volume",target:"Target",qtsrcchokespeed:"Velocit\u00e0 cursore",href:"Href",endtime:"Ora fine",starttime:"Ora inizio",enablejavascript:"Abilita JavaScript",correction:"Nessuna Correzione",targetcache:"Cache del target",playeveryframe:"Esegui ogni frame",kioskmode:"Modalit\u00e0 Kiosk",controller:"Controller",menu:"Mostra menu",loop:"Riproduzione ciclica",play:"Esecuzione automatica",hspace:"H-Spazio",vspace:"V-Spazio","class_name":"Classe",name:"Nome",id:"Id",type:"Tipo",size:"Dimensioni",preview:"Anteprima","constrain_proportions":"Mantieni Proporzioni",controls:"Controlli",numloop:"Numero Cicli",console:"Console",cache:"Cache",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"Flashvars",base:"Base",bgcolor:"Sfondo",wmode:"WMode",salign:"SAlign",align:"Allineamento",scale:"Scala",quality:"Qualit\u00e0",shuffle:"Shuffle",prefetch:"Precaricamento",nojava:"No java",maintainaspect:"Mantieni Aspetto",imagestatus:"Stato Immagine",center:"Centra",autogotourl:"Vai a URL automatico","shockwave_options":"Opzioni Shockwave","rmp_options":"Opzioni Real media player","wmp_options":"Opzioni Windows media player","qt_options":"Opzioni Quicktime","flash_options":"Opzioni Flash",hidden:"Nascosto","align_bottom_left":"Basso a Sinistra","align_bottom_right":"Basso a Destra",flash:"flash",quicktime:"quicktime","embedded_audio_options":"Opzioni Audio Embedded",windowsmedia:"windowsmedia",realmedia:"realmedia",shockwave:"shockwave",audio:"audio",video:"video","html5_video_options":"Opzioni Video HTML5",altsource1:"Sorgente alternativa 1",altsource2:"Sorgente alternativa 2",preload:"Precarica",poster:"Poster",source:"Sorgente","html5_audio_options":"Opzioni Audio","preload_none":"Non Precaricare","preload_metadata":"Precarica i metadati video","preload_auto":"Lascia decidere al browser dell\'utente",iframe:"iframe",embeddedaudio:"embeddedaudio"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/ja_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/ja_dlg.js deleted file mode 100644 index 9752ca22e5..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/ja_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('ja.media_dlg',{list:"\u4e00\u89a7",file:"\u30d5\u30a1\u30a4\u30eb\u3084URL",advanced:"\u8a73\u7d30",general:"\u4e00\u822c",title:"\u57cb\u3081\u8fbc\u307f\u30e1\u30c7\u30a3\u30a2\u306e\u633f\u5165\u3084\u7de8\u96c6","align_top_left":"\u5de6\u4e0a","align_center":"\u4e2d\u592e","align_left":"\u5de6","align_bottom":"\u4e0b","align_right":"\u53f3","align_top":"\u4e0a","qt_stream_warn":"RTSP\u30b9\u30c8\u30ea\u30fc\u30df\u30f3\u30b0\u30ea\u30bd\u30fc\u30b9\u3092\u300c\u9ad8\u5ea6\u300d\u306e\u30bf\u30d6\u306e\u300cQT\u306e\u30bd\u30fc\u30b9\u300d\u6b04\u306b\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002\n\u307e\u305f\u3001\u300c\u30bd\u30fc\u30b9\u300d\u6b04\u306b\u306f\u30b9\u30c8\u30ea\u30fc\u30df\u30f3\u30b0\u3067\u306f\u306a\u3044\u30d0\u30fc\u30b8\u30e7\u30fc\u30f3\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002",qtsrc:"QT\u306e\u30bd\u30fc\u30b9",progress:"\u9032\u5c55",sound:"\u30b5\u30a6\u30f3\u30c9",swstretchvalign:"\u5782\u76f4\u306e\u914d\u7f6e",swstretchhalign:"\u6c34\u5e73\u306e\u914d\u7f6e",swstretchstyle:"\u4f38\u7e2e\u306e\u30b9\u30bf\u30a4\u30eb",scriptcallbacks:"\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u30b3\u30fc\u30eb\u30d0\u30c3\u30af","align_top_right":"\u53f3\u4e0a",uimode:"UI\u3092\u8868\u793a\u3059\u308b\u30e2\u30fc\u30c9",rate:"\u518d\u751f\u30ec\u30fc\u30c8",playcount:"\u518d\u751f\u56de\u6570",defaultframe:"\u521d\u671f\u72b6\u614b\u306e\u30d5\u30ec\u30fc\u30e0",currentposition:"\u518d\u751f\u4f4d\u7f6e(\u79d2\u5358\u4f4d)",currentmarker:"\u30de\u30fc\u30ab\u30fc\u756a\u53f7",captioningid:"\u30ad\u30e3\u30d7\u30b7\u30e7\u30f3\u8868\u793a\u8981\u7d20ID",baseurl:"\u57fa\u6e96\u306eURL",balance:"\u30b9\u30c6\u30ec\u30aa\u306e\u30d0\u30e9\u30f3\u30b9",windowlessvideo:"\u30a6\u30a3\u30f3\u30c9\u30a6\u306a\u3057\u306e\u52d5\u753b",stretchtofit:"\u5408\u308f\u305b\u3066\u62e1\u5927",mute:"\u6d88\u97f3",invokeurls:"URL\u3092\u958b\u304f",fullscreen:"\u5168\u753b\u9762",enabled:"\u6709\u52b9",autostart:"\u81ea\u52d5\u518d\u751f",volume:"\u97f3\u91cf",target:"\u30bf\u30fc\u30b2\u30c3\u30c8",qtsrcchokespeed:"\u518d\u751f\u30c7\u30fc\u30bf\u30ec\u30fc\u30c8",href:"\u30ea\u30f3\u30af\u5148URL",endtime:"\u7d42\u4e86\u6642\u9593",starttime:"\u958b\u59cb\u6642\u9593",enablejavascript:"JavaScript\u3092\u6709\u52b9",correction:"\u8a02\u6b63\u306a\u3057",targetcache:"\u30bf\u30fc\u30b2\u30c3\u30c8\u3092\u30ad\u30e3\u30c3\u30b7\u30e5",playeveryframe:"\u3059\u3079\u3066\u306e\u30d5\u30ec\u30fc\u30e0\u3092\u518d\u751f",kioskmode:"Kiosk\u30e2\u30fc\u30c9",controller:"\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u306e\u8868\u793a",menu:"\u30e1\u30cb\u30e5\u30fc\u3092\u8868\u793a",loop:"\u7e70\u308a\u8fd4\u3057",play:"\u81ea\u52d5\u518d\u751f",hspace:"\u5de6\u53f3\u306e\u4f59\u767d",vspace:"\u4e0a\u4e0b\u306e\u4f59\u767d","class_name":"\u30af\u30e9\u30b9",name:"\u540d\u524d",id:"ID",type:"\u30bf\u30a4\u30d7",size:"\u5bf8\u6cd5",preview:"\u30d7\u30ec\u30d3\u30e5\u30fc","constrain_proportions":"\u7e26\u6a2a\u6bd4\u3092\u7dad\u6301",controls:"\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u306e\u8868\u793a",numloop:"\u7e70\u308a\u8fd4\u3057\u306e\u56de\u6570",console:"\u30b3\u30f3\u30bd\u30fc\u30eb",cache:"\u30ad\u30e3\u30c3\u30b7\u30e5",autohref:"\u81ea\u52d5\u8aad\u8fbc",liveconnect:"SWLiveConnect\u5c5e\u6027",flashvars:"Flash Vars",base:"Base",bgcolor:"\u80cc\u666f\u8272",wmode:"WMode",salign:"SAlign",align:"\u914d\u7f6e",scale:"\u4f38\u7e2e",quality:"\u54c1\u8cea",shuffle:"\u30b7\u30e3\u30c3\u30d5\u30eb",prefetch:"\u5148\u8aad\u307f",nojava:"Java\u3092\u7981\u6b62",maintainaspect:"\u7e26\u6a2a\u6bd4\u306e\u7dad\u6301",imagestatus:"\u753b\u50cf\u306e\u72b6\u614b",center:"\u4e2d\u592e\u63c3\u3048",autogotourl:"URL\u306b\u81ea\u52d5\u79fb\u52d5","shockwave_options":"Shockwave\u306e\u30aa\u30d7\u30b7\u30e7\u30f3","rmp_options":"Real media player\u306e\u30aa\u30d7\u30b7\u30e7\u30f3","wmp_options":"Windows media player\u306e\u30aa\u30d7\u30b7\u30e7\u30f3","qt_options":"Quicktime\u306e\u30aa\u30d7\u30b7\u30e7\u30f3","flash_options":"Flash\u306e\u30aa\u30d7\u30b7\u30e7\u30f3",hidden:"\u975e\u8868\u793a","align_bottom_left":"\u5de6\u4e0b","align_bottom_right":"\u53f3\u4e0b",flash:"flash",quicktime:"quicktime","embedded_audio_options":"\u57cb\u3081\u8fbc\u307fAudio\u306e\u30aa\u30d7\u30b7\u30e7\u30f3",windowsmedia:"Windows\u30e1\u30c7\u30a3\u30a2",realmedia:"realmedia",shockwave:"shockwave",audio:"\u30aa\u30fc\u30c7\u30a3\u30aa",video:"\u52d5\u753b","html5_video_options":"HTML5 Video\u306e\u30aa\u30d7\u30b7\u30e7\u30f3",altsource1:"\u4ee3\u66ff\u30bd\u30fc\u30b91",altsource2:"\u4ee3\u66ff\u30bd\u30fc\u30b92",preload:"preload\u5c5e\u6027",poster:"poster\u5c5e\u6027",source:"HTML","html5_audio_options":"Audio \u30aa\u30d7\u30b7\u30e7\u30f3","preload_none":"\u5148\u8aad\u307f\u3057\u306a\u3044","preload_metadata":"\u52d5\u753b\u306e\u30e1\u30bf\u30c7\u30fc\u30bf\u3092\u5148\u8aad\u307f","preload_auto":"\u30e6\u30fc\u30b6\u30fc\u306e\u30d6\u30e9\u30a6\u30b6\u30fc\u306b\u5f93\u3046",iframe:"iframe",embeddedaudio:"\u57cb\u3081\u8fbc\u307f\u97f3\u58f0"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/ko_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/ko_dlg.js deleted file mode 100644 index 878337af85..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/ko_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('ko.media_dlg',{list:"\ubaa9\ub85d",file:"\ud30c\uc77c/URL",advanced:"\uace0\uae09",general:"\uc77c\ubc18",title:"\ubbf8\ub514\uc5b4\uc758 \uc0bd\uc785/\ud3b8\uc9d1",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 Src field under the advanced tab.nYou should also add a non streamed version to the Src field..",qtsrc:"QT Src",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:"Fullscreen",enabled:"Enabled",autostart:"Auto start",volume:"Volume",target:"Target",qtsrcchokespeed:"Choke speed",href:"Href",endtime:"End time",starttime:"Start time",enablejavascript:"JavaScript\ub97c \ud5c8\uac00",correction:"No correction",targetcache:"Target cache",playeveryframe:"Play every frame",kioskmode:"Kiosk mode",controller:"Controller",menu:"\uba54\ub274 \ud45c\uc2dc",loop:"\uc5f0\uc18d \uc7ac\uc0dd",play:"\uc790\ub3d9 \uc7ac\uc0dd",hspace:"\uc88c\uc6b0 \uc5ec\ubc31",vspace:"\uc0c1\ud558 \uc5ec\ubc31",class_name:"Class",name:"Name",id:"Id",type:"\ud0c0\uc785",size:"\ud06c\uae30",preview:"\ubbf8\ub9ac\ubcf4\uae30",constrain_proportions:"\uc885\ud6a1\ube44 \uc720\uc9c0",controls:"Controls",numloop:"Num loops",console:"Console",cache:"Cache",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"Flashvars",base:"Base",bgcolor:"Background",wmode:"WMode",salign:"SAlign",align:"Align",scale:"\uc2a4\ucf00\uc77c",quality:"\ud488\uc9c8",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",flv_options:"Flash video options",flv_scalemode:"Scale mode",flv_buffer:"Buffer",flv_startimage:"Start image",flv_starttime:"Start time",flv_defaultvolume:"Default volumne",flv_hiddengui:"Hidden GUI",flv_autostart:"Auto start",flv_loop:"Loop",flv_showscalemodes:"Show scale modes",flv_smoothvideo:"Smooth video",flv_jscallback:"JS Callback"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/nl_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/nl_dlg.js deleted file mode 100644 index 68ae6b0088..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/nl_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('nl.media_dlg',{list:"Lijst",file:"Bestand/URL",advanced:"Geavanceerd",general:"Algemeen",title:"Media invoegen/bewerken","align_top_left":"Linksboven","align_center":"Centreren","align_left":"Links","align_bottom":"Onder","align_right":"Rechts","align_top":"Boven","qt_stream_warn":"Gestreamde RTSP bronnen dienen op het tabblad geavanceerd bij Quicktime bron te worden opgegeven.\nDe niet-gestreamde versie kan dan bij het tabblad algemeen worden opgegeven.",qtsrc:"Quicktime bron",progress:"Voortgang",sound:"Geluid",swstretchvalign:"V-Schaal",swstretchhalign:"H-Schaal",swstretchstyle:"Schaal",scriptcallbacks:"Script callbacks","align_top_right":"Rechtsboven",uimode:"UI Modus",rate:"Snelheid",playcount:"Afspeelteller",defaultframe:"Standaard frame",currentposition:"Huidige positie",currentmarker:"Huidige markering",captioningid:"Ondertiteling id",baseurl:"Basis URL",balance:"Balans",windowlessvideo:"Video zonder venster",stretchtofit:"Passend maken",mute:"Dempen",invokeurls:"URLs laden",fullscreen:"Volledig scherm",enabled:"Ingeschakeld",autostart:"Automatisch afspelen",volume:"Volume",target:"Doel",qtsrcchokespeed:"Chokesnelheid",href:"Href",endtime:"Eindtijd",starttime:"Starttijd",enablejavascript:"JavaScript Inschakelen",correction:"Geen correctie",targetcache:"Doelcache",playeveryframe:"Elk frame afspelen",kioskmode:"Kioskmodus",controller:"Controller",menu:"Menu weergeven",loop:"Herhalen",play:"Automatisch afspelen",hspace:"H-Ruimte",vspace:"V-Ruimte","class_name":"Klasse",name:"Naam",id:"Id",type:"Type",size:"Afmetingen",preview:"Voorbeeld","constrain_proportions":"Verhouding bewaren",controls:"Bediening",numloop:"Aantal herhalingen",console:"Console",cache:"Cache",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"Variabelen",base:"Basis",bgcolor:"Achtergrond",wmode:"WMode",salign:"Schaaluitlijning",align:"Uitlijning",scale:"Schaal",quality:"Kwaliteit",shuffle:"Willekeurige volgorde",prefetch:"Voorladen",nojava:"Geen Java",maintainaspect:"Verhouding bewaren",imagestatus:"Afbeeldingstatus",center:"Centreren",autogotourl:"Automatisch naar URL","shockwave_options":"Shockwave opties","rmp_options":"Real Media Player Opties","wmp_options":"Windows Media Player Opties","qt_options":"Quicktime opties","flash_options":"Flash opties",hidden:"Verborgen","align_bottom_left":"Linksonder","align_bottom_right":"Rechtsonder",flash:"flash",quicktime:"quicktime","embedded_audio_options":"Ge\u00efntegreerd Geluid Opties",windowsmedia:"windowsmedia",realmedia:"realmedia",shockwave:"shockwave",audio:"geluid",video:"video","html5_video_options":"HTML5 Video Opties",altsource1:"Alternatieve bron 1",altsource2:"Alternatieve bron 2",preload:"Voorladen",poster:"Poster",source:"Bron","html5_audio_options":"Audio Opties","preload_none":"Niet voorladen","preload_metadata":"Video metadata voorladen","preload_auto":"Laat browser beslissen",iframe:"iframe",embeddedaudio:"ge\u00efntegreerd geluid"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/no_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/no_dlg.js deleted file mode 100644 index 97029c4e22..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/no_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('no.media_dlg',{list:"Liste",file:"Fil/URL",advanced:"Avansert",general:"Generelt",title:"Sett inn/rediger innebygd objekt","align_top_left":"Topp venstre","align_center":"Midten","align_left":"Venstre","align_bottom":"Bunn","align_right":"H\u00f8yre","align_top":"Topp","qt_stream_warn":"Streamede rtsp ressurser b\u00f8r legges til QT Src-feltet under fanen avansert.\nDu b\u00f8r ogs\u00e5 legge til en ikke-streamet versjon i src-feltet.",qtsrc:"QT Src",progress:"Fremdrift",sound:"Lyd",swstretchvalign:"Strekk V-justering",swstretchhalign:"Strekk H-justering",swstretchstyle:"Strekk stil",scriptcallbacks:"Skriptreferanser","align_top_right":"\u00d8verst til h\u00f8yre",uimode:"UI-modus",rate:"Rate",playcount:"Teller",defaultframe:"Standard ramme",currentposition:"Aktiv posisjon",currentmarker:"Aktiv mark\u00f8r",captioningid:"Fange opp id",baseurl:"Utgangsadresse (URL)",balance:"Balanse",windowlessvideo:"Video uten vindu",stretchtofit:"Strekk for \u00e5 tilpasse",mute:"Dempe",invokeurls:"Aktiver URLer",fullscreen:"Fullskjerm",enabled:"Aktivert",autostart:"Autostart",volume:"Volum",target:"M\u00e5l",qtsrcchokespeed:"Choke-hastighet",href:"Href",endtime:"Stopptid",starttime:"Starttid",enablejavascript:"Tillat Javaskript",correction:"Ingen korreksjon",targetcache:"M\u00e5l-mellomlagring",playeveryframe:"Spill hver ramme",kioskmode:"Kiosk-modus",controller:"Kontroller",menu:"Vis meny",loop:"L\u00f8kke",play:"Autostart",hspace:"H-avstand",vspace:"V-avstand","class_name":"Klasse",name:"Navn",id:"Id",type:"Type",size:"Dimmensjoner",preview:"Forh\u00e5ndsvisning","constrain_proportions":"Behold proporsjoner",controls:"Kontroller",numloop:"Antall gjennomganger",console:"Konsoll",cache:"Mellomlager",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"Flash-variabler",base:"Base",bgcolor:"Bakgrunn",wmode:"W-modus",salign:"S-justering",align:"Justering",scale:"Skala",quality:"Kvalitet",shuffle:"Mikse",prefetch:"Hente p\u00e5 forh\u00e5nd",nojava:"Ingen Java",maintainaspect:"Behold st\u00f8rrelsesforhold",imagestatus:"Bildestatus",center:"Midtstill",autogotourl:"Auto g\u00e5-til URL","shockwave_options":"Shockwave egenskaper","rmp_options":"Real Media Player egenskaper","wmp_options":"Windows Media Player egenskaper","qt_options":"Quicktime egenskaper","flash_options":"Flash egenskaper",hidden:"Skjult","align_bottom_left":"Nederst til venste","align_bottom_right":"Nederst til h\u00f8yre",flash:"flash",quicktime:"quicktime","embedded_audio_options":"Alternativer for innebygget lydklipp",windowsmedia:"windowsmedia",realmedia:"realmedia",shockwave:"shockwave",audio:"lyd",video:"video","html5_video_options":"HTML5-videovalg",altsource1:"Alternativ kilde 1",altsource2:"Alternativ kilde 2",preload:"Forh\u00e5ndsvis",poster:"Poster",source:"Kilde","html5_audio_options":"Lydegenskaper","preload_none":"Ikke hent p\u00e5 forh\u00e5nd","preload_metadata":"Hent videometadata p\u00e5 forh\u00e5nd","preload_auto":"La brukerens nettleser avgj\u00f8re",iframe:"iframe",embeddedaudio:"embeddedaudio"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/pl_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/pl_dlg.js deleted file mode 100644 index 9e054b21da..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/pl_dlg.js +++ /dev/null @@ -1 +0,0 @@ -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"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/pt_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/pt_dlg.js deleted file mode 100644 index f578cd750f..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/pt_dlg.js +++ /dev/null @@ -1 +0,0 @@ -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"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/ru_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/ru_dlg.js deleted file mode 100644 index 62e7a52795..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/ru_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('ru.media_dlg',{list:"\u0421\u043f\u0438\u0441\u043e\u043a",file:"\u0410\u0434\u0440\u0435\u0441",advanced:"\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e",general:"\u041e\u0431\u0449\u0435\u0435",title:"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043a\u043b\u0438\u043f\u0430","align_top_left":"\u041f\u043e \u043b\u0435\u0432\u043e\u043c\u0443 \u0432\u0435\u0440\u0445\u043d\u0435\u043c\u0443 \u043a\u0440\u0430\u044e","align_center":"\u041f\u043e \u0446\u0435\u043d\u0442\u0440\u0443","align_left":"\u041f\u043e \u043b\u0435\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","align_bottom":"\u041f\u043e \u043d\u0438\u0436\u043d\u0435\u043c\u0443 \u043a\u0440\u0430\u044e","align_right":"\u041f\u043e \u043f\u0440\u0430\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","align_top":"\u041f\u043e \u0432\u0435\u0440\u0445\u043d\u0435\u043c\u0443 \u043a\u0440\u0430\u044e","qt_stream_warn":"\u041f\u043e\u0442\u043e\u043a\u043e\u0432\u044b\u0435 rtsp \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0432 \u043f\u043e\u043b\u0435 QT Src.",qtsrc:"QT Src",progress:"\u041f\u0440\u043e\u0433\u0440\u0435\u0441\u0441",sound:"\u0417\u0432\u0443\u043a",swstretchvalign:"\u0412\u0435\u0440. \u0432\u044b\u0440-\u0435 \u0440\u0430\u0441\u0442\u044f\u0436\u0435\u043d\u0438\u044f",swstretchhalign:"\u0413\u043e\u0440. \u0432\u044b\u0440-\u0435 \u0440\u0430\u0441\u0442\u044f\u0436\u0435\u043d\u0438\u044f",swstretchstyle:"\u0421\u0442\u0438\u043b\u044c \u0440\u0430\u0441\u0442\u044f\u0436\u0435\u043d\u0438\u0435",scriptcallbacks:"\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0441\u043a\u0440\u0438\u043f\u0442\u0430","align_top_right":"\u041f\u043e \u043f\u0440\u0430\u0432\u043e\u043c\u0443 \u0432\u0435\u0440\u0445\u043d\u0435\u043c\u0443 \u043a\u0440\u0430\u044e",uimode:"\u0420\u0435\u0436\u0438\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430",rate:"\u0420\u0435\u0439\u0442\u0438\u043d\u0433",playcount:"\u0429\u0435\u0442\u0447\u0438\u043a \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0439",defaultframe:"\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043a\u0430\u0434\u0440",currentposition:"\u0422\u0435\u043a\u0443\u0449\u0430\u044f \u043f\u043e\u0437\u0438\u0446\u0438\u044f",currentmarker:"\u0422\u0435\u043a\u0443\u0449\u0438\u0439 \u043c\u0430\u0440\u043a\u0435\u0440",captioningid:"\u0418\u043c\u044f \u0441\u0443\u0431\u0442\u0438\u0442\u0440\u043e\u0432",baseurl:"\u0411\u0430\u0437\u043e\u0440\u0432\u044b\u0439 \u0430\u0434\u0440\u0435\u0441",balance:"\u0411\u0430\u043b\u0430\u043d\u0441",windowlessvideo:"\u041e\u043a\u043e\u043d\u043d\u043e\u0435 \u0432\u0438\u0434\u0435\u043e",stretchtofit:"\u041f\u043e\u0434 \u0440\u0430\u0437\u043c\u0435\u0440 \u043e\u043a\u043d\u0430",mute:"\u0411\u0435\u0437 \u0437\u0432\u0443\u043a\u0430",invokeurls:"\u0412\u044b\u0437\u0432\u0430\u0442\u044c \u0430\u0434\u0440\u0435\u0441",fullscreen:"\u041d\u0430 \u0432\u0435\u0441\u044c \u044d\u043a\u0440\u0430\u043d",enabled:"\u0412\u043a\u043b\u044e\u0447\u0435\u043d\u043e",autostart:"\u0410\u0432\u0442\u043e\u0437\u0430\u043f\u0443\u0441\u043a",volume:"\u0413\u0440\u043e\u043c\u043a\u043e\u0441\u0442\u044c",target:"\u0426\u0435\u043b\u044c",qtsrcchokespeed:"Choke speed",href:"\u0421\u0441\u044b\u043b\u043a\u0430",endtime:"\u0412\u0440\u0435\u043c\u044f \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044f",starttime:"\u0412\u0440\u0435\u043c\u044f \u043d\u0430\u0447\u0430\u043b\u0430",enablejavascript:"\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u044c JavaScript",correction:"\u0411\u0435\u0437 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u043a\u0438",targetcache:"\u041a\u044d\u0448 \u0446\u0435\u043b\u0438",playeveryframe:"\u0412\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438 \u043a\u0430\u0436\u0434\u044b\u0439 \u043a\u0430\u0434\u0440",kioskmode:"\u0420\u0435\u0436\u0438\u043c \u043a\u0438\u043e\u0441\u043a",controller:"\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435",menu:"\u041f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043c\u0435\u043d\u044e",loop:"\u041f\u043e\u0432\u0442\u043e\u0440",play:"\u0410\u0432\u0442\u0437\u0430\u043f\u0443\u0441\u043a",hspace:"\u0413\u043e\u0440. \u043e\u0442\u0441\u0442\u0443\u043f",vspace:"\u0412\u0435\u0440\u0442. \u043e\u0442\u0441\u0442\u0443\u043f","class_name":"\u041a\u043b\u0430\u0441\u0441",name:"\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435",id:"\u0418\u043c\u044f",type:"\u0422\u0438\u043f",size:"\u0420\u0430\u0437\u043c\u0435\u0440\u044b",preview:"\u041f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440","constrain_proportions":"\u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u043f\u0440\u043e\u043f\u043e\u0440\u0446\u0438\u0438",controls:"\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435",numloop:"\u041f\u043e\u0432\u0442\u043e\u0440\u044b",console:"\u041a\u043e\u043d\u0441\u043e\u043b\u044c",cache:"\u041a\u044d\u0448",autohref:"\u0410\u0432\u0442\u043e-\u0441\u0441\u044b\u043b\u043a\u0430",liveconnect:"SWLiveConnect",flashvars:"Flash \u043a\u043e\u043c\u0430\u043d\u0434\u044b",base:"Base",bgcolor:"\u0424\u043e\u043d",wmode:"\u041e\u043a\u043d\u043e",salign:"\u0412\u044b\u0440-\u0435",align:"\u0412\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u0435",scale:"\u041e\u0431\u043b\u0430\u0441\u0442\u044c",quality:"\u041a\u0430\u0447\u0435\u0441\u0442\u0432\u043e",shuffle:"\u0412 \u0440\u0430\u0437\u0431\u0440\u043e\u0441",prefetch:"\u0423\u043f\u0440\u0435\u0436\u0434\u0430\u044e\u0449\u0430\u044f \u0432\u044b\u0431\u043e\u0440\u043a\u0430",nojava:"\u0411\u0435\u0437 Java",maintainaspect:"\u0417\u0430\u043f\u043e\u043c\u043d\u0438\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0440",imagestatus:"\u0421\u0442\u0430\u0442\u0443\u0441 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f",center:"\u0426\u0435\u043d\u0442\u0440",autogotourl:"\u0410\u0432\u0442\u043e\u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u043d\u0430 \u0430\u0434\u0440\u0435\u0441","shockwave_options":"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b Shockwave","rmp_options":"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b Real Media","wmp_options":"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b Windows Media","qt_options":"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b Quicktime","flash_options":"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b Flash",hidden:"\u0421\u043a\u0440\u044b\u0442\u044b\u0439","align_bottom_left":"\u041f\u043e \u043b\u0435\u0432\u043e\u043c\u0443 \u043d\u0438\u0436\u043d\u0435\u043c\u0443 \u043a\u0440\u0430\u044e","align_bottom_right":"\u041f\u043e \u043f\u0440\u0430\u0432\u043e\u043c\u0443 \u043d\u0438\u0436\u043d\u0435\u043c\u0443 \u043a\u0440\u0430\u044e",flash:"\u0412\u0441\u0442\u0430\u0432\u043a\u0430 Flash \u0444\u0430\u0439\u043b\u0430",quicktime:"\u0412\u0441\u0442\u0430\u0432\u043a\u0430 Quick Time \u0444\u0430\u0439\u043b\u0430","embedded_audio_options":"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0432\u043d\u0435\u0434\u0440\u0451\u043d\u043d\u043e\u0433\u043e \u0430\u0443\u0434\u0438\u043e",windowsmedia:"\u0412\u0441\u0442\u0430\u0432\u043a\u0430 Windows Media \u0444\u0430\u0439\u043b\u0430",realmedia:"\u0412\u0441\u0442\u0430\u0432\u043a\u0430 Real Media \u0444\u0430\u0439\u043b\u0430",shockwave:"\u0412\u0441\u0442\u0430\u0432\u043a\u0430 Shockwave \u0444\u0430\u0439\u043b\u0430",audio:"\u0412\u0441\u0442\u0430\u0432\u043a\u0430 HTML5 \u0437\u0432\u0443\u043a\u043e\u0432\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430",video:"\u0412\u0441\u0442\u0430\u0432\u043a\u0430 HTML5 \u0432\u0438\u0434\u0435\u043e \u0444\u0430\u0439\u043b\u0430","html5_video_options":"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b HTML5 Video",altsource1:"\u0410\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a 1",altsource2:"\u0410\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a 2",preload:"\u041f\u0440\u0435\u0434\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430",poster:"\u041f\u043e\u0441\u0442\u0435\u0440",source:"\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a","html5_audio_options":"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0430\u0443\u0434\u0438\u043e","preload_none":"\u0411\u0435\u0437 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438","preload_metadata":"\u041f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u0438\u0434\u0435\u043e","preload_auto":"\u041d\u0430 \u0443\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u0438\u0435 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430",iframe:"\u0412\u0441\u0442\u0430\u0432\u043a\u0430 \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u0440\u0435\u0441\u0443\u0440\u0441 \u0432 IFrame",embeddedaudio:"\u0412\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u0417\u0432\u0443\u043a"}); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/sv_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/sv_dlg.js deleted file mode 100644 index 4f71780a96..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/sv_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('sv.media_dlg',{list:"Lista",file:"Fil/URL",advanced:"Avancerat",general:"Generellt",title:"Infoga/redigera inb\u00e4ddad media","align_top_left":"Top left","align_center":"Center","align_left":"V\u00e4nster","align_bottom":"Botten","align_right":"H\u00f6ger","align_top":"Toppen","qt_stream_warn":"Streamed rtsp resources should be added to the QT Src field under the advanced tab.\nYou should also add a non streamed version to the Src field..",qtsrc:"QT Src",progress:"Progress",sound:"Ljud",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:"Fullsk\u00e4rm",enabled:"Aktiverad",autostart:"Starta automatiskt",volume:"Volym",target:"M\u00e5l",qtsrcchokespeed:"Choke speed",href:"Href",endtime:"Slut tid",starttime:"Start tid",enablejavascript:"Aktivera JavaScript",correction:"No correction",targetcache:"Target cache",playeveryframe:"Spela varje bildruta",kioskmode:"Kiosk mode",controller:"Controller",menu:"Visa menyn",loop:"Loopa",play:"Spela upp automatiskt",hspace:"H-Space",vspace:"V-Space","class_name":"Klass",name:"Namn",id:"Id",type:"Typ",size:"Dimensioner",preview:"F\u00f6rhandsvisning","constrain_proportions":"Bibeh\u00e5ll proportionerna",controls:"Controls",numloop:"Num loops",console:"Console",cache:"Cache",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"Flashvars",base:"Base",bgcolor:"Bakgrundsf\u00e4rg",wmode:"WMode",salign:"SAlign",align:"Justera",scale:"Skala",quality:"Kvalit\u00e9",shuffle:"Shuffle",prefetch:"Prefetch",nojava:"No java",maintainaspect:"Maintain aspect",imagestatus:"Bild status",center:"Center",autogotourl:"Auto goto URL","shockwave_options":"Inst\u00e4llningar f\u00f6r Shockwave","rmp_options":"Real media player options","wmp_options":"Windows media player options","qt_options":"Quicktime options","flash_options":"Flash options",hidden:"G\u00f6md","align_bottom_left":"Bottom left","align_bottom_right":"Bottom right",flash:"flash",quicktime:"quicktime ","embedded_audio_options":"Inst\u00e4llningar f\u00f6r inb\u00e4ddatljud",windowsmedia:"windowsmedia ",realmedia:"realmedia ",shockwave:"shockwave ",audio:"ljud",video:"video","html5_video_options":"HTML5 Filmegenskaper",altsource1:"Alternativk\u00e4lla 1",altsource2:"Alternativk\u00e4lla 2",preload:"F\u00f6rladda",poster:"Poster",source:"K\u00e4lla","html5_audio_options":"Ljudinst\u00e4llningar","preload_none":"F\u00f6rladda inte","preload_metadata":"F\u00f6rladda metadata","preload_auto":"L\u00e5t webbl\u00e4saren v\u00e4lja",iframe:"iframe",embeddedaudio:"inb\u00e4ddat ljud"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/zh_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/zh_dlg.js deleted file mode 100644 index 273a48f0c8..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/zh_dlg.js +++ /dev/null @@ -1 +0,0 @@ -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"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/media.htm b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/media.htm deleted file mode 100644 index 957d83a686..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/media.htm +++ /dev/null @@ -1,922 +0,0 @@ - - - - {#media_dlg.title} - - - - - - - - - -
    - - -
    -
    -
    - {#media_dlg.general} - - - - - - - - - - - - - - - - - - -
    - -
    - - - - - -
     
    -
    - - - - - - -
    x   
    -
    -
    - -
    - {#media_dlg.preview} - -
    -
    - -
    -
    - {#media_dlg.advanced} - - - - - - - - - - - - - - - - - - - - - - - -
    - - - - - - - -
     
    -
    -
    - -
    - {#media_dlg.html5_video_options} - - - - - - - - - - - - - - - - - - - - - -
    - - - - - -
     
    -
    - - - - - -
     
    -
    - - - - - -
     
    -
    - -
    - - - - - - - - - - - -
    - - - - - -
    -
    - - - - - -
    -
    - - - - - -
    -
    - - - - - -
    -
    -
    - -
    - {#media_dlg.embedded_audio_options} - - - - - - - - - -
    - - - - - -
    -
    - - - - - -
    -
    - - - - - -
    -
    -
    - -
    - {#media_dlg.html5_audio_options} - - - - - - - - - - - - - - - - -
    - - - - - -
     
    -
    - - - - - -
     
    -
    - -
    - - - - - - - - - -
    - - - - - -
    -
    - - - - - -
    -
    - - - - - -
    -
    -
    - -
    - {#media_dlg.flash_options} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - - -
    - - - -
    - - - - - -
    -
    - - - - - -
    -
    - - - - - -
    -
    - - - - - -
    -
    - - - - - - - - - - - -
    -
    - -
    - {#media_dlg.qt_options} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - - - - -
    -
    - - - - - -
    -
    - - - - - -
    -
    - - - - - -
    -
    - - - - - -
    -
    - - - - - -
    -
    - - - - - -
    -
    - - - - - -
    -
    - - - - - -
    -
    - - - - - -
    -
    -  
    - - - - - -
     
    -
    -
    - -
    - {#media_dlg.wmp_options} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - - - - -
    -
    - - - - - -
    -
    - - - - - -
    -
    - - - - - -
    -
    - - - - - -
    -
    - - - - - -
    -
    - - - - - -
    -
    - - - - - -
    -
    -
    - -
    - {#media_dlg.rmp_options} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - - - - -
    -
    - - - - - -
    -
    - - - - - -
    -
    - - - - - -
    -
    - - - - - -
    -
    - - - - - -
    -
    - - - - - -
    -
    - - - - - -
    -
    - - - - - -
    -
    -   -
    -
    - -
    - {#media_dlg.shockwave_options} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    - - - -
    - - - - - -
    -
    - - - - - -
    -
    - - - - - -
    -
    - - - - - -
    -
    -
    -
    - -
    -
    - {#media_dlg.source} - -
    -
    -
    - -
    - - -
    -
    - - diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/moxieplayer.swf b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/moxieplayer.swf deleted file mode 100644 index 585d772d6d..0000000000 Binary files a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/moxieplayer.swf and /dev/null differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/nonbreaking/editor_plugin.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/nonbreaking/editor_plugin.js deleted file mode 100644 index 687f548669..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/nonbreaking/editor_plugin.js +++ /dev/null @@ -1 +0,0 @@ -(function(){tinymce.create("tinymce.plugins.Nonbreaking",{init:function(a,b){var c=this;c.editor=a;a.addCommand("mceNonBreaking",function(){a.execCommand("mceInsertContent",false,(a.plugins.visualchars&&a.plugins.visualchars.state)?' ':" ")});a.addButton("nonbreaking",{title:"nonbreaking.nonbreaking_desc",cmd:"mceNonBreaking"});if(a.getParam("nonbreaking_force_tab")){a.onKeyDown.add(function(d,f){if(f.keyCode==9){f.preventDefault();d.execCommand("mceNonBreaking");d.execCommand("mceNonBreaking");d.execCommand("mceNonBreaking")}})}},getInfo:function(){return{longname:"Nonbreaking space",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/nonbreaking",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("nonbreaking",tinymce.plugins.Nonbreaking)})(); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/nonbreaking/editor_plugin_src.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/nonbreaking/editor_plugin_src.js deleted file mode 100644 index d492fbefe4..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/nonbreaking/editor_plugin_src.js +++ /dev/null @@ -1,54 +0,0 @@ -/** - * editor_plugin_src.js - * - * Copyright 2009, Moxiecode Systems AB - * Released under LGPL License. - * - * License: http://tinymce.moxiecode.com/license - * Contributing: http://tinymce.moxiecode.com/contributing - */ - -(function() { - tinymce.create('tinymce.plugins.Nonbreaking', { - init : function(ed, url) { - var t = this; - - t.editor = ed; - - // Register commands - ed.addCommand('mceNonBreaking', function() { - ed.execCommand('mceInsertContent', false, (ed.plugins.visualchars && ed.plugins.visualchars.state) ? ' ' : ' '); - }); - - // Register buttons - ed.addButton('nonbreaking', {title : 'nonbreaking.nonbreaking_desc', cmd : 'mceNonBreaking'}); - - if (ed.getParam('nonbreaking_force_tab')) { - ed.onKeyDown.add(function(ed, e) { - if (e.keyCode == 9) { - e.preventDefault(); - - ed.execCommand('mceNonBreaking'); - ed.execCommand('mceNonBreaking'); - ed.execCommand('mceNonBreaking'); - } - }); - } - }, - - getInfo : function() { - return { - longname : 'Nonbreaking space', - author : 'Moxiecode Systems AB', - authorurl : 'http://tinymce.moxiecode.com', - infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/nonbreaking', - version : tinymce.majorVersion + "." + tinymce.minorVersion - }; - } - - // Private methods - }); - - // Register plugin - tinymce.PluginManager.add('nonbreaking', tinymce.plugins.Nonbreaking); -})(); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/noneditable/editor_plugin.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/noneditable/editor_plugin.js deleted file mode 100644 index da411ebc09..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/noneditable/editor_plugin.js +++ /dev/null @@ -1 +0,0 @@ -(function(){var c=tinymce.dom.TreeWalker;var a="contenteditable",d="data-mce-"+a;var e=tinymce.VK;function b(n){var j=n.dom,p=n.selection,r,o="mce_noneditablecaret",r="\uFEFF";function m(t){var s;if(t.nodeType===1){s=t.getAttribute(d);if(s&&s!=="inherit"){return s}s=t.contentEditable;if(s!=="inherit"){return s}}return null}function g(s){var t;while(s){t=m(s);if(t){return t==="false"?s:null}s=s.parentNode}}function l(s){while(s){if(s.id===o){return s}s=s.parentNode}}function k(s){var t;if(s){t=new c(s,s);for(s=t.current();s;s=t.next()){if(s.nodeType===3){return s}}}}function f(v,u){var s,t;if(m(v)==="false"){if(j.isBlock(v)){p.select(v);return}}t=j.createRng();if(m(v)==="true"){if(!v.firstChild){v.appendChild(n.getDoc().createTextNode("\u00a0"))}v=v.firstChild;u=true}s=j.create("span",{id:o,"data-mce-bogus":true},r);if(u){v.parentNode.insertBefore(s,v)}else{j.insertAfter(s,v)}t.setStart(s.firstChild,1);t.collapse(true);p.setRng(t);return s}function i(s){var v,t,u;if(s){rng=p.getRng(true);rng.setStartBefore(s);rng.setEndBefore(s);v=k(s);if(v&&v.nodeValue.charAt(0)==r){v=v.deleteData(0,1)}j.remove(s,true);p.setRng(rng)}else{t=l(p.getStart());while((s=j.get(o))&&s!==u){if(t!==s){v=k(s);if(v&&v.nodeValue.charAt(0)==r){v=v.deleteData(0,1)}j.remove(s,true)}u=s}}}function q(){var s,w,u,t,v;function x(B,D){var A,F,E,C,z;A=t.startContainer;F=t.startOffset;if(A.nodeType==3){z=A.nodeValue.length;if((F>0&&F0?F-1:F;A=A.childNodes[G];if(A.hasChildNodes()){A=A.firstChild}}else{return !D?B:null}}E=new c(A,B);while(C=E[D?"prev":"next"]()){if(C.nodeType===3&&C.nodeValue.length>0){return}else{if(m(C)==="true"){return C}}}return B}i();u=p.isCollapsed();s=g(p.getStart());w=g(p.getEnd());if(s||w){t=p.getRng(true);if(u){s=s||w;var y=p.getStart();if(v=x(s,true)){f(v,true)}else{if(v=x(s,false)){f(v,false)}else{p.select(s)}}}else{t=p.getRng(true);if(s){t.setStartBefore(s)}if(w){t.setEndAfter(w)}p.setRng(t)}}}function h(z,B){var F=B.keyCode,x,C,D,v;function u(H,G){while(H=H[G?"previousSibling":"nextSibling"]){if(H.nodeType!==3||H.nodeValue.length>0){return H}}}function y(G,H){p.select(G);p.collapse(H)}function t(K){var J,I,M,H;function G(O){var N=I;while(N){if(N===O){return}N=N.parentNode}j.remove(O);q()}function L(){var O,P,N=z.schema.getNonEmptyElements();P=new tinymce.dom.TreeWalker(I,z.getBody());while(O=(K?P.prev():P.next())){if(N[O.nodeName.toLowerCase()]){break}if(O.nodeType===3&&tinymce.trim(O.nodeValue).length>0){break}if(m(O)==="false"){G(O);return true}}if(g(O)){return true}return false}if(p.isCollapsed()){J=p.getRng(true);I=J.startContainer;M=J.startOffset;I=l(I)||I;if(H=g(I)){G(H);return false}if(I.nodeType==3&&(K?M>0:M124)&&F!=e.DELETE&&F!=e.BACKSPACE){if((tinymce.isMac?B.metaKey:B.ctrlKey)&&(F==67||F==88||F==86)){return}B.preventDefault();if(F==e.LEFT||F==e.RIGHT){var w=F==e.LEFT;if(z.dom.isBlock(x)){var A=w?x.previousSibling:x.nextSibling;var s=new c(A,A);var E=w?s.prev():s.next();y(E,!w)}else{y(x,w)}}}else{if(F==e.LEFT||F==e.RIGHT||F==e.BACKSPACE||F==e.DELETE){C=l(D);if(C){if(F==e.LEFT||F==e.BACKSPACE){x=u(C,true);if(x&&m(x)==="false"){B.preventDefault();if(F==e.LEFT){y(x,true)}else{j.remove(x);return}}else{i(C)}}if(F==e.RIGHT||F==e.DELETE){x=u(C);if(x&&m(x)==="false"){B.preventDefault();if(F==e.RIGHT){y(x,false)}else{j.remove(x);return}}else{i(C)}}}if((F==e.BACKSPACE||F==e.DELETE)&&!t(F==e.BACKSPACE)){B.preventDefault();return false}}}}n.onMouseDown.addToTop(function(s,u){var t=s.selection.getNode();if(m(t)==="false"&&t==u.target){q()}});n.onMouseUp.addToTop(q);n.onKeyDown.addToTop(h);n.onKeyUp.addToTop(q)}tinymce.create("tinymce.plugins.NonEditablePlugin",{init:function(i,k){var h,g,j;function f(m,n){var o=j.length,p=n.content,l=tinymce.trim(g);if(n.format=="raw"){return}while(o--){p=p.replace(j[o],function(s){var r=arguments,q=r[r.length-2];if(q>0&&p.charAt(q-1)=='"'){return s}return''+m.dom.encode(typeof(r[1])==="string"?r[1]:r[0])+""})}n.content=p}h=" "+tinymce.trim(i.getParam("noneditable_editable_class","mceEditable"))+" ";g=" "+tinymce.trim(i.getParam("noneditable_noneditable_class","mceNonEditable"))+" ";j=i.getParam("noneditable_regexp");if(j&&!j.length){j=[j]}i.onPreInit.add(function(){b(i);if(j){i.selection.onBeforeSetContent.add(f);i.onBeforeSetContent.add(f)}i.parser.addAttributeFilter("class",function(l){var m=l.length,n,o;while(m--){o=l[m];n=" "+o.attr("class")+" ";if(n.indexOf(h)!==-1){o.attr(d,"true")}else{if(n.indexOf(g)!==-1){o.attr(d,"false")}}}});i.serializer.addAttributeFilter(d,function(l,m){var n=l.length,o;while(n--){o=l[n];if(j&&o.attr("data-mce-content")){o.name="#text";o.type=3;o.raw=true;o.value=o.attr("data-mce-content")}else{o.attr(a,null);o.attr(d,null)}}});i.parser.addAttributeFilter(a,function(l,m){var n=l.length,o;while(n--){o=l[n];o.attr(d,o.attr(a));o.attr(a,null)}})})},getInfo:function(){return{longname:"Non editable elements",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/noneditable",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("noneditable",tinymce.plugins.NonEditablePlugin)})(); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/noneditable/editor_plugin_src.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/noneditable/editor_plugin_src.js deleted file mode 100644 index a18bcd786a..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/noneditable/editor_plugin_src.js +++ /dev/null @@ -1,537 +0,0 @@ -/** - * editor_plugin_src.js - * - * Copyright 2009, Moxiecode Systems AB - * Released under LGPL License. - * - * License: http://tinymce.moxiecode.com/license - * Contributing: http://tinymce.moxiecode.com/contributing - */ - -(function() { - var TreeWalker = tinymce.dom.TreeWalker; - var externalName = 'contenteditable', internalName = 'data-mce-' + externalName; - var VK = tinymce.VK; - - function handleContentEditableSelection(ed) { - var dom = ed.dom, selection = ed.selection, invisibleChar, caretContainerId = 'mce_noneditablecaret', invisibleChar = '\uFEFF'; - - // Returns the content editable state of a node "true/false" or null - function getContentEditable(node) { - var contentEditable; - - // Ignore non elements - if (node.nodeType === 1) { - // Check for fake content editable - contentEditable = node.getAttribute(internalName); - if (contentEditable && contentEditable !== "inherit") { - return contentEditable; - } - - // Check for real content editable - contentEditable = node.contentEditable; - if (contentEditable !== "inherit") { - return contentEditable; - } - } - - return null; - }; - - // Returns the noneditable parent or null if there is a editable before it or if it wasn't found - function getNonEditableParent(node) { - var state; - - while (node) { - state = getContentEditable(node); - if (state) { - return state === "false" ? node : null; - } - - node = node.parentNode; - } - }; - - // Get caret container parent for the specified node - function getParentCaretContainer(node) { - while (node) { - if (node.id === caretContainerId) { - return node; - } - - node = node.parentNode; - } - }; - - // Finds the first text node in the specified node - function findFirstTextNode(node) { - var walker; - - if (node) { - walker = new TreeWalker(node, node); - - for (node = walker.current(); node; node = walker.next()) { - if (node.nodeType === 3) { - return node; - } - } - } - }; - - // Insert caret container before/after target or expand selection to include block - function insertCaretContainerOrExpandToBlock(target, before) { - var caretContainer, rng; - - // Select block - if (getContentEditable(target) === "false") { - if (dom.isBlock(target)) { - selection.select(target); - return; - } - } - - rng = dom.createRng(); - - if (getContentEditable(target) === "true") { - if (!target.firstChild) { - target.appendChild(ed.getDoc().createTextNode('\u00a0')); - } - - target = target.firstChild; - before = true; - } - - //caretContainer = dom.create('span', {id: caretContainerId, 'data-mce-bogus': true, style:'border: 1px solid red'}, invisibleChar); - caretContainer = dom.create('span', {id: caretContainerId, 'data-mce-bogus': true}, invisibleChar); - - if (before) { - target.parentNode.insertBefore(caretContainer, target); - } else { - dom.insertAfter(caretContainer, target); - } - - rng.setStart(caretContainer.firstChild, 1); - rng.collapse(true); - selection.setRng(rng); - - return caretContainer; - }; - - // Removes any caret container except the one we might be in - function removeCaretContainer(caretContainer) { - var child, currentCaretContainer, lastContainer; - - if (caretContainer) { - rng = selection.getRng(true); - rng.setStartBefore(caretContainer); - rng.setEndBefore(caretContainer); - - child = findFirstTextNode(caretContainer); - if (child && child.nodeValue.charAt(0) == invisibleChar) { - child = child.deleteData(0, 1); - } - - dom.remove(caretContainer, true); - - selection.setRng(rng); - } else { - currentCaretContainer = getParentCaretContainer(selection.getStart()); - while ((caretContainer = dom.get(caretContainerId)) && caretContainer !== lastContainer) { - if (currentCaretContainer !== caretContainer) { - child = findFirstTextNode(caretContainer); - if (child && child.nodeValue.charAt(0) == invisibleChar) { - child = child.deleteData(0, 1); - } - - dom.remove(caretContainer, true); - } - - lastContainer = caretContainer; - } - } - }; - - // Modifies the selection to include contentEditable false elements or insert caret containers - function moveSelection() { - var nonEditableStart, nonEditableEnd, isCollapsed, rng, element; - - // Checks if there is any contents to the left/right side of caret returns the noneditable element or any editable element if it finds one inside - function hasSideContent(element, left) { - var container, offset, walker, node, len; - - container = rng.startContainer; - offset = rng.startOffset; - - // If endpoint is in middle of text node then expand to beginning/end of element - if (container.nodeType == 3) { - len = container.nodeValue.length; - if ((offset > 0 && offset < len) || (left ? offset == len : offset == 0)) { - return; - } - } else { - // Can we resolve the node by index - if (offset < container.childNodes.length) { - // Browser represents caret position as the offset at the start of an element. When moving right - // this is the element we are moving into so we consider our container to be child node at offset-1 - var pos = !left && offset > 0 ? offset-1 : offset; - container = container.childNodes[pos]; - if (container.hasChildNodes()) { - container = container.firstChild; - } - } else { - // If not then the caret is at the last position in it's container and the caret container should be inserted after the noneditable element - return !left ? element : null; - } - } - - // Walk left/right to look for contents - walker = new TreeWalker(container, element); - while (node = walker[left ? 'prev' : 'next']()) { - if (node.nodeType === 3 && node.nodeValue.length > 0) { - return; - } else if (getContentEditable(node) === "true") { - // Found contentEditable=true element return this one to we can move the caret inside it - return node; - } - } - - return element; - }; - - // Remove any existing caret containers - removeCaretContainer(); - - // Get noneditable start/end elements - isCollapsed = selection.isCollapsed(); - nonEditableStart = getNonEditableParent(selection.getStart()); - nonEditableEnd = getNonEditableParent(selection.getEnd()); - - // Is any fo the range endpoints noneditable - if (nonEditableStart || nonEditableEnd) { - rng = selection.getRng(true); - - // If it's a caret selection then look left/right to see if we need to move the caret out side or expand - if (isCollapsed) { - nonEditableStart = nonEditableStart || nonEditableEnd; - var start = selection.getStart(); - if (element = hasSideContent(nonEditableStart, true)) { - // We have no contents to the left of the caret then insert a caret container before the noneditable element - insertCaretContainerOrExpandToBlock(element, true); - } else if (element = hasSideContent(nonEditableStart, false)) { - // We have no contents to the right of the caret then insert a caret container after the noneditable element - insertCaretContainerOrExpandToBlock(element, false); - } else { - // We are in the middle of a noneditable so expand to select it - selection.select(nonEditableStart); - } - } else { - rng = selection.getRng(true); - - // Expand selection to include start non editable element - if (nonEditableStart) { - rng.setStartBefore(nonEditableStart); - } - - // Expand selection to include end non editable element - if (nonEditableEnd) { - rng.setEndAfter(nonEditableEnd); - } - - selection.setRng(rng); - } - } - }; - - function handleKey(ed, e) { - var keyCode = e.keyCode, nonEditableParent, caretContainer, startElement, endElement; - - function getNonEmptyTextNodeSibling(node, prev) { - while (node = node[prev ? 'previousSibling' : 'nextSibling']) { - if (node.nodeType !== 3 || node.nodeValue.length > 0) { - return node; - } - } - }; - - function positionCaretOnElement(element, start) { - selection.select(element); - selection.collapse(start); - } - - function canDelete(backspace) { - var rng, container, offset, nonEditableParent; - - function removeNodeIfNotParent(node) { - var parent = container; - - while (parent) { - if (parent === node) { - return; - } - - parent = parent.parentNode; - } - - dom.remove(node); - moveSelection(); - } - - function isNextPrevTreeNodeNonEditable() { - var node, walker, nonEmptyElements = ed.schema.getNonEmptyElements(); - - walker = new tinymce.dom.TreeWalker(container, ed.getBody()); - while (node = (backspace ? walker.prev() : walker.next())) { - // Found IMG/INPUT etc - if (nonEmptyElements[node.nodeName.toLowerCase()]) { - break; - } - - // Found text node with contents - if (node.nodeType === 3 && tinymce.trim(node.nodeValue).length > 0) { - break; - } - - // Found non editable node - if (getContentEditable(node) === "false") { - removeNodeIfNotParent(node); - return true; - } - } - - // Check if the content node is within a non editable parent - if (getNonEditableParent(node)) { - return true; - } - - return false; - } - - if (selection.isCollapsed()) { - rng = selection.getRng(true); - container = rng.startContainer; - offset = rng.startOffset; - container = getParentCaretContainer(container) || container; - - // Is in noneditable parent - if (nonEditableParent = getNonEditableParent(container)) { - removeNodeIfNotParent(nonEditableParent); - return false; - } - - // Check if the caret is in the middle of a text node - if (container.nodeType == 3 && (backspace ? offset > 0 : offset < container.nodeValue.length)) { - return true; - } - - // Resolve container index - if (container.nodeType == 1) { - container = container.childNodes[offset] || container; - } - - // Check if previous or next tree node is non editable then block the event - if (isNextPrevTreeNodeNonEditable()) { - return false; - } - } - - return true; - } - - startElement = selection.getStart() - endElement = selection.getEnd(); - - // Disable all key presses in contentEditable=false except delete or backspace - nonEditableParent = getNonEditableParent(startElement) || getNonEditableParent(endElement); - if (nonEditableParent && (keyCode < 112 || keyCode > 124) && keyCode != VK.DELETE && keyCode != VK.BACKSPACE) { - // Is Ctrl+c, Ctrl+v or Ctrl+x then use default browser behavior - if ((tinymce.isMac ? e.metaKey : e.ctrlKey) && (keyCode == 67 || keyCode == 88 || keyCode == 86)) { - return; - } - - e.preventDefault(); - - // Arrow left/right select the element and collapse left/right - if (keyCode == VK.LEFT || keyCode == VK.RIGHT) { - var left = keyCode == VK.LEFT; - // If a block element find previous or next element to position the caret - if (ed.dom.isBlock(nonEditableParent)) { - var targetElement = left ? nonEditableParent.previousSibling : nonEditableParent.nextSibling; - var walker = new TreeWalker(targetElement, targetElement); - var caretElement = left ? walker.prev() : walker.next(); - positionCaretOnElement(caretElement, !left); - } else { - positionCaretOnElement(nonEditableParent, left); - } - } - } else { - // Is arrow left/right, backspace or delete - if (keyCode == VK.LEFT || keyCode == VK.RIGHT || keyCode == VK.BACKSPACE || keyCode == VK.DELETE) { - caretContainer = getParentCaretContainer(startElement); - if (caretContainer) { - // Arrow left or backspace - if (keyCode == VK.LEFT || keyCode == VK.BACKSPACE) { - nonEditableParent = getNonEmptyTextNodeSibling(caretContainer, true); - - if (nonEditableParent && getContentEditable(nonEditableParent) === "false") { - e.preventDefault(); - - if (keyCode == VK.LEFT) { - positionCaretOnElement(nonEditableParent, true); - } else { - dom.remove(nonEditableParent); - return; - } - } else { - removeCaretContainer(caretContainer); - } - } - - // Arrow right or delete - if (keyCode == VK.RIGHT || keyCode == VK.DELETE) { - nonEditableParent = getNonEmptyTextNodeSibling(caretContainer); - - if (nonEditableParent && getContentEditable(nonEditableParent) === "false") { - e.preventDefault(); - - if (keyCode == VK.RIGHT) { - positionCaretOnElement(nonEditableParent, false); - } else { - dom.remove(nonEditableParent); - return; - } - } else { - removeCaretContainer(caretContainer); - } - } - } - - if ((keyCode == VK.BACKSPACE || keyCode == VK.DELETE) && !canDelete(keyCode == VK.BACKSPACE)) { - e.preventDefault(); - return false; - } - } - } - }; - - ed.onMouseDown.addToTop(function(ed, e) { - var node = ed.selection.getNode(); - - if (getContentEditable(node) === "false" && node == e.target) { - // Expand selection on mouse down we can't block the default event since it's used for drag/drop - moveSelection(); - } - }); - - ed.onMouseUp.addToTop(moveSelection); - ed.onKeyDown.addToTop(handleKey); - ed.onKeyUp.addToTop(moveSelection); - }; - - tinymce.create('tinymce.plugins.NonEditablePlugin', { - init : function(ed, url) { - var editClass, nonEditClass, nonEditableRegExps; - - // Converts configured regexps to noneditable span items - function convertRegExpsToNonEditable(ed, args) { - var i = nonEditableRegExps.length, content = args.content, cls = tinymce.trim(nonEditClass); - - // Don't replace the variables when raw is used for example on undo/redo - if (args.format == "raw") { - return; - } - - while (i--) { - content = content.replace(nonEditableRegExps[i], function(match) { - var args = arguments, index = args[args.length - 2]; - - // Is value inside an attribute then don't replace - if (index > 0 && content.charAt(index - 1) == '"') { - return match; - } - - return '' + ed.dom.encode(typeof(args[1]) === "string" ? args[1] : args[0]) + ''; - }); - } - - args.content = content; - }; - - editClass = " " + tinymce.trim(ed.getParam("noneditable_editable_class", "mceEditable")) + " "; - nonEditClass = " " + tinymce.trim(ed.getParam("noneditable_noneditable_class", "mceNonEditable")) + " "; - - // Setup noneditable regexps array - nonEditableRegExps = ed.getParam("noneditable_regexp"); - if (nonEditableRegExps && !nonEditableRegExps.length) { - nonEditableRegExps = [nonEditableRegExps]; - } - - ed.onPreInit.add(function() { - handleContentEditableSelection(ed); - - if (nonEditableRegExps) { - ed.selection.onBeforeSetContent.add(convertRegExpsToNonEditable); - ed.onBeforeSetContent.add(convertRegExpsToNonEditable); - } - - // Apply contentEditable true/false on elements with the noneditable/editable classes - ed.parser.addAttributeFilter('class', function(nodes) { - var i = nodes.length, className, node; - - while (i--) { - node = nodes[i]; - className = " " + node.attr("class") + " "; - - if (className.indexOf(editClass) !== -1) { - node.attr(internalName, "true"); - } else if (className.indexOf(nonEditClass) !== -1) { - node.attr(internalName, "false"); - } - } - }); - - // Remove internal name - ed.serializer.addAttributeFilter(internalName, function(nodes, name) { - var i = nodes.length, node; - - while (i--) { - node = nodes[i]; - - if (nonEditableRegExps && node.attr('data-mce-content')) { - node.name = "#text"; - node.type = 3; - node.raw = true; - node.value = node.attr('data-mce-content'); - } else { - node.attr(externalName, null); - node.attr(internalName, null); - } - } - }); - - // Convert external name into internal name - ed.parser.addAttributeFilter(externalName, function(nodes, name) { - var i = nodes.length, node; - - while (i--) { - node = nodes[i]; - node.attr(internalName, node.attr(externalName)); - node.attr(externalName, null); - } - }); - }); - }, - - getInfo : function() { - return { - longname : 'Non editable elements', - author : 'Moxiecode Systems AB', - authorurl : 'http://tinymce.moxiecode.com', - infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/noneditable', - version : tinymce.majorVersion + "." + tinymce.minorVersion - }; - } - }); - - // Register plugin - tinymce.PluginManager.add('noneditable', tinymce.plugins.NonEditablePlugin); -})(); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/pagebreak/editor_plugin.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/pagebreak/editor_plugin.js deleted file mode 100644 index 35085e8adc..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/pagebreak/editor_plugin.js +++ /dev/null @@ -1 +0,0 @@ -(function(){tinymce.create("tinymce.plugins.PageBreakPlugin",{init:function(b,d){var f='',a="mcePageBreak",c=b.getParam("pagebreak_separator",""),e;e=new RegExp(c.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g,function(g){return"\\"+g}),"g");b.addCommand("mcePageBreak",function(){b.execCommand("mceInsertContent",0,f)});b.addButton("pagebreak",{title:"pagebreak.desc",cmd:a});b.onInit.add(function(){if(b.theme.onResolveName){b.theme.onResolveName.add(function(g,h){if(h.node.nodeName=="IMG"&&b.dom.hasClass(h.node,a)){h.name="pagebreak"}})}});b.onClick.add(function(g,h){h=h.target;if(h.nodeName==="IMG"&&g.dom.hasClass(h,a)){g.selection.select(h)}});b.onNodeChange.add(function(h,g,i){g.setActive("pagebreak",i.nodeName==="IMG"&&h.dom.hasClass(i,a))});b.onBeforeSetContent.add(function(g,h){h.content=h.content.replace(e,f)});b.onPostProcess.add(function(g,h){if(h.get){h.content=h.content.replace(/]+>/g,function(i){if(i.indexOf('class="mcePageBreak')!==-1){i=c}return i})}})},getInfo:function(){return{longname:"PageBreak",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/pagebreak",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("pagebreak",tinymce.plugins.PageBreakPlugin)})(); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/pagebreak/editor_plugin_src.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/pagebreak/editor_plugin_src.js deleted file mode 100644 index a094c19162..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/pagebreak/editor_plugin_src.js +++ /dev/null @@ -1,74 +0,0 @@ -/** - * editor_plugin_src.js - * - * Copyright 2009, Moxiecode Systems AB - * Released under LGPL License. - * - * License: http://tinymce.moxiecode.com/license - * Contributing: http://tinymce.moxiecode.com/contributing - */ - -(function() { - tinymce.create('tinymce.plugins.PageBreakPlugin', { - init : function(ed, url) { - var pb = '', cls = 'mcePageBreak', sep = ed.getParam('pagebreak_separator', ''), pbRE; - - pbRE = new RegExp(sep.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g, function(a) {return '\\' + a;}), 'g'); - - // Register commands - ed.addCommand('mcePageBreak', function() { - ed.execCommand('mceInsertContent', 0, pb); - }); - - // Register buttons - ed.addButton('pagebreak', {title : 'pagebreak.desc', cmd : cls}); - - ed.onInit.add(function() { - if (ed.theme.onResolveName) { - ed.theme.onResolveName.add(function(th, o) { - if (o.node.nodeName == 'IMG' && ed.dom.hasClass(o.node, cls)) - o.name = 'pagebreak'; - }); - } - }); - - ed.onClick.add(function(ed, e) { - e = e.target; - - if (e.nodeName === 'IMG' && ed.dom.hasClass(e, cls)) - ed.selection.select(e); - }); - - ed.onNodeChange.add(function(ed, cm, n) { - cm.setActive('pagebreak', n.nodeName === 'IMG' && ed.dom.hasClass(n, cls)); - }); - - ed.onBeforeSetContent.add(function(ed, o) { - o.content = o.content.replace(pbRE, pb); - }); - - ed.onPostProcess.add(function(ed, o) { - if (o.get) - o.content = o.content.replace(/]+>/g, function(im) { - if (im.indexOf('class="mcePageBreak') !== -1) - im = sep; - - return im; - }); - }); - }, - - getInfo : function() { - return { - longname : 'PageBreak', - author : 'Moxiecode Systems AB', - authorurl : 'http://tinymce.moxiecode.com', - infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/pagebreak', - version : tinymce.majorVersion + "." + tinymce.minorVersion - }; - } - }); - - // Register plugin - tinymce.PluginManager.add('pagebreak', tinymce.plugins.PageBreakPlugin); -})(); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/paste/editor_plugin.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/paste/editor_plugin.js deleted file mode 100644 index f69f263f99..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/paste/editor_plugin.js +++ /dev/null @@ -1 +0,0 @@ -(function(){var c=tinymce.each,a={paste_auto_cleanup_on_paste:true,paste_enable_default_filters:true,paste_block_drop:false,paste_retain_style_properties:"none",paste_strip_class_attributes:"mso",paste_remove_spans:false,paste_remove_styles:false,paste_remove_styles_if_webkit:true,paste_convert_middot_lists:true,paste_convert_headers_to_strong:false,paste_dialog_width:"450",paste_dialog_height:"400",paste_max_consecutive_linebreaks:2,paste_text_use_dialog:false,paste_text_sticky:false,paste_text_sticky_default:false,paste_text_notifyalways:false,paste_text_linebreaktype:"combined",paste_text_replacements:[[/\u2026/g,"..."],[/[\x93\x94\u201c\u201d]/g,'"'],[/[\x60\x91\x92\u2018\u2019]/g,"'"]]};function b(d,e){return d.getParam(e,a[e])}tinymce.create("tinymce.plugins.PastePlugin",{init:function(d,e){var f=this;f.editor=d;f.url=e;f.onPreProcess=new tinymce.util.Dispatcher(f);f.onPostProcess=new tinymce.util.Dispatcher(f);f.onPreProcess.add(f._preProcess);f.onPostProcess.add(f._postProcess);f.onPreProcess.add(function(i,j){d.execCallback("paste_preprocess",i,j)});f.onPostProcess.add(function(i,j){d.execCallback("paste_postprocess",i,j)});d.onKeyDown.addToTop(function(i,j){if(((tinymce.isMac?j.metaKey:j.ctrlKey)&&j.keyCode==86)||(j.shiftKey&&j.keyCode==45)){return false}});d.pasteAsPlainText=b(d,"paste_text_sticky_default");function h(l,j){var k=d.dom,i;f.onPreProcess.dispatch(f,l);l.node=k.create("div",0,l.content);if(tinymce.isGecko){i=d.selection.getRng(true);if(i.startContainer==i.endContainer&&i.startContainer.nodeType==3){if(l.node.childNodes.length===1&&/^(p|h[1-6]|pre)$/i.test(l.node.firstChild.nodeName)&&l.content.indexOf("__MCE_ITEM__")===-1){k.remove(l.node.firstChild,true)}}}f.onPostProcess.dispatch(f,l);l.content=d.serializer.serialize(l.node,{getInner:1,forced_root_block:""});if((!j)&&(d.pasteAsPlainText)){f._insertPlainText(l.content);if(!b(d,"paste_text_sticky")){d.pasteAsPlainText=false;d.controlManager.setActive("pastetext",false)}}else{f._insert(l.content)}}d.addCommand("mceInsertClipboardContent",function(i,j){h(j,true)});if(!b(d,"paste_text_use_dialog")){d.addCommand("mcePasteText",function(j,i){var k=tinymce.util.Cookie;d.pasteAsPlainText=!d.pasteAsPlainText;d.controlManager.setActive("pastetext",d.pasteAsPlainText);if((d.pasteAsPlainText)&&(!k.get("tinymcePasteText"))){if(b(d,"paste_text_sticky")){d.windowManager.alert(d.translate("paste.plaintext_mode_sticky"))}else{d.windowManager.alert(d.translate("paste.plaintext_mode"))}if(!b(d,"paste_text_notifyalways")){k.set("tinymcePasteText","1",new Date(new Date().getFullYear()+1,12,31))}}})}d.addButton("pastetext",{title:"paste.paste_text_desc",cmd:"mcePasteText"});d.addButton("selectall",{title:"paste.selectall_desc",cmd:"selectall"});function g(s){var l,p,j,t,k=d.selection,o=d.dom,q=d.getBody(),i,r;if(s.clipboardData||o.doc.dataTransfer){r=(s.clipboardData||o.doc.dataTransfer).getData("Text");if(d.pasteAsPlainText){s.preventDefault();h({content:o.encode(r).replace(/\r?\n/g,"
    ")});return}}if(o.get("_mcePaste")){return}l=o.add(q,"div",{id:"_mcePaste","class":"mcePaste","data-mce-bogus":"1"},"\uFEFF\uFEFF");if(q!=d.getDoc().body){i=o.getPos(d.selection.getStart(),q).y}else{i=q.scrollTop+o.getViewPort(d.getWin()).y}o.setStyles(l,{position:"absolute",left:tinymce.isGecko?-40:0,top:i-25,width:1,height:1,overflow:"hidden"});if(tinymce.isIE){t=k.getRng();j=o.doc.body.createTextRange();j.moveToElementText(l);j.execCommand("Paste");o.remove(l);if(l.innerHTML==="\uFEFF\uFEFF"){d.execCommand("mcePasteWord");s.preventDefault();return}k.setRng(t);k.setContent("");setTimeout(function(){h({content:l.innerHTML})},0);return tinymce.dom.Event.cancel(s)}else{function m(n){n.preventDefault()}o.bind(d.getDoc(),"mousedown",m);o.bind(d.getDoc(),"keydown",m);p=d.selection.getRng();l=l.firstChild;j=d.getDoc().createRange();j.setStart(l,0);j.setEnd(l,2);k.setRng(j);window.setTimeout(function(){var u="",n;if(!o.select("div.mcePaste > div.mcePaste").length){n=o.select("div.mcePaste");c(n,function(w){var v=w.firstChild;if(v&&v.nodeName=="DIV"&&v.style.marginTop&&v.style.backgroundColor){o.remove(v,1)}c(o.select("span.Apple-style-span",w),function(x){o.remove(x,1)});c(o.select("br[data-mce-bogus]",w),function(x){o.remove(x)});if(w.parentNode.className!="mcePaste"){u+=w.innerHTML}})}else{u="

    "+o.encode(r).replace(/\r?\n\r?\n/g,"

    ").replace(/\r?\n/g,"
    ")+"

    "}c(o.select("div.mcePaste"),function(v){o.remove(v)});if(p){k.setRng(p)}h({content:u});o.unbind(d.getDoc(),"mousedown",m);o.unbind(d.getDoc(),"keydown",m)},0)}}if(b(d,"paste_auto_cleanup_on_paste")){if(tinymce.isOpera||/Firefox\/2/.test(navigator.userAgent)){d.onKeyDown.addToTop(function(i,j){if(((tinymce.isMac?j.metaKey:j.ctrlKey)&&j.keyCode==86)||(j.shiftKey&&j.keyCode==45)){g(j)}})}else{d.onPaste.addToTop(function(i,j){return g(j)})}}d.onInit.add(function(){d.controlManager.setActive("pastetext",d.pasteAsPlainText);if(b(d,"paste_block_drop")){d.dom.bind(d.getBody(),["dragend","dragover","draggesture","dragdrop","drop","drag"],function(i){i.preventDefault();i.stopPropagation();return false})}});f._legacySupport()},getInfo:function(){return{longname:"Paste text/word",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/paste",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_preProcess:function(g,e){var k=this.editor,j=e.content,p=tinymce.grep,n=tinymce.explode,f=tinymce.trim,l,i;function d(h){c(h,function(o){if(o.constructor==RegExp){j=j.replace(o,"")}else{j=j.replace(o[0],o[1])}})}if(k.settings.paste_enable_default_filters==false){return}if(tinymce.isIE&&document.documentMode>=9&&/<(h[1-6r]|p|div|address|pre|form|table|tbody|thead|tfoot|th|tr|td|li|ol|ul|caption|blockquote|center|dl|dt|dd|dir|fieldset)/.test(e.content)){d([[/(?:
     [\s\r\n]+|
    )*(<\/?(h[1-6r]|p|div|address|pre|form|table|tbody|thead|tfoot|th|tr|td|li|ol|ul|caption|blockquote|center|dl|dt|dd|dir|fieldset)[^>]*>)(?:
     [\s\r\n]+|
    )*/g,"$1"]]);d([[/

    /g,"

    "],[/
    /g," "],[/

    /g,"
    "]])}if(/class="?Mso|style="[^"]*\bmso-|w:WordDocument/i.test(j)||e.wordContent){e.wordContent=true;d([/^\s*( )+/gi,/( |]*>)+\s*$/gi]);if(b(k,"paste_convert_headers_to_strong")){j=j.replace(/

    ]*class="?MsoHeading"?[^>]*>(.*?)<\/p>/gi,"

    $1

    ")}if(b(k,"paste_convert_middot_lists")){d([[//gi,"$&__MCE_ITEM__"],[/(]+(?:mso-list:|:\s*symbol)[^>]+>)/gi,"$1__MCE_ITEM__"],[/(]+(?:MsoListParagraph)[^>]+>)/gi,"$1__MCE_ITEM__"]])}d([//gi,/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,[/<(\/?)s>/gi,"<$1strike>"],[/ /gi,"\u00a0"]]);do{l=j.length;j=j.replace(/(]*\s)(?:id|name|language|type|on\w+|\w+:\w+)=(?:"[^"]*"|\w+)\s?/gi,"$1");j=j.replace(/(<(ol|ul)[^>]*\s)(?:id|name|language|on\w+|\w+:\w+)=(?:"[^"]*"|\w+)\s?/gi,"$1")}while(l!=j.length);if(b(k,"paste_retain_style_properties").replace(/^none$/i,"").length==0){j=j.replace(/<\/?span[^>]*>/gi,"")}else{d([[/([\s\u00a0]*)<\/span>/gi,function(o,h){return(h.length>0)?h.replace(/./," ").slice(Math.floor(h.length/2)).split("").join("\u00a0"):""}],[/(<[a-z][^>]*)\sstyle="([^"]*)"/gi,function(t,h,r){var u=[],o=0,q=n(f(r).replace(/"/gi,"'"),";");c(q,function(s){var w,y,z=n(s,":");function x(A){return A+((A!=="0")&&(/\d$/.test(A)))?"px":""}if(z.length==2){w=z[0].toLowerCase();y=z[1].toLowerCase();switch(w){case"mso-padding-alt":case"mso-padding-top-alt":case"mso-padding-right-alt":case"mso-padding-bottom-alt":case"mso-padding-left-alt":case"mso-margin-alt":case"mso-margin-top-alt":case"mso-margin-right-alt":case"mso-margin-bottom-alt":case"mso-margin-left-alt":case"mso-table-layout-alt":case"mso-height":case"mso-width":case"mso-vertical-align-alt":u[o++]=w.replace(/^mso-|-alt$/g,"")+":"+x(y);return;case"horiz-align":u[o++]="text-align:"+y;return;case"vert-align":u[o++]="vertical-align:"+y;return;case"font-color":case"mso-foreground":u[o++]="color:"+y;return;case"mso-background":case"mso-highlight":u[o++]="background:"+y;return;case"mso-default-height":u[o++]="min-height:"+x(y);return;case"mso-default-width":u[o++]="min-width:"+x(y);return;case"mso-padding-between-alt":u[o++]="border-collapse:separate;border-spacing:"+x(y);return;case"text-line-through":if((y=="single")||(y=="double")){u[o++]="text-decoration:line-through"}return;case"mso-zero-height":if(y=="yes"){u[o++]="display:none"}return}if(/^(mso|column|font-emph|lang|layout|line-break|list-image|nav|panose|punct|row|ruby|sep|size|src|tab-|table-border|text-(?!align|decor|indent|trans)|top-bar|version|vnd|word-break)/.test(w)){return}u[o++]=w+":"+z[1]}});if(o>0){return h+' style="'+u.join(";")+'"'}else{return h}}]])}}if(b(k,"paste_convert_headers_to_strong")){d([[/]*>/gi,"

    "],[/<\/h[1-6][^>]*>/gi,"

    "]])}d([[/Version:[\d.]+\nStartHTML:\d+\nEndHTML:\d+\nStartFragment:\d+\nEndFragment:\d+/gi,""]]);i=b(k,"paste_strip_class_attributes");if(i!=="none"){function m(q,o){if(i==="all"){return""}var h=p(n(o.replace(/^(["'])(.*)\1$/,"$2")," "),function(r){return(/^(?!mso)/i.test(r))});return h.length?' class="'+h.join(" ")+'"':""}j=j.replace(/ class="([^"]+)"/gi,m);j=j.replace(/ class=([\-\w]+)/gi,m)}if(b(k,"paste_remove_spans")){j=j.replace(/<\/?span[^>]*>/gi,"")}e.content=j},_postProcess:function(g,i){var f=this,e=f.editor,h=e.dom,d;if(e.settings.paste_enable_default_filters==false){return}if(i.wordContent){c(h.select("a",i.node),function(j){if(!j.href||j.href.indexOf("#_Toc")!=-1){h.remove(j,1)}});if(b(e,"paste_convert_middot_lists")){f._convertLists(g,i)}d=b(e,"paste_retain_style_properties");if((tinymce.is(d,"string"))&&(d!=="all")&&(d!=="*")){d=tinymce.explode(d.replace(/^none$/i,""));c(h.select("*",i.node),function(m){var n={},k=0,l,o,j;if(d){for(l=0;l0){h.setStyles(m,n)}else{if(m.nodeName=="SPAN"&&!m.className){h.remove(m,true)}}})}}if(b(e,"paste_remove_styles")||(b(e,"paste_remove_styles_if_webkit")&&tinymce.isWebKit)){c(h.select("*[style]",i.node),function(j){j.removeAttribute("style");j.removeAttribute("data-mce-style")})}else{if(tinymce.isWebKit){c(h.select("*",i.node),function(j){j.removeAttribute("data-mce-style")})}}},_convertLists:function(g,e){var i=g.editor.dom,h,l,d=-1,f,m=[],k,j;c(i.select("p",e.node),function(t){var q,u="",s,r,n,o;for(q=t.firstChild;q&&q.nodeType==3;q=q.nextSibling){u+=q.nodeValue}u=t.innerHTML.replace(/<\/?\w+[^>]*>/gi,"").replace(/ /g,"\u00a0");if(/^(__MCE_ITEM__)+[\u2022\u00b7\u00a7\u00d8o\u25CF]\s*\u00a0*/.test(u)){s="ul"}if(/^__MCE_ITEM__\s*\w+\.\s*\u00a0+/.test(u)){s="ol"}if(s){f=parseFloat(t.style.marginLeft||0);if(f>d){m.push(f)}if(!h||s!=k){h=i.create(s);i.insertAfter(h,t)}else{if(f>d){h=l.appendChild(i.create(s))}else{if(f]*>/gi,"");if(s=="ul"&&/^__MCE_ITEM__[\u2022\u00b7\u00a7\u00d8o\u25CF]/.test(p)){i.remove(v)}else{if(/^__MCE_ITEM__[\s\S]*\w+\.( |\u00a0)*\s*/.test(p)){i.remove(v)}}});r=t.innerHTML;if(s=="ul"){r=t.innerHTML.replace(/__MCE_ITEM__/g,"").replace(/^[\u2022\u00b7\u00a7\u00d8o\u25CF]\s*( |\u00a0)+\s*/,"")}else{r=t.innerHTML.replace(/__MCE_ITEM__/g,"").replace(/^\s*\w+\.( |\u00a0)+\s*/,"")}l=h.appendChild(i.create("li",0,r));i.remove(t);d=f;k=s}else{h=d=0}});j=e.node.innerHTML;if(j.indexOf("__MCE_ITEM__")!=-1){e.node.innerHTML=j.replace(/__MCE_ITEM__/g,"")}},_insert:function(f,d){var e=this.editor,g=e.selection.getRng();if(!e.selection.isCollapsed()&&g.startContainer!=g.endContainer){e.getDoc().execCommand("Delete",false,null)}e.execCommand("mceInsertContent",false,f,{skip_undo:d})},_insertPlainText:function(j){var h=this.editor,f=b(h,"paste_text_linebreaktype"),k=b(h,"paste_text_replacements"),g=tinymce.is;function e(m){c(m,function(n){if(n.constructor==RegExp){j=j.replace(n,"")}else{j=j.replace(n[0],n[1])}})}if((typeof(j)==="string")&&(j.length>0)){if(/<(?:p|br|h[1-6]|ul|ol|dl|table|t[rdh]|div|blockquote|fieldset|pre|address|center)[^>]*>/i.test(j)){e([/[\n\r]+/g])}else{e([/\r+/g])}e([[/<\/(?:p|h[1-6]|ul|ol|dl|table|div|blockquote|fieldset|pre|address|center)>/gi,"\n\n"],[/]*>|<\/tr>/gi,"\n"],[/<\/t[dh]>\s*]*>/gi,"\t"],/<[a-z!\/?][^>]*>/gi,[/ /gi," "],[/(?:(?!\n)\s)*(\n+)(?:(?!\n)\s)*/gi,"$1"]]);var d=Number(b(h,"paste_max_consecutive_linebreaks"));if(d>-1){var l=new RegExp("\n{"+(d+1)+",}","g");var i="";while(i.length"]])}else{if(f=="p"){e([[/\n+/g,"

    "],[/^(.*<\/p>)(

    )$/,"

    $1"]])}else{e([[/\n\n/g,"

    "],[/^(.*<\/p>)(

    )$/,"

    $1"],[/\n/g,"
    "]])}}}h.execCommand("mceInsertContent",false,j)}},_legacySupport:function(){var e=this,d=e.editor;d.addCommand("mcePasteWord",function(){d.windowManager.open({file:e.url+"/pasteword.htm",width:parseInt(b(d,"paste_dialog_width")),height:parseInt(b(d,"paste_dialog_height")),inline:1})});if(b(d,"paste_text_use_dialog")){d.addCommand("mcePasteText",function(){d.windowManager.open({file:e.url+"/pastetext.htm",width:parseInt(b(d,"paste_dialog_width")),height:parseInt(b(d,"paste_dialog_height")),inline:1})})}d.addButton("pasteword",{title:"paste.paste_word_desc",cmd:"mcePasteWord"})}});tinymce.PluginManager.add("paste",tinymce.plugins.PastePlugin)})(); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/paste/editor_plugin_src.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/paste/editor_plugin_src.js deleted file mode 100644 index 6f1734299e..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/paste/editor_plugin_src.js +++ /dev/null @@ -1,887 +0,0 @@ -/** - * editor_plugin_src.js - * - * Copyright 2009, Moxiecode Systems AB - * Released under LGPL License. - * - * License: http://tinymce.moxiecode.com/license - * Contributing: http://tinymce.moxiecode.com/contributing - */ - -(function() { - var each = tinymce.each, - defs = { - paste_auto_cleanup_on_paste : true, - paste_enable_default_filters : true, - paste_block_drop : false, - paste_retain_style_properties : "none", - paste_strip_class_attributes : "mso", - paste_remove_spans : false, - paste_remove_styles : false, - paste_remove_styles_if_webkit : true, - paste_convert_middot_lists : true, - paste_convert_headers_to_strong : false, - paste_dialog_width : "450", - paste_dialog_height : "400", - paste_max_consecutive_linebreaks: 2, - paste_text_use_dialog : false, - paste_text_sticky : false, - paste_text_sticky_default : false, - paste_text_notifyalways : false, - paste_text_linebreaktype : "combined", - paste_text_replacements : [ - [/\u2026/g, "..."], - [/[\x93\x94\u201c\u201d]/g, '"'], - [/[\x60\x91\x92\u2018\u2019]/g, "'"] - ] - }; - - function getParam(ed, name) { - return ed.getParam(name, defs[name]); - } - - tinymce.create('tinymce.plugins.PastePlugin', { - init : function(ed, url) { - var t = this; - - t.editor = ed; - t.url = url; - - // Setup plugin events - t.onPreProcess = new tinymce.util.Dispatcher(t); - t.onPostProcess = new tinymce.util.Dispatcher(t); - - // Register default handlers - t.onPreProcess.add(t._preProcess); - t.onPostProcess.add(t._postProcess); - - // Register optional preprocess handler - t.onPreProcess.add(function(pl, o) { - ed.execCallback('paste_preprocess', pl, o); - }); - - // Register optional postprocess - t.onPostProcess.add(function(pl, o) { - ed.execCallback('paste_postprocess', pl, o); - }); - - ed.onKeyDown.addToTop(function(ed, e) { - // Block ctrl+v from adding an undo level since the default logic in tinymce.Editor will add that - if (((tinymce.isMac ? e.metaKey : e.ctrlKey) && e.keyCode == 86) || (e.shiftKey && e.keyCode == 45)) - return false; // Stop other listeners - }); - - // Initialize plain text flag - ed.pasteAsPlainText = getParam(ed, 'paste_text_sticky_default'); - - // This function executes the process handlers and inserts the contents - // force_rich overrides plain text mode set by user, important for pasting with execCommand - function process(o, force_rich) { - var dom = ed.dom, rng; - - // Execute pre process handlers - t.onPreProcess.dispatch(t, o); - - // Create DOM structure - o.node = dom.create('div', 0, o.content); - - // If pasting inside the same element and the contents is only one block - // remove the block and keep the text since Firefox will copy parts of pre and h1-h6 as a pre element - if (tinymce.isGecko) { - rng = ed.selection.getRng(true); - if (rng.startContainer == rng.endContainer && rng.startContainer.nodeType == 3) { - // Is only one block node and it doesn't contain word stuff - if (o.node.childNodes.length === 1 && /^(p|h[1-6]|pre)$/i.test(o.node.firstChild.nodeName) && o.content.indexOf('__MCE_ITEM__') === -1) - dom.remove(o.node.firstChild, true); - } - } - - // Execute post process handlers - t.onPostProcess.dispatch(t, o); - - // Serialize content - o.content = ed.serializer.serialize(o.node, {getInner : 1, forced_root_block : ''}); - - // Plain text option active? - if ((!force_rich) && (ed.pasteAsPlainText)) { - t._insertPlainText(o.content); - - if (!getParam(ed, "paste_text_sticky")) { - ed.pasteAsPlainText = false; - ed.controlManager.setActive("pastetext", false); - } - } else { - t._insert(o.content); - } - } - - // Add command for external usage - ed.addCommand('mceInsertClipboardContent', function(u, o) { - process(o, true); - }); - - if (!getParam(ed, "paste_text_use_dialog")) { - ed.addCommand('mcePasteText', function(u, v) { - var cookie = tinymce.util.Cookie; - - ed.pasteAsPlainText = !ed.pasteAsPlainText; - ed.controlManager.setActive('pastetext', ed.pasteAsPlainText); - - if ((ed.pasteAsPlainText) && (!cookie.get("tinymcePasteText"))) { - if (getParam(ed, "paste_text_sticky")) { - ed.windowManager.alert(ed.translate('paste.plaintext_mode_sticky')); - } else { - ed.windowManager.alert(ed.translate('paste.plaintext_mode')); - } - - if (!getParam(ed, "paste_text_notifyalways")) { - cookie.set("tinymcePasteText", "1", new Date(new Date().getFullYear() + 1, 12, 31)) - } - } - }); - } - - ed.addButton('pastetext', {title: 'paste.paste_text_desc', cmd: 'mcePasteText'}); - ed.addButton('selectall', {title: 'paste.selectall_desc', cmd: 'selectall'}); - - // This function grabs the contents from the clipboard by adding a - // hidden div and placing the caret inside it and after the browser paste - // is done it grabs that contents and processes that - function grabContent(e) { - var n, or, rng, oldRng, sel = ed.selection, dom = ed.dom, body = ed.getBody(), posY, textContent; - - // Check if browser supports direct plaintext access - if (e.clipboardData || dom.doc.dataTransfer) { - textContent = (e.clipboardData || dom.doc.dataTransfer).getData('Text'); - - if (ed.pasteAsPlainText) { - e.preventDefault(); - process({content : dom.encode(textContent).replace(/\r?\n/g, '
    ')}); - return; - } - } - - if (dom.get('_mcePaste')) - return; - - // Create container to paste into - n = dom.add(body, 'div', {id : '_mcePaste', 'class' : 'mcePaste', 'data-mce-bogus' : '1'}, '\uFEFF\uFEFF'); - - // If contentEditable mode we need to find out the position of the closest element - if (body != ed.getDoc().body) - posY = dom.getPos(ed.selection.getStart(), body).y; - else - posY = body.scrollTop + dom.getViewPort(ed.getWin()).y; - - // Styles needs to be applied after the element is added to the document since WebKit will otherwise remove all styles - // If also needs to be in view on IE or the paste would fail - dom.setStyles(n, { - position : 'absolute', - left : tinymce.isGecko ? -40 : 0, // Need to move it out of site on Gecko since it will othewise display a ghost resize rect for the div - top : posY - 25, - width : 1, - height : 1, - overflow : 'hidden' - }); - - if (tinymce.isIE) { - // Store away the old range - oldRng = sel.getRng(); - - // Select the container - rng = dom.doc.body.createTextRange(); - rng.moveToElementText(n); - rng.execCommand('Paste'); - - // Remove container - dom.remove(n); - - // Check if the contents was changed, if it wasn't then clipboard extraction failed probably due - // to IE security settings so we pass the junk though better than nothing right - if (n.innerHTML === '\uFEFF\uFEFF') { - ed.execCommand('mcePasteWord'); - e.preventDefault(); - return; - } - - // Restore the old range and clear the contents before pasting - sel.setRng(oldRng); - sel.setContent(''); - - // For some odd reason we need to detach the the mceInsertContent call from the paste event - // It's like IE has a reference to the parent element that you paste in and the selection gets messed up - // when it tries to restore the selection - setTimeout(function() { - // Process contents - process({content : n.innerHTML}); - }, 0); - - // Block the real paste event - return tinymce.dom.Event.cancel(e); - } else { - function block(e) { - e.preventDefault(); - }; - - // Block mousedown and click to prevent selection change - dom.bind(ed.getDoc(), 'mousedown', block); - dom.bind(ed.getDoc(), 'keydown', block); - - or = ed.selection.getRng(); - - // Move select contents inside DIV - n = n.firstChild; - rng = ed.getDoc().createRange(); - rng.setStart(n, 0); - rng.setEnd(n, 2); - sel.setRng(rng); - - // Wait a while and grab the pasted contents - window.setTimeout(function() { - var h = '', nl; - - // Paste divs duplicated in paste divs seems to happen when you paste plain text so lets first look for that broken behavior in WebKit - if (!dom.select('div.mcePaste > div.mcePaste').length) { - nl = dom.select('div.mcePaste'); - - // WebKit will split the div into multiple ones so this will loop through then all and join them to get the whole HTML string - each(nl, function(n) { - var child = n.firstChild; - - // WebKit inserts a DIV container with lots of odd styles - if (child && child.nodeName == 'DIV' && child.style.marginTop && child.style.backgroundColor) { - dom.remove(child, 1); - } - - // Remove apply style spans - each(dom.select('span.Apple-style-span', n), function(n) { - dom.remove(n, 1); - }); - - // Remove bogus br elements - each(dom.select('br[data-mce-bogus]', n), function(n) { - dom.remove(n); - }); - - // WebKit will make a copy of the DIV for each line of plain text pasted and insert them into the DIV - if (n.parentNode.className != 'mcePaste') - h += n.innerHTML; - }); - } else { - // Found WebKit weirdness so force the content into paragraphs this seems to happen when you paste plain text from Nodepad etc - // So this logic will replace double enter with paragraphs and single enter with br so it kind of looks the same - h = '

    ' + dom.encode(textContent).replace(/\r?\n\r?\n/g, '

    ').replace(/\r?\n/g, '
    ') + '

    '; - } - - // Remove the nodes - each(dom.select('div.mcePaste'), function(n) { - dom.remove(n); - }); - - // Restore the old selection - if (or) - sel.setRng(or); - - process({content : h}); - - // Unblock events ones we got the contents - dom.unbind(ed.getDoc(), 'mousedown', block); - dom.unbind(ed.getDoc(), 'keydown', block); - }, 0); - } - } - - // Check if we should use the new auto process method - if (getParam(ed, "paste_auto_cleanup_on_paste")) { - // Is it's Opera or older FF use key handler - if (tinymce.isOpera || /Firefox\/2/.test(navigator.userAgent)) { - ed.onKeyDown.addToTop(function(ed, e) { - if (((tinymce.isMac ? e.metaKey : e.ctrlKey) && e.keyCode == 86) || (e.shiftKey && e.keyCode == 45)) - grabContent(e); - }); - } else { - // Grab contents on paste event on Gecko and WebKit - ed.onPaste.addToTop(function(ed, e) { - return grabContent(e); - }); - } - } - - ed.onInit.add(function() { - ed.controlManager.setActive("pastetext", ed.pasteAsPlainText); - - // Block all drag/drop events - if (getParam(ed, "paste_block_drop")) { - ed.dom.bind(ed.getBody(), ['dragend', 'dragover', 'draggesture', 'dragdrop', 'drop', 'drag'], function(e) { - e.preventDefault(); - e.stopPropagation(); - - return false; - }); - } - }); - - // Add legacy support - t._legacySupport(); - }, - - getInfo : function() { - return { - longname : 'Paste text/word', - author : 'Moxiecode Systems AB', - authorurl : 'http://tinymce.moxiecode.com', - infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/paste', - version : tinymce.majorVersion + "." + tinymce.minorVersion - }; - }, - - _preProcess : function(pl, o) { - var ed = this.editor, - h = o.content, - grep = tinymce.grep, - explode = tinymce.explode, - trim = tinymce.trim, - len, stripClass; - - //console.log('Before preprocess:' + o.content); - - function process(items) { - each(items, function(v) { - // Remove or replace - if (v.constructor == RegExp) - h = h.replace(v, ''); - else - h = h.replace(v[0], v[1]); - }); - } - - if (ed.settings.paste_enable_default_filters == false) { - return; - } - - // IE9 adds BRs before/after block elements when contents is pasted from word or for example another browser - if (tinymce.isIE && document.documentMode >= 9 && /<(h[1-6r]|p|div|address|pre|form|table|tbody|thead|tfoot|th|tr|td|li|ol|ul|caption|blockquote|center|dl|dt|dd|dir|fieldset)/.test(o.content)) { - // IE9 adds BRs before/after block elements when contents is pasted from word or for example another browser - process([[/(?:
     [\s\r\n]+|
    )*(<\/?(h[1-6r]|p|div|address|pre|form|table|tbody|thead|tfoot|th|tr|td|li|ol|ul|caption|blockquote|center|dl|dt|dd|dir|fieldset)[^>]*>)(?:
     [\s\r\n]+|
    )*/g, '$1']]); - - // IE9 also adds an extra BR element for each soft-linefeed and it also adds a BR for each word wrap break - process([ - [/

    /g, '

    '], // Replace multiple BR elements with uppercase BR to keep them intact - [/
    /g, ' '], // Replace single br elements with space since they are word wrap BR:s - [/

    /g, '
    '] // Replace back the double brs but into a single BR - ]); - } - - // Detect Word content and process it more aggressive - if (/class="?Mso|style="[^"]*\bmso-|w:WordDocument/i.test(h) || o.wordContent) { - o.wordContent = true; // Mark the pasted contents as word specific content - //console.log('Word contents detected.'); - - // Process away some basic content - process([ - /^\s*( )+/gi, //   entities at the start of contents - /( |]*>)+\s*$/gi //   entities at the end of contents - ]); - - if (getParam(ed, "paste_convert_headers_to_strong")) { - h = h.replace(/

    ]*class="?MsoHeading"?[^>]*>(.*?)<\/p>/gi, "

    $1

    "); - } - - if (getParam(ed, "paste_convert_middot_lists")) { - process([ - [//gi, '$&__MCE_ITEM__'], // Convert supportLists to a list item marker - [/(]+(?:mso-list:|:\s*symbol)[^>]+>)/gi, '$1__MCE_ITEM__'], // Convert mso-list and symbol spans to item markers - [/(]+(?:MsoListParagraph)[^>]+>)/gi, '$1__MCE_ITEM__'] // Convert mso-list and symbol paragraphs to item markers (FF) - ]); - } - - process([ - // Word comments like conditional comments etc - //gi, - - // Remove comments, scripts (e.g., msoShowComment), XML tag, VML content, MS Office namespaced tags, and a few other tags - /<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi, - - // Convert into for line-though - [/<(\/?)s>/gi, "<$1strike>"], - - // Replace nsbp entites to char since it's easier to handle - [/ /gi, "\u00a0"] - ]); - - // Remove bad attributes, with or without quotes, ensuring that attribute text is really inside a tag. - // If JavaScript had a RegExp look-behind, we could have integrated this with the last process() array and got rid of the loop. But alas, it does not, so we cannot. - do { - len = h.length; - // Don't remove the type attribute for lists so that non-default list types display correctly. - h = h.replace(/(]*\s)(?:id|name|language|type|on\w+|\w+:\w+)=(?:"[^"]*"|\w+)\s?/gi, "$1"); - h = h.replace(/(<(ol|ul)[^>]*\s)(?:id|name|language|on\w+|\w+:\w+)=(?:"[^"]*"|\w+)\s?/gi, "$1"); - } while (len != h.length); - - // Remove all spans if no styles is to be retained - if (getParam(ed, "paste_retain_style_properties").replace(/^none$/i, "").length == 0) { - h = h.replace(/<\/?span[^>]*>/gi, ""); - } else { - // We're keeping styles, so at least clean them up. - // CSS Reference: http://msdn.microsoft.com/en-us/library/aa155477.aspx - - process([ - // Convert ___ to string of alternating breaking/non-breaking spaces of same length - [/([\s\u00a0]*)<\/span>/gi, - function(str, spaces) { - return (spaces.length > 0)? spaces.replace(/./, " ").slice(Math.floor(spaces.length/2)).split("").join("\u00a0") : ""; - } - ], - - // Examine all styles: delete junk, transform some, and keep the rest - [/(<[a-z][^>]*)\sstyle="([^"]*)"/gi, - function(str, tag, style) { - var n = [], - i = 0, - s = explode(trim(style).replace(/"/gi, "'"), ";"); - - // Examine each style definition within the tag's style attribute - each(s, function(v) { - var name, value, - parts = explode(v, ":"); - - function ensureUnits(v) { - return v + ((v !== "0") && (/\d$/.test(v)))? "px" : ""; - } - - if (parts.length == 2) { - name = parts[0].toLowerCase(); - value = parts[1].toLowerCase(); - - // Translate certain MS Office styles into their CSS equivalents - switch (name) { - case "mso-padding-alt": - case "mso-padding-top-alt": - case "mso-padding-right-alt": - case "mso-padding-bottom-alt": - case "mso-padding-left-alt": - case "mso-margin-alt": - case "mso-margin-top-alt": - case "mso-margin-right-alt": - case "mso-margin-bottom-alt": - case "mso-margin-left-alt": - case "mso-table-layout-alt": - case "mso-height": - case "mso-width": - case "mso-vertical-align-alt": - n[i++] = name.replace(/^mso-|-alt$/g, "") + ":" + ensureUnits(value); - return; - - case "horiz-align": - n[i++] = "text-align:" + value; - return; - - case "vert-align": - n[i++] = "vertical-align:" + value; - return; - - case "font-color": - case "mso-foreground": - n[i++] = "color:" + value; - return; - - case "mso-background": - case "mso-highlight": - n[i++] = "background:" + value; - return; - - case "mso-default-height": - n[i++] = "min-height:" + ensureUnits(value); - return; - - case "mso-default-width": - n[i++] = "min-width:" + ensureUnits(value); - return; - - case "mso-padding-between-alt": - n[i++] = "border-collapse:separate;border-spacing:" + ensureUnits(value); - return; - - case "text-line-through": - if ((value == "single") || (value == "double")) { - n[i++] = "text-decoration:line-through"; - } - return; - - case "mso-zero-height": - if (value == "yes") { - n[i++] = "display:none"; - } - return; - } - - // Eliminate all MS Office style definitions that have no CSS equivalent by examining the first characters in the name - if (/^(mso|column|font-emph|lang|layout|line-break|list-image|nav|panose|punct|row|ruby|sep|size|src|tab-|table-border|text-(?!align|decor|indent|trans)|top-bar|version|vnd|word-break)/.test(name)) { - return; - } - - // If it reached this point, it must be a valid CSS style - n[i++] = name + ":" + parts[1]; // Lower-case name, but keep value case - } - }); - - // If style attribute contained any valid styles the re-write it; otherwise delete style attribute. - if (i > 0) { - return tag + ' style="' + n.join(';') + '"'; - } else { - return tag; - } - } - ] - ]); - } - } - - // Replace headers with - if (getParam(ed, "paste_convert_headers_to_strong")) { - process([ - [/]*>/gi, "

    "], - [/<\/h[1-6][^>]*>/gi, "

    "] - ]); - } - - process([ - // Copy paste from Java like Open Office will produce this junk on FF - [/Version:[\d.]+\nStartHTML:\d+\nEndHTML:\d+\nStartFragment:\d+\nEndFragment:\d+/gi, ''] - ]); - - // Class attribute options are: leave all as-is ("none"), remove all ("all"), or remove only those starting with mso ("mso"). - // Note:- paste_strip_class_attributes: "none", verify_css_classes: true is also a good variation. - stripClass = getParam(ed, "paste_strip_class_attributes"); - - if (stripClass !== "none") { - function removeClasses(match, g1) { - if (stripClass === "all") - return ''; - - var cls = grep(explode(g1.replace(/^(["'])(.*)\1$/, "$2"), " "), - function(v) { - return (/^(?!mso)/i.test(v)); - } - ); - - return cls.length ? ' class="' + cls.join(" ") + '"' : ''; - }; - - h = h.replace(/ class="([^"]+)"/gi, removeClasses); - h = h.replace(/ class=([\-\w]+)/gi, removeClasses); - } - - // Remove spans option - if (getParam(ed, "paste_remove_spans")) { - h = h.replace(/<\/?span[^>]*>/gi, ""); - } - - //console.log('After preprocess:' + h); - - o.content = h; - }, - - /** - * Various post process items. - */ - _postProcess : function(pl, o) { - var t = this, ed = t.editor, dom = ed.dom, styleProps; - - if (ed.settings.paste_enable_default_filters == false) { - return; - } - - if (o.wordContent) { - // Remove named anchors or TOC links - each(dom.select('a', o.node), function(a) { - if (!a.href || a.href.indexOf('#_Toc') != -1) - dom.remove(a, 1); - }); - - if (getParam(ed, "paste_convert_middot_lists")) { - t._convertLists(pl, o); - } - - // Process styles - styleProps = getParam(ed, "paste_retain_style_properties"); // retained properties - - // Process only if a string was specified and not equal to "all" or "*" - if ((tinymce.is(styleProps, "string")) && (styleProps !== "all") && (styleProps !== "*")) { - styleProps = tinymce.explode(styleProps.replace(/^none$/i, "")); - - // Retains some style properties - each(dom.select('*', o.node), function(el) { - var newStyle = {}, npc = 0, i, sp, sv; - - // Store a subset of the existing styles - if (styleProps) { - for (i = 0; i < styleProps.length; i++) { - sp = styleProps[i]; - sv = dom.getStyle(el, sp); - - if (sv) { - newStyle[sp] = sv; - npc++; - } - } - } - - // Remove all of the existing styles - dom.setAttrib(el, 'style', ''); - - if (styleProps && npc > 0) - dom.setStyles(el, newStyle); // Add back the stored subset of styles - else // Remove empty span tags that do not have class attributes - if (el.nodeName == 'SPAN' && !el.className) - dom.remove(el, true); - }); - } - } - - // Remove all style information or only specifically on WebKit to avoid the style bug on that browser - if (getParam(ed, "paste_remove_styles") || (getParam(ed, "paste_remove_styles_if_webkit") && tinymce.isWebKit)) { - each(dom.select('*[style]', o.node), function(el) { - el.removeAttribute('style'); - el.removeAttribute('data-mce-style'); - }); - } else { - if (tinymce.isWebKit) { - // We need to compress the styles on WebKit since if you paste it will become - // Removing the mce_style that contains the real value will force the Serializer engine to compress the styles - each(dom.select('*', o.node), function(el) { - el.removeAttribute('data-mce-style'); - }); - } - } - }, - - /** - * Converts the most common bullet and number formats in Office into a real semantic UL/LI list. - */ - _convertLists : function(pl, o) { - var dom = pl.editor.dom, listElm, li, lastMargin = -1, margin, levels = [], lastType, html; - - // Convert middot lists into real semantic lists - each(dom.select('p', o.node), function(p) { - var sib, val = '', type, html, idx, parents; - - // Get text node value at beginning of paragraph - for (sib = p.firstChild; sib && sib.nodeType == 3; sib = sib.nextSibling) - val += sib.nodeValue; - - val = p.innerHTML.replace(/<\/?\w+[^>]*>/gi, '').replace(/ /g, '\u00a0'); - - // Detect unordered lists look for bullets - if (/^(__MCE_ITEM__)+[\u2022\u00b7\u00a7\u00d8o\u25CF]\s*\u00a0*/.test(val)) - type = 'ul'; - - // Detect ordered lists 1., a. or ixv. - if (/^__MCE_ITEM__\s*\w+\.\s*\u00a0+/.test(val)) - type = 'ol'; - - // Check if node value matches the list pattern: o   - if (type) { - margin = parseFloat(p.style.marginLeft || 0); - - if (margin > lastMargin) - levels.push(margin); - - if (!listElm || type != lastType) { - listElm = dom.create(type); - dom.insertAfter(listElm, p); - } else { - // Nested list element - if (margin > lastMargin) { - listElm = li.appendChild(dom.create(type)); - } else if (margin < lastMargin) { - // Find parent level based on margin value - idx = tinymce.inArray(levels, margin); - parents = dom.getParents(listElm.parentNode, type); - listElm = parents[parents.length - 1 - idx] || listElm; - } - } - - // Remove middot or number spans if they exists - each(dom.select('span', p), function(span) { - var html = span.innerHTML.replace(/<\/?\w+[^>]*>/gi, ''); - - // Remove span with the middot or the number - if (type == 'ul' && /^__MCE_ITEM__[\u2022\u00b7\u00a7\u00d8o\u25CF]/.test(html)) - dom.remove(span); - else if (/^__MCE_ITEM__[\s\S]*\w+\.( |\u00a0)*\s*/.test(html)) - dom.remove(span); - }); - - html = p.innerHTML; - - // Remove middot/list items - if (type == 'ul') - html = p.innerHTML.replace(/__MCE_ITEM__/g, '').replace(/^[\u2022\u00b7\u00a7\u00d8o\u25CF]\s*( |\u00a0)+\s*/, ''); - else - html = p.innerHTML.replace(/__MCE_ITEM__/g, '').replace(/^\s*\w+\.( |\u00a0)+\s*/, ''); - - // Create li and add paragraph data into the new li - li = listElm.appendChild(dom.create('li', 0, html)); - dom.remove(p); - - lastMargin = margin; - lastType = type; - } else - listElm = lastMargin = 0; // End list element - }); - - // Remove any left over makers - html = o.node.innerHTML; - if (html.indexOf('__MCE_ITEM__') != -1) - o.node.innerHTML = html.replace(/__MCE_ITEM__/g, ''); - }, - - /** - * Inserts the specified contents at the caret position. - */ - _insert : function(h, skip_undo) { - var ed = this.editor, r = ed.selection.getRng(); - - // First delete the contents seems to work better on WebKit when the selection spans multiple list items or multiple table cells. - if (!ed.selection.isCollapsed() && r.startContainer != r.endContainer) - ed.getDoc().execCommand('Delete', false, null); - - ed.execCommand('mceInsertContent', false, h, {skip_undo : skip_undo}); - }, - - /** - * Instead of the old plain text method which tried to re-create a paste operation, the - * new approach adds a plain text mode toggle switch that changes the behavior of paste. - * This function is passed the same input that the regular paste plugin produces. - * It performs additional scrubbing and produces (and inserts) the plain text. - * This approach leverages all of the great existing functionality in the paste - * plugin, and requires minimal changes to add the new functionality. - * Speednet - June 2009 - */ - _insertPlainText : function(content) { - var ed = this.editor, - linebr = getParam(ed, "paste_text_linebreaktype"), - rl = getParam(ed, "paste_text_replacements"), - is = tinymce.is; - - function process(items) { - each(items, function(v) { - if (v.constructor == RegExp) - content = content.replace(v, ""); - else - content = content.replace(v[0], v[1]); - }); - }; - - if ((typeof(content) === "string") && (content.length > 0)) { - // If HTML content with line-breaking tags, then remove all cr/lf chars because only tags will break a line - if (/<(?:p|br|h[1-6]|ul|ol|dl|table|t[rdh]|div|blockquote|fieldset|pre|address|center)[^>]*>/i.test(content)) { - process([ - /[\n\r]+/g - ]); - } else { - // Otherwise just get rid of carriage returns (only need linefeeds) - process([ - /\r+/g - ]); - } - - process([ - [/<\/(?:p|h[1-6]|ul|ol|dl|table|div|blockquote|fieldset|pre|address|center)>/gi, "\n\n"], // Block tags get a blank line after them - [/]*>|<\/tr>/gi, "\n"], // Single linebreak for
    tags and table rows - [/<\/t[dh]>\s*]*>/gi, "\t"], // Table cells get tabs betweem them - /<[a-z!\/?][^>]*>/gi, // Delete all remaining tags - [/ /gi, " "], // Convert non-break spaces to regular spaces (remember, *plain text*) - [/(?:(?!\n)\s)*(\n+)(?:(?!\n)\s)*/gi, "$1"] // Cool little RegExp deletes whitespace around linebreak chars. - ]); - - var maxLinebreaks = Number(getParam(ed, "paste_max_consecutive_linebreaks")); - if (maxLinebreaks > -1) { - var maxLinebreaksRegex = new RegExp("\n{" + (maxLinebreaks + 1) + ",}", "g"); - var linebreakReplacement = ""; - - while (linebreakReplacement.length < maxLinebreaks) { - linebreakReplacement += "\n"; - } - - process([ - [maxLinebreaksRegex, linebreakReplacement] // Limit max consecutive linebreaks - ]); - } - - content = ed.dom.decode(tinymce.html.Entities.encodeRaw(content)); - - // Perform default or custom replacements - if (is(rl, "array")) { - process(rl); - } else if (is(rl, "string")) { - process(new RegExp(rl, "gi")); - } - - // Treat paragraphs as specified in the config - if (linebr == "none") { - // Convert all line breaks to space - process([ - [/\n+/g, " "] - ]); - } else if (linebr == "br") { - // Convert all line breaks to
    - process([ - [/\n/g, "
    "] - ]); - } else if (linebr == "p") { - // Convert all line breaks to

    ...

    - process([ - [/\n+/g, "

    "], - [/^(.*<\/p>)(

    )$/, '

    $1'] - ]); - } else { - // defaults to "combined" - // Convert single line breaks to
    and double line breaks to

    ...

    - process([ - [/\n\n/g, "

    "], - [/^(.*<\/p>)(

    )$/, '

    $1'], - [/\n/g, "
    "] - ]); - } - - ed.execCommand('mceInsertContent', false, content); - } - }, - - /** - * This method will open the old style paste dialogs. Some users might want the old behavior but still use the new cleanup engine. - */ - _legacySupport : function() { - var t = this, ed = t.editor; - - // Register command(s) for backwards compatibility - ed.addCommand("mcePasteWord", function() { - ed.windowManager.open({ - file: t.url + "/pasteword.htm", - width: parseInt(getParam(ed, "paste_dialog_width")), - height: parseInt(getParam(ed, "paste_dialog_height")), - inline: 1 - }); - }); - - if (getParam(ed, "paste_text_use_dialog")) { - ed.addCommand("mcePasteText", function() { - ed.windowManager.open({ - file : t.url + "/pastetext.htm", - width: parseInt(getParam(ed, "paste_dialog_width")), - height: parseInt(getParam(ed, "paste_dialog_height")), - inline : 1 - }); - }); - } - - // Register button for backwards compatibility - ed.addButton("pasteword", {title : "paste.paste_word_desc", cmd : "mcePasteWord"}); - } - }); - - // Register plugin - tinymce.PluginManager.add("paste", tinymce.plugins.PastePlugin); -})(); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/paste/js/pastetext.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/paste/js/pastetext.js deleted file mode 100644 index c524f9eb03..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/paste/js/pastetext.js +++ /dev/null @@ -1,36 +0,0 @@ -tinyMCEPopup.requireLangPack(); - -var PasteTextDialog = { - init : function() { - this.resize(); - }, - - insert : function() { - var h = tinyMCEPopup.dom.encode(document.getElementById('content').value), lines; - - // Convert linebreaks into paragraphs - if (document.getElementById('linebreaks').checked) { - lines = h.split(/\r?\n/); - if (lines.length > 1) { - h = ''; - tinymce.each(lines, function(row) { - h += '

    ' + row + '

    '; - }); - } - } - - tinyMCEPopup.editor.execCommand('mceInsertClipboardContent', false, {content : h}); - tinyMCEPopup.close(); - }, - - resize : function() { - var vp = tinyMCEPopup.dom.getViewPort(window), el; - - el = document.getElementById('content'); - - el.style.width = (vp.w - 20) + 'px'; - el.style.height = (vp.h - 90) + 'px'; - } -}; - -tinyMCEPopup.onInit.add(PasteTextDialog.init, PasteTextDialog); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/paste/js/pasteword.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/paste/js/pasteword.js deleted file mode 100644 index a52731c368..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/paste/js/pasteword.js +++ /dev/null @@ -1,51 +0,0 @@ -tinyMCEPopup.requireLangPack(); - -var PasteWordDialog = { - init : function() { - var ed = tinyMCEPopup.editor, el = document.getElementById('iframecontainer'), ifr, doc, css, cssHTML = ''; - - // Create iframe - el.innerHTML = ''; - ifr = document.getElementById('iframe'); - doc = ifr.contentWindow.document; - - // Force absolute CSS urls - css = [ed.baseURI.toAbsolute("themes/" + ed.settings.theme + "/skins/" + ed.settings.skin + "/content.css")]; - css = css.concat(tinymce.explode(ed.settings.content_css) || []); - tinymce.each(css, function(u) { - cssHTML += ''; - }); - - // Write content into iframe - doc.open(); - doc.write('' + cssHTML + ''); - doc.close(); - - doc.designMode = 'on'; - this.resize(); - - window.setTimeout(function() { - ifr.contentWindow.focus(); - }, 10); - }, - - insert : function() { - var h = document.getElementById('iframe').contentWindow.document.body.innerHTML; - - tinyMCEPopup.editor.execCommand('mceInsertClipboardContent', false, {content : h, wordContent : true}); - tinyMCEPopup.close(); - }, - - resize : function() { - var vp = tinyMCEPopup.dom.getViewPort(window), el; - - el = document.getElementById('iframe'); - - if (el) { - el.style.width = (vp.w - 20) + 'px'; - el.style.height = (vp.h - 90) + 'px'; - } - } -}; - -tinyMCEPopup.onInit.add(PasteWordDialog.init, PasteWordDialog); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/paste/langs/da_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/paste/langs/da_dlg.js deleted file mode 100644 index 7e1b961830..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/paste/langs/da_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('da.paste_dlg',{"word_title":"Anvend CTRL+V p\u00e5 tastaturet for at inds\u00e6tte teksten.","text_linebreaks":"Bevar linieskift","text_title":"Anvend CTRL+V p\u00e5 tastaturet for at inds\u00e6tte teksten."}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/paste/langs/de_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/paste/langs/de_dlg.js deleted file mode 100644 index 84b9bc620d..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/paste/langs/de_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('de.paste_dlg',{"word_title":"Dr\u00fccken Sie auf Ihrer Tastatur Strg+V, um den Text einzuf\u00fcgen.","text_linebreaks":"Zeilenumbr\u00fcche beibehalten","text_title":"Dr\u00fccken Sie auf Ihrer Tastatur Strg+V, um den Text einzuf\u00fcgen."}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/paste/langs/en_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/paste/langs/en_dlg.js deleted file mode 100644 index bc74daf85c..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/paste/langs/en_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('en.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."}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/paste/langs/en_us_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/paste/langs/en_us_dlg.js deleted file mode 100644 index 1a102e43fe..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/paste/langs/en_us_dlg.js +++ /dev/null @@ -1 +0,0 @@ -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."}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/paste/langs/fi_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/paste/langs/fi_dlg.js deleted file mode 100644 index 530e507cd8..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/paste/langs/fi_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('fi.paste_dlg',{"word_title":"Paina Ctrl+V liitt\u00e4\u00e4ksesi sis\u00e4ll\u00f6n ikkunaan.","text_linebreaks":"S\u00e4ilyt\u00e4 rivinvaihdot","text_title":"Paina Ctrl+V liitt\u00e4\u00e4ksesi sis\u00e4ll\u00f6n ikkunaan."}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/paste/langs/fr_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/paste/langs/fr_dlg.js deleted file mode 100644 index acc5d639f0..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/paste/langs/fr_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('fr.paste_dlg',{"word_title":"Utilisez CTRL+V sur votre clavier pour coller le texte dans la fen\u00eatre.","text_linebreaks":"Conserver les retours \u00e0 la ligne","text_title":"Utilisez CTRL+V sur votre clavier pour coller le texte dans la fen\u00eatre."}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/paste/langs/he_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/paste/langs/he_dlg.js deleted file mode 100644 index 5fe796a6a9..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/paste/langs/he_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('he.paste_dlg',{"word_title":"\u05d4\u05d3\u05d1\u05d9\u05e7\u05d5 \u05d1\u05d7\u05dc\u05d5\u05df \u05d6\u05d4 \u05d0\u05ea \u05d4\u05d8\u05e7\u05e1\u05d8 \u05d1\u05d0\u05de\u05e6\u05e2\u05d5\u05ea \u05d4\u05de\u05e7\u05e9\u05d9\u05dd CTRL+V.","text_linebreaks":"\u05d4\u05e9\u05d0\u05e8 \u05d0\u05ea \u05e9\u05d5\u05e8\u05d5\u05ea \u05d4\u05e8\u05d5\u05d5\u05d7","text_title":"\u05d4\u05d3\u05d1\u05d9\u05e7\u05d5 \u05d1\u05d7\u05dc\u05d5\u05df \u05d6\u05d4 \u05d0\u05ea \u05d4\u05d8\u05e7\u05e1\u05d8 \u05d1\u05d0\u05de\u05e6\u05e2\u05d5\u05ea \u05d4\u05de\u05e7\u05e9\u05d9\u05dd CTRL+V."}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/paste/langs/it_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/paste/langs/it_dlg.js deleted file mode 100644 index f1b8dc7e06..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/paste/langs/it_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('it.paste_dlg',{"word_title":"Premere CTRL+V sulla tastiera per incollare il testo nella finestra.","text_linebreaks":"Mantieni interruzioni di riga","text_title":"Premere CTRL+V sulla tastiera per incollare il testo nella finestra."}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/paste/langs/ja_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/paste/langs/ja_dlg.js deleted file mode 100644 index 5af5982271..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/paste/langs/ja_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('ja.paste_dlg',{"word_title":"Ctrl V(\u30ad\u30fc\u30dc\u30fc\u30c9)\u3092\u4f7f\u7528\u3057\u3066\u3001\u30c6\u30ad\u30b9\u30c8\u3092\u30a6\u30a3\u30f3\u30c9\u30a6\u306b\u8cbc\u308a\u4ed8\u3051\u3066\u304f\u3060\u3055\u3044\u3002","text_linebreaks":"\u6539\u884c\u3092\u4fdd\u6301","text_title":"Ctrl V(\u30ad\u30fc\u30dc\u30fc\u30c9)\u3092\u4f7f\u7528\u3057\u3066\u3001\u30c6\u30ad\u30b9\u30c8\u3092\u30a6\u30a3\u30f3\u30c9\u30a6\u306b\u8cbc\u308a\u4ed8\u3051\u3066\u304f\u3060\u3055\u3044\u3002"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/paste/langs/nl_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/paste/langs/nl_dlg.js deleted file mode 100644 index bac8ac046b..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/paste/langs/nl_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('nl.paste_dlg',{"word_title":"Gebruik Ctrl+V om tekst in het venster te plakken.","text_linebreaks":"Regelafbreking bewaren","text_title":"Gebruik Ctrl+V om tekst in het venster te plakken."}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/paste/langs/no_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/paste/langs/no_dlg.js deleted file mode 100644 index 3f8e333d02..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/paste/langs/no_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('no.paste_dlg',{"word_title":"Bruk CTRL+V p\u00e5 tastaturet for \u00e5 lime inn teksten i dette vinduet.","text_linebreaks":"Behold tekstbryting","text_title":"Bruk CTRL+V p\u00e5 tastaturet for \u00e5 lime inn teksten i dette vinduet."}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/paste/langs/pl_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/paste/langs/pl_dlg.js deleted file mode 100644 index 54fd41c37b..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/paste/langs/pl_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('pl.paste_dlg',{"word_title":"U\u017cyj CTRL+V na swojej klawiaturze \u017ceby wklei\u0107 tekst do okna.","text_linebreaks":"Zachowaj ko\u0144ce linii.","text_title":"U\u017cyj CTRL+V na swojej klawiaturze \u017ceby wklei\u0107 tekst do okna."}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/paste/langs/pt_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/paste/langs/pt_dlg.js deleted file mode 100644 index c9601cf945..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/paste/langs/pt_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('pt.paste_dlg',{"word_title":"Use CTRL+V para colar o texto na janela.","text_linebreaks":"Manter quebras de linha","text_title":"Use CTRL+V para colar o texto na janela."}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/paste/langs/ru_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/paste/langs/ru_dlg.js deleted file mode 100644 index b64b2ce379..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/paste/langs/ru_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('ru.paste_dlg',{"word_title":"\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 CTRL+V \u0434\u043b\u044f \u0432\u0441\u0442\u0430\u0432\u043a\u0438 \u0442\u0435\u043a\u0441\u0442\u0430 \u0432 \u043e\u043a\u043d\u043e.","text_linebreaks":"\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u044b \u0441\u0442\u0440\u043e\u043a","text_title":"\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 CTRL+V \u0434\u043b\u044f \u0432\u0441\u0442\u0430\u0432\u043a\u0438 \u0442\u0435\u043a\u0441\u0442\u0430 \u0432 \u043e\u043a\u043d\u043e."}); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/paste/langs/sv_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/paste/langs/sv_dlg.js deleted file mode 100644 index 1c99e2b1b2..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/paste/langs/sv_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('sv.paste_dlg',{"word_title":"Anv\u00e4nd ctrl-v p\u00e5 ditt tangentbord f\u00f6r att klistra in i detta f\u00f6nster.","text_linebreaks":"Spara radbrytningar","text_title":"Anv\u00e4nd ctrl-v p\u00e5 ditt tangentbord f\u00f6r att klistra in i detta f\u00f6nster."}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/paste/langs/zh_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/paste/langs/zh_dlg.js deleted file mode 100644 index 4abd1a96c2..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/paste/langs/zh_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('zh-cn.paste_dlg',{"word_title":"\u4f7f\u7528CTRL V\u7c98\u8d34\u6587\u672c\u5230\u7a97\u53e3\u4e2d\u3002","text_linebreaks":"\u4fdd\u7559\u65ad\u884c","text_title":"\u4f7f\u7528CTRL V\u7c98\u8d34\u6587\u672c\u5230\u7a97\u53e3\u4e2d\u3002"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/paste/pastetext.htm b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/paste/pastetext.htm deleted file mode 100644 index b655945476..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/paste/pastetext.htm +++ /dev/null @@ -1,27 +0,0 @@ - - - {#paste.paste_text_desc} - - - - -
    -
    {#paste.paste_text_desc}
    - -
    - -
    - -
    - -
    {#paste_dlg.text_title}
    - - - -
    - - -
    -
    - - \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/paste/pasteword.htm b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/paste/pasteword.htm deleted file mode 100644 index 0f6bb41210..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/paste/pasteword.htm +++ /dev/null @@ -1,21 +0,0 @@ - - - {#paste.paste_word_desc} - - - - -
    -
    {#paste.paste_word_desc}
    - -
    {#paste_dlg.word_title}
    - -
    - -
    - - -
    -
    - - diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/preview/editor_plugin.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/preview/editor_plugin.js deleted file mode 100644 index 507909c5f0..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/preview/editor_plugin.js +++ /dev/null @@ -1 +0,0 @@ -(function(){tinymce.create("tinymce.plugins.Preview",{init:function(a,b){var d=this,c=tinymce.explode(a.settings.content_css);d.editor=a;tinymce.each(c,function(f,e){c[e]=a.documentBaseURI.toAbsolute(f)});a.addCommand("mcePreview",function(){a.windowManager.open({file:a.getParam("plugin_preview_pageurl",b+"/preview.html"),width:parseInt(a.getParam("plugin_preview_width","550")),height:parseInt(a.getParam("plugin_preview_height","600")),resizable:"yes",scrollbars:"yes",popup_css:c?c.join(","):a.baseURI.toAbsolute("themes/"+a.settings.theme+"/skins/"+a.settings.skin+"/content.css"),inline:a.getParam("plugin_preview_inline",1)},{base:a.documentBaseURI.getURI()})});a.addButton("preview",{title:"preview.preview_desc",cmd:"mcePreview"})},getInfo:function(){return{longname:"Preview",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/preview",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("preview",tinymce.plugins.Preview)})(); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/preview/editor_plugin_src.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/preview/editor_plugin_src.js deleted file mode 100644 index 7db66d4493..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/preview/editor_plugin_src.js +++ /dev/null @@ -1,53 +0,0 @@ -/** - * editor_plugin_src.js - * - * Copyright 2009, Moxiecode Systems AB - * Released under LGPL License. - * - * License: http://tinymce.moxiecode.com/license - * Contributing: http://tinymce.moxiecode.com/contributing - */ - -(function() { - tinymce.create('tinymce.plugins.Preview', { - init : function(ed, url) { - var t = this, css = tinymce.explode(ed.settings.content_css); - - t.editor = ed; - - // Force absolute CSS urls - tinymce.each(css, function(u, k) { - css[k] = ed.documentBaseURI.toAbsolute(u); - }); - - ed.addCommand('mcePreview', function() { - ed.windowManager.open({ - file : ed.getParam("plugin_preview_pageurl", url + "/preview.html"), - width : parseInt(ed.getParam("plugin_preview_width", "550")), - height : parseInt(ed.getParam("plugin_preview_height", "600")), - resizable : "yes", - scrollbars : "yes", - popup_css : css ? css.join(',') : ed.baseURI.toAbsolute("themes/" + ed.settings.theme + "/skins/" + ed.settings.skin + "/content.css"), - inline : ed.getParam("plugin_preview_inline", 1) - }, { - base : ed.documentBaseURI.getURI() - }); - }); - - ed.addButton('preview', {title : 'preview.preview_desc', cmd : 'mcePreview'}); - }, - - getInfo : function() { - return { - longname : 'Preview', - author : 'Moxiecode Systems AB', - authorurl : 'http://tinymce.moxiecode.com', - infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/preview', - version : tinymce.majorVersion + "." + tinymce.minorVersion - }; - } - }); - - // Register plugin - tinymce.PluginManager.add('preview', tinymce.plugins.Preview); -})(); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/preview/example.html b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/preview/example.html deleted file mode 100644 index b2c3d90ce0..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/preview/example.html +++ /dev/null @@ -1,28 +0,0 @@ - - - - - -Example of a custom preview page - - - -Editor contents:
    -
    - -
    - - - diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/preview/jscripts/embed.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/preview/jscripts/embed.js deleted file mode 100644 index f8dc810527..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/preview/jscripts/embed.js +++ /dev/null @@ -1,73 +0,0 @@ -/** - * This script contains embed functions for common plugins. This scripts are complety free to use for any purpose. - */ - -function writeFlash(p) { - writeEmbed( - 'D27CDB6E-AE6D-11cf-96B8-444553540000', - 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0', - 'application/x-shockwave-flash', - p - ); -} - -function writeShockWave(p) { - writeEmbed( - '166B1BCA-3F9C-11CF-8075-444553540000', - 'http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0', - 'application/x-director', - p - ); -} - -function writeQuickTime(p) { - writeEmbed( - '02BF25D5-8C17-4B23-BC80-D3488ABDDC6B', - 'http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0', - 'video/quicktime', - p - ); -} - -function writeRealMedia(p) { - writeEmbed( - 'CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA', - 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0', - 'audio/x-pn-realaudio-plugin', - p - ); -} - -function writeWindowsMedia(p) { - p.url = p.src; - writeEmbed( - '6BF52A52-394A-11D3-B153-00C04F79FAA6', - 'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701', - 'application/x-mplayer2', - p - ); -} - -function writeEmbed(cls, cb, mt, p) { - var h = '', n; - - h += ''; - - h += ' - - - - - -{#preview.preview_desc} - - - - - diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/print/editor_plugin.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/print/editor_plugin.js deleted file mode 100644 index b5b3a55edf..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/print/editor_plugin.js +++ /dev/null @@ -1 +0,0 @@ -(function(){tinymce.create("tinymce.plugins.Print",{init:function(a,b){a.addCommand("mcePrint",function(){a.getWin().print()});a.addButton("print",{title:"print.print_desc",cmd:"mcePrint"})},getInfo:function(){return{longname:"Print",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/print",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("print",tinymce.plugins.Print)})(); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/print/editor_plugin_src.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/print/editor_plugin_src.js deleted file mode 100644 index 3933fe656c..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/print/editor_plugin_src.js +++ /dev/null @@ -1,34 +0,0 @@ -/** - * editor_plugin_src.js - * - * Copyright 2009, Moxiecode Systems AB - * Released under LGPL License. - * - * License: http://tinymce.moxiecode.com/license - * Contributing: http://tinymce.moxiecode.com/contributing - */ - -(function() { - tinymce.create('tinymce.plugins.Print', { - init : function(ed, url) { - ed.addCommand('mcePrint', function() { - ed.getWin().print(); - }); - - ed.addButton('print', {title : 'print.print_desc', cmd : 'mcePrint'}); - }, - - getInfo : function() { - return { - longname : 'Print', - author : 'Moxiecode Systems AB', - authorurl : 'http://tinymce.moxiecode.com', - infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/print', - version : tinymce.majorVersion + "." + tinymce.minorVersion - }; - } - }); - - // Register plugin - tinymce.PluginManager.add('print', tinymce.plugins.Print); -})(); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/save/editor_plugin.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/save/editor_plugin.js deleted file mode 100644 index 8e93996671..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/save/editor_plugin.js +++ /dev/null @@ -1 +0,0 @@ -(function(){tinymce.create("tinymce.plugins.Save",{init:function(a,b){var c=this;c.editor=a;a.addCommand("mceSave",c._save,c);a.addCommand("mceCancel",c._cancel,c);a.addButton("save",{title:"save.save_desc",cmd:"mceSave"});a.addButton("cancel",{title:"save.cancel_desc",cmd:"mceCancel"});a.onNodeChange.add(c._nodeChange,c);a.addShortcut("ctrl+s",a.getLang("save.save_desc"),"mceSave")},getInfo:function(){return{longname:"Save",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/save",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_nodeChange:function(b,a,c){var b=this.editor;if(b.getParam("save_enablewhendirty")){a.setDisabled("save",!b.isDirty());a.setDisabled("cancel",!b.isDirty())}},_save:function(){var c=this.editor,a,e,d,b;a=tinymce.DOM.get(c.id).form||tinymce.DOM.getParent(c.id,"form");if(c.getParam("save_enablewhendirty")&&!c.isDirty()){return}tinyMCE.triggerSave();if(e=c.getParam("save_onsavecallback")){if(c.execCallback("save_onsavecallback",c)){c.startContent=tinymce.trim(c.getContent({format:"raw"}));c.nodeChanged()}return}if(a){c.isNotDirty=true;if(a.onsubmit==null||a.onsubmit()!=false){a.submit()}c.nodeChanged()}else{c.windowManager.alert("Error: No form element found.")}},_cancel:function(){var a=this.editor,c,b=tinymce.trim(a.startContent);if(c=a.getParam("save_oncancelcallback")){a.execCallback("save_oncancelcallback",a);return}a.setContent(b);a.undoManager.clear();a.nodeChanged()}});tinymce.PluginManager.add("save",tinymce.plugins.Save)})(); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/save/editor_plugin_src.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/save/editor_plugin_src.js deleted file mode 100644 index f5a3de8f5f..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/save/editor_plugin_src.js +++ /dev/null @@ -1,101 +0,0 @@ -/** - * editor_plugin_src.js - * - * Copyright 2009, Moxiecode Systems AB - * Released under LGPL License. - * - * License: http://tinymce.moxiecode.com/license - * Contributing: http://tinymce.moxiecode.com/contributing - */ - -(function() { - tinymce.create('tinymce.plugins.Save', { - init : function(ed, url) { - var t = this; - - t.editor = ed; - - // Register commands - ed.addCommand('mceSave', t._save, t); - ed.addCommand('mceCancel', t._cancel, t); - - // Register buttons - ed.addButton('save', {title : 'save.save_desc', cmd : 'mceSave'}); - ed.addButton('cancel', {title : 'save.cancel_desc', cmd : 'mceCancel'}); - - ed.onNodeChange.add(t._nodeChange, t); - ed.addShortcut('ctrl+s', ed.getLang('save.save_desc'), 'mceSave'); - }, - - getInfo : function() { - return { - longname : 'Save', - author : 'Moxiecode Systems AB', - authorurl : 'http://tinymce.moxiecode.com', - infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/save', - version : tinymce.majorVersion + "." + tinymce.minorVersion - }; - }, - - // Private methods - - _nodeChange : function(ed, cm, n) { - var ed = this.editor; - - if (ed.getParam('save_enablewhendirty')) { - cm.setDisabled('save', !ed.isDirty()); - cm.setDisabled('cancel', !ed.isDirty()); - } - }, - - // Private methods - - _save : function() { - var ed = this.editor, formObj, os, i, elementId; - - formObj = tinymce.DOM.get(ed.id).form || tinymce.DOM.getParent(ed.id, 'form'); - - if (ed.getParam("save_enablewhendirty") && !ed.isDirty()) - return; - - tinyMCE.triggerSave(); - - // Use callback instead - if (os = ed.getParam("save_onsavecallback")) { - if (ed.execCallback('save_onsavecallback', ed)) { - ed.startContent = tinymce.trim(ed.getContent({format : 'raw'})); - ed.nodeChanged(); - } - - return; - } - - if (formObj) { - ed.isNotDirty = true; - - if (formObj.onsubmit == null || formObj.onsubmit() != false) - formObj.submit(); - - ed.nodeChanged(); - } else - ed.windowManager.alert("Error: No form element found."); - }, - - _cancel : function() { - var ed = this.editor, os, h = tinymce.trim(ed.startContent); - - // Use callback instead - if (os = ed.getParam("save_oncancelcallback")) { - ed.execCallback('save_oncancelcallback', ed); - return; - } - - ed.setContent(h); - ed.undoManager.clear(); - ed.nodeChanged(); - } - }); - - // Register plugin - tinymce.PluginManager.add('save', tinymce.plugins.Save); -})(); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/searchreplace/css/searchreplace.css b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/searchreplace/css/searchreplace.css deleted file mode 100644 index ecdf58c7b5..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/searchreplace/css/searchreplace.css +++ /dev/null @@ -1,6 +0,0 @@ -.panel_wrapper {height:85px;} -.panel_wrapper div.current {height:85px;} - -/* IE */ -* html .panel_wrapper {height:100px;} -* html .panel_wrapper div.current {height:100px;} diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/searchreplace/editor_plugin.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/searchreplace/editor_plugin.js deleted file mode 100644 index 165bc12df5..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/searchreplace/editor_plugin.js +++ /dev/null @@ -1 +0,0 @@ -(function(){tinymce.create("tinymce.plugins.SearchReplacePlugin",{init:function(a,c){function b(d){window.focus();a.windowManager.open({file:c+"/searchreplace.htm",width:420+parseInt(a.getLang("searchreplace.delta_width",0)),height:170+parseInt(a.getLang("searchreplace.delta_height",0)),inline:1,auto_focus:0},{mode:d,search_string:a.selection.getContent({format:"text"}),plugin_url:c})}a.addCommand("mceSearch",function(){b("search")});a.addCommand("mceReplace",function(){b("replace")});a.addButton("search",{title:"searchreplace.search_desc",cmd:"mceSearch"});a.addButton("replace",{title:"searchreplace.replace_desc",cmd:"mceReplace"});a.addShortcut("ctrl+f","searchreplace.search_desc","mceSearch")},getInfo:function(){return{longname:"Search/Replace",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/searchreplace",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("searchreplace",tinymce.plugins.SearchReplacePlugin)})(); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/searchreplace/editor_plugin_src.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/searchreplace/editor_plugin_src.js deleted file mode 100644 index 4c87e8fa79..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/searchreplace/editor_plugin_src.js +++ /dev/null @@ -1,61 +0,0 @@ -/** - * editor_plugin_src.js - * - * Copyright 2009, Moxiecode Systems AB - * Released under LGPL License. - * - * License: http://tinymce.moxiecode.com/license - * Contributing: http://tinymce.moxiecode.com/contributing - */ - -(function() { - tinymce.create('tinymce.plugins.SearchReplacePlugin', { - init : function(ed, url) { - function open(m) { - // Keep IE from writing out the f/r character to the editor - // instance while initializing a new dialog. See: #3131190 - window.focus(); - - ed.windowManager.open({ - file : url + '/searchreplace.htm', - width : 420 + parseInt(ed.getLang('searchreplace.delta_width', 0)), - height : 170 + parseInt(ed.getLang('searchreplace.delta_height', 0)), - inline : 1, - auto_focus : 0 - }, { - mode : m, - search_string : ed.selection.getContent({format : 'text'}), - plugin_url : url - }); - }; - - // Register commands - ed.addCommand('mceSearch', function() { - open('search'); - }); - - ed.addCommand('mceReplace', function() { - open('replace'); - }); - - // Register buttons - ed.addButton('search', {title : 'searchreplace.search_desc', cmd : 'mceSearch'}); - ed.addButton('replace', {title : 'searchreplace.replace_desc', cmd : 'mceReplace'}); - - ed.addShortcut('ctrl+f', 'searchreplace.search_desc', 'mceSearch'); - }, - - getInfo : function() { - return { - longname : 'Search/Replace', - author : 'Moxiecode Systems AB', - authorurl : 'http://tinymce.moxiecode.com', - infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/searchreplace', - version : tinymce.majorVersion + "." + tinymce.minorVersion - }; - } - }); - - // Register plugin - tinymce.PluginManager.add('searchreplace', tinymce.plugins.SearchReplacePlugin); -})(); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/searchreplace/js/searchreplace.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/searchreplace/js/searchreplace.js deleted file mode 100644 index eb9b6eea84..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/searchreplace/js/searchreplace.js +++ /dev/null @@ -1,148 +0,0 @@ -tinyMCEPopup.requireLangPack(); - -var SearchReplaceDialog = { - init : function(ed) { - var t = this, f = document.forms[0], m = tinyMCEPopup.getWindowArg("mode"); - - t.switchMode(m); - - f[m + '_panel_searchstring'].value = tinyMCEPopup.getWindowArg("search_string"); - - // Focus input field - f[m + '_panel_searchstring'].focus(); - - mcTabs.onChange.add(function(tab_id, panel_id) { - t.switchMode(tab_id.substring(0, tab_id.indexOf('_'))); - }); - - }, - - switchMode : function(m) { - var f, lm = this.lastMode; - - if (lm != m) { - f = document.forms[0]; - - if (lm) { - f[m + '_panel_searchstring'].value = f[lm + '_panel_searchstring'].value; - f[m + '_panel_backwardsu'].checked = f[lm + '_panel_backwardsu'].checked; - f[m + '_panel_backwardsd'].checked = f[lm + '_panel_backwardsd'].checked; - f[m + '_panel_casesensitivebox'].checked = f[lm + '_panel_casesensitivebox'].checked; - } - - mcTabs.displayTab(m + '_tab', m + '_panel'); - document.getElementById("replaceBtn").style.display = (m == "replace") ? "inline" : "none"; - document.getElementById("replaceAllBtn").style.display = (m == "replace") ? "inline" : "none"; - this.lastMode = m; - } - }, - - searchNext : function(a) { - var ed = tinyMCEPopup.editor, se = ed.selection, r = se.getRng(), f, m = this.lastMode, s, b, fl = 0, w = ed.getWin(), wm = ed.windowManager, fo = 0; - - if (tinymce.isIE11 && !window.find) { - ed.windowManager.alert("This feature is not available in IE 11+. Upgrade TinyMCE to 4.x to get this functionallity back."); - return; - } - - // Get input - f = document.forms[0]; - s = f[m + '_panel_searchstring'].value; - b = f[m + '_panel_backwardsu'].checked; - ca = f[m + '_panel_casesensitivebox'].checked; - rs = f['replace_panel_replacestring'].value; - - if (tinymce.isIE) { - r = ed.getDoc().selection.createRange(); - } - - if (s == '') - return; - - function fix() { - // Correct Firefox graphics glitches - // TODO: Verify if this is actually needed any more, maybe it was for very old FF versions? - r = se.getRng().cloneRange(); - ed.getDoc().execCommand('SelectAll', false, null); - se.setRng(r); - }; - - function replace() { - ed.selection.setContent(rs); // Needs to be duplicated due to selection bug in IE - }; - - // IE flags - if (ca) - fl = fl | 4; - - switch (a) { - case 'all': - // Move caret to beginning of text - ed.execCommand('SelectAll'); - ed.selection.collapse(true); - - if (tinymce.isIE) { - ed.focus(); - r = ed.getDoc().selection.createRange(); - - while (r.findText(s, b ? -1 : 1, fl)) { - r.scrollIntoView(); - r.select(); - replace(); - fo = 1; - - if (b) { - r.moveEnd("character", -(rs.length)); // Otherwise will loop forever - } - } - - tinyMCEPopup.storeSelection(); - } else { - while (w.find(s, ca, b, false, false, false, false)) { - replace(); - fo = 1; - } - } - - if (fo) - tinyMCEPopup.alert(ed.getLang('searchreplace_dlg.allreplaced')); - else - tinyMCEPopup.alert(ed.getLang('searchreplace_dlg.notfound')); - - return; - - case 'current': - if (!ed.selection.isCollapsed()) - replace(); - - break; - } - - se.collapse(b); - r = se.getRng(); - - // Whats the point - if (!s) - return; - - if (tinymce.isIE) { - ed.focus(); - r = ed.getDoc().selection.createRange(); - - if (r.findText(s, b ? -1 : 1, fl)) { - r.scrollIntoView(); - r.select(); - } else - tinyMCEPopup.alert(ed.getLang('searchreplace_dlg.notfound')); - - tinyMCEPopup.storeSelection(); - } else { - if (!w.find(s, ca, b, false, false, false, false)) - tinyMCEPopup.alert(ed.getLang('searchreplace_dlg.notfound')); - else - fix(); - } - } -}; - -tinyMCEPopup.onInit.add(SearchReplaceDialog.init, SearchReplaceDialog); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/searchreplace/langs/da_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/searchreplace/langs/da_dlg.js deleted file mode 100644 index b551cea041..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/searchreplace/langs/da_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('da.searchreplace_dlg',{findwhat:"S\u00f8g efter",replacewith:"Erstat med",direction:"Retning",up:"Op",down:"Ned",mcase:"Forskel p\u00e5 store og sm\u00e5 bogstaver",findnext:"Find n\u00e6ste",allreplaced:"Alle forekomster af s\u00f8gestrengen er erstattet.","searchnext_desc":"S\u00f8g igen",notfound:"S\u00f8gningen gav intet resultat.","search_title":"S\u00f8g","replace_title":"S\u00f8g / erstat",replaceall:"Erstat alle",replace:"Erstat"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/searchreplace/langs/de_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/searchreplace/langs/de_dlg.js deleted file mode 100644 index 7c40acd9e0..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/searchreplace/langs/de_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('de.searchreplace_dlg',{findwhat:"Zu suchender Text",replacewith:"Ersetzen durch",direction:"Suchrichtung",up:"Aufw\u00e4rts",down:"Abw\u00e4rts",mcase:"Gro\u00df-/Kleinschreibung beachten",findnext:"Weitersuchen",allreplaced:"Alle Vorkommen der Zeichenkette wurden ersetzt.","searchnext_desc":"Weitersuchen",notfound:"Die Suche ist am Ende angelangt. Die Zeichenkette konnte nicht gefunden werden.","search_title":"Suchen","replace_title":"Suchen/Ersetzen",replaceall:"Alle ersetzen",replace:"Ersetzen"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/searchreplace/langs/en_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/searchreplace/langs/en_dlg.js deleted file mode 100644 index 8a65900977..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/searchreplace/langs/en_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('en.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"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/searchreplace/langs/en_us_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/searchreplace/langs/en_us_dlg.js deleted file mode 100644 index bbd403ecfc..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/searchreplace/langs/en_us_dlg.js +++ /dev/null @@ -1 +0,0 @@ -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"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/searchreplace/langs/fi_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/searchreplace/langs/fi_dlg.js deleted file mode 100644 index c2617c3371..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/searchreplace/langs/fi_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('fi.searchreplace_dlg',{findwhat:"Etsit\u00e4\u00e4n",replacewith:"Korvataan",direction:"Suunta",up:"Yl\u00f6s",down:"Alas",mcase:"Huomioi isot ja pienet kirjaimet",findnext:"Etsi seuraavaa",allreplaced:"Kaikki l\u00f6ydetyt merkkijonot korvattiin.","searchnext_desc":"Etsi uudestaan",notfound:"Haku on valmis. Haettua teksti\u00e4 ei l\u00f6ytynyt.","search_title":"Haku","replace_title":"Etsi ja korvaa",replaceall:"Korvaa kaikki",replace:"Korvaa"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/searchreplace/langs/fr_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/searchreplace/langs/fr_dlg.js deleted file mode 100644 index 707b5c2a9e..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/searchreplace/langs/fr_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('fr.searchreplace_dlg',{findwhat:"Rechercher ceci",replacewith:"Remplacer par",direction:"Direction",up:"Vers le haut",down:"Vers le bas",mcase:"Sensible \u00e0 la casse",findnext:"Rechercher le suivant",allreplaced:"Toutes les occurrences de la cha\u00eene recherch\u00e9e ont \u00e9t\u00e9 remplac\u00e9es.","searchnext_desc":"Suivant",notfound:"La recherche est termin\u00e9e. La cha\u00eene recherch\u00e9e n\'a pas \u00e9t\u00e9 trouv\u00e9e.","search_title":"Rechercher","replace_title":"Rechercher / remplacer",replaceall:"Tout remplacer",replace:"Remplacer"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/searchreplace/langs/he_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/searchreplace/langs/he_dlg.js deleted file mode 100644 index c5861bbd4e..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/searchreplace/langs/he_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('he.searchreplace_dlg',{findwhat:"\u05dc\u05d7\u05e4\u05e9 \u05d0\u05ea",replacewith:"\u05dc\u05d4\u05d7\u05dc\u05d9\u05e3 \u05d1",direction:"\u05db\u05d9\u05d5\u05d5\u05df",up:"\u05dc\u05de\u05e2\u05dc\u05d4",down:"\u05dc\u05de\u05d8\u05d4",mcase:"\u05d4\u05ea\u05d0\u05dd \u05d0\u05d5\u05ea\u05d9\u05d5\u05ea \u05e8\u05d9\u05e9\u05d9\u05d5\u05ea",findnext:"\u05d7\u05e4\u05e9 \u05d0\u05ea \u05d4\u05d1\u05d0",allreplaced:"\u05db\u05dc \u05e4\u05e8\u05d9\u05d8\u05d9 \u05d4\u05d7\u05d9\u05e4\u05d5\u05e9 \u05d4\u05d5\u05d7\u05dc\u05e4\u05d5","searchnext_desc":"\u05d7\u05d9\u05e4\u05d5\u05e9 \u05d4\u05d1\u05d0",notfound:"\u05d4\u05d7\u05d9\u05e4\u05d5\u05e9 \u05d4\u05e1\u05ea\u05d9\u05d9\u05dd. \u05e4\u05e8\u05d9\u05d8 \u05d4\u05d7\u05d9\u05e4\u05d5\u05e9 \u05dc\u05d0 \u05e0\u05de\u05e6\u05d0.","search_title":"\u05d7\u05d9\u05e4\u05d5\u05e9","replace_title":"\u05d7\u05d9\u05e4\u05d5\u05e9 \u05d5\u05d4\u05d7\u05dc\u05e4\u05d4",replaceall:"\u05d4\u05d7\u05dc\u05e4\u05ea \u05d4\u05db\u05dc",replace:"\u05d4\u05d7\u05dc\u05e4\u05d4"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/searchreplace/langs/it_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/searchreplace/langs/it_dlg.js deleted file mode 100644 index da34e5d837..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/searchreplace/langs/it_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('it.searchreplace_dlg',{findwhat:"Trova:",replacewith:"Sostituisci con:",direction:"Direzione",up:"Avanti",down:"Indietro",mcase:"Maiuscole/minuscole",findnext:"Trova succ.",allreplaced:"Tutte le occorrenze del criterio di ricerca sono state sostituite.","searchnext_desc":"Trova successivo",notfound:"Ricerca completata. Nessun risultato trovato.","search_title":"Trova","replace_title":"Trova/Sostituisci",replaceall:"Sost. tutto",replace:"Sostituisci"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/searchreplace/langs/ja_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/searchreplace/langs/ja_dlg.js deleted file mode 100644 index a12eb7830c..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/searchreplace/langs/ja_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('ja.searchreplace_dlg',{findwhat:"\u691c\u7d22\u3059\u308b\u6587\u5b57\u5217",replacewith:"\u7f6e\u63db\u5f8c\u306e\u6587\u5b57\u5217",direction:"\u65b9\u5411",up:"\u4e0a\u3078",down:"\u4e0b\u3078",mcase:"\u5927\u6587\u5b57\u30fb\u5c0f\u6587\u5b57\u306e\u533a\u5225",findnext:"\u6b21\u3092\u691c\u7d22",allreplaced:"\u3059\u3079\u3066\u7f6e\u63db\u3057\u307e\u3057\u305f\u3002","searchnext_desc":"\u518d\u691c\u7d22",notfound:"\u691c\u7d22\u3092\u5b8c\u4e86\u3057\u307e\u3057\u305f\u3002\u691c\u7d22\u6587\u5b57\u5217\u306f\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3067\u3057\u305f\u3002","search_title":"\u691c\u7d22","replace_title":"\u691c\u7d22\u3068\u7f6e\u63db",replaceall:"\u3059\u3079\u3066\u7f6e\u63db",replace:"\u7f6e\u63db"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/searchreplace/langs/nl_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/searchreplace/langs/nl_dlg.js deleted file mode 100644 index afda5f032a..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/searchreplace/langs/nl_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('nl.searchreplace_dlg',{findwhat:"Zoeken naar",replacewith:"Vervangen door",direction:"Richting",up:"Omhoog",down:"Omlaag",mcase:"Identieke hoofdletters/kleine letters",findnext:"Zoeken",allreplaced:"Alle instanties van de zoekterm zijn vervangen.","searchnext_desc":"Opnieuw zoeken",notfound:"Het doorzoeken is voltooid. De zoekterm kon niet meer worden gevonden.","search_title":"Zoeken","replace_title":"Zoeken/Vervangen",replaceall:"Alles verv.",replace:"Vervangen"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/searchreplace/langs/no_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/searchreplace/langs/no_dlg.js deleted file mode 100644 index b0dbb3bb57..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/searchreplace/langs/no_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('no.searchreplace_dlg',{findwhat:"Finn hva",replacewith:"Erstatt med",direction:"Retning",up:"Oppover",down:"Nedover",mcase:"Skill mellom store og sm\u00e5 bokstaver",findnext:"Finn neste",allreplaced:"Alle forekomster av s\u00f8kestrengen er erstattet.","searchnext_desc":"S\u00f8k igjen",notfound:"S\u00f8ket avsluttet. Fant ikke s\u00f8kestrengen.","search_title":"S\u00f8k","replace_title":"S\u00f8k/Erstatt",replaceall:"Erstatt alle",replace:"Erstatt"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/searchreplace/langs/pl_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/searchreplace/langs/pl_dlg.js deleted file mode 100644 index df815de1cf..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/searchreplace/langs/pl_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('pl.searchreplace_dlg',{findwhat:"Znajd\u017a...",replacewith:"Zamie\u0144 na...",direction:"Kierunek",up:"W g\u00f3r\u0119",down:"W d\u00f3\u0142",mcase:"Uwzgl\u0119dniaj wielko\u015b\u0107 liter",findnext:"Znajd\u017a nast\u0119pny",allreplaced:"Wszystkie wyst\u0105pienia szukanego fragmentu zosta\u0142y zast\u0105pione.","searchnext_desc":"Znajd\u017a ponownie",notfound:"Wyszukiwanie zako\u0144czone. Poszukiwany fragment nie zosta\u0142 znaleziony.","search_title":"Znajd\u017a","replace_title":"Znajd\u017a/zamie\u0144",replaceall:"Zamie\u0144 wszystko",replace:"Zamie\u0144"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/searchreplace/langs/pt_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/searchreplace/langs/pt_dlg.js deleted file mode 100644 index 25c9a42c5d..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/searchreplace/langs/pt_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('pt.searchreplace_dlg',{findwhat:"Localizar",replacewith:"Substituir com",direction:"Dire\u00e7\u00e3o",up:"Acima",down:"Abaixo",mcase:"Diferenciar mai\u00fasculas",findnext:"Localizar pr\u00f3x.",allreplaced:"Todas as substitui\u00e7\u00f5es foram efetuadas.","searchnext_desc":"Localizar novamente",notfound:"A pesquisa foi conclu\u00edda sem resultados.","search_title":"Localizar","replace_title":"Localizar/substituir",replaceall:"Subst. todos",replace:"Substituir"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/searchreplace/langs/ru_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/searchreplace/langs/ru_dlg.js deleted file mode 100644 index 379275789c..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/searchreplace/langs/ru_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('ru.searchreplace_dlg',{findwhat:"\u041f\u043e\u0438\u0441\u043a",replacewith:"\u0417\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0430",direction:"\u041d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435",up:"\u0412\u0432\u0435\u0440\u0445 ",down:"\u0412\u043d\u0438\u0437",mcase:"\u0423\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0440\u0435\u0433\u0438\u0441\u0442\u0440",findnext:"\u041d\u0430\u0439\u0442\u0438 \u0434\u0430\u043b\u0435\u0435",allreplaced:"\u0412\u0441\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u0431\u044b\u043b\u0438 \u0437\u0430\u043c\u0435\u043d\u0435\u043d\u044b.","searchnext_desc":"\u041d\u0430\u0439\u0442\u0438 \u0435\u0449\u0435",notfound:"\u041f\u043e\u0438\u0441\u043a \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d. \u0421\u043e\u043e\u0442\u0432\u0435\u0441\u0442\u0432\u0438\u0439 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u043e.","search_title":"\u041f\u043e\u0438\u0441\u043a","replace_title":"\u041f\u043e\u0438\u0441\u043a \u0438 \u0437\u0430\u043c\u0435\u043d\u0430",replaceall:"\u0417\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0432\u0441\u0435",replace:"\u0417\u0430\u043c\u0435\u043d\u0430"}); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/searchreplace/langs/sv_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/searchreplace/langs/sv_dlg.js deleted file mode 100644 index d503ec86d2..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/searchreplace/langs/sv_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('sv.searchreplace_dlg',{findwhat:"Hitta vad",replacewith:"Ers\u00e4tt med",direction:"Riktning",up:"Upp\u00e5t",down:"Ner\u00e5t",mcase:"Matcha gemener/versaler",findnext:"Hitta n\u00e4sta",allreplaced:"Alla st\u00e4llen d\u00e4r s\u00f6kstr\u00e4ngen kunde hittas har ersatts.","searchnext_desc":"S\u00f6k igen",notfound:"S\u00f6kningen har slutf\u00f6rts. S\u00f6kstr\u00e4ngen kunde inte hittas.","search_title":"S\u00f6k","replace_title":"S\u00f6k/ers\u00e4tt",replaceall:"Ers\u00e4tt alla",replace:"Ers\u00e4tt"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/searchreplace/langs/zh_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/searchreplace/langs/zh_dlg.js deleted file mode 100644 index 88912474f6..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/searchreplace/langs/zh_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('zh-cn.searchreplace_dlg',{findwhat:"\u67e5\u627e\u76ee\u6807",replacewith:"\u66ff\u6362\u4e3a",direction:"\u67e5\u627e\u65b9\u5411",up:"\u5411\u4e0a",down:"\u5411\u4e0b",mcase:"\u533a\u5206\u5927\u5c0f\u5199",findnext:"\u67e5\u627e\u4e0b\u4e00\u4e2a",allreplaced:"\u6240\u6709\u51fa\u73b0\u7684\u5b57\u7b26\u5747\u5df2\u66ff\u6362\u3002","searchnext_desc":"\u7ee7\u7eed\u67e5\u627e",notfound:"\u67e5\u627e\u5b8c\u6210\uff0c\u672a\u627e\u5230\u7b26\u5408\u7684\u6587\u5b57\u3002","search_title":"\u67e5\u627e","replace_title":"\u67e5\u627e/\u66ff\u6362",replaceall:"\u5168\u90e8\u66ff\u6362",replace:"\u66ff\u6362"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/searchreplace/searchreplace.htm b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/searchreplace/searchreplace.htm deleted file mode 100644 index 2443a9184b..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/searchreplace/searchreplace.htm +++ /dev/null @@ -1,100 +0,0 @@ - - - - {#searchreplace_dlg.replace_title} - - - - - - - - -
    - - -
    -
    - - - - - - - - - - - -
    - - - - - - - - - -
    - - - - - -
    -
    -
    - -
    - - - - - - - - - - - - - - - -
    - - - - - - - - - -
    - - - - - -
    -
    -
    - -
    - -
    - - - - -
    -
    - - diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/spellchecker/css/content.css b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/spellchecker/css/content.css deleted file mode 100644 index 24efa02170..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/spellchecker/css/content.css +++ /dev/null @@ -1 +0,0 @@ -.mceItemHiddenSpellWord {background:url(../img/wline.gif) repeat-x bottom left; cursor:default;} diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/spellchecker/editor_plugin.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/spellchecker/editor_plugin.js deleted file mode 100644 index 6b57241a90..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/spellchecker/editor_plugin.js +++ /dev/null @@ -1 +0,0 @@ -(function(){var a=tinymce.util.JSONRequest,c=tinymce.each,b=tinymce.DOM;tinymce.create("tinymce.plugins.SpellcheckerPlugin",{getInfo:function(){return{longname:"Spellchecker",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/spellchecker",version:tinymce.majorVersion+"."+tinymce.minorVersion}},init:function(e,f){var g=this,d;g.url=f;g.editor=e;g.rpcUrl=e.getParam("spellchecker_rpc_url","{backend}");if(g.rpcUrl=="{backend}"){if(tinymce.isIE){return}g.hasSupport=true;e.onContextMenu.addToTop(function(h,i){if(g.active){return false}})}e.addCommand("mceSpellCheck",function(){if(g.rpcUrl=="{backend}"){g.editor.getBody().spellcheck=g.active=!g.active;return}if(!g.active){e.setProgressState(1);g._sendRPC("checkWords",[g.selectedLang,g._getWords()],function(h){if(h.length>0){g.active=1;g._markWords(h);e.setProgressState(0);e.nodeChanged()}else{e.setProgressState(0);if(e.getParam("spellchecker_report_no_misspellings",true)){e.windowManager.alert("spellchecker.no_mpell")}}})}else{g._done()}});if(e.settings.content_css!==false){e.contentCSS.push(f+"/css/content.css")}e.onClick.add(g._showMenu,g);e.onContextMenu.add(g._showMenu,g);e.onBeforeGetContent.add(function(){if(g.active){g._removeWords()}});e.onNodeChange.add(function(i,h){h.setActive("spellchecker",g.active)});e.onSetContent.add(function(){g._done()});e.onBeforeGetContent.add(function(){g._done()});e.onBeforeExecCommand.add(function(h,i){if(i=="mceFullScreen"){g._done()}});g.languages={};c(e.getParam("spellchecker_languages","+English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr,German=de,Italian=it,Polish=pl,Portuguese=pt,Spanish=es,Swedish=sv","hash"),function(i,h){if(h.indexOf("+")===0){h=h.substring(1);g.selectedLang=i}g.languages[h]=i})},createControl:function(h,d){var f=this,g,e=f.editor;if(h=="spellchecker"){if(f.rpcUrl=="{backend}"){if(f.hasSupport){g=d.createButton(h,{title:"spellchecker.desc",cmd:"mceSpellCheck",scope:f})}return g}g=d.createSplitButton(h,{title:"spellchecker.desc",cmd:"mceSpellCheck",scope:f});g.onRenderMenu.add(function(j,i){i.add({title:"spellchecker.langs","class":"mceMenuItemTitle"}).setDisabled(1);f.menuItems={};c(f.languages,function(n,m){var p={icon:1},l;p.onclick=function(){if(n==f.selectedLang){return}f._updateMenu(l);f.selectedLang=n};p.title=m;l=i.add(p);l.setSelected(n==f.selectedLang);f.menuItems[n]=l;if(n==f.selectedLang){f.selectedItem=l}})});return g}},setLanguage:function(e){var d=this;if(e==d.selectedLang){return}if(tinymce.grep(d.languages,function(f){return f===e}).length===0){throw"Unknown language: "+e}d.selectedLang=e;if(d.menuItems){d._updateMenu(d.menuItems[e])}if(d.active){d._done()}},_updateMenu:function(d){d.setSelected(1);this.selectedItem.setSelected(0);this.selectedItem=d},_walk:function(i,g){var h=this.editor.getDoc(),e;if(h.createTreeWalker){e=h.createTreeWalker(i,NodeFilter.SHOW_TEXT,null,false);while((i=e.nextNode())!=null){g.call(this,i)}}else{tinymce.walk(i,g,"childNodes")}},_getSeparators:function(){var e="",d,f=this.editor.getParam("spellchecker_word_separator_chars",'\\s!"#$%&()*+,-./:;<=>?@[]^_{|}\u201d\u201c');for(d=0;d$2");while((s=p.indexOf(""))!=-1){o=p.substring(0,s);if(o.length){r=j.createTextNode(g.decode(o));q.appendChild(r)}p=p.substring(s+10);s=p.indexOf("");o=p.substring(0,s);p=p.substring(s+11);q.appendChild(g.create("span",{"class":"mceItemHiddenSpellWord"},o))}if(p.length){r=j.createTextNode(g.decode(p));q.appendChild(r)}}else{q.innerHTML=p.replace(f,'$1$2')}g.replace(q,t)}});i.setRng(d)},_showMenu:function(h,j){var i=this,h=i.editor,d=i._menu,l,k=h.dom,g=k.getViewPort(h.getWin()),f=j.target;j=0;if(!d){d=h.controlManager.createDropMenu("spellcheckermenu",{"class":"mceNoIcons"});i._menu=d}if(k.hasClass(f,"mceItemHiddenSpellWord")){d.removeAll();d.add({title:"spellchecker.wait","class":"mceMenuItemTitle"}).setDisabled(1);i._sendRPC("getSuggestions",[i.selectedLang,k.decode(f.innerHTML)],function(m){var e;d.removeAll();if(m.length>0){d.add({title:"spellchecker.sug","class":"mceMenuItemTitle"}).setDisabled(1);c(m,function(n){d.add({title:n,onclick:function(){k.replace(h.getDoc().createTextNode(n),f);i._checkDone()}})});d.addSeparator()}else{d.add({title:"spellchecker.no_sug","class":"mceMenuItemTitle"}).setDisabled(1)}if(h.getParam("show_ignore_words",true)){e=i.editor.getParam("spellchecker_enable_ignore_rpc","");d.add({title:"spellchecker.ignore_word",onclick:function(){var n=f.innerHTML;k.remove(f,1);i._checkDone();if(e){h.setProgressState(1);i._sendRPC("ignoreWord",[i.selectedLang,n],function(o){h.setProgressState(0)})}}});d.add({title:"spellchecker.ignore_words",onclick:function(){var n=f.innerHTML;i._removeWords(k.decode(n));i._checkDone();if(e){h.setProgressState(1);i._sendRPC("ignoreWords",[i.selectedLang,n],function(o){h.setProgressState(0)})}}})}if(i.editor.getParam("spellchecker_enable_learn_rpc")){d.add({title:"spellchecker.learn_word",onclick:function(){var n=f.innerHTML;k.remove(f,1);i._checkDone();h.setProgressState(1);i._sendRPC("learnWord",[i.selectedLang,n],function(o){h.setProgressState(0)})}})}d.update()});l=b.getPos(h.getContentAreaContainer());d.settings.offset_x=l.x;d.settings.offset_y=l.y;h.selection.select(f);l=k.getPos(f);d.showMenu(l.x,l.y+f.offsetHeight-g.y);return tinymce.dom.Event.cancel(j)}else{d.hideMenu()}},_checkDone:function(){var e=this,d=e.editor,g=d.dom,f;c(g.select("span"),function(h){if(h&&g.hasClass(h,"mceItemHiddenSpellWord")){f=true;return false}});if(!f){e._done()}},_done:function(){var d=this,e=d.active;if(d.active){d.active=0;d._removeWords();if(d._menu){d._menu.hideMenu()}if(e){d.editor.nodeChanged()}}},_sendRPC:function(e,g,d){var f=this;a.sendRPC({url:f.rpcUrl,method:e,params:g,success:d,error:function(i,h){f.editor.setProgressState(0);f.editor.windowManager.alert(i.errstr||("Error response: "+h.responseText))}})}});tinymce.PluginManager.add("spellchecker",tinymce.plugins.SpellcheckerPlugin)})(); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/spellchecker/editor_plugin_src.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/spellchecker/editor_plugin_src.js deleted file mode 100644 index 5751b0e52c..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/spellchecker/editor_plugin_src.js +++ /dev/null @@ -1,471 +0,0 @@ -/** - * editor_plugin_src.js - * - * Copyright 2009, Moxiecode Systems AB - * Released under LGPL License. - * - * License: http://tinymce.moxiecode.com/license - * Contributing: http://tinymce.moxiecode.com/contributing - */ - -(function() { - var JSONRequest = tinymce.util.JSONRequest, each = tinymce.each, DOM = tinymce.DOM; - - tinymce.create('tinymce.plugins.SpellcheckerPlugin', { - getInfo : function() { - return { - longname : 'Spellchecker', - author : 'Moxiecode Systems AB', - authorurl : 'http://tinymce.moxiecode.com', - infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/spellchecker', - version : tinymce.majorVersion + "." + tinymce.minorVersion - }; - }, - - init : function(ed, url) { - var t = this, cm; - - t.url = url; - t.editor = ed; - t.rpcUrl = ed.getParam("spellchecker_rpc_url", "{backend}"); - - if (t.rpcUrl == '{backend}') { - // Sniff if the browser supports native spellchecking (Don't know of a better way) - if (tinymce.isIE) - return; - - t.hasSupport = true; - - // Disable the context menu when spellchecking is active - ed.onContextMenu.addToTop(function(ed, e) { - if (t.active) - return false; - }); - } - - // Register commands - ed.addCommand('mceSpellCheck', function() { - if (t.rpcUrl == '{backend}') { - // Enable/disable native spellchecker - t.editor.getBody().spellcheck = t.active = !t.active; - return; - } - - if (!t.active) { - ed.setProgressState(1); - t._sendRPC('checkWords', [t.selectedLang, t._getWords()], function(r) { - if (r.length > 0) { - t.active = 1; - t._markWords(r); - ed.setProgressState(0); - ed.nodeChanged(); - } else { - ed.setProgressState(0); - - if (ed.getParam('spellchecker_report_no_misspellings', true)) - ed.windowManager.alert('spellchecker.no_mpell'); - } - }); - } else - t._done(); - }); - - if (ed.settings.content_css !== false) - ed.contentCSS.push(url + '/css/content.css'); - - ed.onClick.add(t._showMenu, t); - ed.onContextMenu.add(t._showMenu, t); - ed.onBeforeGetContent.add(function() { - if (t.active) - t._removeWords(); - }); - - ed.onNodeChange.add(function(ed, cm) { - cm.setActive('spellchecker', t.active); - }); - - ed.onSetContent.add(function() { - t._done(); - }); - - ed.onBeforeGetContent.add(function() { - t._done(); - }); - - ed.onBeforeExecCommand.add(function(ed, cmd) { - if (cmd == 'mceFullScreen') - t._done(); - }); - - // Find selected language - t.languages = {}; - each(ed.getParam('spellchecker_languages', '+English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr,German=de,Italian=it,Polish=pl,Portuguese=pt,Spanish=es,Swedish=sv', 'hash'), function(v, k) { - if (k.indexOf('+') === 0) { - k = k.substring(1); - t.selectedLang = v; - } - - t.languages[k] = v; - }); - }, - - createControl : function(n, cm) { - var t = this, c, ed = t.editor; - - if (n == 'spellchecker') { - // Use basic button if we use the native spellchecker - if (t.rpcUrl == '{backend}') { - // Create simple toggle button if we have native support - if (t.hasSupport) - c = cm.createButton(n, {title : 'spellchecker.desc', cmd : 'mceSpellCheck', scope : t}); - - return c; - } - - c = cm.createSplitButton(n, {title : 'spellchecker.desc', cmd : 'mceSpellCheck', scope : t}); - - c.onRenderMenu.add(function(c, m) { - m.add({title : 'spellchecker.langs', 'class' : 'mceMenuItemTitle'}).setDisabled(1); - t.menuItems = {}; - each(t.languages, function(v, k) { - var o = {icon : 1}, mi; - - o.onclick = function() { - if (v == t.selectedLang) { - return; - } - t._updateMenu(mi); - t.selectedLang = v; - }; - - o.title = k; - mi = m.add(o); - mi.setSelected(v == t.selectedLang); - t.menuItems[v] = mi; - if (v == t.selectedLang) - t.selectedItem = mi; - }); - }); - - - - return c; - } - }, - - setLanguage: function(lang) { - var t = this; - - if (lang == t.selectedLang) { - // allowed - return; - } - - if (tinymce.grep(t.languages, function(v) { return v === lang; }).length === 0) { - throw "Unknown language: " + lang; - } - - t.selectedLang = lang; - - // if the menu has been shown, update it as well - if (t.menuItems) { - t._updateMenu(t.menuItems[lang]); - } - - if (t.active) { - // clear error in the old language. - t._done(); - - // Don't immediately block the UI to check spelling in the new language, this is an API not a user action. - } - }, - - // Internal functions - - _updateMenu: function(mi) { - mi.setSelected(1); - this.selectedItem.setSelected(0); - this.selectedItem = mi; - }, - - _walk : function(n, f) { - var d = this.editor.getDoc(), w; - - if (d.createTreeWalker) { - w = d.createTreeWalker(n, NodeFilter.SHOW_TEXT, null, false); - - while ((n = w.nextNode()) != null) - f.call(this, n); - } else - tinymce.walk(n, f, 'childNodes'); - }, - - _getSeparators : function() { - var re = '', i, str = this.editor.getParam('spellchecker_word_separator_chars', '\\s!"#$%&()*+,-./:;<=>?@[\]^_{|}\u201d\u201c'); - - // Build word separator regexp - for (i=0; i elements content is broken after spellchecking. - // Bug #1408: Preceding whitespace characters are removed - // @TODO: I'm not sure that both are still issues on IE9. - if (tinymce.isIE) { - // Enclose mispelled words with temporal tag - v = v.replace(rx, '$1$2'); - // Loop over the content finding mispelled words - while ((pos = v.indexOf('')) != -1) { - // Add text node for the content before the word - txt = v.substring(0, pos); - if (txt.length) { - node = doc.createTextNode(dom.decode(txt)); - elem.appendChild(node); - } - v = v.substring(pos+10); - pos = v.indexOf(''); - txt = v.substring(0, pos); - v = v.substring(pos+11); - // Add span element for the word - elem.appendChild(dom.create('span', {'class' : 'mceItemHiddenSpellWord'}, txt)); - } - // Add text node for the rest of the content - if (v.length) { - node = doc.createTextNode(dom.decode(v)); - elem.appendChild(node); - } - } else { - // Other browsers preserve whitespace characters on innerHTML usage - elem.innerHTML = v.replace(rx, '$1$2'); - } - - // Finally, replace the node with the container - dom.replace(elem, n); - } - }); - - se.setRng(r); - }, - - _showMenu : function(ed, e) { - var t = this, ed = t.editor, m = t._menu, p1, dom = ed.dom, vp = dom.getViewPort(ed.getWin()), wordSpan = e.target; - - e = 0; // Fixes IE memory leak - - if (!m) { - m = ed.controlManager.createDropMenu('spellcheckermenu', {'class' : 'mceNoIcons'}); - t._menu = m; - } - - if (dom.hasClass(wordSpan, 'mceItemHiddenSpellWord')) { - m.removeAll(); - m.add({title : 'spellchecker.wait', 'class' : 'mceMenuItemTitle'}).setDisabled(1); - - t._sendRPC('getSuggestions', [t.selectedLang, dom.decode(wordSpan.innerHTML)], function(r) { - var ignoreRpc; - - m.removeAll(); - - if (r.length > 0) { - m.add({title : 'spellchecker.sug', 'class' : 'mceMenuItemTitle'}).setDisabled(1); - each(r, function(v) { - m.add({title : v, onclick : function() { - dom.replace(ed.getDoc().createTextNode(v), wordSpan); - t._checkDone(); - }}); - }); - - m.addSeparator(); - } else - m.add({title : 'spellchecker.no_sug', 'class' : 'mceMenuItemTitle'}).setDisabled(1); - - if (ed.getParam('show_ignore_words', true)) { - ignoreRpc = t.editor.getParam("spellchecker_enable_ignore_rpc", ''); - m.add({ - title : 'spellchecker.ignore_word', - onclick : function() { - var word = wordSpan.innerHTML; - - dom.remove(wordSpan, 1); - t._checkDone(); - - // tell the server if we need to - if (ignoreRpc) { - ed.setProgressState(1); - t._sendRPC('ignoreWord', [t.selectedLang, word], function(r) { - ed.setProgressState(0); - }); - } - } - }); - - m.add({ - title : 'spellchecker.ignore_words', - onclick : function() { - var word = wordSpan.innerHTML; - - t._removeWords(dom.decode(word)); - t._checkDone(); - - // tell the server if we need to - if (ignoreRpc) { - ed.setProgressState(1); - t._sendRPC('ignoreWords', [t.selectedLang, word], function(r) { - ed.setProgressState(0); - }); - } - } - }); - } - - if (t.editor.getParam("spellchecker_enable_learn_rpc")) { - m.add({ - title : 'spellchecker.learn_word', - onclick : function() { - var word = wordSpan.innerHTML; - - dom.remove(wordSpan, 1); - t._checkDone(); - - ed.setProgressState(1); - t._sendRPC('learnWord', [t.selectedLang, word], function(r) { - ed.setProgressState(0); - }); - } - }); - } - - m.update(); - }); - - p1 = DOM.getPos(ed.getContentAreaContainer()); - m.settings.offset_x = p1.x; - m.settings.offset_y = p1.y; - - ed.selection.select(wordSpan); - p1 = dom.getPos(wordSpan); - m.showMenu(p1.x, p1.y + wordSpan.offsetHeight - vp.y); - - return tinymce.dom.Event.cancel(e); - } else - m.hideMenu(); - }, - - _checkDone : function() { - var t = this, ed = t.editor, dom = ed.dom, o; - - each(dom.select('span'), function(n) { - if (n && dom.hasClass(n, 'mceItemHiddenSpellWord')) { - o = true; - return false; - } - }); - - if (!o) - t._done(); - }, - - _done : function() { - var t = this, la = t.active; - - if (t.active) { - t.active = 0; - t._removeWords(); - - if (t._menu) - t._menu.hideMenu(); - - if (la) - t.editor.nodeChanged(); - } - }, - - _sendRPC : function(m, p, cb) { - var t = this; - - JSONRequest.sendRPC({ - url : t.rpcUrl, - method : m, - params : p, - success : cb, - error : function(e, x) { - t.editor.setProgressState(0); - t.editor.windowManager.alert(e.errstr || ('Error response: ' + x.responseText)); - } - }); - } - }); - - // Register plugin - tinymce.PluginManager.add('spellchecker', tinymce.plugins.SpellcheckerPlugin); -})(); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/spellchecker/img/wline.gif b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/spellchecker/img/wline.gif deleted file mode 100644 index 7d0a4dbca0..0000000000 Binary files a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/spellchecker/img/wline.gif and /dev/null differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/style/css/props.css b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/style/css/props.css deleted file mode 100644 index 3b8f0ee777..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/style/css/props.css +++ /dev/null @@ -1,14 +0,0 @@ -#text_font {width:250px;} -#text_size {width:70px;} -.mceAddSelectValue {background:#DDD;} -select, #block_text_indent, #box_width, #box_height, #box_padding_top, #box_padding_right, #box_padding_bottom, #box_padding_left {width:70px;} -#box_margin_top, #box_margin_right, #box_margin_bottom, #box_margin_left, #positioning_width, #positioning_height, #positioning_zindex {width:70px;} -#positioning_placement_top, #positioning_placement_right, #positioning_placement_bottom, #positioning_placement_left {width:70px;} -#positioning_clip_top, #positioning_clip_right, #positioning_clip_bottom, #positioning_clip_left {width:70px;} -.panel_toggle_insert_span {padding-top:10px;} -.panel_wrapper div.current {padding-top:10px;height:230px;} -.delim {border-left:1px solid gray;} -.tdelim {border-bottom:1px solid gray;} -#block_display {width:145px;} -#list_type {width:115px;} -.disabled {background:#EEE;} diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/style/editor_plugin.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/style/editor_plugin.js deleted file mode 100644 index dda9f928b9..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/style/editor_plugin.js +++ /dev/null @@ -1 +0,0 @@ -(function(){tinymce.create("tinymce.plugins.StylePlugin",{init:function(a,b){a.addCommand("mceStyleProps",function(){var c=false;var f=a.selection.getSelectedBlocks();var d=[];if(f.length===1){d.push(a.selection.getNode().style.cssText)}else{tinymce.each(f,function(g){d.push(a.dom.getAttrib(g,"style"))});c=true}a.windowManager.open({file:b+"/props.htm",width:480+parseInt(a.getLang("style.delta_width",0)),height:340+parseInt(a.getLang("style.delta_height",0)),inline:1},{applyStyleToBlocks:c,plugin_url:b,styles:d})});a.addCommand("mceSetElementStyle",function(d,c){if(e=a.selection.getNode()){a.dom.setAttrib(e,"style",c);a.execCommand("mceRepaint")}});a.onNodeChange.add(function(d,c,f){c.setDisabled("styleprops",f.nodeName==="BODY")});a.addButton("styleprops",{title:"style.desc",cmd:"mceStyleProps"})},getInfo:function(){return{longname:"Style",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/style",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("style",tinymce.plugins.StylePlugin)})(); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/style/editor_plugin_src.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/style/editor_plugin_src.js deleted file mode 100644 index eaa7c7713a..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/style/editor_plugin_src.js +++ /dev/null @@ -1,71 +0,0 @@ -/** - * editor_plugin_src.js - * - * Copyright 2009, Moxiecode Systems AB - * Released under LGPL License. - * - * License: http://tinymce.moxiecode.com/license - * Contributing: http://tinymce.moxiecode.com/contributing - */ - -(function() { - tinymce.create('tinymce.plugins.StylePlugin', { - init : function(ed, url) { - // Register commands - ed.addCommand('mceStyleProps', function() { - - var applyStyleToBlocks = false; - var blocks = ed.selection.getSelectedBlocks(); - var styles = []; - - if (blocks.length === 1) { - styles.push(ed.selection.getNode().style.cssText); - } - else { - tinymce.each(blocks, function(block) { - styles.push(ed.dom.getAttrib(block, 'style')); - }); - applyStyleToBlocks = true; - } - - ed.windowManager.open({ - file : url + '/props.htm', - width : 480 + parseInt(ed.getLang('style.delta_width', 0)), - height : 340 + parseInt(ed.getLang('style.delta_height', 0)), - inline : 1 - }, { - applyStyleToBlocks : applyStyleToBlocks, - plugin_url : url, - styles : styles - }); - }); - - ed.addCommand('mceSetElementStyle', function(ui, v) { - if (e = ed.selection.getNode()) { - ed.dom.setAttrib(e, 'style', v); - ed.execCommand('mceRepaint'); - } - }); - - ed.onNodeChange.add(function(ed, cm, n) { - cm.setDisabled('styleprops', n.nodeName === 'BODY'); - }); - - // Register buttons - ed.addButton('styleprops', {title : 'style.desc', cmd : 'mceStyleProps'}); - }, - - getInfo : function() { - return { - longname : 'Style', - author : 'Moxiecode Systems AB', - authorurl : 'http://tinymce.moxiecode.com', - infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/style', - version : tinymce.majorVersion + "." + tinymce.minorVersion - }; - } - }); - - // Register plugin - tinymce.PluginManager.add('style', tinymce.plugins.StylePlugin); -})(); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/style/js/props.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/style/js/props.js deleted file mode 100644 index 0a8a8ec3ef..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/style/js/props.js +++ /dev/null @@ -1,709 +0,0 @@ -tinyMCEPopup.requireLangPack(); - -var defaultFonts = "" + - "Arial, Helvetica, sans-serif=Arial, Helvetica, sans-serif;" + - "Times New Roman, Times, serif=Times New Roman, Times, serif;" + - "Courier New, Courier, mono=Courier New, Courier, mono;" + - "Times New Roman, Times, serif=Times New Roman, Times, serif;" + - "Georgia, Times New Roman, Times, serif=Georgia, Times New Roman, Times, serif;" + - "Verdana, Arial, Helvetica, sans-serif=Verdana, Arial, Helvetica, sans-serif;" + - "Geneva, Arial, Helvetica, sans-serif=Geneva, Arial, Helvetica, sans-serif"; - -var defaultSizes = "9;10;12;14;16;18;24;xx-small;x-small;small;medium;large;x-large;xx-large;smaller;larger"; -var defaultMeasurement = "+pixels=px;points=pt;inches=in;centimetres=cm;millimetres=mm;picas=pc;ems=em;exs=ex;%"; -var defaultSpacingMeasurement = "pixels=px;points=pt;inches=in;centimetres=cm;millimetres=mm;picas=pc;+ems=em;exs=ex;%"; -var defaultIndentMeasurement = "pixels=px;+points=pt;inches=in;centimetres=cm;millimetres=mm;picas=pc;ems=em;exs=ex;%"; -var defaultWeight = "normal;bold;bolder;lighter;100;200;300;400;500;600;700;800;900"; -var defaultTextStyle = "normal;italic;oblique"; -var defaultVariant = "normal;small-caps"; -var defaultLineHeight = "normal"; -var defaultAttachment = "fixed;scroll"; -var defaultRepeat = "no-repeat;repeat;repeat-x;repeat-y"; -var defaultPosH = "left;center;right"; -var defaultPosV = "top;center;bottom"; -var defaultVAlign = "baseline;sub;super;top;text-top;middle;bottom;text-bottom"; -var defaultDisplay = "inline;block;list-item;run-in;compact;marker;table;inline-table;table-row-group;table-header-group;table-footer-group;table-row;table-column-group;table-column;table-cell;table-caption;none"; -var defaultBorderStyle = "none;solid;dashed;dotted;double;groove;ridge;inset;outset"; -var defaultBorderWidth = "thin;medium;thick"; -var defaultListType = "disc;circle;square;decimal;lower-roman;upper-roman;lower-alpha;upper-alpha;none"; - -function aggregateStyles(allStyles) { - var mergedStyles = {}; - - tinymce.each(allStyles, function(style) { - if (style !== '') { - var parsedStyles = tinyMCEPopup.editor.dom.parseStyle(style); - for (var name in parsedStyles) { - if (parsedStyles.hasOwnProperty(name)) { - if (mergedStyles[name] === undefined) { - mergedStyles[name] = parsedStyles[name]; - } - else if (name === 'text-decoration') { - if (mergedStyles[name].indexOf(parsedStyles[name]) === -1) { - mergedStyles[name] = mergedStyles[name] +' '+ parsedStyles[name]; - } - } - } - } - } - }); - - return mergedStyles; -} - -var applyActionIsInsert; -var existingStyles; - -function init(ed) { - var ce = document.getElementById('container'), h; - - existingStyles = aggregateStyles(tinyMCEPopup.getWindowArg('styles')); - ce.style.cssText = tinyMCEPopup.editor.dom.serializeStyle(existingStyles); - - applyActionIsInsert = ed.getParam("edit_css_style_insert_span", false); - document.getElementById('toggle_insert_span').checked = applyActionIsInsert; - - h = getBrowserHTML('background_image_browser','background_image','image','advimage'); - document.getElementById("background_image_browser").innerHTML = h; - - document.getElementById('text_color_pickcontainer').innerHTML = getColorPickerHTML('text_color_pick','text_color'); - document.getElementById('background_color_pickcontainer').innerHTML = getColorPickerHTML('background_color_pick','background_color'); - document.getElementById('border_color_top_pickcontainer').innerHTML = getColorPickerHTML('border_color_top_pick','border_color_top'); - document.getElementById('border_color_right_pickcontainer').innerHTML = getColorPickerHTML('border_color_right_pick','border_color_right'); - document.getElementById('border_color_bottom_pickcontainer').innerHTML = getColorPickerHTML('border_color_bottom_pick','border_color_bottom'); - document.getElementById('border_color_left_pickcontainer').innerHTML = getColorPickerHTML('border_color_left_pick','border_color_left'); - - fillSelect(0, 'text_font', 'style_font', defaultFonts, ';', true); - fillSelect(0, 'text_size', 'style_font_size', defaultSizes, ';', true); - fillSelect(0, 'text_size_measurement', 'style_font_size_measurement', defaultMeasurement, ';', true); - fillSelect(0, 'text_case', 'style_text_case', "capitalize;uppercase;lowercase", ';', true); - fillSelect(0, 'text_weight', 'style_font_weight', defaultWeight, ';', true); - fillSelect(0, 'text_style', 'style_font_style', defaultTextStyle, ';', true); - fillSelect(0, 'text_variant', 'style_font_variant', defaultVariant, ';', true); - fillSelect(0, 'text_lineheight', 'style_font_line_height', defaultLineHeight, ';', true); - fillSelect(0, 'text_lineheight_measurement', 'style_font_line_height_measurement', defaultMeasurement, ';', true); - - fillSelect(0, 'background_attachment', 'style_background_attachment', defaultAttachment, ';', true); - fillSelect(0, 'background_repeat', 'style_background_repeat', defaultRepeat, ';', true); - - fillSelect(0, 'background_hpos_measurement', 'style_background_hpos_measurement', defaultMeasurement, ';', true); - fillSelect(0, 'background_vpos_measurement', 'style_background_vpos_measurement', defaultMeasurement, ';', true); - - fillSelect(0, 'background_hpos', 'style_background_hpos', defaultPosH, ';', true); - fillSelect(0, 'background_vpos', 'style_background_vpos', defaultPosV, ';', true); - - fillSelect(0, 'block_wordspacing', 'style_wordspacing', 'normal', ';', true); - fillSelect(0, 'block_wordspacing_measurement', 'style_wordspacing_measurement', defaultSpacingMeasurement, ';', true); - fillSelect(0, 'block_letterspacing', 'style_letterspacing', 'normal', ';', true); - fillSelect(0, 'block_letterspacing_measurement', 'style_letterspacing_measurement', defaultSpacingMeasurement, ';', true); - fillSelect(0, 'block_vertical_alignment', 'style_vertical_alignment', defaultVAlign, ';', true); - fillSelect(0, 'block_text_align', 'style_text_align', "left;right;center;justify", ';', true); - fillSelect(0, 'block_whitespace', 'style_whitespace', "normal;pre;nowrap", ';', true); - fillSelect(0, 'block_display', 'style_display', defaultDisplay, ';', true); - fillSelect(0, 'block_text_indent_measurement', 'style_text_indent_measurement', defaultIndentMeasurement, ';', true); - - fillSelect(0, 'box_width_measurement', 'style_box_width_measurement', defaultMeasurement, ';', true); - fillSelect(0, 'box_height_measurement', 'style_box_height_measurement', defaultMeasurement, ';', true); - fillSelect(0, 'box_float', 'style_float', 'left;right;none', ';', true); - fillSelect(0, 'box_clear', 'style_clear', 'left;right;both;none', ';', true); - fillSelect(0, 'box_padding_left_measurement', 'style_padding_left_measurement', defaultMeasurement, ';', true); - fillSelect(0, 'box_padding_top_measurement', 'style_padding_top_measurement', defaultMeasurement, ';', true); - fillSelect(0, 'box_padding_bottom_measurement', 'style_padding_bottom_measurement', defaultMeasurement, ';', true); - fillSelect(0, 'box_padding_right_measurement', 'style_padding_right_measurement', defaultMeasurement, ';', true); - fillSelect(0, 'box_margin_left_measurement', 'style_margin_left_measurement', defaultMeasurement, ';', true); - fillSelect(0, 'box_margin_top_measurement', 'style_margin_top_measurement', defaultMeasurement, ';', true); - fillSelect(0, 'box_margin_bottom_measurement', 'style_margin_bottom_measurement', defaultMeasurement, ';', true); - fillSelect(0, 'box_margin_right_measurement', 'style_margin_right_measurement', defaultMeasurement, ';', true); - - fillSelect(0, 'border_style_top', 'style_border_style_top', defaultBorderStyle, ';', true); - fillSelect(0, 'border_style_right', 'style_border_style_right', defaultBorderStyle, ';', true); - fillSelect(0, 'border_style_bottom', 'style_border_style_bottom', defaultBorderStyle, ';', true); - fillSelect(0, 'border_style_left', 'style_border_style_left', defaultBorderStyle, ';', true); - - fillSelect(0, 'border_width_top', 'style_border_width_top', defaultBorderWidth, ';', true); - fillSelect(0, 'border_width_right', 'style_border_width_right', defaultBorderWidth, ';', true); - fillSelect(0, 'border_width_bottom', 'style_border_width_bottom', defaultBorderWidth, ';', true); - fillSelect(0, 'border_width_left', 'style_border_width_left', defaultBorderWidth, ';', true); - - fillSelect(0, 'border_width_top_measurement', 'style_border_width_top_measurement', defaultMeasurement, ';', true); - fillSelect(0, 'border_width_right_measurement', 'style_border_width_right_measurement', defaultMeasurement, ';', true); - fillSelect(0, 'border_width_bottom_measurement', 'style_border_width_bottom_measurement', defaultMeasurement, ';', true); - fillSelect(0, 'border_width_left_measurement', 'style_border_width_left_measurement', defaultMeasurement, ';', true); - - fillSelect(0, 'list_type', 'style_list_type', defaultListType, ';', true); - fillSelect(0, 'list_position', 'style_list_position', "inside;outside", ';', true); - - fillSelect(0, 'positioning_type', 'style_positioning_type', "absolute;relative;static", ';', true); - fillSelect(0, 'positioning_visibility', 'style_positioning_visibility', "inherit;visible;hidden", ';', true); - - fillSelect(0, 'positioning_width_measurement', 'style_positioning_width_measurement', defaultMeasurement, ';', true); - fillSelect(0, 'positioning_height_measurement', 'style_positioning_height_measurement', defaultMeasurement, ';', true); - fillSelect(0, 'positioning_overflow', 'style_positioning_overflow', "visible;hidden;scroll;auto", ';', true); - - fillSelect(0, 'positioning_placement_top_measurement', 'style_positioning_placement_top_measurement', defaultMeasurement, ';', true); - fillSelect(0, 'positioning_placement_right_measurement', 'style_positioning_placement_right_measurement', defaultMeasurement, ';', true); - fillSelect(0, 'positioning_placement_bottom_measurement', 'style_positioning_placement_bottom_measurement', defaultMeasurement, ';', true); - fillSelect(0, 'positioning_placement_left_measurement', 'style_positioning_placement_left_measurement', defaultMeasurement, ';', true); - - fillSelect(0, 'positioning_clip_top_measurement', 'style_positioning_clip_top_measurement', defaultMeasurement, ';', true); - fillSelect(0, 'positioning_clip_right_measurement', 'style_positioning_clip_right_measurement', defaultMeasurement, ';', true); - fillSelect(0, 'positioning_clip_bottom_measurement', 'style_positioning_clip_bottom_measurement', defaultMeasurement, ';', true); - fillSelect(0, 'positioning_clip_left_measurement', 'style_positioning_clip_left_measurement', defaultMeasurement, ';', true); - - TinyMCE_EditableSelects.init(); - setupFormData(); - showDisabledControls(); -} - -function setupFormData() { - var ce = document.getElementById('container'), f = document.forms[0], s, b, i; - - // Setup text fields - - selectByValue(f, 'text_font', ce.style.fontFamily, true, true); - selectByValue(f, 'text_size', getNum(ce.style.fontSize), true, true); - selectByValue(f, 'text_size_measurement', getMeasurement(ce.style.fontSize)); - selectByValue(f, 'text_weight', ce.style.fontWeight, true, true); - selectByValue(f, 'text_style', ce.style.fontStyle, true, true); - selectByValue(f, 'text_lineheight', getNum(ce.style.lineHeight), true, true); - selectByValue(f, 'text_lineheight_measurement', getMeasurement(ce.style.lineHeight)); - selectByValue(f, 'text_case', ce.style.textTransform, true, true); - selectByValue(f, 'text_variant', ce.style.fontVariant, true, true); - f.text_color.value = tinyMCEPopup.editor.dom.toHex(ce.style.color); - updateColor('text_color_pick', 'text_color'); - f.text_underline.checked = inStr(ce.style.textDecoration, 'underline'); - f.text_overline.checked = inStr(ce.style.textDecoration, 'overline'); - f.text_linethrough.checked = inStr(ce.style.textDecoration, 'line-through'); - f.text_blink.checked = inStr(ce.style.textDecoration, 'blink'); - f.text_none.checked = inStr(ce.style.textDecoration, 'none'); - updateTextDecorations(); - - // Setup background fields - - f.background_color.value = tinyMCEPopup.editor.dom.toHex(ce.style.backgroundColor); - updateColor('background_color_pick', 'background_color'); - f.background_image.value = ce.style.backgroundImage.replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1"); - selectByValue(f, 'background_repeat', ce.style.backgroundRepeat, true, true); - selectByValue(f, 'background_attachment', ce.style.backgroundAttachment, true, true); - selectByValue(f, 'background_hpos', getNum(getVal(ce.style.backgroundPosition, 0)), true, true); - selectByValue(f, 'background_hpos_measurement', getMeasurement(getVal(ce.style.backgroundPosition, 0))); - selectByValue(f, 'background_vpos', getNum(getVal(ce.style.backgroundPosition, 1)), true, true); - selectByValue(f, 'background_vpos_measurement', getMeasurement(getVal(ce.style.backgroundPosition, 1))); - - // Setup block fields - - selectByValue(f, 'block_wordspacing', getNum(ce.style.wordSpacing), true, true); - selectByValue(f, 'block_wordspacing_measurement', getMeasurement(ce.style.wordSpacing)); - selectByValue(f, 'block_letterspacing', getNum(ce.style.letterSpacing), true, true); - selectByValue(f, 'block_letterspacing_measurement', getMeasurement(ce.style.letterSpacing)); - selectByValue(f, 'block_vertical_alignment', ce.style.verticalAlign, true, true); - selectByValue(f, 'block_text_align', ce.style.textAlign, true, true); - f.block_text_indent.value = getNum(ce.style.textIndent); - selectByValue(f, 'block_text_indent_measurement', getMeasurement(ce.style.textIndent)); - selectByValue(f, 'block_whitespace', ce.style.whiteSpace, true, true); - selectByValue(f, 'block_display', ce.style.display, true, true); - - // Setup box fields - - f.box_width.value = getNum(ce.style.width); - selectByValue(f, 'box_width_measurement', getMeasurement(ce.style.width)); - - f.box_height.value = getNum(ce.style.height); - selectByValue(f, 'box_height_measurement', getMeasurement(ce.style.height)); - selectByValue(f, 'box_float', ce.style.cssFloat || ce.style.styleFloat, true, true); - - selectByValue(f, 'box_clear', ce.style.clear, true, true); - - setupBox(f, ce, 'box_padding', 'padding', ''); - setupBox(f, ce, 'box_margin', 'margin', ''); - - // Setup border fields - - setupBox(f, ce, 'border_style', 'border', 'Style'); - setupBox(f, ce, 'border_width', 'border', 'Width'); - setupBox(f, ce, 'border_color', 'border', 'Color'); - - updateColor('border_color_top_pick', 'border_color_top'); - updateColor('border_color_right_pick', 'border_color_right'); - updateColor('border_color_bottom_pick', 'border_color_bottom'); - updateColor('border_color_left_pick', 'border_color_left'); - - f.elements.border_color_top.value = tinyMCEPopup.editor.dom.toHex(f.elements.border_color_top.value); - f.elements.border_color_right.value = tinyMCEPopup.editor.dom.toHex(f.elements.border_color_right.value); - f.elements.border_color_bottom.value = tinyMCEPopup.editor.dom.toHex(f.elements.border_color_bottom.value); - f.elements.border_color_left.value = tinyMCEPopup.editor.dom.toHex(f.elements.border_color_left.value); - - // Setup list fields - - selectByValue(f, 'list_type', ce.style.listStyleType, true, true); - selectByValue(f, 'list_position', ce.style.listStylePosition, true, true); - f.list_bullet_image.value = ce.style.listStyleImage.replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1"); - - // Setup box fields - - selectByValue(f, 'positioning_type', ce.style.position, true, true); - selectByValue(f, 'positioning_visibility', ce.style.visibility, true, true); - selectByValue(f, 'positioning_overflow', ce.style.overflow, true, true); - f.positioning_zindex.value = ce.style.zIndex ? ce.style.zIndex : ""; - - f.positioning_width.value = getNum(ce.style.width); - selectByValue(f, 'positioning_width_measurement', getMeasurement(ce.style.width)); - - f.positioning_height.value = getNum(ce.style.height); - selectByValue(f, 'positioning_height_measurement', getMeasurement(ce.style.height)); - - setupBox(f, ce, 'positioning_placement', '', '', ['top', 'right', 'bottom', 'left']); - - s = ce.style.clip.replace(new RegExp("rect\\('?([^']*)'?\\)", 'gi'), "$1"); - s = s.replace(/,/g, ' '); - - if (!hasEqualValues([getVal(s, 0), getVal(s, 1), getVal(s, 2), getVal(s, 3)])) { - f.positioning_clip_top.value = getNum(getVal(s, 0)); - selectByValue(f, 'positioning_clip_top_measurement', getMeasurement(getVal(s, 0))); - f.positioning_clip_right.value = getNum(getVal(s, 1)); - selectByValue(f, 'positioning_clip_right_measurement', getMeasurement(getVal(s, 1))); - f.positioning_clip_bottom.value = getNum(getVal(s, 2)); - selectByValue(f, 'positioning_clip_bottom_measurement', getMeasurement(getVal(s, 2))); - f.positioning_clip_left.value = getNum(getVal(s, 3)); - selectByValue(f, 'positioning_clip_left_measurement', getMeasurement(getVal(s, 3))); - } else { - f.positioning_clip_top.value = getNum(getVal(s, 0)); - selectByValue(f, 'positioning_clip_top_measurement', getMeasurement(getVal(s, 0))); - f.positioning_clip_right.value = f.positioning_clip_bottom.value = f.positioning_clip_left.value; - } - -// setupBox(f, ce, '', 'border', 'Color'); -} - -function getMeasurement(s) { - return s.replace(/^([0-9.]+)(.*)$/, "$2"); -} - -function getNum(s) { - if (new RegExp('^(?:[0-9.]+)(?:[a-z%]+)$', 'gi').test(s)) - return s.replace(/[^0-9.]/g, ''); - - return s; -} - -function inStr(s, n) { - return new RegExp(n, 'gi').test(s); -} - -function getVal(s, i) { - var a = s.split(' '); - - if (a.length > 1) - return a[i]; - - return ""; -} - -function setValue(f, n, v) { - if (f.elements[n].type == "text") - f.elements[n].value = v; - else - selectByValue(f, n, v, true, true); -} - -function setupBox(f, ce, fp, pr, sf, b) { - if (typeof(b) == "undefined") - b = ['Top', 'Right', 'Bottom', 'Left']; - - if (isSame(ce, pr, sf, b)) { - f.elements[fp + "_same"].checked = true; - - setValue(f, fp + "_top", getNum(ce.style[pr + b[0] + sf])); - f.elements[fp + "_top"].disabled = false; - - f.elements[fp + "_right"].value = ""; - f.elements[fp + "_right"].disabled = true; - f.elements[fp + "_bottom"].value = ""; - f.elements[fp + "_bottom"].disabled = true; - f.elements[fp + "_left"].value = ""; - f.elements[fp + "_left"].disabled = true; - - if (f.elements[fp + "_top_measurement"]) { - selectByValue(f, fp + '_top_measurement', getMeasurement(ce.style[pr + b[0] + sf])); - f.elements[fp + "_left_measurement"].disabled = true; - f.elements[fp + "_bottom_measurement"].disabled = true; - f.elements[fp + "_right_measurement"].disabled = true; - } - } else { - f.elements[fp + "_same"].checked = false; - - setValue(f, fp + "_top", getNum(ce.style[pr + b[0] + sf])); - f.elements[fp + "_top"].disabled = false; - - setValue(f, fp + "_right", getNum(ce.style[pr + b[1] + sf])); - f.elements[fp + "_right"].disabled = false; - - setValue(f, fp + "_bottom", getNum(ce.style[pr + b[2] + sf])); - f.elements[fp + "_bottom"].disabled = false; - - setValue(f, fp + "_left", getNum(ce.style[pr + b[3] + sf])); - f.elements[fp + "_left"].disabled = false; - - if (f.elements[fp + "_top_measurement"]) { - selectByValue(f, fp + '_top_measurement', getMeasurement(ce.style[pr + b[0] + sf])); - selectByValue(f, fp + '_right_measurement', getMeasurement(ce.style[pr + b[1] + sf])); - selectByValue(f, fp + '_bottom_measurement', getMeasurement(ce.style[pr + b[2] + sf])); - selectByValue(f, fp + '_left_measurement', getMeasurement(ce.style[pr + b[3] + sf])); - f.elements[fp + "_left_measurement"].disabled = false; - f.elements[fp + "_bottom_measurement"].disabled = false; - f.elements[fp + "_right_measurement"].disabled = false; - } - } -} - -function isSame(e, pr, sf, b) { - var a = [], i, x; - - if (typeof(b) == "undefined") - b = ['Top', 'Right', 'Bottom', 'Left']; - - if (typeof(sf) == "undefined" || sf == null) - sf = ""; - - a[0] = e.style[pr + b[0] + sf]; - a[1] = e.style[pr + b[1] + sf]; - a[2] = e.style[pr + b[2] + sf]; - a[3] = e.style[pr + b[3] + sf]; - - for (i=0; i 0 ? s.substring(1) : s; - - if (f.text_none.checked) - s = "none"; - - ce.style.textDecoration = s; - - // Build background styles - - ce.style.backgroundColor = f.background_color.value; - ce.style.backgroundImage = f.background_image.value != "" ? "url(" + f.background_image.value + ")" : ""; - ce.style.backgroundRepeat = f.background_repeat.value; - ce.style.backgroundAttachment = f.background_attachment.value; - - if (f.background_hpos.value != "") { - s = ""; - s += f.background_hpos.value + (isNum(f.background_hpos.value) ? f.background_hpos_measurement.value : "") + " "; - s += f.background_vpos.value + (isNum(f.background_vpos.value) ? f.background_vpos_measurement.value : ""); - ce.style.backgroundPosition = s; - } - - // Build block styles - - ce.style.wordSpacing = f.block_wordspacing.value + (isNum(f.block_wordspacing.value) ? f.block_wordspacing_measurement.value : ""); - ce.style.letterSpacing = f.block_letterspacing.value + (isNum(f.block_letterspacing.value) ? f.block_letterspacing_measurement.value : ""); - ce.style.verticalAlign = f.block_vertical_alignment.value; - ce.style.textAlign = f.block_text_align.value; - ce.style.textIndent = f.block_text_indent.value + (isNum(f.block_text_indent.value) ? f.block_text_indent_measurement.value : ""); - ce.style.whiteSpace = f.block_whitespace.value; - ce.style.display = f.block_display.value; - - // Build box styles - - ce.style.width = f.box_width.value + (isNum(f.box_width.value) ? f.box_width_measurement.value : ""); - ce.style.height = f.box_height.value + (isNum(f.box_height.value) ? f.box_height_measurement.value : ""); - ce.style.styleFloat = f.box_float.value; - ce.style.cssFloat = f.box_float.value; - - ce.style.clear = f.box_clear.value; - - if (!f.box_padding_same.checked) { - ce.style.paddingTop = f.box_padding_top.value + (isNum(f.box_padding_top.value) ? f.box_padding_top_measurement.value : ""); - ce.style.paddingRight = f.box_padding_right.value + (isNum(f.box_padding_right.value) ? f.box_padding_right_measurement.value : ""); - ce.style.paddingBottom = f.box_padding_bottom.value + (isNum(f.box_padding_bottom.value) ? f.box_padding_bottom_measurement.value : ""); - ce.style.paddingLeft = f.box_padding_left.value + (isNum(f.box_padding_left.value) ? f.box_padding_left_measurement.value : ""); - } else - ce.style.padding = f.box_padding_top.value + (isNum(f.box_padding_top.value) ? f.box_padding_top_measurement.value : ""); - - if (!f.box_margin_same.checked) { - ce.style.marginTop = f.box_margin_top.value + (isNum(f.box_margin_top.value) ? f.box_margin_top_measurement.value : ""); - ce.style.marginRight = f.box_margin_right.value + (isNum(f.box_margin_right.value) ? f.box_margin_right_measurement.value : ""); - ce.style.marginBottom = f.box_margin_bottom.value + (isNum(f.box_margin_bottom.value) ? f.box_margin_bottom_measurement.value : ""); - ce.style.marginLeft = f.box_margin_left.value + (isNum(f.box_margin_left.value) ? f.box_margin_left_measurement.value : ""); - } else - ce.style.margin = f.box_margin_top.value + (isNum(f.box_margin_top.value) ? f.box_margin_top_measurement.value : ""); - - // Build border styles - - if (!f.border_style_same.checked) { - ce.style.borderTopStyle = f.border_style_top.value; - ce.style.borderRightStyle = f.border_style_right.value; - ce.style.borderBottomStyle = f.border_style_bottom.value; - ce.style.borderLeftStyle = f.border_style_left.value; - } else - ce.style.borderStyle = f.border_style_top.value; - - if (!f.border_width_same.checked) { - ce.style.borderTopWidth = f.border_width_top.value + (isNum(f.border_width_top.value) ? f.border_width_top_measurement.value : ""); - ce.style.borderRightWidth = f.border_width_right.value + (isNum(f.border_width_right.value) ? f.border_width_right_measurement.value : ""); - ce.style.borderBottomWidth = f.border_width_bottom.value + (isNum(f.border_width_bottom.value) ? f.border_width_bottom_measurement.value : ""); - ce.style.borderLeftWidth = f.border_width_left.value + (isNum(f.border_width_left.value) ? f.border_width_left_measurement.value : ""); - } else - ce.style.borderWidth = f.border_width_top.value + (isNum(f.border_width_top.value) ? f.border_width_top_measurement.value : ""); - - if (!f.border_color_same.checked) { - ce.style.borderTopColor = f.border_color_top.value; - ce.style.borderRightColor = f.border_color_right.value; - ce.style.borderBottomColor = f.border_color_bottom.value; - ce.style.borderLeftColor = f.border_color_left.value; - } else - ce.style.borderColor = f.border_color_top.value; - - // Build list styles - - ce.style.listStyleType = f.list_type.value; - ce.style.listStylePosition = f.list_position.value; - ce.style.listStyleImage = f.list_bullet_image.value != "" ? "url(" + f.list_bullet_image.value + ")" : ""; - - // Build positioning styles - - ce.style.position = f.positioning_type.value; - ce.style.visibility = f.positioning_visibility.value; - - if (ce.style.width == "") - ce.style.width = f.positioning_width.value + (isNum(f.positioning_width.value) ? f.positioning_width_measurement.value : ""); - - if (ce.style.height == "") - ce.style.height = f.positioning_height.value + (isNum(f.positioning_height.value) ? f.positioning_height_measurement.value : ""); - - ce.style.zIndex = f.positioning_zindex.value; - ce.style.overflow = f.positioning_overflow.value; - - if (!f.positioning_placement_same.checked) { - ce.style.top = f.positioning_placement_top.value + (isNum(f.positioning_placement_top.value) ? f.positioning_placement_top_measurement.value : ""); - ce.style.right = f.positioning_placement_right.value + (isNum(f.positioning_placement_right.value) ? f.positioning_placement_right_measurement.value : ""); - ce.style.bottom = f.positioning_placement_bottom.value + (isNum(f.positioning_placement_bottom.value) ? f.positioning_placement_bottom_measurement.value : ""); - ce.style.left = f.positioning_placement_left.value + (isNum(f.positioning_placement_left.value) ? f.positioning_placement_left_measurement.value : ""); - } else { - s = f.positioning_placement_top.value + (isNum(f.positioning_placement_top.value) ? f.positioning_placement_top_measurement.value : ""); - ce.style.top = s; - ce.style.right = s; - ce.style.bottom = s; - ce.style.left = s; - } - - if (!f.positioning_clip_same.checked) { - s = "rect("; - s += (isNum(f.positioning_clip_top.value) ? f.positioning_clip_top.value + f.positioning_clip_top_measurement.value : "auto") + " "; - s += (isNum(f.positioning_clip_right.value) ? f.positioning_clip_right.value + f.positioning_clip_right_measurement.value : "auto") + " "; - s += (isNum(f.positioning_clip_bottom.value) ? f.positioning_clip_bottom.value + f.positioning_clip_bottom_measurement.value : "auto") + " "; - s += (isNum(f.positioning_clip_left.value) ? f.positioning_clip_left.value + f.positioning_clip_left_measurement.value : "auto"); - s += ")"; - - if (s != "rect(auto auto auto auto)") - ce.style.clip = s; - } else { - s = "rect("; - t = isNum(f.positioning_clip_top.value) ? f.positioning_clip_top.value + f.positioning_clip_top_measurement.value : "auto"; - s += t + " "; - s += t + " "; - s += t + " "; - s += t + ")"; - - if (s != "rect(auto auto auto auto)") - ce.style.clip = s; - } - - ce.style.cssText = ce.style.cssText; -} - -function isNum(s) { - return new RegExp('[0-9]+', 'g').test(s); -} - -function showDisabledControls() { - var f = document.forms, i, a; - - for (i=0; i 1) { - addSelectValue(f, s, p[0], p[1]); - - if (se) - selectByValue(f, s, p[1]); - } else { - addSelectValue(f, s, p[0], p[0]); - - if (se) - selectByValue(f, s, p[0]); - } - } -} - -function toggleSame(ce, pre) { - var el = document.forms[0].elements, i; - - if (ce.checked) { - el[pre + "_top"].disabled = false; - el[pre + "_right"].disabled = true; - el[pre + "_bottom"].disabled = true; - el[pre + "_left"].disabled = true; - - if (el[pre + "_top_measurement"]) { - el[pre + "_top_measurement"].disabled = false; - el[pre + "_right_measurement"].disabled = true; - el[pre + "_bottom_measurement"].disabled = true; - el[pre + "_left_measurement"].disabled = true; - } - } else { - el[pre + "_top"].disabled = false; - el[pre + "_right"].disabled = false; - el[pre + "_bottom"].disabled = false; - el[pre + "_left"].disabled = false; - - if (el[pre + "_top_measurement"]) { - el[pre + "_top_measurement"].disabled = false; - el[pre + "_right_measurement"].disabled = false; - el[pre + "_bottom_measurement"].disabled = false; - el[pre + "_left_measurement"].disabled = false; - } - } - - showDisabledControls(); -} - -function synch(fr, to) { - var f = document.forms[0]; - - f.elements[to].value = f.elements[fr].value; - - if (f.elements[fr + "_measurement"]) - selectByValue(f, to + "_measurement", f.elements[fr + "_measurement"].value); -} - -function updateTextDecorations(){ - var el = document.forms[0].elements; - - var textDecorations = ["text_underline", "text_overline", "text_linethrough", "text_blink"]; - var noneChecked = el["text_none"].checked; - tinymce.each(textDecorations, function(id) { - el[id].disabled = noneChecked; - if (noneChecked) { - el[id].checked = false; - } - }); -} - -tinyMCEPopup.onInit.add(init); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/style/langs/da_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/style/langs/da_dlg.js deleted file mode 100644 index 733249f1df..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/style/langs/da_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('da.style_dlg',{"text_lineheight":"Linieh\u00f8jde","text_variant":"Variant","text_style":"Stil","text_weight":"V\u00e6gt","text_size":"St\u00f8rrelse","text_font":"Skrifttype","text_props":"Tekst","positioning_tab":"Positionering","list_tab":"Liste","border_tab":"Kant","box_tab":"Boks","block_tab":"Blok","background_tab":"Baggrund","text_tab":"Tekst",apply:"Anvend",title:"Rediger CSS stil",clip:"Klip",placement:"Placering",overflow:"Overl\u00f8b",zindex:"Z-index",visibility:"Synlighed","positioning_type":"Type",position:"Position","bullet_image":"Punktopstillings-billede","list_type":"Type",color:"Farve",height:"H\u00f8jde",width:"Bredde",style:"Style",margin:"Margin",left:"Venstre",bottom:"Bund",right:"H\u00f8jre",top:"Top",same:"Ens for alle",padding:"Afstand til indhold","box_clear":"Ryd","box_float":"Flydende","box_height":"H\u00f8jde","box_width":"Bredde","block_display":"Vis","block_whitespace":"Mellemrum","block_text_indent":"Tekstindrykning","block_text_align":"Tekstjustering","block_vertical_alignment":"Vertikal justering","block_letterspacing":"Afstand mellem bogstaver","block_wordspacing":"Afstand mellem ord","background_vpos":"Vertikal position","background_hpos":"Horisontal position","background_attachment":"Vedh\u00e6ftede fil","background_repeat":"Gentag","background_image":"Baggrundsbillede","background_color":"Baggrundsfarve","text_none":"ingen","text_blink":"blink","text_case":"Vesaltilstand","text_striketrough":"gennemstreget","text_underline":"understreget","text_overline":"overstreget","text_decoration":"Dekoration","text_color":"Farve",text:"Tekst",background:"Baggrund",block:"Blok",box:"Boks",border:"Kant",list:"Liste"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/style/langs/de_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/style/langs/de_dlg.js deleted file mode 100644 index ad04664e18..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/style/langs/de_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('de.style_dlg',{"text_lineheight":"Zeilenh\u00f6he","text_variant":"Variante","text_style":"Stil","text_weight":"Dicke","text_size":"Gr\u00f6\u00dfe","text_font":"Schriftart","text_props":"Text","positioning_tab":"Positionierung","list_tab":"Liste","border_tab":"Rahmen","box_tab":"Box","block_tab":"Block","background_tab":"Hintergrund","text_tab":"Text",apply:"\u00dcbernehmen",title:"CSS-Styles bearbeiten",clip:"Ausschnitt",placement:"Platzierung",overflow:"Verhalten bei \u00dcbergr\u00f6\u00dfe",zindex:"Z-Wert",visibility:"Sichtbar","positioning_type":"Art der Positionierung",position:"Positionierung","bullet_image":"Listenpunkt-Grafik","list_type":"Listenpunkt-Art",color:"Textfarbe",height:"H\u00f6he",width:"Breite",style:"Format",margin:"\u00c4u\u00dferer Abstand",left:"Links",bottom:"Unten",right:"Rechts",top:"Oben",same:"Alle gleich",padding:"Innerer Abstand","box_clear":"Umflie\u00dfung verhindern","box_float":"Umflie\u00dfung","box_height":"H\u00f6he","box_width":"Breite","block_display":"Umbruchverhalten","block_whitespace":"Automatischer Umbruch","block_text_indent":"Einr\u00fcckung","block_text_align":"Ausrichtung","block_vertical_alignment":"Vertikale Ausrichtung","block_letterspacing":"Buchstabenabstand","block_wordspacing":"Wortabstand","background_vpos":"Position Y","background_hpos":"Position X","background_attachment":"Wasserzeicheneffekt","background_repeat":"Wiederholung","background_image":"Hintergrundbild","background_color":"Hintergrundfarbe","text_none":"keine","text_blink":"blinkend","text_case":"Schreibung","text_striketrough":"durchgestrichen","text_underline":"unterstrichen","text_overline":"\u00fcberstrichen","text_decoration":"Gestaltung","text_color":"Farbe",text:"Text",background:"Hintergrund",block:"Block",box:"Box",border:"Rahmen",list:"Liste"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/style/langs/en_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/style/langs/en_dlg.js deleted file mode 100644 index 82bf2cb3fd..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/style/langs/en_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('en.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"}); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/style/langs/en_us_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/style/langs/en_us_dlg.js deleted file mode 100644 index 1cdcd2f333..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/style/langs/en_us_dlg.js +++ /dev/null @@ -1 +0,0 @@ -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"}); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/style/langs/fi_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/style/langs/fi_dlg.js deleted file mode 100644 index 4f174cc71d..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/style/langs/fi_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('fi.style_dlg',{"text_lineheight":"Rivin korkeus","text_variant":"Variantti","text_style":"Tyyli","text_weight":"Paino","text_size":"Koko","text_font":"Kirjasin","text_props":"Teksti","positioning_tab":"Sijainti","list_tab":"Lista","border_tab":"Kehys","box_tab":"Laatikko","block_tab":"Palkki","background_tab":"Tausta","text_tab":"Teksti",apply:"K\u00e4yt\u00e4",title:"Muokkaa CSS-tyyli\u00e4",clip:"Leike",placement:"Sijoittelu",overflow:"Ylivuoto",zindex:"Z-indeksi",visibility:"N\u00e4kyvyys","positioning_type":"Tyyppi",position:"Sijainti","bullet_image":"Listauskuva","list_type":"Tyyppi",color:"V\u00e4ri",height:"Korkeus",width:"Leveys",style:"Tyyli",margin:"Marginaali",left:"Vasemmalla",bottom:"Alhaalla",right:"Oikealla",top:"Ylh\u00e4\u00e4ll\u00e4",same:"Sama kaikille",padding:"Tyhj\u00e4 tila","box_clear":"Nollaus","box_float":"Kellunta","box_height":"Korkeus","box_width":"Leveys","block_display":"N\u00e4ytt\u00f6","block_whitespace":"Tyhj\u00e4 tila","block_text_indent":"Tekstin sisennys","block_text_align":"Tekstin asettelu","block_vertical_alignment":"Pystyasettelu","block_letterspacing":"Kirjainten v\u00e4listys","block_wordspacing":"Sanojen v\u00e4listys","background_vpos":"Pystyasettelu","background_hpos":"Vaaka-asettelu","background_attachment":"Liite","background_repeat":"Toistuvuus","background_image":"Taustakuva","background_color":"Taustav\u00e4ri","text_none":"ei mit\u00e4\u00e4n","text_blink":"V\u00e4l\u00e4hdys","text_case":"Isot/pienet kirjaimet","text_striketrough":"Yliviivattu","text_underline":"Alleviivattu (Ctrl+U)","text_overline":"Yliviivattu","text_decoration":"Koristelu","text_color":"V\u00e4ri",text:"Teksti",background:"Tausta",block:"Lohko",box:"Laatikko",border:"Reunus",list:"Lista"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/style/langs/fr_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/style/langs/fr_dlg.js deleted file mode 100644 index 3f7bdb92d0..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/style/langs/fr_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('fr.style_dlg',{"text_lineheight":"Hauteur de ligne","text_variant":"Variante","text_style":"Style","text_weight":"Gras","text_size":"Taille","text_font":"Police","text_props":"Texte","positioning_tab":"Positionnement","list_tab":"Liste","border_tab":"Bordure","box_tab":"Bo\u00eete","block_tab":"Bloc","background_tab":"Fond","text_tab":"Texte",apply:"Appliquer",title:"\u00c9diter la feuille de style",clip:"Clip",placement:"Placement",overflow:"D\u00e9bordement",zindex:"Z-index",visibility:"Visibilit\u00e9","positioning_type":"Type",position:"Position","bullet_image":"Image de puce","list_type":"Type",color:"Couleur",height:"Hauteur",width:"Largeur",style:"Style",margin:"Marge",left:"Gauche",bottom:"Bas",right:"Droit",top:"Haut",same:"Identique pour tous",padding:"Espacement","box_clear":"Vider","box_float":"Flottant","box_height":"Hauteur","box_width":"Largeur","block_display":"Affichage","block_whitespace":"Fin de ligne","block_text_indent":"Indentation du texte","block_text_align":"Alignement du texte","block_vertical_alignment":"Alignement vertical","block_letterspacing":"Espacement des lettres","block_wordspacing":"Espacement des mots ","background_vpos":"Position verticale","background_hpos":"Position horizontale","background_attachment":"Attachement","background_repeat":"R\u00e9p\u00e9ter","background_image":"Image de fond","background_color":"Couleur de fond","text_none":"aucun","text_blink":"clignotant","text_case":"Casse","text_striketrough":"barr\u00e9","text_underline":"soulign\u00e9","text_overline":"ligne au-dessus","text_decoration":"D\u00e9coration","text_color":"Couleur",text:"Texte",background:"Fond",block:"Bloc",box:"Bo\u00eete",border:"Bordure",list:"Liste"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/style/langs/he_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/style/langs/he_dlg.js deleted file mode 100644 index 22680ba671..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/style/langs/he_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('he.style_dlg',{"text_lineheight":"\u05d2\u05d5\u05d1\u05d4 \u05e9\u05d5\u05e8\u05d4","text_variant":"\u05de\u05e9\u05ea\u05e0\u05d4","text_style":"\u05e1\u05d2\u05e0\u05d5\u05df","text_weight":"\u05e2\u05d5\u05d1\u05d9","text_size":"\u05d2\u05d5\u05d3\u05dc","text_font":"\u05e4\u05d5\u05e0\u05d8","text_props":"\u05d8\u05e7\u05e1\u05d8","positioning_tab":"\u05de\u05d9\u05e7\u05d5\u05dd","list_tab":"\u05e8\u05e9\u05d9\u05de\u05d4","border_tab":"\u05d2\u05d1\u05d5\u05dc","box_tab":"\u05e7\u05d5\u05e4\u05e1\u05d0","block_tab":"\u05d7\u05e1\u05d5\u05dd","background_tab":"\u05e8\u05e7\u05e2","text_tab":"\u05d8\u05e7\u05e1\u05d8",apply:"\u05d4\u05d7\u05dc",title:"\u05e2\u05d3\u05db\u05d5\u05df \u05d4\u05d2\u05d3\u05e8\u05d5\u05ea CSS",clip:"\u05e7\u05dc\u05d9\u05e4",placement:"\u05de\u05d9\u05e7\u05d5\u05dd",overflow:"\u05d2\u05dc\u05d9\u05e9\u05d4",zindex:"Z-index",visibility:"\u05e8\u05d0\u05d5\u05ea","positioning_type":"\u05e1\u05d5\u05d2",position:"\u05de\u05d9\u05e7\u05d5\u05dd","bullet_image":"\u05ea\u05de\u05d5\u05e0\u05ea \u05ea\u05d1\u05dc\u05d9\u05d8","list_type":"\u05e1\u05d5\u05d2",color:"\u05e6\u05d1\u05e2",height:"\u05d2\u05d5\u05d1\u05d4",width:"\u05e8\u05d5\u05d7\u05d1",style:"\u05e1\u05d2\u05e0\u05d5\u05df",margin:"\u05e9\u05d5\u05dc\u05d9\u05d9\u05dd",left:"\u05e9\u05de\u05d0\u05dc",bottom:"\u05ea\u05d7\u05ea\u05d9\u05ea",right:"\u05d9\u05de\u05d9\u05df",top:"\u05e2\u05dc\u05d9\u05d5\u05df",same:"\u05d0\u05d5\u05ea\u05d5 \u05d3\u05d1\u05e8 \u05e2\u05d1\u05d5\u05e8 \u05db\u05d5\u05dc\u05dd",padding:"\u05e8\u05d9\u05e4\u05d5\u05d3","box_clear":"\u05e0\u05e7\u05d4","box_float":"\u05d4\u05e6\u05e4\u05d4","box_height":"\u05d2\u05d5\u05d1\u05d4","box_width":"\u05e8\u05d5\u05d7\u05d1","block_display":"\u05d4\u05e6\u05d2","block_whitespace":"\u05e8\u05d5\u05d5\u05d7","block_text_indent":"\u05d4\u05d6\u05d7\u05d4","block_text_align":"\u05d9\u05d9\u05e9\u05d5\u05e8 \u05d8\u05e7\u05e1\u05d8","block_vertical_alignment":"\u05d9\u05d9\u05e9\u05d5\u05e8 \u05d0\u05e0\u05db\u05d9","block_letterspacing":"\u05de\u05e8\u05d7\u05e7 \u05d1\u05d9\u05df \u05d0\u05d5\u05ea\u05d9\u05d5\u05ea","block_wordspacing":"\u05de\u05e8\u05d7\u05e7 \u05d1\u05d9\u05df \u05de\u05d9\u05dc\u05d9\u05dd","background_vpos":"\u05de\u05d9\u05e7\u05d5\u05dd \u05e8\u05d5\u05d7\u05d1\u05d9","background_hpos":"\u05de\u05d9\u05e7\u05d5\u05dd \u05d0\u05d5\u05e4\u05e7\u05d9","background_attachment":"\u05e7\u05d1\u05e6\u05d9\u05dd \u05de\u05e6\u05d5\u05e8\u05e4\u05d9\u05dd","background_repeat":"\u05d7\u05d6\u05d5\u05e8","background_image":"\u05ea\u05de\u05d5\u05e0\u05ea \u05e8\u05e7\u05e2","background_color":"\u05e6\u05d1\u05e2 \u05e8\u05e7\u05e2","text_none":"\u05dc\u05dc\u05d0","text_blink":"\u05d4\u05d1\u05d4\u05d5\u05d1","text_case":"Case","text_striketrough":"\u05e7\u05d5 \u05d7\u05d5\u05e6\u05d4","text_underline":"\u05e9\u05d5\u05e8\u05d4 \u05de\u05ea\u05d7\u05ea","text_overline":"\u05e9\u05d5\u05e8\u05d4 \u05de\u05e2\u05dc","text_decoration":"\u05e2\u05d9\u05e6\u05d5\u05d1","text_color":"\u05e6\u05d1\u05e2",text:"\u05d8\u05e7\u05e1\u05d8",background:"\u05e8\u05e7\u05e2",block:"\u05d1\u05dc\u05d5\u05e7",box:"\u05ea\u05d9\u05d1\u05d4",border:"\u05d2\u05d1\u05d5\u05dc",list:"\u05e8\u05e9\u05d9\u05de\u05d4"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/style/langs/it_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/style/langs/it_dlg.js deleted file mode 100644 index 401b727704..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/style/langs/it_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('it.style_dlg',{"text_lineheight":"Altezza linea","text_variant":"Variante","text_style":"Stile","text_weight":"Spessore","text_size":"Dimensione","text_font":"Carattere","text_props":"Testo","positioning_tab":"Posizionamento","list_tab":"Liste","border_tab":"Bordi","box_tab":"Contenitore","block_tab":"Blocco","background_tab":"Sfondo","text_tab":"Testo",apply:"Applica",title:"Modifica stile CSS",clip:"Clip",placement:"Piazzamento",overflow:"Overflow",zindex:"Z-index",visibility:"Visibilit\u00e0","positioning_type":"Tipo",position:"Posizione","bullet_image":"Immagine Punto","list_type":"Tipo",color:"Colore",height:"Altezza",width:"Larghezza",style:"Stile",margin:"Margine",left:"Sinistro",bottom:"Inferiore",right:"Destro",top:"Superiore",same:"Uguale per tutti",padding:"Spazio dal bordo","box_clear":"Pulito","box_float":"Fluttuante","box_height":"Altezza","box_width":"Larghezza","block_display":"Visualizzazione","block_whitespace":"Whitespace","block_text_indent":"Indentazione testo","block_text_align":"Allineamento testo","block_vertical_alignment":"Allineamento verticale","block_letterspacing":"Spaziatura caratteri","block_wordspacing":"Spaziatura parole","background_vpos":"Posizione verticale","background_hpos":"Posizione orizzontale","background_attachment":"Allegato","background_repeat":"Repetizione","background_image":"Immagine sfondo","background_color":"Colore sfondo","text_none":"nessuna","text_blink":"lampeggiante","text_case":"Tipo","text_striketrough":"barrato","text_underline":"sottolineato","text_overline":"sopralineato","text_decoration":"Decorazione","text_color":"Colore",text:"Testo",background:"Sfondo",block:"Blocco",box:"Box",border:"Bordo",list:"Lista"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/style/langs/ja_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/style/langs/ja_dlg.js deleted file mode 100644 index 4d5953cf43..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/style/langs/ja_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('ja.style_dlg',{"text_lineheight":"\u884c\u306e\u9ad8\u3055","text_variant":"\u5909\u5f62","text_style":"\u30b9\u30bf\u30a4\u30eb","text_weight":"\u592a\u3055","text_size":"\u5927\u304d\u3055","text_font":"\u30d5\u30a9\u30f3\u30c8","text_props":"\u30c6\u30ad\u30b9\u30c8","positioning_tab":"\u4f4d\u7f6e","list_tab":"\u7b87\u6761\u66f8\u304d","border_tab":"\u67a0\u7dda","box_tab":"\u30dc\u30c3\u30af\u30b9","block_tab":"\u30d6\u30ed\u30c3\u30af","background_tab":"\u80cc\u666f","text_tab":"\u6587\u5b57",apply:"\u9069\u7528",title:"CSS\u306e\u30b9\u30bf\u30a4\u30eb\u3092\u7de8\u96c6",clip:"\u5207\u308a\u629c\u304d",placement:"\u914d\u7f6e",overflow:"\u30aa\u30fc\u30d0\u30fc\u30d5\u30ed\u30fc",zindex:"Z-index",visibility:"\u53ef\u8996\u6027","positioning_type":"\u914d\u7f6e\u65b9\u6cd5",position:"\u8868\u793a\u4f4d\u7f6e","bullet_image":"\u884c\u982d\u6587\u5b57","list_type":"\u7b87\u6761\u66f8\u304d\u306e\u7a2e\u985e",color:"\u8272",height:"\u9ad8\u3055",width:"\u5e45",style:"\u30b9\u30bf\u30a4\u30eb",margin:"\u30de\u30fc\u30b8\u30f3",left:"\u5de6",bottom:"\u4e0b",right:"\u53f3",top:"\u4e0a",same:"\u3059\u3079\u3066\u540c\u3058",padding:"\u30d1\u30c7\u30a3\u30f3\u30b0","box_clear":"\u56de\u308a\u8fbc\u307f\u89e3\u9664","box_float":"\u56de\u308a\u8fbc\u307f","box_height":"\u9ad8\u3055","box_width":"\u5e45","block_display":"\u30c7\u30a3\u30b9\u30d7\u30ec\u30a4","block_whitespace":"\u7a7a\u767d\u6587\u5b57","block_text_indent":"\u30c6\u30ad\u30b9\u30c8\u306e\u5b57\u4e0b\u3052","block_text_align":"\u30c6\u30ad\u30b9\u30c8\u306e\u6c34\u5e73\u914d\u7f6e","block_vertical_alignment":"\u5782\u76f4\u914d\u7f6e","block_letterspacing":"\u6587\u5b57\u9593\u9694","block_wordspacing":"\u5358\u8a9e\u9593\u9694","background_vpos":"\u5782\u76f4\u4f4d\u7f6e","background_hpos":"\u6c34\u5e73\u4f4d\u7f6e","background_attachment":"\u6dfb\u4ed8","background_repeat":"\u7e70\u308a\u8fd4\u3057","background_image":"\u80cc\u666f\u753b\u50cf","background_color":"\u80cc\u666f\u8272","text_none":"\u306a\u3057","text_blink":"\u70b9\u6ec5","text_case":"\u5927\u6587\u5b57/\u5c0f\u6587\u5b57","text_striketrough":"\u6253\u6d88\u3057\u7dda","text_underline":"\u4e0b\u7dda","text_overline":"\u4e0a\u7dda","text_decoration":"\u88c5\u98fe","text_color":"\u8272",text:"\u6587\u5b57",background:"\u80cc\u666f",block:"\u30d6\u30ed\u30c3\u30af",box:"\u30dc\u30c3\u30af\u30b9",border:"\u67a0\u7dda",list:"\u7b87\u6761\u66f8\u304d"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/style/langs/nl_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/style/langs/nl_dlg.js deleted file mode 100644 index ad81f8f858..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/style/langs/nl_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('nl.style_dlg',{"text_lineheight":"Lijnhoogte","text_variant":"Variant","text_style":"Stijl","text_weight":"Gewicht","text_size":"Tekengrootte","text_font":"Lettertype","text_props":"Tekst","positioning_tab":"Positionering","list_tab":"Lijst","border_tab":"Rand","box_tab":"Box","block_tab":"Blok","background_tab":"Achtergrond","text_tab":"Tekst",apply:"Toepassen",title:"CSS Stijl bewerken",clip:"Clip",placement:"Plaatsing",overflow:"Overvloeien",zindex:"Z-index",visibility:"Zichtbaarheid","positioning_type":"Type",position:"Positie","bullet_image":"Opsommingsteken","list_type":"Type",color:"Kleur",height:"Hoogte",width:"Breedte",style:"Stijl",margin:"Marge",left:"Links",bottom:"Onder",right:"Rechts",top:"Boven",same:"Alles hetzelfde",padding:"Opening","box_clear":"Vrijhouden","box_float":"Zweven","box_height":"Hoogte","box_width":"Breedte","block_display":"Weergave","block_whitespace":"Witruimte","block_text_indent":"Inspringen","block_text_align":"Tekstuitlijning","block_vertical_alignment":"Verticale uitlijning","block_letterspacing":"Letterruimte","block_wordspacing":"Woordruimte","background_vpos":"Verticale positie","background_hpos":"Horizontale positie","background_attachment":"Bijlage","background_repeat":"Herhalen","background_image":"Achtergrondafbeelding","background_color":"Achtergrondkleur","text_none":"Niets","text_blink":"Knipperen","text_case":"Hoofdlettergebruik","text_striketrough":"Doorhalen","text_underline":"Onderstrepen","text_overline":"Overhalen","text_decoration":"Decoratie","text_color":"Kleur",text:"Tekst",background:"Achtergrond",block:"Blok",box:"Box",border:"Rand",list:"Lijst"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/style/langs/no_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/style/langs/no_dlg.js deleted file mode 100644 index ad86eb476c..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/style/langs/no_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('no.style_dlg',{"text_lineheight":"Linjeh\u00f8yde","text_variant":"Variant","text_style":"Skriftstil","text_weight":"Skriftvekt","text_size":"Skriftst\u00f8rrelse","text_font":"Skrifttype","text_props":"Tekst","positioning_tab":"Posisjon","list_tab":"Liste","border_tab":"Ramme","box_tab":"Boks","block_tab":"Blokk","background_tab":"Bakgrunn","text_tab":"Tekst",apply:"Bruk",title:"Rediger CSS-stil",clip:"Klipp",placement:"Plassering",overflow:"Overfylt",zindex:"Z-indeks",visibility:"Synlighet","positioning_type":"Type",position:"Posisjon","bullet_image":"Punktbilde","list_type":"Type",color:"Farge",height:"H\u00f8yde",width:"Bredde",style:"Stil",margin:"Marg",left:"Venstre",bottom:"Bunn",right:"H\u00f8yre",top:"Topp",same:"Likt for alle",padding:"Utfylling","box_clear":"Slette","box_float":"Flytende","box_height":"H\u00f8yde","box_width":"Bredde","block_display":"Visning","block_whitespace":"Mellomrom","block_text_indent":"Innrykk","block_text_align":"Justering","block_vertical_alignment":"Vertikal justering","block_letterspacing":"Bokstavavstand","block_wordspacing":"Mellomrom","background_vpos":"Vertikal posisjon","background_hpos":"Horisontal posisjon","background_attachment":"Vedlegg","background_repeat":"Repetere","background_image":"Bakgrunnsbilde","background_color":"Bakgrunnsfarge","text_none":"Ingen","text_blink":"Blinke","text_case":"Store/sm\u00e5 bokstaver","text_striketrough":"Gjennomstreke","text_underline":"Senke skrift","text_overline":"Heve skrift","text_decoration":"Dekorasjon","text_color":"Farge",text:"Tekst",background:"Bakgrunn",block:"Blokk",box:"Boks",border:"Ramme",list:"Liste"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/style/langs/pl_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/style/langs/pl_dlg.js deleted file mode 100644 index 1dd01ce035..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/style/langs/pl_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('pl.style_dlg',{"text_lineheight":"Wysoko\u015b\u0107 linii","text_variant":"Wariant","text_style":"Styl","text_weight":"Waga","text_size":"Rozmiar","text_font":"Wz\u00f3r czcionki","text_props":"Tekst","positioning_tab":"Pozycjonowanie","list_tab":"Lista","border_tab":"Obramowanie","box_tab":"Pud\u0142o (box)","block_tab":"Blok","background_tab":"T\u0142o","text_tab":"Text",apply:"Zastosuj",title:"Edytuj style CSS",clip:"Klip",placement:"Umieszczenie",overflow:"Przepe\u0142niony",zindex:"Z-index",visibility:"Widoczno\u015b\u0107","positioning_type":"Typ",position:"Pozycja","bullet_image":"Obrazek listy","list_type":"Typ",color:"Kolor",height:"Wysoko\u015b\u0107",width:"Szeroko\u015b\u0107",style:"Styl",margin:"Margines",left:"Lewy",bottom:"D\u00f3\u0142",right:"Prawy",top:"G\u00f3ra",same:"To samo dla wszystkich",padding:"Odst\u0119py","box_clear":"Op\u0142ywanie (Clear)","box_float":"Op\u0142ywanie (Float)","box_height":"Wysoko\u015b\u0107","box_width":"Szeroko\u015b\u0107","block_display":"Spos\u00f3b wy\u015bwietlania","block_whitespace":"Bia\u0142e znaki","block_text_indent":"Przesuni\u0119cie tekstu","block_text_align":"Wyr\u00f3wnanie tekstu","block_vertical_alignment":"Pionowe wyr\u00f3wnanie","block_letterspacing":"Odst\u0119p mi\u0119dzy literami","block_wordspacing":"Odst\u0119p mi\u0119dzy wyrazami","background_vpos":"Pozycja pionowa","background_hpos":"Pozycja pozioma","background_attachment":"Za\u0142\u0105cznik","background_repeat":"Powt\u00f3rz","background_image":"Obrazek t\u0142a","background_color":"Kolor t\u0142a","text_none":"\u017caden","text_blink":"miganie","text_case":"Znaki","text_striketrough":"przekre\u015blenie","text_underline":"podkre\u015blenie","text_overline":"nadkre\u015blenie","text_decoration":"Dekoracja","text_color":"Kolor",text:"Tekst",background:"T\u0142o",block:"Blok",box:"Pud\u0142o (box)",border:"Obramowanie",list:"Lista"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/style/langs/pt_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/style/langs/pt_dlg.js deleted file mode 100644 index 21c6b5e162..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/style/langs/pt_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('pt.style_dlg',{"text_lineheight":"Altura da linha","text_variant":"Variante","text_style":"Estilo","text_weight":"Peso","text_size":"Tamanho","text_font":"Fonte","text_props":"Texto","positioning_tab":"Posicionamento","list_tab":"Lista","border_tab":"Limites","box_tab":"Caixa","block_tab":"Bloco","background_tab":"Fundo","text_tab":"Texto",apply:"Aplicar",title:"Editar CSS",clip:"Clip",placement:"Posicionamento",overflow:"Overflow",zindex:"Z-index",visibility:"Visibilidade","positioning_type":"Tipo",position:"Posi\u00e7\u00e3o","bullet_image":"Imagem de lista","list_type":"Tipo",color:"Cor",height:"Altura",width:"Largura",style:"Estilo",margin:"Margem",left:"Esquerda",bottom:"Abaixo",right:"Direita",top:"Topo",same:"O mesmo para todos",padding:"Padding","box_clear":"Clear","box_float":"Float","box_height":"Altura","box_width":"Largura","block_display":"Display","block_whitespace":"Espa\u00e7o","block_text_indent":"Indent","block_text_align":"Alinhamento de texto","block_vertical_alignment":"Alinhamento vertical","block_letterspacing":"Espa\u00e7amento de letras","block_wordspacing":"Espa\u00e7amento de palavras","background_vpos":"Posi\u00e7\u00e3o vertical","background_hpos":"Posi\u00e7\u00e3o horizontal","background_attachment":"Fixar","background_repeat":"Repetir","background_image":"Imagem de fundo","background_color":"Cor de fundo","text_none":"nenhum","text_blink":"Piscar","text_case":"Mai\u00fascula","text_striketrough":"Riscado","text_underline":"Sublinhado","text_overline":"Sobrelinha","text_decoration":"Decora\u00e7\u00e3o","text_color":"Cor",text:"Texto",background:"Fundo",block:"Bloco",box:"Caixa",border:"Borda",list:"Lista"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/style/langs/ru_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/style/langs/ru_dlg.js deleted file mode 100644 index 43ebd1f28d..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/style/langs/ru_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('ru.style_dlg',{"text_lineheight":"\u0412\u044b\u0441\u043e\u0442\u0430 \u0441\u0442\u0440\u043e\u043a\u0438","text_variant":"\u0412\u0430\u0440\u0438\u0430\u043d\u0442","text_style":"\u0421\u0442\u0438\u043b\u044c","text_weight":"\u0422\u043e\u043b\u0449\u0438\u043d\u0430","text_size":"\u0420\u0430\u0437\u043c\u0435\u0440","text_font":"\u0428\u0440\u0438\u0444\u0442","text_props":"\u0422\u0435\u043a\u0441\u0442","positioning_tab":"\u041f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435","list_tab":"\u0421\u043f\u0438\u0441\u043e\u043a","border_tab":"\u0413\u0440\u0430\u043d\u0438\u0446\u0430","box_tab":"\u041a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440","block_tab":"\u0411\u043b\u043e\u043a","background_tab":"\u0424\u043e\u043d","text_tab":"\u0422\u0435\u043a\u0441\u0442",apply:"\u041f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c",title:"\u0420\u0435\u0434\u0430\u043a\u0442\u043e\u0440 CSS \u0441\u0442\u0438\u043b\u044f",clip:"\u041e\u0442\u0441\u0435\u0447\u0435\u043d\u0438\u0435",placement:"\u0420\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u0435",overflow:"\u041f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435",zindex:"Z-\u0438\u043d\u0434\u0435\u043a\u0441",visibility:"\u0412\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u044c","positioning_type":"\u0422\u0438\u043f",position:"\u041f\u043e\u0437\u0438\u0446\u0438\u044f","bullet_image":"\u041c\u0430\u0440\u043a\u0435\u0440","list_type":"\u0422\u0438\u043f",color:"\u0426\u0432\u0435\u0442",height:"\u0412\u044b\u0441\u043e\u0442\u0430",width:"\u0428\u0438\u0440\u0438\u043d\u0430",style:"\u0421\u0442\u0438\u043b\u044c",margin:"\u041e\u0442\u0441\u0442\u0443\u043f",left:"\u0421\u043b\u0435\u0432\u0430",bottom:"\u0421\u043d\u0438\u0437\u0443",right:"\u0421\u043f\u0440\u0430\u0432\u0430",top:"\u0412\u0432\u0435\u0440\u0445",same:"\u041e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e \u0434\u043b\u044f \u0432\u0441\u0435\u0445",padding:"\u041f\u043e\u043b\u044f","box_clear":"\u042f\u0432\u043d\u044b\u0439","box_float":"\u041f\u043b\u0430\u0432\u0430\u044e\u0449\u0438\u0439","box_height":"\u0412\u044b\u0441\u043e\u0442\u0430","box_width":"\u0428\u0438\u0440\u0438\u043d\u0430","block_display":"\u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435","block_whitespace":"\u041f\u0440\u043e\u0431\u0435\u043b","block_text_indent":"\u041e\u0442\u0441\u0442\u0443\u043f \u0442\u0435\u043a\u0441\u0442\u0430","block_text_align":"\u0412\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u0435 \u0442\u0435\u043a\u0441\u0442\u0430","block_vertical_alignment":"\u0412\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0435 \u0432\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u0435","block_letterspacing":"\u041e\u0442\u0441\u0442\u0443\u043f\u044b \u043c\u0435\u0436\u0434\u0443 \u0431\u0443\u043a\u0432\u0430\u043c\u0438","block_wordspacing":"\u041e\u0442\u0441\u0442\u0443\u043f\u044b \u043c\u0435\u0436\u0434\u0443 \u0441\u043b\u043e\u0432\u0430\u043c\u0438","background_vpos":"\u0412\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u0430\u044f \u043f\u043e\u0437\u0438\u0446\u0438\u044f","background_hpos":"\u0413\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u0430\u044f \u043f\u043e\u0437\u0438\u0446\u0438\u044f","background_attachment":"\u041f\u0440\u0438\u0432\u044f\u0437\u043a\u0430","background_repeat":"\u041f\u043e\u0432\u0442\u043e\u0440","background_image":"\u0424\u043e\u043d\u043e\u0432\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435","background_color":"\u0426\u0432\u0435\u0442 \u0444\u043e\u043d\u0430","text_none":"\u0411\u0435\u0437 \u0432\u0441\u0435\u0433\u043e","text_blink":"\u041c\u0435\u0440\u0446\u0430\u044e\u0449\u0438\u0439","text_case":"\u0420\u0435\u0433\u0438\u0441\u0442\u0440","text_striketrough":"\u0417\u0430\u0447\u0435\u0440\u043a\u043d\u0443\u0442\u044b\u0439","text_underline":"\u041f\u043e\u0434\u0447\u0435\u0440\u043a\u043d\u0443\u0442\u044b\u0439","text_overline":"\u0421 \u0432\u0435\u0440\u0445\u043d\u0435\u0439 \u0447\u0435\u0440\u0442\u043e\u0439","text_decoration":"\u041e\u0444\u043e\u0440\u043c\u043b\u0435\u043d\u0438\u0435","text_color":"\u0426\u0432\u0435\u0442",text:"\u0422\u0435\u043a\u0441\u0442",background:"\u0424\u043e\u043d",block:"\u0411\u043b\u043e\u043a",box:"\u041a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440",border:"\u0413\u0440\u0430\u043d\u0438\u0446\u0430",list:"\u0421\u043f\u0438\u0441\u043e\u043a"}); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/style/langs/sv_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/style/langs/sv_dlg.js deleted file mode 100644 index 4a529541e7..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/style/langs/sv_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('sv.style_dlg',{"text_lineheight":"Radh\u00f6jd","text_variant":"Variant","text_style":"Stil","text_weight":"Tjocklek","text_size":"Storlek","text_font":"Typsnitt","text_props":"Text","positioning_tab":"Positionering","list_tab":"Listor","border_tab":"Ramar","box_tab":"Box","block_tab":"Block","background_tab":"Bakgrund","text_tab":"Text",apply:"Applicera",title:"Redigera inline CSS",clip:"Besk\u00e4rning",placement:"Placering",overflow:"\u00d6\u0096verfl\u00f6de",zindex:"Z-index",visibility:"Synlighet","positioning_type":"Positionstyp",position:"Position","bullet_image":"Punktbild","list_type":"Listtyp",color:"F\u00e4rg",height:"H\u00f6jd",width:"Bredd",style:"Stil",margin:"Marginal",left:"V\u00e4nster",bottom:"Botten",right:"H\u00f6ger",top:"Toppen",same:"Samma f\u00f6r alla",padding:"Padding","box_clear":"Rensa","box_float":"Flyt","box_height":"H\u00f6jd","box_width":"Bredd","block_display":"Display","block_whitespace":"Whitespace","block_text_indent":"Textindrag","block_text_align":"Textjustering","block_vertical_alignment":"Vertikal justering","block_letterspacing":"Teckenmellanrum","block_wordspacing":"Ordavbrytning","background_vpos":"Vertikal position","background_hpos":"Horisontell position","background_attachment":"F\u00e4stpunkt","background_repeat":"Upprepning","background_image":"Bakgrundsbild","background_color":"Bakgrundsf\u00e4rg","text_none":"Inget","text_blink":"Blinka","text_case":"Sm\u00e5/stora","text_striketrough":"Genomstruken","text_underline":"Understruken","text_overline":"\u00d6verstruken","text_decoration":"Dekoration","text_color":"F\u00e4rg",text:"Text",background:"Bakgrund",block:"Block",box:"Box",border:"Ram",list:"Lista"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/style/langs/zh_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/style/langs/zh_dlg.js deleted file mode 100644 index c5fc08b1ff..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/style/langs/zh_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('zh-cn.style_dlg',{"text_lineheight":"\u884c\u9ad8","text_variant":"\u53d8\u5f62","text_style":"\u6837\u5f0f","text_weight":"\u7c97\u7ec6","text_size":"\u5927\u5c0f","text_font":"\u5b57\u4f53","text_props":"\u6587\u672c","positioning_tab":"\u4f4d\u7f6e","list_tab":"\u5217\u8868","border_tab":"\u8fb9\u6846","box_tab":"Box","block_tab":"\u533a\u5757","background_tab":"\u80cc\u666f","text_tab":"\u6587\u672c",apply:"\u5e94\u7528",title:"\u7f16\u8f91CSS\u6837\u5f0f",clip:"\u526a\u8f91",placement:"\u653e\u7f6e",overflow:"\u6ea2\u51fa",zindex:"Z-Index",visibility:"\u53ef\u89c1","positioning_type":"\u7c7b\u578b",position:"\u4f4d\u7f6e","bullet_image":"\u56fe\u7247\u9879\u76ee\u7b26\u53f7","list_type":"\u7c7b\u578b",color:"\u989c\u8272",height:"\u9ad8\u5ea6",width:"\u5bbd\u5ea6",style:"\u6837\u5f0f",margin:"\u5916\u8fb9\u8ddd",left:"\u5de6",bottom:"\u4e0b",right:"\u53f3",top:"\u4e0a",same:"\u5168\u90e8\u76f8\u540c",padding:"\u5185\u8fb9\u8ddd","box_clear":"\u6e05\u9664\u6d6e\u52a8","box_float":"\u6d6e\u52a8","box_height":"\u9ad8\u5ea6","box_width":"\u5bbd\u5ea6","block_display":"\u663e\u793a","block_whitespace":"\u7a7a\u683c","block_text_indent":"\u6587\u5b57\u7f29\u6392","block_text_align":"\u6587\u5b57\u5bf9\u9f50","block_vertical_alignment":"\u5782\u76f4\u5bf9\u9f50","block_letterspacing":"\u5b57\u95f4\u8ddd","block_wordspacing":"\u8bcd\u95f4\u8ddd","background_vpos":"\u5782\u76f4\u4f4d\u7f6e","background_hpos":"\u6c34\u5e73\u4f4d\u7f6e","background_attachment":"\u9644\u4ef6","background_repeat":"\u91cd\u590d","background_image":"\u80cc\u666f\u56fe\u7247","background_color":"\u80cc\u666f\u989c\u8272","text_none":"\u65e0","text_blink":"\u95ea\u70c1","text_case":"\u5b57\u4f53\u5f62\u5f0f","text_striketrough":"\u5220\u9664\u7ebf","text_underline":"\u4e0b\u5212\u7ebf","text_overline":"\u4e0a\u5212\u7ebf","text_decoration":"\u5b57\u4f53\u88c5\u9970","text_color":"\u989c\u8272",text:"Text",background:"Background",block:"Block",box:"Box",border:"Border",list:"List"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/style/props.htm b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/style/props.htm deleted file mode 100644 index 33d424cb9a..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/style/props.htm +++ /dev/null @@ -1,845 +0,0 @@ - - - - {#style_dlg.title} - - - - - - - - - - -
    - - -
    -
    -
    - {#style_dlg.text} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    - - - - - - -
      - - -
    -
    - -
    - - - -
    - - - - - - -
    - -   - - -
    -
    - -
    - - - - - -
     
    -
    {#style_dlg.text_decoration} - - - - - - - - - - - - - - - - - - - - - -
    -
    -
    -
    - -
    -
    - {#style_dlg.background} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - - - - -
     
    -
    - - - - -
     
    -
    - - - - - - -
      - - -
    -
    - - - - - - -
      - - -
    -
    -
    -
    - -
    -
    - {#style_dlg.block} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - - - - - -
      - - -
    -
    - - - - - - -
      - - -
    -
    - - - - - - -
      - - - -
    -
    -
    -
    - -
    -
    - {#style_dlg.box} - - - - - - - - - - - - - - -
    - - - - - - -
      - - -
    -
       
    - - - - - - -
      - - -
    -
       
    -
    - -
    -
    - {#style_dlg.padding} - - - - - - - - - - - - - - - - - - - - - - -
     
    - - - - - - -
      - - -
    -
    - - - - - - -
      - - -
    -
    - - - - - - -
      - - -
    -
    - - - - - - -
      - - -
    -
    -
    -
    - -
    -
    - {#style_dlg.margin} - - - - - - - - - - - - - - - - - - - - - - -
     
    - - - - - - -
      - - -
    -
    - - - - - - -
      - - -
    -
    - - - - - - -
      - - -
    -
    - - - - - - -
      - - -
    -
    -
    -
    -
    -
    - -
    -
    - {#style_dlg.border} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      {#style_dlg.style} {#style_dlg.width} {#style_dlg.color}
          
    {#style_dlg.top}   - - - - - - -
      - - -
    -
      - - - - - -
     
    -
    {#style_dlg.right}   - - - - - - -
      - - -
    -
      - - - - - -
     
    -
    {#style_dlg.bottom}   - - - - - - -
      - - -
    -
      - - - - - -
     
    -
    {#style_dlg.left}   - - - - - - -
      - - -
    -
      - - - - - -
     
    -
    -
    -
    - -
    -
    - {#style_dlg.list} - - - - - - - - - - - - - - - -
    -
    -
    - -
    -
    - {#style_dlg.position} - - - - - - - - - - - - - - - - - - - - - -
       
    - - - - - - -
      - - -
    -
       
    - - - - - - -
      - - -
    -
       
    -
    - -
    -
    - {#style_dlg.placement} - - - - - - - - - - - - - - - - - - - - - - -
     
    {#style_dlg.top} - - - - - - -
      - - -
    -
    {#style_dlg.right} - - - - - - -
      - - -
    -
    {#style_dlg.bottom} - - - - - - -
      - - -
    -
    {#style_dlg.left} - - - - - - -
      - - -
    -
    -
    -
    - -
    -
    - {#style_dlg.clip} - - - - - - - - - - - - - - - - - - - - - - -
     
    {#style_dlg.top} - - - - - - -
      - - -
    -
    {#style_dlg.right} - - - - - - -
      - - -
    -
    {#style_dlg.bottom} - - - - - - -
      - - -
    -
    {#style_dlg.left} - - - - - - -
      - - -
    -
    -
    -
    -
    -
    -
    - -
    - - -
    - -
    - - - -
    -
    - -
    -
    -
    - - - diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/style/readme.txt b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/style/readme.txt deleted file mode 100644 index e8f84d7fb7..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/style/readme.txt +++ /dev/null @@ -1,19 +0,0 @@ -Edit CSS Style plug-in notes -~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Unlike WYSIWYG editor functionality that operates only on the selected text, -typically by inserting new HTML elements with the specified styles. -This plug-in operates on the HTML blocks surrounding the selected text. -No new HTML elements are created. - -This plug-in only operates on the surrounding blocks and not the nearest -parent node. This means that if a block encapsulates a node, -e.g

    text

    , then only the styles in the block are -recognized, not those in the span. - -When selecting text that includes multiple blocks at the same level (peers), -this plug-in accumulates the specified styles in all of the surrounding blocks -and populates the dialogue checkboxes accordingly. There is no differentiation -between styles set in all the blocks versus styles set in some of the blocks. - -When the [Update] or [Apply] buttons are pressed, the styles selected in the -checkboxes are applied to all blocks that surround the selected text. diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/tabfocus/editor_plugin.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/tabfocus/editor_plugin.js deleted file mode 100644 index 2c51291615..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/tabfocus/editor_plugin.js +++ /dev/null @@ -1 +0,0 @@ -(function(){var c=tinymce.DOM,a=tinymce.dom.Event,d=tinymce.each,b=tinymce.explode;tinymce.create("tinymce.plugins.TabFocusPlugin",{init:function(f,g){function e(i,j){if(j.keyCode===9){return a.cancel(j)}}function h(l,p){var j,m,o,n,k;function q(t){n=c.select(":input:enabled,*[tabindex]:not(iframe)");function s(v){return v.nodeName==="BODY"||(v.type!="hidden"&&!(v.style.display=="none")&&!(v.style.visibility=="hidden")&&s(v.parentNode))}function i(v){return v.attributes.tabIndex.specified||v.nodeName=="INPUT"||v.nodeName=="TEXTAREA"}function u(){return tinymce.isIE6||tinymce.isIE7}function r(v){return((!u()||i(v)))&&v.getAttribute("tabindex")!="-1"&&s(v)}d(n,function(w,v){if(w.id==l.id){j=v;return false}});if(t>0){for(m=j+1;m=0;m--){if(r(n[m])){return n[m]}}}return null}if(p.keyCode===9){k=b(l.getParam("tab_focus",l.getParam("tabfocus_elements",":prev,:next")));if(k.length==1){k[1]=k[0];k[0]=":prev"}if(p.shiftKey){if(k[0]==":prev"){n=q(-1)}else{n=c.get(k[0])}}else{if(k[1]==":next"){n=q(1)}else{n=c.get(k[1])}}if(n){if(n.id&&(l=tinymce.get(n.id||n.name))){l.focus()}else{window.setTimeout(function(){if(!tinymce.isWebKit){window.focus()}n.focus()},10)}return a.cancel(p)}}}f.onKeyUp.add(e);if(tinymce.isGecko){f.onKeyPress.add(h);f.onKeyDown.add(e)}else{f.onKeyDown.add(h)}},getInfo:function(){return{longname:"Tabfocus",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/tabfocus",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("tabfocus",tinymce.plugins.TabFocusPlugin)})(); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/tabfocus/editor_plugin_src.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/tabfocus/editor_plugin_src.js deleted file mode 100644 index f9df7de7f6..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/tabfocus/editor_plugin_src.js +++ /dev/null @@ -1,122 +0,0 @@ -/** - * editor_plugin_src.js - * - * Copyright 2009, Moxiecode Systems AB - * Released under LGPL License. - * - * License: http://tinymce.moxiecode.com/license - * Contributing: http://tinymce.moxiecode.com/contributing - */ - -(function() { - var DOM = tinymce.DOM, Event = tinymce.dom.Event, each = tinymce.each, explode = tinymce.explode; - - tinymce.create('tinymce.plugins.TabFocusPlugin', { - init : function(ed, url) { - function tabCancel(ed, e) { - if (e.keyCode === 9) - return Event.cancel(e); - } - - function tabHandler(ed, e) { - var x, i, f, el, v; - - function find(d) { - el = DOM.select(':input:enabled,*[tabindex]:not(iframe)'); - - function canSelectRecursive(e) { - return e.nodeName==="BODY" || (e.type != 'hidden' && - !(e.style.display == "none") && - !(e.style.visibility == "hidden") && canSelectRecursive(e.parentNode)); - } - function canSelectInOldIe(el) { - return el.attributes["tabIndex"].specified || el.nodeName == "INPUT" || el.nodeName == "TEXTAREA"; - } - function isOldIe() { - return tinymce.isIE6 || tinymce.isIE7; - } - function canSelect(el) { - return ((!isOldIe() || canSelectInOldIe(el))) && el.getAttribute("tabindex") != '-1' && canSelectRecursive(el); - } - - each(el, function(e, i) { - if (e.id == ed.id) { - x = i; - return false; - } - }); - if (d > 0) { - for (i = x + 1; i < el.length; i++) { - if (canSelect(el[i])) - return el[i]; - } - } else { - for (i = x - 1; i >= 0; i--) { - if (canSelect(el[i])) - return el[i]; - } - } - - return null; - } - - if (e.keyCode === 9) { - v = explode(ed.getParam('tab_focus', ed.getParam('tabfocus_elements', ':prev,:next'))); - - if (v.length == 1) { - v[1] = v[0]; - v[0] = ':prev'; - } - - // Find element to focus - if (e.shiftKey) { - if (v[0] == ':prev') - el = find(-1); - else - el = DOM.get(v[0]); - } else { - if (v[1] == ':next') - el = find(1); - else - el = DOM.get(v[1]); - } - - if (el) { - if (el.id && (ed = tinymce.get(el.id || el.name))) - ed.focus(); - else - window.setTimeout(function() { - if (!tinymce.isWebKit) - window.focus(); - el.focus(); - }, 10); - - return Event.cancel(e); - } - } - } - - ed.onKeyUp.add(tabCancel); - - if (tinymce.isGecko) { - ed.onKeyPress.add(tabHandler); - ed.onKeyDown.add(tabCancel); - } else - ed.onKeyDown.add(tabHandler); - - }, - - getInfo : function() { - return { - longname : 'Tabfocus', - author : 'Moxiecode Systems AB', - authorurl : 'http://tinymce.moxiecode.com', - infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/tabfocus', - version : tinymce.majorVersion + "." + tinymce.minorVersion - }; - } - }); - - // Register plugin - tinymce.PluginManager.add('tabfocus', tinymce.plugins.TabFocusPlugin); -})(); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/table/cell.htm b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/table/cell.htm deleted file mode 100644 index a72a8d6973..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/table/cell.htm +++ /dev/null @@ -1,180 +0,0 @@ - - - - {#table_dlg.cell_title} - - - - - - - - - -
    - - -
    -
    -
    - {#table_dlg.general_props} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - - -
    - - - -
    - -
    -
    -
    - -
    -
    - {#table_dlg.advanced_props} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    - -
    - - - - - -
     
    -
    - - - - - -
     
    -
    - - - - - -
     
    -
    -
    -
    -
    - -
    -
    - -
    - - - -
    -
    - - diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/table/css/cell.css b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/table/css/cell.css deleted file mode 100644 index a067ecdfed..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/table/css/cell.css +++ /dev/null @@ -1,17 +0,0 @@ -/* CSS file for cell dialog in the table plugin */ - -.panel_wrapper div.current { - height: 200px; -} - -.advfield { - width: 200px; -} - -#action { - margin-bottom: 3px; -} - -#class { - width: 150px; -} \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/table/css/row.css b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/table/css/row.css deleted file mode 100644 index 1f7755dafa..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/table/css/row.css +++ /dev/null @@ -1,25 +0,0 @@ -/* CSS file for row dialog in the table plugin */ - -.panel_wrapper div.current { - height: 200px; -} - -.advfield { - width: 200px; -} - -#action { - margin-bottom: 3px; -} - -#rowtype,#align,#valign,#class,#height { - width: 150px; -} - -#height { - width: 50px; -} - -.col2 { - padding-left: 20px; -} diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/table/css/table.css b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/table/css/table.css deleted file mode 100644 index d11c3f69cb..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/table/css/table.css +++ /dev/null @@ -1,13 +0,0 @@ -/* CSS file for table dialog in the table plugin */ - -.panel_wrapper div.current { - height: 245px; -} - -.advfield { - width: 200px; -} - -#class { - width: 150px; -} diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/table/editor_plugin.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/table/editor_plugin.js deleted file mode 100644 index 4a92e1b364..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/table/editor_plugin.js +++ /dev/null @@ -1 +0,0 @@ -(function(d){var e=d.each;function c(g,h){var j=h.ownerDocument,f=j.createRange(),k;f.setStartBefore(h);f.setEnd(g.endContainer,g.endOffset);k=j.createElement("body");k.appendChild(f.cloneContents());return k.innerHTML.replace(/<(br|img|object|embed|input|textarea)[^>]*>/gi,"-").replace(/<[^>]+>/g,"").length==0}function a(g,f){return parseInt(g.getAttribute(f)||1)}function b(H,G,K){var g,L,D,o;t();o=G.getParent(K.getStart(),"th,td");if(o){L=F(o);D=I();o=z(L.x,L.y)}function A(N,M){N=N.cloneNode(M);N.removeAttribute("id");return N}function t(){var M=0;g=[];e(["thead","tbody","tfoot"],function(N){var O=G.select("> "+N+" tr",H);e(O,function(P,Q){Q+=M;e(G.select("> td, > th",P),function(W,R){var S,T,U,V;if(g[Q]){while(g[Q][R]){R++}}U=a(W,"rowspan");V=a(W,"colspan");for(T=Q;T'}return false}},"childNodes");M=A(M,false);s(M,"rowSpan",1);s(M,"colSpan",1);if(N){M.appendChild(N)}else{if(!d.isIE||d.isIE11){M.innerHTML='
    '}}return M}function q(){var M=G.createRng();e(G.select("tr",H),function(N){if(N.cells.length==0){G.remove(N)}});if(G.select("tr",H).length==0){M.setStartAfter(H);M.setEndAfter(H);K.setRng(M);G.remove(H);return}e(G.select("thead,tbody,tfoot",H),function(N){if(N.rows.length==0){G.remove(N)}});t();row=g[Math.min(g.length-1,L.y)];if(row){K.select(row[Math.min(row.length-1,L.x)].elm,true);K.collapse(true)}}function u(S,Q,U,R){var P,N,M,O,T;P=g[Q][S].elm.parentNode;for(M=1;M<=U;M++){P=G.getNext(P,"tr");if(P){for(N=S;N>=0;N--){T=g[Q+M][N].elm;if(T.parentNode==P){for(O=1;O<=R;O++){G.insertAfter(f(T),T)}break}}if(N==-1){for(O=1;O<=R;O++){P.insertBefore(f(P.cells[0]),P.cells[0])}}}}}function C(){e(g,function(M,N){e(M,function(P,O){var S,R,T,Q;if(j(P)){P=P.elm;S=a(P,"colspan");R=a(P,"rowspan");if(S>1||R>1){s(P,"rowSpan",1);s(P,"colSpan",1);for(Q=0;Q1){s(S,"rowSpan",O+1);continue}}else{if(M>0&&g[M-1][R]){V=g[M-1][R].elm;O=a(V,"rowSpan");if(O>1){s(V,"rowSpan",O+1);continue}}}N=f(S);s(N,"colSpan",S.colSpan);U.appendChild(N);P=S}}if(U.hasChildNodes()){if(!Q){G.insertAfter(U,T)}else{T.parentNode.insertBefore(U,T)}}}function h(N){var O,M;e(g,function(P,Q){e(P,function(S,R){if(j(S)){O=R;if(N){return false}}});if(N){return !O}});e(g,function(S,T){var P,Q,R;if(!S[O]){return}P=S[O].elm;if(P!=M){R=a(P,"colspan");Q=a(P,"rowspan");if(R==1){if(!N){G.insertAfter(f(P),P);u(O,T,Q-1,R)}else{P.parentNode.insertBefore(f(P),P);u(O,T,Q-1,R)}}else{s(P,"colSpan",P.colSpan+1)}M=P}})}function n(){var M=[];e(g,function(N,O){e(N,function(Q,P){if(j(Q)&&d.inArray(M,P)===-1){e(g,function(T){var R=T[P].elm,S;S=a(R,"colSpan");if(S>1){s(R,"colSpan",S-1)}else{G.remove(R)}});M.push(P)}})});q()}function m(){var N;function M(Q){var P,R,O;P=G.getNext(Q,"tr");e(Q.cells,function(S){var T=a(S,"rowSpan");if(T>1){s(S,"rowSpan",T-1);R=F(S);u(R.x,R.y,1,1)}});R=F(Q.cells[0]);e(g[R.y],function(S){var T;S=S.elm;if(S!=O){T=a(S,"rowSpan");if(T<=1){G.remove(S)}else{s(S,"rowSpan",T-1)}O=S}})}N=k();e(N.reverse(),function(O){M(O)});q()}function E(){var M=k();G.remove(M);q();return M}function J(){var M=k();e(M,function(O,N){M[N]=A(O,true)});return M}function B(O,N){if(!O){return}var P=k(),M=P[N?0:P.length-1],Q=M.cells.length;e(g,function(S){var R;Q=0;e(S,function(U,T){if(U.real){Q+=U.colspan}if(U.elm.parentNode==M){R=1}});if(R){return false}});if(!N){O.reverse()}e(O,function(T){var S=T.cells.length,R;for(i=0;iN){N=R}if(Q>M){M=Q}if(S.real){U=S.colspan-1;T=S.rowspan-1;if(U){if(R+U>N){N=R+U}}if(T){if(Q+T>M){M=Q+T}}}}})});return{x:N,y:M}}function v(S){var P,O,U,T,N,M,Q,R;D=F(S);if(L&&D){P=Math.min(L.x,D.x);O=Math.min(L.y,D.y);U=Math.max(L.x,D.x);T=Math.max(L.y,D.y);N=U;M=T;for(y=O;y<=M;y++){S=g[y][P];if(!S.real){if(P-(S.colspan-1)N){N=x+Q}}if(R){if(y+R>M){M=y+R}}}}}G.removeClass(G.select("td.mceSelected,th.mceSelected"),"mceSelected");for(y=O;y<=M;y++){for(x=P;x<=N;x++){if(g[y][x]){G.addClass(g[y][x].elm,"mceSelected")}}}}}d.extend(this,{deleteTable:r,split:C,merge:p,insertRow:l,insertCol:h,deleteCols:n,deleteRows:m,cutRows:E,copyRows:J,pasteRows:B,getPos:F,setStartCell:w,setEndCell:v})}d.create("tinymce.plugins.TablePlugin",{init:function(g,h){var f,m,j=true;function l(p){var o=g.selection,n=g.dom.getParent(p||o.getNode(),"table");if(n){return new b(n,g.dom,o)}}function k(){g.getBody().style.webkitUserSelect="";if(j){g.dom.removeClass(g.dom.select("td.mceSelected,th.mceSelected"),"mceSelected");j=false}}e([["table","table.desc","mceInsertTable",true],["delete_table","table.del","mceTableDelete"],["delete_col","table.delete_col_desc","mceTableDeleteCol"],["delete_row","table.delete_row_desc","mceTableDeleteRow"],["col_after","table.col_after_desc","mceTableInsertColAfter"],["col_before","table.col_before_desc","mceTableInsertColBefore"],["row_after","table.row_after_desc","mceTableInsertRowAfter"],["row_before","table.row_before_desc","mceTableInsertRowBefore"],["row_props","table.row_desc","mceTableRowProps",true],["cell_props","table.cell_desc","mceTableCellProps",true],["split_cells","table.split_cells_desc","mceTableSplitCells",true],["merge_cells","table.merge_cells_desc","mceTableMergeCells",true]],function(n){g.addButton(n[0],{title:n[1],cmd:n[2],ui:n[3]})});if(!d.isIE){g.onClick.add(function(n,o){o=o.target;if(o.nodeName==="TABLE"){n.selection.select(o);n.nodeChanged()}})}g.onPreProcess.add(function(o,p){var n,q,r,t=o.dom,s;n=t.select("table",p.node);q=n.length;while(q--){r=n[q];t.setAttrib(r,"data-mce-style","");if((s=t.getAttrib(r,"width"))){t.setStyle(r,"width",s);t.setAttrib(r,"width","")}if((s=t.getAttrib(r,"height"))){t.setStyle(r,"height",s);t.setAttrib(r,"height","")}}});g.onNodeChange.add(function(q,o,s){var r;s=q.selection.getStart();r=q.dom.getParent(s,"td,th,caption");o.setActive("table",s.nodeName==="TABLE"||!!r);if(r&&r.nodeName==="CAPTION"){r=0}o.setDisabled("delete_table",!r);o.setDisabled("delete_col",!r);o.setDisabled("delete_table",!r);o.setDisabled("delete_row",!r);o.setDisabled("col_after",!r);o.setDisabled("col_before",!r);o.setDisabled("row_after",!r);o.setDisabled("row_before",!r);o.setDisabled("row_props",!r);o.setDisabled("cell_props",!r);o.setDisabled("split_cells",!r);o.setDisabled("merge_cells",!r)});g.onInit.add(function(r){var p,t,q=r.dom,u;f=r.windowManager;r.onMouseDown.add(function(w,z){if(z.button!=2){k();t=q.getParent(z.target,"td,th");p=q.getParent(t,"table")}});q.bind(r.getDoc(),"mouseover",function(C){var A,z,B=C.target;if(t&&(u||B!=t)&&(B.nodeName=="TD"||B.nodeName=="TH")){z=q.getParent(B,"table");if(z==p){if(!u){u=l(z);u.setStartCell(t);r.getBody().style.webkitUserSelect="none"}u.setEndCell(B);j=true}A=r.selection.getSel();try{if(A.removeAllRanges){A.removeAllRanges()}else{A.empty()}}catch(w){}C.preventDefault()}});r.onMouseUp.add(function(F,G){var z,B=F.selection,H,I=B.getSel(),w,C,A,E;if(t){if(u){F.getBody().style.webkitUserSelect=""}function D(J,L){var K=new d.dom.TreeWalker(J,J);do{if(J.nodeType==3&&d.trim(J.nodeValue).length!=0){if(L){z.setStart(J,0)}else{z.setEnd(J,J.nodeValue.length)}return}if(J.nodeName=="BR"){if(L){z.setStartBefore(J)}else{z.setEndBefore(J)}return}}while(J=(L?K.next():K.prev()))}H=q.select("td.mceSelected,th.mceSelected");if(H.length>0){z=q.createRng();C=H[0];E=H[H.length-1];z.setStartBefore(C);z.setEndAfter(C);D(C,1);w=new d.dom.TreeWalker(C,q.getParent(H[0],"table"));do{if(C.nodeName=="TD"||C.nodeName=="TH"){if(!q.hasClass(C,"mceSelected")){break}A=C}}while(C=w.next());D(A);B.setRng(z)}F.nodeChanged();t=u=p=null}});r.onKeyUp.add(function(w,z){k()});r.onKeyDown.add(function(w,z){n(w)});r.onMouseDown.add(function(w,z){if(z.button!=2){n(w)}});function o(D,z,A,F){var B=3,G=D.dom.getParent(z.startContainer,"TABLE"),C,w,E;if(G){C=G.parentNode}w=z.startContainer.nodeType==B&&z.startOffset==0&&z.endOffset==0&&F&&(A.nodeName=="TR"||A==C);E=(A.nodeName=="TD"||A.nodeName=="TH")&&!F;return w||E}function n(A){if(!d.isWebKit){return}var z=A.selection.getRng();var C=A.selection.getNode();var B=A.dom.getParent(z.startContainer,"TD,TH");if(!o(A,z,C,B)){return}if(!B){B=C}var w=B.lastChild;while(w.lastChild){w=w.lastChild}z.setEnd(w,w.nodeValue.length);A.selection.setRng(z)}r.plugins.table.fixTableCellSelection=n;if(r&&r.plugins.contextmenu){r.plugins.contextmenu.onContextMenu.add(function(A,w,C){var D,B=r.selection,z=B.getNode()||r.getBody();if(r.dom.getParent(C,"td")||r.dom.getParent(C,"th")||r.dom.select("td.mceSelected,th.mceSelected").length){w.removeAll();if(z.nodeName=="A"&&!r.dom.getAttrib(z,"name")){w.add({title:"advanced.link_desc",icon:"link",cmd:r.plugins.advlink?"mceAdvLink":"mceLink",ui:true});w.add({title:"advanced.unlink_desc",icon:"unlink",cmd:"UnLink"});w.addSeparator()}if(z.nodeName=="IMG"&&z.className.indexOf("mceItem")==-1){w.add({title:"advanced.image_desc",icon:"image",cmd:r.plugins.advimage?"mceAdvImage":"mceImage",ui:true});w.addSeparator()}w.add({title:"table.desc",icon:"table",cmd:"mceInsertTable",value:{action:"insert"}});w.add({title:"table.props_desc",icon:"table_props",cmd:"mceInsertTable"});w.add({title:"table.del",icon:"delete_table",cmd:"mceTableDelete"});w.addSeparator();D=w.addMenu({title:"table.cell"});D.add({title:"table.cell_desc",icon:"cell_props",cmd:"mceTableCellProps"});D.add({title:"table.split_cells_desc",icon:"split_cells",cmd:"mceTableSplitCells"});D.add({title:"table.merge_cells_desc",icon:"merge_cells",cmd:"mceTableMergeCells"});D=w.addMenu({title:"table.row"});D.add({title:"table.row_desc",icon:"row_props",cmd:"mceTableRowProps"});D.add({title:"table.row_before_desc",icon:"row_before",cmd:"mceTableInsertRowBefore"});D.add({title:"table.row_after_desc",icon:"row_after",cmd:"mceTableInsertRowAfter"});D.add({title:"table.delete_row_desc",icon:"delete_row",cmd:"mceTableDeleteRow"});D.addSeparator();D.add({title:"table.cut_row_desc",icon:"cut",cmd:"mceTableCutRow"});D.add({title:"table.copy_row_desc",icon:"copy",cmd:"mceTableCopyRow"});D.add({title:"table.paste_row_before_desc",icon:"paste",cmd:"mceTablePasteRowBefore"}).setDisabled(!m);D.add({title:"table.paste_row_after_desc",icon:"paste",cmd:"mceTablePasteRowAfter"}).setDisabled(!m);D=w.addMenu({title:"table.col"});D.add({title:"table.col_before_desc",icon:"col_before",cmd:"mceTableInsertColBefore"});D.add({title:"table.col_after_desc",icon:"col_after",cmd:"mceTableInsertColAfter"});D.add({title:"table.delete_col_desc",icon:"delete_col",cmd:"mceTableDeleteCol"})}else{w.add({title:"table.desc",icon:"table",cmd:"mceInsertTable"})}})}if(d.isWebKit){function v(C,N){var L=d.VK;var Q=N.keyCode;function O(Y,U,S){var T=Y?"previousSibling":"nextSibling";var Z=C.dom.getParent(U,"tr");var X=Z[T];if(X){z(C,U,X,Y);d.dom.Event.cancel(S);return true}else{var aa=C.dom.getParent(Z,"table");var W=Z.parentNode;var R=W.nodeName.toLowerCase();if(R==="tbody"||R===(Y?"tfoot":"thead")){var V=w(Y,aa,W,"tbody");if(V!==null){return K(Y,V,U,S)}}return M(Y,Z,T,aa,S)}}function w(V,T,U,X){var S=C.dom.select(">"+X,T);var R=S.indexOf(U);if(V&&R===0||!V&&R===S.length-1){return B(V,T)}else{if(R===-1){var W=U.tagName.toLowerCase()==="thead"?0:S.length-1;return S[W]}else{return S[R+(V?-1:1)]}}}function B(U,T){var S=U?"thead":"tfoot";var R=C.dom.select(">"+S,T);return R.length!==0?R[0]:null}function K(V,T,S,U){var R=J(T,V);R&&z(C,S,R,V);d.dom.Event.cancel(U);return true}function M(Y,U,R,X,W){var S=X[R];if(S){F(S);return true}else{var V=C.dom.getParent(X,"td,th");if(V){return O(Y,V,W)}else{var T=J(U,!Y);F(T);return d.dom.Event.cancel(W)}}}function J(S,R){var T=S&&S[R?"lastChild":"firstChild"];return T&&T.nodeName==="BR"?C.dom.getParent(T,"td,th"):T}function F(R){C.selection.setCursorLocation(R,0)}function A(){return Q==L.UP||Q==L.DOWN}function D(R){var T=R.selection.getNode();var S=R.dom.getParent(T,"tr");return S!==null}function P(S){var R=0;var T=S;while(T.previousSibling){T=T.previousSibling;R=R+a(T,"colspan")}return R}function E(T,R){var U=0;var S=0;e(T.children,function(V,W){U=U+a(V,"colspan");S=W;if(U>R){return false}});return S}function z(T,W,Y,V){var X=P(T.dom.getParent(W,"td,th"));var S=E(Y,X);var R=Y.childNodes[S];var U=J(R,V);F(U||R)}function H(R){var T=C.selection.getNode();var U=C.dom.getParent(T,"td,th");var S=C.dom.getParent(R,"td,th");return U&&U!==S&&I(U,S)}function I(S,R){return C.dom.getParent(S,"TABLE")===C.dom.getParent(R,"TABLE")}if(A()&&D(C)){var G=C.selection.getNode();setTimeout(function(){if(H(G)){O(!N.shiftKey&&Q===L.UP,G,N)}},0)}}r.onKeyDown.add(v)}function s(){var w;for(w=r.getBody().lastChild;w&&w.nodeType==3&&!w.nodeValue.length;w=w.previousSibling){}if(w&&w.nodeName=="TABLE"){if(r.settings.forced_root_block){r.dom.add(r.getBody(),r.settings.forced_root_block,null,d.isIE&&!d.isIE11?" ":'
    ')}else{r.dom.add(r.getBody(),"br",{"data-mce-bogus":"1"})}}}if(d.isGecko){r.onKeyDown.add(function(z,B){var w,A,C=z.dom;if(B.keyCode==37||B.keyCode==38){w=z.selection.getRng();A=C.getParent(w.startContainer,"table");if(A&&z.getBody().firstChild==A){if(c(w,A)){w=C.createRng();w.setStartBefore(A);w.setEndBefore(A);z.selection.setRng(w);B.preventDefault()}}}})}r.onKeyUp.add(s);r.onSetContent.add(s);r.onVisualAid.add(s);r.onPreProcess.add(function(w,A){var z=A.node.lastChild;if(z&&(z.nodeName=="BR"||(z.childNodes.length==1&&(z.firstChild.nodeName=="BR"||z.firstChild.nodeValue=="\u00a0")))&&z.previousSibling&&z.previousSibling.nodeName=="TABLE"){w.dom.remove(z)}});s();r.startContent=r.getContent({format:"raw"})});e({mceTableSplitCells:function(n){n.split()},mceTableMergeCells:function(o){var p,q,n;n=g.dom.getParent(g.selection.getNode(),"th,td");if(n){p=n.rowSpan;q=n.colSpan}if(!g.dom.select("td.mceSelected,th.mceSelected").length){f.open({url:h+"/merge_cells.htm",width:240+parseInt(g.getLang("table.merge_cells_delta_width",0)),height:110+parseInt(g.getLang("table.merge_cells_delta_height",0)),inline:1},{rows:p,cols:q,onaction:function(r){o.merge(n,r.cols,r.rows)},plugin_url:h})}else{o.merge()}},mceTableInsertRowBefore:function(n){n.insertRow(true)},mceTableInsertRowAfter:function(n){n.insertRow()},mceTableInsertColBefore:function(n){n.insertCol(true)},mceTableInsertColAfter:function(n){n.insertCol()},mceTableDeleteCol:function(n){n.deleteCols()},mceTableDeleteRow:function(n){n.deleteRows()},mceTableCutRow:function(n){m=n.cutRows()},mceTableCopyRow:function(n){m=n.copyRows()},mceTablePasteRowBefore:function(n){n.pasteRows(m,true)},mceTablePasteRowAfter:function(n){n.pasteRows(m)},mceTableDelete:function(n){n.deleteTable()}},function(o,n){g.addCommand(n,function(){var p=l();if(p){o(p);g.execCommand("mceRepaint");k()}})});e({mceInsertTable:function(n){f.open({url:h+"/table.htm",width:400+parseInt(g.getLang("table.table_delta_width",0)),height:320+parseInt(g.getLang("table.table_delta_height",0)),inline:1},{plugin_url:h,action:n?n.action:0})},mceTableRowProps:function(){f.open({url:h+"/row.htm",width:400+parseInt(g.getLang("table.rowprops_delta_width",0)),height:295+parseInt(g.getLang("table.rowprops_delta_height",0)),inline:1},{plugin_url:h})},mceTableCellProps:function(){f.open({url:h+"/cell.htm",width:400+parseInt(g.getLang("table.cellprops_delta_width",0)),height:295+parseInt(g.getLang("table.cellprops_delta_height",0)),inline:1},{plugin_url:h})}},function(o,n){g.addCommand(n,function(p,q){o(q)})})}});d.PluginManager.add("table",d.plugins.TablePlugin)})(tinymce); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/table/editor_plugin_src.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/table/editor_plugin_src.js deleted file mode 100644 index b57f257a90..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/table/editor_plugin_src.js +++ /dev/null @@ -1,1456 +0,0 @@ -/** - * editor_plugin_src.js - * - * Copyright 2009, Moxiecode Systems AB - * Released under LGPL License. - * - * License: http://tinymce.moxiecode.com/license - * Contributing: http://tinymce.moxiecode.com/contributing - */ - -(function(tinymce) { - var each = tinymce.each; - - // Checks if the selection/caret is at the start of the specified block element - function isAtStart(rng, par) { - var doc = par.ownerDocument, rng2 = doc.createRange(), elm; - - rng2.setStartBefore(par); - rng2.setEnd(rng.endContainer, rng.endOffset); - - elm = doc.createElement('body'); - elm.appendChild(rng2.cloneContents()); - - // Check for text characters of other elements that should be treated as content - return elm.innerHTML.replace(/<(br|img|object|embed|input|textarea)[^>]*>/gi, '-').replace(/<[^>]+>/g, '').length == 0; - }; - - function getSpanVal(td, name) { - return parseInt(td.getAttribute(name) || 1); - } - - /** - * Table Grid class. - */ - function TableGrid(table, dom, selection) { - var grid, startPos, endPos, selectedCell; - - buildGrid(); - selectedCell = dom.getParent(selection.getStart(), 'th,td'); - if (selectedCell) { - startPos = getPos(selectedCell); - endPos = findEndPos(); - selectedCell = getCell(startPos.x, startPos.y); - } - - function cloneNode(node, children) { - node = node.cloneNode(children); - node.removeAttribute('id'); - - return node; - } - - function buildGrid() { - var startY = 0; - - grid = []; - - each(['thead', 'tbody', 'tfoot'], function(part) { - var rows = dom.select('> ' + part + ' tr', table); - - each(rows, function(tr, y) { - y += startY; - - each(dom.select('> td, > th', tr), function(td, x) { - var x2, y2, rowspan, colspan; - - // Skip over existing cells produced by rowspan - if (grid[y]) { - while (grid[y][x]) - x++; - } - - // Get col/rowspan from cell - rowspan = getSpanVal(td, 'rowspan'); - colspan = getSpanVal(td, 'colspan'); - - // Fill out rowspan/colspan right and down - for (y2 = y; y2 < y + rowspan; y2++) { - if (!grid[y2]) - grid[y2] = []; - - for (x2 = x; x2 < x + colspan; x2++) { - grid[y2][x2] = { - part : part, - real : y2 == y && x2 == x, - elm : td, - rowspan : rowspan, - colspan : colspan - }; - } - } - }); - }); - - startY += rows.length; - }); - }; - - function getCell(x, y) { - var row; - - row = grid[y]; - if (row) - return row[x]; - }; - - function setSpanVal(td, name, val) { - if (td) { - val = parseInt(val); - - if (val === 1) - td.removeAttribute(name, 1); - else - td.setAttribute(name, val, 1); - } - } - - function isCellSelected(cell) { - return cell && (dom.hasClass(cell.elm, 'mceSelected') || cell == selectedCell); - }; - - function getSelectedRows() { - var rows = []; - - each(table.rows, function(row) { - each(row.cells, function(cell) { - if (dom.hasClass(cell, 'mceSelected') || cell == selectedCell.elm) { - rows.push(row); - return false; - } - }); - }); - - return rows; - }; - - function deleteTable() { - var rng = dom.createRng(); - - rng.setStartAfter(table); - rng.setEndAfter(table); - - selection.setRng(rng); - - dom.remove(table); - }; - - function cloneCell(cell) { - var formatNode; - - // Clone formats - tinymce.walk(cell, function(node) { - var curNode; - - if (node.nodeType == 3) { - each(dom.getParents(node.parentNode, null, cell).reverse(), function(node) { - node = cloneNode(node, false); - - if (!formatNode) - formatNode = curNode = node; - else if (curNode) - curNode.appendChild(node); - - curNode = node; - }); - - // Add something to the inner node - if (curNode) - curNode.innerHTML = tinymce.isIE && !tinymce.isIE11 ? ' ' : '
    '; - - return false; - } - }, 'childNodes'); - - cell = cloneNode(cell, false); - setSpanVal(cell, 'rowSpan', 1); - setSpanVal(cell, 'colSpan', 1); - - if (formatNode) { - cell.appendChild(formatNode); - } else { - if (!tinymce.isIE || tinymce.isIE11) - cell.innerHTML = '
    '; - } - - return cell; - }; - - function cleanup() { - var rng = dom.createRng(); - - // Empty rows - each(dom.select('tr', table), function(tr) { - if (tr.cells.length == 0) - dom.remove(tr); - }); - - // Empty table - if (dom.select('tr', table).length == 0) { - rng.setStartAfter(table); - rng.setEndAfter(table); - selection.setRng(rng); - dom.remove(table); - return; - } - - // Empty header/body/footer - each(dom.select('thead,tbody,tfoot', table), function(part) { - if (part.rows.length == 0) - dom.remove(part); - }); - - // Restore selection to start position if it still exists - buildGrid(); - - // Restore the selection to the closest table position - row = grid[Math.min(grid.length - 1, startPos.y)]; - if (row) { - selection.select(row[Math.min(row.length - 1, startPos.x)].elm, true); - selection.collapse(true); - } - }; - - function fillLeftDown(x, y, rows, cols) { - var tr, x2, r, c, cell; - - tr = grid[y][x].elm.parentNode; - for (r = 1; r <= rows; r++) { - tr = dom.getNext(tr, 'tr'); - - if (tr) { - // Loop left to find real cell - for (x2 = x; x2 >= 0; x2--) { - cell = grid[y + r][x2].elm; - - if (cell.parentNode == tr) { - // Append clones after - for (c = 1; c <= cols; c++) - dom.insertAfter(cloneCell(cell), cell); - - break; - } - } - - if (x2 == -1) { - // Insert nodes before first cell - for (c = 1; c <= cols; c++) - tr.insertBefore(cloneCell(tr.cells[0]), tr.cells[0]); - } - } - } - }; - - function split() { - each(grid, function(row, y) { - each(row, function(cell, x) { - var colSpan, rowSpan, newCell, i; - - if (isCellSelected(cell)) { - cell = cell.elm; - colSpan = getSpanVal(cell, 'colspan'); - rowSpan = getSpanVal(cell, 'rowspan'); - - if (colSpan > 1 || rowSpan > 1) { - setSpanVal(cell, 'rowSpan', 1); - setSpanVal(cell, 'colSpan', 1); - - // Insert cells right - for (i = 0; i < colSpan - 1; i++) - dom.insertAfter(cloneCell(cell), cell); - - fillLeftDown(x, y, rowSpan - 1, colSpan); - } - } - }); - }); - }; - - function merge(cell, cols, rows) { - var startX, startY, endX, endY, x, y, startCell, endCell, cell, children, count; - - // Use specified cell and cols/rows - if (cell) { - pos = getPos(cell); - startX = pos.x; - startY = pos.y; - endX = startX + (cols - 1); - endY = startY + (rows - 1); - } else { - startPos = endPos = null; - - // Calculate start/end pos by checking for selected cells in grid works better with context menu - each(grid, function(row, y) { - each(row, function(cell, x) { - if (isCellSelected(cell)) { - if (!startPos) { - startPos = {x: x, y: y}; - } - - endPos = {x: x, y: y}; - } - }); - }); - - // Use selection - startX = startPos.x; - startY = startPos.y; - endX = endPos.x; - endY = endPos.y; - } - - // Find start/end cells - startCell = getCell(startX, startY); - endCell = getCell(endX, endY); - - // Check if the cells exists and if they are of the same part for example tbody = tbody - if (startCell && endCell && startCell.part == endCell.part) { - // Split and rebuild grid - split(); - buildGrid(); - - // Set row/col span to start cell - startCell = getCell(startX, startY).elm; - setSpanVal(startCell, 'colSpan', (endX - startX) + 1); - setSpanVal(startCell, 'rowSpan', (endY - startY) + 1); - - // Remove other cells and add it's contents to the start cell - for (y = startY; y <= endY; y++) { - for (x = startX; x <= endX; x++) { - if (!grid[y] || !grid[y][x]) - continue; - - cell = grid[y][x].elm; - - if (cell != startCell) { - // Move children to startCell - children = tinymce.grep(cell.childNodes); - each(children, function(node) { - startCell.appendChild(node); - }); - - // Remove bogus nodes if there is children in the target cell - if (children.length) { - children = tinymce.grep(startCell.childNodes); - count = 0; - each(children, function(node) { - if (node.nodeName == 'BR' && dom.getAttrib(node, 'data-mce-bogus') && count++ < children.length - 1) - startCell.removeChild(node); - }); - } - - // Remove cell - dom.remove(cell); - } - } - } - - // Remove empty rows etc and restore caret location - cleanup(); - } - }; - - function insertRow(before) { - var posY, cell, lastCell, x, rowElm, newRow, newCell, otherCell, rowSpan; - - // Find first/last row - each(grid, function(row, y) { - each(row, function(cell, x) { - if (isCellSelected(cell)) { - cell = cell.elm; - rowElm = cell.parentNode; - newRow = cloneNode(rowElm, false); - posY = y; - - if (before) - return false; - } - }); - - if (before) - return !posY; - }); - - for (x = 0; x < grid[0].length; x++) { - // Cell not found could be because of an invalid table structure - if (!grid[posY][x]) - continue; - - cell = grid[posY][x].elm; - - if (cell != lastCell) { - if (!before) { - rowSpan = getSpanVal(cell, 'rowspan'); - if (rowSpan > 1) { - setSpanVal(cell, 'rowSpan', rowSpan + 1); - continue; - } - } else { - // Check if cell above can be expanded - if (posY > 0 && grid[posY - 1][x]) { - otherCell = grid[posY - 1][x].elm; - rowSpan = getSpanVal(otherCell, 'rowSpan'); - if (rowSpan > 1) { - setSpanVal(otherCell, 'rowSpan', rowSpan + 1); - continue; - } - } - } - - // Insert new cell into new row - newCell = cloneCell(cell); - setSpanVal(newCell, 'colSpan', cell.colSpan); - - newRow.appendChild(newCell); - - lastCell = cell; - } - } - - if (newRow.hasChildNodes()) { - if (!before) - dom.insertAfter(newRow, rowElm); - else - rowElm.parentNode.insertBefore(newRow, rowElm); - } - }; - - function insertCol(before) { - var posX, lastCell; - - // Find first/last column - each(grid, function(row, y) { - each(row, function(cell, x) { - if (isCellSelected(cell)) { - posX = x; - - if (before) - return false; - } - }); - - if (before) - return !posX; - }); - - each(grid, function(row, y) { - var cell, rowSpan, colSpan; - - if (!row[posX]) - return; - - cell = row[posX].elm; - if (cell != lastCell) { - colSpan = getSpanVal(cell, 'colspan'); - rowSpan = getSpanVal(cell, 'rowspan'); - - if (colSpan == 1) { - if (!before) { - dom.insertAfter(cloneCell(cell), cell); - fillLeftDown(posX, y, rowSpan - 1, colSpan); - } else { - cell.parentNode.insertBefore(cloneCell(cell), cell); - fillLeftDown(posX, y, rowSpan - 1, colSpan); - } - } else - setSpanVal(cell, 'colSpan', cell.colSpan + 1); - - lastCell = cell; - } - }); - }; - - function deleteCols() { - var cols = []; - - // Get selected column indexes - each(grid, function(row, y) { - each(row, function(cell, x) { - if (isCellSelected(cell) && tinymce.inArray(cols, x) === -1) { - each(grid, function(row) { - var cell = row[x].elm, colSpan; - - colSpan = getSpanVal(cell, 'colSpan'); - - if (colSpan > 1) - setSpanVal(cell, 'colSpan', colSpan - 1); - else - dom.remove(cell); - }); - - cols.push(x); - } - }); - }); - - cleanup(); - }; - - function deleteRows() { - var rows; - - function deleteRow(tr) { - var nextTr, pos, lastCell; - - nextTr = dom.getNext(tr, 'tr'); - - // Move down row spanned cells - each(tr.cells, function(cell) { - var rowSpan = getSpanVal(cell, 'rowSpan'); - - if (rowSpan > 1) { - setSpanVal(cell, 'rowSpan', rowSpan - 1); - pos = getPos(cell); - fillLeftDown(pos.x, pos.y, 1, 1); - } - }); - - // Delete cells - pos = getPos(tr.cells[0]); - each(grid[pos.y], function(cell) { - var rowSpan; - - cell = cell.elm; - - if (cell != lastCell) { - rowSpan = getSpanVal(cell, 'rowSpan'); - - if (rowSpan <= 1) - dom.remove(cell); - else - setSpanVal(cell, 'rowSpan', rowSpan - 1); - - lastCell = cell; - } - }); - }; - - // Get selected rows and move selection out of scope - rows = getSelectedRows(); - - // Delete all selected rows - each(rows.reverse(), function(tr) { - deleteRow(tr); - }); - - cleanup(); - }; - - function cutRows() { - var rows = getSelectedRows(); - - dom.remove(rows); - cleanup(); - - return rows; - }; - - function copyRows() { - var rows = getSelectedRows(); - - each(rows, function(row, i) { - rows[i] = cloneNode(row, true); - }); - - return rows; - }; - - function pasteRows(rows, before) { - // If we don't have any rows in the clipboard, return immediately - if(!rows) - return; - - var selectedRows = getSelectedRows(), - targetRow = selectedRows[before ? 0 : selectedRows.length - 1], - targetCellCount = targetRow.cells.length; - - // Calc target cell count - each(grid, function(row) { - var match; - - targetCellCount = 0; - each(row, function(cell, x) { - if (cell.real) - targetCellCount += cell.colspan; - - if (cell.elm.parentNode == targetRow) - match = 1; - }); - - if (match) - return false; - }); - - if (!before) - rows.reverse(); - - each(rows, function(row) { - var cellCount = row.cells.length, cell; - - // Remove col/rowspans - for (i = 0; i < cellCount; i++) { - cell = row.cells[i]; - setSpanVal(cell, 'colSpan', 1); - setSpanVal(cell, 'rowSpan', 1); - } - - // Needs more cells - for (i = cellCount; i < targetCellCount; i++) - row.appendChild(cloneCell(row.cells[cellCount - 1])); - - // Needs less cells - for (i = targetCellCount; i < cellCount; i++) - dom.remove(row.cells[i]); - - // Add before/after - if (before) - targetRow.parentNode.insertBefore(row, targetRow); - else - dom.insertAfter(row, targetRow); - }); - - // Remove current selection - dom.removeClass(dom.select('td.mceSelected,th.mceSelected'), 'mceSelected'); - }; - - function getPos(target) { - var pos; - - each(grid, function(row, y) { - each(row, function(cell, x) { - if (cell.elm == target) { - pos = {x : x, y : y}; - return false; - } - }); - - return !pos; - }); - - return pos; - }; - - function setStartCell(cell) { - startPos = getPos(cell); - }; - - function findEndPos() { - var pos, maxX, maxY; - - maxX = maxY = 0; - - each(grid, function(row, y) { - each(row, function(cell, x) { - var colSpan, rowSpan; - - if (isCellSelected(cell)) { - cell = grid[y][x]; - - if (x > maxX) - maxX = x; - - if (y > maxY) - maxY = y; - - if (cell.real) { - colSpan = cell.colspan - 1; - rowSpan = cell.rowspan - 1; - - if (colSpan) { - if (x + colSpan > maxX) - maxX = x + colSpan; - } - - if (rowSpan) { - if (y + rowSpan > maxY) - maxY = y + rowSpan; - } - } - } - }); - }); - - return {x : maxX, y : maxY}; - }; - - function setEndCell(cell) { - var startX, startY, endX, endY, maxX, maxY, colSpan, rowSpan; - - endPos = getPos(cell); - - if (startPos && endPos) { - // Get start/end positions - startX = Math.min(startPos.x, endPos.x); - startY = Math.min(startPos.y, endPos.y); - endX = Math.max(startPos.x, endPos.x); - endY = Math.max(startPos.y, endPos.y); - - // Expand end positon to include spans - maxX = endX; - maxY = endY; - - // Expand startX - for (y = startY; y <= maxY; y++) { - cell = grid[y][startX]; - - if (!cell.real) { - if (startX - (cell.colspan - 1) < startX) - startX -= cell.colspan - 1; - } - } - - // Expand startY - for (x = startX; x <= maxX; x++) { - cell = grid[startY][x]; - - if (!cell.real) { - if (startY - (cell.rowspan - 1) < startY) - startY -= cell.rowspan - 1; - } - } - - // Find max X, Y - for (y = startY; y <= endY; y++) { - for (x = startX; x <= endX; x++) { - cell = grid[y][x]; - - if (cell.real) { - colSpan = cell.colspan - 1; - rowSpan = cell.rowspan - 1; - - if (colSpan) { - if (x + colSpan > maxX) - maxX = x + colSpan; - } - - if (rowSpan) { - if (y + rowSpan > maxY) - maxY = y + rowSpan; - } - } - } - } - - // Remove current selection - dom.removeClass(dom.select('td.mceSelected,th.mceSelected'), 'mceSelected'); - - // Add new selection - for (y = startY; y <= maxY; y++) { - for (x = startX; x <= maxX; x++) { - if (grid[y][x]) - dom.addClass(grid[y][x].elm, 'mceSelected'); - } - } - } - }; - - // Expose to public - tinymce.extend(this, { - deleteTable : deleteTable, - split : split, - merge : merge, - insertRow : insertRow, - insertCol : insertCol, - deleteCols : deleteCols, - deleteRows : deleteRows, - cutRows : cutRows, - copyRows : copyRows, - pasteRows : pasteRows, - getPos : getPos, - setStartCell : setStartCell, - setEndCell : setEndCell - }); - }; - - tinymce.create('tinymce.plugins.TablePlugin', { - init : function(ed, url) { - var winMan, clipboardRows, hasCellSelection = true; // Might be selected cells on reload - - function createTableGrid(node) { - var selection = ed.selection, tblElm = ed.dom.getParent(node || selection.getNode(), 'table'); - - if (tblElm) - return new TableGrid(tblElm, ed.dom, selection); - }; - - function cleanup() { - // Restore selection possibilities - ed.getBody().style.webkitUserSelect = ''; - - if (hasCellSelection) { - ed.dom.removeClass(ed.dom.select('td.mceSelected,th.mceSelected'), 'mceSelected'); - hasCellSelection = false; - } - }; - - // Register buttons - each([ - ['table', 'table.desc', 'mceInsertTable', true], - ['delete_table', 'table.del', 'mceTableDelete'], - ['delete_col', 'table.delete_col_desc', 'mceTableDeleteCol'], - ['delete_row', 'table.delete_row_desc', 'mceTableDeleteRow'], - ['col_after', 'table.col_after_desc', 'mceTableInsertColAfter'], - ['col_before', 'table.col_before_desc', 'mceTableInsertColBefore'], - ['row_after', 'table.row_after_desc', 'mceTableInsertRowAfter'], - ['row_before', 'table.row_before_desc', 'mceTableInsertRowBefore'], - ['row_props', 'table.row_desc', 'mceTableRowProps', true], - ['cell_props', 'table.cell_desc', 'mceTableCellProps', true], - ['split_cells', 'table.split_cells_desc', 'mceTableSplitCells', true], - ['merge_cells', 'table.merge_cells_desc', 'mceTableMergeCells', true] - ], function(c) { - ed.addButton(c[0], {title : c[1], cmd : c[2], ui : c[3]}); - }); - - // Select whole table is a table border is clicked - if (!tinymce.isIE) { - ed.onClick.add(function(ed, e) { - e = e.target; - - if (e.nodeName === 'TABLE') { - ed.selection.select(e); - ed.nodeChanged(); - } - }); - } - - ed.onPreProcess.add(function(ed, args) { - var nodes, i, node, dom = ed.dom, value; - - nodes = dom.select('table', args.node); - i = nodes.length; - while (i--) { - node = nodes[i]; - dom.setAttrib(node, 'data-mce-style', ''); - - if ((value = dom.getAttrib(node, 'width'))) { - dom.setStyle(node, 'width', value); - dom.setAttrib(node, 'width', ''); - } - - if ((value = dom.getAttrib(node, 'height'))) { - dom.setStyle(node, 'height', value); - dom.setAttrib(node, 'height', ''); - } - } - }); - - // Handle node change updates - ed.onNodeChange.add(function(ed, cm, n) { - var p; - - n = ed.selection.getStart(); - p = ed.dom.getParent(n, 'td,th,caption'); - cm.setActive('table', n.nodeName === 'TABLE' || !!p); - - // Disable table tools if we are in caption - if (p && p.nodeName === 'CAPTION') - p = 0; - - cm.setDisabled('delete_table', !p); - cm.setDisabled('delete_col', !p); - cm.setDisabled('delete_table', !p); - cm.setDisabled('delete_row', !p); - cm.setDisabled('col_after', !p); - cm.setDisabled('col_before', !p); - cm.setDisabled('row_after', !p); - cm.setDisabled('row_before', !p); - cm.setDisabled('row_props', !p); - cm.setDisabled('cell_props', !p); - cm.setDisabled('split_cells', !p); - cm.setDisabled('merge_cells', !p); - }); - - ed.onInit.add(function(ed) { - var startTable, startCell, dom = ed.dom, tableGrid; - - winMan = ed.windowManager; - - // Add cell selection logic - ed.onMouseDown.add(function(ed, e) { - if (e.button != 2) { - cleanup(); - - startCell = dom.getParent(e.target, 'td,th'); - startTable = dom.getParent(startCell, 'table'); - } - }); - - dom.bind(ed.getDoc(), 'mouseover', function(e) { - var sel, table, target = e.target; - - if (startCell && (tableGrid || target != startCell) && (target.nodeName == 'TD' || target.nodeName == 'TH')) { - table = dom.getParent(target, 'table'); - if (table == startTable) { - if (!tableGrid) { - tableGrid = createTableGrid(table); - tableGrid.setStartCell(startCell); - - ed.getBody().style.webkitUserSelect = 'none'; - } - - tableGrid.setEndCell(target); - hasCellSelection = true; - } - - // Remove current selection - sel = ed.selection.getSel(); - - try { - if (sel.removeAllRanges) - sel.removeAllRanges(); - else - sel.empty(); - } catch (ex) { - // IE9 might throw errors here - } - - e.preventDefault(); - } - }); - - ed.onMouseUp.add(function(ed, e) { - var rng, sel = ed.selection, selectedCells, nativeSel = sel.getSel(), walker, node, lastNode, endNode; - - // Move selection to startCell - if (startCell) { - if (tableGrid) - ed.getBody().style.webkitUserSelect = ''; - - function setPoint(node, start) { - var walker = new tinymce.dom.TreeWalker(node, node); - - do { - // Text node - if (node.nodeType == 3 && tinymce.trim(node.nodeValue).length != 0) { - if (start) - rng.setStart(node, 0); - else - rng.setEnd(node, node.nodeValue.length); - - return; - } - - // BR element - if (node.nodeName == 'BR') { - if (start) - rng.setStartBefore(node); - else - rng.setEndBefore(node); - - return; - } - } while (node = (start ? walker.next() : walker.prev())); - } - - // Try to expand text selection as much as we can only Gecko supports cell selection - selectedCells = dom.select('td.mceSelected,th.mceSelected'); - if (selectedCells.length > 0) { - rng = dom.createRng(); - node = selectedCells[0]; - endNode = selectedCells[selectedCells.length - 1]; - rng.setStartBefore(node); - rng.setEndAfter(node); - - setPoint(node, 1); - walker = new tinymce.dom.TreeWalker(node, dom.getParent(selectedCells[0], 'table')); - - do { - if (node.nodeName == 'TD' || node.nodeName == 'TH') { - if (!dom.hasClass(node, 'mceSelected')) - break; - - lastNode = node; - } - } while (node = walker.next()); - - setPoint(lastNode); - - sel.setRng(rng); - } - - ed.nodeChanged(); - startCell = tableGrid = startTable = null; - } - }); - - ed.onKeyUp.add(function(ed, e) { - cleanup(); - }); - - ed.onKeyDown.add(function (ed, e) { - fixTableCellSelection(ed); - }); - - ed.onMouseDown.add(function (ed, e) { - if (e.button != 2) { - fixTableCellSelection(ed); - } - }); - function tableCellSelected(ed, rng, n, currentCell) { - // The decision of when a table cell is selected is somewhat involved. The fact that this code is - // required is actually a pointer to the root cause of this bug. A cell is selected when the start - // and end offsets are 0, the start container is a text, and the selection node is either a TR (most cases) - // or the parent of the table (in the case of the selection containing the last cell of a table). - var TEXT_NODE = 3, table = ed.dom.getParent(rng.startContainer, 'TABLE'), - tableParent, allOfCellSelected, tableCellSelection; - if (table) - tableParent = table.parentNode; - allOfCellSelected =rng.startContainer.nodeType == TEXT_NODE && - rng.startOffset == 0 && - rng.endOffset == 0 && - currentCell && - (n.nodeName=="TR" || n==tableParent); - tableCellSelection = (n.nodeName=="TD"||n.nodeName=="TH")&& !currentCell; - return allOfCellSelected || tableCellSelection; - // return false; - } - - // this nasty hack is here to work around some WebKit selection bugs. - function fixTableCellSelection(ed) { - if (!tinymce.isWebKit) - return; - - var rng = ed.selection.getRng(); - var n = ed.selection.getNode(); - var currentCell = ed.dom.getParent(rng.startContainer, 'TD,TH'); - - if (!tableCellSelected(ed, rng, n, currentCell)) - return; - if (!currentCell) { - currentCell=n; - } - - // Get the very last node inside the table cell - var end = currentCell.lastChild; - while (end.lastChild) - end = end.lastChild; - - // Select the entire table cell. Nothing outside of the table cell should be selected. - rng.setEnd(end, end.nodeValue.length); - ed.selection.setRng(rng); - } - ed.plugins.table.fixTableCellSelection=fixTableCellSelection; - - // Add context menu - if (ed && ed.plugins.contextmenu) { - ed.plugins.contextmenu.onContextMenu.add(function(th, m, e) { - var sm, se = ed.selection, el = se.getNode() || ed.getBody(); - - if (ed.dom.getParent(e, 'td') || ed.dom.getParent(e, 'th') || ed.dom.select('td.mceSelected,th.mceSelected').length) { - m.removeAll(); - - if (el.nodeName == 'A' && !ed.dom.getAttrib(el, 'name')) { - m.add({title : 'advanced.link_desc', icon : 'link', cmd : ed.plugins.advlink ? 'mceAdvLink' : 'mceLink', ui : true}); - m.add({title : 'advanced.unlink_desc', icon : 'unlink', cmd : 'UnLink'}); - m.addSeparator(); - } - - if (el.nodeName == 'IMG' && el.className.indexOf('mceItem') == -1) { - m.add({title : 'advanced.image_desc', icon : 'image', cmd : ed.plugins.advimage ? 'mceAdvImage' : 'mceImage', ui : true}); - m.addSeparator(); - } - - m.add({title : 'table.desc', icon : 'table', cmd : 'mceInsertTable', value : {action : 'insert'}}); - m.add({title : 'table.props_desc', icon : 'table_props', cmd : 'mceInsertTable'}); - m.add({title : 'table.del', icon : 'delete_table', cmd : 'mceTableDelete'}); - m.addSeparator(); - - // Cell menu - sm = m.addMenu({title : 'table.cell'}); - sm.add({title : 'table.cell_desc', icon : 'cell_props', cmd : 'mceTableCellProps'}); - sm.add({title : 'table.split_cells_desc', icon : 'split_cells', cmd : 'mceTableSplitCells'}); - sm.add({title : 'table.merge_cells_desc', icon : 'merge_cells', cmd : 'mceTableMergeCells'}); - - // Row menu - sm = m.addMenu({title : 'table.row'}); - sm.add({title : 'table.row_desc', icon : 'row_props', cmd : 'mceTableRowProps'}); - sm.add({title : 'table.row_before_desc', icon : 'row_before', cmd : 'mceTableInsertRowBefore'}); - sm.add({title : 'table.row_after_desc', icon : 'row_after', cmd : 'mceTableInsertRowAfter'}); - sm.add({title : 'table.delete_row_desc', icon : 'delete_row', cmd : 'mceTableDeleteRow'}); - sm.addSeparator(); - sm.add({title : 'table.cut_row_desc', icon : 'cut', cmd : 'mceTableCutRow'}); - sm.add({title : 'table.copy_row_desc', icon : 'copy', cmd : 'mceTableCopyRow'}); - sm.add({title : 'table.paste_row_before_desc', icon : 'paste', cmd : 'mceTablePasteRowBefore'}).setDisabled(!clipboardRows); - sm.add({title : 'table.paste_row_after_desc', icon : 'paste', cmd : 'mceTablePasteRowAfter'}).setDisabled(!clipboardRows); - - // Column menu - sm = m.addMenu({title : 'table.col'}); - sm.add({title : 'table.col_before_desc', icon : 'col_before', cmd : 'mceTableInsertColBefore'}); - sm.add({title : 'table.col_after_desc', icon : 'col_after', cmd : 'mceTableInsertColAfter'}); - sm.add({title : 'table.delete_col_desc', icon : 'delete_col', cmd : 'mceTableDeleteCol'}); - } else - m.add({title : 'table.desc', icon : 'table', cmd : 'mceInsertTable'}); - }); - } - - // Fix to allow navigating up and down in a table in WebKit browsers. - if (tinymce.isWebKit) { - function moveSelection(ed, e) { - var VK = tinymce.VK; - var key = e.keyCode; - - function handle(upBool, sourceNode, event) { - var siblingDirection = upBool ? 'previousSibling' : 'nextSibling'; - var currentRow = ed.dom.getParent(sourceNode, 'tr'); - var siblingRow = currentRow[siblingDirection]; - - if (siblingRow) { - moveCursorToRow(ed, sourceNode, siblingRow, upBool); - tinymce.dom.Event.cancel(event); - return true; - } else { - var tableNode = ed.dom.getParent(currentRow, 'table'); - var middleNode = currentRow.parentNode; - var parentNodeName = middleNode.nodeName.toLowerCase(); - if (parentNodeName === 'tbody' || parentNodeName === (upBool ? 'tfoot' : 'thead')) { - var targetParent = getTargetParent(upBool, tableNode, middleNode, 'tbody'); - if (targetParent !== null) { - return moveToRowInTarget(upBool, targetParent, sourceNode, event); - } - } - return escapeTable(upBool, currentRow, siblingDirection, tableNode, event); - } - } - - function getTargetParent(upBool, topNode, secondNode, nodeName) { - var tbodies = ed.dom.select('>' + nodeName, topNode); - var position = tbodies.indexOf(secondNode); - if (upBool && position === 0 || !upBool && position === tbodies.length - 1) { - return getFirstHeadOrFoot(upBool, topNode); - } else if (position === -1) { - var topOrBottom = secondNode.tagName.toLowerCase() === 'thead' ? 0 : tbodies.length - 1; - return tbodies[topOrBottom]; - } else { - return tbodies[position + (upBool ? -1 : 1)]; - } - } - - function getFirstHeadOrFoot(upBool, parent) { - var tagName = upBool ? 'thead' : 'tfoot'; - var headOrFoot = ed.dom.select('>' + tagName, parent); - return headOrFoot.length !== 0 ? headOrFoot[0] : null; - } - - function moveToRowInTarget(upBool, targetParent, sourceNode, event) { - var targetRow = getChildForDirection(targetParent, upBool); - targetRow && moveCursorToRow(ed, sourceNode, targetRow, upBool); - tinymce.dom.Event.cancel(event); - return true; - } - - function escapeTable(upBool, currentRow, siblingDirection, table, event) { - var tableSibling = table[siblingDirection]; - if (tableSibling) { - moveCursorToStartOfElement(tableSibling); - return true; - } else { - var parentCell = ed.dom.getParent(table, 'td,th'); - if (parentCell) { - return handle(upBool, parentCell, event); - } else { - var backUpSibling = getChildForDirection(currentRow, !upBool); - moveCursorToStartOfElement(backUpSibling); - return tinymce.dom.Event.cancel(event); - } - } - } - - function getChildForDirection(parent, up) { - var child = parent && parent[up ? 'lastChild' : 'firstChild']; - // BR is not a valid table child to return in this case we return the table cell - return child && child.nodeName === 'BR' ? ed.dom.getParent(child, 'td,th') : child; - } - - function moveCursorToStartOfElement(n) { - ed.selection.setCursorLocation(n, 0); - } - - function isVerticalMovement() { - return key == VK.UP || key == VK.DOWN; - } - - function isInTable(ed) { - var node = ed.selection.getNode(); - var currentRow = ed.dom.getParent(node, 'tr'); - return currentRow !== null; - } - - function columnIndex(column) { - var colIndex = 0; - var c = column; - while (c.previousSibling) { - c = c.previousSibling; - colIndex = colIndex + getSpanVal(c, "colspan"); - } - return colIndex; - } - - function findColumn(rowElement, columnIndex) { - var c = 0; - var r = 0; - each(rowElement.children, function(cell, i) { - c = c + getSpanVal(cell, "colspan"); - r = i; - if (c > columnIndex) - return false; - }); - return r; - } - - function moveCursorToRow(ed, node, row, upBool) { - var srcColumnIndex = columnIndex(ed.dom.getParent(node, 'td,th')); - var tgtColumnIndex = findColumn(row, srcColumnIndex); - var tgtNode = row.childNodes[tgtColumnIndex]; - var rowCellTarget = getChildForDirection(tgtNode, upBool); - moveCursorToStartOfElement(rowCellTarget || tgtNode); - } - - function shouldFixCaret(preBrowserNode) { - var newNode = ed.selection.getNode(); - var newParent = ed.dom.getParent(newNode, 'td,th'); - var oldParent = ed.dom.getParent(preBrowserNode, 'td,th'); - return newParent && newParent !== oldParent && checkSameParentTable(newParent, oldParent) - } - - function checkSameParentTable(nodeOne, NodeTwo) { - return ed.dom.getParent(nodeOne, 'TABLE') === ed.dom.getParent(NodeTwo, 'TABLE'); - } - - if (isVerticalMovement() && isInTable(ed)) { - var preBrowserNode = ed.selection.getNode(); - setTimeout(function() { - if (shouldFixCaret(preBrowserNode)) { - handle(!e.shiftKey && key === VK.UP, preBrowserNode, e); - } - }, 0); - } - } - - ed.onKeyDown.add(moveSelection); - } - - // Fixes an issue on Gecko where it's impossible to place the caret behind a table - // This fix will force a paragraph element after the table but only when the forced_root_block setting is enabled - function fixTableCaretPos() { - var last; - - // Skip empty text nodes form the end - for (last = ed.getBody().lastChild; last && last.nodeType == 3 && !last.nodeValue.length; last = last.previousSibling) ; - - if (last && last.nodeName == 'TABLE') { - if (ed.settings.forced_root_block) - ed.dom.add(ed.getBody(), ed.settings.forced_root_block, null, tinymce.isIE && !tinymce.isIE11 ? ' ' : '
    '); - else - ed.dom.add(ed.getBody(), 'br', {'data-mce-bogus': '1'}); - } - }; - - // Fixes an bug where it's impossible to place the caret before a table in Gecko - // this fix solves it by detecting when the caret is at the beginning of such a table - // and then manually moves the caret infront of the table - if (tinymce.isGecko) { - ed.onKeyDown.add(function(ed, e) { - var rng, table, dom = ed.dom; - - // On gecko it's not possible to place the caret before a table - if (e.keyCode == 37 || e.keyCode == 38) { - rng = ed.selection.getRng(); - table = dom.getParent(rng.startContainer, 'table'); - - if (table && ed.getBody().firstChild == table) { - if (isAtStart(rng, table)) { - rng = dom.createRng(); - - rng.setStartBefore(table); - rng.setEndBefore(table); - - ed.selection.setRng(rng); - - e.preventDefault(); - } - } - } - }); - } - - ed.onKeyUp.add(fixTableCaretPos); - ed.onSetContent.add(fixTableCaretPos); - ed.onVisualAid.add(fixTableCaretPos); - - ed.onPreProcess.add(function(ed, o) { - var last = o.node.lastChild; - - if (last && (last.nodeName == "BR" || (last.childNodes.length == 1 && (last.firstChild.nodeName == 'BR' || last.firstChild.nodeValue == '\u00a0'))) && last.previousSibling && last.previousSibling.nodeName == "TABLE") { - ed.dom.remove(last); - } - }); - - - /** - * Fixes bug in Gecko where shift-enter in table cell does not place caret on new line - * - * Removed: Since the new enter logic seems to fix this one. - */ - /* - if (tinymce.isGecko) { - ed.onKeyDown.add(function(ed, e) { - if (e.keyCode === tinymce.VK.ENTER && e.shiftKey) { - var node = ed.selection.getRng().startContainer; - var tableCell = dom.getParent(node, 'td,th'); - if (tableCell) { - var zeroSizedNbsp = ed.getDoc().createTextNode("\uFEFF"); - dom.insertAfter(zeroSizedNbsp, node); - } - } - }); - } - */ - - fixTableCaretPos(); - ed.startContent = ed.getContent({format : 'raw'}); - }); - - // Register action commands - each({ - mceTableSplitCells : function(grid) { - grid.split(); - }, - - mceTableMergeCells : function(grid) { - var rowSpan, colSpan, cell; - - cell = ed.dom.getParent(ed.selection.getNode(), 'th,td'); - if (cell) { - rowSpan = cell.rowSpan; - colSpan = cell.colSpan; - } - - if (!ed.dom.select('td.mceSelected,th.mceSelected').length) { - winMan.open({ - url : url + '/merge_cells.htm', - width : 240 + parseInt(ed.getLang('table.merge_cells_delta_width', 0)), - height : 110 + parseInt(ed.getLang('table.merge_cells_delta_height', 0)), - inline : 1 - }, { - rows : rowSpan, - cols : colSpan, - onaction : function(data) { - grid.merge(cell, data.cols, data.rows); - }, - plugin_url : url - }); - } else - grid.merge(); - }, - - mceTableInsertRowBefore : function(grid) { - grid.insertRow(true); - }, - - mceTableInsertRowAfter : function(grid) { - grid.insertRow(); - }, - - mceTableInsertColBefore : function(grid) { - grid.insertCol(true); - }, - - mceTableInsertColAfter : function(grid) { - grid.insertCol(); - }, - - mceTableDeleteCol : function(grid) { - grid.deleteCols(); - }, - - mceTableDeleteRow : function(grid) { - grid.deleteRows(); - }, - - mceTableCutRow : function(grid) { - clipboardRows = grid.cutRows(); - }, - - mceTableCopyRow : function(grid) { - clipboardRows = grid.copyRows(); - }, - - mceTablePasteRowBefore : function(grid) { - grid.pasteRows(clipboardRows, true); - }, - - mceTablePasteRowAfter : function(grid) { - grid.pasteRows(clipboardRows); - }, - - mceTableDelete : function(grid) { - grid.deleteTable(); - } - }, function(func, name) { - ed.addCommand(name, function() { - var grid = createTableGrid(); - - if (grid) { - func(grid); - ed.execCommand('mceRepaint'); - cleanup(); - } - }); - }); - - // Register dialog commands - each({ - mceInsertTable : function(val) { - winMan.open({ - url : url + '/table.htm', - width : 400 + parseInt(ed.getLang('table.table_delta_width', 0)), - height : 320 + parseInt(ed.getLang('table.table_delta_height', 0)), - inline : 1 - }, { - plugin_url : url, - action : val ? val.action : 0 - }); - }, - - mceTableRowProps : function() { - winMan.open({ - url : url + '/row.htm', - width : 400 + parseInt(ed.getLang('table.rowprops_delta_width', 0)), - height : 295 + parseInt(ed.getLang('table.rowprops_delta_height', 0)), - inline : 1 - }, { - plugin_url : url - }); - }, - - mceTableCellProps : function() { - winMan.open({ - url : url + '/cell.htm', - width : 400 + parseInt(ed.getLang('table.cellprops_delta_width', 0)), - height : 295 + parseInt(ed.getLang('table.cellprops_delta_height', 0)), - inline : 1 - }, { - plugin_url : url - }); - } - }, function(func, name) { - ed.addCommand(name, function(ui, val) { - func(val); - }); - }); - } - }); - - // Register plugin - tinymce.PluginManager.add('table', tinymce.plugins.TablePlugin); -})(tinymce); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/table/js/cell.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/table/js/cell.js deleted file mode 100644 index 02ecf22c8a..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/table/js/cell.js +++ /dev/null @@ -1,319 +0,0 @@ -tinyMCEPopup.requireLangPack(); - -var ed; - -function init() { - ed = tinyMCEPopup.editor; - tinyMCEPopup.resizeToInnerSize(); - - document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table'); - document.getElementById('bordercolor_pickcontainer').innerHTML = getColorPickerHTML('bordercolor_pick','bordercolor'); - document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor') - - var inst = ed; - var tdElm = ed.dom.getParent(ed.selection.getStart(), "td,th"); - var formObj = document.forms[0]; - var st = ed.dom.parseStyle(ed.dom.getAttrib(tdElm, "style")); - - // Get table cell data - var celltype = tdElm.nodeName.toLowerCase(); - var align = ed.dom.getAttrib(tdElm, 'align'); - var valign = ed.dom.getAttrib(tdElm, 'valign'); - var width = trimSize(getStyle(tdElm, 'width', 'width')); - var height = trimSize(getStyle(tdElm, 'height', 'height')); - var bordercolor = convertRGBToHex(getStyle(tdElm, 'bordercolor', 'borderLeftColor')); - var bgcolor = convertRGBToHex(getStyle(tdElm, 'bgcolor', 'backgroundColor')); - var className = ed.dom.getAttrib(tdElm, 'class'); - var backgroundimage = getStyle(tdElm, 'background', 'backgroundImage').replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)", 'gi'), "$1"); - var id = ed.dom.getAttrib(tdElm, 'id'); - var lang = ed.dom.getAttrib(tdElm, 'lang'); - var dir = ed.dom.getAttrib(tdElm, 'dir'); - var scope = ed.dom.getAttrib(tdElm, 'scope'); - - // Setup form - addClassesToList('class', 'table_cell_styles'); - TinyMCE_EditableSelects.init(); - - if (!ed.dom.hasClass(tdElm, 'mceSelected')) { - formObj.bordercolor.value = bordercolor; - formObj.bgcolor.value = bgcolor; - formObj.backgroundimage.value = backgroundimage; - formObj.width.value = width; - formObj.height.value = height; - formObj.id.value = id; - formObj.lang.value = lang; - formObj.style.value = ed.dom.serializeStyle(st); - selectByValue(formObj, 'align', align); - selectByValue(formObj, 'valign', valign); - selectByValue(formObj, 'class', className, true, true); - selectByValue(formObj, 'celltype', celltype); - selectByValue(formObj, 'dir', dir); - selectByValue(formObj, 'scope', scope); - - // Resize some elements - if (isVisible('backgroundimagebrowser')) - document.getElementById('backgroundimage').style.width = '180px'; - - updateColor('bordercolor_pick', 'bordercolor'); - updateColor('bgcolor_pick', 'bgcolor'); - } else - tinyMCEPopup.dom.hide('action'); -} - -function updateAction() { - var el, inst = ed, tdElm, trElm, tableElm, formObj = document.forms[0]; - - if (!AutoValidator.validate(formObj)) { - tinyMCEPopup.alert(AutoValidator.getErrorMessages(formObj).join('. ') + '.'); - return false; - } - - tinyMCEPopup.restoreSelection(); - el = ed.selection.getStart(); - tdElm = ed.dom.getParent(el, "td,th"); - trElm = ed.dom.getParent(el, "tr"); - tableElm = ed.dom.getParent(el, "table"); - - // Cell is selected - if (ed.dom.hasClass(tdElm, 'mceSelected')) { - // Update all selected sells - tinymce.each(ed.dom.select('td.mceSelected,th.mceSelected'), function(td) { - updateCell(td); - }); - - ed.addVisual(); - ed.nodeChanged(); - inst.execCommand('mceEndUndoLevel'); - tinyMCEPopup.close(); - return; - } - - switch (getSelectValue(formObj, 'action')) { - case "cell": - var celltype = getSelectValue(formObj, 'celltype'); - var scope = getSelectValue(formObj, 'scope'); - - function doUpdate(s) { - if (s) { - updateCell(tdElm); - - ed.addVisual(); - ed.nodeChanged(); - inst.execCommand('mceEndUndoLevel'); - tinyMCEPopup.close(); - } - }; - - if (ed.getParam("accessibility_warnings", 1)) { - if (celltype == "th" && scope == "") - tinyMCEPopup.confirm(ed.getLang('table_dlg.missing_scope', '', true), doUpdate); - else - doUpdate(1); - - return; - } - - updateCell(tdElm); - break; - - case "row": - var cell = trElm.firstChild; - - if (cell.nodeName != "TD" && cell.nodeName != "TH") - cell = nextCell(cell); - - do { - cell = updateCell(cell, true); - } while ((cell = nextCell(cell)) != null); - - break; - - case "col": - var curr, col = 0, cell = trElm.firstChild, rows = tableElm.getElementsByTagName("tr"); - - if (cell.nodeName != "TD" && cell.nodeName != "TH") - cell = nextCell(cell); - - do { - if (cell == tdElm) - break; - col += cell.getAttribute("colspan")?cell.getAttribute("colspan"):1; - } while ((cell = nextCell(cell)) != null); - - for (var i=0; i 0) { - tinymce.each(tableElm.rows, function(tr) { - var i; - - for (i = 0; i < tr.cells.length; i++) { - if (dom.hasClass(tr.cells[i], 'mceSelected')) { - updateRow(tr, true); - return; - } - } - }); - - inst.addVisual(); - inst.nodeChanged(); - inst.execCommand('mceEndUndoLevel'); - tinyMCEPopup.close(); - return; - } - - switch (action) { - case "row": - updateRow(trElm); - break; - - case "all": - var rows = tableElm.getElementsByTagName("tr"); - - for (var i=0; i colLimit) { - tinyMCEPopup.alert(inst.getLang('table_dlg.col_limit').replace(/\{\$cols\}/g, colLimit)); - return false; - } else if (rowLimit && rows > rowLimit) { - tinyMCEPopup.alert(inst.getLang('table_dlg.row_limit').replace(/\{\$rows\}/g, rowLimit)); - return false; - } else if (cellLimit && cols * rows > cellLimit) { - tinyMCEPopup.alert(inst.getLang('table_dlg.cell_limit').replace(/\{\$cells\}/g, cellLimit)); - return false; - } - - // Update table - if (action == "update") { - dom.setAttrib(elm, 'cellPadding', cellpadding, true); - dom.setAttrib(elm, 'cellSpacing', cellspacing, true); - - if (!isCssSize(border)) { - dom.setAttrib(elm, 'border', border); - } else { - dom.setAttrib(elm, 'border', ''); - } - - if (border == '') { - dom.setStyle(elm, 'border-width', ''); - dom.setStyle(elm, 'border', ''); - dom.setAttrib(elm, 'border', ''); - } - - dom.setAttrib(elm, 'align', align); - dom.setAttrib(elm, 'frame', frame); - dom.setAttrib(elm, 'rules', rules); - dom.setAttrib(elm, 'class', className); - dom.setAttrib(elm, 'style', style); - dom.setAttrib(elm, 'id', id); - dom.setAttrib(elm, 'summary', summary); - dom.setAttrib(elm, 'dir', dir); - dom.setAttrib(elm, 'lang', lang); - - capEl = inst.dom.select('caption', elm)[0]; - - if (capEl && !caption) - capEl.parentNode.removeChild(capEl); - - if (!capEl && caption) { - capEl = elm.ownerDocument.createElement('caption'); - - if (!tinymce.isIE || tinymce.isIE11) - capEl.innerHTML = '
    '; - - elm.insertBefore(capEl, elm.firstChild); - } - - if (width && inst.settings.inline_styles) { - dom.setStyle(elm, 'width', width); - dom.setAttrib(elm, 'width', ''); - } else { - dom.setAttrib(elm, 'width', width, true); - dom.setStyle(elm, 'width', ''); - } - - // Remove these since they are not valid XHTML - dom.setAttrib(elm, 'borderColor', ''); - dom.setAttrib(elm, 'bgColor', ''); - dom.setAttrib(elm, 'background', ''); - - if (height && inst.settings.inline_styles) { - dom.setStyle(elm, 'height', height); - dom.setAttrib(elm, 'height', ''); - } else { - dom.setAttrib(elm, 'height', height, true); - dom.setStyle(elm, 'height', ''); - } - - if (background != '') - elm.style.backgroundImage = "url('" + background + "')"; - else - elm.style.backgroundImage = ''; - -/* if (tinyMCEPopup.getParam("inline_styles")) { - if (width != '') - elm.style.width = getCSSSize(width); - }*/ - - if (bordercolor != "") { - elm.style.borderColor = bordercolor; - elm.style.borderStyle = elm.style.borderStyle == "" ? "solid" : elm.style.borderStyle; - elm.style.borderWidth = cssSize(border); - } else - elm.style.borderColor = ''; - - elm.style.backgroundColor = bgcolor; - elm.style.height = getCSSSize(height); - - inst.addVisual(); - - // Fix for stange MSIE align bug - //elm.outerHTML = elm.outerHTML; - - inst.nodeChanged(); - inst.execCommand('mceEndUndoLevel', false, {}, {skip_undo: true}); - - // Repaint if dimensions changed - if (formObj.width.value != orgTableWidth || formObj.height.value != orgTableHeight) - inst.execCommand('mceRepaint'); - - tinyMCEPopup.close(); - return true; - } - - // Create new table - html += ''); - - tinymce.each('h1,h2,h3,h4,h5,h6,p'.split(','), function(n) { - if (patt) - patt += ','; - - patt += n + ' ._mce_marker'; - }); - - tinymce.each(inst.dom.select(patt), function(n) { - inst.dom.split(inst.dom.getParent(n, 'h1,h2,h3,h4,h5,h6,p'), n); - }); - - dom.setOuterHTML(dom.select('br._mce_marker')[0], html); - } else - inst.execCommand('mceInsertContent', false, html); - - tinymce.each(dom.select('table[data-mce-new]'), function(node) { - var tdorth = dom.select('td,th', node); - - // Fixes a bug in IE where the caret cannot be placed after the table if the table is at the end of the document - if (tinymce.isIE && !tinymce.isIE11 && node.nextSibling == null) { - if (inst.settings.forced_root_block) - dom.insertAfter(dom.create(inst.settings.forced_root_block), node); - else - dom.insertAfter(dom.create('br', {'data-mce-bogus': '1'}), node); - } - - try { - // IE9 might fail to do this selection - inst.selection.setCursorLocation(tdorth[0], 0); - } catch (ex) { - // Ignore - } - - dom.setAttrib(node, 'data-mce-new', ''); - }); - - inst.addVisual(); - inst.execCommand('mceEndUndoLevel', false, {}, {skip_undo: true}); - - tinyMCEPopup.close(); -} - -function makeAttrib(attrib, value) { - var formObj = document.forms[0]; - var valueElm = formObj.elements[attrib]; - - if (typeof(value) == "undefined" || value == null) { - value = ""; - - if (valueElm) - value = valueElm.value; - } - - if (value == "") - return ""; - - // XML encode it - value = value.replace(/&/g, '&'); - value = value.replace(/\"/g, '"'); - value = value.replace(//g, '>'); - - return ' ' + attrib + '="' + value + '"'; -} - -function init() { - tinyMCEPopup.resizeToInnerSize(); - - document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table'); - document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table'); - document.getElementById('bordercolor_pickcontainer').innerHTML = getColorPickerHTML('bordercolor_pick','bordercolor'); - document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor'); - - var cols = 2, rows = 2, border = tinyMCEPopup.getParam('table_default_border', '0'), cellpadding = tinyMCEPopup.getParam('table_default_cellpadding', ''), cellspacing = tinyMCEPopup.getParam('table_default_cellspacing', ''); - var align = "", width = "", height = "", bordercolor = "", bgcolor = "", className = ""; - var id = "", summary = "", style = "", dir = "", lang = "", background = "", bgcolor = "", bordercolor = "", rules = "", frame = ""; - var inst = tinyMCEPopup.editor, dom = inst.dom; - var formObj = document.forms[0]; - var elm = dom.getParent(inst.selection.getNode(), "table"); - - // Hide advanced fields that isn't available in the schema - tinymce.each("summary id rules dir style frame".split(" "), function(name) { - var tr = tinyMCEPopup.dom.getParent(name, "tr") || tinyMCEPopup.dom.getParent("t" + name, "tr"); - - if (tr && !tinyMCEPopup.editor.schema.isValid("table", name)) { - tr.style.display = 'none'; - } - }); - - action = tinyMCEPopup.getWindowArg('action'); - - if (!action) - action = elm ? "update" : "insert"; - - if (elm && action != "insert") { - var rowsAr = elm.rows; - var cols = 0; - for (var i=0; i cols) - cols = rowsAr[i].cells.length; - - cols = cols; - rows = rowsAr.length; - - st = dom.parseStyle(dom.getAttrib(elm, "style")); - border = trimSize(getStyle(elm, 'border', 'borderWidth')); - cellpadding = dom.getAttrib(elm, 'cellpadding', ""); - cellspacing = dom.getAttrib(elm, 'cellspacing', ""); - width = trimSize(getStyle(elm, 'width', 'width')); - height = trimSize(getStyle(elm, 'height', 'height')); - bordercolor = convertRGBToHex(getStyle(elm, 'bordercolor', 'borderLeftColor')); - bgcolor = convertRGBToHex(getStyle(elm, 'bgcolor', 'backgroundColor')); - align = dom.getAttrib(elm, 'align', align); - frame = dom.getAttrib(elm, 'frame'); - rules = dom.getAttrib(elm, 'rules'); - className = tinymce.trim(dom.getAttrib(elm, 'class').replace(/mceItem.+/g, '')); - id = dom.getAttrib(elm, 'id'); - summary = dom.getAttrib(elm, 'summary'); - style = dom.serializeStyle(st); - dir = dom.getAttrib(elm, 'dir'); - lang = dom.getAttrib(elm, 'lang'); - background = getStyle(elm, 'background', 'backgroundImage').replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)", 'gi'), "$1"); - formObj.caption.checked = elm.getElementsByTagName('caption').length > 0; - - orgTableWidth = width; - orgTableHeight = height; - - action = "update"; - formObj.insert.value = inst.getLang('update'); - } - - addClassesToList('class', "table_styles"); - TinyMCE_EditableSelects.init(); - - // Update form - selectByValue(formObj, 'align', align); - selectByValue(formObj, 'tframe', frame); - selectByValue(formObj, 'rules', rules); - selectByValue(formObj, 'class', className, true, true); - formObj.cols.value = cols; - formObj.rows.value = rows; - formObj.border.value = border; - formObj.cellpadding.value = cellpadding; - formObj.cellspacing.value = cellspacing; - formObj.width.value = width; - formObj.height.value = height; - formObj.bordercolor.value = bordercolor; - formObj.bgcolor.value = bgcolor; - formObj.id.value = id; - formObj.summary.value = summary; - formObj.style.value = style; - formObj.dir.value = dir; - formObj.lang.value = lang; - formObj.backgroundimage.value = background; - - updateColor('bordercolor_pick', 'bordercolor'); - updateColor('bgcolor_pick', 'bgcolor'); - - // Resize some elements - if (isVisible('backgroundimagebrowser')) - document.getElementById('backgroundimage').style.width = '180px'; - - // Disable some fields in update mode - if (action == "update") { - formObj.cols.disabled = true; - formObj.rows.disabled = true; - } -} - -function changedSize() { - var formObj = document.forms[0]; - var st = dom.parseStyle(formObj.style.value); - -/* var width = formObj.width.value; - if (width != "") - st['width'] = tinyMCEPopup.getParam("inline_styles") ? getCSSSize(width) : ""; - else - st['width'] = "";*/ - - var height = formObj.height.value; - if (height != "") - st['height'] = getCSSSize(height); - else - st['height'] = ""; - - formObj.style.value = dom.serializeStyle(st); -} - -function isCssSize(value) { - return /^[0-9.]+(%|in|cm|mm|em|ex|pt|pc|px)$/.test(value); -} - -function cssSize(value, def) { - value = tinymce.trim(value || def); - - if (!isCssSize(value)) { - return parseInt(value, 10) + 'px'; - } - - return value; -} - -function changedBackgroundImage() { - var formObj = document.forms[0]; - var st = dom.parseStyle(formObj.style.value); - - st['background-image'] = "url('" + formObj.backgroundimage.value + "')"; - - formObj.style.value = dom.serializeStyle(st); -} - -function changedBorder() { - var formObj = document.forms[0]; - var st = dom.parseStyle(formObj.style.value); - - // Update border width if the element has a color - if (formObj.border.value != "" && (isCssSize(formObj.border.value) || formObj.bordercolor.value != "")) - st['border-width'] = cssSize(formObj.border.value); - else { - if (!formObj.border.value) { - st['border'] = ''; - st['border-width'] = ''; - } - } - - formObj.style.value = dom.serializeStyle(st); -} - -function changedColor() { - var formObj = document.forms[0]; - var st = dom.parseStyle(formObj.style.value); - - st['background-color'] = formObj.bgcolor.value; - - if (formObj.bordercolor.value != "") { - st['border-color'] = formObj.bordercolor.value; - - // Add border-width if it's missing - if (!st['border-width']) - st['border-width'] = cssSize(formObj.border.value, 1); - } - - formObj.style.value = dom.serializeStyle(st); -} - -function changedStyle() { - var formObj = document.forms[0]; - var st = dom.parseStyle(formObj.style.value); - - if (st['background-image']) - formObj.backgroundimage.value = st['background-image'].replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)", 'gi'), "$1"); - else - formObj.backgroundimage.value = ''; - - if (st['width']) - formObj.width.value = trimSize(st['width']); - - if (st['height']) - formObj.height.value = trimSize(st['height']); - - if (st['background-color']) { - formObj.bgcolor.value = st['background-color']; - updateColor('bgcolor_pick','bgcolor'); - } - - if (st['border-color']) { - formObj.bordercolor.value = st['border-color']; - updateColor('bordercolor_pick','bordercolor'); - } -} - -tinyMCEPopup.onInit.add(init); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/table/langs/da_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/table/langs/da_dlg.js deleted file mode 100644 index 13220a5a16..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/table/langs/da_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('da.table_dlg',{"rules_border":"kant","rules_box":"boks","rules_vsides":"vsides","rules_rhs":"rhs","rules_lhs":"lhs","rules_hsides":"hsides","rules_below":"under","rules_above":"over","rules_void":"void",rules:"Regler","frame_all":"alle","frame_cols":"kolonner","frame_rows":"r\u00e6kker","frame_groups":"grupper","frame_none":"ingen",frame:"Ramme",caption:"Tabeloverskrift","missing_scope":"Er du sikker p\u00e5, du vil forts\u00e6tte uden at angive forklaring for denne overskriftscelle? Uden forklaring vil v\u00e6re sv\u00e6rt for f.ek.s blinde at l\u00e6se og forst\u00e5 indholdet i tabellen.","cell_limit":"Du har overskredet antallet af tilladte celler p\u00e5 {$cells}.","row_limit":"Du har overskredet antallet af tilladte r\u00e6kker p\u00e5 {$rows}.","col_limit":"Du har overskredet antallet af tilladte kolonner p\u00e5 {$cols}.",colgroup:"Kolonnegruppe",rowgroup:"R\u00e6kkegruppe",scope:"Forklaring",tfoot:"Tabelfod",tbody:"Tabelkrop",thead:"Tabelhoved","row_all":"Opdater alle r\u00e6kker","row_even":"Opdater lige r\u00e6kker","row_odd":"Opdater ulige r\u00e6kker","row_row":"Opdater aktuelle celle","cell_all":"Opdater alle celler i tabellen","cell_row":"Opdater alle celler i r\u00e6kken","cell_cell":"Opdater aktuelle celle",th:"Hoved",td:"Data",summary:"Beskrivelse",bgimage:"Baggrundsbillede",rtl:"H\u00f8jre mod venstre",ltr:"Venstre mod h\u00f8jre",mime:"Destinations-MIME-type",langcode:"Sprogkode",langdir:"Sprogretning",style:"Style",id:"Id","merge_cells_title":"Flet celler",bgcolor:"Baggrundsfarve",bordercolor:"Kantfarve","align_bottom":"Bund","align_top":"Top",valign:"Vertikal justering","cell_type":"Celletype","cell_title":"Celleegenskaber","row_title":"R\u00e6kkeegenskaber","align_middle":"Centreret","align_right":"H\u00f8jre","align_left":"Venstre","align_default":"Standard",align:"Justering",border:"Kant",cellpadding:"Afstand til celleindhold",cellspacing:"Afstand mellem celler",rows:"R\u00e6kker",cols:"Kolonner",height:"H\u00f8jde",width:"Bredde",title:"Inds\u00e6t/rediger tabel",rowtype:"R\u00e6kke i tabel del","advanced_props":"Avancerede egenskaber","general_props":"Generelle egenskaber","advanced_tab":"Avanceret","general_tab":"Generelt","cell_col":"Opdat\u00e9r alle celler i en s\u00f8jle"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/table/langs/de_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/table/langs/de_dlg.js deleted file mode 100644 index 5a64ebd729..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/table/langs/de_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('de.table_dlg',{"rules_border":"alle 4 Seiten (Border)","rules_box":"alle 4 Seiten (Box)","rules_vsides":"links und rechts","rules_rhs":"nur rechts","rules_lhs":"nur links","rules_hsides":"oben und unten","rules_below":"nur unten","rules_above":"nur oben","rules_void":"keins",rules:"Gitter","frame_all":"zwischen allen Zellen","frame_cols":"zwischen Spalten","frame_rows":"zwischen Zeilen","frame_groups":"zwischen Gruppen","frame_none":"keine",frame:"Rahmen",caption:"Beschriftung der Tabelle","missing_scope":"Wollen Sie wirklich keine Beziehung f\u00fcr diese \u00dcberschrift angeben? Benutzer mit k\u00f6rperlichen Einschr\u00e4nkungen k\u00f6nnten Schwierigkeiten haben, den Inhalt der Tabelle zu verstehen.","cell_limit":"Sie haben die maximale Zellenzahl von {$cells} \u00fcberschritten.","row_limit":"Sie haben die maximale Zeilenzahl von {$rows} \u00fcberschritten.","col_limit":"Sie haben die maximale Spaltenzahl von {$cols} \u00fcberschritten.",colgroup:"Horizontal gruppieren",rowgroup:"Vertikal gruppieren",scope:"Bezug",tfoot:"Tabellenfu\u00df",tbody:"Tabelleninhalt",thead:"Tabellenkopf","row_all":"Alle Zeilen ver\u00e4ndern","row_even":"Gerade Zeilen ver\u00e4ndern","row_odd":"Ungerade Zeilen ver\u00e4ndern","row_row":"Diese Zeile ver\u00e4ndern","cell_all":"Alle Zellen der Tabelle ver\u00e4ndern","cell_row":"Alle Zellen in dieser Zeile ver\u00e4ndern","cell_cell":"Diese Zelle ver\u00e4ndern",th:"\u00dcberschrift",td:"Textzelle",summary:"Zusammenfassung",bgimage:"Hintergrundbild",rtl:"Rechts nach links",ltr:"Links nach rechts",mime:"MIME-Type des Inhalts",langcode:"Sprachcode",langdir:"Schriftrichtung",style:"Format",id:"ID","merge_cells_title":"Zellen vereinen",bgcolor:"Hintergrundfarbe",bordercolor:"Rahmenfarbe","align_bottom":"Unten","align_top":"Oben",valign:"Vertikale Ausrichtung","cell_type":"Zellentyp","cell_title":"Eigenschaften der Zelle","row_title":"Eigenschaften der Zeile","align_middle":"Mittig","align_right":"Rechts","align_left":"Links","align_default":"Standard",align:"Ausrichtung",border:"Rahmen",cellpadding:"Abstand innerhalb der Zellen",cellspacing:"Zellenabstand",rows:"Zeilen",cols:"Spalten",height:"H\u00f6he",width:"Breite",title:"Tabelle einf\u00fcgen/bearbeiten",rowtype:"Gruppierung","advanced_props":"Erweiterte Einstellungen","general_props":"Allgemeine Einstellungen","advanced_tab":"Erweitert","general_tab":"Allgemein","cell_col":"Alle Zellen in dieser Spalte aktualisieren"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/table/langs/en_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/table/langs/en_dlg.js deleted file mode 100644 index 463e09ee1b..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/table/langs/en_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('en.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"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/table/langs/en_us_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/table/langs/en_us_dlg.js deleted file mode 100644 index 4d5d7c9a7d..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/table/langs/en_us_dlg.js +++ /dev/null @@ -1 +0,0 @@ -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"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/table/langs/fi_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/table/langs/fi_dlg.js deleted file mode 100644 index 87ed836491..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/table/langs/fi_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('fi.table_dlg',{"rules_border":"kehys","rules_box":"laatikko","rules_vsides":"pystysuorat reunat","rules_rhs":"rhs","rules_lhs":"lhs","rules_hsides":"vaakasuorat reunat","rules_below":"alapuoli","rules_above":"yl\u00e4puoli","rules_void":"tyhj\u00e4",rules:"S\u00e4\u00e4nn\u00f6t","frame_all":"kaikki","frame_cols":"sarakkeet","frame_rows":"rivit","frame_groups":"ryhm\u00e4t","frame_none":"ei mit\u00e4\u00e4n",frame:"kehys",caption:"Taulukon seloste","missing_scope":"Haluatko varmasti jatkaa m\u00e4\u00e4ritt\u00e4m\u00e4tt\u00e4 tilaa t\u00e4lle taulukon otsakesolulle? Ilman sit\u00e4 joidenkin k\u00e4ytt\u00e4jien voi olla vaikea ymm\u00e4rt\u00e4\u00e4 taulukon sis\u00e4lt\u00e4m\u00e4\u00e4 informaatiota.","cell_limit":"Olet ylitt\u00e4nyt suurimman sallitun m\u00e4\u00e4r\u00e4n soluja {$cells}.","row_limit":"Olet ylitt\u00e4nyt suurimman sallitun m\u00e4\u00e4r\u00e4n rivej\u00e4 {$rows}.","col_limit":"Olet ylitt\u00e4nyt suurimman sallitun m\u00e4\u00e4r\u00e4n sarakkeita {$cols}.",colgroup:"Sarake ryhm\u00e4",rowgroup:"Rivi ryhm\u00e4",scope:"Tila",tfoot:"Taulukon alaosa",tbody:"Taulukon runko",thead:"Taulukon otsake","row_all":"P\u00e4ivit\u00e4 kaikki taulukon rivit","row_even":"P\u00e4ivit\u00e4 taulukon parilliset rivit","row_odd":"P\u00e4ivit\u00e4 taulukon parittomat rivit","row_row":"P\u00e4ivit\u00e4 rivi","cell_all":"P\u00e4ivit\u00e4 kaikki taulukon solut","cell_row":"P\u00e4ivit\u00e4 kaikki rivin solut","cell_cell":"P\u00e4ivit\u00e4 solu",th:"Otsake",td:"Tietue",summary:"Yhteenveto",bgimage:"Taustakuva",rtl:"Oikealta vasemmalle",ltr:"Vasemmalta oikealle",mime:"Kohteen MIME-tyyppi",langcode:"Kielen koodi",langdir:"Kielen suunta",style:"Tyyli",id:"Id","merge_cells_title":"Yhdist\u00e4 taulukon solut",bgcolor:"Taustan v\u00e4ri",bordercolor:"Kehyksen v\u00e4ri","align_bottom":"Alas","align_top":"Yl\u00f6s",valign:"Pystysuunnan tasaus","cell_type":"Solun tyyppi","cell_title":"Taulukon solun asetukset","row_title":"Taulukon rivin asetukset","align_middle":"Keskitetty","align_right":"Oikea","align_left":"Vasen","align_default":"Oletus",align:"Tasaus",border:"Kehys",cellpadding:"Solun tyhj\u00e4 tila",cellspacing:"Solun v\u00e4li",rows:"Rivit",cols:"Sarakkeet",height:"Korkeus",width:"Leveys",title:"Lis\u00e4\u00e4/muokkaa taulukkoa",rowtype:"Rivi taulukon osassa","advanced_props":"Edistyneet asetukset","general_props":"Yleiset asetukset","advanced_tab":"Edistynyt","general_tab":"Yleiset","cell_col":"P\u00e4ivit\u00e4 kaikki sarakkeen solut"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/table/langs/fr_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/table/langs/fr_dlg.js deleted file mode 100644 index 9f9488af5f..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/table/langs/fr_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('fr.table_dlg',{"rules_border":"bordure","rules_box":"bo\u00eete","rules_vsides":"verticales","rules_rhs":"\u00e0 droite","rules_lhs":"\u00e0 gauche","rules_hsides":"horizontales","rules_below":"au-dessous","rules_above":"au-dessus","rules_void":"aucune",rules:"R\u00e8gles","frame_all":"tous","frame_cols":"colonnes","frame_rows":"lignes","frame_groups":"groupe","frame_none":"aucun",frame:"Cadre",caption:"Afficher la l\u00e9gende du tableau","missing_scope":"\u00cates-vous s\u00fbr de vouloir continuer sans sp\u00e9cifier de port\u00e9e pour cette cellule de titre ? Sans port\u00e9e, cela peut \u00eatre difficile pour certains utilisateurs de comprendre le contenu ou les donn\u00e9es affich\u00e9es dans le tableau.","cell_limit":"Vous avez d\u00e9pass\u00e9 le nombre maximum de cellules ({$cells}).","row_limit":"Vous avez d\u00e9pass\u00e9 le nombre maximum de lignes ({$rows}).","col_limit":"Vous avez d\u00e9pass\u00e9 le nombre maximum de colonnes ({$cols}).",colgroup:"Groupe de colonnes",rowgroup:"Groupe de lignes",scope:"Port\u00e9e",tfoot:"Pied de tableau",tbody:"Corps de tableau",thead:"En-t\u00eates de tableau","row_all":"Mettre \u00e0 jour toutes les lignes du tableau","row_even":"Mettre \u00e0 jour les lignes paires","row_odd":"Mettre \u00e0 jour les lignes impaires","row_row":"Mettre \u00e0 jour la ligne courante","cell_all":"Mettre \u00e0 jour toutes les cellules du tableau","cell_row":"Mettre \u00e0 jour toutes les cellules de la ligne","cell_cell":"Mettre \u00e0 jour la cellule courante",th:"Titre",td:"Donn\u00e9es",summary:"R\u00e9sum\u00e9",bgimage:"Image de fond",rtl:"de droite \u00e0 gauche",ltr:"De gauche \u00e0 droite",mime:"Type MIME de la cible",langcode:"Code de la langue",langdir:"Sens de lecture",style:"Style",id:"Id","merge_cells_title":"Fusionner les cellules",bgcolor:"Couleur du fond",bordercolor:"Couleur de la bordure","align_bottom":"Bas","align_top":"Haut",valign:"Alignement vertical","cell_type":"Type de cellule","cell_title":"Propri\u00e9t\u00e9s de la cellule","row_title":"Propri\u00e9t\u00e9s de la ligne","align_middle":"Centr\u00e9","align_right":"Droite","align_left":"Gauche","align_default":"Par d\u00e9faut",align:"Alignement",border:"Bordure",cellpadding:"Espacement dans les cellules",cellspacing:"Espacement entre les cellules",rows:"Lignes",cols:"Colonnes",height:"Hauteur",width:"Largeur",title:"Ins\u00e9rer / modifier un tableau",rowtype:"Type de ligne","advanced_props":"Propri\u00e9t\u00e9s avanc\u00e9es","general_props":"Propri\u00e9t\u00e9s g\u00e9n\u00e9rales","advanced_tab":"Avanc\u00e9","general_tab":"G\u00e9n\u00e9ral","cell_col":"Mettre \u00e0 jour toutes les cellules de la colonne"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/table/langs/he_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/table/langs/he_dlg.js deleted file mode 100644 index 25371ea708..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/table/langs/he_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('he.table_dlg',{"rules_border":"\u05d2\u05d1\u05d5\u05dc","rules_box":"box","rules_vsides":"vsides","rules_rhs":"rhs","rules_lhs":"lhs","rules_hsides":"hsides","rules_below":"\u05de\u05ea\u05d7\u05ea","rules_above":"\u05de\u05e2\u05dc","rules_void":"void",rules:"\u05d7\u05d5\u05e7\u05d9\u05dd","frame_all":"\u05d4\u05db\u05d5\u05dc","frame_cols":"\u05e2\u05de\u05d5\u05d3\u05d5\u05ea","frame_rows":"\u05e9\u05d5\u05e8\u05d5\u05ea","frame_groups":"\u05e7\u05d1\u05d5\u05e6\u05d5\u05ea","frame_none":"\u05dc\u05dc\u05d0",frame:"Frame",caption:"\u05db\u05d5\u05ea\u05e8\u05ea \u05d4\u05d8\u05d1\u05dc\u05d4","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":"\u05d7\u05e8\u05d9\u05d2\u05d4 \u05de\u05de\u05e1\u05e4\u05e8 \u05d4\u05de\u05e7\u05e1\u05d9\u05de\u05d0\u05dc\u05d9 \u05e9\u05dc \u05d4\u05ea\u05d0\u05d9\u05dd \u05d1\u05d8\u05d1\u05dc\u05d4 \u05e9\u05dc {$cells}.","row_limit":"\u05d7\u05e8\u05d9\u05d2\u05d4 \u05de\u05de\u05e1\u05e4\u05e8 \u05d4\u05de\u05e7\u05e1\u05d9\u05de\u05d0\u05dc\u05d9 \u05e9\u05dc \u05d4\u05e9\u05d5\u05e8\u05d5\u05ea \u05e9\u05dc {$rows}.","col_limit":"\u05d7\u05e8\u05d9\u05d2\u05d4 \u05de\u05de\u05e1\u05e4\u05e8 \u05d4\u05e2\u05de\u05d5\u05d3\u05d5\u05ea \u05d4\u05de\u05e7\u05e1\u05d9\u05de\u05d0\u05dc\u05d9 \u05e9\u05dc {$cols}.",colgroup:"Col Group",rowgroup:"Row Group",scope:"Scope",tfoot:"\u05e9\u05d5\u05e8\u05d4 \u05ea\u05d7\u05ea\u05d9\u05ea",tbody:"\u05e9\u05d5\u05e8\u05d4 \u05e8\u05d2\u05d9\u05dc\u05d4",thead:"\u05e9\u05d5\u05e8\u05ea \u05db\u05d5\u05ea\u05e8\u05ea","row_all":"\u05e2\u05d3\u05db\u05d5\u05df\u05db\u05dc \u05d4\u05e9\u05d5\u05e8\u05d5\u05ea \u05d1\u05d8\u05d1\u05dc\u05d4","row_even":"\u05e2\u05d3\u05db\u05d5\u05df \u05e9\u05d5\u05e8\u05d5\u05ea \u05d6\u05d5\u05d2\u05d9\u05d5\u05ea \u05d1\u05d8\u05d1\u05dc\u05d4","row_odd":"\u05e2\u05d3\u05db\u05d5\u05df \u05e9\u05d5\u05e8\u05d5\u05ea \u05d0\u05d9-\u05d6\u05d5\u05d2\u05d9\u05d5\u05ea \u05d1\u05d8\u05d1\u05dc\u05d4","row_row":"\u05e2\u05d3\u05db\u05d5\u05df \u05e9\u05d5\u05e8\u05d4 \u05e0\u05d5\u05db\u05d7\u05d9\u05ea","cell_all":"\u05e2\u05d3\u05db\u05d5\u05df \u05db\u05dc \u05ea\u05d0\u05d9 \u05d4\u05d8\u05d1\u05dc\u05d4","cell_row":"\u05e2\u05d3\u05db\u05d5\u05df \u05db\u05dc \u05ea\u05d0\u05d9 \u05d4\u05e9\u05d5\u05e8\u05d4","cell_cell":"\u05e2\u05d3\u05db\u05d5\u05df \u05ea\u05d0 \u05e0\u05d5\u05db\u05d7\u05d9",th:"\u05db\u05d5\u05ea\u05e8\u05ea",td:"\u05ea\u05d0 \u05de\u05d9\u05d3\u05e2",summary:"\u05ea\u05de\u05e6\u05d9\u05ea",bgimage:"\u05ea\u05de\u05d5\u05e0\u05ea \u05e8\u05e7\u05e2",rtl:"\u05de\u05d9\u05de\u05d9\u05df \u05dc\u05e9\u05de\u05d0\u05dc",ltr:"\u05de\u05e9\u05de\u05d0\u05dc \u05dc\u05d9\u05de\u05d9\u05df",mime:"Target MIME type",langcode:"\u05e7\u05d5\u05d3 \u05d4\u05e9\u05e4\u05d4",langdir:"\u05db\u05d9\u05d5\u05d5\u05df \u05d4\u05e9\u05e4\u05d4",style:"\u05e2\u05d9\u05e6\u05d5\u05d1",id:"Id","merge_cells_title":"\u05d0\u05d7\u05d3 \u05ea\u05d0\u05d9\u05dd \u05d1\u05d8\u05d1\u05dc\u05d4",bgcolor:"\u05e6\u05d1\u05e2 \u05d4\u05e8\u05e7\u05e2",bordercolor:"\u05e6\u05d1\u05e2 \u05d4\u05d2\u05d1\u05d5\u05dc","align_bottom":"\u05ea\u05d7\u05ea\u05d9\u05ea","align_top":"\u05e2\u05dc\u05d9\u05d5\u05df",valign:"\u05d9\u05e9\u05d5\u05e8 \u05d0\u05e0\u05db\u05d9","cell_type":"\u05e1\u05d2\u05e0\u05d5\u05df \u05d4\u05ea\u05d0","cell_title":"\u05ea\u05db\u05d5\u05e0\u05d5\u05ea \u05ea\u05d0 \u05d1\u05d8\u05d1\u05dc\u05d4","row_title":"\u05ea\u05db\u05d5\u05e0\u05d5\u05ea \u05e9\u05d5\u05e8\u05d4 \u05d1\u05d8\u05d1\u05dc\u05d4","align_middle":"\u05d0\u05de\u05e6\u05e2","align_right":"\u05dc\u05d9\u05de\u05d9\u05df","align_left":"\u05dc\u05e9\u05de\u05d0\u05dc","align_default":"Default",align:"\u05d9\u05e9\u05d5\u05e8 \u05d0\u05d5\u05e4\u05e7\u05d9",border:"\u05d2\u05d1\u05d5\u05dc",cellpadding:"Cellpadding",cellspacing:"Cellspacing",rows:"\u05e9\u05d5\u05e8\u05d5\u05ea",cols:"\u05e2\u05de\u05d5\u05d3\u05d5\u05ea",height:"\u05d2\u05d5\u05d1\u05d4",width:"\u05e8\u05d5\u05d7\u05d1",title:"\u05d4\u05d5\u05e1\u05e4\u05ea/\u05e2\u05e8\u05d9\u05db\u05ea \u05d8\u05d1\u05dc\u05d4",rowtype:"\u05e1\u05d5\u05d2 \u05d4\u05e9\u05d5\u05e8\u05d4 \u05d1\u05d8\u05d1\u05dc\u05d4","advanced_props":"\u05ea\u05db\u05d5\u05e0\u05d5\u05ea \u05de\u05ea\u05e7\u05d3\u05de\u05d5\u05ea","general_props":"\u05ea\u05db\u05d5\u05e0\u05d5\u05ea \u05db\u05dc\u05dc\u05d9\u05d5\u05ea","advanced_tab":"\u05de\u05ea\u05e7\u05d3\u05dd","general_tab":"\u05db\u05dc\u05dc\u05d9","cell_col":"\u05e2\u05d3\u05db\u05df \u05d0\u05ea \u05db\u05dc \u05d4\u05ea\u05d0\u05d9\u05dd \u05d1\u05d8\u05d5\u05e8"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/table/langs/it_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/table/langs/it_dlg.js deleted file mode 100644 index 2a847ed62b..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/table/langs/it_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('it.table_dlg',{"rules_border":"bordo","rules_box":"box","rules_vsides":"lato vert.","rules_rhs":"rhs","rules_lhs":"lhs","rules_hsides":"lato orizz.","rules_below":"sotto","rules_above":"sopra","rules_void":"vuoto",rules:"Regole","frame_all":"tutte","frame_cols":"colonne","frame_rows":"righe","frame_groups":"gruppi","frame_none":"nessuna",frame:"Cornice",caption:"Didascalia tabella","missing_scope":"Sicuro di proseguire senza aver specificato uno scope per l\'intestazione di questa tabella? Senza di esso, potrebbe essere difficoltoso per alcuni utenti con disabilit\u00e0 capire il contenuto o i dati mostrati nella tabella.","cell_limit":"Superato il numero massimo di celle di {$cells}.","row_limit":"Superato il numero massimo di righe di {$rows}.","col_limit":"Superato il numero massimo di colonne di {$cols}.",colgroup:"Gruppo colonna",rowgroup:"Gruppo riga",scope:"Scope",tfoot:"Pedice tabella",tbody:"Corpo tabella",thead:"Intestazione tabella","row_all":"Update tutte le righe della tabella","row_even":"Aggiorna righe pari della tabella","row_odd":"Aggiorna righe dispari della tabella","row_row":"Aggiorna riga corrente","cell_all":"Aggiorna tutte le celle della tabella","cell_row":"Aggiorna tutte le celle della riga","cell_cell":"Aggiorna cella corrente",th:"Intestazione",td:"Data",summary:"Sommario",bgimage:"Immagine sfondo",rtl:"Destra verso sinistra",ltr:"Sinistra verso destra",mime:"Tipo MIME del target",langcode:"Lingua",langdir:"Direzione testo",style:"Stile",id:"Id","merge_cells_title":"Unisci celle",bgcolor:"Colore sfondo",bordercolor:"Colore bordo","align_bottom":"In basso","align_top":"In alto",valign:"Allineamento verticale","cell_type":"Tipo cella","cell_title":"Propriet\u00e0 cella","row_title":"Propriet\u00e0 riga","align_middle":"Centra","align_right":"A destra","align_left":"A sinistra","align_default":"Predefinito",align:"Allineamento",border:"Bordo",cellpadding:"Padding celle",cellspacing:"Spaziatura celle",rows:"Righe",cols:"Colonne",height:"Altezza",width:"Larghezza",title:"Inserisci/Modifica tabella",rowtype:"Riga in una parte di tabella","advanced_props":"Propriet\u00e0 avanzate","general_props":"Propriet\u00e0 generali","advanced_tab":"Avanzate","general_tab":"Generale","cell_col":"Aggiorna tutte le celle della colonna"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/table/langs/ja_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/table/langs/ja_dlg.js deleted file mode 100644 index ad33586421..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/table/langs/ja_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('ja.table_dlg',{"rules_border":"\u67a0\u7dda(\u4e0a\u4e0b\u5de6\u53f3)","rules_box":"\u30dc\u30c3\u30af\u30b9(\u4e0a\u4e0b\u5de6\u53f3)","rules_vsides":"\u5de6\u53f3\u306e\u7e26\u7dda","rules_rhs":"\u53f3\u306e\u7e26\u7dda","rules_lhs":"\u5de6\u306e\u7e26\u7dda","rules_hsides":"\u4e0a\u4e0b\u306e\u6a2a\u7dda","rules_below":"\u4e0b\u306e\u6a2a\u7dda","rules_above":"\u4e0a\u306e\u6a2a\u7dda","rules_void":"\u306a\u3057",rules:"\u8868\u306e\u5916\u67a0","frame_all":"\u3059\u3079\u3066","frame_cols":"\u5217","frame_rows":"\u884c","frame_groups":"\u30b0\u30eb\u30fc\u30d7\u6bce","frame_none":"\u306a\u3057",frame:"\u30bb\u30eb\u306e\u67a0",caption:"\u8868\u306e\u898b\u51fa\u3057","missing_scope":"\u3053\u306e\u8868\u306e\u30d8\u30c3\u30c0\u30fc\u306e\u30bb\u30eb\u306e\u7bc4\u56f2\u3092\u8a2d\u5b9a\u3057\u306a\u3044\u3067\u672c\u5f53\u306b\u7d9a\u3051\u307e\u3059\u304b? \u3053\u306e\u307e\u307e\u3067\u306f\u76ee\u306e\u4e0d\u81ea\u7531\u306a\u65b9\u304c\u8868\u306e\u5185\u5bb9\u3084\u8868\u793a\u3055\u308c\u308b\u30c7\u30fc\u30bf\u3092\u7406\u89e3\u3059\u308b\u306e\u304c\u56f0\u96e3\u306b\u306a\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002","cell_limit":"\u30bb\u30eb\u306e\u6700\u5927\u6570\u306e${cells}\u3092\u8d85\u3048\u307e\u3057\u305f\u3002","row_limit":"\u884c\u306e\u6700\u5927\u6570\u306e${rows}\u3092\u8d85\u3048\u307e\u3057\u305f\u3002","col_limit":"\u5217\u306e\u6700\u5927\u6570\u306e${cols}\u3092\u8d85\u3048\u307e\u3057\u305f\u3002",colgroup:"\u5217\u30b0\u30eb\u30fc\u30d7",rowgroup:"\u884c\u30b0\u30eb\u30fc\u30d7",scope:"\u30b9\u30b3\u30fc\u30d7",tfoot:"\u8868\u306e\u30d5\u30c3\u30bf\u30fc",tbody:"\u8868\u306e\u30dc\u30c7\u30a3",thead:"\u8868\u306e\u30d8\u30c3\u30c0\u30fc","row_all":"\u3059\u3079\u3066\u306e\u884c\u3092\u66f4\u65b0","row_even":"\u5076\u6570\u884c\u3092\u66f4\u65b0","row_odd":"\u5947\u6570\u884c\u3092\u66f4\u65b0","row_row":"\u9078\u629e\u3057\u3066\u3044\u308b\u884c\u3092\u66f4\u65b0","cell_all":"\u3059\u3079\u3066\u306e\u30bb\u30eb\u3092\u66f4\u65b0","cell_row":"\u884c\u5185\u306e\u30bb\u30eb\u3092\u66f4\u65b0","cell_cell":"\u9078\u629e\u3057\u3066\u3044\u308b\u30bb\u30eb\u3092\u66f4\u65b0",th:"\u30d8\u30c3\u30c0\u30fc",td:"\u30c7\u30fc\u30bf",summary:"\u30b5\u30de\u30ea\u30fc",bgimage:"\u80cc\u666f\u306e\u753b\u50cf",rtl:"\u53f3\u304b\u3089\u5de6",ltr:"\u5de6\u304b\u3089\u53f3",mime:"\u30bf\u30fc\u30b2\u30c3\u30c8\u306eMIME\u30bf\u30a4\u30d7",langcode:"\u8a00\u8a9e\u30b3\u30fc\u30c9",langdir:"\u6587\u7ae0\u306e\u65b9\u5411",style:"\u30b9\u30bf\u30a4\u30eb",id:"ID","merge_cells_title":"\u30bb\u30eb\u3092\u7d50\u5408",bgcolor:"\u80cc\u666f\u306e\u8272",bordercolor:"\u67a0\u7dda\u306e\u8272","align_bottom":"\u4e0b\u63c3\u3048","align_top":"\u4e0a\u63c3\u3048",valign:"\u5782\u76f4\u65b9\u5411\u306e\u914d\u7f6e","cell_type":"\u30bb\u30eb\u306e\u7a2e\u985e","cell_title":"\u30bb\u30eb\u306e\u5c5e\u6027","row_title":"\u884c\u306e\u5c5e\u6027","align_middle":"\u4e2d\u592e\u63c3\u3048","align_right":"\u53f3\u63c3\u3048","align_left":"\u5de6\u63c3\u3048","align_default":"\u521d\u671f\u72b6\u614b",align:"\u914d\u7f6e",border:"\u67a0\u7dda",cellpadding:"\u30bb\u30eb\u306e\u30d1\u30c7\u30a3\u30f3\u30b0(cellpadding)",cellspacing:"\u30bb\u30eb\u306e\u9593\u9694(cellspacing)",rows:"\u884c",cols:"\u5217",height:"\u9ad8\u3055",width:"\u5e45",title:"\u8868\u306e\u633f\u5165\u3084\u7de8\u96c6",rowtype:"\u884c","advanced_props":"\u9ad8\u5ea6\u306a\u5c5e\u6027","general_props":"\u4e00\u822c\u7684\u306a\u5c5e\u6027","advanced_tab":"\u9ad8\u5ea6","general_tab":"\u4e00\u822c","cell_col":"\u3059\u3079\u3066\u306e\u30bb\u30eb\u3092\u66f4\u65b0"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/table/langs/nl_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/table/langs/nl_dlg.js deleted file mode 100644 index ebc25e70ee..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/table/langs/nl_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('nl.table_dlg',{"rules_border":"Rand","rules_box":"Box","rules_vsides":"Verticale zijden","rules_rhs":"Rechterzijkant","rules_lhs":"Linkerzijkant","rules_hsides":"Horizontale zijden","rules_below":"Onder","rules_above":"Boven","rules_void":"Geen",rules:"Hulplijnen","frame_all":"Alles","frame_cols":"Kolommen","frame_rows":"Rijen","frame_groups":"Groepen","frame_none":"Geen",frame:"Frame",caption:"Tabelbeschrijving","missing_scope":"Weet u zeker dat u door wilt gaan met het toewijzen van een kop zonder een bereik op te geven? Mensen met een visuele handicap kunnen hierdoor waarschijnlijk slecht bij de gegevens.","cell_limit":"U heeft het maximale aantal cellen van {$cells} overschreden.","row_limit":"U heeft hebt het maximale aantal rijen van {$rows} overschreden.","col_limit":"U heeft het maximale aantal kolommen van {$cols} overschreden.",colgroup:"Kolomgroep",rowgroup:"Rijgroep",scope:"Bereik",tfoot:"Tabelvoet",tbody:"Tabellichaam",thead:"Tabelkop","row_all":"Alle rijen bijwerken","row_even":"Even rijen bijwerken","row_odd":"Oneven rijen bijwerken","row_row":"Huidige rij bijwerken","cell_all":"Alle cellen in tabel bijwerken","cell_row":"Alle cellen in rij bijwerken","cell_cell":"Huidige cel bijwerken",th:"Kop",td:"Gegevens",summary:"Samenvatting",bgimage:"Achtergrondafbeelding",rtl:"Van rechts naar links",ltr:"Van links naar rechts",mime:"Doel MIME type",langcode:"Taalcode",langdir:"Taalrichting",style:"Stijl",id:"Id","merge_cells_title":"Cellen samenvoegen",bgcolor:"Achtergrondkleur",bordercolor:"Randkleur","align_bottom":"Onder","align_top":"Boven",valign:"Verticale uitlijning","cell_type":"Celtype","cell_title":"Celeigenschappen","row_title":"Rij-eigenschappen","align_middle":"Centreren","align_right":"Rechts","align_left":"Links","align_default":"Standaard",align:"Uitlijning",border:"Rand",cellpadding:"Ruimte in cel",cellspacing:"Ruimte om cel",rows:"Rijen",cols:"Kolommen",height:"Hoogte",width:"Breedte",title:"Tabel invoegen/bewerken",rowtype:"Rijtype","advanced_props":"Geavanceerde eigenschappen","general_props":"Algemene eigenschappen","advanced_tab":"Geavanceerd","general_tab":"Algemeen","cell_col":"Alle cellen in de kolom bijwerken"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/table/langs/no_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/table/langs/no_dlg.js deleted file mode 100644 index 9b68598bcd..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/table/langs/no_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('no.table_dlg',{"rules_border":"ramme","rules_box":"boks","rules_vsides":"vside","rules_rhs":"hs","rules_lhs":"vs","rules_hsides":"hside","rules_below":"under","rules_above":"over","rules_void":"tom",rules:"Streker","frame_all":"alle","frame_cols":"kolonner","frame_rows":"rader","frame_groups":"grupper","frame_none":"ingen",frame:"Ramme",caption:"Tabelloverskrift","missing_scope":"Er du sikker p\u00e5 at du vil fortsette uten \u00e5 angi tittel for denne overskrifscellen? Uten denne kan det bli vanskelig for enkelte funksjonshemmede brukere \u00e5 forst\u00e5 innhold eller data som presenteres i tabellen.","cell_limit":"Du har overg\u00e5tt maksimalt antall tillatte celler p\u00e5 {$cells}.","row_limit":"Du har overg\u00e5tt maksimalt antall tillatte rader p\u00e5 {$rows}.","col_limit":"Du har overg\u00e5tt maksimalt antall tillatte kolonner p\u00e5 {$cols}.",colgroup:"Kolonnegruppe",rowgroup:"Radgruppe",scope:"Tittel",tfoot:"Bunntekst",tbody:"Tabellbr\u00f8dtekst",thead:"Topptekst","row_all":"Oppdater alle rader","row_even":"Oppdater rader med partall","row_odd":"Oppdater rader med oddetall","row_row":"Oppdater aktuell rad","cell_all":"Oppdater alle celler i tabellen","cell_row":"Oppdater alle celler i raden","cell_cell":"Oppdater aktuell celle",th:"Overskrift",td:"Data",summary:"Sammendrag",bgimage:"Bakgrunnsbilde",rtl:"H\u00f8yre mot venstre",ltr:"Venstre mot h\u00f8yre",mime:"M\u00e5lets MIME-type",langcode:"Spr\u00e5kkode",langdir:"Skriftretning",style:"Stil",id:"Id","merge_cells_title":"Sl\u00e5 sammen celler",bgcolor:"Bakgrunnsfarge",bordercolor:"Rammefarge","align_bottom":"Bunn","align_top":"Topp",valign:"Vertikal justering","cell_type":"Celletype","cell_title":"Celleegenskaper","row_title":"Radegenskaper","align_middle":"Midtstilt","align_right":"H\u00f8yre","align_left":"Venstre","align_default":"Standard",align:"Justering",border:"Ramme",cellpadding:"Celleutfylling",cellspacing:"Celleavstand",rows:"Rader",cols:"Kolonner",height:"H\u00f8yde",width:"Bredde",title:"Sett inn / rediger tabell",rowtype:"Radtype","advanced_props":"Avanserte egenskaper","general_props":"Generelle egenskaper","advanced_tab":"Avansert","general_tab":"Generelt","cell_col":"Oppdater alle cellene i kolonnen"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/table/langs/pl_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/table/langs/pl_dlg.js deleted file mode 100644 index 8bbe7c83b5..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/table/langs/pl_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('pl.table_dlg',{"rules_border":"granica","rules_box":"ramka","rules_vsides":"vsides","rules_rhs":"rhs","rules_lhs":"lhs","rules_hsides":"hsides","rules_below":"pod","rules_above":"nad","rules_void":"void",rules:"Prowadnice","frame_all":"wszystkie","frame_cols":"kolumny","frame_rows":"wiersze","frame_groups":"grupy","frame_none":"brak",frame:"Ramka",caption:"Nag\u0142\u00f3wek tabeli","missing_scope":"Jeste\u015b pewny \u017ce chcesz kontynuowa\u0107 bez definiowania zasi\u0119gu dla kom\u00f3rki tabeli. Bez niej, mo\u017ce by\u0107 trudne dla niekt\u00f3rych u\u017cytkownik\u00f3w zrozuminie zawarto\u015bci albo danych wy\u015bwietlanych poza tabel\u0105.","cell_limit":"Przekroczy\u0142e\u015b maksymaln\u0105 liczb\u0119 kom\u00f3rek kt\u00f3ra wynosi {$cells}.","row_limit":"Przekroczy\u0142e\u015b maksymaln\u0105 liczb\u0119 wierszy kt\u00f3ra wynosi {$rows}.","col_limit":"Przekroczy\u0142e\u015b maksymaln\u0105 liczb\u0119 kolumn kt\u00f3ra wynosi {$cols}.",colgroup:"Grupa kolumn",rowgroup:"Grupa wierszy",scope:"Zakres",tfoot:"Stopka tabeli",tbody:"Cia\u0142o tabeli",thead:"Nag\u0142\u00f3wek tabeli","row_all":"Zmie\u0144 wszystkie wiersze","row_even":"Zmie\u0144 parzyste wiersze","row_odd":"Zmie\u0144 nieparzyste wiersze","row_row":"Zmie\u0144 aktualny wiersz","cell_all":"Zmie\u0144 wszytkie kom\u00f3rki w tabeli","cell_row":"Zmie\u0144 wszytkie kom\u00f3rki w wierszu","cell_cell":"Zmie\u0144 aktualn\u0105 kom\u00f3rk\u0119",th:"Nag\u0142owek",td:"Dane",summary:"Podsumowanie",bgimage:"Obrazek t\u0142a",rtl:"Kierunek z prawej do lewej",ltr:"Kierunek z lewej do prawej",mime:"Docelowy typ MIME",langcode:"Kod j\u0119zyka",langdir:"Kierunek czytania tekstu",style:"Styl",id:"Id","merge_cells_title":"Po\u0142\u0105cz kom\u00f3rki",bgcolor:"Kolor t\u0142a",bordercolor:"Kolor ramki","align_bottom":"D\u00f3\u0142","align_top":"G\u00f3ra",valign:"Pionowe wyr\u00f3wnanie","cell_type":"Typ kom\u00f3rki","cell_title":"W\u0142a\u015bciwo\u015bci kom\u00f3rki","row_title":"W\u0142a\u015bciwo\u015bci wiersza","align_middle":"\u015arodek","align_right":"Prawy","align_left":"Lewy","align_default":"Domy\u015blnie",align:"Wyr\u00f3wnanie",border:"Ramka",cellpadding:"Cellpadding",cellspacing:"Cellspacing",rows:"Wiersze",cols:"Kolumny",height:"Wysoko\u015b\u0107",width:"Szeroko\u015b\u0107",title:"Wklej/Zmie\u0144 tabel\u0119",rowtype:"Wiersz w cz\u0119\u015bci tabeli","advanced_props":"Zaawansowane w\u0142a\u015bciwo\u015bci","general_props":"G\u0142\u00f3wne w\u0142a\u015bciwo\u015bci","advanced_tab":"Zaawansowane","general_tab":"G\u0142\u00f3wne","cell_col":"Zaktualizuj wszystkie kom\u00f3rki w kolumnie"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/table/langs/pt_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/table/langs/pt_dlg.js deleted file mode 100644 index fb54400dab..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/table/langs/pt_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('pt.table_dlg',{"rules_border":"Limites","rules_box":"Box","rules_vsides":"Vsides","rules_rhs":"Rhs","rules_lhs":"Lhs","rules_hsides":"Hsides","rules_below":"abaixo","rules_above":"acima","rules_void":"void",rules:"Regras","frame_all":"Todos","frame_cols":"colunas","frame_rows":"Linhas","frame_groups":"Grupos","frame_none":"Nenhum",frame:"Frame",caption:"T\u00edtulo da tabela","missing_scope":"Tem certeza de que quer continuar sem especificar um escopo para esta c\u00e9lula? (Isso poder\u00e1 causar dificuldades a usu\u00e1rios deficientes)","cell_limit":"Excedeu o n\u00famero m\u00e1ximo de c\u00e9lulas de {$cells}.","row_limit":"Excedeu o n\u00famero m\u00e1ximo de linhas de {$rows}.","col_limit":"Excedeu o n\u00famero m\u00e1ximo de colunas de {$cols}.",colgroup:"Grupo colunas",rowgroup:"Grupo linhas",scope:"Alcance",tfoot:"Rodap\u00e9 da tabela",tbody:"Corpo da tabela",thead:"Topo da tabela","row_all":"Atualizar todas as linhas","row_even":"Atualizar linhas pares","row_odd":"Atualizar linhas \u00edmpares","row_row":"Atualizar esta linha","cell_all":"Atualizar todas as c\u00e9lulas na tabela","cell_row":"Atualizar todas as c\u00e9lulas na linha","cell_cell":"Atualizar esta c\u00e9lula",th:"Campo",td:"Dados",summary:"Sum\u00e1rio",bgimage:"Imagem de fundo",rtl:"Da direita para a esquerda",ltr:"Da esquerda para a direita",mime:"MIME alvo",langcode:"C\u00f3digo do idioma",langdir:"Dire\u00e7\u00e3o do texto",style:"Estilo",id:"Id","merge_cells_title":"Unir c\u00e9lulas",bgcolor:"Cor de fundo",bordercolor:"Cor dos limites","align_bottom":"Abaixo","align_top":"Topo",valign:"Alinha. vert.","cell_type":"Tipo c\u00e9l.","cell_title":"Propriedades de c\u00e9lulas","row_title":"Propriedades de linhas","align_middle":"Centro","align_right":"Direita","align_left":"Esquerda","align_default":"Padr\u00e3o",align:"Alinha.",border:"Limites",cellpadding:"Enchimento da C\u00e9lula",cellspacing:"Espa\u00e7amento da C\u00e9lula",rows:"Linhas",cols:"Colunas",height:"Altura",width:"Largura",title:"Inserir/modificar tabela",rowtype:"Linha na parte da tabela","advanced_props":"Propriedades avan\u00e7adas","general_props":"Propriedades gerais","advanced_tab":"Avan\u00e7ado","general_tab":"Geral","cell_col":"Atualizar todas as c\u00e9lulas na coluna"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/table/langs/ru_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/table/langs/ru_dlg.js deleted file mode 100644 index 2d82a1a1a2..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/table/langs/ru_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('ru.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:"\u041f\u0440\u0430\u0432\u0438\u043b\u0430","frame_all":"\u0432\u0441\u0435","frame_cols":"\u043a\u043e\u043b\u043e\u043d\u043a\u0438","frame_rows":"\u0440\u044f\u0434\u044b","frame_groups":"\u0433\u0440\u0443\u043f\u043f\u044b","frame_none":"\u043d\u0435\u0442",frame:"\u041a\u0430\u0434\u0440",caption:"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0442\u0430\u0431\u043b\u0438\u0446\u044b","missing_scope":"\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c \u0431\u0435\u0437 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u043d\u0438\u044f \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0437\u0430\u0433\u043b\u043e\u043b\u0432\u043a\u0430? \u0411\u0435\u0437 \u044d\u0442\u043e\u0433\u043e \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0442\u0440\u0443\u0434\u043d\u0435\u043d\u043e \u0432\u043e\u0441\u043f\u0440\u0438\u044f\u0442\u0438\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c.","cell_limit":"\u0414\u043e\u0441\u0442\u0438\u0433\u043d\u0443\u0442 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0432\u0439 \u043f\u0440\u0435\u0434\u0435\u043b, \u0432 $ \u044f\u0447\u0435\u0435\u043a.","row_limit":"\u0414\u043e\u0441\u0442\u0438\u0433\u043d\u0443\u0442 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0432\u0439 \u043f\u0440\u0435\u0434\u0435\u043b, \u0432 $ \u0441\u0442\u0440\u043e\u043a.","col_limit":"\u0414\u043e\u0441\u0442\u0438\u0433\u043d\u0443\u0442 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0432\u0439 \u043f\u0440\u0435\u0434\u0435\u043b, \u0432 $ \u043a\u043e\u043b\u043e\u043d\u043e\u043a.",colgroup:"\u0413\u0440\u0443\u043f\u043f\u0430 \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432",rowgroup:"\u0413\u0440\u0443\u043f\u043f\u0430 \u0441\u0442\u0440\u043e\u043a",scope:"\u041e\u0431\u043b\u0430\u0441\u0442\u044c",tfoot:"\u0417\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435",tbody:"\u0422\u0435\u043b\u043e",thead:"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a","row_all":"\u041e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0432\u0441\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435","row_even":"\u041e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0447\u0435\u0442\u043d\u044b\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435","row_odd":"\u041e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u043d\u0435\u0447\u0435\u0442\u043d\u044b\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435","row_row":"\u041e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0442\u0435\u043a\u0443\u0449\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443","cell_all":"\u041e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0432\u0441\u0435 \u044f\u0447\u0435\u0439\u043a\u0438 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435","cell_row":"\u041e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0432\u0441\u0435 \u044f\u0447\u0435\u0439\u043a\u0438 \u0432 \u0441\u0442\u0440\u043e\u043a\u0435","cell_cell":"\u041e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0442\u0435\u043a\u0443\u0449\u0443\u044e \u044f\u0447\u0435\u0439\u043a\u0443",th:"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a",td:"\u0414\u0430\u043d\u043d\u044b\u0435",summary:"\u041e\u0431\u0449\u0435\u0435",bgimage:"\u0424\u043e\u043d\u043e\u0432\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435",rtl:"\u0421\u043f\u0440\u0430\u0432\u0430 \u043d\u0430\u043b\u0435\u0432\u043e",ltr:"\u0421\u043b\u0435\u0432\u0430 \u043d\u0430\u043f\u0440\u0430\u0432\u043e",mime:"MIME \u0442\u0438\u043f \u0446\u0435\u043b\u0438",langcode:"\u041a\u043e\u0434 \u044f\u0437\u044b\u043a\u0430",langdir:"\u041d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0442\u0435\u043a\u0441\u0442\u0430",style:"\u0421\u0442\u0438\u043b\u044c",id:"\u0418\u043c\u044f","merge_cells_title":"\u041e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u044f\u0447\u0435\u0439\u043a\u0438",bgcolor:"\u0426\u0432\u0435\u0442 \u0437\u0430\u043b\u0438\u0432\u043a\u0438",bordercolor:"\u0426\u0432\u0435\u0442 \u0433\u0440\u0430\u043d\u0438\u0446\u044b","align_bottom":"\u041f\u043e \u043d\u0438\u0436\u043d\u0435\u043c\u0443 \u043a\u0440\u0430\u044e","align_top":"\u041f\u043e \u0432\u0435\u0440\u0445\u043d\u0435\u043c\u0443 \u043a\u0440\u0430\u044e",valign:"\u0412\u0435\u0440\u0442. \u0432\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u0435","cell_type":"\u0422\u0438\u043f","cell_title":"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u044f\u0447\u0435\u0439\u043a\u0438","row_title":"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0441\u0442\u0440\u043e\u043a\u0438","align_middle":"\u041f\u043e \u0446\u0435\u043d\u0442\u0440\u0443","align_right":"\u041f\u043e \u043f\u0440\u0430\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","align_left":"\u041f\u043e \u043b\u0435\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","align_default":"\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e",align:"\u0412\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u0435",border:"\u0413\u0440\u0430\u043d\u0438\u0446\u0430",cellpadding:"\u041e\u0442\u0441\u0442\u0443\u043f\u044b \u0432 \u044f\u0447\u0435\u0439\u043a\u0430\u0445",cellspacing:"\u0420\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u044f\u0447\u0435\u0439\u043a\u0430\u043c\u0438",rows:"\u0421\u0442\u0440\u043e\u043a\u0438",cols:"\u0421\u0442\u043e\u043b\u0431\u0446\u044b",height:"\u0412\u044b\u0441\u043e\u0442\u0430",width:"\u0428\u0438\u0440\u0438\u043d\u0430",title:"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0442\u0430\u0431\u043b\u0438\u0446\u044b",rowtype:"\u0422\u0438\u043f \u0441\u0442\u0440\u043e\u043a\u0438","advanced_props":"\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b","general_props":"\u041e\u0431\u0449\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b","advanced_tab":"\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e","general_tab":"\u041e\u0431\u0449\u0435\u0435","cell_col":"\u041e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0432\u0441\u0435 \u044f\u0447\u0435\u0439\u043a\u0438 \u0432 \u0441\u0442\u043e\u043b\u0431\u0446\u0435"}); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/table/langs/sv_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/table/langs/sv_dlg.js deleted file mode 100644 index d058bcb855..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/table/langs/sv_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('sv.table_dlg',{"rules_border":"kant","rules_box":"box","rules_vsides":"vsides","rules_rhs":"rhs","rules_lhs":"lhs","rules_hsides":"hsides","rules_below":"under","rules_above":"\u00f6ver","rules_void":"void",rules:"Regler","frame_all":"alla","frame_cols":"kolumner ","frame_rows":"rader","frame_groups":"grupper","frame_none":"ingen",frame:"Ram",caption:"\u00d6verskrift","missing_scope":"\u00c4r du s\u00e4ker p\u00e5 att du vill forts\u00e4tta utan att ange en omfattning, denna underl\u00e4ttar f\u00f6r icke-grafiska webbl\u00e4sare.","cell_limit":"Du kan inte skapa en tabell med fler \u00e4n {$cells} celler.","row_limit":"Du kan inte ange fler \u00e4n {$rows} rader.","col_limit":"Du kan inte ange fler \u00e4n {$cols} kolumner.",colgroup:"Kolumngrupp",rowgroup:"Radgrupp",scope:"Omfattning",tfoot:"tabellfot",tbody:"tabellkropp",thead:"tabellhuvud","row_all":"Uppdatera alla rader i tabellen","row_even":"Uppdatera j\u00e4mna rader i tabellen","row_odd":"Uppdatera udda rader i tabellen","row_row":"Uppdatera nuvarande rad","cell_all":"Uppdatera alla celler i tabellen","cell_row":"Uppdatera alla celler i raden","cell_cell":"Uppdatera nuvarande cell",th:"Huvud",td:"Data",summary:"Sammanfattning",bgimage:"Bakgrundsbild",rtl:"H\u00f6ger till v\u00e4nster",ltr:"V\u00e4nster till h\u00f6ger",mime:"Target MIME type",langcode:"Spr\u00e5kkod",langdir:"Skriftriktning",style:"Stil",id:"Id","merge_cells_title":"Sammanfoga celler",bgcolor:"Bakgrundsf\u00e4rg",bordercolor:"Ramf\u00e4rg","align_bottom":"Botten","align_top":"Toppen",valign:"Vertikal justering","cell_type":"Celltyp","cell_title":"Tabellcellsinst\u00e4llningar","row_title":"Tabellradsinst\u00e4llningar","align_middle":"Mitten","align_right":"H\u00f6ger","align_left":"V\u00e4nster","align_default":"Standard",align:"Justering",border:"Ram",cellpadding:"Cellpadding",cellspacing:"Cellspacing",rows:"Rader",cols:"Kolumner",height:"H\u00f6jd",width:"Bredd",title:"Infoga/redigera ny tabell",rowtype:"Radtyp","advanced_props":"Avancerade inst\u00e4llningar","general_props":"Generella inst\u00e4llningar","advanced_tab":"Avancerat","general_tab":"Generellt","cell_col":"Uppdatera alla celler i kolumn"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/table/langs/zh_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/table/langs/zh_dlg.js deleted file mode 100644 index 4fe30035f2..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/table/langs/zh_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('zh-cn.table_dlg',{"rules_border":"\u8fb9\u6846","rules_box":"\u6846","rules_vsides":"\u5782\u76f4","rules_rhs":"\u53f3\u8fb9","rules_lhs":"\u5de6\u8fb9","rules_hsides":"\u6c34\u5e73","rules_below":"\u4e0b","rules_above":"\u4e0a","rules_void":"\u7a7a",rules:"\u89c4\u5219","frame_all":"\u5168\u90e8","frame_cols":"\u5217","frame_rows":"\u884c","frame_groups":"\u5206\u7ec4","frame_none":"\u65e0",frame:"\u6846\u67b6",caption:"\u683c\u6807\u9898","missing_scope":"\u60a8\u6ca1\u6709\u6307\u5b9a\u8868\u683c\u7684\u6807\u9898\u5355\u5143\uff0c\u5982\u679c\u4e0d\u8bbe\u7f6e\uff0c\u53ef\u80fd\u4f1a\u4f7f\u7528\u6237\u96be\u4ee5\u7406\u89e3\u60a8\u7684\u8868\u683c\u7684\u5185\u5bb9\u3002\u60a8\u8981\u7ee7\u7eed\u5417\uff1f","cell_limit":"\u5df2\u7ecf\u8d85\u51fa\u6700\u5927\u5355\u5143\u683c\u6570{$cells}\u3002","row_limit":"\u5df2\u7ecf\u8d85\u51fa\u6700\u5927\u884c\u6570{$rows}\u3002","col_limit":"\u5df2\u7ecf\u8d85\u51fa\u6700\u5927\u5217\u6570{$cols}\u3002",colgroup:"\u5217\u5206\u7ec4",rowgroup:"\u884c\u5206\u7ec4",scope:"\u8303\u56f4",tfoot:"\u8868\u5c3e",tbody:"\u8868\u683c\u4e3b\u4f53",thead:"\u8868\u5934","row_all":"\u66f4\u65b0\u8868\u683c\u7684\u6240\u6709\u884c","row_even":"\u66f4\u65b0\u8868\u683c\u7684\u5076\u6570\u884c","row_odd":"\u66f4\u65b0\u8868\u683c\u7684\u5947\u6570\u884c","row_row":"\u66f4\u65b0\u5f53\u524d\u884c","cell_all":"\u66f4\u65b0\u6240\u6709\u5355\u5143\u683c","cell_row":"\u66f4\u65b0\u5f53\u524d\u884c\u7684\u5355\u5143\u683c","cell_cell":"\u66f4\u65b0\u5f53\u524d\u5355\u5143\u683c",th:"\u8868\u5934",td:"\u5185\u5bb9",summary:"\u6458\u8981",bgimage:"\u80cc\u666f\u56fe\u7247",rtl:"\u4ece\u53f3\u5230\u5de6",ltr:"\u4ece\u5de6\u5230\u53f3",mime:"\u76ee\u6807MIME\u7c7b\u578b",langcode:"\u8bed\u8a00\u7f16\u7801",langdir:"\u8bed\u8a00\u4e66\u5199\u65b9\u5411",style:"\u6837\u5f0f",id:"ID","merge_cells_title":"\u5408\u5e76\u5355\u5143\u683c",bgcolor:"\u80cc\u666f\u989c\u8272",bordercolor:"\u8fb9\u6846\u989c\u8272","align_bottom":"\u9760\u4e0b","align_top":"\u9760\u4e0a",valign:"\u5782\u76f4\u5bf9\u9f50","cell_type":"\u5355\u5143\u683c\u7c7b\u578b","cell_title":"\u5355\u5143\u683c\u5c5e\u6027","row_title":"\u884c\u5c5e\u6027","align_middle":"\u5c45\u4e2d","align_right":"\u53f3\u5bf9\u9f50","align_left":"\u5de6\u5bf9\u9f50","align_default":"\u9ed8\u8ba4",align:"\u5bf9\u9f50",border:"\u8fb9\u6846",cellpadding:"\u5355\u5143\u683c\u8fb9\u8ddd",cellspacing:"\u5355\u5143\u683c\u95f4\u8ddd",rows:"\u884c\u6570",cols:"\u5217\u6570",height:"\u9ad8\u5ea6",width:"\u5bbd\u5ea6",title:"\u63d2\u5165/\u7f16\u8f91 \u8868\u683c",rowtype:"\u884c\u6240\u5728\u7684\u8868\u683c\u4f4d\u7f6e","advanced_props":"\u9ad8\u7ea7\u5c5e\u6027","general_props":"\u666e\u901a\u5c5e\u6027","advanced_tab":"\u9ad8\u7ea7","general_tab":"\u666e\u901a","cell_col":"\u66f4\u65b0\u8be5\u5217\u5168\u90e8\u5355\u5143\u683c"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/table/merge_cells.htm b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/table/merge_cells.htm deleted file mode 100644 index d231090e79..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/table/merge_cells.htm +++ /dev/null @@ -1,32 +0,0 @@ - - - - {#table_dlg.merge_cells_title} - - - - - - -
    -
    - {#table_dlg.merge_cells_title} - - - - - - - - - -
    :
    :
    -
    - -
    - - -
    -
    - - diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/table/row.htm b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/table/row.htm deleted file mode 100644 index 6ebef28427..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/table/row.htm +++ /dev/null @@ -1,158 +0,0 @@ - - - - {#table_dlg.row_title} - - - - - - - - - -
    - - -
    -
    -
    - {#table_dlg.general_props} - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    - -
    - -
    - -
    -
    -
    - -
    -
    - {#table_dlg.advanced_props} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    - -
    - - - - - -
     
    -
    - - - - - - -
     
    -
    -
    -
    -
    -
    - -
    -
    - -
    - - - -
    -
    - - diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/table/table.htm b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/table/table.htm deleted file mode 100644 index b92fa741eb..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/table/table.htm +++ /dev/null @@ -1,188 +0,0 @@ - - - - {#table_dlg.title} - - - - - - - - - - -
    - - -
    -
    -
    - {#table_dlg.general_props} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    -
    -
    - -
    -
    - {#table_dlg.advanced_props} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    - - - - - -
     
    -
    - -
    - -
    - -
    - - - - - -
     
    -
    - - - - - -
     
    -
    -
    -
    -
    - -
    - - -
    -
    - - diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/template/blank.htm b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/template/blank.htm deleted file mode 100644 index ecde53fae7..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/template/blank.htm +++ /dev/null @@ -1,12 +0,0 @@ - - - blank_page - - - - - - - diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/template/css/template.css b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/template/css/template.css deleted file mode 100644 index 2d23a4938c..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/template/css/template.css +++ /dev/null @@ -1,23 +0,0 @@ -#frmbody { - padding: 10px; - background-color: #FFF; - border: 1px solid #CCC; -} - -.frmRow { - margin-bottom: 10px; -} - -#templatesrc { - border: none; - width: 320px; - height: 240px; -} - -.title { - padding-bottom: 5px; -} - -.mceActionPanel { - padding-top: 5px; -} diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/template/editor_plugin.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/template/editor_plugin.js deleted file mode 100644 index ebe3c27d78..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/template/editor_plugin.js +++ /dev/null @@ -1 +0,0 @@ -(function(){var a=tinymce.each;tinymce.create("tinymce.plugins.TemplatePlugin",{init:function(b,c){var d=this;d.editor=b;b.addCommand("mceTemplate",function(e){b.windowManager.open({file:c+"/template.htm",width:b.getParam("template_popup_width",750),height:b.getParam("template_popup_height",600),inline:1},{plugin_url:c})});b.addCommand("mceInsertTemplate",d._insertTemplate,d);b.addButton("template",{title:"template.desc",cmd:"mceTemplate"});b.onPreProcess.add(function(e,g){var f=e.dom;a(f.select("div",g.node),function(h){if(f.hasClass(h,"mceTmpl")){a(f.select("*",h),function(i){if(f.hasClass(i,e.getParam("template_mdate_classes","mdate").replace(/\s+/g,"|"))){i.innerHTML=d._getDateTime(new Date(),e.getParam("template_mdate_format",e.getLang("template.mdate_format")))}});d._replaceVals(h)}})})},getInfo:function(){return{longname:"Template plugin",author:"Moxiecode Systems AB",authorurl:"http://www.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/template",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_insertTemplate:function(i,j){var k=this,g=k.editor,f,c,d=g.dom,b=g.selection.getContent();f=j.content;a(k.editor.getParam("template_replace_values"),function(l,h){if(typeof(l)!="function"){f=f.replace(new RegExp("\\{\\$"+h+"\\}","g"),l)}});c=d.create("div",null,f);n=d.select(".mceTmpl",c);if(n&&n.length>0){c=d.create("div",null);c.appendChild(n[0].cloneNode(true))}function e(l,h){return new RegExp("\\b"+h+"\\b","g").test(l.className)}a(d.select("*",c),function(h){if(e(h,g.getParam("template_cdate_classes","cdate").replace(/\s+/g,"|"))){h.innerHTML=k._getDateTime(new Date(),g.getParam("template_cdate_format",g.getLang("template.cdate_format")))}if(e(h,g.getParam("template_mdate_classes","mdate").replace(/\s+/g,"|"))){h.innerHTML=k._getDateTime(new Date(),g.getParam("template_mdate_format",g.getLang("template.mdate_format")))}if(e(h,g.getParam("template_selected_content_classes","selcontent").replace(/\s+/g,"|"))){h.innerHTML=b}});k._replaceVals(c);g.execCommand("mceInsertContent",false,c.innerHTML);g.addVisual()},_replaceVals:function(c){var d=this.editor.dom,b=this.editor.getParam("template_replace_values");a(d.select("*",c),function(f){a(b,function(g,e){if(d.hasClass(f,e)){if(typeof(b[e])=="function"){b[e](f)}}})})},_getDateTime:function(e,b){if(!b){return""}function c(g,d){var f;g=""+g;if(g.length 0) { - el = dom.create('div', null); - el.appendChild(n[0].cloneNode(true)); - } - - function hasClass(n, c) { - return new RegExp('\\b' + c + '\\b', 'g').test(n.className); - }; - - each(dom.select('*', el), function(n) { - // Replace cdate - if (hasClass(n, ed.getParam('template_cdate_classes', 'cdate').replace(/\s+/g, '|'))) - n.innerHTML = t._getDateTime(new Date(), ed.getParam("template_cdate_format", ed.getLang("template.cdate_format"))); - - // Replace mdate - if (hasClass(n, ed.getParam('template_mdate_classes', 'mdate').replace(/\s+/g, '|'))) - n.innerHTML = t._getDateTime(new Date(), ed.getParam("template_mdate_format", ed.getLang("template.mdate_format"))); - - // Replace selection - if (hasClass(n, ed.getParam('template_selected_content_classes', 'selcontent').replace(/\s+/g, '|'))) - n.innerHTML = sel; - }); - - t._replaceVals(el); - - ed.execCommand('mceInsertContent', false, el.innerHTML); - ed.addVisual(); - }, - - _replaceVals : function(e) { - var dom = this.editor.dom, vl = this.editor.getParam('template_replace_values'); - - each(dom.select('*', e), function(e) { - each(vl, function(v, k) { - if (dom.hasClass(e, k)) { - if (typeof(vl[k]) == 'function') - vl[k](e); - } - }); - }); - }, - - _getDateTime : function(d, fmt) { - if (!fmt) - return ""; - - function addZeros(value, len) { - var i; - - value = "" + value; - - if (value.length < len) { - for (i=0; i<(len-value.length); i++) - value = "0" + value; - } - - return value; - } - - fmt = fmt.replace("%D", "%m/%d/%y"); - fmt = fmt.replace("%r", "%I:%M:%S %p"); - fmt = fmt.replace("%Y", "" + d.getFullYear()); - fmt = fmt.replace("%y", "" + d.getYear()); - fmt = fmt.replace("%m", addZeros(d.getMonth()+1, 2)); - fmt = fmt.replace("%d", addZeros(d.getDate(), 2)); - fmt = fmt.replace("%H", "" + addZeros(d.getHours(), 2)); - fmt = fmt.replace("%M", "" + addZeros(d.getMinutes(), 2)); - fmt = fmt.replace("%S", "" + addZeros(d.getSeconds(), 2)); - fmt = fmt.replace("%I", "" + ((d.getHours() + 11) % 12 + 1)); - fmt = fmt.replace("%p", "" + (d.getHours() < 12 ? "AM" : "PM")); - fmt = fmt.replace("%B", "" + this.editor.getLang("template_months_long").split(',')[d.getMonth()]); - fmt = fmt.replace("%b", "" + this.editor.getLang("template_months_short").split(',')[d.getMonth()]); - fmt = fmt.replace("%A", "" + this.editor.getLang("template_day_long").split(',')[d.getDay()]); - fmt = fmt.replace("%a", "" + this.editor.getLang("template_day_short").split(',')[d.getDay()]); - fmt = fmt.replace("%%", "%"); - - return fmt; - } - }); - - // Register plugin - tinymce.PluginManager.add('template', tinymce.plugins.TemplatePlugin); -})(); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/template/js/template.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/template/js/template.js deleted file mode 100644 index bc3045d244..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/template/js/template.js +++ /dev/null @@ -1,106 +0,0 @@ -tinyMCEPopup.requireLangPack(); - -var TemplateDialog = { - preInit : function() { - var url = tinyMCEPopup.getParam("template_external_list_url"); - - if (url != null) - document.write(''); - }, - - init : function() { - var ed = tinyMCEPopup.editor, tsrc, sel, x, u; - - tsrc = ed.getParam("template_templates", false); - sel = document.getElementById('tpath'); - - // Setup external template list - if (!tsrc && typeof(tinyMCETemplateList) != 'undefined') { - for (x=0, tsrc = []; x'); - }); - }, - - selectTemplate : function(u, ti) { - var d = window.frames['templatesrc'].document, x, tsrc = this.tsrc; - - if (!u) - return; - - d.body.innerHTML = this.templateHTML = this.getFileContents(u); - - for (x=0; x - - {#template_dlg.title} - - - - - -
    -
    -
    {#template_dlg.desc}
    -
    - -
    -
    -
    -
    - {#template_dlg.preview} - -
    -
    - -
    - - -
    -
    - - diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracocontextmenu/editor_plugin_src.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracocontextmenu/editor_plugin_src.js deleted file mode 100644 index f3074ef21f..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracocontextmenu/editor_plugin_src.js +++ /dev/null @@ -1,69 +0,0 @@ -/** -* editor_plugin_src.js -* -* Copyright 2012, Umbraco -* Released under MIT License. -* -* License: http://opensource.org/licenses/mit-license.html -*/ - -(function () { - var Event = tinymce.dom.Event, each = tinymce.each, DOM = tinymce.DOM; - - /** - * This plugin modifies the standard TinyMCE context menu, with umbraco specific changes. - * - * @class tinymce.plugins.umbContextMenu - */ - tinymce.create('tinymce.plugins.UmbracoContextMenu', { - /** - * Initializes the plugin, this will be executed after the plugin has been created. - * This call is done before the editor instance has finished it's initialization so use the onInit event - * of the editor instance to intercept that event. - * - * @method init - * @param {tinymce.Editor} ed Editor instance that the plugin is initialized in. - * @param {string} url Absolute URL to where the plugin is located. - */ - init: function (ed) { - if (ed.plugins.contextmenu) { - - ed.plugins.contextmenu.onContextMenu.add(function (th, menu, event) { - - var keys = UmbClientMgr.uiKeys(); - - $.each(menu.items, function (idx, el) { - - switch (el.settings.cmd) { - case "Cut": - el.settings.title = keys['defaultdialogs_cut']; - break; - case "Copy": - el.settings.title = keys['general_copy']; - break; - case "Paste": - el.settings.title = keys['defaultdialogs_paste']; - break; - case "mceAdvLink": - case "mceLink": - el.settings.title = keys['defaultdialogs_insertlink']; - break; - case "UnLink": - el.settings.title = keys['relatedlinks_removeLink']; - break; - case "mceImage": - el.settings.title = keys['defaultdialogs_insertimage']; - el.settings.cmd = "mceUmbimage"; - break; - } - - }); - - }); - } - } - }); - - // Register plugin - tinymce.PluginManager.add('umbracocontextmenu', tinymce.plugins.UmbracoContextMenu); -})(); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracocss/dialog.htm b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracocss/dialog.htm deleted file mode 100644 index b4c62840ea..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracocss/dialog.htm +++ /dev/null @@ -1,27 +0,0 @@ - - - - {#example_dlg.title} - - - - - -
    -

    Here is a example dialog.

    -

    Selected text:

    -

    Custom arg:

    - -
    -
    - -
    - -
    - -
    -
    -
    - - - diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracocss/editor_plugin_src.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracocss/editor_plugin_src.js deleted file mode 100644 index 5c69c72080..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracocss/editor_plugin_src.js +++ /dev/null @@ -1,182 +0,0 @@ -/** -* $Id: editor_plugin_src.js 201 2007-02-12 15:56:56Z spocke $ -* -* @author Moxiecode -* @copyright Copyright 2004-2008, Moxiecode Systems AB, All rights reserved. -*/ - -(function () { - // Load plugin specific language pack - // tinymce.PluginManager.requireLangPack('umbraco'); - - tinymce.create('tinymce.plugins.umbracocss', { - /** - * Initializes the plugin, this will be executed after the plugin has been created. - * This call is done before the editor instance has finished it's initialization so use the onInit event - * of the editor instance to intercept that event. - * - * @param {tinymce.Editor} ed Editor instance that the plugin is initialized in. - * @param {string} url Absolute URL to where the plugin is located. - */ - init: function (ed, url) { - - this.editor = ed; - - // Register the command so that it can be invoked by using tinyMCE.activeEditor.execCommand('mceExample'); - ed.addCommand('mceumbracosetstyle', function () { - alert('blah'); - }); - - - // Add a node change handler, selects the button in the UI when a image is selected - ed.onNodeChange.add(function (ed, cm, n) { - var c = cm.get('umbracostyles'); - var formatSelected = false; - - if (c) { - // check for element - var el = tinymce.DOM.getParent(n, ed.dom.isBlock); - if (el) { - for (var i = 0; i < c.items.length; i++) { - if (c.items[i].value == el.nodeName.toLowerCase()) { - c.select(el.nodeName.toLowerCase()); - formatSelected = true; - } - } - } - - // check for class - if (n.className != '') { - if (c) { - c.select('.' + n.className); - } - } else if (c && !formatSelected) { - c.select(); // reset selector if no class or block elements - } - } - - /* if (c = cm.get('styleselect')) { - if (n.className) { - t._importClasses(); - c.select(n.className); - } else - c.select(); - } - - if (c = cm.get('formatselect')) { - p = DOM.getParent(n, DOM.isBlock); - - if (p) - c.select(p.nodeName.toLowerCase()); - } - */ - }); - }, - - /** - * Creates control instances based in the incomming name. This method is normally not - * needed since the addButton method of the tinymce.Editor class is a more easy way of adding buttons - * but you sometimes need to create more complex controls like listboxes, split buttons etc then this - * method can be used to create those. - * - * @param {String} n Name of the control to create. - * @param {tinymce.ControlManager} cm Control manager to use inorder to create new control. - * @return {tinymce.ui.Control} New control instance or null if no control was created. - */ - createControl: function (n, cm) { - - // add style dropdown - if (n == 'umbracocss') { - - var umbracoStyles = this.editor.getParam('theme_umbraco_styles').split(';'); - - var styles = cm.createListBox('umbracostyles', { - title: this.editor.getLang('umbraco.style_select'), - onselect: function (v) { - if (v == '') { - if (styles.selectedValue.indexOf('.') == 0) { - // remove style - var selectedStyle = styles.selectedValue; - var styleObj = tinymce.activeEditor.formatter.get('umb' + selectedStyle.substring(1, selectedStyle.length)); - if (styleObj == undefined) { - tinymce.activeEditor.formatter.register('umb' + selectedStyle.substring(1, selectedStyle.length), { - inline: 'span', - selector: '*', - classes: selectedStyle.substring(1, selectedStyle.length) - }); - } - tinyMCE.activeEditor.formatter.remove('umb' + selectedStyle.substring(1, selectedStyle.length)); - - // tinymce.activeEditor.execCommand('mceSetStyleInfo', 0, { command: 'removeformat' }); - } else { - // remove block element - tinymce.activeEditor.execCommand('FormatBlock', false, 'p'); - } - } - else if (v.indexOf('.') != '0') { - tinymce.activeEditor.execCommand('FormatBlock', false, v); - } else { - // use new formatting engine - if (tinymce.activeEditor.formatter.get('umb' + v.substring(1, v.length)) == undefined) { - tinymce.activeEditor.formatter.register('umb' + v.substring(1, v.length), { - inline: 'span', - selector: '*', - classes: v.substring(1, v.length) - }); - } - var styleObj = tinymce.activeEditor.formatter.get('umb' + v.substring(1, v.length)); - tinyMCE.activeEditor.formatter.apply('umb' + v.substring(1, v.length)); - - // tinyMCE.activeEditor.execCommand('mceSetCSSClass', false, v.substring(1, v.length)); - - } - return false; - } - }); - - // add styles - for (var i = 0; i < umbracoStyles.length; i++) { - if (umbracoStyles[i] != '') { - var name = umbracoStyles[i].substring(0, umbracoStyles[i].indexOf("=")); - var alias = umbracoStyles[i].substring(umbracoStyles[i].indexOf("=") + 1, umbracoStyles[i].length); - - if (alias.indexOf('.') < 0) - alias = alias.toLowerCase(); - else if (alias.length > 1) { - // register with new formatter engine (can't access from here so a hack in the set style above!) - // tinyMCE.activeEditor.formatter.register('umb' + alias.substring(1, alias.length), { - // classes: alias.substring(1, alias.length) - // }); - } - styles.add(name, alias); - } - } - - - return styles; - } - - return null; - }, - - - /** - * Returns information about the plugin as a name/value array. - * The current keys are longname, author, authorurl, infourl and version. - * - * @return {Object} Name/value array containing information about the plugin. - */ - getInfo: function () { - return { - longname: 'Umbraco CSS/Styling Plugin', - author: 'Umbraco', - authorurl: 'http://umbraco.org', - infourl: 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/example', - version: "1.0" - }; - } - }); - - // Register plugin - tinymce.PluginManager.add('umbracocss', tinymce.plugins.umbracocss); -})(); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracocss/img/example.gif b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracocss/img/example.gif deleted file mode 100644 index 1ab5da4461..0000000000 Binary files a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracocss/img/example.gif and /dev/null differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracocss/js/dialog.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracocss/js/dialog.js deleted file mode 100644 index fa8341132f..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracocss/js/dialog.js +++ /dev/null @@ -1,19 +0,0 @@ -tinyMCEPopup.requireLangPack(); - -var ExampleDialog = { - init : function() { - var f = document.forms[0]; - - // Get the selected contents as text and place it in the input - f.someval.value = tinyMCEPopup.editor.selection.getContent({format : 'text'}); - f.somearg.value = tinyMCEPopup.getWindowArg('some_custom_arg'); - }, - - insert : function() { - // Insert the contents from the input into the document - tinyMCEPopup.editor.execCommand('mceInsertContent', false, document.forms[0].someval.value); - tinyMCEPopup.close(); - } -}; - -tinyMCEPopup.onInit.add(ExampleDialog.init, ExampleDialog); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracocss/langs/en.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracocss/langs/en.js deleted file mode 100644 index e0784f80f4..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracocss/langs/en.js +++ /dev/null @@ -1,3 +0,0 @@ -tinyMCE.addI18n('en.example',{ - desc : 'This is just a template button' -}); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracocss/langs/en_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracocss/langs/en_dlg.js deleted file mode 100644 index ebcf948dac..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracocss/langs/en_dlg.js +++ /dev/null @@ -1,3 +0,0 @@ -tinyMCE.addI18n('en.example_dlg',{ - title : 'This is just a example title' -}); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracocss/langs/en_us.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracocss/langs/en_us.js deleted file mode 100644 index fbda3698e0..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracocss/langs/en_us.js +++ /dev/null @@ -1,3 +0,0 @@ -tinyMCE.addI18n('en_us.example',{ - desc : 'This is just a template button' -}); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracocss/langs/en_us_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracocss/langs/en_us_dlg.js deleted file mode 100644 index 0468c4553c..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracocss/langs/en_us_dlg.js +++ /dev/null @@ -1,3 +0,0 @@ -tinyMCE.addI18n('en_us.example_dlg',{ - title : 'This is just a example title' -}); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracocss/langs/it.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracocss/langs/it.js deleted file mode 100644 index 64b457b77a..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracocss/langs/it.js +++ /dev/null @@ -1,3 +0,0 @@ -tinyMCE.addI18n('it.example',{ -desc : 'Esempio di pulsante' -}); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracocss/langs/it_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracocss/langs/it_dlg.js deleted file mode 100644 index 5231d1bcb8..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracocss/langs/it_dlg.js +++ /dev/null @@ -1,3 +0,0 @@ -tinyMCE.addI18n('it.example_dlg',{ -title : 'Esempio di titolo' -}); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracocss/langs/ja.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracocss/langs/ja.js deleted file mode 100644 index ec36588eb2..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracocss/langs/ja.js +++ /dev/null @@ -1,3 +0,0 @@ -tinyMCE.addI18n('ja.example',{ - desc : 'これはテンプレートボタンです' -}); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracocss/langs/ja_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracocss/langs/ja_dlg.js deleted file mode 100644 index 36f9983bb4..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracocss/langs/ja_dlg.js +++ /dev/null @@ -1,3 +0,0 @@ -tinyMCE.addI18n('ja.example_dlg',{ - title : 'これは見出しの例です' -}); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracocss/langs/ru.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracocss/langs/ru.js deleted file mode 100644 index c97594d0ea..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracocss/langs/ru.js +++ /dev/null @@ -1,3 +0,0 @@ -tinyMCE.addI18n('ru.example',{ - desc : 'Это просто образец кнопки' -}); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracocss/langs/ru_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracocss/langs/ru_dlg.js deleted file mode 100644 index 55b4db076c..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracocss/langs/ru_dlg.js +++ /dev/null @@ -1,3 +0,0 @@ -tinyMCE.addI18n('ru.example_dlg',{ - title : 'Это просто пример заголовка' -}); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracocss/langs/sv.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracocss/langs/sv.js deleted file mode 100644 index 4759e3c71f..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracocss/langs/sv.js +++ /dev/null @@ -1,3 +0,0 @@ -tinyMCE.addI18n('sv.example',{ - desc : 'Detta är bara en mallknapp' -}); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracocss/langs/sv_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracocss/langs/sv_dlg.js deleted file mode 100644 index 6ac1706907..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracocss/langs/sv_dlg.js +++ /dev/null @@ -1,3 +0,0 @@ -tinyMCE.addI18n('sv.example_dlg',{ - title : 'Detta är bara ett exempel på en titel' -}); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracocss/langs/zh.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracocss/langs/zh.js deleted file mode 100644 index cd9c36ea9b..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracocss/langs/zh.js +++ /dev/null @@ -1,3 +0,0 @@ -tinyMCE.addI18n('zh.example',{ - desc : '这是示例按钮' -}); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracocss/langs/zh_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracocss/langs/zh_dlg.js deleted file mode 100644 index db7ad925a0..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracocss/langs/zh_dlg.js +++ /dev/null @@ -1,3 +0,0 @@ -tinyMCE.addI18n('zh.example_dlg',{ - title : '这是示例标题' -}); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoembed/dialog.htm b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoembed/dialog.htm deleted file mode 100644 index a89fcc1283..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoembed/dialog.htm +++ /dev/null @@ -1,92 +0,0 @@ - - - - {#embed_dlg.title} - - - - - - - - -
    - -
    -
    -
    - {#embed_dlg.general} - - - - - - - - - -
    - -
    - - - - - - -
    x   
    -
    - -
    -
    - {#embed_dlg.preview} -
    -
    - -
    -
    -
    -
    -
    -
    - {#embed_dlg.source} - -
    -
    -
    - - -
    - - -
    -
    - - - diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoembed/editor_plugin.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoembed/editor_plugin.js deleted file mode 100644 index ec1f81ea40..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoembed/editor_plugin.js +++ /dev/null @@ -1 +0,0 @@ -(function(){tinymce.PluginManager.requireLangPack("example");tinymce.create("tinymce.plugins.ExamplePlugin",{init:function(a,b){a.addCommand("mceExample",function(){a.windowManager.open({file:b+"/dialog.htm",width:320+parseInt(a.getLang("example.delta_width",0)),height:120+parseInt(a.getLang("example.delta_height",0)),inline:1},{plugin_url:b,some_custom_arg:"custom arg"})});a.addButton("example",{title:"example.desc",cmd:"mceExample",image:b+"/img/example.gif"});a.onNodeChange.add(function(d,c,e){c.setActive("example",e.nodeName=="IMG")})},createControl:function(b,a){return null},getInfo:function(){return{longname:"Example plugin",author:"Some author",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/example",version:"1.0"}}});tinymce.PluginManager.add("example",tinymce.plugins.ExamplePlugin)})(); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoembed/editor_plugin_src.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoembed/editor_plugin_src.js deleted file mode 100644 index 4649f37ecf..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoembed/editor_plugin_src.js +++ /dev/null @@ -1,84 +0,0 @@ -/** - * editor_plugin_src.js - * - * Copyright 2009, Moxiecode Systems AB - * Released under LGPL License. - * - * License: http://tinymce.moxiecode.com/license - * Contributing: http://tinymce.moxiecode.com/contributing - */ - -(function() { - // Load plugin specific language pack - tinymce.PluginManager.requireLangPack('umbracoembed'); - - tinymce.create('tinymce.plugins.umbracoembed', { - /** - * Initializes the plugin, this will be executed after the plugin has been created. - * This call is done before the editor instance has finished it's initialization so use the onInit event - * of the editor instance to intercept that event. - * - * @param {tinymce.Editor} ed Editor instance that the plugin is initialized in. - * @param {string} url Absolute URL to where the plugin is located. - */ - init : function(ed, url) { - // Register the command so that it can be invoked by using tinyMCE.activeEditor.execCommand('mceExample'); - ed.addCommand('mceUmbracoEmbed', function() { - ed.windowManager.open({ - file : url + '/dialog.htm', - width : 600 + parseInt(ed.getLang('example.delta_width', 0)), - height : 400 + parseInt(ed.getLang('example.delta_height', 0)), - inline : 1 - }, { - plugin_url : url, // Plugin absolute URL - some_custom_arg : 'custom arg' // Custom argument - }); - }); - - // Register example button - ed.addButton('umbracoembed', { - title : 'umbracoembed.desc', - cmd : 'mceUmbracoEmbed', - image : url + '/img/embed.gif' - }); - - // Add a node change handler, selects the button in the UI when a image is selected - /*ed.onNodeChange.add(function(ed, cm, n) { - cm.setActive('example', n.nodeName == 'IMG'); - });*/ - }, - - /** - * Creates control instances based in the incomming name. This method is normally not - * needed since the addButton method of the tinymce.Editor class is a more easy way of adding buttons - * but you sometimes need to create more complex controls like listboxes, split buttons etc then this - * method can be used to create those. - * - * @param {String} n Name of the control to create. - * @param {tinymce.ControlManager} cm Control manager to use inorder to create new control. - * @return {tinymce.ui.Control} New control instance or null if no control was created. - */ - createControl : function(n, cm) { - return null; - }, - - /** - * Returns information about the plugin as a name/value array. - * The current keys are longname, author, authorurl, infourl and version. - * - * @return {Object} Name/value array containing information about the plugin. - */ - getInfo : function() { - return { - longname : 'Umbraco Embed', - author : 'Tim Geyssens', - authorurl : 'http://http://umbraco.com/', - infourl : 'http://http://umbraco.com/', - version : "1.0" - }; - } - }); - - // Register plugin - tinymce.PluginManager.add('umbracoembed', tinymce.plugins.umbracoembed); -})(); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoembed/img/ajax-loader.gif b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoembed/img/ajax-loader.gif deleted file mode 100644 index 521a291d74..0000000000 Binary files a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoembed/img/ajax-loader.gif and /dev/null differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoembed/img/embed.gif b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoembed/img/embed.gif deleted file mode 100644 index 76216085d3..0000000000 Binary files a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoembed/img/embed.gif and /dev/null differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoembed/img/embed.png b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoembed/img/embed.png deleted file mode 100644 index a8d147d76c..0000000000 Binary files a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoembed/img/embed.png and /dev/null differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoembed/js/dialog.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoembed/js/dialog.js deleted file mode 100644 index 4cf224eb04..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoembed/js/dialog.js +++ /dev/null @@ -1,90 +0,0 @@ -tinyMCEPopup.requireLangPack(); - -var UmbracoEmbedDialog = { - insert: function () { - // Insert the contents from the input into the document - tinyMCEPopup.editor.execCommand('mceInsertContent', false, $('#source').val()); - tinyMCEPopup.close(); - }, - showPreview: function () { - $('#insert').attr('disabled', 'disabled'); - - var url = $('#url').val(); - var width = $('#width').val(); ; - var height = $('#height').val(); ; - - $('#preview').html('loading'); - $('#source').val(''); - - $.ajax({ - type: 'POST', - async: true, - url: '../../../../base/EmbedMediaService/Embed/', - data: { url: url, width: width, height: height }, - dataType: 'json', - success: function (result) { - switch (result.Status) { - case 0: - //not supported - $('#preview').html('Not Supported'); - break; - case 1: - //error - $('#preview').html('Error'); - break; - case 2: - $('#preview').html(result.Markup); - $('#source').val(result.Markup); - if (result.SupportsDimensions) { - $('#dimensions').show(); - } else { - $('#dimensions').hide(); - } - $('#insert').removeAttr('disabled'); - break; - } - }, - error: function (xhr, ajaxOptions, thrownError) { - $('#preview').html("Error"); - } - }); - }, - beforeResize: function () { - this.width = parseInt($('#width').val(), 10); - this.height = parseInt($('#height').val(), 10); - }, - changeSize: function (type) { - var width, height, scale, size; - - if ($('#constrain').is(':checked')) { - width = parseInt($('#width').val(), 10); - height = parseInt($('#height').val(), 10); - if (type == 'width') { - this.height = Math.round((width / this.width) * height); - $('#height').val(this.height); - } else { - this.width = Math.round((height / this.height) * width); - $('#width').val(this.width); - } - } - if ($('#url').val() != '') { - UmbracoEmbedDialog.showPreview(); - } - }, - changeSource: function (type) { - if ($('#source').val() != '') { - $('#insert').removeAttr('disabled'); - } - else { - $('#insert').attr('disabled', 'disabled'); - } - }, - updatePreviewFromSource: function (type) { - var sourceVal = $('#source').val(); - - if (sourceVal != '') { - $('#preview').html(sourceVal); - } - } -}; - diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoembed/langs/da.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoembed/langs/da.js deleted file mode 100644 index a93d2e36f2..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoembed/langs/da.js +++ /dev/null @@ -1,3 +0,0 @@ -tinyMCE.addI18n('da.umbracoembed', { - desc: 'Inds\u00E6t ekstern mediefil' -}); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoembed/langs/da_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoembed/langs/da_dlg.js deleted file mode 100644 index 3082589539..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoembed/langs/da_dlg.js +++ /dev/null @@ -1,9 +0,0 @@ -tinyMCE.addI18n('da.embed_dlg', { - title: 'Inds\u00E6t ekstern mediefil', - general: 'Generelt', - url: 'Url:', - size: 'Dimensioner:', - constrain_proportions: 'Bevar proportioner', - preview: 'Vis', - source: 'Vis kilde' -}); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoembed/langs/de.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoembed/langs/de.js deleted file mode 100644 index ad0b940580..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoembed/langs/de.js +++ /dev/null @@ -1,10 +0,0 @@ -tinyMCE.addI18n('de.embed_dlg', { - title: 'Medien von Drittanbietern einbetten', - general: 'Allgemein', - url: 'Url:', - size: 'Abmessungen:', - constrain_proportions: 'Proportionen beibehalten', - preview: 'Vorschau', - source: 'Quellcode' - -}); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoembed/langs/de_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoembed/langs/de_dlg.js deleted file mode 100644 index ad0b940580..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoembed/langs/de_dlg.js +++ /dev/null @@ -1,10 +0,0 @@ -tinyMCE.addI18n('de.embed_dlg', { - title: 'Medien von Drittanbietern einbetten', - general: 'Allgemein', - url: 'Url:', - size: 'Abmessungen:', - constrain_proportions: 'Proportionen beibehalten', - preview: 'Vorschau', - source: 'Quellcode' - -}); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoembed/langs/en.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoembed/langs/en.js deleted file mode 100644 index 2b086df34e..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoembed/langs/en.js +++ /dev/null @@ -1,3 +0,0 @@ -tinyMCE.addI18n('en.umbracoembed', { - desc: 'Embed third party media' -}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoembed/langs/en_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoembed/langs/en_dlg.js deleted file mode 100644 index e131d87533..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoembed/langs/en_dlg.js +++ /dev/null @@ -1,10 +0,0 @@ -tinyMCE.addI18n('en.embed_dlg', { - title: 'Embed third party media', - general: 'General', - url: 'Url:', - size: 'Size:', - constrain_proportions: 'Constrain', - preview: 'Preview', - source: 'Source' - -}); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoembed/langs/en_us.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoembed/langs/en_us.js deleted file mode 100644 index 4698979aab..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoembed/langs/en_us.js +++ /dev/null @@ -1,3 +0,0 @@ -tinyMCE.addI18n('en_us.umbracoembed', { - desc: 'Embed third party media' -}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoembed/langs/en_us_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoembed/langs/en_us_dlg.js deleted file mode 100644 index 8c6a070226..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoembed/langs/en_us_dlg.js +++ /dev/null @@ -1,10 +0,0 @@ -tinyMCE.addI18n('en_us.embed_dlg', { - title: 'Embed third party media', - general: 'General', - url: 'Url:', - size: 'Size:', - constrain_proportions: 'Constrain', - preview: 'Preview', - source: 'Source' - -}); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoembed/langs/it.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoembed/langs/it.js deleted file mode 100644 index a8ff6693ab..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoembed/langs/it.js +++ /dev/null @@ -1,9 +0,0 @@ -tinyMCE.addI18n('en.embed_dlg', { -title: 'Integra media di terze parti', -general: 'Generale', -url: 'Url:', -size: 'Dimensione:', -constrain_proportions: 'Vincolo', -preview: 'Anteprima', -source: 'Sorgente' -}); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoembed/langs/it_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoembed/langs/it_dlg.js deleted file mode 100644 index 87766ce2da..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoembed/langs/it_dlg.js +++ /dev/null @@ -1,9 +0,0 @@ -tinyMCE.addI18n('it.embed_dlg', { -title: 'Integra media di terze parti', -general: 'Generale', -url: 'Url:', -size: 'Dimensione:', -constrain_proportions: 'Vincolo', -preview: 'Anteprima', -source: 'Sorgente' -}); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoembed/langs/ja.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoembed/langs/ja.js deleted file mode 100644 index c525d3a37e..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoembed/langs/ja.js +++ /dev/null @@ -1,10 +0,0 @@ -tinyMCE.addI18n('ja.embed_dlg', { - title: 'サードパーティメディアの埋め込み', - general: '一般', - url: 'Url:', - size: 'サイズ:', - constrain_proportions: '制約', - preview: 'プレビュー', - source: 'ソース' - -}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoembed/langs/ja_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoembed/langs/ja_dlg.js deleted file mode 100644 index db01d093c9..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoembed/langs/ja_dlg.js +++ /dev/null @@ -1,10 +0,0 @@ -tinyMCE.addI18n('ja.embed_dlg', { - title: サードパーティメディアの埋め込み', - general: '一般', - url: 'Url:', - size: 'サイズ:', - constrain_proportions: '制約', - preview: 'プレビュー', - source: 'ソース' - -}); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoembed/langs/ru.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoembed/langs/ru.js deleted file mode 100644 index a1b566597b..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoembed/langs/ru.js +++ /dev/null @@ -1,10 +0,0 @@ -tinyMCE.addI18n('ru.embed_dlg', { - title: 'Вставить внеший элемент медиа', - general: 'Общее', - url: 'Ссылка:', - size: 'Размер:', - constrain_proportions: 'Сохранять пропорции', - preview: 'Просмотр', - source: 'Источник' - -}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoembed/langs/ru_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoembed/langs/ru_dlg.js deleted file mode 100644 index a1b566597b..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoembed/langs/ru_dlg.js +++ /dev/null @@ -1,10 +0,0 @@ -tinyMCE.addI18n('ru.embed_dlg', { - title: 'Вставить внеший элемент медиа', - general: 'Общее', - url: 'Ссылка:', - size: 'Размер:', - constrain_proportions: 'Сохранять пропорции', - preview: 'Просмотр', - source: 'Источник' - -}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoembed/langs/sv.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoembed/langs/sv.js deleted file mode 100644 index 36bcaf8758..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoembed/langs/sv.js +++ /dev/null @@ -1,10 +0,0 @@ -tinyMCE.addI18n('sv.embed_dlg', { - title: 'Bädda in tredjeparts media', - general: 'Generell', - url: 'Url:', - size: 'Storlek:', - constrain_proportions: 'Bibehåll proportioner', - preview: 'Förhandsgranska', - source: 'Källa' - -}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoembed/langs/sv_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoembed/langs/sv_dlg.js deleted file mode 100644 index 36bcaf8758..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoembed/langs/sv_dlg.js +++ /dev/null @@ -1,10 +0,0 @@ -tinyMCE.addI18n('sv.embed_dlg', { - title: 'Bädda in tredjeparts media', - general: 'Generell', - url: 'Url:', - size: 'Storlek:', - constrain_proportions: 'Bibehåll proportioner', - preview: 'Förhandsgranska', - source: 'Källa' - -}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoembed/langs/zh.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoembed/langs/zh.js deleted file mode 100644 index ee41077410..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoembed/langs/zh.js +++ /dev/null @@ -1,10 +0,0 @@ -tinyMCE.addI18n('zh.embed_dlg', { - title: '嵌入第三方媒体', - general: '普通', - url: '链接:', - size: '尺寸:', - constrain_proportions: '约束比例', - preview: '预览', - source: '源' - -}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoembed/langs/zh_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoembed/langs/zh_dlg.js deleted file mode 100644 index 2e59f0be58..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoembed/langs/zh_dlg.js +++ /dev/null @@ -1,9 +0,0 @@ -tinyMCE.addI18n('zh.embed_dlg', { - title: '嵌入第三方媒体', - general: '普通', - url: '链接:', - size: '尺寸:', - constrain_proportions: '约束比例', - preview: '预览', - source: '源' -}); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoimg/editor_plugin_src.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoimg/editor_plugin_src.js deleted file mode 100644 index accb078909..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoimg/editor_plugin_src.js +++ /dev/null @@ -1,52 +0,0 @@ -/** - * $Id: editor_plugin_src.js 677 2008-03-07 13:52:41Z spocke $ - * - * @author Moxiecode - * @copyright Copyright 2004-2008, Moxiecode Systems AB, All rights reserved. - */ - -(function() { -// tinymce.PluginManager.requireLangPack('umbraco'); - - tinymce.create('tinymce.plugins.UmbracoImagePlugin', { - init: function(ed, url) { - // Register commands - ed.addCommand('mceUmbimage', function() { - // Internal image object like a flash placeholder - if (ed.dom.getAttrib(ed.selection.getNode(), 'class').indexOf('mceItem') != -1) - return; - - ed.windowManager.open({ - /* UMBRACO SPECIFIC: Load Umbraco modal window */ - file: tinyMCE.activeEditor.getParam('umbraco_path') + '/plugins/tinymce3/insertImage.aspx', - width: 575 + ed.getLang('umbracoimg.delta_width', 0), - height: 505 + ed.getLang('umbracoimg.delta_height', 0), - inline: 1 - }, { - plugin_url: url - }); - }); - - // Register buttons - ed.addButton('image', { - title: 'advimage.image_desc', - cmd: 'mceUmbimage' - }); - - }, - - getInfo: function() { - return { - longname: 'Umbraco image dialog', - author: 'Umbraco', - authorurl: 'http://umbraco.org', - infourl: 'http://umbraco.org', - version: "1.0" - }; - } - }); - - // Register plugin - tinymce.PluginManager.add('umbracoimg', tinymce.plugins.UmbracoImagePlugin); - -})(); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoimg/js/image.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoimg/js/image.js deleted file mode 100644 index 25d0028fe8..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoimg/js/image.js +++ /dev/null @@ -1,332 +0,0 @@ -var ImageDialog = { - preInit: function() { - var url; - - tinyMCEPopup.requireLangPack(); - - if (url = tinyMCEPopup.getParam("external_image_list_url")) - document.write(''); - }, - - init: function(ed) { - var f = document.forms[0], nl = f.elements, ed = tinyMCEPopup.editor, dom = ed.dom, n = ed.selection.getNode(); - - tinyMCEPopup.resizeToInnerSize(); - - if (n.nodeName == 'IMG') { - nl.src.value = dom.getAttrib(n, 'src'); - nl.width.value = dom.getAttrib(n, 'width'); - nl.height.value = dom.getAttrib(n, 'height'); - nl.alt.value = dom.getAttrib(n, 'alt'); - nl.orgHeight.value = dom.getAttrib(n, 'rel').split(",")[1]; - nl.orgWidth.value = dom.getAttrib(n, 'rel').split(",")[0]; - - } - - // If option enabled default contrain proportions to checked - if ((ed.getParam("advimage_constrain_proportions", true)) && f.constrain) - f.constrain.checked = true; - - this.changeAppearance(); - this.showPreviewImage(nl.src.value, 1); - }, - - insert: function(file, title) { - var ed = tinyMCEPopup.editor, t = this, f = document.forms[0]; - - if (f.src.value === '') { - if (ed.selection.getNode().nodeName == 'IMG') { - ed.dom.remove(ed.selection.getNode()); - ed.execCommand('mceRepaint'); - } - - tinyMCEPopup.close(); - return; - } - - if (tinyMCEPopup.getParam("accessibility_warnings", 1)) { - if (!f.alt.value) { - tinyMCEPopup.confirm(tinyMCEPopup.getLang('advimage_dlg.missing_alt'), function(s) { - if (s) - t.insertAndClose(); - }); - - return; - } - } - - t.insertAndClose(); - }, - - insertAndClose: function() { - var ed = tinyMCEPopup.editor, f = document.forms[0], nl = f.elements, v, args = {}, el; - - tinyMCEPopup.restoreSelection(); - - // Fixes crash in Safari - if (tinymce.isWebKit) - ed.getWin().focus(); - - if (!ed.settings.inline_styles) { - args = { - vspace: nl.vspace.value, - hspace: nl.hspace.value, - border: nl.border.value, - align: getSelectValue(f, 'align') - }; - } else { - // Remove deprecated values - args = { - vspace: '', - hspace: '', - border: '', - align: '' - }; - } - - tinymce.extend(args, { - src: nl.src.value, - width: nl.width.value, - height: nl.height.value, - alt: nl.alt.value, - title: nl.alt.value, - rel: nl.orgWidth.value + ',' + nl.orgHeight.value - }); - - args.onmouseover = args.onmouseout = ''; - - el = ed.selection.getNode(); - - if (el && el.nodeName == 'IMG') { - ed.dom.setAttribs(el, args); - } else { - ed.execCommand('mceInsertContent', false, '', { skip_undo: 1 }); - ed.dom.setAttribs('__mce_tmp', args); - ed.dom.setAttrib('__mce_tmp', 'id', ''); - ed.undoManager.add(); - } - - tinyMCEPopup.close(); - }, - - getAttrib: function(e, at) { - var ed = tinyMCEPopup.editor, dom = ed.dom, v, v2; - - if (ed.settings.inline_styles) { - switch (at) { - case 'align': - if (v = dom.getStyle(e, 'float')) - return v; - - if (v = dom.getStyle(e, 'vertical-align')) - return v; - - break; - - case 'hspace': - v = dom.getStyle(e, 'margin-left') - v2 = dom.getStyle(e, 'margin-right'); - - if (v && v == v2) - return parseInt(v.replace(/[^0-9]/g, '')); - - break; - - case 'vspace': - v = dom.getStyle(e, 'margin-top') - v2 = dom.getStyle(e, 'margin-bottom'); - if (v && v == v2) - return parseInt(v.replace(/[^0-9]/g, '')); - - break; - - case 'border': - v = 0; - - tinymce.each(['top', 'right', 'bottom', 'left'], function(sv) { - sv = dom.getStyle(e, 'border-' + sv + '-width'); - - // False or not the same as prev - if (!sv || (sv != v && v !== 0)) { - v = 0; - return false; - } - - if (sv) - v = sv; - }); - - if (v) - return parseInt(v.replace(/[^0-9]/g, '')); - - break; - } - } - - if (v = dom.getAttrib(e, at)) - return v; - - return ''; - }, - - setSwapImage: function(st) { - var f = document.forms[0]; - - f.onmousemovecheck.checked = st; - setBrowserDisabled('overbrowser', !st); - setBrowserDisabled('outbrowser', !st); - - if (f.over_list) - f.over_list.disabled = !st; - - if (f.out_list) - f.out_list.disabled = !st; - - f.onmouseoversrc.disabled = !st; - f.onmouseoutsrc.disabled = !st; - }, - - resetImageData: function() { - var f = document.forms[0]; - - f.elements.width.value = f.elements.height.value = ''; - }, - - updateImageData: function(img, st) { - var f = document.forms[0]; - - if (!st) { - f.elements.width.value = img.width; - f.elements.height.value = img.height; - } - - this.preloadImg = img; - }, - - changeAppearance: function() { - var ed = tinyMCEPopup.editor, f = document.forms[0], img = document.getElementById('alignSampleImg'); - - if (img) { - if (ed.getParam('inline_styles')) { - ed.dom.setAttrib(img, 'style', f.style.value); - } else { - img.align = f.align.value; - img.border = f.border.value; - img.hspace = f.hspace.value; - img.vspace = f.vspace.value; - } - } - }, - - changeHeight: function() { - var f = document.forms[0], tp, t = this; - alert(t.preloadImg); - - if (!f.constrain.checked || !t.preloadImg) { - return; - } - - if (f.width.value == '' || f.height.value == '') - return; - - tp = (parseInt(f.width.value) / parseInt(t.preloadImg.width)) * t.preloadImg.height; - f.height.value = tp.toFixed(0); - }, - - changeWidth: function() { - var f = document.forms[0], tp, t = this; - - if (!f.constrain.checked || !t.preloadImg) { - return; - } - - if (f.width.value == '' || f.height.value == '') - return; - - tp = (parseInt(f.height.value) / parseInt(t.preloadImg.height)) * t.preloadImg.width; - f.width.value = tp.toFixed(0); - }, - - updateStyle: function(ty) { - var dom = tinyMCEPopup.dom, st, v, f = document.forms[0], img = dom.create('img', { style: dom.get('style').value }); - - if (tinyMCEPopup.editor.settings.inline_styles) { - // Handle align - if (ty == 'align') { - dom.setStyle(img, 'float', ''); - dom.setStyle(img, 'vertical-align', ''); - - v = getSelectValue(f, 'align'); - if (v) { - if (v == 'left' || v == 'right') - dom.setStyle(img, 'float', v); - else - img.style.verticalAlign = v; - } - } - - // Handle border - if (ty == 'border') { - dom.setStyle(img, 'border', ''); - - v = f.border.value; - if (v || v == '0') { - if (v == '0') - img.style.border = '0'; - else - img.style.border = v + 'px solid black'; - } - } - - // Handle hspace - if (ty == 'hspace') { - dom.setStyle(img, 'marginLeft', ''); - dom.setStyle(img, 'marginRight', ''); - - v = f.hspace.value; - if (v) { - img.style.marginLeft = v + 'px'; - img.style.marginRight = v + 'px'; - } - } - - // Handle vspace - if (ty == 'vspace') { - dom.setStyle(img, 'marginTop', ''); - dom.setStyle(img, 'marginBottom', ''); - - v = f.vspace.value; - if (v) { - img.style.marginTop = v + 'px'; - img.style.marginBottom = v + 'px'; - } - } - - // Merge - dom.get('style').value = dom.serializeStyle(dom.parseStyle(img.style.cssText)); - } - }, - - changeMouseMove: function() { - }, - - showPreviewImage: function(u, st) { - if (!u) { - tinyMCEPopup.dom.setHTML('prev', ''); - return; - } - - if (!st && tinyMCEPopup.getParam("advimage_update_dimensions_onchange", true)) - this.resetImageData(); - - u = tinyMCEPopup.editor.documentBaseURI.toAbsolute(u); - - if (!st) - tinyMCEPopup.dom.setHTML('prev', ''); - else - tinyMCEPopup.dom.setHTML('prev', ''); - } -}; - -ImageDialog.preInit(); -tinyMCEPopup.onInit.add(ImageDialog.init, ImageDialog); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoimg/langs/en_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoimg/langs/en_dlg.js deleted file mode 100644 index 36c09935a4..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoimg/langs/en_dlg.js +++ /dev/null @@ -1,43 +0,0 @@ -tinyMCE.addI18n('en.umbimage_dlg', { - tab_general: 'General', - tab_appearance: 'Appearance', - tab_advanced: 'Advanced', - general: 'General', - title: 'Title', - preview: 'Preview', - constrain_proportions: 'Constrain proportions', - langdir: 'Language direction', - langcode: 'Language code', - long_desc: 'Long description link', - style: 'Style', - classes: 'Classes', - ltr: 'Left to right', - rtl: 'Right to left', - id: 'Id', - map: 'Image map', - swap_image: 'Swap image', - alt_image: 'Alternative image', - mouseover: 'for mouse over', - mouseout: 'for mouse out', - misc: 'Miscellaneous', - example_img: 'Appearance preview 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.', - dialog_title: 'Insert/edit image', - src: 'Image URL', - alt: 'Image description', - list: 'Image list', - border: 'Border', - dimensions: 'Dimensions', - vspace: 'Vertical space', - hspace: 'Horizontal space', - align: 'Alignment', - align_baseline: 'Baseline', - align_top: 'Top', - align_middle: 'Middle', - align_bottom: 'Bottom', - align_texttop: 'Text top', - align_textbottom: 'Text bottom', - align_left: 'Left', - align_right: 'Right', - image_list: 'Image list' -}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoimg/langs/en_us_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoimg/langs/en_us_dlg.js deleted file mode 100644 index db5be8ae0b..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoimg/langs/en_us_dlg.js +++ /dev/null @@ -1,43 +0,0 @@ -tinyMCE.addI18n('en_us.umbimage_dlg', { - tab_general: 'General', - tab_appearance: 'Appearance', - tab_advanced: 'Advanced', - general: 'General', - title: 'Title', - preview: 'Preview', - constrain_proportions: 'Constrain proportions', - langdir: 'Language direction', - langcode: 'Language code', - long_desc: 'Long description link', - style: 'Style', - classes: 'Classes', - ltr: 'Left to right', - rtl: 'Right to left', - id: 'Id', - map: 'Image map', - swap_image: 'Swap image', - alt_image: 'Alternative image', - mouseover: 'for mouse over', - mouseout: 'for mouse out', - misc: 'Miscellaneous', - example_img: 'Appearance preview 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.', - dialog_title: 'Insert/edit image', - src: 'Image URL', - alt: 'Image description', - list: 'Image list', - border: 'Border', - dimensions: 'Dimensions', - vspace: 'Vertical space', - hspace: 'Horizontal space', - align: 'Alignment', - align_baseline: 'Baseline', - align_top: 'Top', - align_middle: 'Middle', - align_bottom: 'Bottom', - align_texttop: 'Text top', - align_textbottom: 'Text bottom', - align_left: 'Left', - align_right: 'Right', - image_list: 'Image list' -}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoimg/langs/he_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoimg/langs/he_dlg.js deleted file mode 100644 index 98091a1b41..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoimg/langs/he_dlg.js +++ /dev/null @@ -1,43 +0,0 @@ -tinyMCE.addI18n('he.umbimage_dlg', { - tab_general: 'General', - tab_appearance: 'Appearance', - tab_advanced: 'Advanced', - general: 'General', - title: 'Title', - preview: 'Preview', - constrain_proportions: 'Constrain proportions', - langdir: 'Language direction', - langcode: 'Language code', - long_desc: 'Long description link', - style: 'Style', - classes: 'Classes', - ltr: 'Left to right', - rtl: 'Right to left', - id: 'Id', - map: 'Image map', - swap_image: 'Swap image', - alt_image: 'Alternative image', - mouseover: 'for mouse over', - mouseout: 'for mouse out', - misc: 'Miscellaneous', - example_img: 'Appearance preview 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.', - dialog_title: 'Insert/edit image', - src: 'Image URL', - alt: 'Image description', - list: 'Image list', - border: 'Border', - dimensions: 'Dimensions', - vspace: 'Vertical space', - hspace: 'Horizontal space', - align: 'Alignment', - align_baseline: 'Baseline', - align_top: 'Top', - align_middle: 'Middle', - align_bottom: 'Bottom', - align_texttop: 'Text top', - align_textbottom: 'Text bottom', - align_left: 'Left', - align_right: 'Right', - image_list: 'Image list' -}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoimg/langs/it_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoimg/langs/it_dlg.js deleted file mode 100644 index d1b32b26c2..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoimg/langs/it_dlg.js +++ /dev/null @@ -1,43 +0,0 @@ -tinyMCE.addI18n('it.umbimage_dlg', { - tab_general: 'Generale', - tab_appearance: 'Aspetto', - tab_advanced: 'Avanzate', - general: 'Generale', - title: 'Titolo', - preview: 'Anteprima', - constrain_proportions: 'Vincola proporzioni', - langdir: 'Direzione lingua', - langcode: 'Codice lingua', - long_desc: 'Descrizione lunga del collegamento', - style: 'Stile', - classes: 'Classi', - ltr: 'Da sinistra a destra', - rtl: 'Da destra a sinistra', - id: 'Id', - map: 'Image map', - swap_image: 'Swap immagine', - alt_image: 'Testo alternativo', - mouseover: 'Mouse over', - mouseout: 'Mouse out', - misc: 'Varie', - example_img: 'Aspetto anteprima immagine', - missing_alt: 'Sei sicuro di voler continuare senza includere una Descrizione dell'immagine? Se non lo fai l'immagine potrebbe risultare non accessibile per gli utenti con disabilit\u00E0, o per chi utilizza un browser di testo, o per chi naviga senza immagini.', - dialog_title: 'Inserisci/Modifica immagine', - src: 'URL immagine', - alt: 'Descrizione immagine', - list: 'Immagine lista', - border: 'Bordo', - dimensions: 'Dimensioni', - vspace: 'Spaziatura verticale', - hspace: 'Spaziatura orizzontale', - align: 'Allineamento', - align_baseline: 'Baseline', - align_top: 'Top', - align_middle: 'Middle', - align_bottom: 'Bottom', - align_texttop: 'Testo superiore', - align_textbottom: 'Testo inferiore', - align_left: 'Sinistra', - align_right: 'Destra', - image_list: 'Immagine lista' -}); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoimg/langs/ja_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoimg/langs/ja_dlg.js deleted file mode 100644 index 1140ea22c9..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoimg/langs/ja_dlg.js +++ /dev/null @@ -1,43 +0,0 @@ -tinyMCE.addI18n('ja.umbimage_dlg', { - tab_general: '一般', - tab_appearance: '表示', - tab_advanced: '高度な設定', - general: '一般', - title: 'タイトル', - preview: 'プレビュー', - constrain_proportions: '縦横比の維持', - langdir: '文章の方向', - langcode: '言語コード', - long_desc: '詳細な説明のリンク', - style: 'スタイル', - classes: 'クラス', - ltr: '左から右', - rtl: '右から左', - id: 'Id', - map: 'イメージマップ', - swap_image: '画像の入れ替え', - alt_image: '別の画像', - mouseover: 'マウスカーソルがかかる時', - mouseout: 'マウスカーソルが外れる時', - misc: 'その他', - example_img: '画像のプレビューの様子', - missing_alt: '画像の説明を含めずに続けますか?画像の説明がないと目の不自由な方、テキスト表示だけのブラウザを使用している方、画像の表示を止めてる方がアクセスできないかもしれません。', - dialog_title: '画像の挿入/編集', - src: '画像のURL', - alt: '画像の説明', - list: '画像の一覧', - border: '枠線', - dimensions: '寸法', - vspace: '上下の余白', - hspace: '左右の余白', - align: '配置', - align_baseline: 'ベースライン揃え', - align_top: '上揃え', - align_middle: '中央揃え', - align_bottom: '下揃え', - align_texttop: 'テキストの上端揃え', - align_textbottom: 'テキストの下端揃え', - align_left: '左寄せ', - align_right: '右寄せ', - image_list: '画像の一覧' -}); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoimg/langs/ru_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoimg/langs/ru_dlg.js deleted file mode 100644 index 4cb8e5558a..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoimg/langs/ru_dlg.js +++ /dev/null @@ -1,43 +0,0 @@ -tinyMCE.addI18n('ru.umbimage_dlg', { - tab_general: 'Общее', - tab_appearance: 'Вид', - tab_advanced: 'Дополнительно', - general: 'Общие свойства', - title: 'Заголовок', - preview: 'Предпросмотр', - constrain_proportions: 'Сохранять пропорции', - langdir: 'Направление языка', - langcode: 'Код языка', - long_desc: 'Ссылка на длинное описание', - style: 'Стиль', - classes: 'Классы CSS', - ltr: 'Слева напрапво', - rtl: 'Справа налево', - id: 'Id', - map: 'Карта', - swap_image: 'Замена', - alt_image: 'Альтернатива', - mouseover: 'при заходе мыши', - mouseout: 'при выходе мыши', - misc: 'Разное', - example_img: 'Пример внешнего вида', - missing_alt: 'Вы уверены, что хотите продолжить без указания описания изображения? Без описания изображение может оказаться недоступным некоторым категориям пользователей с ограниченными возможностями, или использующим текстовый браузер, а также пользователям, отключившим показ изображений.', - dialog_title: 'Вставить/изменить изображение', - src: 'URL изображения', - alt: 'Описание изображения', - list: 'Список', - border: 'Рамка', - dimensions: 'Размеры', - vspace: 'Отступ по вертикали', - hspace: 'Отступ по горизонтали', - align: 'Выравнивание', - align_baseline: 'По базовой линии', - align_top: 'По верху', - align_middle: 'По центру', - align_bottom: 'По низу', - align_texttop: 'По верху текста', - align_textbottom: 'По низу текста', - align_left: 'По левому краю', - align_right: 'По правому краю', - image_list: 'Список изображений' -}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoimg/langs/sv_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoimg/langs/sv_dlg.js deleted file mode 100644 index 2c18b280c5..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoimg/langs/sv_dlg.js +++ /dev/null @@ -1,43 +0,0 @@ -tinyMCE.addI18n('sv.umbimage_dlg', { - tab_general: 'Generellt', - tab_appearance: 'Utseende', - tab_advanced: 'Avancerat', - general: 'Generellt', - title: 'Titel', - preview: 'Förhandsgranska', - constrain_proportions: 'Bibehåll proportioner', - langdir: 'Språkdirektion', - langcode: 'Språkkod', - long_desc: 'Lång länkbeskrivning', - style: 'Stil', - classes: 'Klasser', - ltr: 'Vänster till höger', - rtl: 'höger till vänster', - id: 'Id', - map: 'Bildkarta', - swap_image: 'Byt bild', - alt_image: 'Alternativ bild', - mouseover: 'För musen över', - mouseout: 'för musen utanför', - misc: 'Blandat', - example_img: 'Visning av bildförhandsgranskning', - 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.', - dialog_title: 'Infoga/redigera bild', - src: 'Bild URL', - alt: 'Bildbeskrivning', - list: 'Bildlista', - border: 'Ram', - dimensions: 'Dimensioner', - vspace: 'Vertikalt avstånd', - hspace: 'Horisontellt avstånd', - align: 'Position', - align_baseline: 'Baslinje', - align_top: 'Toppen', - align_middle: 'Mitten', - align_bottom: 'Botten', - align_texttop: 'Text topp', - align_textbottom: 'Text botten', - align_left: 'Vänster', - align_right: 'Höger', - image_list: 'Bildlista' -}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoimg/langs/zh_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoimg/langs/zh_dlg.js deleted file mode 100644 index 449c6df44d..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoimg/langs/zh_dlg.js +++ /dev/null @@ -1,43 +0,0 @@ -tinyMCE.addI18n('zh.umbimage_dlg', { - tab_general: '普通', - tab_appearance: '外观', - tab_advanced: '高级', - general: '普通', - title: '标题', - preview: '预览', - constrain_proportions: '约束比例', - langdir: '语言书写方向', - langcode: '语言代码', - long_desc: '长原文链接', - style: '样式', - classes: '类', - ltr: '从左到右', - rtl: '从右到左', - id: 'Id', - map: '图片热区', - swap_image: '交换图片', - alt_image: '替代图片', - mouseover: '鼠标移入', - mouseout: '鼠标移出', - misc: '其它', - example_img: '样图外观', - missing_alt: '你确定不要图片替代文字吗?替代文字可以在图片无法显示时显示。', - dialog_title: '插入/编辑图片', - src: '图片URL', - alt: '图片描述', - list: '图片列表', - border: '边框', - dimensions: '尺寸', - vspace: '垂直间距', - hspace: '水平间距', - align: '对齐', - align_baseline: '对齐底线', - align_top: '顶部对齐', - align_middle: '中间对齐', - align_bottom: '底部对齐', - align_texttop: '对齐文字顶部', - align_textbottom: '对齐文字底部', - align_left: '左对齐', - align_right: '右对齐', - image_list: '图片列表' -}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracolink/editor_plugin_src.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracolink/editor_plugin_src.js deleted file mode 100644 index fbae0021a1..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracolink/editor_plugin_src.js +++ /dev/null @@ -1,54 +0,0 @@ -/** -* editor_plugin_src.js -* -* Copyright 2012, Umbraco -* Released under MIT License. -* -* License: http://opensource.org/licenses/mit-license.html -*/ - -(function () { - var Event = tinymce.dom.Event, each = tinymce.each, DOM = tinymce.DOM; - - /** - * This plugin modifies the standard TinyMCE paste, with umbraco specific changes. - * - * @class tinymce.plugins.umbContextMenu - */ - tinymce.create('tinymce.plugins.UmbracoLink', { - /** - * Initializes the plugin, this will be executed after the plugin has been created. - * This call is done before the editor instance has finished it's initialization so use the onInit event - * of the editor instance to intercept that event. - * - * @method init - * @param {tinymce.Editor} ed Editor instance that the plugin is initialized in. - * @param {string} url Absolute URL to where the plugin is located. - */ - init: function (ed, url) { - var t = this; - - ed.execCommands.mceAdvLink.func = function () { - var se = ed.selection; - - // No selection and not in link - if (se.isCollapsed() && !ed.dom.getParent(se.getNode(), 'A')) - return; - - ed.windowManager.open({ - file: tinyMCE.activeEditor.getParam('umbraco_path') + '/plugins/tinymce3/insertLink.aspx', - width: 480 + parseInt(ed.getLang('advlink.delta_width', 0)), - height: 510 + parseInt(ed.getLang('advlink.delta_height', 0)), - inline: 1 - }, { - plugin_url: url - }); - }; - - } - - }); - - // Register plugin - tinymce.PluginManager.add('umbracolink', tinymce.plugins.UmbracoLink); -})(); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracolink/js/umbracolink.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracolink/js/umbracolink.js deleted file mode 100644 index b0cce49bc1..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracolink/js/umbracolink.js +++ /dev/null @@ -1,567 +0,0 @@ -/* Functions for the advlink plugin popup */ - -tinyMCEPopup.requireLangPack(); - -var templates = { - "window.open" : "window.open('${url}','${target}','${options}')" -}; - -function preinit() { - var url; - - if (url = tinyMCEPopup.getParam("external_link_list_url")) - document.write(''); -} - -function changeClass() { - var f = document.forms[0]; - - f.classes.value = getSelectValue(f, 'classlist'); -} - -function init() { - tinyMCEPopup.resizeToInnerSize(); - - var formObj = document.forms[0]; - var inst = tinyMCEPopup.editor; - var elm = inst.selection.getNode(); - var action = "insert"; - var html; - - /* UMBRACO SPECIFIC */ - - //document.getElementById('hrefbrowsercontainer').innerHTML = getBrowserHTML('hrefbrowser','href','file','advlink'); - //document.getElementById('popupurlbrowsercontainer').innerHTML = getBrowserHTML('popupurlbrowser','popupurl','file','advlink'); - document.getElementById('targetlistcontainer').innerHTML = getTargetListHTML('targetlist','target'); - - // Link list -// html = getLinkListHTML('linklisthref','href'); -// if (html == "") -// document.getElementById("linklisthrefrow").style.display = 'none'; -// else -// document.getElementById("linklisthrefcontainer").innerHTML = html; - - // Anchor list - html = getAnchorListHTML('anchorlist','href'); - if (html == "") - document.getElementById("anchorlistrow").style.display = 'none'; - else - document.getElementById("anchorlistcontainer").innerHTML = html; - - // Resize some elements - /*if (isVisible('hrefbrowser')) - document.getElementById('href').style.width = '260px'; - - if (isVisible('popupurlbrowser')) - document.getElementById('popupurl').style.width = '180px'; - - elm = inst.dom.getParent(elm, "A"); - if (elm == null) { - var prospect = inst.dom.create("p", null, inst.selection.getContent()); - if (prospect.childNodes.length === 1) { - elm = prospect.firstChild; - } - } - - if (elm != null && elm.nodeName == "A") - action = "update"; - - formObj.insert.value = tinyMCEPopup.getLang(action, 'Insert', true); - - setPopupControlsDisabled(true); - - * EO UMBRACO SPECIFIC - */ - - elm = inst.dom.getParent(elm, "A"); - if (elm != null && elm.nodeName == "A") - action = "update"; - - if (action == "update") { - /* UMBRACO SPECIFIC: check local links */ - var href = validateUmbracoLink(inst.dom.getAttrib(elm, 'href')); - var onclick = inst.dom.getAttrib(elm, 'onclick'); - - // Setup form data - setFormValue('href', href); - setFormValue('title', inst.dom.getAttrib(elm, 'title')); - - /* UMBRACO SPECIFIC - - setFormValue('id', inst.dom.getAttrib(elm, 'id')); - setFormValue('style', inst.dom.getAttrib(elm, "style")); - setFormValue('rel', inst.dom.getAttrib(elm, 'rel')); - setFormValue('rev', inst.dom.getAttrib(elm, 'rev')); - setFormValue('charset', inst.dom.getAttrib(elm, 'charset')); - setFormValue('hreflang', inst.dom.getAttrib(elm, 'hreflang')); - setFormValue('dir', inst.dom.getAttrib(elm, 'dir')); - setFormValue('lang', inst.dom.getAttrib(elm, 'lang')); - setFormValue('tabindex', inst.dom.getAttrib(elm, 'tabindex', typeof(elm.tabindex) != "undefined" ? elm.tabindex : "")); - setFormValue('accesskey', inst.dom.getAttrib(elm, 'accesskey', typeof(elm.accesskey) != "undefined" ? elm.accesskey : "")); - setFormValue('type', inst.dom.getAttrib(elm, 'type')); - setFormValue('onfocus', inst.dom.getAttrib(elm, 'onfocus')); - setFormValue('onblur', inst.dom.getAttrib(elm, 'onblur')); - setFormValue('onclick', onclick); - setFormValue('ondblclick', inst.dom.getAttrib(elm, 'ondblclick')); - setFormValue('onmousedown', inst.dom.getAttrib(elm, 'onmousedown')); - setFormValue('onmouseup', inst.dom.getAttrib(elm, 'onmouseup')); - setFormValue('onmouseover', inst.dom.getAttrib(elm, 'onmouseover')); - setFormValue('onmousemove', inst.dom.getAttrib(elm, 'onmousemove')); - setFormValue('onmouseout', inst.dom.getAttrib(elm, 'onmouseout')); - setFormValue('onkeypress', inst.dom.getAttrib(elm, 'onkeypress')); - setFormValue('onkeydown', inst.dom.getAttrib(elm, 'onkeydown')); - setFormValue('onkeyup', inst.dom.getAttrib(elm, 'onkeyup')); - setFormValue('target', inst.dom.getAttrib(elm, 'target')); - setFormValue('classes', inst.dom.getAttrib(elm, 'class')); - - - - // Parse onclick data - if (onclick != null && onclick.indexOf('window.open') != -1) - parseWindowOpen(onclick); - else - parseFunction(onclick); - - // Select by the values - selectByValue(formObj, 'dir', inst.dom.getAttrib(elm, 'dir')); - selectByValue(formObj, 'rel', inst.dom.getAttrib(elm, 'rel')); - selectByValue(formObj, 'rev', inst.dom.getAttrib(elm, 'rev')); - selectByValue(formObj, 'linklisthref', href); - */ - if (href.charAt(0) == '#') - selectByValue(formObj, 'anchorlist', href); - /* - addClassesToList('classlist', 'advlink_styles'); - - selectByValue(formObj, 'classlist', inst.dom.getAttrib(elm, 'class'), true); - */ - selectByValue(formObj, 'targetlist', inst.dom.getAttrib(elm, 'target'), true); - /* - } else - addClassesToList('classlist', 'advlink_styles'); - */ - } - /* - * EO UMBRACO SPECIFIC - */ -} - -function checkPrefix(n) { - if (n.value && Validator.isEmail(n) && !/^\s*mailto:/i.test(n.value) && confirm(tinyMCEPopup.getLang('advlink_dlg.is_email'))) - n.value = 'mailto:' + n.value; - - if (/^\s*www\./i.test(n.value) && confirm(tinyMCEPopup.getLang('advlink_dlg.is_external'))) - n.value = 'http://' + n.value; -} - -function setFormValue(name, value) { - document.forms[0].elements[name].value = value; -} - -function parseWindowOpen(onclick) { - var formObj = document.forms[0]; - - // Preprocess center code - if (onclick.indexOf('return false;') != -1) { - formObj.popupreturn.checked = true; - onclick = onclick.replace('return false;', ''); - } else - formObj.popupreturn.checked = false; - - var onClickData = parseLink(onclick); - - if (onClickData != null) { - formObj.ispopup.checked = true; - setPopupControlsDisabled(false); - - var onClickWindowOptions = parseOptions(onClickData['options']); - var url = onClickData['url']; - - formObj.popupname.value = onClickData['target']; - formObj.popupurl.value = url; - formObj.popupwidth.value = getOption(onClickWindowOptions, 'width'); - formObj.popupheight.value = getOption(onClickWindowOptions, 'height'); - - formObj.popupleft.value = getOption(onClickWindowOptions, 'left'); - formObj.popuptop.value = getOption(onClickWindowOptions, 'top'); - - if (formObj.popupleft.value.indexOf('screen') != -1) - formObj.popupleft.value = "c"; - - if (formObj.popuptop.value.indexOf('screen') != -1) - formObj.popuptop.value = "c"; - - formObj.popuplocation.checked = getOption(onClickWindowOptions, 'location') == "yes"; - formObj.popupscrollbars.checked = getOption(onClickWindowOptions, 'scrollbars') == "yes"; - formObj.popupmenubar.checked = getOption(onClickWindowOptions, 'menubar') == "yes"; - formObj.popupresizable.checked = getOption(onClickWindowOptions, 'resizable') == "yes"; - formObj.popuptoolbar.checked = getOption(onClickWindowOptions, 'toolbar') == "yes"; - formObj.popupstatus.checked = getOption(onClickWindowOptions, 'status') == "yes"; - formObj.popupdependent.checked = getOption(onClickWindowOptions, 'dependent') == "yes"; - - buildOnClick(); - } -} - -function parseFunction(onclick) { - var formObj = document.forms[0]; - var onClickData = parseLink(onclick); - - // TODO: Add stuff here -} - -function getOption(opts, name) { - return typeof(opts[name]) == "undefined" ? "" : opts[name]; -} - -function setPopupControlsDisabled(state) { - var formObj = document.forms[0]; - - formObj.popupname.disabled = state; - formObj.popupurl.disabled = state; - formObj.popupwidth.disabled = state; - formObj.popupheight.disabled = state; - formObj.popupleft.disabled = state; - formObj.popuptop.disabled = state; - formObj.popuplocation.disabled = state; - formObj.popupscrollbars.disabled = state; - formObj.popupmenubar.disabled = state; - formObj.popupresizable.disabled = state; - formObj.popuptoolbar.disabled = state; - formObj.popupstatus.disabled = state; - formObj.popupreturn.disabled = state; - formObj.popupdependent.disabled = state; - - setBrowserDisabled('popupurlbrowser', state); -} - -function parseLink(link) { - link = link.replace(new RegExp(''', 'g'), "'"); - - var fnName = link.replace(new RegExp("\\s*([A-Za-z0-9\.]*)\\s*\\(.*", "gi"), "$1"); - - // Is function name a template function - var template = templates[fnName]; - if (template) { - // Build regexp - var variableNames = template.match(new RegExp("'?\\$\\{[A-Za-z0-9\.]*\\}'?", "gi")); - var regExp = "\\s*[A-Za-z0-9\.]*\\s*\\("; - var replaceStr = ""; - for (var i=0; i'); - for (var i=0; i' + name + ''; - } - - if (html == "") - return ""; - - html = ''; - - return html; -} - -function insertAction() { - var inst = tinyMCEPopup.editor; - var elm, elementArray, i; - - /* UMBRACO SPECIFIC - if there's a locallink, we'll grap that */ - if (document.forms[0].localUrl.value) { - document.forms[0].href.value = document.forms[0].localUrl.value; - } - /* EO UMBRACO SPECIFIC */ - - elm = inst.selection.getNode(); - checkPrefix(document.forms[0].href); - - elm = inst.dom.getParent(elm, "A"); - - // Remove element if there is no href - if (!document.forms[0].href.value) { - i = inst.selection.getBookmark(); - inst.dom.remove(elm, 1); - inst.selection.moveToBookmark(i); - tinyMCEPopup.execCommand("mceEndUndoLevel"); - tinyMCEPopup.close(); - return; - } - - // Create new anchor elements - if (elm == null) { - inst.getDoc().execCommand("unlink", false, null); - tinyMCEPopup.execCommand("mceInsertLink", false, "#mce_temp_url#", {skip_undo : 1}); - - elementArray = tinymce.grep(inst.dom.select("a"), function(n) {return inst.dom.getAttrib(n, 'href') == '#mce_temp_url#';}); - for (i=0; i' + tinyMCELinkList[i][0] + ''; - - html += ''; - - return html; - - // tinyMCE.debug('-- image list start --', html, '-- image list end --'); -} - -function getTargetListHTML(elm_id, target_form_element) { - var targets = tinyMCEPopup.getParam('theme_advanced_link_targets', '').split(';'); - var html = ''; - - html += ''; - - return html; -} - -// While loading -preinit(); -tinyMCEPopup.onInit.add(init); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracolink/langs/da_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracolink/langs/da_dlg.js deleted file mode 100644 index 06f7fe3d83..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracolink/langs/da_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('da.advlink_dlg',{"target_name":"Destinationsnavn",classes:"Klasser",style:"Stil",id:"Id","popup_position":"Position (X/Y)",langdir:"Sprogretning","popup_size":"St\u00f8rrelse","popup_dependent":"Afh\u00e6ngig (Kun Mozilla/Firefox)","popup_resizable":"Lad det v\u00e6re muligt at \u00e6ndre st\u00f8rrelsen p\u00e5 vinduet","popup_location":"Vis adresselinje","popup_menubar":"Vis menulinje","popup_toolbar":"Vis v\u00e6rkt\u00f8jslinjer","popup_statusbar":"Vis statuslinje","popup_scrollbars":"Vis rullepanel","popup_return":"Inds\u00e6t \'return false\'","popup_name":"Vinduesnavn","popup_url":"Popup URL",popup:"Javascript popup","target_blank":"\u00c5ben i nyt vindue","target_top":"\u00c5ben i \u00f8verste vindue / ramme (erstatter alle rammer)","target_parent":"\u00c5ben i overliggende vindue / ramme","target_same":"\u00c5ben i dette vindue / ramme","anchor_names":"Ankre","popup_opts":"Indstillinger","advanced_props":"Avancerede egenskaber","event_props":"H\u00e6ndelser","popup_props":"Popup egenskaber","general_props":"Generelle egenskaber","advanced_tab":"Advanceret","events_tab":"H\u00e6ndelser","popup_tab":"Popup","general_tab":"Generelt",list:"Liste over links","is_external":"Den URL, der er indtastet, ser ud til at v\u00e6re et eksternt link. Vil du have tilf\u00f8jet det p\u00e5kr\u00e6vede http:// foran?","is_email":"Den URL, der er indtastet, ser ud til at v\u00e6re en emailadresse. Vil du have tilf\u00f8jet det p\u00e5kr\u00e6vede mailto: foran?",titlefield:"Titel",target:"M\u00e5l",url:"Link URL",title:"Inds\u00e6t/rediger link","link_list":"Liste over links",rtl:"H\u00f8jre mod venstre",ltr:"Venstre mod h\u00f8jre",accesskey:"Genvejstast",tabindex:"Tabindex",rev:"Relativ destination til side",rel:"Relativ side til destination",mime:"Destinations-MIME-type",encoding:"Destinationstegns\u00e6t",langcode:"Sprogkode","target_langcode":"Destinationssprog",width:"Bredde",height:"H\u00f8jde"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracolink/langs/de_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracolink/langs/de_dlg.js deleted file mode 100644 index bb0d3e35b3..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracolink/langs/de_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('de.advlink_dlg',{"target_name":"Name der Zielseite",classes:"Klassen",style:"Format",id:"ID","popup_position":"Position (X/Y)",langdir:"Schriftrichtung","popup_size":"Gr\u00f6\u00dfe","popup_dependent":"Vom Elternfenster abh\u00e4ngig
    (nur Mozilla/Firefox) ","popup_resizable":"Vergr\u00f6\u00dfern des Fenster zulassen","popup_location":"Adressleiste anzeigen","popup_menubar":"Browsermen\u00fc anzeigen","popup_toolbar":"Werkzeugleisten anzeigen","popup_statusbar":"Statusleiste anzeigen","popup_scrollbars":"Scrollbalken anzeigen","popup_return":"Link trotz Popup folgen","popup_name":"Name des Fensters","popup_url":"Popup-Adresse",popup:"JavaScript-Popup","target_blank":"In neuem Fenster \u00f6ffnen","target_top":"Im obersten Frame \u00f6ffnen (sprengt das Frameset)","target_parent":"Im \u00fcbergeordneten Fenster/Frame \u00f6ffnen","target_same":"Im selben Fenster/Frame \u00f6ffnen","anchor_names":"Anker","popup_opts":"Optionen","advanced_props":"Erweiterte Eigenschaften","event_props":"Ereignisse","popup_props":"Popup-Eigenschaften","general_props":"Allemeine Eigenschaften","advanced_tab":"Erweitert","events_tab":"Ereignisse","popup_tab":"Popup","general_tab":"Allgemein",list:"Linkliste","is_external":"Diese Adresse scheint ein externer Link zu sein. M\u00f6chten Sie das dazu ben\u00f6tigte \"http://\" voranstellen?","is_email":"Diese Adresse scheint eine E-Mail-Adresse zu sein. M\u00f6chten Sie das dazu ben\u00f6tigte \"mailto:\" voranstellen?",titlefield:"Titel",target:"Fenster",url:"Adresse",title:"Link einf\u00fcgen/bearbeiten","link_list":"Linkliste",rtl:"Rechts nach links",ltr:"Links nach rechts",accesskey:"Tastenk\u00fcrzel",tabindex:"Tabindex",rev:"Beziehung des Linkziels zur Seite",rel:"Beziehung der Seite zum Linkziel",mime:"MIME-Type der Zielseite",encoding:"Zeichenkodierung der Zielseite",langcode:"Sprachcode","target_langcode":"Sprache der Zielseite",width:"Breite",height:"H\u00f6he"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracolink/langs/en_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracolink/langs/en_dlg.js deleted file mode 100644 index 3169a56580..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracolink/langs/en_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('en.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"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracolink/langs/en_us_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracolink/langs/en_us_dlg.js deleted file mode 100644 index 2112e7ce3a..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracolink/langs/en_us_dlg.js +++ /dev/null @@ -1 +0,0 @@ -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"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracolink/langs/fi_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracolink/langs/fi_dlg.js deleted file mode 100644 index e49488e733..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracolink/langs/fi_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('fi.advlink_dlg',{"target_name":"Kohteen nimi",classes:"Luokat",style:"Tyyli",id:"Id","popup_position":"Sijainti (X/Y)",langdir:"Kielen suunta","popup_size":"Koko","popup_dependent":"Riippuvainen (vain Mozilla/Firefox)","popup_resizable":"Tee ikkunan koko muokattavaksi","popup_location":"N\u00e4yt\u00e4 sijaintipalkki","popup_menubar":"N\u00e4yt\u00e4 valikkopalkki","popup_toolbar":"N\u00e4yt\u00e4 ty\u00f6kalut","popup_statusbar":"N\u00e4yt\u00e4 tilapalkki","popup_scrollbars":"N\u00e4yt\u00e4 vierityspalkit","popup_return":"Lis\u00e4\u00e4 \'return false\'","popup_name":"Ikkunan nimi","popup_url":"Ponnahdusikkunan URL",popup:"JavaScript-ponnahdusikkuna","target_blank":"Avaa uudessa ikkunassa","target_top":"Avaa ylimm\u00e4ss\u00e4 ruudussa (korvaa kaikki ruudut)","target_parent":"Avaa ylemm\u00e4ss\u00e4 ikkunassa","target_same":"Avaa t\u00e4ss\u00e4 ikkunassa","anchor_names":"Ankkurit","popup_opts":"Valinta","advanced_props":"Edistyneet asetukset","event_props":"Tapahtumat (events)","popup_props":"Ponnahdusikkunan asetukset","general_props":"Yleiset asetukset","advanced_tab":"Edistynyt","events_tab":"Tapahtumat","popup_tab":"Ponnahdusikkuna","general_tab":"Yleiset",list:"Linkkilista","is_external":"Sy\u00f6tt\u00e4m\u00e4si URL n\u00e4ytt\u00e4\u00e4 olevan sivuston ulkoinen osoite, haluatko lis\u00e4t\u00e4 http://-etuliitteen?","is_email":"Sy\u00f6tt\u00e4m\u00e4si URL n\u00e4ytt\u00e4\u00e4 olevan s\u00e4hk\u00f6postiosoite, haluatko lis\u00e4t\u00e4 mailto:-etuliitteen?",titlefield:"Otsikko",target:"Kohde (target)",url:"Linkin URL",title:"Lis\u00e4\u00e4/muokkaa linkki\u00e4","link_list":"Linkkilista",rtl:"Oikealta vasemmalle",ltr:"Vasemmalta oikealle",accesskey:"Pikan\u00e4pp\u00e4in",tabindex:"Tabulaattori-indeksi",rev:"Kohteen suhde sivuun",rel:"Sivun suhde kohteeseen",mime:"Kohteen MIME-tyyppi",encoding:"Kohteen merkist\u00f6koodaus",langcode:"Kielen koodi","target_langcode":"Kohteen kieli",width:"Leveys",height:"Korkeus"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracolink/langs/fr_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracolink/langs/fr_dlg.js deleted file mode 100644 index 38e5a7858f..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracolink/langs/fr_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('fr.advlink_dlg',{"target_name":"Nom de la cible",classes:"Classes",style:"Style",id:"Id","popup_position":"Position (X/Y)",langdir:"Sens de lecture","popup_size":"Taille","popup_dependent":"D\u00e9pendante (seulement sous Mozilla/Firefox)","popup_resizable":"Autoriser le redimensionnement de la fen\u00eatre","popup_location":"Afficher la barre d\'adresse","popup_menubar":"Afficher la barre de menu","popup_toolbar":"Afficher la barre d\'outils","popup_statusbar":"Afficher la barre d\'\u00e9tat","popup_scrollbars":"Afficher les ascenseurs","popup_return":"Ins\u00e9rer \'return false\'","popup_name":"Nom de la fen\u00eatre","popup_url":"URL de la popup",popup:"Popup Javascript","target_blank":"Ouvrir dans une nouvelle fen\u00eatre","target_top":"Ouvrir dans le cadre principal (remplace tous les cadres)","target_parent":"Ouvrir dans la fen\u00eatre / le cadre parent","target_same":"Ouvrir dans cette fen\u00eatre / dans ce cadre","anchor_names":"Ancres","popup_opts":"Options","advanced_props":"Propri\u00e9t\u00e9s avanc\u00e9es","event_props":"\u00c9v\u00e8nements","popup_props":"Propri\u00e9t\u00e9s de la popup","general_props":"Propri\u00e9t\u00e9s g\u00e9n\u00e9rales","advanced_tab":"Avanc\u00e9","events_tab":"\u00c9v\u00e8nements","popup_tab":"Popup","general_tab":"G\u00e9n\u00e9ral",list:"Liste de liens","is_external":"L\'URL que vous avez saisie semble \u00eatre une adresse web externe. Souhaitez-vous ajouter le pr\u00e9fixe \u00ab http:// \u00bb ?","is_email":"L\'URL que vous avez saisie semble \u00eatre une adresse e-mail, souhaitez-vous ajouter le pr\u00e9fixe \u00ab mailto: \u00bb ?",titlefield:"Titre",target:"Cible",url:"URL du lien",title:"Ins\u00e9rer / \u00e9diter un lien","link_list":"Liste des liens",rtl:"Droite \u00e0 gauche",ltr:"Gauche \u00e0 droite",accesskey:"Touche d\'acc\u00e8s rapide",tabindex:"Tabindex",rev:"Relation de la cible \u00e0 la page",rel:"Relation de la page \u00e0 la cible",mime:"Type MIME de la cible",encoding:"Encodage de la cible",langcode:"Code de la langue","target_langcode":"Langue de la cible",width:"Largeur",height:"Hauteur"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracolink/langs/he_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracolink/langs/he_dlg.js deleted file mode 100644 index 7ea21bdaae..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracolink/langs/he_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('he.advlink_dlg',{"target_name":"Target name",classes:"Classes",style:"\u05e1\u05d2\u05e0\u05d5\u05df",id:"\u05de\u05e1\u05e4\u05e8 \u05e1\u05d9\u05d3\u05d5\u05e8\u05d9","popup_position":"\u05de\u05d9\u05e7\u05d5\u05dd (X/Y)",langdir:"\u05db\u05d9\u05d5\u05d5\u05df \u05d4\u05e9\u05e4\u05d4","popup_size":"\u05d2\u05d5\u05d3\u05dc","popup_dependent":"Dependent (Mozilla/Firefox only)","popup_resizable":"\u05d7\u05dc\u05d5\u05df \u05d3\u05d9\u05e0\u05d0\u05de\u05d9(resizable)","popup_location":"\u05d4\u05e6\u05d2\u05ea location bar ","popup_menubar":"\u05d4\u05e6\u05d2\u05ea \u05ea\u05e4\u05e8\u05d9\u05d8","popup_toolbar":"\u05d4\u05e6\u05d2\u05ea \u05e1\u05e8\u05d2\u05dc\u05d9 \u05db\u05dc\u05d9\u05dd","popup_statusbar":"\u05d4\u05e6\u05d2\u05ea \u05e9\u05d5\u05e8\u05ea \u05e1\u05d8\u05d0\u05d8\u05d5\u05e1","popup_scrollbars":"\u05d4\u05e6\u05d2\u05ea \u05e4\u05e1 \u05d2\u05dc\u05d9\u05dc\u05d4","popup_return":"\u05d9\u05e9 \u05dc\u05d4\u05db\u05e0\u05d9\u05e1 \'return false\'","popup_name":"\u05e9\u05dd \u05d4\u05d7\u05dc\u05d5\u05df","popup_url":"\u05d7\u05dc\u05d5\u05df \u05de\u05d5\u05e7\u05e4\u05e5 URL",popup:"\u05d7\u05dc\u05d5\u05df \u05de\u05d5\u05e7\u05e4\u05e5 javascript","target_blank":"\u05e4\u05ea\u05d9\u05d7\u05d4 \u05d1\u05d7\u05dc\u05d5\u05df \u05d7\u05d3\u05e9","target_top":"\u05e4\u05ea\u05d9\u05d7\u05d4 \u05d1\u05d7\u05dc\u05d5\u05df \u05d4\u05d1\u05df \u05d4\u05e8\u05d0\u05e9\u05d9(\u05de\u05d7\u05dc\u05d9\u05e3 \u05d0\u05ea \u05db\u05dc \u05d7\u05dc\u05d5\u05e0\u05d5\u05ea \u05d4\u05d1\u05e0\u05d9\u05dd)","target_parent":"\u05e4\u05ea\u05d9\u05d7\u05d4 \u05d1\u05dc\u05d5\u05df \u05d4\u05d0\u05d1\u05d0/\u05d7\u05dc\u05d5\u05df \u05d1\u05df","target_same":"\u05e4\u05ea\u05d9\u05d7\u05d4 \u05d1\u05d7\u05dc\u05d5\u05df \u05d7\u05d3\u05e9/\u05d7\u05dc\u05d5\u05df \u05d1\u05df","anchor_names":"\u05e7\u05d9\u05e9\u05d5\u05e8 \u05dc\u05e1\u05d9\u05de\u05e0\u05d9\u05d4","popup_opts":"\u05d0\u05e4\u05e9\u05e8\u05d5\u05d9\u05d5\u05ea","advanced_props":"\u05ea\u05db\u05d5\u05e0\u05d5\u05ea \u05de\u05ea\u05e7\u05d3\u05de\u05d5\u05ea","event_props":"\u05de\u05d0\u05d5\u05e8\u05e2\u05d5\u05ea","popup_props":"\u05ea\u05db\u05d5\u05e0\u05d5\u05ea \u05d7\u05dc\u05d5\u05df \u05de\u05d5\u05e7\u05e4\u05e5","general_props":"\u05ea\u05db\u05d5\u05e0\u05d5\u05ea \u05db\u05dc\u05dc\u05d9\u05d5\u05ea","advanced_tab":"\u05de\u05ea\u05e7\u05d3\u05dd","events_tab":"\u05d0\u05e8\u05d5\u05e2\u05d9\u05dd","popup_tab":"\u05d7\u05dc\u05d5\u05df \u05de\u05d5\u05e7\u05e4\u05e5","general_tab":"\u05db\u05dc\u05dc\u05d9",list:"\u05e8\u05e9\u05d9\u05de\u05ea \u05e7\u05d9\u05e9\u05d5\u05e8\u05d9\u05dd","is_external":"\u05db\u05ea\u05d5\u05d1\u05ea \u05d4-URL \u05e9\u05d4\u05d5\u05db\u05e0\u05e1\u05d4 \u05d4\u05d9\u05d0 \u05db\u05db\u05dc \u05d4\u05e0\u05e8\u05d0\u05d4 \u05e7\u05d9\u05e9\u05d5\u05e8 \u05d7\u05d9\u05e6\u05d5\u05e0\u05d9 \u05d4\u05d0\u05dd \u05d1\u05e8\u05e6\u05d5\u05e0\u05da \u05dc\u05d4\u05d5\u05e1\u05d9\u05e3 \u05d0\u05ea \u05d4\u05e7\u05d9\u05d3\u05d5\u05de\u05ea http:// \u05d4\u05e0\u05d3\u05e8\u05e9\u05ea?","is_email":"\u05db\u05ea\u05d5\u05d1\u05ea \u05d4-URL \u05e9\u05d4\u05d5\u05db\u05e0\u05e1\u05d4 \u05d4\u05d9\u05d0 \u05db\u05db\u05dc \u05d4\u05e0\u05e8\u05d0\u05d4 \u05db\u05ea\u05d5\u05d1\u05ea \u05de\u05d9\u05d9\u05dc \u05d4\u05d0\u05dd \u05d1\u05e8\u05e6\u05d5\u05e0\u05da \u05dc\u05d4\u05d5\u05e1\u05d9\u05e3 \u05d0\u05ea \u05d4\u05e7\u05d9\u05d3\u05d5\u05de\u05ea MAILTO \u05d4\u05e0\u05d3\u05e8\u05e9\u05ea?",titlefield:"\u05db\u05d5\u05ea\u05e8\u05ea \u05d4\u05e7\u05d9\u05e9\u05d5\u05e8",target:"\u05d9\u05e2\u05d3",url:"\u05db\u05ea\u05d5\u05d1\u05ea \u05d4\u05e7\u05d9\u05e9\u05d5\u05e8",title:"\u05d4\u05d5\u05e1\u05e4\u05d4/\u05e2\u05e8\u05d9\u05db\u05ea \u05e7\u05d9\u05e9\u05d5\u05e8","link_list":"\u05e8\u05e9\u05d9\u05de\u05ea \u05e7\u05d9\u05e9\u05d5\u05e8\u05d9\u05dd",rtl:"\u05de\u05d9\u05de\u05d9\u05df \u05dc\u05e9\u05de\u05d0\u05dc",ltr:"\u05de\u05e9\u05de\u05d0\u05dc \u05dc\u05d9\u05de\u05d9\u05df",accesskey:"Accesskey",tabindex:"Tabindex",rev:"Relationship target to page",rel:"Relationship page to target",mime:"Target MIME type",encoding:"Target character encoding",langcode:"\u05e7\u05d5\u05d3 \u05d4\u05e9\u05e4\u05d4","target_langcode":"Target language",width:"\u05e8\u05d5\u05d7\u05d1",height:"\u05d2\u05d5\u05d1\u05d4"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracolink/langs/it_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracolink/langs/it_dlg.js deleted file mode 100644 index bf19659d05..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracolink/langs/it_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('it.advlink_dlg',{"target_name":"Nome target",classes:"Classe",style:"Stile",id:"Id","popup_position":"Posizione (X/Y)",langdir:"Direzione del testo","popup_size":"Dimensioni","popup_dependent":"Dipendente (Solo in Mozilla/Firefox)","popup_resizable":"Rendi la finestra ridimensionabile","popup_location":"Mostra barra navigazione","popup_menubar":"Mostra barra menu","popup_toolbar":"Mostra barre strumenti","popup_statusbar":"Mostra barra di stato","popup_scrollbars":"Mostra barre di scorrimento","popup_return":"Inserisci \'return false\'","popup_name":"Nome finestra","popup_url":"URL Popup",popup:"Popup Javascript","target_blank":"Apri in una nuova finestra","target_top":"Apri nella cornice superiore (sostituisce tutte le cornici)","target_parent":"Apri nella finestra / cornice genitore","target_same":"Apri in questa finestra / cornice","anchor_names":"Ancore","popup_opts":"Opzioni","advanced_props":"Propriet\u00e0 avanzate","event_props":"Eventi","popup_props":"Propriet\u00e0 popup","general_props":"Propriet\u00e0 generali","advanced_tab":"Avanzate","events_tab":"Eventi","popup_tab":"Popup","general_tab":"Generale",list:"Lista collegamenti","is_external":"L\'URL inserito sembra essere un link esterno. Aggiungere il necessario prefisso http:// ?","is_email":"L\'URL inserito sembra essere un indirizzo email. Aggiungere il necessario prefisso mailto: ?",titlefield:"Titolo",target:"Target",url:"URL collegamento",title:"Inserisci/modifica link","link_list":"Lista collegamenti",rtl:"Destra verso sinistra",ltr:"Sinistra verso destra",accesskey:"Carattere di accesso",tabindex:"Indice tabulazione",rev:"Relazione da target a pagina",rel:"Relazione da pagina a target",mime:"Tipo MIME del target",encoding:"Codifica carattere del target",langcode:"Lingua","target_langcode":"Lingua del target",width:"Larghezza",height:"Altezza"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracolink/langs/ja_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracolink/langs/ja_dlg.js deleted file mode 100644 index 68ebcd2e6e..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracolink/langs/ja_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('ja.advlink_dlg',{"target_name":"\u30bf\u30fc\u30b2\u30c3\u30c8\u306e\u540d\u524d",classes:"\u30af\u30e9\u30b9",style:"\u30b9\u30bf\u30a4\u30eb",id:"ID","popup_position":"\u4f4d\u7f6e (X/Y)",langdir:"\u6587\u7ae0\u306e\u65b9\u5411","popup_size":"\u5927\u304d\u3055","popup_dependent":"\u4f9d\u5b58(Mozilla\u3068Firefox\u3060\u3051)","popup_resizable":"\u30a6\u30a4\u30f3\u30c9\u30a6\u306e\u30b5\u30a4\u30ba\u5909\u66f4\u3092\u8a31\u53ef","popup_location":"\u30a2\u30c9\u30ec\u30b9\u30d0\u30fc\u3092\u8868\u793a","popup_menubar":"\u30e1\u30cb\u30e5\u30fc\u30d0\u30fc\u3092\u8868\u793a","popup_toolbar":"\u30c4\u30fc\u30eb\u30d0\u30fc\u3092\u8868\u793a","popup_statusbar":"\u30b9\u30c6\u30fc\u30bf\u30b9\u30d0\u30fc\u3092\u8868\u793a","popup_scrollbars":"\u30b9\u30af\u30ed\u30fc\u30eb\u30d0\u30fc\u3092\u8868\u793a","popup_return":"\'return false\'\u3092\u633f\u5165","popup_name":"\u30a6\u30a4\u30f3\u30c9\u30a6\u306e\u540d\u524d","popup_url":"\u30dd\u30c3\u30d7\u30a2\u30c3\u30d7\u306eURL",popup:"Javascript\u30dd\u30c3\u30d7\u30a2\u30c3\u30d7","target_blank":"\u65b0\u3057\u3044\u30a6\u30a4\u30f3\u30c9\u30a6\u3067\u958b\u304f","target_top":"\u30c8\u30c3\u30d7\u306e\u30d5\u30ec\u30fc\u30e0\u3067\u958b\u304f(\u3059\u3079\u3066\u306e\u30d5\u30ec\u30fc\u30e0\u3092\u7f6e\u304d\u63db\u3048)","target_parent":"\u89aa\u30a6\u30a4\u30f3\u30c9\u30a6/\u89aa\u30d5\u30ec\u30fc\u30e0\u3067\u958b\u304f","target_same":"\u3053\u306e\u30a6\u30a4\u30f3\u30c9\u30a6/\u30d5\u30ec\u30fc\u30e0\u3067\u958b\u304f","anchor_names":"\u30a2\u30f3\u30ab\u30fc","popup_opts":"\u30aa\u30d7\u30b7\u30e7\u30f3","advanced_props":"\u9ad8\u5ea6\u306a\u5c5e\u6027","event_props":"\u30a4\u30d9\u30f3\u30c8","popup_props":"\u30dd\u30c3\u30d7\u30a2\u30c3\u30d7","general_props":"\u4e00\u822c","advanced_tab":"\u5c02\u9580\u7684","events_tab":"\u30a4\u30d9\u30f3\u30c8","popup_tab":"\u30dd\u30c3\u30d7\u30a2\u30c3\u30d7","general_tab":"\u4e00\u822c",list:"\u30ea\u30f3\u30af\u306e\u4e00\u89a7","is_external":"\u5165\u529b\u3057\u305fURL\u306f\u5916\u90e8\u306e\u30ea\u30f3\u30af\u306e\u3088\u3046\u3067\u3059\u3002\u30ea\u30f3\u30af\u306b http:// \u3092\u8ffd\u52a0\u3057\u307e\u3059\u304b?","is_email":"\u5165\u529b\u3057\u305fURL\u306f\u96fb\u5b50\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u306e\u3088\u3046\u3067\u3059\u3002\u30ea\u30f3\u30af\u306b mailto: \u3092\u8ffd\u52a0\u3057\u307e\u3059\u304b?",titlefield:"\u30bf\u30a4\u30c8\u30eb",target:"\u30bf\u30fc\u30b2\u30c3\u30c8",url:"\u30ea\u30f3\u30af\u306eURL",title:"\u30ea\u30f3\u30af\u306e\u633f\u5165/\u7de8\u96c6","link_list":"\u30ea\u30f3\u30af\u306e\u4e00\u89a7",rtl:"\u53f3\u304b\u3089\u5de6",ltr:"\u5de6\u304b\u3089\u53f3",accesskey:"\u30a2\u30af\u30bb\u30b9\u30ad\u30fc",tabindex:"\u30bf\u30d6\u30a4\u30f3\u30c7\u30c3\u30af\u30b9",rev:"\u30bf\u30fc\u30b2\u30c3\u30c8\u304b\u3089\u30da\u30fc\u30b8\u306e\u95a2\u4fc2",rel:"\u30da\u30fc\u30b8\u304b\u3089\u30bf\u30fc\u30b2\u30c3\u30c8\u306e\u95a2\u4fc2",mime:"\u30bf\u30fc\u30b2\u30c3\u30c8\u306eMIME\u30bf\u30a4\u30d7",encoding:"\u30bf\u30fc\u30b2\u30c3\u30c8\u306e\u6587\u5b57\u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0",langcode:"\u8a00\u8a9e\u30b3\u30fc\u30c9","target_langcode":"\u30bf\u30fc\u30b2\u30c3\u30c8\u306e\u8a00\u8a9e",width:"\u5e45",height:"\u9ad8\u3055"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracolink/langs/nl_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracolink/langs/nl_dlg.js deleted file mode 100644 index b2924758b0..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracolink/langs/nl_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('nl.advlink_dlg',{"target_name":"Doel",classes:"Klasses",style:"Stijl",id:"Id","popup_position":"Positie (X/Y)",langdir:"Taalrichting","popup_size":"Grootte","popup_dependent":"Afhankelijk (Alleen Mozilla/Firefox)","popup_resizable":"Aanpasbaar venster","popup_location":"Lokatiebalk weergeven","popup_menubar":"Menubalk weergeven","popup_toolbar":"Werkbalk weergeven","popup_statusbar":"Statusbalk weergeven","popup_scrollbars":"Scrollbalken weergeven","popup_return":"\'return false\' invoegen","popup_name":"Vensternaam","popup_url":"Popup URL",popup:"Javascript popup","target_blank":"In nieuw venster openen","target_top":"In bovenste frame openen (vervangt gehele pagina)","target_parent":"In bovenliggend venster / frame openen","target_same":"In dit venster / frame openen","anchor_names":"Ankers","popup_opts":"Opties","advanced_props":"Geavanceerde eigenschappen","event_props":"Gebeurtenissen","popup_props":"Popup eigenschappen","general_props":"Algemene eigenschappen","advanced_tab":"Geavanceerd","events_tab":"Gebeurtenissen","popup_tab":"Popup","general_tab":"Algemeen",list:"Lijst","is_external":"De ingevoerde URL lijkt op een externe link. Wilt u de vereiste http:// tekst voorvoegen?","is_email":"De ingevoerde URL lijkt op een e-mailadres. Wilt u de vereiste mailto: tekst voorvoegen?",titlefield:"Titel",target:"Doel",url:"URL",title:"Link invoegen/bewerken","link_list":"Lijst",rtl:"Van rechts naar links",ltr:"Van links naar rechts",accesskey:"Toegangstoets",tabindex:"Tabvolgorde",rev:"Relatie van doel tot pagina",rel:"Relatie van pagina tot doel",mime:"MIME type",encoding:"Taalcodering",langcode:"Taalcode","target_langcode":"Taal",width:"Breedte",height:"Hoogte"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracolink/langs/no_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracolink/langs/no_dlg.js deleted file mode 100644 index 1a333095d3..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracolink/langs/no_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('no.advlink_dlg',{"target_name":"M\u00e5lnavn",classes:"Klasse",style:"Stil",id:"Id","popup_position":"Posisjon (X/Y)",langdir:"Skriftretning","popup_size":"St\u00f8rrelse","popup_dependent":"Avhengig vindu (kun i Mozilla/Firefox)","popup_resizable":"Gj\u00f8r vinduet skalerbart","popup_location":"Vis plasseringslinje","popup_menubar":"Vis menylinje","popup_toolbar":"Vis verkt\u00f8ylinjer","popup_statusbar":"Vis statusline","popup_scrollbars":"Vis rullefelt","popup_return":"Sett inn \\\'return false\\\'","popup_name":"Navn p\u00e5 vindu","popup_url":"Popup URL",popup:"Javascript popup","target_blank":"\u00c5pne i nytt vindu","target_top":"\u00c5pne i toppvindu (erstatter alle rammer)","target_parent":"\u00c5pne i overordnet vindu/ramme","target_same":"\u00c5pne i samme vindu/ramme","anchor_names":"Anker","popup_opts":"Innstillinger","advanced_props":"Avanserte egenskaper","event_props":"Hendelser","popup_props":"Popupegenskaper","general_props":"Generelle egenskaper","advanced_tab":"Avansert","events_tab":"Hendelser","popup_tab":"Popup","general_tab":"Generelt",list:"Liste over lenker","is_external":"URLen du skrev inn ser ut til \u00e5 v\u00e6re en ekstern lenke. \u00d8nsker du \u00e5 legge til obligatorisk http://-prefiks?","is_email":"URLen du skrev inn ser ut til \u00e5 v\u00e6re Epost adresse. \u00d8nsker du \u00e5 legge til obligatorisk mailto:-prefiks?",titlefield:"Tittel",target:"M\u00e5l",url:"Lenke URL",title:"Sett inn / rediger lenke","link_list":"Liste over lenker",rtl:"H\u00f8yre mot venstre",ltr:"Venstre mot h\u00f8yre",accesskey:"Hurtigtast",tabindex:"Tabulatorindeks",rev:"Forholdet mellom m\u00e5l og side",rel:"Forholdet mellom side og m\u00e5l",mime:"M\u00e5l MIME type",encoding:"M\u00e5l karakter koding",langcode:"Spr\u00e5kkode","target_langcode":"M\u00e5lspr\u00e5k",width:"Bredde",height:"H\u00f8yde"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracolink/langs/pl_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracolink/langs/pl_dlg.js deleted file mode 100644 index d529d7ad17..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracolink/langs/pl_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('pl.advlink_dlg',{"target_name":"Nazwa celu",classes:"Klasy",style:"Styl",id:"Id","popup_position":"Pozycja (X/Y)",langdir:"Kierunek czytania tekstu","popup_size":"Rozmiar","popup_dependent":"Zale\u017cny (Mozilla/Firefox wy\u0142\u0105cznie)","popup_resizable":"Stw\u00f3rz okno z mo\u017cliwo\u015bci\u0105 zmiany rozmiaru","popup_location":"Poka\u017c pasek adresu","popup_menubar":"Poka\u017c pasek menu","popup_toolbar":"Poka\u017c narz\u0119dzia","popup_statusbar":"Poka\u017c pasek statusu","popup_scrollbars":"Poka\u017c paski przewijania","popup_return":"Wstaw \'return false\'","popup_name":"Nazwa okna","popup_url":"URL okna",popup:"Wyskakuj\u0105ce okno","target_blank":"Otw\u00f3rz w nowym oknie","target_top":"Otw\u00f3rz w g\u00f3rnej ramce (zamie\u0144 wszystkie ramki)","target_parent":"Otw\u00f3rz w nadrz\u0119dnym oknie / ramce","target_same":"Otw\u00f3rz w tym oknie / ramce","anchor_names":"Kotwice","popup_opts":"Opcje","advanced_props":"Zaawansowae w\u0142a\u015bciwo\u015bci","event_props":"Zdarzenia","popup_props":"W\u0142a\u015bciwo\u015bci okna","general_props":"W\u0142a\u015bciwo\u015bci og\u00f3lne","advanced_tab":"Zaawansowane","events_tab":"Zdarzenia","popup_tab":"Popup","general_tab":"Og\u00f3lne",list:"Lista link\u00f3w","is_external":"Podany adres wydaje si\u0119 by\u0107 zewn\u0119trznym linkiem, czy chcesz doda\u0107 wymagany prefiks http://?","is_email":"Podany adres wydaje si\u0119 by\u0107 adresem emailowym, czy chcesz doda\u0107 wymagany prefiks mailto:?",titlefield:"Tytu\u0142",target:"Cel",url:"URL linka",title:"Wstaw/edytuj link","link_list":"Lista odno\u015bnik\u00f3w",rtl:"Kierunek z prawej do lewej",ltr:"Kierunek z lewej do prawej",accesskey:"Klawisz skr\u00f3tu",tabindex:"Numer tab",rev:"Relacje celu do strony",rel:"Relacje strony do celu",mime:"Docelowy typ MIME",encoding:"Kodowanie znak\u00f3w celu",langcode:"Kod j\u0119zyka","target_langcode":"Docelowy kod j\u0119zyka",width:"Szeroko\u015b\u0107",height:"Wysoko\u015b\u0107"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracolink/langs/pt_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracolink/langs/pt_dlg.js deleted file mode 100644 index 8167855442..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracolink/langs/pt_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('pt.advlink_dlg',{"target_name":"Nome do alvo",classes:"Classes",style:"Estilo",id:"Id","popup_position":"Posi\u00e7\u00e3o (X/Y)",langdir:"Dire\u00e7\u00e3o do texto","popup_size":"Tamanho","popup_dependent":"Dependente (Mozilla/Firefox apenas)","popup_resizable":"Permitir altera\u00e7\u00e3o do tamanho da janela","popup_location":"Mostrar a barra de endere\u00e7os","popup_menubar":"Mostrar a barra de menu","popup_toolbar":"Mostrar a barra de ferramentas","popup_statusbar":"Mostrar a barra de status","popup_scrollbars":"Mostrar as barras de scroll","popup_return":"Inserir \"return false\"","popup_name":"Nome da janela","popup_url":"URL do popup",popup:"Popup javascript","target_blank":"Abrir numa nova janela","target_top":"Abrir na p\u00e1gina inteira (substitui todos os quadros)","target_parent":"Abrir na janela/quadro pai","target_same":"Abrir nesta janela/quadro","anchor_names":"\u00c2ncoras","popup_opts":"Op\u00e7\u00f5es","advanced_props":"Propriedades avan\u00e7adas","event_props":"Eventos","popup_props":"Propriedades de popup","general_props":"Propriedades gerais","advanced_tab":"Avan\u00e7ado","events_tab":"Eventos","popup_tab":"Popup","general_tab":"Geral",list:"Lista de hyperlinks","is_external":"A URL digitada parece conduzir a um link externo. Deseja acrescentar o prefixo necess\u00e1rio http://?","is_email":"A URL digitada parece ser um endere\u00e7o de e-mail. Deseja acrescentar o prefixo necess\u00e1rio mailto:?",titlefield:"T\u00edtulo",target:"Alvo",url:"URL do hyperlink",title:"Inserir/editar hyperlink","link_list":"Lista de hyperlinks",rtl:"Da direita para a esquerda",ltr:"Da esquerda para a direita",accesskey:"Chave de acesso",tabindex:"Tabindex",rev:"Rela\u00e7\u00e3o alvo/p\u00e1gina",rel:"Rela\u00e7\u00e3o p\u00e1gina/alvo",mime:"Tipo MIME alvo",encoding:"Codifica\u00e7\u00e3o de caracteres",langcode:"C\u00f3digo do idioma","target_langcode":"Idioma alvo",width:"Largura",height:"Altura"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracolink/langs/ru_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracolink/langs/ru_dlg.js deleted file mode 100644 index 1bdcd71a01..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracolink/langs/ru_dlg.js +++ /dev/null @@ -1,54 +0,0 @@ -tinyMCE.addI18n('ru.advlink_dlg', { -"target_name": "Открыть в окне", -classes: "Классы CSS", -style: "Стиль CSS", -id: "ID", -"popup_position": "Позиционирование (X/Y)", -langdir: "Направление письма", -"popup_size": "Размер", -"popup_dependent": "Зависимость (Только Mozilla/Firefox)", -"popup_resizable": "Изменяемый размер", -"popup_location": "Показывать поле адреса", -"popup_menubar": "Покзывать строку меню", -"popup_toolbar": "Показывать панель инструментов", -"popup_statusbar": "Показывать панель состояния", -"popup_scrollbars": "Показывать прокрутку", -"popup_return": "Вставить \'return false\'", -"popup_name": "Название окна", -"popup_url": "Ссылка на источник", -popup: "Всплывающее окно JavaScript", -"target_blank": "Открыть в новом окне", -"target_top": "Открыть в главном фрейме", -"target_parent": "Открыть в родительском окне/фрейме", -"target_same": "Открыть в том же окне/фрейме", -"anchor_names": "Якоря", -"popup_opts": "Настройки", -"advanced_props": "Дополнительные свойства", -"event_props": "События", -"popup_props": "Свойства окна", -"general_props": "Общие свойства", -"advanced_tab": "Дополнительно", -"events_tab": "События", -"popup_tab": "Окно", -"general_tab": "Общее", -list: "Список ссылок", -"is_external": "Указанная Вами ссылка по всей видимости внешняя. Добавить в ее начало префикс 'http://'?", -"is_email": "Указанная Вами ссылка выглядит как адрес email. Добавить в ее начало префикс 'mailto:'?", -titlefield: "Заголовок", -target: "Назначение", -url: "Ссылка (URL)", -title: "Вставить/изменить ссылку", -"link_list": "Список ссылок", -rtl: "Справа налево", -ltr: "Слева направо", -accesskey: "Ключ доступа", -tabindex: "Порядок обхода", -rev: "Связь 'Назначение к странице'", -rel: "Связь 'Страница к назначению'", -mime: "MIME-тип назначения", -encoding: "Кодовая таблица назначения", -langcode: "Код языка", -"target_langcode": "Язык", -width: "Ширина", -height: "Высота" -}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracolink/langs/sv_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracolink/langs/sv_dlg.js deleted file mode 100644 index 8a6194472a..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracolink/langs/sv_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('sv.advlink_dlg',{"target_name":"M\u00e5lnamn",classes:"Klasser",style:"Stil",id:"Id","popup_position":"Position (x/y)",langdir:"Skriftriktning","popup_size":"Storlek","popup_dependent":"Beroende av (Mozilla/Firefox enbart)","popup_resizable":"Skalbart f\u00f6nster","popup_location":"Adressraden","popup_menubar":"Menyrad","popup_toolbar":"Verktygsf\u00e4lt","popup_statusbar":"Statusf\u00e4lt","popup_scrollbars":"Rullningslister","popup_return":"Infoga \'return false\'","popup_name":"F\u00f6nsternamn","popup_url":"Popup URL",popup:"Javascript popup","target_blank":"\u00d6ppna i nytt f\u00f6nster","target_top":"\u00d6ppna i toppramen (ers\u00e4tter alla ramar)","target_parent":"\u00d6ppna i \u00f6verliggande f\u00f6nster/ram","target_same":"\u00d6ppna i detta f\u00f6nster/ram","anchor_names":"Bokm\u00e4rken","popup_opts":"Inst\u00e4llningar","advanced_props":"Avancerade inst\u00e4llningar","event_props":"H\u00e4ndelser","popup_props":"Popup-inst\u00e4llningar","general_props":"Generella inst\u00e4llningar","advanced_tab":"Avancerat","events_tab":"H\u00e4ndelser","popup_tab":"Popup","general_tab":"Generellt",list:"L\u00e4nklista","is_external":"L\u00e4nken du angav verkar vara en extern adress. Vill du infoga http:// prefixet p\u00e5 l\u00e4nken?","is_email":"L\u00e4nken du angav verkar vara en e-post adress. Vill du infoga mailto: prefixet p\u00e5 l\u00e4nken?",titlefield:"Titel",target:"M\u00e5l",url:"L\u00e4nkens URL",title:"Infoga/redigera l\u00e4nk","link_list":"L\u00e4nklista",rtl:"H\u00f6ger till v\u00e4nster",ltr:"V\u00e4nster till h\u00f6ger",accesskey:"Snabbtangent",tabindex:"Tabbindex",rev:"Omv\u00e4nd relation (rev)",rel:"Relation (rel attribut)",mime:"MIME type",encoding:"Teckenformattering",langcode:"Spr\u00e5kkod","target_langcode":"M\u00e5lspr\u00e5k",width:"Bredd",height:"H\u00f6jd"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracolink/langs/zh_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracolink/langs/zh_dlg.js deleted file mode 100644 index fb228f5942..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracolink/langs/zh_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('zh-cn.advlink_dlg',{"target_name":"\u76ee\u6807\u540d\u79f0",classes:"\u7c7b\u522b",style:"\u6837\u5f0f",id:"ID","popup_position":"\u4f4d\u7f6e(X/Y)",langdir:"\u8bed\u8a00\u4e66\u5199\u65b9\u5411","popup_size":"\u5927\u5c0f","popup_dependent":"\u9650\u5236(\u4ec5\u652f\u6301Mozilla/Firefox)","popup_resizable":"\u7a97\u53e3\u53ef\u8c03\u6574\u5927\u5c0f","popup_location":"\u663e\u793a\u5730\u5740\u680f","popup_menubar":"\u663e\u793a\u83dc\u5355\u680f","popup_toolbar":"\u663e\u793a\u5de5\u5177\u680f","popup_statusbar":"\u663e\u793a\u72b6\u6001\u680f","popup_scrollbars":"\u663e\u793a\u6eda\u52a8\u6761","popup_return":"\u63d2\u5165\'return false\'","popup_name":"\u7a97\u53e3\u540d\u79f0","popup_url":"\u5f39\u51faURL",popup:"Javascript\u5f39\u7a97","target_blank":"\u5728\u65b0\u7a97\u53e3\u6253\u5f00","target_top":"\u5728\u9876\u90e8\u6846\u67b6\u6253\u5f00\uff08\u91cd\u7f6e\u6240\u6709\u6846\u67b6\uff09","target_parent":"\u5728\u7236\u7a97\u53e3/\u6846\u67b6\u6253\u5f00","target_same":"\u5728\u5f53\u524d\u7a97\u53e3/\u6846\u67b6\u6253\u5f00","anchor_names":"\u951a","popup_opts":"\u9009\u9879","advanced_props":"\u9ad8\u7ea7\u5c5e\u6027","event_props":"\u4e8b\u4ef6","popup_props":"\u5f39\u51fa\u5c5e\u6027","general_props":"\u666e\u901a\u5c5e\u6027","advanced_tab":"\u9ad8\u7ea7","events_tab":"\u4e8b\u4ef6","popup_tab":"\u5f39\u51fa","general_tab":"\u666e\u901a",list:"\u94fe\u63a5\u5217\u8868","is_external":"\u60a8\u8f93\u5165\u7684URL\u662f\u4e00\u4e2a\u5916\u90e8\u94fe\u63a5\uff0c\u662f\u5426\u8981\u52a0\u4e0a\"http://\"\u524d\u7f00\uff1f","is_email":"\u60a8\u8f93\u5165URL\u662f\u7535\u5b50\u90ae\u4ef6\u5730\u5740\uff0c\u662f\u5426\u9700\u8981\u52a0\"mailto:\"\u524d\u7f00\uff1f",titlefield:"\u6807\u9898",target:"\u6253\u5f00\u65b9\u5f0f",url:"\u8d85\u94fe\u63a5URL",title:"\u63d2\u5165/\u7f16\u8f91 \u8d85\u94fe\u63a5","link_list":"\u94fe\u63a5\u5217\u8868",rtl:"\u4ece\u53f3\u5230\u5de6",ltr:"\u4ece\u5de6\u5230\u53f3",accesskey:"\u5feb\u6377\u952e",tabindex:"Tab\u7d22\u5f15",rev:"\u76ee\u6807\u5230\u7f51\u9875\u7684\u5173\u7cfb",rel:"\u7f51\u9875\u5230\u76ee\u6807\u7684\u5173\u7cfb",mime:"\u76ee\u6807MIME\u7c7b\u578b",encoding:"\u76ee\u6807\u8bed\u8a00\u7f16\u7801",langcode:"\u8bed\u8a00\u7f16\u7801","target_langcode":"\u76ee\u6807\u8bed\u8a00",width:"Width",height:"Height"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracomacro/dialog.htm b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracomacro/dialog.htm deleted file mode 100644 index b4c62840ea..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracomacro/dialog.htm +++ /dev/null @@ -1,27 +0,0 @@ - - - - {#example_dlg.title} - - - - - -
    -

    Here is a example dialog.

    -

    Selected text:

    -

    Custom arg:

    - -
    -
    - -
    - -
    - -
    -
    -
    - - - diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracomacro/editor_plugin_src.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracomacro/editor_plugin_src.js deleted file mode 100644 index 35fc20fc14..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracomacro/editor_plugin_src.js +++ /dev/null @@ -1,145 +0,0 @@ -/** -* $Id: editor_plugin_src.js 201 2007-02-12 15:56:56Z spocke $ -* -* @author Moxiecode -* @copyright Copyright 2004-2008, Moxiecode Systems AB, All rights reserved. -*/ - -(function() { - // Load plugin specific language pack -// tinymce.PluginManager.requireLangPack('umbraco'); - - tinymce.create('tinymce.plugins.umbracomacro', { - /** - * Initializes the plugin, this will be executed after the plugin has been created. - * This call is done before the editor instance has finished it's initialization so use the onInit event - * of the editor instance to intercept that event. - * - * @param {tinymce.Editor} ed Editor instance that the plugin is initialized in. - * @param {string} url Absolute URL to where the plugin is located. - */ - init: function(ed, url) { - var t = this; - - // Register the command so that it can be invoked by using tinyMCE.activeEditor.execCommand('mceExample'); - ed.addCommand('mceumbracomacro', function() { - var se = ed.selection; - - var urlParams = ""; - var el = se.getNode(); - - // ie selector bug - if (!ed.dom.hasClass(el, 'umbMacroHolder')) { - el = ed.dom.getParent(el, 'div.umbMacroHolder'); - } - - var attrString = ""; - if (ed.dom.hasClass(el, 'umbMacroHolder')) { - for (var i = 0; i < el.attributes.length; i++) { - attrName = el.attributes[i].nodeName.toLowerCase(); - if (attrName != "mce_serialized") { - if (el.attributes[i].nodeValue && (attrName != 'ismacro' && attrName != 'style' && attrName != 'contenteditable')) { - attrString += el.attributes[i].nodeName + '=' + escape(t._utf8_encode(el.attributes[i].nodeValue)) + '&'; //.replace(/#/g, "%23").replace(/\/g, "%3E").replace(/\"/g, "%22") + '&'; - - } - } - } - - // vi trunkerer strengen ved at fjerne et evt. overskydende amp; - if (attrString.length > 0) - attrString = attrString.substr(0, attrString.length - 1); - - urlParams = "&" + attrString; - } else { - urlParams = '&umbPageId=' + tinyMCE.activeEditor.getParam('theme_umbraco_pageId') + '&umbVersionId=' + tinyMCE.activeEditor.getParam('theme_umbraco_versionId'); - } - - ed.windowManager.open({ - file: tinyMCE.activeEditor.getParam('umbraco_path') + '/plugins/tinymce3/insertMacro.aspx?editor=trueurl' + urlParams, - width: 480 + parseInt(ed.getLang('umbracomacro.delta_width', 0)), - height: 470 + parseInt(ed.getLang('umbracomacro.delta_height', 0)), - inline: 1 - }, { - plugin_url: url // Plugin absolute URL - }); - }); - - // Register example button - ed.addButton('umbracomacro', { - title: 'umbracomacro.desc', - cmd: 'mceumbracomacro', - image: url + '/img/insMacro.gif' - }); - - // Add a node change handler, test if we're editing a macro - ed.onNodeChange.addToTop(function(ed, cm, n) { - - var macroElement = ed.dom.getParent(ed.selection.getStart(), 'div.umbMacroHolder'); - - // mark button if it's a macro - cm.setActive('umbracomacro', macroElement && ed.dom.hasClass(macroElement, 'umbMacroHolder')); - - }); - }, - - _utf8_encode: function(string) { - string = string.replace(/\r\n/g, "\n"); - var utftext = ""; - - for (var n = 0; n < string.length; n++) { - - var c = string.charCodeAt(n); - - if (c < 128) { - utftext += String.fromCharCode(c); - } - else if ((c > 127) && (c < 2048)) { - utftext += String.fromCharCode((c >> 6) | 192); - utftext += String.fromCharCode((c & 63) | 128); - } - else { - utftext += String.fromCharCode((c >> 12) | 224); - utftext += String.fromCharCode(((c >> 6) & 63) | 128); - utftext += String.fromCharCode((c & 63) | 128); - } - - } - - return utftext; - }, - - /** - * Creates control instances based in the incomming name. This method is normally not - * needed since the addButton method of the tinymce.Editor class is a more easy way of adding buttons - * but you sometimes need to create more complex controls like listboxes, split buttons etc then this - * method can be used to create those. - * - * @param {String} n Name of the control to create. - * @param {tinymce.ControlManager} cm Control manager to use inorder to create new control. - * @return {tinymce.ui.Control} New control instance or null if no control was created. - */ - createControl: function(n, cm) { - return null; - }, - - - /** - * Returns information about the plugin as a name/value array. - * The current keys are longname, author, authorurl, infourl and version. - * - * @return {Object} Name/value array containing information about the plugin. - */ - getInfo: function() { - return { - longname: 'Umbraco Macro Insertion Plugin', - author: 'Umbraco', - authorurl: 'http://umbraco.org', - infourl: 'http://umbraco.org/redir/tinymcePlugins', - version: "1.0" - }; - } - }); - - // Register plugin - tinymce.PluginManager.add('umbracomacro', tinymce.plugins.umbracomacro); -})(); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracomacro/img/insMacro.gif b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracomacro/img/insMacro.gif deleted file mode 100644 index 43c58f4f03..0000000000 Binary files a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracomacro/img/insMacro.gif and /dev/null differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracomacro/js/dialog.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracomacro/js/dialog.js deleted file mode 100644 index fa8341132f..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracomacro/js/dialog.js +++ /dev/null @@ -1,19 +0,0 @@ -tinyMCEPopup.requireLangPack(); - -var ExampleDialog = { - init : function() { - var f = document.forms[0]; - - // Get the selected contents as text and place it in the input - f.someval.value = tinyMCEPopup.editor.selection.getContent({format : 'text'}); - f.somearg.value = tinyMCEPopup.getWindowArg('some_custom_arg'); - }, - - insert : function() { - // Insert the contents from the input into the document - tinyMCEPopup.editor.execCommand('mceInsertContent', false, document.forms[0].someval.value); - tinyMCEPopup.close(); - } -}; - -tinyMCEPopup.onInit.add(ExampleDialog.init, ExampleDialog); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracomacro/langs/en.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracomacro/langs/en.js deleted file mode 100644 index 60b03b55c7..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracomacro/langs/en.js +++ /dev/null @@ -1,3 +0,0 @@ -tinyMCE.addI18n('en.umbracomacro',{ - desc : 'Insert macro' -}); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracomacro/langs/en_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracomacro/langs/en_dlg.js deleted file mode 100644 index ebcf948dac..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracomacro/langs/en_dlg.js +++ /dev/null @@ -1,3 +0,0 @@ -tinyMCE.addI18n('en.example_dlg',{ - title : 'This is just a example title' -}); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracomacro/langs/en_us.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracomacro/langs/en_us.js deleted file mode 100644 index 61fee28c63..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracomacro/langs/en_us.js +++ /dev/null @@ -1,3 +0,0 @@ -tinyMCE.addI18n('en_us.umbracomacro',{ - desc : 'Insert macro' -}); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracomacro/langs/en_us_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracomacro/langs/en_us_dlg.js deleted file mode 100644 index 0468c4553c..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracomacro/langs/en_us_dlg.js +++ /dev/null @@ -1,3 +0,0 @@ -tinyMCE.addI18n('en_us.example_dlg',{ - title : 'This is just a example title' -}); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracomacro/langs/he.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracomacro/langs/he.js deleted file mode 100644 index 09319cceaa..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracomacro/langs/he.js +++ /dev/null @@ -1,3 +0,0 @@ -tinyMCE.addI18n('he.umbracomacro',{ - desc : 'הוסף מאקרו' -}); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracomacro/langs/he_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracomacro/langs/he_dlg.js deleted file mode 100644 index 390eabc168..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracomacro/langs/he_dlg.js +++ /dev/null @@ -1,3 +0,0 @@ -tinyMCE.addI18n('he.example_dlg',{ - title : 'This is just a example title' -}); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracomacro/langs/ja.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracomacro/langs/ja.js deleted file mode 100644 index 32e79f18c6..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracomacro/langs/ja.js +++ /dev/null @@ -1,3 +0,0 @@ -tinyMCE.addI18n('ja.umbracomacro',{ - desc : 'マクロの挿入' -}); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracomacro/langs/ja_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracomacro/langs/ja_dlg.js deleted file mode 100644 index 67f4140f92..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracomacro/langs/ja_dlg.js +++ /dev/null @@ -1,3 +0,0 @@ -tinyMCE.addI18n('ja.example_dlg',{ - title : 'これはタイトルの例です' -}); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracomacro/langs/ru.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracomacro/langs/ru.js deleted file mode 100644 index f9a98c4fb0..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracomacro/langs/ru.js +++ /dev/null @@ -1,3 +0,0 @@ -tinyMCE.addI18n('ru.umbracomacro',{ - desc : 'Вставить макрос' -}); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracomacro/langs/ru_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracomacro/langs/ru_dlg.js deleted file mode 100644 index 3fa610a3ee..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracomacro/langs/ru_dlg.js +++ /dev/null @@ -1,3 +0,0 @@ -tinyMCE.addI18n('ru.example_dlg',{ - title : ' ' -}); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracomacro/langs/sv.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracomacro/langs/sv.js deleted file mode 100644 index fc134d5698..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracomacro/langs/sv.js +++ /dev/null @@ -1,3 +0,0 @@ -tinyMCE.addI18n('sv.umbracomacro',{ - desc : 'Infoga makro' -}); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracomacro/langs/sv_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracomacro/langs/sv_dlg.js deleted file mode 100644 index 3bf4ed0880..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracomacro/langs/sv_dlg.js +++ /dev/null @@ -1,3 +0,0 @@ -tinyMCE.addI18n('sv.example_dlg',{ - title : 'Detta är bar ett exempel på en titel' -}); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracomacro/langs/zh.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracomacro/langs/zh.js deleted file mode 100644 index f2edf9598f..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracomacro/langs/zh.js +++ /dev/null @@ -1,3 +0,0 @@ -tinyMCE.addI18n('zh.umbracomacro',{ - desc : '插入宏' -}); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracomacro/langs/zh_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracomacro/langs/zh_dlg.js deleted file mode 100644 index db7ad925a0..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracomacro/langs/zh_dlg.js +++ /dev/null @@ -1,3 +0,0 @@ -tinyMCE.addI18n('zh.example_dlg',{ - title : '这是示例标题' -}); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracopaste/editor_plugin_src.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracopaste/editor_plugin_src.js deleted file mode 100644 index aaf58e7c2d..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracopaste/editor_plugin_src.js +++ /dev/null @@ -1,53 +0,0 @@ -/** -* editor_plugin_src.js -* -* Copyright 2012, Umbraco -* Released under MIT License. -* -* License: http://opensource.org/licenses/mit-license.html -*/ - -(function () { - var Event = tinymce.dom.Event, each = tinymce.each, DOM = tinymce.DOM; - - /** - * This plugin modifies the standard TinyMCE paste, with umbraco specific changes. - * - * @class tinymce.plugins.umbContextMenu - */ - tinymce.create('tinymce.plugins.UmbracoPaste', { - /** - * Initializes the plugin, this will be executed after the plugin has been created. - * This call is done before the editor instance has finished it's initialization so use the onInit event - * of the editor instance to intercept that event. - * - * @method init - * @param {tinymce.Editor} ed Editor instance that the plugin is initialized in. - * @param {string} url Absolute URL to where the plugin is located. - */ - init: function (ed) { - var t = this; - - ed.plugins.paste.onPreProcess.add(function (pl, o) { - - var ed = this.editor, h = o.content; - - var umbracoAllowedStyles = ed.getParam('theme_umbraco_styles'); - for (var i = 1; i < 7; i++) { - if (umbracoAllowedStyles.indexOf("h" + i) == -1) { - h = h.replace(new RegExp(']*', 'gi'), '

    ', 'gi'), '

    '); - } - } - - o.content = h; - - }); - - } - - }); - - // Register plugin - tinymce.PluginManager.add('umbracopaste', tinymce.plugins.UmbracoPaste); -})(); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoshortcut/editor_plugin_src.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoshortcut/editor_plugin_src.js deleted file mode 100644 index 15d669b4e1..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/umbracoshortcut/editor_plugin_src.js +++ /dev/null @@ -1,43 +0,0 @@ - -(function () { - tinymce.create('tinymce.plugins.Umbracoshortcut', { - init: function (ed, url) { - var t = this; - var ctrlPressed = false; - - t.editor = ed; - - ed.onKeyDown.add(function (ed, e) { - if (e.keyCode == 17) - ctrlPressed = true; - - if (ctrlPressed && e.keyCode == 83) { - jQuery(document).trigger("UMBRACO_TINYMCE_SAVE", e); - ctrlPressed = false; - tinymce.dom.Event.cancel(e); - return false; - } - }); - - ed.onKeyUp.add(function (ed, e) { - if (e.keyCode == 17) - ctrlPressed = false; - }); - }, - - getInfo: function () { - return { - longname: 'Umbraco Save short cut key', - author: 'Umbraco HQ', - authorurl: 'http://umbraco.com', - infourl: 'http://our.umbraco.org', - version: "1.0" - }; - } - - // Private methods - }); - - // Register plugin - tinymce.PluginManager.add('umbracoshortcut', tinymce.plugins.Umbracoshortcut); -})(); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/visualblocks/css/visualblocks.css b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/visualblocks/css/visualblocks.css deleted file mode 100644 index 76bc92b50c..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/visualblocks/css/visualblocks.css +++ /dev/null @@ -1,21 +0,0 @@ -p, h1, h2, h3, h4, h5, h6, hgroup, aside, div, section, article, blockquote, address, pre, figure {display: block; padding-top: 10px; border: 1px dashed #BBB; background: transparent no-repeat} -p, h1, h2, h3, h4, h5, h6, hgroup, aside, div, section, article, address, pre, figure {margin-left: 3px} -section, article, address, hgroup, aside, figure {margin: 0 0 1em 3px} - -p {background-image: url(data:image/gif;base64,R0lGODlhCQAJAJEAAAAAAP///7u7u////yH5BAEAAAMALAAAAAAJAAkAAAIQnG+CqCN/mlyvsRUpThG6AgA7)} -h1 {background-image: url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybGu1JuxHoAfRNRW3TWXyF2YiRUAOw==)} -h2 {background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8Hybbx4oOuqgTynJd6bGlWg3DkJzoaUAAAOw==)} -h3 {background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIZjI8Hybbx4oOuqgTynJf2Ln2NOHpQpmhAAQA7)} -h4 {background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxInR0zqeAdhtJlXwV1oCll2HaWgAAOw==)} -h5 {background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjane4iq5GlW05GgIkIZUAAAOw==)} -h6 {background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjan04jep1iZ1XRlAo5bVgAAOw==)} -div {background-image: url(data:image/gif;base64,R0lGODlhEgAKAIABALu7u////yH5BAEAAAEALAAAAAASAAoAAAIfjI9poI0cgDywrhuxfbrzDEbQM2Ei5aRjmoySW4pAAQA7)} -section {background-image: url(data:image/gif;base64,R0lGODlhKAAKAIABALu7u////yH5BAEAAAEALAAAAAAoAAoAAAI5jI+pywcNY3sBWHdNrplytD2ellDeSVbp+GmWqaDqDMepc8t17Y4vBsK5hDyJMcI6KkuYU+jpjLoKADs=)} -article {background-image: url(data:image/gif;base64,R0lGODlhKgAKAIABALu7u////yH5BAEAAAEALAAAAAAqAAoAAAI6jI+pywkNY3wG0GBvrsd2tXGYSGnfiF7ikpXemTpOiJScasYoDJJrjsG9gkCJ0ag6KhmaIe3pjDYBBQA7)} -blockquote {background-image: url(data:image/gif;base64,R0lGODlhPgAKAIABALu7u////yH5BAEAAAEALAAAAAA+AAoAAAJPjI+py+0Knpz0xQDyuUhvfoGgIX5iSKZYgq5uNL5q69asZ8s5rrf0yZmpNkJZzFesBTu8TOlDVAabUyatguVhWduud3EyiUk45xhTTgMBBQA7)} -address {background-image: url(data:image/gif;base64,R0lGODlhLQAKAIABALu7u////yH5BAEAAAEALAAAAAAtAAoAAAI/jI+pywwNozSP1gDyyZcjb3UaRpXkWaXmZW4OqKLhBmLs+K263DkJK7OJeifh7FicKD9A1/IpGdKkyFpNmCkAADs=)} -pre {background-image: url(data:image/gif;base64,R0lGODlhFQAKAIABALu7uwAAACH5BAEAAAEALAAAAAAVAAoAAAIjjI+ZoN0cgDwSmnpz1NCueYERhnibZVKLNnbOq8IvKpJtVQAAOw==)} -hgroup {background-image: url(data:image/gif;base64,R0lGODlhJwAKAIABALu7uwAAACH5BAEAAAEALAAAAAAnAAoAAAI3jI+pywYNI3uB0gpsRtt5fFnfNZaVSYJil4Wo03Hv6Z62uOCgiXH1kZIIJ8NiIxRrAZNMZAtQAAA7)} -aside {background-image: url(data:image/gif;base64,R0lGODlhHgAKAIABAKqqqv///yH5BAEAAAEALAAAAAAeAAoAAAItjI+pG8APjZOTzgtqy7I3f1yehmQcFY4WKZbqByutmW4aHUd6vfcVbgudgpYCADs=)} -figure {background-image: url(data:image/gif;base64,R0lGODlhJAAKAIAAALu7u////yH5BAEAAAEALAAAAAAkAAoAAAI0jI+py+2fwAHUSFvD3RlvG4HIp4nX5JFSpnZUJ6LlrM52OE7uSWosBHScgkSZj7dDKnWAAgA7)} -figcaption {border: 1px dashed #BBB} diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/visualblocks/editor_plugin.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/visualblocks/editor_plugin.js deleted file mode 100644 index c65eaf2b4c..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/visualblocks/editor_plugin.js +++ /dev/null @@ -1 +0,0 @@ -(function(){tinymce.create("tinymce.plugins.VisualBlocks",{init:function(a,b){var c;if(!window.NodeList){return}a.addCommand("mceVisualBlocks",function(){var e=a.dom,d;if(!c){c=e.uniqueId();d=e.create("link",{id:c,rel:"stylesheet",href:b+"/css/visualblocks.css"});a.getDoc().getElementsByTagName("head")[0].appendChild(d)}else{d=e.get(c);d.disabled=!d.disabled}a.controlManager.setActive("visualblocks",!d.disabled)});a.addButton("visualblocks",{title:"visualblocks.desc",cmd:"mceVisualBlocks"});a.onInit.add(function(){if(a.settings.visualblocks_default_state){a.execCommand("mceVisualBlocks",false,null,{skip_focus:true})}})},getInfo:function(){return{longname:"Visual blocks",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/visualblocks",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("visualblocks",tinymce.plugins.VisualBlocks)})(); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/visualblocks/editor_plugin_src.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/visualblocks/editor_plugin_src.js deleted file mode 100644 index b9d2ab2e15..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/visualblocks/editor_plugin_src.js +++ /dev/null @@ -1,63 +0,0 @@ -/** - * editor_plugin_src.js - * - * Copyright 2012, Moxiecode Systems AB - * Released under LGPL License. - * - * License: http://tinymce.moxiecode.com/license - * Contributing: http://tinymce.moxiecode.com/contributing - */ - -(function() { - tinymce.create('tinymce.plugins.VisualBlocks', { - init : function(ed, url) { - var cssId; - - // We don't support older browsers like IE6/7 and they don't provide prototypes for DOM objects - if (!window.NodeList) { - return; - } - - ed.addCommand('mceVisualBlocks', function() { - var dom = ed.dom, linkElm; - - if (!cssId) { - cssId = dom.uniqueId(); - linkElm = dom.create('link', { - id: cssId, - rel : 'stylesheet', - href : url + '/css/visualblocks.css' - }); - - ed.getDoc().getElementsByTagName('head')[0].appendChild(linkElm); - } else { - linkElm = dom.get(cssId); - linkElm.disabled = !linkElm.disabled; - } - - ed.controlManager.setActive('visualblocks', !linkElm.disabled); - }); - - ed.addButton('visualblocks', {title : 'visualblocks.desc', cmd : 'mceVisualBlocks'}); - - ed.onInit.add(function() { - if (ed.settings.visualblocks_default_state) { - ed.execCommand('mceVisualBlocks', false, null, {skip_focus : true}); - } - }); - }, - - getInfo : function() { - return { - longname : 'Visual blocks', - author : 'Moxiecode Systems AB', - authorurl : 'http://tinymce.moxiecode.com', - infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/visualblocks', - version : tinymce.majorVersion + "." + tinymce.minorVersion - }; - } - }); - - // Register plugin - tinymce.PluginManager.add('visualblocks', tinymce.plugins.VisualBlocks); -})(); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/visualchars/editor_plugin.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/visualchars/editor_plugin.js deleted file mode 100644 index 1a148e8b4f..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/visualchars/editor_plugin.js +++ /dev/null @@ -1 +0,0 @@ -(function(){tinymce.create("tinymce.plugins.VisualChars",{init:function(a,b){var c=this;c.editor=a;a.addCommand("mceVisualChars",c._toggleVisualChars,c);a.addButton("visualchars",{title:"visualchars.desc",cmd:"mceVisualChars"});a.onBeforeGetContent.add(function(d,e){if(c.state&&e.format!="raw"&&!e.draft){c.state=true;c._toggleVisualChars(false)}})},getInfo:function(){return{longname:"Visual characters",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/visualchars",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_toggleVisualChars:function(m){var p=this,k=p.editor,a,g,j,n=k.getDoc(),o=k.getBody(),l,q=k.selection,e,c,f;p.state=!p.state;k.controlManager.setActive("visualchars",p.state);if(m){f=q.getBookmark()}if(p.state){a=[];tinymce.walk(o,function(b){if(b.nodeType==3&&b.nodeValue&&b.nodeValue.indexOf("\u00a0")!=-1){a.push(b)}},"childNodes");for(g=0;g$1');c=k.dom.create("div",null,l);while(node=c.lastChild){k.dom.insertAfter(node,a[g])}k.dom.remove(a[g])}}else{a=k.dom.select("span.mceItemNbsp",o);for(g=a.length-1;g>=0;g--){k.dom.remove(a[g],1)}}q.moveToBookmark(f)}});tinymce.PluginManager.add("visualchars",tinymce.plugins.VisualChars)})(); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/visualchars/editor_plugin_src.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/visualchars/editor_plugin_src.js deleted file mode 100644 index df985905b6..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/visualchars/editor_plugin_src.js +++ /dev/null @@ -1,83 +0,0 @@ -/** - * editor_plugin_src.js - * - * Copyright 2009, Moxiecode Systems AB - * Released under LGPL License. - * - * License: http://tinymce.moxiecode.com/license - * Contributing: http://tinymce.moxiecode.com/contributing - */ - -(function() { - tinymce.create('tinymce.plugins.VisualChars', { - init : function(ed, url) { - var t = this; - - t.editor = ed; - - // Register commands - ed.addCommand('mceVisualChars', t._toggleVisualChars, t); - - // Register buttons - ed.addButton('visualchars', {title : 'visualchars.desc', cmd : 'mceVisualChars'}); - - ed.onBeforeGetContent.add(function(ed, o) { - if (t.state && o.format != 'raw' && !o.draft) { - t.state = true; - t._toggleVisualChars(false); - } - }); - }, - - getInfo : function() { - return { - longname : 'Visual characters', - author : 'Moxiecode Systems AB', - authorurl : 'http://tinymce.moxiecode.com', - infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/visualchars', - version : tinymce.majorVersion + "." + tinymce.minorVersion - }; - }, - - // Private methods - - _toggleVisualChars : function(bookmark) { - var t = this, ed = t.editor, nl, i, h, d = ed.getDoc(), b = ed.getBody(), nv, s = ed.selection, bo, div, bm; - - t.state = !t.state; - ed.controlManager.setActive('visualchars', t.state); - - if (bookmark) - bm = s.getBookmark(); - - if (t.state) { - nl = []; - tinymce.walk(b, function(n) { - if (n.nodeType == 3 && n.nodeValue && n.nodeValue.indexOf('\u00a0') != -1) - nl.push(n); - }, 'childNodes'); - - for (i = 0; i < nl.length; i++) { - nv = nl[i].nodeValue; - nv = nv.replace(/(\u00a0)/g, '$1'); - - div = ed.dom.create('div', null, nv); - while (node = div.lastChild) - ed.dom.insertAfter(node, nl[i]); - - ed.dom.remove(nl[i]); - } - } else { - nl = ed.dom.select('span.mceItemNbsp', b); - - for (i = nl.length - 1; i >= 0; i--) - ed.dom.remove(nl[i], 1); - } - - s.moveToBookmark(bm); - } - }); - - // Register plugin - tinymce.PluginManager.add('visualchars', tinymce.plugins.VisualChars); -})(); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/wordcount/editor_plugin.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/wordcount/editor_plugin.js deleted file mode 100644 index 42ece2092f..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/wordcount/editor_plugin.js +++ /dev/null @@ -1 +0,0 @@ -(function(){tinymce.create("tinymce.plugins.WordCount",{block:0,id:null,countre:null,cleanre:null,init:function(c,d){var e=this,f=0,g=tinymce.VK;e.countre=c.getParam("wordcount_countregex",/[\w\u2019\'-]+/g);e.cleanre=c.getParam("wordcount_cleanregex",/[0-9.(),;:!?%#$?\'\"_+=\\\/-]*/g);e.update_rate=c.getParam("wordcount_update_rate",2000);e.update_on_delete=c.getParam("wordcount_update_on_delete",false);e.id=c.id+"-word-count";c.onPostRender.add(function(i,h){var j,k;k=i.getParam("wordcount_target_id");if(!k){j=tinymce.DOM.get(i.id+"_path_row");if(j){tinymce.DOM.add(j.parentNode,"div",{style:"float: right"},i.getLang("wordcount.words","Words: ")+'0')}}else{tinymce.DOM.add(k,"span",{},'0')}});c.onInit.add(function(h){h.selection.onSetContent.add(function(){e._count(h)});e._count(h)});c.onSetContent.add(function(h){e._count(h)});function b(h){return h!==f&&(h===g.ENTER||f===g.SPACEBAR||a(f))}function a(h){return h===g.DELETE||h===g.BACKSPACE}c.onKeyUp.add(function(h,i){if(b(i.keyCode)||e.update_on_delete&&a(i.keyCode)){e._count(h)}f=i.keyCode})},_getCount:function(c){var a=0;var b=c.getContent({format:"raw"});if(b){b=b.replace(/\.\.\./g," ");b=b.replace(/<.[^<>]*?>/g," ").replace(/ | /gi," ");b=b.replace(/(\w+)(&.+?;)+(\w+)/,"$1$3").replace(/&.+?;/g," ");b=b.replace(this.cleanre,"");var d=b.match(this.countre);if(d){a=d.length}}return a},_count:function(a){var b=this;if(b.block){return}b.block=1;setTimeout(function(){if(!a.destroyed){var c=b._getCount(a);tinymce.DOM.setHTML(b.id,c.toString());setTimeout(function(){b.block=0},b.update_rate)}},1)},getInfo:function(){return{longname:"Word Count plugin",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/wordcount",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("wordcount",tinymce.plugins.WordCount)})(); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/wordcount/editor_plugin_src.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/wordcount/editor_plugin_src.js deleted file mode 100644 index 34b265553f..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/wordcount/editor_plugin_src.js +++ /dev/null @@ -1,122 +0,0 @@ -/** - * editor_plugin_src.js - * - * Copyright 2009, Moxiecode Systems AB - * Released under LGPL License. - * - * License: http://tinymce.moxiecode.com/license - * Contributing: http://tinymce.moxiecode.com/contributing - */ - -(function() { - tinymce.create('tinymce.plugins.WordCount', { - block : 0, - id : null, - countre : null, - cleanre : null, - - init : function(ed, url) { - var t = this, last = 0, VK = tinymce.VK; - - t.countre = ed.getParam('wordcount_countregex', /[\w\u2019\'-]+/g); // u2019 == ’ - t.cleanre = ed.getParam('wordcount_cleanregex', /[0-9.(),;:!?%#$?\'\"_+=\\\/-]*/g); - t.update_rate = ed.getParam('wordcount_update_rate', 2000); - t.update_on_delete = ed.getParam('wordcount_update_on_delete', false); - t.id = ed.id + '-word-count'; - - ed.onPostRender.add(function(ed, cm) { - var row, id; - - // Add it to the specified id or the theme advanced path - id = ed.getParam('wordcount_target_id'); - if (!id) { - row = tinymce.DOM.get(ed.id + '_path_row'); - - if (row) - tinymce.DOM.add(row.parentNode, 'div', {'style': 'float: right'}, ed.getLang('wordcount.words', 'Words: ') + '0'); - } else { - tinymce.DOM.add(id, 'span', {}, '0'); - } - }); - - ed.onInit.add(function(ed) { - ed.selection.onSetContent.add(function() { - t._count(ed); - }); - - t._count(ed); - }); - - ed.onSetContent.add(function(ed) { - t._count(ed); - }); - - function checkKeys(key) { - return key !== last && (key === VK.ENTER || last === VK.SPACEBAR || checkDelOrBksp(last)); - } - - function checkDelOrBksp(key) { - return key === VK.DELETE || key === VK.BACKSPACE; - } - - ed.onKeyUp.add(function(ed, e) { - if (checkKeys(e.keyCode) || t.update_on_delete && checkDelOrBksp(e.keyCode)) { - t._count(ed); - } - - last = e.keyCode; - }); - }, - - _getCount : function(ed) { - var tc = 0; - var tx = ed.getContent({ format: 'raw' }); - - if (tx) { - tx = tx.replace(/\.\.\./g, ' '); // convert ellipses to spaces - tx = tx.replace(/<.[^<>]*?>/g, ' ').replace(/ | /gi, ' '); // remove html tags and space chars - - // deal with html entities - tx = tx.replace(/(\w+)(&.+?;)+(\w+)/, "$1$3").replace(/&.+?;/g, ' '); - tx = tx.replace(this.cleanre, ''); // remove numbers and punctuation - - var wordArray = tx.match(this.countre); - if (wordArray) { - tc = wordArray.length; - } - } - - return tc; - }, - - _count : function(ed) { - var t = this; - - // Keep multiple calls from happening at the same time - if (t.block) - return; - - t.block = 1; - - setTimeout(function() { - if (!ed.destroyed) { - var tc = t._getCount(ed); - tinymce.DOM.setHTML(t.id, tc.toString()); - setTimeout(function() {t.block = 0;}, t.update_rate); - } - }, 1); - }, - - getInfo: function() { - return { - longname : 'Word Count plugin', - author : 'Moxiecode Systems AB', - authorurl : 'http://tinymce.moxiecode.com', - infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/wordcount', - version : tinymce.majorVersion + "." + tinymce.minorVersion - }; - } - }); - - tinymce.PluginManager.add('wordcount', tinymce.plugins.WordCount); -})(); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/xhtmlxtras/abbr.htm b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/xhtmlxtras/abbr.htm deleted file mode 100644 index 30a894f7c3..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/xhtmlxtras/abbr.htm +++ /dev/null @@ -1,142 +0,0 @@ - - - - {#xhtmlxtras_dlg.title_abbr_element} - - - - - - - - - - -
    - - -
    -
    -
    - {#xhtmlxtras_dlg.fieldset_attrib_tab} - - - - - - - - - - - - - - - - - - - - - - - - - -
    :
    :
    : - -
    :
    : - -
    : - -
    -
    -
    -
    -
    - {#xhtmlxtras_dlg.fieldset_events_tab} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    -
    -
    -
    -
    - - - -
    -
    - - diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/xhtmlxtras/acronym.htm b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/xhtmlxtras/acronym.htm deleted file mode 100644 index c109345928..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/xhtmlxtras/acronym.htm +++ /dev/null @@ -1,142 +0,0 @@ - - - - {#xhtmlxtras_dlg.title_acronym_element} - - - - - - - - - - -
    - - -
    -
    -
    - {#xhtmlxtras_dlg.fieldset_attrib_tab} - - - - - - - - - - - - - - - - - - - - - - - - - -
    :
    :
    : - -
    :
    : - -
    : - -
    -
    -
    -
    -
    - {#xhtmlxtras_dlg.fieldset_events_tab} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    -
    -
    -
    -
    - - - -
    -
    - - diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/xhtmlxtras/attributes.htm b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/xhtmlxtras/attributes.htm deleted file mode 100644 index e8d606a340..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/xhtmlxtras/attributes.htm +++ /dev/null @@ -1,149 +0,0 @@ - - - - {#xhtmlxtras_dlg.attribs_title} - - - - - - - - - -
    - - -
    -
    -
    - {#xhtmlxtras_dlg.attribute_attrib_tab} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    :
    :
    - -
    :
    : - -
    : - -
    -
    -
    -
    -
    - {#xhtmlxtras_dlg.attribute_events_tab} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    -
    -
    -
    -
    - - -
    -
    - - diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/xhtmlxtras/cite.htm b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/xhtmlxtras/cite.htm deleted file mode 100644 index 0ac6bdb667..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/xhtmlxtras/cite.htm +++ /dev/null @@ -1,142 +0,0 @@ - - - - {#xhtmlxtras_dlg.title_cite_element} - - - - - - - - - - -
    - - -
    -
    -
    - {#xhtmlxtras_dlg.fieldset_attrib_tab} - - - - - - - - - - - - - - - - - - - - - - - - - -
    :
    :
    : - -
    :
    : - -
    : - -
    -
    -
    -
    -
    - {#xhtmlxtras_dlg.fieldset_events_tab} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    -
    -
    -
    -
    - - - -
    -
    - - diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/xhtmlxtras/css/attributes.css b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/xhtmlxtras/css/attributes.css deleted file mode 100644 index 9a6a235c35..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/xhtmlxtras/css/attributes.css +++ /dev/null @@ -1,11 +0,0 @@ -.panel_wrapper div.current { - height: 290px; -} - -#id, #style, #title, #dir, #hreflang, #lang, #classlist, #tabindex, #accesskey { - width: 200px; -} - -#events_panel input { - width: 200px; -} diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/xhtmlxtras/css/popup.css b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/xhtmlxtras/css/popup.css deleted file mode 100644 index e67114dbaa..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/xhtmlxtras/css/popup.css +++ /dev/null @@ -1,9 +0,0 @@ -input.field, select.field {width:200px;} -input.picker {width:179px; margin-left: 5px;} -input.disabled {border-color:#F2F2F2;} -img.picker {vertical-align:text-bottom; cursor:pointer;} -h1 {padding: 0 0 5px 0;} -.panel_wrapper div.current {height:160px;} -#xhtmlxtrasdel .panel_wrapper div.current, #xhtmlxtrasins .panel_wrapper div.current {height: 230px;} -a.browse span {display:block; width:20px; height:20px; background:url('../../../themes/advanced/img/icons.gif') -140px -20px;} -#datetime {width:180px;} diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/xhtmlxtras/del.htm b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/xhtmlxtras/del.htm deleted file mode 100644 index 5f667510f5..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/xhtmlxtras/del.htm +++ /dev/null @@ -1,162 +0,0 @@ - - - - {#xhtmlxtras_dlg.title_del_element} - - - - - - - - - - -
    - - -
    -
    -
    - {#xhtmlxtras_dlg.fieldset_general_tab} - - - - - - - - - -
    : - - - - - -
    -
    :
    -
    -
    - {#xhtmlxtras_dlg.fieldset_attrib_tab} - - - - - - - - - - - - - - - - - - - - - - - - - -
    :
    :
    : - -
    :
    : - -
    : - -
    -
    -
    -
    -
    - {#xhtmlxtras_dlg.fieldset_events_tab} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    -
    -
    -
    -
    - - - -
    -
    - - diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/xhtmlxtras/editor_plugin.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/xhtmlxtras/editor_plugin.js deleted file mode 100644 index 9b98a5154b..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/xhtmlxtras/editor_plugin.js +++ /dev/null @@ -1 +0,0 @@ -(function(){tinymce.create("tinymce.plugins.XHTMLXtrasPlugin",{init:function(a,b){a.addCommand("mceCite",function(){a.windowManager.open({file:b+"/cite.htm",width:350+parseInt(a.getLang("xhtmlxtras.cite_delta_width",0)),height:250+parseInt(a.getLang("xhtmlxtras.cite_delta_height",0)),inline:1},{plugin_url:b})});a.addCommand("mceAcronym",function(){a.windowManager.open({file:b+"/acronym.htm",width:350+parseInt(a.getLang("xhtmlxtras.acronym_delta_width",0)),height:250+parseInt(a.getLang("xhtmlxtras.acronym_delta_height",0)),inline:1},{plugin_url:b})});a.addCommand("mceAbbr",function(){a.windowManager.open({file:b+"/abbr.htm",width:350+parseInt(a.getLang("xhtmlxtras.abbr_delta_width",0)),height:250+parseInt(a.getLang("xhtmlxtras.abbr_delta_height",0)),inline:1},{plugin_url:b})});a.addCommand("mceDel",function(){a.windowManager.open({file:b+"/del.htm",width:340+parseInt(a.getLang("xhtmlxtras.del_delta_width",0)),height:310+parseInt(a.getLang("xhtmlxtras.del_delta_height",0)),inline:1},{plugin_url:b})});a.addCommand("mceIns",function(){a.windowManager.open({file:b+"/ins.htm",width:340+parseInt(a.getLang("xhtmlxtras.ins_delta_width",0)),height:310+parseInt(a.getLang("xhtmlxtras.ins_delta_height",0)),inline:1},{plugin_url:b})});a.addCommand("mceAttributes",function(){a.windowManager.open({file:b+"/attributes.htm",width:380+parseInt(a.getLang("xhtmlxtras.attr_delta_width",0)),height:370+parseInt(a.getLang("xhtmlxtras.attr_delta_height",0)),inline:1},{plugin_url:b})});a.addButton("cite",{title:"xhtmlxtras.cite_desc",cmd:"mceCite"});a.addButton("acronym",{title:"xhtmlxtras.acronym_desc",cmd:"mceAcronym"});a.addButton("abbr",{title:"xhtmlxtras.abbr_desc",cmd:"mceAbbr"});a.addButton("del",{title:"xhtmlxtras.del_desc",cmd:"mceDel"});a.addButton("ins",{title:"xhtmlxtras.ins_desc",cmd:"mceIns"});a.addButton("attribs",{title:"xhtmlxtras.attribs_desc",cmd:"mceAttributes"});a.onNodeChange.add(function(d,c,f,e){f=d.dom.getParent(f,"CITE,ACRONYM,ABBR,DEL,INS");c.setDisabled("cite",e);c.setDisabled("acronym",e);c.setDisabled("abbr",e);c.setDisabled("del",e);c.setDisabled("ins",e);c.setDisabled("attribs",f&&f.nodeName=="BODY");c.setActive("cite",0);c.setActive("acronym",0);c.setActive("abbr",0);c.setActive("del",0);c.setActive("ins",0);if(f){do{c.setDisabled(f.nodeName.toLowerCase(),0);c.setActive(f.nodeName.toLowerCase(),1)}while(f=f.parentNode)}});a.onPreInit.add(function(){a.dom.create("abbr")})},getInfo:function(){return{longname:"XHTML Xtras Plugin",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/xhtmlxtras",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("xhtmlxtras",tinymce.plugins.XHTMLXtrasPlugin)})(); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/xhtmlxtras/editor_plugin_src.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/xhtmlxtras/editor_plugin_src.js deleted file mode 100644 index f24057211c..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/xhtmlxtras/editor_plugin_src.js +++ /dev/null @@ -1,132 +0,0 @@ -/** - * editor_plugin_src.js - * - * Copyright 2009, Moxiecode Systems AB - * Released under LGPL License. - * - * License: http://tinymce.moxiecode.com/license - * Contributing: http://tinymce.moxiecode.com/contributing - */ - -(function() { - tinymce.create('tinymce.plugins.XHTMLXtrasPlugin', { - init : function(ed, url) { - // Register commands - ed.addCommand('mceCite', function() { - ed.windowManager.open({ - file : url + '/cite.htm', - width : 350 + parseInt(ed.getLang('xhtmlxtras.cite_delta_width', 0)), - height : 250 + parseInt(ed.getLang('xhtmlxtras.cite_delta_height', 0)), - inline : 1 - }, { - plugin_url : url - }); - }); - - ed.addCommand('mceAcronym', function() { - ed.windowManager.open({ - file : url + '/acronym.htm', - width : 350 + parseInt(ed.getLang('xhtmlxtras.acronym_delta_width', 0)), - height : 250 + parseInt(ed.getLang('xhtmlxtras.acronym_delta_height', 0)), - inline : 1 - }, { - plugin_url : url - }); - }); - - ed.addCommand('mceAbbr', function() { - ed.windowManager.open({ - file : url + '/abbr.htm', - width : 350 + parseInt(ed.getLang('xhtmlxtras.abbr_delta_width', 0)), - height : 250 + parseInt(ed.getLang('xhtmlxtras.abbr_delta_height', 0)), - inline : 1 - }, { - plugin_url : url - }); - }); - - ed.addCommand('mceDel', function() { - ed.windowManager.open({ - file : url + '/del.htm', - width : 340 + parseInt(ed.getLang('xhtmlxtras.del_delta_width', 0)), - height : 310 + parseInt(ed.getLang('xhtmlxtras.del_delta_height', 0)), - inline : 1 - }, { - plugin_url : url - }); - }); - - ed.addCommand('mceIns', function() { - ed.windowManager.open({ - file : url + '/ins.htm', - width : 340 + parseInt(ed.getLang('xhtmlxtras.ins_delta_width', 0)), - height : 310 + parseInt(ed.getLang('xhtmlxtras.ins_delta_height', 0)), - inline : 1 - }, { - plugin_url : url - }); - }); - - ed.addCommand('mceAttributes', function() { - ed.windowManager.open({ - file : url + '/attributes.htm', - width : 380 + parseInt(ed.getLang('xhtmlxtras.attr_delta_width', 0)), - height : 370 + parseInt(ed.getLang('xhtmlxtras.attr_delta_height', 0)), - inline : 1 - }, { - plugin_url : url - }); - }); - - // Register buttons - ed.addButton('cite', {title : 'xhtmlxtras.cite_desc', cmd : 'mceCite'}); - ed.addButton('acronym', {title : 'xhtmlxtras.acronym_desc', cmd : 'mceAcronym'}); - ed.addButton('abbr', {title : 'xhtmlxtras.abbr_desc', cmd : 'mceAbbr'}); - ed.addButton('del', {title : 'xhtmlxtras.del_desc', cmd : 'mceDel'}); - ed.addButton('ins', {title : 'xhtmlxtras.ins_desc', cmd : 'mceIns'}); - ed.addButton('attribs', {title : 'xhtmlxtras.attribs_desc', cmd : 'mceAttributes'}); - - ed.onNodeChange.add(function(ed, cm, n, co) { - n = ed.dom.getParent(n, 'CITE,ACRONYM,ABBR,DEL,INS'); - - cm.setDisabled('cite', co); - cm.setDisabled('acronym', co); - cm.setDisabled('abbr', co); - cm.setDisabled('del', co); - cm.setDisabled('ins', co); - cm.setDisabled('attribs', n && n.nodeName == 'BODY'); - cm.setActive('cite', 0); - cm.setActive('acronym', 0); - cm.setActive('abbr', 0); - cm.setActive('del', 0); - cm.setActive('ins', 0); - - // Activate all - if (n) { - do { - cm.setDisabled(n.nodeName.toLowerCase(), 0); - cm.setActive(n.nodeName.toLowerCase(), 1); - } while (n = n.parentNode); - } - }); - - ed.onPreInit.add(function() { - // Fixed IE issue where it can't handle these elements correctly - ed.dom.create('abbr'); - }); - }, - - getInfo : function() { - return { - longname : 'XHTML Xtras Plugin', - author : 'Moxiecode Systems AB', - authorurl : 'http://tinymce.moxiecode.com', - infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/xhtmlxtras', - version : tinymce.majorVersion + "." + tinymce.minorVersion - }; - } - }); - - // Register plugin - tinymce.PluginManager.add('xhtmlxtras', tinymce.plugins.XHTMLXtrasPlugin); -})(); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/xhtmlxtras/ins.htm b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/xhtmlxtras/ins.htm deleted file mode 100644 index d001ac7c4d..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/xhtmlxtras/ins.htm +++ /dev/null @@ -1,162 +0,0 @@ - - - - {#xhtmlxtras_dlg.title_ins_element} - - - - - - - - - - -
    - - -
    -
    -
    - {#xhtmlxtras_dlg.fieldset_general_tab} - - - - - - - - - -
    : - - - - - -
    -
    :
    -
    -
    - {#xhtmlxtras_dlg.fieldset_attrib_tab} - - - - - - - - - - - - - - - - - - - - - - - - - -
    :
    :
    : - -
    :
    : - -
    : - -
    -
    -
    -
    -
    - {#xhtmlxtras_dlg.fieldset_events_tab} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    -
    -
    -
    -
    - - - -
    -
    - - diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/xhtmlxtras/js/abbr.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/xhtmlxtras/js/abbr.js deleted file mode 100644 index 4b51a25721..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/xhtmlxtras/js/abbr.js +++ /dev/null @@ -1,28 +0,0 @@ -/** - * abbr.js - * - * Copyright 2009, Moxiecode Systems AB - * Released under LGPL License. - * - * License: http://tinymce.moxiecode.com/license - * Contributing: http://tinymce.moxiecode.com/contributing - */ - -function init() { - SXE.initElementDialog('abbr'); - if (SXE.currentAction == "update") { - SXE.showRemoveButton(); - } -} - -function insertAbbr() { - SXE.insertElement('abbr'); - tinyMCEPopup.close(); -} - -function removeAbbr() { - SXE.removeElement('abbr'); - tinyMCEPopup.close(); -} - -tinyMCEPopup.onInit.add(init); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/xhtmlxtras/js/acronym.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/xhtmlxtras/js/acronym.js deleted file mode 100644 index 6ec2f88716..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/xhtmlxtras/js/acronym.js +++ /dev/null @@ -1,28 +0,0 @@ -/** - * acronym.js - * - * Copyright 2009, Moxiecode Systems AB - * Released under LGPL License. - * - * License: http://tinymce.moxiecode.com/license - * Contributing: http://tinymce.moxiecode.com/contributing - */ - -function init() { - SXE.initElementDialog('acronym'); - if (SXE.currentAction == "update") { - SXE.showRemoveButton(); - } -} - -function insertAcronym() { - SXE.insertElement('acronym'); - tinyMCEPopup.close(); -} - -function removeAcronym() { - SXE.removeElement('acronym'); - tinyMCEPopup.close(); -} - -tinyMCEPopup.onInit.add(init); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/xhtmlxtras/js/attributes.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/xhtmlxtras/js/attributes.js deleted file mode 100644 index 9c99995adb..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/xhtmlxtras/js/attributes.js +++ /dev/null @@ -1,111 +0,0 @@ -/** - * attributes.js - * - * Copyright 2009, Moxiecode Systems AB - * Released under LGPL License. - * - * License: http://tinymce.moxiecode.com/license - * Contributing: http://tinymce.moxiecode.com/contributing - */ - -function init() { - tinyMCEPopup.resizeToInnerSize(); - var inst = tinyMCEPopup.editor; - var dom = inst.dom; - var elm = inst.selection.getNode(); - var f = document.forms[0]; - var onclick = dom.getAttrib(elm, 'onclick'); - - setFormValue('title', dom.getAttrib(elm, 'title')); - setFormValue('id', dom.getAttrib(elm, 'id')); - setFormValue('style', dom.getAttrib(elm, "style")); - setFormValue('dir', dom.getAttrib(elm, 'dir')); - setFormValue('lang', dom.getAttrib(elm, 'lang')); - setFormValue('tabindex', dom.getAttrib(elm, 'tabindex', typeof(elm.tabindex) != "undefined" ? elm.tabindex : "")); - setFormValue('accesskey', dom.getAttrib(elm, 'accesskey', typeof(elm.accesskey) != "undefined" ? elm.accesskey : "")); - setFormValue('onfocus', dom.getAttrib(elm, 'onfocus')); - setFormValue('onblur', dom.getAttrib(elm, 'onblur')); - setFormValue('onclick', onclick); - setFormValue('ondblclick', dom.getAttrib(elm, 'ondblclick')); - setFormValue('onmousedown', dom.getAttrib(elm, 'onmousedown')); - setFormValue('onmouseup', dom.getAttrib(elm, 'onmouseup')); - setFormValue('onmouseover', dom.getAttrib(elm, 'onmouseover')); - setFormValue('onmousemove', dom.getAttrib(elm, 'onmousemove')); - setFormValue('onmouseout', dom.getAttrib(elm, 'onmouseout')); - setFormValue('onkeypress', dom.getAttrib(elm, 'onkeypress')); - setFormValue('onkeydown', dom.getAttrib(elm, 'onkeydown')); - setFormValue('onkeyup', dom.getAttrib(elm, 'onkeyup')); - className = dom.getAttrib(elm, 'class'); - - addClassesToList('classlist', 'advlink_styles'); - selectByValue(f, 'classlist', className, true); - - TinyMCE_EditableSelects.init(); -} - -function setFormValue(name, value) { - if(value && document.forms[0].elements[name]){ - document.forms[0].elements[name].value = value; - } -} - -function insertAction() { - var inst = tinyMCEPopup.editor; - var elm = inst.selection.getNode(); - - setAllAttribs(elm); - tinyMCEPopup.execCommand("mceEndUndoLevel"); - tinyMCEPopup.close(); -} - -function setAttrib(elm, attrib, value) { - var formObj = document.forms[0]; - var valueElm = formObj.elements[attrib.toLowerCase()]; - var inst = tinyMCEPopup.editor; - var dom = inst.dom; - - if (typeof(value) == "undefined" || value == null) { - value = ""; - - if (valueElm) - value = valueElm.value; - } - - dom.setAttrib(elm, attrib.toLowerCase(), value); -} - -function setAllAttribs(elm) { - var f = document.forms[0]; - - setAttrib(elm, 'title'); - setAttrib(elm, 'id'); - setAttrib(elm, 'style'); - setAttrib(elm, 'class', getSelectValue(f, 'classlist')); - setAttrib(elm, 'dir'); - setAttrib(elm, 'lang'); - setAttrib(elm, 'tabindex'); - setAttrib(elm, 'accesskey'); - setAttrib(elm, 'onfocus'); - setAttrib(elm, 'onblur'); - setAttrib(elm, 'onclick'); - setAttrib(elm, 'ondblclick'); - setAttrib(elm, 'onmousedown'); - setAttrib(elm, 'onmouseup'); - setAttrib(elm, 'onmouseover'); - setAttrib(elm, 'onmousemove'); - setAttrib(elm, 'onmouseout'); - setAttrib(elm, 'onkeypress'); - setAttrib(elm, 'onkeydown'); - setAttrib(elm, 'onkeyup'); - - // Refresh in old MSIE -// if (tinyMCE.isMSIE5) -// elm.outerHTML = elm.outerHTML; -} - -function insertAttribute() { - tinyMCEPopup.close(); -} - -tinyMCEPopup.onInit.add(init); -tinyMCEPopup.requireLangPack(); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/xhtmlxtras/js/cite.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/xhtmlxtras/js/cite.js deleted file mode 100644 index 009b71546a..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/xhtmlxtras/js/cite.js +++ /dev/null @@ -1,28 +0,0 @@ -/** - * cite.js - * - * Copyright 2009, Moxiecode Systems AB - * Released under LGPL License. - * - * License: http://tinymce.moxiecode.com/license - * Contributing: http://tinymce.moxiecode.com/contributing - */ - -function init() { - SXE.initElementDialog('cite'); - if (SXE.currentAction == "update") { - SXE.showRemoveButton(); - } -} - -function insertCite() { - SXE.insertElement('cite'); - tinyMCEPopup.close(); -} - -function removeCite() { - SXE.removeElement('cite'); - tinyMCEPopup.close(); -} - -tinyMCEPopup.onInit.add(init); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/xhtmlxtras/js/del.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/xhtmlxtras/js/del.js deleted file mode 100644 index 1f957dc786..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/xhtmlxtras/js/del.js +++ /dev/null @@ -1,53 +0,0 @@ -/** - * del.js - * - * Copyright 2009, Moxiecode Systems AB - * Released under LGPL License. - * - * License: http://tinymce.moxiecode.com/license - * Contributing: http://tinymce.moxiecode.com/contributing - */ - -function init() { - SXE.initElementDialog('del'); - if (SXE.currentAction == "update") { - setFormValue('datetime', tinyMCEPopup.editor.dom.getAttrib(SXE.updateElement, 'datetime')); - setFormValue('cite', tinyMCEPopup.editor.dom.getAttrib(SXE.updateElement, 'cite')); - SXE.showRemoveButton(); - } -} - -function setElementAttribs(elm) { - setAllCommonAttribs(elm); - setAttrib(elm, 'datetime'); - setAttrib(elm, 'cite'); - elm.removeAttribute('data-mce-new'); -} - -function insertDel() { - var elm = tinyMCEPopup.editor.dom.getParent(SXE.focusElement, 'DEL'); - - if (elm == null) { - var s = SXE.inst.selection.getContent(); - if(s.length > 0) { - insertInlineElement('del'); - var elementArray = SXE.inst.dom.select('del[data-mce-new]'); - for (var i=0; i 0) { - tagName = element_name; - - insertInlineElement(element_name); - var elementArray = tinymce.grep(SXE.inst.dom.select(element_name)); - for (var i=0; i -1) ? true : false; -} - -SXE.removeClass = function(elm,cl) { - if(elm.className == null || elm.className == "" || !SXE.containsClass(elm,cl)) { - return true; - } - var classNames = elm.className.split(" "); - var newClassNames = ""; - for (var x = 0, cnl = classNames.length; x < cnl; x++) { - if (classNames[x] != cl) { - newClassNames += (classNames[x] + " "); - } - } - elm.className = newClassNames.substring(0,newClassNames.length-1); //removes extra space at the end -} - -SXE.addClass = function(elm,cl) { - if(!SXE.containsClass(elm,cl)) elm.className ? elm.className += " " + cl : elm.className = cl; - return true; -} - -function insertInlineElement(en) { - var ed = tinyMCEPopup.editor, dom = ed.dom; - - ed.getDoc().execCommand('FontName', false, 'mceinline'); - tinymce.each(dom.select('span,font'), function(n) { - if (n.style.fontFamily == 'mceinline' || n.face == 'mceinline') - dom.replace(dom.create(en, {'data-mce-new' : 1}), n, 1); - }); -} diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/xhtmlxtras/js/ins.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/xhtmlxtras/js/ins.js deleted file mode 100644 index c4addfb01d..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/xhtmlxtras/js/ins.js +++ /dev/null @@ -1,53 +0,0 @@ -/** - * ins.js - * - * Copyright 2009, Moxiecode Systems AB - * Released under LGPL License. - * - * License: http://tinymce.moxiecode.com/license - * Contributing: http://tinymce.moxiecode.com/contributing - */ - -function init() { - SXE.initElementDialog('ins'); - if (SXE.currentAction == "update") { - setFormValue('datetime', tinyMCEPopup.editor.dom.getAttrib(SXE.updateElement, 'datetime')); - setFormValue('cite', tinyMCEPopup.editor.dom.getAttrib(SXE.updateElement, 'cite')); - SXE.showRemoveButton(); - } -} - -function setElementAttribs(elm) { - setAllCommonAttribs(elm); - setAttrib(elm, 'datetime'); - setAttrib(elm, 'cite'); - elm.removeAttribute('data-mce-new'); -} - -function insertIns() { - var elm = tinyMCEPopup.editor.dom.getParent(SXE.focusElement, 'INS'); - - if (elm == null) { - var s = SXE.inst.selection.getContent(); - if(s.length > 0) { - insertInlineElement('ins'); - var elementArray = SXE.inst.dom.select('ins[data-mce-new]'); - for (var i=0; i - - - {#advanced_dlg.about_title} - - - - - - - -
    -
    -

    {#advanced_dlg.about_title}

    -

    Version: ()

    -

    TinyMCE is a platform independent web based Javascript HTML WYSIWYG editor control released as Open Source under LGPL - by Moxiecode Systems AB. It has the ability to convert HTML TEXTAREA fields or other HTML elements to editor instances.

    -

    Copyright © 2003-2008, Moxiecode Systems AB, All rights reserved.

    -

    For more information about this software visit the TinyMCE website.

    - -
    - Got Moxie? -
    -
    - -
    -
    -

    {#advanced_dlg.about_loaded}

    - -
    -
    - -

     

    -
    -
    - -
    -
    -
    -
    - -
    - -
    - - diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/anchor.htm b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/anchor.htm deleted file mode 100644 index 75c93b799b..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/anchor.htm +++ /dev/null @@ -1,26 +0,0 @@ - - - - {#advanced_dlg.anchor_title} - - - - -
    - - - - - - - - -
    {#advanced_dlg.anchor_title}
    - -
    - - -
    -
    - - diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/charmap.htm b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/charmap.htm deleted file mode 100644 index d4b6bdfb7b..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/charmap.htm +++ /dev/null @@ -1,55 +0,0 @@ - - - - {#advanced_dlg.charmap_title} - - - - - - - - - - - - - - - - - - - -
    - - - - - - - - - -
     
     
    -
    - - - - - - - - - - - - - - - - -
     
     
     
    -
    {#advanced_dlg.charmap_usage}
    - - diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/color_picker.htm b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/color_picker.htm deleted file mode 100644 index b625531a6a..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/color_picker.htm +++ /dev/null @@ -1,70 +0,0 @@ - - - - {#advanced_dlg.colorpicker_title} - - - - - - -
    - - -
    -
    -
    - {#advanced_dlg.colorpicker_picker_title} -
    - - -
    - -
    - -
    -
    -
    -
    - -
    -
    - {#advanced_dlg.colorpicker_palette_title} -
    - -
    - -
    -
    -
    - -
    -
    - {#advanced_dlg.colorpicker_named_title} -
    - -
    - -
    - -
    - {#advanced_dlg.colorpicker_name} -
    -
    -
    -
    - -
    - - -
    -
    -
    - - diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/editor_template.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/editor_template.js deleted file mode 100644 index 4b8d563757..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/editor_template.js +++ /dev/null @@ -1 +0,0 @@ -(function(h){var i=h.DOM,g=h.dom.Event,c=h.extend,f=h.each,a=h.util.Cookie,e,d=h.explode;function b(p,m){var k,l,o=p.dom,j="",n,r;previewStyles=p.settings.preview_styles;if(previewStyles===false){return""}if(!previewStyles){previewStyles="font-family font-size font-weight text-decoration text-transform color background-color"}function q(s){return s.replace(/%(\w+)/g,"")}k=m.block||m.inline||"span";l=o.create(k);f(m.styles,function(t,s){t=q(t);if(t){o.setStyle(l,s,t)}});f(m.attributes,function(t,s){t=q(t);if(t){o.setAttrib(l,s,t)}});f(m.classes,function(s){s=q(s);if(!o.hasClass(l,s)){o.addClass(l,s)}});o.setStyles(l,{position:"absolute",left:-65535});p.getBody().appendChild(l);n=o.getStyle(p.getBody(),"fontSize",true);n=/px$/.test(n)?parseInt(n,10):0;f(previewStyles.split(" "),function(s){var t=o.getStyle(l,s,true);if(s=="background-color"&&/transparent|rgba\s*\([^)]+,\s*0\)/.test(t)){t=o.getStyle(p.getBody(),s,true);if(o.toHex(t).toLowerCase()=="#ffffff"){return}}if(s=="font-size"){if(/em|%$/.test(t)){if(n===0){return}t=parseFloat(t,10)/(/%$/.test(t)?100:1);t=(t*n)+"px"}}j+=s+":"+t+";"});o.remove(l);return j}h.ThemeManager.requireLangPack("advanced");h.create("tinymce.themes.AdvancedTheme",{sizes:[8,10,12,14,18,24,36],controls:{bold:["bold_desc","Bold"],italic:["italic_desc","Italic"],underline:["underline_desc","Underline"],strikethrough:["striketrough_desc","Strikethrough"],justifyleft:["justifyleft_desc","JustifyLeft"],justifycenter:["justifycenter_desc","JustifyCenter"],justifyright:["justifyright_desc","JustifyRight"],justifyfull:["justifyfull_desc","JustifyFull"],bullist:["bullist_desc","InsertUnorderedList"],numlist:["numlist_desc","InsertOrderedList"],outdent:["outdent_desc","Outdent"],indent:["indent_desc","Indent"],cut:["cut_desc","Cut"],copy:["copy_desc","Copy"],paste:["paste_desc","Paste"],undo:["undo_desc","Undo"],redo:["redo_desc","Redo"],link:["link_desc","mceLink"],unlink:["unlink_desc","unlink"],image:["image_desc","mceImage"],cleanup:["cleanup_desc","mceCleanup"],help:["help_desc","mceHelp"],code:["code_desc","mceCodeEditor"],hr:["hr_desc","InsertHorizontalRule"],removeformat:["removeformat_desc","RemoveFormat"],sub:["sub_desc","subscript"],sup:["sup_desc","superscript"],forecolor:["forecolor_desc","ForeColor"],forecolorpicker:["forecolor_desc","mceForeColor"],backcolor:["backcolor_desc","HiliteColor"],backcolorpicker:["backcolor_desc","mceBackColor"],charmap:["charmap_desc","mceCharMap"],visualaid:["visualaid_desc","mceToggleVisualAid"],anchor:["anchor_desc","mceInsertAnchor"],newdocument:["newdocument_desc","mceNewDocument"],blockquote:["blockquote_desc","mceBlockQuote"]},stateControls:["bold","italic","underline","strikethrough","bullist","numlist","justifyleft","justifycenter","justifyright","justifyfull","sub","sup","blockquote"],init:function(k,l){var m=this,n,j,p;m.editor=k;m.url=l;m.onResolveName=new h.util.Dispatcher(this);n=k.settings;k.forcedHighContrastMode=k.settings.detect_highcontrast&&m._isHighContrast();k.settings.skin=k.forcedHighContrastMode?"highcontrast":k.settings.skin;if(!n.theme_advanced_buttons1){n=c({theme_advanced_buttons1:"bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect",theme_advanced_buttons2:"bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code",theme_advanced_buttons3:"hr,removeformat,visualaid,|,sub,sup,|,charmap"},n)}m.settings=n=c({theme_advanced_path:true,theme_advanced_toolbar_location:"top",theme_advanced_blockformats:"p,address,pre,h1,h2,h3,h4,h5,h6",theme_advanced_toolbar_align:"left",theme_advanced_statusbar_location:"bottom",theme_advanced_fonts:"Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats",theme_advanced_more_colors:1,theme_advanced_row_height:23,theme_advanced_resize_horizontal:1,theme_advanced_resizing_use_cookie:1,theme_advanced_font_sizes:"1,2,3,4,5,6,7",theme_advanced_font_selector:"span",theme_advanced_show_current_color:0,readonly:k.settings.readonly},n);if(!n.font_size_style_values){n.font_size_style_values="8pt,10pt,12pt,14pt,18pt,24pt,36pt"}if(h.is(n.theme_advanced_font_sizes,"string")){n.font_size_style_values=h.explode(n.font_size_style_values);n.font_size_classes=h.explode(n.font_size_classes||"");p={};k.settings.theme_advanced_font_sizes=n.theme_advanced_font_sizes;f(k.getParam("theme_advanced_font_sizes","","hash"),function(r,q){var o;if(q==r&&r>=1&&r<=7){q=r+" ("+m.sizes[r-1]+"pt)";o=n.font_size_classes[r-1];r=n.font_size_style_values[r-1]||(m.sizes[r-1]+"pt")}if(/^\s*\./.test(r)){o=r.replace(/\./g,"")}p[q]=o?{"class":o}:{fontSize:r}});n.theme_advanced_font_sizes=p}if((j=n.theme_advanced_path_location)&&j!="none"){n.theme_advanced_statusbar_location=n.theme_advanced_path_location}if(n.theme_advanced_statusbar_location=="none"){n.theme_advanced_statusbar_location=0}if(k.settings.content_css!==false){k.contentCSS.push(k.baseURI.toAbsolute(l+"/skins/"+k.settings.skin+"/content.css"))}k.onInit.add(function(){if(!k.settings.readonly){k.onNodeChange.add(m._nodeChanged,m);k.onKeyUp.add(m._updateUndoStatus,m);k.onMouseUp.add(m._updateUndoStatus,m);k.dom.bind(k.dom.getRoot(),"dragend",function(){m._updateUndoStatus(k)})}});k.onSetProgressState.add(function(r,o,s){var t,u=r.id,q;if(o){m.progressTimer=setTimeout(function(){t=r.getContainer();t=t.insertBefore(i.create("DIV",{style:"position:relative"}),t.firstChild);q=i.get(r.id+"_tbl");i.add(t,"div",{id:u+"_blocker","class":"mceBlocker",style:{width:q.clientWidth+2,height:q.clientHeight+2}});i.add(t,"div",{id:u+"_progress","class":"mceProgress",style:{left:q.clientWidth/2,top:q.clientHeight/2}})},s||0)}else{i.remove(u+"_blocker");i.remove(u+"_progress");clearTimeout(m.progressTimer)}});i.loadCSS(n.editor_css?k.documentBaseURI.toAbsolute(n.editor_css):l+"/skins/"+k.settings.skin+"/ui.css");if(n.skin_variant){i.loadCSS(l+"/skins/"+k.settings.skin+"/ui_"+n.skin_variant+".css")}},_isHighContrast:function(){var j,k=i.add(i.getRoot(),"div",{style:"background-color: rgb(171,239,86);"});j=(i.getStyle(k,"background-color",true)+"").toLowerCase().replace(/ /g,"");i.remove(k);return j!="rgb(171,239,86)"&&j!="#abef56"},createControl:function(m,j){var k,l;if(l=j.createControl(m)){return l}switch(m){case"styleselect":return this._createStyleSelect();case"formatselect":return this._createBlockFormats();case"fontselect":return this._createFontSelect();case"fontsizeselect":return this._createFontSizeSelect();case"forecolor":return this._createForeColorMenu();case"backcolor":return this._createBackColorMenu()}if((k=this.controls[m])){return j.createButton(m,{title:"advanced."+k[0],cmd:k[1],ui:k[2],value:k[3]})}},execCommand:function(l,k,m){var j=this["_"+l];if(j){j.call(this,k,m);return true}return false},_importClasses:function(l){var j=this.editor,k=j.controlManager.get("styleselect");if(k.getLength()==0){f(j.dom.getClasses(),function(q,m){var p="style_"+m,n;n={inline:"span",attributes:{"class":q["class"]},selector:"*"};j.formatter.register(p,n);k.add(q["class"],p,{style:function(){return b(j,n)}})})}},_createStyleSelect:function(o){var l=this,j=l.editor,k=j.controlManager,m;m=k.createListBox("styleselect",{title:"advanced.style_select",onselect:function(q){var r,n=[],p;f(m.items,function(s){n.push(s.value)});j.focus();j.undoManager.add();r=j.formatter.matchAll(n);h.each(r,function(s){if(!q||s==q){if(s){j.formatter.remove(s)}p=true}});if(!p){j.formatter.apply(q)}j.undoManager.add();j.nodeChanged();return false}});j.onPreInit.add(function(){var p=0,n=j.getParam("style_formats");if(n){f(n,function(q){var r,s=0;f(q,function(){s++});if(s>1){r=q.name=q.name||"style_"+(p++);j.formatter.register(r,q);m.add(q.title,r,{style:function(){return b(j,q)}})}else{m.add(q.title)}})}else{f(j.getParam("theme_advanced_styles","","hash"),function(t,s){var r,q;if(t){r="style_"+(p++);q={inline:"span",classes:t,selector:"*"};j.formatter.register(r,q);m.add(l.editor.translate(s),r,{style:function(){return b(j,q)}})}})}});if(m.getLength()==0){m.onPostRender.add(function(p,q){if(!m.NativeListBox){g.add(q.id+"_text","focus",l._importClasses,l);g.add(q.id+"_text","mousedown",l._importClasses,l);g.add(q.id+"_open","focus",l._importClasses,l);g.add(q.id+"_open","mousedown",l._importClasses,l)}else{g.add(q.id,"focus",l._importClasses,l)}})}return m},_createFontSelect:function(){var l,k=this,j=k.editor;l=j.controlManager.createListBox("fontselect",{title:"advanced.fontdefault",onselect:function(m){var n=l.items[l.selectedIndex];if(!m&&n){j.execCommand("FontName",false,n.value);return}j.execCommand("FontName",false,m);l.select(function(o){return m==o});if(n&&n.value==m){l.select(null)}return false}});if(l){f(j.getParam("theme_advanced_fonts",k.settings.theme_advanced_fonts,"hash"),function(n,m){l.add(j.translate(m),n,{style:n.indexOf("dings")==-1?"font-family:"+n:""})})}return l},_createFontSizeSelect:function(){var m=this,k=m.editor,n,l=0,j=[];n=k.controlManager.createListBox("fontsizeselect",{title:"advanced.font_size",onselect:function(o){var p=n.items[n.selectedIndex];if(!o&&p){p=p.value;if(p["class"]){k.formatter.toggle("fontsize_class",{value:p["class"]});k.undoManager.add();k.nodeChanged()}else{k.execCommand("FontSize",false,p.fontSize)}return}if(o["class"]){k.focus();k.undoManager.add();k.formatter.toggle("fontsize_class",{value:o["class"]});k.undoManager.add();k.nodeChanged()}else{k.execCommand("FontSize",false,o.fontSize)}n.select(function(q){return o==q});if(p&&(p.value.fontSize==o.fontSize||p.value["class"]&&p.value["class"]==o["class"])){n.select(null)}return false}});if(n){f(m.settings.theme_advanced_font_sizes,function(p,o){var q=p.fontSize;if(q>=1&&q<=7){q=m.sizes[parseInt(q)-1]+"pt"}n.add(o,p,{style:"font-size:"+q,"class":"mceFontSize"+(l++)+(" "+(p["class"]||""))})})}return n},_createBlockFormats:function(){var l,j={p:"advanced.paragraph",address:"advanced.address",pre:"advanced.pre",h1:"advanced.h1",h2:"advanced.h2",h3:"advanced.h3",h4:"advanced.h4",h5:"advanced.h5",h6:"advanced.h6",div:"advanced.div",blockquote:"advanced.blockquote",code:"advanced.code",dt:"advanced.dt",dd:"advanced.dd",samp:"advanced.samp"},k=this;l=k.editor.controlManager.createListBox("formatselect",{title:"advanced.block",onselect:function(m){k.editor.execCommand("FormatBlock",false,m);return false}});if(l){f(k.editor.getParam("theme_advanced_blockformats",k.settings.theme_advanced_blockformats,"hash"),function(n,m){l.add(k.editor.translate(m!=n?m:j[n]),n,{"class":"mce_formatPreview mce_"+n,style:function(){return b(k.editor,{block:n})}})})}return l},_createForeColorMenu:function(){var n,k=this,l=k.settings,m={},j;if(l.theme_advanced_more_colors){m.more_colors_func=function(){k._mceColorPicker(0,{color:n.value,func:function(o){n.setColor(o)}})}}if(j=l.theme_advanced_text_colors){m.colors=j}if(l.theme_advanced_default_foreground_color){m.default_color=l.theme_advanced_default_foreground_color}m.title="advanced.forecolor_desc";m.cmd="ForeColor";m.scope=this;n=k.editor.controlManager.createColorSplitButton("forecolor",m);return n},_createBackColorMenu:function(){var n,k=this,l=k.settings,m={},j;if(l.theme_advanced_more_colors){m.more_colors_func=function(){k._mceColorPicker(0,{color:n.value,func:function(o){n.setColor(o)}})}}if(j=l.theme_advanced_background_colors){m.colors=j}if(l.theme_advanced_default_background_color){m.default_color=l.theme_advanced_default_background_color}m.title="advanced.backcolor_desc";m.cmd="HiliteColor";m.scope=this;n=k.editor.controlManager.createColorSplitButton("backcolor",m);return n},renderUI:function(l){var q,m,r,w=this,u=w.editor,x=w.settings,v,k,j;if(u.settings){u.settings.aria_label=x.aria_label+u.getLang("advanced.help_shortcut")}q=k=i.create("span",{role:"application","aria-labelledby":u.id+"_voice",id:u.id+"_parent","class":"mceEditor "+u.settings.skin+"Skin"+(x.skin_variant?" "+u.settings.skin+"Skin"+w._ufirst(x.skin_variant):"")+(u.settings.directionality=="rtl"?" mceRtl":"")});i.add(q,"span",{"class":"mceVoiceLabel",style:"display:none;",id:u.id+"_voice"},x.aria_label);if(!i.boxModel){q=i.add(q,"div",{"class":"mceOldBoxModel"})}q=v=i.add(q,"table",{role:"presentation",id:u.id+"_tbl","class":"mceLayout",cellSpacing:0,cellPadding:0});q=r=i.add(q,"tbody");switch((x.theme_advanced_layout_manager||"").toLowerCase()){case"rowlayout":m=w._rowLayout(x,r,l);break;case"customlayout":m=u.execCallback("theme_advanced_custom_layout",x,r,l,k);break;default:m=w._simpleLayout(x,r,l,k)}q=l.targetNode;j=v.rows;i.addClass(j[0],"mceFirst");i.addClass(j[j.length-1],"mceLast");f(i.select("tr",r),function(o){i.addClass(o.firstChild,"mceFirst");i.addClass(o.childNodes[o.childNodes.length-1],"mceLast")});if(i.get(x.theme_advanced_toolbar_container)){i.get(x.theme_advanced_toolbar_container).appendChild(k)}else{i.insertAfter(k,q)}g.add(u.id+"_path_row","click",function(n){n=n.target;if(n.nodeName=="A"){w._sel(n.className.replace(/^.*mcePath_([0-9]+).*$/,"$1"));return false}});if(!u.getParam("accessibility_focus")){g.add(i.add(k,"a",{href:"#"},""),"focus",function(){tinyMCE.get(u.id).focus()})}if(x.theme_advanced_toolbar_location=="external"){l.deltaHeight=0}w.deltaHeight=l.deltaHeight;l.targetNode=null;u.onKeyDown.add(function(p,n){var s=121,o=122;if(n.altKey){if(n.keyCode===s){if(h.isWebKit){window.focus()}w.toolbarGroup.focus();return g.cancel(n)}else{if(n.keyCode===o){i.get(p.id+"_path_row").focus();return g.cancel(n)}}}});u.addShortcut("alt+0","","mceShortcuts",w);return{iframeContainer:m,editorContainer:u.id+"_parent",sizeContainer:v,deltaHeight:l.deltaHeight}},getInfo:function(){return{longname:"Advanced theme",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",version:h.majorVersion+"."+h.minorVersion}},resizeBy:function(j,k){var l=i.get(this.editor.id+"_ifr");this.resizeTo(l.clientWidth+j,l.clientHeight+k)},resizeTo:function(j,n,l){var k=this.editor,m=this.settings,o=i.get(k.id+"_tbl"),p=i.get(k.id+"_ifr");j=Math.max(m.theme_advanced_resizing_min_width||100,j);n=Math.max(m.theme_advanced_resizing_min_height||100,n);j=Math.min(m.theme_advanced_resizing_max_width||65535,j);n=Math.min(m.theme_advanced_resizing_max_height||65535,n);i.setStyle(o,"height","");i.setStyle(p,"height",n);if(m.theme_advanced_resize_horizontal){i.setStyle(o,"width","");i.setStyle(p,"width",j);if(j"));i.setHTML(l,r.join(""))},_addStatusBar:function(p,k){var l,w=this,q=w.editor,x=w.settings,j,u,v,m;l=i.add(p,"tr");l=m=i.add(l,"td",{"class":"mceStatusbar"});l=i.add(l,"div",{id:q.id+"_path_row",role:"group","aria-labelledby":q.id+"_path_voice"});if(x.theme_advanced_path){i.add(l,"span",{id:q.id+"_path_voice"},q.translate("advanced.path"));i.add(l,"span",{},": ")}else{i.add(l,"span",{}," ")}if(x.theme_advanced_resizing){i.add(m,"a",{id:q.id+"_resize",href:"javascript:;",onclick:"return false;","class":"mceResize",tabIndex:"-1"});if(x.theme_advanced_resizing_use_cookie){q.onPostRender.add(function(){var n=a.getHash("TinyMCE_"+q.id+"_size"),r=i.get(q.id+"_tbl");if(!n){return}w.resizeTo(n.cw,n.ch)})}q.onPostRender.add(function(){g.add(q.id+"_resize","click",function(n){n.preventDefault()});g.add(q.id+"_resize","mousedown",function(E){var t,r,s,o,D,A,B,G,n,F,y;function z(H){H.preventDefault();n=B+(H.screenX-D);F=G+(H.screenY-A);w.resizeTo(n,F)}function C(H){g.remove(i.doc,"mousemove",t);g.remove(q.getDoc(),"mousemove",r);g.remove(i.doc,"mouseup",s);g.remove(q.getDoc(),"mouseup",o);n=B+(H.screenX-D);F=G+(H.screenY-A);w.resizeTo(n,F,true);q.nodeChanged()}E.preventDefault();D=E.screenX;A=E.screenY;y=i.get(w.editor.id+"_ifr");B=n=y.clientWidth;G=F=y.clientHeight;t=g.add(i.doc,"mousemove",z);r=g.add(q.getDoc(),"mousemove",z);s=g.add(i.doc,"mouseup",C);o=g.add(q.getDoc(),"mouseup",C)})})}k.deltaHeight-=21;l=p=null},_updateUndoStatus:function(k){var j=k.controlManager,l=k.undoManager;j.setDisabled("undo",!l.hasUndo()&&!l.typing);j.setDisabled("redo",!l.hasRedo())},_nodeChanged:function(o,u,E,r,F){var z=this,D,G=0,y,H,A=z.settings,x,l,w,C,m,k,j;h.each(z.stateControls,function(n){u.setActive(n,o.queryCommandState(z.controls[n][1]))});function q(p){var s,n=F.parents,t=p;if(typeof(p)=="string"){t=function(v){return v.nodeName==p}}for(s=0;s0){H.mark(p)}})}if(H=u.get("formatselect")){D=q(o.dom.isBlock);if(D){H.select(D.nodeName.toLowerCase())}}q(function(p){if(p.nodeName==="SPAN"){if(!x&&p.className){x=p.className}}if(o.dom.is(p,A.theme_advanced_font_selector)){if(!l&&p.style.fontSize){l=p.style.fontSize}if(!w&&p.style.fontFamily){w=p.style.fontFamily.replace(/[\"\']+/g,"").replace(/^([^,]+).*/,"$1").toLowerCase()}if(!C&&p.style.color){C=p.style.color}if(!m&&p.style.backgroundColor){m=p.style.backgroundColor}}return false});if(H=u.get("fontselect")){H.select(function(n){return n.replace(/^([^,]+).*/,"$1").toLowerCase()==w})}if(H=u.get("fontsizeselect")){if(A.theme_advanced_runtime_fontsize&&!l&&!x){l=o.dom.getStyle(E,"fontSize",true)}H.select(function(n){if(n.fontSize&&n.fontSize===l){return true}if(n["class"]&&n["class"]===x){return true}})}if(A.theme_advanced_show_current_color){function B(p,n){if(H=u.get(p)){if(!n){n=H.settings.default_color}if(n!==H.value){H.displayColor(n)}}}B("forecolor",C);B("backcolor",m)}if(A.theme_advanced_show_current_color){function B(p,n){if(H=u.get(p)){if(!n){n=H.settings.default_color}if(n!==H.value){H.displayColor(n)}}}B("forecolor",C);B("backcolor",m)}if(A.theme_advanced_path&&A.theme_advanced_statusbar_location){D=i.get(o.id+"_path")||i.add(o.id+"_path_row","span",{id:o.id+"_path"});if(z.statusKeyboardNavigation){z.statusKeyboardNavigation.destroy();z.statusKeyboardNavigation=null}i.setHTML(D,"");q(function(I){var p=I.nodeName.toLowerCase(),s,v,t="";if(I.nodeType!=1||p==="br"||I.getAttribute("data-mce-bogus")||i.hasClass(I,"mceItemHidden")||i.hasClass(I,"mceItemRemoved")){return}if(h.isIE&&I.scopeName!=="HTML"&&I.scopeName){p=I.scopeName+":"+p}p=p.replace(/mce\:/g,"");switch(p){case"b":p="strong";break;case"i":p="em";break;case"img":if(y=i.getAttrib(I,"src")){t+="src: "+y+" "}break;case"a":if(y=i.getAttrib(I,"name")){t+="name: "+y+" ";p+="#"+y}if(y=i.getAttrib(I,"href")){t+="href: "+y+" "}break;case"font":if(y=i.getAttrib(I,"face")){t+="font: "+y+" "}if(y=i.getAttrib(I,"size")){t+="size: "+y+" "}if(y=i.getAttrib(I,"color")){t+="color: "+y+" "}break;case"span":if(y=i.getAttrib(I,"style")){t+="style: "+y+" "}break}if(y=i.getAttrib(I,"id")){t+="id: "+y+" "}if(y=I.className){y=y.replace(/\b\s*(webkit|mce|Apple-)\w+\s*\b/g,"");if(y){t+="class: "+y+" ";if(o.dom.isBlock(I)||p=="img"||p=="span"){p+="."+y}}}p=p.replace(/(html:)/g,"");p={name:p,node:I,title:t};z.onResolveName.dispatch(z,p);t=p.title;p=p.name;v=i.create("a",{href:"javascript:;",role:"button",onmousedown:"return false;",title:t,"class":"mcePath_"+(G++)},p);if(D.hasChildNodes()){D.insertBefore(i.create("span",{"aria-hidden":"true"},"\u00a0\u00bb "),D.firstChild);D.insertBefore(v,D.firstChild)}else{D.appendChild(v)}},o.getBody());if(i.select("a",D).length>0){z.statusKeyboardNavigation=new h.ui.KeyboardNavigation({root:o.id+"_path_row",items:i.select("a",D),excludeFromTabOrder:true,onCancel:function(){o.focus()}},i)}}},_sel:function(j){this.editor.execCommand("mceSelectNodeDepth",false,j)},_mceInsertAnchor:function(l,k){var j=this.editor;j.windowManager.open({url:this.url+"/anchor.htm",width:320+parseInt(j.getLang("advanced.anchor_delta_width",0)),height:90+parseInt(j.getLang("advanced.anchor_delta_height",0)),inline:true},{theme_url:this.url})},_mceCharMap:function(){var j=this.editor;j.windowManager.open({url:this.url+"/charmap.htm",width:550+parseInt(j.getLang("advanced.charmap_delta_width",0)),height:265+parseInt(j.getLang("advanced.charmap_delta_height",0)),inline:true},{theme_url:this.url})},_mceHelp:function(){var j=this.editor;j.windowManager.open({url:this.url+"/about.htm",width:480,height:380,inline:true},{theme_url:this.url})},_mceShortcuts:function(){var j=this.editor;j.windowManager.open({url:this.url+"/shortcuts.htm",width:480,height:380,inline:true},{theme_url:this.url})},_mceColorPicker:function(l,k){var j=this.editor;k=k||{};j.windowManager.open({url:this.url+"/color_picker.htm",width:375+parseInt(j.getLang("advanced.colorpicker_delta_width",0)),height:250+parseInt(j.getLang("advanced.colorpicker_delta_height",0)),close_previous:false,inline:true},{input_color:k.color,func:k.func,theme_url:this.url})},_mceCodeEditor:function(k,l){var j=this.editor;j.windowManager.open({url:this.url+"/source_editor.htm",width:parseInt(j.getParam("theme_advanced_source_editor_width",720)),height:parseInt(j.getParam("theme_advanced_source_editor_height",580)),inline:true,resizable:true,maximizable:true},{theme_url:this.url})},_mceImage:function(k,l){var j=this.editor;if(j.dom.getAttrib(j.selection.getNode(),"class","").indexOf("mceItem")!=-1){return}j.windowManager.open({url:this.url+"/image.htm",width:355+parseInt(j.getLang("advanced.image_delta_width",0)),height:275+parseInt(j.getLang("advanced.image_delta_height",0)),inline:true},{theme_url:this.url})},_mceLink:function(k,l){var j=this.editor;j.windowManager.open({url:this.url+"/link.htm",width:310+parseInt(j.getLang("advanced.link_delta_width",0)),height:200+parseInt(j.getLang("advanced.link_delta_height",0)),inline:true},{theme_url:this.url})},_mceNewDocument:function(){var j=this.editor;j.windowManager.confirm("advanced.newdocument",function(k){if(k){j.execCommand("mceSetContent",false,"")}})},_mceForeColor:function(){var j=this;this._mceColorPicker(0,{color:j.fgColor,func:function(k){j.fgColor=k;j.editor.execCommand("ForeColor",false,k)}})},_mceBackColor:function(){var j=this;this._mceColorPicker(0,{color:j.bgColor,func:function(k){j.bgColor=k;j.editor.execCommand("HiliteColor",false,k)}})},_ufirst:function(j){return j.substring(0,1).toUpperCase()+j.substring(1)}});h.ThemeManager.add("advanced",h.themes.AdvancedTheme)}(tinymce)); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/editor_template_src.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/editor_template_src.js deleted file mode 100644 index 82166dcb68..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/editor_template_src.js +++ /dev/null @@ -1,1490 +0,0 @@ -/** - * editor_template_src.js - * - * Copyright 2009, Moxiecode Systems AB - * Released under LGPL License. - * - * License: http://tinymce.moxiecode.com/license - * Contributing: http://tinymce.moxiecode.com/contributing - */ - -(function(tinymce) { - var DOM = tinymce.DOM, Event = tinymce.dom.Event, extend = tinymce.extend, each = tinymce.each, Cookie = tinymce.util.Cookie, lastExtID, explode = tinymce.explode; - - // Generates a preview for a format - function getPreviewCss(ed, fmt) { - var name, previewElm, dom = ed.dom, previewCss = '', parentFontSize, previewStylesName; - - previewStyles = ed.settings.preview_styles; - - // No preview forced - if (previewStyles === false) - return ''; - - // Default preview - if (!previewStyles) - previewStyles = 'font-family font-size font-weight text-decoration text-transform color background-color'; - - // Removes any variables since these can't be previewed - function removeVars(val) { - return val.replace(/%(\w+)/g, ''); - }; - - // Create block/inline element to use for preview - name = fmt.block || fmt.inline || 'span'; - previewElm = dom.create(name); - - // Add format styles to preview element - each(fmt.styles, function(value, name) { - value = removeVars(value); - - if (value) - dom.setStyle(previewElm, name, value); - }); - - // Add attributes to preview element - each(fmt.attributes, function(value, name) { - value = removeVars(value); - - if (value) - dom.setAttrib(previewElm, name, value); - }); - - // Add classes to preview element - each(fmt.classes, function(value) { - value = removeVars(value); - - if (!dom.hasClass(previewElm, value)) - dom.addClass(previewElm, value); - }); - - // Add the previewElm outside the visual area - dom.setStyles(previewElm, {position: 'absolute', left: -0xFFFF}); - ed.getBody().appendChild(previewElm); - - // Get parent container font size so we can compute px values out of em/% for older IE:s - parentFontSize = dom.getStyle(ed.getBody(), 'fontSize', true); - parentFontSize = /px$/.test(parentFontSize) ? parseInt(parentFontSize, 10) : 0; - - each(previewStyles.split(' '), function(name) { - var value = dom.getStyle(previewElm, name, true); - - // If background is transparent then check if the body has a background color we can use - if (name == 'background-color' && /transparent|rgba\s*\([^)]+,\s*0\)/.test(value)) { - value = dom.getStyle(ed.getBody(), name, true); - - // Ignore white since it's the default color, not the nicest fix - if (dom.toHex(value).toLowerCase() == '#ffffff') { - return; - } - } - - // Old IE won't calculate the font size so we need to do that manually - if (name == 'font-size') { - if (/em|%$/.test(value)) { - if (parentFontSize === 0) { - return; - } - - // Convert font size from em/% to px - value = parseFloat(value, 10) / (/%$/.test(value) ? 100 : 1); - value = (value * parentFontSize) + 'px'; - } - } - - previewCss += name + ':' + value + ';'; - }); - - dom.remove(previewElm); - - return previewCss; - }; - - // Tell it to load theme specific language pack(s) - tinymce.ThemeManager.requireLangPack('advanced'); - - tinymce.create('tinymce.themes.AdvancedTheme', { - sizes : [8, 10, 12, 14, 18, 24, 36], - - // Control name lookup, format: title, command - controls : { - bold : ['bold_desc', 'Bold'], - italic : ['italic_desc', 'Italic'], - underline : ['underline_desc', 'Underline'], - strikethrough : ['striketrough_desc', 'Strikethrough'], - justifyleft : ['justifyleft_desc', 'JustifyLeft'], - justifycenter : ['justifycenter_desc', 'JustifyCenter'], - justifyright : ['justifyright_desc', 'JustifyRight'], - justifyfull : ['justifyfull_desc', 'JustifyFull'], - bullist : ['bullist_desc', 'InsertUnorderedList'], - numlist : ['numlist_desc', 'InsertOrderedList'], - outdent : ['outdent_desc', 'Outdent'], - indent : ['indent_desc', 'Indent'], - cut : ['cut_desc', 'Cut'], - copy : ['copy_desc', 'Copy'], - paste : ['paste_desc', 'Paste'], - undo : ['undo_desc', 'Undo'], - redo : ['redo_desc', 'Redo'], - link : ['link_desc', 'mceLink'], - unlink : ['unlink_desc', 'unlink'], - image : ['image_desc', 'mceImage'], - cleanup : ['cleanup_desc', 'mceCleanup'], - help : ['help_desc', 'mceHelp'], - code : ['code_desc', 'mceCodeEditor'], - hr : ['hr_desc', 'InsertHorizontalRule'], - removeformat : ['removeformat_desc', 'RemoveFormat'], - sub : ['sub_desc', 'subscript'], - sup : ['sup_desc', 'superscript'], - forecolor : ['forecolor_desc', 'ForeColor'], - forecolorpicker : ['forecolor_desc', 'mceForeColor'], - backcolor : ['backcolor_desc', 'HiliteColor'], - backcolorpicker : ['backcolor_desc', 'mceBackColor'], - charmap : ['charmap_desc', 'mceCharMap'], - visualaid : ['visualaid_desc', 'mceToggleVisualAid'], - anchor : ['anchor_desc', 'mceInsertAnchor'], - newdocument : ['newdocument_desc', 'mceNewDocument'], - blockquote : ['blockquote_desc', 'mceBlockQuote'] - }, - - stateControls : ['bold', 'italic', 'underline', 'strikethrough', 'bullist', 'numlist', 'justifyleft', 'justifycenter', 'justifyright', 'justifyfull', 'sub', 'sup', 'blockquote'], - - init : function(ed, url) { - var t = this, s, v, o; - - t.editor = ed; - t.url = url; - t.onResolveName = new tinymce.util.Dispatcher(this); - s = ed.settings; - - ed.forcedHighContrastMode = ed.settings.detect_highcontrast && t._isHighContrast(); - ed.settings.skin = ed.forcedHighContrastMode ? 'highcontrast' : ed.settings.skin; - - // Setup default buttons - if (!s.theme_advanced_buttons1) { - s = extend({ - theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect", - theme_advanced_buttons2 : "bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code", - theme_advanced_buttons3 : "hr,removeformat,visualaid,|,sub,sup,|,charmap" - }, s); - } - - // Default settings - t.settings = s = extend({ - theme_advanced_path : true, - theme_advanced_toolbar_location : 'top', - theme_advanced_blockformats : "p,address,pre,h1,h2,h3,h4,h5,h6", - theme_advanced_toolbar_align : "left", - theme_advanced_statusbar_location : "bottom", - theme_advanced_fonts : "Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats", - theme_advanced_more_colors : 1, - theme_advanced_row_height : 23, - theme_advanced_resize_horizontal : 1, - theme_advanced_resizing_use_cookie : 1, - theme_advanced_font_sizes : "1,2,3,4,5,6,7", - theme_advanced_font_selector : "span", - theme_advanced_show_current_color: 0, - readonly : ed.settings.readonly - }, s); - - // Setup default font_size_style_values - if (!s.font_size_style_values) - s.font_size_style_values = "8pt,10pt,12pt,14pt,18pt,24pt,36pt"; - - if (tinymce.is(s.theme_advanced_font_sizes, 'string')) { - s.font_size_style_values = tinymce.explode(s.font_size_style_values); - s.font_size_classes = tinymce.explode(s.font_size_classes || ''); - - // Parse string value - o = {}; - ed.settings.theme_advanced_font_sizes = s.theme_advanced_font_sizes; - each(ed.getParam('theme_advanced_font_sizes', '', 'hash'), function(v, k) { - var cl; - - if (k == v && v >= 1 && v <= 7) { - k = v + ' (' + t.sizes[v - 1] + 'pt)'; - cl = s.font_size_classes[v - 1]; - v = s.font_size_style_values[v - 1] || (t.sizes[v - 1] + 'pt'); - } - - if (/^\s*\./.test(v)) - cl = v.replace(/\./g, ''); - - o[k] = cl ? {'class' : cl} : {fontSize : v}; - }); - - s.theme_advanced_font_sizes = o; - } - - if ((v = s.theme_advanced_path_location) && v != 'none') - s.theme_advanced_statusbar_location = s.theme_advanced_path_location; - - if (s.theme_advanced_statusbar_location == 'none') - s.theme_advanced_statusbar_location = 0; - - if (ed.settings.content_css !== false) - ed.contentCSS.push(ed.baseURI.toAbsolute(url + "/skins/" + ed.settings.skin + "/content.css")); - - // Init editor - ed.onInit.add(function() { - if (!ed.settings.readonly) { - ed.onNodeChange.add(t._nodeChanged, t); - ed.onKeyUp.add(t._updateUndoStatus, t); - ed.onMouseUp.add(t._updateUndoStatus, t); - ed.dom.bind(ed.dom.getRoot(), 'dragend', function() { - t._updateUndoStatus(ed); - }); - } - }); - - ed.onSetProgressState.add(function(ed, b, ti) { - var co, id = ed.id, tb; - - if (b) { - t.progressTimer = setTimeout(function() { - co = ed.getContainer(); - co = co.insertBefore(DOM.create('DIV', {style : 'position:relative'}), co.firstChild); - tb = DOM.get(ed.id + '_tbl'); - - DOM.add(co, 'div', {id : id + '_blocker', 'class' : 'mceBlocker', style : {width : tb.clientWidth + 2, height : tb.clientHeight + 2}}); - DOM.add(co, 'div', {id : id + '_progress', 'class' : 'mceProgress', style : {left : tb.clientWidth / 2, top : tb.clientHeight / 2}}); - }, ti || 0); - } else { - DOM.remove(id + '_blocker'); - DOM.remove(id + '_progress'); - clearTimeout(t.progressTimer); - } - }); - - DOM.loadCSS(s.editor_css ? ed.documentBaseURI.toAbsolute(s.editor_css) : url + "/skins/" + ed.settings.skin + "/ui.css"); - - if (s.skin_variant) - DOM.loadCSS(url + "/skins/" + ed.settings.skin + "/ui_" + s.skin_variant + ".css"); - }, - - _isHighContrast : function() { - var actualColor, div = DOM.add(DOM.getRoot(), 'div', {'style': 'background-color: rgb(171,239,86);'}); - - actualColor = (DOM.getStyle(div, 'background-color', true) + '').toLowerCase().replace(/ /g, ''); - DOM.remove(div); - - return actualColor != 'rgb(171,239,86)' && actualColor != '#abef56'; - }, - - createControl : function(n, cf) { - var cd, c; - - if (c = cf.createControl(n)) - return c; - - switch (n) { - case "styleselect": - return this._createStyleSelect(); - - case "formatselect": - return this._createBlockFormats(); - - case "fontselect": - return this._createFontSelect(); - - case "fontsizeselect": - return this._createFontSizeSelect(); - - case "forecolor": - return this._createForeColorMenu(); - - case "backcolor": - return this._createBackColorMenu(); - } - - if ((cd = this.controls[n])) - return cf.createButton(n, {title : "advanced." + cd[0], cmd : cd[1], ui : cd[2], value : cd[3]}); - }, - - execCommand : function(cmd, ui, val) { - var f = this['_' + cmd]; - - if (f) { - f.call(this, ui, val); - return true; - } - - return false; - }, - - _importClasses : function(e) { - var ed = this.editor, ctrl = ed.controlManager.get('styleselect'); - - if (ctrl.getLength() == 0) { - each(ed.dom.getClasses(), function(o, idx) { - var name = 'style_' + idx, fmt; - - fmt = { - inline : 'span', - attributes : {'class' : o['class']}, - selector : '*' - }; - - ed.formatter.register(name, fmt); - - ctrl.add(o['class'], name, { - style: function() { - return getPreviewCss(ed, fmt); - } - }); - }); - } - }, - - _createStyleSelect : function(n) { - var t = this, ed = t.editor, ctrlMan = ed.controlManager, ctrl; - - // Setup style select box - ctrl = ctrlMan.createListBox('styleselect', { - title : 'advanced.style_select', - onselect : function(name) { - var matches, formatNames = [], removedFormat; - - each(ctrl.items, function(item) { - formatNames.push(item.value); - }); - - ed.focus(); - ed.undoManager.add(); - - // Toggle off the current format(s) - matches = ed.formatter.matchAll(formatNames); - tinymce.each(matches, function(match) { - if (!name || match == name) { - if (match) - ed.formatter.remove(match); - - removedFormat = true; - } - }); - - if (!removedFormat) - ed.formatter.apply(name); - - ed.undoManager.add(); - ed.nodeChanged(); - - return false; // No auto select - } - }); - - // Handle specified format - ed.onPreInit.add(function() { - var counter = 0, formats = ed.getParam('style_formats'); - - if (formats) { - each(formats, function(fmt) { - var name, keys = 0; - - each(fmt, function() {keys++;}); - - if (keys > 1) { - name = fmt.name = fmt.name || 'style_' + (counter++); - ed.formatter.register(name, fmt); - ctrl.add(fmt.title, name, { - style: function() { - return getPreviewCss(ed, fmt); - } - }); - } else - ctrl.add(fmt.title); - }); - } else { - each(ed.getParam('theme_advanced_styles', '', 'hash'), function(val, key) { - var name, fmt; - - if (val) { - name = 'style_' + (counter++); - fmt = { - inline : 'span', - classes : val, - selector : '*' - }; - - ed.formatter.register(name, fmt); - ctrl.add(t.editor.translate(key), name, { - style: function() { - return getPreviewCss(ed, fmt); - } - }); - } - }); - } - }); - - // Auto import classes if the ctrl box is empty - if (ctrl.getLength() == 0) { - ctrl.onPostRender.add(function(ed, n) { - if (!ctrl.NativeListBox) { - Event.add(n.id + '_text', 'focus', t._importClasses, t); - Event.add(n.id + '_text', 'mousedown', t._importClasses, t); - Event.add(n.id + '_open', 'focus', t._importClasses, t); - Event.add(n.id + '_open', 'mousedown', t._importClasses, t); - } else - Event.add(n.id, 'focus', t._importClasses, t); - }); - } - - return ctrl; - }, - - _createFontSelect : function() { - var c, t = this, ed = t.editor; - - c = ed.controlManager.createListBox('fontselect', { - title : 'advanced.fontdefault', - onselect : function(v) { - var cur = c.items[c.selectedIndex]; - - if (!v && cur) { - ed.execCommand('FontName', false, cur.value); - return; - } - - ed.execCommand('FontName', false, v); - - // Fake selection, execCommand will fire a nodeChange and update the selection - c.select(function(sv) { - return v == sv; - }); - - if (cur && cur.value == v) { - c.select(null); - } - - return false; // No auto select - } - }); - - if (c) { - each(ed.getParam('theme_advanced_fonts', t.settings.theme_advanced_fonts, 'hash'), function(v, k) { - c.add(ed.translate(k), v, {style : v.indexOf('dings') == -1 ? 'font-family:' + v : ''}); - }); - } - - return c; - }, - - _createFontSizeSelect : function() { - var t = this, ed = t.editor, c, i = 0, cl = []; - - c = ed.controlManager.createListBox('fontsizeselect', {title : 'advanced.font_size', onselect : function(v) { - var cur = c.items[c.selectedIndex]; - - if (!v && cur) { - cur = cur.value; - - if (cur['class']) { - ed.formatter.toggle('fontsize_class', {value : cur['class']}); - ed.undoManager.add(); - ed.nodeChanged(); - } else { - ed.execCommand('FontSize', false, cur.fontSize); - } - - return; - } - - if (v['class']) { - ed.focus(); - ed.undoManager.add(); - ed.formatter.toggle('fontsize_class', {value : v['class']}); - ed.undoManager.add(); - ed.nodeChanged(); - } else - ed.execCommand('FontSize', false, v.fontSize); - - // Fake selection, execCommand will fire a nodeChange and update the selection - c.select(function(sv) { - return v == sv; - }); - - if (cur && (cur.value.fontSize == v.fontSize || cur.value['class'] && cur.value['class'] == v['class'])) { - c.select(null); - } - - return false; // No auto select - }}); - - if (c) { - each(t.settings.theme_advanced_font_sizes, function(v, k) { - var fz = v.fontSize; - - if (fz >= 1 && fz <= 7) - fz = t.sizes[parseInt(fz) - 1] + 'pt'; - - c.add(k, v, {'style' : 'font-size:' + fz, 'class' : 'mceFontSize' + (i++) + (' ' + (v['class'] || ''))}); - }); - } - - return c; - }, - - _createBlockFormats : function() { - var c, fmts = { - p : 'advanced.paragraph', - address : 'advanced.address', - pre : 'advanced.pre', - h1 : 'advanced.h1', - h2 : 'advanced.h2', - h3 : 'advanced.h3', - h4 : 'advanced.h4', - h5 : 'advanced.h5', - h6 : 'advanced.h6', - div : 'advanced.div', - blockquote : 'advanced.blockquote', - code : 'advanced.code', - dt : 'advanced.dt', - dd : 'advanced.dd', - samp : 'advanced.samp' - }, t = this; - - c = t.editor.controlManager.createListBox('formatselect', {title : 'advanced.block', onselect : function(v) { - t.editor.execCommand('FormatBlock', false, v); - return false; - }}); - - if (c) { - each(t.editor.getParam('theme_advanced_blockformats', t.settings.theme_advanced_blockformats, 'hash'), function(v, k) { - c.add(t.editor.translate(k != v ? k : fmts[v]), v, {'class' : 'mce_formatPreview mce_' + v, style: function() { - return getPreviewCss(t.editor, {block: v}); - }}); - }); - } - - return c; - }, - - _createForeColorMenu : function() { - var c, t = this, s = t.settings, o = {}, v; - - if (s.theme_advanced_more_colors) { - o.more_colors_func = function() { - t._mceColorPicker(0, { - color : c.value, - func : function(co) { - c.setColor(co); - } - }); - }; - } - - if (v = s.theme_advanced_text_colors) - o.colors = v; - - if (s.theme_advanced_default_foreground_color) - o.default_color = s.theme_advanced_default_foreground_color; - - o.title = 'advanced.forecolor_desc'; - o.cmd = 'ForeColor'; - o.scope = this; - - c = t.editor.controlManager.createColorSplitButton('forecolor', o); - - return c; - }, - - _createBackColorMenu : function() { - var c, t = this, s = t.settings, o = {}, v; - - if (s.theme_advanced_more_colors) { - o.more_colors_func = function() { - t._mceColorPicker(0, { - color : c.value, - func : function(co) { - c.setColor(co); - } - }); - }; - } - - if (v = s.theme_advanced_background_colors) - o.colors = v; - - if (s.theme_advanced_default_background_color) - o.default_color = s.theme_advanced_default_background_color; - - o.title = 'advanced.backcolor_desc'; - o.cmd = 'HiliteColor'; - o.scope = this; - - c = t.editor.controlManager.createColorSplitButton('backcolor', o); - - return c; - }, - - renderUI : function(o) { - var n, ic, tb, t = this, ed = t.editor, s = t.settings, sc, p, nl; - - if (ed.settings) { - ed.settings.aria_label = s.aria_label + ed.getLang('advanced.help_shortcut'); - } - - // TODO: ACC Should have an aria-describedby attribute which is user-configurable to describe what this field is actually for. - // Maybe actually inherit it from the original textara? - n = p = DOM.create('span', {role : 'application', 'aria-labelledby' : ed.id + '_voice', id : ed.id + '_parent', 'class' : 'mceEditor ' + ed.settings.skin + 'Skin' + (s.skin_variant ? ' ' + ed.settings.skin + 'Skin' + t._ufirst(s.skin_variant) : '') + (ed.settings.directionality == "rtl" ? ' mceRtl' : '')}); - DOM.add(n, 'span', {'class': 'mceVoiceLabel', 'style': 'display:none;', id: ed.id + '_voice'}, s.aria_label); - - if (!DOM.boxModel) - n = DOM.add(n, 'div', {'class' : 'mceOldBoxModel'}); - - n = sc = DOM.add(n, 'table', {role : "presentation", id : ed.id + '_tbl', 'class' : 'mceLayout', cellSpacing : 0, cellPadding : 0}); - n = tb = DOM.add(n, 'tbody'); - - switch ((s.theme_advanced_layout_manager || '').toLowerCase()) { - case "rowlayout": - ic = t._rowLayout(s, tb, o); - break; - - case "customlayout": - ic = ed.execCallback("theme_advanced_custom_layout", s, tb, o, p); - break; - - default: - ic = t._simpleLayout(s, tb, o, p); - } - - n = o.targetNode; - - // Add classes to first and last TRs - nl = sc.rows; - DOM.addClass(nl[0], 'mceFirst'); - DOM.addClass(nl[nl.length - 1], 'mceLast'); - - // Add classes to first and last TDs - each(DOM.select('tr', tb), function(n) { - DOM.addClass(n.firstChild, 'mceFirst'); - DOM.addClass(n.childNodes[n.childNodes.length - 1], 'mceLast'); - }); - - if (DOM.get(s.theme_advanced_toolbar_container)) - DOM.get(s.theme_advanced_toolbar_container).appendChild(p); - else - DOM.insertAfter(p, n); - - Event.add(ed.id + '_path_row', 'click', function(e) { - e = e.target; - - if (e.nodeName == 'A') { - t._sel(e.className.replace(/^.*mcePath_([0-9]+).*$/, '$1')); - return false; - } - }); -/* - if (DOM.get(ed.id + '_path_row')) { - Event.add(ed.id + '_tbl', 'mouseover', function(e) { - var re; - - e = e.target; - - if (e.nodeName == 'SPAN' && DOM.hasClass(e.parentNode, 'mceButton')) { - re = DOM.get(ed.id + '_path_row'); - t.lastPath = re.innerHTML; - DOM.setHTML(re, e.parentNode.title); - } - }); - - Event.add(ed.id + '_tbl', 'mouseout', function(e) { - if (t.lastPath) { - DOM.setHTML(ed.id + '_path_row', t.lastPath); - t.lastPath = 0; - } - }); - } -*/ - - if (!ed.getParam('accessibility_focus')) - Event.add(DOM.add(p, 'a', {href : '#'}, ''), 'focus', function() {tinyMCE.get(ed.id).focus();}); - - if (s.theme_advanced_toolbar_location == 'external') - o.deltaHeight = 0; - - t.deltaHeight = o.deltaHeight; - o.targetNode = null; - - ed.onKeyDown.add(function(ed, evt) { - var DOM_VK_F10 = 121, DOM_VK_F11 = 122; - - if (evt.altKey) { - if (evt.keyCode === DOM_VK_F10) { - // Make sure focus is given to toolbar in Safari. - // We can't do this in IE as it prevents giving focus to toolbar when editor is in a frame - if (tinymce.isWebKit) { - window.focus(); - } - t.toolbarGroup.focus(); - return Event.cancel(evt); - } else if (evt.keyCode === DOM_VK_F11) { - DOM.get(ed.id + '_path_row').focus(); - return Event.cancel(evt); - } - } - }); - - // alt+0 is the UK recommended shortcut for accessing the list of access controls. - ed.addShortcut('alt+0', '', 'mceShortcuts', t); - - return { - iframeContainer : ic, - editorContainer : ed.id + '_parent', - sizeContainer : sc, - deltaHeight : o.deltaHeight - }; - }, - - getInfo : function() { - return { - longname : 'Advanced theme', - author : 'Moxiecode Systems AB', - authorurl : 'http://tinymce.moxiecode.com', - version : tinymce.majorVersion + "." + tinymce.minorVersion - } - }, - - resizeBy : function(dw, dh) { - var e = DOM.get(this.editor.id + '_ifr'); - - this.resizeTo(e.clientWidth + dw, e.clientHeight + dh); - }, - - resizeTo : function(w, h, store) { - var ed = this.editor, s = this.settings, e = DOM.get(ed.id + '_tbl'), ifr = DOM.get(ed.id + '_ifr'); - - // Boundery fix box - w = Math.max(s.theme_advanced_resizing_min_width || 100, w); - h = Math.max(s.theme_advanced_resizing_min_height || 100, h); - w = Math.min(s.theme_advanced_resizing_max_width || 0xFFFF, w); - h = Math.min(s.theme_advanced_resizing_max_height || 0xFFFF, h); - - // Resize iframe and container - DOM.setStyle(e, 'height', ''); - DOM.setStyle(ifr, 'height', h); - - if (s.theme_advanced_resize_horizontal) { - DOM.setStyle(e, 'width', ''); - DOM.setStyle(ifr, 'width', w); - - // Make sure that the size is never smaller than the over all ui - if (w < e.clientWidth) { - w = e.clientWidth; - DOM.setStyle(ifr, 'width', e.clientWidth); - } - } - - // Store away the size - if (store && s.theme_advanced_resizing_use_cookie) { - Cookie.setHash("TinyMCE_" + ed.id + "_size", { - cw : w, - ch : h - }); - } - }, - - destroy : function() { - var id = this.editor.id; - - Event.clear(id + '_resize'); - Event.clear(id + '_path_row'); - Event.clear(id + '_external_close'); - }, - - // Internal functions - - _simpleLayout : function(s, tb, o, p) { - var t = this, ed = t.editor, lo = s.theme_advanced_toolbar_location, sl = s.theme_advanced_statusbar_location, n, ic, etb, c; - - if (s.readonly) { - n = DOM.add(tb, 'tr'); - n = ic = DOM.add(n, 'td', {'class' : 'mceIframeContainer'}); - return ic; - } - - // Create toolbar container at top - if (lo == 'top') - t._addToolbars(tb, o); - - // Create external toolbar - if (lo == 'external') { - n = c = DOM.create('div', {style : 'position:relative'}); - n = DOM.add(n, 'div', {id : ed.id + '_external', 'class' : 'mceExternalToolbar'}); - DOM.add(n, 'a', {id : ed.id + '_external_close', href : 'javascript:;', 'class' : 'mceExternalClose'}); - n = DOM.add(n, 'table', {id : ed.id + '_tblext', cellSpacing : 0, cellPadding : 0}); - etb = DOM.add(n, 'tbody'); - - if (p.firstChild.className == 'mceOldBoxModel') - p.firstChild.appendChild(c); - else - p.insertBefore(c, p.firstChild); - - t._addToolbars(etb, o); - - ed.onMouseUp.add(function() { - var e = DOM.get(ed.id + '_external'); - DOM.show(e); - - DOM.hide(lastExtID); - - var f = Event.add(ed.id + '_external_close', 'click', function() { - DOM.hide(ed.id + '_external'); - Event.remove(ed.id + '_external_close', 'click', f); - return false; - }); - - DOM.show(e); - DOM.setStyle(e, 'top', 0 - DOM.getRect(ed.id + '_tblext').h - 1); - - // Fixes IE rendering bug - DOM.hide(e); - DOM.show(e); - e.style.filter = ''; - - lastExtID = ed.id + '_external'; - - e = null; - }); - } - - if (sl == 'top') - t._addStatusBar(tb, o); - - // Create iframe container - if (!s.theme_advanced_toolbar_container) { - n = DOM.add(tb, 'tr'); - n = ic = DOM.add(n, 'td', {'class' : 'mceIframeContainer'}); - } - - // Create toolbar container at bottom - if (lo == 'bottom') - t._addToolbars(tb, o); - - if (sl == 'bottom') - t._addStatusBar(tb, o); - - return ic; - }, - - _rowLayout : function(s, tb, o) { - var t = this, ed = t.editor, dc, da, cf = ed.controlManager, n, ic, to, a; - - dc = s.theme_advanced_containers_default_class || ''; - da = s.theme_advanced_containers_default_align || 'center'; - - each(explode(s.theme_advanced_containers || ''), function(c, i) { - var v = s['theme_advanced_container_' + c] || ''; - - switch (c.toLowerCase()) { - case 'mceeditor': - n = DOM.add(tb, 'tr'); - n = ic = DOM.add(n, 'td', {'class' : 'mceIframeContainer'}); - break; - - case 'mceelementpath': - t._addStatusBar(tb, o); - break; - - default: - a = (s['theme_advanced_container_' + c + '_align'] || da).toLowerCase(); - a = 'mce' + t._ufirst(a); - - n = DOM.add(DOM.add(tb, 'tr'), 'td', { - 'class' : 'mceToolbar ' + (s['theme_advanced_container_' + c + '_class'] || dc) + ' ' + a || da - }); - - to = cf.createToolbar("toolbar" + i); - t._addControls(v, to); - DOM.setHTML(n, to.renderHTML()); - o.deltaHeight -= s.theme_advanced_row_height; - } - }); - - return ic; - }, - - _addControls : function(v, tb) { - var t = this, s = t.settings, di, cf = t.editor.controlManager; - - if (s.theme_advanced_disable && !t._disabled) { - di = {}; - - each(explode(s.theme_advanced_disable), function(v) { - di[v] = 1; - }); - - t._disabled = di; - } else - di = t._disabled; - - each(explode(v), function(n) { - var c; - - if (di && di[n]) - return; - - // Compatiblity with 2.x - if (n == 'tablecontrols') { - each(["table","|","row_props","cell_props","|","row_before","row_after","delete_row","|","col_before","col_after","delete_col","|","split_cells","merge_cells"], function(n) { - n = t.createControl(n, cf); - - if (n) - tb.add(n); - }); - - return; - } - - c = t.createControl(n, cf); - - if (c) - tb.add(c); - }); - }, - - _addToolbars : function(c, o) { - var t = this, i, tb, ed = t.editor, s = t.settings, v, cf = ed.controlManager, di, n, h = [], a, toolbarGroup, toolbarsExist = false; - - toolbarGroup = cf.createToolbarGroup('toolbargroup', { - 'name': ed.getLang('advanced.toolbar'), - 'tab_focus_toolbar':ed.getParam('theme_advanced_tab_focus_toolbar') - }); - - t.toolbarGroup = toolbarGroup; - - a = s.theme_advanced_toolbar_align.toLowerCase(); - a = 'mce' + t._ufirst(a); - - n = DOM.add(DOM.add(c, 'tr', {role: 'presentation'}), 'td', {'class' : 'mceToolbar ' + a, "role":"toolbar"}); - - // Create toolbar and add the controls - for (i=1; (v = s['theme_advanced_buttons' + i]); i++) { - toolbarsExist = true; - tb = cf.createToolbar("toolbar" + i, {'class' : 'mceToolbarRow' + i}); - - if (s['theme_advanced_buttons' + i + '_add']) - v += ',' + s['theme_advanced_buttons' + i + '_add']; - - if (s['theme_advanced_buttons' + i + '_add_before']) - v = s['theme_advanced_buttons' + i + '_add_before'] + ',' + v; - - t._addControls(v, tb); - toolbarGroup.add(tb); - - o.deltaHeight -= s.theme_advanced_row_height; - } - // Handle case when there are no toolbar buttons and ensure editor height is adjusted accordingly - if (!toolbarsExist) - o.deltaHeight -= s.theme_advanced_row_height; - h.push(toolbarGroup.renderHTML()); - h.push(DOM.createHTML('a', {href : '#', accesskey : 'z', title : ed.getLang("advanced.toolbar_focus"), onfocus : 'tinyMCE.getInstanceById(\'' + ed.id + '\').focus();'}, '')); - DOM.setHTML(n, h.join('')); - }, - - _addStatusBar : function(tb, o) { - var n, t = this, ed = t.editor, s = t.settings, r, mf, me, td; - - n = DOM.add(tb, 'tr'); - n = td = DOM.add(n, 'td', {'class' : 'mceStatusbar'}); - n = DOM.add(n, 'div', {id : ed.id + '_path_row', 'role': 'group', 'aria-labelledby': ed.id + '_path_voice'}); - if (s.theme_advanced_path) { - DOM.add(n, 'span', {id: ed.id + '_path_voice'}, ed.translate('advanced.path')); - DOM.add(n, 'span', {}, ': '); - } else { - DOM.add(n, 'span', {}, ' '); - } - - - if (s.theme_advanced_resizing) { - DOM.add(td, 'a', {id : ed.id + '_resize', href : 'javascript:;', onclick : "return false;", 'class' : 'mceResize', tabIndex:"-1"}); - - if (s.theme_advanced_resizing_use_cookie) { - ed.onPostRender.add(function() { - var o = Cookie.getHash("TinyMCE_" + ed.id + "_size"), c = DOM.get(ed.id + '_tbl'); - - if (!o) - return; - - t.resizeTo(o.cw, o.ch); - }); - } - - ed.onPostRender.add(function() { - Event.add(ed.id + '_resize', 'click', function(e) { - e.preventDefault(); - }); - - Event.add(ed.id + '_resize', 'mousedown', function(e) { - var mouseMoveHandler1, mouseMoveHandler2, - mouseUpHandler1, mouseUpHandler2, - startX, startY, startWidth, startHeight, width, height, ifrElm; - - function resizeOnMove(e) { - e.preventDefault(); - - width = startWidth + (e.screenX - startX); - height = startHeight + (e.screenY - startY); - - t.resizeTo(width, height); - }; - - function endResize(e) { - // Stop listening - Event.remove(DOM.doc, 'mousemove', mouseMoveHandler1); - Event.remove(ed.getDoc(), 'mousemove', mouseMoveHandler2); - Event.remove(DOM.doc, 'mouseup', mouseUpHandler1); - Event.remove(ed.getDoc(), 'mouseup', mouseUpHandler2); - - width = startWidth + (e.screenX - startX); - height = startHeight + (e.screenY - startY); - t.resizeTo(width, height, true); - - ed.nodeChanged(); - }; - - e.preventDefault(); - - // Get the current rect size - startX = e.screenX; - startY = e.screenY; - ifrElm = DOM.get(t.editor.id + '_ifr'); - startWidth = width = ifrElm.clientWidth; - startHeight = height = ifrElm.clientHeight; - - // Register envent handlers - mouseMoveHandler1 = Event.add(DOM.doc, 'mousemove', resizeOnMove); - mouseMoveHandler2 = Event.add(ed.getDoc(), 'mousemove', resizeOnMove); - mouseUpHandler1 = Event.add(DOM.doc, 'mouseup', endResize); - mouseUpHandler2 = Event.add(ed.getDoc(), 'mouseup', endResize); - }); - }); - } - - o.deltaHeight -= 21; - n = tb = null; - }, - - _updateUndoStatus : function(ed) { - var cm = ed.controlManager, um = ed.undoManager; - - cm.setDisabled('undo', !um.hasUndo() && !um.typing); - cm.setDisabled('redo', !um.hasRedo()); - }, - - _nodeChanged : function(ed, cm, n, co, ob) { - var t = this, p, de = 0, v, c, s = t.settings, cl, fz, fn, fc, bc, formatNames, matches; - - tinymce.each(t.stateControls, function(c) { - cm.setActive(c, ed.queryCommandState(t.controls[c][1])); - }); - - function getParent(name) { - var i, parents = ob.parents, func = name; - - if (typeof(name) == 'string') { - func = function(node) { - return node.nodeName == name; - }; - } - - for (i = 0; i < parents.length; i++) { - if (func(parents[i])) - return parents[i]; - } - }; - - cm.setActive('visualaid', ed.hasVisual); - t._updateUndoStatus(ed); - cm.setDisabled('outdent', !ed.queryCommandState('Outdent')); - - p = getParent('A'); - if (c = cm.get('link')) { - c.setDisabled((!p && co) || (p && !p.href)); - c.setActive(!!p && (!p.name && !p.id)); - } - - if (c = cm.get('unlink')) { - c.setDisabled(!p && co); - c.setActive(!!p && !p.name && !p.id); - } - - if (c = cm.get('anchor')) { - c.setActive(!co && !!p && (p.name || (p.id && !p.href))); - } - - p = getParent('IMG'); - if (c = cm.get('image')) - c.setActive(!co && !!p && n.className.indexOf('mceItem') == -1); - - if (c = cm.get('styleselect')) { - t._importClasses(); - - formatNames = []; - each(c.items, function(item) { - formatNames.push(item.value); - }); - - matches = ed.formatter.matchAll(formatNames); - c.select(matches[0]); - tinymce.each(matches, function(match, index) { - if (index > 0) { - c.mark(match); - } - }); - } - - if (c = cm.get('formatselect')) { - p = getParent(ed.dom.isBlock); - - if (p) - c.select(p.nodeName.toLowerCase()); - } - - // Find out current fontSize, fontFamily and fontClass - getParent(function(n) { - if (n.nodeName === 'SPAN') { - if (!cl && n.className) - cl = n.className; - } - - if (ed.dom.is(n, s.theme_advanced_font_selector)) { - if (!fz && n.style.fontSize) - fz = n.style.fontSize; - - if (!fn && n.style.fontFamily) - fn = n.style.fontFamily.replace(/[\"\']+/g, '').replace(/^([^,]+).*/, '$1').toLowerCase(); - - if (!fc && n.style.color) - fc = n.style.color; - - if (!bc && n.style.backgroundColor) - bc = n.style.backgroundColor; - } - - return false; - }); - - if (c = cm.get('fontselect')) { - c.select(function(v) { - return v.replace(/^([^,]+).*/, '$1').toLowerCase() == fn; - }); - } - - // Select font size - if (c = cm.get('fontsizeselect')) { - // Use computed style - if (s.theme_advanced_runtime_fontsize && !fz && !cl) - fz = ed.dom.getStyle(n, 'fontSize', true); - - c.select(function(v) { - if (v.fontSize && v.fontSize === fz) - return true; - - if (v['class'] && v['class'] === cl) - return true; - }); - } - - if (s.theme_advanced_show_current_color) { - function updateColor(controlId, color) { - if (c = cm.get(controlId)) { - if (!color) - color = c.settings.default_color; - if (color !== c.value) { - c.displayColor(color); - } - } - } - updateColor('forecolor', fc); - updateColor('backcolor', bc); - } - - if (s.theme_advanced_show_current_color) { - function updateColor(controlId, color) { - if (c = cm.get(controlId)) { - if (!color) - color = c.settings.default_color; - if (color !== c.value) { - c.displayColor(color); - } - } - }; - - updateColor('forecolor', fc); - updateColor('backcolor', bc); - } - - if (s.theme_advanced_path && s.theme_advanced_statusbar_location) { - p = DOM.get(ed.id + '_path') || DOM.add(ed.id + '_path_row', 'span', {id : ed.id + '_path'}); - - if (t.statusKeyboardNavigation) { - t.statusKeyboardNavigation.destroy(); - t.statusKeyboardNavigation = null; - } - - DOM.setHTML(p, ''); - - getParent(function(n) { - var na = n.nodeName.toLowerCase(), u, pi, ti = ''; - - // Ignore non element and bogus/hidden elements - if (n.nodeType != 1 || na === 'br' || n.getAttribute('data-mce-bogus') || DOM.hasClass(n, 'mceItemHidden') || DOM.hasClass(n, 'mceItemRemoved')) - return; - - // Handle prefix - if (tinymce.isIE && n.scopeName !== 'HTML' && n.scopeName) - na = n.scopeName + ':' + na; - - // Remove internal prefix - na = na.replace(/mce\:/g, ''); - - // Handle node name - switch (na) { - case 'b': - na = 'strong'; - break; - - case 'i': - na = 'em'; - break; - - case 'img': - if (v = DOM.getAttrib(n, 'src')) - ti += 'src: ' + v + ' '; - - break; - - case 'a': - if (v = DOM.getAttrib(n, 'name')) { - ti += 'name: ' + v + ' '; - na += '#' + v; - } - - if (v = DOM.getAttrib(n, 'href')) - ti += 'href: ' + v + ' '; - - break; - - case 'font': - if (v = DOM.getAttrib(n, 'face')) - ti += 'font: ' + v + ' '; - - if (v = DOM.getAttrib(n, 'size')) - ti += 'size: ' + v + ' '; - - if (v = DOM.getAttrib(n, 'color')) - ti += 'color: ' + v + ' '; - - break; - - case 'span': - if (v = DOM.getAttrib(n, 'style')) - ti += 'style: ' + v + ' '; - - break; - } - - if (v = DOM.getAttrib(n, 'id')) - ti += 'id: ' + v + ' '; - - if (v = n.className) { - v = v.replace(/\b\s*(webkit|mce|Apple-)\w+\s*\b/g, ''); - - if (v) { - ti += 'class: ' + v + ' '; - - if (ed.dom.isBlock(n) || na == 'img' || na == 'span') - na += '.' + v; - } - } - - na = na.replace(/(html:)/g, ''); - na = {name : na, node : n, title : ti}; - t.onResolveName.dispatch(t, na); - ti = na.title; - na = na.name; - - //u = "javascript:tinymce.EditorManager.get('" + ed.id + "').theme._sel('" + (de++) + "');"; - pi = DOM.create('a', {'href' : "javascript:;", role: 'button', onmousedown : "return false;", title : ti, 'class' : 'mcePath_' + (de++)}, na); - - if (p.hasChildNodes()) { - p.insertBefore(DOM.create('span', {'aria-hidden': 'true'}, '\u00a0\u00bb '), p.firstChild); - p.insertBefore(pi, p.firstChild); - } else - p.appendChild(pi); - }, ed.getBody()); - - if (DOM.select('a', p).length > 0) { - t.statusKeyboardNavigation = new tinymce.ui.KeyboardNavigation({ - root: ed.id + "_path_row", - items: DOM.select('a', p), - excludeFromTabOrder: true, - onCancel: function() { - ed.focus(); - } - }, DOM); - } - } - }, - - // Commands gets called by execCommand - - _sel : function(v) { - this.editor.execCommand('mceSelectNodeDepth', false, v); - }, - - _mceInsertAnchor : function(ui, v) { - var ed = this.editor; - - ed.windowManager.open({ - url : this.url + '/anchor.htm', - width : 320 + parseInt(ed.getLang('advanced.anchor_delta_width', 0)), - height : 90 + parseInt(ed.getLang('advanced.anchor_delta_height', 0)), - inline : true - }, { - theme_url : this.url - }); - }, - - _mceCharMap : function() { - var ed = this.editor; - - ed.windowManager.open({ - url : this.url + '/charmap.htm', - width : 550 + parseInt(ed.getLang('advanced.charmap_delta_width', 0)), - height : 265 + parseInt(ed.getLang('advanced.charmap_delta_height', 0)), - inline : true - }, { - theme_url : this.url - }); - }, - - _mceHelp : function() { - var ed = this.editor; - - ed.windowManager.open({ - url : this.url + '/about.htm', - width : 480, - height : 380, - inline : true - }, { - theme_url : this.url - }); - }, - - _mceShortcuts : function() { - var ed = this.editor; - ed.windowManager.open({ - url: this.url + '/shortcuts.htm', - width: 480, - height: 380, - inline: true - }, { - theme_url: this.url - }); - }, - - _mceColorPicker : function(u, v) { - var ed = this.editor; - - v = v || {}; - - ed.windowManager.open({ - url : this.url + '/color_picker.htm', - width : 375 + parseInt(ed.getLang('advanced.colorpicker_delta_width', 0)), - height : 250 + parseInt(ed.getLang('advanced.colorpicker_delta_height', 0)), - close_previous : false, - inline : true - }, { - input_color : v.color, - func : v.func, - theme_url : this.url - }); - }, - - _mceCodeEditor : function(ui, val) { - var ed = this.editor; - - ed.windowManager.open({ - url : this.url + '/source_editor.htm', - width : parseInt(ed.getParam("theme_advanced_source_editor_width", 720)), - height : parseInt(ed.getParam("theme_advanced_source_editor_height", 580)), - inline : true, - resizable : true, - maximizable : true - }, { - theme_url : this.url - }); - }, - - _mceImage : function(ui, val) { - var ed = this.editor; - - // Internal image object like a flash placeholder - if (ed.dom.getAttrib(ed.selection.getNode(), 'class', '').indexOf('mceItem') != -1) - return; - - ed.windowManager.open({ - url : this.url + '/image.htm', - width : 355 + parseInt(ed.getLang('advanced.image_delta_width', 0)), - height : 275 + parseInt(ed.getLang('advanced.image_delta_height', 0)), - inline : true - }, { - theme_url : this.url - }); - }, - - _mceLink : function(ui, val) { - var ed = this.editor; - - ed.windowManager.open({ - url : this.url + '/link.htm', - width : 310 + parseInt(ed.getLang('advanced.link_delta_width', 0)), - height : 200 + parseInt(ed.getLang('advanced.link_delta_height', 0)), - inline : true - }, { - theme_url : this.url - }); - }, - - _mceNewDocument : function() { - var ed = this.editor; - - ed.windowManager.confirm('advanced.newdocument', function(s) { - if (s) - ed.execCommand('mceSetContent', false, ''); - }); - }, - - _mceForeColor : function() { - var t = this; - - this._mceColorPicker(0, { - color: t.fgColor, - func : function(co) { - t.fgColor = co; - t.editor.execCommand('ForeColor', false, co); - } - }); - }, - - _mceBackColor : function() { - var t = this; - - this._mceColorPicker(0, { - color: t.bgColor, - func : function(co) { - t.bgColor = co; - t.editor.execCommand('HiliteColor', false, co); - } - }); - }, - - _ufirst : function(s) { - return s.substring(0, 1).toUpperCase() + s.substring(1); - } - }); - - tinymce.ThemeManager.add('advanced', tinymce.themes.AdvancedTheme); -}(tinymce)); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/image.htm b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/image.htm deleted file mode 100644 index b8ba729f6f..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/image.htm +++ /dev/null @@ -1,80 +0,0 @@ - - - - {#advanced_dlg.image_title} - - - - - - -
    - - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - - - -
     
    - x -
    -
    -
    - -
    - - -
    -
    - - diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/img/colorpicker.jpg b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/img/colorpicker.jpg deleted file mode 100644 index b1a377aba7..0000000000 Binary files a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/img/colorpicker.jpg and /dev/null differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/img/flash.gif b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/img/flash.gif deleted file mode 100644 index dec3f7c702..0000000000 Binary files a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/img/flash.gif and /dev/null differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/img/icons.gif b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/img/icons.gif deleted file mode 100644 index ca22249018..0000000000 Binary files a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/img/icons.gif and /dev/null differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/img/iframe.gif b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/img/iframe.gif deleted file mode 100644 index 410c7ad084..0000000000 Binary files a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/img/iframe.gif and /dev/null differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/img/pagebreak.gif b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/img/pagebreak.gif deleted file mode 100644 index acdf4085f3..0000000000 Binary files a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/img/pagebreak.gif and /dev/null differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/img/quicktime.gif b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/img/quicktime.gif deleted file mode 100644 index 8f10e7aa6b..0000000000 Binary files a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/img/quicktime.gif and /dev/null differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/img/realmedia.gif b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/img/realmedia.gif deleted file mode 100644 index fdfe0b9ac0..0000000000 Binary files a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/img/realmedia.gif and /dev/null differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/img/shockwave.gif b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/img/shockwave.gif deleted file mode 100644 index 9314d04470..0000000000 Binary files a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/img/shockwave.gif and /dev/null differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/img/trans.gif b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/img/trans.gif deleted file mode 100644 index 388486517f..0000000000 Binary files a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/img/trans.gif and /dev/null differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/img/video.gif b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/img/video.gif deleted file mode 100644 index 3570104077..0000000000 Binary files a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/img/video.gif and /dev/null differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/img/windowsmedia.gif b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/img/windowsmedia.gif deleted file mode 100644 index ab50f2d887..0000000000 Binary files a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/img/windowsmedia.gif and /dev/null differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/js/about.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/js/about.js deleted file mode 100644 index 5b35845761..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/js/about.js +++ /dev/null @@ -1,73 +0,0 @@ -tinyMCEPopup.requireLangPack(); - -function init() { - var ed, tcont; - - tinyMCEPopup.resizeToInnerSize(); - ed = tinyMCEPopup.editor; - - // Give FF some time - window.setTimeout(insertHelpIFrame, 10); - - tcont = document.getElementById('plugintablecontainer'); - document.getElementById('plugins_tab').style.display = 'none'; - - var html = ""; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - - tinymce.each(ed.plugins, function(p, n) { - var info; - - if (!p.getInfo) - return; - - html += ''; - - info = p.getInfo(); - - if (info.infourl != null && info.infourl != '') - html += ''; - else - html += ''; - - if (info.authorurl != null && info.authorurl != '') - html += ''; - else - html += ''; - - html += ''; - html += ''; - - document.getElementById('plugins_tab').style.display = ''; - - }); - - html += ''; - html += '
    ' + ed.getLang('advanced_dlg.about_plugin') + '' + ed.getLang('advanced_dlg.about_author') + '' + ed.getLang('advanced_dlg.about_version') + '
    ' + info.longname + '' + info.longname + '' + info.author + '' + info.author + '' + info.version + '
    '; - - tcont.innerHTML = html; - - tinyMCEPopup.dom.get('version').innerHTML = tinymce.majorVersion + "." + tinymce.minorVersion; - tinyMCEPopup.dom.get('date').innerHTML = tinymce.releaseDate; -} - -function insertHelpIFrame() { - var html; - - if (tinyMCEPopup.getParam('docs_url')) { - html = ''; - document.getElementById('iframecontainer').innerHTML = html; - document.getElementById('help_tab').style.display = 'block'; - document.getElementById('help_tab').setAttribute("aria-hidden", "false"); - } -} - -tinyMCEPopup.onInit.add(init); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/js/anchor.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/js/anchor.js deleted file mode 100644 index 2909a3a4d7..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/js/anchor.js +++ /dev/null @@ -1,56 +0,0 @@ -tinyMCEPopup.requireLangPack(); - -var AnchorDialog = { - init : function(ed) { - var action, elm, f = document.forms[0]; - - this.editor = ed; - elm = ed.dom.getParent(ed.selection.getNode(), 'A'); - v = ed.dom.getAttrib(elm, 'name') || ed.dom.getAttrib(elm, 'id'); - - if (v) { - this.action = 'update'; - f.anchorName.value = v; - } - - f.insert.value = ed.getLang(elm ? 'update' : 'insert'); - }, - - update : function() { - var ed = this.editor, elm, name = document.forms[0].anchorName.value, attribName; - - if (!name || !/^[a-z][a-z0-9\-\_:\.]*$/i.test(name)) { - tinyMCEPopup.alert('advanced_dlg.anchor_invalid'); - return; - } - - tinyMCEPopup.restoreSelection(); - - if (this.action != 'update') - ed.selection.collapse(1); - - var aRule = ed.schema.getElementRule('a'); - if (!aRule || aRule.attributes.name) { - attribName = 'name'; - } else { - attribName = 'id'; - } - - elm = ed.dom.getParent(ed.selection.getNode(), 'A'); - if (elm) { - elm.setAttribute(attribName, name); - elm[attribName] = name; - ed.undoManager.add(); - } else { - // create with zero-sized nbsp so that in Webkit where anchor is on last line by itself caret cannot be placed after it - var attrs = {'class' : 'mceItemAnchor'}; - attrs[attribName] = name; - ed.execCommand('mceInsertContent', 0, ed.dom.createHTML('a', attrs, '\uFEFF')); - ed.nodeChanged(); - } - - tinyMCEPopup.close(); - } -}; - -tinyMCEPopup.onInit.add(AnchorDialog.init, AnchorDialog); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/js/charmap.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/js/charmap.js deleted file mode 100644 index bb1869558c..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/js/charmap.js +++ /dev/null @@ -1,363 +0,0 @@ -/** - * charmap.js - * - * Copyright 2009, Moxiecode Systems AB - * Released under LGPL License. - * - * License: http://tinymce.moxiecode.com/license - * Contributing: http://tinymce.moxiecode.com/contributing - */ - -tinyMCEPopup.requireLangPack(); - -var charmap = [ - [' ', ' ', true, 'no-break space'], - ['&', '&', true, 'ampersand'], - ['"', '"', true, 'quotation mark'], -// finance - ['¢', '¢', true, 'cent sign'], - ['€', '€', true, 'euro sign'], - ['£', '£', true, 'pound sign'], - ['¥', '¥', true, 'yen sign'], -// signs - ['©', '©', true, 'copyright sign'], - ['®', '®', true, 'registered sign'], - ['™', '™', true, 'trade mark sign'], - ['‰', '‰', true, 'per mille sign'], - ['µ', 'µ', true, 'micro sign'], - ['·', '·', true, 'middle dot'], - ['•', '•', true, 'bullet'], - ['…', '…', true, 'three dot leader'], - ['′', '′', true, 'minutes / feet'], - ['″', '″', true, 'seconds / inches'], - ['§', '§', true, 'section sign'], - ['¶', '¶', true, 'paragraph sign'], - ['ß', 'ß', true, 'sharp s / ess-zed'], -// quotations - ['‹', '‹', true, 'single left-pointing angle quotation mark'], - ['›', '›', true, 'single right-pointing angle quotation mark'], - ['«', '«', true, 'left pointing guillemet'], - ['»', '»', true, 'right pointing guillemet'], - ['‘', '‘', true, 'left single quotation mark'], - ['’', '’', true, 'right single quotation mark'], - ['“', '“', true, 'left double quotation mark'], - ['”', '”', true, 'right double quotation mark'], - ['‚', '‚', true, 'single low-9 quotation mark'], - ['„', '„', true, 'double low-9 quotation mark'], - ['<', '<', true, 'less-than sign'], - ['>', '>', true, 'greater-than sign'], - ['≤', '≤', true, 'less-than or equal to'], - ['≥', '≥', true, 'greater-than or equal to'], - ['–', '–', true, 'en dash'], - ['—', '—', true, 'em dash'], - ['¯', '¯', true, 'macron'], - ['‾', '‾', true, 'overline'], - ['¤', '¤', true, 'currency sign'], - ['¦', '¦', true, 'broken bar'], - ['¨', '¨', true, 'diaeresis'], - ['¡', '¡', true, 'inverted exclamation mark'], - ['¿', '¿', true, 'turned question mark'], - ['ˆ', 'ˆ', true, 'circumflex accent'], - ['˜', '˜', true, 'small tilde'], - ['°', '°', true, 'degree sign'], - ['−', '−', true, 'minus sign'], - ['±', '±', true, 'plus-minus sign'], - ['÷', '÷', true, 'division sign'], - ['⁄', '⁄', true, 'fraction slash'], - ['×', '×', true, 'multiplication sign'], - ['¹', '¹', true, 'superscript one'], - ['²', '²', true, 'superscript two'], - ['³', '³', true, 'superscript three'], - ['¼', '¼', true, 'fraction one quarter'], - ['½', '½', true, 'fraction one half'], - ['¾', '¾', true, 'fraction three quarters'], -// math / logical - ['ƒ', 'ƒ', true, 'function / florin'], - ['∫', '∫', true, 'integral'], - ['∑', '∑', true, 'n-ary sumation'], - ['∞', '∞', true, 'infinity'], - ['√', '√', true, 'square root'], - ['∼', '∼', false,'similar to'], - ['≅', '≅', false,'approximately equal to'], - ['≈', '≈', true, 'almost equal to'], - ['≠', '≠', true, 'not equal to'], - ['≡', '≡', true, 'identical to'], - ['∈', '∈', false,'element of'], - ['∉', '∉', false,'not an element of'], - ['∋', '∋', false,'contains as member'], - ['∏', '∏', true, 'n-ary product'], - ['∧', '∧', false,'logical and'], - ['∨', '∨', false,'logical or'], - ['¬', '¬', true, 'not sign'], - ['∩', '∩', true, 'intersection'], - ['∪', '∪', false,'union'], - ['∂', '∂', true, 'partial differential'], - ['∀', '∀', false,'for all'], - ['∃', '∃', false,'there exists'], - ['∅', '∅', false,'diameter'], - ['∇', '∇', false,'backward difference'], - ['∗', '∗', false,'asterisk operator'], - ['∝', '∝', false,'proportional to'], - ['∠', '∠', false,'angle'], -// undefined - ['´', '´', true, 'acute accent'], - ['¸', '¸', true, 'cedilla'], - ['ª', 'ª', true, 'feminine ordinal indicator'], - ['º', 'º', true, 'masculine ordinal indicator'], - ['†', '†', true, 'dagger'], - ['‡', '‡', true, 'double dagger'], -// alphabetical special chars - ['À', 'À', true, 'A - grave'], - ['Á', 'Á', true, 'A - acute'], - ['Â', 'Â', true, 'A - circumflex'], - ['Ã', 'Ã', true, 'A - tilde'], - ['Ä', 'Ä', true, 'A - diaeresis'], - ['Å', 'Å', true, 'A - ring above'], - ['Æ', 'Æ', true, 'ligature AE'], - ['Ç', 'Ç', true, 'C - cedilla'], - ['È', 'È', true, 'E - grave'], - ['É', 'É', true, 'E - acute'], - ['Ê', 'Ê', true, 'E - circumflex'], - ['Ë', 'Ë', true, 'E - diaeresis'], - ['Ì', 'Ì', true, 'I - grave'], - ['Í', 'Í', true, 'I - acute'], - ['Î', 'Î', true, 'I - circumflex'], - ['Ï', 'Ï', true, 'I - diaeresis'], - ['Ð', 'Ð', true, 'ETH'], - ['Ñ', 'Ñ', true, 'N - tilde'], - ['Ò', 'Ò', true, 'O - grave'], - ['Ó', 'Ó', true, 'O - acute'], - ['Ô', 'Ô', true, 'O - circumflex'], - ['Õ', 'Õ', true, 'O - tilde'], - ['Ö', 'Ö', true, 'O - diaeresis'], - ['Ø', 'Ø', true, 'O - slash'], - ['Œ', 'Œ', true, 'ligature OE'], - ['Š', 'Š', true, 'S - caron'], - ['Ù', 'Ù', true, 'U - grave'], - ['Ú', 'Ú', true, 'U - acute'], - ['Û', 'Û', true, 'U - circumflex'], - ['Ü', 'Ü', true, 'U - diaeresis'], - ['Ý', 'Ý', true, 'Y - acute'], - ['Ÿ', 'Ÿ', true, 'Y - diaeresis'], - ['Þ', 'Þ', true, 'THORN'], - ['à', 'à', true, 'a - grave'], - ['á', 'á', true, 'a - acute'], - ['â', 'â', true, 'a - circumflex'], - ['ã', 'ã', true, 'a - tilde'], - ['ä', 'ä', true, 'a - diaeresis'], - ['å', 'å', true, 'a - ring above'], - ['æ', 'æ', true, 'ligature ae'], - ['ç', 'ç', true, 'c - cedilla'], - ['è', 'è', true, 'e - grave'], - ['é', 'é', true, 'e - acute'], - ['ê', 'ê', true, 'e - circumflex'], - ['ë', 'ë', true, 'e - diaeresis'], - ['ì', 'ì', true, 'i - grave'], - ['í', 'í', true, 'i - acute'], - ['î', 'î', true, 'i - circumflex'], - ['ï', 'ï', true, 'i - diaeresis'], - ['ð', 'ð', true, 'eth'], - ['ñ', 'ñ', true, 'n - tilde'], - ['ò', 'ò', true, 'o - grave'], - ['ó', 'ó', true, 'o - acute'], - ['ô', 'ô', true, 'o - circumflex'], - ['õ', 'õ', true, 'o - tilde'], - ['ö', 'ö', true, 'o - diaeresis'], - ['ø', 'ø', true, 'o slash'], - ['œ', 'œ', true, 'ligature oe'], - ['š', 'š', true, 's - caron'], - ['ù', 'ù', true, 'u - grave'], - ['ú', 'ú', true, 'u - acute'], - ['û', 'û', true, 'u - circumflex'], - ['ü', 'ü', true, 'u - diaeresis'], - ['ý', 'ý', true, 'y - acute'], - ['þ', 'þ', true, 'thorn'], - ['ÿ', 'ÿ', true, 'y - diaeresis'], - ['Α', 'Α', true, 'Alpha'], - ['Β', 'Β', true, 'Beta'], - ['Γ', 'Γ', true, 'Gamma'], - ['Δ', 'Δ', true, 'Delta'], - ['Ε', 'Ε', true, 'Epsilon'], - ['Ζ', 'Ζ', true, 'Zeta'], - ['Η', 'Η', true, 'Eta'], - ['Θ', 'Θ', true, 'Theta'], - ['Ι', 'Ι', true, 'Iota'], - ['Κ', 'Κ', true, 'Kappa'], - ['Λ', 'Λ', true, 'Lambda'], - ['Μ', 'Μ', true, 'Mu'], - ['Ν', 'Ν', true, 'Nu'], - ['Ξ', 'Ξ', true, 'Xi'], - ['Ο', 'Ο', true, 'Omicron'], - ['Π', 'Π', true, 'Pi'], - ['Ρ', 'Ρ', true, 'Rho'], - ['Σ', 'Σ', true, 'Sigma'], - ['Τ', 'Τ', true, 'Tau'], - ['Υ', 'Υ', true, 'Upsilon'], - ['Φ', 'Φ', true, 'Phi'], - ['Χ', 'Χ', true, 'Chi'], - ['Ψ', 'Ψ', true, 'Psi'], - ['Ω', 'Ω', true, 'Omega'], - ['α', 'α', true, 'alpha'], - ['β', 'β', true, 'beta'], - ['γ', 'γ', true, 'gamma'], - ['δ', 'δ', true, 'delta'], - ['ε', 'ε', true, 'epsilon'], - ['ζ', 'ζ', true, 'zeta'], - ['η', 'η', true, 'eta'], - ['θ', 'θ', true, 'theta'], - ['ι', 'ι', true, 'iota'], - ['κ', 'κ', true, 'kappa'], - ['λ', 'λ', true, 'lambda'], - ['μ', 'μ', true, 'mu'], - ['ν', 'ν', true, 'nu'], - ['ξ', 'ξ', true, 'xi'], - ['ο', 'ο', true, 'omicron'], - ['π', 'π', true, 'pi'], - ['ρ', 'ρ', true, 'rho'], - ['ς', 'ς', true, 'final sigma'], - ['σ', 'σ', true, 'sigma'], - ['τ', 'τ', true, 'tau'], - ['υ', 'υ', true, 'upsilon'], - ['φ', 'φ', true, 'phi'], - ['χ', 'χ', true, 'chi'], - ['ψ', 'ψ', true, 'psi'], - ['ω', 'ω', true, 'omega'], -// symbols - ['ℵ', 'ℵ', false,'alef symbol'], - ['ϖ', 'ϖ', false,'pi symbol'], - ['ℜ', 'ℜ', false,'real part symbol'], - ['ϑ','ϑ', false,'theta symbol'], - ['ϒ', 'ϒ', false,'upsilon - hook symbol'], - ['℘', '℘', false,'Weierstrass p'], - ['ℑ', 'ℑ', false,'imaginary part'], -// arrows - ['←', '←', true, 'leftwards arrow'], - ['↑', '↑', true, 'upwards arrow'], - ['→', '→', true, 'rightwards arrow'], - ['↓', '↓', true, 'downwards arrow'], - ['↔', '↔', true, 'left right arrow'], - ['↵', '↵', false,'carriage return'], - ['⇐', '⇐', false,'leftwards double arrow'], - ['⇑', '⇑', false,'upwards double arrow'], - ['⇒', '⇒', false,'rightwards double arrow'], - ['⇓', '⇓', false,'downwards double arrow'], - ['⇔', '⇔', false,'left right double arrow'], - ['∴', '∴', false,'therefore'], - ['⊂', '⊂', false,'subset of'], - ['⊃', '⊃', false,'superset of'], - ['⊄', '⊄', false,'not a subset of'], - ['⊆', '⊆', false,'subset of or equal to'], - ['⊇', '⊇', false,'superset of or equal to'], - ['⊕', '⊕', false,'circled plus'], - ['⊗', '⊗', false,'circled times'], - ['⊥', '⊥', false,'perpendicular'], - ['⋅', '⋅', false,'dot operator'], - ['⌈', '⌈', false,'left ceiling'], - ['⌉', '⌉', false,'right ceiling'], - ['⌊', '⌊', false,'left floor'], - ['⌋', '⌋', false,'right floor'], - ['⟨', '〈', false,'left-pointing angle bracket'], - ['⟩', '〉', false,'right-pointing angle bracket'], - ['◊', '◊', true, 'lozenge'], - ['♠', '♠', true, 'black spade suit'], - ['♣', '♣', true, 'black club suit'], - ['♥', '♥', true, 'black heart suit'], - ['♦', '♦', true, 'black diamond suit'], - [' ', ' ', false,'en space'], - [' ', ' ', false,'em space'], - [' ', ' ', false,'thin space'], - ['‌', '‌', false,'zero width non-joiner'], - ['‍', '‍', false,'zero width joiner'], - ['‎', '‎', false,'left-to-right mark'], - ['‏', '‏', false,'right-to-left mark'], - ['­', '­', false,'soft hyphen'] -]; - -tinyMCEPopup.onInit.add(function() { - tinyMCEPopup.dom.setHTML('charmapView', renderCharMapHTML()); - addKeyboardNavigation(); -}); - -function addKeyboardNavigation(){ - var tableElm, cells, settings; - - cells = tinyMCEPopup.dom.select("a.charmaplink", "charmapgroup"); - - settings ={ - root: "charmapgroup", - items: cells - }; - cells[0].tabindex=0; - tinyMCEPopup.dom.addClass(cells[0], "mceFocus"); - if (tinymce.isGecko) { - cells[0].focus(); - } else { - setTimeout(function(){ - cells[0].focus(); - }, 100); - } - tinyMCEPopup.editor.windowManager.createInstance('tinymce.ui.KeyboardNavigation', settings, tinyMCEPopup.dom); -} - -function renderCharMapHTML() { - var charsPerRow = 20, tdWidth=20, tdHeight=20, i; - var html = '
    '+ - ''; - var cols=-1; - - for (i=0; i' - + '' - + charmap[i][1] - + ''; - if ((cols+1) % charsPerRow == 0) - html += ''; - } - } - - if (cols % charsPerRow > 0) { - var padd = charsPerRow - (cols % charsPerRow); - for (var i=0; i '; - } - - html += '
    '; - html = html.replace(/<\/tr>/g, ''); - - return html; -} - -function insertChar(chr) { - tinyMCEPopup.execCommand('mceInsertContent', false, '&#' + chr + ';'); - - // Refocus in window - if (tinyMCEPopup.isWindow) - window.focus(); - - tinyMCEPopup.editor.focus(); - tinyMCEPopup.close(); -} - -function previewChar(codeA, codeB, codeN) { - var elmA = document.getElementById('codeA'); - var elmB = document.getElementById('codeB'); - var elmV = document.getElementById('codeV'); - var elmN = document.getElementById('codeN'); - - if (codeA=='#160;') { - elmV.innerHTML = '__'; - } else { - elmV.innerHTML = '&' + codeA; - } - - elmB.innerHTML = '&' + codeA; - elmA.innerHTML = '&' + codeB; - elmN.innerHTML = codeN; -} diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/js/color_picker.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/js/color_picker.js deleted file mode 100644 index 4ae53ab674..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/js/color_picker.js +++ /dev/null @@ -1,345 +0,0 @@ -tinyMCEPopup.requireLangPack(); - -var detail = 50, strhex = "0123456789abcdef", i, isMouseDown = false, isMouseOver = false; - -var colors = [ - "#000000","#000033","#000066","#000099","#0000cc","#0000ff","#330000","#330033", - "#330066","#330099","#3300cc","#3300ff","#660000","#660033","#660066","#660099", - "#6600cc","#6600ff","#990000","#990033","#990066","#990099","#9900cc","#9900ff", - "#cc0000","#cc0033","#cc0066","#cc0099","#cc00cc","#cc00ff","#ff0000","#ff0033", - "#ff0066","#ff0099","#ff00cc","#ff00ff","#003300","#003333","#003366","#003399", - "#0033cc","#0033ff","#333300","#333333","#333366","#333399","#3333cc","#3333ff", - "#663300","#663333","#663366","#663399","#6633cc","#6633ff","#993300","#993333", - "#993366","#993399","#9933cc","#9933ff","#cc3300","#cc3333","#cc3366","#cc3399", - "#cc33cc","#cc33ff","#ff3300","#ff3333","#ff3366","#ff3399","#ff33cc","#ff33ff", - "#006600","#006633","#006666","#006699","#0066cc","#0066ff","#336600","#336633", - "#336666","#336699","#3366cc","#3366ff","#666600","#666633","#666666","#666699", - "#6666cc","#6666ff","#996600","#996633","#996666","#996699","#9966cc","#9966ff", - "#cc6600","#cc6633","#cc6666","#cc6699","#cc66cc","#cc66ff","#ff6600","#ff6633", - "#ff6666","#ff6699","#ff66cc","#ff66ff","#009900","#009933","#009966","#009999", - "#0099cc","#0099ff","#339900","#339933","#339966","#339999","#3399cc","#3399ff", - "#669900","#669933","#669966","#669999","#6699cc","#6699ff","#999900","#999933", - "#999966","#999999","#9999cc","#9999ff","#cc9900","#cc9933","#cc9966","#cc9999", - "#cc99cc","#cc99ff","#ff9900","#ff9933","#ff9966","#ff9999","#ff99cc","#ff99ff", - "#00cc00","#00cc33","#00cc66","#00cc99","#00cccc","#00ccff","#33cc00","#33cc33", - "#33cc66","#33cc99","#33cccc","#33ccff","#66cc00","#66cc33","#66cc66","#66cc99", - "#66cccc","#66ccff","#99cc00","#99cc33","#99cc66","#99cc99","#99cccc","#99ccff", - "#cccc00","#cccc33","#cccc66","#cccc99","#cccccc","#ccccff","#ffcc00","#ffcc33", - "#ffcc66","#ffcc99","#ffcccc","#ffccff","#00ff00","#00ff33","#00ff66","#00ff99", - "#00ffcc","#00ffff","#33ff00","#33ff33","#33ff66","#33ff99","#33ffcc","#33ffff", - "#66ff00","#66ff33","#66ff66","#66ff99","#66ffcc","#66ffff","#99ff00","#99ff33", - "#99ff66","#99ff99","#99ffcc","#99ffff","#ccff00","#ccff33","#ccff66","#ccff99", - "#ccffcc","#ccffff","#ffff00","#ffff33","#ffff66","#ffff99","#ffffcc","#ffffff" -]; - -var named = { - '#F0F8FF':'Alice Blue','#FAEBD7':'Antique White','#00FFFF':'Aqua','#7FFFD4':'Aquamarine','#F0FFFF':'Azure','#F5F5DC':'Beige', - '#FFE4C4':'Bisque','#000000':'Black','#FFEBCD':'Blanched Almond','#0000FF':'Blue','#8A2BE2':'Blue Violet','#A52A2A':'Brown', - '#DEB887':'Burly Wood','#5F9EA0':'Cadet Blue','#7FFF00':'Chartreuse','#D2691E':'Chocolate','#FF7F50':'Coral','#6495ED':'Cornflower Blue', - '#FFF8DC':'Cornsilk','#DC143C':'Crimson','#00FFFF':'Cyan','#00008B':'Dark Blue','#008B8B':'Dark Cyan','#B8860B':'Dark Golden Rod', - '#A9A9A9':'Dark Gray','#A9A9A9':'Dark Grey','#006400':'Dark Green','#BDB76B':'Dark Khaki','#8B008B':'Dark Magenta','#556B2F':'Dark Olive Green', - '#FF8C00':'Darkorange','#9932CC':'Dark Orchid','#8B0000':'Dark Red','#E9967A':'Dark Salmon','#8FBC8F':'Dark Sea Green','#483D8B':'Dark Slate Blue', - '#2F4F4F':'Dark Slate Gray','#2F4F4F':'Dark Slate Grey','#00CED1':'Dark Turquoise','#9400D3':'Dark Violet','#FF1493':'Deep Pink','#00BFFF':'Deep Sky Blue', - '#696969':'Dim Gray','#696969':'Dim Grey','#1E90FF':'Dodger Blue','#B22222':'Fire Brick','#FFFAF0':'Floral White','#228B22':'Forest Green', - '#FF00FF':'Fuchsia','#DCDCDC':'Gainsboro','#F8F8FF':'Ghost White','#FFD700':'Gold','#DAA520':'Golden Rod','#808080':'Gray','#808080':'Grey', - '#008000':'Green','#ADFF2F':'Green Yellow','#F0FFF0':'Honey Dew','#FF69B4':'Hot Pink','#CD5C5C':'Indian Red','#4B0082':'Indigo','#FFFFF0':'Ivory', - '#F0E68C':'Khaki','#E6E6FA':'Lavender','#FFF0F5':'Lavender Blush','#7CFC00':'Lawn Green','#FFFACD':'Lemon Chiffon','#ADD8E6':'Light Blue', - '#F08080':'Light Coral','#E0FFFF':'Light Cyan','#FAFAD2':'Light Golden Rod Yellow','#D3D3D3':'Light Gray','#D3D3D3':'Light Grey','#90EE90':'Light Green', - '#FFB6C1':'Light Pink','#FFA07A':'Light Salmon','#20B2AA':'Light Sea Green','#87CEFA':'Light Sky Blue','#778899':'Light Slate Gray','#778899':'Light Slate Grey', - '#B0C4DE':'Light Steel Blue','#FFFFE0':'Light Yellow','#00FF00':'Lime','#32CD32':'Lime Green','#FAF0E6':'Linen','#FF00FF':'Magenta','#800000':'Maroon', - '#66CDAA':'Medium Aqua Marine','#0000CD':'Medium Blue','#BA55D3':'Medium Orchid','#9370D8':'Medium Purple','#3CB371':'Medium Sea Green','#7B68EE':'Medium Slate Blue', - '#00FA9A':'Medium Spring Green','#48D1CC':'Medium Turquoise','#C71585':'Medium Violet Red','#191970':'Midnight Blue','#F5FFFA':'Mint Cream','#FFE4E1':'Misty Rose','#FFE4B5':'Moccasin', - '#FFDEAD':'Navajo White','#000080':'Navy','#FDF5E6':'Old Lace','#808000':'Olive','#6B8E23':'Olive Drab','#FFA500':'Orange','#FF4500':'Orange Red','#DA70D6':'Orchid', - '#EEE8AA':'Pale Golden Rod','#98FB98':'Pale Green','#AFEEEE':'Pale Turquoise','#D87093':'Pale Violet Red','#FFEFD5':'Papaya Whip','#FFDAB9':'Peach Puff', - '#CD853F':'Peru','#FFC0CB':'Pink','#DDA0DD':'Plum','#B0E0E6':'Powder Blue','#800080':'Purple','#FF0000':'Red','#BC8F8F':'Rosy Brown','#4169E1':'Royal Blue', - '#8B4513':'Saddle Brown','#FA8072':'Salmon','#F4A460':'Sandy Brown','#2E8B57':'Sea Green','#FFF5EE':'Sea Shell','#A0522D':'Sienna','#C0C0C0':'Silver', - '#87CEEB':'Sky Blue','#6A5ACD':'Slate Blue','#708090':'Slate Gray','#708090':'Slate Grey','#FFFAFA':'Snow','#00FF7F':'Spring Green', - '#4682B4':'Steel Blue','#D2B48C':'Tan','#008080':'Teal','#D8BFD8':'Thistle','#FF6347':'Tomato','#40E0D0':'Turquoise','#EE82EE':'Violet', - '#F5DEB3':'Wheat','#FFFFFF':'White','#F5F5F5':'White Smoke','#FFFF00':'Yellow','#9ACD32':'Yellow Green' -}; - -var namedLookup = {}; - -function init() { - var inputColor = convertRGBToHex(tinyMCEPopup.getWindowArg('input_color')), key, value; - - tinyMCEPopup.resizeToInnerSize(); - - generatePicker(); - generateWebColors(); - generateNamedColors(); - - if (inputColor) { - changeFinalColor(inputColor); - - col = convertHexToRGB(inputColor); - - if (col) - updateLight(col.r, col.g, col.b); - } - - for (key in named) { - value = named[key]; - namedLookup[value.replace(/\s+/, '').toLowerCase()] = key.replace(/#/, '').toLowerCase(); - } -} - -function toHexColor(color) { - var matches, red, green, blue, toInt = parseInt; - - function hex(value) { - value = parseInt(value).toString(16); - - return value.length > 1 ? value : '0' + value; // Padd with leading zero - }; - - color = tinymce.trim(color); - color = color.replace(/^[#]/, '').toLowerCase(); // remove leading '#' - color = namedLookup[color] || color; - - matches = /^rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)$/.exec(color); - - if (matches) { - red = toInt(matches[1]); - green = toInt(matches[2]); - blue = toInt(matches[3]); - } else { - matches = /^([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/.exec(color); - - if (matches) { - red = toInt(matches[1], 16); - green = toInt(matches[2], 16); - blue = toInt(matches[3], 16); - } else { - matches = /^([0-9a-f])([0-9a-f])([0-9a-f])$/.exec(color); - - if (matches) { - red = toInt(matches[1] + matches[1], 16); - green = toInt(matches[2] + matches[2], 16); - blue = toInt(matches[3] + matches[3], 16); - } else { - return ''; - } - } - } - - return '#' + hex(red) + hex(green) + hex(blue); -} - -function insertAction() { - var color = document.getElementById("color").value, f = tinyMCEPopup.getWindowArg('func'); - - var hexColor = toHexColor(color); - - if (hexColor === '') { - var text = tinyMCEPopup.editor.getLang('advanced_dlg.invalid_color_value'); - tinyMCEPopup.alert(text + ': ' + color); - } - else { - tinyMCEPopup.restoreSelection(); - - if (f) - f(hexColor); - - tinyMCEPopup.close(); - } -} - -function showColor(color, name) { - if (name) - document.getElementById("colorname").innerHTML = name; - - document.getElementById("preview").style.backgroundColor = color; - document.getElementById("color").value = color.toUpperCase(); -} - -function convertRGBToHex(col) { - var re = new RegExp("rgb\\s*\\(\\s*([0-9]+).*,\\s*([0-9]+).*,\\s*([0-9]+).*\\)", "gi"); - - if (!col) - return col; - - var rgb = col.replace(re, "$1,$2,$3").split(','); - if (rgb.length == 3) { - r = parseInt(rgb[0]).toString(16); - g = parseInt(rgb[1]).toString(16); - b = parseInt(rgb[2]).toString(16); - - r = r.length == 1 ? '0' + r : r; - g = g.length == 1 ? '0' + g : g; - b = b.length == 1 ? '0' + b : b; - - return "#" + r + g + b; - } - - return col; -} - -function convertHexToRGB(col) { - if (col.indexOf('#') != -1) { - col = col.replace(new RegExp('[^0-9A-F]', 'gi'), ''); - - r = parseInt(col.substring(0, 2), 16); - g = parseInt(col.substring(2, 4), 16); - b = parseInt(col.substring(4, 6), 16); - - return {r : r, g : g, b : b}; - } - - return null; -} - -function generatePicker() { - var el = document.getElementById('light'), h = '', i; - - for (i = 0; i < detail; i++){ - h += '
    '; - } - - el.innerHTML = h; -} - -function generateWebColors() { - var el = document.getElementById('webcolors'), h = '', i; - - if (el.className == 'generated') - return; - - // TODO: VoiceOver doesn't seem to support legend as a label referenced by labelledby. - h += '
    ' - + ''; - - for (i=0; i' - + ''; - if (tinyMCEPopup.editor.forcedHighContrastMode) { - h += ''; - } - h += ''; - h += ''; - if ((i+1) % 18 == 0) - h += ''; - } - - h += '
    '; - - el.innerHTML = h; - el.className = 'generated'; - - paintCanvas(el); - enableKeyboardNavigation(el.firstChild); -} - -function paintCanvas(el) { - tinyMCEPopup.getWin().tinymce.each(tinyMCEPopup.dom.select('canvas.mceColorSwatch', el), function(canvas) { - var context; - if (canvas.getContext && (context = canvas.getContext("2d"))) { - context.fillStyle = canvas.getAttribute('data-color'); - context.fillRect(0, 0, 10, 10); - } - }); -} -function generateNamedColors() { - var el = document.getElementById('namedcolors'), h = '', n, v, i = 0; - - if (el.className == 'generated') - return; - - for (n in named) { - v = named[n]; - h += ''; - if (tinyMCEPopup.editor.forcedHighContrastMode) { - h += ''; - } - h += ''; - h += ''; - i++; - } - - el.innerHTML = h; - el.className = 'generated'; - - paintCanvas(el); - enableKeyboardNavigation(el); -} - -function enableKeyboardNavigation(el) { - tinyMCEPopup.editor.windowManager.createInstance('tinymce.ui.KeyboardNavigation', { - root: el, - items: tinyMCEPopup.dom.select('a', el) - }, tinyMCEPopup.dom); -} - -function dechex(n) { - return strhex.charAt(Math.floor(n / 16)) + strhex.charAt(n % 16); -} - -function computeColor(e) { - var x, y, partWidth, partDetail, imHeight, r, g, b, coef, i, finalCoef, finalR, finalG, finalB, pos = tinyMCEPopup.dom.getPos(e.target); - - x = e.offsetX ? e.offsetX : (e.target ? e.clientX - pos.x : 0); - y = e.offsetY ? e.offsetY : (e.target ? e.clientY - pos.y : 0); - - partWidth = document.getElementById('colors').width / 6; - partDetail = detail / 2; - imHeight = document.getElementById('colors').height; - - r = (x >= 0)*(x < partWidth)*255 + (x >= partWidth)*(x < 2*partWidth)*(2*255 - x * 255 / partWidth) + (x >= 4*partWidth)*(x < 5*partWidth)*(-4*255 + x * 255 / partWidth) + (x >= 5*partWidth)*(x < 6*partWidth)*255; - g = (x >= 0)*(x < partWidth)*(x * 255 / partWidth) + (x >= partWidth)*(x < 3*partWidth)*255 + (x >= 3*partWidth)*(x < 4*partWidth)*(4*255 - x * 255 / partWidth); - b = (x >= 2*partWidth)*(x < 3*partWidth)*(-2*255 + x * 255 / partWidth) + (x >= 3*partWidth)*(x < 5*partWidth)*255 + (x >= 5*partWidth)*(x < 6*partWidth)*(6*255 - x * 255 / partWidth); - - coef = (imHeight - y) / imHeight; - r = 128 + (r - 128) * coef; - g = 128 + (g - 128) * coef; - b = 128 + (b - 128) * coef; - - changeFinalColor('#' + dechex(r) + dechex(g) + dechex(b)); - updateLight(r, g, b); -} - -function updateLight(r, g, b) { - var i, partDetail = detail / 2, finalCoef, finalR, finalG, finalB, color; - - for (i=0; i=0) && (i'); - }, - - init : function() { - var f = document.forms[0], ed = tinyMCEPopup.editor; - - // Setup browse button - document.getElementById('srcbrowsercontainer').innerHTML = getBrowserHTML('srcbrowser','src','image','theme_advanced_image'); - if (isVisible('srcbrowser')) - document.getElementById('src').style.width = '180px'; - - e = ed.selection.getNode(); - - this.fillFileList('image_list', tinyMCEPopup.getParam('external_image_list', 'tinyMCEImageList')); - - if (e.nodeName == 'IMG') { - f.src.value = ed.dom.getAttrib(e, 'src'); - f.alt.value = ed.dom.getAttrib(e, 'alt'); - f.border.value = this.getAttrib(e, 'border'); - f.vspace.value = this.getAttrib(e, 'vspace'); - f.hspace.value = this.getAttrib(e, 'hspace'); - f.width.value = ed.dom.getAttrib(e, 'width'); - f.height.value = ed.dom.getAttrib(e, 'height'); - f.insert.value = ed.getLang('update'); - this.styleVal = ed.dom.getAttrib(e, 'style'); - selectByValue(f, 'image_list', f.src.value); - selectByValue(f, 'align', this.getAttrib(e, 'align')); - this.updateStyle(); - } - }, - - fillFileList : function(id, l) { - var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl; - - l = typeof(l) === 'function' ? l() : window[l]; - - if (l && l.length > 0) { - lst.options[lst.options.length] = new Option('', ''); - - tinymce.each(l, function(o) { - lst.options[lst.options.length] = new Option(o[0], o[1]); - }); - } else - dom.remove(dom.getParent(id, 'tr')); - }, - - update : function() { - var f = document.forms[0], nl = f.elements, ed = tinyMCEPopup.editor, args = {}, el; - - tinyMCEPopup.restoreSelection(); - - if (f.src.value === '') { - if (ed.selection.getNode().nodeName == 'IMG') { - ed.dom.remove(ed.selection.getNode()); - ed.execCommand('mceRepaint'); - } - - tinyMCEPopup.close(); - return; - } - - if (!ed.settings.inline_styles) { - args = tinymce.extend(args, { - vspace : nl.vspace.value, - hspace : nl.hspace.value, - border : nl.border.value, - align : getSelectValue(f, 'align') - }); - } else - args.style = this.styleVal; - - tinymce.extend(args, { - src : f.src.value.replace(/ /g, '%20'), - alt : f.alt.value, - width : f.width.value, - height : f.height.value - }); - - el = ed.selection.getNode(); - - if (el && el.nodeName == 'IMG') { - ed.dom.setAttribs(el, args); - tinyMCEPopup.editor.execCommand('mceRepaint'); - tinyMCEPopup.editor.focus(); - } else { - tinymce.each(args, function(value, name) { - if (value === "") { - delete args[name]; - } - }); - - ed.execCommand('mceInsertContent', false, tinyMCEPopup.editor.dom.createHTML('img', args), {skip_undo : 1}); - ed.undoManager.add(); - } - - tinyMCEPopup.close(); - }, - - updateStyle : function() { - var dom = tinyMCEPopup.dom, st = {}, v, f = document.forms[0]; - - if (tinyMCEPopup.editor.settings.inline_styles) { - tinymce.each(tinyMCEPopup.dom.parseStyle(this.styleVal), function(value, key) { - st[key] = value; - }); - - // Handle align - v = getSelectValue(f, 'align'); - if (v) { - if (v == 'left' || v == 'right') { - st['float'] = v; - delete st['vertical-align']; - } else { - st['vertical-align'] = v; - delete st['float']; - } - } else { - delete st['float']; - delete st['vertical-align']; - } - - // Handle border - v = f.border.value; - if (v || v == '0') { - if (v == '0') - st['border'] = '0'; - else - st['border'] = v + 'px solid black'; - } else - delete st['border']; - - // Handle hspace - v = f.hspace.value; - if (v) { - delete st['margin']; - st['margin-left'] = v + 'px'; - st['margin-right'] = v + 'px'; - } else { - delete st['margin-left']; - delete st['margin-right']; - } - - // Handle vspace - v = f.vspace.value; - if (v) { - delete st['margin']; - st['margin-top'] = v + 'px'; - st['margin-bottom'] = v + 'px'; - } else { - delete st['margin-top']; - delete st['margin-bottom']; - } - - // Merge - st = tinyMCEPopup.dom.parseStyle(dom.serializeStyle(st), 'img'); - this.styleVal = dom.serializeStyle(st, 'img'); - } - }, - - getAttrib : function(e, at) { - var ed = tinyMCEPopup.editor, dom = ed.dom, v, v2; - - if (ed.settings.inline_styles) { - switch (at) { - case 'align': - if (v = dom.getStyle(e, 'float')) - return v; - - if (v = dom.getStyle(e, 'vertical-align')) - return v; - - break; - - case 'hspace': - v = dom.getStyle(e, 'margin-left') - v2 = dom.getStyle(e, 'margin-right'); - if (v && v == v2) - return parseInt(v.replace(/[^0-9]/g, '')); - - break; - - case 'vspace': - v = dom.getStyle(e, 'margin-top') - v2 = dom.getStyle(e, 'margin-bottom'); - if (v && v == v2) - return parseInt(v.replace(/[^0-9]/g, '')); - - break; - - case 'border': - v = 0; - - tinymce.each(['top', 'right', 'bottom', 'left'], function(sv) { - sv = dom.getStyle(e, 'border-' + sv + '-width'); - - // False or not the same as prev - if (!sv || (sv != v && v !== 0)) { - v = 0; - return false; - } - - if (sv) - v = sv; - }); - - if (v) - return parseInt(v.replace(/[^0-9]/g, '')); - - break; - } - } - - if (v = dom.getAttrib(e, at)) - return v; - - return ''; - }, - - resetImageData : function() { - var f = document.forms[0]; - - f.width.value = f.height.value = ""; - }, - - updateImageData : function() { - var f = document.forms[0], t = ImageDialog; - - if (f.width.value == "") - f.width.value = t.preloadImg.width; - - if (f.height.value == "") - f.height.value = t.preloadImg.height; - }, - - getImageData : function() { - var f = document.forms[0]; - - this.preloadImg = new Image(); - this.preloadImg.onload = this.updateImageData; - this.preloadImg.onerror = this.resetImageData; - this.preloadImg.src = tinyMCEPopup.editor.documentBaseURI.toAbsolute(f.src.value); - } -}; - -ImageDialog.preInit(); -tinyMCEPopup.onInit.add(ImageDialog.init, ImageDialog); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/js/link.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/js/link.js deleted file mode 100644 index 8c1d73c502..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/js/link.js +++ /dev/null @@ -1,159 +0,0 @@ -tinyMCEPopup.requireLangPack(); - -var LinkDialog = { - preInit : function() { - var url; - - if (url = tinyMCEPopup.getParam("external_link_list_url")) - document.write(''); - }, - - init : function() { - var f = document.forms[0], ed = tinyMCEPopup.editor; - - // Setup browse button - document.getElementById('hrefbrowsercontainer').innerHTML = getBrowserHTML('hrefbrowser', 'href', 'file', 'theme_advanced_link'); - if (isVisible('hrefbrowser')) - document.getElementById('href').style.width = '180px'; - - this.fillClassList('class_list'); - this.fillFileList('link_list', 'tinyMCELinkList'); - this.fillTargetList('target_list'); - - if (e = ed.dom.getParent(ed.selection.getNode(), 'A')) { - f.href.value = ed.dom.getAttrib(e, 'href'); - f.linktitle.value = ed.dom.getAttrib(e, 'title'); - f.insert.value = ed.getLang('update'); - selectByValue(f, 'link_list', f.href.value); - selectByValue(f, 'target_list', ed.dom.getAttrib(e, 'target')); - selectByValue(f, 'class_list', ed.dom.getAttrib(e, 'class')); - } - }, - - update : function() { - var f = document.forms[0], ed = tinyMCEPopup.editor, e, b, href = f.href.value.replace(/ /g, '%20'); - - tinyMCEPopup.restoreSelection(); - e = ed.dom.getParent(ed.selection.getNode(), 'A'); - - // Remove element if there is no href - if (!f.href.value) { - if (e) { - b = ed.selection.getBookmark(); - ed.dom.remove(e, 1); - ed.selection.moveToBookmark(b); - tinyMCEPopup.execCommand("mceEndUndoLevel"); - tinyMCEPopup.close(); - return; - } - } - - // Create new anchor elements - if (e == null) { - ed.getDoc().execCommand("unlink", false, null); - tinyMCEPopup.execCommand("mceInsertLink", false, "#mce_temp_url#", {skip_undo : 1}); - - tinymce.each(ed.dom.select("a"), function(n) { - if (ed.dom.getAttrib(n, 'href') == '#mce_temp_url#') { - e = n; - - ed.dom.setAttribs(e, { - href : href, - title : f.linktitle.value, - target : f.target_list ? getSelectValue(f, "target_list") : null, - 'class' : f.class_list ? getSelectValue(f, "class_list") : null - }); - } - }); - } else { - ed.dom.setAttribs(e, { - href : href, - title : f.linktitle.value - }); - - if (f.target_list) { - ed.dom.setAttrib(e, 'target', getSelectValue(f, "target_list")); - } - - if (f.class_list) { - ed.dom.setAttrib(e, 'class', getSelectValue(f, "class_list")); - } - } - - // Don't move caret if selection was image - if (e.childNodes.length != 1 || e.firstChild.nodeName != 'IMG') { - ed.focus(); - ed.selection.select(e); - ed.selection.collapse(0); - tinyMCEPopup.storeSelection(); - } - - tinyMCEPopup.execCommand("mceEndUndoLevel"); - tinyMCEPopup.close(); - }, - - checkPrefix : function(n) { - if (n.value && Validator.isEmail(n) && !/^\s*mailto:/i.test(n.value) && confirm(tinyMCEPopup.getLang('advanced_dlg.link_is_email'))) - n.value = 'mailto:' + n.value; - - if (/^\s*www\./i.test(n.value) && confirm(tinyMCEPopup.getLang('advanced_dlg.link_is_external'))) - n.value = 'http://' + n.value; - }, - - fillFileList : function(id, l) { - var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl; - - l = window[l]; - - if (l && l.length > 0) { - lst.options[lst.options.length] = new Option('', ''); - - tinymce.each(l, function(o) { - lst.options[lst.options.length] = new Option(o[0], o[1]); - }); - } else - dom.remove(dom.getParent(id, 'tr')); - }, - - fillClassList : function(id) { - var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl; - - if (v = tinyMCEPopup.getParam('theme_advanced_styles')) { - cl = []; - - tinymce.each(v.split(';'), function(v) { - var p = v.split('='); - - cl.push({'title' : p[0], 'class' : p[1]}); - }); - } else - cl = tinyMCEPopup.editor.dom.getClasses(); - - if (cl.length > 0) { - lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('not_set'), ''); - - tinymce.each(cl, function(o) { - lst.options[lst.options.length] = new Option(o.title || o['class'], o['class']); - }); - } else - dom.remove(dom.getParent(id, 'tr')); - }, - - fillTargetList : function(id) { - var dom = tinyMCEPopup.dom, lst = dom.get(id), v; - - lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('not_set'), ''); - lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('advanced_dlg.link_target_same'), '_self'); - lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('advanced_dlg.link_target_blank'), '_blank'); - - if (v = tinyMCEPopup.getParam('theme_advanced_link_targets')) { - tinymce.each(v.split(','), function(v) { - v = v.split('='); - lst.options[lst.options.length] = new Option(v[0], v[1]); - }); - } - } -}; - -LinkDialog.preInit(); -tinyMCEPopup.onInit.add(LinkDialog.init, LinkDialog); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/js/source_editor.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/js/source_editor.js deleted file mode 100644 index dd5e366fa9..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/js/source_editor.js +++ /dev/null @@ -1,78 +0,0 @@ -tinyMCEPopup.requireLangPack(); -tinyMCEPopup.onInit.add(onLoadInit); - -function saveContent() { - tinyMCEPopup.editor.setContent(document.getElementById('htmlSource').value, {source_view : true}); - tinyMCEPopup.close(); -} - -function onLoadInit() { - tinyMCEPopup.resizeToInnerSize(); - - // Remove Gecko spellchecking - if (tinymce.isGecko) - document.body.spellcheck = tinyMCEPopup.editor.getParam("gecko_spellcheck"); - - document.getElementById('htmlSource').value = tinyMCEPopup.editor.getContent({source_view : true}); - - if (tinyMCEPopup.editor.getParam("theme_advanced_source_editor_wrap", true)) { - turnWrapOn(); - document.getElementById('wraped').checked = true; - } - - resizeInputs(); -} - -function setWrap(val) { - var v, n, s = document.getElementById('htmlSource'); - - s.wrap = val; - - if (!tinymce.isIE) { - v = s.value; - n = s.cloneNode(false); - n.setAttribute("wrap", val); - s.parentNode.replaceChild(n, s); - n.value = v; - } -} - -function setWhiteSpaceCss(value) { - var el = document.getElementById('htmlSource'); - tinymce.DOM.setStyle(el, 'white-space', value); -} - -function turnWrapOff() { - if (tinymce.isWebKit) { - setWhiteSpaceCss('pre'); - } else { - setWrap('off'); - } -} - -function turnWrapOn() { - if (tinymce.isWebKit) { - setWhiteSpaceCss('pre-wrap'); - } else { - setWrap('soft'); - } -} - -function toggleWordWrap(elm) { - if (elm.checked) { - turnWrapOn(); - } else { - turnWrapOff(); - } -} - -function resizeInputs() { - var vp = tinyMCEPopup.dom.getViewPort(window), el; - - el = document.getElementById('htmlSource'); - - if (el) { - el.style.width = (vp.w - 20) + 'px'; - el.style.height = (vp.h - 65) + 'px'; - } -} diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/da.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/da.js deleted file mode 100644 index 3d5fb8b0a1..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/da.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('da.advanced',{"underline_desc":"Understreget (Ctrl+U)","italic_desc":"Kursiv (Ctrl+I)","bold_desc":"Fed (Ctrl+B)",dd:"Definitionsbeskrivelse",dt:"Definitionsterm ",samp:"Kodeeksempel",code:"Kode",blockquote:"Blokcitat",h6:"Overskrift 6",h5:"Overskrift 5",h4:"Overskrift 4",h3:"Overskrift 3",h2:"Overskrift 2",h1:"Overskrift 1",pre:"Pr\u00e6formatteret",address:"Adresse",div:"Div",paragraph:"Afsnit",block:"Format",fontdefault:"Skrifttype","font_size":"Skriftst\u00f8rrelse","style_select":"Typografier","more_colors":"Flere farver","toolbar_focus":"Hop til v\u00e6rkt\u00f8jsknapper - Alt+Q, Skift til redigering - Alt-Z, Skift til element sti - Alt-X",newdocument:"Er du sikker p\u00e5 du vil slette alt indhold?",path:"Sti","clipboard_msg":"Kopier/Klip/inds\u00e6t er ikke muligt i Mozilla og Firefox.\nVil du have mere information om dette emne?","blockquote_desc":"Blokcitat","help_desc":"Hj\u00e6lp","newdocument_desc":"Nyt dokument","image_props_desc":"Billedegenskaber","paste_desc":"Inds\u00e6t","copy_desc":"Kopier","cut_desc":"Klip","anchor_desc":"Inds\u00e6t/rediger anker","visualaid_desc":"Sl\u00e5 hj\u00e6lp/synlige elementer til/fra","charmap_desc":"Inds\u00e6t specialtegn","backcolor_desc":"V\u00e6lg baggrundsfarve","forecolor_desc":"V\u00e6lg tekstfarve","custom1_desc":"Din egen beskrivelse her","removeformat_desc":"Fjern formatering","hr_desc":"Inds\u00e6t horisontal linie","sup_desc":"H\u00e6vet skrift","sub_desc":"S\u00e6nket skrift","code_desc":"Rediger HTML-kilde","cleanup_desc":"Ryd op i uordentlig kode","image_desc":"Inds\u00e6t/rediger billede","unlink_desc":"Fjern link","link_desc":"Inds\u00e6t/rediger link","redo_desc":"Gendan (Ctrl+Y)","undo_desc":"Fortryd (Ctrl+Z)","indent_desc":"\u00d8g indrykning","outdent_desc":"Formindsk indrykning","numlist_desc":"Nummereret punktopstilling","bullist_desc":"Unummereret punktopstilling","justifyfull_desc":"Lige marginer","justifyright_desc":"H\u00f8jrejusteret","justifycenter_desc":"Centreret","justifyleft_desc":"Venstrejusteret","striketrough_desc":"Gennemstreget","help_shortcut":"Tryk ALT-F10 for v\u00e6rkt\u00f8jslinie. Tryk ALT-0 for hj\u00e6lp","rich_text_area":"Tekstomr\u00e5de med formatering","shortcuts_desc":"Hj\u00e6lp til tilg\u00e6ngelighed",toolbar:"V\u00e6rkt\u00f8jslinie","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":""}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/da_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/da_dlg.js deleted file mode 100644 index f3a752cb10..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/da_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('da.advanced_dlg',{"link_list":"Liste over links","link_is_external":"Den URL, der er indtastet, ser ud til at v\u00e6re et eksternt link. Vil du have tilf\u00f8jet det p\u00e5kr\u00e6vede http:// foran?","link_is_email":"Den URL, der er indtastet, ser ud til at v\u00e6re en emailadresse. Vil du have tilf\u00f8jet det p\u00e5kr\u00e6vede mailto: foran?","link_titlefield":"Titel","link_target_blank":"\u00c5ben link i nyt vindue","link_target_same":"\u00c5ben link i samme vindue","link_target":"Target","link_url":"Link URL","link_title":"Inds\u00e6t/rediger link","image_align_right":"H\u00f8jre","image_align_left":"Venstre","image_align_textbottom":"Tekst bunden","image_align_texttop":"Tekst toppen","image_align_bottom":"Bunden","image_align_middle":"Centreret","image_align_top":"Toppen","image_align_baseline":"Grundlinie","image_align":"Justering","image_hspace":"Horisontal afstand","image_vspace":"Vertikal afstand","image_dimensions":"Dimensioner","image_alt":"Billedbeskrivelse","image_list":"Liste over billeder","image_border":"Kant","image_src":"Billede URL","image_title":"Inds\u00e6t/rediger billede","charmap_title":"V\u00e6lg specialtegn","colorpicker_name":"Navn:","colorpicker_color":"Farve:","colorpicker_named_title":"Navngivet farve","colorpicker_named_tab":"Navngivet","colorpicker_palette_title":"Palette-farver","colorpicker_palette_tab":"Palette","colorpicker_picker_title":"Farvev\u00e6lger","colorpicker_picker_tab":"V\u00e6lger","colorpicker_title":"V\u00e6lg en farve","code_wordwrap":"Tekstombrydning","code_title":"HTML kildekode-redigering","anchor_name":"Navn p\u00e5 anker","anchor_title":"Inds\u00e6t/rediger anker","about_loaded":"Indl\u00e6ste udvidelser","about_version":"Version","about_author":"Forfatter","about_plugin":"Udvidelse","about_plugins":"Udvidelser","about_license":"Licens","about_help":"Hj\u00e6lp","about_general":"Om","about_title":"Om TinyMCE","charmap_usage":"Brug venstre og h\u00f8jre piletaster til at navigere","anchor_invalid":"Angiv venligst et gyldigt anker navn.","accessibility_help":"Tilg\u00e6ngeligheds hj\u00e6lp","accessibility_usage_title":"Generel brug","invalid_color_value":"Ugyldig farve v\u00e6rdi"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/de.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/de.js deleted file mode 100644 index 034195ca42..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/de.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('de.advanced',{"underline_desc":"Unterstrichen (Strg+U)","italic_desc":"Kursiv (Strg+I)","bold_desc":"Fett (Strg+B)",dd:"Definitionsbeschreibung",dt:"Definitionsbegriff",samp:"Beispiel",code:"Code",blockquote:"Zitatblock",h6:"\u00dcberschrift 6",h5:"\u00dcberschrift 5",h4:"\u00dcberschrift 4",h3:"\u00dcberschrift 3",h2:"\u00dcberschrift 2",h1:"\u00dcberschrift 1",pre:"Rohdaten",address:"Adresse",div:"Zusammenh\u00e4ngender Bereich",paragraph:"Absatz",block:"Vorlage",fontdefault:"Schriftart","font_size":"Schriftgr\u00f6\u00dfe","style_select":"Format","anchor_delta_width":"13","more_colors":"Weitere Farben","toolbar_focus":"Zur Werkzeugleiste springen: Alt+Q; Zum Editor springen: Alt-Z; Zum Elementpfad springen: Alt-X",newdocument:"Wollen Sie wirklich den ganzen Inhalt l\u00f6schen?",path:"Pfad","clipboard_msg":"Kopieren, Ausschneiden und Einf\u00fcgen sind im Mozilla Firefox nicht m\u00f6glich.\nWollen Sie mehr \u00fcber dieses Problem erfahren?","blockquote_desc":"Zitatblock","help_desc":"Hilfe","newdocument_desc":"Neues Dokument","image_props_desc":"Bildeigenschaften","paste_desc":"Einf\u00fcgen","copy_desc":"Kopieren","cut_desc":"Ausschneiden","anchor_desc":"Anker einf\u00fcgen/ver\u00e4ndern","visualaid_desc":"Hilfslinien und unsichtbare Elemente ein-/ausblenden","charmap_desc":"Sonderzeichen einf\u00fcgen","backcolor_desc":"Hintergrundfarbe","forecolor_desc":"Textfarbe","custom1_desc":"Benutzerdefinierte Beschreibung","removeformat_desc":"Formatierungen zur\u00fccksetzen","hr_desc":"Trennlinie einf\u00fcgen","sup_desc":"Hochgestellt","sub_desc":"Tiefgestellt","code_desc":"HTML-Quellcode bearbeiten","cleanup_desc":"Quellcode aufr\u00e4umen","image_desc":"Bild einf\u00fcgen/ver\u00e4ndern","unlink_desc":"Link entfernen","link_desc":"Link einf\u00fcgen/ver\u00e4ndern","redo_desc":"Wiederholen (Strg+Y)","undo_desc":"R\u00fcckg\u00e4ngig (Strg+Z)","indent_desc":"Einr\u00fccken","outdent_desc":"Ausr\u00fccken","numlist_desc":"Sortierte Liste","bullist_desc":"Unsortierte Liste","justifyfull_desc":"Blocksatz","justifyright_desc":"Rechtsb\u00fcndig","justifycenter_desc":"Zentriert","justifyleft_desc":"Linksb\u00fcndig","striketrough_desc":"Durchgestrichen","help_shortcut":"Dr\u00fccken Sie ALT-F10 f\u00fcr die Toolbar. Dr\u00fccken Sie ALT-0 f\u00fcr Hilfe","rich_text_area":"Rich Text Feld","shortcuts_desc":"Eingabehilfe",toolbar:"Toolbar","anchor_delta_height":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":""}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/de_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/de_dlg.js deleted file mode 100644 index d33ca1dd1d..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/de_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('de.advanced_dlg',{"link_list":"Linkliste","link_is_external":"Diese Adresse scheint ein externer Link zu sein. M\u00f6chten Sie das dazu ben\u00f6tigte \"http://\" voranstellen?","link_is_email":"Diese Adresse scheint eine E-Mail-Adresse zu sein. M\u00f6chten Sie das dazu ben\u00f6tigte \"mailto:\" voranstellen?","link_titlefield":"Titel","link_target_blank":"Neues Fenster \u00f6ffnen","link_target_same":"Im selben Fenster \u00f6ffnen","link_target":"Fenster","link_url":"Adresse","link_title":"Link einf\u00fcgen/ver\u00e4ndern","image_align_right":"Rechts","image_align_left":"Links","image_align_textbottom":"Unten im Text","image_align_texttop":"Oben im Text","image_align_bottom":"Unten","image_align_middle":"Mittig","image_align_top":"Oben","image_align_baseline":"Zeile","image_align":"Ausrichtung","image_hspace":"Horizontaler Abstand","image_vspace":"Vertikaler Abstand","image_dimensions":"Abmessungen","image_alt":"Alternativtext","image_list":"Bilderliste","image_border":"Rahmen","image_src":"Adresse","image_title":"Bild einf\u00fcgen/ver\u00e4ndern","charmap_title":"Sonderzeichen","colorpicker_name":"Name:","colorpicker_color":"Farbe:","colorpicker_named_title":"Benannte Farben","colorpicker_named_tab":"Benannte Farben","colorpicker_palette_title":"Farbpalette","colorpicker_palette_tab":"Palette","colorpicker_picker_title":"Farbwahl","colorpicker_picker_tab":"Farbwahl","colorpicker_title":"Farbe","code_wordwrap":"Automatischer Zeilenumbruch","code_title":"HTML-Quellcode bearbeiten","anchor_name":"Name des Ankers","anchor_title":"Anker einf\u00fcgen/ver\u00e4ndern","about_loaded":"Geladene Plugins","about_version":"Version","about_author":"Urheber","about_plugin":"Plugin","about_plugins":"Plugins","about_license":"Lizenzbedingungen","about_help":"Hilfe","about_general":"\u00dcber","about_title":"\u00dcber TinyMCE","charmap_usage":"Navigation mit linken und rechten Pfeilen.","anchor_invalid":"Bitte geben Sie einen g\u00fcltigen Namen f\u00fcr den Anker ein!","accessibility_help":"Eingabehilfe","accessibility_usage_title":"Allgemeine Verwendung","invalid_color_value":"Ung\u00fcltige Farbangabe"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/en.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/en.js deleted file mode 100644 index 6e58481874..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/en.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('en.advanced',{"underline_desc":"Underline (Ctrl+U)","italic_desc":"Italic (Ctrl+I)","bold_desc":"Bold (Ctrl+B)",dd:"Definition Description",dt:"Definition Term ",samp:"Code Sample",code:"Code",blockquote:"Block Quote",h6:"Heading 6",h5:"Heading 5",h4:"Heading 4",h3:"Heading 3",h2:"Heading 2",h1:"Heading 1",pre:"Preformatted",address:"Address",div:"DIV",paragraph:"Paragraph",block:"Format",fontdefault:"Font Family","font_size":"Font Size","style_select":"Styles","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":"","more_colors":"More Colors...","toolbar_focus":"Jump to tool buttons - Alt+Q, Jump to editor - Alt-Z, Jump to element path - Alt-X",newdocument:"Are you sure you want clear all contents?",path:"Path","clipboard_msg":"Copy/Cut/Paste is not available in Mozilla and Firefox.\nDo you want more information about this issue?","blockquote_desc":"Block Quote","help_desc":"Help","newdocument_desc":"New Document","image_props_desc":"Image Properties","paste_desc":"Paste (Ctrl+V)","copy_desc":"Copy (Ctrl+C)","cut_desc":"Cut (Ctrl+X)","anchor_desc":"Insert/Edit Anchor","visualaid_desc":"show/Hide Guidelines/Invisible Elements","charmap_desc":"Insert Special Character","backcolor_desc":"Select Background Color","forecolor_desc":"Select Text Color","custom1_desc":"Your Custom Description Here","removeformat_desc":"Remove Formatting","hr_desc":"Insert Horizontal Line","sup_desc":"Superscript","sub_desc":"Subscript","code_desc":"Edit HTML Source","cleanup_desc":"Cleanup Messy Code","image_desc":"Insert/Edit Image","unlink_desc":"Unlink","link_desc":"Insert/Edit Link","redo_desc":"Redo (Ctrl+Y)","undo_desc":"Undo (Ctrl+Z)","indent_desc":"Increase Indent","outdent_desc":"Decrease Indent","numlist_desc":"Insert/Remove Numbered List","bullist_desc":"Insert/Remove Bulleted List","justifyfull_desc":"Align Full","justifyright_desc":"Align Right","justifycenter_desc":"Align Center","justifyleft_desc":"Align Left","striketrough_desc":"Strikethrough","help_shortcut":"Press ALT-F10 for toolbar. Press ALT-0 for help","rich_text_area":"Rich Text Area","shortcuts_desc":"Accessability Help",toolbar:"Toolbar"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/en_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/en_dlg.js deleted file mode 100644 index b4bd9225f4..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/en_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('en.advanced_dlg', {"link_list":"Link List","link_is_external":"The URL you entered seems to be an external link. Do you want to add the required http:// prefix?","link_is_email":"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?","link_titlefield":"Title","link_target_blank":"Open Link in a New Window","link_target_same":"Open Link in the Same Window","link_target":"Target","link_url":"Link URL","link_title":"Insert/Edit Link","image_align_right":"Right","image_align_left":"Left","image_align_textbottom":"Text Bottom","image_align_texttop":"Text Top","image_align_bottom":"Bottom","image_align_middle":"Middle","image_align_top":"Top","image_align_baseline":"Baseline","image_align":"Alignment","image_hspace":"Horizontal Space","image_vspace":"Vertical Space","image_dimensions":"Dimensions","image_alt":"Image Description","image_list":"Image List","image_border":"Border","image_src":"Image URL","image_title":"Insert/Edit Image","charmap_title":"Select Special Character", "charmap_usage":"Use left and right arrows to navigate.","colorpicker_name":"Name:","colorpicker_color":"Color:","colorpicker_named_title":"Named Colors","colorpicker_named_tab":"Named","colorpicker_palette_title":"Palette Colors","colorpicker_palette_tab":"Palette","colorpicker_picker_title":"Color Picker","colorpicker_picker_tab":"Picker","colorpicker_title":"Select a Color","code_wordwrap":"Word Wrap","code_title":"HTML Source Editor","anchor_name":"Anchor Name","anchor_title":"Insert/Edit Anchor","about_loaded":"Loaded Plugins","about_version":"Version","about_author":"Author","about_plugin":"Plugin","about_plugins":"Plugins","about_license":"License","about_help":"Help","about_general":"About","about_title":"About TinyMCE","anchor_invalid":"Please specify a valid anchor name.","accessibility_help":"Accessibility Help","accessibility_usage_title":"General Usage","invalid_color_value":"Invalid color value","":""}); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/fi.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/fi.js deleted file mode 100644 index 2edb8f6a4a..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/fi.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('fi.advanced',{"underline_desc":"Alleviivattu (Ctrl+U)","italic_desc":"Kursivoitu (Ctrl+I)","bold_desc":"Lihavoitu (Ctrl+B)",dd:"M\u00e4\u00e4rittelyn kuvaus",dt:"M\u00e4\u00e4rittelyn ehto ",samp:"Koodiesimerkki",code:"Koodi",blockquote:"Pitk\u00e4 lainaus",h6:"Otsikko 6",h5:"Otsikko 5",h4:"Otsikko 4",h3:"Otsikko 3",h2:"Otsikko 2",h1:"Otsikko 1",pre:"Esimuotoiltu (pre)",address:"Osoite",div:"Div",paragraph:"Kappale",block:"Muotoilu",fontdefault:"Kirjasin","font_size":"Kirjasinkoko","style_select":"Tyylit","more_colors":"Enemm\u00e4n v\u00e4rej\u00e4","toolbar_focus":"Siirry ty\u00f6kaluihin - Alt+Q, Siirry tekstieditoriin - Alt-Z, Siirry elementin polkuun - Alt-X",newdocument:"Haluatko varmasti tyhjent\u00e4\u00e4 kaiken sis\u00e4ll\u00f6n?",path:"Polku","clipboard_msg":"Kopioi/Leikkaa/Liit\u00e4 -painikkeet eiv\u00e4t toimi Mozilla ja Firefox -selaimilla. Voit kuitenkin k\u00e4ytt\u00e4\u00e4 n\u00e4pp\u00e4inyhdistelmi\u00e4 kopioimiseen (Ctrl+C), leikkaamiseen (Ctrl+X) ja liitt\u00e4miseen (Ctrl+V). Haluatko lis\u00e4\u00e4 tietoa?","blockquote_desc":"Pitk\u00e4 lainaus","help_desc":"Ohje","newdocument_desc":"Uusi tiedosto","image_props_desc":"Kuvan ominaisuudet","paste_desc":"Liit\u00e4","copy_desc":"Kopioi","cut_desc":"Leikkaa","anchor_desc":"Lis\u00e4\u00e4/Muokkaa ankkuri","visualaid_desc":"Suuntaviivat/N\u00e4kym\u00e4tt\u00f6m\u00e4t elementit","charmap_desc":"Lis\u00e4\u00e4 erikoismerkki","backcolor_desc":"Valitse taustan v\u00e4ri","forecolor_desc":"Valitse tekstin v\u00e4ri","custom1_desc":"Oma kuvauksesi t\u00e4h\u00e4n","removeformat_desc":"Poista muotoilu","hr_desc":"Lis\u00e4\u00e4 vaakasuora viivain","sup_desc":"Yl\u00e4indeksi","sub_desc":"Alaindeksi","code_desc":"Muokkaa HTML-koodia","cleanup_desc":"Siisti sekainen koodi","image_desc":"Lis\u00e4\u00e4/muuta kuva","unlink_desc":"Poista linkki","link_desc":"Lis\u00e4\u00e4/muuta linkki","redo_desc":"Tee uudelleen (Ctrl+Y)","undo_desc":"Peru (Ctrl+Z)","indent_desc":"Sisenn\u00e4","outdent_desc":"Loitonna","numlist_desc":"J\u00e4rjestetty lista","bullist_desc":"J\u00e4rjest\u00e4m\u00e4t\u00f6n lista","justifyfull_desc":"Tasattu","justifyright_desc":"Tasaus oikealle","justifycenter_desc":"Keskitetty","justifyleft_desc":"Tasaus vasemmalle","striketrough_desc":"Yliviivattu","help_shortcut":"Paina ALT F10 n\u00e4hd\u00e4ksesi ty\u00f6kalurivin. Paina ALT-0 n\u00e4hd\u00e4ksesi ohjeen.","rich_text_area":"Rikastettu tekstialue","shortcuts_desc":"Saavutettavuusohje",toolbar:"Ty\u00f6kalurivi","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":""}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/fi_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/fi_dlg.js deleted file mode 100644 index 89c0b0bec7..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/fi_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('fi.advanced_dlg',{"link_list":"Linkkilista","link_is_external":"Antamasi osoite n\u00e4ytt\u00e4\u00e4 johtavan ulkopuoliselle sivustolle. Haluatko lis\u00e4t\u00e4 linkin eteen http://-etuliitteen? (suositus)","link_is_email":"Antamasi osoite n\u00e4ytt\u00e4\u00e4 olevan s\u00e4hk\u00f6postiosoite. Haluatko lis\u00e4t\u00e4 siihen mailto:-etuliitteen?","link_titlefield":"Otsikko","link_target_blank":"Avaa linkki uuteen ikkunaan","link_target_same":"Avaa linkki samassa ikkunassa","link_target":"Kohde","link_url":"Linkin osoite","link_title":"Lis\u00e4\u00e4/muuta linkki","image_align_right":"Oikealle","image_align_left":"Vasemmalle","image_align_textbottom":"Tekstin alaosaan","image_align_texttop":"Tekstin yl\u00e4osaan","image_align_bottom":"Alas","image_align_middle":"Keskelle","image_align_top":"Yl\u00f6s","image_align_baseline":"Tekstin tasossa","image_align":"Tasaus","image_hspace":"Vaakasuuntainen tila","image_vspace":"Pystysuuntainen tila","image_dimensions":"Mitat","image_alt":"Kuvan kuvaus","image_list":"Kuvalista","image_border":"Reunus","image_src":"Kuvan osoite","image_title":"Lis\u00e4\u00e4/muokkaa kuvaa","charmap_title":"Valitse erikoismerkki","colorpicker_name":"Nimi:","colorpicker_color":"V\u00e4ri:","colorpicker_named_title":"Nimetyt v\u00e4rit","colorpicker_named_tab":"Nimetty","colorpicker_palette_title":"V\u00e4ripaletti","colorpicker_palette_tab":"Paletti","colorpicker_picker_title":"V\u00e4rin valitsin","colorpicker_picker_tab":"Valitsin","colorpicker_title":"Valitse v\u00e4ri","code_wordwrap":"Automaattinen rivinvaihto","code_title":"HTML-koodin muokkaus","anchor_name":"Ankkurin nimi","anchor_title":"Liit\u00e4/muokkaa ankkuria","about_loaded":"Ladatut lis\u00e4osat","about_version":"Versio","about_author":"Kirjoittaja","about_plugin":"Lis\u00e4osa","about_plugins":"Lis\u00e4osat","about_license":"Lisenssi","about_help":"Ohje","about_general":"Tietoja","about_title":"Tietoja TinyMCE:st\u00e4","charmap_usage":"K\u00e4yt\u00e4 vasenta ja oikeata nuolin\u00e4pp\u00e4int\u00e4 navigointiin.","anchor_invalid":"Ole hyv\u00e4 ja anna hyv\u00e4ksytty ankkurin nimi.","accessibility_help":"Saavutettavuusohje","accessibility_usage_title":"Yleinen k\u00e4ytt\u00f6","invalid_color_value":"Virheellinen v\u00e4riarvo"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/fr.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/fr.js deleted file mode 100644 index 1e91abbc12..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/fr.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('fr.advanced',{"underline_desc":"Soulign\u00e9 (Ctrl+U)","italic_desc":"Italique (Ctrl+I)","bold_desc":"Gras (Ctrl+B)",dd:"D\u00e9finition du terme",dt:"Terme \u00e0 d\u00e9finir",samp:"Exemple de code",code:"Code",blockquote:"Bloc de citation",h6:"Titre 6",h5:"Titre 5",h4:"Titre 4",h3:"Titre 3",h2:"Titre 2",h1:"Titre 1",pre:"Pr\u00e9format\u00e9",address:"Adresse",div:"Div",paragraph:"Paragraphe",block:"Format",fontdefault:"Police","font_size":"Taille police","style_select":"Styles","more_colors":"Plus de couleurs","toolbar_focus":"Atteindre les boutons de l\'\u00e9diteur - Alt+Q, Aller \u00e0 l\'\u00e9diteur - Alt-Z, Aller au chemin de l\'\u00e9l\u00e9ment - Alt-X",newdocument:"\u00cates-vous s\u00fbr de vouloir effacer l\'int\u00e9gralit\u00e9 du document ?",path:"Chemin","clipboard_msg":"Les fonctions Copier/Couper/Coller ne sont pas valables sur Mozilla et Firefox.\nSouhaitez-vous avoir plus d\'informations sur ce sujet ?","blockquote_desc":"Citation","help_desc":"Aide","newdocument_desc":"Nouveau document","image_props_desc":"Propri\u00e9t\u00e9s de l\'image","paste_desc":"Coller","copy_desc":"Copier","cut_desc":"Couper","anchor_desc":"Ins\u00e9rer / \u00e9diter une ancre","visualaid_desc":"Activer / d\u00e9sactiver les guides et les \u00e9l\u00e9ments invisibles","charmap_desc":"Ins\u00e9rer des caract\u00e8res sp\u00e9ciaux","backcolor_desc":"Choisir la couleur de surlignage","forecolor_desc":"Choisir la couleur du texte","custom1_desc":"Votre description personnalis\u00e9e ici","removeformat_desc":"Supprimer le formatage","hr_desc":"Ins\u00e9rer un trait horizontal","sup_desc":"Exposant","sub_desc":"Indice","code_desc":"\u00c9diter le code source HTML","cleanup_desc":"Nettoyer le code","image_desc":"Ins\u00e9rer / \u00e9diter l\'image","unlink_desc":"Supprimer le lien","link_desc":"Ins\u00e9rer / \u00e9diter le lien","redo_desc":"R\u00e9tablir (Ctrl+Y)","undo_desc":"Annuler (Ctrl+Z)","indent_desc":"Indenter","outdent_desc":"Retirer l\'indentation","numlist_desc":"Liste num\u00e9rot\u00e9e","bullist_desc":"Liste \u00e0 puces","justifyfull_desc":"Justifi\u00e9","justifyright_desc":"Align\u00e9 \u00e0 droite","justifycenter_desc":"Centr\u00e9","justifyleft_desc":"Align\u00e9 \u00e0 gauche","striketrough_desc":"Barr\u00e9","help_shortcut":"Faites ALT-F10 pour acc\u00e9der \u00e0 la barre d\'outils. Faites ALT-0 pour acc\u00e9der \u00e0 l\'aide","rich_text_area":"Zone de texte enrichi","shortcuts_desc":"Aides \u00e0 l\'accessibilit\u00e9",toolbar:"Barre d\'outils","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":""}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/fr_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/fr_dlg.js deleted file mode 100644 index 97b6b5292e..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/fr_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('fr.advanced_dlg',{"link_list":"Liste de liens","link_is_external":"L\'URL que vous avez saisie semble \u00eatre une adresse web externe. Souhaitez-vous ajouter le pr\u00e9fixe \u00ab http:// \u00bb ?","link_is_email":"L\'URL que vous avez saisie semble \u00eatre une adresse e-mail, souhaitez-vous ajouter le pr\u00e9fixe \u00ab mailto: \u00bb ?","link_titlefield":"Titre","link_target_blank":"Ouvrir dans une nouvelle fen\u00eatre","link_target_same":"Ouvrir dans la m\u00eame fen\u00eatre","link_target":"Cible","link_url":"URL du lien","link_title":"Ins\u00e9rer / \u00e9diter un lien","image_align_right":"Droite (flottant)","image_align_left":"Gauche (flottant)","image_align_textbottom":"Texte en bas","image_align_texttop":"Texte en haut","image_align_bottom":"En bas","image_align_middle":"Au milieu","image_align_top":"En haut","image_align_baseline":"Normal","image_align":"Alignement","image_hspace":"Espacement horizontal","image_vspace":"Espacement vertical","image_dimensions":"Dimensions","image_alt":"Description de l\'image","image_list":"Liste d\'images","image_border":"Bordure","image_src":"URL de l\'image","image_title":"Ins\u00e9rer / \u00e9diter une image","charmap_title":"Choisir le caract\u00e8re \u00e0 ins\u00e9rer","colorpicker_name":"Nom :","colorpicker_color":"Couleur :","colorpicker_named_title":"Couleurs nomm\u00e9es","colorpicker_named_tab":"Noms","colorpicker_palette_title":"Couleurs de la palette","colorpicker_palette_tab":"Palette","colorpicker_picker_title":"Nuancier","colorpicker_picker_tab":"Nuancier","colorpicker_title":"Choisir une couleur","code_wordwrap":"Retour \u00e0 la ligne","code_title":"\u00c9diteur de source HTML","anchor_name":"Nom de l\'ancre","anchor_title":"Ins\u00e9rer / \u00e9diter une ancre","about_loaded":"Plugins charg\u00e9s","about_version":"Version","about_author":"Auteur","about_plugin":"Plugin","about_plugins":"Plugins","about_license":"Licence","about_help":"Aide","about_general":"\u00c0 propos","about_title":"\u00c0 propos de TinyMCE","charmap_usage":"Utilisez les fl\u00e8ches gauche et droite pour naviguer.","anchor_invalid":"Veuillez sp\u00e9cifier un nom d\'ancre valide.","accessibility_help":"Aide \u00e0 l\'accessibilit\u00e9","accessibility_usage_title":"Usage g\u00e9n\u00e9ral","invalid_color_value":"Valeur de couleur invalide"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/he.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/he.js deleted file mode 100644 index 2c50a4b61e..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/he.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('he.advanced',{"underline_desc":"\u05e7\u05d5 \u05ea\u05d7\u05ea\u05d5\u05df (Ctrl+U)","italic_desc":"\u05e0\u05d8\u05d5\u05d9 (Ctrl+I)","bold_desc":"\u05de\u05d5\u05d3\u05d2\u05e9 (Ctrl+B)",dd:"\u05d4\u05d2\u05d3\u05e8\u05ea \u05d4\u05de\u05d5\u05e9\u05d2",dt:"\u05de\u05d5\u05e9\u05d2",samp:"\u05d3\u05d5\u05d2\u05de\u05ea \u05e7\u05d5\u05d3",code:"\u05e7\u05d5\u05d3",blockquote:"\u05e6\u05d9\u05d8\u05d5\u05d8 \u05e7\u05d8\u05e2",h6:"\u05db\u05d5\u05ea\u05e8\u05ea 6",h5:"\u05db\u05d5\u05ea\u05e8\u05ea 5",h4:"\u05db\u05d5\u05ea\u05e8\u05ea 4",h3:"\u05db\u05d5\u05ea\u05e8\u05ea 3",h2:"\u05db\u05d5\u05ea\u05e8\u05ea 2",h1:"\u05db\u05d5\u05ea\u05e8\u05ea 1",pre:"Preformatted",address:"\u05db\u05ea\u05d5\u05d1\u05ea",div:"Div",paragraph:"\u05e4\u05e1\u05e7\u05d4",block:"\u05e2\u05d9\u05e6\u05d5\u05d1",fontdefault:"\u05d2\u05d5\u05e4\u05df","font_size":"\u05d2\u05d5\u05d3\u05dc \u05d2\u05d5\u05e4\u05df","style_select":"\u05e1\u05d2\u05e0\u05d5\u05e0\u05d5\u05ea","more_colors":"\u05e2\u05d5\u05d3 \u05e6\u05d1\u05e2\u05d9\u05dd","toolbar_focus":"\u05d4\u05e2\u05d1\u05e8\u05d4 \u05dc\u05e1\u05e8\u05d2\u05dc \u05d4\u05db\u05dc\u05d9\u05dd - Alt+Q, \u05d4\u05e2\u05d1\u05e8\u05d4 \u05dc\u05de\u05e2\u05d1\u05d3 \u05ea\u05de\u05dc\u05d9\u05dc\u05d9\u05dd - Alt-Z, \u05d4\u05e2\u05d1\u05e8\u05d4 \u05dc\u05e0\u05ea\u05d9\u05d1 \u05d4\u05d0\u05dc\u05de\u05d8\u05d9\u05dd - Alt-X",newdocument:"\u05d4\u05d0\u05dd \u05d1\u05e8\u05e6\u05d5\u05e0\u05da \u05dc\u05de\u05d7\u05d5\u05e7 \u05d0\u05ea \u05db\u05dc \u05d4\u05ea\u05d5\u05db\u05df?",path:"path","clipboard_msg":"\u05d4\u05e2\u05ea\u05e7/\u05d2\u05d6\u05d5\u05e8/\u05d4\u05d3\u05d1\u05e7 \u05dc\u05d0 \u05d6\u05de\u05d9\u05e0\u05d9\u05dd \u05d1 Mozilla \u05d5\u05d1-Firefox.\n \u05d4\u05d0\u05dd \u05d1\u05e8\u05e6\u05d5\u05e0\u05da \u05dc\u05e7\u05d1\u05dc \u05de\u05d9\u05d3\u05e2 \u05e0\u05d5\u05e1\u05e3 \u05e2\u05dc \u05d4\u05e0\u05d5\u05e9\u05d0?","blockquote_desc":"\u05e6\u05d9\u05d8\u05d5\u05d8","help_desc":"\u05e2\u05d6\u05e8\u05d4","newdocument_desc":"\u05de\u05e1\u05de\u05da \u05d7\u05d3\u05e9","image_props_desc":"\u05de\u05d0\u05e4\u05d9\u05d9\u05e0\u05d9 \u05d4\u05ea\u05de\u05d5\u05e0\u05d4","paste_desc":"\u05d4\u05d3\u05d1\u05e7\u05d4","copy_desc":"\u05d4\u05e2\u05ea\u05e7\u05d4","cut_desc":"\u05d2\u05d6\u05d9\u05e8\u05d4","anchor_desc":"\u05d4\u05d5\u05e1\u05e4\u05ea/\u05e2\u05e8\u05d9\u05db\u05ea \u05e1\u05d9\u05de\u05e0\u05d9\u05d4","visualaid_desc":"\u05d4\u05e6\u05d2\u05d4 \u05d0\u05d5 \u05d4\u05e1\u05ea\u05e8\u05d4 \u05e9\u05dc \u05e1\u05d9\u05de\u05d5\u05e0\u05d9 \u05e2\u05d9\u05e6\u05d5\u05d1","charmap_desc":"\u05d4\u05d5\u05e1\u05e4\u05ea \u05e1\u05d9\u05de\u05df","backcolor_desc":"\u05d1\u05d7\u05d9\u05e8\u05ea \u05e6\u05d1\u05e2 \u05e8\u05e7\u05e2","forecolor_desc":"\u05d1\u05d7\u05d9\u05e8\u05ea \u05e6\u05d1\u05e2 \u05d2\u05d5\u05e4\u05df","custom1_desc":"\u05d4\u05ea\u05d0\u05d5\u05e8 \u05e9\u05dc\u05da \u05db\u05d0\u05d5","removeformat_desc":"\u05d4\u05e1\u05e8\u05ea \u05e2\u05d9\u05e6\u05d5\u05d1","hr_desc":"\u05d4\u05d5\u05e1\u05e4\u05ea \u05e7\u05d5 \u05de\u05e4\u05e8\u05d9\u05d3","sup_desc":"\u05db\u05ea\u05d1 \u05ea\u05d7\u05ea\u05d9","sub_desc":"\u05db\u05ea\u05d1 \u05e2\u05d9\u05dc\u05d9","code_desc":"\u05e2\u05e8\u05d9\u05db\u05ea \u05e7\u05d5\u05d3 HTML","cleanup_desc":"\u05e0\u05d9\u05e7\u05d5\u05d9 \u05e7\u05d5\u05d3","image_desc":"\u05d4\u05d5\u05e1\u05e4\u05d4/\u05e2\u05e8\u05d9\u05db\u05ea \u05d3\u05e3 \u05ea\u05de\u05d5\u05e0\u05d4","unlink_desc":"\u05d4\u05e1\u05e8\u05ea \u05e7\u05d9\u05e9\u05d5\u05e8","link_desc":"\u05d4\u05d5\u05e1\u05e4\u05ea/\u05e2\u05e8\u05d9\u05db\u05ea \u05e7\u05d9\u05e9\u05d5\u05e8","redo_desc":"\u05d7\u05d6\u05e8\u05d4 \u05e2\u05dc \u05e4\u05e2\u05d5\u05dc\u05d4 (Ctrl+Y)","undo_desc":"\u05d1\u05d9\u05d8\u05d5\u05dc \u05e4\u05e2\u05d5\u05dc\u05d4 (Ctrl+Z)","indent_desc":"\u05d4\u05e7\u05d8\u05e0\u05ea \u05db\u05e0\u05d9\u05e1\u05d4","outdent_desc":"\u05d4\u05d2\u05d3\u05dc\u05ea \u05db\u05e0\u05d9\u05e1\u05d4","numlist_desc":"\u05de\u05e1\u05e4\u05d5\u05e8","bullist_desc":"\u05ea\u05d1\u05dc\u05d9\u05d8\u05d9\u05dd","justifyfull_desc":"\u05d9\u05d9\u05e9\u05d5\u05e8 \u05dc\u05e9\u05e0\u05d9 \u05d4\u05e6\u05d3\u05d3\u05d9\u05dd","justifyright_desc":"\u05d9\u05d9\u05e9\u05d5\u05e8 \u05d8\u05e7\u05e1\u05d8 \u05dc\u05d9\u05de\u05d9\u05df","justifycenter_desc":"\u05de\u05d9\u05e8\u05db\u05d5\u05d6 \u05d8\u05e7\u05e1\u05d8","justifyleft_desc":"\u05d9\u05d9\u05e9\u05d5\u05e8 \u05d8\u05e7\u05e1\u05d8 \u05dc\u05e9\u05de\u05d0\u05dc","striketrough_desc":"\u05e7\u05d5 \u05d7\u05d5\u05e6\u05d4","help_shortcut":"\u05dc\u05d7\u05e6/\u05d9 ALT-F10 \u05dc\u05e1\u05e8\u05d2\u05dc \u05d4\u05db\u05dc\u05d9\u05dd. \u05dc\u05d7\u05e6/\u05d9 ALT-0 \u05dc\u05e2\u05d6\u05e8\u05d4","rich_text_area":"\u05d0\u05d6\u05d5\u05e8 \u05e2\u05e8\u05d9\u05db\u05ea \u05d8\u05e7\u05e1\u05d8 \u05e2\u05e9\u05d9\u05e8","shortcuts_desc":"\u05e2\u05d6\u05e8\u05ea \u05d2\u05d9\u05e9\u05d4",toolbar:"\u05e1\u05e8\u05d2\u05dc \u05db\u05dc\u05d9\u05dd","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":""}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/he_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/he_dlg.js deleted file mode 100644 index c27a31a22e..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/he_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('he.advanced_dlg',{"link_list":"\u05e8\u05e9\u05d9\u05de\u05ea \u05e7\u05d9\u05e9\u05d5\u05e8\u05d9\u05dd","link_is_external":"\u05db\u05ea\u05d5\u05d1\u05ea \u05d4-URL \u05e9\u05d4\u05d5\u05db\u05e0\u05e1\u05d4 \u05d4\u05d9\u05d0 \u05db\u05db\u05dc \u05d4\u05e0\u05e8\u05d0\u05d4 \u05e7\u05d9\u05e9\u05d5\u05e8 \u05d7\u05d9\u05e6\u05d5\u05e0\u05d9 \u05d4\u05d0\u05dd \u05d1\u05e8\u05e6\u05d5\u05e0\u05da \u05dc\u05d4\u05d5\u05e1\u05d9\u05e3 \u05d0\u05ea \u05d4\u05e7\u05d9\u05d3\u05d5\u05de\u05ea http:// \u05d4\u05e0\u05d3\u05e8\u05e9\u05ea?","link_is_email":"\u05db\u05ea\u05d5\u05d1\u05ea \u05d4-URL \u05e9\u05d4\u05d5\u05db\u05e0\u05e1\u05d4 \u05d4\u05d9\u05d0 \u05db\u05db\u05dc \u05d4\u05e0\u05e8\u05d0\u05d4 \u05db\u05ea\u05d5\u05d1\u05ea \u05de\u05d9\u05d9\u05dc \u05d4\u05d0\u05dd \u05d1\u05e8\u05e6\u05d5\u05e0\u05da \u05dc\u05d4\u05d5\u05e1\u05d9\u05e3 \u05d0\u05ea \u05d4\u05e7\u05d9\u05d3\u05d5\u05de\u05ea MAILTO \u05d4\u05e0\u05d3\u05e8\u05e9\u05ea?","link_titlefield":"\u05db\u05d5\u05ea\u05e8\u05ea","link_target_blank":"\u05e4\u05ea\u05d7 \u05e7\u05d9\u05e9\u05d5\u05e8 \u05d1\u05d7\u05dc\u05d5\u05df \u05d7\u05d3\u05e9","link_target_same":"\u05e4\u05ea\u05d7 \u05e7\u05d9\u05e9\u05d5\u05e8 \u05d1\u05d0\u05d5\u05ea\u05d5 \u05d7\u05dc\u05d5\u05df","link_target":"\u05d9\u05e2\u05d3","link_url":"\u05db\u05ea\u05d5\u05d1\u05ea \u05d4\u05e7\u05d9\u05e9\u05d5\u05e8","link_title":"\u05d4\u05d5\u05e1\u05e4\u05d4/\u05e2\u05e8\u05d9\u05db\u05ea \u05e7\u05d9\u05e9\u05d5\u05e8","image_align_right":"\u05d9\u05de\u05d9\u05df","image_align_left":"\u05e9\u05de\u05d0\u05dc","image_align_textbottom":"\u05e7\u05e6\u05d4 \u05d4\u05ea\u05d7\u05ea\u05d5\u05df \u05e9\u05dc \u05d4\u05d8\u05e7\u05e1\u05d8","image_align_texttop":"\u05e7\u05e6\u05d4 \u05d4\u05e2\u05dc\u05d9\u05d5\u05df \u05e9\u05dc \u05d4\u05d8\u05e7\u05e1\u05d8","image_align_bottom":"\u05e7\u05e6\u05d4 \u05d4\u05ea\u05d7\u05ea\u05d5\u05df","image_align_middle":"\u05d0\u05de\u05e6\u05e2","image_align_top":"\u05e7\u05e6\u05d4 \u05d4\u05e2\u05dc\u05d9\u05d5\u05df","image_align_baseline":"\u05e7\u05d5 \u05d4\u05d4\u05ea\u05d7\u05dc\u05d4","image_align":"\u05d9\u05d9\u05e9\u05d5\u05e8","image_hspace":"\u05e8\u05d5\u05d5\u05d7 \u05d0\u05d5\u05e4\u05e7\u05d9","image_vspace":"\u05e8\u05d5\u05d5\u05d7 \u05d0\u05e0\u05db\u05d9","image_dimensions":"\u05d2\u05d5\u05d3\u05dc","image_alt":"\u05ea\u05d9\u05d0\u05d5\u05e8","image_list":"\u05e8\u05e9\u05d9\u05de\u05d4","image_border":"\u05d2\u05d1\u05d5\u05dc","image_src":"\u05db\u05ea\u05d5\u05d1\u05ea:","image_title":"\u05d4\u05d5\u05e1\u05e4\u05d4/\u05e2\u05e8\u05d9\u05db\u05ea \u05ea\u05de\u05d5\u05e0\u05d4","charmap_title":"\u05d1\u05d7\u05d9\u05e8\u05ea \u05e1\u05d9\u05de\u05df","colorpicker_name":"\u05e9\u05dd:","colorpicker_color":"\u05e6\u05d1\u05e2:","colorpicker_named_title":"\u05e6\u05d1\u05e2\u05d9\u05dd \u05d1\u05e2\u05dc\u05d9 \u05e9\u05de\u05d5\u05ea","colorpicker_named_tab":"\u05e6\u05d1\u05e2\u05d9\u05dd \u05d1\u05e2\u05dc\u05d9 \u05e9\u05de\u05d5\u05ea","colorpicker_palette_title":"\u05dc\u05d5\u05d7 \u05e6\u05d1\u05e2\u05d9\u05dd","colorpicker_palette_tab":"\u05dc\u05d5\u05d7 \u05e6\u05d1\u05e2\u05d9\u05dd","colorpicker_picker_title":"\u05d1\u05d5\u05e8\u05e8 \u05d4\u05e6\u05d1\u05e2\u05d9\u05dd","colorpicker_picker_tab":"\u05d1\u05d5\u05e8\u05e8","colorpicker_title":"\u05d1\u05d7\u05d9\u05e8\u05ea \u05e6\u05d1\u05e2","code_wordwrap":"\u05d2\u05dc\u05d9\u05e9\u05ea \u05d8\u05e7\u05e1\u05d8","code_title":"\u05e2\u05d5\u05e8\u05da \u05d4-HTML","anchor_name":"\u05e9\u05dd \u05d4\u05e1\u05d9\u05de\u05e0\u05d9\u05d4","anchor_title":"\u05d4\u05d5\u05e1\u05e4\u05d4/\u05e2\u05e8\u05d9\u05db\u05ea \u05e1\u05d9\u05de\u05e0\u05d9\u05d4","about_loaded":"\u05ea\u05d5\u05e1\u05e4\u05d5\u05ea \u05e4\u05e2\u05d9\u05dc\u05d5\u05ea","about_version":"\u05d2\u05d9\u05e8\u05e1\u05d4","about_author":"\u05d9\u05d5\u05e6\u05e8","about_plugin":"\u05ea\u05d5\u05e1\u05e4\u05ea","about_plugins":"\u05ea\u05d5\u05e1\u05e4\u05d5\u05ea","about_license":"\u05e8\u05e9\u05d9\u05d5\u05df","about_help":"\u05e2\u05d6\u05e8\u05d4","about_general":"\u05d0\u05d5\u05d3\u05d5\u05ea","about_title":"\u05d0\u05d5\u05d3\u05d5\u05ea TinyMCE","charmap_usage":"\u05d4\u05e9\u05ea\u05de\u05e9/\u05d9 \u05d1\u05d7\u05d9\u05e6\u05d9\u05dd \u05dc\u05e0\u05d9\u05d5\u05d5\u05d8 \u05d9\u05de\u05d9\u05e0\u05d4 \u05d5\u05e9\u05de\u05d0\u05dc\u05d4","anchor_invalid":"\u05e0\u05d0 \u05dc\u05e6\u05d9\u05d9\u05df \u05e9\u05dd \u05d7\u05d5\u05e7\u05d9","accessibility_help":"\u05e2\u05d6\u05e8\u05d4 \u05d1\u05e0\u05d2\u05d9\u05e9\u05d5\u05ea","accessibility_usage_title":"\u05e9\u05d9\u05de\u05d5\u05e9 \u05db\u05dc\u05dc\u05d9","invalid_color_value":"\u05e2\u05e8\u05da \u05d4\u05e6\u05d1\u05e2 \u05dc\u05d0 \u05ea\u05e7\u05d9\u05df"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/it.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/it.js deleted file mode 100644 index af84c79db9..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/it.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('it.advanced',{"underline_desc":"Sottolineato (Ctrl+U)","italic_desc":"Corsivo (Ctrl+I)","bold_desc":"Grassetto (Ctrl+B)",dd:"Descrizione definizione",dt:"Termine definizione",samp:"Esempio codice",code:"Codice",blockquote:"Testo quotato",h6:"Intestazione 6",h5:"Intestazione 5",h4:"Intestazione 4",h3:"Intestazione 3",h2:"Intestazione 2",h1:"Intestazione 1",pre:"Preformattato",address:"Indirizzo",div:"Div",paragraph:"Paragrafo",block:"Formato",fontdefault:"Famiglia carattere","font_size":"Grandezza carattere","style_select":"Stili","anchor_delta_height":"anchor_delta_height","anchor_delta_width":"anchor_delta_width","charmap_delta_height":"charmap_delta_height","charmap_delta_width":"charmap_delta_width","colorpicker_delta_height":"colorpicker_delta_height","colorpicker_delta_width":"colorpicker_delta_width","link_delta_height":"link_delta_height","link_delta_width":"link_delta_width","image_delta_height":"image_delta_height","image_delta_width":"image_delta_width","more_colors":"Colori aggiuntivi","toolbar_focus":"Vai ai pulsanti strumento - Alt+Q, Vai all\'editor - Alt-Z, Vai al percorso dell\'elemento - Alt-X",newdocument:"Sei sicuro di voler cancellare tutti i contenuti?",path:"Percorso","clipboard_msg":"Copia/Taglia/Incolla non \u00e8 disponibile in Mozilla e Firefox..\nSi desidera avere maggiori informazioni su questo problema?","blockquote_desc":"Testo quotato","help_desc":"Aiuto","newdocument_desc":"Nuovo documento","image_props_desc":"Propriet\u00e0 immagine","paste_desc":"Incolla","copy_desc":"Copia","cut_desc":"Taglia","anchor_desc":"Inserisci/modifica ancora","visualaid_desc":"Mostra/nascondi linee guida/elementi invisibili","charmap_desc":"Inserisci carattere speciale","backcolor_desc":"Seleziona colore sfondo","forecolor_desc":"Seleziona colore testo","custom1_desc":"La tua descrizione personalizzata qui","removeformat_desc":"Rimuovi formattazione","hr_desc":"Inserisci riga orizzontale","sup_desc":"Apice","sub_desc":"Pedice","code_desc":"Modifica sorgente HTML","cleanup_desc":"Pulisci codice disordinato","image_desc":"Inserisci/modifica immagine","unlink_desc":"Togli collegamento","link_desc":"Inserisci/modifica collegamento","redo_desc":"Ripristina (Ctrl+Y)","undo_desc":"Annulla (Ctrl+Z)","indent_desc":"Sposta verso interno","outdent_desc":"Sposta verso esterno","numlist_desc":"Lista ordinata","bullist_desc":"Lista non ordinata","justifyfull_desc":"Giustifica","justifyright_desc":"Allinea a destra","justifycenter_desc":"Centra","justifyleft_desc":"Allinea a sinistra","striketrough_desc":"Barrato","help_shortcut":"Premi ALT-F10 Per la barra degli strumenti. Premi ALT-0 per l\'aiuto","rich_text_area":"Rich Text Area","shortcuts_desc":"Aiuto accessibilit\u00e0",toolbar:"Barra degli strumenti"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/it_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/it_dlg.js deleted file mode 100644 index 9fc5380c4c..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/it_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('it.advanced_dlg',{"link_list":"Lista link","link_is_external":"L\'URL inserito sembra essere un link esterno. Aggiungere il necessario prefisso http:// ?","link_is_email":"L\'URL inserito sembra essere un indirizzo email. Aggiungere il necessario prefisso mailto: ?","link_titlefield":"Titolo","link_target_blank":"Apri link in una nuova finestra","link_target_same":"Apri link nella stessa finestra","link_target":"Target","link_url":"URL link","link_title":"Inserisci/modifica collegamento","image_align_right":"A destra","image_align_left":"A sinistra","image_align_textbottom":"In basso al testo","image_align_texttop":"In alto al testo","image_align_bottom":"In basso","image_align_middle":"In mezzo","image_align_top":"In alto","image_align_baseline":"Alla base","image_align":"Allineamento","image_hspace":"Spaziatura orizz.","image_vspace":"Spaziatura vert.","image_dimensions":"Dimensioni","image_alt":"Descrizione","image_list":"Lista immagini","image_border":"Bordo","image_src":"URL immagine","image_title":"Inserisci/modifica immagine","charmap_title":"Seleziona carattere speciale","colorpicker_name":"Nome:","colorpicker_color":"Colore:","colorpicker_named_title":"Colori per nome","colorpicker_named_tab":"Per nome","colorpicker_palette_title":"Tavolozza dei colori","colorpicker_palette_tab":"Tavolozza","colorpicker_picker_title":"Selettore colori","colorpicker_picker_tab":"Selettore","colorpicker_title":"Seleziona un colore","code_wordwrap":"A capo automatico","code_title":"Editor sorgente HTML","anchor_name":"Nome ancora","anchor_title":"Inserisci/modifica ancora","about_loaded":"Plugin caricati","about_version":"Versione","about_author":"Autore","about_plugin":"Plugin","about_plugins":"Plugins","about_license":"Licenza","about_help":"Aiuto","about_general":"Informazioni","about_title":"Informazioni su TinyMCE","charmap_usage":"Utilizza le freccie sinistra e destra per navigare.","anchor_invalid":"Specificare un nome di ancora valido.","accessibility_help":"Guida accessibilit\u00e0","accessibility_usage_title":"Uso generale","invalid_color_value":"Colore non valido"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/ja.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/ja.js deleted file mode 100644 index f5533c5488..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/ja.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('ja.advanced',{"underline_desc":"\u4e0b\u7dda (Ctrl+U)","italic_desc":"\u659c\u4f53 (Ctrl+I)","bold_desc":"\u592a\u5b57 (Ctrl+B)",dd:"\u8a9e\u53e5\u306e\u8aac\u660e",dt:"\u8a9e\u53e5\u306e\u5b9a\u7fa9",samp:"\u30b3\u30fc\u30c9\u306e\u4f8b",code:"\u30b3\u30fc\u30c9",blockquote:"\u5f15\u7528",h6:"\u898b\u51fa\u30576",h5:"\u898b\u51fa\u30575",h4:"\u898b\u51fa\u30574",h3:"\u898b\u51fa\u30573",h2:"\u898b\u51fa\u30572",h1:"\u898b\u51fa\u30571",pre:"\u6574\u5f62\u6e08\u307f",address:"\u4f4f\u6240",div:"div\u8981\u7d20",paragraph:"\u6bb5\u843d",block:"\u66f8\u5f0f",fontdefault:"\u30d5\u30a9\u30f3\u30c8","font_size":"\u30d5\u30a9\u30f3\u30c8\u306e\u5927\u304d\u3055","style_select":"\u30b9\u30bf\u30a4\u30eb","more_colors":"\u3055\u3089\u306b\u8272\u3092\u4f7f\u7528...","toolbar_focus":"\u30c4\u30fc\u30eb\u30dc\u30bf\u30f3\u3078\u79fb\u52d5 - Alt Q, \u30a8\u30c7\u30a3\u30bf\u306b\u79fb\u52d5 - Alt-Z, \u8981\u7d20\u306e\u30d1\u30b9\u3078\u79fb\u52d5 - Alt-X",newdocument:"\u672c\u5f53\u306b\u3059\u3079\u3066\u306e\u5185\u5bb9\u3092\u6d88\u53bb\u3057\u3066\u3088\u3044\u3067\u3059\u304b?",path:"\u30d1\u30b9","clipboard_msg":"\u30b3\u30d4\u30fc/\u5207\u308a\u53d6\u308a/\u8cbc\u308a\u4ed8\u3051\u306fMozilla\u3068Firefox\u3067\u306f\u4f7f\u7528\u3067\u304d\u307e\u305b\u3093\u3002\n\u3053\u306e\u554f\u984c\u306e\u8a73\u7d30\u3092\u77e5\u308a\u305f\u3044\u3067\u3059\u304b?","blockquote_desc":"\u5f15\u7528\u30d6\u30ed\u30c3\u30af","help_desc":"\u30d8\u30eb\u30d7","newdocument_desc":"\u65b0\u3057\u3044\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8","image_props_desc":"\u753b\u50cf\u306e\u5c5e\u6027","paste_desc":"\u8cbc\u308a\u4ed8\u3051","copy_desc":"\u30b3\u30d4\u30fc","cut_desc":"\u5207\u308a\u53d6\u308a","anchor_desc":"\u30a2\u30f3\u30ab\u30fc\u306e\u633f\u5165/\u7de8\u96c6","visualaid_desc":"\u30ac\u30a4\u30c9\u30e9\u30a4\u30f3\u3068\u975e\u8868\u793a\u8981\u7d20\u306e\u8868\u793a\u3092\u5207\u66ff","charmap_desc":"\u7279\u6b8a\u6587\u5b57","backcolor_desc":"\u80cc\u666f\u306e\u8272","forecolor_desc":"\u6587\u5b57\u306e\u8272","custom1_desc":"\u8aac\u660e\u6587\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002","removeformat_desc":"\u66f8\u5f0f\u306e\u524a\u9664","hr_desc":"\u6c34\u5e73\u7dda\u3092\u633f\u5165","sup_desc":"\u4e0a\u4ed8\u304d\u6587\u5b57","sub_desc":"\u4e0b\u4ed8\u304d\u6587\u5b57","code_desc":"HTML\u306e\u30bd\u30fc\u30b9\u3092\u7de8\u96c6","cleanup_desc":"\u4e71\u96d1\u306a\u30b3\u30fc\u30c9\u3092\u6574\u5f62","image_desc":"\u753b\u50cf\u306e\u633f\u5165/\u7de8\u96c6","unlink_desc":"\u30ea\u30f3\u30af\u3092\u89e3\u9664","link_desc":"\u30ea\u30f3\u30af\u306e\u633f\u5165/\u7de8\u96c6","redo_desc":"\u3084\u308a\u76f4\u3059 (Ctrl+Y)","undo_desc":"\u5143\u306b\u623b\u3059 (Ctrl+Z)","indent_desc":"\u5b57\u4e0b\u3052\u3092\u5897\u3084\u3059","outdent_desc":"\u5b57\u4e0b\u3052\u3092\u6e1b\u3089\u3059","numlist_desc":"\u756a\u53f7\u3064\u304d\u30ea\u30b9\u30c8","bullist_desc":"\u756a\u53f7\u306a\u3057\u30ea\u30b9\u30c8","justifyfull_desc":"\u5747\u7b49\u5272\u4ed8","justifyright_desc":"\u53f3\u63c3\u3048","justifycenter_desc":"\u4e2d\u592e\u63c3\u3048","justifyleft_desc":"\u5de6\u63c3\u3048","striketrough_desc":"\u53d6\u308a\u6d88\u3057\u7dda","help_shortcut":"ALT-F10 \u3067\u30c4\u30fc\u30eb\u30d0\u30fc\u3001ALT-0 \u3067\u30d8\u30eb\u30d7","rich_text_area":"\u30ea\u30c3\u30c1\u30c6\u30ad\u30b9\u30c8\u30a8\u30ea\u30a2","shortcuts_desc":"\u30a2\u30af\u30bb\u30b7\u30d3\u30ea\u30c6\u30a3\u306e\u30d8\u30eb\u30d7",toolbar:"\u30c4\u30fc\u30eb\u30d0\u30fc","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":""}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/ja_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/ja_dlg.js deleted file mode 100644 index 234fb71a48..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/ja_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('ja.advanced_dlg',{"link_list":"\u30ea\u30f3\u30af\u306e\u4e00\u89a7","link_is_external":"\u5165\u529b\u3057\u305fURL\u306f\u5916\u90e8\u306e\u30ea\u30f3\u30af\u306e\u3088\u3046\u3067\u3059\u3002\u30ea\u30f3\u30af\u306b http:// \u3092\u8ffd\u52a0\u3057\u307e\u3059\u304b?","link_is_email":"\u5165\u529b\u3057\u305fURL\u306f\u96fb\u5b50\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u306e\u3088\u3046\u3067\u3059\u3002\u30ea\u30f3\u30af\u306b mailto: \u3092\u8ffd\u52a0\u3057\u307e\u3059\u304b?","link_titlefield":"\u30bf\u30a4\u30c8\u30eb","link_target_blank":"\u65b0\u3057\u3044\u30a6\u30a4\u30f3\u30c9\u30a6\u3067\u958b\u304f","link_target_same":"\u540c\u3058\u30a6\u30a4\u30f3\u30c9\u30a6\u3067\u958b\u304f","link_target":"\u30bf\u30fc\u30b2\u30c3\u30c8","link_url":"\u30ea\u30f3\u30af\u306eURL","link_title":"\u30ea\u30f3\u30af\u306e\u633f\u5165\u3084\u7de8\u96c6","image_align_right":"\u53f3\u63c3\u3048","image_align_left":"\u5de6\u63c3\u3048","image_align_textbottom":"\u30c6\u30ad\u30b9\u30c8\u306e\u4e0b\u7aef\u63c3\u3048","image_align_texttop":"\u30c6\u30ad\u30b9\u30c8\u306e\u4e0a\u7aef\u63c3\u3048","image_align_bottom":"\u4e0b\u63c3\u3048","image_align_middle":"\u4e2d\u592e\u63c3\u3048","image_align_top":"\u4e0a\u63c3\u3048","image_align_baseline":"\u30d9\u30fc\u30b9\u30e9\u30a4\u30f3\u63c3\u3048","image_align":"\u914d\u7f6e","image_hspace":"\u5de6\u53f3\u306e\u4f59\u767d","image_vspace":"\u4e0a\u4e0b\u306e\u4f59\u767d","image_dimensions":"\u5bf8\u6cd5","image_alt":"\u753b\u50cf\u306e\u8aac\u660e","image_list":"\u753b\u50cf\u306e\u4e00\u89a7","image_border":"\u67a0\u7dda","image_src":"\u753b\u50cf\u306eURL","image_title":"\u753b\u50cf\u306e\u633f\u5165\u3084\u7de8\u96c6","charmap_title":"\u7279\u6b8a\u6587\u5b57","colorpicker_name":"\u540d\u524d:","colorpicker_color":"\u8272:","colorpicker_named_title":"\u5b9a\u7fa9\u6e08\u307f\u306e\u8272","colorpicker_named_tab":"\u5b9a\u7fa9\u6e08\u307f","colorpicker_palette_title":"\u30d1\u30ec\u30c3\u30c8\u306e\u8272","colorpicker_palette_tab":"\u30d1\u30ec\u30c3\u30c8","colorpicker_picker_title":"\u8272\u9078\u629e","colorpicker_picker_tab":"\u9078\u629e","colorpicker_title":"\u8272\u3092\u9078\u629e","code_wordwrap":"\u884c\u306e\u6298\u308a\u8fd4\u3057","code_title":"HTML\u306e\u30bd\u30fc\u30b9\u30a8\u30c7\u30a3\u30bf","anchor_name":"\u30a2\u30f3\u30ab\u30fc\u306e\u540d\u524d","anchor_title":"\u30a2\u30f3\u30ab\u30fc\u306e\u633f\u5165\u3084\u7de8\u96c6","about_loaded":"\u8aad\u307f\u8fbc\u307f\u6e08\u307f\u306e\u30d7\u30e9\u30b0\u30a4\u30f3","about_version":"\u30d0\u30fc\u30b8\u30e7\u30f3","about_author":"\u4f5c\u6210\u8005","about_plugin":"\u30d7\u30e9\u30b0\u30a4\u30f3","about_plugins":"\u30d7\u30e9\u30b0\u30a4\u30f3","about_license":"\u30e9\u30a4\u30bb\u30f3\u30b9","about_help":"\u30d8\u30eb\u30d7","about_general":"TinyMCE\u306b\u3064\u3044\u3066","about_title":"TinyMCE\u306b\u3064\u3044\u3066","charmap_usage":"\u5de6\u53f3\u306e\u30ab\u30fc\u30bd\u30eb\u30ad\u30fc\u3092\u4f7f\u7528\u3057\u3066\u79fb\u52d5\u3057\u3066\u304f\u3060\u3055\u3044\u3002","anchor_invalid":"\u6709\u52b9\u306a\u30a2\u30f3\u30ab\u30fc\u306e\u540d\u524d\u3092\u6307\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002","accessibility_help":"\u30a2\u30af\u30bb\u30b7\u30d3\u30ea\u30c6\u30a3\u306e\u30d8\u30eb\u30d7","accessibility_usage_title":"\u5168\u822c\u7684\u306a\u4f7f\u3044\u65b9","invalid_color_value":"\u7121\u52b9\u306a\u5024"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/nl.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/nl.js deleted file mode 100644 index 3ef2c14c78..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/nl.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('nl.advanced',{"underline_desc":"Onderstrepen (Ctrl+U)","italic_desc":"Cursief (Ctrl+I)","bold_desc":"Vet (Ctrl+B)",dd:"Definitiebeschrijving",dt:"Definitieterm",samp:"Codevoorbeeld",code:"Code",blockquote:"Citaat",h6:"Kop 6",h5:"Kop 5",h4:"Kop 4",h3:"Kop 3",h2:"Kop 2",h1:"Kop 1",pre:"Vaste opmaak",address:"Adres",div:"Div",paragraph:"Alinea",block:"Opmaak",fontdefault:"Lettertype","font_size":"Tekengrootte","style_select":"Stijlen","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":"","more_colors":"Meer kleuren","toolbar_focus":"Spring naar werkbalk - Alt+Q, Spring naar tekst - Alt-Z, Spring naar elementpad - Alt-X",newdocument:"Weet u zeker dat u alle inhoud wilt wissen?",path:"Pad","clipboard_msg":"Kopi\u00ebren/knippen/plakken is niet beschikbaar in Mozilla en Firefox.\nWilt u meer informatie over deze beperking?","blockquote_desc":"Citaat","help_desc":"Help","newdocument_desc":"Nieuw document","image_props_desc":"Afbeeldingseigenschappen","paste_desc":"Plakken","copy_desc":"Kopi\u00ebren","cut_desc":"Knippen","anchor_desc":"Anker invoegen/bewerken","visualaid_desc":"Hulplijnen weergeven","charmap_desc":"Symbool invoegen","backcolor_desc":"Tekstmarkeringskleur","forecolor_desc":"Tekstkleur","custom1_desc":"Uw eigen beschrijving hier","removeformat_desc":"Opmaak verwijderen","hr_desc":"Scheidingslijn invoegen","sup_desc":"Superscript","sub_desc":"Subscript","code_desc":"HTML bron bewerken","cleanup_desc":"Code opruimen","image_desc":"Afbeelding invoegen/bewerken","unlink_desc":"Link verwijderen","link_desc":"Link invoegen/bewerken","redo_desc":"Herhalen (Ctrl+Y)","undo_desc":"Ongedaan maken (Ctrl+Z)","indent_desc":"Inspringing vergroten","outdent_desc":"Inspringing verkleinen","numlist_desc":"Nummering","bullist_desc":"Opsommingstekens","justifyfull_desc":"Uitvullen","justifyright_desc":"Rechts uitlijnen","justifycenter_desc":"Centreren","justifyleft_desc":"Links uitlijnen","striketrough_desc":"Doorhalen","help_shortcut":"Druk op ALT-F10 voor de werkbalk. Druk op ALT-0 voor hulp.","rich_text_area":"Rich Text Zone","shortcuts_desc":"Toegankelijkheid Help",toolbar:"Werkbalk"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/nl_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/nl_dlg.js deleted file mode 100644 index 615a5e8d56..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/nl_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('nl.advanced_dlg',{"link_list":"Link lijst","link_is_external":"De ingevoerde URL lijkt op een externe link. Wilt u de vereiste http:// tekst voorvoegen?","link_is_email":"De ingevoerde URL lijkt op een e-mailadres. Wilt u de vereiste mailto: tekst voorvoegen?","link_titlefield":"Titel","link_target_blank":"Link in een nieuw venster openen","link_target_same":"Link in hetzelfde venster openen","link_target":"Doel","link_url":"Link URL","link_title":"Link invoegen/bewerken","image_align_right":"Rechts","image_align_left":"Links","image_align_textbottom":"Onderkant tekst","image_align_texttop":"Bovenkant tekst","image_align_bottom":"Onder","image_align_middle":"Midden","image_align_top":"Boven","image_align_baseline":"Basislijn","image_align":"Uitlijning","image_hspace":"Horizontale ruimte","image_vspace":"Verticale ruimte","image_dimensions":"Afmetingen","image_alt":"Beschrijving","image_list":"Lijst","image_border":"Rand","image_src":"Bestand/URL","image_title":"Afbeelding invoegen/bewerken","charmap_title":"Symbolen","colorpicker_name":"Naam:","colorpicker_color":"Kleur:","colorpicker_named_title":"Benoemde kleuren","colorpicker_named_tab":"Benoemd","colorpicker_palette_title":"Paletkleuren","colorpicker_palette_tab":"Palet","colorpicker_picker_title":"Alle kleuren","colorpicker_picker_tab":"Alle kleuren","colorpicker_title":"Kleuren","code_wordwrap":"Automatische terugloop","code_title":"HTML Bron","anchor_name":"Ankernaam","anchor_title":"Anker invoegen/bewerken","about_loaded":"Geladen Invoegtoepassingen","about_version":"Versie","about_author":"Auteur","about_plugin":"Invoegtoepassing","about_plugins":"Invoegtoepassingen","about_license":"Licentie","about_help":"Help","about_general":"Info","about_title":"Over TinyMCE","charmap_usage":"Gebruik linker en rechter pijltjestoetsen om te navigeren.","anchor_invalid":"Geef een geldige ankernaam.","accessibility_help":"Hulp m.b.t. Toegankelijkheid","accessibility_usage_title":"Algemeen Gebruik","invalid_color_value":"Ongeldige kleur code"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/no.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/no.js deleted file mode 100644 index d75be8d17b..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/no.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('no.advanced',{"underline_desc":"Understrek (Ctrl+U)","italic_desc":"Kursiv (Ctrl+I)","bold_desc":"Uthevet (Ctrl B)",dd:"Definisjonsbeskrivelse",dt:"Definisjonsuttrykk",samp:"Kodeeksempel",code:"Kode",blockquote:"Innrykk",h6:"Overskrift 6",h5:"Overskrift 5",h4:"Overskrift 4",h3:"Overskrift 3",h2:"Overskrift 2",h1:"Overskrift 1",pre:"Pre-formatert",address:"Adresse",div:"Div",paragraph:"Avsnitt",block:"Format",fontdefault:"Skriftfamilie","font_size":"Skriftst\u00f8rrelse","style_select":"Stiler","more_colors":"Flere farger","toolbar_focus":"Skift til verkt\u00f8yknapper - Alt+Q, Skift til editor - Alt-Z, Skift til elementsti - Alt-",newdocument:"Er du sikker p\u00e5 at du vil slette alt innhold?",path:"Sti","clipboard_msg":"Klipp ut/Kopier/Lim er ikke tilgjengelig i Mozilla og Firefox. \n Vil du vite mer om dette?","blockquote_desc":"Innrykk","help_desc":"Hjelp","newdocument_desc":"Nytt dokument","image_props_desc":"Egenskaper for bilde","paste_desc":"Lim inn","copy_desc":"Kopier","cut_desc":"Klipp ut","anchor_desc":"Sett inn / rediger anker","visualaid_desc":"Sl\u00e5 av/p\u00e5 usynlige elementer","charmap_desc":"Sett inn spesialtegn","backcolor_desc":"Velg bakgrunnsfarge","forecolor_desc":"Velg skriftfarge","custom1_desc":"Egen beskrivelse","removeformat_desc":"Fjern formatering","hr_desc":"Sett inn horisontal linje","sup_desc":"Hev skrift","sub_desc":"Senk skrift","code_desc":"Rediger HTML kildekode","cleanup_desc":"Rydd opp rotet kode","image_desc":"Sett inn / rediger bilde","unlink_desc":"Fjern lenke","link_desc":"Sett inn / rediger lenke","redo_desc":"Gj\u00f8r om (Ctrl+Y)","undo_desc":"Angre (Ctrl+Z)","indent_desc":"\u00d8k innrykk","outdent_desc":"Reduser innrykk","numlist_desc":"Nummerliste","bullist_desc":"Punktliste","justifyfull_desc":"Blokkjustert","justifyright_desc":"H\u00f8yrejustert","justifycenter_desc":"Midtstilt","justifyleft_desc":"Venstrejustert","striketrough_desc":"Gjennomstreke","help_shortcut":"Trykk ALT F10 for verkt\u00f8ylinje. Trykk ALT 0 for hjelp","rich_text_area":"Redigeringsomr\u00e5de","shortcuts_desc":"Hjelp for funksjonshemmede",toolbar:"Verkt\u00f8ylinje","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":""}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/no_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/no_dlg.js deleted file mode 100644 index 006d54362d..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/no_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('no.advanced_dlg',{"link_list":"Liste over lenker","link_is_external":"Nettadressen du skrev inn ser ut til \u00e5 v\u00e6re en ekstern nettadresse. \u00d8nsker du \u00e5 legge til obligatorisk http://-prefiks?","link_is_email":"Nettadressen du skrev inn ser ut til \u00e5 v\u00e6re en Epost adresse. \u00d8nsker du \u00e5 legge til obligatorisk mailto:-prefiks?","link_titlefield":"Tittel","link_target_blank":"\u00c5pne i nytt vindu","link_target_same":"\u00c5pne i dette vinduet","link_target":"M\u00e5lvindu","link_url":"Lenke URL","link_title":"Sett inn / rediger lenke","image_align_right":"H\u00f8yre","image_align_left":"Venstre","image_align_textbottom":"Tekstbunn","image_align_texttop":"Teksttopp","image_align_bottom":"Bunn","image_align_middle":"Midtstilt","image_align_top":"Topp","image_align_baseline":"Bunnlinje","image_align":"Justering","image_hspace":"Horisontal avstand","image_vspace":"Vertikal avstand","image_dimensions":"Dimensjoner","image_alt":"Bildebeskrivelse","image_list":"Liste med bilder","image_border":"Ramme","image_src":"Bilde URL","image_title":"Sett inn / rediger bilde","charmap_title":"Velg spesialtegn","colorpicker_name":"Navn:","colorpicker_color":"Farge:","colorpicker_named_title":"Fargenavn","colorpicker_named_tab":"Navnevalg","colorpicker_palette_title":"Palettfarger","colorpicker_palette_tab":"Palett","colorpicker_picker_title":"Fargevalg","colorpicker_picker_tab":"Fargevelger","colorpicker_title":"Velg farge","code_wordwrap":"Tekstbryting","code_title":"HTML kildeeditor","anchor_name":"Ankernavn","anchor_title":"Sett inn / rediger anker","about_loaded":"Innlastede programtillegg","about_version":"Versjon","about_author":"Forfatter","about_plugin":"Programtillegg","about_plugins":"Programtillegg","about_license":"Lisens","about_help":"Hjelp","about_general":"Om","about_title":"Om TinyMCE","charmap_usage":"Bruk h\u00f8yre og venstre piler for \u00e5 velge.","anchor_invalid":"Du m\u00e5 angi et gyldig ankernavn.","accessibility_help":"Tilgjengelighetshjelp","accessibility_usage_title":"Generel bruk","invalid_color_value":"Ugyldig fargeverdi"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/pl.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/pl.js deleted file mode 100644 index f7348f11f1..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/pl.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('pl.advanced',{"underline_desc":"Podkre\u015blenie (Ctrl+U)","italic_desc":"Kursywa (Ctrl+I)","bold_desc":"Pogrubienie (Ctrl+B)",dd:"Opis terminu",dt:"Definicja terminu ",samp:"Pr\u00f3bka kodu",code:"Kod",blockquote:"Wydzielony blok",h6:"Nag\u0142\u00f3wek 6",h5:"Nag\u0142\u00f3wek 5",h4:"Nag\u0142\u00f3wek 4",h3:"Nag\u0142\u00f3wek 3",h2:"Nag\u0142\u00f3wek 2",h1:"Nag\u0142\u00f3wek 1",pre:"Czcionka o sta\u0142ej szeroko\u015bci",address:"Adres",div:"Div",paragraph:"Akapit",block:"Format",fontdefault:"Rodzaj czcionki","font_size":"Rozmiar czcionki","style_select":"Styl","more_colors":"Wi\u0119cej kolor\u00f3w...","toolbar_focus":"Przeskocz do przycisk\u00f3w narz\u0119dzi - Alt+Q, Przeskocz do edytora - Alt-Z, Przeskocz do elementu \u015bcie\u017cki - Alt-X",newdocument:"Czy jeste\u015b pewnien, ze chcesz wyczy\u015bci\u0107 ca\u0142\u0105 zawarto\u015b\u0107?",path:"\u015acie\u017cka","clipboard_msg":"Akcje Kopiuj/Wytnij/Wklej nie s\u0105 dost\u0119pne w Mozilli i Firefox.\nCzy chcesz wi\u0119cej informacji o tym problemie?","blockquote_desc":"Blok cytatu","help_desc":"Pomoc","newdocument_desc":"Nowy dokument","image_props_desc":"W\u0142a\u015bciwo\u015bci obrazka","paste_desc":"Wklej (Ctrl V)","copy_desc":"Kopiuj (Ctrl C)","cut_desc":"Wytnij (Ctrl X)","anchor_desc":"Wstaw/edytuj kotwic\u0119","visualaid_desc":"Prze\u0142\u0105cz widoczno\u015b\u0107 wska\u017anik\u00f3w i niewidocznych element\u00f3w","charmap_desc":"Wstaw znak specjalny","backcolor_desc":"Wybierz kolor t\u0142a","forecolor_desc":"Wybierz kolor tekstu","custom1_desc":"Tw\u00f3j niestandardowy opis tutaj","removeformat_desc":"Usu\u0144 formatowanie","hr_desc":"Wstaw poziom\u0105 lini\u0119","sup_desc":"Indeks g\u00f3rny","sub_desc":"Indeks dolny","code_desc":"Edytuj \u017ar\u00f3d\u0142o HTML","cleanup_desc":"Wyczy\u015b\u0107 nieuporz\u0105dkowany kod","image_desc":"Wstaw/edytuj obraz","unlink_desc":"Usu\u0144 link","link_desc":"Wstaw/edytuj link","redo_desc":"Pon\u00f3w (Ctrl+Y)","undo_desc":"Cofnij (Ctrl+Z)","indent_desc":"Wci\u0119cie","outdent_desc":"Cofnij wci\u0119cie","numlist_desc":"Lista numerowana","bullist_desc":"Lista nienumerowana","justifyfull_desc":"R\u00f3wnanie do prawej i lewej","justifyright_desc":"Wyr\u00f3wnaj do prawej","justifycenter_desc":"Wycentruj","justifyleft_desc":"Wyr\u00f3wnaj do lewej","striketrough_desc":"Przekre\u015blenie","help_shortcut":"Wci\u015bnij Alt F10 aby pokaza\u0107 pasek narz\u0119dzi. Wci\u015bnij Alt 0 aby otworzy\u0107 pomoc","rich_text_area":"Pole tekstowe","shortcuts_desc":"Pomoc dost\u0119pno\u015bci",toolbar:"Pasek narz\u0119dzi","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":""}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/pl_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/pl_dlg.js deleted file mode 100644 index e1ba93c953..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/pl_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('pl.advanced_dlg',{"link_list":"Lista link\u00f3w","link_is_external":"URL kt\u00f3ry otworzy\u0142e\u015b wydaje si\u0119 by\u0107 zewn\u0119trznym linkiem, czy chcesz doda\u0107 wymagany prefiks http:// ?","link_is_email":"URL kt\u00f3ry otworzy\u0142e\u015b wydaje si\u0119 by\u0107 adresem mailowym, czy chcesz doda\u0107 odpowiedni prefiks mailto:?","link_titlefield":"Tytu\u0142","link_target_blank":"Otw\u00f3rz link w nowym oknie","link_target_same":"Otw\u00f3rz link w tym samym oknie","link_target":"Cel","link_url":"URL linka","link_title":"Wstaw/edytuj link","image_align_right":"Prawy","image_align_left":"Lewy","image_align_textbottom":"Dolny tekst","image_align_texttop":"G\u00f3rny tekst","image_align_bottom":"D\u00f3\u0142","image_align_middle":"\u015arodek","image_align_top":"G\u00f3ra","image_align_baseline":"Linia bazowa","image_align":"Wyr\u00f3wnanie","image_hspace":"Odst\u0119p poziomy","image_vspace":"Odst\u0119p pionowy","image_dimensions":"Rozmiary","image_alt":"Opis obrazka","image_list":"Lista obrazk\u00f3w","image_border":"Obramowanie","image_src":"URL obrazka","image_title":"Wstaw/edytuj obraz","charmap_title":"Wybierz niestandardowy znak","colorpicker_name":"Nazwa:","colorpicker_color":"Kolor:","colorpicker_named_title":"Nazwane kolory","colorpicker_named_tab":"Nazwane","colorpicker_palette_title":"Paleta kolor\u00f3w","colorpicker_palette_tab":"Paleta","colorpicker_picker_title":"Wybieranie kolor\u00f3w","colorpicker_picker_tab":"Wybieranie","colorpicker_title":"Wybierz kolor","code_wordwrap":"Zawijanie s\u0142\u00f3w","code_title":"Edytor \u017ar\u00f3d\u0142a HTML","anchor_name":"Nazwa zakotwiczenia","anchor_title":"Wstaw/Edytuj zakotwiczenie","about_loaded":"Za\u0142adowane wtyczki","about_version":"Wersja","about_author":"Autor","about_plugin":"Wtyczka","about_plugins":"Wtyczki","about_license":"Licencja","about_help":"Pomoc","about_general":"O TinyMCE","about_title":"O TinyMCE","charmap_usage":"U\u017cywaj strza\u0142ek w lewo i w prawo do nawigacji.","anchor_invalid":"Prosz\u0119 poda\u0107 w\u0142a\u015bciw\u0105 nazw\u0119 zakotwiczenia.","accessibility_help":"Pomoc dost\u0119pno\u015bci","accessibility_usage_title":"Og\u00f3lne zastosowanie","invalid_color_value":"Nieprawid\u0142owa warto\u015b\u0107 koloru"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/pt.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/pt.js deleted file mode 100644 index 48d17b1a61..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/pt.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('pt.advanced',{"underline_desc":"Sublinhado (Ctrl+U)","italic_desc":"It\u00e1lico (Ctrl+I)","bold_desc":"Negrito (Ctrl+B)",dd:"Descri\u00e7\u00e3o da defini\u00e7\u00e3o",dt:"Termo da defini\u00e7\u00e3o",samp:"Amostra de c\u00f3digo",code:"C\u00f3digo",blockquote:"Cita\u00e7\u00e3o em bloco",h6:"T\u00edtulo 6",h5:"T\u00edtulo 5",h4:"T\u00edtulo 4",h3:"T\u00edtulo 3",h2:"T\u00edtulo 2",h1:"T\u00edtulo 1",pre:"Pr\u00e9-formatado",address:"Endere\u00e7o",div:"Div",paragraph:"Par\u00e1grafo",block:"Formata\u00e7\u00e3o",fontdefault:"Tipo de fonte","font_size":"Tamanho","style_select":"Estilos","anchor_delta_width":"30","link_delta_height":"25","link_delta_width":"50","more_colors":"Mais cores","toolbar_focus":"Ir para as ferramentas - Alt+Q, Ir para o editor - Alt-Z, Ir para o endere\u00e7o do elemento - Alt-X",newdocument:"Tem a certeza que deseja apagar tudo?",path:"Endere\u00e7o","clipboard_msg":"Copiar/recortar/colar n\u00e3o est\u00e1 dispon\u00edvel no Mozilla e Firefox. Deseja mais informa\u00e7\u00f5es sobre este problema?","blockquote_desc":"Cita\u00e7\u00e3o em bloco","help_desc":"Ajuda","newdocument_desc":"Novo documento","image_props_desc":"Propriedades da imagem","paste_desc":"Colar","copy_desc":"Copiar","cut_desc":"Recortar","anchor_desc":"Inserir/editar \u00e2ncora","visualaid_desc":"Alternar guias/elementos invis\u00edveis","charmap_desc":"Inserir caracteres especiais","backcolor_desc":"Selecionar a cor de fundo","forecolor_desc":"Selecionar a cor do texto","custom1_desc":"Insira aqui a sua descri\u00e7\u00e3o personalizada","removeformat_desc":"Remover formata\u00e7\u00e3o","hr_desc":"Inserir separador horizontal","sup_desc":"Superior \u00e0 linha","sub_desc":"Inferior \u00e0 linha","code_desc":"Editar c\u00f3digo fonte","cleanup_desc":"Limpar c\u00f3digo incorreto","image_desc":"Inserir/editar imagem","unlink_desc":"Remover hyperlink","link_desc":"Inserir/editar hyperlink","redo_desc":"Refazer (Ctrl+Y)","undo_desc":"Desfazer (Ctrl+Z)","indent_desc":"Aumentar recuo","outdent_desc":"Diminuir recuo","numlist_desc":"Numera\u00e7\u00e3o","bullist_desc":"Marcadores","justifyfull_desc":"Justificar","justifyright_desc":"Alinhar \u00e0 direita","justifycenter_desc":"Centralizar","justifyleft_desc":"Alinhar \u00e0 esquerda","striketrough_desc":"Riscado","help_shortcut":"Pressione ALT-F10 para barra de ferramentas. Pressione ALT-0 para ajuda","rich_text_area":"\u00c1rea de edi\u00e7\u00e3o rica","shortcuts_desc":"Ajuda acessibilidade",toolbar:"Barra de ferramentas","anchor_delta_height":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","image_delta_height":"","image_delta_width":""}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/pt_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/pt_dlg.js deleted file mode 100644 index 313a012fad..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/pt_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('pt.advanced_dlg',{"link_list":"Lista de Links","link_is_external":"A URL digitada parece conduzir a um link externo. Deseja acrescentar o prefixo necess\u00e1rio http://?","link_is_email":"A URL digitada parece ser um endere\u00e7o de e-mail. Deseja acrescentar o prefixo necess\u00e1rio mailto:?","link_titlefield":"T\u00edtulo","link_target_blank":"Abrir hyperlink em nova janela","link_target_same":"Abrir hyperlink na mesma janela","link_target":"Alvo","link_url":"URL do hyperink","link_title":"Inserir/editar hyperlink","image_align_right":"Direita","image_align_left":"Esquerda","image_align_textbottom":"Base do texto","image_align_texttop":"Topo do texto","image_align_bottom":"Abaixo","image_align_middle":"Meio","image_align_top":"Topo","image_align_baseline":"Sobre a linha de texto","image_align":"Alinhamento","image_hspace":"Espa\u00e7o Horizontal","image_vspace":"Espa\u00e7o Vertical","image_dimensions":"Dimens\u00f5es","image_alt":"Descri\u00e7\u00e3o da imagem","image_list":"Lista de imagens","image_border":"Limites","image_src":"Endere\u00e7o da imagem","image_title":"Inserir/editar imagem","charmap_title":"Selecionar caracteres personalizados","colorpicker_name":"Nome:","colorpicker_color":"Cor:","colorpicker_named_title":"Cores Personalizadas","colorpicker_named_tab":"Personalizadas","colorpicker_palette_title":"Paleta de Cores","colorpicker_palette_tab":"Paleta","colorpicker_picker_title":"Editor de Cores","colorpicker_picker_tab":"Editor","colorpicker_title":"Selecione uma cor","code_wordwrap":"Quebra autom\u00e1tica de linha","code_title":"Editor HTML","anchor_name":"Nome da \u00e2ncora","anchor_title":"Inserir/editar \u00e2ncora","about_loaded":"Plugins Instalados","about_version":"Vers\u00e3o","about_author":"Autor","about_plugin":"Plugin","about_plugins":"Plugins","about_license":"Licen\u00e7a","about_help":"Ajuda","about_general":"Sobre","about_title":"Sobre o TinyMCE","charmap_usage":"Use as setas esquerda e direita para navegar.","anchor_invalid":"Por favor, especifique um nome v\u00e1lido de \u00e2ncora.","accessibility_help":"Ajuda de Acessibilidade","accessibility_usage_title":"Uso Geral","invalid_color_value":"Valor da cor inv\u00e1lido"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/ru.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/ru.js deleted file mode 100644 index eed0e22822..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/ru.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('ru.advanced',{"underline_desc":"\u041f\u043e\u0434\u0447\u0435\u0440\u043a\u043d\u0443\u0442\u044b\u0439 (Ctrl+U)","italic_desc":"\u041a\u0443\u0440\u0441\u0438\u0432 (Ctrl+I)","bold_desc":"\u041f\u043e\u043b\u0443\u0436\u0438\u0440\u043d\u044b\u0439 (Ctrl+B)",dd:"\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430",dt:"\u0422\u0435\u0440\u043c\u0438\u043d \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430",samp:"\u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u0434\u0430",code:"\u041a\u043e\u0434",blockquote:"\u0426\u0438\u0442\u0430\u0442\u0430",h6:"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 6",h5:"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 5",h4:"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 4",h3:"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 3",h2:"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 2",h1:"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 1",pre:"\u041f\u0440\u0435\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439",address:"\u0410\u0434\u0440\u0435\u0441",div:"Div",paragraph:"\u0410\u0431\u0437\u0430\u0446",block:"\u0424\u043e\u0440\u043c\u0430\u0442",fontdefault:"\u0428\u0440\u0438\u0444\u0442","font_size":"\u0420\u0430\u0437\u043c\u0435\u0440","style_select":"\u0421\u0442\u0438\u043b\u044c","more_colors":"\u0414\u0440\u0443\u0433\u0438\u0435 \u0446\u0432\u0435\u0442\u0430...","toolbar_focus":"\u041f\u0435\u0440\u0435\u0439\u0442\u0438 \u043d\u0430 \u043f\u0430\u043d\u0435\u043b\u044c \u043a\u043d\u043e\u043f\u043e\u043a (Alt+Q). \u041f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0443 (Alt+Z). \u041f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0443 \u043f\u0443\u0442\u0438 (Alt+X).",newdocument:"\u0412\u044b \u0443\u0432\u0435\u0440\u0435\u043d\u044b, \u0447\u0442\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0432\u0441\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c?",path:"\u0422\u0435\u0433\u0438","clipboard_msg":"\u041a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435, \u0432\u044b\u0440\u0435\u0437\u043a\u0430 \u0438 \u0432\u0441\u0442\u0430\u0432\u043a\u0430 \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0432 Firefox. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043a\u043b\u0430\u0432\u0438\u0448\u0438: Ctrl C \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c, Ctrl V \u0432\u0441\u0442\u0430\u0432\u0438\u0442\u044c. \u041f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e?","blockquote_desc":"\u0426\u0438\u0442\u0430\u0442\u0430","help_desc":"\u041f\u043e\u043c\u043e\u0449\u044c","newdocument_desc":"\u041d\u043e\u0432\u044b\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442","image_props_desc":"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f","paste_desc":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c","copy_desc":"\u041a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c","cut_desc":"\u0412\u044b\u0440\u0435\u0437\u0430\u0442\u044c","anchor_desc":"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c/\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u044f\u043a\u043e\u0440\u044c","visualaid_desc":"\u0412\u0441\u0435 \u0437\u043d\u0430\u043a\u0438","charmap_desc":"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0438\u043c\u0432\u043e\u043b","backcolor_desc":"\u0426\u0432\u0435\u0442 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0442\u0435\u043a\u0441\u0442\u0430","forecolor_desc":"\u0426\u0432\u0435\u0442 \u0442\u0435\u043a\u0441\u0442\u0430","custom1_desc":"\u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435","removeformat_desc":"\u041e\u0447\u0438\u0441\u0442\u0438\u0442\u044c \u0444\u043e\u0440\u043c\u0430\u0442","hr_desc":"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0447\u0435\u0440\u0442\u0443","sup_desc":"\u041d\u0430\u0434\u0441\u0442\u0440\u043e\u0447\u043d\u044b\u0439","sub_desc":"\u041f\u043e\u0434\u0441\u0442\u0440\u043e\u0447\u043d\u044b\u0439","code_desc":"\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c HTML \u043a\u043e\u0434","cleanup_desc":"\u041e\u0447\u0438\u0441\u0442\u0438\u0442\u044c \u043b\u0438\u0448\u043d\u0438\u0439 \u043a\u043e\u0434","image_desc":"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c/\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435","unlink_desc":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0443","link_desc":"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c/\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0443","redo_desc":"\u0412\u0435\u0440\u043d\u0443\u0442\u044c (Ctrl+Y)","undo_desc":"\u041e\u0442\u043c\u0435\u043d\u0438\u0442\u044c (Ctrl+Z)","indent_desc":"\u0423\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c \u043e\u0442\u0441\u0442\u0443\u043f","outdent_desc":"\u0423\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c \u043e\u0442\u0441\u0442\u0443\u043f","numlist_desc":"\u041d\u0443\u043c\u0435\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a","bullist_desc":"\u041c\u0430\u0440\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a","justifyfull_desc":"\u041f\u043e \u0448\u0438\u0440\u0438\u043d\u0435","justifyright_desc":"\u041f\u043e \u043f\u0440\u0430\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","justifycenter_desc":"\u041f\u043e \u0446\u0435\u043d\u0442\u0440\u0443","justifyleft_desc":"\u041f\u043e \u043b\u0435\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","striketrough_desc":"\u0417\u0430\u0447\u0435\u0440\u043a\u043d\u0443\u0442\u044b\u0439","help_shortcut":"\u041d\u0430\u0436\u043c\u0438\u0442\u0435 ALT-F10 \u0434\u043b\u044f \u043f\u0430\u043d\u0435\u043b\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432. \u041d\u0430\u0436\u043c\u0438\u0442\u0435 ALT-0 \u0434\u043b\u044f \u0441\u043f\u0440\u0430\u0432\u043a\u0438.","rich_text_area":"\u0412\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440","shortcuts_desc":"\u041f\u043e\u043c\u043e\u0449\u044c \u043f\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438",toolbar:"\u041f\u0430\u043d\u0435\u043b\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":""}); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/ru_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/ru_dlg.js deleted file mode 100644 index 70bd59baa5..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/ru_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('ru.advanced_dlg',{"link_list":"\u0421\u043f\u0438\u0441\u043e\u043a \u0441\u0441\u044b\u043b\u043e\u043a","link_is_external":"\u0412\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0439 \u0430\u0434\u0440\u0435\u0441 \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u0442 \u0432\u043d\u0435\u0448\u043d\u044e\u044e \u0441\u0441\u044b\u043b\u043a\u0443, \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u0435\u0444\u0438\u043a\u0441 http://?","link_is_email":"\u0412\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0439 \u0430\u0434\u0440\u0435\u0441 \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u0442 \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u0443\u044e \u043f\u043e\u0447\u0442\u0443, \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u0435\u0444\u0438\u043a\u0441 mailto:?","link_titlefield":"\u041f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0430","link_target_blank":"\u041e\u0442\u043a\u0440\u044b\u0442\u044c \u0432 \u043d\u043e\u0432\u043e\u043c \u043e\u043a\u043d\u0435","link_target_same":"\u041e\u0442\u043a\u0440\u044b\u0442\u044c \u0432 \u044d\u0442\u043e\u043c \u043e\u043a\u043d\u0435","link_target":"\u0426\u0435\u043b\u044c","link_url":"\u0410\u0434\u0440\u0435\u0441","link_title":"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0441\u0441\u044b\u043b\u043a\u0438","image_align_right":"\u041f\u043e \u043f\u0440\u0430\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","image_align_left":"\u041f\u043e \u043b\u0435\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","image_align_textbottom":"\u041f\u043e \u043d\u0438\u0436\u043d\u0435\u043c\u0443 \u043a\u0440\u0430\u044e \u0442\u0435\u043a\u0441\u0442\u0430","image_align_texttop":"\u041f\u043e \u0432\u0435\u0440\u0445\u043d\u0435\u043c\u0443 \u043a\u0440\u0430\u044e \u0442\u0435\u043a\u0441\u0442\u0430","image_align_bottom":"\u041f\u043e \u043d\u0438\u0436\u043d\u0435\u043c\u0443 \u043a\u0440\u0430\u044e","image_align_middle":"\u041f\u043e \u0446\u0435\u043d\u0442\u0440\u0443","image_align_top":"\u041f\u043e \u0432\u0435\u0440\u0445\u043d\u0435\u043c\u0443 \u043a\u0440\u0430\u044e","image_align_baseline":"\u041f\u043e \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u043b\u0438\u043d\u0438\u0438","image_align":"\u0412\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u0435","image_hspace":"\u0413\u043e\u0440\u0438\u0437. \u043e\u0442\u0441\u0442\u0443\u043f","image_vspace":"\u0412\u0435\u0440\u0442. \u043e\u0442\u0441\u0442\u0443\u043f","image_dimensions":"\u0420\u0430\u0437\u043c\u0435\u0440","image_alt":"\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435","image_list":"\u0421\u043f\u0438\u0441\u043e\u043a \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a","image_border":"\u0413\u0440\u0430\u043d\u0438\u0446\u0430","image_src":"\u0410\u0434\u0440\u0435\u0441","image_title":"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f","charmap_title":"\u0412\u044b\u0431\u043e\u0440 \u0441\u0438\u043c\u0432\u043e\u043b\u0430","colorpicker_name":"\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435:","colorpicker_color":"\u041a\u043e\u0434:","colorpicker_named_title":"\u0426\u0432\u0435\u0442\u0430","colorpicker_named_tab":"\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u044f","colorpicker_palette_title":"\u0426\u0432\u0435\u0442\u0430","colorpicker_palette_tab":"\u041f\u0430\u043b\u0438\u0442\u0440\u0430","colorpicker_picker_title":"\u0426\u0432\u0435\u0442\u0430","colorpicker_picker_tab":"\u0421\u043f\u0435\u043a\u0442\u0440","colorpicker_title":"\u0426\u0432\u0435\u0442\u0430","code_wordwrap":"\u041f\u0435\u0440\u0435\u043d\u043e\u0441 \u0441\u0442\u0440\u043e\u043a","code_title":"\u0420\u0435\u0434\u0430\u043a\u0442\u043e\u0440 HTML \u043a\u043e\u0434\u0430","anchor_name":"\u0418\u043c\u044f \u044f\u043a\u043e\u0440\u044f","anchor_title":"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u044f\u043a\u043e\u0440\u044f","about_loaded":"\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u0435 \u043f\u043b\u0430\u0433\u0438\u043d\u044b","about_version":"\u0412\u0435\u0440\u0441\u0438\u044f","about_author":"\u0410\u0432\u0442\u043e\u0440","about_plugin":"\u041f\u043b\u0430\u0433\u0438\u043d","about_plugins":"\u041f\u043b\u0430\u0433\u0438\u043d\u044b","about_license":"\u041b\u0438\u0446\u0435\u043d\u0437\u0438\u044f","about_help":"\u041f\u043e\u043c\u043e\u0449\u044c","about_general":"\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435","about_title":"\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 TinyMCE","charmap_usage":"\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043a\u043b\u0430\u0432\u0438\u0448\u0438 \"\u0412\u043b\u0435\u0432\u043e\" \u0438 \"\u0412\u043f\u0440\u0430\u0432\u043e\" \u0434\u043b\u044f \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438.","anchor_invalid":"\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0443\u043a\u0430\u0436\u0438\u0442\u0435 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0435 \u0438\u043c\u044f \u044f\u043a\u043e\u0440\u044f.","accessibility_help":"\u041f\u043e\u043c\u043e\u0449\u044c \u043f\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438","accessibility_usage_title":"\u041e\u0431\u0449\u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435","invalid_color_value":"\u041d\u0435\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u043d\u0438\u0435 \u0446\u0432\u0435\u0442\u0430"}); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/sv.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/sv.js deleted file mode 100644 index 9a20833ad2..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/sv.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('sv.advanced',{"underline_desc":"Understruken (Ctrl+U)","italic_desc":"Kursiv (Ctrl+I)","bold_desc":"Fet (Ctrl+B)",dd:"Definitionsbeskrivning",dt:"Definitionsterm",samp:"Kodexempel",code:"Kodblock",blockquote:"Blockcitat",h6:"Rubrik 6",h5:"Rubrik 5",h4:"Rubrik 4",h3:"Rubrik 3",h2:"Rubrik 2",h1:"Rubrik 1",pre:"F\u00f6rformaterad",address:"Adress",div:"Div",paragraph:"Stycke",block:"Format",fontdefault:"Teckensnitt","font_size":"Teckenstorlek","style_select":"Stilar","more_colors":"Mer f\u00e4rger","toolbar_focus":"Hoppa till verktygsf\u00e4ltet - Alt+Q, Hoppa till redigeraren - Alt-Z, Hoppa till elementlistan - Alt-X",newdocument:"\u00c4r du s\u00e4ker p\u00e5 att du vill radera allt inneh\u00e5ll?",path:"Element","clipboard_msg":"Kopiera/klipp ut/klistra in \u00e4r inte tillg\u00e4ngligt i din webbl\u00e4sare.\nVill du veta mer om detta?","blockquote_desc":"Blockcitat","help_desc":"Hj\u00e4lp","newdocument_desc":"Nytt dokument","image_props_desc":"Bildinst\u00e4llningar","paste_desc":"Klistra in","copy_desc":"Kopiera","cut_desc":"Klipp ut","anchor_desc":"Infoga/redigera bokm\u00e4rke","visualaid_desc":"Visa/d\u00f6lj visuella hj\u00e4lpmedel","charmap_desc":"Infoga specialtecken","backcolor_desc":"V\u00e4lj bakgrundsf\u00e4rg","forecolor_desc":"V\u00e4lj textf\u00e4rg","custom1_desc":"Din beskrivning h\u00e4r","removeformat_desc":"Ta bort formatering","hr_desc":"Infoga horisontell skiljelinje","sup_desc":"Superscript","sub_desc":"Subscript","code_desc":"Redigera HTML k\u00e4llkoden","cleanup_desc":"St\u00e4da upp i k\u00e4llkoden","image_desc":"Infoga/redigera bild","unlink_desc":"Ta bort l\u00e4nk","link_desc":"Infoga/redigera l\u00e4nk","redo_desc":"G\u00f6r om (Ctrl+Y)","undo_desc":"\u00c5ngra (Ctrl+Z)","indent_desc":"Indrag","outdent_desc":"Drag tillbaka","numlist_desc":"Nummerlista","bullist_desc":"Punktlista","justifyfull_desc":"Justera","justifyright_desc":"H\u00f6gerst\u00e4lld","justifycenter_desc":"Centrera","justifyleft_desc":"V\u00e4nsterst\u00e4lld","striketrough_desc":"Genomstruken","help_shortcut":"Alt-F10 f\u00f6r verktygsf\u00e4lt. Alt-0 f\u00f6r hj\u00e4lp.","rich_text_area":"Redigeringsarea","shortcuts_desc":"Hj\u00e4lp f\u00f6r funktionshindrade",toolbar:"Verktygsf\u00e4lt","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":""}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/sv_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/sv_dlg.js deleted file mode 100644 index f2da940ed9..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/sv_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('sv.advanced_dlg',{"link_list":"L\u00e4nklista","link_is_external":"L\u00e4nken du angav verkar vara en extern adress. Vill du infoga http:// prefixet p\u00e5 l\u00e4nken?","link_is_email":"L\u00e4nken du angav verkar vara en e-post adress. Vill du infoga mailto: prefixet p\u00e5 l\u00e4nken?","link_titlefield":"Titel","link_target_blank":"\u00d6\u0096ppna l\u00e4nken i ett nytt f\u00f6nster","link_target_same":"\u00d6\u0096ppna l\u00e4nken i samma f\u00f6nster","link_target":"M\u00e5l","link_url":"L\u00e4nkens URL","link_title":"Infoga/redigera l\u00e4nk","image_align_right":"H\u00f6ger","image_align_left":"V\u00e4nster","image_align_textbottom":"Botten av texten","image_align_texttop":"Toppen av texten","image_align_bottom":"Botten","image_align_middle":"Mitten","image_align_top":"Toppen","image_align_baseline":"Baslinje","image_align":"Justering","image_hspace":"Horisontalrymd","image_vspace":"Vertikalrymd","image_dimensions":"Dimensioner","image_alt":"Bildens beskrivning","image_list":"Bildlista","image_border":"Ram","image_src":"Bildens URL","image_title":"Infoga/redigera bild","charmap_title":"V\u00e4lj ett specialtecken","colorpicker_name":"Namn:","colorpicker_color":"F\u00e4rg:","colorpicker_named_title":"Namngivna f\u00e4rger","colorpicker_named_tab":"Namngivna","colorpicker_palette_title":"Palettf\u00e4rger","colorpicker_palette_tab":"Palett","colorpicker_picker_title":"F\u00e4rgv\u00e4ljare","colorpicker_picker_tab":"V\u00e4ljare","colorpicker_title":"V\u00e4lj en f\u00e4rg","code_wordwrap":"Bryt ord","code_title":"HTML k\u00e4llkodsl\u00e4ge","anchor_name":"Namn","anchor_title":"Infoga/redigera bokm\u00e4rke","about_loaded":"Laddade plug-ins","about_version":"Version","about_author":"Utvecklare","about_plugin":"Om plug-in","about_plugins":"Om plug-in","about_license":"Licens","about_help":"Hj\u00e4lp","about_general":"Om","about_title":"Om TinyMCE","charmap_usage":"Anv\u00e4nd v\u00e4nster och h\u00f6ger pil f\u00f6r att navigera","anchor_invalid":"Skiv ett korrekt ankarnamn.","accessibility_help":"Tillg\u00e4nglighets hj\u00e4lp","accessibility_usage_title":"Generellanv\u00e4ndning","invalid_color_value":"Felaktigt f\u00e4rgv\u00e4rde"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/zh.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/zh.js deleted file mode 100644 index cef3df2d94..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/zh.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('zh-cn.advanced',{"underline_desc":"\u4e0b\u5212\u7ebf(Ctrl U)","italic_desc":"\u659c\u4f53(Ctrl I)","bold_desc":"\u7c97\u4f53(Ctrl B)",dd:"\u5b9a\u4e49\u8bf4\u660e",dt:"\u672f\u8bed\u5b9a\u4e49",samp:"\u4ee3\u7801\u793a\u4f8b",code:"\u4ee3\u7801",blockquote:"\u5f15\u7528",h6:"\u6807\u98986",h5:"\u6807\u98985",h4:"\u6807\u98984",h3:"\u6807\u98983",h2:"\u6807\u98982",h1:"\u6807\u98981",pre:"\u9884\u683c\u5f0f\u6587\u672c",address:"\u5730\u5740",div:"Div\u533a\u5757",paragraph:"\u6bb5\u843d",block:"\u683c\u5f0f\u5316",fontdefault:"\u5b57\u4f53","font_size":"\u5b57\u4f53\u5927\u5c0f","style_select":"\u6837\u5f0f","more_colors":"\u66f4\u591a\u989c\u8272","toolbar_focus":"\u8f6c\u5230\u5de5\u5177\u6309\u94ae - Alt-Q\uff0c\u8f6c\u5230\u7f16\u8f91\u5668 - Alt-Z\uff0c\u8f6c\u5230\u5143\u7d20\u8def\u5f84 - Alt-X\u3002",newdocument:"\u60a8\u771f\u7684\u8981\u6e05\u9664\u6240\u6709\u5185\u5bb9\u5417\uff1f",path:"\u8def\u5f84","clipboard_msg":"\u5728Mozilla\u548cFirefox\u4e2d\u4e0d\u80fd\u4f7f\u7528\u590d\u5236/\u7c98\u8d34/\u526a\u5207\u3002n\u60a8\u8981\u67e5\u770b\u8be5\u95ee\u9898\u66f4\u591a\u7684\u4fe1\u606f\u5417\uff1f","blockquote_desc":"\u5f15\u7528","help_desc":"\u5e2e\u52a9","newdocument_desc":"\u65b0\u5efa","image_props_desc":"\u56fe\u7247\u5c5e\u6027","paste_desc":"\u7c98\u8d34","copy_desc":"\u590d\u5236","cut_desc":"\u526a\u5207","anchor_desc":"\u63d2\u5165/\u7f16\u8f91 \u951a","visualaid_desc":"\u663e\u793a/\u9690\u85cf \u5143\u7d20","charmap_desc":"\u63d2\u5165\u81ea\u5b9a\u4e49\u7b26\u53f7","backcolor_desc":"\u9009\u62e9\u80cc\u666f\u989c\u8272","forecolor_desc":"\u9009\u62e9\u6587\u672c\u989c\u8272","custom1_desc":"\u8fd9\u91cc\u662f\u60a8\u81ea\u5b9a\u4e49\u7684\u63cf\u8ff0","removeformat_desc":"\u6e05\u9664\u683c\u5f0f","hr_desc":"\u63d2\u5165\u6c34\u5e73\u7ebf","sup_desc":"\u4e0a\u6807","sub_desc":"\u4e0b\u6807","code_desc":"\u7f16\u8f91HTML\u6e90\u4ee3\u7801","cleanup_desc":"\u6e05\u9664\u65e0\u7528\u4ee3\u7801","image_desc":"\u63d2\u5165/\u7f16\u8f91 \u56fe\u7247","unlink_desc":"\u53d6\u6d88\u8d85\u94fe\u63a5","link_desc":"\u63d2\u5165/\u7f16\u8f91 \u8d85\u94fe\u63a5","redo_desc":"\u6062\u590d (Ctrl Y)","undo_desc":"\u64a4\u9500 (Ctrl Z)","indent_desc":"\u589e\u52a0\u7f29\u8fdb","outdent_desc":"\u51cf\u5c11\u7f29\u8fdb","numlist_desc":"\u7f16\u53f7\u5217\u8868","bullist_desc":"\u9879\u76ee\u5217\u8868","justifyfull_desc":"\u4e24\u7aef\u5bf9\u9f50","justifyright_desc":"\u53f3\u5bf9\u9f50","justifycenter_desc":"\u5c45\u4e2d","justifyleft_desc":"\u5de6\u5bf9\u9f50","striketrough_desc":"\u5220\u9664\u7ebf","help_shortcut":"\u6309 ALT-F10 \u5b9a\u4f4d\u5230\u5de5\u5177\u680f.\u6309 ALT-0 \u83b7\u53d6\u5e2e\u52a9\u3002","rich_text_area":"\u5bcc\u6587\u672c\u533a","shortcuts_desc":"\u8f85\u52a9\u8bf4\u660e",toolbar:"\u5de5\u5177\u680f","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":""}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/zh_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/zh_dlg.js deleted file mode 100644 index 5d038750cf..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/langs/zh_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('zh-cn.advanced_dlg',{"link_list":"\u94fe\u63a5\u5217\u8868","link_is_external":"\u60a8\u8f93\u5165\u7684URL\u662f\u4e00\u4e2a\u5916\u90e8\u94fe\u63a5\uff0c\u662f\u5426\u8981\u52a0\u4e0a\"http://\"\u524d\u7f00\uff1f","link_is_email":"\u8f93\u5165URL\u662f\u7535\u5b50\u90ae\u4ef6\u5730\u5740\uff0c\u662f\u5426\u9700\u8981\u52a0\"mailto:\"\u524d\u7f00\uff1f","link_titlefield":"\u6807\u9898","link_target_blank":"\u5728\u65b0\u7a97\u53e3\u6253\u5f00","link_target_same":"\u5728\u5f53\u524d\u7a97\u53e3\u6253\u5f00","link_target":"\u6253\u5f00\u65b9\u5f0f","link_url":"\u8d85\u94fe\u63a5URL","link_title":"\u63d2\u5165/\u7f16\u8f91 \u8d85\u94fe\u63a5","image_align_right":"\u53f3\u5bf9\u9f50","image_align_left":"\u5de6\u5bf9\u9f50","image_align_textbottom":"\u6587\u5b57\u4e0b\u65b9","image_align_texttop":"\u6587\u5b57\u4e0a\u65b9","image_align_bottom":"\u5e95\u7aef\u5bf9\u9f50","image_align_middle":"\u5c45\u4e2d\u5bf9\u9f50","image_align_top":"\u9876\u7aef\u5bf9\u9f50","image_align_baseline":"\u5e95\u7ebf","image_align":"\u5bf9\u9f50","image_hspace":"\u6c34\u5e73\u8ddd\u79bb","image_vspace":"\u5782\u76f4\u8ddd\u79bb","image_dimensions":"\u5c3a\u5bf8","image_alt":"\u56fe\u7247\u63cf\u8ff0","image_list":"\u56fe\u7247\u5217\u8868","image_border":"\u8fb9\u6846","image_src":"\u56fe\u7247\u94fe\u63a5","image_title":"\u63d2\u5165/\u7f16\u8f91 \u56fe\u7247","charmap_title":"\u9009\u62e9\u81ea\u5b9a\u4e49\u7b26\u53f7","colorpicker_name":"\u540d\u79f0\uff1a","colorpicker_color":"\u989c\u8272\uff1a","colorpicker_named_title":"\u547d\u540d\u989c\u8272","colorpicker_named_tab":"\u547d\u540d\u989c\u8272","colorpicker_palette_title":"\u8c03\u8272\u677f\u989c\u8272","colorpicker_palette_tab":"\u8c03\u8272\u677f","colorpicker_picker_title":"\u989c\u8272\u62fe\u53d6","colorpicker_picker_tab":"\u62fe\u53d6","colorpicker_title":"\u9009\u62e9\u989c\u8272","code_wordwrap":"\u81ea\u52a8\u6362\u884c","code_title":"HTML\u4ee3\u7801\u7f16\u8f91\u5668","anchor_name":"\u951a\u540d\u79f0","anchor_title":"\u63d2\u5165/\u7f16\u8f91 \u951a","about_loaded":"\u5df2\u8f7d\u5165\u7684\u63d2\u4ef6","about_version":"\u7248\u672c","about_author":"\u4f5c\u8005","about_plugin":"\u63d2\u4ef6","about_plugins":"\u63d2\u4ef6","about_license":"\u8bb8\u53ef\u534f\u8bae","about_help":"\u5e2e\u52a9","about_general":"\u5173\u4e8e","about_title":"\u5173\u4e8eTinyMCE","anchor_invalid":"\u8bf7\u6307\u5b9a\u4e00\u4e2a\u6709\u6548\u7684\u951a\u540d\u79f0\u3002","accessibility_help":"Accessibility Help","accessibility_usage_title":"General Usage"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/link.htm b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/link.htm deleted file mode 100644 index 5d9dea9b8c..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/link.htm +++ /dev/null @@ -1,57 +0,0 @@ - - - - {#advanced_dlg.link_title} - - - - - - - -
    - - -
    -
    - - - - - - - - - - - - - - - - - - - - - -
    - - - - -
     
    -
    -
    - -
    - - -
    -
    - - diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/shortcuts.htm b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/shortcuts.htm deleted file mode 100644 index 20ec2f5a34..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/shortcuts.htm +++ /dev/null @@ -1,47 +0,0 @@ - - - - {#advanced_dlg.accessibility_help} - - - - -

    {#advanced_dlg.accessibility_usage_title}

    -

    Toolbars

    -

    Press ALT-F10 to move focus to the toolbars. Navigate through the buttons using the arrow keys. - Press enter to activate a button and return focus to the editor. - Press escape to return focus to the editor without performing any actions.

    - -

    Status Bar

    -

    To access the editor status bar, press ALT-F11. Use the left and right arrow keys to navigate between elements in the path. - Press enter or space to select an element. Press escape to return focus to the editor without changing the selection.

    - -

    Context Menu

    -

    Press shift-F10 to activate the context menu. Use the up and down arrow keys to move between menu items. To open sub-menus press the right arrow key. - To close submenus press the left arrow key. Press escape to close the context menu.

    - -

    Keyboard Shortcuts

    - - - - - - - - - - - - - - - - - - - - - -
    KeystrokeFunction
    Control-BBold
    Control-IItalic
    Control-ZUndo
    Control-YRedo
    - - diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/skins/default/content.css b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/skins/default/content.css deleted file mode 100644 index 2fd94a1f9c..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/skins/default/content.css +++ /dev/null @@ -1,50 +0,0 @@ -body, td, pre {color:#000; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px; margin:8px;} -body {background:#FFF;} -body.mceForceColors {background:#FFF; color:#000;} -body.mceBrowserDefaults {background:transparent; color:inherit; font-size:inherit; font-family:inherit;} -h1 {font-size: 2em} -h2 {font-size: 1.5em} -h3 {font-size: 1.17em} -h4 {font-size: 1em} -h5 {font-size: .83em} -h6 {font-size: .75em} -.mceItemTable, .mceItemTable td, .mceItemTable th, .mceItemTable caption, .mceItemVisualAid {border: 1px dashed #BBB;} -a.mceItemAnchor {display:inline-block; -webkit-user-select:all; -webkit-user-modify:read-only; -moz-user-select:all; -moz-user-modify:read-only; width:11px !important; height:11px !important; background:url(img/items.gif) no-repeat center center} -span.mceItemNbsp {background: #DDD} -td.mceSelected, th.mceSelected {background-color:#3399ff !important} -img {border:0;} -table, img, hr, .mceItemAnchor {cursor:default} -table td, table th {cursor:text} -ins {border-bottom:1px solid green; text-decoration: none; color:green} -del {color:red; text-decoration:line-through} -cite {border-bottom:1px dashed blue} -acronym {border-bottom:1px dotted #CCC; cursor:help} -abbr {border-bottom:1px dashed #CCC; cursor:help} - -/* IE */ -* html body { -scrollbar-3dlight-color:#F0F0EE; -scrollbar-arrow-color:#676662; -scrollbar-base-color:#F0F0EE; -scrollbar-darkshadow-color:#DDD; -scrollbar-face-color:#E0E0DD; -scrollbar-highlight-color:#F0F0EE; -scrollbar-shadow-color:#F0F0EE; -scrollbar-track-color:#F5F5F5; -} - -img:-moz-broken {-moz-force-broken-image-icon:1; width:24px; height:24px} -font[face=mceinline] {font-family:inherit !important} -*[contentEditable]:focus {outline:0} - -.mceItemMedia {border:1px dotted #cc0000; background-position:center; background-repeat:no-repeat; background-color:#ffffcc} -.mceItemShockWave {background-image:url(../../img/shockwave.gif)} -.mceItemFlash {background-image:url(../../img/flash.gif)} -.mceItemQuickTime {background-image:url(../../img/quicktime.gif)} -.mceItemWindowsMedia {background-image:url(../../img/windowsmedia.gif)} -.mceItemRealMedia {background-image:url(../../img/realmedia.gif)} -.mceItemVideo {background-image:url(../../img/video.gif)} -.mceItemAudio {background-image:url(../../img/video.gif)} -.mceItemEmbeddedAudio {background-image:url(../../img/video.gif)} -.mceItemIframe {background-image:url(../../img/iframe.gif)} -.mcePageBreak {display:block;border:0;width:100%;height:12px;border-top:1px dotted #ccc;margin-top:15px;background:#fff url(../../img/pagebreak.gif) no-repeat center top;} diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/skins/default/dialog.css b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/skins/default/dialog.css deleted file mode 100644 index 879786fc15..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/skins/default/dialog.css +++ /dev/null @@ -1,118 +0,0 @@ -/* Generic */ -body { -font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px; -scrollbar-3dlight-color:#F0F0EE; -scrollbar-arrow-color:#676662; -scrollbar-base-color:#F0F0EE; -scrollbar-darkshadow-color:#DDDDDD; -scrollbar-face-color:#E0E0DD; -scrollbar-highlight-color:#F0F0EE; -scrollbar-shadow-color:#F0F0EE; -scrollbar-track-color:#F5F5F5; -background:#F0F0EE; -padding:0; -margin:8px 8px 0 8px; -} - -html {background:#F0F0EE;} -td {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;} -textarea {resize:none;outline:none;} -a:link, a:visited {color:black;} -a:hover {color:#2B6FB6;} -.nowrap {white-space: nowrap} - -/* Forms */ -fieldset {margin:0; padding:4px; border:1px solid #919B9C; font-family:Verdana, Arial; font-size:10px;} -legend {color:#2B6FB6; font-weight:bold;} -label.msg {display:none;} -label.invalid {color:#EE0000; display:inline;} -input.invalid {border:1px solid #EE0000;} -input {background:#FFF; border:1px solid #CCC;} -input, select, textarea {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;} -input, select, textarea {border:1px solid #808080;} -input.radio {border:1px none #000000; background:transparent; vertical-align:middle;} -input.checkbox {border:1px none #000000; background:transparent; vertical-align:middle;} -.input_noborder {border:0;} - -/* Buttons */ -#insert, #cancel, input.button, .updateButton { -border:0; margin:0; padding:0; -font-weight:bold; -width:94px; height:26px; -background:url(img/buttons.png) 0 -26px; -cursor:pointer; -padding-bottom:2px; -float:left; -} - -#insert {background:url(img/buttons.png) 0 -52px} -#cancel {background:url(img/buttons.png) 0 0; float:right} - -/* Browse */ -a.pickcolor, a.browse {text-decoration:none} -a.browse span {display:block; width:20px; height:18px; background:url(../../img/icons.gif) -860px 0; border:1px solid #FFF; margin-left:1px;} -.mceOldBoxModel a.browse span {width:22px; height:20px;} -a.browse:hover span {border:1px solid #0A246A; background-color:#B2BBD0;} -a.browse span.disabled {border:1px solid white; opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)} -a.browse:hover span.disabled {border:1px solid white; background-color:transparent;} -a.pickcolor span {display:block; width:20px; height:16px; background:url(../../img/icons.gif) -840px 0; margin-left:2px;} -.mceOldBoxModel a.pickcolor span {width:21px; height:17px;} -a.pickcolor:hover span {background-color:#B2BBD0;} -a.pickcolor:hover span.disabled {} - -/* Charmap */ -table.charmap {border:1px solid #AAA; text-align:center} -td.charmap, #charmap a {width:18px; height:18px; color:#000; border:1px solid #AAA; text-align:center; font-size:12px; vertical-align:middle; line-height: 18px;} -#charmap a {display:block; color:#000; text-decoration:none; border:0} -#charmap a:hover {background:#CCC;color:#2B6FB6} -#charmap #codeN {font-size:10px; font-family:Arial,Helvetica,sans-serif; text-align:center} -#charmap #codeV {font-size:40px; height:80px; border:1px solid #AAA; text-align:center} - -/* Source */ -.wordWrapCode {vertical-align:middle; border:1px none #000000; background:transparent;} -.mceActionPanel {margin-top:5px;} - -/* Tabs classes */ -.tabs {width:100%; height:18px; line-height:normal; background:url(img/tabs.gif) repeat-x 0 -72px;} -.tabs ul {margin:0; padding:0; list-style:none;} -.tabs li {float:left; background:url(img/tabs.gif) no-repeat 0 0; margin:0 2px 0 0; padding:0 0 0 10px; line-height:17px; height:18px; display:block;} -.tabs li.current {background:url(img/tabs.gif) no-repeat 0 -18px; margin-right:2px;} -.tabs span {float:left; display:block; background:url(img/tabs.gif) no-repeat right -36px; padding:0px 10px 0 0;} -.tabs .current span {background:url(img/tabs.gif) no-repeat right -54px;} -.tabs a {text-decoration:none; font-family:Verdana, Arial; font-size:10px;} -.tabs a:link, .tabs a:visited, .tabs a:hover {color:black;} - -/* Panels */ -.panel_wrapper div.panel {display:none;} -.panel_wrapper div.current {display:block; width:100%; height:300px; overflow:visible;} -.panel_wrapper {border:1px solid #919B9C; border-top:0px; padding:10px; padding-top:5px; clear:both; background:white;} - -/* Columns */ -.column {float:left;} -.properties {width:100%;} -.properties .column1 {} -.properties .column2 {text-align:left;} - -/* Titles */ -h1, h2, h3, h4 {color:#2B6FB6; margin:0; padding:0; padding-top:5px;} -h3 {font-size:14px;} -.title {font-size:12px; font-weight:bold; color:#2B6FB6;} - -/* Dialog specific */ -#link .panel_wrapper, #link div.current {height:125px;} -#image .panel_wrapper, #image div.current {height:200px;} -#plugintable thead {font-weight:bold; background:#DDD;} -#plugintable, #about #plugintable td {border:1px solid #919B9C;} -#plugintable {width:96%; margin-top:10px;} -#pluginscontainer {height:290px; overflow:auto;} -#colorpicker #preview {display:inline-block; padding-left:40px; height:14px; border:1px solid black; margin-left:5px; margin-right: 5px} -#colorpicker #previewblock {position: relative; top: -3px; padding-left:5px; padding-top: 0px; display:inline} -#colorpicker #preview_wrapper { text-align:center; padding-top:4px; white-space: nowrap} -#colorpicker #colors {float:left; border:1px solid gray; cursor:crosshair;} -#colorpicker #light {border:1px solid gray; margin-left:5px; float:left;width:15px; height:150px; cursor:crosshair;} -#colorpicker #light div {overflow:hidden;} -#colorpicker .panel_wrapper div.current {height:175px;} -#colorpicker #namedcolors {width:150px;} -#colorpicker #namedcolors a {display:block; float:left; width:10px; height:10px; margin:1px 1px 0 0; overflow:hidden;} -#colorpicker #colornamecontainer {margin-top:5px;} -#colorpicker #picker_panel fieldset {margin:auto;width:325px;} diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/skins/default/img/buttons.png b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/skins/default/img/buttons.png deleted file mode 100644 index 1e53560e0a..0000000000 Binary files a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/skins/default/img/buttons.png and /dev/null differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/skins/default/img/items.gif b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/skins/default/img/items.gif deleted file mode 100644 index d2f93671ca..0000000000 Binary files a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/skins/default/img/items.gif and /dev/null differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/skins/default/img/menu_arrow.gif b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/skins/default/img/menu_arrow.gif deleted file mode 100644 index 85e31dfb2d..0000000000 Binary files a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/skins/default/img/menu_arrow.gif and /dev/null differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/skins/default/img/menu_check.gif b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/skins/default/img/menu_check.gif deleted file mode 100644 index adfdddccd7..0000000000 Binary files a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/skins/default/img/menu_check.gif and /dev/null differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/skins/default/img/progress.gif b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/skins/default/img/progress.gif deleted file mode 100644 index 5bb90fd6a4..0000000000 Binary files a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/skins/default/img/progress.gif and /dev/null differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/skins/default/img/tabs.gif b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/skins/default/img/tabs.gif deleted file mode 100644 index 06812cb410..0000000000 Binary files a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/skins/default/img/tabs.gif and /dev/null differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/skins/default/ui.css b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/skins/default/ui.css deleted file mode 100644 index 77083f311d..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/skins/default/ui.css +++ /dev/null @@ -1,219 +0,0 @@ -/* Reset */ -.defaultSkin table, .defaultSkin tbody, .defaultSkin a, .defaultSkin img, .defaultSkin tr, .defaultSkin div, .defaultSkin td, .defaultSkin iframe, .defaultSkin span, .defaultSkin *, .defaultSkin .mceText {border:0; margin:0; padding:0; background:transparent; white-space:nowrap; text-decoration:none; font-weight:normal; cursor:default; color:#000; vertical-align:baseline; width:auto; border-collapse:separate; text-align:left} -.defaultSkin a:hover, .defaultSkin a:link, .defaultSkin a:visited, .defaultSkin a:active {text-decoration:none; font-weight:normal; cursor:default; color:#000} -.defaultSkin table td {vertical-align:middle} - -/* Containers */ -.defaultSkin table {direction:ltr;background:transparent} -.defaultSkin iframe {display:block;} -.defaultSkin .mceToolbar {height:26px} -.defaultSkin .mceLeft {text-align:left} -.defaultSkin .mceRight {text-align:right} - -/* External */ -.defaultSkin .mceExternalToolbar {position:absolute; border:1px solid #CCC; border-bottom:0; display:none;} -.defaultSkin .mceExternalToolbar td.mceToolbar {padding-right:13px;} -.defaultSkin .mceExternalClose {position:absolute; top:3px; right:3px; width:7px; height:7px; background:url(../../img/icons.gif) -820px 0} - -/* Layout */ -.defaultSkin table.mceLayout {border:0; border-left:1px solid #CCC; border-right:1px solid #CCC} -.defaultSkin table.mceLayout tr.mceFirst td {border-top:1px solid #CCC} -.defaultSkin table.mceLayout tr.mceLast td {border-bottom:1px solid #CCC} -.defaultSkin table.mceToolbar, .defaultSkin tr.mceFirst .mceToolbar tr td, .defaultSkin tr.mceLast .mceToolbar tr td {border:0; margin:0; padding:0;} -.defaultSkin td.mceToolbar {background:#F0F0EE; padding-top:1px; vertical-align:top} -.defaultSkin .mceIframeContainer {border-top:1px solid #CCC; border-bottom:1px solid #CCC} -.defaultSkin .mceStatusbar {background:#F0F0EE; font-family:'MS Sans Serif',sans-serif,Verdana,Arial; font-size:9pt; line-height:16px; overflow:visible; color:#000; display:block; height:20px} -.defaultSkin .mceStatusbar div {float:left; margin:2px} -.defaultSkin .mceStatusbar a.mceResize {display:block; float:right; background:url(../../img/icons.gif) -800px 0; width:20px; height:20px; cursor:se-resize; outline:0} -.defaultSkin .mceStatusbar a:hover {text-decoration:underline} -.defaultSkin table.mceToolbar {margin-left:3px} -.defaultSkin span.mceIcon, .defaultSkin img.mceIcon {display:block; width:20px; height:20px} -.defaultSkin .mceIcon {background:url(../../img/icons.gif) no-repeat 20px 20px} -.defaultSkin td.mceCenter {text-align:center;} -.defaultSkin td.mceCenter table {margin:0 auto; text-align:left;} -.defaultSkin td.mceRight table {margin:0 0 0 auto;} - -/* Button */ -.defaultSkin .mceButton {display:block; border:1px solid #F0F0EE; width:20px; height:20px; margin-right:1px} -.defaultSkin a.mceButtonEnabled:hover {border:1px solid #0A246A; background-color:#B2BBD0} -.defaultSkin a.mceButtonActive, .defaultSkin a.mceButtonSelected {border:1px solid #0A246A; background-color:#C2CBE0} -.defaultSkin .mceButtonDisabled .mceIcon {opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)} -.defaultSkin .mceButtonLabeled {width:auto} -.defaultSkin .mceButtonLabeled span.mceIcon {float:left} -.defaultSkin span.mceButtonLabel {display:block; font-size:10px; padding:4px 6px 0 22px; font-family:Tahoma,Verdana,Arial,Helvetica} -.defaultSkin .mceButtonDisabled .mceButtonLabel {color:#888} - -/* Separator */ -.defaultSkin .mceSeparator {display:block; background:url(../../img/icons.gif) -180px 0; width:2px; height:20px; margin:2px 2px 0 4px} - -/* ListBox */ -.defaultSkin .mceListBox, .defaultSkin .mceListBox a {display:block} -.defaultSkin .mceListBox .mceText {padding-left:4px; width:70px; text-align:left; border:1px solid #CCC; border-right:0; background:#FFF; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; height:20px; line-height:20px; overflow:hidden} -.defaultSkin .mceListBox .mceOpen {width:9px; height:20px; background:url(../../img/icons.gif) -741px 0; margin-right:2px; border:1px solid #CCC;} -.defaultSkin table.mceListBoxEnabled:hover .mceText, .defaultSkin .mceListBoxHover .mceText, .defaultSkin .mceListBoxSelected .mceText {border:1px solid #A2ABC0; border-right:0; background:#FFF} -.defaultSkin table.mceListBoxEnabled:hover .mceOpen, .defaultSkin .mceListBoxHover .mceOpen, .defaultSkin .mceListBoxSelected .mceOpen {background-color:#FFF; border:1px solid #A2ABC0} -.defaultSkin .mceListBoxDisabled a.mceText {color:gray; background-color:transparent;} -.defaultSkin .mceListBoxMenu {overflow:auto; overflow-x:hidden} -.defaultSkin .mceOldBoxModel .mceListBox .mceText {height:22px} -.defaultSkin .mceOldBoxModel .mceListBox .mceOpen {width:11px; height:22px;} -.defaultSkin select.mceNativeListBox {font-family:'MS Sans Serif',sans-serif,Verdana,Arial; font-size:7pt; background:#F0F0EE; border:1px solid gray; margin-right:2px;} - -/* SplitButton */ -.defaultSkin .mceSplitButton {width:32px; height:20px; direction:ltr} -.defaultSkin .mceSplitButton a, .defaultSkin .mceSplitButton span {height:20px; display:block} -.defaultSkin .mceSplitButton a.mceAction {width:20px; border:1px solid #F0F0EE; border-right:0;} -.defaultSkin .mceSplitButton span.mceAction {width:20px; background-image:url(../../img/icons.gif);} -.defaultSkin .mceSplitButton a.mceOpen {width:9px; background:url(../../img/icons.gif) -741px 0; border:1px solid #F0F0EE;} -.defaultSkin .mceSplitButton span.mceOpen {display:none} -.defaultSkin table.mceSplitButtonEnabled:hover a.mceAction, .defaultSkin .mceSplitButtonHover a.mceAction, .defaultSkin .mceSplitButtonSelected a.mceAction {border:1px solid #0A246A; border-right:0; background-color:#B2BBD0} -.defaultSkin table.mceSplitButtonEnabled:hover a.mceOpen, .defaultSkin .mceSplitButtonHover a.mceOpen, .defaultSkin .mceSplitButtonSelected a.mceOpen {background-color:#B2BBD0; border:1px solid #0A246A;} -.defaultSkin .mceSplitButtonDisabled .mceAction, .defaultSkin .mceSplitButtonDisabled a.mceOpen {opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)} -.defaultSkin .mceSplitButtonActive a.mceAction {border:1px solid #0A246A; background-color:#C2CBE0} -.defaultSkin .mceSplitButtonActive a.mceOpen {border-left:0;} - -/* ColorSplitButton */ -.defaultSkin div.mceColorSplitMenu table {background:#FFF; border:1px solid gray} -.defaultSkin .mceColorSplitMenu td {padding:2px} -.defaultSkin .mceColorSplitMenu a {display:block; width:9px; height:9px; overflow:hidden; border:1px solid #808080} -.defaultSkin .mceColorSplitMenu td.mceMoreColors {padding:1px 3px 1px 1px} -.defaultSkin .mceColorSplitMenu a.mceMoreColors {width:100%; height:auto; text-align:center; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; line-height:20px; border:1px solid #FFF} -.defaultSkin .mceColorSplitMenu a.mceMoreColors:hover {border:1px solid #0A246A; background-color:#B6BDD2} -.defaultSkin a.mceMoreColors:hover {border:1px solid #0A246A} -.defaultSkin .mceColorPreview {margin-left:2px; width:16px; height:4px; overflow:hidden; background:#9a9b9a} -.defaultSkin .mce_forecolor span.mceAction, .defaultSkin .mce_backcolor span.mceAction {overflow:hidden; height:16px} - -/* Menu */ -.defaultSkin .mceMenu {position:absolute; left:0; top:0; z-index:1000; border:1px solid #D4D0C8; direction:ltr} -.defaultSkin .mceNoIcons span.mceIcon {width:0;} -.defaultSkin .mceNoIcons a .mceText {padding-left:10px} -.defaultSkin .mceMenu table {background:#FFF} -.defaultSkin .mceMenu a, .defaultSkin .mceMenu span, .defaultSkin .mceMenu {display:block} -.defaultSkin .mceMenu td {height:20px} -.defaultSkin .mceMenu a {position:relative;padding:3px 0 4px 0} -.defaultSkin .mceMenu .mceText {position:relative; display:block; font-family:Tahoma,Verdana,Arial,Helvetica; color:#000; cursor:default; margin:0; padding:0 25px 0 25px; display:block} -.defaultSkin .mceMenu span.mceText, .defaultSkin .mceMenu .mcePreview {font-size:11px} -.defaultSkin .mceMenu pre.mceText {font-family:Monospace} -.defaultSkin .mceMenu .mceIcon {position:absolute; top:0; left:0; width:22px;} -.defaultSkin .mceMenu .mceMenuItemEnabled a:hover, .defaultSkin .mceMenu .mceMenuItemActive {background-color:#dbecf3} -.defaultSkin td.mceMenuItemSeparator {background:#DDD; height:1px} -.defaultSkin .mceMenuItemTitle a {border:0; background:#EEE; border-bottom:1px solid #DDD} -.defaultSkin .mceMenuItemTitle span.mceText {color:#000; font-weight:bold; padding-left:4px} -.defaultSkin .mceMenuItemDisabled .mceText {color:#888} -.defaultSkin .mceMenuItemSelected .mceIcon {background:url(img/menu_check.gif)} -.defaultSkin .mceNoIcons .mceMenuItemSelected a {background:url(img/menu_arrow.gif) no-repeat -6px center} -.defaultSkin .mceMenu span.mceMenuLine {display:none} -.defaultSkin .mceMenuItemSub a {background:url(img/menu_arrow.gif) no-repeat top right;} -.defaultSkin .mceMenuItem td, .defaultSkin .mceMenuItem th {line-height: normal} - -/* Progress,Resize */ -.defaultSkin .mceBlocker {position:absolute; left:0; top:0; z-index:1000; opacity:0.5; -ms-filter:'alpha(opacity=50)'; filter:alpha(opacity=50); background:#FFF} -.defaultSkin .mceProgress {position:absolute; left:0; top:0; z-index:1001; background:url(img/progress.gif) no-repeat; width:32px; height:32px; margin:-16px 0 0 -16px} - -/* Rtl */ -.mceRtl .mceListBox .mceText {text-align: right; padding: 0 4px 0 0} -.mceRtl .mceMenuItem .mceText {text-align: right} - -/* Formats */ -.defaultSkin .mce_formatPreview a {font-size:10px} -.defaultSkin .mce_p span.mceText {} -.defaultSkin .mce_address span.mceText {font-style:italic} -.defaultSkin .mce_pre span.mceText {font-family:monospace} -.defaultSkin .mce_h1 span.mceText {font-weight:bolder; font-size: 2em} -.defaultSkin .mce_h2 span.mceText {font-weight:bolder; font-size: 1.5em} -.defaultSkin .mce_h3 span.mceText {font-weight:bolder; font-size: 1.17em} -.defaultSkin .mce_h4 span.mceText {font-weight:bolder; font-size: 1em} -.defaultSkin .mce_h5 span.mceText {font-weight:bolder; font-size: .83em} -.defaultSkin .mce_h6 span.mceText {font-weight:bolder; font-size: .75em} - -/* Theme */ -.defaultSkin span.mce_bold {background-position:0 0} -.defaultSkin span.mce_italic {background-position:-60px 0} -.defaultSkin span.mce_underline {background-position:-140px 0} -.defaultSkin span.mce_strikethrough {background-position:-120px 0} -.defaultSkin span.mce_undo {background-position:-160px 0} -.defaultSkin span.mce_redo {background-position:-100px 0} -.defaultSkin span.mce_cleanup {background-position:-40px 0} -.defaultSkin span.mce_bullist {background-position:-20px 0} -.defaultSkin span.mce_numlist {background-position:-80px 0} -.defaultSkin span.mce_justifyleft {background-position:-460px 0} -.defaultSkin span.mce_justifyright {background-position:-480px 0} -.defaultSkin span.mce_justifycenter {background-position:-420px 0} -.defaultSkin span.mce_justifyfull {background-position:-440px 0} -.defaultSkin span.mce_anchor {background-position:-200px 0} -.defaultSkin span.mce_indent {background-position:-400px 0} -.defaultSkin span.mce_outdent {background-position:-540px 0} -.defaultSkin span.mce_link {background-position:-500px 0} -.defaultSkin span.mce_unlink {background-position:-640px 0} -.defaultSkin span.mce_sub {background-position:-600px 0} -.defaultSkin span.mce_sup {background-position:-620px 0} -.defaultSkin span.mce_removeformat {background-position:-580px 0} -.defaultSkin span.mce_newdocument {background-position:-520px 0} -.defaultSkin span.mce_image {background-position:-380px 0} -.defaultSkin span.mce_help {background-position:-340px 0} -.defaultSkin span.mce_code {background-position:-260px 0} -.defaultSkin span.mce_hr {background-position:-360px 0} -.defaultSkin span.mce_visualaid {background-position:-660px 0} -.defaultSkin span.mce_charmap {background-position:-240px 0} -.defaultSkin span.mce_paste {background-position:-560px 0} -.defaultSkin span.mce_copy {background-position:-700px 0} -.defaultSkin span.mce_cut {background-position:-680px 0} -.defaultSkin span.mce_blockquote {background-position:-220px 0} -.defaultSkin .mce_forecolor span.mceAction {background-position:-720px 0} -.defaultSkin .mce_backcolor span.mceAction {background-position:-760px 0} -.defaultSkin span.mce_forecolorpicker {background-position:-720px 0} -.defaultSkin span.mce_backcolorpicker {background-position:-760px 0} - -/* Plugins */ -.defaultSkin span.mce_advhr {background-position:-0px -20px} -.defaultSkin span.mce_ltr {background-position:-20px -20px} -.defaultSkin span.mce_rtl {background-position:-40px -20px} -.defaultSkin span.mce_emotions {background-position:-60px -20px} -.defaultSkin span.mce_fullpage {background-position:-80px -20px} -.defaultSkin span.mce_fullscreen {background-position:-100px -20px} -.defaultSkin span.mce_iespell {background-position:-120px -20px} -.defaultSkin span.mce_insertdate {background-position:-140px -20px} -.defaultSkin span.mce_inserttime {background-position:-160px -20px} -.defaultSkin span.mce_absolute {background-position:-180px -20px} -.defaultSkin span.mce_backward {background-position:-200px -20px} -.defaultSkin span.mce_forward {background-position:-220px -20px} -.defaultSkin span.mce_insert_layer {background-position:-240px -20px} -.defaultSkin span.mce_insertlayer {background-position:-260px -20px} -.defaultSkin span.mce_movebackward {background-position:-280px -20px} -.defaultSkin span.mce_moveforward {background-position:-300px -20px} -.defaultSkin span.mce_media {background-position:-320px -20px} -.defaultSkin span.mce_nonbreaking {background-position:-340px -20px} -.defaultSkin span.mce_pastetext {background-position:-360px -20px} -.defaultSkin span.mce_pasteword {background-position:-380px -20px} -.defaultSkin span.mce_selectall {background-position:-400px -20px} -.defaultSkin span.mce_preview {background-position:-420px -20px} -.defaultSkin span.mce_print {background-position:-440px -20px} -.defaultSkin span.mce_cancel {background-position:-460px -20px} -.defaultSkin span.mce_save {background-position:-480px -20px} -.defaultSkin span.mce_replace {background-position:-500px -20px} -.defaultSkin span.mce_search {background-position:-520px -20px} -.defaultSkin span.mce_styleprops {background-position:-560px -20px} -.defaultSkin span.mce_table {background-position:-580px -20px} -.defaultSkin span.mce_cell_props {background-position:-600px -20px} -.defaultSkin span.mce_delete_table {background-position:-620px -20px} -.defaultSkin span.mce_delete_col {background-position:-640px -20px} -.defaultSkin span.mce_delete_row {background-position:-660px -20px} -.defaultSkin span.mce_col_after {background-position:-680px -20px} -.defaultSkin span.mce_col_before {background-position:-700px -20px} -.defaultSkin span.mce_row_after {background-position:-720px -20px} -.defaultSkin span.mce_row_before {background-position:-740px -20px} -.defaultSkin span.mce_merge_cells {background-position:-760px -20px} -.defaultSkin span.mce_table_props {background-position:-980px -20px} -.defaultSkin span.mce_row_props {background-position:-780px -20px} -.defaultSkin span.mce_split_cells {background-position:-800px -20px} -.defaultSkin span.mce_template {background-position:-820px -20px} -.defaultSkin span.mce_visualchars {background-position:-840px -20px} -.defaultSkin span.mce_abbr {background-position:-860px -20px} -.defaultSkin span.mce_acronym {background-position:-880px -20px} -.defaultSkin span.mce_attribs {background-position:-900px -20px} -.defaultSkin span.mce_cite {background-position:-920px -20px} -.defaultSkin span.mce_del {background-position:-940px -20px} -.defaultSkin span.mce_ins {background-position:-960px -20px} -.defaultSkin span.mce_pagebreak {background-position:0 -40px} -.defaultSkin span.mce_restoredraft {background-position:-20px -40px} -.defaultSkin span.mce_spellchecker {background-position:-540px -20px} -.defaultSkin span.mce_visualblocks {background-position: -40px -40px} diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/skins/highcontrast/content.css b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/skins/highcontrast/content.css deleted file mode 100644 index cbce6c6a21..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/skins/highcontrast/content.css +++ /dev/null @@ -1,24 +0,0 @@ -body, td, pre { margin:8px;} -body.mceForceColors {background:#FFF; color:#000;} -h1 {font-size: 2em} -h2 {font-size: 1.5em} -h3 {font-size: 1.17em} -h4 {font-size: 1em} -h5 {font-size: .83em} -h6 {font-size: .75em} -.mceItemTable, .mceItemTable td, .mceItemTable th, .mceItemTable caption, .mceItemVisualAid {border: 1px dashed #BBB;} -a.mceItemAnchor {display:inline-block; width:11px !important; height:11px !important; background:url(../default/img/items.gif) no-repeat 0 0;} -span.mceItemNbsp {background: #DDD} -td.mceSelected, th.mceSelected {background-color:#3399ff !important} -img {border:0;} -table, img, hr, .mceItemAnchor {cursor:default} -table td, table th {cursor:text} -ins {border-bottom:1px solid green; text-decoration: none; color:green} -del {color:red; text-decoration:line-through} -cite {border-bottom:1px dashed blue} -acronym {border-bottom:1px dotted #CCC; cursor:help} -abbr {border-bottom:1px dashed #CCC; cursor:help} - -img:-moz-broken {-moz-force-broken-image-icon:1; width:24px; height:24px} -font[face=mceinline] {font-family:inherit !important} -*[contentEditable]:focus {outline:0} diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/skins/highcontrast/dialog.css b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/skins/highcontrast/dialog.css deleted file mode 100644 index 6d9fc8dd65..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/skins/highcontrast/dialog.css +++ /dev/null @@ -1,106 +0,0 @@ -/* Generic */ -body { -font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px; -background:#F0F0EE; -color: black; -padding:0; -margin:8px 8px 0 8px; -} - -html {background:#F0F0EE; color:#000;} -td {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;} -textarea {resize:none;outline:none;} -a:link, a:visited {color:black;background-color:transparent;} -a:hover {color:#2B6FB6;background-color:transparent;} -.nowrap {white-space: nowrap} - -/* Forms */ -fieldset {margin:0; padding:4px; border:1px solid #919B9C; font-family:Verdana, Arial; font-size:10px;} -legend {color:#2B6FB6; font-weight:bold;} -label.msg {display:none;} -label.invalid {color:#EE0000; display:inline;background-color:transparent;} -input.invalid {border:1px solid #EE0000;background-color:transparent;} -input {background:#FFF; border:1px solid #CCC;color:black;} -input, select, textarea {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;} -input, select, textarea {border:1px solid #808080;} -input.radio {border:1px none #000000; background:transparent; vertical-align:middle;} -input.checkbox {border:1px none #000000; background:transparent; vertical-align:middle;} -.input_noborder {border:0;} - -/* Buttons */ -#insert, #cancel, input.button, .updateButton { -font-weight:bold; -width:94px; height:23px; -cursor:pointer; -padding-bottom:2px; -float:left; -} - -#cancel {float:right} - -/* Browse */ -a.pickcolor, a.browse {text-decoration:none} -a.browse span {display:block; width:20px; height:18px; background:url(../../img/icons.gif) -860px 0; border:1px solid #FFF; margin-left:1px;} -.mceOldBoxModel a.browse span {width:22px; height:20px;} -a.browse:hover span {border:1px solid #0A246A; background-color:#B2BBD0;} -a.browse span.disabled {border:1px solid white; opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)} -a.browse:hover span.disabled {border:1px solid white; background-color:transparent;} -a.pickcolor span {display:block; width:20px; height:16px; background:url(../../img/icons.gif) -840px 0; margin-left:2px;} -.mceOldBoxModel a.pickcolor span {width:21px; height:17px;} -a.pickcolor:hover span {background-color:#B2BBD0;} -a.pickcolor:hover span.disabled {} - -/* Charmap */ -table.charmap {border:1px solid #AAA; text-align:center} -td.charmap, #charmap a {width:18px; height:18px; color:#000; border:1px solid #AAA; text-align:center; font-size:12px; vertical-align:middle; line-height: 18px;} -#charmap a {display:block; color:#000; text-decoration:none; border:0} -#charmap a:hover {background:#CCC;color:#2B6FB6} -#charmap #codeN {font-size:10px; font-family:Arial,Helvetica,sans-serif; text-align:center} -#charmap #codeV {font-size:40px; height:80px; border:1px solid #AAA; text-align:center} - -/* Source */ -.wordWrapCode {vertical-align:middle; border:1px none #000000; background:transparent;} -.mceActionPanel {margin-top:5px;} - -/* Tabs classes */ -.tabs {width:100%; height:18px; line-height:normal;} -.tabs ul {margin:0; padding:0; list-style:none;} -.tabs li {float:left; border: 1px solid black; border-bottom:0; margin:0 2px 0 0; padding:0 0 0 10px; line-height:17px; height:18px; display:block; cursor:pointer;} -.tabs li.current {font-weight: bold; margin-right:2px;} -.tabs span {float:left; display:block; padding:0px 10px 0 0;} -.tabs a {text-decoration:none; font-family:Verdana, Arial; font-size:10px;} -.tabs a:link, .tabs a:visited, .tabs a:hover {color:black;} - -/* Panels */ -.panel_wrapper div.panel {display:none;} -.panel_wrapper div.current {display:block; width:100%; height:300px; overflow:visible;} -.panel_wrapper {border:1px solid #919B9C; padding:10px; padding-top:5px; clear:both; background:white;} - -/* Columns */ -.column {float:left;} -.properties {width:100%;} -.properties .column1 {} -.properties .column2 {text-align:left;} - -/* Titles */ -h1, h2, h3, h4 {color:#2B6FB6; margin:0; padding:0; padding-top:5px;} -h3 {font-size:14px;} -.title {font-size:12px; font-weight:bold; color:#2B6FB6;} - -/* Dialog specific */ -#link .panel_wrapper, #link div.current {height:125px;} -#image .panel_wrapper, #image div.current {height:200px;} -#plugintable thead {font-weight:bold; background:#DDD;} -#plugintable, #about #plugintable td {border:1px solid #919B9C;} -#plugintable {width:96%; margin-top:10px;} -#pluginscontainer {height:290px; overflow:auto;} -#colorpicker #preview {display:inline-block; padding-left:40px; height:14px; border:1px solid black; margin-left:5px; margin-right: 5px} -#colorpicker #previewblock {position: relative; top: -3px; padding-left:5px; padding-top: 0px; display:inline} -#colorpicker #preview_wrapper { text-align:center; padding-top:4px; white-space: nowrap} -#colorpicker #colors {float:left; border:1px solid gray; cursor:crosshair;} -#colorpicker #light {border:1px solid gray; margin-left:5px; float:left;width:15px; height:150px; cursor:crosshair;} -#colorpicker #light div {overflow:hidden;} -#colorpicker .panel_wrapper div.current {height:175px;} -#colorpicker #namedcolors {width:150px;} -#colorpicker #namedcolors a {display:block; float:left; width:10px; height:10px; margin:1px 1px 0 0; overflow:hidden;} -#colorpicker #colornamecontainer {margin-top:5px;} diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/skins/highcontrast/ui.css b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/skins/highcontrast/ui.css deleted file mode 100644 index effbbe1583..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/skins/highcontrast/ui.css +++ /dev/null @@ -1,106 +0,0 @@ -/* Reset */ -.highcontrastSkin table, .highcontrastSkin tbody, .highcontrastSkin a, .highcontrastSkin img, .highcontrastSkin tr, .highcontrastSkin div, .highcontrastSkin td, .highcontrastSkin iframe, .highcontrastSkin span, .highcontrastSkin *, .highcontrastSkin .mceText {border:0; margin:0; padding:0; vertical-align:baseline; border-collapse:separate;} -.highcontrastSkin a:hover, .highcontrastSkin a:link, .highcontrastSkin a:visited, .highcontrastSkin a:active {text-decoration:none; font-weight:normal; cursor:default;} -.highcontrastSkin table td {vertical-align:middle} - -.highcontrastSkin .mceIconOnly {display: block !important;} - -/* External */ -.highcontrastSkin .mceExternalToolbar {position:absolute; border:1px solid; border-bottom:0; display:none; background-color: white;} -.highcontrastSkin .mceExternalToolbar td.mceToolbar {padding-right:13px;} -.highcontrastSkin .mceExternalClose {position:absolute; top:3px; right:3px; width:7px; height:7px;} - -/* Layout */ -.highcontrastSkin table.mceLayout {border: 1px solid;} -.highcontrastSkin .mceIframeContainer {border-top:1px solid; border-bottom:1px solid} -.highcontrastSkin .mceStatusbar a:hover {text-decoration:underline} -.highcontrastSkin .mceStatusbar {display:block; line-height:1.5em; overflow:visible;} -.highcontrastSkin .mceStatusbar div {float:left} -.highcontrastSkin .mceStatusbar a.mceResize {display:block; float:right; width:20px; height:20px; cursor:se-resize; outline:0} - -.highcontrastSkin .mceToolbar td { display: inline-block; float: left;} -.highcontrastSkin .mceToolbar tr { display: block;} -.highcontrastSkin .mceToolbar table { display: block; } - -/* Button */ - -.highcontrastSkin .mceButton { display:block; margin: 2px; padding: 5px 10px;border: 1px solid; border-radius: 3px; -moz-border-radius: 3px; -webkit-border-radius: 3px; -ms-border-radius: 3px; height: 2em;} -.highcontrastSkin .mceButton .mceVoiceLabel { height: 100%; vertical-align: center; line-height: 2em} -.highcontrastSkin .mceButtonDisabled .mceVoiceLabel { opacity:0.6; -ms-filter:'alpha(opacity=60)'; filter:alpha(opacity=60);} -.highcontrastSkin .mceButtonActive, .highcontrastSkin .mceButton:focus, .highcontrastSkin .mceButton:active { border: 5px solid; padding: 1px 6px;-webkit-focus-ring-color:none;outline:none;} - -/* Separator */ -.highcontrastSkin .mceSeparator {display:block; width:16px; height:26px;} - -/* ListBox */ -.highcontrastSkin .mceListBox { display: block; margin:2px;-webkit-focus-ring-color:none;outline:none;} -.highcontrastSkin .mceListBox .mceText {padding: 5px 6px; line-height: 2em; width: 15ex; overflow: hidden;} -.highcontrastSkin .mceListBoxDisabled .mceText { opacity:0.6; -ms-filter:'alpha(opacity=60)'; filter:alpha(opacity=60);} -.highcontrastSkin .mceListBox a.mceText { padding: 5px 10px; display: block; height: 2em; line-height: 2em; border: 1px solid; border-right: 0; border-radius: 3px 0px 0px 3px; -moz-border-radius: 3px 0px 0px 3px; -webkit-border-radius: 3px 0px 0px 3px; -ms-border-radius: 3px 0px 0px 3px;} -.highcontrastSkin .mceListBox a.mceOpen { padding: 5px 4px; display: block; height: 2em; line-height: 2em; border: 1px solid; border-left: 0; border-radius: 0px 3px 3px 0px; -moz-border-radius: 0px 3px 3px 0px; -webkit-border-radius: 0px 3px 3px 0px; -ms-border-radius: 0px 3px 3px 0px;} -.highcontrastSkin .mceListBox:focus a.mceText, .highcontrastSkin .mceListBox:active a.mceText { border-width: 5px; padding: 1px 10px 1px 6px;} -.highcontrastSkin .mceListBox:focus a.mceOpen, .highcontrastSkin .mceListBox:active a.mceOpen { border-width: 5px; padding: 1px 0px 1px 4px;} - -.highcontrastSkin .mceListBoxMenu {overflow-y:auto} - -/* SplitButton */ -.highcontrastSkin .mceSplitButtonDisabled .mceAction {opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)} - -.highcontrastSkin .mceSplitButton { border-collapse: collapse; margin: 2px; height: 2em; line-height: 2em;-webkit-focus-ring-color:none;outline:none;} -.highcontrastSkin .mceSplitButton td { display: table-cell; float: none; margin: 0; padding: 0; height: 2em;} -.highcontrastSkin .mceSplitButton tr { display: table-row; } -.highcontrastSkin table.mceSplitButton { display: table; } -.highcontrastSkin .mceSplitButton a.mceAction { padding: 5px 10px; display: block; height: 2em; line-height: 2em; overflow: hidden; border: 1px solid; border-right: 0; border-radius: 3px 0px 0px 3px; -moz-border-radius: 3px 0px 0px 3px; -webkit-border-radius: 3px 0px 0px 3px; -ms-border-radius: 3px 0px 0px 3px;} -.highcontrastSkin .mceSplitButton a.mceOpen { padding: 5px 4px; display: block; height: 2em; line-height: 2em; border: 1px solid; border-radius: 0px 3px 3px 0px; -moz-border-radius: 0px 3px 3px 0px; -webkit-border-radius: 0px 3px 3px 0px; -ms-border-radius: 0px 3px 3px 0px;} -.highcontrastSkin .mceSplitButton .mceVoiceLabel { height: 2em; vertical-align: center; line-height: 2em; } -.highcontrastSkin .mceSplitButton:focus a.mceAction, .highcontrastSkin .mceSplitButton:active a.mceAction { border-width: 5px; border-right-width: 1px; padding: 1px 10px 1px 6px;-webkit-focus-ring-color:none;outline:none;} -.highcontrastSkin .mceSplitButton:focus a.mceOpen, .highcontrastSkin .mceSplitButton:active a.mceOpen { border-width: 5px; border-left-width: 1px; padding: 1px 0px 1px 4px;-webkit-focus-ring-color:none;outline:none;} - -/* Menu */ -.highcontrastSkin .mceNoIcons span.mceIcon {width:0;} -.highcontrastSkin .mceMenu {position:absolute; left:0; top:0; z-index:1000; border:1px solid; direction:ltr} -.highcontrastSkin .mceMenu table {background:white; color: black} -.highcontrastSkin .mceNoIcons a .mceText {padding-left:10px} -.highcontrastSkin .mceMenu a, .highcontrastSkin .mceMenu span, .highcontrastSkin .mceMenu {display:block;background:white; color: black} -.highcontrastSkin .mceMenu td {height:2em} -.highcontrastSkin .mceMenu a {position:relative;padding:3px 0 4px 0; display: block;} -.highcontrastSkin .mceMenu .mceText {position:relative; display:block; cursor:default; margin:0; padding:0 25px 0 25px;} -.highcontrastSkin .mceMenu pre.mceText {font-family:Monospace} -.highcontrastSkin .mceMenu .mceIcon {position:absolute; top:0; left:0; width:26px;} -.highcontrastSkin td.mceMenuItemSeparator {border-top:1px solid; height:1px} -.highcontrastSkin .mceMenuItemTitle a {border:0; border-bottom:1px solid} -.highcontrastSkin .mceMenuItemTitle span.mceText {font-weight:bold; padding-left:4px} -.highcontrastSkin .mceNoIcons .mceMenuItemSelected span.mceText:before {content: "\2713\A0";} -.highcontrastSkin .mceMenu span.mceMenuLine {display:none} -.highcontrastSkin .mceMenuItemSub a .mceText:after {content: "\A0\25B8"} -.highcontrastSkin .mceMenuItem td, .highcontrastSkin .mceMenuItem th {line-height: normal} - -/* ColorSplitButton */ -.highcontrastSkin div.mceColorSplitMenu table {background:#FFF; border:1px solid; color: #000} -.highcontrastSkin .mceColorSplitMenu td {padding:2px} -.highcontrastSkin .mceColorSplitMenu a {display:block; width:16px; height:16px; overflow:hidden; color:#000; margin: 0; padding: 0;} -.highcontrastSkin .mceColorSplitMenu td.mceMoreColors {padding:1px 3px 1px 1px} -.highcontrastSkin .mceColorSplitMenu a.mceMoreColors {width:100%; height:auto; text-align:center; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; line-height:20px; border:1px solid #FFF} -.highcontrastSkin .mceColorSplitMenu a.mceMoreColors:hover {border:1px solid; background-color:#B6BDD2} -.highcontrastSkin a.mceMoreColors:hover {border:1px solid #0A246A; color: #000;} -.highcontrastSkin .mceColorPreview {display:none;} -.highcontrastSkin .mce_forecolor span.mceAction, .highcontrastSkin .mce_backcolor span.mceAction {height:17px;overflow:hidden} - -/* Progress,Resize */ -.highcontrastSkin .mceBlocker {position:absolute; left:0; top:0; z-index:1000; opacity:0.5; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=50); background:#FFF} -.highcontrastSkin .mceProgress {position:absolute; left:0; top:0; z-index:1001; background:url(../default/img/progress.gif) no-repeat; width:32px; height:32px; margin:-16px 0 0 -16px} - -/* Rtl */ -.mceRtl .mceListBox .mceText {text-align: right; padding: 0 4px 0 0} -.mceRtl .mceMenuItem .mceText {text-align: right} - -/* Formats */ -.highcontrastSkin .mce_p span.mceText {} -.highcontrastSkin .mce_address span.mceText {font-style:italic} -.highcontrastSkin .mce_pre span.mceText {font-family:monospace} -.highcontrastSkin .mce_h1 span.mceText {font-weight:bolder; font-size: 2em} -.highcontrastSkin .mce_h2 span.mceText {font-weight:bolder; font-size: 1.5em} -.highcontrastSkin .mce_h3 span.mceText {font-weight:bolder; font-size: 1.17em} -.highcontrastSkin .mce_h4 span.mceText {font-weight:bolder; font-size: 1em} -.highcontrastSkin .mce_h5 span.mceText {font-weight:bolder; font-size: .83em} -.highcontrastSkin .mce_h6 span.mceText {font-weight:bolder; font-size: .75em} diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/skins/o2k7/content.css b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/skins/o2k7/content.css deleted file mode 100644 index a1a8f9bd32..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/skins/o2k7/content.css +++ /dev/null @@ -1,48 +0,0 @@ -body, td, pre {color:#000; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px; margin:8px;} -body {background:#FFF;} -body.mceForceColors {background:#FFF; color:#000;} -h1 {font-size: 2em} -h2 {font-size: 1.5em} -h3 {font-size: 1.17em} -h4 {font-size: 1em} -h5 {font-size: .83em} -h6 {font-size: .75em} -.mceItemTable, .mceItemTable td, .mceItemTable th, .mceItemTable caption, .mceItemVisualAid {border: 1px dashed #BBB;} -a.mceItemAnchor {display:inline-block; width:11px !important; height:11px !important; background:url(../default/img/items.gif) no-repeat 0 0;} -span.mceItemNbsp {background: #DDD} -td.mceSelected, th.mceSelected {background-color:#3399ff !important} -img {border:0;} -table, img, hr, .mceItemAnchor {cursor:default} -table td, table th {cursor:text} -ins {border-bottom:1px solid green; text-decoration: none; color:green} -del {color:red; text-decoration:line-through} -cite {border-bottom:1px dashed blue} -acronym {border-bottom:1px dotted #CCC; cursor:help} -abbr {border-bottom:1px dashed #CCC; cursor:help} - -/* IE */ -* html body { -scrollbar-3dlight-color:#F0F0EE; -scrollbar-arrow-color:#676662; -scrollbar-base-color:#F0F0EE; -scrollbar-darkshadow-color:#DDD; -scrollbar-face-color:#E0E0DD; -scrollbar-highlight-color:#F0F0EE; -scrollbar-shadow-color:#F0F0EE; -scrollbar-track-color:#F5F5F5; -} - -img:-moz-broken {-moz-force-broken-image-icon:1; width:24px; height:24px} -font[face=mceinline] {font-family:inherit !important} -*[contentEditable]:focus {outline:0} - -.mceItemMedia {border:1px dotted #cc0000; background-position:center; background-repeat:no-repeat; background-color:#ffffcc} -.mceItemShockWave {background-image:url(../../img/shockwave.gif)} -.mceItemFlash {background-image:url(../../img/flash.gif)} -.mceItemQuickTime {background-image:url(../../img/quicktime.gif)} -.mceItemWindowsMedia {background-image:url(../../img/windowsmedia.gif)} -.mceItemRealMedia {background-image:url(../../img/realmedia.gif)} -.mceItemVideo {background-image:url(../../img/video.gif)} -.mceItemAudio {background-image:url(../../img/video.gif)} -.mceItemIframe {background-image:url(../../img/iframe.gif)} -.mcePageBreak {display:block;border:0;width:100%;height:12px;border-top:1px dotted #ccc;margin-top:15px;background:#fff url(../../img/pagebreak.gif) no-repeat center top;} diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/skins/o2k7/dialog.css b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/skins/o2k7/dialog.css deleted file mode 100644 index a54db98df1..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/skins/o2k7/dialog.css +++ /dev/null @@ -1,118 +0,0 @@ -/* Generic */ -body { -font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px; -scrollbar-3dlight-color:#F0F0EE; -scrollbar-arrow-color:#676662; -scrollbar-base-color:#F0F0EE; -scrollbar-darkshadow-color:#DDDDDD; -scrollbar-face-color:#E0E0DD; -scrollbar-highlight-color:#F0F0EE; -scrollbar-shadow-color:#F0F0EE; -scrollbar-track-color:#F5F5F5; -background:#F0F0EE; -padding:0; -margin:8px 8px 0 8px; -} - -html {background:#F0F0EE;} -td {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;} -textarea {resize:none;outline:none;} -a:link, a:visited {color:black;} -a:hover {color:#2B6FB6;} -.nowrap {white-space: nowrap} - -/* Forms */ -fieldset {margin:0; padding:4px; border:1px solid #919B9C; font-family:Verdana, Arial; font-size:10px;} -legend {color:#2B6FB6; font-weight:bold;} -label.msg {display:none;} -label.invalid {color:#EE0000; display:inline;} -input.invalid {border:1px solid #EE0000;} -input {background:#FFF; border:1px solid #CCC;} -input, select, textarea {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;} -input, select, textarea {border:1px solid #808080;} -input.radio {border:1px none #000000; background:transparent; vertical-align:middle;} -input.checkbox {border:1px none #000000; background:transparent; vertical-align:middle;} -.input_noborder {border:0;} - -/* Buttons */ -#insert, #cancel, input.button, .updateButton { -border:0; margin:0; padding:0; -font-weight:bold; -width:94px; height:26px; -background:url(../default/img/buttons.png) 0 -26px; -cursor:pointer; -padding-bottom:2px; -float:left; -} - -#insert {background:url(../default/img/buttons.png) 0 -52px} -#cancel {background:url(../default/img/buttons.png) 0 0; float:right} - -/* Browse */ -a.pickcolor, a.browse {text-decoration:none} -a.browse span {display:block; width:20px; height:18px; background:url(../../img/icons.gif) -860px 0; border:1px solid #FFF; margin-left:1px;} -.mceOldBoxModel a.browse span {width:22px; height:20px;} -a.browse:hover span {border:1px solid #0A246A; background-color:#B2BBD0;} -a.browse span.disabled {border:1px solid white; opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)} -a.browse:hover span.disabled {border:1px solid white; background-color:transparent;} -a.pickcolor span {display:block; width:20px; height:16px; background:url(../../img/icons.gif) -840px 0; margin-left:2px;} -.mceOldBoxModel a.pickcolor span {width:21px; height:17px;} -a.pickcolor:hover span {background-color:#B2BBD0;} -a.pickcolor:hover span.disabled {} - -/* Charmap */ -table.charmap {border:1px solid #AAA; text-align:center} -td.charmap, #charmap a {width:18px; height:18px; color:#000; border:1px solid #AAA; text-align:center; font-size:12px; vertical-align:middle; line-height: 18px;} -#charmap a {display:block; color:#000; text-decoration:none; border:0} -#charmap a:hover {background:#CCC;color:#2B6FB6} -#charmap #codeN {font-size:10px; font-family:Arial,Helvetica,sans-serif; text-align:center} -#charmap #codeV {font-size:40px; height:80px; border:1px solid #AAA; text-align:center} - -/* Source */ -.wordWrapCode {vertical-align:middle; border:1px none #000000; background:transparent;} -.mceActionPanel {margin-top:5px;} - -/* Tabs classes */ -.tabs {width:100%; height:18px; line-height:normal; background:url(../default/img/tabs.gif) repeat-x 0 -72px;} -.tabs ul {margin:0; padding:0; list-style:none;} -.tabs li {float:left; background:url(../default/img/tabs.gif) no-repeat 0 0; margin:0 2px 0 0; padding:0 0 0 10px; line-height:17px; height:18px; display:block;} -.tabs li.current {background:url(../default/img/tabs.gif) no-repeat 0 -18px; margin-right:2px;} -.tabs span {float:left; display:block; background:url(../default/img/tabs.gif) no-repeat right -36px; padding:0px 10px 0 0;} -.tabs .current span {background:url(../default/img/tabs.gif) no-repeat right -54px;} -.tabs a {text-decoration:none; font-family:Verdana, Arial; font-size:10px;} -.tabs a:link, .tabs a:visited, .tabs a:hover {color:black;} - -/* Panels */ -.panel_wrapper div.panel {display:none;} -.panel_wrapper div.current {display:block; width:100%; height:300px; overflow:visible;} -.panel_wrapper {border:1px solid #919B9C; border-top:0px; padding:10px; padding-top:5px; clear:both; background:white;} - -/* Columns */ -.column {float:left;} -.properties {width:100%;} -.properties .column1 {} -.properties .column2 {text-align:left;} - -/* Titles */ -h1, h2, h3, h4 {color:#2B6FB6; margin:0; padding:0; padding-top:5px;} -h3 {font-size:14px;} -.title {font-size:12px; font-weight:bold; color:#2B6FB6;} - -/* Dialog specific */ -#link .panel_wrapper, #link div.current {height:125px;} -#image .panel_wrapper, #image div.current {height:200px;} -#plugintable thead {font-weight:bold; background:#DDD;} -#plugintable, #about #plugintable td {border:1px solid #919B9C;} -#plugintable {width:96%; margin-top:10px;} -#pluginscontainer {height:290px; overflow:auto;} -#colorpicker #preview {display:inline-block; padding-left:40px; height:14px; border:1px solid black; margin-left:5px; margin-right: 5px} -#colorpicker #previewblock {position: relative; top: -3px; padding-left:5px; padding-top: 0px; display:inline} -#colorpicker #preview_wrapper { text-align:center; padding-top:4px; white-space: nowrap} -#colorpicker #colors {float:left; border:1px solid gray; cursor:crosshair;} -#colorpicker #light {border:1px solid gray; margin-left:5px; float:left;width:15px; height:150px; cursor:crosshair;} -#colorpicker #light div {overflow:hidden;} -#colorpicker .panel_wrapper div.current {height:175px;} -#colorpicker #namedcolors {width:150px;} -#colorpicker #namedcolors a {display:block; float:left; width:10px; height:10px; margin:1px 1px 0 0; overflow:hidden;} -#colorpicker #colornamecontainer {margin-top:5px;} -#colorpicker #picker_panel fieldset {margin:auto;width:325px;} diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/skins/o2k7/img/button_bg.png b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/skins/o2k7/img/button_bg.png deleted file mode 100644 index 13a5cb0309..0000000000 Binary files a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/skins/o2k7/img/button_bg.png and /dev/null differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/skins/o2k7/img/button_bg_black.png b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/skins/o2k7/img/button_bg_black.png deleted file mode 100644 index 7fc57f2bc2..0000000000 Binary files a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/skins/o2k7/img/button_bg_black.png and /dev/null differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/skins/o2k7/img/button_bg_silver.png b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/skins/o2k7/img/button_bg_silver.png deleted file mode 100644 index c0dcc6cac2..0000000000 Binary files a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/skins/o2k7/img/button_bg_silver.png and /dev/null differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/skins/o2k7/ui.css b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/skins/o2k7/ui.css deleted file mode 100644 index a310223719..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/skins/o2k7/ui.css +++ /dev/null @@ -1,222 +0,0 @@ -/* Reset */ -.o2k7Skin table, .o2k7Skin tbody, .o2k7Skin a, .o2k7Skin img, .o2k7Skin tr, .o2k7Skin div, .o2k7Skin td, .o2k7Skin iframe, .o2k7Skin span, .o2k7Skin *, .o2k7Skin .mceText {border:0; margin:0; padding:0; background:transparent; white-space:nowrap; text-decoration:none; font-weight:normal; cursor:default; color:#000; vertical-align:baseline; width:auto; border-collapse:separate; text-align:left} -.o2k7Skin a:hover, .o2k7Skin a:link, .o2k7Skin a:visited, .o2k7Skin a:active {text-decoration:none; font-weight:normal; cursor:default; color:#000} -.o2k7Skin table td {vertical-align:middle} - -/* Containers */ -.o2k7Skin table {background:transparent} -.o2k7Skin iframe {display:block;} -.o2k7Skin .mceToolbar {height:26px} - -/* External */ -.o2k7Skin .mceExternalToolbar {position:absolute; border:1px solid #ABC6DD; border-bottom:0; display:none} -.o2k7Skin .mceExternalToolbar td.mceToolbar {padding-right:13px;} -.o2k7Skin .mceExternalClose {position:absolute; top:3px; right:3px; width:7px; height:7px; background:url(../../img/icons.gif) -820px 0} - -/* Layout */ -.o2k7Skin table.mceLayout {border:0; border-left:1px solid #ABC6DD; border-right:1px solid #ABC6DD} -.o2k7Skin table.mceLayout tr.mceFirst td {border-top:1px solid #ABC6DD} -.o2k7Skin table.mceLayout tr.mceLast td {border-bottom:1px solid #ABC6DD} -.o2k7Skin table.mceToolbar, .o2k7Skin tr.mceFirst .mceToolbar tr td, .o2k7Skin tr.mceLast .mceToolbar tr td {border:0; margin:0; padding:0} -.o2k7Skin .mceIframeContainer {border-top:1px solid #ABC6DD; border-bottom:1px solid #ABC6DD} -.o2k7Skin td.mceToolbar{background:#E5EFFD} -.o2k7Skin .mceStatusbar {background:#E5EFFD; display:block; font-family:'MS Sans Serif',sans-serif,Verdana,Arial; font-size:9pt; line-height:16px; overflow:visible; color:#000; height:20px} -.o2k7Skin .mceStatusbar div {float:left; padding:2px} -.o2k7Skin .mceStatusbar a.mceResize {display:block; float:right; background:url(../../img/icons.gif) -800px 0; width:20px; height:20px; cursor:se-resize; outline:0} -.o2k7Skin .mceStatusbar a:hover {text-decoration:underline} -.o2k7Skin table.mceToolbar {margin-left:3px} -.o2k7Skin .mceToolbar .mceToolbarStart span {display:block; background:url(img/button_bg.png) -22px 0; width:1px; height:22px; margin-left:3px;} -.o2k7Skin .mceToolbar td.mceFirst span {margin:0} -.o2k7Skin .mceToolbar .mceToolbarEnd span {display:block; background:url(img/button_bg.png) -22px 0; width:1px; height:22px} -.o2k7Skin .mceToolbar .mceToolbarEndListBox span, .o2k7Skin .mceToolbar .mceToolbarStartListBox span {display:none} -.o2k7Skin span.mceIcon, .o2k7Skin img.mceIcon {display:block; width:20px; height:20px} -.o2k7Skin .mceIcon {background:url(../../img/icons.gif) no-repeat 20px 20px} -.o2k7Skin td.mceCenter {text-align:center;} -.o2k7Skin td.mceCenter table {margin:0 auto; text-align:left;} -.o2k7Skin td.mceRight table {margin:0 0 0 auto;} - -/* Button */ -.o2k7Skin .mceButton {display:block; background:url(img/button_bg.png); width:22px; height:22px} -.o2k7Skin a.mceButton span, .o2k7Skin a.mceButton img {margin-left:1px} -.o2k7Skin .mceOldBoxModel a.mceButton span, .o2k7Skin .mceOldBoxModel a.mceButton img {margin:0 0 0 1px} -.o2k7Skin a.mceButtonEnabled:hover {background-color:#B2BBD0; background-position:0 -22px} -.o2k7Skin a.mceButtonActive, .o2k7Skin a.mceButtonSelected {background-position:0 -44px} -.o2k7Skin .mceButtonDisabled .mceIcon {opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)} -.o2k7Skin .mceButtonLabeled {width:auto} -.o2k7Skin .mceButtonLabeled span.mceIcon {float:left} -.o2k7Skin span.mceButtonLabel {display:block; font-size:10px; padding:4px 6px 0 22px; font-family:Tahoma,Verdana,Arial,Helvetica} -.o2k7Skin .mceButtonDisabled .mceButtonLabel {color:#888} - -/* Separator */ -.o2k7Skin .mceSeparator {display:block; background:url(img/button_bg.png) -22px 0; width:5px; height:22px} - -/* ListBox */ -.o2k7Skin .mceListBox {padding-left: 3px} -.o2k7Skin .mceListBox, .o2k7Skin .mceListBox a {display:block} -.o2k7Skin .mceListBox .mceText {padding-left:4px; text-align:left; width:70px; border:1px solid #b3c7e1; border-right:0; background:#eaf2fb; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; height:20px; line-height:20px; overflow:hidden} -.o2k7Skin .mceListBox .mceOpen {width:14px; height:22px; background:url(img/button_bg.png) -66px 0} -.o2k7Skin table.mceListBoxEnabled:hover .mceText, .o2k7Skin .mceListBoxHover .mceText, .o2k7Skin .mceListBoxSelected .mceText {background:#FFF} -.o2k7Skin table.mceListBoxEnabled:hover .mceOpen, .o2k7Skin .mceListBoxHover .mceOpen, .o2k7Skin .mceListBoxSelected .mceOpen {background-position:-66px -22px} -.o2k7Skin .mceListBoxDisabled .mceText {color:gray} -.o2k7Skin .mceListBoxMenu {overflow:auto; overflow-x:hidden; margin-left:3px} -.o2k7Skin .mceOldBoxModel .mceListBox .mceText {height:22px} -.o2k7Skin select.mceListBox {font-family:Tahoma,Verdana,Arial,Helvetica; font-size:12px; border:1px solid #b3c7e1; background:#FFF;} - -/* SplitButton */ -.o2k7Skin .mceSplitButton, .o2k7Skin .mceSplitButton a, .o2k7Skin .mceSplitButton span {display:block; height:22px; direction:ltr} -.o2k7Skin .mceSplitButton {background:url(img/button_bg.png)} -.o2k7Skin .mceSplitButton a.mceAction {width:22px} -.o2k7Skin .mceSplitButton span.mceAction {width:22px; background-image:url(../../img/icons.gif)} -.o2k7Skin .mceSplitButton a.mceOpen {width:10px; background:url(img/button_bg.png) -44px 0} -.o2k7Skin .mceSplitButton span.mceOpen {display:none} -.o2k7Skin table.mceSplitButtonEnabled:hover a.mceAction, .o2k7Skin .mceSplitButtonHover a.mceAction, .o2k7Skin .mceSplitButtonSelected {background:url(img/button_bg.png) 0 -22px} -.o2k7Skin table.mceSplitButtonEnabled:hover a.mceOpen, .o2k7Skin .mceSplitButtonHover a.mceOpen, .o2k7Skin .mceSplitButtonSelected a.mceOpen {background-position:-44px -44px} -.o2k7Skin .mceSplitButtonDisabled .mceAction {opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)} -.o2k7Skin .mceSplitButtonActive {background-position:0 -44px} - -/* ColorSplitButton */ -.o2k7Skin div.mceColorSplitMenu table {background:#FFF; border:1px solid gray} -.o2k7Skin .mceColorSplitMenu td {padding:2px} -.o2k7Skin .mceColorSplitMenu a {display:block; width:9px; height:9px; overflow:hidden; border:1px solid #808080} -.o2k7Skin .mceColorSplitMenu td.mceMoreColors {padding:1px 3px 1px 1px} -.o2k7Skin .mceColorSplitMenu a.mceMoreColors {width:100%; height:auto; text-align:center; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; line-height:20px; border:1px solid #FFF} -.o2k7Skin .mceColorSplitMenu a.mceMoreColors:hover {border:1px solid #0A246A; background-color:#B6BDD2} -.o2k7Skin a.mceMoreColors:hover {border:1px solid #0A246A} -.o2k7Skin .mceColorPreview {margin-left:2px; width:16px; height:4px; overflow:hidden; background:#9a9b9a;overflow:hidden} -.o2k7Skin .mce_forecolor span.mceAction, .o2k7Skin .mce_backcolor span.mceAction {height:15px;overflow:hidden} - -/* Menu */ -.o2k7Skin .mceMenu {position:absolute; left:0; top:0; z-index:1000; border:1px solid #ABC6DD; direction:ltr} -.o2k7Skin .mceNoIcons span.mceIcon {width:0;} -.o2k7Skin .mceNoIcons a .mceText {padding-left:10px} -.o2k7Skin .mceMenu table {background:#FFF} -.o2k7Skin .mceMenu a, .o2k7Skin .mceMenu span, .o2k7Skin .mceMenu {display:block} -.o2k7Skin .mceMenu td {height:20px} -.o2k7Skin .mceMenu a {position:relative;padding:3px 0 4px 0} -.o2k7Skin .mceMenu .mceText {position:relative; display:block; font-family:Tahoma,Verdana,Arial,Helvetica; color:#000; cursor:default; margin:0; padding:0 25px 0 25px; display:block} -.o2k7Skin .mceMenu span.mceText, .o2k7Skin .mceMenu .mcePreview {font-size:11px} -.o2k7Skin .mceMenu pre.mceText {font-family:Monospace} -.o2k7Skin .mceMenu .mceIcon {position:absolute; top:0; left:0; width:22px;} -.o2k7Skin .mceMenu .mceMenuItemEnabled a:hover, .o2k7Skin .mceMenu .mceMenuItemActive {background-color:#dbecf3} -.o2k7Skin td.mceMenuItemSeparator {background:#DDD; height:1px} -.o2k7Skin .mceMenuItemTitle a {border:0; background:#E5EFFD; border-bottom:1px solid #ABC6DD} -.o2k7Skin .mceMenuItemTitle span.mceText {color:#000; font-weight:bold; padding-left:4px} -.o2k7Skin .mceMenuItemDisabled .mceText {color:#888} -.o2k7Skin .mceMenuItemSelected .mceIcon {background:url(../default/img/menu_check.gif)} -.o2k7Skin .mceNoIcons .mceMenuItemSelected a {background:url(../default/img/menu_arrow.gif) no-repeat -6px center} -.o2k7Skin .mceMenu span.mceMenuLine {display:none} -.o2k7Skin .mceMenuItemSub a {background:url(../default/img/menu_arrow.gif) no-repeat top right;} -.o2k7Skin .mceMenuItem td, .o2k7Skin .mceMenuItem th {line-height: normal} - -/* Progress,Resize */ -.o2k7Skin .mceBlocker {position:absolute; left:0; top:0; z-index:1000; opacity:0.5; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=50); background:#FFF} -.o2k7Skin .mceProgress {position:absolute; left:0; top:0; z-index:1001; background:url(../default/img/progress.gif) no-repeat; width:32px; height:32px; margin:-16px 0 0 -16px} - -/* Rtl */ -.mceRtl .mceListBox .mceText {text-align: right; padding: 0 4px 0 0} -.mceRtl .mceMenuItem .mceText {text-align: right} - -/* Formats */ -.o2k7Skin .mce_formatPreview a {font-size:10px} -.o2k7Skin .mce_p span.mceText {} -.o2k7Skin .mce_address span.mceText {font-style:italic} -.o2k7Skin .mce_pre span.mceText {font-family:monospace} -.o2k7Skin .mce_h1 span.mceText {font-weight:bolder; font-size: 2em} -.o2k7Skin .mce_h2 span.mceText {font-weight:bolder; font-size: 1.5em} -.o2k7Skin .mce_h3 span.mceText {font-weight:bolder; font-size: 1.17em} -.o2k7Skin .mce_h4 span.mceText {font-weight:bolder; font-size: 1em} -.o2k7Skin .mce_h5 span.mceText {font-weight:bolder; font-size: .83em} -.o2k7Skin .mce_h6 span.mceText {font-weight:bolder; font-size: .75em} - -/* Theme */ -.o2k7Skin span.mce_bold {background-position:0 0} -.o2k7Skin span.mce_italic {background-position:-60px 0} -.o2k7Skin span.mce_underline {background-position:-140px 0} -.o2k7Skin span.mce_strikethrough {background-position:-120px 0} -.o2k7Skin span.mce_undo {background-position:-160px 0} -.o2k7Skin span.mce_redo {background-position:-100px 0} -.o2k7Skin span.mce_cleanup {background-position:-40px 0} -.o2k7Skin span.mce_bullist {background-position:-20px 0} -.o2k7Skin span.mce_numlist {background-position:-80px 0} -.o2k7Skin span.mce_justifyleft {background-position:-460px 0} -.o2k7Skin span.mce_justifyright {background-position:-480px 0} -.o2k7Skin span.mce_justifycenter {background-position:-420px 0} -.o2k7Skin span.mce_justifyfull {background-position:-440px 0} -.o2k7Skin span.mce_anchor {background-position:-200px 0} -.o2k7Skin span.mce_indent {background-position:-400px 0} -.o2k7Skin span.mce_outdent {background-position:-540px 0} -.o2k7Skin span.mce_link {background-position:-500px 0} -.o2k7Skin span.mce_unlink {background-position:-640px 0} -.o2k7Skin span.mce_sub {background-position:-600px 0} -.o2k7Skin span.mce_sup {background-position:-620px 0} -.o2k7Skin span.mce_removeformat {background-position:-580px 0} -.o2k7Skin span.mce_newdocument {background-position:-520px 0} -.o2k7Skin span.mce_image {background-position:-380px 0} -.o2k7Skin span.mce_help {background-position:-340px 0} -.o2k7Skin span.mce_code {background-position:-260px 0} -.o2k7Skin span.mce_hr {background-position:-360px 0} -.o2k7Skin span.mce_visualaid {background-position:-660px 0} -.o2k7Skin span.mce_charmap {background-position:-240px 0} -.o2k7Skin span.mce_paste {background-position:-560px 0} -.o2k7Skin span.mce_copy {background-position:-700px 0} -.o2k7Skin span.mce_cut {background-position:-680px 0} -.o2k7Skin span.mce_blockquote {background-position:-220px 0} -.o2k7Skin .mce_forecolor span.mceAction {background-position:-720px 0} -.o2k7Skin .mce_backcolor span.mceAction {background-position:-760px 0} -.o2k7Skin span.mce_forecolorpicker {background-position:-720px 0} -.o2k7Skin span.mce_backcolorpicker {background-position:-760px 0} - -/* Plugins */ -.o2k7Skin span.mce_advhr {background-position:-0px -20px} -.o2k7Skin span.mce_ltr {background-position:-20px -20px} -.o2k7Skin span.mce_rtl {background-position:-40px -20px} -.o2k7Skin span.mce_emotions {background-position:-60px -20px} -.o2k7Skin span.mce_fullpage {background-position:-80px -20px} -.o2k7Skin span.mce_fullscreen {background-position:-100px -20px} -.o2k7Skin span.mce_iespell {background-position:-120px -20px} -.o2k7Skin span.mce_insertdate {background-position:-140px -20px} -.o2k7Skin span.mce_inserttime {background-position:-160px -20px} -.o2k7Skin span.mce_absolute {background-position:-180px -20px} -.o2k7Skin span.mce_backward {background-position:-200px -20px} -.o2k7Skin span.mce_forward {background-position:-220px -20px} -.o2k7Skin span.mce_insert_layer {background-position:-240px -20px} -.o2k7Skin span.mce_insertlayer {background-position:-260px -20px} -.o2k7Skin span.mce_movebackward {background-position:-280px -20px} -.o2k7Skin span.mce_moveforward {background-position:-300px -20px} -.o2k7Skin span.mce_media {background-position:-320px -20px} -.o2k7Skin span.mce_nonbreaking {background-position:-340px -20px} -.o2k7Skin span.mce_pastetext {background-position:-360px -20px} -.o2k7Skin span.mce_pasteword {background-position:-380px -20px} -.o2k7Skin span.mce_selectall {background-position:-400px -20px} -.o2k7Skin span.mce_preview {background-position:-420px -20px} -.o2k7Skin span.mce_print {background-position:-440px -20px} -.o2k7Skin span.mce_cancel {background-position:-460px -20px} -.o2k7Skin span.mce_save {background-position:-480px -20px} -.o2k7Skin span.mce_replace {background-position:-500px -20px} -.o2k7Skin span.mce_search {background-position:-520px -20px} -.o2k7Skin span.mce_styleprops {background-position:-560px -20px} -.o2k7Skin span.mce_table {background-position:-580px -20px} -.o2k7Skin span.mce_cell_props {background-position:-600px -20px} -.o2k7Skin span.mce_delete_table {background-position:-620px -20px} -.o2k7Skin span.mce_delete_col {background-position:-640px -20px} -.o2k7Skin span.mce_delete_row {background-position:-660px -20px} -.o2k7Skin span.mce_col_after {background-position:-680px -20px} -.o2k7Skin span.mce_col_before {background-position:-700px -20px} -.o2k7Skin span.mce_row_after {background-position:-720px -20px} -.o2k7Skin span.mce_row_before {background-position:-740px -20px} -.o2k7Skin span.mce_merge_cells {background-position:-760px -20px} -.o2k7Skin span.mce_table_props {background-position:-980px -20px} -.o2k7Skin span.mce_row_props {background-position:-780px -20px} -.o2k7Skin span.mce_split_cells {background-position:-800px -20px} -.o2k7Skin span.mce_template {background-position:-820px -20px} -.o2k7Skin span.mce_visualchars {background-position:-840px -20px} -.o2k7Skin span.mce_abbr {background-position:-860px -20px} -.o2k7Skin span.mce_acronym {background-position:-880px -20px} -.o2k7Skin span.mce_attribs {background-position:-900px -20px} -.o2k7Skin span.mce_cite {background-position:-920px -20px} -.o2k7Skin span.mce_del {background-position:-940px -20px} -.o2k7Skin span.mce_ins {background-position:-960px -20px} -.o2k7Skin span.mce_pagebreak {background-position:0 -40px} -.o2k7Skin span.mce_restoredraft {background-position:-20px -40px} -.o2k7Skin span.mce_spellchecker {background-position:-540px -20px} -.o2k7Skin span.mce_visualblocks {background-position: -40px -40px} diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/skins/o2k7/ui_black.css b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/skins/o2k7/ui_black.css deleted file mode 100644 index 50c9b76a2d..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/skins/o2k7/ui_black.css +++ /dev/null @@ -1,8 +0,0 @@ -/* Black */ -.o2k7SkinBlack .mceToolbar .mceToolbarStart span, .o2k7SkinBlack .mceToolbar .mceToolbarEnd span, .o2k7SkinBlack .mceButton, .o2k7SkinBlack .mceSplitButton, .o2k7SkinBlack .mceSeparator, .o2k7SkinBlack .mceSplitButton a.mceOpen, .o2k7SkinBlack .mceListBox a.mceOpen {background-image:url(img/button_bg_black.png)} -.o2k7SkinBlack td.mceToolbar, .o2k7SkinBlack td.mceStatusbar, .o2k7SkinBlack .mceMenuItemTitle a, .o2k7SkinBlack .mceMenuItemTitle span.mceText, .o2k7SkinBlack .mceStatusbar div, .o2k7SkinBlack .mceStatusbar span, .o2k7SkinBlack .mceStatusbar a {background:#535353; color:#FFF} -.o2k7SkinBlack table.mceListBoxEnabled .mceText, o2k7SkinBlack .mceListBox .mceText {background:#FFF; border:1px solid #CBCFD4; border-bottom-color:#989FA9; border-right:0} -.o2k7SkinBlack table.mceListBoxEnabled:hover .mceText, .o2k7SkinBlack .mceListBoxHover .mceText, .o2k7SkinBlack .mceListBoxSelected .mceText {background:#FFF; border:1px solid #FFBD69; border-right:0} -.o2k7SkinBlack .mceExternalToolbar, .o2k7SkinBlack .mceListBox .mceText, .o2k7SkinBlack div.mceMenu, .o2k7SkinBlack table.mceLayout, .o2k7SkinBlack .mceMenuItemTitle a, .o2k7SkinBlack table.mceLayout tr.mceFirst td, .o2k7SkinBlack table.mceLayout, .o2k7SkinBlack .mceMenuItemTitle a, .o2k7SkinBlack table.mceLayout tr.mceLast td, .o2k7SkinBlack .mceIframeContainer {border-color: #535353;} -.o2k7SkinBlack table.mceSplitButtonEnabled:hover a.mceAction, .o2k7SkinBlack .mceSplitButtonHover a.mceAction, .o2k7SkinBlack .mceSplitButtonSelected {background-image:url(img/button_bg_black.png)} -.o2k7SkinBlack .mceMenu .mceMenuItemEnabled a:hover, .o2k7SkinBlack .mceMenu .mceMenuItemActive {background-color:#FFE7A1} \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/skins/o2k7/ui_silver.css b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/skins/o2k7/ui_silver.css deleted file mode 100644 index 960a8e4755..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/skins/o2k7/ui_silver.css +++ /dev/null @@ -1,5 +0,0 @@ -/* Silver */ -.o2k7SkinSilver .mceToolbar .mceToolbarStart span, .o2k7SkinSilver .mceButton, .o2k7SkinSilver .mceSplitButton, .o2k7SkinSilver .mceSeparator, .o2k7SkinSilver .mceSplitButton a.mceOpen, .o2k7SkinSilver .mceListBox a.mceOpen {background-image:url(img/button_bg_silver.png)} -.o2k7SkinSilver td.mceToolbar, .o2k7SkinSilver td.mceStatusbar, .o2k7SkinSilver .mceMenuItemTitle a {background:#eee} -.o2k7SkinSilver .mceListBox .mceText {background:#FFF} -.o2k7SkinSilver .mceExternalToolbar, .o2k7SkinSilver .mceListBox .mceText, .o2k7SkinSilver div.mceMenu, .o2k7SkinSilver table.mceLayout, .o2k7SkinSilver .mceMenuItemTitle a, .o2k7SkinSilver table.mceLayout tr.mceFirst td, .o2k7SkinSilver table.mceLayout, .o2k7SkinSilver .mceMenuItemTitle a, .o2k7SkinSilver table.mceLayout tr.mceLast td, .o2k7SkinSilver .mceIframeContainer {border-color: #bbb} diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/source_editor.htm b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/source_editor.htm deleted file mode 100644 index dd973fcc05..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/advanced/source_editor.htm +++ /dev/null @@ -1,25 +0,0 @@ - - - {#advanced_dlg.code_title} - - - - -
    -
    - -
    - -
    - -
    - - - -
    - - -
    -
    - - diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/simple/editor_template.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/simple/editor_template.js deleted file mode 100644 index 4b3209cc92..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/simple/editor_template.js +++ /dev/null @@ -1 +0,0 @@ -(function(){var a=tinymce.DOM;tinymce.ThemeManager.requireLangPack("simple");tinymce.create("tinymce.themes.SimpleTheme",{init:function(c,d){var e=this,b=["Bold","Italic","Underline","Strikethrough","InsertUnorderedList","InsertOrderedList"],f=c.settings;e.editor=c;c.contentCSS.push(d+"/skins/"+f.skin+"/content.css");c.onInit.add(function(){c.onNodeChange.add(function(h,g){tinymce.each(b,function(i){g.get(i.toLowerCase()).setActive(h.queryCommandState(i))})})});a.loadCSS((f.editor_css?c.documentBaseURI.toAbsolute(f.editor_css):"")||d+"/skins/"+f.skin+"/ui.css")},renderUI:function(h){var e=this,i=h.targetNode,b,c,d=e.editor,f=d.controlManager,g;i=a.insertAfter(a.create("span",{id:d.id+"_container","class":"mceEditor "+d.settings.skin+"SimpleSkin"}),i);i=g=a.add(i,"table",{cellPadding:0,cellSpacing:0,"class":"mceLayout"});i=c=a.add(i,"tbody");i=a.add(c,"tr");i=b=a.add(a.add(i,"td"),"div",{"class":"mceIframeContainer"});i=a.add(a.add(c,"tr",{"class":"last"}),"td",{"class":"mceToolbar mceLast",align:"center"});c=e.toolbar=f.createToolbar("tools1");c.add(f.createButton("bold",{title:"simple.bold_desc",cmd:"Bold"}));c.add(f.createButton("italic",{title:"simple.italic_desc",cmd:"Italic"}));c.add(f.createButton("underline",{title:"simple.underline_desc",cmd:"Underline"}));c.add(f.createButton("strikethrough",{title:"simple.striketrough_desc",cmd:"Strikethrough"}));c.add(f.createSeparator());c.add(f.createButton("undo",{title:"simple.undo_desc",cmd:"Undo"}));c.add(f.createButton("redo",{title:"simple.redo_desc",cmd:"Redo"}));c.add(f.createSeparator());c.add(f.createButton("cleanup",{title:"simple.cleanup_desc",cmd:"mceCleanup"}));c.add(f.createSeparator());c.add(f.createButton("insertunorderedlist",{title:"simple.bullist_desc",cmd:"InsertUnorderedList"}));c.add(f.createButton("insertorderedlist",{title:"simple.numlist_desc",cmd:"InsertOrderedList"}));c.renderTo(i);return{iframeContainer:b,editorContainer:d.id+"_container",sizeContainer:g,deltaHeight:-20}},getInfo:function(){return{longname:"Simple theme",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.ThemeManager.add("simple",tinymce.themes.SimpleTheme)})(); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/simple/editor_template_src.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/simple/editor_template_src.js deleted file mode 100644 index 01ce87c58a..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/simple/editor_template_src.js +++ /dev/null @@ -1,84 +0,0 @@ -/** - * editor_template_src.js - * - * Copyright 2009, Moxiecode Systems AB - * Released under LGPL License. - * - * License: http://tinymce.moxiecode.com/license - * Contributing: http://tinymce.moxiecode.com/contributing - */ - -(function() { - var DOM = tinymce.DOM; - - // Tell it to load theme specific language pack(s) - tinymce.ThemeManager.requireLangPack('simple'); - - tinymce.create('tinymce.themes.SimpleTheme', { - init : function(ed, url) { - var t = this, states = ['Bold', 'Italic', 'Underline', 'Strikethrough', 'InsertUnorderedList', 'InsertOrderedList'], s = ed.settings; - - t.editor = ed; - ed.contentCSS.push(url + "/skins/" + s.skin + "/content.css"); - - ed.onInit.add(function() { - ed.onNodeChange.add(function(ed, cm) { - tinymce.each(states, function(c) { - cm.get(c.toLowerCase()).setActive(ed.queryCommandState(c)); - }); - }); - }); - - DOM.loadCSS((s.editor_css ? ed.documentBaseURI.toAbsolute(s.editor_css) : '') || url + "/skins/" + s.skin + "/ui.css"); - }, - - renderUI : function(o) { - var t = this, n = o.targetNode, ic, tb, ed = t.editor, cf = ed.controlManager, sc; - - n = DOM.insertAfter(DOM.create('span', {id : ed.id + '_container', 'class' : 'mceEditor ' + ed.settings.skin + 'SimpleSkin'}), n); - n = sc = DOM.add(n, 'table', {cellPadding : 0, cellSpacing : 0, 'class' : 'mceLayout'}); - n = tb = DOM.add(n, 'tbody'); - - // Create iframe container - n = DOM.add(tb, 'tr'); - n = ic = DOM.add(DOM.add(n, 'td'), 'div', {'class' : 'mceIframeContainer'}); - - // Create toolbar container - n = DOM.add(DOM.add(tb, 'tr', {'class' : 'last'}), 'td', {'class' : 'mceToolbar mceLast', align : 'center'}); - - // Create toolbar - tb = t.toolbar = cf.createToolbar("tools1"); - tb.add(cf.createButton('bold', {title : 'simple.bold_desc', cmd : 'Bold'})); - tb.add(cf.createButton('italic', {title : 'simple.italic_desc', cmd : 'Italic'})); - tb.add(cf.createButton('underline', {title : 'simple.underline_desc', cmd : 'Underline'})); - tb.add(cf.createButton('strikethrough', {title : 'simple.striketrough_desc', cmd : 'Strikethrough'})); - tb.add(cf.createSeparator()); - tb.add(cf.createButton('undo', {title : 'simple.undo_desc', cmd : 'Undo'})); - tb.add(cf.createButton('redo', {title : 'simple.redo_desc', cmd : 'Redo'})); - tb.add(cf.createSeparator()); - tb.add(cf.createButton('cleanup', {title : 'simple.cleanup_desc', cmd : 'mceCleanup'})); - tb.add(cf.createSeparator()); - tb.add(cf.createButton('insertunorderedlist', {title : 'simple.bullist_desc', cmd : 'InsertUnorderedList'})); - tb.add(cf.createButton('insertorderedlist', {title : 'simple.numlist_desc', cmd : 'InsertOrderedList'})); - tb.renderTo(n); - - return { - iframeContainer : ic, - editorContainer : ed.id + '_container', - sizeContainer : sc, - deltaHeight : -20 - }; - }, - - getInfo : function() { - return { - longname : 'Simple theme', - author : 'Moxiecode Systems AB', - authorurl : 'http://tinymce.moxiecode.com', - version : tinymce.majorVersion + "." + tinymce.minorVersion - } - } - }); - - tinymce.ThemeManager.add('simple', tinymce.themes.SimpleTheme); -})(); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/simple/img/icons.gif b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/simple/img/icons.gif deleted file mode 100644 index 6fcbcb5ded..0000000000 Binary files a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/simple/img/icons.gif and /dev/null differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/simple/langs/da.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/simple/langs/da.js deleted file mode 100644 index 92de7a76af..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/simple/langs/da.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('da.simple',{"cleanup_desc":"Ryd op i uordentlig kode","redo_desc":"Gendan (Ctrl+Y)","undo_desc":"Fortryd (Ctrl+Z)","numlist_desc":"Nummereret punktopstilling","bullist_desc":"Unummereret punktopstilling","striketrough_desc":"Gennemstreget","underline_desc":"Understreget (Ctrl+U)","italic_desc":"Kursiv (Ctrl+I)","bold_desc":"Fed (Ctrl+B)"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/simple/langs/de.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/simple/langs/de.js deleted file mode 100644 index 59bf788d2e..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/simple/langs/de.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('de.simple',{"cleanup_desc":"Quellcode aufr\u00e4umen","redo_desc":"Wiederholen (Strg+Y)","undo_desc":"R\u00fcckg\u00e4ngig (Strg+Z)","numlist_desc":"Nummerierung","bullist_desc":"Aufz\u00e4hlung","striketrough_desc":"Durchgestrichen","underline_desc":"Unterstrichen (Strg+U)","italic_desc":"Kursiv (Strg+I)","bold_desc":"Fett (Strg+B)"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/simple/langs/en.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/simple/langs/en.js deleted file mode 100644 index 088ed0fcbe..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/simple/langs/en.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('en.simple',{"cleanup_desc":"Cleanup Messy Code","redo_desc":"Redo (Ctrl+Y)","undo_desc":"Undo (Ctrl+Z)","numlist_desc":"Insert/Remove Numbered List","bullist_desc":"Insert/Remove Bulleted List","striketrough_desc":"Strikethrough","underline_desc":"Underline (Ctrl+U)","italic_desc":"Italic (Ctrl+I)","bold_desc":"Bold (Ctrl+B)"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/simple/langs/fi.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/simple/langs/fi.js deleted file mode 100644 index 6ca1d8d106..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/simple/langs/fi.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('fi.simple',{"cleanup_desc":"Siisti sekainen koodi","redo_desc":"Tee uudestaan (Ctrl+Y)","undo_desc":"Peru (Ctrl+Z)","numlist_desc":"J\u00e4rjestetty lista","bullist_desc":"J\u00e4rjest\u00e4m\u00e4t\u00f6n lista","striketrough_desc":"Yliviivaus","underline_desc":"Alleviivaus (Ctrl+U)","italic_desc":"Kursivointi (Ctrl+I)","bold_desc":"Lihavointi (Ctrl+B)"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/simple/langs/fr.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/simple/langs/fr.js deleted file mode 100644 index ebe964e1e7..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/simple/langs/fr.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('fr.simple',{"cleanup_desc":"Nettoyer le code","redo_desc":"R\u00e9tablir (Ctrl+Y)","undo_desc":"Annuler (Ctrl+Z)","numlist_desc":"Liste num\u00e9rot\u00e9e","bullist_desc":"Liste \u00e0 puces","striketrough_desc":"Barr\u00e9","underline_desc":"Soulign\u00e9 (Ctrl+U)","italic_desc":"Italique (Ctrl+I)","bold_desc":"Gras (Ctrl+B)"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/simple/langs/he.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/simple/langs/he.js deleted file mode 100644 index ade41a1121..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/simple/langs/he.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('he.simple',{"cleanup_desc":"\u05e0\u05e7\u05d4 \u05e7\u05d5\u05d3","redo_desc":" (Ctrl+Y)","undo_desc":"\u05d1\u05d9\u05d8\u05d5\u05dc \u05e4\u05e2\u05d5\u05dc\u05d4 (Ctrl+Z)","numlist_desc":"\u05de\u05e1\u05e4\u05d5\u05e8","bullist_desc":"\u05ea\u05d1\u05dc\u05d9\u05d8\u05d9\u05dd","striketrough_desc":"\u05e7\u05d5 \u05d7\u05d5\u05e6\u05d4","underline_desc":"\u05e7\u05d5 \u05ea\u05d7\u05ea\u05d5\u05df (Ctrl+U)","italic_desc":"\u05e0\u05d8\u05d5\u05d9 (Ctrl+I)","bold_desc":"\u05de\u05d5\u05d3\u05d2\u05e9 (Ctrl+B)"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/simple/langs/it.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/simple/langs/it.js deleted file mode 100644 index e0c45ed543..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/simple/langs/it.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('it.simple',{"cleanup_desc":"Pulisci codice disordinato","redo_desc":"Ripristina (Ctrl+Y)","undo_desc":"Annulla (Ctrl+Z)","numlist_desc":"Lista ordinata","bullist_desc":"Lista non ordinata","striketrough_desc":"Barrato","underline_desc":"Sottolineato (Ctrl+U)","italic_desc":"Corsivo (Ctrl+I)","bold_desc":"Grassetto (Ctrl+B)"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/simple/langs/ja.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/simple/langs/ja.js deleted file mode 100644 index b3acbb546b..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/simple/langs/ja.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('ja.simple',{"cleanup_desc":"\u4e71\u96d1\u306a\u30b3\u30fc\u30c9\u3092\u6574\u5f62","redo_desc":"\u3084\u308a\u76f4\u3059 (Ctrl+Y)","undo_desc":"\u5143\u306b\u623b\u3059 (Ctrl+Z)","numlist_desc":"\u756a\u53f7\u3064\u304d\u30ea\u30b9\u30c8","bullist_desc":"\u756a\u53f7\u306a\u3057\u30ea\u30b9\u30c8","striketrough_desc":"\u53d6\u308a\u6d88\u3057\u7dda","underline_desc":"\u4e0b\u7dda (Ctrl+U)","italic_desc":"\u659c\u4f53 (Ctrl+I)","bold_desc":"\u592a\u5b57 (Ctrl+B)"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/simple/langs/nl.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/simple/langs/nl.js deleted file mode 100644 index 9f105d5071..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/simple/langs/nl.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('nl.simple',{"cleanup_desc":"Code opruimen","redo_desc":"Herhalen (Ctrl+Y)","undo_desc":"Ongedaan maken (Ctrl+Z)","numlist_desc":"Nummering","bullist_desc":"Opsommingstekens","striketrough_desc":"Doorhalen","underline_desc":"Onderstrepen (Ctrl+U)","italic_desc":"Cursief (Ctrl+I)","bold_desc":"Vet (Ctrl+B)"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/simple/langs/no.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/simple/langs/no.js deleted file mode 100644 index b9b35851db..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/simple/langs/no.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('no.simple',{"cleanup_desc":"Rydd opp i rotet kode","redo_desc":"Gj\u00f8r om","undo_desc":"Angre","numlist_desc":"Nummerliste","bullist_desc":"Punktliste","striketrough_desc":"Gjennomstreke","underline_desc":"Understreke (Ctrl+U)","italic_desc":"Kursiv (Ctrl+I)","bold_desc":"Fet (Ctrl+B)"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/simple/langs/pl.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/simple/langs/pl.js deleted file mode 100644 index e48d5df130..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/simple/langs/pl.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('pl.simple',{"cleanup_desc":"Wyczy\u015b\u0107 nieuporz\u0105dkowany kod","redo_desc":"Pon\u00f3w (Ctrl+Y)","undo_desc":"Cofnij (Ctrl+Z)","numlist_desc":"Lista numerowana","bullist_desc":"Lista nienumerowana","striketrough_desc":"Przekre\u015blenie","underline_desc":"Podkre\u015blenie (Ctrl+U)","italic_desc":"Kursywa (Ctrl+I)","bold_desc":"Pogrubienie (Ctrl+B)"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/simple/langs/pt.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/simple/langs/pt.js deleted file mode 100644 index 955201d2a9..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/simple/langs/pt.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('pt.simple',{"cleanup_desc":"Limpar c\u00f3digo incorreto","redo_desc":"Refazer (Ctrl+Y)","undo_desc":"Desfazer (Ctrl+Z)","numlist_desc":"Lista ordenada","bullist_desc":"Lista n\u00e3o-ordenada","striketrough_desc":"Riscado","underline_desc":"Sublinhado (Ctrl+U)","italic_desc":"It\u00e1lico (Ctrl+I)","bold_desc":"Negrito (Ctrl+B)"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/simple/langs/ru.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/simple/langs/ru.js deleted file mode 100644 index af23a1d151..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/simple/langs/ru.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('ru.simple',{"cleanup_desc":"\u041e\u0447\u0438\u0441\u0442\u0438\u0442\u044c \u043b\u0438\u0448\u043d\u0438\u0439 \u043a\u043e\u0434","redo_desc":"\u0412\u0435\u0440\u043d\u0443\u0442\u044c (Ctrl+Y)","undo_desc":"\u041e\u0442\u043c\u0435\u043d\u0438\u0442\u044c (Ctrl+Z)","numlist_desc":"\u041d\u0443\u043c\u0435\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a","bullist_desc":"\u041c\u0430\u0440\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a","striketrough_desc":"\u0417\u0430\u0447\u0435\u0440\u043a\u043d\u0443\u0442\u044b\u0439","underline_desc":"\u041f\u043e\u0434\u0447\u0435\u0440\u043a\u043d\u0443\u0442\u044b\u0439 (Ctrl+U)","italic_desc":"\u041a\u0443\u0440\u0441\u0438\u0432 (Ctrl+I)","bold_desc":"\u041f\u043e\u043b\u0443\u0436\u0438\u0440\u043d\u044b\u0439 (Ctrl+B)"}); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/simple/langs/sv.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/simple/langs/sv.js deleted file mode 100644 index 4824f58157..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/simple/langs/sv.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('sv.simple',{"cleanup_desc":"St\u00e4da upp i k\u00e4llkoden","redo_desc":"G\u00f6r om (Ctrl+Y)","undo_desc":"\u00c5\u0085ngra (Ctrl+Z)","numlist_desc":"Nummerlista","bullist_desc":"Punktlista","striketrough_desc":"Genomstruken","underline_desc":"Understruken (Ctrl+U)","italic_desc":"Kursiv (Ctrl+I)","bold_desc":"Fet (Ctrl+B)"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/simple/langs/zh.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/simple/langs/zh.js deleted file mode 100644 index 6e0c6954b7..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/simple/langs/zh.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('zh-cn.simple',{"cleanup_desc":"\u6e05\u9664\u65e0\u7528\u4ee3\u7801","redo_desc":"\u6062\u590d(Ctrl Y)","undo_desc":"\u64a4\u9500(Ctrl Z)","numlist_desc":"\u7f16\u53f7\u5217\u8868","bullist_desc":"\u9879\u76ee\u5217\u8868","striketrough_desc":"\u5220\u9664\u7ebf","underline_desc":"\u4e0b\u5212\u7ebf(Ctrl U)","italic_desc":"\u659c\u4f53(Ctrl I)","bold_desc":"\u7c97\u4f53(Ctrl B)"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/simple/skins/default/content.css b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/simple/skins/default/content.css deleted file mode 100644 index 2506c807ca..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/simple/skins/default/content.css +++ /dev/null @@ -1,25 +0,0 @@ -body, td, pre { - font-family: Verdana, Arial, Helvetica, sans-serif; - font-size: 10px; -} - -body { - background-color: #FFFFFF; -} - -.mceVisualAid { - border: 1px dashed #BBBBBB; -} - -/* MSIE specific */ - -* html body { - scrollbar-3dlight-color: #F0F0EE; - scrollbar-arrow-color: #676662; - scrollbar-base-color: #F0F0EE; - scrollbar-darkshadow-color: #DDDDDD; - scrollbar-face-color: #E0E0DD; - scrollbar-highlight-color: #F0F0EE; - scrollbar-shadow-color: #F0F0EE; - scrollbar-track-color: #F5F5F5; -} diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/simple/skins/default/ui.css b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/simple/skins/default/ui.css deleted file mode 100644 index 076fe84e34..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/simple/skins/default/ui.css +++ /dev/null @@ -1,32 +0,0 @@ -/* Reset */ -.defaultSimpleSkin table, .defaultSimpleSkin tbody, .defaultSimpleSkin a, .defaultSimpleSkin img, .defaultSimpleSkin tr, .defaultSimpleSkin div, .defaultSimpleSkin td, .defaultSimpleSkin iframe, .defaultSimpleSkin span, .defaultSimpleSkin * {border:0; margin:0; padding:0; background:transparent; white-space:nowrap; text-decoration:none; font-weight:normal; cursor:default; color:#000} - -/* Containers */ -.defaultSimpleSkin {position:relative} -.defaultSimpleSkin table.mceLayout {background:#F0F0EE; border:1px solid #CCC;} -.defaultSimpleSkin iframe {display:block; background:#FFF; border-bottom:1px solid #CCC;} -.defaultSimpleSkin .mceToolbar {height:24px;} - -/* Layout */ -.defaultSimpleSkin span.mceIcon, .defaultSimpleSkin img.mceIcon {display:block; width:20px; height:20px} -.defaultSimpleSkin .mceIcon {background:url(../../img/icons.gif) no-repeat 20px 20px} - -/* Button */ -.defaultSimpleSkin .mceButton {display:block; border:1px solid #F0F0EE; width:20px; height:20px} -.defaultSimpleSkin a.mceButtonEnabled:hover {border:1px solid #0A246A; background-color:#B2BBD0} -.defaultSimpleSkin a.mceButtonActive {border:1px solid #0A246A; background-color:#C2CBE0} -.defaultSimpleSkin .mceButtonDisabled span {opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)} - -/* Separator */ -.defaultSimpleSkin .mceSeparator {display:block; background:url(../../img/icons.gif) -180px 0; width:2px; height:20px; margin:0 2px 0 4px} - -/* Theme */ -.defaultSimpleSkin span.mce_bold {background-position:0 0} -.defaultSimpleSkin span.mce_italic {background-position:-60px 0} -.defaultSimpleSkin span.mce_underline {background-position:-140px 0} -.defaultSimpleSkin span.mce_strikethrough {background-position:-120px 0} -.defaultSimpleSkin span.mce_undo {background-position:-160px 0} -.defaultSimpleSkin span.mce_redo {background-position:-100px 0} -.defaultSimpleSkin span.mce_cleanup {background-position:-40px 0} -.defaultSimpleSkin span.mce_insertunorderedlist {background-position:-20px 0} -.defaultSimpleSkin span.mce_insertorderedlist {background-position:-80px 0} diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/simple/skins/o2k7/content.css b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/simple/skins/o2k7/content.css deleted file mode 100644 index 595809fa61..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/simple/skins/o2k7/content.css +++ /dev/null @@ -1,17 +0,0 @@ -body, td, pre {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;} - -body {background: #FFF;} -.mceVisualAid {border: 1px dashed #BBB;} - -/* IE */ - -* html body { -scrollbar-3dlight-color: #F0F0EE; -scrollbar-arrow-color: #676662; -scrollbar-base-color: #F0F0EE; -scrollbar-darkshadow-color: #DDDDDD; -scrollbar-face-color: #E0E0DD; -scrollbar-highlight-color: #F0F0EE; -scrollbar-shadow-color: #F0F0EE; -scrollbar-track-color: #F5F5F5; -} diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/simple/skins/o2k7/img/button_bg.png b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/simple/skins/o2k7/img/button_bg.png deleted file mode 100644 index 527e3495a6..0000000000 Binary files a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/simple/skins/o2k7/img/button_bg.png and /dev/null differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/simple/skins/o2k7/ui.css b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/simple/skins/o2k7/ui.css deleted file mode 100644 index cf6c35d109..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/simple/skins/o2k7/ui.css +++ /dev/null @@ -1,35 +0,0 @@ -/* Reset */ -.o2k7SimpleSkin table, .o2k7SimpleSkin tbody, .o2k7SimpleSkin a, .o2k7SimpleSkin img, .o2k7SimpleSkin tr, .o2k7SimpleSkin div, .o2k7SimpleSkin td, .o2k7SimpleSkin iframe, .o2k7SimpleSkin span, .o2k7SimpleSkin * {border:0; margin:0; padding:0; background:transparent; white-space:nowrap; text-decoration:none; font-weight:normal; cursor:default; color:#000} - -/* Containers */ -.o2k7SimpleSkin {position:relative} -.o2k7SimpleSkin table.mceLayout {background:#E5EFFD; border:1px solid #ABC6DD;} -.o2k7SimpleSkin iframe {display:block; background:#FFF; border-bottom:1px solid #ABC6DD;} -.o2k7SimpleSkin .mceToolbar {height:26px;} - -/* Layout */ -.o2k7SimpleSkin .mceToolbar .mceToolbarStart span {display:block; background:url(img/button_bg.png) -22px 0; width:1px; height:22px; } -.o2k7SimpleSkin .mceToolbar .mceToolbarEnd span {display:block; background:url(img/button_bg.png) -22px 0; width:1px; height:22px} -.o2k7SimpleSkin span.mceIcon, .o2k7SimpleSkin img.mceIcon {display:block; width:20px; height:20px} -.o2k7SimpleSkin .mceIcon {background:url(../../img/icons.gif) no-repeat 20px 20px} - -/* Button */ -.o2k7SimpleSkin .mceButton {display:block; background:url(img/button_bg.png); width:22px; height:22px} -.o2k7SimpleSkin a.mceButton span, .o2k7SimpleSkin a.mceButton img {margin:1px 0 0 1px} -.o2k7SimpleSkin a.mceButtonEnabled:hover {background-color:#B2BBD0; background-position:0 -22px} -.o2k7SimpleSkin a.mceButtonActive {background-position:0 -44px} -.o2k7SimpleSkin .mceButtonDisabled span {opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)} - -/* Separator */ -.o2k7SimpleSkin .mceSeparator {display:block; background:url(img/button_bg.png) -22px 0; width:5px; height:22px} - -/* Theme */ -.o2k7SimpleSkin span.mce_bold {background-position:0 0} -.o2k7SimpleSkin span.mce_italic {background-position:-60px 0} -.o2k7SimpleSkin span.mce_underline {background-position:-140px 0} -.o2k7SimpleSkin span.mce_strikethrough {background-position:-120px 0} -.o2k7SimpleSkin span.mce_undo {background-position:-160px 0} -.o2k7SimpleSkin span.mce_redo {background-position:-100px 0} -.o2k7SimpleSkin span.mce_cleanup {background-position:-40px 0} -.o2k7SimpleSkin span.mce_insertunorderedlist {background-position:-20px 0} -.o2k7SimpleSkin span.mce_insertorderedlist {background-position:-80px 0} diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/about.htm b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/about.htm deleted file mode 100644 index 2191471af5..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/about.htm +++ /dev/null @@ -1,52 +0,0 @@ - - - - {#umbraco_dlg.about_title} - - - - - - - -
    -
    -

    {#umbraco_dlg.about_title}

    -

    Version: ()

    -

    TinyMCE is a platform independent web based Javascript HTML WYSIWYG editor control released as Open Source under LGPL - by Moxiecode Systems AB. It has the ability to convert HTML TEXTAREA fields or other HTML elements to editor instances.

    -

    Copyright © 2003-2008, Moxiecode Systems AB, All rights reserved.

    -

    For more information about this software visit the TinyMCE website.

    - -
    - Got Moxie? -
    -
    - -
    -
    -

    {#umbraco_dlg.about_loaded}

    - -
    -
    - -

     

    -
    -
    - -
    -
    -
    -
    - -
    - -
    - - diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/anchor.htm b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/anchor.htm deleted file mode 100644 index cfa87bc9b8..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/anchor.htm +++ /dev/null @@ -1,24 +0,0 @@ - - - - {#umbraco_dlg.anchor_title} - - - - - -
    - - - - - -
    - -
    - - -
    -
    - - diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/charmap.htm b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/charmap.htm deleted file mode 100644 index 85ccfeed20..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/charmap.htm +++ /dev/null @@ -1,57 +0,0 @@ - - - - {#umbraco_dlg.charmap_title} - - - - - - - - - - - - - - - - - - - - - -
    - - - - - - - - - -
     
     
    -
    - - - - - - - - - - - - - - - - -
     
     
     
    -
    {#umbraco_dlg.charmap_usage}
    - - diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/color_picker.htm b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/color_picker.htm deleted file mode 100644 index b74024c752..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/color_picker.htm +++ /dev/null @@ -1,71 +0,0 @@ - - - - {#umbraco_dlg.colorpicker_title} - - - - - - - -
    - - -
    -
    -
    - {#umbraco_dlg.colorpicker_picker_title} -
    - - -
    - -
    - -
    -
    -
    -
    - -
    -
    - {#umbraco_dlg.colorpicker_palette_title} -
    - -
    - -
    -
    -
    - -
    -
    - {#umbraco_dlg.colorpicker_named_title} -
    - -
    - -
    - -
    - {#umbraco_dlg.colorpicker_name} -
    -
    -
    -
    - -
    - - -
    -
    -
    - - diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/editor_template_src.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/editor_template_src.js deleted file mode 100644 index 44837255c8..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/editor_template_src.js +++ /dev/null @@ -1,1496 +0,0 @@ -/** - * editor_template_src.js - * - * Copyright 2009, Moxiecode Systems AB - * Released under LGPL License. - * - * License: http://tinymce.moxiecode.com/license - * Contributing: http://tinymce.moxiecode.com/contributing - */ - -(function(tinymce) { - var DOM = tinymce.DOM, Event = tinymce.dom.Event, extend = tinymce.extend, each = tinymce.each, Cookie = tinymce.util.Cookie, lastExtID, explode = tinymce.explode; - - // Generates a preview for a format - function getPreviewCss(ed, fmt) { - var name, previewElm, dom = ed.dom, previewCss = '', parentFontSize, previewStyles; - - previewStyles = ed.settings.preview_styles; - - // No preview forced - if (previewStyles === false) - return ''; - - // Default preview - if (!previewStyles) - previewStyles = 'font-family font-size font-weight text-decoration text-transform color background-color'; - - // Removes any variables since these can't be previewed - function removeVars(val) { - return val.replace(/%(\w+)/g, ''); - }; - - // Create block/inline element to use for preview - name = fmt.block || fmt.inline || 'span'; - previewElm = dom.create(name); - - // Add format styles to preview element - each(fmt.styles, function(value, name) { - value = removeVars(value); - - if (value) - dom.setStyle(previewElm, name, value); - }); - - // Add attributes to preview element - each(fmt.attributes, function(value, name) { - value = removeVars(value); - - if (value) - dom.setAttrib(previewElm, name, value); - }); - - // Add classes to preview element - each(fmt.classes, function(value) { - value = removeVars(value); - - if (!dom.hasClass(previewElm, value)) - dom.addClass(previewElm, value); - }); - - // Add the previewElm outside the visual area - dom.setStyles(previewElm, {position: 'absolute', left: -0xFFFF}); - ed.getBody().appendChild(previewElm); - - // Get parent container font size so we can compute px values out of em/% for older IE:s - parentFontSize = dom.getStyle(ed.getBody(), 'fontSize', true); - parentFontSize = /px$/.test(parentFontSize) ? parseInt(parentFontSize, 10) : 0; - - each(previewStyles.split(' '), function(name) { - var value = dom.getStyle(previewElm, name, true); - - // If background is transparent then check if the body has a background color we can use - if (name == 'background-color' && /transparent|rgba\s*\([^)]+,\s*0\)/.test(value)) { - value = dom.getStyle(ed.getBody(), name, true); - - // Ignore white since it's the default color, not the nicest fix - if (dom.toHex(value).toLowerCase() == '#ffffff') { - return; - } - } - - // Old IE won't calculate the font size so we need to do that manually - if (name == 'font-size') { - if (/em|%$/.test(value)) { - if (parentFontSize === 0) { - return; - } - - // Convert font size from em/% to px - value = parseFloat(value, 10) / (/%$/.test(value) ? 100 : 1); - value = (value * parentFontSize) + 'px'; - } - } - - previewCss += name + ':' + value + ';'; - }); - - dom.remove(previewElm); - - return previewCss; - }; - - // Tell it to load theme specific language pack(s) - tinymce.ThemeManager.requireLangPack('umbraco'); - - tinymce.create('tinymce.themes.UmbracoTheme', { - sizes : [8, 10, 12, 14, 18, 24, 36], - - // Control name lookup, format: title, command - controls : { - bold : ['bold_desc', 'Bold'], - italic : ['italic_desc', 'Italic'], - underline : ['underline_desc', 'Underline'], - strikethrough : ['striketrough_desc', 'Strikethrough'], - justifyleft : ['justifyleft_desc', 'JustifyLeft'], - justifycenter : ['justifycenter_desc', 'JustifyCenter'], - justifyright : ['justifyright_desc', 'JustifyRight'], - justifyfull : ['justifyfull_desc', 'JustifyFull'], - bullist : ['bullist_desc', 'InsertUnorderedList'], - numlist : ['numlist_desc', 'InsertOrderedList'], - outdent : ['outdent_desc', 'Outdent'], - indent : ['indent_desc', 'Indent'], - cut : ['cut_desc', 'Cut'], - copy : ['copy_desc', 'Copy'], - paste : ['paste_desc', 'Paste'], - undo : ['undo_desc', 'Undo'], - redo : ['redo_desc', 'Redo'], - link : ['link_desc', 'mceLink'], - unlink : ['unlink_desc', 'unlink'], - image : ['image_desc', 'mceImage'], - cleanup : ['cleanup_desc', 'mceCleanup'], - help : ['help_desc', 'mceHelp'], - code : ['code_desc', 'mceCodeEditor'], - hr : ['hr_desc', 'InsertHorizontalRule'], - removeformat : ['removeformat_desc', 'RemoveFormat'], - sub : ['sub_desc', 'subscript'], - sup : ['sup_desc', 'superscript'], - forecolor : ['forecolor_desc', 'ForeColor'], - forecolorpicker : ['forecolor_desc', 'mceForeColor'], - backcolor : ['backcolor_desc', 'HiliteColor'], - backcolorpicker : ['backcolor_desc', 'mceBackColor'], - charmap : ['charmap_desc', 'mceCharMap'], - visualaid : ['visualaid_desc', 'mceToggleVisualAid'], - anchor : ['anchor_desc', 'mceInsertAnchor'], - newdocument : ['newdocument_desc', 'mceNewDocument'], - blockquote : ['blockquote_desc', 'mceBlockQuote'] - }, - - stateControls : ['bold', 'italic', 'underline', 'strikethrough', 'bullist', 'numlist', 'justifyleft', 'justifycenter', 'justifyright', 'justifyfull', 'sub', 'sup', 'blockquote'], - - init : function(ed, url) { - var t = this, s, v, o; - - t.editor = ed; - t.url = url; - t.onResolveName = new tinymce.util.Dispatcher(this); - - ed.forcedHighContrastMode = ed.settings.detect_highcontrast && t._isHighContrast(); - ed.settings.skin = ed.forcedHighContrastMode ? 'highcontrast' : ed.settings.skin; - - // Default settings - t.settings = s = extend({ - theme_umbraco_path : true, - theme_umbraco_toolbar_location : 'bottom', - theme_umbraco_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect", - theme_umbraco_buttons2 : "bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code", - theme_umbraco_buttons3 : "hr,removeformat,visualaid,|,sub,sup,|,charmap", - theme_umbraco_blockformats : "p,address,pre,h1,h2,h3,h4,h5,h6", - theme_umbraco_toolbar_align : "center", - theme_umbraco_fonts : "Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats", - theme_umbraco_more_colors : 1, - theme_umbraco_row_height : 23, - theme_umbraco_resize_horizontal : 1, - theme_umbraco_resizing_use_cookie : 1, - theme_umbraco_font_sizes : "1,2,3,4,5,6,7", - theme_umbraco_font_selector : "span", - theme_umbraco_show_current_color: 0, - readonly : ed.settings.readonly - }, ed.settings); - - // Setup default font_size_style_values - if (!s.font_size_style_values) - s.font_size_style_values = "8pt,10pt,12pt,14pt,18pt,24pt,36pt"; - - if (tinymce.is(s.theme_umbraco_font_sizes, 'string')) { - s.font_size_style_values = tinymce.explode(s.font_size_style_values); - s.font_size_classes = tinymce.explode(s.font_size_classes || ''); - - // Parse string value - o = {}; - ed.settings.theme_umbraco_font_sizes = s.theme_umbraco_font_sizes; - each(ed.getParam('theme_umbraco_font_sizes', '', 'hash'), function(v, k) { - var cl; - - if (k == v && v >= 1 && v <= 7) { - k = v + ' (' + t.sizes[v - 1] + 'pt)'; - cl = s.font_size_classes[v - 1]; - v = s.font_size_style_values[v - 1] || (t.sizes[v - 1] + 'pt'); - } - - if (/^\s*\./.test(v)) - cl = v.replace(/\./g, ''); - - o[k] = cl ? {'class' : cl} : {fontSize : v}; - }); - - s.theme_umbraco_font_sizes = o; - } - - if ((v = s.theme_umbraco_path_location) && v != 'none') - s.theme_umbraco_statusbar_location = s.theme_umbraco_path_location; - - if (s.theme_umbraco_statusbar_location == 'none') - s.theme_umbraco_statusbar_location = 0; - - if (ed.settings.content_css !== false) - ed.contentCSS.push(ed.baseURI.toAbsolute(url + "/skins/" + ed.settings.skin + "/content.css")); - - // Init editor - ed.onInit.add(function() { - if (!ed.settings.readonly) { - ed.onNodeChange.add(t._nodeChanged, t); - ed.onKeyUp.add(t._updateUndoStatus, t); - ed.onMouseUp.add(t._updateUndoStatus, t); - ed.dom.bind(ed.dom.getRoot(), 'dragend', function() { - t._updateUndoStatus(ed); - }); - } - }); - - ed.onSetProgressState.add(function(ed, b, ti) { - var co, id = ed.id, tb; - - if (b) { - t.progressTimer = setTimeout(function() { - co = ed.getContainer(); - co = co.insertBefore(DOM.create('DIV', {style : 'position:relative'}), co.firstChild); - tb = DOM.get(ed.id + '_tbl'); - - DOM.add(co, 'div', {id : id + '_blocker', 'class' : 'mceBlocker', style : {width : tb.clientWidth + 2, height : tb.clientHeight + 2}}); - DOM.add(co, 'div', {id : id + '_progress', 'class' : 'mceProgress', style : {left : tb.clientWidth / 2, top : tb.clientHeight / 2}}); - }, ti || 0); - } else { - DOM.remove(id + '_blocker'); - DOM.remove(id + '_progress'); - clearTimeout(t.progressTimer); - } - }); - - DOM.loadCSS(s.editor_css ? ed.documentBaseURI.toAbsolute(s.editor_css) : url + "/skins/" + ed.settings.skin + "/ui.css"); - - if (s.skin_variant) - DOM.loadCSS(url + "/skins/" + ed.settings.skin + "/ui_" + s.skin_variant + ".css"); - }, - - _isHighContrast : function() { - var actualColor, div = DOM.add(DOM.getRoot(), 'div', {'style': 'background-color: rgb(171,239,86);'}); - - actualColor = (DOM.getStyle(div, 'background-color', true) + '').toLowerCase().replace(/ /g, ''); - DOM.remove(div); - - return actualColor != 'rgb(171,239,86)' && actualColor != '#abef56'; - }, - - createControl : function(n, cf) { - var cd, c; - - if (c = cf.createControl(n)) - return c; - - switch (n) { - case "styleselect": - return this._createStyleSelect(); - - case "formatselect": - return this._createBlockFormats(); - - case "fontselect": - return this._createFontSelect(); - - case "fontsizeselect": - return this._createFontSizeSelect(); - - case "forecolor": - return this._createForeColorMenu(); - - case "backcolor": - return this._createBackColorMenu(); - } - - if ((cd = this.controls[n])) - return cf.createButton(n, {title : "umbraco." + cd[0], cmd : cd[1], ui : cd[2], value : cd[3]}); - }, - - execCommand : function(cmd, ui, val) { - var f = this['_' + cmd]; - - if (f) { - f.call(this, ui, val); - return true; - } - - return false; - }, - - _importClasses : function(e) { - var ed = this.editor, ctrl = ed.controlManager.get('styleselect'); - - if (ctrl.getLength() == 0) { - each(ed.dom.getClasses(), function(o, idx) { - var name = 'style_' + idx, fmt; - - fmt = { - inline : 'span', - attributes : {'class' : o['class']}, - selector : '*' - }; - - ed.formatter.register(name, fmt); - - ctrl.add(o['class'], name, { - style: function() { - return getPreviewCss(ed, fmt); - } - }); - }); - } - }, - - _createStyleSelect : function(n) { - var t = this, ed = t.editor, ctrlMan = ed.controlManager, ctrl; - - // Setup style select box - ctrl = ctrlMan.createListBox('styleselect', { - title : 'umbraco.style_select', - onselect : function(name) { - var matches, formatNames = [], removedFormat; - - each(ctrl.items, function(item) { - formatNames.push(item.value); - }); - - ed.focus(); - ed.undoManager.add(); - - // Toggle off the current format(s) - matches = ed.formatter.matchAll(formatNames); - tinymce.each(matches, function(match) { - if (!name || match == name) { - if (match) - ed.formatter.remove(match); - - removedFormat = true; - } - }); - - if (!removedFormat) - ed.formatter.apply(name); - - ed.undoManager.add(); - ed.nodeChanged(); - - return false; // No auto select - } - }); - - // Handle specified format - ed.onPreInit.add(function() { - var counter = 0, formats = ed.getParam('style_formats'); - - if (formats) { - each(formats, function(fmt) { - var name, keys = 0; - - each(fmt, function() {keys++;}); - - if (keys > 1) { - name = fmt.name = fmt.name || 'style_' + (counter++); - ed.formatter.register(name, fmt); - ctrl.add(fmt.title, name, { - style: function() { - return getPreviewCss(ed, fmt); - } - }); - } else - ctrl.add(fmt.title); - }); - } else { - each(ed.getParam('theme_umbraco_styles', '', 'hash'), function(val, key) { - var name, fmt; - - if (val) { - name = 'style_' + (counter++); - fmt = { - inline : 'span', - classes : val, - selector : '*' - }; - - ed.formatter.register(name, fmt); - ctrl.add(t.editor.translate(key), name, { - style: function() { - return getPreviewCss(ed, fmt); - } - }); - } - }); - } - }); - - // Auto import classes if the ctrl box is empty - if (ctrl.getLength() == 0) { - ctrl.onPostRender.add(function(ed, n) { - if (!ctrl.NativeListBox) { - Event.add(n.id + '_text', 'focus', t._importClasses, t); - Event.add(n.id + '_text', 'mousedown', t._importClasses, t); - Event.add(n.id + '_open', 'focus', t._importClasses, t); - Event.add(n.id + '_open', 'mousedown', t._importClasses, t); - } else - Event.add(n.id, 'focus', t._importClasses, t); - }); - } - - return ctrl; - }, - - _createFontSelect : function() { - var c, t = this, ed = t.editor; - - c = ed.controlManager.createListBox('fontselect', { - title : 'umbraco.fontdefault', - onselect : function(v) { - var cur = c.items[c.selectedIndex]; - - if (!v && cur) { - ed.execCommand('FontName', false, cur.value); - return; - } - - ed.execCommand('FontName', false, v); - - // Fake selection, execCommand will fire a nodeChange and update the selection - c.select(function(sv) { - return v == sv; - }); - - if (cur && cur.value == v) { - c.select(null); - } - - return false; // No auto select - } - }); - - if (c) { - each(ed.getParam('theme_umbraco_fonts', t.settings.theme_umbraco_fonts, 'hash'), function(v, k) { - c.add(ed.translate(k), v, {style : v.indexOf('dings') == -1 ? 'font-family:' + v : ''}); - }); - } - - return c; - }, - - _createFontSizeSelect : function() { - var t = this, ed = t.editor, c, i = 0, cl = []; - - c = ed.controlManager.createListBox('fontsizeselect', {title : 'umbraco.font_size', onselect : function(v) { - var cur = c.items[c.selectedIndex]; - - if (!v && cur) { - cur = cur.value; - - if (cur['class']) { - ed.formatter.toggle('fontsize_class', {value : cur['class']}); - ed.undoManager.add(); - ed.nodeChanged(); - } else { - ed.execCommand('FontSize', false, cur.fontSize); - } - - return; - } - - if (v['class']) { - ed.focus(); - ed.undoManager.add(); - ed.formatter.toggle('fontsize_class', {value : v['class']}); - ed.undoManager.add(); - ed.nodeChanged(); - } else - ed.execCommand('FontSize', false, v.fontSize); - - // Fake selection, execCommand will fire a nodeChange and update the selection - c.select(function(sv) { - return v == sv; - }); - - if (cur && (cur.value.fontSize == v.fontSize || cur.value['class'] && cur.value['class'] == v['class'])) { - c.select(null); - } - - return false; // No auto select - }}); - - if (c) { - each(t.settings.theme_umbraco_font_sizes, function(v, k) { - var fz = v.fontSize; - - if (fz >= 1 && fz <= 7) - fz = t.sizes[parseInt(fz) - 1] + 'pt'; - - c.add(k, v, {'style' : 'font-size:' + fz, 'class' : 'mceFontSize' + (i++) + (' ' + (v['class'] || ''))}); - }); - } - - return c; - }, - - _createBlockFormats : function() { - var c, fmts = { - p : 'umbraco.paragraph', - address : 'umbraco.address', - pre : 'umbraco.pre', - h1 : 'umbraco.h1', - h2 : 'umbraco.h2', - h3 : 'umbraco.h3', - h4 : 'umbraco.h4', - h5 : 'umbraco.h5', - h6 : 'umbraco.h6', - div : 'umbraco.div', - blockquote : 'umbraco.blockquote', - code : 'umbraco.code', - dt : 'umbraco.dt', - dd : 'umbraco.dd', - samp : 'umbraco.samp' - }, t = this; - - c = t.editor.controlManager.createListBox('formatselect', {title : 'umbraco.block', onselect : function(v) { - t.editor.execCommand('FormatBlock', false, v); - return false; - }}); - - if (c) { - each(t.editor.getParam('theme_umbraco_blockformats', t.settings.theme_umbraco_blockformats, 'hash'), function(v, k) { - c.add(t.editor.translate(k != v ? k : fmts[v]), v, {'class' : 'mce_formatPreview mce_' + v, style: function() { - return getPreviewCss(t.editor, {block: v}); - }}); - }); - } - - return c; - }, - - _createForeColorMenu : function() { - var c, t = this, s = t.settings, o = {}, v; - - if (s.theme_umbraco_more_colors) { - o.more_colors_func = function() { - t._mceColorPicker(0, { - color : c.value, - func : function(co) { - c.setColor(co); - } - }); - }; - } - - if (v = s.theme_umbraco_text_colors) - o.colors = v; - - if (s.theme_umbraco_default_foreground_color) - o.default_color = s.theme_umbraco_default_foreground_color; - - o.title = 'umbraco.forecolor_desc'; - o.cmd = 'ForeColor'; - o.scope = this; - - c = t.editor.controlManager.createColorSplitButton('forecolor', o); - - return c; - }, - - _createBackColorMenu : function() { - var c, t = this, s = t.settings, o = {}, v; - - if (s.theme_umbraco_more_colors) { - o.more_colors_func = function() { - t._mceColorPicker(0, { - color : c.value, - func : function(co) { - c.setColor(co); - } - }); - }; - } - - if (v = s.theme_umbraco_background_colors) - o.colors = v; - - if (s.theme_umbraco_default_background_color) - o.default_color = s.theme_umbraco_default_background_color; - - o.title = 'umbraco.backcolor_desc'; - o.cmd = 'HiliteColor'; - o.scope = this; - - c = t.editor.controlManager.createColorSplitButton('backcolor', o); - - return c; - }, - - renderUI : function(o) { - var n, ic, tb, t = this, ed = t.editor, s = t.settings, sc, p, nl; - - if (ed.settings) { - ed.settings.aria_label = s.aria_label + ed.getLang('umbraco.help_shortcut'); - } - - // TODO: ACC Should have an aria-describedby attribute which is user-configurable to describe what this field is actually for. - // Maybe actually inherit it from the original textara? - n = p = DOM.create('span', {role : 'application', 'aria-labelledby' : ed.id + '_voice', id : ed.id + '_parent', 'class' : 'mceEditor ' + ed.settings.skin + 'Skin' + (s.skin_variant ? ' ' + ed.settings.skin + 'Skin' + t._ufirst(s.skin_variant) : '') + (ed.settings.directionality == "rtl" ? ' mceRtl' : '')}); - DOM.add(n, 'span', {'class': 'mceVoiceLabel', 'style': 'display:none;', id: ed.id + '_voice'}, s.aria_label); - - if (!DOM.boxModel) - n = DOM.add(n, 'div', {'class' : 'mceOldBoxModel'}); - - n = sc = DOM.add(n, 'table', {role : "presentation", id : ed.id + '_tbl', 'class' : 'mceLayout', cellSpacing : 0, cellPadding : 0}); - n = tb = DOM.add(n, 'tbody'); - - switch ((s.theme_umbraco_layout_manager || '').toLowerCase()) { - case "rowlayout": - ic = t._rowLayout(s, tb, o); - break; - - case "customlayout": - ic = ed.execCallback("theme_umbraco_custom_layout", s, tb, o, p); - break; - - default: - ic = t._simpleLayout(s, tb, o, p); - } - - n = o.targetNode; - - // Add classes to first and last TRs - nl = sc.rows; - DOM.addClass(nl[0], 'mceFirst'); - DOM.addClass(nl[nl.length - 1], 'mceLast'); - - // Add classes to first and last TDs - each(DOM.select('tr', tb), function(n) { - DOM.addClass(n.firstChild, 'mceFirst'); - DOM.addClass(n.childNodes[n.childNodes.length - 1], 'mceLast'); - }); - - if (DOM.get(s.theme_umbraco_toolbar_container)) - DOM.get(s.theme_umbraco_toolbar_container).appendChild(p); - else - DOM.insertAfter(p, n); - - Event.add(ed.id + '_path_row', 'click', function(e) { - e = e.target; - - if (e.nodeName == 'A') { - t._sel(e.className.replace(/^.*mcePath_([0-9]+).*$/, '$1')); - return false; - } - }); -/* - if (DOM.get(ed.id + '_path_row')) { - Event.add(ed.id + '_tbl', 'mouseover', function(e) { - var re; - - e = e.target; - - if (e.nodeName == 'SPAN' && DOM.hasClass(e.parentNode, 'mceButton')) { - re = DOM.get(ed.id + '_path_row'); - t.lastPath = re.innerHTML; - DOM.setHTML(re, e.parentNode.title); - } - }); - - Event.add(ed.id + '_tbl', 'mouseout', function(e) { - if (t.lastPath) { - DOM.setHTML(ed.id + '_path_row', t.lastPath); - t.lastPath = 0; - } - }); - } -*/ - - if (!ed.getParam('accessibility_focus')) - Event.add(DOM.add(p, 'a', {href : '#'}, ''), 'focus', function() {tinyMCE.get(ed.id).focus();}); - - if (s.theme_umbraco_toolbar_location == 'external') - o.deltaHeight = 0; - - t.deltaHeight = o.deltaHeight; - o.targetNode = null; - - ed.onKeyDown.add(function(ed, evt) { - var DOM_VK_F10 = 121, DOM_VK_F11 = 122; - - if (evt.altKey) { - if (evt.keyCode === DOM_VK_F10) { - // Make sure focus is given to toolbar in Safari. - // We can't do this in IE as it prevents giving focus to toolbar when editor is in a frame - if (tinymce.isWebKit) { - window.focus(); - } - t.toolbarGroup.focus(); - return Event.cancel(evt); - } else if (evt.keyCode === DOM_VK_F11) { - DOM.get(ed.id + '_path_row').focus(); - return Event.cancel(evt); - } - } - }); - - // alt+0 is the UK recommended shortcut for accessing the list of access controls. - ed.addShortcut('alt+0', '', 'mceShortcuts', t); - - return { - iframeContainer : ic, - editorContainer : ed.id + '_parent', - sizeContainer : sc, - deltaHeight : o.deltaHeight - }; - }, - - getInfo : function() { - return { - longname : 'Umbraco theme', - author : 'Umbraco, based on the advanced theme by Moxiecode Systems AB', - authorurl : 'http://umbraco.org', - version : tinymce.majorVersion + "." + tinymce.minorVersion - } - }, - - resizeBy : function(dw, dh) { - var e = DOM.get(this.editor.id + '_ifr'); - - this.resizeTo(e.clientWidth + dw, e.clientHeight + dh); - }, - - resizeTo : function(w, h, store) { - var ed = this.editor, s = this.settings, e = DOM.get(ed.id + '_tbl'), ifr = DOM.get(ed.id + '_ifr'); - - // Boundery fix box - w = Math.max(s.theme_umbraco_resizing_min_width || 100, w); - h = Math.max(s.theme_umbraco_resizing_min_height || 100, h); - w = Math.min(s.theme_umbraco_resizing_max_width || 0xFFFF, w); - h = Math.min(s.theme_umbraco_resizing_max_height || 0xFFFF, h); - - // Resize iframe and container - DOM.setStyle(e, 'height', ''); - DOM.setStyle(ifr, 'height', h); - - if (s.theme_umbraco_resize_horizontal) { - DOM.setStyle(e, 'width', ''); - DOM.setStyle(ifr, 'width', w); - - // Make sure that the size is never smaller than the over all ui - if (w < e.clientWidth) { - w = e.clientWidth; - DOM.setStyle(ifr, 'width', e.clientWidth); - } - } - - // Store away the size - if (store && s.theme_umbraco_resizing_use_cookie) { - Cookie.setHash("TinyMCE_" + ed.id + "_size", { - cw : w, - ch : h - }); - } - }, - - destroy : function() { - var id = this.editor.id; - - Event.clear(id + '_resize'); - Event.clear(id + '_path_row'); - Event.clear(id + '_external_close'); - }, - - // Internal functions - - _simpleLayout : function(s, tb, o, p) { - var t = this, ed = t.editor, lo = s.theme_umbraco_toolbar_location, sl = s.theme_umbraco_statusbar_location, n, ic, etb, c; - - if (s.readonly) { - n = DOM.add(tb, 'tr'); - n = ic = DOM.add(n, 'td', {'class' : 'mceIframeContainer'}); - return ic; - } - - // Create toolbar container at top - if (lo == 'top') - t._addToolbars(tb, o); - - // Create external toolbar - /* UMBRACO MODIFIED */ - if (lo == 'external') { - n = c = DOM.create('div', { id: ed.id + '_external', 'class': 'mceToolbarExternal umbracoSkin' }); - n = DOM.add(n, 'table', { id: ed.id + '_tblext', cellSpacing: 0, cellPadding: 0, style: 'margin-left: 10px' }); - etb = DOM.add(n, 'tbody'); - - /* UMBRACO: Custom toolbar injection - if (p.firstChild.className == 'mceOldBoxModel') - p.firstChild.appendChild(c); - else - p.insertBefore(c, p.firstChild); - */ - document.getElementById(ed.getParam("umbraco_toolbar_id", "*")).appendChild(c); - - /* UMBRACO: Custom toolbar handling - - t._addToolbars(etb, o); - - ed.onMouseUp.add(function() { - var e = DOM.get(ed.id + '_external'); - DOM.show(e); - - DOM.hide(lastExtID); - - var f = Event.add(ed.id + '_external_close', 'click', function() { - DOM.hide(ed.id + '_external'); - Event.remove(ed.id + '_external_close', 'click', f); - }); - - DOM.show(e); - DOM.setStyle(e, 'top', 0 - DOM.getRect(ed.id + '_tblext').h - 1); - - // Fixes IE rendering bug - DOM.hide(e); - DOM.show(e); - e.style.filter = ''; - - lastExtID = ed.id + '_external'; - - e = null; - }); - */ - - jQuery(document).ready(function () { - t._addToolbars(etb, o); - DOM.show(DOM.get(ed.id + '_external')); - }); - - ed.onMouseUp.add(function () { - jQuery(".tinymceMenuBar").hide(); - jQuery("#" + ed.id + "_external").parent().show(); - }); - } - - if (sl == 'top') - t._addStatusBar(tb, o); - - // Create iframe container - if (!s.theme_umbraco_toolbar_container) { - n = DOM.add(tb, 'tr'); - n = ic = DOM.add(n, 'td', {'class' : 'mceIframeContainer'}); - } - - // Create toolbar container at bottom - if (lo == 'bottom') - t._addToolbars(tb, o); - - if (sl == 'bottom') - t._addStatusBar(tb, o); - - return ic; - }, - - _rowLayout : function(s, tb, o) { - var t = this, ed = t.editor, dc, da, cf = ed.controlManager, n, ic, to, a; - - dc = s.theme_umbraco_containers_default_class || ''; - da = s.theme_umbraco_containers_default_align || 'center'; - - each(explode(s.theme_umbraco_containers || ''), function(c, i) { - var v = s['theme_umbraco_container_' + c] || ''; - - switch (c.toLowerCase()) { - case 'mceeditor': - n = DOM.add(tb, 'tr'); - n = ic = DOM.add(n, 'td', {'class' : 'mceIframeContainer'}); - break; - - case 'mceelementpath': - t._addStatusBar(tb, o); - break; - - default: - a = (s['theme_umbraco_container_' + c + '_align'] || da).toLowerCase(); - a = 'mce' + t._ufirst(a); - - n = DOM.add(DOM.add(tb, 'tr'), 'td', { - 'class' : 'mceToolbar ' + (s['theme_umbraco_container_' + c + '_class'] || dc) + ' ' + a || da - }); - - to = cf.createToolbar("toolbar" + i); - t._addControls(v, to); - DOM.setHTML(n, to.renderHTML()); - o.deltaHeight -= s.theme_umbraco_row_height; - } - }); - - return ic; - }, - - _addControls : function(v, tb) { - var t = this, s = t.settings, di, cf = t.editor.controlManager; - - if (s.theme_umbraco_disable && !t._disabled) { - di = {}; - - each(explode(s.theme_umbraco_disable), function(v) { - di[v] = 1; - }); - - t._disabled = di; - } else - di = t._disabled; - - each(explode(v), function(n) { - var c; - - if (di && di[n]) - return; - - // Compatiblity with 2.x - if (n == 'tablecontrols') { - each(["table","|","row_props","cell_props","|","row_before","row_after","delete_row","|","col_before","col_after","delete_col","|","split_cells","merge_cells"], function(n) { - n = t.createControl(n, cf); - - if (n) - tb.add(n); - }); - - return; - } - - c = t.createControl(n, cf); - - if (c) - tb.add(c); - }); - }, - - _addToolbars : function(c, o) { - var t = this, i, tb, ed = t.editor, s = t.settings, v, cf = ed.controlManager, di, n, h = [], a, toolbarGroup, toolbarsExist = false; - - toolbarGroup = cf.createToolbarGroup('toolbargroup', { - 'name': ed.getLang('umbraco.toolbar'), - 'tab_focus_toolbar':ed.getParam('theme_umbraco_tab_focus_toolbar') - }); - - t.toolbarGroup = toolbarGroup; - - a = s.theme_umbraco_toolbar_align.toLowerCase(); - a = 'mce' + t._ufirst(a); - - n = DOM.add(DOM.add(c, 'tr', {role: 'presentation'}), 'td', {'class' : 'mceToolbar ' + a, "role":"presentation"}); - - // Create toolbar and add the controls - for (i=1; (v = s['theme_umbraco_buttons' + i]); i++) { - toolbarsExist = true; - tb = cf.createToolbar("toolbar" + i, {'class' : 'mceToolbarRow' + i}); - - if (s['theme_umbraco_buttons' + i + '_add']) - v += ',' + s['theme_umbraco_buttons' + i + '_add']; - - if (s['theme_umbraco_buttons' + i + '_add_before']) - v = s['theme_umbraco_buttons' + i + '_add_before'] + ',' + v; - - t._addControls(v, tb); - toolbarGroup.add(tb); - - o.deltaHeight -= s.theme_umbraco_row_height; - } - // Handle case when there are no toolbar buttons and ensure editor height is adjusted accordingly - if (!toolbarsExist) - o.deltaHeight -= s.theme_advanced_row_height; - h.push(toolbarGroup.renderHTML()); - h.push(DOM.createHTML('a', {href : '#', accesskey : 'z', title : ed.getLang("umbraco.toolbar_focus"), onfocus : 'tinyMCE.getInstanceById(\'' + ed.id + '\').focus();'}, '')); - DOM.setHTML(n, h.join('')); - }, - - _addStatusBar : function(tb, o) { - var n, t = this, ed = t.editor, s = t.settings, r, mf, me, td; - - n = DOM.add(tb, 'tr'); - n = td = DOM.add(n, 'td', {'class' : 'mceStatusbar'}); - n = DOM.add(n, 'div', {id : ed.id + '_path_row', 'role': 'group', 'aria-labelledby': ed.id + '_path_voice'}); - if (s.theme_umbraco_path) { - DOM.add(n, 'span', {id: ed.id + '_path_voice'}, ed.translate('umbraco.path')); - DOM.add(n, 'span', {}, ': '); - } else { - DOM.add(n, 'span', {}, ' '); - } - - - if (s.theme_umbraco_resizing) { - DOM.add(td, 'a', {id : ed.id + '_resize', href : 'javascript:;', onclick : "return false;", 'class' : 'mceResize', tabIndex:"-1"}); - - if (s.theme_umbraco_resizing_use_cookie) { - ed.onPostRender.add(function() { - var o = Cookie.getHash("TinyMCE_" + ed.id + "_size"), c = DOM.get(ed.id + '_tbl'); - - if (!o) - return; - - t.resizeTo(o.cw, o.ch); - }); - } - - ed.onPostRender.add(function() { - Event.add(ed.id + '_resize', 'click', function(e) { - e.preventDefault(); - }); - - Event.add(ed.id + '_resize', 'mousedown', function(e) { - var mouseMoveHandler1, mouseMoveHandler2, - mouseUpHandler1, mouseUpHandler2, - startX, startY, startWidth, startHeight, width, height, ifrElm; - - function resizeOnMove(e) { - e.preventDefault(); - - width = startWidth + (e.screenX - startX); - height = startHeight + (e.screenY - startY); - - t.resizeTo(width, height); - }; - - function endResize(e) { - // Stop listening - Event.remove(DOM.doc, 'mousemove', mouseMoveHandler1); - Event.remove(ed.getDoc(), 'mousemove', mouseMoveHandler2); - Event.remove(DOM.doc, 'mouseup', mouseUpHandler1); - Event.remove(ed.getDoc(), 'mouseup', mouseUpHandler2); - - width = startWidth + (e.screenX - startX); - height = startHeight + (e.screenY - startY); - t.resizeTo(width, height, true); - }; - - e.preventDefault(); - - // Get the current rect size - startX = e.screenX; - startY = e.screenY; - ifrElm = DOM.get(t.editor.id + '_ifr'); - startWidth = width = ifrElm.clientWidth; - startHeight = height = ifrElm.clientHeight; - - // Register envent handlers - mouseMoveHandler1 = Event.add(DOM.doc, 'mousemove', resizeOnMove); - mouseMoveHandler2 = Event.add(ed.getDoc(), 'mousemove', resizeOnMove); - mouseUpHandler1 = Event.add(DOM.doc, 'mouseup', endResize); - mouseUpHandler2 = Event.add(ed.getDoc(), 'mouseup', endResize); - }); - }); - } - - o.deltaHeight -= 21; - n = tb = null; - }, - - _updateUndoStatus : function(ed) { - var cm = ed.controlManager, um = ed.undoManager; - - cm.setDisabled('undo', !um.hasUndo() && !um.typing); - cm.setDisabled('redo', !um.hasRedo()); - }, - - _nodeChanged : function(ed, cm, n, co, ob) { - var t = this, p, de = 0, v, c, s = t.settings, cl, fz, fn, fc, bc, formatNames, matches; - - tinymce.each(t.stateControls, function(c) { - cm.setActive(c, ed.queryCommandState(t.controls[c][1])); - }); - - function getParent(name) { - var i, parents = ob.parents, func = name; - - if (typeof(name) == 'string') { - func = function(node) { - return node.nodeName == name; - }; - } - - for (i = 0; i < parents.length; i++) { - if (func(parents[i])) - return parents[i]; - } - }; - - cm.setActive('visualaid', ed.hasVisual); - t._updateUndoStatus(ed); - cm.setDisabled('outdent', !ed.queryCommandState('Outdent')); - - p = getParent('A'); - if (c = cm.get('link')) { - if (!p || !p.name) { - c.setDisabled(!p && co); - c.setActive(!!p); - } - } - - if (c = cm.get('unlink')) { - c.setDisabled(!p && co); - c.setActive(!!p && !p.name); - } - - if (c = cm.get('anchor')) { - c.setActive(!co && !!p && p.name); - } - - p = getParent('IMG'); - if (c = cm.get('image')) - c.setActive(!co && !!p && n.className.indexOf('mceItem') == -1); - - if (c = cm.get('styleselect')) { - t._importClasses(); - - formatNames = []; - each(c.items, function(item) { - formatNames.push(item.value); - }); - - matches = ed.formatter.matchAll(formatNames); - c.select(matches[0]); - tinymce.each(matches, function(match, index) { - if (index > 0) { - c.mark(match); - } - }); - } - - if (c = cm.get('formatselect')) { - p = getParent(ed.dom.isBlock); - - if (p) - c.select(p.nodeName.toLowerCase()); - } - - // Find out current fontSize, fontFamily and fontClass - getParent(function(n) { - if (n.nodeName === 'SPAN') { - if (!cl && n.className) - cl = n.className; - } - - if (ed.dom.is(n, s.theme_umbraco_font_selector)) { - if (!fz && n.style.fontSize) - fz = n.style.fontSize; - - if (!fn && n.style.fontFamily) - fn = n.style.fontFamily.replace(/[\"\']+/g, '').replace(/^([^,]+).*/, '$1').toLowerCase(); - - if (!fc && n.style.color) - fc = n.style.color; - - if (!bc && n.style.backgroundColor) - bc = n.style.backgroundColor; - } - - return false; - }); - - if (c = cm.get('fontselect')) { - c.select(function(v) { - return v.replace(/^([^,]+).*/, '$1').toLowerCase() == fn; - }); - } - - // Select font size - if (c = cm.get('fontsizeselect')) { - // Use computed style - if (s.theme_umbraco_runtime_fontsize && !fz && !cl) - fz = ed.dom.getStyle(n, 'fontSize', true); - - c.select(function(v) { - if (v.fontSize && v.fontSize === fz) - return true; - - if (v['class'] && v['class'] === cl) - return true; - }); - } - - if (s.theme_umbraco_show_current_color) { - function updateColor(controlId, color) { - if (c = cm.get(controlId)) { - if (!color) - color = c.settings.default_color; - if (color !== c.value) { - c.displayColor(color); - } - } - } - updateColor('forecolor', fc); - updateColor('backcolor', bc); - } - - if (s.theme_umbraco_show_current_color) { - function updateColor(controlId, color) { - if (c = cm.get(controlId)) { - if (!color) - color = c.settings.default_color; - if (color !== c.value) { - c.displayColor(color); - } - } - }; - - updateColor('forecolor', fc); - updateColor('backcolor', bc); - } - - if (s.theme_umbraco_path && s.theme_umbraco_statusbar_location) { - p = DOM.get(ed.id + '_path') || DOM.add(ed.id + '_path_row', 'span', {id : ed.id + '_path'}); - - if (t.statusKeyboardNavigation) { - t.statusKeyboardNavigation.destroy(); - t.statusKeyboardNavigation = null; - } - - DOM.setHTML(p, ''); - - getParent(function(n) { - var na = n.nodeName.toLowerCase(), u, pi, ti = ''; - - // Ignore non element and bogus/hidden elements - if (n.nodeType != 1 || na === 'br' || n.getAttribute('data-mce-bogus') || DOM.hasClass(n, 'mceItemHidden') || DOM.hasClass(n, 'mceItemRemoved')) - return; - - // Handle prefix - if (tinymce.isIE && n.scopeName !== 'HTML' && n.scopeName) - na = n.scopeName + ':' + na; - - // Remove internal prefix - na = na.replace(/mce\:/g, ''); - - // Handle node name - switch (na) { - case 'b': - na = 'strong'; - break; - - case 'i': - na = 'em'; - break; - - case 'img': - if (v = DOM.getAttrib(n, 'src')) - ti += 'src: ' + v + ' '; - - break; - - case 'a': - if (v = DOM.getAttrib(n, 'name')) { - ti += 'name: ' + v + ' '; - na += '#' + v; - } - - if (v = DOM.getAttrib(n, 'href')) - ti += 'href: ' + v + ' '; - - break; - - case 'font': - if (v = DOM.getAttrib(n, 'face')) - ti += 'font: ' + v + ' '; - - if (v = DOM.getAttrib(n, 'size')) - ti += 'size: ' + v + ' '; - - if (v = DOM.getAttrib(n, 'color')) - ti += 'color: ' + v + ' '; - - break; - - case 'span': - if (v = DOM.getAttrib(n, 'style')) - ti += 'style: ' + v + ' '; - - break; - } - - if (v = DOM.getAttrib(n, 'id')) - ti += 'id: ' + v + ' '; - - if (v = n.className) { - v = v.replace(/\b\s*(webkit|mce|Apple-)\w+\s*\b/g, '') - - if (v) { - ti += 'class: ' + v + ' '; - - if (ed.dom.isBlock(n) || na == 'img' || na == 'span') - na += '.' + v; - } - } - - na = na.replace(/(html:)/g, ''); - na = {name : na, node : n, title : ti}; - t.onResolveName.dispatch(t, na); - ti = na.title; - na = na.name; - - //u = "javascript:tinymce.EditorManager.get('" + ed.id + "').theme._sel('" + (de++) + "');"; - pi = DOM.create('a', {'href' : "javascript:;", role: 'button', onmousedown : "return false;", title : ti, 'class' : 'mcePath_' + (de++)}, na); - - if (p.hasChildNodes()) { - p.insertBefore(DOM.create('span', {'aria-hidden': 'true'}, '\u00a0\u00bb '), p.firstChild); - p.insertBefore(pi, p.firstChild); - } else - p.appendChild(pi); - }, ed.getBody()); - - if (DOM.select('a', p).length > 0) { - t.statusKeyboardNavigation = new tinymce.ui.KeyboardNavigation({ - root: ed.id + "_path_row", - items: DOM.select('a', p), - excludeFromTabOrder: true, - onCancel: function() { - ed.focus(); - } - }, DOM); - } - } - }, - - // Commands gets called by execCommand - - _sel : function(v) { - this.editor.execCommand('mceSelectNodeDepth', false, v); - }, - - _mceInsertAnchor : function(ui, v) { - var ed = this.editor; - - ed.windowManager.open({ - url : this.url + '/anchor.htm', - width : 320 + parseInt(ed.getLang('umbraco.anchor_delta_width', 0)), - height : 90 + parseInt(ed.getLang('umbraco.anchor_delta_height', 0)), - inline : true - }, { - theme_url : this.url - }); - }, - - _mceCharMap : function() { - var ed = this.editor; - - ed.windowManager.open({ - url : this.url + '/charmap.htm', - width : 550 + parseInt(ed.getLang('umbraco.charmap_delta_width', 0)), - height : 265 + parseInt(ed.getLang('umbraco.charmap_delta_height', 0)), - inline : true - }, { - theme_url : this.url - }); - }, - - _mceHelp : function() { - var ed = this.editor; - - ed.windowManager.open({ - url : this.url + '/about.htm', - width : 480, - height : 380, - inline : true - }, { - theme_url : this.url - }); - }, - - _mceShortcuts : function() { - var ed = this.editor; - ed.windowManager.open({ - url: this.url + '/shortcuts.htm', - width: 480, - height: 380, - inline: true - }, { - theme_url: this.url - }); - }, - - _mceColorPicker : function(u, v) { - var ed = this.editor; - - v = v || {}; - - ed.windowManager.open({ - url : this.url + '/color_picker.htm', - width : 375 + parseInt(ed.getLang('umbraco.colorpicker_delta_width', 0)), - height : 250 + parseInt(ed.getLang('umbraco.colorpicker_delta_height', 0)), - close_previous : false, - inline : true - }, { - input_color : v.color, - func : v.func, - theme_url : this.url - }); - }, - - _mceCodeEditor : function(ui, val) { - var ed = this.editor; - - ed.windowManager.open({ - url : this.url + '/source_editor.htm', - width : parseInt(ed.getParam("theme_umbraco_source_editor_width", 720)), - height : parseInt(ed.getParam("theme_umbraco_source_editor_height", 580)), - inline : true, - resizable : true, - maximizable : true - }, { - theme_url : this.url - }); - }, - - _mceImage : function(ui, val) { - var ed = this.editor; - - // Internal image object like a flash placeholder - if (ed.dom.getAttrib(ed.selection.getNode(), 'class', '').indexOf('mceItem') != -1) - return; - - ed.windowManager.open({ - url : this.url + '/image.htm', - width : 355 + parseInt(ed.getLang('umbraco.image_delta_width', 0)), - height : 275 + parseInt(ed.getLang('umbraco.image_delta_height', 0)), - inline : true - }, { - theme_url : this.url - }); - }, - - _mceLink : function(ui, val) { - var ed = this.editor; - - ed.windowManager.open({ - url : this.url + '/link.htm', - width : 310 + parseInt(ed.getLang('umbraco.link_delta_width', 0)), - height : 200 + parseInt(ed.getLang('umbraco.link_delta_height', 0)), - inline : true - }, { - theme_url : this.url - }); - }, - - _mceNewDocument : function() { - var ed = this.editor; - - ed.windowManager.confirm('umbraco.newdocument', function(s) { - if (s) - ed.execCommand('mceSetContent', false, ''); - }); - }, - - _mceForeColor : function() { - var t = this; - - this._mceColorPicker(0, { - color: t.fgColor, - func : function(co) { - t.fgColor = co; - t.editor.execCommand('ForeColor', false, co); - } - }); - }, - - _mceBackColor : function() { - var t = this; - - this._mceColorPicker(0, { - color: t.bgColor, - func : function(co) { - t.bgColor = co; - t.editor.execCommand('HiliteColor', false, co); - } - }); - }, - - _ufirst : function(s) { - return s.substring(0, 1).toUpperCase() + s.substring(1); - } - }); - - tinymce.ThemeManager.add('umbraco', tinymce.themes.UmbracoTheme); -}(tinymce)); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/image.htm b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/image.htm deleted file mode 100644 index d7622cbfc8..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/image.htm +++ /dev/null @@ -1,81 +0,0 @@ - - - - {#umbraco_dlg.image_title} - - - - - - - -
    - - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - - - -
     
    - x -
    -
    -
    - -
    - - -
    -
    - - diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/img/colorpicker.jpg b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/img/colorpicker.jpg deleted file mode 100644 index b1a377aba7..0000000000 Binary files a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/img/colorpicker.jpg and /dev/null differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/img/flash.gif b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/img/flash.gif deleted file mode 100644 index dec3f7c702..0000000000 Binary files a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/img/flash.gif and /dev/null differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/img/icons.gif b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/img/icons.gif deleted file mode 100644 index ca22249018..0000000000 Binary files a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/img/icons.gif and /dev/null differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/img/iframe.gif b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/img/iframe.gif deleted file mode 100644 index 410c7ad084..0000000000 Binary files a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/img/iframe.gif and /dev/null differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/img/pagebreak.gif b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/img/pagebreak.gif deleted file mode 100644 index acdf4085f3..0000000000 Binary files a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/img/pagebreak.gif and /dev/null differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/img/quicktime.gif b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/img/quicktime.gif deleted file mode 100644 index 8f10e7aa6b..0000000000 Binary files a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/img/quicktime.gif and /dev/null differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/img/realmedia.gif b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/img/realmedia.gif deleted file mode 100644 index fdfe0b9ac0..0000000000 Binary files a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/img/realmedia.gif and /dev/null differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/img/shockwave.gif b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/img/shockwave.gif deleted file mode 100644 index 9314d04470..0000000000 Binary files a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/img/shockwave.gif and /dev/null differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/img/trans.gif b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/img/trans.gif deleted file mode 100644 index 388486517f..0000000000 Binary files a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/img/trans.gif and /dev/null differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/img/video.gif b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/img/video.gif deleted file mode 100644 index 3570104077..0000000000 Binary files a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/img/video.gif and /dev/null differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/img/windowsmedia.gif b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/img/windowsmedia.gif deleted file mode 100644 index ab50f2d887..0000000000 Binary files a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/img/windowsmedia.gif and /dev/null differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/js/about.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/js/about.js deleted file mode 100644 index 5b35845761..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/js/about.js +++ /dev/null @@ -1,73 +0,0 @@ -tinyMCEPopup.requireLangPack(); - -function init() { - var ed, tcont; - - tinyMCEPopup.resizeToInnerSize(); - ed = tinyMCEPopup.editor; - - // Give FF some time - window.setTimeout(insertHelpIFrame, 10); - - tcont = document.getElementById('plugintablecontainer'); - document.getElementById('plugins_tab').style.display = 'none'; - - var html = ""; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - - tinymce.each(ed.plugins, function(p, n) { - var info; - - if (!p.getInfo) - return; - - html += ''; - - info = p.getInfo(); - - if (info.infourl != null && info.infourl != '') - html += ''; - else - html += ''; - - if (info.authorurl != null && info.authorurl != '') - html += ''; - else - html += ''; - - html += ''; - html += ''; - - document.getElementById('plugins_tab').style.display = ''; - - }); - - html += ''; - html += '
    ' + ed.getLang('advanced_dlg.about_plugin') + '' + ed.getLang('advanced_dlg.about_author') + '' + ed.getLang('advanced_dlg.about_version') + '
    ' + info.longname + '' + info.longname + '' + info.author + '' + info.author + '' + info.version + '
    '; - - tcont.innerHTML = html; - - tinyMCEPopup.dom.get('version').innerHTML = tinymce.majorVersion + "." + tinymce.minorVersion; - tinyMCEPopup.dom.get('date').innerHTML = tinymce.releaseDate; -} - -function insertHelpIFrame() { - var html; - - if (tinyMCEPopup.getParam('docs_url')) { - html = ''; - document.getElementById('iframecontainer').innerHTML = html; - document.getElementById('help_tab').style.display = 'block'; - document.getElementById('help_tab').setAttribute("aria-hidden", "false"); - } -} - -tinyMCEPopup.onInit.add(init); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/js/anchor.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/js/anchor.js deleted file mode 100644 index 2940db3591..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/js/anchor.js +++ /dev/null @@ -1,44 +0,0 @@ -tinyMCEPopup.requireLangPack(); - -var AnchorDialog = { - init : function(ed) { - var action, elm, f = document.forms[0]; - - this.editor = ed; - elm = ed.dom.getParent(ed.selection.getNode(), 'A'); - v = ed.dom.getAttrib(elm, 'name'); - - if (v) { - this.action = 'update'; - f.anchorName.value = v; - } - - f.insert.value = ed.getLang(elm ? 'update' : 'insert'); - }, - - update : function() { - var ed = this.editor, elm, name = document.forms[0].anchorName.value; - - if (!name || !/^[a-z][a-z0-9\-\_:\.]*$/i.test(name)) { - tinyMCEPopup.alert('advanced_dlg.anchor_invalid'); - return; - } - - tinyMCEPopup.restoreSelection(); - - if (this.action != 'update') - ed.selection.collapse(1); - - elm = ed.dom.getParent(ed.selection.getNode(), 'A'); - if (elm) { - elm.setAttribute('name', name); - elm.name = name; - } else - // create with zero-sized nbsp so that in Webkit where anchor is on last line by itself caret cannot be placed after it - ed.execCommand('mceInsertContent', 0, ed.dom.createHTML('a', {name : name, 'class' : 'mceItemAnchor'}, '\uFEFF')); - - tinyMCEPopup.close(); - } -}; - -tinyMCEPopup.onInit.add(AnchorDialog.init, AnchorDialog); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/js/charmap.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/js/charmap.js deleted file mode 100644 index bb1869558c..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/js/charmap.js +++ /dev/null @@ -1,363 +0,0 @@ -/** - * charmap.js - * - * Copyright 2009, Moxiecode Systems AB - * Released under LGPL License. - * - * License: http://tinymce.moxiecode.com/license - * Contributing: http://tinymce.moxiecode.com/contributing - */ - -tinyMCEPopup.requireLangPack(); - -var charmap = [ - [' ', ' ', true, 'no-break space'], - ['&', '&', true, 'ampersand'], - ['"', '"', true, 'quotation mark'], -// finance - ['¢', '¢', true, 'cent sign'], - ['€', '€', true, 'euro sign'], - ['£', '£', true, 'pound sign'], - ['¥', '¥', true, 'yen sign'], -// signs - ['©', '©', true, 'copyright sign'], - ['®', '®', true, 'registered sign'], - ['™', '™', true, 'trade mark sign'], - ['‰', '‰', true, 'per mille sign'], - ['µ', 'µ', true, 'micro sign'], - ['·', '·', true, 'middle dot'], - ['•', '•', true, 'bullet'], - ['…', '…', true, 'three dot leader'], - ['′', '′', true, 'minutes / feet'], - ['″', '″', true, 'seconds / inches'], - ['§', '§', true, 'section sign'], - ['¶', '¶', true, 'paragraph sign'], - ['ß', 'ß', true, 'sharp s / ess-zed'], -// quotations - ['‹', '‹', true, 'single left-pointing angle quotation mark'], - ['›', '›', true, 'single right-pointing angle quotation mark'], - ['«', '«', true, 'left pointing guillemet'], - ['»', '»', true, 'right pointing guillemet'], - ['‘', '‘', true, 'left single quotation mark'], - ['’', '’', true, 'right single quotation mark'], - ['“', '“', true, 'left double quotation mark'], - ['”', '”', true, 'right double quotation mark'], - ['‚', '‚', true, 'single low-9 quotation mark'], - ['„', '„', true, 'double low-9 quotation mark'], - ['<', '<', true, 'less-than sign'], - ['>', '>', true, 'greater-than sign'], - ['≤', '≤', true, 'less-than or equal to'], - ['≥', '≥', true, 'greater-than or equal to'], - ['–', '–', true, 'en dash'], - ['—', '—', true, 'em dash'], - ['¯', '¯', true, 'macron'], - ['‾', '‾', true, 'overline'], - ['¤', '¤', true, 'currency sign'], - ['¦', '¦', true, 'broken bar'], - ['¨', '¨', true, 'diaeresis'], - ['¡', '¡', true, 'inverted exclamation mark'], - ['¿', '¿', true, 'turned question mark'], - ['ˆ', 'ˆ', true, 'circumflex accent'], - ['˜', '˜', true, 'small tilde'], - ['°', '°', true, 'degree sign'], - ['−', '−', true, 'minus sign'], - ['±', '±', true, 'plus-minus sign'], - ['÷', '÷', true, 'division sign'], - ['⁄', '⁄', true, 'fraction slash'], - ['×', '×', true, 'multiplication sign'], - ['¹', '¹', true, 'superscript one'], - ['²', '²', true, 'superscript two'], - ['³', '³', true, 'superscript three'], - ['¼', '¼', true, 'fraction one quarter'], - ['½', '½', true, 'fraction one half'], - ['¾', '¾', true, 'fraction three quarters'], -// math / logical - ['ƒ', 'ƒ', true, 'function / florin'], - ['∫', '∫', true, 'integral'], - ['∑', '∑', true, 'n-ary sumation'], - ['∞', '∞', true, 'infinity'], - ['√', '√', true, 'square root'], - ['∼', '∼', false,'similar to'], - ['≅', '≅', false,'approximately equal to'], - ['≈', '≈', true, 'almost equal to'], - ['≠', '≠', true, 'not equal to'], - ['≡', '≡', true, 'identical to'], - ['∈', '∈', false,'element of'], - ['∉', '∉', false,'not an element of'], - ['∋', '∋', false,'contains as member'], - ['∏', '∏', true, 'n-ary product'], - ['∧', '∧', false,'logical and'], - ['∨', '∨', false,'logical or'], - ['¬', '¬', true, 'not sign'], - ['∩', '∩', true, 'intersection'], - ['∪', '∪', false,'union'], - ['∂', '∂', true, 'partial differential'], - ['∀', '∀', false,'for all'], - ['∃', '∃', false,'there exists'], - ['∅', '∅', false,'diameter'], - ['∇', '∇', false,'backward difference'], - ['∗', '∗', false,'asterisk operator'], - ['∝', '∝', false,'proportional to'], - ['∠', '∠', false,'angle'], -// undefined - ['´', '´', true, 'acute accent'], - ['¸', '¸', true, 'cedilla'], - ['ª', 'ª', true, 'feminine ordinal indicator'], - ['º', 'º', true, 'masculine ordinal indicator'], - ['†', '†', true, 'dagger'], - ['‡', '‡', true, 'double dagger'], -// alphabetical special chars - ['À', 'À', true, 'A - grave'], - ['Á', 'Á', true, 'A - acute'], - ['Â', 'Â', true, 'A - circumflex'], - ['Ã', 'Ã', true, 'A - tilde'], - ['Ä', 'Ä', true, 'A - diaeresis'], - ['Å', 'Å', true, 'A - ring above'], - ['Æ', 'Æ', true, 'ligature AE'], - ['Ç', 'Ç', true, 'C - cedilla'], - ['È', 'È', true, 'E - grave'], - ['É', 'É', true, 'E - acute'], - ['Ê', 'Ê', true, 'E - circumflex'], - ['Ë', 'Ë', true, 'E - diaeresis'], - ['Ì', 'Ì', true, 'I - grave'], - ['Í', 'Í', true, 'I - acute'], - ['Î', 'Î', true, 'I - circumflex'], - ['Ï', 'Ï', true, 'I - diaeresis'], - ['Ð', 'Ð', true, 'ETH'], - ['Ñ', 'Ñ', true, 'N - tilde'], - ['Ò', 'Ò', true, 'O - grave'], - ['Ó', 'Ó', true, 'O - acute'], - ['Ô', 'Ô', true, 'O - circumflex'], - ['Õ', 'Õ', true, 'O - tilde'], - ['Ö', 'Ö', true, 'O - diaeresis'], - ['Ø', 'Ø', true, 'O - slash'], - ['Œ', 'Œ', true, 'ligature OE'], - ['Š', 'Š', true, 'S - caron'], - ['Ù', 'Ù', true, 'U - grave'], - ['Ú', 'Ú', true, 'U - acute'], - ['Û', 'Û', true, 'U - circumflex'], - ['Ü', 'Ü', true, 'U - diaeresis'], - ['Ý', 'Ý', true, 'Y - acute'], - ['Ÿ', 'Ÿ', true, 'Y - diaeresis'], - ['Þ', 'Þ', true, 'THORN'], - ['à', 'à', true, 'a - grave'], - ['á', 'á', true, 'a - acute'], - ['â', 'â', true, 'a - circumflex'], - ['ã', 'ã', true, 'a - tilde'], - ['ä', 'ä', true, 'a - diaeresis'], - ['å', 'å', true, 'a - ring above'], - ['æ', 'æ', true, 'ligature ae'], - ['ç', 'ç', true, 'c - cedilla'], - ['è', 'è', true, 'e - grave'], - ['é', 'é', true, 'e - acute'], - ['ê', 'ê', true, 'e - circumflex'], - ['ë', 'ë', true, 'e - diaeresis'], - ['ì', 'ì', true, 'i - grave'], - ['í', 'í', true, 'i - acute'], - ['î', 'î', true, 'i - circumflex'], - ['ï', 'ï', true, 'i - diaeresis'], - ['ð', 'ð', true, 'eth'], - ['ñ', 'ñ', true, 'n - tilde'], - ['ò', 'ò', true, 'o - grave'], - ['ó', 'ó', true, 'o - acute'], - ['ô', 'ô', true, 'o - circumflex'], - ['õ', 'õ', true, 'o - tilde'], - ['ö', 'ö', true, 'o - diaeresis'], - ['ø', 'ø', true, 'o slash'], - ['œ', 'œ', true, 'ligature oe'], - ['š', 'š', true, 's - caron'], - ['ù', 'ù', true, 'u - grave'], - ['ú', 'ú', true, 'u - acute'], - ['û', 'û', true, 'u - circumflex'], - ['ü', 'ü', true, 'u - diaeresis'], - ['ý', 'ý', true, 'y - acute'], - ['þ', 'þ', true, 'thorn'], - ['ÿ', 'ÿ', true, 'y - diaeresis'], - ['Α', 'Α', true, 'Alpha'], - ['Β', 'Β', true, 'Beta'], - ['Γ', 'Γ', true, 'Gamma'], - ['Δ', 'Δ', true, 'Delta'], - ['Ε', 'Ε', true, 'Epsilon'], - ['Ζ', 'Ζ', true, 'Zeta'], - ['Η', 'Η', true, 'Eta'], - ['Θ', 'Θ', true, 'Theta'], - ['Ι', 'Ι', true, 'Iota'], - ['Κ', 'Κ', true, 'Kappa'], - ['Λ', 'Λ', true, 'Lambda'], - ['Μ', 'Μ', true, 'Mu'], - ['Ν', 'Ν', true, 'Nu'], - ['Ξ', 'Ξ', true, 'Xi'], - ['Ο', 'Ο', true, 'Omicron'], - ['Π', 'Π', true, 'Pi'], - ['Ρ', 'Ρ', true, 'Rho'], - ['Σ', 'Σ', true, 'Sigma'], - ['Τ', 'Τ', true, 'Tau'], - ['Υ', 'Υ', true, 'Upsilon'], - ['Φ', 'Φ', true, 'Phi'], - ['Χ', 'Χ', true, 'Chi'], - ['Ψ', 'Ψ', true, 'Psi'], - ['Ω', 'Ω', true, 'Omega'], - ['α', 'α', true, 'alpha'], - ['β', 'β', true, 'beta'], - ['γ', 'γ', true, 'gamma'], - ['δ', 'δ', true, 'delta'], - ['ε', 'ε', true, 'epsilon'], - ['ζ', 'ζ', true, 'zeta'], - ['η', 'η', true, 'eta'], - ['θ', 'θ', true, 'theta'], - ['ι', 'ι', true, 'iota'], - ['κ', 'κ', true, 'kappa'], - ['λ', 'λ', true, 'lambda'], - ['μ', 'μ', true, 'mu'], - ['ν', 'ν', true, 'nu'], - ['ξ', 'ξ', true, 'xi'], - ['ο', 'ο', true, 'omicron'], - ['π', 'π', true, 'pi'], - ['ρ', 'ρ', true, 'rho'], - ['ς', 'ς', true, 'final sigma'], - ['σ', 'σ', true, 'sigma'], - ['τ', 'τ', true, 'tau'], - ['υ', 'υ', true, 'upsilon'], - ['φ', 'φ', true, 'phi'], - ['χ', 'χ', true, 'chi'], - ['ψ', 'ψ', true, 'psi'], - ['ω', 'ω', true, 'omega'], -// symbols - ['ℵ', 'ℵ', false,'alef symbol'], - ['ϖ', 'ϖ', false,'pi symbol'], - ['ℜ', 'ℜ', false,'real part symbol'], - ['ϑ','ϑ', false,'theta symbol'], - ['ϒ', 'ϒ', false,'upsilon - hook symbol'], - ['℘', '℘', false,'Weierstrass p'], - ['ℑ', 'ℑ', false,'imaginary part'], -// arrows - ['←', '←', true, 'leftwards arrow'], - ['↑', '↑', true, 'upwards arrow'], - ['→', '→', true, 'rightwards arrow'], - ['↓', '↓', true, 'downwards arrow'], - ['↔', '↔', true, 'left right arrow'], - ['↵', '↵', false,'carriage return'], - ['⇐', '⇐', false,'leftwards double arrow'], - ['⇑', '⇑', false,'upwards double arrow'], - ['⇒', '⇒', false,'rightwards double arrow'], - ['⇓', '⇓', false,'downwards double arrow'], - ['⇔', '⇔', false,'left right double arrow'], - ['∴', '∴', false,'therefore'], - ['⊂', '⊂', false,'subset of'], - ['⊃', '⊃', false,'superset of'], - ['⊄', '⊄', false,'not a subset of'], - ['⊆', '⊆', false,'subset of or equal to'], - ['⊇', '⊇', false,'superset of or equal to'], - ['⊕', '⊕', false,'circled plus'], - ['⊗', '⊗', false,'circled times'], - ['⊥', '⊥', false,'perpendicular'], - ['⋅', '⋅', false,'dot operator'], - ['⌈', '⌈', false,'left ceiling'], - ['⌉', '⌉', false,'right ceiling'], - ['⌊', '⌊', false,'left floor'], - ['⌋', '⌋', false,'right floor'], - ['⟨', '〈', false,'left-pointing angle bracket'], - ['⟩', '〉', false,'right-pointing angle bracket'], - ['◊', '◊', true, 'lozenge'], - ['♠', '♠', true, 'black spade suit'], - ['♣', '♣', true, 'black club suit'], - ['♥', '♥', true, 'black heart suit'], - ['♦', '♦', true, 'black diamond suit'], - [' ', ' ', false,'en space'], - [' ', ' ', false,'em space'], - [' ', ' ', false,'thin space'], - ['‌', '‌', false,'zero width non-joiner'], - ['‍', '‍', false,'zero width joiner'], - ['‎', '‎', false,'left-to-right mark'], - ['‏', '‏', false,'right-to-left mark'], - ['­', '­', false,'soft hyphen'] -]; - -tinyMCEPopup.onInit.add(function() { - tinyMCEPopup.dom.setHTML('charmapView', renderCharMapHTML()); - addKeyboardNavigation(); -}); - -function addKeyboardNavigation(){ - var tableElm, cells, settings; - - cells = tinyMCEPopup.dom.select("a.charmaplink", "charmapgroup"); - - settings ={ - root: "charmapgroup", - items: cells - }; - cells[0].tabindex=0; - tinyMCEPopup.dom.addClass(cells[0], "mceFocus"); - if (tinymce.isGecko) { - cells[0].focus(); - } else { - setTimeout(function(){ - cells[0].focus(); - }, 100); - } - tinyMCEPopup.editor.windowManager.createInstance('tinymce.ui.KeyboardNavigation', settings, tinyMCEPopup.dom); -} - -function renderCharMapHTML() { - var charsPerRow = 20, tdWidth=20, tdHeight=20, i; - var html = '
    '+ - ''; - var cols=-1; - - for (i=0; i' - + '' - + charmap[i][1] - + ''; - if ((cols+1) % charsPerRow == 0) - html += ''; - } - } - - if (cols % charsPerRow > 0) { - var padd = charsPerRow - (cols % charsPerRow); - for (var i=0; i '; - } - - html += '
    '; - html = html.replace(/<\/tr>/g, ''); - - return html; -} - -function insertChar(chr) { - tinyMCEPopup.execCommand('mceInsertContent', false, '&#' + chr + ';'); - - // Refocus in window - if (tinyMCEPopup.isWindow) - window.focus(); - - tinyMCEPopup.editor.focus(); - tinyMCEPopup.close(); -} - -function previewChar(codeA, codeB, codeN) { - var elmA = document.getElementById('codeA'); - var elmB = document.getElementById('codeB'); - var elmV = document.getElementById('codeV'); - var elmN = document.getElementById('codeN'); - - if (codeA=='#160;') { - elmV.innerHTML = '__'; - } else { - elmV.innerHTML = '&' + codeA; - } - - elmB.innerHTML = '&' + codeA; - elmA.innerHTML = '&' + codeB; - elmN.innerHTML = codeN; -} diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/js/color_picker.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/js/color_picker.js deleted file mode 100644 index 4ae53ab674..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/js/color_picker.js +++ /dev/null @@ -1,345 +0,0 @@ -tinyMCEPopup.requireLangPack(); - -var detail = 50, strhex = "0123456789abcdef", i, isMouseDown = false, isMouseOver = false; - -var colors = [ - "#000000","#000033","#000066","#000099","#0000cc","#0000ff","#330000","#330033", - "#330066","#330099","#3300cc","#3300ff","#660000","#660033","#660066","#660099", - "#6600cc","#6600ff","#990000","#990033","#990066","#990099","#9900cc","#9900ff", - "#cc0000","#cc0033","#cc0066","#cc0099","#cc00cc","#cc00ff","#ff0000","#ff0033", - "#ff0066","#ff0099","#ff00cc","#ff00ff","#003300","#003333","#003366","#003399", - "#0033cc","#0033ff","#333300","#333333","#333366","#333399","#3333cc","#3333ff", - "#663300","#663333","#663366","#663399","#6633cc","#6633ff","#993300","#993333", - "#993366","#993399","#9933cc","#9933ff","#cc3300","#cc3333","#cc3366","#cc3399", - "#cc33cc","#cc33ff","#ff3300","#ff3333","#ff3366","#ff3399","#ff33cc","#ff33ff", - "#006600","#006633","#006666","#006699","#0066cc","#0066ff","#336600","#336633", - "#336666","#336699","#3366cc","#3366ff","#666600","#666633","#666666","#666699", - "#6666cc","#6666ff","#996600","#996633","#996666","#996699","#9966cc","#9966ff", - "#cc6600","#cc6633","#cc6666","#cc6699","#cc66cc","#cc66ff","#ff6600","#ff6633", - "#ff6666","#ff6699","#ff66cc","#ff66ff","#009900","#009933","#009966","#009999", - "#0099cc","#0099ff","#339900","#339933","#339966","#339999","#3399cc","#3399ff", - "#669900","#669933","#669966","#669999","#6699cc","#6699ff","#999900","#999933", - "#999966","#999999","#9999cc","#9999ff","#cc9900","#cc9933","#cc9966","#cc9999", - "#cc99cc","#cc99ff","#ff9900","#ff9933","#ff9966","#ff9999","#ff99cc","#ff99ff", - "#00cc00","#00cc33","#00cc66","#00cc99","#00cccc","#00ccff","#33cc00","#33cc33", - "#33cc66","#33cc99","#33cccc","#33ccff","#66cc00","#66cc33","#66cc66","#66cc99", - "#66cccc","#66ccff","#99cc00","#99cc33","#99cc66","#99cc99","#99cccc","#99ccff", - "#cccc00","#cccc33","#cccc66","#cccc99","#cccccc","#ccccff","#ffcc00","#ffcc33", - "#ffcc66","#ffcc99","#ffcccc","#ffccff","#00ff00","#00ff33","#00ff66","#00ff99", - "#00ffcc","#00ffff","#33ff00","#33ff33","#33ff66","#33ff99","#33ffcc","#33ffff", - "#66ff00","#66ff33","#66ff66","#66ff99","#66ffcc","#66ffff","#99ff00","#99ff33", - "#99ff66","#99ff99","#99ffcc","#99ffff","#ccff00","#ccff33","#ccff66","#ccff99", - "#ccffcc","#ccffff","#ffff00","#ffff33","#ffff66","#ffff99","#ffffcc","#ffffff" -]; - -var named = { - '#F0F8FF':'Alice Blue','#FAEBD7':'Antique White','#00FFFF':'Aqua','#7FFFD4':'Aquamarine','#F0FFFF':'Azure','#F5F5DC':'Beige', - '#FFE4C4':'Bisque','#000000':'Black','#FFEBCD':'Blanched Almond','#0000FF':'Blue','#8A2BE2':'Blue Violet','#A52A2A':'Brown', - '#DEB887':'Burly Wood','#5F9EA0':'Cadet Blue','#7FFF00':'Chartreuse','#D2691E':'Chocolate','#FF7F50':'Coral','#6495ED':'Cornflower Blue', - '#FFF8DC':'Cornsilk','#DC143C':'Crimson','#00FFFF':'Cyan','#00008B':'Dark Blue','#008B8B':'Dark Cyan','#B8860B':'Dark Golden Rod', - '#A9A9A9':'Dark Gray','#A9A9A9':'Dark Grey','#006400':'Dark Green','#BDB76B':'Dark Khaki','#8B008B':'Dark Magenta','#556B2F':'Dark Olive Green', - '#FF8C00':'Darkorange','#9932CC':'Dark Orchid','#8B0000':'Dark Red','#E9967A':'Dark Salmon','#8FBC8F':'Dark Sea Green','#483D8B':'Dark Slate Blue', - '#2F4F4F':'Dark Slate Gray','#2F4F4F':'Dark Slate Grey','#00CED1':'Dark Turquoise','#9400D3':'Dark Violet','#FF1493':'Deep Pink','#00BFFF':'Deep Sky Blue', - '#696969':'Dim Gray','#696969':'Dim Grey','#1E90FF':'Dodger Blue','#B22222':'Fire Brick','#FFFAF0':'Floral White','#228B22':'Forest Green', - '#FF00FF':'Fuchsia','#DCDCDC':'Gainsboro','#F8F8FF':'Ghost White','#FFD700':'Gold','#DAA520':'Golden Rod','#808080':'Gray','#808080':'Grey', - '#008000':'Green','#ADFF2F':'Green Yellow','#F0FFF0':'Honey Dew','#FF69B4':'Hot Pink','#CD5C5C':'Indian Red','#4B0082':'Indigo','#FFFFF0':'Ivory', - '#F0E68C':'Khaki','#E6E6FA':'Lavender','#FFF0F5':'Lavender Blush','#7CFC00':'Lawn Green','#FFFACD':'Lemon Chiffon','#ADD8E6':'Light Blue', - '#F08080':'Light Coral','#E0FFFF':'Light Cyan','#FAFAD2':'Light Golden Rod Yellow','#D3D3D3':'Light Gray','#D3D3D3':'Light Grey','#90EE90':'Light Green', - '#FFB6C1':'Light Pink','#FFA07A':'Light Salmon','#20B2AA':'Light Sea Green','#87CEFA':'Light Sky Blue','#778899':'Light Slate Gray','#778899':'Light Slate Grey', - '#B0C4DE':'Light Steel Blue','#FFFFE0':'Light Yellow','#00FF00':'Lime','#32CD32':'Lime Green','#FAF0E6':'Linen','#FF00FF':'Magenta','#800000':'Maroon', - '#66CDAA':'Medium Aqua Marine','#0000CD':'Medium Blue','#BA55D3':'Medium Orchid','#9370D8':'Medium Purple','#3CB371':'Medium Sea Green','#7B68EE':'Medium Slate Blue', - '#00FA9A':'Medium Spring Green','#48D1CC':'Medium Turquoise','#C71585':'Medium Violet Red','#191970':'Midnight Blue','#F5FFFA':'Mint Cream','#FFE4E1':'Misty Rose','#FFE4B5':'Moccasin', - '#FFDEAD':'Navajo White','#000080':'Navy','#FDF5E6':'Old Lace','#808000':'Olive','#6B8E23':'Olive Drab','#FFA500':'Orange','#FF4500':'Orange Red','#DA70D6':'Orchid', - '#EEE8AA':'Pale Golden Rod','#98FB98':'Pale Green','#AFEEEE':'Pale Turquoise','#D87093':'Pale Violet Red','#FFEFD5':'Papaya Whip','#FFDAB9':'Peach Puff', - '#CD853F':'Peru','#FFC0CB':'Pink','#DDA0DD':'Plum','#B0E0E6':'Powder Blue','#800080':'Purple','#FF0000':'Red','#BC8F8F':'Rosy Brown','#4169E1':'Royal Blue', - '#8B4513':'Saddle Brown','#FA8072':'Salmon','#F4A460':'Sandy Brown','#2E8B57':'Sea Green','#FFF5EE':'Sea Shell','#A0522D':'Sienna','#C0C0C0':'Silver', - '#87CEEB':'Sky Blue','#6A5ACD':'Slate Blue','#708090':'Slate Gray','#708090':'Slate Grey','#FFFAFA':'Snow','#00FF7F':'Spring Green', - '#4682B4':'Steel Blue','#D2B48C':'Tan','#008080':'Teal','#D8BFD8':'Thistle','#FF6347':'Tomato','#40E0D0':'Turquoise','#EE82EE':'Violet', - '#F5DEB3':'Wheat','#FFFFFF':'White','#F5F5F5':'White Smoke','#FFFF00':'Yellow','#9ACD32':'Yellow Green' -}; - -var namedLookup = {}; - -function init() { - var inputColor = convertRGBToHex(tinyMCEPopup.getWindowArg('input_color')), key, value; - - tinyMCEPopup.resizeToInnerSize(); - - generatePicker(); - generateWebColors(); - generateNamedColors(); - - if (inputColor) { - changeFinalColor(inputColor); - - col = convertHexToRGB(inputColor); - - if (col) - updateLight(col.r, col.g, col.b); - } - - for (key in named) { - value = named[key]; - namedLookup[value.replace(/\s+/, '').toLowerCase()] = key.replace(/#/, '').toLowerCase(); - } -} - -function toHexColor(color) { - var matches, red, green, blue, toInt = parseInt; - - function hex(value) { - value = parseInt(value).toString(16); - - return value.length > 1 ? value : '0' + value; // Padd with leading zero - }; - - color = tinymce.trim(color); - color = color.replace(/^[#]/, '').toLowerCase(); // remove leading '#' - color = namedLookup[color] || color; - - matches = /^rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)$/.exec(color); - - if (matches) { - red = toInt(matches[1]); - green = toInt(matches[2]); - blue = toInt(matches[3]); - } else { - matches = /^([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/.exec(color); - - if (matches) { - red = toInt(matches[1], 16); - green = toInt(matches[2], 16); - blue = toInt(matches[3], 16); - } else { - matches = /^([0-9a-f])([0-9a-f])([0-9a-f])$/.exec(color); - - if (matches) { - red = toInt(matches[1] + matches[1], 16); - green = toInt(matches[2] + matches[2], 16); - blue = toInt(matches[3] + matches[3], 16); - } else { - return ''; - } - } - } - - return '#' + hex(red) + hex(green) + hex(blue); -} - -function insertAction() { - var color = document.getElementById("color").value, f = tinyMCEPopup.getWindowArg('func'); - - var hexColor = toHexColor(color); - - if (hexColor === '') { - var text = tinyMCEPopup.editor.getLang('advanced_dlg.invalid_color_value'); - tinyMCEPopup.alert(text + ': ' + color); - } - else { - tinyMCEPopup.restoreSelection(); - - if (f) - f(hexColor); - - tinyMCEPopup.close(); - } -} - -function showColor(color, name) { - if (name) - document.getElementById("colorname").innerHTML = name; - - document.getElementById("preview").style.backgroundColor = color; - document.getElementById("color").value = color.toUpperCase(); -} - -function convertRGBToHex(col) { - var re = new RegExp("rgb\\s*\\(\\s*([0-9]+).*,\\s*([0-9]+).*,\\s*([0-9]+).*\\)", "gi"); - - if (!col) - return col; - - var rgb = col.replace(re, "$1,$2,$3").split(','); - if (rgb.length == 3) { - r = parseInt(rgb[0]).toString(16); - g = parseInt(rgb[1]).toString(16); - b = parseInt(rgb[2]).toString(16); - - r = r.length == 1 ? '0' + r : r; - g = g.length == 1 ? '0' + g : g; - b = b.length == 1 ? '0' + b : b; - - return "#" + r + g + b; - } - - return col; -} - -function convertHexToRGB(col) { - if (col.indexOf('#') != -1) { - col = col.replace(new RegExp('[^0-9A-F]', 'gi'), ''); - - r = parseInt(col.substring(0, 2), 16); - g = parseInt(col.substring(2, 4), 16); - b = parseInt(col.substring(4, 6), 16); - - return {r : r, g : g, b : b}; - } - - return null; -} - -function generatePicker() { - var el = document.getElementById('light'), h = '', i; - - for (i = 0; i < detail; i++){ - h += '
    '; - } - - el.innerHTML = h; -} - -function generateWebColors() { - var el = document.getElementById('webcolors'), h = '', i; - - if (el.className == 'generated') - return; - - // TODO: VoiceOver doesn't seem to support legend as a label referenced by labelledby. - h += '
    ' - + ''; - - for (i=0; i' - + ''; - if (tinyMCEPopup.editor.forcedHighContrastMode) { - h += ''; - } - h += ''; - h += ''; - if ((i+1) % 18 == 0) - h += ''; - } - - h += '
    '; - - el.innerHTML = h; - el.className = 'generated'; - - paintCanvas(el); - enableKeyboardNavigation(el.firstChild); -} - -function paintCanvas(el) { - tinyMCEPopup.getWin().tinymce.each(tinyMCEPopup.dom.select('canvas.mceColorSwatch', el), function(canvas) { - var context; - if (canvas.getContext && (context = canvas.getContext("2d"))) { - context.fillStyle = canvas.getAttribute('data-color'); - context.fillRect(0, 0, 10, 10); - } - }); -} -function generateNamedColors() { - var el = document.getElementById('namedcolors'), h = '', n, v, i = 0; - - if (el.className == 'generated') - return; - - for (n in named) { - v = named[n]; - h += ''; - if (tinyMCEPopup.editor.forcedHighContrastMode) { - h += ''; - } - h += ''; - h += ''; - i++; - } - - el.innerHTML = h; - el.className = 'generated'; - - paintCanvas(el); - enableKeyboardNavigation(el); -} - -function enableKeyboardNavigation(el) { - tinyMCEPopup.editor.windowManager.createInstance('tinymce.ui.KeyboardNavigation', { - root: el, - items: tinyMCEPopup.dom.select('a', el) - }, tinyMCEPopup.dom); -} - -function dechex(n) { - return strhex.charAt(Math.floor(n / 16)) + strhex.charAt(n % 16); -} - -function computeColor(e) { - var x, y, partWidth, partDetail, imHeight, r, g, b, coef, i, finalCoef, finalR, finalG, finalB, pos = tinyMCEPopup.dom.getPos(e.target); - - x = e.offsetX ? e.offsetX : (e.target ? e.clientX - pos.x : 0); - y = e.offsetY ? e.offsetY : (e.target ? e.clientY - pos.y : 0); - - partWidth = document.getElementById('colors').width / 6; - partDetail = detail / 2; - imHeight = document.getElementById('colors').height; - - r = (x >= 0)*(x < partWidth)*255 + (x >= partWidth)*(x < 2*partWidth)*(2*255 - x * 255 / partWidth) + (x >= 4*partWidth)*(x < 5*partWidth)*(-4*255 + x * 255 / partWidth) + (x >= 5*partWidth)*(x < 6*partWidth)*255; - g = (x >= 0)*(x < partWidth)*(x * 255 / partWidth) + (x >= partWidth)*(x < 3*partWidth)*255 + (x >= 3*partWidth)*(x < 4*partWidth)*(4*255 - x * 255 / partWidth); - b = (x >= 2*partWidth)*(x < 3*partWidth)*(-2*255 + x * 255 / partWidth) + (x >= 3*partWidth)*(x < 5*partWidth)*255 + (x >= 5*partWidth)*(x < 6*partWidth)*(6*255 - x * 255 / partWidth); - - coef = (imHeight - y) / imHeight; - r = 128 + (r - 128) * coef; - g = 128 + (g - 128) * coef; - b = 128 + (b - 128) * coef; - - changeFinalColor('#' + dechex(r) + dechex(g) + dechex(b)); - updateLight(r, g, b); -} - -function updateLight(r, g, b) { - var i, partDetail = detail / 2, finalCoef, finalR, finalG, finalB, color; - - for (i=0; i=0) && (i'); - }, - - init : function() { - var f = document.forms[0], ed = tinyMCEPopup.editor; - - // Setup browse button - document.getElementById('srcbrowsercontainer').innerHTML = getBrowserHTML('srcbrowser','src','image','theme_advanced_image'); - if (isVisible('srcbrowser')) - document.getElementById('src').style.width = '180px'; - - e = ed.selection.getNode(); - - this.fillFileList('image_list', tinyMCEPopup.getParam('external_image_list', 'tinyMCEImageList')); - - if (e.nodeName == 'IMG') { - f.src.value = ed.dom.getAttrib(e, 'src'); - f.alt.value = ed.dom.getAttrib(e, 'alt'); - f.border.value = this.getAttrib(e, 'border'); - f.vspace.value = this.getAttrib(e, 'vspace'); - f.hspace.value = this.getAttrib(e, 'hspace'); - f.width.value = ed.dom.getAttrib(e, 'width'); - f.height.value = ed.dom.getAttrib(e, 'height'); - f.insert.value = ed.getLang('update'); - this.styleVal = ed.dom.getAttrib(e, 'style'); - selectByValue(f, 'image_list', f.src.value); - selectByValue(f, 'align', this.getAttrib(e, 'align')); - this.updateStyle(); - } - }, - - fillFileList : function(id, l) { - var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl; - - l = typeof(l) === 'function' ? l() : window[l]; - - if (l && l.length > 0) { - lst.options[lst.options.length] = new Option('', ''); - - tinymce.each(l, function(o) { - lst.options[lst.options.length] = new Option(o[0], o[1]); - }); - } else - dom.remove(dom.getParent(id, 'tr')); - }, - - update : function() { - var f = document.forms[0], nl = f.elements, ed = tinyMCEPopup.editor, args = {}, el; - - tinyMCEPopup.restoreSelection(); - - if (f.src.value === '') { - if (ed.selection.getNode().nodeName == 'IMG') { - ed.dom.remove(ed.selection.getNode()); - ed.execCommand('mceRepaint'); - } - - tinyMCEPopup.close(); - return; - } - - if (!ed.settings.inline_styles) { - args = tinymce.extend(args, { - vspace : nl.vspace.value, - hspace : nl.hspace.value, - border : nl.border.value, - align : getSelectValue(f, 'align') - }); - } else - args.style = this.styleVal; - - tinymce.extend(args, { - src : f.src.value.replace(/ /g, '%20'), - alt : f.alt.value, - width : f.width.value, - height : f.height.value - }); - - el = ed.selection.getNode(); - - if (el && el.nodeName == 'IMG') { - ed.dom.setAttribs(el, args); - tinyMCEPopup.editor.execCommand('mceRepaint'); - tinyMCEPopup.editor.focus(); - } else { - tinymce.each(args, function(value, name) { - if (value === "") { - delete args[name]; - } - }); - - ed.execCommand('mceInsertContent', false, tinyMCEPopup.editor.dom.createHTML('img', args), {skip_undo : 1}); - ed.undoManager.add(); - } - - tinyMCEPopup.close(); - }, - - updateStyle : function() { - var dom = tinyMCEPopup.dom, st = {}, v, f = document.forms[0]; - - if (tinyMCEPopup.editor.settings.inline_styles) { - tinymce.each(tinyMCEPopup.dom.parseStyle(this.styleVal), function(value, key) { - st[key] = value; - }); - - // Handle align - v = getSelectValue(f, 'align'); - if (v) { - if (v == 'left' || v == 'right') { - st['float'] = v; - delete st['vertical-align']; - } else { - st['vertical-align'] = v; - delete st['float']; - } - } else { - delete st['float']; - delete st['vertical-align']; - } - - // Handle border - v = f.border.value; - if (v || v == '0') { - if (v == '0') - st['border'] = '0'; - else - st['border'] = v + 'px solid black'; - } else - delete st['border']; - - // Handle hspace - v = f.hspace.value; - if (v) { - delete st['margin']; - st['margin-left'] = v + 'px'; - st['margin-right'] = v + 'px'; - } else { - delete st['margin-left']; - delete st['margin-right']; - } - - // Handle vspace - v = f.vspace.value; - if (v) { - delete st['margin']; - st['margin-top'] = v + 'px'; - st['margin-bottom'] = v + 'px'; - } else { - delete st['margin-top']; - delete st['margin-bottom']; - } - - // Merge - st = tinyMCEPopup.dom.parseStyle(dom.serializeStyle(st), 'img'); - this.styleVal = dom.serializeStyle(st, 'img'); - } - }, - - getAttrib : function(e, at) { - var ed = tinyMCEPopup.editor, dom = ed.dom, v, v2; - - if (ed.settings.inline_styles) { - switch (at) { - case 'align': - if (v = dom.getStyle(e, 'float')) - return v; - - if (v = dom.getStyle(e, 'vertical-align')) - return v; - - break; - - case 'hspace': - v = dom.getStyle(e, 'margin-left') - v2 = dom.getStyle(e, 'margin-right'); - if (v && v == v2) - return parseInt(v.replace(/[^0-9]/g, '')); - - break; - - case 'vspace': - v = dom.getStyle(e, 'margin-top') - v2 = dom.getStyle(e, 'margin-bottom'); - if (v && v == v2) - return parseInt(v.replace(/[^0-9]/g, '')); - - break; - - case 'border': - v = 0; - - tinymce.each(['top', 'right', 'bottom', 'left'], function(sv) { - sv = dom.getStyle(e, 'border-' + sv + '-width'); - - // False or not the same as prev - if (!sv || (sv != v && v !== 0)) { - v = 0; - return false; - } - - if (sv) - v = sv; - }); - - if (v) - return parseInt(v.replace(/[^0-9]/g, '')); - - break; - } - } - - if (v = dom.getAttrib(e, at)) - return v; - - return ''; - }, - - resetImageData : function() { - var f = document.forms[0]; - - f.width.value = f.height.value = ""; - }, - - updateImageData : function() { - var f = document.forms[0], t = ImageDialog; - - if (f.width.value == "") - f.width.value = t.preloadImg.width; - - if (f.height.value == "") - f.height.value = t.preloadImg.height; - }, - - getImageData : function() { - var f = document.forms[0]; - - this.preloadImg = new Image(); - this.preloadImg.onload = this.updateImageData; - this.preloadImg.onerror = this.resetImageData; - this.preloadImg.src = tinyMCEPopup.editor.documentBaseURI.toAbsolute(f.src.value); - } -}; - -ImageDialog.preInit(); -tinyMCEPopup.onInit.add(ImageDialog.init, ImageDialog); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/js/link.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/js/link.js deleted file mode 100644 index 53ff409e79..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/js/link.js +++ /dev/null @@ -1,153 +0,0 @@ -tinyMCEPopup.requireLangPack(); - -var LinkDialog = { - preInit : function() { - var url; - - if (url = tinyMCEPopup.getParam("external_link_list_url")) - document.write(''); - }, - - init : function() { - var f = document.forms[0], ed = tinyMCEPopup.editor; - - // Setup browse button - document.getElementById('hrefbrowsercontainer').innerHTML = getBrowserHTML('hrefbrowser', 'href', 'file', 'theme_advanced_link'); - if (isVisible('hrefbrowser')) - document.getElementById('href').style.width = '180px'; - - this.fillClassList('class_list'); - this.fillFileList('link_list', 'tinyMCELinkList'); - this.fillTargetList('target_list'); - - if (e = ed.dom.getParent(ed.selection.getNode(), 'A')) { - f.href.value = ed.dom.getAttrib(e, 'href'); - f.linktitle.value = ed.dom.getAttrib(e, 'title'); - f.insert.value = ed.getLang('update'); - selectByValue(f, 'link_list', f.href.value); - selectByValue(f, 'target_list', ed.dom.getAttrib(e, 'target')); - selectByValue(f, 'class_list', ed.dom.getAttrib(e, 'class')); - } - }, - - update : function() { - var f = document.forms[0], ed = tinyMCEPopup.editor, e, b, href = f.href.value.replace(/ /g, '%20'); - - tinyMCEPopup.restoreSelection(); - e = ed.dom.getParent(ed.selection.getNode(), 'A'); - - // Remove element if there is no href - if (!f.href.value) { - if (e) { - b = ed.selection.getBookmark(); - ed.dom.remove(e, 1); - ed.selection.moveToBookmark(b); - tinyMCEPopup.execCommand("mceEndUndoLevel"); - tinyMCEPopup.close(); - return; - } - } - - // Create new anchor elements - if (e == null) { - ed.getDoc().execCommand("unlink", false, null); - tinyMCEPopup.execCommand("mceInsertLink", false, "#mce_temp_url#", {skip_undo : 1}); - - tinymce.each(ed.dom.select("a"), function(n) { - if (ed.dom.getAttrib(n, 'href') == '#mce_temp_url#') { - e = n; - - ed.dom.setAttribs(e, { - href : href, - title : f.linktitle.value, - target : f.target_list ? getSelectValue(f, "target_list") : null, - 'class' : f.class_list ? getSelectValue(f, "class_list") : null - }); - } - }); - } else { - ed.dom.setAttribs(e, { - href : href, - title : f.linktitle.value, - target : f.target_list ? getSelectValue(f, "target_list") : null, - 'class' : f.class_list ? getSelectValue(f, "class_list") : null - }); - } - - // Don't move caret if selection was image - if (e.childNodes.length != 1 || e.firstChild.nodeName != 'IMG') { - ed.focus(); - ed.selection.select(e); - ed.selection.collapse(0); - tinyMCEPopup.storeSelection(); - } - - tinyMCEPopup.execCommand("mceEndUndoLevel"); - tinyMCEPopup.close(); - }, - - checkPrefix : function(n) { - if (n.value && Validator.isEmail(n) && !/^\s*mailto:/i.test(n.value) && confirm(tinyMCEPopup.getLang('advanced_dlg.link_is_email'))) - n.value = 'mailto:' + n.value; - - if (/^\s*www\./i.test(n.value) && confirm(tinyMCEPopup.getLang('advanced_dlg.link_is_external'))) - n.value = 'http://' + n.value; - }, - - fillFileList : function(id, l) { - var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl; - - l = window[l]; - - if (l && l.length > 0) { - lst.options[lst.options.length] = new Option('', ''); - - tinymce.each(l, function(o) { - lst.options[lst.options.length] = new Option(o[0], o[1]); - }); - } else - dom.remove(dom.getParent(id, 'tr')); - }, - - fillClassList : function(id) { - var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl; - - if (v = tinyMCEPopup.getParam('theme_advanced_styles')) { - cl = []; - - tinymce.each(v.split(';'), function(v) { - var p = v.split('='); - - cl.push({'title' : p[0], 'class' : p[1]}); - }); - } else - cl = tinyMCEPopup.editor.dom.getClasses(); - - if (cl.length > 0) { - lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('not_set'), ''); - - tinymce.each(cl, function(o) { - lst.options[lst.options.length] = new Option(o.title || o['class'], o['class']); - }); - } else - dom.remove(dom.getParent(id, 'tr')); - }, - - fillTargetList : function(id) { - var dom = tinyMCEPopup.dom, lst = dom.get(id), v; - - lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('not_set'), ''); - lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('advanced_dlg.link_target_same'), '_self'); - lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('advanced_dlg.link_target_blank'), '_blank'); - - if (v = tinyMCEPopup.getParam('theme_advanced_link_targets')) { - tinymce.each(v.split(','), function(v) { - v = v.split('='); - lst.options[lst.options.length] = new Option(v[0], v[1]); - }); - } - } -}; - -LinkDialog.preInit(); -tinyMCEPopup.onInit.add(LinkDialog.init, LinkDialog); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/js/source_editor.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/js/source_editor.js deleted file mode 100644 index dd5e366fa9..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/js/source_editor.js +++ /dev/null @@ -1,78 +0,0 @@ -tinyMCEPopup.requireLangPack(); -tinyMCEPopup.onInit.add(onLoadInit); - -function saveContent() { - tinyMCEPopup.editor.setContent(document.getElementById('htmlSource').value, {source_view : true}); - tinyMCEPopup.close(); -} - -function onLoadInit() { - tinyMCEPopup.resizeToInnerSize(); - - // Remove Gecko spellchecking - if (tinymce.isGecko) - document.body.spellcheck = tinyMCEPopup.editor.getParam("gecko_spellcheck"); - - document.getElementById('htmlSource').value = tinyMCEPopup.editor.getContent({source_view : true}); - - if (tinyMCEPopup.editor.getParam("theme_advanced_source_editor_wrap", true)) { - turnWrapOn(); - document.getElementById('wraped').checked = true; - } - - resizeInputs(); -} - -function setWrap(val) { - var v, n, s = document.getElementById('htmlSource'); - - s.wrap = val; - - if (!tinymce.isIE) { - v = s.value; - n = s.cloneNode(false); - n.setAttribute("wrap", val); - s.parentNode.replaceChild(n, s); - n.value = v; - } -} - -function setWhiteSpaceCss(value) { - var el = document.getElementById('htmlSource'); - tinymce.DOM.setStyle(el, 'white-space', value); -} - -function turnWrapOff() { - if (tinymce.isWebKit) { - setWhiteSpaceCss('pre'); - } else { - setWrap('off'); - } -} - -function turnWrapOn() { - if (tinymce.isWebKit) { - setWhiteSpaceCss('pre-wrap'); - } else { - setWrap('soft'); - } -} - -function toggleWordWrap(elm) { - if (elm.checked) { - turnWrapOn(); - } else { - turnWrapOff(); - } -} - -function resizeInputs() { - var vp = tinyMCEPopup.dom.getViewPort(window), el; - - el = document.getElementById('htmlSource'); - - if (el) { - el.style.width = (vp.w - 20) + 'px'; - el.style.height = (vp.h - 65) + 'px'; - } -} diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/da.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/da.js deleted file mode 100644 index 3445db8839..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/da.js +++ /dev/null @@ -1,62 +0,0 @@ -tinyMCE.addI18n('da.umbraco',{ -style_select:"Typografier", -font_size:"Skriftst\u00F8rrelse", -fontdefault:"Skrifttype", -block:"Format", -paragraph:"Afsnit", -div:"Div", -address:"Adresse", -pre:"Pr\u00E6formatteret", -h1:"Overskrift 1", -h2:"Overskrift 2", -h3:"Overskrift 3", -h4:"Overskrift 4", -h5:"Overskrift 5", -h6:"Overskrift 6", -blockquote:"Blokcitat", -code:"Kode", -samp:"Kodeeksempel", -dt:"Definitionsterm ", -dd:"Definitionsbeskrivelse", -bold_desc:"Fed (Ctrl+B)", -italic_desc:"Kursiv (Ctrl+I)", -underline_desc:"Understreget (Ctrl+U)", -striketrough_desc:"Gennemstreget", -justifyleft_desc:"Venstrejusteret", -justifycenter_desc:"Centreret", -justifyright_desc:"H\u00F8jrejusteret", -justifyfull_desc:"Lige marginer", -bullist_desc:"Unummereret punktopstilling", -numlist_desc:"Nummereret punktopstilling", -outdent_desc:"Formindsk indrykning", -indent_desc:"\u00D8g indrykning", -undo_desc:"Fortryd (Ctrl+Z)", -redo_desc:"Gendan (Ctrl+Y)", -link_desc:"Inds\u00E6t/rediger link", -unlink_desc:"Fjern link", -image_desc:"Inds\u00E6t/rediger billede", -cleanup_desc:"Ryd op i uordentlig kode", -code_desc:"Rediger HTML-kilde", -sub_desc:"S\u00E6nket skrift", -sup_desc:"H\u00E6vet skrift", -hr_desc:"Inds\u00E6t horisontal linie", -removeformat_desc:"Fjern formatering", -custom1_desc:"Din egen beskrivelse her", -forecolor_desc:"V\u00E6lg tekstfarve", -backcolor_desc:"V\u00E6lg baggrundsfarve", -charmap_desc:"Inds\u00E6t specialtegn", -visualaid_desc:"Sl\u00E5 hj\u00E6lp/synlige elementer til/fra", -anchor_desc:"Inds\u00E6t/rediger anker", -cut_desc:"Klip", -copy_desc:"Kopier", -paste_desc:"Inds\u00E6t", -image_props_desc:"Billedegenskaber", -newdocument_desc:"Nyt dokument", -help_desc:"Hj\u00E6lp", -blockquote_desc:"Blokcitat", -clipboard_msg:"Kopier/Klip/inds\u00E6t er ikke muligt i Mozilla og Firefox.\nVil du have mere information om dette emne?", -path:"Sti", -newdocument:"Er du sikker p\u00E5 du vil slette alt indhold?", -toolbar_focus:"Hop til v\u00E6rkt\u00F8jsknapper - Alt+Q, Skift til redigering - Alt-Z, Skift til element sti - Alt-X", -more_colors:"Flere farver" -}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/da_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/da_dlg.js deleted file mode 100644 index 0cd7a1ce37..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/da_dlg.js +++ /dev/null @@ -1,51 +0,0 @@ -tinyMCE.addI18n('da.umbraco_dlg',{ -about_title:"Om TinyMCE", -about_general:"Om", -about_help:"Hj\u00E6lp", -about_license:"Licens", -about_plugins:"Udvidelser", -about_plugin:"Udvidelse", -about_author:"Forfatter", -about_version:"Version", -about_loaded:"Indl\u00E6ste udvidelser", -anchor_title:"Inds\u00E6t/rediger anker", -anchor_name:"Navn p\u00E5 anker", -code_title:"HTML kildekode-redigering", -code_wordwrap:"Tekstombrydning", -colorpicker_title:"V\u00E6lg en farve", -colorpicker_picker_tab:"V\u00E6lger", -colorpicker_picker_title:"Farvev\u00E6lger", -colorpicker_palette_tab:"Palette", -colorpicker_palette_title:"Palette-farver", -colorpicker_named_tab:"Navngivet", -colorpicker_named_title:"Navngivet farve", -colorpicker_color:"Farve:", -colorpicker_name:"Navn:", -charmap_title:"V\u00E6lg specialtegn", -image_title:"Inds\u00E6t/rediger billede", -image_src:"Billede URL", -image_alt:"Billedbeskrivelse", -image_list:"Liste over billeder", -image_border:"Kant", -image_dimensions:"Dimensioner", -image_vspace:"Vertikal afstand", -image_hspace:"Horisontal afstand", -image_align:"Justering", -image_align_baseline:"Grundlinie", -image_align_top:"Toppen", -image_align_middle:"Centreret", -image_align_bottom:"Bunden", -image_align_texttop:"Tekst toppen", -image_align_textbottom:"Tekst bunden", -image_align_left:"Venstre", -image_align_right:"H\u00F8jre", -link_title:"Inds\u00E6t/rediger link", -link_url:"Link URL", -link_target:"Target", -link_target_same:"\u00C5ben link i samme vindue", -link_target_blank:"\u00C5ben link i nyt vindue", -link_titlefield:"Titel", -link_is_email:"Den URL, der er indtastet, ser ud til at v\u00E6re en emailadresse. Vil du have tilf\u00F8jet det p\u00E5kr\u00E6vede mailto: foran?", -link_is_external:"Den URL, der er indtastet, ser ud til at v\u00E6re et eksternt link. Vil du have tilf\u00F8jet det p\u00E5kr\u00E6vede http:// foran?", -link_list:"Liste over links" -}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/de.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/de.js deleted file mode 100644 index 863b310933..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/de.js +++ /dev/null @@ -1,63 +0,0 @@ -tinyMCE.addI18n('de.umbraco',{ -style_select:"Format", -font_size:"Schriftgr\u00F6\u00DFe", -fontdefault:"Schriftart", -block:"Vorlage", -paragraph:"Absatz", -div:"Zusammenh\u00E4ngender Bereich", -address:"Addresse", -pre:"Rohdaten", -h1:"\u00DCberschrift 1", -h2:"\u00DCberschrift 2", -h3:"\u00DCberschrift 3", -h4:"\u00DCberschrift 4", -h5:"\u00DCberschrift 5", -h6:"\u00DCberschrift 6", -blockquote:"Zitatblock", -code:"Code", -samp:"Beispiel", -dt:"Definitionsbegriff", -dd:"Definitionsbeschreibung", -bold_desc:"Fett (Strg+B)", -italic_desc:"Kursiv (Strg+I)", -underline_desc:"Unterstrichen (Strg+U)", -striketrough_desc:"Durchgestrichen", -justifyleft_desc:"Links ausgerichtet", -justifycenter_desc:"Mittig ausgerichtet", -justifyright_desc:"Rechts ausgerichtet", -justifyfull_desc:"Blocksatz", -bullist_desc:"Unsortierte Liste", -numlist_desc:"Sortierte Liste", -outdent_desc:"Ausr\u00FCcken", -indent_desc:"Einr\u00FCcken", -undo_desc:"R\u00FCckg\u00E4ngig (Strg+Z)", -redo_desc:"Wiederholen (Strg+Y)", -link_desc:"Link einf\u00FCgen/ver\u00E4ndern", -unlink_desc:"Link entfernen", -image_desc:"Bild einf\u00FCgen/ver\u00E4ndern", -cleanup_desc:"Quellcode aufr\u00E4umen", -code_desc:"HTML-Quellcode bearbeiten", -sub_desc:"Tiefgestellt", -sup_desc:"Hochgestellt", -hr_desc:"Trennlinie einf\u00FCgen", -removeformat_desc:"Formatierungen zur\u00FCcksetzen", -custom1_desc:"Benutzerdefinierte Beschreibung", -forecolor_desc:"Textfarbe", -backcolor_desc:"Hintergrundfarbe", -charmap_desc:"Sonderzeichen einf\u00FCgen", -visualaid_desc:"Hilfslinien und unsichtbare Elemente ein-/ausblenden", -anchor_desc:"Anker einf\u00FCgen/ver\u00E4ndern", -cut_desc:"Ausschneiden", -copy_desc:"Kopieren", -paste_desc:"Einf\u00FCgen", -image_props_desc:"Bildeigenschaften", -newdocument_desc:"Neues Dokument", -help_desc:"Hilfe", -blockquote_desc:"Zitatblock", -clipboard_msg:"Kopieren, Ausschneiden und Einf\u00FCgen sind im Mozilla Firefox nicht m\u00F6glich.\r\nWollen Sie mehr \u00FCber dieses Problem erfahren?", -path:"Pfad", -newdocument:"Wollen Sie wirklich den ganzen Inhalt l\u00F6schen?", -toolbar_focus:"Zur Werkzeugleiste springen: Alt+Q; Zum Editor springen: Alt-Z; Zum Elementpfad springen: Alt-X", -more_colors:"Weitere Farben", -anchor_delta_width:"13" -}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/de_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/de_dlg.js deleted file mode 100644 index 288a68c8b6..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/de_dlg.js +++ /dev/null @@ -1,51 +0,0 @@ -tinyMCE.addI18n('de.umbraco_dlg',{ -about_title:"\u00DCber TinyMCE", -about_general:"\u00DCber\u2026", -about_help:"Hilfe", -about_license:"Lizenzbedingungen", -about_plugins:"Plugins", -about_plugin:"Plugin", -about_author:"Urheber", -about_version:"Version", -about_loaded:"Geladene Plugins", -anchor_title:"Anker einf\u00FCgen/ver\u00E4ndern", -anchor_name:"Name des Ankers", -code_title:"HTML-Quellcode bearbeiten", -code_wordwrap:"Automatischer Zeilenumbruch", -colorpicker_title:"Farbe", -colorpicker_picker_tab:"Farbwahl", -colorpicker_picker_title:"Farbwahl", -colorpicker_palette_tab:"Palette", -colorpicker_palette_title:"Farbpalette", -colorpicker_named_tab:"Benannte Farben", -colorpicker_named_title:"Benannte Farben", -colorpicker_color:"Farbe:", -colorpicker_name:"Name:", -charmap_title:"Sonderzeichen", -image_title:"Bild einf\u00FCgen/bearbeiten", -image_src:"Adresse", -image_alt:"Alternativtext", -image_list:"Bilderliste", -image_border:"Rahmen", -image_dimensions:"Ausma\u00DFe", -image_vspace:"Vertikaler Abstand", -image_hspace:"Horizontaler Abstand", -image_align:"Ausrichtung", -image_align_baseline:"Zeile", -image_align_top:"Oben", -image_align_middle:"Mittig", -image_align_bottom:"Unten", -image_align_texttop:"Oben im Text", -image_align_textbottom:"Unten im Text", -image_align_left:"Links", -image_align_right:"Rechts", -link_title:"Link einf\u00FCgen/bearbeiten", -link_url:"Adresse", -link_target:"Fenster", -link_target_same:"Im selben Fenster \u00F6ffnen", -link_target_blank:"Neues Fenster \u00F6ffnen", -link_titlefield:"Titel", -link_is_email:"Diese Adresse scheint eine E-Mail-Adresse zu sein. M\u00F6chten Sie das dazu ben\u00F6tigte mailto: voranstellen?", -link_is_external:"Diese Adresse scheint ein externer Link zu sein. M\u00F6chten Sie das dazu ben\u00F6tigte http:// voranstellen?", -link_list:"Linkliste" -}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/en.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/en.js deleted file mode 100644 index 4ee331f5b3..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/en.js +++ /dev/null @@ -1,74 +0,0 @@ -tinyMCE.addI18n('en.umbraco',{"underline_desc":"Underline (Ctrl+U)", -"italic_desc":"Italic (Ctrl+I)", -"bold_desc":"Bold (Ctrl+B)", -dd:"Definition Description", -dt:"Definition Term ", -samp:"Code Sample", -code:"Code", -blockquote:"Block Quote", -h6:"Heading 6", -h5:"Heading 5", -h4:"Heading 4", -h3:"Heading 3", -h2:"Heading 2", -h1:"Heading 1", -pre:"Preformatted", -address:"Address", -div:"DIV", -paragraph:"Paragraph", -block:"Format", -fontdefault:"Font Family", -"font_size":"Font Size", -"style_select":"Styles", -"anchor_delta_height":"", -"anchor_delta_width":"", -"charmap_delta_height":"", -"charmap_delta_width":"", -"colorpicker_delta_height":"", -"colorpicker_delta_width":"", -"link_delta_height":"", -"link_delta_width":"", -"image_delta_height":"", -"image_delta_width":"", -"more_colors":"More Colors...", -"toolbar_focus":"Jump to tool buttons - Alt+Q, Jump to editor - Alt-Z, Jump to element path - Alt-X", -newdocument:"Are you sure you want clear all contents?", -path:"Path", -"clipboard_msg":"Copy/Cut/Paste is not available in Mozilla and Firefox.\nDo you want more information about this issue?", -"blockquote_desc":"Block Quote", -"help_desc":"Help", -"newdocument_desc":"New Document", -"image_props_desc":"Image Properties", -"paste_desc":"Paste (Ctrl+V)", -"copy_desc":"Copy (Ctrl+C)", -"cut_desc":"Cut (Ctrl+X)", -"anchor_desc":"Insert/Edit Anchor", -"visualaid_desc":"show/Hide Guidelines/Invisible Elements", -"charmap_desc":"Insert Special Character", -"backcolor_desc":"Select Background Color", -"forecolor_desc":"Select Text Color", -"custom1_desc":"Your Custom Description Here", -"removeformat_desc":"Remove Formatting", -"hr_desc":"Insert Horizontal Line", -"sup_desc":"Superscript", -"sub_desc":"Subscript", -"code_desc":"Edit HTML Source", -"cleanup_desc":"Cleanup Messy Code", -"image_desc":"Insert/Edit Image", -"unlink_desc":"Unlink", -"link_desc":"Insert/Edit Link", -"redo_desc":"Redo (Ctrl+Y)", -"undo_desc":"Undo (Ctrl+Z)", -"indent_desc":"Increase Indent", -"outdent_desc":"Decrease Indent", -"numlist_desc":"Insert/Remove Numbered List", -"bullist_desc":"Insert/Remove Bulleted List", -"justifyfull_desc":"Align Full", -"justifyright_desc":"Align Right", -"justifycenter_desc":"Align Center", -"justifyleft_desc":"Align Left", -"striketrough_desc":"Strikethrough", -"help_shortcut":"Press ALT-F10 for toolbar. Press ALT-0 for help", -"rich_text_area":"Rich Text Area", -"shortcuts_desc":"Accessability Help", -toolbar:"Toolbar"}); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/en_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/en_dlg.js deleted file mode 100644 index 42f1ea7981..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/en_dlg.js +++ /dev/null @@ -1,55 +0,0 @@ -tinyMCE.addI18n('en.umbraco_dlg', {"link_list":"Link List", -"link_is_external":"The URL you entered seems to be an external link. Do you want to add the required http:// prefix?", -"link_is_email":"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?", -"link_titlefield":"Title", -"link_target_blank":"Open Link in a New Window", -"link_target_same":"Open Link in the Same Window", -"link_target":"Target", -"link_url":"Link URL", -"link_title":"Insert/Edit Link", -"image_align_right":"Right", -"image_align_left":"Left", -"image_align_textbottom":"Text Bottom", -"image_align_texttop":"Text Top", -"image_align_bottom":"Bottom", -"image_align_middle":"Middle", -"image_align_top":"Top", -"image_align_baseline":"Baseline", -"image_align":"Alignment", -"image_hspace":"Horizontal Space", -"image_vspace":"Vertical Space", -"image_dimensions":"Dimensions", -"image_alt":"Image Description", -"image_list":"Image List", -"image_border":"Border", -"image_src":"Image URL", -"image_title":"Insert/Edit Image", -"charmap_title":"Insert Character", - "charmap_usage":"Use left and right arrows to navigate.", -"colorpicker_name":"Name:", -"colorpicker_color":"Color:", -"colorpicker_named_title":"Named Colors", -"colorpicker_named_tab":"Named", -"colorpicker_palette_title":"Palette Colors", -"colorpicker_palette_tab":"Palette", -"colorpicker_picker_title":"Color Picker", -"colorpicker_picker_tab":"Picker", -"colorpicker_title":"Select a Color", -"code_wordwrap":"Word Wrap", -"code_title":"View Source", -"anchor_name":"Name", -"anchor_title":"Insert/Edit Anchor", -"about_loaded":"Loaded Plugins", -"about_version":"Version", -"about_author":"Author", -"about_plugin":"Plugin", -"about_plugins":"Plugins", -"about_license":"License", -"about_help":"Help", -"about_general":"About", -"about_title":"About TinyMCE", -"anchor_invalid":"Please specify a valid anchor name.", -"accessibility_help":"Accessibility Help", -"accessibility_usage_title":"General Usage", -"invalid_color_value":"Invalid color value", -"":""}); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/en_us.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/en_us.js deleted file mode 100644 index 338916378b..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/en_us.js +++ /dev/null @@ -1,74 +0,0 @@ -tinyMCE.addI18n('en_us.umbraco',{"underline_desc":"Underline (Ctrl+U)", -"italic_desc":"Italic (Ctrl+I)", -"bold_desc":"Bold (Ctrl+B)", -dd:"Definition Description", -dt:"Definition Term ", -samp:"Code Sample", -code:"Code", -blockquote:"Block Quote", -h6:"Heading 6", -h5:"Heading 5", -h4:"Heading 4", -h3:"Heading 3", -h2:"Heading 2", -h1:"Heading 1", -pre:"Preformatted", -address:"Address", -div:"DIV", -paragraph:"Paragraph", -block:"Format", -fontdefault:"Font Family", -"font_size":"Font Size", -"style_select":"Styles", -"anchor_delta_height":"", -"anchor_delta_width":"", -"charmap_delta_height":"", -"charmap_delta_width":"", -"colorpicker_delta_height":"", -"colorpicker_delta_width":"", -"link_delta_height":"", -"link_delta_width":"", -"image_delta_height":"", -"image_delta_width":"", -"more_colors":"More Colors...", -"toolbar_focus":"Jump to tool buttons - Alt+Q, Jump to editor - Alt-Z, Jump to element path - Alt-X", -newdocument:"Are you sure you want clear all contents?", -path:"Path", -"clipboard_msg":"Copy/Cut/Paste is not available in Mozilla and Firefox.\nDo you want more information about this issue?", -"blockquote_desc":"Block Quote", -"help_desc":"Help", -"newdocument_desc":"New Document", -"image_props_desc":"Image Properties", -"paste_desc":"Paste (Ctrl+V)", -"copy_desc":"Copy (Ctrl+C)", -"cut_desc":"Cut (Ctrl+X)", -"anchor_desc":"Insert/Edit Anchor", -"visualaid_desc":"show/Hide Guidelines/Invisible Elements", -"charmap_desc":"Insert Special Character", -"backcolor_desc":"Select Background Color", -"forecolor_desc":"Select Text Color", -"custom1_desc":"Your Custom Description Here", -"removeformat_desc":"Remove Formatting", -"hr_desc":"Insert Horizontal Line", -"sup_desc":"Superscript", -"sub_desc":"Subscript", -"code_desc":"Edit HTML Source", -"cleanup_desc":"Cleanup Messy Code", -"image_desc":"Insert/Edit Image", -"unlink_desc":"Unlink", -"link_desc":"Insert/Edit Link", -"redo_desc":"Redo (Ctrl+Y)", -"undo_desc":"Undo (Ctrl+Z)", -"indent_desc":"Increase Indent", -"outdent_desc":"Decrease Indent", -"numlist_desc":"Insert/Remove Numbered List", -"bullist_desc":"Insert/Remove Bulleted List", -"justifyfull_desc":"Align Full", -"justifyright_desc":"Align Right", -"justifycenter_desc":"Align Center", -"justifyleft_desc":"Align Left", -"striketrough_desc":"Strikethrough", -"help_shortcut":"Press ALT-F10 for toolbar. Press ALT-0 for help", -"rich_text_area":"Rich Text Area", -"shortcuts_desc":"Accessability Help", -toolbar:"Toolbar"}); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/en_us_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/en_us_dlg.js deleted file mode 100644 index f756c7174e..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/en_us_dlg.js +++ /dev/null @@ -1,55 +0,0 @@ -tinyMCE.addI18n('en_us.umbraco_dlg', {"link_list":"Link List", -"link_is_external":"The URL you entered seems to be an external link. Do you want to add the required http:// prefix?", -"link_is_email":"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?", -"link_titlefield":"Title", -"link_target_blank":"Open Link in a New Window", -"link_target_same":"Open Link in the Same Window", -"link_target":"Target", -"link_url":"Link URL", -"link_title":"Insert/Edit Link", -"image_align_right":"Right", -"image_align_left":"Left", -"image_align_textbottom":"Text Bottom", -"image_align_texttop":"Text Top", -"image_align_bottom":"Bottom", -"image_align_middle":"Middle", -"image_align_top":"Top", -"image_align_baseline":"Baseline", -"image_align":"Alignment", -"image_hspace":"Horizontal Space", -"image_vspace":"Vertical Space", -"image_dimensions":"Dimensions", -"image_alt":"Image Description", -"image_list":"Image List", -"image_border":"Border", -"image_src":"Image URL", -"image_title":"Insert/Edit Image", -"charmap_title":"Insert Character", - "charmap_usage":"Use left and right arrows to navigate.", -"colorpicker_name":"Name:", -"colorpicker_color":"Color:", -"colorpicker_named_title":"Named Colors", -"colorpicker_named_tab":"Named", -"colorpicker_palette_title":"Palette Colors", -"colorpicker_palette_tab":"Palette", -"colorpicker_picker_title":"Color Picker", -"colorpicker_picker_tab":"Picker", -"colorpicker_title":"Select a Color", -"code_wordwrap":"Word Wrap", -"code_title":"View Source", -"anchor_name":"Name", -"anchor_title":"Insert/Edit Anchor", -"about_loaded":"Loaded Plugins", -"about_version":"Version", -"about_author":"Author", -"about_plugin":"Plugin", -"about_plugins":"Plugins", -"about_license":"License", -"about_help":"Help", -"about_general":"About", -"about_title":"About TinyMCE", -"anchor_invalid":"Please specify a valid anchor name.", -"accessibility_help":"Accessibility Help", -"accessibility_usage_title":"General Usage", -"invalid_color_value":"Invalid color value", -"":""}); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/es.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/es.js deleted file mode 100644 index 5ea8e270a9..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/es.js +++ /dev/null @@ -1,62 +0,0 @@ -tinyMCE.addI18n('es.umbraco',{ -style_select:"Estilos", -font_size:"Tama\u00F1o", -fontdefault:"Fuente", -block:"Formato", -paragraph:"P\u00E1rrafo", -div:"Div", -address:"Direcci\u00F3n", -pre:"Preformateado", -h1:"Encabezado 1", -h2:"Encabezado 2", -h3:"Encabezado 3", -h4:"Encabezado 4", -h5:"Encabezado 5", -h6:"Encabezado 6", -blockquote:"Cita", -code:"C\u00F3digo", -samp:"Ejemplo de c\u00F3digo", -dt:"T\u00E9rmino de definici\u00F3n", -dd:"Descripci\u00F3n de definici\u00F3n", -bold_desc:"Negrita (Ctrl+B)", -italic_desc:"Cursiva (Ctrl+I)", -underline_desc:"Subrayado (Ctrl+U)", -striketrough_desc:"Tachado", -justifyleft_desc:"Alinear a la izquierda", -justifycenter_desc:"Alinear al centro", -justifyright_desc:"Alinear a la derecha", -justifyfull_desc:"Justificar", -bullist_desc:"Lista desordenada", -numlist_desc:"Lista ordenada", -outdent_desc:"Reducir sangr\u00EDa", -indent_desc:"Aumentar sangr\u00EDa", -undo_desc:"Deshacer (Ctrl+Z)", -redo_desc:"Rehacer (Ctrl+Y)", -link_desc:"Insertar/editar hiperv\u00EDnculo", -unlink_desc:"Quitar hiperv\u00EDnculo", -image_desc:"Insertar/editar imagen", -cleanup_desc:"Limpiar c\u00F3digo basura", -code_desc:"Editar c\u00F3digo HTML", -sub_desc:"Sub\u00EDndice", -sup_desc:"Super\u00EDndice", -hr_desc:"Insertar regla horizontal", -removeformat_desc:"Limpiar formato", -custom1_desc:"Su descripci\u00F3n personal aqu\u00ED", -forecolor_desc:"Seleccionar color del texto", -backcolor_desc:"Seleccionar color de fondo", -charmap_desc:"Insertar caracteres personalizados", -visualaid_desc:"Mostrar/ocultar l\u00EDnea de gu\u00EDa/elementos invisibles", -anchor_desc:"Insertar/editar ancla", -cut_desc:"Cortar", -copy_desc:"Copiar", -paste_desc:"Pegar", -image_props_desc:"Propiedades de imagen", -newdocument_desc:"Nuevo documento", -help_desc:"Ayuda", -blockquote_desc:"Cita", -clipboard_msg:"Copiar/Cortar/Pegar no se encuentra disponible en Mozilla y Firefox.\n \u00BFDesea obtener m\u00E1s informaci\u00F3n acerca de este tema?", -path:"Ruta", -newdocument:" \u00BFEst\u00E1 seguro que desea limpiar todo el contenido?", -toolbar_focus:"Ir a los botones de herramientas - Alt+Q, Ir al editor - Alt-Z, Ir a la ruta del elemento - Alt-X", -more_colors:"M\u00E1s colores" -}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/es_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/es_dlg.js deleted file mode 100644 index 944e2ae79d..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/es_dlg.js +++ /dev/null @@ -1,51 +0,0 @@ -tinyMCE.addI18n('es.umbraco_dlg',{ -about_title:"Acerca de TinyMCE", -about_general:"Acerca de ", -about_help:"Ayuda", -about_license:"Licencia", -about_plugins:"Complementos", -about_plugin:"Complemento", -about_author:"Autor", -about_version:"Versi\u00F3n", -about_loaded:"Complementos cargados", -anchor_title:"Insertar/editar ancla", -anchor_name:"Nombre del ancla", -code_title:"Editor del c\u00F3digo fuente HTML", -code_wordwrap:"Ajustar al margen", -colorpicker_title:"Seleccionar color", -colorpicker_picker_tab:"Selector", -colorpicker_picker_title:"Paleta de color", -colorpicker_palette_tab:"Paleta", -colorpicker_palette_title:"Paleta de colores", -colorpicker_named_tab:"Nombrados", -colorpicker_named_title:"Colores nombrados", -colorpicker_color:"Color:", -colorpicker_name:"Nombre:", -charmap_title:"Seleccionar caracter personalizado", -image_title:"Insertar/editar imagen", -image_src:"URL de la Imagen", -image_alt:"Descripci\u00F3n de la Imagen", -image_list:"Lista de la Imagen", -image_border:"Borde", -image_dimensions:"Dimensi\u00F3n", -image_vspace:"Espacio vertical", -image_hspace:"Espacio horizontal", -image_align:"Alineaci\u00F3n", -image_align_baseline:"L\u00EDnea base", -image_align_top:"Arriba", -image_align_middle:"Medio", -image_align_bottom:"Debajo", -image_align_texttop:"Texto arriba", -image_align_textbottom:"Texto debajo", -image_align_left:"Izquierda", -image_align_right:"Derecha", -link_title:"Insertar/editar hiperv\u00EDnculo", -link_url:"URL del hiperv\u00EDnculo", -link_target:"Destino", -link_target_same:"Abrir v\u00EDnculo en la misma ventana", -link_target_blank:"Abrir v\u00EDnculo en una ventana nueva", -link_titlefield:"T\u00EDtulo", -link_is_email:"La URL que introdujo parece ser una direcci\u00F3n de email, \u00BFdesea agregar el prefijo mailto: necesario?", -link_is_external:"La URL que introdujo parece ser un v\u00EDnculo externo, \u00BFdesea agregar el prefijo http:// necesario?", -link_list:"Lista de hiperv\u00EDnculos" -}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/fr.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/fr.js deleted file mode 100644 index 7526cfad58..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/fr.js +++ /dev/null @@ -1,62 +0,0 @@ -tinyMCE.addI18n('fr.umbraco',{ -style_select:"Styles", -font_size:"Taille police", -fontdefault:"Police", -block:"Format", -paragraph:"Paragraphe", -div:"Div", -address:"Adresse", -pre:"Preformatt\u00E9", -h1:"Titre 1", -h2:"Titre 2", -h3:"Titre 3", -h4:"Titre 4", -h5:"Titre 5", -h6:"Titre 6", -blockquote:"Citation", -code:"Code", -samp:"Exemple de code", -dt:"Terme \u00E0 d\u00E9finir", -dd:"D\u00E9finition du terme", -bold_desc:"Gras (Ctrl+B)", -italic_desc:"Italique (Ctrl+I)", -underline_desc:"Soulign\u00E9 (Ctrl+U)", -striketrough_desc:"Barr\u00E9", -justifyleft_desc:"Align\u00E9 \u00E0 gauche", -justifycenter_desc:"Centr\u00E9", -justifyright_desc:"Align\u00E9 \u00E0 droite", -justifyfull_desc:"Justifi\u00E9", -bullist_desc:"Liste non-num\u00E9rot\u00E9e", -numlist_desc:"Liste num\u00E9rot\u00E9e", -outdent_desc:"Retirer l'indentation", -indent_desc:"Indenter", -undo_desc:"Annuler (Ctrl+Z)", -redo_desc:"R\u00E9tablir (Ctrl+Y)", -link_desc:"Ins\u00E9rer/\u00C9diter le lien", -unlink_desc:"D\u00E9lier", -image_desc:"Ins\u00E9rer/\u00C9diter l'image", -cleanup_desc:"Nettoyer le code non propre", -code_desc:"\u00C9diter source HTML", -sub_desc:"Indice", -sup_desc:"Exposant", -hr_desc:"Ins\u00E9rer trait horizontal", -removeformat_desc:"Enlever formattage", -custom1_desc:"Votre description personnalis\u00E9e ici", -forecolor_desc:"Choisir la couleur du texte", -backcolor_desc:"Choisir la couleur de surlignage", -charmap_desc:"Ins\u00E9rer caract\u00E8res sp\u00E9ciaux", -visualaid_desc:"Activer/d\u00E9sactiver les guides et les \u00E9l\u00E9ments invisibles", -anchor_desc:"Ins\u00E9rer/\u00C9diter ancre", -cut_desc:"Couper", -copy_desc:"Copier", -paste_desc:"Coller", -image_props_desc:"Propri\u00E9t\u00E9s de l'image", -newdocument_desc:"Nouveau document", -help_desc:"Aide", -blockquote_desc:"Citation", -clipboard_msg:"Copier/Couper/Coller n'est pas disponible sous Mozilla et sous Firefox.\n\r\n Voulez-vous plus d'information sur ce probl\u00E8me\u00A0?", -path:"Chemin", -newdocument:"\u00CAtes-vous s\u00FBr de vouloir effacer l'enti\u00E8ret\u00E9 du document\u00A0?", -toolbar_focus:"Aller aux boutons de l'\u00E9diteur - Alt+Q, Aller \u00E0 l'\u00E9diteur - Alt-Z, Aller au chemin de l'\u00E9l\u00E9ment - Alt-X", -more_colors:"Plus de couleurs" -}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/fr_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/fr_dlg.js deleted file mode 100644 index b27bee405d..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/fr_dlg.js +++ /dev/null @@ -1,51 +0,0 @@ -tinyMCE.addI18n('fr.umbraco_dlg',{ -about_title:"\u00C0 propos de TinyMCE", -about_general:"\u00C0 propos", -about_help:"Aide", -about_license:"Licence", -about_plugins:"Plugins", -about_plugin:"Plugin", -about_author:"Auteur", -about_version:"Version", -about_loaded:"Plugins charg\u00E9s", -anchor_title:"Ins\u00E9rer/\u00C9diter ancre", -anchor_name:"Nom de l'ancre", -code_title:"\u00C9diteur de la source HTML", -code_wordwrap:"Rupture de ligne", -colorpicker_title:"Choisir une couleur", -colorpicker_picker_tab:"Nuancier", -colorpicker_picker_title:"Nuancier", -colorpicker_palette_tab:"Palette", -colorpicker_palette_title:"Couleurs de la palette", -colorpicker_named_tab:"Noms", -colorpicker_named_title:"Couleurs nomm\u00E9es", -colorpicker_color:"Couleur :", -colorpicker_name:"Nom :", -charmap_title:"Choisir le caract\u00E8re \u00E0 ins\u00E9rer", -image_title:"Ins\u00E9rer/\u00C9diter image", -image_src:"URL de l'image", -image_alt:"Description de l'image", -image_list:"Liste d'images", -image_border:"Bordure", -image_dimensions:"Dimensions", -image_vspace:"Espacement vertical", -image_hspace:"Espacement horizontal", -image_align:"Alignement", -image_align_baseline:"Base", -image_align_top:"Sommet", -image_align_middle:"Milieu", -image_align_bottom:"Bas", -image_align_texttop:"Haut du texte", -image_align_textbottom:"Bas du texte", -image_align_left:"Gauche", -image_align_right:"Droite", -link_title:"Ins\u00E9rer/\u00C9diter lien", -link_url:"URL du lien", -link_target:"Cible", -link_target_same:"Ouvrir dans la m\u00EAme fen\u00EAtre", -link_target_blank:"Ouvrir dans une nouvelle fen\u00EAtre", -link_titlefield:"Titre", -link_is_email:"L'url que vous avez entr\u00E9 semble \u00EAtre une adresse e-mail, voulez-vous ajouter le pr\u00E9fixe mailto:\u00A0?", -link_is_external:"L'url que vous avez entr\u00E9 semble \u00EAtre une adresse web externe, voulez-vous ajouter le pr\u00E9fixe http://\u00A0?", -link_list:"Liste de liens" -}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/he.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/he.js deleted file mode 100644 index 61a4e8c75c..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/he.js +++ /dev/null @@ -1,62 +0,0 @@ -tinyMCE.addI18n('he.umbraco',{ -style_select:"סגנונות", -font_size:"גודל גופן", -fontdefault:"משפחת הגופן", -block:"תבנית", -paragraph:"פסקה", -div:"Div", -address:"כתובת", -pre:"מעוצב מראש", -h1:"כותרת 1", -h2:"כותרת 2", -h3:"כותרת 3", -h4:"כותרת 4", -h5:"כותרת 5", -h6:"כותרת 6", -blockquote:"ציטוט", -code:"קוד", -samp:"קוד לדוגמא", -dt:"הגדרת מונח ", -dd:"תיאור המונח", -bold_desc:"בולט (Ctrl+B)", -italic_desc:"נטוי (Ctrl+I)", -underline_desc:"קו תחתון (Ctrl+U)", -striketrough_desc:"קו חוצה", -justifyleft_desc:"יישר לשמאל", -justifycenter_desc:"יישר למרכז", -justifyright_desc:"יישר לימין", -justifyfull_desc:"יישור מלא", -bullist_desc:"רשימה לא מסודרת", -numlist_desc:"רשימה מסודרת", -outdent_desc:"הסט החוצה", -indent_desc:"הסט פנימה", -undo_desc:"בטל (Ctrl+Z)", -redo_desc:"עשה שוב (Ctrl+Y)", -link_desc:"הוסף\ערוך קישור", -unlink_desc:"בטל קישור", -image_desc:"הוסף\ערוך תמונה", -cleanup_desc:"נקה קוד מבולגן", -code_desc:"ערוך קוד HTML", -sub_desc:"Subscript", -sup_desc:"Superscript", -hr_desc:"הכנס סרגל אופקי", -removeformat_desc:"הסר עיצוב", -custom1_desc:"Your custom description here", -forecolor_desc:"בחר צבע טקסט", -backcolor_desc:"בחר צבע רקע", -charmap_desc:"הוסף תו מותאם אישית", -visualaid_desc:"החלף מצב קווים מנחים\גורמים בלתי נראים", -anchor_desc:"הוסף\ערוך עוגן", -cut_desc:"גזור", -copy_desc:"העתק", -paste_desc:"הדבק", -image_props_desc:"מאפייני תמונה", -newdocument_desc:"מסמך חדש", -help_desc:"עזרה", -blockquote_desc:"Blockquote", -clipboard_msg:"Copy/Cut/Paste is not available in Mozilla and Firefox.\r\nDo you want more information about this issue?", -path:"Path", -newdocument:"Are you sure you want clear all contents?", -toolbar_focus:"Jump to tool buttons - Alt+Q, Jump to editor - Alt-Z, Jump to element path - Alt-X", -more_colors:"עוד צבעים" -}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/he_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/he_dlg.js deleted file mode 100644 index c987d74a45..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/he_dlg.js +++ /dev/null @@ -1,51 +0,0 @@ -tinyMCE.addI18n('he.umbraco_dlg',{ -about_title:"אודות TinyMCE", -about_general:"אודות", -about_help:"עזרה", -about_license:"רישיון", -about_plugins:"Plugins", -about_plugin:"Plugin", -about_author:"Author", -about_version:"Version", -about_loaded:"Loaded plugins", -anchor_title:"הוסף\ערוך עוגן", -anchor_name:"שם העוגן", -code_title:"עורך קוד HTML", -code_wordwrap:"שמירת שוליים", -colorpicker_title:"בחר צבע", -colorpicker_picker_tab:"Picker", -colorpicker_picker_title:"בחירת צבע", -colorpicker_palette_tab:"לוח צבעים", -colorpicker_palette_title:"לוח צבעים", -colorpicker_named_tab:"צבעים קבועים", -colorpicker_named_title:"צבעים קבועים", -colorpicker_color:"צבע:", -colorpicker_name:"שם:", -charmap_title:"בחר תו מותאם אישית", -image_title:"הוסף\ערוך תמונה", -image_src:"כתובת התמונה", -image_alt:"תיאור התמונה", -image_list:"Image list", -image_border:"גבול", -image_dimensions:"מידות", -image_vspace:"מרווח אנכי", -image_hspace:"מרווח אופקי", -image_align:"יישור", -image_align_baseline:"נקודת התחלה", -image_align_top:"ראש", -image_align_middle:"אמצע", -image_align_bottom:"תחתית", -image_align_texttop:"ראש הטקסט", -image_align_textbottom:"תחתית הטקסט", -image_align_left:"שמאל", -image_align_right:"ימין", -link_title:"הוסף\ערוך לינק", -link_url:"כתובת הקישור", -link_target:"יעד", -link_target_same:"פתח קישור באותו חלון", -link_target_blank:"פתח קישור בחלון חדש", -link_titlefield:"כותרת", -link_is_email:"The URL you entered seems to be an email address, do you want to add the required mailto: prefix?", -link_is_external:"The URL you entered seems to external link, do you want to add the required http:// prefix?", -link_list:"רשימת קישורים" -}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/it.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/it.js deleted file mode 100644 index 1cff652533..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/it.js +++ /dev/null @@ -1,76 +0,0 @@ -tinyMCE.addI18n('it.umbraco',{ -"style_select":"Stili", -"anchor_delta_height":"", -"anchor_delta_width":"", -"charmap_delta_height":"", -"charmap_delta_width":"", -"colorpicker_delta_height":"", -"colorpicker_delta_width":"", -"link_delta_height":"", -"link_delta_width":"", -"image_delta_height":"", -"image_delta_width":"", -"font_size":"Grandezza carattere", -fontdefault:"Famiglia carattere", -block:"Formato", -paragraph:"Paragrafo", -div:"Div", -address:"Indirizzo", -pre:"Preformattato", -h1:"Intestazione 1", -h2:"Intestazione 2", -h3:"Intestazione 3", -h4:"Intestazione 4", -h5:"Intestazione 5", -h6:"Intestazione 6", -blockquote:"Testo quotato", -code:"Codice", -samp:"Esempio codice", -dt:"Termine definizione", -dd:"Descrizione definizione", -"bold_desc":"Grassetto (Ctrl+B)", -"italic_desc":"Corsivo (Ctrl+I)", -"underline_desc":"Sottolineato (Ctrl+U)", -striketrough_desc:"Barrato", -justifyleft_desc:"Allinea a sinistra", -justifycenter_desc:"Centra", -justifyright_desc:"Allinea a destra", -justifyfull_desc:"Giustifica", -bullist_desc:"Lista non ordinata", -numlist_desc:"Lista ordinata", -outdent_desc:"Sposta verso esterno", -indent_desc:"Sposta verso interno", -undo_desc:"Annulla (Ctrl+Z)", -redo_desc:"Ripristina (Ctrl+Y)", -link_desc:"Inserisci/modifica collegamento", -unlink_desc:"Togli collegamento", -image_desc:"Inserisci/modifica immagine", -cleanup_desc:"Pulisci codice disordinato", -code_desc:"Modifica sorgente HTML", -sub_desc:"Pedice", -sup_desc:"Apice", -hr_desc:"Inserisci riga orizzontale", -removeformat_desc:"Rimuovi formattazione", -custom1_desc:"La tua descrizione personalizzata qui", -forecolor_desc:"Seleziona colore testo", -backcolor_desc:"Seleziona colore sfondo", -charmap_desc:"Inserisci carattere speciale", -visualaid_desc:"Mostra/nascondi linee guida/elementi invisibili", -anchor_desc:"Inserisci/modifica ancora", -cut_desc:"Taglia", -copy_desc:"Copia", -paste_desc:"Incolla", -image_props_desc:"Propriet\u00E0 immagine", -newdocument_desc:"Nuovo documento", -"help_desc":"Aiuto", -"blockquote_desc":"Testo quotato", -"clipboard_msg":"Copia/Taglia/Incolla non \u00E8 disponibile in Mozilla e Firefox..\r\nSi desidera avere maggiori informazioni su questo problema?", -path:"Percorso", -newdocument:"Sei sicuro di voler cancellare tutti i contenuti?", -"toolbar_focus":"Vai ai pulsanti strumento - Alt+Q, Vai all'editor - Alt-Z, Vai al percorso dell'elemento - Alt-X", -"more_colors":"Colori aggiuntivi", -"rich_text_area":"Rich Text Area", -"help_shortcut":"Premere ALT-F10 per la barra degli strumenti. Premere ALT-0 per aiuto", -"shortcuts_desc":"Guida accessibilit\u00E0", -toolbar:"Barra degli strumenti" -}); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/it_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/it_dlg.js deleted file mode 100644 index ff20774420..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/it_dlg.js +++ /dev/null @@ -1,52 +0,0 @@ -tinyMCE.addI18n('it.umbraco_dlg',{ -"about_title":"Informazioni su TinyMCE", -"about_general":"Informazioni", -"about_help":"Aiuto", -"about_license":"Licenza", -"about_plugins":"Plugins", -"about_plugin":"Plugin", -"about_author":"Autore", -"about_version":"Versione", -"about_loaded":"Plugin caricati", -"anchor_title":"Inserisci/modifica ancora", -"anchor_name":"Nome ancora", -"code_title":"Editor sorgente HTML", -"code_wordwrap":"A capo automatico", -"colorpicker_title":"Seleziona un colore", -"colorpicker_picker_tab":"Selettore", -"colorpicker_picker_title":"Selettore colori", -"colorpicker_palette_tab":"Tavolozza", -"colorpicker_palette_title":"Tavolozza dei colori", -"colorpicker_named_tab":"Per nome", -"colorpicker_named_title":"Colori per nome", -"colorpicker_color":"Colore:", -"colorpicker_name":"Nome:", -"charmap_title":"Seleziona carattere speciale", -"charmap_usage":"Usa le frecce sinistra e destra per navigare.", -"image_title":"Inserisci/modifica immagine", -"image_src":"URL immagine", -"image_alt":"Descrizione immagine", -"image_list":"Lista immagini", -"image_border":"Bordo", -"image_dimensions":"Dimensioni", -"image_vspace":"Spaziatura verticale", -"image_hspace":"Spaziatura orizzontale", -"image_align":"Allineamento", -"image_align_baseline":"Alla base", -"image_align_top":"In alto", -"image_align_middle":"In mezzo", -"image_align_bottom":"In basso", -"image_align_texttop":"In alto al testo", -"image_align_textbottom":"In basso al testo", -"image_align_left":"A sinistra", -"image_align_right":"A destra", -"link_title":"Inserisci/modifica collegamento", -"link_url":"URL collegamento", -"link_target":"Target", -"link_target_same":"Apri link nella stessa finestra", -"link_target_blank":"Apri link in una nuova finestra", -"link_titlefield":"Titolo", -"link_is_email":"L'URL inserito sembra essere un indirizzo email. Aggiungere il necessario prefisso mailto: ?", -"link_is_external":"L'URL inserito sembra essere un link esterno. Aggiungere il necessario prefisso http:// ?", -"link_list":"Lista collegamenti" -}); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/ja.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/ja.js deleted file mode 100644 index 5213c923f6..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/ja.js +++ /dev/null @@ -1,75 +0,0 @@ -tinyMCE.addI18n('ja.umbraco',{ -"underline_desc":"下線 (Ctrl+U)", -"italic_desc":"斜体 (Ctrl+I)", -"bold_desc":"太字 (Ctrl+B)", -dd:"語句の説明", -dt:"語句の定義", -samp:"コードの例", -code:"コード", -blockquote:"引用", -h6:"見出し6", -h5:"見出し5", -h4:"見出し4", -h3:"見出し3", -h2:"見出し2", -h1:"見出し1", -pre:"整形済み", -address:"住所", -div:"div要素", -paragraph:"段落", -block:"書式", -fontdefault:"フォント", -"font_size":"フォントの大きさ", -"style_select":"スタイル", -"anchor_delta_height":"", -"anchor_delta_width":"", -"charmap_delta_height":"", -"charmap_delta_width":"", -"colorpicker_delta_height":"", -"colorpicker_delta_width":"", -"link_delta_height":"", -"link_delta_width":"", -"image_delta_height":"", -"image_delta_width":"", -"more_colors":"その他の色...", -"toolbar_focus":"ツールボタンへ移動 - Alt Q, エディタに移動 - Alt-Z, 要素のパスへ移動 - Alt-X", -newdocument:"本当にすべての内容を消去してよいですか?", -path:"パス", -"clipboard_msg":"Mozilla と Firefox ではコピー/切り取り/貼り付けはできません。\nこの問題の詳細を知りたいですか?", -"blockquote_desc":"引用ブロック", -"help_desc":"ヘルプ", -"newdocument_desc":"新規ドキュメント", -"image_props_desc":"画像の属性", -"paste_desc":"貼り付け (Ctrl+V)", -"copy_desc":"コピー (Ctrl+C)", -"cut_desc":"切り取り (Ctrl+X)", -"anchor_desc":"アンカーの挿入/編集", -"visualaid_desc":"ガイドラインと非表示要素の表示を切替", -"charmap_desc":"特殊文字", -"backcolor_desc":"背景の色", -"forecolor_desc":"文字の色", -"custom1_desc":"説明文を入力してください。", -"removeformat_desc":"書式の解除", -"hr_desc":"水平線の挿入", -"sup_desc":"上付き文字", -"sub_desc":"下付き文字", -"code_desc":"HTMLソースを編集", -"cleanup_desc":"コード整形", -"image_desc":"画像の挿入/編集", -"unlink_desc":"リンクの解除", -"link_desc":"リンクの挿入/編集", -"redo_desc":"やり直し (Ctrl+Y)", -"undo_desc":"元に戻す (Ctrl+Z)", -"indent_desc":"字下げを増やす", -"outdent_desc":"字下げを減らす", -"numlist_desc":"番号付きリスト", -"bullist_desc":"番号なしリスト", -"justifyfull_desc":"両端揃え", -"justifyright_desc":"右揃え", -"justifycenter_desc":"中央揃え", -"justifyleft_desc":"左揃え", -"striketrough_desc":"取り消し線", -"help_shortcut":"ALT-F10 でツールバー、ALT-0 でヘルプ", -"rich_text_area":"リッチテキストエリア", -"shortcuts_desc":"アクセシビリティのヘルプ", -toolbar:"ツールバー"}); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/ja_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/ja_dlg.js deleted file mode 100644 index 1489cb246b..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/ja_dlg.js +++ /dev/null @@ -1,56 +0,0 @@ -tinyMCE.addI18n('ja.umbraco_dlg', {"link_list":"リンクの一覧", -"link_is_external":"入力したURLは外部のリンクのようです。リンクに http:// を追加しますか?", -"link_is_email":"入力したURLは電子メールアドレスのようです。リンクに mailto: を追加しますか?", -"link_titlefield":"タイトル", -"link_target_blank":"新しいウインドウで開く", -"link_target_same":"同じウインドウで開く", -"link_target":"ターゲット", -"link_url":"リンクのURL", -"link_title":"リンクの挿入や編集", -"image_align_right":"右揃え", -"image_align_left":"左揃え", -"image_align_textbottom":"テキストの下端揃え", -"image_align_texttop":"テキストの上端揃え", -"image_align_bottom":"下揃え", -"image_align_middle":"中央揃え", -"image_align_top":"上揃え", -"image_align_baseline":"ベースライン揃え", -"image_align":"配置", -"image_hspace":"左右の余白", -"image_vspace":"上下の余白", -"image_dimensions":"寸法", -"image_alt":"画像の説明", -"image_list":"画像の一覧", -"image_border":"枠線", -"image_src":"画像のURL", -"image_title":"画像の挿入/編集", -"charmap_title":"特殊文字", -"charmap_usage":"左右のカーソルキーを使用して移動してください。", -"colorpicker_name":"名前:", -"colorpicker_color":"色:", -"colorpicker_named_title":"定義済みの色", -"colorpicker_named_tab":"定義済み", -"colorpicker_palette_title":"パレットの色", -"colorpicker_palette_tab":"パレット", -"colorpicker_picker_title":"色選択", -"colorpicker_picker_tab":"選択", -"colorpicker_title":"色を選択", -"code_wordwrap":"行の折り返し", -"code_title":"HTMLソースエディタ", -"anchor_name":"アンカーの名前", -"anchor_title":"アンカーの挿入/編集", -"about_loaded":"読み込み済みのプラグイン", -"about_version":"バージョン", -"about_author":"作成者", -"about_plugin":"プラグイン", -"about_plugins":"プラグイン", -"about_license":"ライセンス", -"about_help":"ヘルプ", -"about_general":"TinyMCEについて", -"about_title":"TinyMCEについて", -"anchor_invalid":"有効なアンカーの名前を指定してください。", -"accessibility_help":"アクセシビリティのヘルプ", -"accessibility_usage_title":"全般的な使い方", -"invalid_color_value":"無効な値", -"":""}); - diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/ko.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/ko.js deleted file mode 100644 index 772c836453..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/ko.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('ko.advanced',{underline_desc:"\ubc11\uc904(Ctrl+U)",italic_desc:"\uc774\ud0e4\ub9ad(Ctrl+I)",bold_desc:"\uad75\uc740 \uae00\uc528(Ctrl+B)",dd:"\uc815\uc758 \uc124\uba85",dt:"\uc5b4\uad6c \uc815\uc758",samp:"\uc0d8\ud50c\ucf54\ub4dc",code:"\ucf54\ub4dc",blockquote:"\uc778\uc6a9\ubb38",h6:"\ud45c\uc81c6",h5:"\ud45c\uc81c5",h4:"\ud45c\uc81c4",h3:"\ud45c\uc81c3",h2:"\ud45c\uc81c2",h1:"\ud45c\uc81c1",pre:"pre",address:"\uc8fc\uc18c",div:"Div",paragraph:"\ub2e8\ub77d",block:"\ud3ec\ub9f7",fontdefault:"\uae00\uaf34",font_size:"\uae00\uaf34 \ud06c\uae30",style_select:"\uc2a4\ud0c0\uc77c",more_colors:"\uadf8 \uc678\uc758 \uc0c9",toolbar_focus:"\ubc84\ud2bc\uc73c\ub85c \uc810\ud504 - Alt+Q, \uc5d0\ub514\ud130\ub85c \uc810\ud504 - Alt-Z, Jump to element path - Alt-X",newdocument:"\ud3b8\uc9d1\uc911\uc758 \ub370\uc774\ud130\ub97c \ubaa8\ub450 \uc783\uc5b4\ub3c4 \uad1c\ucc2e\uc2b5\ub2c8\uae4c?",path:"Path",clipboard_msg:"\ubcf5\uc0ac/\uc798\ub77c\ub0b4\uae30/\ubd99\uc774\uae30\ub294 Mozilla \ubc0fFirefox \uc5d0\uc11c \uc0ac\uc6a9\ub418\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.\\n\uc0c1\uc138\uc815\ubcf4\ub97c \ud45c\uc2dc\ud569\ub2c8\uae4c?",blockquote_desc:"\uc778\uc6a9\ubb38",help_desc:"\ub3c4\uc6c0\ub9d0",newdocument_desc:"\uc2e0\uaddc\uae00 \uc791\uc131",image_props_desc:"\uc774\ubbf8\uc9c0\uc18d\uc131",paste_desc:"\ubd99\uc774\uae30",copy_desc:"\ubcf5\uc0ac",cut_desc:"\uc798\ub77c\ub0b4\uae30",anchor_desc:"\uc5e5\ucee4 \uc0bd\uc785/\ud3b8\uc9d1",visualaid_desc:"\uac00\uc774\ub4dc\ub77c\uc778 \ud45c\uc2dc/\ube44\ud45c\uc2dc",charmap_desc:"\ud2b9\uc218 \ubb38\uc790",backcolor_desc:"\ubc30\uacbd\uc0c9",forecolor_desc:"\uae00\uc790\uc0c9",custom1_desc:"\ucee4\uc2a4\ud140 \uc124\uba85",removeformat_desc:"\uc11c\uc2dd \ud574\uc81c",hr_desc:"\uad6c\ubd84\uc120",sup_desc:"\uc704\ucca8\uc790",sub_desc:"\uc544\ub798\ucca8\uc790",code_desc:"HTML \ud3b8\uc9d1",cleanup_desc:"\uc9c0\uc800\ubd84\ud55c \ucf54\ub4dc \uc0ad\uc81c",image_desc:"\uc774\ubbf8\uc9c0 \uc0bd\uc785/\ud3b8\uc9d1",unlink_desc:"\ub9c1\ud06c \uc0ad\uc81c",link_desc:"\ub9c1\ud06c\uc758 \uc0bd\uc785/\ud3b8\uc9d1",redo_desc:"\ub2e4\uc2dc\uc2e4\ud589(Ctrl+Y)",undo_desc:"\uc2e4\ud589\ucde8\uc18c(Ctrl+Z)",indent_desc:"\ub4e4\uc5ec\uc4f0\uae30",outdent_desc:"\ub0b4\uc5b4\uc4f0\uae30",numlist_desc:"\uc21c\ucc28\ubaa9\ub85d",bullist_desc:"\ube44\uc21c\ucc28\ubaa9\ub85d",justifyfull_desc:"\ubc30\ubd84 \uc815\ub82c",justifyright_desc:"\uc624\ub978\ucabd \uc815\ub82c",justifycenter_desc:"\uac00\uc6b4\ub370 \uc815\ub82c",justifyleft_desc:"\uc67c\ucabd \uc815\ub82c",striketrough_desc:"\ucde8\uc18c\uc120",anchor_delta_height:"",anchor_delta_width:"",charmap_delta_height:"",charmap_delta_width:"",colorpicker_delta_height:"",colorpicker_delta_width:"",link_delta_height:"",link_delta_width:"",image_delta_height:"",image_delta_width:""}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/ko_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/ko_dlg.js deleted file mode 100644 index 67bf5b2a46..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/ko_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('ko.advanced_dlg',{link_list:"\ub9c1\ud06c \ubaa9\ub85d",link_is_external:"\uc678\ubd80URL\uc774 \uc785\ub825\ub418\uc5c8\uc2b5\ub2c8\ub2e4.\\nURL\uc758 \uc55e\uc5d0 http://\ub97c \ubd99\uc785\ub2c8\uae4c?",link_is_email:"\uba54\uc77c\uc8fc\uc18c\uac00 \uc785\ub825\ub418\uc5c8\uc2b5\ub2c8\ub2e4.\\n\uba54\uc77c\uc8fc\uc18c\uc758 \uc55e\uc5d0 mailto:\ub97c \ubd99\uc785\ub2c8\uae4c?",link_titlefield:"\uc81c\ubaa9",link_target_blank:"\uc0c8\ucc3d",link_target_same:"\uac19\uc740\ucc3d",link_target:"Target",link_url:"\ub9c1\ud06c URL",link_title:"\ub9c1\ud06c\uc758 \uc0bd\uc785/\ud3b8\uc9d1",image_align_right:"Right",image_align_left:"Left",image_align_textbottom:"Text bottom",image_align_texttop:"Text top",image_align_bottom:"Bottom",image_align_middle:"Middle",image_align_top:"Top",image_align_baseline:"\uae30\uc900\uc120",image_align:"\uc815\ub82c",image_hspace:"\uc88c\uc6b0 \uc5ec\ubc31",image_vspace:"\uc0c1\ud558 \uc5ec\ubc31",image_dimensions:"\ud06c\uae30",image_alt:"\uc774\ubbf8\uc9c0 \uc124\uba85",image_list:"\uc774\ubbf8\uc9c0 \ubaa9\ub85d",image_border:"\ud14c\ub450\ub9ac\uc120",image_src:"\uc774\ubbf8\uc9c0 URL",image_title:"\uc774\ubbf8\uc9c0\uc758 \uc0bd\uc785/\ud3b8\uc9d1",charmap_title:"\ud2b9\uc218 \ubb38\uc790",colorpicker_name:"\uc0c9 \uc774\ub984:",colorpicker_color:"Color:",colorpicker_named_title:"\uc0c9",colorpicker_named_tab:"\uc0c9 \uc774\ub984",colorpicker_palette_title:"\ud314\ub808\ud2b8 \uc0c9",colorpicker_palette_tab:"\ud314\ub808\ud2b8",colorpicker_picker_title:"\uceec\ub7ec \ud53d\ucee4",colorpicker_picker_tab:"\ud53d\ucee4",colorpicker_title:"\uc0c9\uc744 \uc120\ud0dd",code_wordwrap:"\uc6cc\ub4dc\ub7a9",code_title:"\uc18c\uc2a4 \ud3b8\uc9d1",anchor_name:"\uc5e5\ucee4\uba85",anchor_title:"\uc5e5\ucee4 \uc0bd\uc785/\ud3b8\uc9d1",about_loaded:"\uc2e4\ud589\ub41c \ud50c\ub7ec\uadf8\uc778",about_version:"\ubc84\uc83c",about_author:"\uc81c\uc791\uc790",about_plugin:"\ud50c\ub7ec\uadf8\uc778",about_plugins:"\ud50c\ub7ec\uadf8\uc778",about_license:"\ub77c\uc774\uc13c\uc2a4",about_help:"\ub3c4\uc6c0\ub9d0",about_general:"About",about_title:"TinyMCE\uc5d0 \ub300\ud558\uc5ec"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/nl.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/nl.js deleted file mode 100644 index baa70c12b2..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/nl.js +++ /dev/null @@ -1,62 +0,0 @@ -tinyMCE.addI18n('nl.umbraco',{ -style_select:"Stijlen", -font_size:"Tekengrootte", -fontdefault:"Lettertype", -block:"Opmaak", -paragraph:"Alinea", -div:"Div", -address:"Adres", -pre:"Vaste opmaak", -h1:"Kop 1", -h2:"Kop 2", -h3:"Kop 3", -h4:"Kop 4", -h5:"Kop 5", -h6:"Kop 6", -blockquote:"Citaat", -code:"Code", -samp:"Codevoorbeeld", -dt:"Definitieterm", -dd:"Definitiebeschrijving", -bold_desc:"Vet (Ctrl+B)", -italic_desc:"Cursief (Ctrl+I)", -underline_desc:"Onderstrepen (Ctrl+U)", -striketrough_desc:"Doorhalen", -justifyleft_desc:"Links uitlijnen", -justifycenter_desc:"Centreren", -justifyright_desc:"Rechts uitlijnen", -justifyfull_desc:"Uitvullen", -bullist_desc:"Opsommingstekens", -numlist_desc:"Nummering", -outdent_desc:"Inspringing verkleinen", -indent_desc:"Inspringing vergroten", -undo_desc:"Ongedaan maken (Ctrl+Z)", -redo_desc:"Herhalen (Ctrl+Y)", -link_desc:"Link invoegen/bewerken", -unlink_desc:"Link verwijderen", -image_desc:"Afbeelding invoegen/bewerken", -cleanup_desc:"Code opruimen", -code_desc:"HTML bron bewerken", -sub_desc:"Subscript", -sup_desc:"Superscript", -hr_desc:"Scheidingslijn invoegen", -removeformat_desc:"Opmaak verwijderen", -custom1_desc:"Uw eigen beschrijving hier", -forecolor_desc:"Tekstkleur", -backcolor_desc:"Tekstmarkeringskleur", -charmap_desc:"Symbool invoegen", -visualaid_desc:"Hulplijnen weergeven", -anchor_desc:"Anker invoegen/bewerken", -cut_desc:"Knippen", -copy_desc:"Kopi\u00EBren", -paste_desc:"Plakken", -image_props_desc:"Afbeeldingseigenschappen", -newdocument_desc:"Nieuw document", -help_desc:"Help", -blockquote_desc:"Citaat", -clipboard_msg:"Kopi\u00EBren/knippen/plakken is niet beschikbaar in Mozilla en Firefox.\nWilt u meer informatie over deze beperking?", -path:"Pad", -newdocument:"Weet u zeker dat u alle inhoud wilt wissen?", -toolbar_focus:"Spring naar werkbalk - Alt+Q, Spring naar tekst - Alt-Z, Spring naar elementpad - Alt-X", -more_colors:"Meer kleuren" -}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/nl_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/nl_dlg.js deleted file mode 100644 index 5c2046dda7..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/nl_dlg.js +++ /dev/null @@ -1,51 +0,0 @@ -tinyMCE.addI18n('nl.umbraco_dlg',{ -about_title:"Over TinyMCE", -about_general:"Info", -about_help:"Help", -about_license:"Licentie", -about_plugins:"Invoegtoepassingen", -about_plugin:"Invoegtoepassing", -about_author:"Auteur", -about_version:"Versie", -about_loaded:"Geladen Invoegtoepassingen", -anchor_title:"Anker invoegen/bewerken", -anchor_name:"Ankernaam", -code_title:"HTML Bron", -code_wordwrap:"Automatische terugloop", -colorpicker_title:"Kleuren", -colorpicker_picker_tab:"Alle kleuren", -colorpicker_picker_title:"Alle kleuren", -colorpicker_palette_tab:"Palet", -colorpicker_palette_title:"Paletkleuren", -colorpicker_named_tab:"Benoemd", -colorpicker_named_title:"Benoemde kleuren", -colorpicker_color:"Kleur:", -colorpicker_name:"Naam:", -charmap_title:"Symbolen", -image_title:"Afbeelding invoegen/bewerken", -image_src:"Bestand/URL", -image_alt:"Beschrijving", -image_list:"Lijst", -image_border:"Rand", -image_dimensions:"Afmetingen", -image_vspace:"Verticale ruimte", -image_hspace:"Horizontale ruimte", -image_align:"Uitlijning", -image_align_baseline:"Basislijn", -image_align_top:"Boven", -image_align_middle:"Midden", -image_align_bottom:"Onder", -image_align_texttop:"Bovenkant tekst", -image_align_textbottom:"Onderkant tekst", -image_align_left:"Links", -image_align_right:"Rechts", -link_title:"Link invoegen/bewerken", -link_url:"URL", -link_target:"Doel", -link_target_same:"Link in hetzelfde venster openen", -link_target_blank:"Link in een nieuw venster openen", -link_titlefield:"Titel", -link_is_email:"De ingevoerde URL lijkt op een e-mailadres. Wilt u de vereiste mailto: tekst voorvoegen?", -link_is_external:"De ingevoerde URL lijkt op een externe link. Wilt u de vereiste http:// tekst voorvoegen?", -link_list:"Link lijst" -}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/no.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/no.js deleted file mode 100644 index ad01bea4a5..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/no.js +++ /dev/null @@ -1,62 +0,0 @@ -tinyMCE.addI18n('no.umbraco',{ -style_select:"Stiler", -font_size:"Skriftst\u00F8rrelse", -fontdefault:"Skriftfamilie", -block:"Format", -paragraph:"Avsnitt", -div:"Div", -address:"Adresse", -pre:"Pre-formatert", -h1:"Overskrift 1", -h2:"Overskrift 2", -h3:"Overskrift 3", -h4:"Overskrift 4", -h5:"Overskrift 5", -h6:"Overskrift 6", -blockquote:"Innrykk", -code:"Kode", -samp:"Kodeeksempel", -dt:"Definisjonsuttrykk", -dd:"Definisjonsbeskrivelse", -bold_desc:"Fet", -italic_desc:"Kursiv", -underline_desc:"Understrek", -striketrough_desc:"Gjennomstrek", -justifyleft_desc:"Venstrejustert", -justifycenter_desc:"Midtstilt", -justifyright_desc:"H\u00F8yrejustert", -justifyfull_desc:"Blokkjustert", -bullist_desc:"Punktliste", -numlist_desc:"Nummerliste", -outdent_desc:"Reduser innrykk", -indent_desc:"\u00D8k innrykk", -undo_desc:"Angre", -redo_desc:"Gj\u00F8r om", -link_desc:"Sett inn / endre lenke", -unlink_desc:"Fjern lenke", -image_desc:"Sett inn / endre bilde", -cleanup_desc:"Rens grisete kode", -code_desc:"Redigere HTML-kode", -sub_desc:"Senk skrift", -sup_desc:"Hev skrift", -hr_desc:"Sett inn horisontal linje", -removeformat_desc:"Fjern formatering", -custom1_desc:"Din spesialfunksjondefinisjon her", -forecolor_desc:"Vel skriftfarge", -backcolor_desc:"Vel bakgrunnsfarge", -charmap_desc:"Sett inn spesialtegn", -visualaid_desc:"Sl\u00E5 av/p\u00E5 usynlige element", -anchor_desc:"Sett inn / endre anker", -cut_desc:"Klipp ut", -copy_desc:"Kopier", -paste_desc:"Lim inn", -image_props_desc:"Egenskaper for bilde", -newdocument_desc:"Nytt dokument", -help_desc:"Hjelp", -blockquote_desc:"Innrykk", -clipboard_msg:"Klipp ut / Kopier /Lim inn fungerer ikke i Mozilla og Firefox. \r\n Vil du vite mer om dette?", -path:"Sti", -newdocument:"Er du sikker p\u00E5 at du vil slette alt innhold?", -toolbar_focus:"Skift til verkt\u00F8yknapper - Alt+Q, Skift til editor - Alt-Z, Skift til elementsti - Alt-", -more_colors:"Flere farger" -}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/no_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/no_dlg.js deleted file mode 100644 index 019bbe7712..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/no_dlg.js +++ /dev/null @@ -1,51 +0,0 @@ -tinyMCE.addI18n('no.umbraco_dlg',{ -about_title:"Om TinyMCE", -about_general:"Om", -about_help:"Hjelp", -about_license:"Lisens", -about_plugins:"Programtillegg", -about_plugin:"Programtillegg", -about_author:"Utvikler", -about_version:"Versjon", -about_loaded:"Last programtillegg", -anchor_title:"Sett inn / endre anker", -anchor_name:"Ankernavn", -code_title:"HTML-editor", -code_wordwrap:"Tekstbryting", -colorpicker_title:"Velg en farge", -colorpicker_picker_tab:"Velg farge", -colorpicker_picker_title:"Fargevalg", -colorpicker_palette_tab:"Palett", -colorpicker_palette_title:"Palettfarger", -colorpicker_named_tab:"Navnevalg", -colorpicker_named_title:"Fargenavn", -colorpicker_color:"Farge:", -colorpicker_name:"Navn:", -charmap_title:"Velg spesialtegn", -image_title:"Sett inn / endre bilde", -image_src:"Bilde-URL", -image_alt:"Bildeomtale", -image_list:"Liste med bilde", -image_border:"Ramme", -image_dimensions:"Dimensjoner", -image_vspace:"Vertikal avstand", -image_hspace:"Horisontal avstand", -image_align:"Justering", -image_align_baseline:"Bunnlinje", -image_align_top:"Topp", -image_align_middle:"Midtstilt", -image_align_bottom:"Bunn", -image_align_texttop:"Teksttopp", -image_align_textbottom:"Tekstbunn", -image_align_left:"Venstre", -image_align_right:"H\u00F8yre", -link_title:"Sett inn / endre lenke", -link_url:"Lenke-URL", -link_target:"Vindu", -link_target_same:"\u00C5pne i dette vinduet", -link_target_blank:"\u00C5pne i nytt vindu", -link_titlefield:"Tittel", -link_is_email:"Nettadressen du skrev inn ser ut til \u00E5 v\u00E6re en e-postadresse. \u00D8nsker du \u00E5 legge til det obligatoriske mailto:-prefikset?", -link_is_external:"Nettadressen du skrev inn ser ut til \u00E5 v\u00E6re en ekstern nettadresse. \u00D8nsker du \u00E5 legge til det obligatoriske http://-prefikset?", -link_list:"Lenkeliste" -}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/ru.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/ru.js deleted file mode 100644 index 027943d0bc..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/ru.js +++ /dev/null @@ -1,76 +0,0 @@ -tinyMCE.addI18n('ru.umbraco',{ -style_select:"Стиль", -font_size:"Размер", -fontdefault:"Шрифт", -block:"Формат", -paragraph:"Абзац", -div:"Блок", -address:"Адрес", -pre:"Преформатированный", -h1:"Заголовок 1", -h2:"Заголовок 2", -h3:"Заголовок 3", -h4:"Заголовок 4", -h5:"Заголовок 5", -h6:"Заголовок 6", -blockquote:"Цитата", -code:"Код", -samp:"Пример кода", -dt:"Термин справочника", -dd:"Описание справочника", -bold_desc:"Полужирный (Ctrl+B)", -italic_desc:"Курсив (Ctrl+I)", -underline_desc:"Подчеркнутый (Ctrl+U)", -striketrough_desc:"Зачеркнутый", -justifyleft_desc:"По левому краю", -justifycenter_desc:"По центру", -justifyright_desc:"По правому краю", -justifyfull_desc:"По ширине", -bullist_desc:"Маркированный список", -numlist_desc:"Нумерованный список", -outdent_desc:"Уменьшить отступ", -indent_desc:"Увеличить отступ", -undo_desc:"Отменить (Ctrl+Z)", -redo_desc:"Вернуть (Ctrl+Y)", -link_desc:"Добавить/Изменить ссылку", -unlink_desc:"Удалить ссылку", -image_desc:"Добавить/Изменить изображение", -cleanup_desc:"Очистить лишний код", -code_desc:"Редактировать HTML код", -sub_desc:"Подстрочный", -sup_desc:"Надстрочный", -hr_desc:"Добавить черту", -removeformat_desc:"Очистить формат", -custom1_desc:"Собственное описание", -forecolor_desc:"Цвет текста", -backcolor_desc:"Цвет фона", -charmap_desc:"Добавить символ", -visualaid_desc:"Все знаки", -anchor_desc:"Добавить/Изменить якорь", -cut_desc:"Вырезать", -copy_desc:"Копировать", -paste_desc:"Вставить", -image_props_desc:"Параметры изображения", -newdocument_desc:"Новый документ", -help_desc:"Справка", -blockquote_desc:"Цитата", -clipboard_msg:"Копирование, вырезка и вставка не работают в Firefox.\nХотите получить более подробную информацию?", -path:"Путь", -newdocument:"Вы уверены, что хотите все удалить?", -toolbar_focus:"Перейти на панель кнопок (Alt+Q). Перейти к редактору (Alt+Z). Перейти к элементу пути (Alt+X).", -more_colors:"Другие цвета...", -anchor_delta_height:"", -anchor_delta_width:"", -charmap_delta_height:"", -charmap_delta_width:"", -colorpicker_delta_height:"", -colorpicker_delta_width:"", -link_delta_height:"", -link_delta_width:"", -image_delta_height:"", -image_delta_width:"", -help_shortcut:"Используйте клавиши Alt-F10 для панели инструментов. Используйте Alt-0 для получения справки", -rich_text_area:"Область форматированного текста", -shortcuts_desc:"Справка по доступности", -umbracomacro_desc:"Вставить макрос", -toolbar:"Панель инструментов"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/ru_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/ru_dlg.js deleted file mode 100644 index ab380ec47a..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/ru_dlg.js +++ /dev/null @@ -1,56 +0,0 @@ -tinyMCE.addI18n('ru.umbraco_dlg',{ -about_title:"Описание TinyMCE", -about_general:"Описание", -about_help:"Помощь", -about_license:"Лицензия", -about_plugins:"Дополнительные модули", -about_plugin:"Модуль", -about_author:"Автор", -about_version:"Версия", -about_loaded:"Подключенные модули", -accessibility_help:"Справка по доступности", -accessibility_usage_title:"Общедоступное применение", -anchor_title:"Параметры якоря", -anchor_name:"Имя якоря", -anchor_invalid:"Укажите корректное название якоря.", -code_title:"Редактор HTML кода", -code_wordwrap:"Перенос строк", -colorpicker_title:"Цвета", -colorpicker_picker_tab:"Спктр", -colorpicker_picker_title:"Цвета", -colorpicker_palette_tab:"Палитра", -colorpicker_palette_title:"Цвета", -colorpicker_named_tab:"Названия", -colorpicker_named_title:"Цвета", -colorpicker_color:"Код:", -colorpicker_name:"Название:", -charmap_title:"Выбор символа", -charmap_usage:"Используйте стрелки вправо и влево для навигации.", -image_title:"Параметры изображения", -image_src:"Адрес", -image_alt:"Описание", -image_list:"Список картинок", -image_border:"Граница", -image_dimensions:"Размер", -image_vspace:"Верт. отступ", -image_hspace:"Гориз. отступ", -image_align:"Выравнивание", -image_align_baseline:"По базовой линии", -image_align_top:"По верхнему краю", -image_align_middle:"По центру", -image_align_bottom:"По нижнему краю", -image_align_texttop:"По верхнему краю текста", -image_align_textbottom:"По нижнему краю текста", -image_align_left:"По левому краю", -image_align_right:"По правому краю", -invalid_color_value:"Некорректное значение цвета", -link_title:"Параметры ссылки", -link_url:"Адрес", -link_target:"Цель", -link_target_same:"Открыть в этом окне", -link_target_blank:"Открыть в новом окне", -link_titlefield:"Заголовок", -link_is_email:"Введенный адрес напоминает электронную почту, добавить mailto: префикс?", -link_is_external:"Введенный адрес напоминает внешнюю ссылку, добавить http:// префикс?", -link_list:"Список ссылок" -"":""}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/sv.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/sv.js deleted file mode 100644 index 64f2ab7f3f..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/sv.js +++ /dev/null @@ -1,60 +0,0 @@ -tinyMCE.addI18n('sv.umbraco',{ -style_select:"Stilar", -font_size:"Fontstorlek", -fontdefault:"Fontfamilj", -block:"Format", -paragraph:"Stycke", -div:"Div", -address:"Adress", -pre:"F\u00F6rformaterad", -h1:"Rubrik 1", -h2:"Rubrik 2", -h3:"Rubrik 3", -h4:"Rubrik 4", -h5:"Rubrik 5", -h6:"Rubrik 6", -blockquote:"Blockcitat", -code:"Kodblock", -samp:"Kodexempel", -dt:"Definitionsterm", -dd:"Definitionsbeskrivning", -bold_desc:"Fet (Ctrl+B)", -italic_desc:"Kursiv (Ctrl+I)", -underline_desc:"Understruken (Ctrl+U)", -striketrough_desc:"Genomstruken", -justifyleft_desc:"V\u00E4nsterst\u00E4lld", -justifycenter_desc:"Centrera", -justifyright_desc:"H\u00F6gerst\u00E4lld", -justifyfull_desc:"Justera", -bullist_desc:"Punktlista", -numlist_desc:"Nummerlista", -outdent_desc:"Drag tillbaka", -indent_desc:"Indrag", -undo_desc:"\u00C5ngra (Ctrl+Z)", -redo_desc:"G\u00F6r om (Ctrl+Y)", -link_desc:"Infoga/redigera l\u00E4nk", -unlink_desc:"Ta bort l\u00E4nk", -image_desc:"Infoga/redigera bild", -cleanup_desc:"St\u00E4da upp i k\u00E4llkoden", -code_desc:"Redigera HTML k\u00E4llkoden", -sub_desc:"Subscript", -sup_desc:"Superscript", -hr_desc:"Infoga horisontell skiljelinje", -removeformat_desc:"Ta bort formatering", -forecolor_desc:"V\u00E4lj textf\u00E4rg", -backcolor_desc:"V\u00E4lj bakgrundsf\u00E4rg", -charmap_desc:"Infoga specialtecken", -visualaid_desc:"Visa/d\u00F6lj visuella hj\u00E4lpmedel", -anchor_desc:"Infoga/redigera bokm\u00E4rke", -cut_desc:"Klipp ut", -copy_desc:"Kopiera", -paste_desc:"Klistra in", -image_props_desc:"Bildinst\u00E4llningar", -newdocument_desc:"Nytt dokument", -help_desc:"Hj\u00E4lp", -blockquote_desc:"Blockcitat", -clipboard_msg:"Kopiera/klipp ut/klistra in \u00E4r inte tillg\u00E4ngligt i din webbl\u00E4sare.\nVill du veta mer om detta?", -path:"Element", -newdocument:"\u00C4r du s\u00E4ker p\u00E5 att du vill radera allt inneh\u00E5ll?", -toolbar_focus:"Hoppa till verktygsf\u00E4ltet - Alt+Q, Hoppa till redigeraren - Alt-Z, Hoppa till elementlistan - Alt-X" -}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/sv_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/sv_dlg.js deleted file mode 100644 index 977362dd81..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/sv_dlg.js +++ /dev/null @@ -1,51 +0,0 @@ -tinyMCE.addI18n('sv.umbraco_dlg',{ -about_title:"Om TinyMCE", -about_general:"Om", -about_help:"Hj\u00E4lp", -about_license:"Licens", -about_plugins:"Om plug-in", -about_plugin:"Om plug-in", -about_author:"Utvecklare", -about_version:"Version", -about_loaded:"Laddade plug-ins", -anchor_title:"Infoga/redigera bokm\u00E4rke", -anchor_name:"Namn", -code_title:"HTML k\u00E4llkodsl\u00E4ge", -code_wordwrap:"Bryt ord", -colorpicker_title:"V\u00E4lj en f\u00E4rg", -colorpicker_picker_tab:"V\u00E4ljare", -colorpicker_picker_title:"F\u00E4rgv\u00E4ljare", -colorpicker_palette_tab:"Palett", -colorpicker_palette_title:"Palettf\u00E4rger", -colorpicker_named_tab:"Namngivna", -colorpicker_named_title:"Namngivna f\u00E4rger", -colorpicker_color:"F\u00E4rg:", -colorpicker_name:"Namn:", -charmap_title:"V\u00E4lj ett specialtecken", -image_title:"Infoga/redigera bild", -image_src:"Bildens URL", -image_alt:"Bildens beskrivning", -image_list:"Bildlista", -image_border:"Ram", -image_dimensions:"Dimensioner", -image_vspace:"Vertikalrymd", -image_hspace:"Horisontalrymd", -image_align:"Justering", -image_align_baseline:"Baslinje", -image_align_top:"Toppen", -image_align_middle:"Mitten", -image_align_bottom:"Botten", -image_align_texttop:"Toppen av texten", -image_align_textbottom:"Botten av texten", -image_align_left:"V\u00E4nster", -image_align_right:"H\u00F6ger", -link_title:"Infoga/redigera l\u00E4nk", -link_url:"L\u00E4nkens URL", -link_target:"M\u00E5l", -link_target_same:"\u00D6\u0096ppna l\u00E4nken i samma f\u00F6nster", -link_target_blank:"\u00D6\u0096ppna l\u00E4nken i ett nytt f\u00F6nster", -link_titlefield:"Titel", -link_is_email:"L\u00E4nken du angav verkar vara en e-post adress. Vill du infoga mailto: prefixet p\u00E5 l\u00E4nken?", -link_is_external:"L\u00E4nken du angav verkar vara en extern adress. Vill du infoga http:// prefixet p\u00E5 l\u00E4nken?", -link_list:"L\u00E4nklista" -}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/zh.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/zh.js deleted file mode 100644 index e80b81eb03..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/zh.js +++ /dev/null @@ -1,74 +0,0 @@ -tinyMCE.addI18n('zh.umbraco',{"underline_desc":"下划线 (Ctrl+U)", -"italic_desc":"斜体 (Ctrl+I)", -"bold_desc":"粗体 (Ctrl+B)", -dd:"定义描述", -dt:"定义条目", -samp:"示例代码", -code:"代码", -blockquote:"块引用", -h6:"标题 6", -h5:"标题 5", -h4:"标题 4", -h3:"标题 3", -h2:"标题 2", -h1:"标题 1", -pre:"预格式化", -address:"地址", -div:"DIV", -paragraph:"段落", -block:"格式化", -fontdefault:"字体", -"font_size":"字号", -"style_select":"样式", -"anchor_delta_height":"", -"anchor_delta_width":"", -"charmap_delta_height":"", -"charmap_delta_width":"", -"colorpicker_delta_height":"", -"colorpicker_delta_width":"", -"link_delta_height":"", -"link_delta_width":"", -"image_delta_height":"", -"image_delta_width":"", -"more_colors":"更多颜色…", -"toolbar_focus":"跳转至工具按钮 - Alt+Q, 跳转至编辑器 - Alt+Z, 跳转至元素路径 - Alt+X", -newdocument:"您确定清除所有内容吗?", -path:"路径", -"clipboard_msg":"复制/剪切/粘贴功能在Mozilla和Firefox中不可用,\n您想了解有关该问题的更多信息吗?", -"blockquote_desc":"块引用", -"help_desc":"帮助", -"newdocument_desc":"新建文档", -"image_props_desc":"图片属性", -"paste_desc":"粘贴 (Ctrl+V)", -"copy_desc":"复制 (Ctrl+C)", -"cut_desc":"剪切 (Ctrl+X)", -"anchor_desc":"插入/编辑锚点", -"visualaid_desc":"显示/隐藏参考线和不可见元素", -"charmap_desc":"插入特殊字符", -"backcolor_desc":"设置背景色", -"forecolor_desc":"文字颜色", -"custom1_desc":"自定义描述", -"removeformat_desc":"清除格式", -"hr_desc":"插入水平线", -"sup_desc":"上标", -"sub_desc":"下标", -"code_desc":"编辑代码", -"cleanup_desc":"净化代码", -"image_desc":"插入/编辑图片", -"unlink_desc":"取消链接", -"link_desc":"插入/编辑链接", -"redo_desc":"撤消 (Ctrl+Y)", -"undo_desc":"恢复 (Ctrl+Z)", -"indent_desc":"增加缩进", -"outdent_desc":"减少缩进", -"numlist_desc":"插入/移除编号列表", -"bullist_desc":"插入/移除非编号列表", -"justifyfull_desc":"两端对齐", -"justifyright_desc":"右对齐", -"justifycenter_desc":"居中", -"justifyleft_desc":"左对齐", -"striketrough_desc":"删除线", -"help_shortcut":"按 ALT+F10 调用工具栏. 按 ALT+0 寻求帮助", -"rich_text_area":"富文本编辑区", -"shortcuts_desc":"小提示", -toolbar:"工具栏"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/zh_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/zh_dlg.js deleted file mode 100644 index b2f25cb2ca..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/langs/zh_dlg.js +++ /dev/null @@ -1,55 +0,0 @@ -tinyMCE.addI18n('zh.umbraco_dlg', {"link_list":"链接列表", -"link_is_external":"您输入的好像是外部链接,是否需要在前面添加 http://?", -"link_is_email":"您输入的好像是邮箱地址,是否需要在前面添加mailto:?", -"link_titlefield":"标题", -"link_target_blank":"在新窗口中打开链接", -"link_target_same":"在该窗口打开链接", -"link_target":"目标", -"link_url":"链接URL", -"link_title":"插入/编辑链接", -"image_align_right":"右对齐", -"image_align_left":"左对齐", -"image_align_textbottom":"对齐文字底部", -"image_align_texttop":"对齐文字顶部", -"image_align_bottom":"对齐底部", -"image_align_middle":"对齐中间", -"image_align_top":"对齐顶部", -"image_align_baseline":"基线对齐", -"image_align":"对齐", -"image_hspace":"水平间距", -"image_vspace":"垂直间距", -"image_dimensions":"约束比例", -"image_alt":"图片描述", -"image_list":"图片列表", -"image_border":"边框", -"image_src":"图片URL", -"image_title":"插入/编辑图片", -"charmap_title":"插入字符", - "charmap_usage":"使用左右方向键选择", -"colorpicker_name":"名称:", -"colorpicker_color":"颜色:", -"colorpicker_named_title":"命名的颜色", -"colorpicker_named_tab":"命名的", -"colorpicker_palette_title":"调色板颜色", -"colorpicker_palette_tab":"调色板", -"colorpicker_picker_title":"颜色拾取器", -"colorpicker_picker_tab":"拾取器", -"colorpicker_title":"选择一种颜色", -"code_wordwrap":"自动换行", -"code_title":"查看源码", -"anchor_name":"名称", -"anchor_title":"插入/编辑锚点", -"about_loaded":"装载的插件", -"about_version":"版本", -"about_author":"作者", -"about_plugin":"插件", -"about_plugins":"插件集", -"about_license":"授权", -"about_help":"帮助", -"about_general":"关于", -"about_title":"关于TinyMCE", -"anchor_invalid":"请输入有效的锚点名", -"accessibility_help":"小提示", -"accessibility_usage_title":"一般用法", -"invalid_color_value":"错误的颜色值", -"":""}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/link.htm b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/link.htm deleted file mode 100644 index 90573b8a7a..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/link.htm +++ /dev/null @@ -1,58 +0,0 @@ - - - - {#umbraco_dlg.link_title} - - - - - - - - -
    - - -
    -
    - - - - - - - - - - - - - - - - - - - - - -
    - - - - -
     
    -
    -
    - -
    - - -
    -
    - - diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/shortcuts.htm b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/shortcuts.htm deleted file mode 100644 index 5992a201da..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/shortcuts.htm +++ /dev/null @@ -1,47 +0,0 @@ - - - - {#umbraco_dlg.accessibility_help} - - - - -

    {#umbraco_dlg.accessibility_usage_title}

    -

    Toolbars

    -

    Press ALT-F10 to move focus to the toolbars. Navigate through the buttons using the arrow keys. - Press enter to activate a button and return focus to the editor. - Press escape to return focus to the editor without performing any actions.

    - -

    Status Bar

    -

    To access the editor status bar, press ALT-F11. Use the left and right arrow keys to navigate between elements in the path. - Press enter or space to select an element. Press escape to return focus to the editor without changing the selection.

    - -

    Context Menu

    -

    Press shift-F10 to activate the context menu. Use the up and down arrow keys to move between menu items. To open sub-menus press the right arrow key. - To close submenus press the left arrow key. Press escape to close the context menu.

    - -

    Keyboard Shortcuts

    - - - - - - - - - - - - - - - - - - - - - -
    KeystrokeFunction
    Control-BBold
    Control-IItalic
    Control-ZUndo
    Control-YRedo
    - - diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/skins/umbraco/content.css b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/skins/umbraco/content.css deleted file mode 100644 index 4cc9238ea7..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/skins/umbraco/content.css +++ /dev/null @@ -1,34 +0,0 @@ -body, td, pre {color:#000; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; margin:8px;} -body {background:#FFF;} -body.mceForceColors {background:#FFF; color:#000;} -h1 {font-size: 2em} -h2 {font-size: 1.5em} -h3 {font-size: 1.17em} -h4 {font-size: 1em} -h5 {font-size: .83em} -h6 {font-size: .75em} -.mceItemTable, .mceItemTable td, .mceItemTable th, .mceItemTable caption, .mceItemVisualAid {border: 1px dashed #BBB;} -a.mceItemAnchor {width:12px; line-height:6px; overflow:hidden; padding-left:12px; background:url(img/items.gif) no-repeat bottom left;} -img.mceItemAnchor {width:12px; height:12px; background:url(img/items.gif) no-repeat;} -img {border:0;} -table {cursor:default} -table td, table th {cursor:text} -ins {border-bottom:1px solid green; text-decoration: none; color:green} -del {color:red; text-decoration:line-through} -cite {border-bottom:1px dashed blue} -acronym {border-bottom:1px dotted #CCC; cursor:help} -abbr, html\:abbr {border-bottom:1px dashed #CCC; cursor:help} - -/* IE */ -* html body { -scrollbar-3dlight-color:#F0F0EE; -scrollbar-arrow-color:#676662; -scrollbar-base-color:#F0F0EE; -scrollbar-darkshadow-color:#DDD; -scrollbar-face-color:#E0E0DD; -scrollbar-highlight-color:#F0F0EE; -scrollbar-shadow-color:#F0F0EE; -scrollbar-track-color:#F5F5F5; -} - -.umbMacroHolder {border: 3px dotted orange; padding: 5px;} \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/skins/umbraco/dialog.css b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/skins/umbraco/dialog.css deleted file mode 100644 index 60ec704440..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/skins/umbraco/dialog.css +++ /dev/null @@ -1,107 +0,0 @@ -/* Generic */ -body { -font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px; -background:#fff; -padding:0; -margin:8px 8px 0 10px; -} - -html {background:#fff;} -td {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;} -textarea {resize:none;outline:none;} -a:link, a:visited {color:blue;} -.nowrap {white-space: nowrap} - -/* Forms */ -fieldset {margin:0; padding:4px; border:1px solid #919B9C; font-family:Verdana, Arial; font-size:10px;} -legend {color:#2B6FB6; font-weight:bold;} -label.msg {display:none;} -label.invalid {color:#EE0000; display:inline;} -input.invalid {border:1px solid #EE0000;} -input.text, select, textarea {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;} -input.radio {border:1px none #000000; background:transparent; vertical-align:middle;} -input.checkbox {border:1px none #000000; background:transparent; vertical-align:middle;} -.input_noborder {border:0;} - -/* Buttons */ -#insert, #cancel, input.button, .updateButton { -border:0; margin:0; padding:0; -font-weight:bold; -width:94px; height:26px; -background:url(img/buttons.png) 0 -26px; -cursor:pointer; -padding-bottom:2px; -float:left; -} - -#insert {background:url(img/buttons.png) 0 -52px} -#cancel {background:url(img/buttons.png) 0 0; float:right} - -/* Browse */ -a.pickcolor, a.browse {text-decoration:none} -a.browse span {display:block; width:20px; height:18px; background:url(../../img/icons.gif) -860px 0; border:1px solid #FFF; margin-left:1px;} -.mceOldBoxModel a.browse span {width:22px; height:20px;} -a.browse:hover span {border:1px solid #0A246A; background-color:#B2BBD0;} -a.browse span.disabled {border:1px solid white; opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)} -a.browse:hover span.disabled {border:1px solid white; background-color:transparent;} -a.pickcolor span {display:block; width:20px; height:16px; background:url(../../img/icons.gif) -840px 0; margin-left:2px;} -.mceOldBoxModel a.pickcolor span {width:21px; height:17px;} -a.pickcolor:hover span {background-color:#B2BBD0;} -a.pickcolor:hover span.disabled {} - -/* Charmap */ -table.charmap {border:1px solid #AAA; text-align:center} -td.charmap, #charmap a {width:18px; height:18px; color:#000; border:1px solid #AAA; text-align:center; font-size:12px; vertical-align:middle; line-height: 18px;} -#charmap a {display:block; color:#000; text-decoration:none; border:0} -#charmap a:hover {background:#CCC;color:#2B6FB6} -#charmap #codeN {font-size:10px; font-family:Arial,Helvetica,sans-serif; text-align:center} -#charmap #codeV {font-size:40px; height:80px; border:1px solid #AAA; text-align:center} - -/* Source */ -.wordWrapCode {vertical-align:middle; border:1px none #000000; background:transparent;} -.mceActionPanel {margin-top:5px;} - -/* Tabs classes */ -.tabs {width:100%; height:18px; line-height:normal; background:url(img/tabs.gif) repeat-x 0 -72px;} -.tabs ul {margin:0; padding:0; list-style:none;} -.tabs li {float:left; background:url(img/tabs.gif) no-repeat 0 0; margin:0 2px 0 0; padding:0 0 0 10px; line-height:17px; height:18px; display:block;} -.tabs li.current {background:url(img/tabs.gif) no-repeat 0 -18px; margin-right:2px;} -.tabs span {float:left; display:block; background:url(img/tabs.gif) no-repeat right -36px; padding:0px 10px 0 0;} -.tabs .current span {background:url(img/tabs.gif) no-repeat right -54px;} -.tabs a {text-decoration:none; font-family:Verdana, Arial; font-size:10px;} -.tabs a:link, .tabs a:visited, .tabs a:hover {color:black;} - -/* Panels */ -.panel_wrapper div.panel {display:none;} -.panel_wrapper div.current {display:block; width:100%; height:300px; overflow:visible;} -.panel_wrapper {border:1px solid #919B9C; border-top:0px; padding:10px; padding-top:5px; clear:both; background:white;} - -/* Columns */ -.column {float:left;} -.properties {width:100%;} -.properties .column1 {} -.properties .column2 {text-align:left;} - -/* Titles */ -h1, h2, h3, h4 {color:#2B6FB6; margin:0; padding:0; padding-top:5px;} -h3 {font-size:14px;} -.title {font-size:12px; font-weight:bold; color:#2B6FB6;} - -/* Dialog specific */ -#link .panel_wrapper, #link div.current {height:125px;} -#image .panel_wrapper, #image div.current {height:200px;} -#plugintable thead {font-weight:bold; background:#DDD;} -#plugintable, #about #plugintable td {border:1px solid #919B9C;} -#plugintable {width:96%; margin-top:10px;} -#pluginscontainer {height:290px; overflow:auto;} -#colorpicker #preview {display:inline-block; padding-left:40px; height:14px; border:1px solid black; margin-left:5px; margin-right: 5px} -#colorpicker #previewblock {position: relative; top: -3px; padding-left:5px; padding-top: 0px; display:inline} -#colorpicker #preview_wrapper { text-align:center; padding-top:4px; white-space: nowrap} -#colorpicker #colors {float:left; border:1px solid gray; cursor:crosshair;} -#colorpicker #light {border:1px solid gray; margin-left:5px; float:left;width:15px; height:150px; cursor:crosshair;} -#colorpicker #light div {overflow:hidden;} -#colorpicker .panel_wrapper div.current {height:175px;} -#colorpicker #namedcolors {width:150px;} -#colorpicker #namedcolors a {display:block; float:left; width:10px; height:10px; margin:1px 1px 0 0; overflow:hidden;} -#colorpicker #colornamecontainer {margin-top:5px;} -#colorpicker #picker_panel fieldset {margin:auto;width:325px;} \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/skins/umbraco/img/buttons.png b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/skins/umbraco/img/buttons.png deleted file mode 100644 index 59b91ff29c..0000000000 Binary files a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/skins/umbraco/img/buttons.png and /dev/null differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/skins/umbraco/img/items.gif b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/skins/umbraco/img/items.gif deleted file mode 100644 index 2eafd7954e..0000000000 Binary files a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/skins/umbraco/img/items.gif and /dev/null differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/skins/umbraco/img/menu_arrow.gif b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/skins/umbraco/img/menu_arrow.gif deleted file mode 100644 index 85e31dfb2d..0000000000 Binary files a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/skins/umbraco/img/menu_arrow.gif and /dev/null differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/skins/umbraco/img/menu_check.gif b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/skins/umbraco/img/menu_check.gif deleted file mode 100644 index adfdddccd7..0000000000 Binary files a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/skins/umbraco/img/menu_check.gif and /dev/null differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/skins/umbraco/img/progress.gif b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/skins/umbraco/img/progress.gif deleted file mode 100644 index 5bb90fd6a4..0000000000 Binary files a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/skins/umbraco/img/progress.gif and /dev/null differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/skins/umbraco/img/tabs.gif b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/skins/umbraco/img/tabs.gif deleted file mode 100644 index ce4be63558..0000000000 Binary files a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/skins/umbraco/img/tabs.gif and /dev/null differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/skins/umbraco/ui.css b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/skins/umbraco/ui.css deleted file mode 100644 index 9fe58641e4..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/skins/umbraco/ui.css +++ /dev/null @@ -1,225 +0,0 @@ -/* Reset */ -.umbracoSkin table, .umbracoSkin tbody, .umbracoSkin a, .umbracoSkin img, .umbracoSkin tr, .umbracoSkin div, .umbracoSkin td, .umbracoSkin iframe, .umbracoSkin span, .umbracoSkin *, .umbracoSkin .mceText {border:0; margin:0; padding:0; background:transparent; white-space:nowrap; text-decoration:none; font-weight:normal; cursor:default; color:#000; vertical-align:baseline; width:auto; border-collapse:separate; text-align:left} -.umbracoSkin a:hover, .umbracoSkin a:link, .umbracoSkin a:visited, .umbracoSkin a:active {text-decoration:none; font-weight:normal; cursor:default; color:#000} -.umbracoSkin table td {vertical-align:middle; padding: 0; margin:0;} - -/* Containers */ -/*.umbracoSkin table {background:#F0F0EE} */ -.umbracoSkin iframe {display:block; background:#FFF} -.umbracoSkin .mceToolbar {height:26px} -.umbracoSkin .mceLeft {text-align:left} -.umbracoSkin .mceRight {text-align:right} - -/* External */ -.umbracoSkin .mceToolbarExternal {padding-left: 6px;} -.umbracoSkin .mceExternalToolbar {position:absolute; border:1px solid #CCC; border-bottom:0; display:none; } -.umbracoSkin .mceExternalToolbar td.mceToolbar {padding-right:13px;} -.umbracoSkin .mceExternalClose {position:absolute; top:3px; right:3px; width:7px; height:7px; background:url(../../img/icons.gif) -820px 0} - -/* Layout */ -.umbracoSkin table.mceLayout {border:0; border-left:1px solid #CCC; border-right:1px solid #CCC} -.umbracoSkin table.mceLayout tr.mceFirst td {border-top:1px solid #CCC} -.umbracoSkin table.mceLayout tr.mceLast td {border-bottom:1px solid #CCC} -.umbracoSkin table.mceToolbar, .umbracoSkin tr.mceFirst .mceToolbar tr td, .umbracoSkin tr.mceLast .mceToolbar tr td {border:0; margin:0; padding:0;} -.umbracoSkin td.mceToolbar {padding-top:1px; vertical-align:top} -.umbracoSkin .mceIframeContainer {border-top:1px solid #CCC; border-bottom:1px solid #CCC} -.umbracoSkin .mceStatusbar {font-family:'MS Sans Serif',sans-serif,Verdana,Arial; font-size:9pt; line-height:16px; overflow:visible; color:#000; display:block; height:20px} -.umbracoSkin .mceStatusbar div {float:left; margin:2px} -.umbracoSkin .mceStatusbar a.mceResize {display:block; float:right; background:url(../../img/icons.gif) -800px 0; width:20px; height:20px; cursor:se-resize} -.umbracoSkin .mceStatusbar a:hover {text-decoration:underline} -.umbracoSkin table.mceToolbar {margin-left:3px} -.umbracoSkin span.mceIcon, .umbracoSkin img.mceIcon {display:block; width:20px; height:20px} -.umbracoSkin .mceIcon {background:url(../../img/icons.gif) no-repeat 20px 20px} -.umbracoSkin td.mceCenter {text-align:center;} -.umbracoSkin td.mceCenter table {margin:0 auto; text-align:left;} -.umbracoSkin td.mceRight table {margin:0 0 0 auto;} - -/* Button */ -.umbracoSkin .mceButton {display:block; width:20px; height:20px; margin:2px; - } - -.umbracoSkin a.mceButtonEnabled:hover {margin: 1px; - background: #EAEAEA; - border: 1px solid #CAC9C9 !Important;} - -.umbracoSkin a.mceButtonActive, .umbracoSkin a.mceButtonSelected {cursor: hand; - margin: 1px; - background: #D5EFFC; - border: 1px solid #99DEFD !Important;} - -.umbracoSkin .mceButtonDisabled .mceIcon {opacity:0.3; filter:alpha(opacity=30)} -.umbracoSkin .mceButtonLabeled {width:auto} -.umbracoSkin .mceButtonLabeled span.mceIcon {float:left} -.umbracoSkin span.mceButtonLabel {display:block; font-size:10px; padding:4px 6px 0 22px; font-family:Tahoma,Verdana,Arial,Helvetica} -.umbracoSkin .mceButtonDisabled .mceButtonLabel {color:#888} - -/* Separator */ -.umbracoSkin .mceSeparator {display:block; background:url(../../img/icons.gif) -180px 0; width:2px; height:20px; margin:2px 4px 0 4px} - -/* ListBox */ -.umbracoSkin .mceListBox {direction:ltr} -.umbracoSkin .mceListBox, .umbracoSkin .mceListBox a {display:block} -.umbracoSkin .mceListBox .mceText {padding-left:4px; width:70px; text-align:left; border:1px solid #CCC; border-right:0; background:#FFF; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; height:20px; line-height:20px; overflow:hidden} -.umbracoSkin .mceListBox .mceOpen {width:9px; height:20px; background:url(../../img/icons.gif) -741px 0; margin-right:2px; border:1px solid #CCC;} -.umbracoSkin table.mceListBoxEnabled:hover .mceText, .umbracoSkin .mceListBoxHover .mceText, .umbracoSkin .mceListBoxSelected .mceText {border:1px solid #A2ABC0; border-right:0; background:#FFF} -.umbracoSkin table.mceListBoxEnabled:hover .mceOpen, .umbracoSkin .mceListBoxHover .mceOpen, .umbracoSkin .mceListBoxSelected .mceOpen {background-color:#FFF; border:1px solid #A2ABC0} -.umbracoSkin .mceListBoxDisabled a.mceText {color:gray; background-color:transparent;} -.umbracoSkin .mceListBoxMenu {overflow:auto; overflow-x:hidden} -.umbracoSkin .mceOldBoxModel .mceListBox .mceText {height:22px} -.umbracoSkin .mceOldBoxModel .mceListBox .mceOpen {width:11px; height:22px;} -.umbracoSkin select.mceNativeListBox {font-family:'MS Sans Serif',sans-serif,Verdana,Arial; font-size:7pt; background:#F0F0EE; border:1px solid gray; margin-right:2px;} - -/* SplitButton */ -.umbracoSkin .mceSplitButton {width:32px; height:20px; direction:ltr} -.umbracoSkin .mceSplitButton a, .umbracoSkin .mceSplitButton span {height:20px; display:block} -.umbracoSkin .mceSplitButton a.mceAction {width:20px; border:1px solid #F0F0EE; border-right:0;} -.umbracoSkin .mceSplitButton span.mceAction {width:20px; background:url(../../img/icons.gif) 20px 20px;} -.umbracoSkin .mceSplitButton a.mceOpen {width:9px; border:1px solid #F0F0EE;} -.umbracoSkin .mceSplitButton span.mceOpen {width:9px; background:url(../../img/icons.gif) -741px 0;} -.umbracoSkin table.mceSplitButtonEnabled:hover a.mceAction, .umbracoSkin .mceSplitButtonHover a.mceAction, .umbracoSkin .mceSplitButtonSelected a.mceAction {border:1px solid #0A246A; border-right:0; background-color:#B2BBD0} -.umbracoSkin table.mceSplitButtonEnabled:hover a.mceOpen, .umbracoSkin .mceSplitButtonHover a.mceOpen, .umbracoSkin .mceSplitButtonSelected a.mceOpen {border:1px solid #0A246A;} -.umbracoSkin table.mceSplitButtonEnabled:hover span.mceOpen, .umbracoSkin .mceSplitButtonHover span.mceOpen, .umbracoSkin .mceSplitButtonSelected span.mceOpen {background-color:#B2BBD0} -.umbracoSkin .mceSplitButtonDisabled .mceAction, .umbracoSkin .mceSplitButtonDisabled span.mceOpen {opacity:0.3; filter:alpha(opacity=30)} -.umbracoSkin .mceSplitButtonActive a.mceAction {border:1px solid #0A246A; background-color:#C2CBE0} -.umbracoSkin .mceSplitButtonActive a.mceOpen {border-left:0;} - -/* ColorSplitButton */ -.umbracoSkin div.mceColorSplitMenu table {background:#FFF; border:1px solid gray} -.umbracoSkin .mceColorSplitMenu td {padding:2px} -.umbracoSkin .mceColorSplitMenu a {display:block; width:9px; height:9px; overflow:hidden; border:1px solid #808080} -.umbracoSkin .mceColorSplitMenu td.mceMoreColors {padding:1px 3px 1px 1px} -.umbracoSkin .mceColorSplitMenu a.mceMoreColors {width:100%; height:auto; text-align:center; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; line-height:20px; border:1px solid #FFF} -.umbracoSkin .mceColorSplitMenu a.mceMoreColors:hover {border:1px solid #0A246A; background-color:#B6BDD2} -.umbracoSkin a.mceMoreColors:hover {border:1px solid #0A246A} -.umbracoSkin .mceColorPreview {margin-left:2px; width:16px; height:4px; overflow:hidden; background:#9a9b9a} -.umbracoSkin .mce_forecolor span.mceAction, .umbracoSkin .mce_backcolor span.mceAction {overflow:hidden; height:16px} - -/* Menu */ -.umbracoSkin .mceMenu {position:absolute; left:0; top:0; z-index:1000; border:1px solid #D4D0C8} -.umbracoSkin .mceNoIcons span.mceIcon {width:0;} -.umbracoSkin .mceNoIcons a .mceText {padding-left:10px} -.umbracoSkin .mceMenu table {background:#FFF} -.umbracoSkin .mceMenu a, .umbracoSkin .mceMenu span, .umbracoSkin .mceMenu {display:block} -.umbracoSkin .mceMenu td {height:20px} -.umbracoSkin .mceMenu a {position:relative;padding:3px 0 4px 0} -.umbracoSkin .mceMenu .mceText {position:relative; display:block; font-family:Tahoma,Verdana,Arial,Helvetica; color:#000; cursor:default; margin:0; padding:0 25px 0 25px; display:block} -.umbracoSkin .mceMenu span.mceText, .umbracoSkin .mceMenu .mcePreview {font-size:11px} -.umbracoSkin .mceMenu pre.mceText {font-family:Monospace} -.umbracoSkin .mceMenu .mceIcon {position:absolute; top:0; left:0; width:22px;} -.umbracoSkin .mceMenu .mceMenuItemEnabled a:hover, .umbracoSkin .mceMenu .mceMenuItemActive {background-color:#dbecf3} -.umbracoSkin td.mceMenuItemSeparator {background:#DDD; height:1px} -.umbracoSkin .mceMenuItemTitle a {border:0; background:#EEE; border-bottom:1px solid #DDD} -.umbracoSkin .mceMenuItemTitle span.mceText {color:#000; font-weight:bold; padding-left:4px} -.umbracoSkin .mceMenuItemDisabled .mceText {color:#888} -.umbracoSkin .mceMenuItemSelected .mceIcon {background:url(img/menu_check.gif)} -.umbracoSkin .mceNoIcons .mceMenuItemSelected a {background:url(img/menu_arrow.gif) no-repeat -6px center} -.umbracoSkin .mceMenu span.mceMenuLine {display:none} -.umbracoSkin .mceMenuItemSub a {background:url(img/menu_arrow.gif) no-repeat top right;} - -/* Progress,Resize */ -.umbracoSkin .mceBlocker {position:absolute; left:0; top:0; z-index:1000; opacity:0.5; filter:alpha(opacity=50); background:#FFF} -.umbracoSkin .mceProgress {position:absolute; left:0; top:0; z-index:1001; background:url(img/progress.gif) no-repeat; width:32px; height:32px; margin:-16px 0 0 -16px} -.umbracoSkin .mcePlaceHolder {border:1px dotted gray} - -/* Formats */ -.umbracoSkin .mce_formatPreview a {font-size:10px} -.umbracoSkin .mce_p span.mceText {} -.umbracoSkin .mce_address span.mceText {font-style:italic} -.umbracoSkin .mce_pre span.mceText {font-family:monospace} -.umbracoSkin .mce_h1 span.mceText {font-weight:bolder; font-size: 2em} -.umbracoSkin .mce_h2 span.mceText {font-weight:bolder; font-size: 1.5em} -.umbracoSkin .mce_h3 span.mceText {font-weight:bolder; font-size: 1.17em} -.umbracoSkin .mce_h4 span.mceText {font-weight:bolder; font-size: 1em} -.umbracoSkin .mce_h5 span.mceText {font-weight:bolder; font-size: .83em} -.umbracoSkin .mce_h6 span.mceText {font-weight:bolder; font-size: .75em} - -/* Theme */ -.umbracoSkin span.mce_bold {background-position:0 0} -.umbracoSkin span.mce_italic {background-position:-60px 0} -.umbracoSkin span.mce_underline {background-position:-140px 0} -.umbracoSkin span.mce_strikethrough {background-position:-120px 0} -.umbracoSkin span.mce_undo {background-position:-160px 0} -.umbracoSkin span.mce_redo {background-position:-100px 0} -.umbracoSkin span.mce_cleanup {background-position:-40px 0} -.umbracoSkin span.mce_bullist {background-position:-20px 0} -.umbracoSkin span.mce_numlist {background-position:-80px 0} -.umbracoSkin span.mce_justifyleft {background-position:-460px 0} -.umbracoSkin span.mce_justifyright {background-position:-480px 0} -.umbracoSkin span.mce_justifycenter {background-position:-420px 0} -.umbracoSkin span.mce_justifyfull {background-position:-440px 0} -.umbracoSkin span.mce_anchor {background-position:-200px 0} -.umbracoSkin span.mce_indent {background-position:-400px 0} -.umbracoSkin span.mce_outdent {background-position:-540px 0} -.umbracoSkin span.mce_link {background-position:-500px 0} -.umbracoSkin span.mce_unlink {background-position:-640px 0} -.umbracoSkin span.mce_sub {background-position:-600px 0} -.umbracoSkin span.mce_sup {background-position:-620px 0} -.umbracoSkin span.mce_removeformat {background-position:-580px 0} -.umbracoSkin span.mce_newdocument {background-position:-520px 0} -.umbracoSkin span.mce_image {background-position:-380px 0} -.umbracoSkin span.mce_help {background-position:-340px 0} -.umbracoSkin span.mce_code {background-position:-260px 0} -.umbracoSkin span.mce_hr {background-position:-360px 0} -.umbracoSkin span.mce_visualaid {background-position:-660px 0} -.umbracoSkin span.mce_charmap {background-position:-240px 0} -.umbracoSkin span.mce_paste {background-position:-560px 0} -.umbracoSkin span.mce_copy {background-position:-700px 0} -.umbracoSkin span.mce_cut {background-position:-680px 0} -.umbracoSkin span.mce_blockquote {background-position:-220px 0} -.umbracoSkin .mce_forecolor span.mceAction {background-position:-720px 0} -.umbracoSkin .mce_backcolor span.mceAction {background-position:-760px 0} -.umbracoSkin span.mce_forecolorpicker {background-position:-720px 0} -.umbracoSkin span.mce_backcolorpicker {background-position:-760px 0} - -/* Plugins */ -.umbracoSkin span.mce_advhr {background-position:-0px -20px} -.umbracoSkin span.mce_ltr {background-position:-20px -20px} -.umbracoSkin span.mce_rtl {background-position:-40px -20px} -.umbracoSkin span.mce_emotions {background-position:-60px -20px} -.umbracoSkin span.mce_fullpage {background-position:-80px -20px} -.umbracoSkin span.mce_fullscreen {background-position:-100px -20px} -.umbracoSkin span.mce_iespell {background-position:-120px -20px} -.umbracoSkin span.mce_insertdate {background-position:-140px -20px} -.umbracoSkin span.mce_inserttime {background-position:-160px -20px} -.umbracoSkin span.mce_absolute {background-position:-180px -20px} -.umbracoSkin span.mce_backward {background-position:-200px -20px} -.umbracoSkin span.mce_forward {background-position:-220px -20px} -.umbracoSkin span.mce_insert_layer {background-position:-240px -20px} -.umbracoSkin span.mce_insertlayer {background-position:-260px -20px} -.umbracoSkin span.mce_movebackward {background-position:-280px -20px} -.umbracoSkin span.mce_moveforward {background-position:-300px -20px} -.umbracoSkin span.mce_media {background-position:-320px -20px} -.umbracoSkin span.mce_nonbreaking {background-position:-340px -20px} -.umbracoSkin span.mce_pastetext {background-position:-360px -20px} -.umbracoSkin span.mce_pasteword {background-position:-560px 0} -.umbracoSkin span.mce_selectall {background-position:-400px -20px} -.umbracoSkin span.mce_preview {background-position:-420px -20px} -.umbracoSkin span.mce_print {background-position:-440px -20px} -.umbracoSkin span.mce_cancel {background-position:-460px -20px} -.umbracoSkin span.mce_save {background-position:-480px -20px} -.umbracoSkin span.mce_replace {background-position:-500px -20px} -.umbracoSkin span.mce_search {background-position:-520px -20px} -.umbracoSkin span.mce_styleprops {background-position:-560px -20px} -.umbracoSkin span.mce_table {background-position:-580px -20px} -.umbracoSkin span.mce_cell_props {background-position:-600px -20px} -.umbracoSkin span.mce_delete_table {background-position:-620px -20px} -.umbracoSkin span.mce_delete_col {background-position:-640px -20px} -.umbracoSkin span.mce_delete_row {background-position:-660px -20px} -.umbracoSkin span.mce_col_after {background-position:-680px -20px} -.umbracoSkin span.mce_col_before {background-position:-700px -20px} -.umbracoSkin span.mce_row_after {background-position:-720px -20px} -.umbracoSkin span.mce_row_before {background-position:-740px -20px} -.umbracoSkin span.mce_merge_cells {background-position:-760px -20px} -.umbracoSkin span.mce_table_props {background-position:-980px -20px} -.umbracoSkin span.mce_row_props {background-position:-780px -20px} -.umbracoSkin span.mce_split_cells {background-position:-800px -20px} -.umbracoSkin span.mce_template {background-position:-820px -20px} -.umbracoSkin span.mce_visualchars {background-position:-840px -20px} -.umbracoSkin span.mce_abbr {background-position:-860px -20px} -.umbracoSkin span.mce_acronym {background-position:-880px -20px} -.umbracoSkin span.mce_attribs {background-position:-900px -20px} -.umbracoSkin span.mce_cite {background-position:-920px -20px} -.umbracoSkin span.mce_del {background-position:-940px -20px} -.umbracoSkin span.mce_ins {background-position:-960px -20px} -.umbracoSkin span.mce_pagebreak {background-position:0 -40px} -.umbracoSkin .mce_spellchecker span.mceAction {background-position:-540px -20px} \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/source_editor.htm b/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/source_editor.htm deleted file mode 100644 index 461445413b..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/themes/umbraco/source_editor.htm +++ /dev/null @@ -1,27 +0,0 @@ - - - - {#umbraco_dlg.code_title} - - - - - -
    - - - - -
    - - - -
    - - -
    -
    - - diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/tiny_mce.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/tiny_mce.js deleted file mode 100644 index 208dfcc070..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/tiny_mce.js +++ /dev/null @@ -1 +0,0 @@ -(function(e){var a=/^\s*|\s*$/g,b,d="B".replace(/A(.)|B/,"$1")==="$1";var c={majorVersion:"3",minorVersion:"5.10",releaseDate:"2013-10-24",_init:function(){var s=this,q=document,o=navigator,g=o.userAgent,m,f,l,k,j,r;s.isIE11=g.indexOf("Trident/")!=-1&&(g.indexOf("rv:")!=-1||o.appName.indexOf("Netscape")!=-1);s.isOpera=e.opera&&opera.buildNumber;s.isWebKit=/WebKit/.test(g);s.isIE=!s.isWebKit&&!s.isOpera&&(/MSIE/gi).test(g)&&(/Explorer/gi).test(o.appName)||s.isIE11;s.isIE6=s.isIE&&/MSIE [56]/.test(g);s.isIE7=s.isIE&&/MSIE [7]/.test(g);s.isIE8=s.isIE&&/MSIE [8]/.test(g);s.isIE9=s.isIE&&/MSIE [9]/.test(g);s.isGecko=!s.isWebKit&&!s.isIE11&&/Gecko/.test(g);s.isMac=g.indexOf("Mac")!=-1;s.isAir=/adobeair/i.test(g);s.isIDevice=/(iPad|iPhone)/.test(g);s.isIOS5=s.isIDevice&&g.match(/AppleWebKit\/(\d*)/)[1]>=534;if(e.tinyMCEPreInit){s.suffix=tinyMCEPreInit.suffix;s.baseURL=tinyMCEPreInit.base;s.query=tinyMCEPreInit.query;return}s.suffix="";f=q.getElementsByTagName("base");for(m=0;m0?b:[f.scope]);if(e===false){break}}a.inDispatch=false;return e}});(function(){var a=tinymce.each;tinymce.create("tinymce.util.URI",{URI:function(e,g){var f=this,i,d,c,h;e=tinymce.trim(e);g=f.settings=g||{};if(/^([\w\-]+):([^\/]{2})/i.test(e)||/^\s*#/.test(e)){f.source=e;return}if(e.indexOf("/")===0&&e.indexOf("//")!==0){e=(g.base_uri?g.base_uri.protocol||"http":"http")+"://mce_host"+e}if(!/^[\w\-]*:?\/\//.test(e)){h=g.base_uri?g.base_uri.path:new tinymce.util.URI(location.href).directory;e=((g.base_uri&&g.base_uri.protocol)||"http")+"://mce_host"+f.toAbsPath(h,e)}e=e.replace(/@@/g,"(mce_at)");e=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(e);a(["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],function(b,j){var k=e[j];if(k){k=k.replace(/\(mce_at\)/g,"@@")}f[b]=k});c=g.base_uri;if(c){if(!f.protocol){f.protocol=c.protocol}if(!f.userInfo){f.userInfo=c.userInfo}if(!f.port&&f.host==="mce_host"){f.port=c.port}if(!f.host||f.host==="mce_host"){f.host=c.host}f.source=""}},setPath:function(c){var b=this;c=/^(.*?)\/?(\w+)?$/.exec(c);b.path=c[0];b.directory=c[1];b.file=c[2];b.source="";b.getURI()},toRelative:function(b){var d=this,f;if(b==="./"){return b}b=new tinymce.util.URI(b,{base_uri:d});if((b.host!="mce_host"&&d.host!=b.host&&b.host)||d.port!=b.port||d.protocol!=b.protocol){return b.getURI()}var c=d.getURI(),e=b.getURI();if(c==e||(c.charAt(c.length-1)=="/"&&c.substr(0,c.length-1)==e)){return c}f=d.toRelPath(d.path,b.path);if(b.query){f+="?"+b.query}if(b.anchor){f+="#"+b.anchor}return f},toAbsolute:function(b,c){b=new tinymce.util.URI(b,{base_uri:this});return b.getURI(this.host==b.host&&this.protocol==b.protocol?c:0)},toRelPath:function(g,h){var c,f=0,d="",e,b;g=g.substring(0,g.lastIndexOf("/"));g=g.split("/");c=h.split("/");if(g.length>=c.length){for(e=0,b=g.length;e=c.length||g[e]!=c[e]){f=e+1;break}}}if(g.length=g.length||g[e]!=c[e]){f=e+1;break}}}if(f===1){return h}for(e=0,b=g.length-(f-1);e=0;c--){if(f[c].length===0||f[c]==="."){continue}if(f[c]===".."){b++;continue}if(b>0){b--;continue}h.push(f[c])}c=e.length-b;if(c<=0){g=h.reverse().join("/")}else{g=e.slice(0,c).join("/")+"/"+h.reverse().join("/")}if(g.indexOf("/")!==0){g="/"+g}if(d&&g.lastIndexOf("/")!==g.length-1){g+=d}return g},getURI:function(d){var c,b=this;if(!b.source||d){c="";if(!d){if(b.protocol){c+=b.protocol+"://"}if(b.userInfo){c+=b.userInfo+"@"}if(b.host){c+=b.host}if(b.port){c+=":"+b.port}}if(b.path){c+=b.path}if(b.query){c+="?"+b.query}if(b.anchor){c+="#"+b.anchor}b.source=c}return b.source}})})();(function(){var a=tinymce.each;tinymce.create("static tinymce.util.Cookie",{getHash:function(d){var b=this.get(d),c;if(b){a(b.split("&"),function(e){e=e.split("=");c=c||{};c[unescape(e[0])]=unescape(e[1])})}return c},setHash:function(j,b,g,f,i,c){var h="";a(b,function(e,d){h+=(!h?"":"&")+escape(d)+"="+escape(e)});this.set(j,h,g,f,i,c)},get:function(i){var h=document.cookie,g,f=i+"=",d;if(!h){return}d=h.indexOf("; "+f);if(d==-1){d=h.indexOf(f);if(d!==0){return null}}else{d+=2}g=h.indexOf(";",d);if(g==-1){g=h.length}return unescape(h.substring(d+f.length,g))},set:function(i,b,g,f,h,c){document.cookie=i+"="+escape(b)+((g)?"; expires="+g.toGMTString():"")+((f)?"; path="+escape(f):"")+((h)?"; domain="+h:"")+((c)?"; secure":"")},remove:function(c,e,d){var b=new Date();b.setTime(b.getTime()-1000);this.set(c,"",b,e,d)}})})();(function(){function serialize(o,quote){var i,v,t,name;quote=quote||'"';if(o==null){return"null"}t=typeof o;if(t=="string"){v="\bb\tt\nn\ff\rr\"\"''\\\\";return quote+o.replace(/([\u0080-\uFFFF\x00-\x1f\"\'\\])/g,function(a,b){if(quote==='"'&&a==="'"){return a}i=v.indexOf(b);if(i+1){return"\\"+v.charAt(i+1)}a=b.charCodeAt().toString(16);return"\\u"+"0000".substring(a.length)+a})+quote}if(t=="object"){if(o.hasOwnProperty&&Object.prototype.toString.call(o)==="[object Array]"){for(i=0,v="[";i0?",":"")+serialize(o[i],quote)}return v+"]"}v="{";for(name in o){if(o.hasOwnProperty(name)){v+=typeof o[name]!="function"?(v.length>1?","+quote:quote)+name+quote+":"+serialize(o[name],quote):""}}return v+"}"}return""+o}tinymce.util.JSON={serialize:serialize,parse:function(s){try{return eval("("+s+")")}catch(ex){}}}})();tinymce.create("static tinymce.util.XHR",{send:function(g){var a,e,b=window,h=0;function f(){if(!g.async||a.readyState==4||h++>10000){if(g.success&&h<10000&&a.status==200){g.success.call(g.success_scope,""+a.responseText,a,g)}else{if(g.error){g.error.call(g.error_scope,h>10000?"TIMED_OUT":"GENERAL",a,g)}}a=null}else{b.setTimeout(f,10)}}g.scope=g.scope||this;g.success_scope=g.success_scope||g.scope;g.error_scope=g.error_scope||g.scope;g.async=g.async===false?false:true;g.data=g.data||"";function d(i){a=0;try{a=new ActiveXObject(i)}catch(c){}return a}a=b.XMLHttpRequest?new XMLHttpRequest():d("Microsoft.XMLHTTP")||d("Msxml2.XMLHTTP");if(a){if(a.overrideMimeType){a.overrideMimeType(g.content_type)}a.open(g.type||(g.data?"POST":"GET"),g.url,g.async);if(g.content_type){a.setRequestHeader("Content-Type",g.content_type)}a.setRequestHeader("X-Requested-With","XMLHttpRequest");a.send(g.data);if(!g.async){return f()}e=b.setTimeout(f,10)}}});(function(){var c=tinymce.extend,b=tinymce.util.JSON,a=tinymce.util.XHR;tinymce.create("tinymce.util.JSONRequest",{JSONRequest:function(d){this.settings=c({},d);this.count=0},send:function(f){var e=f.error,d=f.success;f=c(this.settings,f);f.success=function(h,g){h=b.parse(h);if(typeof(h)=="undefined"){h={error:"JSON Parse error."}}if(h.error){e.call(f.error_scope||f.scope,h.error,g)}else{d.call(f.success_scope||f.scope,h.result)}};f.error=function(h,g){if(e){e.call(f.error_scope||f.scope,h,g)}};f.data=b.serialize({id:f.id||"c"+(this.count++),method:f.method,params:f.params});f.content_type="application/json";a.send(f)},"static":{sendRPC:function(d){return new tinymce.util.JSONRequest().send(d)}}})}());(function(a){a.VK={BACKSPACE:8,DELETE:46,DOWN:40,ENTER:13,LEFT:37,RIGHT:39,SPACEBAR:32,TAB:9,UP:38,modifierPressed:function(b){return b.shiftKey||b.ctrlKey||b.altKey},metaKeyPressed:function(b){return a.isMac?b.metaKey:b.ctrlKey&&!b.altKey}}})(tinymce);tinymce.util.Quirks=function(a){var j=tinymce.VK,f=j.BACKSPACE,k=j.DELETE,e=a.dom,m=a.selection,I=a.settings,x=a.parser,p=a.serializer,F=tinymce.each;function B(O,N){try{a.getDoc().execCommand(O,false,N)}catch(M){}}function o(){var M=a.getDoc().documentMode;return M?M:6}function A(M){return M.isDefaultPrevented()}function K(){function M(S){var O,Q,N,T,P,R,U;function V(){if(P.nodeType==3){if(S&&R==P.length){return true}if(!S&&R===0){return true}}}O=m.getRng();var W=[O.startContainer,O.startOffset,O.endContainer,O.endOffset];if(!O.collapsed){S=true}P=O[(S?"start":"end")+"Container"];R=O[(S?"start":"end")+"Offset"];if(P.nodeType==3){Q=e.getParent(O.startContainer,e.isBlock);if(S){Q=e.getNext(Q,e.isBlock)}if(Q&&(V()||!O.collapsed)){N=e.create("em",{id:"__mceDel"});F(tinymce.grep(Q.childNodes),function(X){N.appendChild(X)});Q.appendChild(N)}}O=e.createRng();O.setStart(W[0],W[1]);O.setEnd(W[2],W[3]);m.setRng(O);a.getDoc().execCommand(S?"ForwardDelete":"Delete",false,null);if(N){T=m.getBookmark();while(U=e.get("__mceDel")){e.remove(U,true)}m.moveToBookmark(T)}}a.onKeyDown.add(function(N,P){var O;O=P.keyCode==k;if(!A(P)&&(O||P.keyCode==f)&&!j.modifierPressed(P)){P.preventDefault();M(O)}});a.addCommand("Delete",function(){M()})}function r(){function M(P){var O=e.create("body");var Q=P.cloneContents();O.appendChild(Q);return m.serializer.serialize(O,{format:"html"})}function N(O){var Q=M(O);var R=e.createRng();R.selectNode(a.getBody());var P=M(R);return Q===P}a.onKeyDown.add(function(P,R){var Q=R.keyCode,O;if(!A(R)&&(Q==k||Q==f)){O=P.selection.isCollapsed();if(O&&!e.isEmpty(P.getBody())){return}if(tinymce.isIE&&!O){return}if(!O&&!N(P.selection.getRng())){return}P.setContent("");P.selection.setCursorLocation(P.getBody(),0);P.nodeChanged()}})}function J(){a.onKeyDown.add(function(M,N){if(!A(N)&&N.keyCode==65&&j.metaKeyPressed(N)){N.preventDefault();M.execCommand("SelectAll")}})}function L(){if(!a.settings.content_editable){e.bind(a.getDoc(),"focusin",function(M){m.setRng(m.getRng())});e.bind(a.getDoc(),"mousedown",function(M){if(M.target==a.getDoc().documentElement){a.getWin().focus();m.setRng(m.getRng())}})}}function C(){a.onKeyDown.add(function(M,P){if(!A(P)&&P.keyCode===f){if(m.isCollapsed()&&m.getRng(true).startOffset===0){var O=m.getNode();var N=O.previousSibling;if(N&&N.nodeName&&N.nodeName.toLowerCase()==="hr"){e.remove(N);tinymce.dom.Event.cancel(P)}}}})}function z(){if(!Range.prototype.getClientRects){a.onMouseDown.add(function(N,O){if(!A(O)&&O.target.nodeName==="HTML"){var M=N.getBody();M.blur();setTimeout(function(){M.focus()},0)}})}}function h(){a.onClick.add(function(M,N){N=N.target;if(/^(IMG|HR)$/.test(N.nodeName)){m.getSel().setBaseAndExtent(N,0,N,1)}if(N.nodeName=="A"&&e.hasClass(N,"mceItemAnchor")){m.select(N)}M.nodeChanged()})}function c(){function N(){var P=e.getAttribs(m.getStart().cloneNode(false));return function(){var Q=m.getStart();if(Q!==a.getBody()){e.setAttrib(Q,"style",null);F(P,function(R){Q.setAttributeNode(R.cloneNode(true))})}}}function M(){return !m.isCollapsed()&&e.getParent(m.getStart(),e.isBlock)!=e.getParent(m.getEnd(),e.isBlock)}function O(P,Q){Q.preventDefault();return false}a.onKeyPress.add(function(P,R){var Q;if(!A(R)&&(R.keyCode==8||R.keyCode==46)&&M()){Q=N();P.getDoc().execCommand("delete",false,null);Q();R.preventDefault();return false}});e.bind(a.getDoc(),"cut",function(Q){var P;if(!A(Q)&&M()){P=N();a.onKeyUp.addToTop(O);setTimeout(function(){P();a.onKeyUp.remove(O)},0)}})}function b(){var N,M;e.bind(a.getDoc(),"selectionchange",function(){if(M){clearTimeout(M);M=0}M=window.setTimeout(function(){var O=m.getRng();if(!N||!tinymce.dom.RangeUtils.compareRanges(O,N)){a.nodeChanged();N=O}},50)})}function y(){document.body.setAttribute("role","application")}function u(){a.onKeyDown.add(function(M,O){if(!A(O)&&O.keyCode===f){if(m.isCollapsed()&&m.getRng(true).startOffset===0){var N=m.getNode().previousSibling;if(N&&N.nodeName&&N.nodeName.toLowerCase()==="table"){return tinymce.dom.Event.cancel(O)}}}})}function D(){if(o()>7){return}B("RespectVisibilityInDesign",true);a.contentStyles.push(".mceHideBrInPre pre br {display: none}");e.addClass(a.getBody(),"mceHideBrInPre");x.addNodeFilter("pre",function(M,O){var P=M.length,R,N,S,Q;while(P--){R=M[P].getAll("br");N=R.length;while(N--){S=R[N];Q=S.prev;if(Q&&Q.type===3&&Q.value.charAt(Q.value-1)!="\n"){Q.value+="\n"}else{S.parent.insert(new tinymce.html.Node("#text",3),S,true).value="\n"}}}});p.addNodeFilter("pre",function(M,O){var P=M.length,R,N,S,Q;while(P--){R=M[P].getAll("br");N=R.length;while(N--){S=R[N];Q=S.prev;if(Q&&Q.type==3){Q.value=Q.value.replace(/\r?\n$/,"")}}}})}function g(){e.bind(a.getBody(),"mouseup",function(O){var N,M=m.getNode();if(M.nodeName=="IMG"){if(N=e.getStyle(M,"width")){e.setAttrib(M,"width",N.replace(/[^0-9%]+/g,""));e.setStyle(M,"width","")}if(N=e.getStyle(M,"height")){e.setAttrib(M,"height",N.replace(/[^0-9%]+/g,""));e.setStyle(M,"height","")}}})}function d(){a.onKeyDown.add(function(S,T){var R,M,N,P,Q,U,O;R=T.keyCode==k;if(!A(T)&&(R||T.keyCode==f)&&!j.modifierPressed(T)){M=m.getRng();N=M.startContainer;P=M.startOffset;O=M.collapsed;if(N.nodeType==3&&N.nodeValue.length>0&&((P===0&&!O)||(O&&P===(R?0:1)))){U=N.previousSibling;if(U&&U.nodeName=="IMG"){return}nonEmptyElements=S.schema.getNonEmptyElements();T.preventDefault();Q=e.create("br",{id:"__tmp"});N.parentNode.insertBefore(Q,N);S.getDoc().execCommand(R?"ForwardDelete":"Delete",false,null);N=m.getRng().startContainer;U=N.previousSibling;if(U&&U.nodeType==1&&!e.isBlock(U)&&e.isEmpty(U)&&!nonEmptyElements[U.nodeName.toLowerCase()]){e.remove(U)}e.remove("__tmp")}}})}function H(){a.onKeyDown.add(function(Q,R){var O,N,S,M,P;if(A(R)||R.keyCode!=j.BACKSPACE){return}O=m.getRng();N=O.startContainer;S=O.startOffset;M=e.getRoot();P=N;if(!O.collapsed||S!==0){return}while(P&&P.parentNode&&P.parentNode.firstChild==P&&P.parentNode!=M){P=P.parentNode}if(P.tagName==="BLOCKQUOTE"){Q.formatter.toggle("blockquote",null,P);O=e.createRng();O.setStart(N,0);O.setEnd(N,0);m.setRng(O)}})}function G(){function M(){a._refreshContentEditable();B("StyleWithCSS",false);B("enableInlineTableEditing",false);if(!I.object_resizing){B("enableObjectResizing",false)}}if(!I.readonly){a.onBeforeExecCommand.add(M);a.onMouseDown.add(M)}}function t(){function M(N,O){F(e.select("a"),function(R){var P=R.parentNode,Q=e.getRoot();if(P.lastChild===R){while(P&&!e.isBlock(P)){if(P.parentNode.lastChild!==P||P===Q){return}P=P.parentNode}e.add(P,"br",{"data-mce-bogus":1})}})}a.onExecCommand.add(function(N,O){if(O==="CreateLink"){M(N)}});a.onSetContent.add(m.onSetContent.add(M))}function n(){if(I.forced_root_block){a.onInit.add(function(){B("DefaultParagraphSeparator",I.forced_root_block)})}}function q(){function M(O,N){if(!O||!N.initial){a.execCommand("mceRepaint")}}a.onUndo.add(M);a.onRedo.add(M);a.onSetContent.add(M)}function i(){a.onKeyDown.add(function(N,O){var M;if(!A(O)&&O.keyCode==f){M=N.getDoc().selection.createRange();if(M&&M.item){O.preventDefault();N.undoManager.beforeChange();e.remove(M.item(0));N.undoManager.add()}}})}function s(){var M;if(o()>=10){M="";F("p div h1 h2 h3 h4 h5 h6".split(" "),function(N,O){M+=(O>0?",":"")+N+":empty"});a.contentStyles.push(M+"{padding-right: 1px !important}")}}function v(){var O,N,ae,M,Z,ac,aa,ad,P,Q,ab,X,W,Y=document,U=a.getDoc();if(!I.object_resizing||I.webkit_fake_resize===false){return}B("enableObjectResizing",false);ab={n:[0.5,0,0,-1],e:[1,0.5,1,0],s:[0.5,1,0,1],w:[0,0.5,-1,0],nw:[0,0,-1,-1],ne:[1,0,1,-1],se:[1,1,1,1],sw:[0,1,-1,1]};function S(ai){var ah,ag;ah=ai.screenX-ac;ag=ai.screenY-aa;X=ah*Z[2]+ad;W=ag*Z[3]+P;X=X<5?5:X;W=W<5?5:W;if(j.modifierPressed(ai)||(ae.nodeName=="IMG"&&Z[2]*Z[3]!==0)){X=Math.round(W/Q);W=Math.round(X*Q)}e.setStyles(M,{width:X,height:W});if(Z[2]<0&&M.clientWidth<=X){e.setStyle(M,"left",O+(ad-X))}if(Z[3]<0&&M.clientHeight<=W){e.setStyle(M,"top",N+(P-W))}}function af(){function ag(ah,ai){if(ai){if(ae.style[ah]||!a.schema.isValid(ae.nodeName.toLowerCase(),ah)){e.setStyle(ae,ah,ai)}else{e.setAttrib(ae,ah,ai)}}}ag("width",X);ag("height",W);e.unbind(U,"mousemove",S);e.unbind(U,"mouseup",af);if(Y!=U){e.unbind(Y,"mousemove",S);e.unbind(Y,"mouseup",af)}e.remove(M);R(ae)}function R(aj){var ah,ai,ag;T();ah=e.getPos(aj);O=ah.x;N=ah.y;ai=aj.offsetWidth;ag=aj.offsetHeight;if(ae!=aj){ae=aj;X=W=0}F(ab,function(am,ak){var al;al=e.get("mceResizeHandle"+ak);if(!al){al=e.add(U.documentElement,"div",{id:"mceResizeHandle"+ak,"class":"mceResizeHandle",style:"cursor:"+ak+"-resize; margin:0; padding:0"});e.bind(al,"mousedown",function(an){an.preventDefault();af();ac=an.screenX;aa=an.screenY;ad=ae.clientWidth;P=ae.clientHeight;Q=P/ad;Z=am;M=ae.cloneNode(true);e.addClass(M,"mceClonedResizable");e.setStyles(M,{left:O,top:N,margin:0});U.documentElement.appendChild(M);e.bind(U,"mousemove",S);e.bind(U,"mouseup",af);if(Y!=U){e.bind(Y,"mousemove",S);e.bind(Y,"mouseup",af)}})}else{e.show(al)}e.setStyles(al,{left:(ai*am[0]+O)-(al.offsetWidth/2),top:(ag*am[1]+N)-(al.offsetHeight/2)})});if(!tinymce.isOpera&&ae.nodeName=="IMG"){ae.setAttribute("data-mce-selected","1")}}function T(){if(ae){ae.removeAttribute("data-mce-selected")}for(var ag in ab){e.hide("mceResizeHandle"+ag)}}a.contentStyles.push(".mceResizeHandle {position: absolute;border: 1px solid black;background: #FFF;width: 5px;height: 5px;z-index: 10000}.mceResizeHandle:hover {background: #000}img[data-mce-selected] {outline: 1px solid black}img.mceClonedResizable, table.mceClonedResizable {position: absolute;outline: 1px dashed black;opacity: .5;z-index: 10000}");function V(){var ag=e.getParent(m.getNode(),"table,img");F(e.select("img[data-mce-selected]"),function(ah){ah.removeAttribute("data-mce-selected")});if(ag){R(ag)}else{T()}}a.onNodeChange.add(V);e.bind(U,"selectionchange",V);a.serializer.addAttributeFilter("data-mce-selected",function(ag,ah){var ai=ag.length;while(ai--){ag[ai].attr(ah,null)}})}function E(){if(o()<9){x.addNodeFilter("noscript",function(M){var N=M.length,O,P;while(N--){O=M[N];P=O.firstChild;if(P){O.attr("data-mce-innertext",P.value)}}});p.addNodeFilter("noscript",function(M){var N=M.length,O,Q,P;while(N--){O=M[N];Q=M[N].firstChild;if(Q){Q.value=tinymce.html.Entities.decode(Q.value)}else{P=O.attributes.map["data-mce-innertext"];if(P){O.attr("data-mce-innertext",null);Q=new tinymce.html.Node("#text",3);Q.value=P;Q.raw=true;O.append(Q)}}}})}}function l(){a.contentStyles.push("body {min-height: 100px}");a.onClick.add(function(M,N){if(N.target.nodeName=="HTML"){a.execCommand("SelectAll");a.selection.collapse(true);a.nodeChanged()}})}u();H();r();if(tinymce.isWebKit){d();K();L();h();n();if(tinymce.isIDevice){b()}else{v();J()}}if(tinymce.isIE&&!tinymce.isIE11){C();y();D();g();i();s();E()}if(tinymce.isIE11){l()}if(tinymce.isGecko&&!tinymce.isIE11){C();z();c();G();t();q()}if(tinymce.isOpera){v()}};(function(j){var a,g,d,k=/[&<>\"\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,b=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,f=/[<>&\"\']/g,c=/&(#x|#)?([\w]+);/g,i={128:"\u20AC",130:"\u201A",131:"\u0192",132:"\u201E",133:"\u2026",134:"\u2020",135:"\u2021",136:"\u02C6",137:"\u2030",138:"\u0160",139:"\u2039",140:"\u0152",142:"\u017D",145:"\u2018",146:"\u2019",147:"\u201C",148:"\u201D",149:"\u2022",150:"\u2013",151:"\u2014",152:"\u02DC",153:"\u2122",154:"\u0161",155:"\u203A",156:"\u0153",158:"\u017E",159:"\u0178"};g={'"':""","'":"'","<":"<",">":">","&":"&"};d={"<":"<",">":">","&":"&",""":'"',"'":"'"};function h(l){var m;m=document.createElement("div");m.innerHTML=l;return m.textContent||m.innerText||l}function e(m,p){var n,o,l,q={};if(m){m=m.split(",");p=p||10;for(n=0;n1){return"&#"+(((n.charCodeAt(0)-55296)*1024)+(n.charCodeAt(1)-56320)+65536)+";"}return g[n]||"&#"+n.charCodeAt(0)+";"})},encodeNamed:function(n,l,m){m=m||a;return n.replace(l?k:b,function(o){return g[o]||m[o]||o})},getEncodeFunc:function(l,o){var p=j.html.Entities;o=e(o)||a;function m(r,q){return r.replace(q?k:b,function(s){return g[s]||o[s]||"&#"+s.charCodeAt(0)+";"||s})}function n(r,q){return p.encodeNamed(r,q,o)}l=j.makeMap(l.replace(/\+/g,","));if(l.named&&l.numeric){return m}if(l.named){if(o){return n}return p.encodeNamed}if(l.numeric){return p.encodeNumeric}return p.encodeRaw},decode:function(l){return l.replace(c,function(n,m,o){if(m){o=parseInt(o,m.length===2?16:10);if(o>65535){o-=65536;return String.fromCharCode(55296+(o>>10),56320+(o&1023))}else{return i[o]||String.fromCharCode(o)}}return d[n]||a[n]||h(n)})}}})(tinymce);tinymce.html.Styles=function(d,f){var k=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,h=/(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,b=/\s*([^:]+):\s*([^;]+);?/g,l=/\s+$/,m=/rgb/,e,g,a={},j;d=d||{};j="\\\" \\' \\; \\: ; : \uFEFF".split(" ");for(g=0;g1?r:"0"+r}return"#"+o(q)+o(p)+o(i)}return{toHex:function(i){return i.replace(k,c)},parse:function(s){var z={},q,n,x,r,v=d.url_converter,y=d.url_converter_scope||this;function p(D,G){var F,C,B,E;if(z["border-image"]==="none"){delete z["border-image"]}F=z[D+"-top"+G];if(!F){return}C=z[D+"-right"+G];if(F!=C){return}B=z[D+"-bottom"+G];if(C!=B){return}E=z[D+"-left"+G];if(B!=E){return}z[D+G]=E;delete z[D+"-top"+G];delete z[D+"-right"+G];delete z[D+"-bottom"+G];delete z[D+"-left"+G]}function u(C){var D=z[C],B;if(!D||D.indexOf(" ")<0){return}D=D.split(" ");B=D.length;while(B--){if(D[B]!==D[0]){return false}}z[C]=D[0];return true}function A(D,C,B,E){if(!u(C)){return}if(!u(B)){return}if(!u(E)){return}z[D]=z[C]+" "+z[B]+" "+z[E];delete z[C];delete z[B];delete z[E]}function t(B){r=true;return a[B]}function i(C,B){if(r){C=C.replace(/\uFEFF[0-9]/g,function(D){return a[D]})}if(!B){C=C.replace(/\\([\'\";:])/g,"$1")}return C}function o(C,B,F,E,G,D){G=G||D;if(G){G=i(G);return"'"+G.replace(/\'/g,"\\'")+"'"}B=i(B||F||E);if(v){B=v.call(y,B,"style")}return"url('"+B.replace(/\'/g,"\\'")+"')"}if(s){s=s.replace(/\\[\"\';:\uFEFF]/g,t).replace(/\"[^\"]+\"|\'[^\']+\'/g,function(B){return B.replace(/[;:]/g,t)});while(q=b.exec(s)){n=q[1].replace(l,"").toLowerCase();x=q[2].replace(l,"");if(n&&x.length>0){if(n==="font-weight"&&x==="700"){x="bold"}else{if(n==="color"||n==="background-color"){x=x.toLowerCase()}}x=x.replace(k,c);x=x.replace(h,o);z[n]=r?i(x,true):x}b.lastIndex=q.index+q[0].length}p("border","");p("border","-width");p("border","-color");p("border","-style");p("padding","");p("margin","");A("border","border-width","border-style","border-color");if(z.border==="medium none"){delete z.border}}return z},serialize:function(p,r){var o="",n,q;function i(t){var x,u,s,v;x=f.styles[t];if(x){for(u=0,s=x.length;u0){o+=(o.length>0?" ":"")+t+": "+v+";"}}}}if(r&&f&&f.styles){i("*");i(r)}else{for(n in p){q=p[n];if(q!==e&&q.length>0){o+=(o.length>0?" ":"")+n+": "+q+";"}}}return o}}};(function(f){var a={},e=f.makeMap,g=f.each;function d(j,i){return j.split(i||",")}function h(m,l){var j,k={};function i(n){return n.replace(/[A-Z]+/g,function(o){return i(m[o])})}for(j in m){if(m.hasOwnProperty(j)){m[j]=i(m[j])}}i(l).replace(/#/g,"#text").replace(/(\w+)\[([^\]]+)\]\[([^\]]*)\]/g,function(q,o,n,p){n=d(n,"|");k[o]={attributes:e(n),attributesOrder:n,children:e(p,"|",{"#comment":{}})}});return k}function b(){var i=a.html5;if(!i){i=a.html5=h({A:"id|accesskey|class|dir|draggable|item|hidden|itemprop|role|spellcheck|style|subject|title|onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup",B:"#|a|abbr|area|audio|b|bdo|br|button|canvas|cite|code|command|datalist|del|dfn|em|embed|i|iframe|img|input|ins|kbd|keygen|label|link|map|mark|meta|meter|noscript|object|output|progress|q|ruby|samp|script|select|small|span|strong|sub|sup|svg|textarea|time|var|video|wbr",C:"#|a|abbr|area|address|article|aside|audio|b|bdo|blockquote|br|button|canvas|cite|code|command|datalist|del|details|dfn|dialog|div|dl|em|embed|fieldset|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hgroup|hr|i|iframe|img|input|ins|kbd|keygen|label|link|map|mark|menu|meta|meter|nav|noscript|ol|object|output|p|pre|progress|q|ruby|samp|script|section|select|small|span|strong|style|sub|sup|svg|table|textarea|time|ul|var|video"},"html[A|manifest][body|head]head[A][base|command|link|meta|noscript|script|style|title]title[A][#]base[A|href|target][]link[A|href|rel|media|type|sizes][]meta[A|http-equiv|name|content|charset][]style[A|type|media|scoped][#]script[A|charset|type|src|defer|async][#]noscript[A][C]body[A][C]section[A][C]nav[A][C]article[A][C]aside[A][C]h1[A][B]h2[A][B]h3[A][B]h4[A][B]h5[A][B]h6[A][B]hgroup[A][h1|h2|h3|h4|h5|h6]header[A][C]footer[A][C]address[A][C]p[A][B]br[A][]pre[A][B]dialog[A][dd|dt]blockquote[A|cite][C]ol[A|start|reversed][li]ul[A][li]li[A|value][C]dl[A][dd|dt]dt[A][B]dd[A][C]a[A|href|target|ping|rel|media|type][B]em[A][B]strong[A][B]small[A][B]cite[A][B]q[A|cite][B]dfn[A][B]abbr[A][B]code[A][B]var[A][B]samp[A][B]kbd[A][B]sub[A][B]sup[A][B]i[A][B]b[A][B]mark[A][B]progress[A|value|max][B]meter[A|value|min|max|low|high|optimum][B]time[A|datetime][B]ruby[A][B|rt|rp]rt[A][B]rp[A][B]bdo[A][B]span[A][B]ins[A|cite|datetime][B]del[A|cite|datetime][B]figure[A][C|legend|figcaption]figcaption[A][C]img[A|alt|src|height|width|usemap|ismap][]iframe[A|name|src|height|width|sandbox|seamless][]embed[A|src|height|width|type][]object[A|data|type|height|width|usemap|name|form|classid][param]param[A|name|value][]details[A|open][C|legend]command[A|type|label|icon|disabled|checked|radiogroup][]menu[A|type|label][C|li]legend[A][C|B]div[A][C]source[A|src|type|media][]audio[A|src|autobuffer|autoplay|loop|controls][source]video[A|src|autobuffer|autoplay|loop|controls|width|height|poster][source]hr[A][]form[A|accept-charset|action|autocomplete|enctype|method|name|novalidate|target][C]fieldset[A|disabled|form|name][C|legend]label[A|form|for][B]input[A|type|accept|alt|autocomplete|autofocus|checked|disabled|form|formaction|formenctype|formmethod|formnovalidate|formtarget|height|list|max|maxlength|min|multiple|pattern|placeholder|readonly|required|size|src|step|width|files|value|name][]button[A|autofocus|disabled|form|formaction|formenctype|formmethod|formnovalidate|formtarget|name|value|type][B]select[A|autofocus|disabled|form|multiple|name|size][option|optgroup]datalist[A][B|option]optgroup[A|disabled|label][option]option[A|disabled|selected|label|value][]textarea[A|autofocus|disabled|form|maxlength|name|placeholder|readonly|required|rows|cols|wrap][]keygen[A|autofocus|challenge|disabled|form|keytype|name][]output[A|for|form|name][B]canvas[A|width|height][]map[A|name][B|C]area[A|shape|coords|href|alt|target|media|rel|ping|type][]mathml[A][]svg[A][]table[A|border][caption|colgroup|thead|tfoot|tbody|tr]caption[A][C]colgroup[A|span][col]col[A|span][]thead[A][tr]tfoot[A][tr]tbody[A][tr]tr[A][th|td]th[A|headers|rowspan|colspan|scope][B]td[A|headers|rowspan|colspan][C]wbr[A][]")}return i}function c(){var i=a.html4;if(!i){i=a.html4=h({Z:"H|K|N|O|P",Y:"X|form|R|Q",ZG:"E|span|width|align|char|charoff|valign",X:"p|T|div|U|W|isindex|fieldset|table",ZF:"E|align|char|charoff|valign",W:"pre|hr|blockquote|address|center|noframes",ZE:"abbr|axis|headers|scope|rowspan|colspan|align|char|charoff|valign|nowrap|bgcolor|width|height",ZD:"[E][S]",U:"ul|ol|dl|menu|dir",ZC:"p|Y|div|U|W|table|br|span|bdo|object|applet|img|map|K|N|Q",T:"h1|h2|h3|h4|h5|h6",ZB:"X|S|Q",S:"R|P",ZA:"a|G|J|M|O|P",R:"a|H|K|N|O",Q:"noscript|P",P:"ins|del|script",O:"input|select|textarea|label|button",N:"M|L",M:"em|strong|dfn|code|q|samp|kbd|var|cite|abbr|acronym",L:"sub|sup",K:"J|I",J:"tt|i|b|u|s|strike",I:"big|small|font|basefont",H:"G|F",G:"br|span|bdo",F:"object|applet|img|map|iframe",E:"A|B|C",D:"accesskey|tabindex|onfocus|onblur",C:"onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup",B:"lang|xml:lang|dir",A:"id|class|style|title"},"script[id|charset|type|language|src|defer|xml:space][]style[B|id|type|media|title|xml:space][]object[E|declare|classid|codebase|data|type|codetype|archive|standby|width|height|usemap|name|tabindex|align|border|hspace|vspace][#|param|Y]param[id|name|value|valuetype|type][]p[E|align][#|S]a[E|D|charset|type|name|href|hreflang|rel|rev|shape|coords|target][#|Z]br[A|clear][]span[E][#|S]bdo[A|C|B][#|S]applet[A|codebase|archive|code|object|alt|name|width|height|align|hspace|vspace][#|param|Y]h1[E|align][#|S]img[E|src|alt|name|longdesc|width|height|usemap|ismap|align|border|hspace|vspace][]map[B|C|A|name][X|form|Q|area]h2[E|align][#|S]iframe[A|longdesc|name|src|frameborder|marginwidth|marginheight|scrolling|align|width|height][#|Y]h3[E|align][#|S]tt[E][#|S]i[E][#|S]b[E][#|S]u[E][#|S]s[E][#|S]strike[E][#|S]big[E][#|S]small[E][#|S]font[A|B|size|color|face][#|S]basefont[id|size|color|face][]em[E][#|S]strong[E][#|S]dfn[E][#|S]code[E][#|S]q[E|cite][#|S]samp[E][#|S]kbd[E][#|S]var[E][#|S]cite[E][#|S]abbr[E][#|S]acronym[E][#|S]sub[E][#|S]sup[E][#|S]input[E|D|type|name|value|checked|disabled|readonly|size|maxlength|src|alt|usemap|onselect|onchange|accept|align][]select[E|name|size|multiple|disabled|tabindex|onfocus|onblur|onchange][optgroup|option]optgroup[E|disabled|label][option]option[E|selected|disabled|label|value][]textarea[E|D|name|rows|cols|disabled|readonly|onselect|onchange][]label[E|for|accesskey|onfocus|onblur][#|S]button[E|D|name|value|type|disabled][#|p|T|div|U|W|table|G|object|applet|img|map|K|N|Q]h4[E|align][#|S]ins[E|cite|datetime][#|Y]h5[E|align][#|S]del[E|cite|datetime][#|Y]h6[E|align][#|S]div[E|align][#|Y]ul[E|type|compact][li]li[E|type|value][#|Y]ol[E|type|compact|start][li]dl[E|compact][dt|dd]dt[E][#|S]dd[E][#|Y]menu[E|compact][li]dir[E|compact][li]pre[E|width|xml:space][#|ZA]hr[E|align|noshade|size|width][]blockquote[E|cite][#|Y]address[E][#|S|p]center[E][#|Y]noframes[E][#|Y]isindex[A|B|prompt][]fieldset[E][#|legend|Y]legend[E|accesskey|align][#|S]table[E|summary|width|border|frame|rules|cellspacing|cellpadding|align|bgcolor][caption|col|colgroup|thead|tfoot|tbody|tr]caption[E|align][#|S]col[ZG][]colgroup[ZG][col]thead[ZF][tr]tr[ZF|bgcolor][th|td]th[E|ZE][#|Y]form[E|action|method|name|enctype|onsubmit|onreset|accept|accept-charset|target][#|X|R|Q]noscript[E][#|Y]td[E|ZE][#|Y]tfoot[ZF][tr]tbody[ZF][tr]area[E|D|shape|coords|href|nohref|alt|target][]base[id|href|target][]body[E|onload|onunload|background|bgcolor|text|link|vlink|alink][#|Y]")}return i}f.html.Schema=function(A){var u=this,s={},k={},j=[],D,y;var o,q,z,r,v,n,p={};function m(F,E,H){var G=A[F];if(!G){G=a[F];if(!G){G=e(E," ",e(E.toUpperCase()," "));G=f.extend(G,H);a[F]=G}}else{G=e(G,",",e(G.toUpperCase()," "))}return G}A=A||{};y=A.schema=="html5"?b():c();if(A.verify_html===false){A.valid_elements="*[*]"}if(A.valid_styles){D={};g(A.valid_styles,function(F,E){D[E]=f.explode(F)})}o=m("whitespace_elements","pre script noscript style textarea");q=m("self_closing_elements","colgroup dd dt li option p td tfoot th thead tr");z=m("short_ended_elements","area base basefont br col frame hr img input isindex link meta param embed source wbr");r=m("boolean_attributes","checked compact declare defer disabled ismap multiple nohref noresize noshade nowrap readonly selected autoplay loop controls");n=m("non_empty_elements","td th iframe video audio object script",z);textBlockElementsMap=m("text_block_elements","h1 h2 h3 h4 h5 h6 p div address pre form blockquote center dir fieldset header footer article section hgroup aside nav figure");v=m("block_elements","hr table tbody thead tfoot th tr td li ol ul caption dl dt dd noscript menu isindex samp option datalist select optgroup",textBlockElementsMap);function i(E){return new RegExp("^"+E.replace(/([?+*])/g,".$1")+"$")}function C(L){var K,G,Z,V,aa,F,I,U,X,Q,Y,ac,O,J,W,E,S,H,ab,ad,P,T,N=/^([#+\-])?([^\[\/]+)(?:\/([^\[]+))?(?:\[([^\]]+)\])?$/,R=/^([!\-])?(\w+::\w+|[^=:<]+)?(?:([=:<])(.*))?$/,M=/[*?+]/;if(L){L=d(L);if(s["@"]){S=s["@"].attributes;H=s["@"].attributesOrder}for(K=0,G=L.length;K=0){for(U=A.length-1;U>=V;U--){T=A[U];if(T.valid){n.end(T.name)}}A.length=V}}function p(U,T,Y,X,W){var Z,V;T=T.toLowerCase();Y=T in H?T:j(Y||X||W||"");if(v&&!z&&T.indexOf("data-")!==0){Z=P[T];if(!Z&&F){V=F.length;while(V--){Z=F[V];if(Z.pattern.test(T)){break}}if(V===-1){Z=null}}if(!Z){return}if(Z.validValues&&!(Y in Z.validValues)){return}}N.map[T]=Y;N.push({name:T,value:Y})}l=new RegExp("<(?:(?:!--([\\w\\W]*?)-->)|(?:!\\[CDATA\\[([\\w\\W]*?)\\]\\]>)|(?:!DOCTYPE([\\w\\W]*?)>)|(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|(?:\\/([^>]+)>)|(?:([A-Za-z0-9\\-\\:\\.]+)((?:\\s+[^\"'>]+(?:(?:\"[^\"]*\")|(?:'[^']*')|[^>]*))*|\\/|\\s+)>))","g");D=/([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:[^\"])*)\")|(?:\'((?:[^\'])*)\')|([^>\s]+)))?/g;K={script:/<\/script[^>]*>/gi,style:/<\/style[^>]*>/gi,noscript:/<\/noscript[^>]*>/gi};M=e.getShortEndedElements();J=c.self_closing_elements||e.getSelfClosingElements();H=e.getBoolAttrs();v=c.validate;s=c.remove_internals;y=c.fix_self_closing;q=a.isIE;o=/^:/;while(g=l.exec(E)){if(G0&&A[A.length-1].name===I){u(I)}if(!v||(m=e.getElementRule(I))){k=true;if(v){P=m.attributes;F=m.attributePatterns}if(R=g[8]){z=R.indexOf("data-mce-type")!==-1;if(z&&s){k=false}N=[];N.map={};R.replace(D,p)}else{N=[];N.map={}}if(v&&!z){S=m.attributesRequired;L=m.attributesDefault;f=m.attributesForced;if(f){Q=f.length;while(Q--){t=f[Q];r=t.name;h=t.value;if(h==="{$uid}"){h="mce_"+x++}N.map[r]=h;N.push({name:r,value:h})}}if(L){Q=L.length;while(Q--){t=L[Q];r=t.name;if(!(r in N.map)){h=t.value;if(h==="{$uid}"){h="mce_"+x++}N.map[r]=h;N.push({name:r,value:h})}}}if(S){Q=S.length;while(Q--){if(S[Q] in N.map){break}}if(Q===-1){k=false}}if(N.map["data-mce-bogus"]){k=false}}if(k){n.start(I,N,O)}}else{k=false}if(B=K[I]){B.lastIndex=G=g.index+g[0].length;if(g=B.exec(E)){if(k){C=E.substr(G,g.index-G)}G=g.index+g[0].length}else{C=E.substr(G);G=E.length}if(k&&C.length>0){n.text(C,true)}if(k){n.end(I)}l.lastIndex=G;continue}if(!O){if(!R||R.indexOf("/")!=R.length-1){A.push({name:I,valid:k})}else{if(k){n.end(I)}}}}else{if(I=g[1]){n.comment(I)}else{if(I=g[2]){n.cdata(I)}else{if(I=g[3]){n.doctype(I)}else{if(I=g[4]){n.pi(I,g[5])}}}}}}G=g.index+g[0].length}if(G=0;Q--){I=A[Q];if(I.valid){n.end(I.name)}}}}})(tinymce);(function(d){var c=/^[ \t\r\n]*$/,e={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11};function a(k,l,j){var i,h,f=j?"lastChild":"firstChild",g=j?"prev":"next";if(k[f]){return k[f]}if(k!==l){i=k[g];if(i){return i}for(h=k.parent;h&&h!==l;h=h.parent){i=h[g];if(i){return i}}}}function b(f,g){this.name=f;this.type=g;if(g===1){this.attributes=[];this.attributes.map={}}}d.extend(b.prototype,{replace:function(g){var f=this;if(g.parent){g.remove()}f.insert(g,f);f.remove();return f},attr:function(h,l){var f=this,g,j,k;if(typeof h!=="string"){for(j in h){f.attr(j,h[j])}return f}if(g=f.attributes){if(l!==k){if(l===null){if(h in g.map){delete g.map[h];j=g.length;while(j--){if(g[j].name===h){g=g.splice(j,1);return f}}}return f}if(h in g.map){j=g.length;while(j--){if(g[j].name===h){g[j].value=l;break}}}else{g.push({name:h,value:l})}g.map[h]=l;return f}else{return g.map[h]}}},clone:function(){var g=this,n=new b(g.name,g.type),h,f,m,j,k;if(m=g.attributes){k=[];k.map={};for(h=0,f=m.length;h1){x.reverse();A=o=f.filterNode(x[0].clone());for(u=0;u0){Q.value=l;Q=Q.prev}else{O=Q.prev;Q.remove();Q=O}}}function H(O){var P,l={};for(P in O){if(P!=="li"&&P!="p"){l[P]=O[P]}}return l}n=new b.html.SaxParser({validate:z,self_closing_elements:H(h.getSelfClosingElements()),cdata:function(l){B.append(K("#cdata",4)).value=l},text:function(P,l){var O;if(!L){P=P.replace(k," ");if(B.lastChild&&o[B.lastChild.name]){P=P.replace(E,"")}}if(P.length!==0){O=K("#text",3);O.raw=!!l;B.append(O).value=P}},comment:function(l){B.append(K("#comment",8)).value=l},pi:function(l,O){B.append(K(l,7)).value=O;I(B)},doctype:function(O){var l;l=B.append(K("#doctype",10));l.value=O;I(B)},start:function(l,W,P){var U,R,Q,O,S,X,V,T;Q=z?h.getElementRule(l):{};if(Q){U=K(Q.outputName||l,1);U.attributes=W;U.shortEnded=P;B.append(U);T=p[B.name];if(T&&p[U.name]&&!T[U.name]){M.push(U)}R=d.length;while(R--){S=d[R].name;if(S in W.map){F=c[S];if(F){F.push(U)}else{c[S]=[U]}}}if(o[l]){I(U)}if(!P){B=U}if(!L&&s[l]){L=true}}},end:function(l){var S,P,R,O,Q;P=z?h.getElementRule(l):{};if(P){if(o[l]){if(!L){S=B.firstChild;if(S&&S.type===3){R=S.value.replace(E,"");if(R.length>0){S.value=R;S=S.next}else{O=S.next;S.remove();S=O}while(S&&S.type===3){R=S.value;O=S.next;if(R.length===0||y.test(R)){S.remove();S=O}S=O}}S=B.lastChild;if(S&&S.type===3){R=S.value.replace(t,"");if(R.length>0){S.value=R;S=S.prev}else{O=S.prev;S.remove();S=O}while(S&&S.type===3){R=S.value;O=S.prev;if(R.length===0||y.test(R)){S.remove();S=O}S=O}}}}if(L&&s[l]){L=false}if(P.removeEmpty||P.paddEmpty){if(B.isEmpty(u)){if(P.paddEmpty){B.empty().append(new a("#text","3")).value="\u00a0"}else{if(!B.attributes.map.name&&!B.attributes.map.id){Q=B.parent;B.empty().remove();B=Q;return}}}}B=B.parent}}},h);J=B=new a(m.context||g.root_name,11);n.parse(v);if(z&&M.length){if(!m.context){j(M)}else{m.invalid=true}}if(q&&J.name=="body"){G()}if(!m.invalid){for(N in i){F=e[N];A=i[N];x=A.length;while(x--){if(!A[x].parent){A.splice(x,1)}}for(D=0,C=F.length;D0){o=c[c.length-1];if(o.length>0&&o!=="\n"){c.push("\n")}}c.push("<",m);if(k){for(n=0,j=k.length;n0){o=c[c.length-1];if(o.length>0&&o!=="\n"){c.push("\n")}}},end:function(h){var i;c.push("");if(a&&d[h]&&c.length>0){i=c[c.length-1];if(i.length>0&&i!=="\n"){c.push("\n")}}},text:function(i,h){if(i.length>0){c[c.length]=h?i:f(i)}},cdata:function(h){c.push("")},comment:function(h){c.push("")},pi:function(h,i){if(i){c.push("")}else{c.push("")}if(a){c.push("\n")}},doctype:function(h){c.push("",a?"\n":"")},reset:function(){c.length=0},getContent:function(){return c.join("").replace(/\n$/,"")}}};(function(a){a.html.Serializer=function(c,d){var b=this,e=new a.html.Writer(c);c=c||{};c.validate="validate" in c?c.validate:true;b.schema=d=d||new a.html.Schema();b.writer=e;b.serialize=function(h){var g,i;i=c.validate;g={3:function(k,j){e.text(k.value,k.raw)},8:function(j){e.comment(j.value)},7:function(j){e.pi(j.name,j.value)},10:function(j){e.doctype(j.value)},4:function(j){e.cdata(j.value)},11:function(j){if((j=j.firstChild)){do{f(j)}while(j=j.next)}}};e.reset();function f(k){var t=g[k.type],j,o,s,r,p,u,n,m,q;if(!t){j=k.name;o=k.shortEnded;s=k.attributes;if(i&&s&&s.length>1){u=[];u.map={};q=d.getElementRule(k.name);for(n=0,m=q.attributesOrder.length;n=8;k.boxModel=!e.isIE||o.compatMode=="CSS1Compat"||k.stdMode;k.hasOuterHTML="outerHTML" in o.createElement("a");k.settings=l=e.extend({keep_values:false,hex_colors:1},l);k.schema=l.schema;k.styles=new e.html.Styles({url_converter:l.url_converter,url_converter_scope:l.url_converter_scope},l.schema);if(e.isIE6){try{o.execCommand("BackgroundImageCache",false,true)}catch(m){k.cssFlicker=true}}k.fixDoc(o);k.events=l.ownEvents?new e.dom.EventUtils(l.proxy):e.dom.Event;e.addUnload(k.destroy,k);n=l.schema?l.schema.getBlockElements():{};k.isBlock=function(q){if(!q){return false}var p=q.nodeType;if(p){return !!(p===1&&n[q.nodeName])}return !!n[q]}},fixDoc:function(k){var j=this.settings,i;if(b&&!e.isIE11&&j.schema){("abbr article aside audio canvas details figcaption figure footer header hgroup mark menu meter nav output progress section summary time video").replace(/\w+/g,function(l){k.createElement(l)});for(i in j.schema.getCustomElements()){k.createElement(i)}}},clone:function(k,i){var j=this,m,l;if(!b||e.isIE11||k.nodeType!==1||i){return k.cloneNode(i)}l=j.doc;if(!i){m=l.createElement(k.nodeName);g(j.getAttribs(k),function(n){j.setAttrib(m,n.nodeName,j.getAttrib(k,n.nodeName))});return m}return m.firstChild},getRoot:function(){var i=this,j=i.settings;return(j&&i.get(j.root_element))||i.doc.body},getViewPort:function(j){var k,i;j=!j?this.win:j;k=j.document;i=this.boxModel?k.documentElement:k.body;return{x:j.pageXOffset||i.scrollLeft,y:j.pageYOffset||i.scrollTop,w:j.innerWidth||i.clientWidth,h:j.innerHeight||i.clientHeight}},getRect:function(l){var k,i=this,j;l=i.get(l);k=i.getPos(l);j=i.getSize(l);return{x:k.x,y:k.y,w:j.w,h:j.h}},getSize:function(l){var j=this,i,k;l=j.get(l);i=j.getStyle(l,"width");k=j.getStyle(l,"height");if(i.indexOf("px")===-1){i=0}if(k.indexOf("px")===-1){k=0}return{w:parseInt(i,10)||l.offsetWidth||l.clientWidth,h:parseInt(k,10)||l.offsetHeight||l.clientHeight}},getParent:function(k,j,i){return this.getParents(k,j,i,false)},getParents:function(s,m,k,q){var j=this,i,l=j.settings,p=[];s=j.get(s);q=q===undefined;if(l.strict_root){k=k||j.getRoot()}if(d(m,"string")){i=m;if(m==="*"){m=function(o){return o.nodeType==1}}else{m=function(o){return j.is(o,i)}}}while(s){if(s==k||!s.nodeType||s.nodeType===9){break}if(!m||m(s)){if(q){p.push(s)}else{return s}}s=s.parentNode}return q?p:null},get:function(i){var j;if(i&&this.doc&&typeof(i)=="string"){j=i;i=this.doc.getElementById(i);if(i&&i.id!==j){return this.doc.getElementsByName(j)[1]}}return i},getNext:function(j,i){return this._findSib(j,i,"nextSibling")},getPrev:function(j,i){return this._findSib(j,i,"previousSibling")},select:function(k,j){var i=this;return e.dom.Sizzle(k,i.get(j)||i.get(i.settings.root_element)||i.doc,[])},is:function(l,j){var k;if(l.length===undefined){if(j==="*"){return l.nodeType==1}if(c.test(j)){j=j.toLowerCase().split(/,/);l=l.nodeName.toLowerCase();for(k=j.length-1;k>=0;k--){if(j[k]==l){return true}}return false}}return e.dom.Sizzle.matches(j,l.nodeType?[l]:l).length>0},add:function(l,o,i,k,m){var j=this;return this.run(l,function(r){var q,n;q=d(o,"string")?j.doc.createElement(o):o;j.setAttribs(q,i);if(k){if(k.nodeType){q.appendChild(k)}else{j.setHTML(q,k)}}return !m?r.appendChild(q):q})},create:function(k,i,j){return this.add(this.doc.createElement(k),k,i,j,1)},createHTML:function(q,i,m){var p="",l=this,j;p+="<"+q;for(j in i){if(i.hasOwnProperty(j)){p+=" "+j+'="'+l.encode(i[j])+'"'}}if(typeof(m)!="undefined"){return p+">"+m+""}return p+" />"},remove:function(i,j){return this.run(i,function(l){var m,k=l.parentNode;if(!k){return null}if(j){while(m=l.firstChild){if(!e.isIE||m.nodeType!==3||m.nodeValue){k.insertBefore(m,l)}else{l.removeChild(m)}}}return k.removeChild(l)})},setStyle:function(l,i,j){var k=this;return k.run(l,function(o){var n,m;n=o.style;i=i.replace(/-(\D)/g,function(q,p){return p.toUpperCase()});if(k.pixelStyles.test(i)&&(e.is(j,"number")||/^[\-0-9\.]+$/.test(j))){j+="px"}switch(i){case"opacity":if(b&&!e.isIE11){n.filter=j===""?"":"alpha(opacity="+(j*100)+")";if(!l.currentStyle||!l.currentStyle.hasLayout){n.display="inline-block"}}n[i]=n["-moz-opacity"]=n["-khtml-opacity"]=j||"";break;case"float":(b&&!e.isIE11)?n.styleFloat=j:n.cssFloat=j;break;default:n[i]=j||""}if(k.settings.update_styles){k.setAttrib(o,"data-mce-style")}})},getStyle:function(l,i,k){l=this.get(l);if(!l){return}if(this.doc.defaultView&&k){i=i.replace(/[A-Z]/g,function(m){return"-"+m});try{return this.doc.defaultView.getComputedStyle(l,null).getPropertyValue(i)}catch(j){return null}}i=i.replace(/-(\D)/g,function(n,m){return m.toUpperCase()});if(i=="float"){i=b?"styleFloat":"cssFloat"}if(l.currentStyle&&k){return l.currentStyle[i]}return l.style?l.style[i]:undefined},setStyles:function(l,m){var j=this,k=j.settings,i;i=k.update_styles;k.update_styles=0;g(m,function(o,p){j.setStyle(l,p,o)});k.update_styles=i;if(k.update_styles){j.setAttrib(l,k.cssText)}},removeAllAttribs:function(i){return this.run(i,function(l){var k,j=l.attributes;for(k=j.length-1;k>=0;k--){l.removeAttributeNode(j.item(k))}})},setAttrib:function(k,l,i){var j=this;if(!k||!l){return}if(j.settings.strict){l=l.toLowerCase()}return this.run(k,function(p){var o=j.settings;var m=p.getAttribute(l);if(i!==null){switch(l){case"style":if(!d(i,"string")){g(i,function(q,r){j.setStyle(p,r,q)});return}if(o.keep_values){if(i&&!j._isRes(i)){p.setAttribute("data-mce-style",i,2)}else{p.removeAttribute("data-mce-style",2)}}p.style.cssText=i;break;case"class":p.className=i||"";break;case"src":case"href":if(o.keep_values){if(o.url_converter){i=o.url_converter.call(o.url_converter_scope||j,i,l,p)}j.setAttrib(p,"data-mce-"+l,i,2)}break;case"shape":p.setAttribute("data-mce-style",i);break}}if(d(i)&&i!==null&&i.length!==0){p.setAttribute(l,""+i,2)}else{p.removeAttribute(l,2)}if(tinyMCE.activeEditor&&m!=i){var n=tinyMCE.activeEditor;n.onSetAttrib.dispatch(n,p,l,i)}})},setAttribs:function(j,k){var i=this;return this.run(j,function(l){g(k,function(m,o){i.setAttrib(l,o,m)})})},getAttrib:function(m,o,k){var i,j=this,l;m=j.get(m);if(!m||m.nodeType!==1){return k===l?false:k}if(!d(k)){k=""}if(/^(src|href|style|coords|shape)$/.test(o)){i=m.getAttribute("data-mce-"+o);if(i){return i}}if(b&&j.props[o]){i=m[j.props[o]];i=i&&i.nodeValue?i.nodeValue:i}if(!i){i=m.getAttribute(o,2)}if(/^(checked|compact|declare|defer|disabled|ismap|multiple|nohref|noshade|nowrap|readonly|selected)$/.test(o)){if(m[j.props[o]]===true&&i===""){return o}return i?o:""}if(m.nodeName==="FORM"&&m.getAttributeNode(o)){return m.getAttributeNode(o).nodeValue}if(o==="style"){i=i||m.style.cssText;if(i){i=j.serializeStyle(j.parseStyle(i),m.nodeName);if(j.settings.keep_values&&!j._isRes(i)){m.setAttribute("data-mce-style",i)}}}if(f&&o==="class"&&i){i=i.replace(/(apple|webkit)\-[a-z\-]+/gi,"")}if(b){switch(o){case"rowspan":case"colspan":if(i===1){i=""}break;case"size":if(i==="+0"||i===20||i===0){i=""}break;case"width":case"height":case"vspace":case"checked":case"disabled":case"readonly":if(i===0){i=""}break;case"hspace":if(i===-1){i=""}break;case"maxlength":case"tabindex":if(i===32768||i===2147483647||i==="32768"){i=""}break;case"multiple":case"compact":case"noshade":case"nowrap":if(i===65535){return o}return k;case"shape":i=i.toLowerCase();break;default:if(o.indexOf("on")===0&&i){i=e._replace(/^function\s+\w+\(\)\s+\{\s+(.*)\s+\}$/,"$1",""+i)}}}return(i!==l&&i!==null&&i!=="")?""+i:k},getPos:function(q,l){var j=this,i=0,p=0,m,o=j.doc,k;q=j.get(q);l=l||o.body;if(q){if(q.getBoundingClientRect){q=q.getBoundingClientRect();m=j.boxModel?o.documentElement:o.body;i=q.left+(o.documentElement.scrollLeft||o.body.scrollLeft)-m.clientTop;p=q.top+(o.documentElement.scrollTop||o.body.scrollTop)-m.clientLeft;return{x:i,y:p}}k=q;while(k&&k!=l&&k.nodeType){i+=k.offsetLeft||0;p+=k.offsetTop||0;k=k.offsetParent}k=q.parentNode;while(k&&k!=l&&k.nodeType){i-=k.scrollLeft||0;p-=k.scrollTop||0;k=k.parentNode}}return{x:i,y:p}},parseStyle:function(i){return this.styles.parse(i)},serializeStyle:function(j,i){return this.styles.serialize(j,i)},addStyle:function(j){var k=this.doc,i;styleElm=k.getElementById("mceDefaultStyles");if(!styleElm){styleElm=k.createElement("style"),styleElm.id="mceDefaultStyles";styleElm.type="text/css";i=k.getElementsByTagName("head")[0];if(i.firstChild){i.insertBefore(styleElm,i.firstChild)}else{i.appendChild(styleElm)}}if(styleElm.styleSheet){styleElm.styleSheet.cssText+=j}else{styleElm.appendChild(k.createTextNode(j))}},loadCSS:function(i){var k=this,l=k.doc,j;if(!i){i=""}j=l.getElementsByTagName("head")[0];g(i.split(","),function(m){var n;if(k.files[m]){return}k.files[m]=true;n=k.create("link",{rel:"stylesheet",href:e._addVer(m)});if(b&&!e.isIE11&&l.documentMode&&l.recalc){n.onload=function(){if(l.recalc){l.recalc()}n.onload=null}}j.appendChild(n)})},addClass:function(i,j){return this.run(i,function(k){var l;if(!j){return 0}if(this.hasClass(k,j)){return k.className}l=this.removeClass(k,j);return k.className=(l!=""?(l+" "):"")+j})},removeClass:function(k,l){var i=this,j;return i.run(k,function(n){var m;if(i.hasClass(n,l)){if(!j){j=new RegExp("(^|\\s+)"+l+"(\\s+|$)","g")}m=n.className.replace(j," ");m=e.trim(m!=" "?m:"");n.className=m;if(!m){n.removeAttribute("class");n.removeAttribute("className")}return m}return n.className})},hasClass:function(j,i){j=this.get(j);if(!j||!i){return false}return(" "+j.className+" ").indexOf(" "+i+" ")!==-1},show:function(i){return this.setStyle(i,"display","block")},hide:function(i){return this.setStyle(i,"display","none")},isHidden:function(i){i=this.get(i);return !i||i.style.display=="none"||this.getStyle(i,"display")=="none"},uniqueId:function(i){return(!i?"mce_":i)+(this.counter++)},setHTML:function(k,j){var i=this;return i.run(k,function(m){if(b){while(m.firstChild){m.removeChild(m.firstChild)}try{m.innerHTML="
    "+j;m.removeChild(m.firstChild)}catch(l){var n=i.create("div");n.innerHTML="
    "+j;g(e.grep(n.childNodes),function(p,o){if(o&&m.canHaveHTML){m.appendChild(p)}})}}else{m.innerHTML=j}return j})},getOuterHTML:function(k){var j,i=this;k=i.get(k);if(!k){return null}if(k.nodeType===1&&i.hasOuterHTML){return k.outerHTML}j=(k.ownerDocument||i.doc).createElement("body");j.appendChild(k.cloneNode(true));return j.innerHTML},setOuterHTML:function(l,j,m){var i=this;function k(p,o,r){var s,q;q=r.createElement("body");q.innerHTML=o;s=q.lastChild;while(s){i.insertAfter(s.cloneNode(true),p);s=s.previousSibling}i.remove(p)}return this.run(l,function(o){o=i.get(o);if(o.nodeType==1){m=m||o.ownerDocument||i.doc;if(b){try{if(b&&o.nodeType==1){o.outerHTML=j}else{k(o,j,m)}}catch(n){k(o,j,m)}}else{k(o,j,m)}}})},decode:h.decode,encode:h.encodeAllRaw,insertAfter:function(i,j){j=this.get(j);return this.run(i,function(l){var k,m;k=j.parentNode;m=j.nextSibling;if(m){k.insertBefore(l,m)}else{k.appendChild(l)}return l})},replace:function(m,l,i){var j=this;if(d(l,"array")){m=m.cloneNode(true)}return j.run(l,function(k){if(i){g(e.grep(k.childNodes),function(n){m.appendChild(n)})}return k.parentNode.replaceChild(m,k)})},rename:function(l,i){var k=this,j;if(l.nodeName!=i.toUpperCase()){j=k.create(i);g(k.getAttribs(l),function(m){k.setAttrib(j,m.nodeName,k.getAttrib(l,m.nodeName))});k.replace(j,l,1)}return j||l},findCommonAncestor:function(k,i){var l=k,j;while(l){j=i;while(j&&l!=j){j=j.parentNode}if(l==j){break}l=l.parentNode}if(!l&&k.ownerDocument){return k.ownerDocument.documentElement}return l},toHex:function(i){var k=/^\s*rgb\s*?\(\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?\)\s*$/i.exec(i);function j(l){l=parseInt(l,10).toString(16);return l.length>1?l:"0"+l}if(k){i="#"+j(k[1])+j(k[2])+j(k[3]);return i}return i},getClasses:function(){var n=this,j=[],m,o={},p=n.settings.class_filter,l;if(n.classes){return n.classes}function q(i){g(i.imports,function(s){q(s)});g(i.cssRules||i.rules,function(t){switch(t.type||1){case 1:if(t.selectorText){g(t.selectorText.split(","),function(r){r=r.replace(/^\s*|\s*$|^\s\./g,"");if(/\.mce/.test(r)||!/\.[\w\-]+$/.test(r)){return}l=r;r=e._replace(/.*\.([a-z0-9_\-]+).*/i,"$1",r);if(p&&!(r=p(r,l))){return}if(!o[r]){j.push({"class":r});o[r]=1}})}break;case 3:try{q(t.styleSheet)}catch(s){}break}})}try{g(n.doc.styleSheets,q)}catch(k){}if(j.length>0){n.classes=j}return j},run:function(l,k,j){var i=this,m;if(i.doc&&typeof(l)==="string"){l=i.get(l)}if(!l){return false}j=j||this;if(!l.nodeType&&(l.length||l.length===0)){m=[];g(l,function(o,n){if(o){if(typeof(o)=="string"){o=i.doc.getElementById(o)}m.push(k.call(j,o,n))}});return m}return k.call(j,l)},getAttribs:function(j){var i;j=this.get(j);if(!j){return[]}if(b){i=[];if(j.nodeName=="OBJECT"){return j.attributes}if(j.nodeName==="OPTION"&&this.getAttrib(j,"selected")){i.push({specified:1,nodeName:"selected"})}j.cloneNode(false).outerHTML.replace(/<\/?[\w:\-]+ ?|=[\"][^\"]+\"|=\'[^\']+\'|=[\w\-]+|>/gi,"").replace(/[\w:\-]+/gi,function(k){i.push({specified:1,nodeName:k})});return i}return j.attributes},isEmpty:function(m,k){var r=this,o,n,q,j,l,p=0;m=m.firstChild;if(m){j=new e.dom.TreeWalker(m,m.parentNode);k=k||r.schema?r.schema.getNonEmptyElements():null;do{q=m.nodeType;if(q===1){if(m.getAttribute("data-mce-bogus")){continue}l=m.nodeName.toLowerCase();if(k&&k[l]){if(l==="br"){p++;continue}return false}n=r.getAttribs(m);o=m.attributes.length;while(o--){l=m.attributes[o].nodeName;if(l==="name"||l==="data-mce-bookmark"){return false}}}if(q==8){return false}if((q===3&&!a.test(m.nodeValue))){return false}}while(m=j.next())}return p<=1},destroy:function(j){var i=this;i.win=i.doc=i.root=i.events=i.frag=null;if(!j){e.removeUnload(i.destroy)}},createRng:function(){var i=this.doc;return i.createRange?i.createRange():new e.dom.Range(this)},nodeIndex:function(m,n){var i=0,k,l,j;if(m){for(k=m.nodeType,m=m.previousSibling,l=m;m;m=m.previousSibling){j=m.nodeType;if(n&&j==3){if(j==k||!m.nodeValue.length){continue}}i++;k=j}}return i},split:function(m,l,p){var q=this,i=q.createRng(),n,k,o;function j(v){var t,s=v.childNodes,u=v.nodeType;function x(A){var z=A.previousSibling&&A.previousSibling.nodeName=="SPAN";var y=A.nextSibling&&A.nextSibling.nodeName=="SPAN";return z&&y}if(u==1&&v.getAttribute("data-mce-type")=="bookmark"){return}for(t=s.length-1;t>=0;t--){j(s[t])}if(u!=9){if(u==3&&v.nodeValue.length>0){var r=e.trim(v.nodeValue).length;if(!q.isBlock(v.parentNode)||r>0||r===0&&x(v)){return}}else{if(u==1){s=v.childNodes;if(s.length==1&&s[0]&&s[0].nodeType==1&&s[0].getAttribute("data-mce-type")=="bookmark"){v.parentNode.insertBefore(s[0],v)}if(s.length||/^(br|hr|input|img)$/i.test(v.nodeName)){return}}}q.remove(v)}return v}if(m&&l){i.setStart(m.parentNode,q.nodeIndex(m));i.setEnd(l.parentNode,q.nodeIndex(l));n=i.extractContents();i=q.createRng();i.setStart(l.parentNode,q.nodeIndex(l)+1);i.setEnd(m.parentNode,q.nodeIndex(m)+1);k=i.extractContents();o=m.parentNode;o.insertBefore(j(n),m);if(p){o.replaceChild(p,l)}else{o.insertBefore(l,m)}o.insertBefore(j(k),m);q.remove(m);return p||l}},bind:function(l,i,k,j){return this.events.add(l,i,k,j||this)},unbind:function(k,i,j){return this.events.remove(k,i,j)},fire:function(k,j,i){return this.events.fire(k,j,i)},getContentEditable:function(j){var i;if(j.nodeType!=1){return null}i=j.getAttribute("data-mce-contenteditable");if(i&&i!=="inherit"){return i}return j.contentEditable!=="inherit"?j.contentEditable:null},_findSib:function(l,i,j){var k=this,m=i;if(l){if(d(m,"string")){m=function(n){return k.is(n,i)}}for(l=l[j];l;l=l[j]){if(m(l)){return l}}}return null},_isRes:function(i){return/^(top|left|bottom|right|width|height)/i.test(i)||/;\s*(top|left|bottom|right|width|height)/i.test(i)}});e.DOM=new e.dom.DOMUtils(document,{process_html:0})})(tinymce);(function(a){function b(c){var O=this,e=c.doc,U=0,F=1,j=2,E=true,S=false,W="startOffset",h="startContainer",Q="endContainer",A="endOffset",k=tinymce.extend,n=c.nodeIndex;k(O,{startContainer:e,startOffset:0,endContainer:e,endOffset:0,collapsed:E,commonAncestorContainer:e,START_TO_START:0,START_TO_END:1,END_TO_END:2,END_TO_START:3,setStart:q,setEnd:s,setStartBefore:g,setStartAfter:J,setEndBefore:K,setEndAfter:u,collapse:B,selectNode:y,selectNodeContents:G,compareBoundaryPoints:v,deleteContents:p,extractContents:I,cloneContents:d,insertNode:D,surroundContents:N,cloneRange:L,toStringIE:T});function x(){return e.createDocumentFragment()}function q(X,t){C(E,X,t)}function s(X,t){C(S,X,t)}function g(t){q(t.parentNode,n(t))}function J(t){q(t.parentNode,n(t)+1)}function K(t){s(t.parentNode,n(t))}function u(t){s(t.parentNode,n(t)+1)}function B(t){if(t){O[Q]=O[h];O[A]=O[W]}else{O[h]=O[Q];O[W]=O[A]}O.collapsed=E}function y(t){g(t);u(t)}function G(t){q(t,0);s(t,t.nodeType===1?t.childNodes.length:t.nodeValue.length)}function v(aa,t){var ad=O[h],Y=O[W],ac=O[Q],X=O[A],ab=t.startContainer,af=t.startOffset,Z=t.endContainer,ae=t.endOffset;if(aa===0){return H(ad,Y,ab,af)}if(aa===1){return H(ac,X,ab,af)}if(aa===2){return H(ac,X,Z,ae)}if(aa===3){return H(ad,Y,Z,ae)}}function p(){l(j)}function I(){return l(U)}function d(){return l(F)}function D(aa){var X=this[h],t=this[W],Z,Y;if((X.nodeType===3||X.nodeType===4)&&X.nodeValue){if(!t){X.parentNode.insertBefore(aa,X)}else{if(t>=X.nodeValue.length){c.insertAfter(aa,X)}else{Z=X.splitText(t);X.parentNode.insertBefore(aa,Z)}}}else{if(X.childNodes.length>0){Y=X.childNodes[t]}if(Y){X.insertBefore(aa,Y)}else{X.appendChild(aa)}}}function N(X){var t=O.extractContents();O.insertNode(X);X.appendChild(t);O.selectNode(X)}function L(){return k(new b(c),{startContainer:O[h],startOffset:O[W],endContainer:O[Q],endOffset:O[A],collapsed:O.collapsed,commonAncestorContainer:O.commonAncestorContainer})}function P(t,X){var Y;if(t.nodeType==3){return t}if(X<0){return t}Y=t.firstChild;while(Y&&X>0){--X;Y=Y.nextSibling}if(Y){return Y}return t}function m(){return(O[h]==O[Q]&&O[W]==O[A])}function H(Z,ab,X,aa){var ac,Y,t,ad,af,ae;if(Z==X){if(ab==aa){return 0}if(ab0){O.collapse(X)}}else{O.collapse(X)}O.collapsed=m();O.commonAncestorContainer=c.findCommonAncestor(O[h],O[Q])}function l(ad){var ac,Z=0,af=0,X,ab,Y,aa,t,ae;if(O[h]==O[Q]){return f(ad)}for(ac=O[Q],X=ac.parentNode;X;ac=X,X=X.parentNode){if(X==O[h]){return r(ac,ad)}++Z}for(ac=O[h],X=ac.parentNode;X;ac=X,X=X.parentNode){if(X==O[Q]){return V(ac,ad)}++af}ab=af-Z;Y=O[h];while(ab>0){Y=Y.parentNode;ab--}aa=O[Q];while(ab<0){aa=aa.parentNode;ab++}for(t=Y.parentNode,ae=aa.parentNode;t!=ae;t=t.parentNode,ae=ae.parentNode){Y=t;aa=ae}return o(Y,aa,ad)}function f(ac){var ae,af,t,Y,Z,ad,aa,X,ab;if(ac!=j){ae=x()}if(O[W]==O[A]){return ae}if(O[h].nodeType==3){af=O[h].nodeValue;t=af.substring(O[W],O[A]);if(ac!=F){Y=O[h];X=O[W];ab=O[A]-O[W];if(X===0&&ab>=Y.nodeValue.length-1){Y.parentNode.removeChild(Y)}else{Y.deleteData(X,ab)}O.collapse(E)}if(ac==j){return}if(t.length>0){ae.appendChild(e.createTextNode(t))}return ae}Y=P(O[h],O[W]);Z=O[A]-O[W];while(Y&&Z>0){ad=Y.nextSibling;aa=z(Y,ac);if(ae){ae.appendChild(aa)}--Z;Y=ad}if(ac!=F){O.collapse(E)}return ae}function r(ad,aa){var ac,ab,X,t,Z,Y;if(aa!=j){ac=x()}ab=i(ad,aa);if(ac){ac.appendChild(ab)}X=n(ad);t=X-O[W];if(t<=0){if(aa!=F){O.setEndBefore(ad);O.collapse(S)}return ac}ab=ad.previousSibling;while(t>0){Z=ab.previousSibling;Y=z(ab,aa);if(ac){ac.insertBefore(Y,ac.firstChild)}--t;ab=Z}if(aa!=F){O.setEndBefore(ad);O.collapse(S)}return ac}function V(ab,aa){var ad,X,ac,t,Z,Y;if(aa!=j){ad=x()}ac=R(ab,aa);if(ad){ad.appendChild(ac)}X=n(ab);++X;t=O[A]-X;ac=ab.nextSibling;while(ac&&t>0){Z=ac.nextSibling;Y=z(ac,aa);if(ad){ad.appendChild(Y)}--t;ac=Z}if(aa!=F){O.setStartAfter(ab);O.collapse(E)}return ad}function o(ab,t,ae){var Y,ag,aa,ac,ad,X,af,Z;if(ae!=j){ag=x()}Y=R(ab,ae);if(ag){ag.appendChild(Y)}aa=ab.parentNode;ac=n(ab);ad=n(t);++ac;X=ad-ac;af=ab.nextSibling;while(X>0){Z=af.nextSibling;Y=z(af,ae);if(ag){ag.appendChild(Y)}af=Z;--X}Y=i(t,ae);if(ag){ag.appendChild(Y)}if(ae!=F){O.setStartAfter(ab);O.collapse(E)}return ag}function i(ac,ad){var Y=P(O[Q],O[A]-1),ae,ab,aa,t,X,Z=Y!=O[Q];if(Y==ac){return M(Y,Z,S,ad)}ae=Y.parentNode;ab=M(ae,S,S,ad);while(ae){while(Y){aa=Y.previousSibling;t=M(Y,Z,S,ad);if(ad!=j){ab.insertBefore(t,ab.firstChild)}Z=E;Y=aa}if(ae==ac){return ab}Y=ae.previousSibling;ae=ae.parentNode;X=M(ae,S,S,ad);if(ad!=j){X.appendChild(ab)}ab=X}}function R(ac,ad){var Z=P(O[h],O[W]),aa=Z!=O[h],ae,ab,Y,t,X;if(Z==ac){return M(Z,aa,E,ad)}ae=Z.parentNode;ab=M(ae,S,E,ad);while(ae){while(Z){Y=Z.nextSibling;t=M(Z,aa,E,ad);if(ad!=j){ab.appendChild(t)}aa=E;Z=Y}if(ae==ac){return ab}Z=ae.nextSibling;ae=ae.parentNode;X=M(ae,S,E,ad);if(ad!=j){X.appendChild(ab)}ab=X}}function M(t,aa,ad,ae){var Z,Y,ab,X,ac;if(aa){return z(t,ae)}if(t.nodeType==3){Z=t.nodeValue;if(ad){X=O[W];Y=Z.substring(X);ab=Z.substring(0,X)}else{X=O[A];Y=Z.substring(0,X);ab=Z.substring(X)}if(ae!=F){t.nodeValue=ab}if(ae==j){return}ac=c.clone(t,S);ac.nodeValue=Y;return ac}if(ae==j){return}return c.clone(t,S)}function z(X,t){if(t!=j){return t==F?c.clone(X,E):X}X.parentNode.removeChild(X)}function T(){return c.create("body",null,d()).outerText}return O}a.Range=b;b.prototype.toString=function(){return this.toStringIE()}})(tinymce.dom);(function(){function a(d){var b=this,h=d.dom,c=true,f=false;function e(i,j){var k,t=0,q,n,m,l,o,r,p=-1,s;k=i.duplicate();k.collapse(j);s=k.parentElement();if(s.ownerDocument!==d.dom.doc){return}while(s.contentEditable==="false"){s=s.parentNode}if(!s.hasChildNodes()){return{node:s,inside:1}}m=s.children;q=m.length-1;while(t<=q){r=Math.floor((t+q)/2);l=m[r];k.moveToElementText(l);p=k.compareEndPoints(j?"StartToStart":"EndToEnd",i);if(p>0){q=r-1}else{if(p<0){t=r+1}else{return{node:l}}}}if(p<0){if(!l){k.moveToElementText(s);k.collapse(true);l=s;n=true}else{k.collapse(false)}o=0;while(k.compareEndPoints(j?"StartToStart":"StartToEnd",i)!==0){if(k.move("character",1)===0||s!=k.parentElement()){break}o++}}else{k.collapse(true);o=0;while(k.compareEndPoints(j?"StartToStart":"StartToEnd",i)!==0){if(k.move("character",-1)===0||s!=k.parentElement()){break}o++}}return{node:l,position:p,offset:o,inside:n}}function g(){var i=d.getRng(),r=h.createRng(),l,k,p,q,m,j;l=i.item?i.item(0):i.parentElement();if(l.ownerDocument!=h.doc){return r}k=d.isCollapsed();if(i.item){r.setStart(l.parentNode,h.nodeIndex(l));r.setEnd(r.startContainer,r.startOffset+1);return r}function o(A){var u=e(i,A),s,y,z=0,x,v,t;s=u.node;y=u.offset;if(u.inside&&!s.hasChildNodes()){r[A?"setStart":"setEnd"](s,0);return}if(y===v){r[A?"setStartBefore":"setEndAfter"](s);return}if(u.position<0){x=u.inside?s.firstChild:s.nextSibling;if(!x){r[A?"setStartAfter":"setEndAfter"](s);return}if(!y){if(x.nodeType==3){r[A?"setStart":"setEnd"](x,0)}else{r[A?"setStartBefore":"setEndBefore"](x)}return}while(x){t=x.nodeValue;z+=t.length;if(z>=y){s=x;z-=y;z=t.length-z;break}x=x.nextSibling}}else{x=s.previousSibling;if(!x){return r[A?"setStartBefore":"setEndBefore"](s)}if(!y){if(s.nodeType==3){r[A?"setStart":"setEnd"](x,s.nodeValue.length)}else{r[A?"setStartAfter":"setEndAfter"](x)}return}while(x){z+=x.nodeValue.length;if(z>=y){s=x;z-=y;break}x=x.previousSibling}}r[A?"setStart":"setEnd"](s,z)}try{o(true);if(!k){o()}}catch(n){if(n.number==-2147024809){m=b.getBookmark(2);p=i.duplicate();p.collapse(true);l=p.parentElement();if(!k){p=i.duplicate();p.collapse(false);q=p.parentElement();q.innerHTML=q.innerHTML}l.innerHTML=l.innerHTML;b.moveToBookmark(m);i=d.getRng();o(true);if(!k){o()}}else{throw n}}return r}this.getBookmark=function(m){var j=d.getRng(),o,i,l={};function n(u){var t,p,s,r,q=[];t=u.parentNode;p=h.getRoot().parentNode;while(t!=p&&t.nodeType!==9){s=t.children;r=s.length;while(r--){if(u===s[r]){q.push(r);break}}u=t;t=t.parentNode}return q}function k(q){var p;p=e(j,q);if(p){return{position:p.position,offset:p.offset,indexes:n(p.node),inside:p.inside}}}if(m===2){if(!j.item){l.start=k(true);if(!d.isCollapsed()){l.end=k()}}else{l.start={ctrl:true,indexes:n(j.item(0))}}}return l};this.moveToBookmark=function(k){var j,i=h.doc.body;function m(o){var r,q,n,p;r=h.getRoot();for(q=o.length-1;q>=0;q--){p=r.children;n=o[q];if(n<=p.length-1){r=p[n]}}return r}function l(r){var n=k[r?"start":"end"],q,p,o;if(n){q=n.position>0;p=i.createTextRange();p.moveToElementText(m(n.indexes));offset=n.offset;if(offset!==o){p.collapse(n.inside||q);p.moveStart("character",q?-offset:offset)}else{p.collapse(r)}j.setEndPoint(r?"StartToStart":"EndToStart",p);if(r){j.collapse(true)}}}if(k.start){if(k.start.ctrl){j=i.createControlRange();j.addElement(m(k.start.indexes));j.select()}else{j=i.createTextRange();l(true);l();j.select()}}};this.addRange=function(i){var n,l,k,p,v,q,t,s=d.dom.doc,m=s.body,r,u;function j(C){var y,B,x,A,z;x=h.create("a");y=C?k:v;B=C?p:q;A=n.duplicate();if(y==s||y==s.documentElement){y=m;B=0}if(y.nodeType==3){y.parentNode.insertBefore(x,y);A.moveToElementText(x);A.moveStart("character",B);h.remove(x);n.setEndPoint(C?"StartToStart":"EndToEnd",A)}else{z=y.childNodes;if(z.length){if(B>=z.length){h.insertAfter(x,z[z.length-1])}else{y.insertBefore(x,z[B])}A.moveToElementText(x)}else{if(y.canHaveHTML){y.innerHTML="\uFEFF";x=y.firstChild;A.moveToElementText(x);A.collapse(f)}}n.setEndPoint(C?"StartToStart":"EndToEnd",A);h.remove(x)}}k=i.startContainer;p=i.startOffset;v=i.endContainer;q=i.endOffset;n=m.createTextRange();if(k==v&&k.nodeType==1){if(p==q&&!k.hasChildNodes()){if(k.canHaveHTML){t=k.previousSibling;if(t&&!t.hasChildNodes()&&h.isBlock(t)){t.innerHTML="\uFEFF"}else{t=null}k.innerHTML="\uFEFF\uFEFF";n.moveToElementText(k.lastChild);n.select();h.doc.selection.clear();k.innerHTML="";if(t){t.innerHTML=""}return}else{p=h.nodeIndex(k);k=k.parentNode}}if(p==q-1){try{u=k.childNodes[p];l=m.createControlRange();l.addElement(u);l.select();r=d.getRng();if(r.item&&u===r.item(0)){return}}catch(o){}}}j(true);j();n.select()};this.getRangeAt=g}tinymce.dom.TridentSelection=a})();(function(){var n=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,i="sizcache",o=0,r=Object.prototype.toString,h=false,g=true,q=/\\/g,u=/\r\n/g,x=/\W/;[0,0].sort(function(){g=false;return 0});var d=function(C,e,F,G){F=F||[];e=e||document;var I=e;if(e.nodeType!==1&&e.nodeType!==9){return[]}if(!C||typeof C!=="string"){return F}var z,K,N,y,J,M,L,E,B=true,A=d.isXML(e),D=[],H=C;do{n.exec("");z=n.exec(H);if(z){H=z[3];D.push(z[1]);if(z[2]){y=z[3];break}}}while(z);if(D.length>1&&j.exec(C)){if(D.length===2&&k.relative[D[0]]){K=s(D[0]+D[1],e,G)}else{K=k.relative[D[0]]?[e]:d(D.shift(),e);while(D.length){C=D.shift();if(k.relative[C]){C+=D.shift()}K=s(C,K,G)}}}else{if(!G&&D.length>1&&e.nodeType===9&&!A&&k.match.ID.test(D[0])&&!k.match.ID.test(D[D.length-1])){J=d.find(D.shift(),e,A);e=J.expr?d.filter(J.expr,J.set)[0]:J.set[0]}if(e){J=G?{expr:D.pop(),set:l(G)}:d.find(D.pop(),D.length===1&&(D[0]==="~"||D[0]==="+")&&e.parentNode?e.parentNode:e,A);K=J.expr?d.filter(J.expr,J.set):J.set;if(D.length>0){N=l(K)}else{B=false}while(D.length){M=D.pop();L=M;if(!k.relative[M]){M=""}else{L=D.pop()}if(L==null){L=e}k.relative[M](N,L,A)}}else{N=D=[]}}if(!N){N=K}if(!N){d.error(M||C)}if(r.call(N)==="[object Array]"){if(!B){F.push.apply(F,N)}else{if(e&&e.nodeType===1){for(E=0;N[E]!=null;E++){if(N[E]&&(N[E]===true||N[E].nodeType===1&&d.contains(e,N[E]))){F.push(K[E])}}}else{for(E=0;N[E]!=null;E++){if(N[E]&&N[E].nodeType===1){F.push(K[E])}}}}}else{l(N,F)}if(y){d(y,I,F,G);d.uniqueSort(F)}return F};d.uniqueSort=function(y){if(p){h=g;y.sort(p);if(h){for(var e=1;e0};d.find=function(E,e,F){var D,z,B,A,C,y;if(!E){return[]}for(z=0,B=k.order.length;z":function(D,y){var C,B=typeof y==="string",z=0,e=D.length;if(B&&!x.test(y)){y=y.toLowerCase();for(;z=0)){if(!z){e.push(C)}}else{if(z){y[B]=false}}}}return false},ID:function(e){return e[1].replace(q,"")},TAG:function(y,e){return y[1].replace(q,"").toLowerCase()},CHILD:function(e){if(e[1]==="nth"){if(!e[2]){d.error(e[0])}e[2]=e[2].replace(/^\+|\s*/g,"");var y=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(e[2]==="even"&&"2n"||e[2]==="odd"&&"2n+1"||!/\D/.test(e[2])&&"0n+"+e[2]||e[2]);e[2]=(y[1]+(y[2]||1))-0;e[3]=y[3]-0}else{if(e[2]){d.error(e[0])}}e[0]=o++;return e},ATTR:function(B,y,z,e,C,D){var A=B[1]=B[1].replace(q,"");if(!D&&k.attrMap[A]){B[1]=k.attrMap[A]}B[4]=(B[4]||B[5]||"").replace(q,"");if(B[2]==="~="){B[4]=" "+B[4]+" "}return B},PSEUDO:function(B,y,z,e,C){if(B[1]==="not"){if((n.exec(B[3])||"").length>1||/^\w/.test(B[3])){B[3]=d(B[3],null,null,y)}else{var A=d.filter(B[3],y,z,true^C);if(!z){e.push.apply(e,A)}return false}}else{if(k.match.POS.test(B[0])||k.match.CHILD.test(B[0])){return true}}return B},POS:function(e){e.unshift(true);return e}},filters:{enabled:function(e){return e.disabled===false&&e.type!=="hidden"},disabled:function(e){return e.disabled===true},checked:function(e){return e.checked===true},selected:function(e){if(e.parentNode){e.parentNode.selectedIndex}return e.selected===true},parent:function(e){return !!e.firstChild},empty:function(e){return !e.firstChild},has:function(z,y,e){return !!d(e[3],z).length},header:function(e){return(/h\d/i).test(e.nodeName)},text:function(z){var e=z.getAttribute("type"),y=z.type;return z.nodeName.toLowerCase()==="input"&&"text"===y&&(e===y||e===null)},radio:function(e){return e.nodeName.toLowerCase()==="input"&&"radio"===e.type},checkbox:function(e){return e.nodeName.toLowerCase()==="input"&&"checkbox"===e.type},file:function(e){return e.nodeName.toLowerCase()==="input"&&"file"===e.type},password:function(e){return e.nodeName.toLowerCase()==="input"&&"password"===e.type},submit:function(y){var e=y.nodeName.toLowerCase();return(e==="input"||e==="button")&&"submit"===y.type},image:function(e){return e.nodeName.toLowerCase()==="input"&&"image"===e.type},reset:function(y){var e=y.nodeName.toLowerCase();return(e==="input"||e==="button")&&"reset"===y.type},button:function(y){var e=y.nodeName.toLowerCase();return e==="input"&&"button"===y.type||e==="button"},input:function(e){return(/input|select|textarea|button/i).test(e.nodeName)},focus:function(e){return e===e.ownerDocument.activeElement}},setFilters:{first:function(y,e){return e===0},last:function(z,y,e,A){return y===A.length-1},even:function(y,e){return e%2===0},odd:function(y,e){return e%2===1},lt:function(z,y,e){return ye[3]-0},nth:function(z,y,e){return e[3]-0===y},eq:function(z,y,e){return e[3]-0===y}},filter:{PSEUDO:function(z,E,D,F){var e=E[1],y=k.filters[e];if(y){return y(z,D,E,F)}else{if(e==="contains"){return(z.textContent||z.innerText||b([z])||"").indexOf(E[3])>=0}else{if(e==="not"){var A=E[3];for(var C=0,B=A.length;C=0)}}},ID:function(y,e){return y.nodeType===1&&y.getAttribute("id")===e},TAG:function(y,e){return(e==="*"&&y.nodeType===1)||!!y.nodeName&&y.nodeName.toLowerCase()===e},CLASS:function(y,e){return(" "+(y.className||y.getAttribute("class"))+" ").indexOf(e)>-1},ATTR:function(C,A){var z=A[1],e=d.attr?d.attr(C,z):k.attrHandle[z]?k.attrHandle[z](C):C[z]!=null?C[z]:C.getAttribute(z),D=e+"",B=A[2],y=A[4];return e==null?B==="!=":!B&&d.attr?e!=null:B==="="?D===y:B==="*="?D.indexOf(y)>=0:B==="~="?(" "+D+" ").indexOf(y)>=0:!y?D&&e!==false:B==="!="?D!==y:B==="^="?D.indexOf(y)===0:B==="$="?D.substr(D.length-y.length)===y:B==="|="?D===y||D.substr(0,y.length+1)===y+"-":false},POS:function(B,y,z,C){var e=y[2],A=k.setFilters[e];if(A){return A(B,z,y,C)}}}};var j=k.match.POS,c=function(y,e){return"\\"+(e-0+1)};for(var f in k.match){k.match[f]=new RegExp(k.match[f].source+(/(?![^\[]*\])(?![^\(]*\))/.source));k.leftMatch[f]=new RegExp(/(^(?:.|\r|\n)*?)/.source+k.match[f].source.replace(/\\(\d+)/g,c))}k.match.globalPOS=j;var l=function(y,e){y=Array.prototype.slice.call(y,0);if(e){e.push.apply(e,y);return e}return y};try{Array.prototype.slice.call(document.documentElement.childNodes,0)[0].nodeType}catch(v){l=function(B,A){var z=0,y=A||[];if(r.call(B)==="[object Array]"){Array.prototype.push.apply(y,B)}else{if(typeof B.length==="number"){for(var e=B.length;z";e.insertBefore(y,e.firstChild);if(document.getElementById(z)){k.find.ID=function(B,C,D){if(typeof C.getElementById!=="undefined"&&!D){var A=C.getElementById(B[1]);return A?A.id===B[1]||typeof A.getAttributeNode!=="undefined"&&A.getAttributeNode("id").nodeValue===B[1]?[A]:undefined:[]}};k.filter.ID=function(C,A){var B=typeof C.getAttributeNode!=="undefined"&&C.getAttributeNode("id");return C.nodeType===1&&B&&B.nodeValue===A}}e.removeChild(y);e=y=null})();(function(){var e=document.createElement("div");e.appendChild(document.createComment(""));if(e.getElementsByTagName("*").length>0){k.find.TAG=function(y,C){var B=C.getElementsByTagName(y[1]);if(y[1]==="*"){var A=[];for(var z=0;B[z];z++){if(B[z].nodeType===1){A.push(B[z])}}B=A}return B}}e.innerHTML="";if(e.firstChild&&typeof e.firstChild.getAttribute!=="undefined"&&e.firstChild.getAttribute("href")!=="#"){k.attrHandle.href=function(y){return y.getAttribute("href",2)}}e=null})();if(document.querySelectorAll){(function(){var e=d,A=document.createElement("div"),z="__sizzle__";A.innerHTML="

    ";if(A.querySelectorAll&&A.querySelectorAll(".TEST").length===0){return}d=function(L,C,G,K){C=C||document;if(!K&&!d.isXML(C)){var J=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(L);if(J&&(C.nodeType===1||C.nodeType===9)){if(J[1]){return l(C.getElementsByTagName(L),G)}else{if(J[2]&&k.find.CLASS&&C.getElementsByClassName){return l(C.getElementsByClassName(J[2]),G)}}}if(C.nodeType===9){if(L==="body"&&C.body){return l([C.body],G)}else{if(J&&J[3]){var F=C.getElementById(J[3]);if(F&&F.parentNode){if(F.id===J[3]){return l([F],G)}}else{return l([],G)}}}try{return l(C.querySelectorAll(L),G)}catch(H){}}else{if(C.nodeType===1&&C.nodeName.toLowerCase()!=="object"){var D=C,E=C.getAttribute("id"),B=E||z,N=C.parentNode,M=/^\s*[+~]/.test(L);if(!E){C.setAttribute("id",B)}else{B=B.replace(/'/g,"\\$&")}if(M&&N){C=C.parentNode}try{if(!M||N){return l(C.querySelectorAll("[id='"+B+"'] "+L),G)}}catch(I){}finally{if(!E){D.removeAttribute("id")}}}}}return e(L,C,G,K)};for(var y in e){d[y]=e[y]}A=null})()}(function(){var e=document.documentElement,z=e.matchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.msMatchesSelector;if(z){var B=!z.call(document.createElement("div"),"div"),y=false;try{z.call(document.documentElement,"[test!='']:sizzle")}catch(A){y=true}d.matchesSelector=function(D,F){F=F.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!d.isXML(D)){try{if(y||!k.match.PSEUDO.test(F)&&!/!=/.test(F)){var C=z.call(D,F);if(C||!B||D.document&&D.document.nodeType!==11){return C}}}catch(E){}}return d(F,null,null,[D]).length>0}}})();(function(){var e=document.createElement("div");e.innerHTML="
    ";if(!e.getElementsByClassName||e.getElementsByClassName("e").length===0){return}e.lastChild.className="e";if(e.getElementsByClassName("e").length===1){return}k.order.splice(1,0,"CLASS");k.find.CLASS=function(y,z,A){if(typeof z.getElementsByClassName!=="undefined"&&!A){return z.getElementsByClassName(y[1])}};e=null})();function a(y,D,C,G,E,F){for(var A=0,z=G.length;A0){B=e;break}}}e=e[y]}G[A]=B}}}if(document.documentElement.contains){d.contains=function(y,e){return y!==e&&(y.contains?y.contains(e):true)}}else{if(document.documentElement.compareDocumentPosition){d.contains=function(y,e){return !!(y.compareDocumentPosition(e)&16)}}else{d.contains=function(){return false}}}d.isXML=function(e){var y=(e?e.ownerDocument||e:0).documentElement;return y?y.nodeName!=="HTML":false};var s=function(z,e,D){var C,E=[],B="",F=e.nodeType?[e]:e;while((C=k.match.PSEUDO.exec(z))){B+=C[0];z=z.replace(k.match.PSEUDO,"")}z=k.relative[z]?z+"*":z;for(var A=0,y=F.length;A"+(i.item?i.item(0).outerHTML:i.htmlText);m.removeChild(m.firstChild)}else{m.innerHTML=i.toString()}}if(/^\s/.test(m.innerHTML)){j=" "}if(/\s+$/.test(m.innerHTML)){l=" "}h.getInner=true;h.content=g.isCollapsed()?"":j+g.serializer.serialize(m,h)+l;g.onGetContent.dispatch(g,h);return h.content},setContent:function(h,j){var o=this,g=o.getRng(),k,l=o.win.document,n,m;j=j||{format:"html"};j.set=true;h=j.content=h;if(!j.no_events){o.onBeforeSetContent.dispatch(o,j)}h=j.content;if(g.insertNode){h+='_';if(g.startContainer==l&&g.endContainer==l){l.body.innerHTML=h}else{g.deleteContents();if(l.body.childNodes.length===0){l.body.innerHTML=h}else{if(g.createContextualFragment){g.insertNode(g.createContextualFragment(h))}else{n=l.createDocumentFragment();m=l.createElement("div");n.appendChild(m);m.outerHTML=h;g.insertNode(n)}}}k=o.dom.get("__caret");g=l.createRange();g.setStartBefore(k);g.setEndBefore(k);o.setRng(g);o.dom.remove("__caret");try{o.setRng(g)}catch(i){}}else{if(g.item){l.execCommand("Delete",false,null);g=o.getRng()}if(/^\s+/.test(h)){g.pasteHTML('_'+h);o.dom.remove("__mce_tmp")}else{g.pasteHTML(h)}}if(!j.no_events){o.onSetContent.dispatch(o,j)}},getStart:function(){var i=this,h=i.getRng(),j,g,l,k;if(h.duplicate||h.item){if(h.item){return h.item(0)}l=h.duplicate();l.collapse(1);j=l.parentElement();if(j.ownerDocument!==i.dom.doc){j=i.dom.getRoot()}g=k=h.parentElement();while(k=k.parentNode){if(k==j){j=g;break}}return j}else{j=h.startContainer;if(j.nodeType==1&&j.hasChildNodes()){j=j.childNodes[Math.min(j.childNodes.length-1,h.startOffset)]}if(j&&j.nodeType==3){return j.parentNode}return j}},getEnd:function(){var h=this,g=h.getRng(),j,i;if(g.duplicate||g.item){if(g.item){return g.item(0)}g=g.duplicate();g.collapse(0);j=g.parentElement();if(j.ownerDocument!==h.dom.doc){j=h.dom.getRoot()}if(j&&j.nodeName=="BODY"){return j.lastChild||j}return j}else{j=g.endContainer;i=g.endOffset;if(j.nodeType==1&&j.hasChildNodes()){j=j.childNodes[i>0?i-1:i]}if(j&&j.nodeType==3){return j.parentNode}return j}},getBookmark:function(s,v){var y=this,n=y.dom,h,k,j,o,i,p,q,m="\uFEFF",x;function g(z,A){var t=0;e(n.select(z),function(C,B){if(C==A){t=B}});return t}function u(t){function z(E){var A,D,C,B=E?"start":"end";A=t[B+"Container"];D=t[B+"Offset"];if(A.nodeType==1&&A.nodeName=="TR"){C=A.childNodes;A=C[Math.min(E?D:D-1,C.length-1)];if(A){D=E?0:A.childNodes.length;t["set"+(E?"Start":"End")](A,D)}}}z(true);z();return t}function l(){var z=y.getRng(true),t=n.getRoot(),A={};function B(E,J){var D=E[J?"startContainer":"endContainer"],I=E[J?"startOffset":"endOffset"],C=[],F,H,G=0;if(D.nodeType==3){if(v){for(F=D.previousSibling;F&&F.nodeType==3;F=F.previousSibling){I+=F.nodeValue.length}}C.push(I)}else{H=D.childNodes;if(I>=H.length&&H.length){G=1;I=Math.max(0,H.length-1)}C.push(y.dom.nodeIndex(H[I],v)+G)}for(;D&&D!=t;D=D.parentNode){C.push(y.dom.nodeIndex(D,v))}return C}A.start=B(z,true);if(!y.isCollapsed()){A.end=B(z)}return A}if(s==2){if(y.tridentSel){return y.tridentSel.getBookmark(s)}return l()}if(s){h=y.getRng();if(h.setStart){h={startContainer:h.startContainer,startOffset:h.startOffset,endContainer:h.endContainer,endOffset:h.endOffset}}return{rng:h}}h=y.getRng();j=n.uniqueId();o=tinyMCE.activeEditor.selection.isCollapsed();x="overflow:hidden;line-height:0px";if(h.duplicate||h.item){if(!h.item){k=h.duplicate();try{h.collapse();h.pasteHTML(''+m+"");if(!o){k.collapse(false);h.moveToElementText(k.parentElement());if(h.compareEndPoints("StartToEnd",k)===0){k.move("character",-1)}k.pasteHTML(''+m+"")}}catch(r){return null}}else{p=h.item(0);i=p.nodeName;return{name:i,index:g(i,p)}}}else{p=y.getNode();i=p.nodeName;if(i=="IMG"){return{name:i,index:g(i,p)}}k=u(h.cloneRange());if(!o){k.collapse(false);k.insertNode(n.create("span",{"data-mce-type":"bookmark",id:j+"_end",style:x},m))}h=u(h);h.collapse(true);h.insertNode(n.create("span",{"data-mce-type":"bookmark",id:j+"_start",style:x},m))}y.moveToBookmark({id:j,keep:1});return{id:j}},moveToBookmark:function(q){var v=this,n=v.dom,l,j,g,i,u,k,x,r,s;function h(C){var t=q[C?"start":"end"],z,A,B,y;if(t){B=t[0];for(A=u,z=t.length-1;z>=1;z--){y=A.childNodes;if(t[z]>y.length-1){return}A=y[t[z]]}if(A.nodeType===3){B=Math.min(t[0],A.nodeValue.length)}if(A.nodeType===1){B=Math.min(t[0],A.childNodes.length)}if(C){g.setStart(A,B)}else{g.setEnd(A,B)}}return true}function m(D){var y=n.get(q.id+"_"+D),C,t,A,B,z=q.keep;if(y){C=y.parentNode;if(D=="start"){if(!z){t=n.nodeIndex(y)}else{C=y.firstChild;t=1}k=x=C;r=s=t}else{if(!z){t=n.nodeIndex(y)}else{C=y.firstChild;t=1}x=C;s=t}if(!z){B=y.previousSibling;A=y.nextSibling;e(d.grep(y.childNodes),function(E){if(E.nodeType==3){E.nodeValue=E.nodeValue.replace(/\uFEFF/g,"")}});while(y=n.get(q.id+"_"+D)){n.remove(y,1)}if(B&&A&&B.nodeType==A.nodeType&&B.nodeType==3&&!d.isOpera){t=B.nodeValue.length;B.appendData(A.nodeValue);n.remove(A);if(D=="start"){k=x=B;r=s=t}else{x=B;s=t}}}}}function o(t){if(n.isBlock(t)&&!t.innerHTML&&!b){t.innerHTML='
    '}return t}if(q){if(q.start){g=n.createRng();u=n.getRoot();if(v.tridentSel){return v.tridentSel.moveToBookmark(q)}if(h(true)&&h()){v.setRng(g)}}else{if(q.id){m("start");m("end");if(k){g=n.createRng();g.setStart(o(k),r);g.setEnd(o(x),s);v.setRng(g)}}else{if(q.name){v.select(n.select(q.name)[q.index])}else{if(q.rng){g=q.rng;if(g.startContainer){i=v.dom.createRng();try{i.setStart(g.startContainer,g.startOffset);i.setEnd(g.endContainer,g.endOffset)}catch(p){}g=i}v.setRng(g)}}}}}},select:function(l,k){var j=this,m=j.dom,h=m.createRng(),g;function i(n,p){var o=new a(n,n);do{if(n.nodeType==3&&d.trim(n.nodeValue).length!==0){if(p){h.setStart(n,0)}else{h.setEnd(n,n.nodeValue.length)}return}if(n.nodeName=="BR"){if(p){h.setStartBefore(n)}else{h.setEndBefore(n)}return}}while(n=(p?o.next():o.prev()))}if(l){g=m.nodeIndex(l);h.setStart(l.parentNode,g);h.setEnd(l.parentNode,g+1);if(k){i(l,1);i(l)}j.setRng(h)}return l},isCollapsed:function(){var g=this,i=g.getRng(),h=g.getSel();if(!i||i.item){return false}if(i.compareEndPoints){return i.compareEndPoints("StartToEnd",i)===0}return !h||i.collapsed},collapse:function(g){var i=this,h=i.getRng(),j;if(h.item){j=h.item(0);h=i.win.document.body.createTextRange();h.moveToElementText(j)}h.collapse(!!g);i.setRng(h)},getSel:function(){var h=this,g=this.win;return g.getSelection?g.getSelection():g.document.selection},getRng:function(m){var h=this,j,g,l,k=h.win.document;if(m&&h.tridentSel){return h.tridentSel.getRangeAt(0)}try{if(j=h.getSel()){g=j.rangeCount>0?j.getRangeAt(0):(j.createRange?j.createRange():k.createRange())}}catch(i){}if(d.isIE&&!d.isIE11&&g&&g.setStart&&k.selection.createRange().item){l=k.selection.createRange().item(0);g=k.createRange();g.setStartBefore(l);g.setEndAfter(l)}if(!g){g=k.createRange?k.createRange():k.body.createTextRange()}if(g.setStart&&g.startContainer.nodeType===9&&g.collapsed){l=h.dom.getRoot();g.setStart(l,0);g.setEnd(l,0)}if(h.selectedRange&&h.explicitRange){if(g.compareBoundaryPoints(g.START_TO_START,h.selectedRange)===0&&g.compareBoundaryPoints(g.END_TO_END,h.selectedRange)===0){g=h.explicitRange}else{h.selectedRange=null;h.explicitRange=null}}return g},setRng:function(k,g){var j,i=this;if(!i.tridentSel){j=i.getSel();if(j){i.explicitRange=k;try{j.removeAllRanges()}catch(h){}j.addRange(k);if(g===false&&j.extend){j.collapse(k.endContainer,k.endOffset);j.extend(k.startContainer,k.startOffset)}i.selectedRange=j.rangeCount>0?j.getRangeAt(0):null}}else{if(k.cloneRange){try{i.tridentSel.addRange(k);return}catch(h){}}try{k.select()}catch(h){}}},setNode:function(h){var g=this;g.setContent(g.dom.getOuterHTML(h));return h},getNode:function(){var i=this,h=i.getRng(),j=i.getSel(),m,l=h.startContainer,g=h.endContainer;function k(q,o){var p=q;while(q&&q.nodeType===3&&q.length===0){q=o?q.nextSibling:q.previousSibling}return q||p}if(!h){return i.dom.getRoot()}if(h.setStart){m=h.commonAncestorContainer;if(!h.collapsed){if(h.startContainer==h.endContainer){if(h.endOffset-h.startOffset<2){if(h.startContainer.hasChildNodes()){m=h.startContainer.childNodes[h.startOffset]}}}if(l.nodeType===3&&g.nodeType===3){if(l.length===h.startOffset){l=k(l.nextSibling,true)}else{l=l.parentNode}if(h.endOffset===0){g=k(g.previousSibling,false)}else{g=g.parentNode}if(l&&l===g){return l}}}if(m&&m.nodeType==3){return m.parentNode}return m}return h.item?h.item(0):h.parentElement()},getSelectedBlocks:function(p,h){var o=this,k=o.dom,m,l,i,j=[];m=k.getParent(p||o.getStart(),k.isBlock);l=k.getParent(h||o.getEnd(),k.isBlock);if(m){j.push(m)}if(m&&l&&m!=l){i=m;var g=new a(m,k.getRoot());while((i=g.next())&&i!=l){if(k.isBlock(i)){j.push(i)}}}if(l&&m!=l){j.push(l)}return j},isForward:function(){var i=this.dom,g=this.getSel(),j,h;if(!g||g.anchorNode==null||g.focusNode==null){return true}j=i.createRng();j.setStart(g.anchorNode,g.anchorOffset);j.collapse(true);h=i.createRng();h.setStart(g.focusNode,g.focusOffset);h.collapse(true);return j.compareBoundaryPoints(j.START_TO_START,h)<=0},normalize:function(){var h=this,g,m,l,j,i;function k(p){var o,r,n,s=h.dom,u=s.getRoot(),q,t,v;function y(z,A){var B=new a(z,s.getParent(z.parentNode,s.isBlock)||u);while(z=B[A?"prev":"next"]()){if(z.nodeName==="BR"){return true}}}function x(B,z){var C,A;z=z||o;C=new a(z,s.getParent(z.parentNode,s.isBlock)||u);while(q=C[B?"prev":"next"]()){if(q.nodeType===3&&q.nodeValue.length>0){o=q;r=B?q.nodeValue.length:0;m=true;return}if(s.isBlock(q)||t[q.nodeName.toLowerCase()]){return}A=q}if(l&&A){o=A;m=true;r=0}}o=g[(p?"start":"end")+"Container"];r=g[(p?"start":"end")+"Offset"];t=s.schema.getNonEmptyElements();if(o.nodeType===9){o=s.getRoot();r=0}if(o===u){if(p){q=o.childNodes[r>0?r-1:0];if(q){v=q.nodeName.toLowerCase();if(t[q.nodeName]||q.nodeName=="TABLE"){return}}}if(o.hasChildNodes()){o=o.childNodes[Math.min(!p&&r>0?r-1:r,o.childNodes.length-1)];r=0;if(o.hasChildNodes()&&!/TABLE/.test(o.nodeName)){q=o;n=new a(o,u);do{if(q.nodeType===3&&q.nodeValue.length>0){r=p?0:q.nodeValue.length;o=q;m=true;break}if(t[q.nodeName.toLowerCase()]){r=s.nodeIndex(q);o=q.parentNode;if(q.nodeName=="IMG"&&!p){r++}m=true;break}}while(q=(p?n.next():n.prev()))}}}if(l){if(o.nodeType===3&&r===0){x(true)}if(o.nodeType===1){q=o.childNodes[r];if(q&&q.nodeName==="BR"&&!y(q)&&!y(q,true)){x(true,o.childNodes[r])}}}if(p&&!l&&o.nodeType===3&&r===o.nodeValue.length){x(false)}if(m){g["set"+(p?"Start":"End")](o,r)}}if(d.isIE){return}g=h.getRng();l=g.collapsed;k(true);if(!l){k()}if(m){if(l){g.collapse(true)}h.setRng(g,h.isForward())}},selectorChanged:function(g,j){var h=this,i;if(!h.selectorChangedData){h.selectorChangedData={};i={};h.editor.onNodeChange.addToTop(function(l,k,o){var p=h.dom,m=p.getParents(o,null,p.getRoot()),n={};e(h.selectorChangedData,function(r,q){e(m,function(s){if(p.is(s,q)){if(!i[q]){e(r,function(t){t(true,{node:s,selector:q,parents:m})});i[q]=r}n[q]=r;return false}})});e(i,function(r,q){if(!n[q]){delete i[q];e(r,function(s){s(false,{node:o,selector:q,parents:m})})}})})}if(!h.selectorChangedData[g]){h.selectorChangedData[g]=[]}h.selectorChangedData[g].push(j);return h},scrollIntoView:function(k){var j,h,g=this,i=g.dom;h=i.getViewPort(g.editor.getWin());j=i.getPos(k).y;if(jh.y+h.h){g.editor.getWin().scrollTo(0,j0){p.setEndPoint("StartToStart",o)}else{p.setEndPoint("EndToEnd",o)}p.select()}}else{l()}}function l(){var p=n.selection.createRange();if(o&&!p.item&&p.compareEndPoints("StartToEnd",p)===0){o.select()}h.unbind(n,"mouseup",l);h.unbind(n,"mousemove",m);o=k=0}n.documentElement.unselectable=true;h.bind(n,["mousedown","contextmenu"],function(p){if(p.target.nodeName==="HTML"){if(k){l()}g=n.documentElement;if(g.scrollHeight>g.clientHeight){return}k=1;o=j(p.x,p.y);if(o){h.bind(n,"mouseup",l);h.bind(n,"mousemove",m);h.win.focus();o.select()}}})}})})(tinymce);(function(a){a.dom.Serializer=function(e,i,f){var h,b,d=a.isIE,g=a.each,c;if(!e.apply_source_formatting){e.indent=false}i=i||a.DOM;f=f||new a.html.Schema(e);e.entity_encoding=e.entity_encoding||"named";e.remove_trailing_brs="remove_trailing_brs" in e?e.remove_trailing_brs:true;h=new a.util.Dispatcher(self);b=new a.util.Dispatcher(self);c=new a.html.DomParser(e,f);c.addAttributeFilter("src,href,style",function(k,j){var o=k.length,l,q,n="data-mce-"+j,p=e.url_converter,r=e.url_converter_scope,m;while(o--){l=k[o];q=l.attributes.map[n];if(q!==m){l.attr(j,q.length>0?q:null);l.attr(n,null)}else{q=l.attributes.map[j];if(j==="style"){q=i.serializeStyle(i.parseStyle(q),l.name)}else{if(p){q=p.call(r,q,j,l.name)}}l.attr(j,q.length>0?q:null)}}});c.addAttributeFilter("class",function(j,k){var l=j.length,m,n;while(l--){m=j[l];n=m.attr("class").replace(/(?:^|\s)mce(Item\w+|Selected)(?!\S)/g,"");m.attr("class",n.length>0?n:null)}});c.addAttributeFilter("data-mce-type",function(j,l,k){var m=j.length,n;while(m--){n=j[m];if(n.attributes.map["data-mce-type"]==="bookmark"&&!k.cleanup){n.remove()}}});c.addAttributeFilter("data-mce-expando",function(j,l,k){var m=j.length;while(m--){j[m].attr(l,null)}});c.addNodeFilter("noscript",function(j){var k=j.length,l;while(k--){l=j[k].firstChild;if(l){l.value=a.html.Entities.decode(l.value)}}});c.addNodeFilter("script,style",function(k,l){var m=k.length,n,o;function j(p){return p.replace(/()/g,"\n").replace(/^[\r\n]*|[\r\n]*$/g,"").replace(/^\s*(()?|\s*\/\/\s*\]\]>(-->)?|\/\/\s*(-->)?|\]\]>|\/\*\s*-->\s*\*\/|\s*-->\s*)\s*$/g,"")}while(m--){n=k[m];o=n.firstChild?n.firstChild.value:"";if(l==="script"){n.attr("type",(n.attr("type")||"text/javascript").replace(/^mce\-/,""));if(o.length>0){n.firstChild.value="// "}}else{if(o.length>0){n.firstChild.value=""}}}});c.addNodeFilter("#comment",function(j,k){var l=j.length,m;while(l--){m=j[l];if(m.value.indexOf("[CDATA[")===0){m.name="#cdata";m.type=4;m.value=m.value.replace(/^\[CDATA\[|\]\]$/g,"")}else{if(m.value.indexOf("mce:protected ")===0){m.name="#text";m.type=3;m.raw=true;m.value=unescape(m.value).substr(14)}}}});c.addNodeFilter("xml:namespace,input",function(j,k){var l=j.length,m;while(l--){m=j[l];if(m.type===7){m.remove()}else{if(m.type===1){if(k==="input"&&!("type" in m.attributes.map)){m.attr("type","text")}}}}});if(e.fix_list_elements){c.addNodeFilter("ul,ol",function(k,l){var m=k.length,n,j;while(m--){n=k[m];j=n.parent;if(j.name==="ul"||j.name==="ol"){if(n.prev&&n.prev.name==="li"){n.prev.append(n)}}}})}c.addAttributeFilter("data-mce-src,data-mce-href,data-mce-style",function(j,k){var l=j.length;while(l--){j[l].attr(k,null)}});return{schema:f,addNodeFilter:c.addNodeFilter,addAttributeFilter:c.addAttributeFilter,onPreProcess:h,onPostProcess:b,serialize:function(o,m){var l,p,k,j,n;if(d&&i.select("script,style,select,map").length>0){n=o.innerHTML;o=o.cloneNode(false);i.setHTML(o,n)}else{o=o.cloneNode(true)}l=o.ownerDocument.implementation;if(l.createHTMLDocument){p=l.createHTMLDocument("");g(o.nodeName=="BODY"?o.childNodes:[o],function(q){p.body.appendChild(p.importNode(q,true))});if(o.nodeName!="BODY"){o=p.body.firstChild}else{o=p.body}k=i.doc;i.doc=p}m=m||{};m.format=m.format||"html";if(!m.no_events){m.node=o;h.dispatch(self,m)}j=new a.html.Serializer(e,f);m.content=j.serialize(c.parse(a.trim(m.getInner?o.innerHTML:i.getOuterHTML(o)),m));if(!m.cleanup){m.content=m.content.replace(/\uFEFF/g,"")}if(!m.no_events){b.dispatch(self,m)}if(k){i.doc=k}m.node=null;return m.content},addRules:function(j){f.addValidElements(j)},setRules:function(j){f.setValidElements(j)}}}})(tinymce);(function(a){a.dom.ScriptLoader=function(h){var c=0,k=1,i=2,l={},j=[],e={},d=[],g=0,f;function b(m,v){var x=this,q=a.DOM,s,o,r,n;function p(){q.remove(n);if(s){s.onreadystatechange=s.onload=s=null}v()}function u(){if(typeof(console)!=="undefined"&&console.log){console.log("Failed to load: "+m)}}n=q.uniqueId();if(a.isIE6){o=new a.util.URI(m);r=location;if(o.host==r.hostname&&o.port==r.port&&(o.protocol+":")==r.protocol&&o.protocol.toLowerCase()!="file"){a.util.XHR.send({url:a._addVer(o.getURI()),success:function(y){var t=q.create("script",{type:"text/javascript"});t.text=y;document.getElementsByTagName("head")[0].appendChild(t);q.remove(t);p()},error:u});return}}s=document.createElement("script");s.id=n;s.type="text/javascript";s.src=a._addVer(m);if(!a.isIE||a.isIE11){s.onload=p}s.onerror=u;if(!a.isOpera){s.onreadystatechange=function(){var t=s.readyState;if(t=="complete"||t=="loaded"){p()}}}(document.getElementsByTagName("head")[0]||document.body).appendChild(s)}this.isDone=function(m){return l[m]==i};this.markDone=function(m){l[m]=i};this.add=this.load=function(m,q,n){var o,p=l[m];if(p==f){j.push(m);l[m]=c}if(q){if(!e[m]){e[m]=[]}e[m].push({func:q,scope:n||this})}};this.loadQueue=function(n,m){this.loadScripts(j,n,m)};this.loadScripts=function(m,q,p){var o;function n(r){a.each(e[r],function(s){s.func.call(s.scope)});e[r]=f}d.push({func:q,scope:p||this});o=function(){var r=a.grep(m);m.length=0;a.each(r,function(s){if(l[s]==i){n(s);return}if(l[s]!=k){l[s]=k;g++;b(s,function(){l[s]=i;g--;n(s);o()})}});if(!g){a.each(d,function(s){s.func.call(s.scope)});d.length=0}};o()}};a.ScriptLoader=new a.dom.ScriptLoader()})(tinymce);(function(a){a.dom.RangeUtils=function(c){var b="\uFEFF";this.walk=function(d,s){var i=d.startContainer,l=d.startOffset,t=d.endContainer,m=d.endOffset,j,g,o,h,r,q,e;e=c.select("td.mceSelected,th.mceSelected");if(e.length>0){a.each(e,function(u){s([u])});return}function f(u){var v;v=u[0];if(v.nodeType===3&&v===i&&l>=v.nodeValue.length){u.splice(0,1)}v=u[u.length-1];if(m===0&&u.length>0&&v===t&&v.nodeType===3){u.splice(u.length-1,1)}return u}function p(x,v,u){var y=[];for(;x&&x!=u;x=x[v]){y.push(x)}return y}function n(v,u){do{if(v.parentNode==u){return v}v=v.parentNode}while(v)}function k(x,v,y){var u=y?"nextSibling":"previousSibling";for(h=x,r=h.parentNode;h&&h!=v;h=r){r=h.parentNode;q=p(h==x?h:h[u],u);if(q.length){if(!y){q.reverse()}s(f(q))}}}if(i.nodeType==1&&i.hasChildNodes()){i=i.childNodes[l]}if(t.nodeType==1&&t.hasChildNodes()){t=t.childNodes[Math.min(m-1,t.childNodes.length-1)]}if(i==t){return s(f([i]))}j=c.findCommonAncestor(i,t);for(h=i;h;h=h.parentNode){if(h===t){return k(i,j,true)}if(h===j){break}}for(h=t;h;h=h.parentNode){if(h===i){return k(t,j)}if(h===j){break}}g=n(i,j)||i;o=n(t,j)||t;k(i,g,true);q=p(g==i?g:g.nextSibling,"nextSibling",o==t?o.nextSibling:o);if(q.length){s(f(q))}k(t,o)};this.split=function(e){var h=e.startContainer,d=e.startOffset,i=e.endContainer,g=e.endOffset;function f(j,k){return j.splitText(k)}if(h==i&&h.nodeType==3){if(d>0&&dd){g=g-d;h=i=f(i,g).previousSibling;g=i.nodeValue.length;d=0}else{g=0}}}else{if(h.nodeType==3&&d>0&&d0&&g=m.length){r=0}}t=m[r];f.setAttrib(g,"tabindex","-1");f.setAttrib(t.id,"tabindex","0");f.get(t.id).focus();if(e.actOnFocus){e.onAction(t.id)}if(s){a.cancel(s)}};p=function(z){var v=37,u=39,y=38,A=40,r=27,t=14,s=13,x=32;switch(z.keyCode){case v:if(i){q.moveFocus(-1)}a.cancel(z);break;case u:if(i){q.moveFocus(1)}a.cancel(z);break;case y:if(o){q.moveFocus(-1)}a.cancel(z);break;case A:if(o){q.moveFocus(1)}a.cancel(z);break;case r:if(e.onCancel){e.onCancel();a.cancel(z)}break;case t:case s:case x:if(e.onAction){e.onAction(g);a.cancel(z)}break}};c(m,function(t,r){var s,u;if(!t.id){t.id=f.uniqueId("_mce_item_")}u=f.get(t.id);if(l){f.bind(u,"blur",h);s="-1"}else{s=(r===0?"0":"-1")}u.setAttribute("tabindex",s);f.bind(u,"focus",k)});if(m[0]){g=m[0].id}f.setAttrib(n,"tabindex","-1");var j=f.get(n);f.bind(j,"focus",d);f.bind(j,"keydown",p)}})})(tinymce);(function(c){var b=c.DOM,a=c.is;c.create("tinymce.ui.Control",{Control:function(f,e,d){this.id=f;this.settings=e=e||{};this.rendered=false;this.onRender=new c.util.Dispatcher(this);this.classPrefix="";this.scope=e.scope||this;this.disabled=0;this.active=0;this.editor=d},setAriaProperty:function(f,e){var d=b.get(this.id+"_aria")||b.get(this.id);if(d){b.setAttrib(d,"aria-"+f,!!e)}},focus:function(){b.get(this.id).focus()},setDisabled:function(d){if(d!=this.disabled){this.setAriaProperty("disabled",d);this.setState("Disabled",d);this.setState("Enabled",!d);this.disabled=d}},isDisabled:function(){return this.disabled},setActive:function(d){if(d!=this.active){this.setState("Active",d);this.active=d;this.setAriaProperty("pressed",d)}},isActive:function(){return this.active},setState:function(f,d){var e=b.get(this.id);f=this.classPrefix+f;if(d){b.addClass(e,f)}else{b.removeClass(e,f)}},isRendered:function(){return this.rendered},renderHTML:function(){},renderTo:function(d){b.setHTML(d,this.renderHTML())},postRender:function(){var e=this,d;if(a(e.disabled)){d=e.disabled;e.disabled=-1;e.setDisabled(d)}if(a(e.active)){d=e.active;e.active=-1;e.setActive(d)}},remove:function(){b.remove(this.id);this.destroy()},destroy:function(){c.dom.Event.clear(this.id)}})})(tinymce);tinymce.create("tinymce.ui.Container:tinymce.ui.Control",{Container:function(c,b,a){this.parent(c,b,a);this.controls=[];this.lookup={}},add:function(a){this.lookup[a.id]=a;this.controls.push(a);return a},get:function(a){return this.lookup[a]}});tinymce.create("tinymce.ui.Separator:tinymce.ui.Control",{Separator:function(b,a){this.parent(b,a);this.classPrefix="mceSeparator";this.setDisabled(true)},renderHTML:function(){return tinymce.DOM.createHTML("span",{"class":this.classPrefix,role:"separator","aria-orientation":"vertical",tabindex:"-1"})}});(function(d){var c=d.is,b=d.DOM,e=d.each,a=d.walk;d.create("tinymce.ui.MenuItem:tinymce.ui.Control",{MenuItem:function(g,f){this.parent(g,f);this.classPrefix="mceMenuItem"},setSelected:function(f){this.setState("Selected",f);this.setAriaProperty("checked",!!f);this.selected=f},isSelected:function(){return this.selected},postRender:function(){var f=this;f.parent();if(c(f.selected)){f.setSelected(f.selected)}}})})(tinymce);(function(d){var c=d.is,b=d.DOM,e=d.each,a=d.walk;d.create("tinymce.ui.Menu:tinymce.ui.MenuItem",{Menu:function(h,g){var f=this;f.parent(h,g);f.items={};f.collapsed=false;f.menuCount=0;f.onAddItem=new d.util.Dispatcher(this)},expand:function(g){var f=this;if(g){a(f,function(h){if(h.expand){h.expand()}},"items",f)}f.collapsed=false},collapse:function(g){var f=this;if(g){a(f,function(h){if(h.collapse){h.collapse()}},"items",f)}f.collapsed=true},isCollapsed:function(){return this.collapsed},add:function(f){if(!f.settings){f=new d.ui.MenuItem(f.id||b.uniqueId(),f)}this.onAddItem.dispatch(this,f);return this.items[f.id]=f},addSeparator:function(){return this.add({separator:true})},addMenu:function(f){if(!f.collapse){f=this.createMenu(f)}this.menuCount++;return this.add(f)},hasMenus:function(){return this.menuCount!==0},remove:function(f){delete this.items[f.id]},removeAll:function(){var f=this;a(f,function(g){if(g.removeAll){g.removeAll()}else{g.remove()}g.destroy()},"items",f);f.items={}},createMenu:function(g){var f=new d.ui.Menu(g.id||b.uniqueId(),g);f.onAddItem.add(this.onAddItem.dispatch,this.onAddItem);return f}})})(tinymce);(function(e){var d=e.is,c=e.DOM,f=e.each,a=e.dom.Event,b=e.dom.Element;e.create("tinymce.ui.DropMenu:tinymce.ui.Menu",{DropMenu:function(h,g){g=g||{};g.container=g.container||c.doc.body;g.offset_x=g.offset_x||0;g.offset_y=g.offset_y||0;g.vp_offset_x=g.vp_offset_x||0;g.vp_offset_y=g.vp_offset_y||0;if(d(g.icons)&&!g.icons){g["class"]+=" mceNoIcons"}this.parent(h,g);this.onShowMenu=new e.util.Dispatcher(this);this.onHideMenu=new e.util.Dispatcher(this);this.classPrefix="mceMenu"},createMenu:function(j){var h=this,i=h.settings,g;j.container=j.container||i.container;j.parent=h;j.constrain=j.constrain||i.constrain;j["class"]=j["class"]||i["class"];j.vp_offset_x=j.vp_offset_x||i.vp_offset_x;j.vp_offset_y=j.vp_offset_y||i.vp_offset_y;j.keyboard_focus=i.keyboard_focus;g=new e.ui.DropMenu(j.id||c.uniqueId(),j);g.onAddItem.add(h.onAddItem.dispatch,h.onAddItem);return g},focus:function(){var g=this;if(g.keyboardNav){g.keyboardNav.focus()}},update:function(){var i=this,j=i.settings,g=c.get("menu_"+i.id+"_tbl"),l=c.get("menu_"+i.id+"_co"),h,k;h=j.max_width?Math.min(g.offsetWidth,j.max_width):g.offsetWidth;k=j.max_height?Math.min(g.offsetHeight,j.max_height):g.offsetHeight;if(!c.boxModel){i.element.setStyles({width:h+2,height:k+2})}else{i.element.setStyles({width:h,height:k})}if(j.max_width){c.setStyle(l,"width",h)}if(j.max_height){c.setStyle(l,"height",k);if(g.clientHeightv){p=r?r-u:Math.max(0,(v-A.vp_offset_x)-u)}if((n+A.vp_offset_y+l)>q){n=Math.max(0,(q-A.vp_offset_y)-l)}}c.setStyles(o,{left:p,top:n});z.element.update();z.isMenuVisible=1;z.mouseClickFunc=a.add(o,"click",function(s){var h;s=s.target;if(s&&(s=c.getParent(s,"tr"))&&!c.hasClass(s,m+"ItemSub")){h=z.items[s.id];if(h.isDisabled()){return}k=z;while(k){if(k.hideMenu){k.hideMenu()}k=k.settings.parent}if(h.settings.onclick){h.settings.onclick(s)}return false}});if(z.hasMenus()){z.mouseOverFunc=a.add(o,"mouseover",function(x){var h,t,s;x=x.target;if(x&&(x=c.getParent(x,"tr"))){h=z.items[x.id];if(z.lastMenu){z.lastMenu.collapse(1)}if(h.isDisabled()){return}if(x&&c.hasClass(x,m+"ItemSub")){t=c.getRect(x);h.showMenu((t.x+t.w-i),t.y-i,t.x);z.lastMenu=h;c.addClass(c.get(h.id).firstChild,m+"ItemActive")}}})}a.add(o,"keydown",z._keyHandler,z);z.onShowMenu.dispatch(z);if(A.keyboard_focus){z._setupKeyboardNav()}},hideMenu:function(j){var g=this,i=c.get("menu_"+g.id),h;if(!g.isMenuVisible){return}if(g.keyboardNav){g.keyboardNav.destroy()}a.remove(i,"mouseover",g.mouseOverFunc);a.remove(i,"click",g.mouseClickFunc);a.remove(i,"keydown",g._keyHandler);c.hide(i);g.isMenuVisible=0;if(!j){g.collapse(1)}if(g.element){g.element.hide()}if(h=c.get(g.id)){c.removeClass(h.firstChild,g.classPrefix+"ItemActive")}g.onHideMenu.dispatch(g)},add:function(i){var g=this,h;i=g.parent(i);if(g.isRendered&&(h=c.get("menu_"+g.id))){g._add(c.select("tbody",h)[0],i)}return i},collapse:function(g){this.parent(g);this.hideMenu(1)},remove:function(g){c.remove(g.id);this.destroy();return this.parent(g)},destroy:function(){var g=this,h=c.get("menu_"+g.id);if(g.keyboardNav){g.keyboardNav.destroy()}a.remove(h,"mouseover",g.mouseOverFunc);a.remove(c.select("a",h),"focus",g.mouseOverFunc);a.remove(h,"click",g.mouseClickFunc);a.remove(h,"keydown",g._keyHandler);if(g.element){g.element.remove()}c.remove(h)},renderNode:function(){var i=this,j=i.settings,l,h,k,g;g=c.create("div",{role:"listbox",id:"menu_"+i.id,"class":j["class"],style:"position:absolute;left:0;top:0;z-index:200000;outline:0"});if(i.settings.parent){c.setAttrib(g,"aria-parent","menu_"+i.settings.parent.id)}k=c.add(g,"div",{role:"presentation",id:"menu_"+i.id+"_co","class":i.classPrefix+(j["class"]?" "+j["class"]:"")});i.element=new b("menu_"+i.id,{blocker:1,container:j.container});if(j.menu_line){c.add(k,"span",{"class":i.classPrefix+"Line"})}l=c.add(k,"table",{role:"presentation",id:"menu_"+i.id+"_tbl",border:0,cellPadding:0,cellSpacing:0});h=c.add(l,"tbody");f(i.items,function(m){i._add(h,m)});i.rendered=true;return g},_setupKeyboardNav:function(){var i,h,g=this;i=c.get("menu_"+g.id);h=c.select("a[role=option]","menu_"+g.id);h.splice(0,0,i);g.keyboardNav=new e.ui.KeyboardNavigation({root:"menu_"+g.id,items:h,onCancel:function(){g.hideMenu()},enableUpDown:true});i.focus()},_keyHandler:function(g){var h=this,i;switch(g.keyCode){case 37:if(h.settings.parent){h.hideMenu();h.settings.parent.focus();a.cancel(g)}break;case 39:if(h.mouseOverFunc){h.mouseOverFunc(g)}break}},_add:function(j,h){var i,q=h.settings,p,l,k,m=this.classPrefix,g;if(q.separator){l=c.add(j,"tr",{id:h.id,"class":m+"ItemSeparator"});c.add(l,"td",{"class":m+"ItemSeparator"});if(i=l.previousSibling){c.addClass(i,"mceLast")}return}i=l=c.add(j,"tr",{id:h.id,"class":m+"Item "+m+"ItemEnabled"});i=k=c.add(i,q.titleItem?"th":"td");i=p=c.add(i,"a",{id:h.id+"_aria",role:q.titleItem?"presentation":"option",href:"javascript:;",onclick:"return false;",onmousedown:"return false;"});if(q.parent){c.setAttrib(p,"aria-haspopup","true");c.setAttrib(p,"aria-owns","menu_"+h.id)}c.addClass(k,q["class"]);g=c.add(i,"span",{"class":"mceIcon"+(q.icon?" mce_"+q.icon:"")});if(q.icon_src){c.add(g,"img",{src:q.icon_src})}i=c.add(i,q.element||"span",{"class":"mceText",title:h.settings.title},h.settings.title);if(h.settings.style){if(typeof h.settings.style=="function"){h.settings.style=h.settings.style()}c.setAttrib(i,"style",h.settings.style)}if(j.childNodes.length==1){c.addClass(l,"mceFirst")}if((i=l.previousSibling)&&c.hasClass(i,m+"ItemSeparator")){c.addClass(l,"mceFirst")}if(h.collapse){c.addClass(l,m+"ItemSub")}if(i=l.previousSibling){c.removeClass(i,"mceLast")}c.addClass(l,"mceLast")}})})(tinymce);(function(b){var a=b.DOM;b.create("tinymce.ui.Button:tinymce.ui.Control",{Button:function(e,d,c){this.parent(e,d,c);this.classPrefix="mceButton"},renderHTML:function(){var f=this.classPrefix,e=this.settings,d,c;c=a.encode(e.label||"");d='';if(e.image&&!(this.editor&&this.editor.forcedHighContrastMode)){d+=''+a.encode(e.title)+''+(c?''+c+"":"")}else{d+=''+(c?''+c+"":"")}d+='";d+="";return d},postRender:function(){var d=this,e=d.settings,c;if(b.isIE&&d.editor){b.dom.Event.add(d.id,"mousedown",function(f){var g=d.editor.selection.getNode().nodeName;c=g==="IMG"?d.editor.selection.getBookmark():null})}b.dom.Event.add(d.id,"click",function(f){if(!d.isDisabled()){if(b.isIE&&d.editor&&c!==null){d.editor.selection.moveToBookmark(c)}return e.onclick.call(e.scope,f)}});b.dom.Event.add(d.id,"keydown",function(f){if(!d.isDisabled()&&f.keyCode==b.VK.SPACEBAR){b.dom.Event.cancel(f);return e.onclick.call(e.scope,f)}})}})})(tinymce);(function(e){var d=e.DOM,b=e.dom.Event,f=e.each,a=e.util.Dispatcher,c;e.create("tinymce.ui.ListBox:tinymce.ui.Control",{ListBox:function(j,i,g){var h=this;h.parent(j,i,g);h.items=[];h.onChange=new a(h);h.onPostRender=new a(h);h.onAdd=new a(h);h.onRenderMenu=new e.util.Dispatcher(this);h.classPrefix="mceListBox";h.marked={}},select:function(h){var g=this,j,i;g.marked={};if(h==c){return g.selectByIndex(-1)}if(h&&typeof(h)=="function"){i=h}else{i=function(k){return k==h}}if(h!=g.selectedValue){f(g.items,function(l,k){if(i(l.value)){j=1;g.selectByIndex(k);return false}});if(!j){g.selectByIndex(-1)}}},selectByIndex:function(g){var i=this,j,k,h;i.marked={};if(g!=i.selectedIndex){j=d.get(i.id+"_text");h=d.get(i.id+"_voiceDesc");k=i.items[g];if(k){i.selectedValue=k.value;i.selectedIndex=g;d.setHTML(j,d.encode(k.title));d.setHTML(h,i.settings.title+" - "+k.title);d.removeClass(j,"mceTitle");d.setAttrib(i.id,"aria-valuenow",k.title)}else{d.setHTML(j,d.encode(i.settings.title));d.setHTML(h,d.encode(i.settings.title));d.addClass(j,"mceTitle");i.selectedValue=i.selectedIndex=null;d.setAttrib(i.id,"aria-valuenow",i.settings.title)}j=0}},mark:function(g){this.marked[g]=true},add:function(j,g,i){var h=this;i=i||{};i=e.extend(i,{title:j,value:g});h.items.push(i);h.onAdd.dispatch(h,i)},getLength:function(){return this.items.length},renderHTML:function(){var j="",g=this,i=g.settings,k=g.classPrefix;j='';j+="";j+="";j+="";return j},showMenu:function(){var h=this,j,i=d.get(this.id),g;if(h.isDisabled()||h.items.length===0){return}if(h.menu&&h.menu.isMenuVisible){return h.hideMenu()}if(!h.isMenuRendered){h.renderMenu();h.isMenuRendered=true}j=d.getPos(i);g=h.menu;g.settings.offset_x=j.x;g.settings.offset_y=j.y;g.settings.keyboard_focus=!e.isOpera;f(h.items,function(k){if(g.items[k.id]){g.items[k.id].setSelected(0)}});f(h.items,function(k){if(g.items[k.id]&&h.marked[k.value]){g.items[k.id].setSelected(1)}if(k.value===h.selectedValue){g.items[k.id].setSelected(1)}});g.showMenu(0,i.clientHeight);b.add(d.doc,"mousedown",h.hideMenu,h);d.addClass(h.id,h.classPrefix+"Selected")},hideMenu:function(h){var g=this;if(g.menu&&g.menu.isMenuVisible){d.removeClass(g.id,g.classPrefix+"Selected");if(h&&h.type=="mousedown"&&(h.target.id==g.id+"_text"||h.target.id==g.id+"_open")){return}if(!h||!d.getParent(h.target,".mceMenu")){d.removeClass(g.id,g.classPrefix+"Selected");b.remove(d.doc,"mousedown",g.hideMenu,g);g.menu.hideMenu()}}},renderMenu:function(){var h=this,g;g=h.settings.control_manager.createDropMenu(h.id+"_menu",{menu_line:1,"class":h.classPrefix+"Menu mceNoIcons",max_width:250,max_height:150});g.onHideMenu.add(function(){h.hideMenu();h.focus()});g.add({title:h.settings.title,"class":"mceMenuItemTitle",onclick:function(){if(h.settings.onselect("")!==false){h.select("")}}});f(h.items,function(i){if(i.value===c){g.add({title:i.title,role:"option","class":"mceMenuItemTitle",onclick:function(){if(h.settings.onselect("")!==false){h.select("")}}})}else{i.id=d.uniqueId();i.role="option";i.onclick=function(){if(h.settings.onselect(i.value)!==false){h.select(i.value)}};g.add(i)}});h.onRenderMenu.dispatch(h,g);h.menu=g},postRender:function(){var g=this,h=g.classPrefix;b.add(g.id,"click",g.showMenu,g);b.add(g.id,"keydown",function(i){if(i.keyCode==32){g.showMenu(i);b.cancel(i)}});b.add(g.id,"focus",function(){if(!g._focused){g.keyDownHandler=b.add(g.id,"keydown",function(i){if(i.keyCode==40){g.showMenu();b.cancel(i)}});g.keyPressHandler=b.add(g.id,"keypress",function(j){var i;if(j.keyCode==13){i=g.selectedValue;g.selectedValue=null;b.cancel(j);g.settings.onselect(i)}})}g._focused=1});b.add(g.id,"blur",function(){b.remove(g.id,"keydown",g.keyDownHandler);b.remove(g.id,"keypress",g.keyPressHandler);g._focused=0});if(e.isIE6||!d.boxModel){b.add(g.id,"mouseover",function(){if(!d.hasClass(g.id,h+"Disabled")){d.addClass(g.id,h+"Hover")}});b.add(g.id,"mouseout",function(){if(!d.hasClass(g.id,h+"Disabled")){d.removeClass(g.id,h+"Hover")}})}g.onPostRender.dispatch(g,d.get(g.id))},destroy:function(){this.parent();b.clear(this.id+"_text");b.clear(this.id+"_open")}})})(tinymce);(function(e){var d=e.DOM,b=e.dom.Event,f=e.each,a=e.util.Dispatcher,c;e.create("tinymce.ui.NativeListBox:tinymce.ui.ListBox",{NativeListBox:function(h,g){this.parent(h,g);this.classPrefix="mceNativeListBox"},setDisabled:function(g){d.get(this.id).disabled=g;this.setAriaProperty("disabled",g)},isDisabled:function(){return d.get(this.id).disabled},select:function(h){var g=this,j,i;if(h==c){return g.selectByIndex(-1)}if(h&&typeof(h)=="function"){i=h}else{i=function(k){return k==h}}if(h!=g.selectedValue){f(g.items,function(l,k){if(i(l.value)){j=1;g.selectByIndex(k);return false}});if(!j){g.selectByIndex(-1)}}},selectByIndex:function(g){d.get(this.id).selectedIndex=g+1;this.selectedValue=this.items[g]?this.items[g].value:null},add:function(k,h,g){var j,i=this;g=g||{};g.value=h;if(i.isRendered()){d.add(d.get(this.id),"option",g,k)}j={title:k,value:h,attribs:g};i.items.push(j);i.onAdd.dispatch(i,j)},getLength:function(){return this.items.length},renderHTML:function(){var i,g=this;i=d.createHTML("option",{value:""},"-- "+g.settings.title+" --");f(g.items,function(h){i+=d.createHTML("option",{value:h.value},h.title)});i=d.createHTML("select",{id:g.id,"class":"mceNativeListBox","aria-labelledby":g.id+"_aria"},i);i+=d.createHTML("span",{id:g.id+"_aria",style:"display: none"},g.settings.title);return i},postRender:function(){var h=this,i,j=true;h.rendered=true;function g(l){var k=h.items[l.target.selectedIndex-1];if(k&&(k=k.value)){h.onChange.dispatch(h,k);if(h.settings.onselect){h.settings.onselect(k)}}}b.add(h.id,"change",g);b.add(h.id,"keydown",function(q){var n,p=37,m=39,l=38,r=40,k=13,o=32;b.remove(h.id,"change",i);j=false;n=b.add(h.id,"blur",function(){if(j){return}j=true;b.add(h.id,"change",g);b.remove(h.id,"blur",n)});if(q.keyCode==k||q.keyCode==o){g(q);return b.cancel(q)}else{if(q.keyCode==r||q.keyCode==l){q.stopImmediatePropagation()}}});h.onPostRender.dispatch(h,d.get(h.id))}})})(tinymce);(function(c){var b=c.DOM,a=c.dom.Event,d=c.each;c.create("tinymce.ui.MenuButton:tinymce.ui.Button",{MenuButton:function(g,f,e){this.parent(g,f,e);this.onRenderMenu=new c.util.Dispatcher(this);f.menu_container=f.menu_container||b.doc.body},showMenu:function(){var g=this,j,i,h=b.get(g.id),f;if(g.isDisabled()){return}if(!g.isMenuRendered){g.renderMenu();g.isMenuRendered=true}if(g.isMenuVisible){return g.hideMenu()}j=b.getPos(g.settings.menu_container);i=b.getPos(h);f=g.menu;f.settings.offset_x=i.x;f.settings.offset_y=i.y;f.settings.vp_offset_x=i.x;f.settings.vp_offset_y=i.y;f.settings.keyboard_focus=g._focused;f.showMenu(0,h.firstChild.clientHeight);a.add(b.doc,"mousedown",g.hideMenu,g);g.setState("Selected",1);g.isMenuVisible=1},renderMenu:function(){var f=this,e;e=f.settings.control_manager.createDropMenu(f.id+"_menu",{menu_line:1,"class":this.classPrefix+"Menu",icons:f.settings.icons});e.onHideMenu.add(function(){f.hideMenu();f.focus()});f.onRenderMenu.dispatch(f,e);f.menu=e},hideMenu:function(g){var f=this;if(g&&g.type=="mousedown"&&b.getParent(g.target,function(h){return h.id===f.id||h.id===f.id+"_open"})){return}if(!g||!b.getParent(g.target,".mceMenu")){f.setState("Selected",0);a.remove(b.doc,"mousedown",f.hideMenu,f);if(f.menu){f.menu.hideMenu()}}f.isMenuVisible=0},postRender:function(){var e=this,f=e.settings;a.add(e.id,"click",function(){if(!e.isDisabled()){if(f.onclick){f.onclick(e.value)}e.showMenu()}})}})})(tinymce);(function(c){var b=c.DOM,a=c.dom.Event,d=c.each;c.create("tinymce.ui.SplitButton:tinymce.ui.MenuButton",{SplitButton:function(g,f,e){this.parent(g,f,e);this.classPrefix="mceSplitButton"},renderHTML:function(){var i,f=this,g=f.settings,e;i="";if(g.image){e=b.createHTML("img ",{src:g.image,role:"presentation","class":"mceAction "+g["class"]})}else{e=b.createHTML("span",{"class":"mceAction "+g["class"]},"")}e+=b.createHTML("span",{"class":"mceVoiceLabel mceIconOnly",id:f.id+"_voice",style:"display:none;"},g.title);i+=""+b.createHTML("a",{role:"button",id:f.id+"_action",tabindex:"-1",href:"javascript:;","class":"mceAction "+g["class"],onclick:"return false;",onmousedown:"return false;",title:g.title},e)+"";e=b.createHTML("span",{"class":"mceOpen "+g["class"]},'');i+=""+b.createHTML("a",{role:"button",id:f.id+"_open",tabindex:"-1",href:"javascript:;","class":"mceOpen "+g["class"],onclick:"return false;",onmousedown:"return false;",title:g.title},e)+"";i+="";i=b.createHTML("table",{role:"presentation","class":"mceSplitButton mceSplitButtonEnabled "+g["class"],cellpadding:"0",cellspacing:"0",title:g.title},i);return b.createHTML("div",{id:f.id,role:"button",tabindex:"0","aria-labelledby":f.id+"_voice","aria-haspopup":"true"},i)},postRender:function(){var e=this,g=e.settings,f;if(g.onclick){f=function(h){if(!e.isDisabled()){g.onclick(e.value);a.cancel(h)}};a.add(e.id+"_action","click",f);a.add(e.id,["click","keydown"],function(h){var k=32,m=14,i=13,j=38,l=40;if((h.keyCode===32||h.keyCode===13||h.keyCode===14)&&!h.altKey&&!h.ctrlKey&&!h.metaKey){f();a.cancel(h)}else{if(h.type==="click"||h.keyCode===l){e.showMenu();a.cancel(h)}}})}a.add(e.id+"_open","click",function(h){e.showMenu();a.cancel(h)});a.add([e.id,e.id+"_open"],"focus",function(){e._focused=1});a.add([e.id,e.id+"_open"],"blur",function(){e._focused=0});if(c.isIE6||!b.boxModel){a.add(e.id,"mouseover",function(){if(!b.hasClass(e.id,"mceSplitButtonDisabled")){b.addClass(e.id,"mceSplitButtonHover")}});a.add(e.id,"mouseout",function(){if(!b.hasClass(e.id,"mceSplitButtonDisabled")){b.removeClass(e.id,"mceSplitButtonHover")}})}},destroy:function(){this.parent();a.clear(this.id+"_action");a.clear(this.id+"_open");a.clear(this.id)}})})(tinymce);(function(d){var c=d.DOM,a=d.dom.Event,b=d.is,e=d.each;d.create("tinymce.ui.ColorSplitButton:tinymce.ui.SplitButton",{ColorSplitButton:function(i,h,f){var g=this;g.parent(i,h,f);g.settings=h=d.extend({colors:"000000,993300,333300,003300,003366,000080,333399,333333,800000,FF6600,808000,008000,008080,0000FF,666699,808080,FF0000,FF9900,99CC00,339966,33CCCC,3366FF,800080,999999,FF00FF,FFCC00,FFFF00,00FF00,00FFFF,00CCFF,993366,C0C0C0,FF99CC,FFCC99,FFFF99,CCFFCC,CCFFFF,99CCFF,CC99FF,FFFFFF",grid_width:8,default_color:"#888888"},g.settings);g.onShowMenu=new d.util.Dispatcher(g);g.onHideMenu=new d.util.Dispatcher(g);g.value=h.default_color},showMenu:function(){var f=this,g,j,i,h;if(f.isDisabled()){return}if(!f.isMenuRendered){f.renderMenu();f.isMenuRendered=true}if(f.isMenuVisible){return f.hideMenu()}i=c.get(f.id);c.show(f.id+"_menu");c.addClass(i,"mceSplitButtonSelected");h=c.getPos(i);c.setStyles(f.id+"_menu",{left:h.x,top:h.y+i.firstChild.clientHeight,zIndex:200000});i=0;a.add(c.doc,"mousedown",f.hideMenu,f);f.onShowMenu.dispatch(f);if(f._focused){f._keyHandler=a.add(f.id+"_menu","keydown",function(k){if(k.keyCode==27){f.hideMenu()}});c.select("a",f.id+"_menu")[0].focus()}f.keyboardNav=new d.ui.KeyboardNavigation({root:f.id+"_menu",items:c.select("a",f.id+"_menu"),onCancel:function(){f.hideMenu();f.focus()}});f.keyboardNav.focus();f.isMenuVisible=1},hideMenu:function(g){var f=this;if(f.isMenuVisible){if(g&&g.type=="mousedown"&&c.getParent(g.target,function(h){return h.id===f.id+"_open"})){return}if(!g||!c.getParent(g.target,".mceSplitButtonMenu")){c.removeClass(f.id,"mceSplitButtonSelected");a.remove(c.doc,"mousedown",f.hideMenu,f);a.remove(f.id+"_menu","keydown",f._keyHandler);c.hide(f.id+"_menu")}f.isMenuVisible=0;f.onHideMenu.dispatch();f.keyboardNav.destroy()}},renderMenu:function(){var p=this,h,k=0,q=p.settings,g,j,l,o,f;o=c.add(q.menu_container,"div",{role:"listbox",id:p.id+"_menu","class":q.menu_class+" "+q["class"],style:"position:absolute;left:0;top:-1000px;"});h=c.add(o,"div",{"class":q["class"]+" mceSplitButtonMenu"});c.add(h,"span",{"class":"mceMenuLine"});g=c.add(h,"table",{role:"presentation","class":"mceColorSplitMenu"});j=c.add(g,"tbody");k=0;e(b(q.colors,"array")?q.colors:q.colors.split(","),function(m){m=m.replace(/^#/,"");if(!k--){l=c.add(j,"tr");k=q.grid_width-1}g=c.add(l,"td");var i={href:"javascript:;",style:{backgroundColor:"#"+m},title:p.editor.getLang("colors."+m,m),"data-mce-color":"#"+m};if(!d.isIE){i.role="option"}g=c.add(g,"a",i);if(p.editor.forcedHighContrastMode){g=c.add(g,"canvas",{width:16,height:16,"aria-hidden":"true"});if(g.getContext&&(f=g.getContext("2d"))){f.fillStyle="#"+m;f.fillRect(0,0,16,16)}else{c.remove(g)}}});if(q.more_colors_func){g=c.add(j,"tr");g=c.add(g,"td",{colspan:q.grid_width,"class":"mceMoreColors"});g=c.add(g,"a",{role:"option",id:p.id+"_more",href:"javascript:;",onclick:"return false;","class":"mceMoreColors"},q.more_colors_title);a.add(g,"click",function(i){q.more_colors_func.call(q.more_colors_scope||this);return a.cancel(i)})}c.addClass(h,"mceColorSplitMenu");a.add(p.id+"_menu","mousedown",function(i){return a.cancel(i)});a.add(p.id+"_menu","click",function(i){var m;i=c.getParent(i.target,"a",j);if(i&&i.nodeName.toLowerCase()=="a"&&(m=i.getAttribute("data-mce-color"))){p.setColor(m)}return false});return o},setColor:function(f){this.displayColor(f);this.hideMenu();this.settings.onselect(f)},displayColor:function(g){var f=this;c.setStyle(f.id+"_preview","backgroundColor",g);f.value=g},postRender:function(){var f=this,g=f.id;f.parent();c.add(g+"_action","div",{id:g+"_preview","class":"mceColorPreview"});c.setStyle(f.id+"_preview","backgroundColor",f.value)},destroy:function(){var f=this;f.parent();a.clear(f.id+"_menu");a.clear(f.id+"_more");c.remove(f.id+"_menu");if(f.keyboardNav){f.keyboardNav.destroy()}}})})(tinymce);(function(b){var d=b.DOM,c=b.each,a=b.dom.Event;b.create("tinymce.ui.ToolbarGroup:tinymce.ui.Container",{renderHTML:function(){var f=this,i=[],e=f.controls,j=b.each,g=f.settings;i.push('
    ');i.push("");i.push('");j(e,function(h){i.push(h.renderHTML())});i.push("");i.push("
    ");return i.join("")},focus:function(){var e=this;d.get(e.id).focus()},postRender:function(){var f=this,e=[];c(f.controls,function(g){c(g.controls,function(h){if(h.id){e.push(h)}})});f.keyNav=new b.ui.KeyboardNavigation({root:f.id,items:e,onCancel:function(){if(b.isWebKit){d.get(f.editor.id+"_ifr").focus()}f.editor.focus()},excludeFromTabOrder:!f.settings.tab_focus_toolbar})},destroy:function(){var e=this;e.parent();e.keyNav.destroy();a.clear(e.id)}})})(tinymce);(function(a){var c=a.DOM,b=a.each;a.create("tinymce.ui.Toolbar:tinymce.ui.Container",{renderHTML:function(){var m=this,f="",j,k,n=m.settings,e,d,g,l;l=m.controls;for(e=0;e"))}if(d&&k.ListBox){if(d.Button||d.SplitButton){f+=c.createHTML("td",{"class":"mceToolbarEnd"},c.createHTML("span",null,""))}}if(c.stdMode){f+=''+k.renderHTML()+""}else{f+=""+k.renderHTML()+""}if(g&&k.ListBox){if(g.Button||g.SplitButton){f+=c.createHTML("td",{"class":"mceToolbarStart"},c.createHTML("span",null,""))}}}j="mceToolbarEnd";if(k.Button){j+=" mceToolbarEndButton"}else{if(k.SplitButton){j+=" mceToolbarEndSplitButton"}else{if(k.ListBox){j+=" mceToolbarEndListBox"}}}f+=c.createHTML("td",{"class":j},c.createHTML("span",null,""));return c.createHTML("table",{id:m.id,"class":"mceToolbar"+(n["class"]?" "+n["class"]:""),cellpadding:"0",cellspacing:"0",align:m.settings.align||"",role:"presentation",tabindex:"-1"},""+f+"")}})})(tinymce);(function(b){var a=b.util.Dispatcher,c=b.each;b.create("tinymce.AddOnManager",{AddOnManager:function(){var d=this;d.items=[];d.urls={};d.lookup={};d.onAdd=new a(d)},get:function(d){if(this.lookup[d]){return this.lookup[d].instance}else{return undefined}},dependencies:function(e){var d;if(this.lookup[e]){d=this.lookup[e].dependencies}return d||[]},requireLangPack:function(e){var d=b.settings;if(d&&d.language&&d.language_load!==false){b.ScriptLoader.add(this.urls[e]+"/langs/"+d.language+".js")}},add:function(f,e,d){this.items.push(e);this.lookup[f]={instance:e,dependencies:d};this.onAdd.dispatch(this,f,e);return e},createUrl:function(d,e){if(typeof e==="object"){return e}else{return{prefix:d.prefix,resource:e,suffix:d.suffix}}},addComponents:function(f,d){var e=this.urls[f];b.each(d,function(g){b.ScriptLoader.add(e+"/"+g)})},load:function(j,f,d,h){var g=this,e=f;function i(){var k=g.dependencies(j);b.each(k,function(m){var l=g.createUrl(f,m);g.load(l.resource,l,undefined,undefined)});if(d){if(h){d.call(h)}else{d.call(b.ScriptLoader)}}}if(g.urls[j]){return}if(typeof f==="object"){e=f.prefix+f.resource+f.suffix}if(e.indexOf("/")!==0&&e.indexOf("://")==-1){e=b.baseURL+"/"+e}g.urls[j]=e.substring(0,e.lastIndexOf("/"));if(g.lookup[j]){i()}else{b.ScriptLoader.add(e,i,h)}}});b.PluginManager=new b.AddOnManager();b.ThemeManager=new b.AddOnManager()}(tinymce));(function(j){var g=j.each,d=j.extend,k=j.DOM,i=j.dom.Event,f=j.ThemeManager,b=j.PluginManager,e=j.explode,h=j.util.Dispatcher,a,c=0;j.documentBaseURL=window.location.href.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,"");if(!/[\/\\]$/.test(j.documentBaseURL)){j.documentBaseURL+="/"}j.baseURL=new j.util.URI(j.documentBaseURL).toAbsolute(j.baseURL);j.baseURI=new j.util.URI(j.baseURL);j.onBeforeUnload=new h(j);i.add(window,"beforeunload",function(l){j.onBeforeUnload.dispatch(j,l)});j.onAddEditor=new h(j);j.onRemoveEditor=new h(j);j.EditorManager=d(j,{editors:[],i18n:{},activeEditor:null,init:function(x){var v=this,o,n=j.ScriptLoader,u,l=[],r;function q(t){var s=t.id;if(!s){s=t.name;if(s&&!k.get(s)){s=t.name}else{s=k.uniqueId()}t.setAttribute("id",s)}return s}function m(z,A,t){var y=z[A];if(!y){return}if(j.is(y,"string")){t=y.replace(/\.\w+$/,"");t=t?j.resolve(t):0;y=j.resolve(y)}return y.apply(t||this,Array.prototype.slice.call(arguments,2))}function p(t,s){return s.constructor===RegExp?s.test(t.className):k.hasClass(t,s)}v.settings=x;i.bind(window,"ready",function(){var s,t;m(x,"onpageload");switch(x.mode){case"exact":s=x.elements||"";if(s.length>0){g(e(s),function(y){if(k.get(y)){r=new j.Editor(y,x);l.push(r);r.render(1)}else{g(document.forms,function(z){g(z.elements,function(A){if(A.name===y){y="mce_editor_"+c++;k.setAttrib(A,"id",y);r=new j.Editor(y,x);l.push(r);r.render(1)}})})}})}break;case"textareas":case"specific_textareas":g(k.select("textarea"),function(y){if(x.editor_deselector&&p(y,x.editor_deselector)){return}if(!x.editor_selector||p(y,x.editor_selector)){r=new j.Editor(q(y),x);l.push(r);r.render(1)}});break;default:if(x.types){g(x.types,function(y){g(k.select(y.selector),function(A){var z=new j.Editor(q(A),j.extend({},x,y));l.push(z);z.render(1)})})}else{if(x.selector){g(k.select(x.selector),function(z){var y=new j.Editor(q(z),x);l.push(y);y.render(1)})}}}if(x.oninit){s=t=0;g(l,function(y){t++;if(!y.initialized){y.onInit.add(function(){s++;if(s==t){m(x,"oninit")}})}else{s++}if(s==t){m(x,"oninit")}})}})},get:function(l){if(l===a){return this.editors}if(!this.editors.hasOwnProperty(l)){return a}return this.editors[l]},getInstanceById:function(l){return this.get(l)},add:function(m){var l=this,n=l.editors;n[m.id]=m;n.push(m);l._setActive(m);l.onAddEditor.dispatch(l,m);return m},remove:function(n){var m=this,l,o=m.editors;if(!o[n.id]){return null}delete o[n.id];for(l=0;l':"",visual:n,font_size_style_values:"xx-small,x-small,small,medium,large,x-large,xx-large",font_size_legacy_values:"xx-small,small,medium,large,x-large,xx-large,300%",apply_source_formatting:n,directionality:"ltr",forced_root_block:"p",hidden_input:n,padd_empty_editor:n,render_ui:n,indentation:"30px",fix_table_elements:n,inline_styles:n,convert_fonts_to_spans:n,indent:"simple",indent_before:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,ul,li,area,table,thead,tfoot,tbody,tr,section,article,hgroup,aside,figure,option,optgroup,datalist",indent_after:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,ul,li,area,table,thead,tfoot,tbody,tr,section,article,hgroup,aside,figure,option,optgroup,datalist",validate:n,entity_encoding:"named",url_converter:m.convertURL,url_converter_scope:m,ie7_compat:n},o);m.id=m.editorId=p;m.isNotDirty=false;m.plugins={};m.documentBaseURI=new k.util.URI(o.document_base_url||k.documentBaseURL,{base_uri:tinyMCE.baseURI});m.baseURI=k.baseURI;m.contentCSS=[];m.contentStyles=[];m.setupEvents();m.execCommands={};m.queryStateCommands={};m.queryValueCommands={};m.execCallback("setup",m)},render:function(o){var p=this,q=p.settings,r=p.id,m=k.ScriptLoader;if(!j.domLoaded){j.add(window,"ready",function(){p.render()});return}tinyMCE.settings=q;if(!p.getElement()){return}if(k.isIDevice&&!k.isIOS5){return}if(!/TEXTAREA|INPUT/i.test(p.getElement().nodeName)&&q.hidden_input&&l.getParent(r,"form")){l.insertAfter(l.create("input",{type:"hidden",name:r}),r)}if(!q.content_editable){p.orgVisibility=p.getElement().style.visibility;p.getElement().style.visibility="hidden"}if(k.WindowManager){p.windowManager=new k.WindowManager(p)}if(q.encoding=="xml"){p.onGetContent.add(function(s,t){if(t.save){t.content=l.encode(t.content)}})}if(q.add_form_submit_trigger){p.onSubmit.addToTop(function(){if(p.initialized){p.save();p.isNotDirty=1}})}if(q.add_unload_trigger){p._beforeUnload=tinyMCE.onBeforeUnload.add(function(){if(p.initialized&&!p.destroyed&&!p.isHidden()){p.save({format:"raw",no_events:true})}})}k.addUnload(p.destroy,p);if(q.submit_patch){p.onBeforeRenderUI.add(function(){var s=p.getElement().form;if(!s){return}if(s._mceOldSubmit){return}if(!s.submit.nodeType&&!s.submit.length){p.formElement=s;s._mceOldSubmit=s.submit;s.submit=function(){k.triggerSave();p.isNotDirty=1;return p.formElement._mceOldSubmit(p.formElement)}}s=null})}function n(){if(q.language&&q.language_load!==false){m.add(k.baseURL+"/langs/"+q.language+".js")}if(q.theme&&typeof q.theme!="function"&&q.theme.charAt(0)!="-"&&!h.urls[q.theme]){h.load(q.theme,"themes/"+q.theme+"/editor_template"+k.suffix+".js")}i(g(q.plugins),function(t){if(t&&!c.urls[t]){if(t.charAt(0)=="-"){t=t.substr(1,t.length);var s=c.dependencies(t);i(s,function(v){var u={prefix:"plugins/",resource:v,suffix:"/editor_plugin"+k.suffix+".js"};v=c.createUrl(u,v);c.load(v.resource,v)})}else{if(t=="safari"){return}c.load(t,{prefix:"plugins/",resource:t,suffix:"/editor_plugin"+k.suffix+".js"})}}});m.loadQueue(function(){if(!p.removed){p.init()}})}n()},init:function(){var q,G=this,H=G.settings,D,y,z,C=G.getElement(),p,m,E,v,B,F,x,r=[];k.add(G);H.aria_label=H.aria_label||l.getAttrib(C,"aria-label",G.getLang("aria.rich_text_area"));if(H.theme){if(typeof H.theme!="function"){H.theme=H.theme.replace(/-/,"");p=h.get(H.theme);G.theme=new p();if(G.theme.init){G.theme.init(G,h.urls[H.theme]||k.documentBaseURL.replace(/\/$/,""))}}else{G.theme=H.theme}}function A(s){var t=c.get(s),o=c.urls[s]||k.documentBaseURL.replace(/\/$/,""),n;if(t&&k.inArray(r,s)===-1){i(c.dependencies(s),function(u){A(u)});n=new t(G,o);G.plugins[s]=n;if(n.init){n.init(G,o);r.push(s)}}}i(g(H.plugins.replace(/\-/g,"")),A);if(H.popup_css!==false){if(H.popup_css){H.popup_css=G.documentBaseURI.toAbsolute(H.popup_css)}else{H.popup_css=G.baseURI.toAbsolute("themes/"+H.theme+"/skins/"+H.skin+"/dialog.css")}}if(H.popup_css_add){H.popup_css+=","+G.documentBaseURI.toAbsolute(H.popup_css_add)}G.controlManager=new k.ControlManager(G);G.onBeforeRenderUI.dispatch(G,G.controlManager);if(H.render_ui&&G.theme){G.orgDisplay=C.style.display;if(typeof H.theme!="function"){D=H.width||C.style.width||C.offsetWidth;y=H.height||C.style.height||C.offsetHeight;z=H.min_height||100;F=/^[0-9\.]+(|px)$/i;if(F.test(""+D)){D=Math.max(parseInt(D,10)+(p.deltaWidth||0),100)}if(F.test(""+y)){y=Math.max(parseInt(y,10)+(p.deltaHeight||0),z)}p=G.theme.renderUI({targetNode:C,width:D,height:y,deltaWidth:H.delta_width,deltaHeight:H.delta_height});l.setStyles(p.sizeContainer||p.editorContainer,{width:D,height:y});y=(p.iframeHeight||y)+(typeof(y)=="number"?(p.deltaHeight||0):"");if(y';if(H.document_base_url!=k.documentBaseURL){G.iframeHTML+=''}if(k.isIE8){if(H.ie7_compat){G.iframeHTML+=''}else{G.iframeHTML+=''}}G.iframeHTML+='';for(x=0;x'}G.contentCSS=[];v=H.body_id||"tinymce";if(v.indexOf("=")!=-1){v=G.getParam("body_id","","hash");v=v[G.id]||v}B=H.body_class||"";if(B.indexOf("=")!=-1){B=G.getParam("body_class","","hash");B=B[G.id]||""}G.iframeHTML+='
    ";if(k.relaxedDomain&&(b||(k.isOpera&&parseFloat(opera.version())<11))){E='javascript:(function(){document.open();document.domain="'+document.domain+'";var ed = window.parent.tinyMCE.get("'+G.id+'");document.write(ed.iframeHTML);document.close();ed.initContentBody();})()'}q=l.add(p.iframeContainer,"iframe",{id:G.id+"_ifr",src:E||'javascript:""',frameBorder:"0",allowTransparency:"true",title:H.aria_label,style:{width:"100%",height:y,display:"block"}});G.contentAreaContainer=p.iframeContainer;if(p.editorContainer){l.get(p.editorContainer).style.display=G.orgDisplay}C.style.visibility=G.orgVisibility;l.get(G.id).style.display="none";l.setAttrib(G.id,"aria-hidden",true);if(!k.relaxedDomain||!E){G.initContentBody()}C=q=p=null},initContentBody:function(){var n=this,p=n.settings,q=l.get(n.id),r=n.getDoc(),o,m,s;if((!b||!k.relaxedDomain)&&!p.content_editable){r.open();r.write(n.iframeHTML);r.close();if(k.relaxedDomain){r.domain=k.relaxedDomain}}if(p.content_editable){l.addClass(q,"mceContentBody");n.contentDocument=r=p.content_document||document;n.contentWindow=p.content_window||window;n.bodyElement=q;p.content_document=p.content_window=null}m=n.getBody();m.disabled=true;if(!p.readonly){m.contentEditable=n.getParam("content_editable_state",true)}m.disabled=false;n.schema=new k.html.Schema(p);n.dom=new k.dom.DOMUtils(r,{keep_values:true,url_converter:n.convertURL,url_converter_scope:n,hex_colors:p.force_hex_style_colors,class_filter:p.class_filter,update_styles:true,root_element:p.content_editable?n.id:null,schema:n.schema});n.parser=new k.html.DomParser(p,n.schema);n.parser.addAttributeFilter("src,href,style",function(t,u){var v=t.length,y,A=n.dom,z,x;while(v--){y=t[v];z=y.attr(u);x="data-mce-"+u;if(!y.attributes.map[x]){if(u==="style"){y.attr(x,A.serializeStyle(A.parseStyle(z),y.name))}else{y.attr(x,n.convertURL(z,u,y.name))}}}});n.parser.addNodeFilter("script",function(t,u){var v=t.length,x;while(v--){x=t[v];x.attr("type","mce-"+(x.attr("type")||"text/javascript"))}});n.parser.addNodeFilter("#cdata",function(t,u){var v=t.length,x;while(v--){x=t[v];x.type=8;x.name="#comment";x.value="[CDATA["+x.value+"]]"}});n.parser.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",function(u,v){var x=u.length,y,t=n.schema.getNonEmptyElements();while(x--){y=u[x];if(y.isEmpty(t)){y.empty().append(new k.html.Node("br",1)).shortEnded=true}}});n.serializer=new k.dom.Serializer(p,n.dom,n.schema);n.selection=new k.dom.Selection(n.dom,n.getWin(),n.serializer,n);n.formatter=new k.Formatter(n);n.undoManager=new k.UndoManager(n);n.forceBlocks=new k.ForceBlocks(n);n.enterKey=new k.EnterKey(n);n.editorCommands=new k.EditorCommands(n);n.onExecCommand.add(function(t,u){if(!/^(FontName|FontSize)$/.test(u)){n.nodeChanged()}});n.serializer.onPreProcess.add(function(t,u){return n.onPreProcess.dispatch(n,u,t)});n.serializer.onPostProcess.add(function(t,u){return n.onPostProcess.dispatch(n,u,t)});n.onPreInit.dispatch(n);if(!p.browser_spellcheck&&!p.gecko_spellcheck){r.body.spellcheck=false}if(!p.readonly){n.bindNativeEvents()}n.controlManager.onPostRender.dispatch(n,n.controlManager);n.onPostRender.dispatch(n);n.quirks=k.util.Quirks(n);if(p.directionality){m.dir=p.directionality}if(p.nowrap){m.style.whiteSpace="nowrap"}if(p.protect){n.onBeforeSetContent.add(function(t,u){i(p.protect,function(v){u.content=u.content.replace(v,function(x){return""})})})}n.onSetContent.add(function(){n.addVisual(n.getBody())});if(p.padd_empty_editor){n.onPostProcess.add(function(t,u){u.content=u.content.replace(/^(]*>( | |\s|\u00a0|)<\/p>[\r\n]*|
    [\r\n]*)$/,"")})}n.load({initial:true,format:"html"});n.startContent=n.getContent({format:"raw"});n.initialized=true;n.onInit.dispatch(n);n.execCallback("setupcontent_callback",n.id,m,r);n.execCallback("init_instance_callback",n);n.focus(true);n.nodeChanged({initial:true});if(n.contentStyles.length>0){s="";i(n.contentStyles,function(t){s+=t+"\r\n"});n.dom.addStyle(s)}i(n.contentCSS,function(t){n.dom.loadCSS(t)});if(p.auto_focus){setTimeout(function(){var t=k.get(p.auto_focus);t.selection.select(t.getBody(),1);t.selection.collapse(1);t.getBody().focus();t.getWin().focus()},100)}q=r=m=null},focus:function(p){var o,u=this,t=u.selection,q=u.settings.content_editable,n,r,s=u.getDoc(),m;if(!p){if(u.bookmark){t.moveToBookmark(u.bookmark);u.bookmark=null}n=t.getRng();if(n.item){r=n.item(0)}u._refreshContentEditable();if(!q){u.getWin().focus()}if(k.isGecko||q){m=u.getBody();if(m.setActive&&!k.isIE11){m.setActive()}else{m.focus()}if(q){t.normalize()}}if(r&&r.ownerDocument==s){n=s.body.createControlRange();n.addElement(r);n.select()}}if(k.activeEditor!=u){if((o=k.activeEditor)!=null){o.onDeactivate.dispatch(o,u)}u.onActivate.dispatch(u,o)}k._setActive(u)},execCallback:function(q){var m=this,p=m.settings[q],o;if(!p){return}if(m.callbackLookup&&(o=m.callbackLookup[q])){p=o.func;o=o.scope}if(d(p,"string")){o=p.replace(/\.\w+$/,"");o=o?k.resolve(o):0;p=k.resolve(p);m.callbackLookup=m.callbackLookup||{};m.callbackLookup[q]={func:p,scope:o}}return p.apply(o||m,Array.prototype.slice.call(arguments,1))},translate:function(m){var o=this.settings.language||"en",n=k.i18n;if(!m){return""}return n[o+"."+m]||m.replace(/\{\#([^\}]+)\}/g,function(q,p){return n[o+"."+p]||"{#"+p+"}"})},getLang:function(o,m){return k.i18n[(this.settings.language||"en")+"."+o]||(d(m)?m:"{#"+o+"}")},getParam:function(t,q,m){var r=k.trim,p=d(this.settings[t])?this.settings[t]:q,s;if(m==="hash"){s={};if(d(p,"string")){i(p.indexOf("=")>0?p.split(/[;,](?![^=;,]*(?:[;,]|$))/):p.split(","),function(n){n=n.split("=");if(n.length>1){s[r(n[0])]=r(n[1])}else{s[r(n[0])]=r(n)}})}else{s=p}return s}return p},nodeChanged:function(q){var m=this,n=m.selection,p;if(m.initialized){q=q||{};p=n.getStart()||m.getBody();p=b&&p.ownerDocument!=m.getDoc()?m.getBody():p;q.parents=[];m.dom.getParent(p,function(o){if(o.nodeName=="BODY"){return true}q.parents.push(o)});m.onNodeChange.dispatch(m,q?q.controlManager||m.controlManager:m.controlManager,p,n.isCollapsed(),q)}},addButton:function(n,o){var m=this;m.buttons=m.buttons||{};m.buttons[n]=o},addCommand:function(m,o,n){this.execCommands[m]={func:o,scope:n||this}},addQueryStateHandler:function(m,o,n){this.queryStateCommands[m]={func:o,scope:n||this}},addQueryValueHandler:function(m,o,n){this.queryValueCommands[m]={func:o,scope:n||this}},addShortcut:function(o,q,m,p){var n=this,r;if(n.settings.custom_shortcuts===false){return false}n.shortcuts=n.shortcuts||{};if(d(m,"string")){r=m;m=function(){n.execCommand(r,false,null)}}if(d(m,"object")){r=m;m=function(){n.execCommand(r[0],r[1],r[2])}}i(g(o),function(s){var t={func:m,scope:p||this,desc:n.translate(q),alt:false,ctrl:false,shift:false};i(g(s,"+"),function(u){switch(u){case"alt":case"ctrl":case"shift":t[u]=true;break;default:t.charCode=u.charCodeAt(0);t.keyCode=u.toUpperCase().charCodeAt(0)}});n.shortcuts[(t.ctrl?"ctrl":"")+","+(t.alt?"alt":"")+","+(t.shift?"shift":"")+","+t.keyCode]=t});return true},execCommand:function(u,r,x,m){var p=this,q=0,v,n;if(!/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint|SelectAll)$/.test(u)&&(!m||!m.skip_focus)){p.focus()}m=f({},m);p.onBeforeExecCommand.dispatch(p,u,r,x,m);if(m.terminate){return false}if(p.execCallback("execcommand_callback",p.id,p.selection.getNode(),u,r,x)){p.onExecCommand.dispatch(p,u,r,x,m);return true}if(v=p.execCommands[u]){n=v.func.call(v.scope,r,x);if(n!==true){p.onExecCommand.dispatch(p,u,r,x,m);return n}}i(p.plugins,function(o){if(o.execCommand&&o.execCommand(u,r,x)){p.onExecCommand.dispatch(p,u,r,x,m);q=1;return false}});if(q){return true}if(p.theme&&p.theme.execCommand&&p.theme.execCommand(u,r,x)){p.onExecCommand.dispatch(p,u,r,x,m);return true}if(p.editorCommands.execCommand(u,r,x)){p.onExecCommand.dispatch(p,u,r,x,m);return true}p.getDoc().execCommand(u,r,x);p.onExecCommand.dispatch(p,u,r,x,m)},queryCommandState:function(q){var n=this,r,p;if(n._isHidden()){return}if(r=n.queryStateCommands[q]){p=r.func.call(r.scope);if(p!==true){return p}}r=n.editorCommands.queryCommandState(q);if(r!==-1){return r}try{return this.getDoc().queryCommandState(q)}catch(m){}},queryCommandValue:function(r){var n=this,q,p;if(n._isHidden()){return}if(q=n.queryValueCommands[r]){p=q.func.call(q.scope);if(p!==true){return p}}q=n.editorCommands.queryCommandValue(r);if(d(q)){return q}try{return this.getDoc().queryCommandValue(r)}catch(m){}},show:function(){var m=this;l.show(m.getContainer());l.hide(m.id);m.load()},hide:function(){var m=this,n=m.getDoc();if(b&&n){n.execCommand("SelectAll")}m.save();l.hide(m.getContainer());l.setStyle(m.id,"display",m.orgDisplay)},isHidden:function(){return !l.isHidden(this.id)},setProgressState:function(m,n,p){this.onSetProgressState.dispatch(this,m,n,p);return m},load:function(q){var m=this,p=m.getElement(),n;if(p){q=q||{};q.load=true;n=m.setContent(d(p.value)?p.value:p.innerHTML,q);q.element=p;if(!q.no_events){m.onLoadContent.dispatch(m,q)}q.element=p=null;return n}},save:function(r){var m=this,q=m.getElement(),n,p;if(!q||!m.initialized){return}r=r||{};r.save=true;r.element=q;n=r.content=m.getContent(r);if(!r.no_events){m.onSaveContent.dispatch(m,r)}n=r.content;if(!/TEXTAREA|INPUT/i.test(q.nodeName)){q.innerHTML=n;if(p=l.getParent(m.id,"form")){i(p.elements,function(o){if(o.name==m.id){o.value=n;return false}})}}else{q.value=n}r.element=q=null;return n},setContent:function(r,p){var o=this,n,m=o.getBody(),q;p=p||{};p.format=p.format||"html";p.set=true;p.content=r;if(!p.no_events){o.onBeforeSetContent.dispatch(o,p)}r=p.content;if(!k.isIE&&(r.length===0||/^\s+$/.test(r))){q=o.settings.forced_root_block;if(q){r="<"+q+'>
    "}else{r='
    '}m.innerHTML=r;o.selection.select(m,true);o.selection.collapse(true);return}if(p.format!=="raw"){r=new k.html.Serializer({},o.schema).serialize(o.parser.parse(r))}p.content=k.trim(r);o.dom.setHTML(m,p.content);if(!p.no_events){o.onSetContent.dispatch(o,p)}if(!o.settings.content_editable||document.activeElement===o.getBody()){o.selection.normalize()}return p.content},getContent:function(o){var n=this,p,m=n.getBody();o=o||{};o.format=o.format||"html";o.get=true;o.getInner=true;if(!o.no_events){n.onBeforeGetContent.dispatch(n,o)}if(o.format=="raw"){p=m.innerHTML}else{if(o.format=="text"){p=m.innerText||m.textContent}else{p=n.serializer.serialize(m,o)}}if(o.format!="text"){o.content=k.trim(p)}else{o.content=p}if(!o.no_events){n.onGetContent.dispatch(n,o)}return o.content},isDirty:function(){var m=this;return k.trim(m.startContent)!=k.trim(m.getContent({format:"raw",no_events:1}))&&!m.isNotDirty},getContainer:function(){var m=this;if(!m.container){m.container=l.get(m.editorContainer||m.id+"_parent")}return m.container},getContentAreaContainer:function(){return this.contentAreaContainer},getElement:function(){return l.get(this.settings.content_element||this.id)},getWin:function(){var m=this,n;if(!m.contentWindow){n=l.get(m.id+"_ifr");if(n){m.contentWindow=n.contentWindow}}return m.contentWindow},getDoc:function(){var m=this,n;if(!m.contentDocument){n=m.getWin();if(n){m.contentDocument=n.document}}return m.contentDocument},getBody:function(){return this.bodyElement||this.getDoc().body},convertURL:function(o,n,q){var m=this,p=m.settings;if(p.urlconverter_callback){return m.execCallback("urlconverter_callback",o,q,true,n)}if(!p.convert_urls||(q&&q.nodeName=="LINK")||o.indexOf("file:")===0){return o}if(p.relative_urls){return m.documentBaseURI.toRelative(o)}o=m.documentBaseURI.toAbsolute(o,p.remove_script_host);return o},addVisual:function(q){var n=this,o=n.settings,p=n.dom,m;q=q||n.getBody();if(!d(n.hasVisual)){n.hasVisual=o.visual}i(p.select("table,a",q),function(s){var r;switch(s.nodeName){case"TABLE":m=o.visual_table_class||"mceItemTable";r=p.getAttrib(s,"border");if(!r||r=="0"){if(n.hasVisual){p.addClass(s,m)}else{p.removeClass(s,m)}}return;case"A":if(!p.getAttrib(s,"href",false)){r=p.getAttrib(s,"name")||s.id;m="mceItemAnchor";if(r){if(n.hasVisual){p.addClass(s,m)}else{p.removeClass(s,m)}}}return}});n.onVisualAid.dispatch(n,q,n.hasVisual)},remove:function(){var m=this,o=m.getContainer(),n=m.getDoc();if(!m.removed){m.removed=1;if(b&&n){n.execCommand("SelectAll")}m.save();l.setStyle(m.id,"display",m.orgDisplay);if(!m.settings.content_editable){j.unbind(m.getWin());j.unbind(m.getDoc())}j.unbind(m.getBody());j.clear(o);m.execCallback("remove_instance_callback",m);m.onRemove.dispatch(m);m.onExecCommand.listeners=[];k.remove(m);l.remove(o)}},destroy:function(n){var m=this;if(m.destroyed){return}if(a){j.unbind(m.getDoc());j.unbind(m.getWin());j.unbind(m.getBody())}if(!n){k.removeUnload(m.destroy);tinyMCE.onBeforeUnload.remove(m._beforeUnload);if(m.theme&&m.theme.destroy){m.theme.destroy()}m.controlManager.destroy();m.selection.destroy();m.dom.destroy()}if(m.formElement){m.formElement.submit=m.formElement._mceOldSubmit;m.formElement._mceOldSubmit=null}m.contentAreaContainer=m.formElement=m.container=m.settings.content_element=m.bodyElement=m.contentDocument=m.contentWindow=null;if(m.selection){m.selection=m.selection.win=m.selection.dom=m.selection.dom.doc=null}m.destroyed=1},_refreshContentEditable:function(){var n=this,m,o;if(n._isHidden()){m=n.getBody();o=m.parentNode;o.removeChild(m);o.appendChild(m);m.focus()}},_isHidden:function(){var m;if(!a){return 0}m=this.selection.getSel();return(!m||!m.rangeCount||m.rangeCount===0)}})})(tinymce);(function(a){var b=a.each;a.Editor.prototype.setupEvents=function(){var c=this,d=c.settings;b(["onPreInit","onBeforeRenderUI","onPostRender","onLoad","onInit","onRemove","onActivate","onDeactivate","onClick","onEvent","onMouseUp","onMouseDown","onDblClick","onKeyDown","onKeyUp","onKeyPress","onContextMenu","onSubmit","onReset","onPaste","onPreProcess","onPostProcess","onBeforeSetContent","onBeforeGetContent","onSetContent","onGetContent","onLoadContent","onSaveContent","onNodeChange","onChange","onBeforeExecCommand","onExecCommand","onUndo","onRedo","onVisualAid","onSetProgressState","onSetAttrib"],function(e){c[e]=new a.util.Dispatcher(c)});if(d.cleanup_callback){c.onBeforeSetContent.add(function(e,f){f.content=e.execCallback("cleanup_callback","insert_to_editor",f.content,f)});c.onPreProcess.add(function(e,f){if(f.set){e.execCallback("cleanup_callback","insert_to_editor_dom",f.node,f)}if(f.get){e.execCallback("cleanup_callback","get_from_editor_dom",f.node,f)}});c.onPostProcess.add(function(e,f){if(f.set){f.content=e.execCallback("cleanup_callback","insert_to_editor",f.content,f)}if(f.get){f.content=e.execCallback("cleanup_callback","get_from_editor",f.content,f)}})}if(d.save_callback){c.onGetContent.add(function(e,f){if(f.save){f.content=e.execCallback("save_callback",e.id,f.content,e.getBody())}})}if(d.handle_event_callback){c.onEvent.add(function(f,g,h){if(c.execCallback("handle_event_callback",g,f,h)===false){g.preventDefault();g.stopPropagation()}})}if(d.handle_node_change_callback){c.onNodeChange.add(function(f,e,g){f.execCallback("handle_node_change_callback",f.id,g,-1,-1,true,f.selection.isCollapsed())})}if(d.save_callback){c.onSaveContent.add(function(e,g){var f=e.execCallback("save_callback",e.id,g.content,e.getBody());if(f){g.content=f}})}if(d.onchange_callback){c.onChange.add(function(f,e){f.execCallback("onchange_callback",f,e)})}};a.Editor.prototype.bindNativeEvents=function(){var l=this,f,d=l.settings,e=l.dom,h;h={mouseup:"onMouseUp",mousedown:"onMouseDown",click:"onClick",keyup:"onKeyUp",keydown:"onKeyDown",keypress:"onKeyPress",submit:"onSubmit",reset:"onReset",contextmenu:"onContextMenu",dblclick:"onDblClick",paste:"onPaste"};function c(i,m){var n=i.type;if(l.removed){return}if(l.onEvent.dispatch(l,i,m)!==false){l[h[i.fakeType||i.type]].dispatch(l,i,m)}}function j(i){l.focus(true)}function k(i,m){if(m.keyCode!=65||!a.VK.metaKeyPressed(m)){l.selection.normalize()}l.nodeChanged()}b(h,function(m,n){var i=d.content_editable?l.getBody():l.getDoc();switch(n){case"contextmenu":e.bind(i,n,c);break;case"paste":e.bind(l.getBody(),n,c);break;case"submit":case"reset":e.bind(l.getElement().form||a.DOM.getParent(l.id,"form"),n,c);break;default:e.bind(i,n,c)}});e.bind(d.content_editable?l.getBody():(a.isGecko?l.getDoc():l.getWin()),"focus",function(i){l.focus(true)});if(d.content_editable&&a.isOpera){e.bind(l.getBody(),"click",j);e.bind(l.getBody(),"keydown",j)}l.onMouseUp.add(k);l.onKeyUp.add(function(i,n){var m=n.keyCode;if((m>=33&&m<=36)||(m>=37&&m<=40)||m==13||m==45||m==46||m==8||(a.isMac&&(m==91||m==93))||n.ctrlKey){k(i,n)}});l.onReset.add(function(){l.setContent(l.startContent,{format:"raw"})});function g(m,i){if(m.altKey||m.ctrlKey||m.metaKey){b(l.shortcuts,function(n){var o=a.isMac?m.metaKey:m.ctrlKey;if(n.ctrl!=o||n.alt!=m.altKey||n.shift!=m.shiftKey){return}if(m.keyCode==n.keyCode||(m.charCode&&m.charCode==n.charCode)){m.preventDefault();if(i){n.func.call(n.scope)}return true}})}}l.onKeyUp.add(function(i,m){g(m)});l.onKeyPress.add(function(i,m){g(m)});l.onKeyDown.add(function(i,m){g(m,true)});if(a.isOpera){l.onClick.add(function(i,m){m.preventDefault()})}}})(tinymce);(function(d){var e=d.each,b,a=true,c=false;d.EditorCommands=function(n){var m=n.dom,p=n.selection,j={state:{},exec:{},value:{}},k=n.settings,q=n.formatter,o;function r(z,y,x){var v;z=z.toLowerCase();if(v=j.exec[z]){v(z,y,x);return a}return c}function l(x){var v;x=x.toLowerCase();if(v=j.state[x]){return v(x)}return -1}function h(x){var v;x=x.toLowerCase();if(v=j.value[x]){return v(x)}return c}function u(v,x){x=x||"exec";e(v,function(z,y){e(y.toLowerCase().split(","),function(A){j[x][A]=z})})}d.extend(this,{execCommand:r,queryCommandState:l,queryCommandValue:h,addCommands:u});function f(y,x,v){if(x===b){x=c}if(v===b){v=null}return n.getDoc().execCommand(y,x,v)}function t(v){return q.match(v)}function s(v,x){q.toggle(v,x?{value:x}:b)}function i(v){o=p.getBookmark(v)}function g(){p.moveToBookmark(o)}u({"mceResetDesignMode,mceBeginUndoLevel":function(){},"mceEndUndoLevel,mceAddUndoLevel":function(){n.undoManager.add()},"Cut,Copy,Paste":function(z){var y=n.getDoc(),v;try{f(z)}catch(x){v=a}if(v||!y.queryCommandSupported(z)){if(d.isGecko){n.windowManager.confirm(n.getLang("clipboard_msg"),function(A){if(A){open("http://www.mozilla.org/editor/midasdemo/securityprefs.html","_blank")}})}else{n.windowManager.alert(n.getLang("clipboard_no_support"))}}},unlink:function(v){if(p.isCollapsed()){p.select(p.getNode())}f(v);p.collapse(c)},"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(v){var x=v.substring(7);e("left,center,right,full".split(","),function(y){if(x!=y){q.remove("align"+y)}});s("align"+x);r("mceRepaint")},"InsertUnorderedList,InsertOrderedList":function(y){var v,x;f(y);v=m.getParent(p.getNode(),"ol,ul");if(v){x=v.parentNode;if(/^(H[1-6]|P|ADDRESS|PRE)$/.test(x.nodeName)){i();m.split(x,v);g()}}},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(v){s(v)},"ForeColor,HiliteColor,FontName":function(y,x,v){s(y,v)},FontSize:function(z,y,x){var v,A;if(x>=1&&x<=7){A=d.explode(k.font_size_style_values);v=d.explode(k.font_size_classes);if(v){x=v[x-1]||x}else{x=A[x-1]||x}}s(z,x)},RemoveFormat:function(v){q.remove(v)},mceBlockQuote:function(v){s("blockquote")},FormatBlock:function(y,x,v){return s(v||"p")},mceCleanup:function(){var v=p.getBookmark();n.setContent(n.getContent({cleanup:a}),{cleanup:a});p.moveToBookmark(v)},mceRemoveNode:function(z,y,x){var v=x||p.getNode();if(v!=n.getBody()){i();n.dom.remove(v,a);g()}},mceSelectNodeDepth:function(z,y,x){var v=0;m.getParent(p.getNode(),function(A){if(A.nodeType==1&&v++==x){p.select(A);return c}},n.getBody())},mceSelectNode:function(y,x,v){p.select(v)},mceInsertContent:function(B,I,K){var y,J,E,z,F,G,D,C,L,x,A,M,v,H;y=n.parser;J=new d.html.Serializer({},n.schema);v='\uFEFF';G={content:K,format:"html"};p.onBeforeSetContent.dispatch(p,G);K=G.content;if(K.indexOf("{$caret}")==-1){K+="{$caret}"}K=K.replace(/\{\$caret\}/,v);if(!p.isCollapsed()){n.getDoc().execCommand("Delete",false,null)}E=p.getNode();G={context:E.nodeName.toLowerCase()};F=y.parse(K,G);A=F.lastChild;if(A.attr("id")=="mce_marker"){D=A;for(A=A.prev;A;A=A.walk(true)){if(A.type==3||!m.isBlock(A.name)){A.parent.insert(D,A,A.name==="br");break}}}if(!G.invalid){K=J.serialize(F);A=E.firstChild;M=E.lastChild;if(!A||(A===M&&A.nodeName==="BR")){m.setHTML(E,K)}else{p.setContent(K)}}else{p.setContent(v);E=p.getNode();z=n.getBody();if(E.nodeType==9){E=A=z}else{A=E}while(A!==z){E=A;A=A.parentNode}K=E==z?z.innerHTML:m.getOuterHTML(E);K=J.serialize(y.parse(K.replace(//i,function(){return J.serialize(F)})));if(E==z){m.setHTML(z,K)}else{m.setOuterHTML(E,K)}}D=m.get("mce_marker");C=m.getRect(D);L=m.getViewPort(n.getWin());if((C.y+C.h>L.y+L.h||C.yL.x+L.w||C.x")},mceToggleVisualAid:function(){n.hasVisual=!n.hasVisual;n.addVisual()},mceReplaceContent:function(y,x,v){n.execCommand("mceInsertContent",false,v.replace(/\{\$selection\}/g,p.getContent({format:"text"})))},mceInsertLink:function(z,y,x){var v;if(typeof(x)=="string"){x={href:x}}v=m.getParent(p.getNode(),"a");x.href=x.href.replace(" ","%20");if(!v||!x.href){q.remove("link")}if(x.href){q.apply("link",x,v)}},selectAll:function(){var x=m.getRoot(),v=m.createRng();if(p.getRng().setStart){v.setStart(x,0);v.setEnd(x,x.childNodes.length);p.setRng(v)}else{f("SelectAll")}}});u({"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(z){var x="align"+z.substring(7);var v=p.isCollapsed()?[m.getParent(p.getNode(),m.isBlock)]:p.getSelectedBlocks();var y=d.map(v,function(A){return !!q.matchNode(A,x)});return d.inArray(y,a)!==-1},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(v){return t(v)},mceBlockQuote:function(){return t("blockquote")},Outdent:function(){var v;if(k.inline_styles){if((v=m.getParent(p.getStart(),m.isBlock))&&parseInt(v.style.paddingLeft)>0){return a}if((v=m.getParent(p.getEnd(),m.isBlock))&&parseInt(v.style.paddingLeft)>0){return a}}return l("InsertUnorderedList")||l("InsertOrderedList")||(!k.inline_styles&&!!m.getParent(p.getNode(),"BLOCKQUOTE"))},"InsertUnorderedList,InsertOrderedList":function(x){var v=m.getParent(p.getNode(),"ul,ol");return v&&(x==="insertunorderedlist"&&v.tagName==="UL"||x==="insertorderedlist"&&v.tagName==="OL")}},"state");u({"FontSize,FontName":function(y){var x=0,v;if(v=m.getParent(p.getNode(),"span")){if(y=="fontsize"){x=v.style.fontSize}else{x=v.style.fontFamily.replace(/, /g,",").replace(/[\'\"]/g,"").toLowerCase()}}return x}},"value");u({Undo:function(){n.undoManager.undo()},Redo:function(){n.undoManager.redo()}})}})(tinymce);(function(b){var a=b.util.Dispatcher;b.UndoManager=function(h){var l,i=0,e=[],g,k,j,f;function c(){return b.trim(h.getContent({format:"raw",no_events:1}).replace(/]+data-mce-bogus[^>]+>[\u200B\uFEFF]+<\/span>/g,""))}function d(){l.typing=false;l.add()}onBeforeAdd=new a(l);k=new a(l);j=new a(l);f=new a(l);k.add(function(m,n){if(m.hasUndo()){return h.onChange.dispatch(h,n,m)}});j.add(function(m,n){return h.onUndo.dispatch(h,n,m)});f.add(function(m,n){return h.onRedo.dispatch(h,n,m)});h.onInit.add(function(){l.add()});h.onBeforeExecCommand.add(function(m,p,o,q,n){if(p!="Undo"&&p!="Redo"&&p!="mceRepaint"&&(!n||!n.skip_undo)){l.beforeChange()}});h.onExecCommand.add(function(m,p,o,q,n){if(p!="Undo"&&p!="Redo"&&p!="mceRepaint"&&(!n||!n.skip_undo)){l.add()}});h.onSaveContent.add(d);h.dom.bind(h.dom.getRoot(),"dragend",d);h.dom.bind(h.getBody(),"focusout",function(m){if(!h.removed&&l.typing){d()}});h.onKeyUp.add(function(m,o){var n=o.keyCode;if((n>=33&&n<=36)||(n>=37&&n<=40)||n==45||n==13||o.ctrlKey){d()}});h.onKeyDown.add(function(m,o){var n=o.keyCode;if((n>=33&&n<=36)||(n>=37&&n<=40)||n==45){if(l.typing){d()}return}if((n<16||n>20)&&n!=224&&n!=91&&!l.typing){l.beforeChange();l.typing=true;l.add()}});h.onMouseDown.add(function(m,n){if(l.typing){d()}});h.addShortcut("ctrl+z","undo_desc","Undo");h.addShortcut("ctrl+y","redo_desc","Redo");l={data:e,typing:false,onBeforeAdd:onBeforeAdd,onAdd:k,onUndo:j,onRedo:f,beforeChange:function(){g=h.selection.getBookmark(2,true)},add:function(p){var m,n=h.settings,o;p=p||{};p.content=c();l.onBeforeAdd.dispatch(l,p);o=e[i];if(o&&o.content==p.content){return null}if(e[i]){e[i].beforeBookmark=g}if(n.custom_undo_redo_levels){if(e.length>n.custom_undo_redo_levels){for(m=0;m0){n=e[--i];h.setContent(n.content,{format:"raw"});h.selection.moveToBookmark(n.beforeBookmark);l.onUndo.dispatch(l,n)}return n},redo:function(){var m;if(i0||this.typing},hasRedo:function(){return i0){g.moveEnd("character",q)}g.select()}catch(n){}}}c.nodeChanged()}}if(b.forced_root_block){c.onKeyUp.add(f);c.onNodeChange.add(f)}};(function(c){var b=c.DOM,a=c.dom.Event,d=c.each,e=c.extend;c.create("tinymce.ControlManager",{ControlManager:function(f,j){var h=this,g;j=j||{};h.editor=f;h.controls={};h.onAdd=new c.util.Dispatcher(h);h.onPostRender=new c.util.Dispatcher(h);h.prefix=j.prefix||f.id+"_";h._cls={};h.onPostRender.add(function(){d(h.controls,function(i){i.postRender()})})},get:function(f){return this.controls[this.prefix+f]||this.controls[f]},setActive:function(h,f){var g=null;if(g=this.get(h)){g.setActive(f)}return g},setDisabled:function(h,f){var g=null;if(g=this.get(h)){g.setDisabled(f)}return g},add:function(g){var f=this;if(g){f.controls[g.id]=g;f.onAdd.dispatch(g,f)}return g},createControl:function(j){var o,k,g,h=this,m=h.editor,n,f;if(!h.controlFactories){h.controlFactories=[];d(m.plugins,function(i){if(i.createControl){h.controlFactories.push(i)}})}n=h.controlFactories;for(k=0,g=n.length;k1||ag==ay||ag.tagName=="BR"){return ag}}}var aq=aa.selection.getRng();var av=aq.startContainer;var ap=aq.endContainer;if(av!=ap&&aq.endOffset===0){var au=ar(av,ap);var at=au.nodeType==3?au.length:au.childNodes.length;aq.setEnd(au,at)}return aq}function ad(at,ay,aw,av,aq){var ap=[],ar=-1,ax,aA=-1,au=-1,az;T(at.childNodes,function(aC,aB){if(aC.nodeName==="UL"||aC.nodeName==="OL"){ar=aB;ax=aC;return false}});T(at.childNodes,function(aC,aB){if(aC.nodeName==="SPAN"&&c.getAttrib(aC,"data-mce-type")=="bookmark"){if(aC.id==ay.id+"_start"){aA=aB}else{if(aC.id==ay.id+"_end"){au=aB}}}});if(ar<=0||(aAar)){T(a.grep(at.childNodes),aq);return 0}else{az=c.clone(aw,X);T(a.grep(at.childNodes),function(aC,aB){if((aAar&&aB>ar)){ap.push(aC);aC.parentNode.removeChild(aC)}});if(aAar){at.insertBefore(az,ax.nextSibling)}}av.push(az);T(ap,function(aB){az.appendChild(aB)});return az}}function an(aq,at,aw){var ap=[],av,ar,au=true;av=am.inline||am.block;ar=c.create(av);ab(ar);N.walk(aq,function(ax){var ay;function az(aA){var aF,aD,aB,aC,aE;aE=au;aF=aA.nodeName.toLowerCase();aD=aA.parentNode.nodeName.toLowerCase();if(aA.nodeType===1&&x(aA)){aE=au;au=x(aA)==="true";aC=true}if(g(aF,"br")){ay=0;if(am.block){c.remove(aA)}return}if(am.wrapper&&y(aA,ae,al)){ay=0;return}if(au&&!aC&&am.block&&!am.wrapper&&I(aF)){aA=c.rename(aA,av);ab(aA);ap.push(aA);ay=0;return}if(am.selector){T(ah,function(aG){if("collapsed" in aG&&aG.collapsed!==ai){return}if(c.is(aA,aG.selector)&&!b(aA)){ab(aA,aG);aB=true}});if(!am.inline||aB){ay=0;return}}if(au&&!aC&&d(av,aF)&&d(aD,av)&&!(!aw&&aA.nodeType===3&&aA.nodeValue.length===1&&aA.nodeValue.charCodeAt(0)===65279)&&!b(aA)&&(!am.inline||!H(aA))){if(!ay){ay=c.clone(ar,X);aA.parentNode.insertBefore(ay,aA);ap.push(ay)}ay.appendChild(aA)}else{if(aF=="li"&&at){ay=ad(aA,at,ar,ap,az)}else{ay=0;T(a.grep(aA.childNodes),az);if(aC){au=aE}ay=0}}}T(ax,az)});if(am.wrap_links===false){T(ap,function(ax){function ay(aC){var aB,aA,az;if(aC.nodeName==="A"){aA=c.clone(ar,X);ap.push(aA);az=a.grep(aC.childNodes);for(aB=0;aB1||!H(az))&&ax===0){c.remove(az,1);return}if(am.inline||am.wrapper){if(!am.exact&&ax===1){az=ay(az)}T(ah,function(aB){T(c.select(aB.inline,az),function(aD){var aC;if(aB.wrap_links===false){aC=aD.parentNode;do{if(aC.nodeName==="A"){return}}while(aC=aC.parentNode)}Z(aB,al,aD,aB.exact?aD:null)})});if(y(az.parentNode,ae,al)){c.remove(az,1);az=0;return C}if(am.merge_with_parents){c.getParent(az.parentNode,function(aB){if(y(aB,ae,al)){c.remove(az,1);az=0;return C}})}if(az&&am.merge_siblings!==false){az=u(E(az),az);az=u(az,E(az,C))}}})}if(am){if(ag){if(ag.nodeType){ac=c.createRng();ac.setStartBefore(ag);ac.setEndAfter(ag);an(p(ac,ah),null,true)}else{an(ag,null,true)}}else{if(!ai||!am.inline||c.select("td.mceSelected,th.mceSelected").length){var ao=aa.selection.getNode();if(!m&&ah[0].defaultBlock&&!c.getParent(ao,c.isBlock)){Y(ah[0].defaultBlock)}aa.selection.setRng(af());ak=r.getBookmark();an(p(r.getRng(C),ah),ak);if(am.styles&&(am.styles.color||am.styles.textDecoration)){a.walk(ao,L,"childNodes");L(ao)}r.moveToBookmark(ak);R(r.getRng(C));aa.nodeChanged()}else{U("apply",ae,al)}}}}function B(ad,am,af){var ag=V(ad),ao=ag[0],ak,aj,ac,al=true;function ae(av){var au,at,ar,aq,ax,aw;if(av.nodeType===3){return}if(av.nodeType===1&&x(av)){ax=al;al=x(av)==="true";aw=true}au=a.grep(av.childNodes);if(al&&!aw){for(at=0,ar=ag.length;at=0;ac--){ab=ah[ac].selector;if(!ab){return C}for(ag=ad.length-1;ag>=0;ag--){if(c.is(ad[ag],ab)){return C}}}}return X}function J(ab,ae,ac){var ad;if(!P){P={};ad={};aa.onNodeChange.addToTop(function(ag,af,ai){var ah=n(ai),aj={};T(P,function(ak,al){T(ah,function(am){if(y(am,al,{},ak.similar)){if(!ad[al]){T(ak,function(an){an(true,{node:am,format:al,parents:ah})});ad[al]=ak}aj[al]=ak;return false}})});T(ad,function(ak,al){if(!aj[al]){delete ad[al];T(ak,function(am){am(false,{node:ai,format:al,parents:ah})})}})})}T(ab.split(","),function(af){if(!P[af]){P[af]=[];P[af].similar=ac}P[af].push(ae)});return this}a.extend(this,{get:V,register:l,apply:Y,remove:B,toggle:F,match:k,matchAll:v,matchNode:y,canApply:z,formatChanged:J});j();W();function h(ab,ac){if(g(ab,ac.inline)){return C}if(g(ab,ac.block)){return C}if(ac.selector){return c.is(ab,ac.selector)}}function g(ac,ab){ac=ac||"";ab=ab||"";ac=""+(ac.nodeName||ac);ab=""+(ab.nodeName||ab);return ac.toLowerCase()==ab.toLowerCase()}function O(ac,ab){var ad=c.getStyle(ac,ab);if(ab=="color"||ab=="backgroundColor"){ad=c.toHex(ad)}if(ab=="fontWeight"&&ad==700){ad="bold"}return""+ad}function q(ab,ac){if(typeof(ab)!="string"){ab=ab(ac)}else{if(ac){ab=ab.replace(/%(\w+)/g,function(ae,ad){return ac[ad]||ae})}}return ab}function f(ab){return ab&&ab.nodeType===3&&/^([\t \r\n]+|)$/.test(ab.nodeValue)}function S(ad,ac,ab){var ae=c.create(ac,ab);ad.parentNode.insertBefore(ae,ad);ae.appendChild(ad);return ae}function p(ab,am,ae){var ap,an,ah,al,ad=ab.startContainer,ai=ab.startOffset,ar=ab.endContainer,ak=ab.endOffset;function ao(aA){var au,ax,az,aw,av,at;au=ax=aA?ad:ar;av=aA?"previousSibling":"nextSibling";at=c.getRoot();function ay(aB){return aB.nodeName=="BR"&&aB.getAttribute("data-mce-bogus")&&!aB.nextSibling}if(au.nodeType==3&&!f(au)){if(aA?ai>0:akan?an:ai];if(ad.nodeType==3){ai=0}}if(ar.nodeType==1&&ar.hasChildNodes()){an=ar.childNodes.length-1;ar=ar.childNodes[ak>an?an:ak-1];if(ar.nodeType==3){ak=ar.nodeValue.length}}function aq(au){var at=au;while(at){if(at.nodeType===1&&x(at)){return x(at)==="false"?at:au}at=at.parentNode}return au}function aj(au,ay,aA){var ax,av,az,at;function aw(aC,aE){var aF,aB,aD=aC.nodeValue;if(typeof(aE)=="undefined"){aE=aA?aD.length:0}if(aA){aF=aD.lastIndexOf(" ",aE);aB=aD.lastIndexOf("\u00a0",aE);aF=aF>aB?aF:aB;if(aF!==-1&&!ae){aF++}}else{aF=aD.indexOf(" ",aE);aB=aD.indexOf("\u00a0",aE);aF=aF!==-1&&(aB===-1||aF0&&ah.node.nodeType===3&&ah.node.nodeValue.charAt(ah.offset-1)===" "){if(ah.offset>1){ar=ah.node;ar.splitText(ah.offset-1)}}}}if(am[0].inline||am[0].block_expand){if(!am[0].inline||(ad.nodeType!=3||ai===0)){ad=ao(true)}if(!am[0].inline||(ar.nodeType!=3||ak===ar.nodeValue.length)){ar=ao()}}if(am[0].selector&&am[0].expand!==X&&!am[0].inline){ad=af(ad,"previousSibling");ar=af(ar,"nextSibling")}if(am[0].block||am[0].selector){ad=ac(ad,"previousSibling");ar=ac(ar,"nextSibling");if(am[0].block){if(!H(ad)){ad=ao(true)}if(!H(ar)){ar=ao()}}}if(ad.nodeType==1){ai=s(ad);ad=ad.parentNode}if(ar.nodeType==1){ak=s(ar)+1;ar=ar.parentNode}return{startContainer:ad,startOffset:ai,endContainer:ar,endOffset:ak}}function Z(ah,ag,ae,ab){var ad,ac,af;if(!h(ae,ah)){return X}if(ah.remove!="all"){T(ah.styles,function(aj,ai){aj=q(aj,ag);if(typeof(ai)==="number"){ai=aj;ab=0}if(!ab||g(O(ab,ai),aj)){c.setStyle(ae,ai,"")}af=1});if(af&&c.getAttrib(ae,"style")==""){ae.removeAttribute("style");ae.removeAttribute("data-mce-style")}T(ah.attributes,function(ak,ai){var aj;ak=q(ak,ag);if(typeof(ai)==="number"){ai=ak;ab=0}if(!ab||g(c.getAttrib(ab,ai),ak)){if(ai=="class"){ak=c.getAttrib(ae,ai);if(ak){aj="";T(ak.split(/\s+/),function(al){if(/mce\w+/.test(al)){aj+=(aj?" ":"")+al}});if(aj){c.setAttrib(ae,ai,aj);return}}}if(ai=="class"){ae.removeAttribute("className")}if(e.test(ai)){ae.removeAttribute("data-mce-"+ai)}ae.removeAttribute(ai)}});T(ah.classes,function(ai){ai=q(ai,ag);if(!ab||c.hasClass(ab,ai)){c.removeClass(ae,ai)}});ac=c.getAttribs(ae);for(ad=0;adad?ad:af]}if(ab.nodeType===3&&ag&&af>=ab.nodeValue.length){ab=new t(ab,aa.getBody()).next()||ab}if(ab.nodeType===3&&!ag&&af===0){ab=new t(ab,aa.getBody()).prev()||ab}return ab}function U(ak,ab,ai){var al="_mce_caret",ac=aa.settings.caret_debug;function ad(ap){var ao=c.create("span",{id:al,"data-mce-bogus":true,style:ac?"color:red":""});if(ap){ao.appendChild(aa.getDoc().createTextNode(G))}return ao}function aj(ap,ao){while(ap){if((ap.nodeType===3&&ap.nodeValue!==G)||ap.childNodes.length>1){return false}if(ao&&ap.nodeType===1){ao.push(ap)}ap=ap.firstChild}return true}function ag(ao){while(ao){if(ao.id===al){return ao}ao=ao.parentNode}}function af(ao){var ap;if(ao){ap=new t(ao,ao);for(ao=ap.current();ao;ao=ap.next()){if(ao.nodeType===3){return ao}}}}function ae(aq,ap){var ar,ao;if(!aq){aq=ag(r.getStart());if(!aq){while(aq=c.get(al)){ae(aq,false)}}}else{ao=r.getRng(true);if(aj(aq)){if(ap!==false){ao.setStartBefore(aq);ao.setEndBefore(aq)}c.remove(aq)}else{ar=af(aq);if(ar.nodeValue.charAt(0)===G){ar=ar.deleteData(0,1)}c.remove(aq,1)}r.setRng(ao)}}function ah(){var aq,ao,av,au,ar,ap,at;aq=r.getRng(true);au=aq.startOffset;ap=aq.startContainer;at=ap.nodeValue;ao=ag(r.getStart());if(ao){av=af(ao)}if(at&&au>0&&au=0;au--){aq.appendChild(c.clone(ay[au],false));aq=aq.firstChild}aq.appendChild(c.doc.createTextNode(G));aq=aq.firstChild;var ar=c.getParent(az,I);if(ar&&c.isEmpty(ar)){az.parentNode.replaceChild(ax,az)}else{c.insertAfter(ax,az)}r.setCursorLocation(aq,1);if(c.isEmpty(az)){c.remove(az)}}}function an(){var ap,ao,aq;ao=ag(r.getStart());if(ao&&!c.isEmpty(ao)){a.walk(ao,function(ar){if(ar.nodeType==1&&ar.id!==al&&!c.isEmpty(ar)){c.setAttrib(ar,"data-mce-bogus",null)}},"childNodes")}}if(!self._hasCaretEvents){aa.onBeforeGetContent.addToTop(function(){var ao=[],ap;if(aj(ag(r.getStart()),ao)){ap=ao.length;while(ap--){c.setAttrib(ao[ap],"data-mce-bogus","1")}}});a.each("onMouseUp onKeyUp".split(" "),function(ao){aa[ao].addToTop(function(){ae();an()})});aa.onKeyDown.addToTop(function(ao,aq){var ap=aq.keyCode;if(ap==8||ap==37||ap==39){ae(ag(r.getStart()))}an()});r.onSetContent.add(an);self._hasCaretEvents=true}if(ak=="apply"){ah()}else{am()}}function R(ac){var ab=ac.startContainer,ai=ac.startOffset,ae,ah,ag,ad,af;if(ab.nodeType==3&&ai>=ab.nodeValue.length){ai=s(ab);ab=ab.parentNode;ae=true}if(ab.nodeType==1){ad=ab.childNodes;ab=ad[Math.min(ai,ad.length-1)];ah=new t(ab,c.getParent(ab,c.isBlock));if(ai>ad.length-1||ae){ah.next()}for(ag=ah.current();ag;ag=ah.next()){if(ag.nodeType==3&&!f(ag)){af=c.create("a",null,G);ag.parentNode.insertBefore(af,ag);ac.setStart(ag,0);r.setRng(ac);c.remove(af);return}}}}}})(tinymce);tinymce.onAddEditor.add(function(e,a){var d,h,g,c=a.settings;function b(j,i){e.each(i,function(l,k){if(l){g.setStyle(j,k,l)}});g.rename(j,"span")}function f(i,j){g=i.dom;if(c.convert_fonts_to_spans){e.each(g.select("font,u,strike",j.node),function(k){d[k.nodeName.toLowerCase()](a.dom,k)})}}if(c.inline_styles){h=e.explode(c.font_size_legacy_values);d={font:function(j,i){b(i,{backgroundColor:i.style.backgroundColor,color:i.color,fontFamily:i.face,fontSize:h[parseInt(i.size,10)-1]})},u:function(j,i){b(i,{textDecoration:"underline"})},strike:function(j,i){b(i,{textDecoration:"line-through"})}};a.onPreProcess.add(f);a.onSetContent.add(f);a.onInit.add(function(){a.selection.onSetContent.add(f)})}});(function(b){var a=b.dom.TreeWalker;b.EnterKey=function(f){var i=f.dom,e=f.selection,d=f.settings,h=f.undoManager,c=f.schema.getNonEmptyElements();function g(B){var v=e.getRng(true),G,j,A,u,p,M,C,o,k,n,t,J,x,D;function E(N){return N&&i.isBlock(N)&&!/^(TD|TH|CAPTION|FORM)$/.test(N.nodeName)&&!/^(fixed|absolute)/i.test(N.style.position)&&i.getContentEditable(N)!=="true"}function F(O){var N;if(b.isIE&&!b.isIE11&&i.isBlock(O)){N=e.getRng();O.appendChild(i.create("span",null,"\u00a0"));e.select(O);O.lastChild.outerHTML="";e.setRng(N)}}function z(P){var O=P,Q=[],N;while(O=O.firstChild){if(i.isBlock(O)){return}if(O.nodeType==1&&!c[O.nodeName.toLowerCase()]){Q.push(O)}}N=Q.length;while(N--){O=Q[N];if(!O.hasChildNodes()||(O.firstChild==O.lastChild&&O.firstChild.nodeValue==="")){i.remove(O)}else{if(O.nodeName=="A"&&(O.innerText||O.textContent)===" "){i.remove(O)}}}}function m(O){var T,R,N,U,S,Q=O,P;N=i.createRng();if(O.hasChildNodes()){T=new a(O,O);while(R=T.current()){if(R.nodeType==3){N.setStart(R,0);N.setEnd(R,0);break}if(c[R.nodeName.toLowerCase()]){N.setStartBefore(R);N.setEndBefore(R);break}Q=R;R=T.next()}if(!R){N.setStart(Q,0);N.setEnd(Q,0)}}else{if(O.nodeName=="BR"){if(O.nextSibling&&i.isBlock(O.nextSibling)){if(!M||M<9){P=i.create("br");O.parentNode.insertBefore(P,O)}N.setStartBefore(O);N.setEndBefore(O)}else{N.setStartAfter(O);N.setEndAfter(O)}}else{N.setStart(O,0);N.setEnd(O,0)}}e.setRng(N);i.remove(P);S=i.getViewPort(f.getWin());U=i.getPos(O).y;if(US.y+S.h){f.getWin().scrollTo(0,U'}return R}function q(Q){var P,O,N;if(A.nodeType==3&&(Q?u>0:u0){return true}}}function L(){var P,O,N;if(A&&A.nodeType==3&&u>=A.nodeValue.length){if((!b.isIE||b.isIE11)&&!y()){P=i.create("br");v.insertNode(P);v.setStartAfter(P);v.setEndAfter(P);O=true}}P=i.create("br");v.insertNode(P);if((b.isIE&&!b.isIE11)&&t=="PRE"&&(!M||M<8)){P.parentNode.insertBefore(i.doc.createTextNode("\r"),P)}N=i.create("span",{}," ");P.parentNode.insertBefore(N,P);e.scrollIntoView(N);i.remove(N);if(!O){v.setStartAfter(P);v.setEndAfter(P)}else{v.setStartBefore(P);v.setEndBefore(P)}e.setRng(v);h.add()}function s(N){do{if(N.nodeType===3){N.nodeValue=N.nodeValue.replace(/^[\r\n]+/,"")}N=N.firstChild}while(N)}function K(P){var N=i.getRoot(),O,Q;O=P;while(O!==N&&i.getContentEditable(O)!=="false"){if(i.getContentEditable(O)==="true"){Q=O}O=O.parentNode}return O!==N?Q:N}function I(O){var N;if(!b.isIE||b.isIE11){O.normalize();N=O.lastChild;if(!N||(/^(left|right)$/gi.test(i.getStyle(N,"float",true)))){i.add(O,"br")}}}if(!v.collapsed){f.execCommand("Delete");return}if(B.isDefaultPrevented()){return}A=v.startContainer;u=v.startOffset;x=(d.force_p_newlines?"p":"")||d.forced_root_block;x=x?x.toUpperCase():"";M=i.doc.documentMode;C=B.shiftKey;if(A.nodeType==1&&A.hasChildNodes()){D=u>A.childNodes.length-1;A=A.childNodes[Math.min(u,A.childNodes.length-1)]||A;if(D&&A.nodeType==3){u=A.nodeValue.length}else{u=0}}j=K(A);if(!j){return}h.beforeChange();if(!i.isBlock(j)&&j!=i.getRoot()){if(!x||C){L()}return}if((x&&!C)||(!x&&C)){A=l(A,u)}p=i.getParent(A,i.isBlock);n=p?i.getParent(p.parentNode,i.isBlock):null;t=p?p.nodeName.toUpperCase():"";J=n?n.nodeName.toUpperCase():"";if(J=="LI"&&!B.ctrlKey){p=n;t=J}if(t=="LI"){if(!x&&C){L();return}if(i.isEmpty(p)){if(/^(UL|OL|LI)$/.test(n.parentNode.nodeName)){return false}H();return}}if(t=="PRE"&&d.br_in_pre!==false){if(!C){L();return}}else{if((!x&&!C&&t!="LI")||(x&&C)){L();return}}x=x||"P";if(q()){if(/^(H[1-6]|PRE)$/.test(t)&&J!="HGROUP"){o=r(x)}else{o=r()}if(d.end_container_on_empty_block&&E(n)&&i.isEmpty(p)){o=i.split(n,p)}else{i.insertAfter(o,p)}m(o)}else{if(q(true)){o=p.parentNode.insertBefore(r(),p);F(o)}else{G=v.cloneRange();G.setEndAfter(p);k=G.extractContents();s(k);o=k.firstChild;i.insertAfter(k,p);z(o);I(p);m(o)}}i.setAttrib(o,"id","");h.add()}f.onKeyDown.add(function(k,j){if(j.keyCode==13){if(g(j)!==false){j.preventDefault()}}})}})(tinymce); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/tiny_mce_popup.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/tiny_mce_popup.js deleted file mode 100644 index 6dcfafc8ed..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/tiny_mce_popup.js +++ /dev/null @@ -1,5 +0,0 @@ - -// Uncomment and change this document.domain value if you are loading the script cross subdomains -// document.domain = 'moxiecode.com'; - -var tinymce=null,tinyMCEPopup,tinyMCE;tinyMCEPopup={init:function(){var b=this,a,c;a=b.getWin();tinymce=a.tinymce;tinyMCE=a.tinyMCE;b.editor=tinymce.EditorManager.activeEditor;b.params=b.editor.windowManager.params;b.features=b.editor.windowManager.features;b.dom=b.editor.windowManager.createInstance("tinymce.dom.DOMUtils",document,{ownEvents:true,proxy:tinyMCEPopup._eventProxy});b.dom.bind(window,"ready",b._onDOMLoaded,b);if(b.features.popup_css!==false){b.dom.loadCSS(b.features.popup_css||b.editor.settings.popup_css)}b.listeners=[];b.onInit={add:function(e,d){b.listeners.push({func:e,scope:d})}};b.isWindow=!b.getWindowArg("mce_inline");b.id=b.getWindowArg("mce_window_id");b.editor.windowManager.onOpen.dispatch(b.editor.windowManager,window)},getWin:function(){return(!window.frameElement&&window.dialogArguments)||opener||parent||top},getWindowArg:function(c,b){var a=this.params[c];return tinymce.is(a)?a:b},getParam:function(b,a){return this.editor.getParam(b,a)},getLang:function(b,a){return this.editor.getLang(b,a)},execCommand:function(d,c,e,b){b=b||{};b.skip_focus=1;this.restoreSelection();return this.editor.execCommand(d,c,e,b)},resizeToInnerSize:function(){var a=this;setTimeout(function(){var b=a.dom.getViewPort(window);a.editor.windowManager.resizeBy(a.getWindowArg("mce_width")-b.w,a.getWindowArg("mce_height")-b.h,a.id||window)},10)},executeOnLoad:function(s){this.onInit.add(function(){eval(s)})},storeSelection:function(){this.editor.windowManager.bookmark=tinyMCEPopup.editor.selection.getBookmark(1)},restoreSelection:function(){var a=tinyMCEPopup;if(!a.isWindow&&tinymce.isIE){a.editor.selection.moveToBookmark(a.editor.windowManager.bookmark)}},requireLangPack:function(){var b=this,a=b.getWindowArg("plugin_url")||b.getWindowArg("theme_url");if(a&&b.editor.settings.language&&b.features.translate_i18n!==false&&b.editor.settings.language_load!==false){a+="/langs/"+b.editor.settings.language+"_dlg.js";if(!tinymce.ScriptLoader.isDone(a)){document.write('"; return html.Raw(str); diff --git a/src/Umbraco.Web/Install/InstallSteps/NewInstallStep.cs b/src/Umbraco.Web/Install/InstallSteps/NewInstallStep.cs index 7a6a54f9e7..2d0daf1aa9 100644 --- a/src/Umbraco.Web/Install/InstallSteps/NewInstallStep.cs +++ b/src/Umbraco.Web/Install/InstallSteps/NewInstallStep.cs @@ -32,6 +32,7 @@ namespace Umbraco.Web.Install.InstallSteps _applicationContext = applicationContext; } + //TODO: Change all logic in this step to use ASP.NET Identity NOT MembershipProviders private MembershipProvider CurrentProvider { get diff --git a/src/Umbraco.Web/MembershipProviderExtensions.cs b/src/Umbraco.Web/MembershipProviderExtensions.cs index 2a32384732..0aec00eb76 100644 --- a/src/Umbraco.Web/MembershipProviderExtensions.cs +++ b/src/Umbraco.Web/MembershipProviderExtensions.cs @@ -28,7 +28,8 @@ namespace Umbraco.Web {"enableReset", canReset}, {"enablePasswordRetrieval", membershipProvider.EnablePasswordRetrieval}, {"requiresQuestionAnswer", membershipProvider.RequiresQuestionAndAnswer}, - {"allowManuallyChangingPassword", baseProvider != null && baseProvider.AllowManuallyChangingPassword} + {"allowManuallyChangingPassword", baseProvider != null && baseProvider.AllowManuallyChangingPassword}, + {"minNonAlphaNumericChars", membershipProvider.MinRequiredNonAlphanumericCharacters} //TODO: Inject the other parameters in here to change the behavior of this control - based on the membership provider settings. }; } diff --git a/src/Umbraco.Web/ModelStateExtensions.cs b/src/Umbraco.Web/ModelStateExtensions.cs index 5df479ce76..a36f3c89f6 100644 --- a/src/Umbraco.Web/ModelStateExtensions.cs +++ b/src/Umbraco.Web/ModelStateExtensions.cs @@ -61,7 +61,7 @@ namespace Umbraco.Web { //if there are no member names supplied then we assume that the validation message is for the overall property // not a sub field on the property editor - if (!result.MemberNames.Any()) + if (result.MemberNames.Any() == false) { //add a model state error for the entire property modelState.AddModelError(string.Format("{0}.{1}", "_Properties", propertyAlias), result.ErrorMessage); diff --git a/src/Umbraco.Web/Models/ContentEditing/AssignedContentPermissions.cs b/src/Umbraco.Web/Models/ContentEditing/AssignedContentPermissions.cs new file mode 100644 index 0000000000..dc071052cc --- /dev/null +++ b/src/Umbraco.Web/Models/ContentEditing/AssignedContentPermissions.cs @@ -0,0 +1,21 @@ +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace Umbraco.Web.Models.ContentEditing +{ + /// + /// The permissions assigned to a content node + /// + /// + /// The underlying data such as Name, etc... is that of the Content item + /// + [DataContract(Name = "contentPermissions", Namespace = "")] + public class AssignedContentPermissions : EntityBasic + { + /// + /// The assigned permissions to the content item organized by permission group name + /// + [DataMember(Name = "permissions")] + public IDictionary> AssignedPermissions { get; set; } + } +} \ No newline at end of file diff --git a/src/Umbraco.Web/Models/ContentEditing/AssignedUserGroupPermissions.cs b/src/Umbraco.Web/Models/ContentEditing/AssignedUserGroupPermissions.cs new file mode 100644 index 0000000000..5428de883f --- /dev/null +++ b/src/Umbraco.Web/Models/ContentEditing/AssignedUserGroupPermissions.cs @@ -0,0 +1,38 @@ +using System.Collections.Generic; +using System.Linq; +using System.Runtime.Serialization; + +namespace Umbraco.Web.Models.ContentEditing +{ + /// + /// The user group permissions assigned to a content node + /// + /// + /// The underlying data such as Name, etc... is that of the User Group + /// + [DataContract(Name = "userGroupPermissions", Namespace = "")] + public class AssignedUserGroupPermissions : EntityBasic + { + /// + /// The assigned permissions for the user group organized by permission group name + /// + [DataMember(Name = "permissions")] + public IDictionary> AssignedPermissions { get; set; } + + /// + /// The default permissions for the user group organized by permission group name + /// + [DataMember(Name = "defaultPermissions")] + public IDictionary> DefaultPermissions { get; set; } + + public static IDictionary> ClonePermissions(IDictionary> permissions) + { + var result = new Dictionary>(); + foreach (var permission in permissions) + { + result[permission.Key] = new List(permission.Value.Select(x => (Permission)x.Clone())); + } + return result; + } + } +} \ No newline at end of file diff --git a/src/Umbraco.Web/Models/ContentEditing/ContentItemBasic.cs b/src/Umbraco.Web/Models/ContentEditing/ContentItemBasic.cs index 74c6a3ea7e..18229d94d8 100644 --- a/src/Umbraco.Web/Models/ContentEditing/ContentItemBasic.cs +++ b/src/Umbraco.Web/Models/ContentEditing/ContentItemBasic.cs @@ -29,10 +29,10 @@ namespace Umbraco.Web.Models.ContentEditing public bool HasPublishedVersion { get; set; } [DataMember(Name = "owner")] - public UserBasic Owner { get; set; } + public UserProfile Owner { get; set; } [DataMember(Name = "updater")] - public UserBasic Updater { get; set; } + public UserProfile Updater { get; set; } [DataMember(Name = "contentTypeAlias", IsRequired = true)] [Required(AllowEmptyStrings = false)] @@ -89,7 +89,7 @@ namespace Umbraco.Web.Models.ContentEditing /// /// This is not used for outgoing model information. /// - [JsonIgnore] + [IgnoreDataMember] internal TPersisted PersistedContent { get; set; } /// @@ -100,7 +100,7 @@ namespace Umbraco.Web.Models.ContentEditing /// instead of having to look up all the data individually. /// This is not used for outgoing model information. /// - [JsonIgnore] + [IgnoreDataMember] internal ContentItemDto ContentDto { get; set; } diff --git a/src/Umbraco.Web/Models/ContentEditing/ContentItemDisplay.cs b/src/Umbraco.Web/Models/ContentEditing/ContentItemDisplay.cs index 2615c8774d..c416f30a48 100644 --- a/src/Umbraco.Web/Models/ContentEditing/ContentItemDisplay.cs +++ b/src/Umbraco.Web/Models/ContentEditing/ContentItemDisplay.cs @@ -56,7 +56,7 @@ namespace Umbraco.Web.Models.ContentEditing /// Each char represents a button which we can then map on the front-end to the correct actions /// [DataMember(Name = "allowedActions")] - public IEnumerable AllowedActions { get; set; } + public IEnumerable AllowedActions { get; set; } } } \ No newline at end of file diff --git a/src/Umbraco.Web/Models/ContentEditing/DataTypeSave.cs b/src/Umbraco.Web/Models/ContentEditing/DataTypeSave.cs index 16c7cade0b..9b6c0df110 100644 --- a/src/Umbraco.Web/Models/ContentEditing/DataTypeSave.cs +++ b/src/Umbraco.Web/Models/ContentEditing/DataTypeSave.cs @@ -31,13 +31,13 @@ namespace Umbraco.Web.Models.ContentEditing /// /// The real persisted data type /// - [JsonIgnore] + [IgnoreDataMember] internal IDataTypeDefinition PersistedDataType { get; set; } /// /// The PropertyEditor assigned /// - [JsonIgnore] + [IgnoreDataMember] internal PropertyEditor PropertyEditor { get; set; } } diff --git a/src/Umbraco.Web/Models/ContentEditing/EntityTypeSearchResult.cs b/src/Umbraco.Web/Models/ContentEditing/EntityTypeSearchResult.cs deleted file mode 100644 index 47dd5005a6..0000000000 --- a/src/Umbraco.Web/Models/ContentEditing/EntityTypeSearchResult.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System.Collections.Generic; -using System.Runtime.Serialization; -using Examine; - -namespace Umbraco.Web.Models.ContentEditing -{ - /// - /// Represents a search result by entity type - /// - [DataContract(Name = "searchResult", Namespace = "")] - public class EntityTypeSearchResult - { - [DataMember(Name = "type")] - public string EntityType { get; set; } - - [DataMember(Name = "results")] - public IEnumerable Results { get; set; } - } -} \ No newline at end of file diff --git a/src/Umbraco.Web/Models/ContentEditing/Permission.cs b/src/Umbraco.Web/Models/ContentEditing/Permission.cs new file mode 100644 index 0000000000..9c40dc0aa6 --- /dev/null +++ b/src/Umbraco.Web/Models/ContentEditing/Permission.cs @@ -0,0 +1,38 @@ +using System; +using System.Runtime.Serialization; + +namespace Umbraco.Web.Models.ContentEditing +{ + [DataContract(Name = "permission", Namespace = "")] + public class Permission : ICloneable + { + [DataMember(Name = "name")] + public string Name { get; set; } + + [DataMember(Name = "description")] + public string Description { get; set; } + + [DataMember(Name = "checked")] + public bool Checked { get; set; } + + [DataMember(Name = "icon")] + public string Icon { get; set; } + + /// + /// We'll use this to map the categories but it wont' be returned in the json + /// + [IgnoreDataMember] + internal string Category { get; set; } + + /// + /// The letter from the IAction + /// + [DataMember(Name = "permissionCode")] + public string PermissionCode { get; set; } + + public object Clone() + { + return this.MemberwiseClone(); + } + } +} \ No newline at end of file diff --git a/src/Umbraco.Web/Models/ContentEditing/SearchResultItem.cs b/src/Umbraco.Web/Models/ContentEditing/SearchResultItem.cs index b846812e88..495c5d0c30 100644 --- a/src/Umbraco.Web/Models/ContentEditing/SearchResultItem.cs +++ b/src/Umbraco.Web/Models/ContentEditing/SearchResultItem.cs @@ -1,25 +1,15 @@ -namespace Umbraco.Web.Models.ContentEditing +using System.Runtime.Serialization; + +namespace Umbraco.Web.Models.ContentEditing { - public class SearchResultItem - { + [DataContract(Name = "searchResult", Namespace = "")] + public class SearchResultItem : EntityBasic + { /// - /// The string representation of the ID, used for Web responses + /// The score of the search result /// - public string Id { get; set; } - - /// - /// The name/title of the search result item - /// - public string Title { get; set; } - - /// - /// The rank of the search result - /// - public int Rank { get; set; } - - /// - /// Description/Synopsis of the item - /// - public string Description { get; set; } + [DataMember(Name = "score")] + public float Score { get; set; } + } } \ No newline at end of file diff --git a/src/Umbraco.Web/Models/ContentEditing/TabbedContentItem.cs b/src/Umbraco.Web/Models/ContentEditing/TabbedContentItem.cs index b18118d8c2..13c52d2a3a 100644 --- a/src/Umbraco.Web/Models/ContentEditing/TabbedContentItem.cs +++ b/src/Umbraco.Web/Models/ContentEditing/TabbedContentItem.cs @@ -29,7 +29,7 @@ namespace Umbraco.Web.Models.ContentEditing /// /// This property cannot be set /// - [JsonIgnore] + [IgnoreDataMember] public override IEnumerable Properties { get { return Tabs.SelectMany(x => x.Properties); } diff --git a/src/Umbraco.Web/Models/ContentEditing/TreeSearchResult.cs b/src/Umbraco.Web/Models/ContentEditing/TreeSearchResult.cs new file mode 100644 index 0000000000..1da9d61c98 --- /dev/null +++ b/src/Umbraco.Web/Models/ContentEditing/TreeSearchResult.cs @@ -0,0 +1,35 @@ +using System.Collections.Generic; +using System.Runtime.Serialization; +using Examine; + +namespace Umbraco.Web.Models.ContentEditing +{ + /// + /// Represents a search result by entity type + /// + [DataContract(Name = "searchResult", Namespace = "")] + public class TreeSearchResult + { + [DataMember(Name = "appAlias")] + public string AppAlias { get; set; } + + [DataMember(Name = "treeAlias")] + public string TreeAlias { get; set; } + + /// + /// This is optional but if specified should be the name of an angular service to format the search result. + /// + [DataMember(Name = "jsSvc")] + public string JsFormatterService { get; set; } + + /// + /// This is optional but if specified should be the name of a method on the jsSvc angular service to use, if not + /// specfied than it will expect the method to be called `format(searchResult, appAlias, treeAlias)` + /// + [DataMember(Name = "jsMethod")] + public string JsFormatterMethod { get; set; } + + [DataMember(Name = "results")] + public IEnumerable Results { get; set; } + } +} \ No newline at end of file diff --git a/src/Umbraco.Web/Models/ContentEditing/UserBasic.cs b/src/Umbraco.Web/Models/ContentEditing/UserBasic.cs index c1cf3ed5c6..0b4a7e02d7 100644 --- a/src/Umbraco.Web/Models/ContentEditing/UserBasic.cs +++ b/src/Umbraco.Web/Models/ContentEditing/UserBasic.cs @@ -1,27 +1,68 @@ -using System.ComponentModel.DataAnnotations; +using System; +using System.Collections.Generic; +using System.ComponentModel; using System.Runtime.Serialization; using Umbraco.Core.Models.Membership; namespace Umbraco.Web.Models.ContentEditing { /// - /// A basic structure the represents a user + /// The user model used for paging and listing users in the UI /// [DataContract(Name = "user", Namespace = "")] - public class UserBasic : System.IComparable + [ReadOnly(true)] + public class UserBasic : EntityBasic, INotificationModel { - [DataMember(Name = "id", IsRequired = true)] - [Required] - public int UserId { get; set; } - - [DataMember(Name = "name", IsRequired = true)] - [Required] - public string Name { get; set; } - - - int System.IComparable.CompareTo(object obj) + public UserBasic() { - return Name.CompareTo(((UserBasic)obj).Name); - } + Notifications = new List(); + UserGroups = new List(); + } + + [DataMember(Name = "username")] + public string Username { get; set; } + + /// + /// The MD5 lowercase hash of the email which can be used by gravatar + /// + [DataMember(Name = "emailHash")] + public string EmailHash { get; set; } + + [DataMember(Name = "lastLoginDate")] + public DateTime? LastLoginDate { get; set; } + + /// + /// Returns a list of different size avatars + /// + [DataMember(Name = "avatars")] + public string[] Avatars { get; set; } + + [DataMember(Name = "userState")] + public UserState UserState { get; set; } + + [DataMember(Name = "culture", IsRequired = true)] + public string Culture { get; set; } + + [DataMember(Name = "email", IsRequired = true)] + public string Email { get; set; } + + /// + /// The list of group aliases assigned to the user + /// + [DataMember(Name = "userGroups")] + public IEnumerable UserGroups { get; set; } + + /// + /// This is an info flag to denote if this object is the equivalent of the currently logged in user + /// + [DataMember(Name = "isCurrentUser")] + [ReadOnly(true)] + public bool IsCurrentUser { get; set; } + + /// + /// This is used to add custom localized messages/strings to the response for the app to use for localized UI purposes. + /// + [DataMember(Name = "notifications")] + public List Notifications { get; private set; } } } \ No newline at end of file diff --git a/src/Umbraco.Web/Models/ContentEditing/UserDetail.cs b/src/Umbraco.Web/Models/ContentEditing/UserDetail.cs index d27736576f..f613065eee 100644 --- a/src/Umbraco.Web/Models/ContentEditing/UserDetail.cs +++ b/src/Umbraco.Web/Models/ContentEditing/UserDetail.cs @@ -1,11 +1,16 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; +using System.ComponentModel; using System.ComponentModel.DataAnnotations; using System.Runtime.Serialization; namespace Umbraco.Web.Models.ContentEditing -{ +{ + /// + /// Represents information for the current user + /// [DataContract(Name = "user", Namespace = "")] - public class UserDetail : UserBasic + public class UserDetail : UserProfile { [DataMember(Name = "email", IsRequired = true)] [Required] @@ -21,21 +26,35 @@ namespace Umbraco.Web.Models.ContentEditing [DataMember(Name = "emailHash")] public string EmailHash { get; set; } - [DataMember(Name = "userType", IsRequired = true)] - [Required] - public string UserType { get; set; } + [Obsolete("This should not be used it exists for legacy reasons only, use user groups instead, it will be removed in future versions")] + [EditorBrowsable(EditorBrowsableState.Never)] + [ReadOnly(true)] + [DataMember(Name = "userType")] + public string UserType { get; set; } /// /// Gets/sets the number of seconds for the user's auth ticket to expire /// [DataMember(Name = "remainingAuthSeconds")] public double SecondsUntilTimeout { get; set; } + + /// + /// The user's calculated start nodes based on the start nodes they have assigned directly to them and via the groups they're assigned to + /// + [DataMember(Name = "startContentIds")] + public int[] StartContentIds { get; set; } + + /// + /// The user's calculated start nodes based on the start nodes they have assigned directly to them and via the groups they're assigned to + /// + [DataMember(Name = "startMediaIds")] + public int[] StartMediaIds { get; set; } - [DataMember(Name = "startContentId")] - public int StartContentId { get; set; } - - [DataMember(Name = "startMediaId")] - public int StartMediaId { get; set; } + /// + /// Returns a list of different size avatars + /// + [DataMember(Name = "avatars")] + public string[] Avatars { get; set; } /// /// A list of sections the user is allowed to view. diff --git a/src/Umbraco.Web/Models/ContentEditing/UserDisplay.cs b/src/Umbraco.Web/Models/ContentEditing/UserDisplay.cs new file mode 100644 index 0000000000..4cff43e3b8 --- /dev/null +++ b/src/Umbraco.Web/Models/ContentEditing/UserDisplay.cs @@ -0,0 +1,43 @@ +using System.Collections.Generic; +using System.ComponentModel; +using System.Globalization; +using System.Runtime.Serialization; + +namespace Umbraco.Web.Models.ContentEditing +{ + /// + /// Represents a user that is being edited + /// + [DataContract(Name = "user", Namespace = "")] + [ReadOnly(true)] + public class UserDisplay : UserBasic + { + public UserDisplay() + { + AvailableCultures = new Dictionary(); + StartContentIds = new List(); + StartMediaIds = new List(); + } + + /// + /// Gets the available cultures (i.e. to populate a drop down) + /// The key is the culture stored in the database, the value is the Name + /// + [DataMember(Name = "availableCultures")] + public IDictionary AvailableCultures { get; set; } + + [DataMember(Name = "startContentIds")] + public IEnumerable StartContentIds { get; set; } + + [DataMember(Name = "startMediaIds")] + public IEnumerable StartMediaIds { get; set; } + + /// + /// If the password is reset on save, this value will be populated + /// + [DataMember(Name = "resetPasswordValue")] + [ReadOnly(true)] + public string ResetPasswordValue { get; set; } + + } +} \ No newline at end of file diff --git a/src/Umbraco.Web/Models/ContentEditing/UserGroupBasic.cs b/src/Umbraco.Web/Models/ContentEditing/UserGroupBasic.cs new file mode 100644 index 0000000000..b52a653497 --- /dev/null +++ b/src/Umbraco.Web/Models/ContentEditing/UserGroupBasic.cs @@ -0,0 +1,37 @@ +using System.Collections.Generic; +using System.Linq; +using System.Runtime.Serialization; + +namespace Umbraco.Web.Models.ContentEditing +{ + [DataContract(Name = "userGroup", Namespace = "")] + public class UserGroupBasic : EntityBasic, INotificationModel + { + public UserGroupBasic() + { + Notifications = new List(); + Sections = Enumerable.Empty
    (); + } + + /// + /// This is used to add custom localized messages/strings to the response for the app to use for localized UI purposes. + /// + [DataMember(Name = "notifications")] + public List Notifications { get; private set; } + + [DataMember(Name = "sections")] + public IEnumerable
    Sections { get; set; } + + [DataMember(Name = "contentStartNode")] + public EntityBasic ContentStartNode { get; set; } + + [DataMember(Name = "mediaStartNode")] + public EntityBasic MediaStartNode { get; set; } + + /// + /// The number of users assigned to this group + /// + [DataMember(Name = "userCount")] + public int UserCount { get; set; } + } +} \ No newline at end of file diff --git a/src/Umbraco.Web/Models/ContentEditing/UserGroupDisplay.cs b/src/Umbraco.Web/Models/ContentEditing/UserGroupDisplay.cs new file mode 100644 index 0000000000..ea8eaa4b6c --- /dev/null +++ b/src/Umbraco.Web/Models/ContentEditing/UserGroupDisplay.cs @@ -0,0 +1,31 @@ +using System.Collections.Generic; +using System.Linq; +using System.Runtime.Serialization; + +namespace Umbraco.Web.Models.ContentEditing +{ + [DataContract(Name = "userGroup", Namespace = "")] + public class UserGroupDisplay : UserGroupBasic + { + public UserGroupDisplay() + { + Users = Enumerable.Empty(); + AssignedPermissions = Enumerable.Empty(); + } + + [DataMember(Name = "users")] + public IEnumerable Users { get; set; } + + /// + /// The default permissions for the user group organized by permission group name + /// + [DataMember(Name = "defaultPermissions")] + public IDictionary> DefaultPermissions { get; set; } + + /// + /// The assigned permissions for the user group organized by permission group name + /// + [DataMember(Name = "assignedPermissions")] + public IEnumerable AssignedPermissions { get; set; } + } +} \ No newline at end of file diff --git a/src/Umbraco.Web/Models/ContentEditing/UserGroupPermissionsSave.cs b/src/Umbraco.Web/Models/ContentEditing/UserGroupPermissionsSave.cs new file mode 100644 index 0000000000..b38a6d75e3 --- /dev/null +++ b/src/Umbraco.Web/Models/ContentEditing/UserGroupPermissionsSave.cs @@ -0,0 +1,40 @@ +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Runtime.Serialization; +using Umbraco.Core; + +namespace Umbraco.Web.Models.ContentEditing +{ + /// + /// Used to assign user group permissions to a content node + /// + [DataContract(Name = "contentPermission", Namespace = "")] + public class UserGroupPermissionsSave : IValidatableObject + { + public UserGroupPermissionsSave() + { + AssignedPermissions = new Dictionary>(); + } + + //TODO: we should have an option to clear the permissions assigned to this node and instead just have them inherit - yes once we actually have inheritance! + + [DataMember(Name = "contentId", IsRequired = true)] + [Required] + public int ContentId { get; set; } + + /// + /// A dictionary of permissions to assign, the key is the user group id + /// + [DataMember(Name = "permissions")] + public IDictionary> AssignedPermissions { get; set; } + + public IEnumerable Validate(ValidationContext validationContext) + { + if (AssignedPermissions.SelectMany(x => x.Value).Any(x => x.IsNullOrWhiteSpace())) + { + yield return new ValidationResult("A permission value cannot be null or empty", new[] { "Permissions" }); + } + } + } +} \ No newline at end of file diff --git a/src/Umbraco.Web/Models/ContentEditing/UserGroupSave.cs b/src/Umbraco.Web/Models/ContentEditing/UserGroupSave.cs new file mode 100644 index 0000000000..872834988d --- /dev/null +++ b/src/Umbraco.Web/Models/ContentEditing/UserGroupSave.cs @@ -0,0 +1,80 @@ +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Umbraco.Core; +using Umbraco.Core.Models; +using Umbraco.Core.Models.Membership; + +namespace Umbraco.Web.Models.ContentEditing +{ + [DataContract(Name = "userGroup", Namespace = "")] + public class UserGroupSave : EntityBasic, IValidatableObject + { + /// + /// The action to perform when saving this user group + /// + /// + /// If either of the Publish actions are specified an exception will be thrown. + /// + [DataMember(Name = "action", IsRequired = true)] + [Required] + public ContentSaveAction Action { get; set; } + + [DataMember(Name = "alias", IsRequired = true)] + [Required] + public override string Alias { get; set; } + + [DataMember(Name = "sections")] + public IEnumerable Sections { get; set; } + + [DataMember(Name = "users")] + public IEnumerable Users { get; set; } + + [DataMember(Name = "startContentId")] + public int? StartContentId { get; set; } + + [DataMember(Name = "startMediaId")] + public int? StartMediaId { get; set; } + + /// + /// The list of letters (permission codes) to assign as the default for the user group + /// + [DataMember(Name = "defaultPermissions")] + public IEnumerable DefaultPermissions { get; set; } + + /// + /// The assigned permissions for content + /// + /// + /// The key is the content id and the list is the list of letters (permission codes) to assign + /// + [DataMember(Name = "assignedPermissions")] + public IDictionary> AssignedPermissions { get; set; } + + /// + /// The real persisted user group + /// + [IgnoreDataMember] + internal IUserGroup PersistedUserGroup { get; set; } + + public IEnumerable Validate(ValidationContext validationContext) + { + if (DefaultPermissions.Any(x => x.IsNullOrWhiteSpace())) + { + yield return new ValidationResult("A permission value cannot be null or empty", new[] { "Permissions" }); + } + + foreach (var assignedPermission in AssignedPermissions) + { + foreach (var permission in assignedPermission.Value) + { + if (permission.IsNullOrWhiteSpace()) + yield return new ValidationResult("A permission value cannot be null or empty", new[] { "AssignedPermissions" }); + } + } + + } + } +} \ No newline at end of file diff --git a/src/Umbraco.Web/Models/ContentEditing/UserInvite.cs b/src/Umbraco.Web/Models/ContentEditing/UserInvite.cs new file mode 100644 index 0000000000..747f64bf7a --- /dev/null +++ b/src/Umbraco.Web/Models/ContentEditing/UserInvite.cs @@ -0,0 +1,26 @@ +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Runtime.Serialization; + +namespace Umbraco.Web.Models.ContentEditing +{ + /// + /// Represents the data used to invite a user + /// + [DataContract(Name = "user", Namespace = "")] + public class UserInvite : EntityBasic + { + [DataMember(Name = "userGroups")] + [Required] + public IEnumerable UserGroups { get; set; } + + [DataMember(Name = "email", IsRequired = true)] + [Required] + [EmailAddress] + public string Email { get; set; } + + [DataMember(Name = "message")] + public string Message { get; set; } + + } +} \ No newline at end of file diff --git a/src/Umbraco.Web/Models/ContentEditing/UserProfile.cs b/src/Umbraco.Web/Models/ContentEditing/UserProfile.cs new file mode 100644 index 0000000000..eca28e1408 --- /dev/null +++ b/src/Umbraco.Web/Models/ContentEditing/UserProfile.cs @@ -0,0 +1,28 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.Runtime.Serialization; +using Umbraco.Core.Models.Membership; + +namespace Umbraco.Web.Models.ContentEditing +{ + /// + /// A bare minimum structure that represents a user, usually attached to other objects + /// + [DataContract(Name = "user", Namespace = "")] + public class UserProfile : IComparable + { + [DataMember(Name = "id", IsRequired = true)] + [Required] + public int UserId { get; set; } + + [DataMember(Name = "name", IsRequired = true)] + [Required] + public string Name { get; set; } + + + int IComparable.CompareTo(object obj) + { + return String.Compare(Name, ((UserProfile)obj).Name, StringComparison.Ordinal); + } + } +} \ No newline at end of file diff --git a/src/Umbraco.Web/Models/ContentEditing/UserSave.cs b/src/Umbraco.Web/Models/ContentEditing/UserSave.cs new file mode 100644 index 0000000000..30f6bfc420 --- /dev/null +++ b/src/Umbraco.Web/Models/ContentEditing/UserSave.cs @@ -0,0 +1,57 @@ +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Runtime.Serialization; + +namespace Umbraco.Web.Models.ContentEditing +{ + /// + /// Represents the data used to persist a user + /// + /// + /// This will be different from the model used to display a user and we don't want to "Overpost" data back to the server, + /// and there will most likely be different bits of data required for updating passwords which will be different from the + /// data used to display vs save + /// + [DataContract(Name = "user", Namespace = "")] + public class UserSave : EntityBasic, IValidatableObject + { + [DataMember(Name = "changePassword", IsRequired = true)] + public ChangingPasswordModel ChangePassword { get; set; } + + [DataMember(Name = "id", IsRequired = true)] + [Required] + public new int Id { get; set; } + + [DataMember(Name = "username", IsRequired = true)] + [Required] + public string Username { get; set; } + + [DataMember(Name = "culture", IsRequired = true)] + [Required] + public string Culture { get; set; } + + [DataMember(Name = "email", IsRequired = true)] + [Required] + [EmailAddress] + public string Email { get; set; } + + [DataMember(Name = "userGroups")] + [Required] + public IEnumerable UserGroups { get; set; } + + [DataMember(Name = "startContentIds")] + public int[] StartContentIds { get; set; } + + [DataMember(Name = "startMediaIds")] + public int[] StartMediaIds { get; set; } + + public IEnumerable Validate(ValidationContext validationContext) + { + //TODO: Add other server side validation + //if (CultureInfo.GetCultureInfo(Culture)) + // yield return new ValidationResult("The culture is invalid", new[] { "Culture" }); + + yield break; + } + } +} \ No newline at end of file diff --git a/src/Umbraco.Web/Models/DynamicPublishedContent.cs b/src/Umbraco.Web/Models/DynamicPublishedContent.cs index 141eeefae1..e776865fb0 100644 --- a/src/Umbraco.Web/Models/DynamicPublishedContent.cs +++ b/src/Umbraco.Web/Models/DynamicPublishedContent.cs @@ -5,6 +5,7 @@ using System; using System.Collections.Concurrent; using System.Collections.Generic; +using System.ComponentModel; using System.Diagnostics; using System.Dynamic; using System.Linq; @@ -17,11 +18,13 @@ using System.Reflection; using Umbraco.Core.Models.PublishedContent; namespace Umbraco.Web.Models -{ - - /// - /// The base dynamic model for views - /// +{ + + /// + /// The base dynamic model for views + /// + [Obsolete("The use of dynamics has been deprecated, use strongly typed syntax instead, dynamics will be removed in future versions")] + [EditorBrowsable(EditorBrowsableState.Never)] [DebuggerDisplay("Content Id: {Id}, Name: {Name}")] public class DynamicPublishedContent : DynamicObject, IPublishedContent { diff --git a/src/Umbraco.Web/Models/DynamicPublishedContentList.cs b/src/Umbraco.Web/Models/DynamicPublishedContentList.cs index ef794737a5..382073332c 100644 --- a/src/Umbraco.Web/Models/DynamicPublishedContentList.cs +++ b/src/Umbraco.Web/Models/DynamicPublishedContentList.cs @@ -6,6 +6,7 @@ using Umbraco.Core; using Umbraco.Core.Cache; using Umbraco.Core.Dynamics; using System.Collections; +using System.ComponentModel; using System.Reflection; using Umbraco.Core.Models; using Umbraco.Core.Models.PublishedContent; @@ -16,6 +17,8 @@ namespace Umbraco.Web.Models /// /// Represents a collection of DynamicPublishedContent items. /// + [Obsolete("The use of dynamics has been deprecated, use strongly typed syntax instead, dynamics will be removed in future versions")] + [EditorBrowsable(EditorBrowsableState.Never)] public class DynamicPublishedContentList : DynamicObject, IEnumerable { private readonly List _content; diff --git a/src/Umbraco.Web/Models/ImageCropDataSet.cs b/src/Umbraco.Web/Models/ImageCropDataSet.cs index 4c5a68a6b9..00f46dd2d7 100644 --- a/src/Umbraco.Web/Models/ImageCropDataSet.cs +++ b/src/Umbraco.Web/Models/ImageCropDataSet.cs @@ -76,7 +76,7 @@ namespace Umbraco.Web.Models public bool HasImage() { - return string.IsNullOrEmpty(Src); + return ! string.IsNullOrEmpty(Src); } public string ToHtmlString() diff --git a/src/Umbraco.Web/Models/LoginModel.cs b/src/Umbraco.Web/Models/LoginModel.cs index 650fa067a3..5e6b2e5c18 100644 --- a/src/Umbraco.Web/Models/LoginModel.cs +++ b/src/Umbraco.Web/Models/LoginModel.cs @@ -10,7 +10,8 @@ namespace Umbraco.Web.Models public string Username { get; set; } [Required] - [DataMember(Name = "password", IsRequired = true)] + [DataMember(Name = "password", IsRequired = true)] + [StringLength(maximumLength:256)] public string Password { get; set; } } diff --git a/src/Umbraco.Web/Models/Mapping/CodeFileDisplayMapper.cs b/src/Umbraco.Web/Models/Mapping/CodeFileDisplayMapper.cs index dec0930c07..b997653844 100644 --- a/src/Umbraco.Web/Models/Mapping/CodeFileDisplayMapper.cs +++ b/src/Umbraco.Web/Models/Mapping/CodeFileDisplayMapper.cs @@ -28,12 +28,10 @@ namespace Umbraco.Web.Models.Mapping .ForMember(x => x.Snippet, exp => exp.Ignore()); config.CreateMap() - .ForMember(x => x.DeletedDate, exp => exp.Ignore()) + .IgnoreDeletableEntityCommonProperties() .ForMember(x => x.Id, exp => exp.Ignore()) .ForMember(x => x.Key, exp => exp.Ignore()) .ForMember(x => x.Path, exp => exp.Ignore()) - .ForMember(x => x.CreateDate, exp => exp.Ignore()) - .ForMember(x => x.UpdateDate, exp => exp.Ignore()) .ForMember(x => x.Path, exp => exp.Ignore()) .ForMember(x => x.Alias, exp => exp.Ignore()) .ForMember(x => x.Name, exp => exp.Ignore()) @@ -41,12 +39,10 @@ namespace Umbraco.Web.Models.Mapping .ForMember(x => x.HasIdentity, exp => exp.Ignore()); config.CreateMap() - .ForMember(x => x.DeletedDate, exp => exp.Ignore()) + .IgnoreDeletableEntityCommonProperties() .ForMember(x => x.Id, exp => exp.Ignore()) .ForMember(x => x.Key, exp => exp.Ignore()) .ForMember(x => x.Path, exp => exp.Ignore()) - .ForMember(x => x.CreateDate, exp => exp.Ignore()) - .ForMember(x => x.UpdateDate, exp => exp.Ignore()) .ForMember(x => x.Path, exp => exp.Ignore()) .ForMember(x => x.Alias, exp => exp.Ignore()) .ForMember(x => x.Name, exp => exp.Ignore()) diff --git a/src/Umbraco.Web/Models/Mapping/ContentModelMapper.cs b/src/Umbraco.Web/Models/Mapping/ContentModelMapper.cs index 37b002d297..3b55def135 100644 --- a/src/Umbraco.Web/Models/Mapping/ContentModelMapper.cs +++ b/src/Umbraco.Web/Models/Mapping/ContentModelMapper.cs @@ -108,7 +108,7 @@ namespace Umbraco.Web.Models.Mapping } //fill in the template config to be passed to the template drop down. - var templateItemConfig = new Dictionary {{"", "Choose..."}}; + var templateItemConfig = new Dictionary {{"", localizedText.Localize("general/choose")}}; foreach (var t in content.ContentType.AllowedTemplates .Where(t => t.Alias.IsNullOrWhiteSpace() == false && t.Name.IsNullOrWhiteSpace() == false)) { @@ -135,7 +135,7 @@ namespace Umbraco.Web.Models.Mapping Label = localizedText.Localize("content/releaseDate"), Value = display.ReleaseDate.HasValue ? display.ReleaseDate.Value.ToIsoString() : null, //Not editible for people without publish permission (U4-287) - View = display.AllowedActions.Contains(ActionPublish.Instance.Letter) ? "datepicker" : PropertyEditorResolver.Current.GetByAlias(Constants.PropertyEditors.NoEditAlias).ValueEditor.View, + View = display.AllowedActions.Contains(ActionPublish.Instance.Letter.ToString(CultureInfo.InvariantCulture)) ? "datepicker" : PropertyEditorResolver.Current.GetByAlias(Constants.PropertyEditors.NoEditAlias).ValueEditor.View, Config = new Dictionary { {"offsetTime", "1"} @@ -148,7 +148,7 @@ namespace Umbraco.Web.Models.Mapping Label = localizedText.Localize("content/unpublishDate"), Value = display.ExpireDate.HasValue ? display.ExpireDate.Value.ToIsoString() : null, //Not editible for people without publish permission (U4-287) - View = display.AllowedActions.Contains(ActionPublish.Instance.Letter) ? "datepicker" : PropertyEditorResolver.Current.GetByAlias(Constants.PropertyEditors.NoEditAlias).ValueEditor.View, + View = display.AllowedActions.Contains(ActionPublish.Instance.Letter.ToString(CultureInfo.InvariantCulture)) ? "datepicker" : PropertyEditorResolver.Current.GetByAlias(Constants.PropertyEditors.NoEditAlias).ValueEditor.View, Config = new Dictionary { {"offsetTime", "1"} @@ -213,10 +213,9 @@ namespace Umbraco.Web.Models.Mapping } /// - //TODO: This is horribly inneficient /// Creates the list of action buttons allowed for this user - Publish, Send to publish, save, unpublish returned as the button's 'letter' /// - private class ActionButtonsResolver : ValueResolver> + private class ActionButtonsResolver : ValueResolver> { private readonly Lazy _userService; @@ -225,12 +224,12 @@ namespace Umbraco.Web.Models.Mapping _userService = userService; } - protected override IEnumerable ResolveCore(IContent source) + protected override IEnumerable ResolveCore(IContent source) { if (UmbracoContext.Current == null) { //cannot check permissions without a context - return Enumerable.Empty(); + return Enumerable.Empty(); } var svc = _userService.Value; @@ -242,11 +241,9 @@ namespace Umbraco.Web.Models.Mapping // Here we need to do a special check since this could be new content, in which case we need to get the permissions // from the parent, not the existing one otherwise permissions would be coming from the root since Id is 0. source.HasIdentity ? source.Id : source.ParentId) - .FirstOrDefault(); + .GetAllPermissions(); - return permissions == null - ? Enumerable.Empty() - : permissions.AssignedPermissions.Where(x => x.Length == 1).Select(x => x.ToUpperInvariant()[0]); + return permissions; } } } diff --git a/src/Umbraco.Web/Models/Mapping/ContentTypeModelMapper.cs b/src/Umbraco.Web/Models/Mapping/ContentTypeModelMapper.cs index 1d9b4fedda..515104d02c 100644 --- a/src/Umbraco.Web/Models/Mapping/ContentTypeModelMapper.cs +++ b/src/Umbraco.Web/Models/Mapping/ContentTypeModelMapper.cs @@ -38,6 +38,7 @@ namespace Umbraco.Web.Models.Mapping config.CreateMap() .ConstructUsing(basic => new PropertyType(applicationContext.Services.DataTypeService.GetDataTypeDefinitionById(basic.DataTypeId))) + .IgnoreEntityCommonProperties() .ForMember(type => type.ValidationRegExp, expression => expression.ResolveUsing(basic => basic.Validation.Pattern)) .ForMember(type => type.Mandatory, expression => expression.ResolveUsing(basic => basic.Validation.Mandatory)) .ForMember(type => type.Name, expression => expression.ResolveUsing(basic => basic.Label)) @@ -45,10 +46,8 @@ namespace Umbraco.Web.Models.Mapping .ForMember(type => type.DataTypeId, expression => expression.Ignore()) .ForMember(type => type.PropertyEditorAlias, expression => expression.Ignore()) .ForMember(type => type.HelpText, expression => expression.Ignore()) - .ForMember(type => type.Key, expression => expression.Ignore()) - .ForMember(type => type.CreateDate, expression => expression.Ignore()) - .ForMember(type => type.UpdateDate, expression => expression.Ignore()) - .ForMember(type => type.DeletedDate, expression => expression.Ignore()) + .ForMember(type => type.Key, expression => expression.Ignore()) + .ForMember(type => type.DeletedDate, expression => expression.Ignore()) .ForMember(type => type.HasIdentity, expression => expression.Ignore()); config.CreateMap() diff --git a/src/Umbraco.Web/Models/Mapping/ContentTypeModelMapperExtensions.cs b/src/Umbraco.Web/Models/Mapping/ContentTypeModelMapperExtensions.cs index 00923c8655..fea46ddedb 100644 --- a/src/Umbraco.Web/Models/Mapping/ContentTypeModelMapperExtensions.cs +++ b/src/Umbraco.Web/Models/Mapping/ContentTypeModelMapperExtensions.cs @@ -22,15 +22,14 @@ namespace Umbraco.Web.Models.Mapping public static IMappingExpression MapPropertyGroupBasicToPropertyGroupPersistence( this IMappingExpression mapping) - where TSource : PropertyGroupBasic + where TSource : PropertyGroupBasic where TPropertyTypeBasic : PropertyTypeBasic { return mapping + .IgnoreEntityCommonProperties() .ForMember(dest => dest.Id, map => map.Condition(source => source.Id > 0)) .ForMember(dest => dest.Key, map => map.Ignore()) - .ForMember(dest => dest.HasIdentity, map => map.Ignore()) - .ForMember(dest => dest.CreateDate, map => map.Ignore()) - .ForMember(dest => dest.UpdateDate, map => map.Ignore()) + .ForMember(dest => dest.HasIdentity, map => map.Ignore()) .ForMember(dest => dest.DeletedDate, map => map.Ignore()) .ForMember(dest => dest.PropertyTypes, map => map.Ignore()); } @@ -38,7 +37,7 @@ namespace Umbraco.Web.Models.Mapping public static IMappingExpression> MapPropertyGroupBasicToPropertyGroupDisplay( this IMappingExpression> mapping) where TSource : PropertyGroupBasic - where TPropertyTypeBasic : PropertyTypeBasic + where TPropertyTypeBasic : PropertyTypeBasic where TPropertyTypeDisplay : PropertyTypeDisplay { return mapping @@ -106,8 +105,8 @@ namespace Umbraco.Web.Models.Mapping public static IMappingExpression MapBaseContentTypeSaveToDisplay( this IMappingExpression mapping) where TSource : ContentTypeSave - where TDestination : ContentTypeCompositionDisplay - where TPropertyTypeDestination : PropertyTypeDisplay + where TDestination : ContentTypeCompositionDisplay + where TPropertyTypeDestination : PropertyTypeDisplay where TPropertyTypeSource : PropertyTypeBasic { return mapping @@ -139,7 +138,7 @@ namespace Umbraco.Web.Models.Mapping .ForMember( dto => dto.AllowedContentTypes, expression => expression.MapFrom(dto => dto.AllowedContentTypes.Select(x => x.Id.Value))) - + .ForMember( dto => dto.CompositeContentTypes, expression => expression.MapFrom(dto => dto.ContentTypeComposition)) @@ -166,7 +165,7 @@ namespace Umbraco.Web.Models.Mapping this IMappingExpression mapping, ApplicationContext applicationContext) //where TSource : ContentTypeCompositionDisplay where TSource : ContentTypeSave - where TDestination : IContentTypeComposition + where TDestination : IContentTypeComposition where TSourcePropertyType : PropertyTypeBasic { return mapping @@ -175,9 +174,7 @@ namespace Umbraco.Web.Models.Mapping .ForMember(dto => dto.Id, expression => expression.MapFrom(display => Convert.ToInt32(display.Id))) //These get persisted as part of the saving procedure, nothing to do with the display model - .ForMember(dto => dto.CreateDate, expression => expression.Ignore()) - .ForMember(dto => dto.UpdateDate, expression => expression.Ignore()) - .ForMember(dto => dto.DeletedDate, expression => expression.Ignore()) + .IgnoreDeletableEntityCommonProperties() .ForMember(dto => dto.AllowedAsRoot, expression => expression.MapFrom(display => display.AllowAsRoot)) .ForMember(dto => dto.CreatorId, expression => expression.Ignore()) @@ -188,7 +185,7 @@ namespace Umbraco.Web.Models.Mapping .ForMember(dto => dto.NoGroupPropertyTypes, expression => expression.Ignore()) // ignore, composition is managed in AfterMapContentTypeSaveToEntity .ForMember(dest => dest.ContentTypeComposition, opt => opt.Ignore()) - + .ForMember( dto => dto.AllowedContentTypes, expression => expression.MapFrom(dto => dto.AllowedContentTypes.Select((t, i) => new ContentTypeSort(t, i)))) @@ -266,7 +263,7 @@ namespace Umbraco.Web.Models.Mapping } private static PropertyGroup MapSaveGroup(PropertyGroupBasic sourceGroup, IEnumerable destOrigGroups) - where TPropertyType: PropertyTypeBasic + where TPropertyType : PropertyTypeBasic { PropertyGroup destGroup; if (sourceGroup.Id > 0) diff --git a/src/Umbraco.Web/Models/Mapping/CreatorResolver.cs b/src/Umbraco.Web/Models/Mapping/CreatorResolver.cs index 0f67a974f6..28e9799861 100644 --- a/src/Umbraco.Web/Models/Mapping/CreatorResolver.cs +++ b/src/Umbraco.Web/Models/Mapping/CreatorResolver.cs @@ -2,17 +2,18 @@ using Umbraco.Core.Models; using Umbraco.Core.Models.Membership; using Umbraco.Web.Models.ContentEditing; +using UserProfile = Umbraco.Web.Models.ContentEditing.UserProfile; namespace Umbraco.Web.Models.Mapping { /// /// Maps the Creator for content /// - internal class CreatorResolver : ValueResolver + internal class CreatorResolver : ValueResolver { - protected override UserBasic ResolveCore(IContent source) + protected override UserProfile ResolveCore(IContent source) { - return Mapper.Map(source.GetWriterProfile()); + return Mapper.Map(source.GetWriterProfile()); } } } \ No newline at end of file diff --git a/src/Umbraco.Web/Models/Mapping/DataTypeModelMapper.cs b/src/Umbraco.Web/Models/Mapping/DataTypeModelMapper.cs index 7e9a00f760..32d25028e4 100644 --- a/src/Umbraco.Web/Models/Mapping/DataTypeModelMapper.cs +++ b/src/Umbraco.Web/Models/Mapping/DataTypeModelMapper.cs @@ -96,6 +96,7 @@ namespace Umbraco.Web.Models.Mapping config.CreateMap() .ConstructUsing(save => new DataTypeDefinition(save.SelectedEditor) {CreateDate = DateTime.Now}) + .IgnoreDeletableEntityCommonProperties() .ForMember(definition => definition.Id, expression => expression.MapFrom(save => Convert.ToInt32(save.Id))) //we have to ignore the Key otherwise this will reset the UniqueId field which should never change! // http://issues.umbraco.org/issue/U4-3911 @@ -106,10 +107,7 @@ namespace Umbraco.Web.Models.Mapping .ForMember(x => x.ControlId, expression => expression.Ignore()) .ForMember(x => x.CreatorId, expression => expression.Ignore()) .ForMember(x => x.Level, expression => expression.Ignore()) - .ForMember(x => x.SortOrder, expression => expression.Ignore()) - .ForMember(x => x.CreateDate, expression => expression.Ignore()) - .ForMember(x => x.DeletedDate, expression => expression.Ignore()) - .ForMember(x => x.UpdateDate, expression => expression.Ignore()); + .ForMember(x => x.SortOrder, expression => expression.Ignore()); //Converts a property editor to a new list of pre-value fields - used when creating a new data type or changing a data type with new pre-vals config.CreateMap>() diff --git a/src/Umbraco.Web/Models/Mapping/EntityModelMapper.cs b/src/Umbraco.Web/Models/Mapping/EntityModelMapper.cs index 5be9d550e5..273dbd34f3 100644 --- a/src/Umbraco.Web/Models/Mapping/EntityModelMapper.cs +++ b/src/Umbraco.Web/Models/Mapping/EntityModelMapper.cs @@ -6,6 +6,7 @@ using Examine; using Examine.LuceneEngine.Providers; using Umbraco.Core; using Umbraco.Core.Models; +using Umbraco.Core.Models.EntityBase; using Umbraco.Core.Models.Mapping; using Umbraco.Core.Models.Membership; using Umbraco.Web.Models.ContentEditing; @@ -28,7 +29,7 @@ namespace Umbraco.Web.Models.Mapping { basic.Icon = "icon-user"; } - }); + }); config.CreateMap() .ForMember(x => x.Udi, expression => expression.Ignore()) @@ -64,20 +65,7 @@ namespace Umbraco.Web.Models.Mapping .ForMember(basic => basic.ParentId, expression => expression.UseValue(-1)) .ForMember(dto => dto.Trashed, expression => expression.Ignore()) .ForMember(x => x.AdditionalData, expression => expression.Ignore()); - - //config.CreateMap() - // .ConstructUsing(basic => new Template(basic.Name, basic.Alias) - // { - // Id = Convert.ToInt32(basic.Id), - // Key = basic.Key - // }) - // .ForMember(t => t.Path, expression => expression.Ignore()) - // .ForMember(t => t.Id, expression => expression.MapFrom(template => Convert.ToInt32(template.Id))) - // .ForMember(x => x.VirtualPath, expression => expression.Ignore()) - // .ForMember(x => x.CreateDate, expression => expression.Ignore()) - // .ForMember(x => x.UpdateDate, expression => expression.Ignore()) - // .ForMember(x => x.Content, expression => expression.Ignore()); - + config.CreateMap() .ForMember(x => x.Id, expression => expression.MapFrom(entity => new Lazy(() => Convert.ToInt32(entity.Id)))) .ForMember(x => x.SortOrder, expression => expression.Ignore()); @@ -89,8 +77,32 @@ namespace Umbraco.Web.Models.Mapping .ForMember(dto => dto.Trashed, expression => expression.Ignore()) .ForMember(x => x.AdditionalData, expression => expression.Ignore()); - config.CreateMap() + config.CreateMap() + .ForMember(x => x.Udi, expression => expression.MapFrom(x => Udi.Create(UmbracoObjectTypesExtensions.GetUdiType(x.NodeObjectTypeId), x.Key))) + .ForMember(basic => basic.Icon, expression => expression.MapFrom(entity => entity.ContentTypeIcon)) + .ForMember(dto => dto.Trashed, expression => expression.Ignore()) + .ForMember(x => x.Alias, expression => expression.Ignore()) + .ForMember(x => x.Score, expression => expression.Ignore()) + .AfterMap((entity, basic) => + { + if (basic.Icon.IsNullOrWhiteSpace()) + { + if (entity.NodeObjectTypeId == Constants.ObjectTypes.MemberGuid) + basic.Icon = "icon-user"; + else if (entity.NodeObjectTypeId == Constants.ObjectTypes.DataTypeGuid) + basic.Icon = "icon-autofill"; + else if (entity.NodeObjectTypeId == Constants.ObjectTypes.DocumentTypeGuid) + basic.Icon = "icon-item-arrangement"; + else if (entity.NodeObjectTypeId == Constants.ObjectTypes.MediaTypeGuid) + basic.Icon = "icon-thumbnails"; + else if (entity.NodeObjectTypeId == Constants.ObjectTypes.TemplateTypeGuid) + basic.Icon = "icon-newspaper-alt"; + } + }); + + config.CreateMap() //default to document icon + .ForMember(x => x.Score, expression => expression.MapFrom(result => result.Score)) .ForMember(x => x.Udi, expression => expression.Ignore()) .ForMember(x => x.Icon, expression => expression.Ignore()) .ForMember(x => x.Id, expression => expression.MapFrom(result => result.Id)) @@ -156,11 +168,11 @@ namespace Umbraco.Web.Models.Mapping } }); - config.CreateMap>() - .ConvertUsing(results => results.Select(Mapper.Map).ToList()); + config.CreateMap>() + .ConvertUsing(results => results.Select(Mapper.Map).ToList()); - config.CreateMap, IEnumerable>() - .ConvertUsing(results => results.Select(Mapper.Map).ToList()); + config.CreateMap, IEnumerable>() + .ConvertUsing(results => results.Select(Mapper.Map).ToList()); } } } \ No newline at end of file diff --git a/src/Umbraco.Web/Models/Mapping/EntityModelMapperExtensions.cs b/src/Umbraco.Web/Models/Mapping/EntityModelMapperExtensions.cs new file mode 100644 index 0000000000..39f92af5d2 --- /dev/null +++ b/src/Umbraco.Web/Models/Mapping/EntityModelMapperExtensions.cs @@ -0,0 +1,42 @@ +using AutoMapper; +using Umbraco.Core.Models.EntityBase; +using Umbraco.Web.Models.ContentEditing; + +namespace Umbraco.Web.Models.Mapping +{ + /// + /// Mapping extension methods for re-use with other mappers (saves code duplication) + /// + internal static class EntityModelMapperExtensions + { + /// + /// Ignores readonly properties and the date values + /// + /// + /// + public static IMappingExpression IgnoreDeletableEntityCommonProperties( + this IMappingExpression mapping) + where TDest: IDeletableEntity + { + return mapping + .IgnoreEntityCommonProperties() + .ForMember(dest => dest.DeletedDate, map => map.Ignore()); + } + + /// + /// Ignores readonly properties and the date values + /// + /// + /// + public static IMappingExpression IgnoreEntityCommonProperties( + this IMappingExpression mapping) + where TDest : IEntity + { + return mapping + .IgnoreAllPropertiesWithAnInaccessibleSetter() + .ForMember(dest => dest.CreateDate, map => map.Ignore()) + .ForMember(dest => dest.UpdateDate, map => map.Ignore()); + } + + } +} \ No newline at end of file diff --git a/src/Umbraco.Web/Models/Mapping/MemberModelMapper.cs b/src/Umbraco.Web/Models/Mapping/MemberModelMapper.cs index 976026bd97..e3c82cf782 100644 --- a/src/Umbraco.Web/Models/Mapping/MemberModelMapper.cs +++ b/src/Umbraco.Web/Models/Mapping/MemberModelMapper.cs @@ -15,6 +15,7 @@ using System.Linq; using Umbraco.Core.PropertyEditors; using Umbraco.Core.Security; using Umbraco.Web.Trees; +using UserProfile = Umbraco.Web.Models.ContentEditing.UserProfile; namespace Umbraco.Web.Models.Mapping { @@ -106,7 +107,7 @@ namespace Umbraco.Web.Models.Mapping .ForMember(member => member.CreateDate, expression => expression.MapFrom(user => user.CreationDate)) .ForMember(member => member.UpdateDate, expression => expression.MapFrom(user => user.LastActivityDate)) .ForMember(member => member.Key, expression => expression.MapFrom(user => user.ProviderUserKey.TryConvertTo().Result.ToString("N"))) - .ForMember(member => member.Owner, expression => expression.UseValue(new UserBasic {Name = "Admin", UserId = 0})) + .ForMember(member => member.Owner, expression => expression.UseValue(new UserProfile {Name = "Admin", UserId = 0})) .ForMember(member => member.Icon, expression => expression.UseValue("icon-user")) .ForMember(member => member.Name, expression => expression.MapFrom(user => user.UserName)) .ForMember(member => member.Email, expression => expression.MapFrom(content => content.Email)) diff --git a/src/Umbraco.Web/Models/Mapping/OwnerResolver.cs b/src/Umbraco.Web/Models/Mapping/OwnerResolver.cs index 067d495591..8992451e9e 100644 --- a/src/Umbraco.Web/Models/Mapping/OwnerResolver.cs +++ b/src/Umbraco.Web/Models/Mapping/OwnerResolver.cs @@ -3,6 +3,7 @@ using Umbraco.Core.Models; using Umbraco.Core.Models.EntityBase; using Umbraco.Core.Models.Membership; using Umbraco.Web.Models.ContentEditing; +using UserProfile = Umbraco.Web.Models.ContentEditing.UserProfile; namespace Umbraco.Web.Models.Mapping { @@ -10,12 +11,12 @@ namespace Umbraco.Web.Models.Mapping /// Maps the Owner for IContentBase ///
    /// - internal class OwnerResolver : ValueResolver + internal class OwnerResolver : ValueResolver where TPersisted : IContentBase { - protected override UserBasic ResolveCore(TPersisted source) + protected override UserProfile ResolveCore(TPersisted source) { - return Mapper.Map(source.GetCreatorProfile()); + return Mapper.Map(source.GetCreatorProfile()); } } } \ No newline at end of file diff --git a/src/Umbraco.Web/Models/Mapping/TabsAndPropertiesResolver.cs b/src/Umbraco.Web/Models/Mapping/TabsAndPropertiesResolver.cs index 0671f59273..1722eecf79 100644 --- a/src/Umbraco.Web/Models/Mapping/TabsAndPropertiesResolver.cs +++ b/src/Umbraco.Web/Models/Mapping/TabsAndPropertiesResolver.cs @@ -165,12 +165,20 @@ namespace Umbraco.Web.Models.Mapping var listViewTab = new Tab(); listViewTab.Alias = Constants.Conventions.PropertyGroups.ListViewGroupName; listViewTab.Label = localizedTextService.Localize("content/childItems"); - listViewTab.Id = 25; + listViewTab.Id = display.Tabs.Count() + 1; listViewTab.IsActive = true; var listViewConfig = editor.PreValueEditor.ConvertDbToEditor(editor.DefaultPreValues, preVals); //add the entity type to the config - listViewConfig["entityType"] = entityType; + listViewConfig["entityType"] = entityType; + + //Override Tab Label if tabName is provided + if (listViewConfig.ContainsKey("tabName")) + { + var configTabName = listViewConfig["tabName"]; + if (configTabName != null && string.IsNullOrWhiteSpace(configTabName.ToString()) == false) + listViewTab.Label = configTabName.ToString(); + } var listViewProperties = new List(); listViewProperties.Add(new ContentPropertyDisplay diff --git a/src/Umbraco.Web/Models/Mapping/TemplateModelMapper.cs b/src/Umbraco.Web/Models/Mapping/TemplateModelMapper.cs index 6111941084..43c75f416b 100644 --- a/src/Umbraco.Web/Models/Mapping/TemplateModelMapper.cs +++ b/src/Umbraco.Web/Models/Mapping/TemplateModelMapper.cs @@ -14,10 +14,8 @@ namespace Umbraco.Web.Models.Mapping .ForMember(x => x.Notifications, exp => exp.Ignore()); config.CreateMap() - .ForMember(x => x.DeletedDate, exp => exp.Ignore()) - .ForMember(x => x.Path, exp => exp.Ignore()) - .ForMember(x => x.CreateDate, exp => exp.Ignore()) - .ForMember(x => x.UpdateDate, exp => exp.Ignore()) + .IgnoreDeletableEntityCommonProperties() + .ForMember(x => x.Path, exp => exp.Ignore()) .ForMember(x => x.VirtualPath, exp => exp.Ignore()) .ForMember(x => x.Path, exp => exp.Ignore()) .ForMember(x => x.MasterTemplateId, exp => exp.Ignore()) // ok, assigned when creating the template diff --git a/src/Umbraco.Web/Models/Mapping/UserGroupDefaultPermissionsResolver.cs b/src/Umbraco.Web/Models/Mapping/UserGroupDefaultPermissionsResolver.cs new file mode 100644 index 0000000000..20f43fc74c --- /dev/null +++ b/src/Umbraco.Web/Models/Mapping/UserGroupDefaultPermissionsResolver.cs @@ -0,0 +1,55 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using AutoMapper; +using umbraco.interfaces; +using Umbraco.Core; +using Umbraco.Core.CodeAnnotations; +using Umbraco.Core.Models; +using Umbraco.Core.Models.Membership; +using Umbraco.Core.Services; +using Umbraco.Web.Models.ContentEditing; + +namespace Umbraco.Web.Models.Mapping +{ + /// + /// Converts an IUserGroup instance into a dictionary of permissions by category + /// + internal class UserGroupDefaultPermissionsResolver : ValueResolver>> + { + private readonly ILocalizedTextService _textService; + + public UserGroupDefaultPermissionsResolver(ILocalizedTextService textService) + { + if (textService == null) throw new ArgumentNullException("textService"); + _textService = textService; + } + + protected override IDictionary> ResolveCore(IUserGroup source) + { + return ActionsResolver.Current.Actions + .Where(x => x.CanBePermissionAssigned) + .Select(x => GetPermission(x, source)) + .GroupBy(x => x.Category) + .ToDictionary(x => x.Key, x => (IEnumerable)x.ToArray()); + } + + private Permission GetPermission(IAction action, IUserGroup source) + { + var result = new Permission(); + var attribute = action.GetType().GetCustomAttribute(false); + result.Category = attribute == null + ? _textService.Localize(string.Format("actionCategories/{0}", Constants.Conventions.PermissionCategories.OtherCategory)) + : _textService.Localize(string.Format("actionCategories/{0}", attribute.Category)); + result.Name = attribute == null || attribute.Name.IsNullOrWhiteSpace() + ? _textService.Localize(string.Format("actions/{0}", action.Alias)) + : attribute.Name; + result.Description = _textService.Localize(String.Format("actionDescriptions/{0}", action.Alias)); + result.Icon = action.Icon; + result.Checked = source.Permissions != null && source.Permissions.Contains(action.Letter.ToString(CultureInfo.InvariantCulture)); + result.PermissionCode = action.Letter.ToString(CultureInfo.InvariantCulture); + return result; + } + } +} \ No newline at end of file diff --git a/src/Umbraco.Web/Models/Mapping/UserModelMapper.cs b/src/Umbraco.Web/Models/Mapping/UserModelMapper.cs index eedc2cafca..bb7cc7c308 100644 --- a/src/Umbraco.Web/Models/Mapping/UserModelMapper.cs +++ b/src/Umbraco.Web/Models/Mapping/UserModelMapper.cs @@ -1,13 +1,20 @@ using System; +using System.Collections.Generic; +using System.Linq; using AutoMapper; using Umbraco.Core; using Umbraco.Core.Models.Mapping; using Umbraco.Core.Models.Membership; using Umbraco.Web.Models.ContentEditing; using umbraco; +using umbraco.BusinessLogic.Actions; +using Umbraco.Core.IO; using Umbraco.Core.Models; +using Umbraco.Core.Models.EntityBase; using Umbraco.Core.Models.Identity; using Umbraco.Core.Security; +using Umbraco.Core.Services; +using UserProfile = Umbraco.Web.Models.ContentEditing.UserProfile; namespace Umbraco.Web.Models.Mapping { @@ -15,46 +22,393 @@ namespace Umbraco.Web.Models.Mapping { public override void ConfigureMappings(IConfiguration config, ApplicationContext applicationContext) { + + config.CreateMap() + .ConstructUsing((UserGroupSave save) => new UserGroup() { CreateDate = DateTime.Now }) + .IgnoreDeletableEntityCommonProperties() + .ForMember(dest => dest.Id, map => map.Condition(source => GetIntId(source.Id) > 0)) + .ForMember(dest => dest.Id, map => map.MapFrom(source => GetIntId(source.Id))) + .ForMember(dest => dest.Permissions, map => map.MapFrom(source => source.DefaultPermissions)) + .AfterMap((save, userGroup) => + { + userGroup.ClearAllowedSections(); + foreach (var section in save.Sections) + { + userGroup.AddAllowedSection(section); + } + }); + + //Used for merging existing UserSave to an existing IUser instance - this will not create an IUser instance! + config.CreateMap() + .IgnoreDeletableEntityCommonProperties() + .ForMember(dest => dest.Id, map => map.Condition(source => GetIntId(source.Id) > 0)) + .ForMember(detail => detail.SessionTimeout, opt => opt.Ignore()) + .ForMember(detail => detail.EmailConfirmedDate, opt => opt.Ignore()) + .ForMember(detail => detail.UserType, opt => opt.Ignore()) + .ForMember(detail => detail.InvitedDate, opt => opt.Ignore()) + .ForMember(detail => detail.SecurityStamp, opt => opt.Ignore()) + .ForMember(detail => detail.Avatar, opt => opt.Ignore()) + .ForMember(detail => detail.ProviderUserKey, opt => opt.Ignore()) + .ForMember(detail => detail.RawPasswordValue, opt => opt.Ignore()) + .ForMember(detail => detail.RawPasswordAnswerValue, opt => opt.Ignore()) + .ForMember(detail => detail.PasswordQuestion, opt => opt.Ignore()) + .ForMember(detail => detail.Comments, opt => opt.Ignore()) + .ForMember(detail => detail.IsApproved, opt => opt.Ignore()) + .ForMember(detail => detail.IsLockedOut, opt => opt.Ignore()) + .ForMember(detail => detail.LastLoginDate, opt => opt.Ignore()) + .ForMember(detail => detail.LastPasswordChangeDate, opt => opt.Ignore()) + .ForMember(detail => detail.LastLockoutDate, opt => opt.Ignore()) + .ForMember(detail => detail.FailedPasswordAttempts, opt => opt.Ignore()) + .ForMember(user => user.Language, expression => expression.MapFrom(save => save.Culture)) + .AfterMap((save, user) => + { + user.ClearGroups(); + var foundGroups = applicationContext.Services.UserService.GetUserGroupsByAlias(save.UserGroups.ToArray()); + foreach (var group in foundGroups) + { + user.AddGroup(group.ToReadOnlyGroup()); + } + }); + + config.CreateMap() + .IgnoreDeletableEntityCommonProperties() + .ForMember(detail => detail.Id, opt => opt.Ignore()) + .ForMember(detail => detail.StartContentIds, opt => opt.Ignore()) + .ForMember(detail => detail.StartMediaIds, opt => opt.Ignore()) + .ForMember(detail => detail.UserType, opt => opt.Ignore()) + .ForMember(detail => detail.Language, opt => opt.Ignore()) + .ForMember(detail => detail.Username, opt => opt.Ignore()) + .ForMember(detail => detail.PasswordQuestion, opt => opt.Ignore()) + .ForMember(detail => detail.SessionTimeout, opt => opt.Ignore()) + .ForMember(detail => detail.EmailConfirmedDate, opt => opt.Ignore()) + .ForMember(detail => detail.InvitedDate, opt => opt.Ignore()) + .ForMember(detail => detail.SecurityStamp, opt => opt.Ignore()) + .ForMember(detail => detail.Avatar, opt => opt.Ignore()) + .ForMember(detail => detail.ProviderUserKey, opt => opt.Ignore()) + .ForMember(detail => detail.RawPasswordValue, opt => opt.Ignore()) + .ForMember(detail => detail.RawPasswordAnswerValue, opt => opt.Ignore()) + .ForMember(detail => detail.Comments, opt => opt.Ignore()) + .ForMember(detail => detail.IsApproved, opt => opt.Ignore()) + .ForMember(detail => detail.IsLockedOut, opt => opt.Ignore()) + .ForMember(detail => detail.LastLoginDate, opt => opt.Ignore()) + .ForMember(detail => detail.LastPasswordChangeDate, opt => opt.Ignore()) + .ForMember(detail => detail.LastLockoutDate, opt => opt.Ignore()) + .ForMember(detail => detail.FailedPasswordAttempts, opt => opt.Ignore()) + //all invited users will not be approved, completing the invite will approve the user + .ForMember(user => user.IsApproved, expression => expression.UseValue(false)) + .AfterMap((invite, user) => + { + user.ClearGroups(); + var foundGroups = applicationContext.Services.UserService.GetUserGroupsByAlias(invite.UserGroups.ToArray()); + foreach (var group in foundGroups) + { + user.AddGroup(group.ToReadOnlyGroup()); + } + }); + + config.CreateMap() + .ForMember(detail => detail.ContentStartNode, opt => opt.Ignore()) + .ForMember(detail => detail.UserCount, opt => opt.Ignore()) + .ForMember(detail => detail.MediaStartNode, opt => opt.Ignore()) + .ForMember(detail => detail.Key, opt => opt.Ignore()) + .ForMember(detail => detail.Sections, opt => opt.Ignore()) + .ForMember(detail => detail.Notifications, opt => opt.Ignore()) + .ForMember(detail => detail.Udi, opt => opt.Ignore()) + .ForMember(detail => detail.Trashed, opt => opt.Ignore()) + .ForMember(detail => detail.ParentId, opt => opt.UseValue(-1)) + .ForMember(detail => detail.Path, opt => opt.MapFrom(userGroup => "-1," + userGroup.Id)) + .ForMember(detail => detail.AdditionalData, opt => opt.Ignore()) + .AfterMap((group, display) => + { + MapUserGroupBasic(applicationContext.Services, group, display); + }); + + config.CreateMap() + .ForMember(detail => detail.ContentStartNode, opt => opt.Ignore()) + .ForMember(detail => detail.MediaStartNode, opt => opt.Ignore()) + .ForMember(detail => detail.Sections, opt => opt.Ignore()) + .ForMember(detail => detail.Notifications, opt => opt.Ignore()) + .ForMember(detail => detail.Udi, opt => opt.Ignore()) + .ForMember(detail => detail.Trashed, opt => opt.Ignore()) + .ForMember(detail => detail.ParentId, opt => opt.UseValue(-1)) + .ForMember(detail => detail.Path, opt => opt.MapFrom(userGroup => "-1," + userGroup.Id)) + .ForMember(detail => detail.AdditionalData, opt => opt.Ignore()) + .AfterMap((group, display) => + { + MapUserGroupBasic(applicationContext.Services, group, display); + }); + + //create a map to assign a user group's default permissions to the AssignedUserGroupPermissions instance + config.CreateMap() + .ForMember(detail => detail.Udi, opt => opt.Ignore()) + .ForMember(detail => detail.Trashed, opt => opt.Ignore()) + .ForMember(detail => detail.AdditionalData, opt => opt.Ignore()) + .ForMember(detail => detail.Id, opt => opt.MapFrom(group => group.Id)) + .ForMember(detail => detail.ParentId, opt => opt.UseValue(-1)) + .ForMember(detail => detail.Path, opt => opt.MapFrom(userGroup => "-1," + userGroup.Id)) + .ForMember(detail => detail.DefaultPermissions, expression => expression.ResolveUsing(new UserGroupDefaultPermissionsResolver(applicationContext.Services.TextService))) + //these will be manually mapped and by default they are null + .ForMember(detail => detail.AssignedPermissions, opt => opt.Ignore()) + .AfterMap((group, display) => + { + if (display.Icon.IsNullOrWhiteSpace()) + { + display.Icon = "icon-users"; + } + }); + + config.CreateMap() + .ForMember(x => x.Udi, expression => expression.MapFrom(x => Udi.Create(UmbracoObjectTypesExtensions.GetUdiType(x.NodeObjectTypeId), x.Key))) + .ForMember(basic => basic.Icon, expression => expression.MapFrom(entity => entity.ContentTypeIcon)) + .ForMember(dto => dto.Trashed, expression => expression.Ignore()) + .ForMember(x => x.Alias, expression => expression.Ignore()) + .ForMember(x => x.AssignedPermissions, expression => expression.Ignore()) + .AfterMap((entity, basic) => + { + if (entity.NodeObjectTypeId == Constants.ObjectTypes.MemberGuid && basic.Icon.IsNullOrWhiteSpace()) + { + basic.Icon = "icon-user"; + } + }); + + config.CreateMap() + .ForMember(detail => detail.ContentStartNode, opt => opt.Ignore()) + .ForMember(detail => detail.MediaStartNode, opt => opt.Ignore()) + .ForMember(detail => detail.Sections, opt => opt.Ignore()) + .ForMember(detail => detail.Notifications, opt => opt.Ignore()) + .ForMember(detail => detail.Udi, opt => opt.Ignore()) + .ForMember(detail => detail.Trashed, opt => opt.Ignore()) + .ForMember(detail => detail.ParentId, opt => opt.UseValue(-1)) + .ForMember(detail => detail.Path, opt => opt.MapFrom(userGroup => "-1," + userGroup.Id)) + .ForMember(detail => detail.AdditionalData, opt => opt.Ignore()) + .ForMember(detail => detail.Users, opt => opt.Ignore()) + .ForMember(detail => detail.DefaultPermissions, expression => expression.ResolveUsing(new UserGroupDefaultPermissionsResolver(applicationContext.Services.TextService))) + .ForMember(detail => detail.AssignedPermissions, opt => opt.Ignore()) + .AfterMap((group, display) => + { + MapUserGroupBasic(applicationContext.Services, group, display); + + //Important! Currently we are never mapping to multiple UserGroupDisplay objects but if we start doing that + // this will cause an N+1 and we'll need to change how this works. + var users = applicationContext.Services.UserService.GetAllInGroup(group.Id); + display.Users = Mapper.Map>(users); + + //Deal with assigned permissions: + + var allContentPermissions = applicationContext.Services.UserService.GetPermissions(@group, true) + .ToDictionary(x => x.EntityId, x => x); + + var contentEntities = allContentPermissions.Keys.Count == 0 + ? new IUmbracoEntity[0] + : applicationContext.Services.EntityService.GetAll(UmbracoObjectTypes.Document, allContentPermissions.Keys.ToArray()); + + var allAssignedPermissions = new List(); + foreach (var entity in contentEntities) + { + var contentPermissions = allContentPermissions[entity.Id]; + + var assignedContentPermissions = Mapper.Map(entity); + assignedContentPermissions.AssignedPermissions = AssignedUserGroupPermissions.ClonePermissions(display.DefaultPermissions); + + //since there is custom permissions assigned to this node for this group, we need to clear all of the default permissions + //and we'll re-check it if it's one of the explicitly assigned ones + foreach (var permission in assignedContentPermissions.AssignedPermissions.SelectMany(x => x.Value)) + { + permission.Checked = false; + permission.Checked = contentPermissions.AssignedPermissions.Contains(permission.PermissionCode, StringComparer.InvariantCulture); + } + + allAssignedPermissions.Add(assignedContentPermissions); + } + + display.AssignedPermissions = allAssignedPermissions; + }); + + config.CreateMap() + .ForMember(detail => detail.Avatars, opt => opt.MapFrom(user => user.GetCurrentUserAvatarUrls(applicationContext.Services.UserService, applicationContext.ApplicationCache.RuntimeCache))) + .ForMember(detail => detail.Username, opt => opt.MapFrom(user => user.Username)) + .ForMember(detail => detail.LastLoginDate, opt => opt.MapFrom(user => user.LastLoginDate == default(DateTime) ? null : (DateTime?) user.LastLoginDate)) + .ForMember(detail => detail.UserGroups, opt => opt.MapFrom(user => user.Groups)) + .ForMember(detail => detail.StartContentIds, opt => opt.UseValue(Enumerable.Empty())) + .ForMember(detail => detail.StartMediaIds, opt => opt.UseValue(Enumerable.Empty())) + .ForMember(detail => detail.Culture, opt => opt.MapFrom(user => user.GetUserCulture(applicationContext.Services.TextService))) + .ForMember( + detail => detail.AvailableCultures, + opt => opt.MapFrom(user => applicationContext.Services.TextService.GetSupportedCultures().ToDictionary(x => x.Name, x => x.DisplayName))) + .ForMember( + detail => detail.EmailHash, + opt => opt.MapFrom(user => user.Email.ToLowerInvariant().Trim().GenerateHash())) + .ForMember(detail => detail.ParentId, opt => opt.UseValue(-1)) + .ForMember(detail => detail.Path, opt => opt.MapFrom(user => "-1," + user.Id)) + .ForMember(detail => detail.Notifications, opt => opt.Ignore()) + .ForMember(detail => detail.Udi, opt => opt.Ignore()) + .ForMember(detail => detail.Icon, opt => opt.Ignore()) + .ForMember(detail => detail.IsCurrentUser, opt => opt.Ignore()) + .ForMember(detail => detail.Trashed, opt => opt.Ignore()) + .ForMember(detail => detail.ResetPasswordValue, opt => opt.Ignore()) + .ForMember(detail => detail.Alias, opt => opt.Ignore()) + .ForMember(detail => detail.Trashed, opt => opt.Ignore()) + .ForMember(detail => detail.AdditionalData, opt => opt.Ignore()) + .AfterMap((user, display) => + { + //Important! Currently we are never mapping to multiple UserDisplay objects but if we start doing that + // this will cause an N+1 and we'll need to change how this works. + + var startContentIds = user.StartContentIds.ToArray(); + if (startContentIds.Length > 0) + { + //TODO: Update GetAll to be able to pass in a parameter like on the normal Get to NOT load in the entire object! + var startNodes = new List(); + if (startContentIds.Contains(-1)) + { + startNodes.Add(RootNode(applicationContext.Services.TextService.Localize("content/contentRoot"))); + } + var contentItems = applicationContext.Services.EntityService.GetAll(UmbracoObjectTypes.Document, startContentIds); + startNodes.AddRange(Mapper.Map, IEnumerable>(contentItems)); + display.StartContentIds = startNodes; + + + } + var startMediaIds = user.StartMediaIds.ToArray(); + if (startMediaIds.Length > 0) + { + var startNodes = new List(); + if (startContentIds.Contains(-1)) + { + startNodes.Add(RootNode(applicationContext.Services.TextService.Localize("media/mediaRoot"))); + } + var mediaItems = applicationContext.Services.EntityService.GetAll(UmbracoObjectTypes.Media, startMediaIds); + startNodes.AddRange(Mapper.Map, IEnumerable>(mediaItems)); + display.StartMediaIds = startNodes; + } + }); + + config.CreateMap() + //Loading in the user avatar's requires an external request if they don't have a local file avatar, this means that initial load of paging may incur a cost + //Alternatively, if this is annoying the back office UI would need to be updated to request the avatars for the list of users separately so it doesn't look + //like the load time is waiting. + .ForMember(detail => + detail.Avatars, + opt => opt.MapFrom(user => user.GetCurrentUserAvatarUrls(applicationContext.Services.UserService, applicationContext.ApplicationCache.RuntimeCache))) + .ForMember(detail => detail.Username, opt => opt.MapFrom(user => user.Username)) + .ForMember(detail => detail.UserGroups, opt => opt.MapFrom(user => user.Groups)) + .ForMember(detail => detail.LastLoginDate, opt => opt.MapFrom(user => user.LastLoginDate == default(DateTime) ? null : (DateTime?) user.LastLoginDate)) + .ForMember(detail => detail.Culture, opt => opt.MapFrom(user => user.GetUserCulture(applicationContext.Services.TextService))) + .ForMember( + detail => detail.EmailHash, + opt => opt.MapFrom(user => user.Email.ToLowerInvariant().Trim().ToMd5())) + .ForMember(detail => detail.ParentId, opt => opt.UseValue(-1)) + .ForMember(detail => detail.Path, opt => opt.MapFrom(user => "-1," + user.Id)) + .ForMember(detail => detail.Notifications, opt => opt.Ignore()) + .ForMember(detail => detail.IsCurrentUser, opt => opt.Ignore()) + .ForMember(detail => detail.Udi, opt => opt.Ignore()) + .ForMember(detail => detail.Icon, opt => opt.Ignore()) + .ForMember(detail => detail.Trashed, opt => opt.Ignore()) + .ForMember(detail => detail.Alias, opt => opt.Ignore()) + .ForMember(detail => detail.Trashed, opt => opt.Ignore()) + .ForMember(detail => detail.AdditionalData, opt => opt.Ignore()); + config.CreateMap() + .ForMember(detail => detail.Avatars, opt => opt.MapFrom(user => user.GetCurrentUserAvatarUrls(applicationContext.Services.UserService, applicationContext.ApplicationCache.RuntimeCache))) .ForMember(detail => detail.UserId, opt => opt.MapFrom(user => GetIntId(user.Id))) - .ForMember(detail => detail.UserType, opt => opt.MapFrom(user => user.UserType.Alias)) - .ForMember(detail => detail.StartContentId, opt => opt.MapFrom(user => user.StartContentId)) - .ForMember(detail => detail.StartMediaId, opt => opt.MapFrom(user => user.StartMediaId)) + .ForMember(detail => detail.StartContentIds, opt => opt.MapFrom(user => user.CalculateContentStartNodeIds(applicationContext.Services.EntityService))) + .ForMember(detail => detail.StartMediaIds, opt => opt.MapFrom(user => user.CalculateMediaStartNodeIds(applicationContext.Services.EntityService))) .ForMember(detail => detail.Culture, opt => opt.MapFrom(user => user.GetUserCulture(applicationContext.Services.TextService))) .ForMember( detail => detail.EmailHash, opt => opt.MapFrom(user => user.Email.ToLowerInvariant().Trim().GenerateHash())) - .ForMember(detail => detail.SecondsUntilTimeout, opt => opt.Ignore()); + .ForMember(detail => detail.SecondsUntilTimeout, opt => opt.Ignore()) + .AfterMap((user, detail) => + { + //we need to map the legacy UserType + //the best we can do here is to return the user's first user group as a IUserType object + //but we should attempt to return any group that is the built in ones first + var groups = user.Groups.ToArray(); + if (groups.Length == 0) + { + //In backwards compatibility land, a user type cannot be null! so we need to return a fake one. + detail.UserType = "temp"; + } + else + { + var builtIns = new[] { Constants.Security.AdminGroupAlias, "writer", "editor", "translator" }; + var foundBuiltIn = groups.FirstOrDefault(x => builtIns.Contains(x.Alias)); + if (foundBuiltIn != null) + { + detail.UserType = foundBuiltIn.Alias; + } + else + { + //otherwise return the first + detail.UserType = groups[0].Alias; + } + } + + }); - config.CreateMap() - .ForMember(detail => detail.UserId, opt => opt.MapFrom(user => user.Id)) - .ForMember(detail => detail.UserType, opt => opt.MapFrom(user => user.UserTypeAlias)) - .ForMember(detail => detail.StartContentId, opt => opt.MapFrom(user => user.StartContentId)) - .ForMember(detail => detail.StartMediaId, opt => opt.MapFrom(user => user.StartMediaId)) - .ForMember(detail => detail.Culture, opt => opt.MapFrom(user => user.Culture)) - .ForMember(detail => detail.AllowedSections, opt => opt.MapFrom(user => user.AllowedSections)) - .ForMember( - detail => detail.EmailHash, - opt => opt.MapFrom(user => user.Email.ToLowerInvariant().Trim().GenerateHash())) - .ForMember(detail => detail.SecondsUntilTimeout, opt => opt.Ignore()); - - config.CreateMap() + config.CreateMap() .ForMember(detail => detail.UserId, opt => opt.MapFrom(profile => GetIntId(profile.Id))); config.CreateMap() .ConstructUsing((IUser user) => new UserData()) .ForMember(detail => detail.Id, opt => opt.MapFrom(user => user.Id)) - .ForMember(detail => detail.AllowedApplications, opt => opt.MapFrom(user => user.AllowedSections)) + .ForMember(detail => detail.AllowedApplications, opt => opt.MapFrom(user => user.AllowedSections.ToArray())) .ForMember(detail => detail.RealName, opt => opt.MapFrom(user => user.Name)) - .ForMember(detail => detail.Roles, opt => opt.MapFrom(user => new[] {user.UserType.Alias})) - .ForMember(detail => detail.StartContentNode, opt => opt.MapFrom(user => user.StartContentId)) - .ForMember(detail => detail.StartMediaNode, opt => opt.MapFrom(user => user.StartMediaId)) + .ForMember(detail => detail.Roles, opt => opt.MapFrom(user => user.Groups.Select(x => x.Alias).ToArray())) + .ForMember(detail => detail.StartContentNodes, opt => opt.MapFrom(user => user.CalculateContentStartNodeIds(applicationContext.Services.EntityService))) + .ForMember(detail => detail.StartMediaNodes, opt => opt.MapFrom(user => user.CalculateMediaStartNodeIds(applicationContext.Services.EntityService))) .ForMember(detail => detail.Username, opt => opt.MapFrom(user => user.Username)) .ForMember(detail => detail.Culture, opt => opt.MapFrom(user => user.GetUserCulture(applicationContext.Services.TextService))) .ForMember(detail => detail.SessionId, opt => opt.MapFrom(user => user.SecurityStamp.IsNullOrWhiteSpace() ? Guid.NewGuid().ToString("N") : user.SecurityStamp)); - } - + } + + private void MapUserGroupBasic(ServiceContext services, dynamic group, UserGroupBasic display) + { + var allSections = services.SectionService.GetSections(); + display.Sections = allSections.Where(x => Enumerable.Contains(group.AllowedSections, x.Alias)).Select(Mapper.Map); + + if (group.StartMediaId > 0) + { + display.MediaStartNode = Mapper.Map( + services.EntityService.Get(group.StartMediaId, UmbracoObjectTypes.Media)); + } + else if (group.StartMediaId == -1) + { + //create the root node + display.MediaStartNode = RootNode(services.TextService.Localize("media/mediaRoot")); + } + + if (group.StartContentId > 0) + { + display.ContentStartNode = Mapper.Map( + services.EntityService.Get(group.StartContentId, UmbracoObjectTypes.Document)); + } + else if (group.StartContentId == -1) + { + //create the root node + display.ContentStartNode = RootNode(services.TextService.Localize("content/contentRoot")); + } + + if (display.Icon.IsNullOrWhiteSpace()) + { + display.Icon = "icon-users"; + } + } + + private EntityBasic RootNode(string name) + { + return new EntityBasic + { + Name = name, + Path = "-1", + Icon = "icon-folder", + Id = -1, + Trashed = false, + ParentId = -1 + }; + } + private static int GetIntId(object id) { var result = id.TryConvertTo(); diff --git a/src/Umbraco.Web/Models/RelatedLink.cs b/src/Umbraco.Web/Models/RelatedLink.cs index 884bdebeef..2dcb63dd5c 100644 --- a/src/Umbraco.Web/Models/RelatedLink.cs +++ b/src/Umbraco.Web/Models/RelatedLink.cs @@ -1,8 +1,11 @@ -namespace Umbraco.Web.Models +using Umbraco.Core.Models; + +namespace Umbraco.Web.Models { - public class RelatedLink : RelatedLinkBase - { - public int? Id { get; internal set; } - internal bool IsDeleted { get; set; } - } + public class RelatedLink : RelatedLinkBase + { + public int? Id { get; internal set; } + internal bool IsDeleted { get; set; } + public IPublishedContent Content { get; set; } + } } diff --git a/src/Umbraco.Web/Models/RelatedLinkBase.cs b/src/Umbraco.Web/Models/RelatedLinkBase.cs index b347e25e0a..c2077ce4a9 100644 --- a/src/Umbraco.Web/Models/RelatedLinkBase.cs +++ b/src/Umbraco.Web/Models/RelatedLinkBase.cs @@ -1,5 +1,4 @@ using Newtonsoft.Json; -using Umbraco.Core.Models; namespace Umbraco.Web.Models { @@ -15,7 +14,5 @@ namespace Umbraco.Web.Models public bool IsInternal { get; set; } [JsonProperty("type")] public RelatedLinkType Type { get; set; } - [JsonIgnore] - public IPublishedContent Content { get; set; } } } diff --git a/src/Umbraco.Web/Mvc/ControllerExtensions.cs b/src/Umbraco.Web/Mvc/ControllerExtensions.cs index 734e60e8f5..9e55745002 100644 --- a/src/Umbraco.Web/Mvc/ControllerExtensions.cs +++ b/src/Umbraco.Web/Mvc/ControllerExtensions.cs @@ -2,6 +2,7 @@ using System.IO; using System.Threading; using System.Web.Mvc; +using System.Web.Routing; namespace Umbraco.Web.Mvc { @@ -101,16 +102,65 @@ namespace Umbraco.Web.Mvc using (var sw = new StringWriter()) { - var viewResult = !isPartial + var viewResult = isPartial == false ? ViewEngines.Engines.FindView(controller.ControllerContext, viewName, null) : ViewEngines.Engines.FindPartialView(controller.ControllerContext, viewName); - var viewContext = new ViewContext(controller.ControllerContext, viewResult.View, controller.ViewData, controller.TempData, sw); + if (viewResult.View == null) + throw new InvalidOperationException("No view could be found by name " + viewName); + var viewContext = new ViewContext(controller.ControllerContext, viewResult.View, controller.ViewData, controller.TempData, sw); viewResult.View.Render(viewContext, sw); viewResult.ViewEngine.ReleaseView(controller.ControllerContext, viewResult.View); return sw.GetStringBuilder().ToString(); } } + /// + /// Renders the partial view to string. + /// + /// The request context. + /// + /// + /// Name of the view. + /// The model. + /// true if it is a Partial view, otherwise false for a normal view + /// + internal static string RenderViewToString( + this RequestContext requestContext, + ViewDataDictionary viewData, + TempDataDictionary tempData, + string viewName, object model, bool isPartial = false) + { + if (requestContext == null) throw new ArgumentNullException("requestContext"); + if (viewData == null) throw new ArgumentNullException("viewData"); + if (tempData == null) throw new ArgumentNullException("tempData"); + + var routeData = requestContext.RouteData; + if (routeData.Values.ContainsKey("controller") == false) + routeData.Values.Add("controller", "Fake"); + viewData.Model = model; + var controllerContext = new ControllerContext( + requestContext.HttpContext, routeData, + new FakeController + { + ViewData = viewData + }); + + using (var sw = new StringWriter()) + { + var viewResult = isPartial == false + ? ViewEngines.Engines.FindView(controllerContext, viewName, null) + : ViewEngines.Engines.FindPartialView(controllerContext, viewName); + if (viewResult.View == null) + throw new InvalidOperationException("No view could be found by name " + viewName); + var viewContext = new ViewContext(controllerContext, viewResult.View, viewData, tempData, sw); + viewResult.View.Render(viewContext, sw); + viewResult.ViewEngine.ReleaseView(controllerContext, viewResult.View); + return sw.GetStringBuilder().ToString(); + } + } + + private class FakeController : ControllerBase { protected override void ExecuteCore() { } } + /// /// Normally in MVC the way that the View object gets assigned to the result is to Execute the ViewResult, this however /// will write to the Response output stream which isn't what we want. Instead, this method will use the same logic inside diff --git a/src/Umbraco.Web/PluginManagerExtensions.cs b/src/Umbraco.Web/PluginManagerExtensions.cs index bda4b3a95f..76b71245e5 100644 --- a/src/Umbraco.Web/PluginManagerExtensions.cs +++ b/src/Umbraco.Web/PluginManagerExtensions.cs @@ -9,6 +9,7 @@ using Umbraco.Web.Trees; using Umbraco.Web.WebApi; using umbraco; using umbraco.interfaces; +using Umbraco.Web.Search; namespace Umbraco.Web { @@ -48,12 +49,22 @@ namespace Umbraco.Web return resolver.ResolveTypes(); } - /// - /// Returns all classes attributed with RestExtensionAttribute attribute - /// - /// - /// - internal static IEnumerable ResolveRestExtensions(this PluginManager resolver) + /// + /// Returns all available in application + /// + /// + /// + internal static IEnumerable ResolveSearchableTrees(this PluginManager resolver) + { + return resolver.ResolveTypes(); + } + + /// + /// Returns all classes attributed with RestExtensionAttribute attribute + /// + /// + /// + internal static IEnumerable ResolveRestExtensions(this PluginManager resolver) { return resolver.ResolveAttributedTypes(); } diff --git a/src/Umbraco.Web/Profiling/WebProfiler.cs b/src/Umbraco.Web/Profiling/WebProfiler.cs index b1c2d9eefb..fd980db2d1 100644 --- a/src/Umbraco.Web/Profiling/WebProfiler.cs +++ b/src/Umbraco.Web/Profiling/WebProfiler.cs @@ -99,13 +99,17 @@ namespace Umbraco.Web.Profiling if (request.Success == false || request.Result.Url.IsClientSideRequest()) return false; - if (string.IsNullOrEmpty(request.Result.QueryString["umbDebug"])) - return false; + //if there is an umbDebug query string than profile it + bool umbDebug; + if (string.IsNullOrEmpty(request.Result.QueryString["umbDebug"]) == false && bool.TryParse(request.Result.QueryString["umbDebug"], out umbDebug)) + return true; - if (request.Result.Url.IsBackOfficeRequest(HttpRuntime.AppDomainAppVirtualPath)) - return false; + //if there is an umbDebug header than profile it + if (string.IsNullOrEmpty(request.Result.Headers["X-UMB-DEBUG"]) == false && bool.TryParse(request.Result.Headers["X-UMB-DEBUG"], out umbDebug)) + return true; - return true; + //everything else is ok to profile + return false; } /// diff --git a/src/Umbraco.Web/Properties/AssemblyInfo.cs b/src/Umbraco.Web/Properties/AssemblyInfo.cs index c9e792fcc6..c016d328a9 100644 --- a/src/Umbraco.Web/Properties/AssemblyInfo.cs +++ b/src/Umbraco.Web/Properties/AssemblyInfo.cs @@ -38,7 +38,6 @@ using System.Security; [assembly: InternalsVisibleTo("Umbraco.Deploy")] [assembly: InternalsVisibleTo("Umbraco.Deploy.UI")] [assembly: InternalsVisibleTo("Umbraco.Deploy.Cloud")] -[assembly: InternalsVisibleTo("Umbraco.VisualStudio")] [assembly: InternalsVisibleTo("Umbraco.ModelsBuilder")] [assembly: InternalsVisibleTo("Umbraco.ModelsBuilder.AspNet")] [assembly: InternalsVisibleTo("DynamicProxyGenAssembly2")] @@ -47,3 +46,7 @@ using System.Security; [assembly: InternalsVisibleTo("Umbraco.Forms.Core.Providers")] [assembly: InternalsVisibleTo("Umbraco.Forms.Web")] + +//allow custom unit-testing code to access internals through custom adapters +[assembly: InternalsVisibleTo("Umbraco.VisualStudio")] // backwards compat. +[assembly: InternalsVisibleTo("Umbraco.UnitTesting.Adapter")] // new, more imperative name diff --git a/src/Umbraco.Web/PropertyEditors/ListViewPropertyEditor.cs b/src/Umbraco.Web/PropertyEditors/ListViewPropertyEditor.cs index f744e4d807..2ee208ed48 100644 --- a/src/Umbraco.Web/PropertyEditors/ListViewPropertyEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/ListViewPropertyEditor.cs @@ -42,7 +42,7 @@ namespace Umbraco.Web.PropertyEditors allowBulkPublish = true, allowBulkUnpublish = true, allowBulkCopy = true, - allowBulkMove = true, + allowBulkMove = false, allowBulkDelete = true }} }; @@ -50,7 +50,10 @@ namespace Umbraco.Web.PropertyEditors } internal class ListViewPreValueEditor : PreValueEditor - { + { + [PreValueField("tabName", "Tab Name", "textstring", Description = "The name of the listview tab (default if empty: 'Child Items')")] + public int TabName { get; set; } + [PreValueField("displayAtTabNumber", "Display At Tab Number", "number", Description = "Which tab position that the list of child items will be displayed")] public int DisplayAtTabNumber { get; set; } diff --git a/src/Umbraco.Web/PropertyEditors/TextAreaPropertyEditor.cs b/src/Umbraco.Web/PropertyEditors/TextAreaPropertyEditor.cs index 3bec23f004..7006befdcd 100644 --- a/src/Umbraco.Web/PropertyEditors/TextAreaPropertyEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/TextAreaPropertyEditor.cs @@ -6,5 +6,15 @@ namespace Umbraco.Web.PropertyEditors [PropertyEditor(Constants.PropertyEditors.TextboxMultipleAlias, "Textarea", "textarea", IsParameterEditor = true, ValueType = PropertyEditorValueTypes.Text, Icon="icon-application-window-alt")] public class TextAreaPropertyEditor : PropertyEditor { + protected override PreValueEditor CreatePreValueEditor() + { + return new TextAreaPreValueEditor(); + } + + internal class TextAreaPreValueEditor : PreValueEditor + { + [PreValueField("maxChars", "Maximum allowed characters", "number", Description = "If empty - no character limit")] + public bool MaxChars { get; set; } + } } } diff --git a/src/Umbraco.Web/PropertyEditors/TextboxPropertyEditor.cs b/src/Umbraco.Web/PropertyEditors/TextboxPropertyEditor.cs index bcfbbbf682..0fd243180c 100644 --- a/src/Umbraco.Web/PropertyEditors/TextboxPropertyEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/TextboxPropertyEditor.cs @@ -12,6 +12,19 @@ namespace Umbraco.Web.PropertyEditors { [PropertyEditor(Constants.PropertyEditors.TextboxAlias, "Textbox", "textbox", IsParameterEditor = true, Group = "Common")] public class TextboxPropertyEditor : PropertyEditor - { + { + + + protected override PreValueEditor CreatePreValueEditor() + { + return new TextboxPreValueEditor(); + } + + internal class TextboxPreValueEditor : PreValueEditor + { + [PreValueField("maxChars", "Maximum allowed characters", "number", Description = "If empty - no character limit")] + public bool MaxChars { get; set; } + } + } } diff --git a/src/Umbraco.Web/PropertyEditors/ValueConverters/MultipleMediaPickerPropertyConverter.cs b/src/Umbraco.Web/PropertyEditors/ValueConverters/LegacyMediaPickerPropertyConverter.cs similarity index 90% rename from src/Umbraco.Web/PropertyEditors/ValueConverters/MultipleMediaPickerPropertyConverter.cs rename to src/Umbraco.Web/PropertyEditors/ValueConverters/LegacyMediaPickerPropertyConverter.cs index 161e7178e7..8ef11bec8d 100644 --- a/src/Umbraco.Web/PropertyEditors/ValueConverters/MultipleMediaPickerPropertyConverter.cs +++ b/src/Umbraco.Web/PropertyEditors/ValueConverters/LegacyMediaPickerPropertyConverter.cs @@ -1,5 +1,5 @@ // -------------------------------------------------------------------------------------------------------------------- -// +// // Umbraco // // @@ -24,20 +24,20 @@ using Umbraco.Core.Services; namespace Umbraco.Web.PropertyEditors.ValueConverters { /// - /// The multiple media picker property value converter. + /// The multiple media picker and double legacy media picker property value converter, should be deleted for v8 /// [DefaultPropertyValueConverter(typeof(MustBeStringValueConverter))] - public class MultipleMediaPickerPropertyConverter : PropertyValueConverterBase, IPropertyValueConverterMeta + public class LegacyMediaPickerPropertyConverter : PropertyValueConverterBase, IPropertyValueConverterMeta { private readonly IDataTypeService _dataTypeService; //TODO: Remove this ctor in v8 since the other one will use IoC - public MultipleMediaPickerPropertyConverter() + public LegacyMediaPickerPropertyConverter() : this(ApplicationContext.Current.Services.DataTypeService) { } - public MultipleMediaPickerPropertyConverter(IDataTypeService dataTypeService) + public LegacyMediaPickerPropertyConverter(IDataTypeService dataTypeService) { if (dataTypeService == null) throw new ArgumentNullException("dataTypeService"); _dataTypeService = dataTypeService; @@ -54,10 +54,17 @@ namespace Umbraco.Web.PropertyEditors.ValueConverters /// public override bool IsConverter(PublishedPropertyType propertyType) { - if (UmbracoConfig.For.UmbracoSettings().Content.EnablePropertyValueConverters) + if (UmbracoConfig.For.UmbracoSettings().Content.EnablePropertyValueConverters && propertyType.PropertyEditorAlias.Equals(Constants.PropertyEditors.MultipleMediaPickerAlias)) { - return propertyType.PropertyEditorAlias.Equals(Constants.PropertyEditors.MultipleMediaPickerAlias); + return true; } + + if (UmbracoConfig.For.UmbracoSettings().Content.EnablePropertyValueConverters && propertyType.PropertyEditorAlias.Equals(Constants.PropertyEditors.MediaPickerAlias)) + { + // this is the double legacy media picker, it can pick only single media items + return true; + } + return false; } @@ -109,7 +116,7 @@ namespace Umbraco.Web.PropertyEditors.ValueConverters ApplicationContext.Current.Services.DataTypeService.GetDataTypeDefinitionById( propertyType.DataTypeId).Name); - LogHelper.Warn(error); + LogHelper.Warn(error); throw new Exception(error); } } @@ -264,4 +271,4 @@ namespace Umbraco.Web.PropertyEditors.ValueConverters Storages.Clear(); } } -} \ No newline at end of file +} diff --git a/src/Umbraco.Web/PropertyEditors/ValueConverters/MediaPickerPropertyConverter.cs b/src/Umbraco.Web/PropertyEditors/ValueConverters/MediaPickerPropertyConverter.cs index 5f54363975..2e9d0c7d96 100644 --- a/src/Umbraco.Web/PropertyEditors/ValueConverters/MediaPickerPropertyConverter.cs +++ b/src/Umbraco.Web/PropertyEditors/ValueConverters/MediaPickerPropertyConverter.cs @@ -126,10 +126,6 @@ namespace Umbraco.Web.PropertyEditors.ValueConverters if (propertyType.PropertyEditorAlias.Equals(Constants.PropertyEditors.MediaPicker2Alias)) return true; - if (UmbracoConfig.For.UmbracoSettings().Content.EnablePropertyValueConverters) - { - return propertyType.PropertyEditorAlias.Equals(Constants.PropertyEditors.MediaPickerAlias); - } return false; } diff --git a/src/Umbraco.Web/PropertyEditors/ValueConverters/RelatedLinksEditorValueConvertor.cs b/src/Umbraco.Web/PropertyEditors/ValueConverters/RelatedLinksEditorValueConvertor.cs index 67ff40fed4..2fce29ae93 100644 --- a/src/Umbraco.Web/PropertyEditors/ValueConverters/RelatedLinksEditorValueConvertor.cs +++ b/src/Umbraco.Web/PropertyEditors/ValueConverters/RelatedLinksEditorValueConvertor.cs @@ -110,6 +110,7 @@ namespace Umbraco.Web.PropertyEditors.ValueConverters { relatedLink.Id = contentId; relatedLink = CreateLink(relatedLink); + relatedLink.Content = UmbracoContext.Current.ContentCache.GetById(contentId); } else { diff --git a/src/Umbraco.Web/PublishedContentExtensions.cs b/src/Umbraco.Web/PublishedContentExtensions.cs index 8ce0d5c2db..6091c6c7dc 100644 --- a/src/Umbraco.Web/PublishedContentExtensions.cs +++ b/src/Umbraco.Web/PublishedContentExtensions.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.ComponentModel; using System.Data; using System.Globalization; using System.Linq; @@ -10,6 +11,7 @@ using Umbraco.Core.Models.PublishedContent; using Umbraco.Core.Services; using Umbraco.Web.Models; using Umbraco.Core; +using Umbraco.Core.Logging; using Umbraco.Web.Routing; using ContentType = umbraco.cms.businesslogic.ContentType; @@ -24,14 +26,24 @@ namespace Umbraco.Web public static Guid GetKey(this IPublishedContent content) { - var wrapped = content as PublishedContentWrapped; - while (wrapped != null) - { - content = wrapped.Unwrap(); - wrapped = content as PublishedContentWrapped; - } + // fast var contentWithKey = content as IPublishedContentWithKey; - return contentWithKey == null ? Guid.Empty : contentWithKey.Key; + if (contentWithKey != null) return contentWithKey.Key; + + // try to unwrap (models...) + var contentWrapped = content as PublishedContentWrapped; + while (contentWrapped != null) + { + content = contentWrapped.Unwrap(); + contentWrapped = content as PublishedContentWrapped; + } + + // again + contentWithKey = content as IPublishedContentWithKey; + if (contentWithKey != null) return contentWithKey.Key; + + LogHelper.Debug(typeof(PublishedContentExtensions), string.Format("Could not get key for IPublishedContent with id {0} of type {1}.", content.Id, content.GetType().FullName)); + return Guid.Empty; } #endregion @@ -490,21 +502,23 @@ namespace Umbraco.Web where T : class, IPublishedContent { return new PublishedContentOrderedSet(source); - } - + } + #endregion - + #region Dynamic Linq Extensions - - // todo - we should keep this file clean and remove dynamic linq stuff from it - + + [Obsolete("This method uses dynamics which will be removed in future versions, use strongly typed syntax instead")] + [EditorBrowsable(EditorBrowsableState.Never)] public static IQueryable OrderBy(this IEnumerable source, string predicate) { var dList = new DynamicPublishedContentList(source); return dList.OrderBy(predicate); } - public static IQueryable Where(this IEnumerable list, string predicate) + [Obsolete("This method uses dynamics which will be removed in future versions, use strongly typed syntax instead")] + [EditorBrowsable(EditorBrowsableState.Never)] + public static IQueryable Where(this IEnumerable list, string predicate) { // wrap in DynamicPublishedContentList so that the ContentSet is correct // though that code is somewhat ugly. @@ -515,30 +529,40 @@ namespace Umbraco.Web return dlist.AsQueryable(); } - public static IEnumerable> GroupBy(this IEnumerable list, string predicate) + [Obsolete("This method uses dynamics which will be removed in future versions, use strongly typed syntax instead")] + [EditorBrowsable(EditorBrowsableState.Never)] + public static IEnumerable> GroupBy(this IEnumerable list, string predicate) { var dList = new DynamicPublishedContentList(list); return dList.GroupBy(predicate); } - public static IQueryable Select(this IEnumerable list, string predicate, params object[] values) + [Obsolete("This method uses dynamics which will be removed in future versions, use strongly typed syntax instead")] + [EditorBrowsable(EditorBrowsableState.Never)] + public static IQueryable Select(this IEnumerable list, string predicate, params object[] values) { var dList = new DynamicPublishedContentList(list); return dList.Select(predicate); } + [Obsolete("This method uses dynamics which will be removed in future versions, use strongly typed syntax instead")] + [EditorBrowsable(EditorBrowsableState.Never)] public static HtmlString Where(this IPublishedContent content, string predicate, string valueIfTrue) { if (content == null) throw new ArgumentNullException("content"); return content.Where(predicate, valueIfTrue, string.Empty); } + [Obsolete("This method uses dynamics which will be removed in future versions, use strongly typed syntax instead")] + [EditorBrowsable(EditorBrowsableState.Never)] public static HtmlString Where(this IPublishedContent content, string predicate, string valueIfTrue, string valueIfFalse) { if (content == null) throw new ArgumentNullException("content"); return new HtmlString(content.Where(predicate) ? valueIfTrue : valueIfFalse); } - + + [Obsolete("This method uses dynamics which will be removed in future versions, use strongly typed syntax instead: Where(x => x.IsVisible())")] + [EditorBrowsable(EditorBrowsableState.Never)] public static bool Where(this IPublishedContent content, string predicate) { if (content == null) throw new ArgumentNullException("content"); @@ -551,16 +575,16 @@ namespace Umbraco.Web #region AsDynamic - // it is ok to have dynamic here - - // content should NOT be null - public static dynamic AsDynamic(this IPublishedContent content) + [Obsolete("The use of dynamics has been deprecated, use strongly typed syntax instead, dynamics will be removed in future versions")] + [EditorBrowsable(EditorBrowsableState.Never)] + public static dynamic AsDynamic(this IPublishedContent content) { if (content == null) throw new ArgumentNullException("content"); return new DynamicPublishedContent(content); } - // content CAN be null + [Obsolete("The use of dynamics has been deprecated, use strongly typed syntax instead, dynamics will be removed in future versions")] + [EditorBrowsable(EditorBrowsableState.Never)] internal static DynamicPublishedContent AsDynamicOrNull(this IPublishedContent content) { return content == null ? null : new DynamicPublishedContent(content); @@ -628,27 +652,9 @@ namespace Umbraco.Web /// When true, recurses up the content type tree to check inheritance; when false just calls IsDocumentType(this IPublishedContent content, string docTypeAlias). /// True if the content is of the specified content type or a derived content type; otherwise false. public static bool IsDocumentType(this IPublishedContent content, string docTypeAlias, bool recursive) - { - if (content.IsDocumentType(docTypeAlias)) - return true; - - if (recursive) - return IsDocumentTypeRecursive(content, docTypeAlias); - return false; - } - - private static bool IsDocumentTypeRecursive(IPublishedContent content, string docTypeAlias) - { - var contentTypeService = UmbracoContext.Current.Application.Services.ContentTypeService; - var type = contentTypeService.GetContentType(content.DocumentTypeAlias); - while (type != null && type.ParentId > 0) - { - type = contentTypeService.GetContentType(type.ParentId); - if (type.Alias.InvariantEquals(docTypeAlias)) - return true; - } - return false; - } + { + return content.DocumentTypeAlias.InvariantEquals(docTypeAlias) || (recursive && content.IsComposedOf(docTypeAlias)); + } public static bool IsNull(this IPublishedContent content, string alias, bool recurse) { @@ -918,14 +924,14 @@ namespace Umbraco.Web #region Axes: ancestors, ancestors-or-self - // as per XPath 1.0 specs 2.2, + // as per XPath 1.0 specs §2.2, // - the ancestor axis contains the ancestors of the context node; the ancestors of the context node consist // of the parent of context node and the parent's parent and so on; thus, the ancestor axis will always // include the root node, unless the context node is the root node. // - the ancestor-or-self axis contains the context node and the ancestors of the context node; thus, // the ancestor axis will always include the root node. // - // as per XPath 2.0 specs 3.2.1.1, + // as per XPath 2.0 specs §3.2.1.1, // - the ancestor axis is defined as the transitive closure of the parent axis; it contains the ancestors // of the context node (the parent, the parent of the parent, and so on) - The ancestor axis includes the // root node of the tree in which the context node is found, unless the context node is the root node. @@ -935,7 +941,7 @@ namespace Umbraco.Web // the ancestor and ancestor-or-self axis are reverse axes ie they contain the context node or nodes that // are before the context node in document order. // - // document order is defined by 2.4.1 as: + // document order is defined by §2.4.1 as: // - the root node is the first node. // - every node occurs before all of its children and descendants. // - the relative order of siblings is the order in which they occur in the children property of their parent node. @@ -1246,12 +1252,12 @@ namespace Umbraco.Web } - // as per XPath 1.0 specs 2.2, + // as per XPath 1.0 specs §2.2, // - the descendant axis contains the descendants of the context node; a descendant is a child or a child of a child and so on; thus // the descendant axis never contains attribute or namespace nodes. // - the descendant-or-self axis contains the context node and the descendants of the context node. // - // as per XPath 2.0 specs 3.2.1.1, + // as per XPath 2.0 specs §3.2.1.1, // - the descendant axis is defined as the transitive closure of the child axis; it contains the descendants of the context node (the // children, the children of the children, and so on). // - the descendant-or-self axis contains the context node and the descendants of the context node. @@ -1259,7 +1265,7 @@ namespace Umbraco.Web // the descendant and descendant-or-self axis are forward axes ie they contain the context node or nodes that are after the context // node in document order. // - // document order is defined by 2.4.1 as: + // document order is defined by §2.4.1 as: // - the root node is the first node. // - every node occurs before all of its children and descendants. // - the relative order of siblings is the order in which they occur in the children property of their parent node. diff --git a/src/Umbraco.Web/Routing/UrlProviderExtensions.cs b/src/Umbraco.Web/Routing/UrlProviderExtensions.cs index 54ef8a42b5..d464b8962e 100644 --- a/src/Umbraco.Web/Routing/UrlProviderExtensions.cs +++ b/src/Umbraco.Web/Routing/UrlProviderExtensions.cs @@ -70,6 +70,7 @@ namespace Umbraco.Web.Routing // test for collisions var uri = new Uri(url.TrimEnd('/'), UriKind.RelativeOrAbsolute); if (uri.IsAbsoluteUri == false) uri = uri.MakeAbsolute(UmbracoContext.Current.CleanedUmbracoUrl); + uri = UriUtility.UriToUmbraco(uri); var pcr = new PublishedContentRequest(uri, UmbracoContext.Current.RoutingContext, UmbracoConfig.For.UmbracoSettings().WebRouting, s => Roles.Provider.GetRolesForUser(s)); pcr.Engine.TryRouteRequest(); diff --git a/src/Umbraco.Web/Scheduling/ScheduledPublishing.cs b/src/Umbraco.Web/Scheduling/ScheduledPublishing.cs index 24359d2b50..73b28ae669 100644 --- a/src/Umbraco.Web/Scheduling/ScheduledPublishing.cs +++ b/src/Umbraco.Web/Scheduling/ScheduledPublishing.cs @@ -1,12 +1,18 @@ using System; -using System.Net.Http; +using System.IO; using System.Threading; using System.Threading.Tasks; +using System.Web; +using System.Web.Hosting; +using umbraco; using Umbraco.Core; +using Umbraco.Core.Configuration; using Umbraco.Core.Configuration.UmbracoSettings; using Umbraco.Core.Logging; +using Umbraco.Core.Publishing; using Umbraco.Core.Sync; -using Umbraco.Web.Mvc; +using Umbraco.Web.Routing; +using Umbraco.Web.Security; namespace Umbraco.Web.Scheduling { @@ -23,6 +29,8 @@ namespace Umbraco.Web.Scheduling _settings = settings; } + private ILogger Logger { get { return _appContext.ProfilingLogger.Logger; } } + public override async Task PerformRunAsync(CancellationToken token) { if (_appContext == null) return true; // repeat... @@ -30,10 +38,10 @@ namespace Umbraco.Web.Scheduling switch (_appContext.GetCurrentServerRole()) { case ServerRole.Slave: - LogHelper.Debug("Does not run on slave servers."); + Logger.Debug("Does not run on slave servers."); return true; // DO repeat, server role can change case ServerRole.Unknown: - LogHelper.Debug("Does not run on servers with unknown role."); + Logger.Debug("Does not run on servers with unknown role."); return true; // DO repeat, server role can change } @@ -44,72 +52,38 @@ namespace Umbraco.Web.Scheduling return false; // do NOT repeat, going down } - string umbracoAppUrl; + UmbracoContext tempContext = null; try { - umbracoAppUrl = _appContext == null || _appContext.UmbracoApplicationUrl.IsNullOrWhiteSpace() - ? null - : _appContext.UmbracoApplicationUrl; - if (umbracoAppUrl.IsNullOrWhiteSpace()) + // DO not run publishing if content is re-loading + if (content.Instance.isInitializing == false) { - LogHelper.Warn("No url for service (yet), skip."); - return true; // repeat + //TODO: We should remove this in v8, this is a backwards compat hack + // see notes in CacheRefresherEventHandler + // because notifications will not be sent if there is no UmbracoContext + // see NotificationServiceExtensions + var httpContext = new HttpContextWrapper(new HttpContext(new SimpleWorkerRequest("temp.aspx", "", new StringWriter()))); + tempContext = UmbracoContext.EnsureContext( + httpContext, + _appContext, + new WebSecurity(httpContext, _appContext), + _settings, + UrlProviderResolver.Current.Providers, + true); + + var publisher = new ScheduledPublisher(_appContext.Services.ContentService); + var count = publisher.CheckPendingAndProcess(); + Logger.Debug(() => string.Format("Processed {0} items", count)); } } catch (Exception e) { - LogHelper.Error("Could not acquire application url", e); - return true; // repeat + Logger.Error("Failed (see exception).", e); } - - var url = umbracoAppUrl + "/RestServices/ScheduledPublish/Index"; - - using (DisposableTimer.DebugDuration( - () => string.Format("Scheduled publishing executing @ {0}", url), - () => "Scheduled publishing complete")) + finally { - try - { - using (var wc = new HttpClient()) - { - var request = new HttpRequestMessage(HttpMethod.Post, url) - { - Content = new StringContent(string.Empty) - }; - - // running on a background task, requires its own (safe) scope - // (GetAuthenticationHeaderValue uses UserService to load the current user, hence requires a database) - // (might not need a scope but we don't know really) - using (var scope = ApplicationContext.Current.ScopeProvider.CreateScope()) - { - //pass custom the authorization header - request.Headers.Authorization = AdminTokenAuthorizeAttribute.GetAuthenticationHeaderValue(_appContext); - scope.Complete(); - } - - var result = await wc.SendAsync(request, token); - var content = await result.Content.ReadAsStringAsync(); - - if (result.IsSuccessStatusCode) - { - LogHelper.Debug( - () => string.Format( - "Request successfully sent to url = \"{0}\". ", url)); - } - else - { - var msg = string.Format( - "Request failed with status code \"{0}\". Request content = \"{1}\".", - result.StatusCode, content); - var ex = new HttpRequestException(msg); - LogHelper.Error(msg, ex); - } - } - } - catch (Exception e) - { - LogHelper.Error(string.Format("Failed (at \"{0}\").", umbracoAppUrl), e); - } + if (tempContext != null) + tempContext.Dispose(); // nulls the ThreadStatic context } return true; // repeat diff --git a/src/Umbraco.Web/Search/ISearchableTree.cs b/src/Umbraco.Web/Search/ISearchableTree.cs new file mode 100644 index 0000000000..6e25724bfa --- /dev/null +++ b/src/Umbraco.Web/Search/ISearchableTree.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using Umbraco.Web.Models.ContentEditing; + +namespace Umbraco.Web.Search +{ + public interface ISearchableTree + { + /// + /// The alias of the tree that the belongs to + /// + string TreeAlias { get; } + + /// + /// Searches for results based on the entity type + /// + /// + /// + /// + /// + /// + /// A starting point for the search, generally a node id, but for members this is a member type alias + /// + /// + IEnumerable Search(string query, int pageSize, long pageIndex, out long totalFound, string searchFrom = null); + } +} \ No newline at end of file diff --git a/src/Umbraco.Web/Search/SearchableApplicationTree.cs b/src/Umbraco.Web/Search/SearchableApplicationTree.cs new file mode 100644 index 0000000000..8ce0fd52fc --- /dev/null +++ b/src/Umbraco.Web/Search/SearchableApplicationTree.cs @@ -0,0 +1,17 @@ +namespace Umbraco.Web.Search +{ + public class SearchableApplicationTree + { + public SearchableApplicationTree(string appAlias, string treeAlias, ISearchableTree searchableTree) + { + AppAlias = appAlias; + TreeAlias = treeAlias; + SearchableTree = searchableTree; + } + + public string AppAlias { get; private set; } + public string TreeAlias { get; private set; } + public ISearchableTree SearchableTree { get; private set; } + + } +} \ No newline at end of file diff --git a/src/Umbraco.Web/Search/SearchableTreeAttribute.cs b/src/Umbraco.Web/Search/SearchableTreeAttribute.cs new file mode 100644 index 0000000000..c24f494d62 --- /dev/null +++ b/src/Umbraco.Web/Search/SearchableTreeAttribute.cs @@ -0,0 +1,35 @@ +using System; + +namespace Umbraco.Web.Search +{ + [AttributeUsage(AttributeTargets.Class)] + public sealed class SearchableTreeAttribute : Attribute + { + /// + /// This constructor defines both the angular service and method name to use + /// + /// + /// + public SearchableTreeAttribute(string serviceName, string methodName) + { + if (string.IsNullOrWhiteSpace(serviceName)) throw new ArgumentException("Value cannot be null or whitespace.", "serviceName"); + if (string.IsNullOrWhiteSpace(methodName)) throw new ArgumentException("Value cannot be null or whitespace.", "methodName"); + MethodName = methodName; + ServiceName = serviceName; + } + + /// + /// This constructor will assume that the method name equals `format(searchResult, appAlias, treeAlias)` + /// + /// + public SearchableTreeAttribute(string serviceName) + { + if (string.IsNullOrWhiteSpace(serviceName)) throw new ArgumentException("Value cannot be null or whitespace.", "serviceName"); + MethodName = ""; + ServiceName = serviceName; + } + + public string MethodName { get; private set; } + public string ServiceName { get; private set; } + } +} \ No newline at end of file diff --git a/src/Umbraco.Web/Search/SearchableTreeCollection.cs b/src/Umbraco.Web/Search/SearchableTreeCollection.cs new file mode 100644 index 0000000000..463ae54f1d --- /dev/null +++ b/src/Umbraco.Web/Search/SearchableTreeCollection.cs @@ -0,0 +1,18 @@ +using System.Collections.Generic; +using System.Collections.ObjectModel; + +namespace Umbraco.Web.Search +{ + internal class SearchableTreeCollection : KeyedCollection + { + protected override string GetKeyForItem(SearchableApplicationTree item) + { + return item.TreeAlias; + } + + public IReadOnlyDictionary AsReadOnlyDictionary() + { + return new ReadOnlyDictionary(Dictionary); + } + } +} \ No newline at end of file diff --git a/src/Umbraco.Web/Search/SearchableTreeResolver.cs b/src/Umbraco.Web/Search/SearchableTreeResolver.cs new file mode 100644 index 0000000000..4831595072 --- /dev/null +++ b/src/Umbraco.Web/Search/SearchableTreeResolver.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Configuration; +using System.Linq; +using Umbraco.Core; +using Umbraco.Core.Logging; +using Umbraco.Core.Models; +using Umbraco.Core.ObjectResolution; +using Umbraco.Core.Services; +using Umbraco.Web.Editors; +using Umbraco.Web.Trees; + +namespace Umbraco.Web.Search +{ + /// + /// A resolver to return the collection of searchable trees + /// + /// + /// This collection has a request scoped lifetime therefore any instance of ISearchableTree needs to support being a request scoped lifetime + /// + public class SearchableTreeResolver : LazyManyObjectsResolverBase + { + private readonly IApplicationTreeService _treeService; + + public SearchableTreeResolver(IServiceProvider serviceProvider, ILogger logger, IApplicationTreeService treeService, Func> searchableTrees) + : base(serviceProvider, logger, searchableTrees, ObjectLifetimeScope.HttpRequest) + { + _treeService = treeService; + } + + /// + /// Returns the a dictionary of tree alias with it's affiliated + /// + public IReadOnlyDictionary GetSearchableTrees() + { + var appTrees = _treeService.GetAll().ToArray(); + var collection = new SearchableTreeCollection(); + var searchableTrees = Values.ToArray(); + foreach (var searchableTree in searchableTrees) + { + var found = appTrees.FirstOrDefault(x => x.Alias == searchableTree.TreeAlias); + if (found != null) + { + collection.Add(new SearchableApplicationTree(found.ApplicationAlias, found.Alias, searchableTree)); + } + } + return collection.AsReadOnlyDictionary(); + } + } +} diff --git a/src/Umbraco.Web/Search/UmbracoTreeSearcher.cs b/src/Umbraco.Web/Search/UmbracoTreeSearcher.cs new file mode 100644 index 0000000000..0dac79590f --- /dev/null +++ b/src/Umbraco.Web/Search/UmbracoTreeSearcher.cs @@ -0,0 +1,335 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Text; +using System.Text.RegularExpressions; +using AutoMapper; +using Examine; +using Umbraco.Core; +using Umbraco.Core.Models; +using Umbraco.Core.Services; +using Umbraco.Web.Models.ContentEditing; + +namespace Umbraco.Web.Search +{ + internal class UmbracoTreeSearcher + { + /// + /// Searches for results based on the entity type + /// + /// + /// + /// + /// + /// + /// A starting point for the search, generally a node id, but for members this is a member type alias + /// + /// + /// + /// + public IEnumerable ExamineSearch( + UmbracoHelper umbracoHelper, + string query, + UmbracoEntityTypes entityType, + int pageSize, + long pageIndex, out long totalFound, string searchFrom = null) + { + var sb = new StringBuilder(); + + string type; + var searcher = Constants.Examine.InternalSearcher; + var fields = new[] { "id", "__NodeId" }; + + var umbracoContext = umbracoHelper.UmbracoContext; + var appContext = umbracoContext.Application; + + //TODO: WE should really just allow passing in a lucene raw query + switch (entityType) + { + case UmbracoEntityTypes.Member: + searcher = Constants.Examine.InternalMemberSearcher; + type = "member"; + fields = new[] { "id", "__NodeId", "email", "loginName" }; + if (searchFrom != null && searchFrom != Constants.Conventions.MemberTypes.AllMembersListId && searchFrom.Trim() != "-1") + { + sb.Append("+__NodeTypeAlias:"); + sb.Append(searchFrom); + sb.Append(" "); + } + break; + case UmbracoEntityTypes.Media: + type = "media"; + var allMediaStartNodes = umbracoContext.Security.CurrentUser.CalculateMediaStartNodeIds(appContext.Services.EntityService); + AppendPath(sb, UmbracoObjectTypes.Media, allMediaStartNodes, searchFrom, appContext.Services.EntityService); + break; + case UmbracoEntityTypes.Document: + type = "content"; + var allContentStartNodes = umbracoContext.Security.CurrentUser.CalculateContentStartNodeIds(appContext.Services.EntityService); + AppendPath(sb, UmbracoObjectTypes.Document, allContentStartNodes, searchFrom, appContext.Services.EntityService); + break; + default: + throw new NotSupportedException("The " + typeof(UmbracoTreeSearcher) + " currently does not support searching against object type " + entityType); + } + + var internalSearcher = ExamineManager.Instance.SearchProviderCollection[searcher]; + + //build a lucene query: + // the __nodeName will be boosted 10x without wildcards + // then __nodeName will be matched normally with wildcards + // the rest will be normal without wildcards + + + //check if text is surrounded by single or double quotes, if so, then exact match + var surroundedByQuotes = Regex.IsMatch(query, "^\".*?\"$") + || Regex.IsMatch(query, "^\'.*?\'$"); + + if (surroundedByQuotes) + { + //strip quotes, escape string, the replace again + query = query.Trim(new[] { '\"', '\'' }); + + query = Lucene.Net.QueryParsers.QueryParser.Escape(query); + + //nothing to search + if (searchFrom.IsNullOrWhiteSpace() && query.IsNullOrWhiteSpace()) + { + totalFound = 0; + return new List(); + } + + //update the query with the query term + if (query.IsNullOrWhiteSpace() == false) + { + //add back the surrounding quotes + query = string.Format("{0}{1}{0}", "\"", query); + + //node name exactly boost x 10 + sb.Append("+(__nodeName: ("); + sb.Append(query.ToLower()); + sb.Append(")^10.0 "); + + foreach (var f in fields) + { + //additional fields normally + sb.Append(f); + sb.Append(": ("); + sb.Append(query); + sb.Append(") "); + } + + sb.Append(") "); + } + } + else + { + var trimmed = query.Trim(new[] { '\"', '\'' }); + + //nothing to search + if (searchFrom.IsNullOrWhiteSpace() && trimmed.IsNullOrWhiteSpace()) + { + totalFound = 0; + return new List(); + } + + //update the query with the query term + if (trimmed.IsNullOrWhiteSpace() == false) + { + query = Lucene.Net.QueryParsers.QueryParser.Escape(query); + + var querywords = query.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries); + + //node name exactly boost x 10 + sb.Append("+(__nodeName:"); + sb.Append("\""); + sb.Append(query.ToLower()); + sb.Append("\""); + sb.Append("^10.0 "); + + //node name normally with wildcards + sb.Append(" __nodeName:"); + sb.Append("("); + foreach (var w in querywords) + { + sb.Append(w.ToLower()); + sb.Append("* "); + } + sb.Append(") "); + + + foreach (var f in fields) + { + //additional fields normally + sb.Append(f); + sb.Append(":"); + sb.Append("("); + foreach (var w in querywords) + { + sb.Append(w.ToLower()); + sb.Append("* "); + } + sb.Append(")"); + sb.Append(" "); + } + + sb.Append(") "); + } + } + + //must match index type + sb.Append("+__IndexType:"); + sb.Append(type); + + var raw = internalSearcher.CreateSearchCriteria().RawQuery(sb.ToString()); + + var result = internalSearcher + //only return the number of items specified to read up to the amount of records to fill from 0 -> the number of items on the page requested + .Search(raw, Convert.ToInt32(pageSize * (pageIndex + 1))); + + totalFound = result.TotalItemCount; + + var pagedResult = result.Skip(Convert.ToInt32(pageIndex)); + + switch (entityType) + { + case UmbracoEntityTypes.Member: + return MemberFromSearchResults(pagedResult.ToArray()); + case UmbracoEntityTypes.Media: + return MediaFromSearchResults(pagedResult); + case UmbracoEntityTypes.Document: + return ContentFromSearchResults(umbracoHelper, pagedResult); + default: + throw new NotSupportedException("The " + typeof(UmbracoTreeSearcher) + " currently does not support searching against object type " + entityType); + } + } + + private void AppendPath(StringBuilder sb, UmbracoObjectTypes objectType, int[] startNodeIds, string searchFrom, IEntityService entityService) + { + if (sb == null) throw new ArgumentNullException("sb"); + if (entityService == null) throw new ArgumentNullException("entityService"); + + int searchFromId; + var entityPath = int.TryParse(searchFrom, out searchFromId) && searchFromId > 0 + ? entityService.GetAllPaths(objectType, searchFromId).FirstOrDefault() + : null; + if (entityPath != null) + { + // find... only what's underneath + sb.Append("+__Path:"); + AppendPath(sb, entityPath.Path, false); + sb.Append(" "); + } + else if (startNodeIds.Length == 0) + { + // make sure we don't find anything + sb.Append("+__Path:none "); + } + else if (startNodeIds.Contains(-1) == false) // -1 = no restriction + { + var entityPaths = entityService.GetAllPaths(objectType, startNodeIds); + + // for each start node, find the start node, and what's underneath + // +__Path:(-1*,1234 -1*,1234,* -1*,5678 -1*,5678,* ...) + sb.Append("+__Path:("); + var first = true; + foreach (var ep in entityPaths) + { + if (first) + first = false; + else + sb.Append(" "); + AppendPath(sb, ep.Path, true); + } + sb.Append(") "); + } + } + + private void AppendPath(StringBuilder sb, string path, bool includeThisNode) + { + path = path.Replace("-", "\\-").Replace(",", "\\,"); + if (includeThisNode) + { + sb.Append(path); + sb.Append(" "); + } + sb.Append(path); + sb.Append("\\,*"); + } + + /// + /// Returns a collection of entities for media based on search results + /// + /// + /// + private IEnumerable MemberFromSearchResults(SearchResult[] results) + { + var mapped = Mapper.Map>(results).ToArray(); + //add additional data + foreach (var m in mapped) + { + //if no icon could be mapped, it will be set to document, so change it to picture + if (m.Icon == "icon-document") + { + m.Icon = "icon-user"; + } + + var searchResult = results.First(x => x.Id.ToInvariantString() == m.Id.ToString()); + if (searchResult.Fields.ContainsKey("email") && searchResult.Fields["email"] != null) + { + m.AdditionalData["Email"] = results.First(x => x.Id.ToInvariantString() == m.Id.ToString()).Fields["email"]; + } + if (searchResult.Fields.ContainsKey("__key") && searchResult.Fields["__key"] != null) + { + Guid key; + if (Guid.TryParse(searchResult.Fields["__key"], out key)) + { + m.Key = key; + } + } + } + return mapped; + } + + /// + /// Returns a collection of entities for media based on search results + /// + /// + /// + private IEnumerable MediaFromSearchResults(IEnumerable results) + { + var mapped = Mapper.Map>(results).ToArray(); + //add additional data + foreach (var m in mapped) + { + //if no icon could be mapped, it will be set to document, so change it to picture + if (m.Icon == "icon-document") + { + m.Icon = "icon-picture"; + } + } + return mapped; + } + + /// + /// Returns a collection of entities for content based on search results + /// + /// + /// + /// + private IEnumerable ContentFromSearchResults(UmbracoHelper umbracoHelper, IEnumerable results) + { + var mapped = Mapper.Map>(results).ToArray(); + //add additional data + foreach (var m in mapped) + { + var intId = m.Id.TryConvertTo(); + if (intId.Success) + { + m.AdditionalData["Url"] = umbracoHelper.NiceUrl(intId.Result); + } + } + return mapped; + } + + } +} \ No newline at end of file diff --git a/src/Umbraco.Web/Security/Identity/AppBuilderExtensions.cs b/src/Umbraco.Web/Security/Identity/AppBuilderExtensions.cs index 7e4c9c45aa..69c926db3e 100644 --- a/src/Umbraco.Web/Security/Identity/AppBuilderExtensions.cs +++ b/src/Umbraco.Web/Security/Identity/AppBuilderExtensions.cs @@ -88,6 +88,7 @@ namespace Umbraco.Web.Security.Identity (options, owinContext) => BackOfficeUserManager.Create( options, appContext.Services.UserService, + appContext.Services.EntityService, appContext.Services.ExternalLoginService, userMembershipProvider)); diff --git a/src/Umbraco.Web/Security/Identity/BackOfficeCookieManager.cs b/src/Umbraco.Web/Security/Identity/BackOfficeCookieManager.cs index 07f4a3317f..2f067212f3 100644 --- a/src/Umbraco.Web/Security/Identity/BackOfficeCookieManager.cs +++ b/src/Umbraco.Web/Security/Identity/BackOfficeCookieManager.cs @@ -96,8 +96,8 @@ namespace Umbraco.Web.Security.Identity if (request.Uri.AbsolutePath.InvariantEquals(_getRemainingSecondsPath)) return false; if (//check the explicit flag - (checkForceAuthTokens && ctx.Get("umbraco-force-auth") != null) - || (checkForceAuthTokens && httpCtx.Success && httpCtx.Result.Items["umbraco-force-auth"] != null) + (checkForceAuthTokens && ctx.Get(Constants.Security.ForceReAuthFlag) != null) + || (checkForceAuthTokens && httpCtx.Success && httpCtx.Result.Items[Constants.Security.ForceReAuthFlag] != null) //check back office || request.Uri.IsBackOfficeRequest(HttpRuntime.AppDomainAppVirtualPath) //check installer diff --git a/src/Umbraco.Web/Security/Identity/ExternalSignInAutoLinkOptions.cs b/src/Umbraco.Web/Security/Identity/ExternalSignInAutoLinkOptions.cs index 3f8a1480a4..ab4f9482ad 100644 --- a/src/Umbraco.Web/Security/Identity/ExternalSignInAutoLinkOptions.cs +++ b/src/Umbraco.Web/Security/Identity/ExternalSignInAutoLinkOptions.cs @@ -1,4 +1,5 @@ using System; +using System.ComponentModel; using Microsoft.AspNet.Identity.Owin; using Microsoft.Owin; using Umbraco.Core; @@ -12,6 +13,8 @@ namespace Umbraco.Web.Security.Identity /// public class ExternalSignInAutoLinkOptions { + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("Use the overload specifying user groups instead and defaultAllowedSections now serves no purpose")] public ExternalSignInAutoLinkOptions( bool autoLinkExternalAccount = false, string defaultUserType = "editor", @@ -20,35 +23,57 @@ namespace Umbraco.Web.Security.Identity { Mandate.ParameterNotNullOrEmpty(defaultUserType, "defaultUserType"); - _defaultUserType = defaultUserType; - _defaultAllowedSections = defaultAllowedSections ?? new[] { "content", "media" }; + _defaultUserGroups = new[] {defaultUserType}; _autoLinkExternalAccount = autoLinkExternalAccount; _defaultCulture = defaultCulture ?? GlobalSettings.DefaultUILanguage; } - private readonly string _defaultUserType; + /// + /// Creates a new instance + /// + /// + /// If null, the default will be the 'editor' group + /// + public ExternalSignInAutoLinkOptions( + bool autoLinkExternalAccount = false, + string[] defaultUserGroups = null, + string defaultCulture = null) + { + _defaultUserGroups = defaultUserGroups ?? new[] { "editor" }; + _autoLinkExternalAccount = autoLinkExternalAccount; + _defaultCulture = defaultCulture ?? GlobalSettings.DefaultUILanguage; + } + + private readonly string[] _defaultUserGroups; /// /// A callback executed during account auto-linking and before the user is persisted /// public Action OnAutoLinking { get; set; } - /// - /// The default User Type alias to use for auto-linking users - /// + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("Use the overload specifying user groups instead")] public string GetDefaultUserType(UmbracoContext umbracoContext, ExternalLoginInfo loginInfo) { - return _defaultUserType; + return _defaultUserGroups.Length == 0 ? "editor" : _defaultUserGroups[0]; } - private readonly string[] _defaultAllowedSections; - /// - /// The default allowed sections to use for auto-linking users + /// The default User group aliases to use for auto-linking users /// + /// + /// + /// + public string[] GetDefaultUserGroups(UmbracoContext umbracoContext, ExternalLoginInfo loginInfo) + { + return _defaultUserGroups; + } + + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("The default sections are based on the default user group, this is no longer used")] public string[] GetDefaultAllowedSections(UmbracoContext umbracoContext, ExternalLoginInfo loginInfo) { - return _defaultAllowedSections; + return new string[0]; } private readonly bool _autoLinkExternalAccount; diff --git a/src/Umbraco.Web/Security/Identity/ForceRenewalCookieAuthenticationHandler.cs b/src/Umbraco.Web/Security/Identity/ForceRenewalCookieAuthenticationHandler.cs index c7030b2558..1bf5663884 100644 --- a/src/Umbraco.Web/Security/Identity/ForceRenewalCookieAuthenticationHandler.cs +++ b/src/Umbraco.Web/Security/Identity/ForceRenewalCookieAuthenticationHandler.cs @@ -71,7 +71,7 @@ namespace Umbraco.Web.Security.Identity var httpCtx = Context.TryGetHttpContext(); //check for the special flag in either the owin or http context - var shouldRenew = Context.Get("umbraco-force-auth") != null || (httpCtx.Success && httpCtx.Result.Items["umbraco-force-auth"] != null); + var shouldRenew = Context.Get(Constants.Security.ForceReAuthFlag) != null || (httpCtx.Success && httpCtx.Result.Items[Constants.Security.ForceReAuthFlag] != null); if (shouldRenew) { diff --git a/src/Umbraco.Web/Security/Identity/FormsAuthenticationSecureDataFormat.cs b/src/Umbraco.Web/Security/Identity/FormsAuthenticationSecureDataFormat.cs index 77e0fe9faf..ef858e5264 100644 --- a/src/Umbraco.Web/Security/Identity/FormsAuthenticationSecureDataFormat.cs +++ b/src/Umbraco.Web/Security/Identity/FormsAuthenticationSecureDataFormat.cs @@ -63,7 +63,18 @@ namespace Umbraco.Web.Security.Identity return null; } - var identity = new UmbracoBackOfficeIdentity(decrypt); + UmbracoBackOfficeIdentity identity; + + try + { + identity = new UmbracoBackOfficeIdentity(decrypt); + } + catch (Exception) + { + //if it cannot be created return null, will be due to serialization errors in user data most likely due to corrupt cookies or cookies + //for previous versions of Umbraco + return null; + } var ticket = new AuthenticationTicket(identity, new AuthenticationProperties { diff --git a/src/Umbraco.Web/Security/MembershipHelper.cs b/src/Umbraco.Web/Security/MembershipHelper.cs index 605b5137d8..43d3c55c65 100644 --- a/src/Umbraco.Web/Security/MembershipHelper.cs +++ b/src/Umbraco.Web/Security/MembershipHelper.cs @@ -13,6 +13,7 @@ using Umbraco.Core.Security; using Umbraco.Web.Models; using Umbraco.Web.PublishedCache; using Umbraco.Core.Cache; +using Umbraco.Web.Editors; using Umbraco.Web.Security.Providers; using MPE = global::Umbraco.Core.Security.MembershipProviderExtensions; @@ -655,128 +656,8 @@ namespace Umbraco.Web.Security /// public virtual Attempt ChangePassword(string username, ChangingPasswordModel passwordModel, MembershipProvider membershipProvider) { - // YES! It is completely insane how many options you have to take into account based on the membership provider. yikes! - - if (passwordModel == null) throw new ArgumentNullException("passwordModel"); - if (membershipProvider == null) throw new ArgumentNullException("membershipProvider"); - - //Are we resetting the password?? - if (passwordModel.Reset.HasValue && passwordModel.Reset.Value) - { - var canReset = membershipProvider.CanResetPassword(_applicationContext.Services.UserService); - if (canReset == false) - { - return Attempt.Fail(new PasswordChangedModel { ChangeError = new ValidationResult("Password reset is not enabled", new[] { "resetPassword" }) }); - } - if (membershipProvider.RequiresQuestionAndAnswer && passwordModel.Answer.IsNullOrWhiteSpace()) - { - return Attempt.Fail(new PasswordChangedModel { ChangeError = new ValidationResult("Password reset requires a password answer", new[] { "resetPassword" }) }); - } - //ok, we should be able to reset it - try - { - var newPass = membershipProvider.ResetPassword( - username, - membershipProvider.RequiresQuestionAndAnswer ? passwordModel.Answer : null); - - //return the generated pword - return Attempt.Succeed(new PasswordChangedModel { ResetPassword = newPass }); - } - catch (Exception ex) - { - LogHelper.WarnWithException("Could not reset member password", ex); - return Attempt.Fail(new PasswordChangedModel { ChangeError = new ValidationResult("Could not reset password, error: " + ex.Message + " (see log for full details)", new[] { "resetPassword" }) }); - } - } - - //we're not resetting it so we need to try to change it. - - if (passwordModel.NewPassword.IsNullOrWhiteSpace()) - { - return Attempt.Fail(new PasswordChangedModel { ChangeError = new ValidationResult("Cannot set an empty password", new[] { "value" }) }); - } - - //This is an edge case and is only necessary for backwards compatibility: - var umbracoBaseProvider = membershipProvider as MembershipProviderBase; - if (umbracoBaseProvider != null && umbracoBaseProvider.AllowManuallyChangingPassword) - { - //this provider allows manually changing the password without the old password, so we can just do it - try - { - var result = umbracoBaseProvider.ChangePassword(username, "", passwordModel.NewPassword); - return result == false - ? Attempt.Fail(new PasswordChangedModel { ChangeError = new ValidationResult("Could not change password, invalid username or password", new[] { "value" }) }) - : Attempt.Succeed(new PasswordChangedModel()); - } - catch (Exception ex) - { - LogHelper.WarnWithException("Could not change member password", ex); - return Attempt.Fail(new PasswordChangedModel { ChangeError = new ValidationResult("Could not change password, error: " + ex.Message + " (see log for full details)", new[] { "value" }) }); - } - } - - //The provider does not support manually chaning the password but no old password supplied - need to return an error - if (passwordModel.OldPassword.IsNullOrWhiteSpace() && membershipProvider.EnablePasswordRetrieval == false) - { - //if password retrieval is not enabled but there is no old password we cannot continue - return Attempt.Fail(new PasswordChangedModel { ChangeError = new ValidationResult("Password cannot be changed without the old password", new[] { "value" }) }); - } - - if (passwordModel.OldPassword.IsNullOrWhiteSpace() == false) - { - //if an old password is suplied try to change it - - try - { - var result = membershipProvider.ChangePassword(username, passwordModel.OldPassword, passwordModel.NewPassword); - return result == false - ? Attempt.Fail(new PasswordChangedModel { ChangeError = new ValidationResult("Could not change password, invalid username or password", new[] { "value" }) }) - : Attempt.Succeed(new PasswordChangedModel()); - } - catch (Exception ex) - { - LogHelper.WarnWithException("Could not change member password", ex); - return Attempt.Fail(new PasswordChangedModel { ChangeError = new ValidationResult("Could not change password, error: " + ex.Message + " (see log for full details)", new[] { "value" }) }); - } - } - - if (membershipProvider.EnablePasswordRetrieval == false) - { - //we cannot continue if we cannot get the current password - return Attempt.Fail(new PasswordChangedModel { ChangeError = new ValidationResult("Password cannot be changed without the old password", new[] { "value" }) }); - } - if (membershipProvider.RequiresQuestionAndAnswer && passwordModel.Answer.IsNullOrWhiteSpace()) - { - //if the question answer is required but there isn't one, we cannot continue - return Attempt.Fail(new PasswordChangedModel { ChangeError = new ValidationResult("Password cannot be changed without the password answer", new[] { "value" }) }); - } - - //lets try to get the old one so we can change it - try - { - var oldPassword = membershipProvider.GetPassword( - username, - membershipProvider.RequiresQuestionAndAnswer ? passwordModel.Answer : null); - - try - { - var result = membershipProvider.ChangePassword(username, oldPassword, passwordModel.NewPassword); - return result == false - ? Attempt.Fail(new PasswordChangedModel { ChangeError = new ValidationResult("Could not change password", new[] { "value" }) }) - : Attempt.Succeed(new PasswordChangedModel()); - } - catch (Exception ex1) - { - LogHelper.WarnWithException("Could not change member password", ex1); - return Attempt.Fail(new PasswordChangedModel { ChangeError = new ValidationResult("Could not change password, error: " + ex1.Message + " (see log for full details)", new[] { "value" }) }); - } - - } - catch (Exception ex2) - { - LogHelper.WarnWithException("Could not retrieve member password", ex2); - return Attempt.Fail(new PasswordChangedModel { ChangeError = new ValidationResult("Could not change password, error: " + ex2.Message + " (see log for full details)", new[] { "value" }) }); - } + var passwordChanger = new PasswordChanger(_applicationContext.ProfilingLogger.Logger, _applicationContext.Services.UserService); + return passwordChanger.ChangePasswordWithMembershipProvider(username, passwordModel, membershipProvider); } /// diff --git a/src/Umbraco.Web/Security/Providers/MembersMembershipProvider.cs b/src/Umbraco.Web/Security/Providers/MembersMembershipProvider.cs index 4576b36da9..667c448394 100644 --- a/src/Umbraco.Web/Security/Providers/MembersMembershipProvider.cs +++ b/src/Umbraco.Web/Security/Providers/MembersMembershipProvider.cs @@ -74,7 +74,7 @@ namespace Umbraco.Web.Security.Providers _defaultMemberTypeAlias = config["defaultMemberTypeAlias"]; if (_defaultMemberTypeAlias.IsNullOrWhiteSpace()) { - throw new ProviderException("No default user type alias is specified in the web.config string. Please add a 'defaultUserTypeAlias' to the add element in the provider declaration in web.config"); + throw new ProviderException("No default member type alias is specified in the web.config string. Please add a 'defaultUserTypeAlias' to the add element in the provider declaration in web.config"); } _hasDefaultMember = true; } @@ -102,7 +102,7 @@ namespace Umbraco.Web.Security.Providers _defaultMemberTypeAlias = MemberService.GetDefaultMemberType(); if (_defaultMemberTypeAlias.IsNullOrWhiteSpace()) { - throw new ProviderException("No default user type alias is specified in the web.config string. Please add a 'defaultUserTypeAlias' to the add element in the provider declaration in web.config"); + throw new ProviderException("No default member type alias is specified in the web.config string. Please add a 'defaultUserTypeAlias' to the add element in the provider declaration in web.config"); } _hasDefaultMember = true; } diff --git a/src/Umbraco.Web/Security/Providers/UmbracoMembershipProvider.cs b/src/Umbraco.Web/Security/Providers/UmbracoMembershipProvider.cs index 8482eb72a2..5f2ee3a1bd 100644 --- a/src/Umbraco.Web/Security/Providers/UmbracoMembershipProvider.cs +++ b/src/Umbraco.Web/Security/Providers/UmbracoMembershipProvider.cs @@ -166,11 +166,11 @@ namespace Umbraco.Web.Security.Providers username, email, FormatPasswordForStorage(encodedPassword, salt), - memberTypeAlias); + memberTypeAlias, + isApproved); member.PasswordQuestion = passwordQuestion; member.RawPasswordAnswerValue = EncryptString(passwordAnswer); - member.IsApproved = isApproved; member.LastLoginDate = DateTime.Now; member.LastPasswordChangeDate = DateTime.Now; @@ -410,7 +410,6 @@ namespace Umbraco.Web.Security.Providers //if (answer == null && RequiresQuestionAndAnswer) //{ // UpdateFailureCount(username, "passwordAnswer"); - // throw new ProviderException("Password answer required for password reset."); //} diff --git a/src/Umbraco.Web/Security/Providers/UsersMembershipProvider.cs b/src/Umbraco.Web/Security/Providers/UsersMembershipProvider.cs index 267bc0b433..7034101a83 100644 --- a/src/Umbraco.Web/Security/Providers/UsersMembershipProvider.cs +++ b/src/Umbraco.Web/Security/Providers/UsersMembershipProvider.cs @@ -47,14 +47,23 @@ namespace Umbraco.Web.Security.Providers base.Initialize(name, config); // test for membertype (if not specified, choose the first member type available) + // We'll support both names for legacy reasons: defaultUserTypeAlias & defaultUserGroupAlias + if (config["defaultUserTypeAlias"] != null) { - _defaultMemberTypeAlias = config["defaultUserTypeAlias"]; - if (_defaultMemberTypeAlias.IsNullOrWhiteSpace()) + if (config["defaultUserTypeAlias"].IsNullOrWhiteSpace() == false) { - throw new ProviderException("No default user type alias is specified in the web.config string. Please add a 'defaultUserTypeAlias' to the add element in the provider declaration in web.config"); + _defaultMemberTypeAlias = config["defaultUserTypeAlias"]; + _hasDefaultMember = true; + } + } + if (_hasDefaultMember == false && config["defaultUserGroupAlias"] != null) + { + if (config["defaultUserGroupAlias"].IsNullOrWhiteSpace() == false) + { + _defaultMemberTypeAlias = config["defaultUserGroupAlias"]; + _hasDefaultMember = true; } - _hasDefaultMember = true; } } @@ -71,7 +80,7 @@ namespace Umbraco.Web.Security.Providers _defaultMemberTypeAlias = MemberService.GetDefaultMemberType(); if (_defaultMemberTypeAlias.IsNullOrWhiteSpace()) { - throw new ProviderException("No default user type alias is specified in the web.config string. Please add a 'defaultUserTypeAlias' to the add element in the provider declaration in web.config"); + throw new ProviderException("No default user group alias is specified in the web.config string. Please add a 'defaultUserTypeAlias' to the add element in the provider declaration in web.config"); } _hasDefaultMember = true; } diff --git a/src/Umbraco.Web/Security/ValidateRequestAttempt.cs b/src/Umbraco.Web/Security/ValidateRequestAttempt.cs index 62fd68a2ef..fdd894aa60 100644 --- a/src/Umbraco.Web/Security/ValidateRequestAttempt.cs +++ b/src/Umbraco.Web/Security/ValidateRequestAttempt.cs @@ -1,13 +1,14 @@ namespace Umbraco.Web.Security { - internal enum ValidateRequestAttempt + public enum ValidateRequestAttempt { - Success, - FailedNoPrivileges, + Success = 0, + + FailedNoPrivileges = 100, //FailedTimedOut, - FailedNoContextId, - FailedNoSsl + FailedNoContextId = 101, + FailedNoSsl = 102 } } \ No newline at end of file diff --git a/src/Umbraco.Web/Security/WebSecurity.cs b/src/Umbraco.Web/Security/WebSecurity.cs index cda9f04fad..2960fa0814 100644 --- a/src/Umbraco.Web/Security/WebSecurity.cs +++ b/src/Umbraco.Web/Security/WebSecurity.cs @@ -30,7 +30,7 @@ namespace Umbraco.Web.Security public WebSecurity(HttpContextBase httpContext, ApplicationContext applicationContext) { _httpContext = httpContext; - _applicationContext = applicationContext; + _applicationContext = applicationContext; } /// @@ -66,7 +66,7 @@ namespace Umbraco.Web.Security { get { - //only load it once per instance! + //only load it once per instance! (but make sure groups are loaded) if (_currentUser == null) { var id = GetUserId(); @@ -170,112 +170,24 @@ namespace Umbraco.Web.Security /// /// /// + /// + /// This uses ASP.NET Identity to perform the validation + /// public virtual bool ValidateBackOfficeCredentials(string username, string password) - { - var membershipProvider = Core.Security.MembershipProviderExtensions.GetUsersMembershipProvider(); - return membershipProvider != null && membershipProvider.ValidateUser(username, password); + { + //find the user by username + var user = UserManager.FindByNameAsync(username).Result; + return user != null && UserManager.CheckPasswordAsync(user, password).Result; } - - /// - /// Returns the MembershipUser from the back office membership provider - /// - /// - /// - /// + + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("Back office users shouldn't be resolved from the membership provider, they should be resolved usign the BackOfficeUserManager or the IUserService")] public virtual MembershipUser GetBackOfficeMembershipUser(string username, bool setOnline) { var membershipProvider = Core.Security.MembershipProviderExtensions.GetUsersMembershipProvider(); return membershipProvider != null ? membershipProvider.GetUser(username, setOnline) : null; } - /// - /// Gets (and creates if not found) the back office instance for the username specified - /// - /// - /// - /// - /// This will return an instance no matter what membership provider is installed for the back office, it will automatically - /// create any missing accounts if one is not found and a custom membership provider or is being used. - /// - internal IUser GetBackOfficeUser(string username) - { - //get the membership user (set user to be 'online' in the provider too) - var membershipUser = GetBackOfficeMembershipUser(username, true); - var provider = Core.Security.MembershipProviderExtensions.GetUsersMembershipProvider(); - - if (membershipUser == null) - { - throw new InvalidOperationException( - "The username & password validated but the membership provider '" + - provider.Name + - "' did not return a MembershipUser with the username supplied"); - } - - //regarldess of the membership provider used, see if this user object already exists in the umbraco data - var user = _applicationContext.Services.UserService.GetByUsername(membershipUser.UserName); - - //we're using the built-in membership provider so the user will already be available - if (provider.IsUmbracoUsersProvider()) - { - if (user == null) - { - //this should never happen - throw new InvalidOperationException("The user '" + username + "' could not be found in the Umbraco database"); - } - return user; - } - - //we are using a custom membership provider for the back office, in this case we need to create user accounts for the logged in member. - //if we already have a user object in Umbraco we don't need to do anything, otherwise we need to create a mapped Umbraco account. - if (user != null) return user; - - //we need to create an Umbraco IUser of a 'writer' type with access to only content - this was how v6 operates. - var writer = _applicationContext.Services.UserService.GetUserTypeByAlias("writer"); - - var email = membershipUser.Email; - if (email.IsNullOrWhiteSpace()) - { - //in some cases if there is no email we have to generate one since it is required! - email = Guid.NewGuid().ToString("N") + "@example.com"; - } - - user = new Core.Models.Membership.User(writer) - { - Email = email, - Language = GlobalSettings.DefaultUILanguage, - Name = membershipUser.UserName, - RawPasswordValue = Guid.NewGuid().ToString("N"), //Need to set this to something - will not be used though - Username = membershipUser.UserName, - StartContentId = -1, - StartMediaId = -1, - IsLockedOut = false, - IsApproved = true - }; - user.AddAllowedSection("content"); - - _applicationContext.Services.UserService.Save(user); - - return user; - } - - /// - /// Validates the user node tree permissions. - /// - /// - /// The path. - /// The action. - /// - internal bool ValidateUserNodeTreePermissions(User umbracoUser, string path, string action) - { - var permissions = umbracoUser.GetPermissions(path); - if (permissions.IndexOf(action, StringComparison.Ordinal) > -1 && (path.Contains("-20") || ("," + path + ",").Contains("," + umbracoUser.StartNodeId + ","))) - return true; - - var user = umbracoUser; - LogHelper.Info("User {0} has insufficient permissions in UmbracoEnsuredPage: '{1}', '{2}', '{3}'", () => user.Name, () => path, () => permissions, () => action); - return false; - } - /// /// Validates the current user to see if they have access to the specified app /// @@ -343,16 +255,16 @@ namespace Umbraco.Web.Security /// public virtual bool ValidateCurrentUser() { - var result = ValidateCurrentUser(false); - return result == ValidateRequestAttempt.Success; - } + return ValidateCurrentUser(false, true) == ValidateRequestAttempt.Success; + } /// /// Validates the current user assigned to the request and ensures the stored user data is valid /// /// set to true if you want exceptions to be thrown if failed + /// If true requires that the user is approved to be validated /// - internal ValidateRequestAttempt ValidateCurrentUser(bool throwExceptions) + public virtual ValidateRequestAttempt ValidateCurrentUser(bool throwExceptions, bool requiresApproval = true) { //This will first check if the current user is already authenticated - which should be the case in nearly all circumstances // since the authentication happens in the Module, that authentication also checks the ticket expiry. We don't @@ -368,7 +280,7 @@ namespace Umbraco.Web.Security var user = CurrentUser; // Check for console access - if (user == null || user.IsApproved == false || (user.IsLockedOut && GlobalSettings.RequestIsInUmbracoApplication(_httpContext))) + if (user == null || (requiresApproval && user.IsApproved == false) || (user.IsLockedOut && GlobalSettings.RequestIsInUmbracoApplication(_httpContext))) { if (throwExceptions) throw new ArgumentException("You have no priviledges to the umbraco console. Please contact your administrator"); return ValidateRequestAttempt.FailedNoPrivileges; @@ -399,7 +311,7 @@ namespace Umbraco.Web.Security /// /// /// - internal bool UserHasAppAccess(string app, IUser user) + internal virtual bool UserHasAppAccess(string app, IUser user) { var apps = user.AllowedSections; return apps.Any(uApp => uApp.InvariantEquals(app)); diff --git a/src/Umbraco.Web/Trees/ApplicationTreeController.cs b/src/Umbraco.Web/Trees/ApplicationTreeController.cs index f6b5e82fc3..c66cb1d22c 100644 --- a/src/Umbraco.Web/Trees/ApplicationTreeController.cs +++ b/src/Umbraco.Web/Trees/ApplicationTreeController.cs @@ -42,7 +42,7 @@ namespace Umbraco.Web.Trees //find all tree definitions that have the current application alias var appTrees = ApplicationContext.Current.Services.ApplicationTreeService.GetApplicationTrees(application, onlyInitialized).ToArray(); - if (appTrees.Count() == 1 || string.IsNullOrEmpty(tree) == false ) + if (string.IsNullOrEmpty(tree) == false || appTrees.Length == 1) { var apptree = string.IsNullOrEmpty(tree) == false ? appTrees.SingleOrDefault(x => x.Alias == tree) @@ -56,10 +56,11 @@ namespace Umbraco.Web.Trees queryStrings, application); - return result; + //this will be null if it cannot convert to ta single root section + if (result != null) + return result; } - var collection = new TreeNodeCollection(); foreach (var apptree in appTrees) { @@ -107,6 +108,7 @@ namespace Umbraco.Web.Trees /// /// /// + /// /// private async Task GetRootForSingleAppTree(ApplicationTree configTree, string id, FormDataCollection queryStrings, string application) { @@ -122,6 +124,16 @@ namespace Umbraco.Web.Trees throw new InvalidOperationException("Could not create root node for tree " + configTree.Alias); } + //if the root node has a route path, we cannot create a single root section because by specifying the route path this would + //override the dashboard route and that means there can be no dashboard for that section which is a breaking change. + if (rootNode.Result.RoutePath.IsNullOrWhiteSpace() == false + && rootNode.Result.RoutePath != "#" + && rootNode.Result.RoutePath != application) + { + //null indicates this cannot be converted + return null; + } + var sectionRoot = SectionRootNode.CreateSingleTreeSectionRoot( rootId, rootNode.Result.ChildNodesUrl, @@ -129,6 +141,10 @@ namespace Umbraco.Web.Trees rootNode.Result.Name, byControllerAttempt.Result); + //This can't be done currently because the root will default to routing to a dashboard and if we disable dashboards for a section + //that is really considered a breaking change. See above. + //sectionRoot.RoutePath = rootNode.Result.RoutePath; + foreach (var d in rootNode.Result.AdditionalData) { sectionRoot.AdditionalData[d.Key] = d.Value; diff --git a/src/Umbraco.Web/Trees/ApplicationTreeExtensions.cs b/src/Umbraco.Web/Trees/ApplicationTreeExtensions.cs index 4ab3c12a51..13e4885efd 100644 --- a/src/Umbraco.Web/Trees/ApplicationTreeExtensions.cs +++ b/src/Umbraco.Web/Trees/ApplicationTreeExtensions.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Globalization; using System.Linq; @@ -18,6 +19,7 @@ using Umbraco.Web.Mvc; using Umbraco.Web.WebApi; using umbraco.BusinessLogic; using umbraco.cms.presentation.Trees; +using Umbraco.Core.Services; using ApplicationTree = Umbraco.Core.Models.ApplicationTree; using IAuthorizationFilter = System.Web.Http.Filters.IAuthorizationFilter; using UrlHelper = System.Web.Http.Routing.UrlHelper; @@ -26,6 +28,48 @@ namespace Umbraco.Web.Trees { internal static class ApplicationTreeExtensions { + + private static readonly ConcurrentDictionary TreeAttributeCache = new ConcurrentDictionary(); + + internal static TreeAttribute GetTreeAttribute(this Type treeControllerType) + { + return TreeAttributeCache.GetOrAdd(treeControllerType, type => + { + //Locate the tree attribute + var treeAttributes = type + .GetCustomAttributes(false) + .ToArray(); + + if (treeAttributes.Length == 0) + { + throw new InvalidOperationException("The Tree controller is missing the " + typeof(TreeAttribute).FullName + " attribute"); + } + + //assign the properties of this object to those of the metadata attribute + return treeAttributes[0]; + }); + } + + internal static TreeAttribute GetTreeAttribute(this ApplicationTree tree) + { + return tree.GetRuntimeType().GetTreeAttribute(); + } + + internal static string GetRootNodeDisplayName(this TreeAttribute attribute, ILocalizedTextService textService) + { + //if title is defined, return that + if (string.IsNullOrEmpty(attribute.Title) == false) + return attribute.Title; + + + //try to look up a tree header matching the tree alias + var localizedLabel = textService.Localize("treeHeaders/" + attribute.Alias); + if (string.IsNullOrEmpty(localizedLabel) == false) + return localizedLabel; + + //is returned to signal that a label was not found + return "[" + attribute.Alias + "]"; + } internal static Attempt TryGetControllerTree(this ApplicationTree appTree) { diff --git a/src/Umbraco.Web/Trees/ContentBlueprintTreeController.cs b/src/Umbraco.Web/Trees/ContentBlueprintTreeController.cs index ff029a020a..43c7dcce4b 100644 --- a/src/Umbraco.Web/Trees/ContentBlueprintTreeController.cs +++ b/src/Umbraco.Web/Trees/ContentBlueprintTreeController.cs @@ -32,6 +32,16 @@ namespace Umbraco.Web.Trees [CoreTree] public class ContentBlueprintTreeController : TreeController { + + protected override TreeNode CreateRootNode(FormDataCollection queryStrings) + { + var root = base.CreateRootNode(queryStrings); + + //this will load in a custom UI instead of the dashboard for the root node + root.RoutePath = string.Format("{0}/{1}/{2}", Constants.Applications.Settings, Constants.Trees.ContentBlueprints, "intro"); + + return root; + } protected override TreeNodeCollection GetTreeNodes(string id, FormDataCollection queryStrings) { var nodes = new TreeNodeCollection(); @@ -45,9 +55,12 @@ namespace Umbraco.Web.Trees //get all blueprint content types var contentTypeAliases = entities.Select(x => ((UmbracoEntity) x).ContentTypeAlias).Distinct(); //get the ids - var contentTypeIds = Services.ContentTypeService.GetAllContentTypeIds(contentTypeAliases.ToArray()); + var contentTypeIds = Services.ContentTypeService.GetAllContentTypeIds(contentTypeAliases.ToArray()).ToArray(); + //now get the entities ... it's a bit round about but still smaller queries than getting all document types - var docTypeEntities = Services.EntityService.GetAll(UmbracoObjectTypes.DocumentType, contentTypeIds.ToArray()).ToArray(); + var docTypeEntities = contentTypeIds.Length == 0 + ? new IUmbracoEntity[0] + : Services.EntityService.GetAll(UmbracoObjectTypes.DocumentType, contentTypeIds).ToArray(); nodes.AddRange(docTypeEntities .Select(entity => diff --git a/src/Umbraco.Web/Trees/ContentTreeController.cs b/src/Umbraco.Web/Trees/ContentTreeController.cs index 320b9d5a48..9b3a6e82f8 100644 --- a/src/Umbraco.Web/Trees/ContentTreeController.cs +++ b/src/Umbraco.Web/Trees/ContentTreeController.cs @@ -19,6 +19,8 @@ using umbraco.businesslogic; using umbraco.businesslogic.Actions; using umbraco.cms.businesslogic.web; using umbraco.interfaces; +using Umbraco.Web.Models.ContentEditing; +using Umbraco.Web.Search; using Constants = Umbraco.Core.Constants; namespace Umbraco.Web.Trees @@ -26,8 +28,8 @@ namespace Umbraco.Web.Trees //We will not allow the tree to render unless the user has access to any of the sections that the tree gets rendered // this is not ideal but until we change permissions to be tree based (not section) there's not much else we can do here. [UmbracoApplicationAuthorize( - Constants.Applications.Content, - Constants.Applications.Media, + Constants.Applications.Content, + Constants.Applications.Media, Constants.Applications.Users, Constants.Applications.Settings, Constants.Applications.Developer, @@ -36,14 +38,18 @@ namespace Umbraco.Web.Trees [Tree(Constants.Applications.Content, Constants.Trees.Content)] [PluginController("UmbracoTrees")] [CoreTree] - public class ContentTreeController : ContentTreeControllerBase + [SearchableTree("searchResultFormatter", "configureContentResult")] + public class ContentTreeController : ContentTreeControllerBase, ISearchableTree { - + + private readonly UmbracoTreeSearcher _treeSearcher = new UmbracoTreeSearcher(); + protected override TreeNode CreateRootNode(FormDataCollection queryStrings) { - var node = base.CreateRootNode(queryStrings); - //if the user's start node is not default, then ensure the root doesn't have a menu - if (Security.CurrentUser.StartContentId != Constants.System.Root) + var node = base.CreateRootNode(queryStrings); + + // if the user's start node is not default, then ensure the root doesn't have a menu + if (UserStartNodes.Contains(Constants.System.Root) == false) { node.MenuUrl = ""; } @@ -61,11 +67,12 @@ namespace Umbraco.Web.Trees get { return Services.ContentService.RecycleBinSmells(); } } - protected override int UserStartNode + private int[] _userStartNodes; + protected override int[] UserStartNodes { - get { return Security.CurrentUser.StartContentId; } + get { return _userStartNodes ?? (_userStartNodes = Security.CurrentUser.CalculateContentStartNodeIds(Services.EntityService)); } } - + /// /// Creates a tree node for a content item based on an UmbracoEntity /// @@ -75,7 +82,7 @@ namespace Umbraco.Web.Trees /// protected override TreeNode GetSingleTreeNode(IUmbracoEntity e, string parentId, FormDataCollection queryStrings) { - var entity = (UmbracoEntity) e; + var entity = (UmbracoEntity)e; var allowedUserOptions = GetAllowedUserMenuItemsForNode(e); if (CanUserAccessNode(e, allowedUserOptions)) @@ -88,7 +95,7 @@ namespace Umbraco.Web.Trees entity, Constants.ObjectTypes.DocumentGuid, parentId, - queryStrings, + queryStrings, entity.HasChildren && (isContainer == false)); node.AdditionalData.Add("contentType", entity.ContentTypeAlias); @@ -98,7 +105,7 @@ namespace Umbraco.Web.Trees node.AdditionalData.Add("isContainer", true); node.SetContainerStyle(); } - + if (entity.IsPublished == false) node.SetNotPublishedStyle(); @@ -120,9 +127,9 @@ namespace Umbraco.Web.Trees if (id == Constants.System.Root.ToInvariantString()) { var menu = new MenuItemCollection(); - - //if the user's start node is not the root then ensure the root menu is empty/doesn't exist - if (Security.CurrentUser.StartContentId != Constants.System.Root) + + // if the user's start node is not the root then ensure the root menu is empty/doesn't exist + if (UserStartNodes.Contains(Constants.System.Root) == false) { return menu; } @@ -151,7 +158,7 @@ namespace Umbraco.Web.Trees // add default actions for *all* users menu.Items.Add(ui.Text("actions", ActionRePublish.Instance.Alias)).ConvertLegacyMenuItem(null, "content", "content"); menu.Items.Add(ui.Text("actions", ActionRefresh.Instance.Alias), true); - + return menu; } @@ -170,11 +177,11 @@ namespace Umbraco.Web.Trees var nodeMenu = GetAllNodeMenuItems(item); var allowedMenuItems = GetAllowedUserMenuItemsForNode(item); - + FilterUserAllowedMenuItems(nodeMenu, allowedMenuItems); //if the media item is in the recycle bin, don't have a default menu, just show the regular menu - if (item.Path.Split(new[] {','}, StringSplitOptions.RemoveEmptyEntries).Contains(RecycleBinId.ToInvariantString())) + if (item.Path.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries).Contains(RecycleBinId.ToInvariantString())) { nodeMenu.DefaultMenuAlias = null; nodeMenu.Items.Insert(2, new MenuItem(ActionRestore.Instance, ui.Text("actions", ActionRestore.Instance.Alias))); @@ -182,9 +189,9 @@ namespace Umbraco.Web.Trees else { //set the default to create - nodeMenu.DefaultMenuAlias = ActionNew.Instance.Alias; + nodeMenu.DefaultMenuAlias = ActionNew.Instance.Alias; } - + return nodeMenu; } @@ -213,7 +220,7 @@ namespace Umbraco.Web.Trees { return false; } - return Security.CurrentUser.HasPathAccess(content); + return Security.CurrentUser.HasPathAccess(content, Services.EntityService); } /// @@ -227,7 +234,7 @@ namespace Umbraco.Web.Trees menu.Items.Add(ui.Text("actions", ActionNew.Instance.Alias)); menu.Items.Add(ui.Text("actions", ActionDelete.Instance.Alias)); - menu.Items.Add(ui.Text("actions", ActionCreateBlueprintFromContent.Instance.Alias)); + menu.Items.Add(ui.Text("actions", ActionCreateBlueprintFromContent.Instance.Alias)); //need to ensure some of these are converted to the legacy system - until we upgrade them all to be angularized. menu.Items.Add(ui.Text("actions", ActionMove.Instance.Alias), true); @@ -241,9 +248,9 @@ namespace Umbraco.Web.Trees menu.Items.Add(ui.Text("actions", ActionPublish.Instance.Alias), true).ConvertLegacyMenuItem(item, "content", "content"); menu.Items.Add(ui.Text("actions", ActionToPublish.Instance.Alias)).ConvertLegacyMenuItem(item, "content", "content"); menu.Items.Add(ui.Text("actions", ActionAssignDomain.Instance.Alias)).ConvertLegacyMenuItem(item, "content", "content"); - menu.Items.Add(ui.Text("actions", ActionRights.Instance.Alias)).ConvertLegacyMenuItem(item, "content", "content"); + menu.Items.Add(ui.Text("actions", ActionRights.Instance.Alias), true); menu.Items.Add(ui.Text("actions", ActionProtect.Instance.Alias), true).ConvertLegacyMenuItem(item, "content", "content"); - + menu.Items.Add(ui.Text("actions", ActionNotify.Instance.Alias), true).ConvertLegacyMenuItem(item, "content", "content"); menu.Items.Add(ui.Text("actions", ActionSendToTranslate.Instance.Alias)).ConvertLegacyMenuItem(item, "content", "content"); @@ -252,5 +259,9 @@ namespace Umbraco.Web.Trees return menu; } + public IEnumerable Search(string query, int pageSize, long pageIndex, out long totalFound, string searchFrom = null) + { + return _treeSearcher.ExamineSearch(Umbraco, query, UmbracoEntityTypes.Document, pageSize, pageIndex, out totalFound, searchFrom); + } } } \ No newline at end of file diff --git a/src/Umbraco.Web/Trees/ContentTreeControllerBase.cs b/src/Umbraco.Web/Trees/ContentTreeControllerBase.cs index 97c5daed96..fa18e703bd 100644 --- a/src/Umbraco.Web/Trees/ContentTreeControllerBase.cs +++ b/src/Umbraco.Web/Trees/ContentTreeControllerBase.cs @@ -68,7 +68,7 @@ namespace Umbraco.Web.Trees /// /// Returns the user's start node for this tree /// - protected abstract int UserStartNode { get; } + protected abstract int[] UserStartNodes { get; } /// /// Gets the tree nodes for the given id @@ -105,7 +105,7 @@ namespace Umbraco.Web.Trees // Therefore, in the latter case, we want to change the id to -1 since we want to render the current user's root node // and the GetChildEntities method will take care of rendering the correct root node. // If it is in dialog mode, then we don't need to change anything and the children will just render as per normal. - if (IsDialog(queryStrings) == false && UserStartNode != Constants.System.Root) + if (IsDialog(queryStrings) == false && UserStartNodes.Contains(Constants.System.Root) == false) { id = Constants.System.Root.ToString(CultureInfo.InvariantCulture); } @@ -128,7 +128,6 @@ namespace Umbraco.Web.Trees // look up from GUID if it's not an integer if (int.TryParse(id, out iid) == false) { - var idEntity = GetEntityFromId(id); if (idEntity == null) { @@ -137,19 +136,13 @@ namespace Umbraco.Web.Trees iid = idEntity.Id; } - - //if a request is made for the root node data but the user's start node is not the default, then - // we need to return their start node data - if (iid == Constants.System.Root && UserStartNode != Constants.System.Root) + // if a request is made for the root node but user has no access to + // root node, return start nodes instead + if (iid == Constants.System.Root && UserStartNodes.Contains(Constants.System.Root) == false) { - //just return their single start node, it will show up under the 'Content' label - var startNode = Services.EntityService.Get(UserStartNode, UmbracoObjectType); - if (startNode != null) - return new[] { startNode }; - else - { - throw new EntityNotFoundException(UserStartNode, "User's start content node could not be found"); - } + return UserStartNodes.Length > 0 + ? Services.EntityService.GetAll(UmbracoObjectType, UserStartNodes) + : Enumerable.Empty(); } return Services.EntityService.GetChildren(iid, UmbracoObjectType).ToArray(); @@ -175,7 +168,7 @@ namespace Umbraco.Web.Trees protected sealed override TreeNodeCollection GetTreeNodes(string id, FormDataCollection queryStrings) { //check if we're rendering the root - if (id == Constants.System.Root.ToInvariantString() && UserStartNode == Constants.System.Root) + if (id == Constants.System.Root.ToInvariantString() && UserStartNodes.Contains(Constants.System.Root)) { var altStartId = string.Empty; diff --git a/src/Umbraco.Web/Trees/ContentTypeTreeController.cs b/src/Umbraco.Web/Trees/ContentTypeTreeController.cs index 6df71341cd..7f3a6dfddf 100644 --- a/src/Umbraco.Web/Trees/ContentTypeTreeController.cs +++ b/src/Umbraco.Web/Trees/ContentTypeTreeController.cs @@ -1,6 +1,8 @@ using System; +using System.Collections.Generic; using System.Linq; using System.Net.Http.Formatting; +using AutoMapper; using umbraco; using umbraco.BusinessLogic.Actions; using Umbraco.Core; @@ -9,6 +11,8 @@ using Umbraco.Core.Models; using Umbraco.Web.Models.Trees; using Umbraco.Web.WebApi.Filters; using Umbraco.Core.Services; +using Umbraco.Web.Models.ContentEditing; +using Umbraco.Web.Search; namespace Umbraco.Web.Trees { @@ -17,7 +21,7 @@ namespace Umbraco.Web.Trees [Mvc.PluginController("UmbracoTrees")] [CoreTree] [LegacyBaseTree(typeof(loadNodeTypes))] - public class ContentTypeTreeController : TreeController + public class ContentTypeTreeController : TreeController, ISearchableTree { protected override TreeNodeCollection GetTreeNodes(string id, FormDataCollection queryStrings) { @@ -137,5 +141,11 @@ namespace Umbraco.Web.Trees return menu; } + + public IEnumerable Search(string query, int pageSize, long pageIndex, out long totalFound, string searchFrom = null) + { + var results = Services.EntityService.GetPagedDescendantsFromRoot(UmbracoObjectTypes.DocumentType, pageIndex, pageSize, out totalFound, filter: query); + return Mapper.Map>(results); + } } } diff --git a/src/Umbraco.Web/Trees/DataTypeTreeController.cs b/src/Umbraco.Web/Trees/DataTypeTreeController.cs index 0baadaf6ca..b19d79c817 100644 --- a/src/Umbraco.Web/Trees/DataTypeTreeController.cs +++ b/src/Umbraco.Web/Trees/DataTypeTreeController.cs @@ -5,6 +5,7 @@ using System.Linq; using System.Net; using System.Net.Http.Formatting; using System.Web.Http; +using AutoMapper; using Umbraco.Core; using Umbraco.Core.Models; using Umbraco.Web.Models.Trees; @@ -14,6 +15,8 @@ using umbraco; using umbraco.BusinessLogic.Actions; using Umbraco.Core.Models.EntityBase; using Umbraco.Core.Services; +using Umbraco.Web.Models.ContentEditing; +using Umbraco.Web.Search; using Constants = Umbraco.Core.Constants; namespace Umbraco.Web.Trees @@ -22,7 +25,7 @@ namespace Umbraco.Web.Trees [Tree(Constants.Applications.Developer, Constants.Trees.DataTypes, null, sortOrder:1)] [PluginController("UmbracoTrees")] [CoreTree] - public class DataTypeTreeController : TreeController + public class DataTypeTreeController : TreeController, ISearchableTree { protected override TreeNodeCollection GetTreeNodes(string id, FormDataCollection queryStrings) { @@ -123,5 +126,11 @@ namespace Umbraco.Web.Trees return menu; } + + public IEnumerable Search(string query, int pageSize, long pageIndex, out long totalFound, string searchFrom = null) + { + var results = Services.EntityService.GetPagedDescendantsFromRoot(UmbracoObjectTypes.DataType, pageIndex, pageSize, out totalFound, filter: query); + return Mapper.Map>(results); + } } } \ No newline at end of file diff --git a/src/Umbraco.Web/Trees/FileSystemTreeController.cs b/src/Umbraco.Web/Trees/FileSystemTreeController.cs index 54979990b7..4f414a941d 100644 --- a/src/Umbraco.Web/Trees/FileSystemTreeController.cs +++ b/src/Umbraco.Web/Trees/FileSystemTreeController.cs @@ -58,16 +58,15 @@ namespace Umbraco.Web.Trees }); foreach (var file in files) - { + { var withoutExt = Path.GetFileNameWithoutExtension(file); - if (withoutExt.IsNullOrWhiteSpace() == false) - { - var name = Path.GetFileName(file); - var node = CreateTreeNode(HttpUtility.UrlEncode(file), path, queryStrings, name, FileIcon, false); - OnRenderFileNode(ref node); - if (node != null) - nodes.Add(node); - } + if (withoutExt.IsNullOrWhiteSpace()) continue; + + var name = Path.GetFileName(file); + var node = CreateTreeNode(HttpUtility.UrlEncode(file), path, queryStrings, name, FileIcon, false); + OnRenderFileNode(ref node); + if (node != null) + nodes.Add(node); } return nodes; @@ -91,7 +90,7 @@ namespace Umbraco.Web.Trees } var path = string.IsNullOrEmpty(id) == false && id != Constants.System.Root.ToInvariantString() - ? System.Web.HttpUtility.UrlDecode(id).TrimStart("/") + ? HttpUtility.UrlDecode(id).TrimStart("/") : ""; var isFile = FileSystem.FileExists(path); diff --git a/src/Umbraco.Web/Trees/ISearchableTree.cs b/src/Umbraco.Web/Trees/ISearchableTree.cs deleted file mode 100644 index 680256f304..0000000000 --- a/src/Umbraco.Web/Trees/ISearchableTree.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System.Collections.Generic; -using Umbraco.Web.Models.ContentEditing; - -namespace Umbraco.Web.Trees -{ - public interface ISearchableTree - { - IEnumerable Search(string searchText); - } -} \ No newline at end of file diff --git a/src/Umbraco.Web/Trees/LegacyTreeDataConverter.cs b/src/Umbraco.Web/Trees/LegacyTreeDataConverter.cs index 1d142158e3..32a7ad5d99 100644 --- a/src/Umbraco.Web/Trees/LegacyTreeDataConverter.cs +++ b/src/Umbraco.Web/Trees/LegacyTreeDataConverter.cs @@ -215,11 +215,7 @@ namespace Umbraco.Web.Trees new LegacyUrlAction( "dialogs/sort.aspx?id=" + nodeId + "&nodeType=" + nodeType + "&app=" + currentSection + "&rnd=" + DateTime.UtcNow.Ticks, ui.GetText("actions", "sort"))); - case "UmbClientMgr.appActions().actionRights()": - return Attempt.Succeed( - new LegacyUrlAction( - "dialogs/cruds.aspx?id=" + nodeId + "&rnd=" + DateTime.UtcNow.Ticks, - ui.GetText("actions", "rights"))); + case "UmbClientMgr.appActions().actionProtect()": return Attempt.Succeed( new LegacyUrlAction( @@ -265,11 +261,7 @@ namespace Umbraco.Web.Trees new LegacyUrlAction( "dialogs/sendToTranslation.aspx?id=" + nodeId + "&rnd=" + DateTime.UtcNow.Ticks, ui.GetText("actions", "sendToTranslate"))); - case "UmbClientMgr.appActions().actionEmptyTranscan()": - return Attempt.Succeed( - new LegacyUrlAction( - "dialogs/emptyTrashcan.aspx?type=" + currentSection, - ui.GetText("actions", "emptyTrashcan"))); + case "UmbClientMgr.appActions().actionImport()": return Attempt.Succeed( new LegacyUrlAction( @@ -285,16 +277,7 @@ namespace Umbraco.Web.Trees new LegacyUrlAction( "dialogs/viewAuditTrail.aspx?nodeId=" + nodeId + "&rnd=" + DateTime.UtcNow.Ticks, ui.GetText("actions", "auditTrail"))); - case "UmbClientMgr.appActions().actionMove()": - return Attempt.Succeed( - new LegacyUrlAction( - "dialogs/moveOrCopy.aspx?app=" + currentSection + "&mode=cut&id=" + nodeId + "&rnd=" + DateTime.UtcNow.Ticks, - ui.GetText("actions", "move"))); - case "UmbClientMgr.appActions().actionCopy()": - return Attempt.Succeed( - new LegacyUrlAction( - "dialogs/moveOrCopy.aspx?app=" + currentSection + "&mode=copy&id=" + nodeId + "&rnd=" + DateTime.UtcNow.Ticks, - ui.GetText("actions", "copy"))); + } return Attempt.Fail(); } diff --git a/src/Umbraco.Web/Trees/MediaTreeController.cs b/src/Umbraco.Web/Trees/MediaTreeController.cs index ed72857a40..679d4a2d6a 100644 --- a/src/Umbraco.Web/Trees/MediaTreeController.cs +++ b/src/Umbraco.Web/Trees/MediaTreeController.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; using System.Linq; using System.Net; using System.Net.Http.Formatting; @@ -13,6 +14,8 @@ using Umbraco.Web.Mvc; using Umbraco.Web.WebApi.Filters; using umbraco; using umbraco.BusinessLogic.Actions; +using Umbraco.Web.Models.ContentEditing; +using Umbraco.Web.Search; using Constants = Umbraco.Core.Constants; namespace Umbraco.Web.Trees @@ -29,13 +32,17 @@ namespace Umbraco.Web.Trees [Tree(Constants.Applications.Media, Constants.Trees.Media)] [PluginController("UmbracoTrees")] [CoreTree] - public class MediaTreeController : ContentTreeControllerBase + [SearchableTree("searchResultFormatter", "configureMediaResult")] + public class MediaTreeController : ContentTreeControllerBase, ISearchableTree { + private readonly UmbracoTreeSearcher _treeSearcher = new UmbracoTreeSearcher(); + protected override TreeNode CreateRootNode(FormDataCollection queryStrings) { var node = base.CreateRootNode(queryStrings); - //if the user's start node is not default, then ensure the root doesn't have a menu - if (Security.CurrentUser.StartMediaId != Constants.System.Root) + + // if the user's start node is not default, then ensure the root doesn't have a menu + if (UserStartNodes.Contains(Constants.System.Root) == false) { node.MenuUrl = ""; } @@ -53,9 +60,10 @@ namespace Umbraco.Web.Trees get { return Services.MediaService.RecycleBinSmells(); } } - protected override int UserStartNode + private int[] _userStartNodes; + protected override int[] UserStartNodes { - get { return Security.CurrentUser.StartMediaId; } + get { return _userStartNodes ?? (_userStartNodes = Security.CurrentUser.CalculateMediaStartNodeIds(Services.EntityService)); } } /// @@ -100,7 +108,7 @@ namespace Umbraco.Web.Trees if (id == Constants.System.Root.ToInvariantString()) { //if the user's start node is not the root then ensure the root menu is empty/doesn't exist - if (Security.CurrentUser.StartMediaId != Constants.System.Root) + if (UserStartNodes.Contains(Constants.System.Root) == false) { return menu; } @@ -162,7 +170,12 @@ namespace Umbraco.Web.Trees { return false; } - return Security.CurrentUser.HasPathAccess(media); + return Security.CurrentUser.HasPathAccess(media, Services.EntityService); + } + + public IEnumerable Search(string query, int pageSize, long pageIndex, out long totalFound, string searchFrom = null) + { + return _treeSearcher.ExamineSearch(Umbraco, query, UmbracoEntityTypes.Media, pageSize, pageIndex, out totalFound, searchFrom); } } } \ No newline at end of file diff --git a/src/Umbraco.Web/Trees/MediaTypeTreeController.cs b/src/Umbraco.Web/Trees/MediaTypeTreeController.cs index e116e43825..e402b5d64b 100644 --- a/src/Umbraco.Web/Trees/MediaTypeTreeController.cs +++ b/src/Umbraco.Web/Trees/MediaTypeTreeController.cs @@ -1,6 +1,8 @@ using System; +using System.Collections.Generic; using System.Linq; using System.Net.Http.Formatting; +using AutoMapper; using umbraco; using umbraco.BusinessLogic.Actions; using Umbraco.Core; @@ -9,6 +11,8 @@ using Umbraco.Core.Models; using Umbraco.Web.Models.Trees; using Umbraco.Web.WebApi.Filters; using Umbraco.Core.Services; +using Umbraco.Web.Models.ContentEditing; +using Umbraco.Web.Search; namespace Umbraco.Web.Trees { @@ -17,7 +21,7 @@ namespace Umbraco.Web.Trees [Mvc.PluginController("UmbracoTrees")] [CoreTree] [LegacyBaseTree(typeof(loadMediaTypes))] - public class MediaTypeTreeController : TreeController + public class MediaTypeTreeController : TreeController, ISearchableTree { protected override TreeNodeCollection GetTreeNodes(string id, FormDataCollection queryStrings) { @@ -47,7 +51,7 @@ namespace Umbraco.Web.Trees .OrderBy(entity => entity.Name) .Select(dt => { - var node = CreateTreeNode(dt, Constants.ObjectTypes.MediaTypeGuid, id, queryStrings, "icon-item-arrangement", + var node = CreateTreeNode(dt, Constants.ObjectTypes.MediaTypeGuid, id, queryStrings, "icon-thumbnails", //NOTE: Since 7.4+ child type creation is enabled by a config option. It defaults to on, but can be disabled if we decide to. //We need this check to keep supporting sites where childs have already been created. dt.HasChildren()); @@ -124,5 +128,11 @@ namespace Umbraco.Web.Trees return menu; } + + public IEnumerable Search(string query, int pageSize, long pageIndex, out long totalFound, string searchFrom = null) + { + var results = Services.EntityService.GetPagedDescendantsFromRoot(UmbracoObjectTypes.MediaType, pageIndex, pageSize, out totalFound, filter: query); + return Mapper.Map>(results); + } } } diff --git a/src/Umbraco.Web/Trees/MemberTreeController.cs b/src/Umbraco.Web/Trees/MemberTreeController.cs index fe7aa8a689..68f12ef6ca 100644 --- a/src/Umbraco.Web/Trees/MemberTreeController.cs +++ b/src/Umbraco.Web/Trees/MemberTreeController.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; using System.Globalization; using System.Linq; using System.Net; @@ -16,6 +17,8 @@ using Umbraco.Web.Mvc; using Umbraco.Web.WebApi.Filters; using umbraco; using umbraco.BusinessLogic.Actions; +using Umbraco.Web.Models.ContentEditing; +using Umbraco.Web.Search; using Constants = Umbraco.Core.Constants; namespace Umbraco.Web.Trees @@ -30,7 +33,8 @@ namespace Umbraco.Web.Trees [Tree(Constants.Applications.Members, Constants.Trees.Members, null, sortOrder: 0)] [PluginController("UmbracoTrees")] [CoreTree] - public class MemberTreeController : TreeController + [SearchableTree("searchResultFormatter", "configureMemberResult")] + public class MemberTreeController : TreeController, ISearchableTree { public MemberTreeController() { @@ -38,6 +42,7 @@ namespace Umbraco.Web.Trees _isUmbracoProvider = _provider.IsUmbracoMembershipProvider(); } + private readonly UmbracoTreeSearcher _treeSearcher = new UmbracoTreeSearcher(); private readonly MembershipProvider _provider; private readonly bool _isUmbracoProvider; @@ -178,5 +183,10 @@ namespace Umbraco.Web.Trees return menu; } + + public IEnumerable Search(string query, int pageSize, long pageIndex, out long totalFound, string searchFrom = null) + { + return _treeSearcher.ExamineSearch(Umbraco, query, UmbracoEntityTypes.Member, pageSize, pageIndex, out totalFound, searchFrom); + } } } \ No newline at end of file diff --git a/src/Umbraco.Web/Trees/PartialViewMacrosTreeController.cs b/src/Umbraco.Web/Trees/PartialViewMacrosTreeController.cs index b4cc2eb2fd..6e77c12fba 100644 --- a/src/Umbraco.Web/Trees/PartialViewMacrosTreeController.cs +++ b/src/Umbraco.Web/Trees/PartialViewMacrosTreeController.cs @@ -1,21 +1,26 @@ -using Umbraco.Core; -using Umbraco.Core.IO; +using Umbraco.Core.IO; using Umbraco.Web.Models.Trees; +using Umbraco.Web.Mvc; +using Umbraco.Web.WebApi.Filters; +using Constants = Umbraco.Core.Constants; namespace Umbraco.Web.Trees { /// /// Tree for displaying partial view macros in the developer app /// - [Tree(Constants.Applications.Developer, "partialViewMacros", "Partial View Macro Files", sortOrder: 6)] - public class PartialViewMacrosTreeController : FileSystemTreeController + [Tree(Constants.Applications.Developer, "partialViewMacros", null, sortOrder: 6)] + [UmbracoTreeAuthorize(Constants.Trees.PartialViewMacros)] + [PluginController("UmbracoTrees")] + [CoreTree] + public class PartialViewMacrosTreeController : FileSystemTreeController { protected override IFileSystem2 FileSystem { get { return FileSystemProviderManager.Current.MacroPartialsFileSystem; } } - private static readonly string[] ExtensionsStatic = { "cshtml" }; + private static readonly string[] ExtensionsStatic = {"cshtml"}; protected override string[] Extensions { diff --git a/src/Umbraco.Web/Trees/PartialViewsTreeController.cs b/src/Umbraco.Web/Trees/PartialViewsTreeController.cs index 264b44ad73..f301845fe1 100644 --- a/src/Umbraco.Web/Trees/PartialViewsTreeController.cs +++ b/src/Umbraco.Web/Trees/PartialViewsTreeController.cs @@ -1,21 +1,27 @@ -using Umbraco.Core; +using umbraco; using Umbraco.Core.IO; using Umbraco.Web.Models.Trees; +using Umbraco.Web.Mvc; +using Umbraco.Web.WebApi.Filters; +using Constants = Umbraco.Core.Constants; namespace Umbraco.Web.Trees { /// /// Tree for displaying partial views in the settings app /// - [Tree(Constants.Applications.Settings, "partialViews", "Partial Views", sortOrder: 2)] - public class PartialViewsTreeController : FileSystemTreeController + [Tree(Constants.Applications.Settings, "partialViews", null, sortOrder: 2)] + [UmbracoTreeAuthorize(Constants.Trees.PartialViews)] + [PluginController("UmbracoTrees")] + [CoreTree] + public class PartialViewsTreeController : FileSystemTreeController { - protected override IFileSystem2 FileSystem - { - get { return FileSystemProviderManager.Current.PartialViewsFileSystem; } - } + protected override IFileSystem2 FileSystem + { + get { return FileSystemProviderManager.Current.PartialViewsFileSystem; } + } - private static readonly string[] ExtensionsStatic = { "cshtml" }; + private static readonly string[] ExtensionsStatic = {"cshtml"}; protected override string[] Extensions { diff --git a/src/Umbraco.Web/Trees/ScriptTreeController.cs b/src/Umbraco.Web/Trees/ScriptTreeController.cs index 616106a625..171688bd1a 100644 --- a/src/Umbraco.Web/Trees/ScriptTreeController.cs +++ b/src/Umbraco.Web/Trees/ScriptTreeController.cs @@ -1,10 +1,17 @@ -using Umbraco.Core; +using umbraco; using Umbraco.Core.IO; using Umbraco.Web.Models.Trees; +using Umbraco.Web.Mvc; +using Umbraco.Web.WebApi.Filters; +using Constants = Umbraco.Core.Constants; namespace Umbraco.Web.Trees { - [Tree(Constants.Applications.Settings, "scripts", "Scripts", sortOrder: 4)] + [UmbracoTreeAuthorize(Constants.Trees.Scripts)] + [Tree(Constants.Applications.Settings, "scripts", null, sortOrder: 4)] + [LegacyBaseTree(typeof(loadScripts))] + [PluginController("UmbracoTrees")] + [CoreTree] public class ScriptTreeController : FileSystemTreeController { protected override IFileSystem2 FileSystem diff --git a/src/Umbraco.Web/Trees/TemplatesTreeController.cs b/src/Umbraco.Web/Trees/TemplatesTreeController.cs index 3869f58a2a..c5c3c3dc70 100644 --- a/src/Umbraco.Web/Trees/TemplatesTreeController.cs +++ b/src/Umbraco.Web/Trees/TemplatesTreeController.cs @@ -6,14 +6,17 @@ using System.IO; using System.Linq; using System.Net.Http.Formatting; using System.Web.Services.Description; +using AutoMapper; using umbraco; using umbraco.BusinessLogic.Actions; using umbraco.cms.businesslogic.template; using Umbraco.Core; using Umbraco.Core.Configuration; using Umbraco.Core.Models; +using Umbraco.Web.Models.ContentEditing; using Umbraco.Web.Models.Trees; using Umbraco.Web.Mvc; +using Umbraco.Web.Search; using Umbraco.Web.WebApi.Filters; using Constants = Umbraco.Core.Constants; @@ -24,7 +27,7 @@ namespace Umbraco.Web.Trees [Tree(Constants.Applications.Settings, Constants.Trees.Templates, null, sortOrder:1)] [PluginController("UmbracoTrees")] [CoreTree] - public class TemplatesTreeController : TreeController + public class TemplatesTreeController : TreeController, ISearchableTree { /// /// The method called to render the contents of the tree structure @@ -129,5 +132,11 @@ namespace Umbraco.Web.Trees Uri.EscapeDataString("settings/editTemplate.aspx?templateID=" + template.Id) : null; } + + public IEnumerable Search(string query, int pageSize, long pageIndex, out long totalFound, string searchFrom = null) + { + var results = Services.EntityService.GetPagedDescendantsFromRoot(UmbracoObjectTypes.Template, pageIndex, pageSize, out totalFound, filter: query); + return Mapper.Map>(results); + } } } diff --git a/src/Umbraco.Web/Trees/TreeController.cs b/src/Umbraco.Web/Trees/TreeController.cs index 0f975a9860..47d5454dcd 100644 --- a/src/Umbraco.Web/Trees/TreeController.cs +++ b/src/Umbraco.Web/Trees/TreeController.cs @@ -40,22 +40,7 @@ namespace Umbraco.Web.Trees /// public override string RootNodeDisplayName { - get - { - - //if title is defined, return that - if(string.IsNullOrEmpty(_attribute.Title) == false) - return _attribute.Title; - - - //try to look up a tree header matching the tree alias - var localizedLabel = Services.TextService.Localize("treeHeaders/" + _attribute.Alias); - if (string.IsNullOrEmpty(localizedLabel) == false) - return localizedLabel; - - //is returned to signal that a label was not found - return "[" + _attribute.Alias + "]"; - } + get { return _attribute.GetRootNodeDisplayName(Services.TextService); } } /// @@ -68,19 +53,7 @@ namespace Umbraco.Web.Trees private void Initialize() { - //Locate the tree attribute - var treeAttributes = GetType() - .GetCustomAttributes(typeof(TreeAttribute), false) - .OfType() - .ToArray(); - - if (treeAttributes.Any() == false) - { - throw new InvalidOperationException("The Tree controller is missing the " + typeof(TreeAttribute).FullName + " attribute"); - } - - //assign the properties of this object to those of the metadata attribute - _attribute = treeAttributes.First(); + _attribute = GetType().GetTreeAttribute(); } } } diff --git a/src/Umbraco.Web/Trees/TreeControllerBase.cs b/src/Umbraco.Web/Trees/TreeControllerBase.cs index 751f83db16..4547e5e32d 100644 --- a/src/Umbraco.Web/Trees/TreeControllerBase.cs +++ b/src/Umbraco.Web/Trees/TreeControllerBase.cs @@ -9,6 +9,7 @@ using Umbraco.Web.WebApi; using Umbraco.Web.WebApi.Filters; using Umbraco.Core.Models; using Umbraco.Core.Models.EntityBase; +using Umbraco.Web.Search; namespace Umbraco.Web.Trees { diff --git a/src/Umbraco.Web/Trees/UserTreeController.cs b/src/Umbraco.Web/Trees/UserTreeController.cs new file mode 100644 index 0000000000..8b70be9c95 --- /dev/null +++ b/src/Umbraco.Web/Trees/UserTreeController.cs @@ -0,0 +1,59 @@ +using System.Net.Http.Formatting; +using umbraco; +using Umbraco.Web.Models.Trees; +using Umbraco.Web.Mvc; +using Umbraco.Web.WebApi.Filters; +using Constants = Umbraco.Core.Constants; + +namespace Umbraco.Web.Trees +{ + [UmbracoTreeAuthorize(Constants.Trees.Users)] + [Tree(Constants.Applications.Users, Constants.Trees.Users, null, sortOrder: 0)] + [PluginController("UmbracoTrees")] + [LegacyBaseTree(typeof(loadUsers))] + [CoreTree] + public class UserTreeController : TreeController + { + public UserTreeController() + { + } + + public UserTreeController(UmbracoContext umbracoContext) : base(umbracoContext) + { + } + + public UserTreeController(UmbracoContext umbracoContext, UmbracoHelper umbracoHelper) : base(umbracoContext, umbracoHelper) + { + } + + /// + /// Helper method to create a root model for a tree + /// + /// + protected override TreeNode CreateRootNode(FormDataCollection queryStrings) + { + var root = base.CreateRootNode(queryStrings); + + //this will load in a custom UI instead of the dashboard for the root node + root.RoutePath = string.Format("{0}/{1}/{2}", Constants.Applications.Users, Constants.Trees.Users, "overview"); + root.Icon = "icon-users"; + + root.HasChildren = false; + return root; + } + + protected override TreeNodeCollection GetTreeNodes(string id, FormDataCollection queryStrings) + { + var baseUrl = Constants.Applications.Users + "/users/"; + + var nodes = new TreeNodeCollection(); + return nodes; + } + + protected override MenuItemCollection GetMenuForNode(string id, FormDataCollection queryStrings) + { + var menu = new MenuItemCollection(); + return menu; + } + } +} \ No newline at end of file diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index ef4a56e26a..816c9c082c 100644 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -109,10 +109,6 @@ ..\packages\ClientDependency.1.9.2\lib\net45\ClientDependency.Core.dll True - - ..\packages\xmlrpcnet.2.5.0\lib\net20\CookComputing.XmlRpcV2.dll - True - ..\packages\dotless.1.5.2\lib\dotless.Core.dll @@ -149,25 +145,20 @@ True - - ..\packages\Microsoft.Owin.3.0.1\lib\net45\Microsoft.Owin.dll - True + + ..\packages\Microsoft.Owin.3.1.0\lib\net45\Microsoft.Owin.dll - - ..\packages\Microsoft.Owin.Host.SystemWeb.3.0.1\lib\net45\Microsoft.Owin.Host.SystemWeb.dll - True + + ..\packages\Microsoft.Owin.Host.SystemWeb.3.1.0\lib\net45\Microsoft.Owin.Host.SystemWeb.dll - - ..\packages\Microsoft.Owin.Security.3.0.1\lib\net45\Microsoft.Owin.Security.dll - True + + ..\packages\Microsoft.Owin.Security.3.1.0\lib\net45\Microsoft.Owin.Security.dll - - ..\packages\Microsoft.Owin.Security.Cookies.3.0.1\lib\net45\Microsoft.Owin.Security.Cookies.dll - True + + ..\packages\Microsoft.Owin.Security.Cookies.3.1.0\lib\net45\Microsoft.Owin.Security.Cookies.dll - - ..\packages\Microsoft.Owin.Security.OAuth.3.0.1\lib\net45\Microsoft.Owin.Security.OAuth.dll - True + + ..\packages\Microsoft.Owin.Security.OAuth.3.1.0\lib\net45\Microsoft.Owin.Security.OAuth.dll ..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll @@ -330,21 +321,24 @@ + - - + - + + + + @@ -382,6 +376,8 @@ + + @@ -400,19 +396,30 @@ + + + + + + + + + + + @@ -456,7 +463,7 @@ - + @@ -469,6 +476,11 @@ + + + + + @@ -483,6 +495,7 @@ + @@ -520,6 +533,7 @@ + @@ -535,7 +549,7 @@ - + @@ -592,7 +606,7 @@ - + @@ -755,22 +769,12 @@ ASPXCodeBehind - - ASPXCodeBehind - ASPXCodeBehind - - ASPXCodeBehind - - ASPXCodeBehind - - ASPXCodeBehind - @@ -784,6 +788,7 @@ + @@ -798,6 +803,7 @@ + @@ -840,7 +846,7 @@ - + @@ -869,7 +875,7 @@ - + @@ -975,9 +981,6 @@ - - ASPXCodeBehind - ASPXCodeBehind @@ -990,15 +993,9 @@ ASPXCodeBehind - - ASPXCodeBehind - ASPXCodeBehind - - ASPXCodeBehind - AssignDomain2.aspx ASPXCodeBehind @@ -1006,9 +1003,6 @@ AssignDomain2.aspx - - ASPXCodeBehind - ASPXCodeBehind @@ -1148,25 +1142,12 @@ - - ASPXCodeBehind - - - ASPXCodeBehind - ASPXCodeBehind ASPXCodeBehind - - ASPXCodeBehind - - - ASPXCodeBehind - - ASPXCodeBehind @@ -1185,8 +1166,6 @@ ASPXCodeBehind - - ASPXCodeBehind @@ -1215,9 +1194,6 @@ ASPXCodeBehind - - ASPXCodeBehind - ASPXCodeBehind @@ -1366,31 +1342,12 @@ publish.aspx - - - - - - - - ASPXCodeBehind - - ImageViewerUpdater.asmx - Component - - - UploadMediaImage.ascx - ASPXCodeBehind - - - UploadMediaImage.ascx - @@ -1416,14 +1373,10 @@ - - - - FeedProxy.aspx @@ -1491,13 +1444,6 @@ insertMasterpagePlaceholder.aspx - - mediaPicker.aspx - ASPXCodeBehind - - - mediaPicker.aspx - republish.aspx ASPXCodeBehind @@ -1525,13 +1471,6 @@ Code - - LatestEdits.ascx - ASPXCodeBehind - - - LatestEdits.ascx - assemblyBrowser.aspx ASPXCodeBehind @@ -1539,13 +1478,6 @@ assemblyBrowser.aspx - - autoDoc.aspx - ASPXCodeBehind - - - autoDoc.aspx - editPackage.aspx ASPXCodeBehind @@ -1571,42 +1503,14 @@ xsltInsertValueOf.aspx - - about.aspx - ASPXCodeBehind - - - about.aspx - exportDocumenttype.aspx ASPXCodeBehind - - imageViewer.aspx - ASPXCodeBehind - - - imageViewer.aspx - importDocumenttype.aspx ASPXCodeBehind - - insertMacro.aspx - ASPXCodeBehind - - - insertMacro.aspx - - - insertTable.aspx - ASPXCodeBehind - - - insertTable.aspx - notifications.aspx ASPXCodeBehind @@ -1614,13 +1518,6 @@ notifications.aspx - - RegexWs.aspx - ASPXCodeBehind - - - RegexWs.aspx - rollBack.aspx ASPXCodeBehind @@ -1635,13 +1532,6 @@ sendToTranslation.aspx - - uploadImage.aspx - ASPXCodeBehind - - - uploadImage.aspx - viewAuditTrail.aspx ASPXCodeBehind @@ -1649,13 +1539,6 @@ viewAuditTrail.aspx - - language.aspx - ASPXCodeBehind - - - language.aspx - EditMemberGroup.aspx ASPXCodeBehind @@ -1684,41 +1567,6 @@ - - InsertAnchor.aspx - ASPXCodeBehind - - - InsertAnchor.aspx - - - insertChar.aspx - ASPXCodeBehind - - - insertChar.aspx - - - insertImage.aspx - ASPXCodeBehind - - - insertImage.aspx - - - insertLink.aspx - ASPXCodeBehind - - - insertLink.aspx - - - insertMacro.aspx - ASPXCodeBehind - - - insertMacro.aspx - @@ -1753,10 +1601,6 @@ editLanguage.aspx - - editScript.aspx - ASPXCodeBehind - @@ -1781,9 +1625,6 @@ MacroContainerService.asmx Component - - MediaUploader.ashx - TagsAutoCompleteHandler.ashx @@ -1866,39 +1707,10 @@ - - XmlTree.xsd - - EditUserType.aspx - ASPXCodeBehind - - - EditUserType.aspx - - - NodePermissions.ascx - ASPXCodeBehind - - - NodePermissions.ascx - - - PermissionEditor.aspx - ASPXCodeBehind - - - PermissionEditor.aspx - - - PermissionsHandler.asmx - Component - - - CacheRefresher.asmx @@ -1916,10 +1728,6 @@ codeEditorSave.asmx Component - - Developer.asmx - Component - legacyAjaxCalls.asmx Component @@ -1937,21 +1745,6 @@ Component - - Settings.asmx - Component - - - templates.asmx - Component - - - trashcan.asmx - Component - - - UltimatePickerAutoCompleteHandler.ashx - ASPXCodeBehind @@ -1983,9 +1776,6 @@ uQuery.cs - - - @@ -2003,7 +1793,6 @@ - @@ -2042,69 +1831,39 @@ ASPXCodeBehind - - - ASPXCodeBehind - - + + ASPXCodeBehind + ASPXCodeBehind - - - ASPXCodeBehind - - - ASPXCodeBehind - ASPXCodeBehind - - ASPXCodeBehind - - ASPXCodeBehind - - - - ASPXCodeBehind - - ASPXCodeBehind - ASPXCodeBehind - - - ASPXCodeBehind - - - ASPXCodeBehind - - - ASPXCodeBehind - @@ -2120,34 +1879,17 @@ - - ASPXCodeBehind - - - ASPXCodeBehind - - ASPXCodeBehind - - ASPXCodeBehind - - - ASPXCodeBehind - - - - ASPXCodeBehind - Form @@ -2158,27 +1900,18 @@ ASPXCodeBehind - - ASPXCodeBehind - Form - Form - - Form - - - @@ -2189,8 +1922,6 @@ XmlTree.xsd - - @@ -2206,10 +1937,6 @@ ResXFileCodeGenerator Strings.Designer.cs - - language.aspx.cs - Designer - ResXFileCodeGenerator Resources.Designer.cs @@ -2259,7 +1986,9 @@ umbraco_org_umbraco_update_CheckForUpgrade - + + + 11.0 $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v11.0 diff --git a/src/Umbraco.Web/UmbracoApplication.cs b/src/Umbraco.Web/UmbracoApplication.cs index 0f6fc03b80..b9650a8230 100644 --- a/src/Umbraco.Web/UmbracoApplication.cs +++ b/src/Umbraco.Web/UmbracoApplication.cs @@ -34,9 +34,9 @@ namespace Umbraco.Web var appPluginFolder = IOHelper.MapPath("~/App_Plugins/"); if (Directory.Exists(appPluginFolder)) { - _mw = new ManifestWatcher(LoggerResolver.Current.Logger); - _mw.Start(Directory.GetDirectories(IOHelper.MapPath("~/App_Plugins/"))); - } + _mw = new ManifestWatcher(LoggerResolver.Current.Logger); + _mw.Start(Directory.GetDirectories(appPluginFolder)); + } } } diff --git a/src/Umbraco.Web/UmbracoContext.cs b/src/Umbraco.Web/UmbracoContext.cs index 90f4e4df03..dbb165a526 100644 --- a/src/Umbraco.Web/UmbracoContext.cs +++ b/src/Umbraco.Web/UmbracoContext.cs @@ -259,7 +259,7 @@ namespace Umbraco.Web var requestUrl = new Uri("http://localhost"); var request = GetRequestFromContext(); - if (request != null) + if (request != null && request.Url != null) { requestUrl = request.Url; } diff --git a/src/Umbraco.Web/UrlHelperExtensions.cs b/src/Umbraco.Web/UrlHelperExtensions.cs index 1893a36c89..9b017e1bd4 100644 --- a/src/Umbraco.Web/UrlHelperExtensions.cs +++ b/src/Umbraco.Web/UrlHelperExtensions.cs @@ -176,22 +176,14 @@ namespace Umbraco.Web //make a hash of umbraco and client dependency version //in case the user bypasses the installer and just bumps the web.config or clientdep config - var versionHash = new HashCodeCombiner(); - //if in debug mode, always burst the cache if (GlobalSettings.DebugMode) { - versionHash.AddCaseInsensitiveString(DateTime.Now.Ticks.ToString(CultureInfo.InvariantCulture)); - } - else - { - //create a unique hash code of the current umb version and the current cdf version - - versionHash.AddCaseInsensitiveString(UmbracoVersion.Current.ToString()); - versionHash.AddCaseInsensitiveString(ClientDependencySettings.Instance.Version.ToString(CultureInfo.InvariantCulture)); - } + return DateTime.Now.Ticks.ToString(CultureInfo.InvariantCulture).GenerateHash(); + } - return versionHash.GetCombinedHashCode(); + var version = UmbracoVersion.GetSemanticVersion().ToSemanticString(); + return string.Format("{0}.{1}", version, ClientDependencySettings.Instance.Version).GenerateHash(); } } } \ No newline at end of file diff --git a/src/Umbraco.Web/WebApi/AngularJsonMediaTypeFormatter.cs b/src/Umbraco.Web/WebApi/AngularJsonMediaTypeFormatter.cs index 66a79376aa..8dca204597 100644 --- a/src/Umbraco.Web/WebApi/AngularJsonMediaTypeFormatter.cs +++ b/src/Umbraco.Web/WebApi/AngularJsonMediaTypeFormatter.cs @@ -21,6 +21,8 @@ namespace Umbraco.Web.WebApi public class AngularJsonMediaTypeFormatter : JsonMediaTypeFormatter { + public const string XsrfPrefix = ")]}',\n"; + /// /// This will prepend the special chars to the stream output that angular will strip /// @@ -30,24 +32,25 @@ namespace Umbraco.Web.WebApi /// /// /// - public override Task WriteToStreamAsync(Type type, object value, Stream writeStream, HttpContent content, TransportContext transportContext) + public override async Task WriteToStreamAsync(Type type, object value, Stream writeStream, HttpContent content, TransportContext transportContext) { - if (type == null) throw new ArgumentNullException("type"); if (writeStream == null) throw new ArgumentNullException("writeStream"); var effectiveEncoding = SelectCharacterEncoding(content == null ? null : content.Headers); - using (var streamWriter = new StreamWriter(writeStream, effectiveEncoding)) + using (var streamWriter = new StreamWriter(writeStream, effectiveEncoding, + //we are only writing a few chars so we don't need to allocate a large buffer + 128, + //this is important! We don't want to close the stream, the base class is in charge of stream management, we just want to write to it. + leaveOpen:true)) { //write the special encoding for angular json to the start // (see: http://docs.angularjs.org/api/ng.$http) - streamWriter.Write(")]}',\n"); + streamWriter.Write(XsrfPrefix); streamWriter.Flush(); - return base.WriteToStreamAsync(type, value, writeStream, content, transportContext); + await base.WriteToStreamAsync(type, value, writeStream, content, transportContext); } - - } } diff --git a/src/Umbraco.Web/WebApi/Filters/AppendUserModifiedHeaderAttribute.cs b/src/Umbraco.Web/WebApi/Filters/AppendUserModifiedHeaderAttribute.cs new file mode 100644 index 0000000000..77fee75693 --- /dev/null +++ b/src/Umbraco.Web/WebApi/Filters/AppendUserModifiedHeaderAttribute.cs @@ -0,0 +1,76 @@ +using System; +using System.Web.Http.Filters; +using Umbraco.Core; +using Umbraco.Core.Models; + +namespace Umbraco.Web.WebApi.Filters +{ + /// + /// Appends a custom response header to notify the UI that the current user data has been modified + /// + public sealed class AppendUserModifiedHeaderAttribute : ActionFilterAttribute + { + private readonly string _userIdParameter; + + /// + /// An empty constructor which will always set the header + /// + public AppendUserModifiedHeaderAttribute() + { + } + + /// + /// A constructor specifying the action parameter name containing the user id to match against the current user and if they match the header will be appended + /// + /// + public AppendUserModifiedHeaderAttribute(string userIdParameter) + { + if (userIdParameter == null) throw new ArgumentNullException("userIdParameter"); + _userIdParameter = userIdParameter; + } + + public static void AppendHeader(HttpActionExecutedContext actionExecutedContext) + { + if (actionExecutedContext.Response.Headers.Contains("X-Umb-User-Modified") == false) + { + actionExecutedContext.Response.Headers.Add("X-Umb-User-Modified", "1"); + } + } + + public override void OnActionExecuted(HttpActionExecutedContext actionExecutedContext) + { + base.OnActionExecuted(actionExecutedContext); + + if (_userIdParameter.IsNullOrWhiteSpace()) + { + AppendHeader(actionExecutedContext); + } + else + { + var actionContext = actionExecutedContext.ActionContext; + if (actionContext.ActionArguments[_userIdParameter] == null) + { + throw new InvalidOperationException("No argument found for the current action with the name: " + _userIdParameter); + } + + var user = UmbracoContext.Current.Security.CurrentUser; + if (user == null) return; + + var userId = GetUserIdFromParameter(actionContext.ActionArguments[_userIdParameter]); + + if (userId == user.Id) + AppendHeader(actionExecutedContext); + } + + } + + private int GetUserIdFromParameter(object parameterValue) + { + if (parameterValue is int) + { + return (int)parameterValue; + } + throw new InvalidOperationException("The id type: " + parameterValue.GetType() + " is not a supported id"); + } + } +} \ No newline at end of file diff --git a/src/Umbraco.Web/WebApi/Filters/CheckIfUserTicketDataIsStaleAttribute.cs b/src/Umbraco.Web/WebApi/Filters/CheckIfUserTicketDataIsStaleAttribute.cs new file mode 100644 index 0000000000..46c36e9acd --- /dev/null +++ b/src/Umbraco.Web/WebApi/Filters/CheckIfUserTicketDataIsStaleAttribute.cs @@ -0,0 +1,121 @@ +using System; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using System.Web.Http.Controllers; +using System.Web.Http.Filters; +using AutoMapper; +using Umbraco.Core; +using Umbraco.Core.Models.Identity; +using Umbraco.Core.Models.Membership; +using Umbraco.Core.Security; +using Umbraco.Web.Security; +using UserExtensions = Umbraco.Core.Models.UserExtensions; + +namespace Umbraco.Web.WebApi.Filters +{ + /// + /// This filter will check if the current Principal/Identity assigned to the request has stale data in it compared + /// to what is persisted for the current user and will update the current auth ticket with the correct data if required and output + /// a custom response header for the UI to be notified of it. + /// + public sealed class CheckIfUserTicketDataIsStaleAttribute : ActionFilterAttribute + { + public override async Task OnActionExecutingAsync(HttpActionContext actionContext, CancellationToken cancellationToken) + { + await CheckStaleData(actionContext); + } + + public override async Task OnActionExecutedAsync(HttpActionExecutedContext actionExecutedContext, CancellationToken cancellationToken) + { + await CheckStaleData(actionExecutedContext.ActionContext); + + //we need new tokens and append the custom header if changes have been made + if (actionExecutedContext.ActionContext.Request.Properties.ContainsKey(typeof(CheckIfUserTicketDataIsStaleAttribute).Name)) + { + var tokenFilter = new SetAngularAntiForgeryTokensAttribute(); + tokenFilter.OnActionExecuted(actionExecutedContext); + + //add the header + AppendUserModifiedHeaderAttribute.AppendHeader(actionExecutedContext); + } + } + + private async Task CheckStaleData(HttpActionContext actionContext) + { + if (actionContext == null + || actionContext.Request == null + || actionContext.RequestContext == null + || actionContext.RequestContext.Principal == null + || actionContext.RequestContext.Principal.Identity == null) + { + return; + } + + //don't execute if it's already been done + if (actionContext.Request.Properties.ContainsKey(typeof(CheckIfUserTicketDataIsStaleAttribute).Name)) + return; + + var identity = actionContext.RequestContext.Principal.Identity as UmbracoBackOfficeIdentity; + if (identity == null) return; + + var userId = identity.Id.TryConvertTo(); + if (userId == false) return; + + var user = ApplicationContext.Current.Services.UserService.GetUserById(userId.Result); + if (user == null) return; + + //a list of checks to execute, if any of them pass then we resync + var checks = new Func[] + { + () => user.Username != identity.Username, + () => + { + var culture = UserExtensions.GetUserCulture(user, ApplicationContext.Current.Services.TextService); + return culture != null && culture.ToString() != identity.Culture; + }, + () => user.AllowedSections.UnsortedSequenceEqual(identity.AllowedApplications) == false, + () => user.Groups.Select(x => x.Alias).UnsortedSequenceEqual(identity.Roles) == false, + () => + { + var startContentIds = UserExtensions.CalculateContentStartNodeIds(user, ApplicationContext.Current.Services.EntityService); + return startContentIds.UnsortedSequenceEqual(identity.StartContentNodes) == false; + }, + () => + { + var startMediaIds = UserExtensions.CalculateMediaStartNodeIds(user, ApplicationContext.Current.Services.EntityService); + return startMediaIds.UnsortedSequenceEqual(identity.StartMediaNodes) == false; + } + }; + + if (checks.Any(check => check())) + { + await ReSync(user, actionContext); + } + } + + /// + /// This will update the current request IPrincipal to be correct and re-create the auth ticket + /// + /// + /// + /// + private async Task ReSync(IUser user, HttpActionContext actionContext) + { + var owinCtx = actionContext.Request.TryGetOwinContext(); + if (owinCtx) + { + var signInManager = owinCtx.Result.GetBackOfficeSignInManager(); + + //ensure the remainder of the request has the correct principal set + actionContext.Request.SetPrincipalForRequest(user); + + var backOfficeIdentityUser = Mapper.Map(user); + await signInManager.SignInAsync(backOfficeIdentityUser, isPersistent: true, rememberBrowser: false); + + //flag that we've made changes + actionContext.Request.Properties[typeof(CheckIfUserTicketDataIsStaleAttribute).Name] = true; + } + } + } +} \ No newline at end of file diff --git a/src/Umbraco.Web/WebApi/Filters/EnableOverrideAuthorizationAttribute.cs b/src/Umbraco.Web/WebApi/Filters/EnableOverrideAuthorizationAttribute.cs index a8c26fc167..b2fdcb3c56 100644 --- a/src/Umbraco.Web/WebApi/Filters/EnableOverrideAuthorizationAttribute.cs +++ b/src/Umbraco.Web/WebApi/Filters/EnableOverrideAuthorizationAttribute.cs @@ -11,6 +11,6 @@ namespace Umbraco.Web.WebApi.Filters [AttributeUsage(AttributeTargets.Class, Inherited = true, AllowMultiple = true)] public sealed class EnableOverrideAuthorizationAttribute : Attribute { - + //TODO: Can we remove this and use the System.Web.Http.OverrideAuthorizationAttribute which uses IOverrideFilter instead? } } \ No newline at end of file diff --git a/src/Umbraco.Web/WebApi/Filters/EnsureUserPermissionForContentAttribute.cs b/src/Umbraco.Web/WebApi/Filters/EnsureUserPermissionForContentAttribute.cs index 2e3eea490e..129bac1c4d 100644 --- a/src/Umbraco.Web/WebApi/Filters/EnsureUserPermissionForContentAttribute.cs +++ b/src/Umbraco.Web/WebApi/Filters/EnsureUserPermissionForContentAttribute.cs @@ -42,10 +42,12 @@ namespace Umbraco.Web.WebApi.Filters public EnsureUserPermissionForContentAttribute(string paramName) { - Mandate.ParameterNotNullOrEmpty(paramName, "paramName"); + if (string.IsNullOrWhiteSpace(paramName)) throw new ArgumentException("Value cannot be null or whitespace.", "paramName"); + _paramName = paramName; _permissionToCheck = ActionBrowse.Instance.Letter; - } + } + public EnsureUserPermissionForContentAttribute(string paramName, char permissionToCheck) : this(paramName) { @@ -100,7 +102,9 @@ namespace Umbraco.Web.WebApi.Filters actionContext.Request.Properties, UmbracoContext.Current.Security.CurrentUser, ApplicationContext.Current.Services.UserService, - ApplicationContext.Current.Services.ContentService, nodeId, _permissionToCheck.HasValue ? new[]{_permissionToCheck.Value}: null)) + ApplicationContext.Current.Services.ContentService, + ApplicationContext.Current.Services.EntityService, + nodeId, _permissionToCheck.HasValue ? new[]{_permissionToCheck.Value}: null)) { base.OnActionExecuting(actionContext); } diff --git a/src/Umbraco.Web/WebApi/Filters/EnsureUserPermissionForMediaAttribute.cs b/src/Umbraco.Web/WebApi/Filters/EnsureUserPermissionForMediaAttribute.cs index e126d42c21..1289f25063 100644 --- a/src/Umbraco.Web/WebApi/Filters/EnsureUserPermissionForMediaAttribute.cs +++ b/src/Umbraco.Web/WebApi/Filters/EnsureUserPermissionForMediaAttribute.cs @@ -123,7 +123,9 @@ namespace Umbraco.Web.WebApi.Filters if (MediaController.CheckPermissions( actionContext.Request.Properties, UmbracoContext.Current.Security.CurrentUser, - ApplicationContext.Current.Services.MediaService, nodeId)) + ApplicationContext.Current.Services.MediaService, + ApplicationContext.Current.Services.EntityService, + nodeId)) { base.OnActionExecuting(actionContext); } diff --git a/src/Umbraco.Web/WebApi/Filters/FilterAllowedOutgoingContentAttribute.cs b/src/Umbraco.Web/WebApi/Filters/FilterAllowedOutgoingContentAttribute.cs index 3feb3b682a..331839780a 100644 --- a/src/Umbraco.Web/WebApi/Filters/FilterAllowedOutgoingContentAttribute.cs +++ b/src/Umbraco.Web/WebApi/Filters/FilterAllowedOutgoingContentAttribute.cs @@ -8,6 +8,7 @@ using Umbraco.Core.Models.Membership; using Umbraco.Core.Services; using umbraco.BusinessLogic.Actions; using Umbraco.Core; +using Umbraco.Core.Models; namespace Umbraco.Web.WebApi.Filters { @@ -17,36 +18,70 @@ namespace Umbraco.Web.WebApi.Filters /// internal sealed class FilterAllowedOutgoingContentAttribute : FilterAllowedOutgoingMediaAttribute { + private readonly IUserService _userService; + private readonly IEntityService _entityService; private readonly char _permissionToCheck; public FilterAllowedOutgoingContentAttribute(Type outgoingType) - : base(outgoingType) + : this(outgoingType, ApplicationContext.Current.Services.UserService, ApplicationContext.Current.Services.EntityService) { _permissionToCheck = ActionBrowse.Instance.Letter; } public FilterAllowedOutgoingContentAttribute(Type outgoingType, char permissionToCheck) - : base(outgoingType) + : this(outgoingType, ApplicationContext.Current.Services.UserService, ApplicationContext.Current.Services.EntityService) { _permissionToCheck = permissionToCheck; } public FilterAllowedOutgoingContentAttribute(Type outgoingType, string propertyName) - : base(outgoingType, propertyName) + : this(outgoingType, propertyName, ApplicationContext.Current.Services.UserService, ApplicationContext.Current.Services.EntityService) { _permissionToCheck = ActionBrowse.Instance.Letter; } + + public FilterAllowedOutgoingContentAttribute(Type outgoingType, IUserService userService, IEntityService entityService) + : base(outgoingType) + { + if (userService == null) throw new ArgumentNullException("userService"); + if (entityService == null) throw new ArgumentNullException("entityService"); + _userService = userService; + _entityService = entityService; + _permissionToCheck = ActionBrowse.Instance.Letter; + } + + public FilterAllowedOutgoingContentAttribute(Type outgoingType, char permissionToCheck, IUserService userService, IEntityService entityService) + : base(outgoingType) + { + if (userService == null) throw new ArgumentNullException("userService"); + if (entityService == null) throw new ArgumentNullException("entityService"); + _userService = userService; + _entityService = entityService; + _permissionToCheck = permissionToCheck; + } + + public FilterAllowedOutgoingContentAttribute(Type outgoingType, string propertyName, IUserService userService, IEntityService entityService) + : base(outgoingType, propertyName) + { + if (userService == null) throw new ArgumentNullException("userService"); + if (entityService == null) throw new ArgumentNullException("entityService"); + _userService = userService; + _entityService = entityService; + _permissionToCheck = ActionBrowse.Instance.Letter; + } + + protected override void FilterItems(IUser user, IList items) { base.FilterItems(user, items); - FilterBasedOnPermissions(items, user, ApplicationContext.Current.Services.UserService); + FilterBasedOnPermissions(items, user); } - protected override int GetUserStartNode(IUser user) + protected override int[] GetUserStartNodes(IUser user) { - return user.StartContentId; + return user.CalculateContentStartNodeIds(_entityService); } protected override int RecycleBinId @@ -54,7 +89,7 @@ namespace Umbraco.Web.WebApi.Filters get { return Constants.System.RecycleBinContent; } } - internal void FilterBasedOnPermissions(IList items, IUser user, IUserService userService) + internal void FilterBasedOnPermissions(IList items, IUser user) { var length = items.Count; @@ -66,14 +101,14 @@ namespace Umbraco.Web.WebApi.Filters ids.Add(((dynamic)items[i]).Id); } //get all the permissions for these nodes in one call - var permissions = userService.GetPermissions(user, ids.ToArray()).ToArray(); + var permissions = _userService.GetPermissions(user, ids.ToArray()).ToArray(); var toRemove = new List(); foreach (dynamic item in items) { var nodePermission = permissions.Where(x => x.EntityId == Convert.ToInt32(item.Id)).ToArray(); //if there are no permissions for this id then we need to check what the user's default // permissions are. - if (nodePermission.Any() == false) + if (nodePermission.Length == 0) { //var defaultP = user.DefaultPermissions diff --git a/src/Umbraco.Web/WebApi/Filters/FilterAllowedOutgoingMediaAttribute.cs b/src/Umbraco.Web/WebApi/Filters/FilterAllowedOutgoingMediaAttribute.cs index 36170627d9..beb67f3395 100644 --- a/src/Umbraco.Web/WebApi/Filters/FilterAllowedOutgoingMediaAttribute.cs +++ b/src/Umbraco.Web/WebApi/Filters/FilterAllowedOutgoingMediaAttribute.cs @@ -39,9 +39,9 @@ namespace Umbraco.Web.WebApi.Filters get { return true; } } - protected virtual int GetUserStartNode(IUser user) + protected virtual int[] GetUserStartNodes(IUser user) { - return user.StartMediaId; + return user.CalculateMediaStartNodeIds(ApplicationContext.Current.Services.EntityService); } protected virtual int RecycleBinId @@ -85,8 +85,8 @@ namespace Umbraco.Web.WebApi.Filters var toRemove = new List(); foreach (dynamic item in items) { - var hasPathAccess = (item != null && UserExtensions.HasPathAccess(item.Path, GetUserStartNode(user), RecycleBinId)); - if (!hasPathAccess) + var hasPathAccess = (item != null && UserExtensions.HasPathAccess(item.Path, GetUserStartNodes(user), RecycleBinId)); + if (hasPathAccess == false) { toRemove.Add(item); } diff --git a/src/Umbraco.Web/WebApi/Filters/UmbracoApplicationAuthorizeAttribute.cs b/src/Umbraco.Web/WebApi/Filters/UmbracoApplicationAuthorizeAttribute.cs index 23e0fde1c2..c305ad3339 100644 --- a/src/Umbraco.Web/WebApi/Filters/UmbracoApplicationAuthorizeAttribute.cs +++ b/src/Umbraco.Web/WebApi/Filters/UmbracoApplicationAuthorizeAttribute.cs @@ -33,10 +33,12 @@ namespace Umbraco.Web.WebApi.Filters { return true; } - - return UmbracoContext.Current.Security.CurrentUser != null + + var authorized = UmbracoContext.Current.Security.CurrentUser != null && _appNames.Any(app => UmbracoContext.Current.Security.UserHasAppAccess( app, UmbracoContext.Current.Security.CurrentUser)); + + return authorized; } } } \ No newline at end of file diff --git a/src/Umbraco.Web/WebApi/HttpRequestMessageExtensions.cs b/src/Umbraco.Web/WebApi/HttpRequestMessageExtensions.cs index 00b66094e8..6263428969 100644 --- a/src/Umbraco.Web/WebApi/HttpRequestMessageExtensions.cs +++ b/src/Umbraco.Web/WebApi/HttpRequestMessageExtensions.cs @@ -28,9 +28,17 @@ namespace Umbraco.Web.WebApi internal static Attempt TryGetOwinContext(this HttpRequestMessage request) { var httpContext = request.TryGetHttpContext(); - return httpContext - ? Attempt.Succeed(httpContext.Result.GetOwinContext()) - : Attempt.Fail(); + try + { + return httpContext + ? Attempt.Succeed(httpContext.Result.GetOwinContext()) + : Attempt.Fail(); + } + catch (InvalidOperationException) + { + //this will occur if there is no OWIN environment which generally would only be in things like unit tests + return Attempt.Fail(); + } } /// diff --git a/src/Umbraco.Web/WebApi/UmbracoAuthorizeAttribute.cs b/src/Umbraco.Web/WebApi/UmbracoAuthorizeAttribute.cs index 028c835d90..858027b62a 100644 --- a/src/Umbraco.Web/WebApi/UmbracoAuthorizeAttribute.cs +++ b/src/Umbraco.Web/WebApi/UmbracoAuthorizeAttribute.cs @@ -1,6 +1,7 @@ using System; using System.Web.Http; using Umbraco.Core; +using Umbraco.Web.Security; namespace Umbraco.Web.WebApi { @@ -10,6 +11,8 @@ namespace Umbraco.Web.WebApi /// public sealed class UmbracoAuthorizeAttribute : AuthorizeAttribute { + private readonly bool _requireApproval; + /// /// Can be used by unit tests to enable/disable this filter /// @@ -39,8 +42,14 @@ namespace Umbraco.Web.WebApi _applicationContext = _umbracoContext.Application; } - public UmbracoAuthorizeAttribute() + public UmbracoAuthorizeAttribute() : this(true) { + + } + + public UmbracoAuthorizeAttribute(bool requireApproval) + { + _requireApproval = requireApproval; } protected override bool IsAuthorized(System.Web.Http.Controllers.HttpActionContext actionContext) @@ -59,7 +68,7 @@ namespace Umbraco.Web.WebApi if (appContext.IsConfigured == false) return false; - var isLoggedIn = umbContext.Security.ValidateCurrentUser(); + var isLoggedIn = umbContext.Security.ValidateCurrentUser(false, _requireApproval) == ValidateRequestAttempt.Success; return isLoggedIn; } diff --git a/src/Umbraco.Web/WebApi/UmbracoAuthorizedApiController.cs b/src/Umbraco.Web/WebApi/UmbracoAuthorizedApiController.cs index 9577e840e1..25f85def0f 100644 --- a/src/Umbraco.Web/WebApi/UmbracoAuthorizedApiController.cs +++ b/src/Umbraco.Web/WebApi/UmbracoAuthorizedApiController.cs @@ -5,6 +5,8 @@ using Umbraco.Core.Configuration; using Umbraco.Web.Security; using Umbraco.Web.WebApi.Filters; using umbraco.BusinessLogic; +using Umbraco.Core.Models.Identity; +using Umbraco.Core.Security; namespace Umbraco.Web.WebApi { @@ -20,8 +22,11 @@ namespace Umbraco.Web.WebApi [UmbracoAuthorize] [DisableBrowserCache] [UmbracoWebApiRequireHttps] + [CheckIfUserTicketDataIsStale] public abstract class UmbracoAuthorizedApiController : UmbracoApiController { + + protected UmbracoAuthorizedApiController() { } @@ -34,6 +39,17 @@ namespace Umbraco.Web.WebApi { } + protected UmbracoAuthorizedApiController(UmbracoContext umbracoContext, UmbracoHelper umbracoHelper, BackOfficeUserManager backOfficeUserManager) : base(umbracoContext, umbracoHelper) + { + _userManager = backOfficeUserManager; + } + + private BackOfficeUserManager _userManager; + protected BackOfficeUserManager UserManager + { + get { return _userManager ?? (_userManager = TryGetOwinContext().Result.GetBackOfficeUserManager()); } + } + private bool _userisValidated = false; /// diff --git a/src/Umbraco.Web/WebBootManager.cs b/src/Umbraco.Web/WebBootManager.cs index 71355b98a4..2f6b81820f 100644 --- a/src/Umbraco.Web/WebBootManager.cs +++ b/src/Umbraco.Web/WebBootManager.cs @@ -51,6 +51,7 @@ using Umbraco.Core.Services; using Umbraco.Web.Editors; using Umbraco.Web.HealthCheck; using Umbraco.Web.Profiling; +using Umbraco.Web.Search; using GlobalSettings = Umbraco.Core.Configuration.GlobalSettings; using ProfilingViewEngine = Umbraco.Core.Profiling.ProfilingViewEngine; @@ -376,6 +377,8 @@ namespace Umbraco.Web { base.InitializeResolvers(); + SearchableTreeResolver.Current = new SearchableTreeResolver(ServiceProvider, LoggerResolver.Current.Logger, ApplicationContext.Services.ApplicationTreeService, () => PluginManager.ResolveSearchableTrees()); + XsltExtensionsResolver.Current = new XsltExtensionsResolver(ServiceProvider, LoggerResolver.Current.Logger, () => PluginManager.ResolveXsltExtensions()); EditorValidationResolver.Current= new EditorValidationResolver(ServiceProvider, LoggerResolver.Current.Logger, () => PluginManager.ResolveTypes()); diff --git a/src/Umbraco.Web/WebServices/ScheduledPublishController.cs b/src/Umbraco.Web/WebServices/ScheduledPublishController.cs deleted file mode 100644 index 433930dda9..0000000000 --- a/src/Umbraco.Web/WebServices/ScheduledPublishController.cs +++ /dev/null @@ -1,73 +0,0 @@ -using System; -using System.Web.Mvc; -using umbraco; -using Umbraco.Core.Logging; -using Umbraco.Core.Publishing; -using Umbraco.Web.Mvc; - -namespace Umbraco.Web.WebServices -{ - /// - /// A REST controller used for running the scheduled publishing, this is called from the background worker timer - /// - [AdminTokenAuthorize] - public class ScheduledPublishController : UmbracoController - { - private static bool _isPublishingRunning = false; - - [HttpPost] - public JsonResult Index() - { - if (_isPublishingRunning) - { - Logger.Debug(() => "Scheduled publishing is currently executing this request will exit"); - return null; - } - - _isPublishingRunning = true; - - try - { - // DO not run publishing if content is re-loading - if (content.Instance.isInitializing == false) - { - var publisher = new ScheduledPublisher(Services.ContentService); - var count = publisher.CheckPendingAndProcess(); - Logger.Debug(() => string.Format("The scheduler processed {0} items", count)); - } - - return Json(new - { - success = true - }); - - } - catch (Exception ee) - { - var errorMessage = "Error executing scheduled task"; - if (HttpContext != null && HttpContext.Request != null) - { - if (HttpContext.Request.Url != null) - errorMessage = string.Format("{0} | Request to {1}", errorMessage, HttpContext.Request.Url); - if (HttpContext.Request.UserHostAddress != null) - errorMessage = string.Format("{0} | Coming from {1}", errorMessage, HttpContext.Request.UserHostAddress); - if (HttpContext.Request.UrlReferrer != null) - errorMessage = string.Format("{0} | Referrer {1}", errorMessage, HttpContext.Request.UrlReferrer); - } - LogHelper.Error(errorMessage, ee); - - Response.StatusCode = 400; - - return Json(new - { - success = false, - message = ee.Message - }); - } - finally - { - _isPublishingRunning = false; - } - } - } -} \ No newline at end of file diff --git a/src/Umbraco.Web/app.config b/src/Umbraco.Web/app.config index b4178cfb18..13d7964935 100644 --- a/src/Umbraco.Web/app.config +++ b/src/Umbraco.Web/app.config @@ -53,19 +53,19 @@ - + - + - + - + diff --git a/src/Umbraco.Web/packages.config b/src/Umbraco.Web/packages.config index a584d95639..847c01fa05 100644 --- a/src/Umbraco.Web/packages.config +++ b/src/Umbraco.Web/packages.config @@ -17,11 +17,11 @@ - - - - - + + + + + @@ -32,5 +32,4 @@ - \ No newline at end of file diff --git a/src/Umbraco.Web/umbraco.presentation/library.cs b/src/Umbraco.Web/umbraco.presentation/library.cs index 38b8b1b95d..4ab89c5c7d 100644 --- a/src/Umbraco.Web/umbraco.presentation/library.cs +++ b/src/Umbraco.Web/umbraco.presentation/library.cs @@ -1393,15 +1393,25 @@ namespace umbraco /// An XpathNodeIterator containing the current page as Xml. public static XPathNodeIterator GetXmlNodeCurrent() { + var pageId = ""; + try { var nav = Umbraco.Web.UmbracoContext.Current.ContentCache.GetXPathNavigator(); - nav.MoveToId(HttpContext.Current.Items["pageID"].ToString()); + var pageIdItem = HttpContext.Current.Items["pageID"]; + + if (pageIdItem == null) + { + throw new NullReferenceException("pageID not found in the current HTTP context"); + } + + pageId = pageIdItem.ToString(); + nav.MoveToId(pageId); return nav.Select("."); } catch (Exception ex) { - LogHelper.Error("Could not retrieve current xml node", ex); + LogHelper.Error(string.Concat("Could not retrieve current xml node for page Id ",pageId), ex); } XmlDocument xd = new XmlDocument(); diff --git a/src/Umbraco.Web/umbraco.presentation/macro.cs b/src/Umbraco.Web/umbraco.presentation/macro.cs index 6d2936cd9a..dac3c0e1bf 100644 --- a/src/Umbraco.Web/umbraco.presentation/macro.cs +++ b/src/Umbraco.Web/umbraco.presentation/macro.cs @@ -46,6 +46,7 @@ using System.Linq; using File = System.IO.File; using MacroTypes = umbraco.cms.businesslogic.macro.MacroTypes; using Member = umbraco.cms.businesslogic.member.Member; +using UserControl = System.Web.UI.UserControl; namespace umbraco { diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/Help.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/Help.cs deleted file mode 100644 index 9ff4a8efcb..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/Help.cs +++ /dev/null @@ -1,101 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Xml; - -namespace umbraco.presentation.umbraco -{ - public class Help - { - public string DefaultURL { get; set; } - public List HelpConfigPages { get; set; } - - public Help(XmlNode helpConfigNode) - { - DefaultURL = GetXmlAttributeAsString(helpConfigNode.Attributes["defaultUrl"]); - - HelpConfigPages = new List(); - - foreach (XmlNode linkNode in helpConfigNode.SelectNodes("link")) - { - - HelpConfigPages.Add(new HelpConfigPage - { - Application = GetXmlAttributeAsString(linkNode.Attributes["application"]), - ApplicationUrl = GetXmlAttributeAsString(linkNode.Attributes["applicationUrl"]), - Language = GetXmlAttributeAsString(linkNode.Attributes["language"]), - UserType = GetXmlAttributeAsString(linkNode.Attributes["userType"]), - HelpUrl = GetXmlAttributeAsString(linkNode.Attributes["helpUrl"]) - }); - } - } - - public string ResolveHelpUrl(HelpPage requestedHelpPage) - { - HelpConfigPage bestMatchingConfigPage = null; - - int currentBestMatchCount = 0; - - foreach (HelpConfigPage helpConfigPage in HelpConfigPages) - { - int attributeMatchCount = 0; - - if ((helpConfigPage.Application != "" && String.Compare(helpConfigPage.Application, requestedHelpPage.Application, true) != 0) || - (helpConfigPage.ApplicationUrl != "" && String.Compare(helpConfigPage.ApplicationUrl, requestedHelpPage.ApplicationUrl, true) != 0) || - (helpConfigPage.Language != "" && String.Compare(helpConfigPage.Language, requestedHelpPage.Language, true) != 0) || - (helpConfigPage.UserType != "" && String.Compare(helpConfigPage.UserType, requestedHelpPage.UserType, true) != 0)) - { - continue; - } - - if (String.Compare(helpConfigPage.Application, requestedHelpPage.Application, true) == 0) attributeMatchCount++; - if (String.Compare(helpConfigPage.ApplicationUrl, requestedHelpPage.ApplicationUrl, true) == 0) attributeMatchCount++; - if (String.Compare(helpConfigPage.Language, requestedHelpPage.Language, true) == 0) attributeMatchCount++; - if (String.Compare(helpConfigPage.UserType, requestedHelpPage.UserType, true) == 0) attributeMatchCount++; - - if (attributeMatchCount > currentBestMatchCount) - { - currentBestMatchCount = attributeMatchCount; - bestMatchingConfigPage = helpConfigPage; - } - } - return bestMatchingConfigPage == null ? GenerateDefaultUrl(requestedHelpPage) : GenerateConfiguredUrl(bestMatchingConfigPage); - } - - public string GenerateConfiguredUrl(HelpConfigPage helpConfigPage) - { - return String.Format(helpConfigPage.HelpUrl, - helpConfigPage.Application, - helpConfigPage.ApplicationUrl, - helpConfigPage.Language, - helpConfigPage.UserType).ToLower(); - } - - public string GenerateDefaultUrl(HelpPage helpPage) - { - return string.Format(DefaultURL, - helpPage.Application, - helpPage.ApplicationUrl); - } - - private string GetXmlAttributeAsString(XmlAttribute attribute) { - - if (attribute == null) return ""; - - return attribute.Value.Trim(); - - } - } - - public class HelpPage - { - public string Application { get; set; } - public string ApplicationUrl { get; set; } - public string Language { get; set; } - public string UserType { get; set; } - } - - public class HelpConfigPage : HelpPage - { - public string HelpUrl { get; set; } - } -} \ No newline at end of file diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/BaseContentTree.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/BaseContentTree.cs index 1eacc072bd..e448d9653a 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/BaseContentTree.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/BaseContentTree.cs @@ -360,7 +360,7 @@ function openContent(id) { } else if (!this.IsDialog || (this.DialogMode == TreeDialogModes.id)) { - if (CurrentUser.GetPermissions(dd.Path).Contains(ActionUpdate.Instance.Letter.ToString())) + if (CurrentUser.GetPermissions(dd.Path).Contains(ActionUpdate.Instance.Letter.ToString(CultureInfo.InvariantCulture))) { treeElement.Action = String.Format("javascript:openContent({0});", dd.Id); } diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/UserPermissions.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/UserPermissions.cs deleted file mode 100644 index 3309c0ff8d..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/UserPermissions.cs +++ /dev/null @@ -1,84 +0,0 @@ -using System; -using System.Data; -using System.Configuration; -using System.Web; -using System.Web.Security; -using System.Web.UI; -using System.Web.UI.HtmlControls; -using System.Web.UI.WebControls; -using System.Web.UI.WebControls.WebParts; -using umbraco.businesslogic; -using umbraco.interfaces; -using System.Xml; -using System.Collections.Generic; -using System.Text; -using umbraco.BusinessLogic.Actions; -using Umbraco.Core; - -namespace umbraco.cms.presentation.Trees -{ - [Tree(Constants.Applications.Users, "userPermissions", "User Permissions", sortOrder: 2)] - public class UserPermissions : BaseTree - { - - public UserPermissions(string application) : base(application) { } - - /// - /// don't allow any actions on this tree - /// - /// - protected override void CreateAllowedActions(ref List actions) - { - actions.Clear(); - } - - /// - /// no actions should be able to be performed on the parent node except for refresh - /// - /// - protected override void CreateRootNodeActions(ref List actions) - { - actions.Clear(); - actions.Add(ActionRefresh.Instance); - } - - public override void Render(ref XmlTree tree) - { - foreach (umbraco.BusinessLogic.User user in umbraco.BusinessLogic.User.getAll()) - { - if (user.Id > 0 && !user.Disabled) - { - XmlTreeNode node = XmlTreeNode.Create(this); - node.NodeID = user.Id.ToString(); - node.Text = user.Name; - node.Action = "javascript:openUserPermissions('" + user.Id.ToString() + "');"; - node.Icon = "icon-users"; - - OnBeforeNodeRender(ref tree, ref node, EventArgs.Empty); - if (node != null) - { - tree.Add(node); - OnAfterNodeRender(ref tree, ref node, EventArgs.Empty); - } - - } - } - } - - protected override void CreateRootNode(ref XmlTreeNode rootNode) - { - rootNode.Text = ui.Text("user", "userPermissions"); - } - - public override void RenderJS(ref StringBuilder Javascript) - { - Javascript.Append( - @" -function openUserPermissions(id) { - UmbClientMgr.contentFrame('users/PermissionEditor.aspx?id=' + id); -} -"); - } - - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/UserTypes.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/UserTypes.cs deleted file mode 100644 index 8ac4771672..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/UserTypes.cs +++ /dev/null @@ -1,61 +0,0 @@ -using System; -using System.Data; -using System.Configuration; -using System.Web; -using System.Web.Security; -using System.Web.UI; -using System.Web.UI.WebControls; -using System.Web.UI.WebControls.WebParts; -using System.Web.UI.HtmlControls; -using umbraco.BusinessLogic; -using System.Collections.Generic; -using umbraco.businesslogic; -using Umbraco.Core; - -namespace umbraco.cms.presentation.Trees -{ - [Tree(Constants.Applications.Users, "userTypes", "User Types", sortOrder: 1)] - public class UserTypes : BaseTree - { - - public UserTypes(string application) : base(application) { } - - public override void RenderJS(ref System.Text.StringBuilder Javascript) - { - Javascript.Append( - @" -function openUserTypes(id) { - UmbClientMgr.contentFrame('users/EditUserType.aspx?id=' + id); -} -"); - } - - public override void Render(ref XmlTree tree) - { - List userTypes = UserType.GetAllUserTypes(); - foreach (UserType userType in userTypes) - { - if (userType.Id > 1) //don't show the admin user type, they should always have full permissions - { - XmlTreeNode node = XmlTreeNode.Create(this); - node.NodeID = userType.Id.ToString(); - node.Action = string.Format("javascript:openUserTypes({0})", userType.Id.ToString()); - node.Icon = "icon-users"; - node.Text = userType.Name; - - OnBeforeNodeRender(ref tree, ref node, EventArgs.Empty); - if (node != null) - { - tree.Add(node); - OnAfterNodeRender(ref tree, ref node, EventArgs.Empty); - } - } - } - } - - protected override void CreateRootNode(ref XmlTreeNode rootNode) - { - rootNode.Text = ui.Text("user", "userTypes"); - } - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadContent.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadContent.cs index 49251f2ebd..a2a8b26dea 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadContent.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadContent.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.ComponentModel; using Umbraco.Core.Configuration; using umbraco.BusinessLogic.Actions; using umbraco.businesslogic; @@ -11,11 +12,8 @@ using Action = umbraco.BusinessLogic.Actions.Action; namespace umbraco { - /// - /// Handles loading the content tree into umbraco's application tree - /// + [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete("This is no longer used and will be removed from the codebase in the future")] - //[Tree(Constants.Applications.Content, "content", "Content", silent: true)] public class loadContent : BaseContentTree { diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadDLRScripts.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadDLRScripts.cs index a941772b23..7ab99e93a7 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadDLRScripts.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadDLRScripts.cs @@ -1,4 +1,6 @@ -using System.Text; +using System; +using System.ComponentModel; +using System.Text; using umbraco.cms.presentation.Trees; using Umbraco.Core.IO; using Umbraco.Core; @@ -6,9 +8,8 @@ using Umbraco.Core; namespace umbraco { - /// - /// Handles loading of python items into the developer application tree - /// + [Obsolete("This is no longer used and will be removed in future versions")] + [EditorBrowsable(EditorBrowsableState.Never)] public class loadDLRScripts : FileSystemTree { public loadDLRScripts(string application) : base(application) { } diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadScripts.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadScripts.cs index 563a491ec5..7379c89963 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadScripts.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadScripts.cs @@ -1,6 +1,7 @@ using System; using System.Collections; using System.Collections.Generic; +using System.ComponentModel; using System.Data; using System.IO; using System.Linq; @@ -31,8 +32,9 @@ using Umbraco.Core; namespace umbraco -{ - [Tree(Constants.Applications.Settings, "scripts", "Scripts", "icon-folder", "icon-folder", sortOrder: 2)] +{ + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("This is no longer used and will be removed from the codebase in the future")] public class loadScripts : FileSystemTree { public loadScripts(string application) : base(application) { } diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadTemplates.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadTemplates.cs index ad03d99223..a15ede7606 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadTemplates.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadTemplates.cs @@ -1,6 +1,7 @@ using System; using System.Collections; using System.Collections.Generic; +using System.ComponentModel; using System.Data; using System.Globalization; using System.IO; @@ -34,6 +35,7 @@ using umbraco.BusinessLogic.Actions; namespace umbraco { + [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete("This is no longer used and will be removed from the codebase in the future")] public class loadTemplates : BaseTree { diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadUsers.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadUsers.cs index 5db7a06dab..35cf9878a5 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadUsers.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadUsers.cs @@ -1,6 +1,7 @@ using System; using System.Collections; using System.Collections.Generic; +using System.ComponentModel; using System.Data; using System.IO; using System.Text; @@ -31,10 +32,8 @@ using Umbraco.Core; namespace umbraco { - /// - /// Handles loading of all umbraco users into the users application tree - /// - [Tree(Constants.Applications.Users, "users", "Users")] + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("This is no longer used and will be removed from the codebase in the future")] public class loadUsers : BaseTree { public loadUsers(string application) : base(application) { } diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/channels/Blogger.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/channels/Blogger.cs deleted file mode 100644 index 280be0f5b9..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/channels/Blogger.cs +++ /dev/null @@ -1,161 +0,0 @@ - -using CookComputing.XmlRpc; - -namespace CookComputing.Blogger -{ - /// - /// Struct representing a blog category - /// - public struct Category - { - public string categoryid; - public string title; - public string description; - public string htmlUrl; - public string rssUrl; - } - - /// - /// Struct representing a blog post - /// - public struct Post - { - public System.DateTime dateCreated; - [XmlRpcMember( - Description = "Depending on server may be either string or integer. " - + "Use Convert.ToInt32(userid) to treat as integer or " - + "Convert.ToString(userid) to treat as string")] - - //Livejournal sometimes drops these - [XmlRpcMissingMapping(MappingAction.Ignore)] - public object userid; - [XmlRpcMissingMapping(MappingAction.Ignore)] - public string postid; - public string content; - } - - /// - /// Struct containing user information - /// - public struct UserInfo - { - public string url; - public string email; - public string nickname; - public string lastname; - public string firstname; - } - - /// - /// Struct containing Blog information - /// - public struct BlogInfo - { - public string blogid; - public string url; - public string blogName; - } - - public interface IBlogger - { - [XmlRpcMethod("blogger.deletePost", - Description = "Deletes a post.")] - [return: XmlRpcReturnValue(Description = "Always returns true.")] - bool deletePost( - string appKey, - string postid, - string username, - string password, - [XmlRpcParameter( - Description = "Where applicable, this specifies whether the blog " - + "should be republished after the post has been deleted.")] - bool publish); - - [XmlRpcMethod("blogger.editPost", - Description = "Edits a given post. Optionally, will publish the " - + "blog after making the edit.")] - [return: XmlRpcReturnValue(Description = "Always returns true.")] - object editPost( - string appKey, - string postid, - string username, - string password, - string content, - bool publish); - - [XmlRpcMethod("blogger.getCategories", - Description = "Returns a list of the categories that you can use " - + "to log against a post.")] - Category[] getCategories( - string blogid, - string username, - string password); - - [XmlRpcMethod("blogger.getPost", - Description = "Returns a single post.")] - Post getPost( - string appKey, - string postid, - string username, - string password); - - [XmlRpcMethod("blogger.getRecentPosts", - Description = "Returns a list of the most recent posts in the system.")] - Post[] getRecentPosts( - string appKey, - string blogid, - string username, - string password, - int numberOfPosts); - - [XmlRpcMethod("blogger.getTemplate", - Description = "Returns the main or archive index template of " - + "a given blog.")] - string getTemplate( - string appKey, - string blogid, - string username, - string password, - string templateType); - - [XmlRpcMethod("blogger.getUserInfo", - Description = "Authenticates a user and returns basic user info " - + "(name, email, userid, etc.).")] - UserInfo getUserInfo( - string appKey, - string username, - string password); - - [XmlRpcMethod("blogger.getUsersBlogs", - Description = "Returns information on all the blogs a given user " - + "is a member.")] - BlogInfo[] getUsersBlogs( - string appKey, - string username, - string password); - - [XmlRpcMethod("blogger.newPost", - Description = "Makes a new post to a designated blog. Optionally, " - + "will publish the blog after making the post.")] - [return: XmlRpcReturnValue(Description = "Id of new post")] - string newPost( - string appKey, - string blogid, - string username, - string password, - string content, - bool publish); - - [XmlRpcMethod("blogger.setTemplate", - Description = "Edits the main or archive index template of a given blog.")] - bool setTemplate( - string appKey, - string blogid, - string username, - string password, - string template, - string templateType); - } -} - - diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/channels/DocumentDateComparer.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/channels/DocumentDateComparer.cs deleted file mode 100644 index f5951b9ffb..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/channels/DocumentDateComparer.cs +++ /dev/null @@ -1,48 +0,0 @@ -using System; -using System.Collections; -using System.Text; -using umbraco.cms.businesslogic; -using umbraco.cms.businesslogic.web; -namespace umbraco.presentation.channels -{ - class DocumentDateComparer : IComparer - { - - int IComparer.Compare(Object x, Object y) - { - - if (((Document)x).CreateDateTime > ((Document)y).CreateDateTime) - { - return -1; - } - else - { - return 0; - } - - } - - } - - - class DocumentSortOrderComparer : IComparer - { - - int IComparer.Compare(Object x, Object y) - { - - if (((CMSNode)x).sortOrder > ((CMSNode)y).sortOrder) - { - return -1; - } - else - { - return 0; - } - - } - - } - - -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/channels/MetaWeblog.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/channels/MetaWeblog.cs deleted file mode 100644 index 74b7d5d724..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/channels/MetaWeblog.cs +++ /dev/null @@ -1,139 +0,0 @@ - -using System; -using CookComputing.XmlRpc; - -namespace CookComputing.MetaWeblog -{ - [XmlRpcMissingMapping(MappingAction.Ignore)] - public struct Enclosure - { - public int length; - public string type; - public string url; - } - - [XmlRpcMissingMapping(MappingAction.Ignore)] - public struct Source - { - public string name; - public string url; - } - - [XmlRpcMissingMapping(MappingAction.Ignore)] - public struct Post - { - [XmlRpcMissingMapping(MappingAction.Error)] - [XmlRpcMember(Description = "Required when posting.")] - public DateTime dateCreated; - [XmlRpcMissingMapping(MappingAction.Error)] - [XmlRpcMember(Description = "Required when posting.")] - public string description; - [XmlRpcMissingMapping(MappingAction.Error)] - [XmlRpcMember(Description = "Required when posting.")] - public string title; - - public string[] categories; - public Enclosure enclosure; - public string link; - public string permalink; - [XmlRpcMember( - Description = "Not required when posting. Depending on server may " - + "be either string or integer. " - + "Use Convert.ToInt32(postid) to treat as integer or " - + "Convert.ToString(postid) to treat as string")] - public object postid; - public Source source; - public string userid; - - public object mt_allow_comments; - public object mt_allow_pings; - public object mt_convert_breaks; - public string mt_text_more; - public string mt_excerpt; - } - - public struct CategoryInfo - { - public string description; - public string htmlUrl; - public string rssUrl; - public string title; - public string categoryid; - } - - public struct Category - { - public string categoryId; - public string categoryName; - } - - public struct FileData - { - public byte[] bits; - public string name; - public string type; - } - - public struct UrlData - { - public string url; - } - - public struct MediaObjectInfo - { - public string url; - } - - public interface IMetaWeblog - { - [XmlRpcMethod("metaWeblog.editPost", - Description = "Updates and existing post to a designated blog " - + "using the metaWeblog API. Returns true if completed.")] - object editPost( - string postid, - string username, - string password, - Post post, - bool publish); - - [XmlRpcMethod("metaWeblog.getCategories", - Description = "Retrieves a list of valid categories for a post " - + "using the metaWeblog API. Returns the metaWeblog categories " - + "struct collection.")] - CategoryInfo[] getCategories( - string blogid, - string username, - string password); - - [XmlRpcMethod("metaWeblog.getPost", - Description = "Retrieves an existing post using the metaWeblog " - + "API. Returns the metaWeblog struct.")] - Post getPost( - string postid, - string username, - string password); - - [XmlRpcMethod("metaWeblog.getRecentPosts", - Description = "Retrieves a list of the most recent existing post " - + "using the metaWeblog API. Returns the metaWeblog struct collection.")] - Post[] getRecentPosts( - string blogid, - string username, - string password, - int numberOfPosts); - - [XmlRpcMethod("metaWeblog.newPost", - Description = "Makes a new post to a designated blog using the " - + "metaWeblog API. Returns postid as a string.")] - string newPost( - string blogid, - string username, - string password, - Post post, - bool publish); - - - } -} - - diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/channels/UmbracoMetaWeblogAPI.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/channels/UmbracoMetaWeblogAPI.cs deleted file mode 100644 index b4fa6ed573..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/channels/UmbracoMetaWeblogAPI.cs +++ /dev/null @@ -1,568 +0,0 @@ -using System; -using System.Collections; -using System.Drawing; -using System.IO; -using System.Web; -using CookComputing.Blogger; -using CookComputing.MetaWeblog; -using CookComputing.XmlRpc; -using Umbraco.Core.Configuration; -using Umbraco.Core.IO; -using umbraco.BusinessLogic; -using umbraco.cms.businesslogic; -using umbraco.cms.businesslogic.datatype; -using umbraco.cms.businesslogic.media; -using umbraco.cms.businesslogic.property; -using umbraco.cms.businesslogic.propertytype; -using umbraco.cms.businesslogic.web; -using Umbraco.Core.Logging; -using Umbraco.Core.Security; -using umbraco.presentation.channels.businesslogic; -using Post = CookComputing.MetaWeblog.Post; - -using System.Collections.Generic; -using System.Web.Security; -using Umbraco.Core.IO; -using Umbraco.Core; - -namespace umbraco.presentation.channels -{ - public abstract class UmbracoMetaWeblogAPI : XmlRpcService, IMetaWeblog - { - internal readonly MediaFileSystem _fs; - - protected UmbracoMetaWeblogAPI() - { - _fs = FileSystemProviderManager.Current.GetFileSystemProvider(); - } - - [XmlRpcMethod("blogger.deletePost", - Description = "Deletes a post.")] - [return: XmlRpcReturnValue(Description = "Always returns true.")] - public bool deletePost( - string appKey, - string postid, - string username, - string password, - [XmlRpcParameter( - Description = "Where applicable, this specifies whether the blog " - + "should be republished after the post has been deleted.")] bool publish) - { - if (ValidateUser(username, password)) - { - Channel userChannel = new Channel(username); - new Document(int.Parse(postid)) - .delete(); - return true; - } - return false; - } - - public object editPost( - string postid, - string username, - string password, - Post post, - bool publish) - { - if (ValidateUser(username, password)) - { - Channel userChannel = new Channel(username); - Document doc = new Document(Convert.ToInt32(postid)); - - - doc.Text = HttpContext.Current.Server.HtmlDecode(post.title); - - // Excerpt - if (userChannel.FieldExcerptAlias != null && userChannel.FieldExcerptAlias != "") - doc.getProperty(userChannel.FieldExcerptAlias).Value = RemoveLeftUrl(post.mt_excerpt); - - - if (UmbracoConfig.For.UmbracoSettings().Content.TidyEditorContent) - doc.getProperty(userChannel.FieldDescriptionAlias).Value = library.Tidy(RemoveLeftUrl(post.description), false); - else - doc.getProperty(userChannel.FieldDescriptionAlias).Value = RemoveLeftUrl(post.description); - - UpdateCategories(doc, post, userChannel); - - - if (publish) - { - doc.SaveAndPublish(new User(username)); - } - return true; - } - else - { - return false; - } - } - - private static void UpdateCategories(Document doc, Post post, Channel userChannel) - { - if (userChannel.FieldCategoriesAlias != null && userChannel.FieldCategoriesAlias != "") - { - ContentType blogPostType = ContentType.GetByAlias(userChannel.DocumentTypeAlias); - PropertyType categoryType = blogPostType.getPropertyType(userChannel.FieldCategoriesAlias); - - String[] categories = post.categories; - string categoryValue = ""; - interfaces.IUseTags tags = UseTags(categoryType); - if (tags != null) - { - tags.RemoveTagsFromNode(doc.Id); - for (int i = 0; i < categories.Length; i++) - { - tags.AddTagToNode(doc.Id, categories[i]); - } - //If the IUseTags provider manually set the property value to something on the IData interface then we should persist this - //code commented as for some reason, even though the IUseTags control is setting IData.Value it is null here - //could be a cache issue, or maybe it's a different instance of the IData or something, rather odd - //doc.getProperty(userChannel.FieldCategoriesAlias).Value = categoryType.DataTypeDefinition.DataType.Data.Value; - - //Instead, set the document property to CSV of the tags - this WILL break custom editors for tags which don't adhere to the - //pseudo standard that the .Value of the property contains CSV tags. - doc.getProperty(userChannel.FieldCategoriesAlias).Value = string.Join(",", categories); - } - else - { - for (int i = 0; i < categories.Length; i++) - { - PreValue pv = new PreValue(categoryType.DataTypeDefinition.Id, categories[i]); - categoryValue += pv.Id + ","; - } - if (categoryValue.Length > 0) - categoryValue = categoryValue.Substring(0, categoryValue.Length - 1); - - doc.getProperty(userChannel.FieldCategoriesAlias).Value = categoryValue; - } - } - } - - public CategoryInfo[] getCategories( - string blogid, - string username, - string password) - { - if (ValidateUser(username, password)) - { - Channel userChannel = new Channel(username); - if (userChannel.FieldCategoriesAlias != null && userChannel.FieldCategoriesAlias != "") - { - // Find the propertytype via the document type - ContentType blogPostType = ContentType.GetByAlias(userChannel.DocumentTypeAlias); - PropertyType categoryType = blogPostType.getPropertyType(userChannel.FieldCategoriesAlias); - - // check if the datatype uses tags or prevalues - CategoryInfo[] returnedCategories = null; - interfaces.IUseTags tags = UseTags(categoryType); - if (tags != null) - { - List alltags = tags.GetAllTags(); - if (alltags != null) - { - returnedCategories = new CategoryInfo[alltags.Count]; - int counter = 0; - foreach (interfaces.ITag t in alltags) - { - CategoryInfo ci = new CategoryInfo(); - ci.title = t.TagCaption; - ci.categoryid = t.Id.ToString(); - ci.description = ""; - ci.rssUrl = ""; - ci.htmlUrl = ""; - returnedCategories[counter] = ci; - counter++; - } - } - else - { - returnedCategories = new CategoryInfo[0]; - } - } - else - { - SortedList categories = PreValues.GetPreValues(categoryType.DataTypeDefinition.Id); - returnedCategories = new CategoryInfo[categories.Count]; - IDictionaryEnumerator ide = categories.GetEnumerator(); - int counter = 0; - while (ide.MoveNext()) - { - PreValue category = (PreValue)ide.Value; - CategoryInfo ci = new CategoryInfo(); - ci.title = category.Value; - ci.categoryid = category.Id.ToString(); - ci.description = ""; - ci.rssUrl = ""; - ci.htmlUrl = ""; - returnedCategories[counter] = ci; - counter++; - } - } - - return returnedCategories; - } - } - - throw new ArgumentException("Categories doesn't work for this channel, they might not have been activated. Contact your umbraco administrator."); - } - - public static interfaces.IUseTags UseTags(PropertyType categoryType) - { - if (typeof(interfaces.IUseTags).IsAssignableFrom(categoryType.DataTypeDefinition.DataType.DataEditor.GetType())) - { - interfaces.IUseTags tags = (interfaces.IUseTags)categoryType.DataTypeDefinition.DataType.DataEditor as interfaces.IUseTags; - return tags; - } - return null; - } - - public Post getPost( - string postid, - string username, - string password) - { - if (ValidateUser(username, password)) - { - Channel userChannel = new Channel(username); - Document d = new Document(int.Parse(postid)); - Post p = new Post(); - p.title = d.Text; - p.description = d.getProperty(userChannel.FieldDescriptionAlias).Value.ToString(); - - // Excerpt - if (userChannel.FieldExcerptAlias != null && userChannel.FieldExcerptAlias != "") - p.mt_excerpt = d.getProperty(userChannel.FieldExcerptAlias).Value.ToString(); - - // Categories - if (userChannel.FieldCategoriesAlias != null && userChannel.FieldCategoriesAlias != "" && - d.getProperty(userChannel.FieldCategoriesAlias) != null && - d.getProperty(userChannel.FieldCategoriesAlias).Value != null && - d.getProperty(userChannel.FieldCategoriesAlias).Value.ToString() != "") - { - String categories = d.getProperty(userChannel.FieldCategoriesAlias).Value.ToString(); - char[] splitter = { ',' }; - String[] categoryIds = categories.Split(splitter); - p.categories = categoryIds; - } - - p.postid = postid; - p.permalink = library.NiceUrl(d.Id); - p.dateCreated = d.CreateDateTime; - p.link = p.permalink; - return p; - } - else - throw new ArgumentException(string.Format("Error retriving post with id: '{0}'", postid)); - } - - public Post[] getRecentPosts( - string blogid, - string username, - string password, - int numberOfPosts) - { - if (ValidateUser(username, password)) - { - ArrayList blogPosts = new ArrayList(); - ArrayList blogPostsObjects = new ArrayList(); - - User u = new User(username); - Channel userChannel = new Channel(u.Id); - - - Document rootDoc; - if (userChannel.StartNode > 0) - rootDoc = new Document(userChannel.StartNode); - else - { - if (u.StartNodeId == -1) - { - rootDoc = Document.GetRootDocuments()[0]; - } - else - { - rootDoc = new Document(u.StartNodeId); - } - } - - //store children array here because iterating over an Array object is very inneficient. - var c = rootDoc.Children; - foreach (Document d in c) - { - int count = 0; - blogPosts.AddRange( - findBlogPosts(userChannel, d, u.Name, ref count, numberOfPosts, userChannel.FullTree)); - } - - blogPosts.Sort(new DocumentSortOrderComparer()); - - foreach (Object o in blogPosts) - { - Document d = (Document)o; - Post p = new Post(); - p.dateCreated = d.CreateDateTime; - p.userid = username; - p.title = d.Text; - p.permalink = library.NiceUrl(d.Id); - p.description = d.getProperty(userChannel.FieldDescriptionAlias).Value.ToString(); - p.link = library.NiceUrl(d.Id); - p.postid = d.Id.ToString(); - - if (userChannel.FieldCategoriesAlias != null && userChannel.FieldCategoriesAlias != "" && - d.getProperty(userChannel.FieldCategoriesAlias) != null && - d.getProperty(userChannel.FieldCategoriesAlias).Value != null && - d.getProperty(userChannel.FieldCategoriesAlias).Value.ToString() != "") - { - String categories = d.getProperty(userChannel.FieldCategoriesAlias).Value.ToString(); - char[] splitter = { ',' }; - String[] categoryIds = categories.Split(splitter); - p.categories = categoryIds; - } - - // Excerpt - if (userChannel.FieldExcerptAlias != null && userChannel.FieldExcerptAlias != "") - p.mt_excerpt = d.getProperty(userChannel.FieldExcerptAlias).Value.ToString(); - - - blogPostsObjects.Add(p); - } - - - return (Post[])blogPostsObjects.ToArray(typeof(Post)); - } - else - { - return null; - } - } - - protected ArrayList findBlogPosts(Channel userChannel, Document d, String userName, ref int count, int max, - bool fullTree) - { - ArrayList list = new ArrayList(); - - ContentType ct = d.ContentType; - - if (ct.Alias.Equals(userChannel.DocumentTypeAlias) & - (count < max)) - { - list.Add(d); - count = count + 1; - } - - if (d.Children != null && d.Children.Length > 0 && fullTree) - { - //store children array here because iterating over an Array object is very inneficient. - var c = d.Children; - foreach (Document child in c) - { - if (count < max) - { - list.AddRange(findBlogPosts(userChannel, child, userName, ref count, max, true)); - } - } - } - return list; - } - - public string newPost( - string blogid, - string username, - string password, - Post post, - bool publish) - { - if (ValidateUser(username, password)) - { - Channel userChannel = new Channel(username); - User u = new User(username); - Document doc = - Document.MakeNew(HttpContext.Current.Server.HtmlDecode(post.title), - DocumentType.GetByAlias(userChannel.DocumentTypeAlias), u, - userChannel.StartNode); - - - // Excerpt - if (userChannel.FieldExcerptAlias != null && userChannel.FieldExcerptAlias != "") - doc.getProperty(userChannel.FieldExcerptAlias).Value = RemoveLeftUrl(post.mt_excerpt); - - - // Description - if (UmbracoConfig.For.UmbracoSettings().Content.TidyEditorContent) - doc.getProperty(userChannel.FieldDescriptionAlias).Value = library.Tidy(RemoveLeftUrl(post.description), false); - else - doc.getProperty(userChannel.FieldDescriptionAlias).Value = RemoveLeftUrl(post.description); - - // Categories - UpdateCategories(doc, post, userChannel); - - // check release date - if (post.dateCreated.Year > 0001) - { - publish = false; - doc.ReleaseDate = post.dateCreated; - } - - if (publish) - { - doc.SaveAndPublish(new User(username)); - } - return doc.Id.ToString(); - } - else - throw new ArgumentException("Error creating post"); - } - - protected MediaObjectInfo newMediaObjectLogicForWord( - string blogid, - string username, - string password, - FileData file) - { - UrlData ud = newMediaObjectLogic(blogid, username, password, file); - MediaObjectInfo moi = new MediaObjectInfo(); - moi.url = ud.url; - return moi; - } - protected UrlData newMediaObjectLogic( - string blogid, - string username, - string password, - FileData file) - { - if (ValidateUser(username, password)) - { - User u = new User(username); - Channel userChannel = new Channel(username); - UrlData fileUrl = new UrlData(); - if (userChannel.ImageSupport) - { - Media rootNode; - if (userChannel.MediaFolder > 0) - rootNode = new Media(userChannel.MediaFolder); - else - rootNode = new Media(u.StartMediaId); - - // Create new media - Media m = Media.MakeNew(file.name, MediaType.GetByAlias(userChannel.MediaTypeAlias), u, rootNode.Id); - - Property fileObject = m.getProperty(userChannel.MediaTypeFileProperty); - - var filename = file.name.Replace("/", "_"); - var relativeFilePath = UmbracoMediaFactory.GetRelativePath(fileObject.Id, filename); - - fileObject.Value = _fs.GetUrl(relativeFilePath); - fileUrl.url = fileObject.Value.ToString(); - - if (!fileUrl.url.StartsWith("http")) - { - var protocol = GlobalSettings.UseSSL ? "https" : "http"; - fileUrl.url = protocol + "://" + HttpContext.Current.Request.ServerVariables["SERVER_NAME"] + fileUrl.url; - } - - _fs.AddFile(relativeFilePath, new MemoryStream(file.bits)); - - // Try updating standard file values - try - { - string orgExt = ""; - // Size - if (m.getProperty(Constants.Conventions.Media.Bytes) != null) - m.getProperty(Constants.Conventions.Media.Bytes).Value = file.bits.Length; - // Extension - if (m.getProperty(Constants.Conventions.Media.Extension) != null) - { - orgExt = - ((string) - file.name.Substring(file.name.LastIndexOf(".") + 1, - file.name.Length - file.name.LastIndexOf(".") - 1)); - m.getProperty(Constants.Conventions.Media.Extension).Value = orgExt.ToLower(); - } - // Width and Height - // Check if image and then get sizes, make thumb and update database - if (m.getProperty(Constants.Conventions.Media.Width) != null && m.getProperty(Constants.Conventions.Media.Height) != null && - ",jpeg,jpg,gif,bmp,png,tiff,tif,".IndexOf("," + orgExt.ToLower() + ",") > 0) - { - int fileWidth; - int fileHeight; - - using (var stream = _fs.OpenFile(relativeFilePath)) - { - Image image = Image.FromStream(stream); - fileWidth = image.Width; - fileHeight = image.Height; - stream.Close(); - try - { - m.getProperty(Constants.Conventions.Media.Width).Value = fileWidth.ToString(); - m.getProperty(Constants.Conventions.Media.Height).Value = fileHeight.ToString(); - } - catch (Exception ex) - { - LogHelper.Error("An error occurred reading the media stream", ex); - } - } - - - } - } - catch (Exception ex) - { - LogHelper.Error("An error occurred in newMediaObjectLogic", ex); - } - - return fileUrl; - } - else - throw new ArgumentException( - "Image Support is turned off in this channel. Modify channel settings in umbraco to enable image support."); - } - return new UrlData(); - } - - private static bool ValidateUser(string username, string password) - { - var provider = MembershipProviderExtensions.GetUsersMembershipProvider(); - - return provider.ValidateUser(username, password); - } - - [XmlRpcMethod("blogger.getUsersBlogs", - Description = "Returns information on all the blogs a given user " - + "is a member.")] - public BlogInfo[] getUsersBlogs( - string appKey, - string username, - string password) - { - if (ValidateUser(username, password)) - { - BlogInfo[] blogs = new BlogInfo[1]; - User u = new User(username); - Channel userChannel = new Channel(u.Id); - Document rootDoc; - if (userChannel.StartNode > 0) - rootDoc = new Document(userChannel.StartNode); - else - rootDoc = new Document(u.StartNodeId); - - BlogInfo bInfo = new BlogInfo(); - bInfo.blogName = userChannel.Name; - bInfo.blogid = rootDoc.Id.ToString(); - bInfo.url = library.NiceUrlWithDomain(rootDoc.Id, true); - blogs[0] = bInfo; - - return blogs; - } - - throw new ArgumentException(string.Format("No data found for user with username: '{0}'", username)); - } - - private static string RemoveLeftUrl(string text) - { - return - text.Replace(HttpContext.Current.Request.Url.GetLeftPart(UriPartial.Authority), ""); - } - } -} \ No newline at end of file diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/channels/api.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/channels/api.cs deleted file mode 100644 index ace78f6803..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/channels/api.cs +++ /dev/null @@ -1,223 +0,0 @@ -using System; -using System.Collections; -using CookComputing.MetaWeblog; -using CookComputing.XmlRpc; -using umbraco.BusinessLogic; -using umbraco.cms.businesslogic; -using umbraco.cms.businesslogic.datatype; -using umbraco.cms.businesslogic.propertytype; -using umbraco.cms.businesslogic.web; -using umbraco.presentation.channels.businesslogic; - -namespace umbraco.presentation.channels -{ - /// - /// the umbraco channels API is xml-rpc webservice based on the metaweblog and blogger APIs - /// for editing umbraco data froom external clients - /// - [XmlRpcService( - Name = "umbraco metablog api", - Description = "For editing umbraco data from external clients", - AutoDocumentation = true)] - public class api : UmbracoMetaWeblogAPI, IRemixWeblogApi - { - /// - /// Initializes a new instance of the class. - /// - public api() - { - } - - - /// - /// Makes a new file to a designated blog using the metaWeblog API - /// - /// The blogid. - /// The username. - /// The password. - /// The file. - /// Returns url as a string of a struct. - [XmlRpcMethod("metaWeblog.newMediaObject", - Description = "Makes a new file to a designated blog using the " - + "metaWeblog API. Returns url as a string of a struct.")] - public UrlData newMediaObject( - string blogid, - string username, - string password, - FileData file) - { - return newMediaObjectLogic(blogid, username, password, file); - } - - #region IRemixWeblogApi Members - - /// - /// Gets a summary of all the pages from the blog with the spefied blogId. - /// - /// The blogid. - /// The username. - /// The password. - /// - public wpPageSummary[] getPageList(string blogid, string username, string password) - { - if (User.validateCredentials(username, password, false)) - { - ArrayList blogPosts = new ArrayList(); - ArrayList blogPostsObjects = new ArrayList(); - - User u = new User(username); - Channel userChannel = new Channel(u.Id); - - - Document rootDoc; - if (userChannel.StartNode > 0) - rootDoc = new Document(userChannel.StartNode); - else - rootDoc = new Document(u.StartNodeId); - - //store children array here because iterating over an Array object is very inneficient. - var c = rootDoc.Children; - foreach (Document d in c) - { - int count = 0; - blogPosts.AddRange( - findBlogPosts(userChannel, d, u.Name, ref count, 999, userChannel.FullTree)); - } - - blogPosts.Sort(new DocumentSortOrderComparer()); - - foreach (Object o in blogPosts) - { - Document d = (Document)o; - wpPageSummary p = new wpPageSummary(); - p.dateCreated = d.CreateDateTime; - p.page_title = d.Text; - p.page_id = d.Id; - p.page_parent_id = d.ParentId; - - blogPostsObjects.Add(p); - } - - - return (wpPageSummary[])blogPostsObjects.ToArray(typeof(wpPageSummary)); - } - else - { - return null; - } - } - - /// - /// Gets a specified number of pages from the blog with the spefied blogId - /// - /// The blogid. - /// The username. - /// The password. - /// The number of pages. - /// - public wpPage[] getPages(string blogid, string username, string password, int numberOfItems) - { - if (User.validateCredentials(username, password, false)) - { - ArrayList blogPosts = new ArrayList(); - ArrayList blogPostsObjects = new ArrayList(); - - User u = new User(username); - Channel userChannel = new Channel(u.Id); - - - Document rootDoc; - if (userChannel.StartNode > 0) - rootDoc = new Document(userChannel.StartNode); - else - rootDoc = new Document(u.StartNodeId); - - //store children array here because iterating over an Array object is very inneficient. - var c = rootDoc.Children; - foreach (Document d in c) - { - int count = 0; - blogPosts.AddRange( - findBlogPosts(userChannel, d, u.Name, ref count, numberOfItems, userChannel.FullTree)); - } - - blogPosts.Sort(new DocumentSortOrderComparer()); - - foreach (Object o in blogPosts) - { - Document d = (Document)o; - wpPage p = new wpPage(); - p.dateCreated = d.CreateDateTime; - p.title = d.Text; - p.page_id = d.Id; - p.wp_page_parent_id = d.ParentId; - p.wp_page_parent_title = d.Parent.Text; - p.permalink = library.NiceUrl(d.Id); - p.description = d.getProperty(userChannel.FieldDescriptionAlias).Value.ToString(); - p.link = library.NiceUrl(d.Id); - - if (userChannel.FieldCategoriesAlias != null && userChannel.FieldCategoriesAlias != "" && - d.getProperty(userChannel.FieldCategoriesAlias) != null && - ((string)d.getProperty(userChannel.FieldCategoriesAlias).Value) != "") - { - String categories = d.getProperty(userChannel.FieldCategoriesAlias).Value.ToString(); - char[] splitter = { ',' }; - String[] categoryIds = categories.Split(splitter); - p.categories = categoryIds; - } - - - blogPostsObjects.Add(p); - } - - - return (wpPage[])blogPostsObjects.ToArray(typeof(wpPage)); - } - else - { - return null; - } - } - - /// - /// Creates a new blog category / tag. - /// - /// The blogid. - /// The username. - /// The password. - /// The category. - /// - public string newCategory( - string blogid, - string username, - string password, - wpCategory category) - { - if (User.validateCredentials(username, password, false)) - { - Channel userChannel = new Channel(username); - if (userChannel.FieldCategoriesAlias != null && userChannel.FieldCategoriesAlias != "") - { - // Find the propertytype via the document type - ContentType blogPostType = ContentType.GetByAlias(userChannel.DocumentTypeAlias); - PropertyType categoryType = blogPostType.getPropertyType(userChannel.FieldCategoriesAlias); - interfaces.IUseTags tags = UseTags(categoryType); - if (tags != null) - { - tags.AddTag(category.name); - } - else - { - PreValue pv = new PreValue(); - pv.DataTypeId = categoryType.DataTypeDefinition.Id; - pv.Value = category.name; - pv.Save(); - } - } - } - return ""; - } - - #endregion - } -} \ No newline at end of file diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/channels/config.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/channels/config.cs deleted file mode 100644 index 3cb25cb765..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/channels/config.cs +++ /dev/null @@ -1,239 +0,0 @@ -using System; -using System.IO; -using System.Web; -using System.Xml; -using umbraco.BusinessLogic; -using Umbraco.Core.IO; - -namespace umbraco.presentation.channels.businesslogic -{ - public class config - { - private static XmlDocument _metablogConfigFile; - - public static XmlDocument MetaBlogConfigFile - { - get - { - if (_metablogConfigFile == null) - { - _metablogConfigFile = new XmlDocument(); - _metablogConfigFile.Load(IOHelper.MapPath(SystemFiles.MetablogConfig)); - } - - return _metablogConfigFile; - } - } - } - - public class Channel - { - public Channel(string username) - { - User u = new User(username); - initialize(u.Id); - } - - public Channel(int UserId) - { - initialize(UserId); - } - - private void initialize(int UserId) - { - XmlDocument configFile = config.MetaBlogConfigFile; - XmlNode channelXml = configFile.SelectSingleNode(string.Format("//channel [user = '{0}']", UserId)); - if (channelXml != null) - { - Id = UserId; - User = new User(UserId); - Name = channelXml.SelectSingleNode("./name").FirstChild.Value; - StartNode = int.Parse(channelXml.SelectSingleNode("./startNode").FirstChild.Value); - FullTree = bool.Parse(channelXml.SelectSingleNode("./fullTree").FirstChild.Value); - DocumentTypeAlias = channelXml.SelectSingleNode("./documentTypeAlias").FirstChild.Value; - if (channelXml.SelectSingleNode("./fields/categories").FirstChild != null) - FieldCategoriesAlias = channelXml.SelectSingleNode("./fields/categories").FirstChild.Value; - if (channelXml.SelectSingleNode("./fields/description").FirstChild != null) - FieldDescriptionAlias = channelXml.SelectSingleNode("./fields/description").FirstChild.Value; - if (channelXml.SelectSingleNode("./fields/excerpt") != null && channelXml.SelectSingleNode("./fields/excerpt").FirstChild != null) - FieldExcerptAlias = channelXml.SelectSingleNode("./fields/excerpt").FirstChild.Value; - - XmlNode mediaSupport = channelXml.SelectSingleNode("./mediaObjectSupport"); - ImageSupport = bool.Parse(mediaSupport.Attributes.GetNamedItem("enabled").Value); - MediaFolder = int.Parse(mediaSupport.Attributes.GetNamedItem("folderId").Value); - MediaTypeAlias = mediaSupport.Attributes.GetNamedItem("mediaTypeAlias").Value; - MediaTypeFileProperty = mediaSupport.Attributes.GetNamedItem("mediaTypeFileProperty").Value; - } - else - throw new ArgumentException(string.Format("No channel found for user with id: '{0}'", UserId)); - } - - public Channel() - { - } - - public void Save() - { - // update node - XmlDocument configFile = config.MetaBlogConfigFile; - XmlNode channelXml = null; - if (User != null && User.Id > -1) - channelXml = configFile.SelectSingleNode(string.Format("//channel [user = '{0}']", this.User.Id)); - if (channelXml != null) - configFile.DocumentElement.RemoveChild(channelXml); - - // add new node - XmlElement newChannelxml = configFile.CreateElement("channel"); - newChannelxml.AppendChild( - xmlHelper.addTextNode(configFile, "name", Name)); - newChannelxml.AppendChild( - xmlHelper.addTextNode(configFile, "user", User.Id.ToString())); - newChannelxml.AppendChild( - xmlHelper.addTextNode(configFile, "startNode", StartNode.ToString())); - newChannelxml.AppendChild( - xmlHelper.addTextNode(configFile, "fullTree", FullTree.ToString())); - newChannelxml.AppendChild( - xmlHelper.addTextNode(configFile, "documentTypeAlias", DocumentTypeAlias)); - - // fields - XmlElement fieldsxml = configFile.CreateElement("fields"); - fieldsxml.AppendChild( - xmlHelper.addTextNode(configFile, "categories", FieldCategoriesAlias)); - fieldsxml.AppendChild( - xmlHelper.addTextNode(configFile, "description", FieldDescriptionAlias)); - fieldsxml.AppendChild( - xmlHelper.addTextNode(configFile, "excerpt", FieldExcerptAlias)); - newChannelxml.AppendChild(fieldsxml); - - - // media - XmlElement media = configFile.CreateElement("mediaObjectSupport"); - media.Attributes.Append(xmlHelper.addAttribute(configFile, "enabled", ImageSupport.ToString())); - media.Attributes.Append(xmlHelper.addAttribute(configFile, "folderId", MediaFolder.ToString())); - media.Attributes.Append(xmlHelper.addAttribute(configFile, "mediaTypeAlias", MediaTypeAlias)); - media.Attributes.Append(xmlHelper.addAttribute(configFile, "mediaTypeFileProperty", MediaTypeFileProperty)); - newChannelxml.AppendChild(media); - configFile.DocumentElement.AppendChild(newChannelxml); - - configFile.Save( IOHelper.MapPath( SystemFiles.MetablogConfig )); - - - } - - private string _fieldExcerptAlias; - - public string FieldExcerptAlias - { - get { return _fieldExcerptAlias; } - set { _fieldExcerptAlias = value; } - } - - - private string _mediaTypeFileProperty; - - public string MediaTypeFileProperty - { - get { return _mediaTypeFileProperty; } - set { _mediaTypeFileProperty = value; } - } - - - private string _mediaTypeAlias; - - public string MediaTypeAlias - { - get { return _mediaTypeAlias; } - set { _mediaTypeAlias = value; } - } - - - private int _mediaFolder; - - public int MediaFolder - { - get { return _mediaFolder; } - set { _mediaFolder = value; } - } - - - private bool _imageSupport; - - public bool ImageSupport - { - get { return _imageSupport; } - set { _imageSupport = value; } - } - - - private int _startNode; - - public int StartNode - { - get { return _startNode; } - set { _startNode = value; } - } - - - private int _id; - - public int Id - { - get { return _id; } - set { _id = value; } - } - - - private string _fieldCategoriesAlias; - - public string FieldCategoriesAlias - { - get { return _fieldCategoriesAlias; } - set { _fieldCategoriesAlias = value; } - } - - - private string _fieldDescriptionAlias; - - public string FieldDescriptionAlias - { - get { return _fieldDescriptionAlias; } - set { _fieldDescriptionAlias = value; } - } - - - private string _documentTypeAlias; - - public string DocumentTypeAlias - { - get { return _documentTypeAlias; } - set { _documentTypeAlias = value; } - } - - - private bool _fulltree; - - public bool FullTree - { - get { return _fulltree; } - set { _fulltree = value; } - } - - - private User _user; - - public User User - { - get { return _user; } - set { _user = value; } - } - - - private string _name; - - public string Name - { - get { return _name; } - set { _name = value; } - } - } -} \ No newline at end of file diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/channels/remixWeblogApi.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/channels/remixWeblogApi.cs deleted file mode 100644 index 6c9103e669..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/channels/remixWeblogApi.cs +++ /dev/null @@ -1,90 +0,0 @@ -using System; -using System.Data; -using System.Configuration; -using System.Web; -using System.Web.Security; -using System.Web.UI; -using System.Web.UI.WebControls; -using System.Web.UI.WebControls.WebParts; -using System.Web.UI.HtmlControls; -using CookComputing.MetaWeblog; -using CookComputing.XmlRpc; - -namespace umbraco.presentation.channels -{ - - [XmlRpcMissingMapping(MappingAction.Ignore)] - public struct wpPage - { - public DateTime dateCreated; - public int userid; - public int page_id; - public string page_status; - public string description; - public string title; - public string link; - public string permalink; - public string[] categories; - public string excerpt; - public string text_more; - public int mt_allow_comments; - public int mt_allow_pings; - - public string wp_slug; - public string wp_password; - public string wp_author; - public int wp_page_parent_id; - public string wp_page_parent_title; - public int wp_page_order; - public int wp_author_id; - public string wp_author_display_name; - - } - - [XmlRpcMissingMapping(MappingAction.Ignore)] - public struct wpPageSummary - { - public int page_id; - public string page_title; - public int page_parent_id; - public DateTime dateCreated; - - } - [XmlRpcMissingMapping(MappingAction.Ignore)] - public struct wpCategory - { - public string name; - public string slug; - public int parent_id; - string description; - } - - - public interface IRemixWeblogApi - { - [XmlRpcMethod("wp.getPageList", - Description = "Retrieves a list of pages as summary from the current channel")] - wpPageSummary[] getPageList( - string blogid, - string username, - string password); - - [XmlRpcMethod("wp.getPages", - Description = "Retrieves a list of pages from the current channel")] - wpPage[] getPages( - string blogid, - string username, - string password, - int numberOfItems); - - [XmlRpcMethod("wp.newCategory", - Description = "Adds a new category")] - string newCategory( - string blogid, - string username, - string password, - wpCategory category); - - } - -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/channels/rsd.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/channels/rsd.aspx.cs deleted file mode 100644 index 7686a48738..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/channels/rsd.aspx.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System; -using System.Data; -using System.Configuration; -using System.Collections; -using System.Web; -using System.Web.Security; -using System.Web.UI; -using System.Web.UI.WebControls; -using System.Web.UI.WebControls.WebParts; -using System.Web.UI.HtmlControls; - -namespace umbraco.presentation.umbraco.channels -{ - [Obsolete("This class is no longer used and will be removed from the codebase in future versions")] - public partial class rsd : System.Web.UI.Page - { - protected void Page_Load(object sender, EventArgs e) - { - Response.ContentType = "text/xml"; - } - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/channels/wlwmanifest.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/channels/wlwmanifest.aspx.cs deleted file mode 100644 index 51b7b38335..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/channels/wlwmanifest.aspx.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System; -using System.Data; -using System.Configuration; -using System.Collections; -using System.Web; -using System.Web.Security; -using System.Web.UI; -using System.Web.UI.WebControls; -using System.Web.UI.WebControls.WebParts; -using System.Web.UI.HtmlControls; - -namespace umbraco.presentation.channels -{ - [Obsolete("This class is no longer used and will be removed from the codebase in future versions")] - public partial class wlwmanifest : System.Web.UI.Page - { - protected void Page_Load(object sender, EventArgs e) - { - bool useXhtml = false; - if (bool.TryParse(GlobalSettings.EditXhtmlMode, out useXhtml) && !useXhtml) - { - xhtml.Text = "no"; - } - else - { - xhtml.Text = "yes"; - } - } - - /// - /// xhtml control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Literal xhtml; - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/channels/wordApi.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/channels/wordApi.cs deleted file mode 100644 index cc9fcf1e64..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/channels/wordApi.cs +++ /dev/null @@ -1,32 +0,0 @@ -using CookComputing.MetaWeblog; -using CookComputing.XmlRpc; - -namespace umbraco.presentation.channels -{ - /// - /// Summary description for Test. - /// - [XmlRpcService( - Name = "umbraco metablog test", - Description = "For editing umbraco data from external clients", - AutoDocumentation = true)] - public class wordApi : UmbracoMetaWeblogAPI - { - public wordApi() - { - } - - [XmlRpcMethod("metaWeblog.newMediaObject", - Description = "Makes a new file to a designated blog using the " - + "metaWeblog API. Returns url as a string of a struct.")] - public MediaObjectInfo newMediaObject( - string blogid, - string username, - string password, - FileData file) - { - return newMediaObjectLogicForWord(blogid.ToString(), username, password, file); - } - - } -} \ No newline at end of file diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/controls/Images/ImageViewerUpdater.asmx b/src/Umbraco.Web/umbraco.presentation/umbraco/controls/Images/ImageViewerUpdater.asmx deleted file mode 100644 index e5ab3a9652..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/controls/Images/ImageViewerUpdater.asmx +++ /dev/null @@ -1 +0,0 @@ -<%@ WebService Language="C#" CodeBehind="ImageViewerUpdater.asmx.cs" Class="umbraco.controls.Images.ImageViewerUpdater" %> diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/controls/Images/ImageViewerUpdater.asmx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/controls/Images/ImageViewerUpdater.asmx.cs deleted file mode 100644 index 4818edfd81..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/controls/Images/ImageViewerUpdater.asmx.cs +++ /dev/null @@ -1,73 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Web; -using System.Web.Services; -using System.ComponentModel; -using System.Web.Script.Services; -using System.Web.UI; -using umbraco.controls.Images; -using System.IO; -using System.Web.Script.Serialization; -using umbraco.businesslogic.Utils; -using umbraco.presentation.webservices; - -namespace umbraco.controls.Images -{ - /// - /// An ajax service to return the html for an image based on a media id - /// - [WebService(Namespace = "http://tempuri.org/")] - [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] - [ToolboxItem(false)] - [ScriptService] - [Obsolete("This is no longer used and will be removed in future versions")] - public class ImageViewerUpdater : System.Web.Services.WebService - { - - /// - /// return the a json object with the properties - /// html = the html returned for rendering the image viewer - /// mediaId = the media id loaded - /// width = the width of the media (0) if not found - /// height = the height of the media (0) if not found - /// url = the url of the image - /// alt = the alt text for the image - /// - /// - [WebMethod] - public Dictionary UpdateImage(int mediaId, string style, string linkTarget) - { - legacyAjaxCalls.Authorize(); - - - //load the control with the specified properties and render the output as a string and return it - Page page = new Page(); - string path = Umbraco.Core.IO.IOHelper.ResolveUrl(Umbraco.Core.IO.SystemDirectories.Umbraco) + "/controls/Images/ImageViewer.ascx"; - - ImageViewer imageViewer = page.LoadControl(path) as ImageViewer; - imageViewer.MediaId = mediaId; - ImageViewer.Style _style = (ImageViewer.Style)Enum.Parse(typeof(ImageViewer.Style), style); - imageViewer.ViewerStyle = _style; - imageViewer.LinkTarget = linkTarget; - - //this adds only the anchor with image to be rendered, not the whole control! - page.Controls.Add(imageViewer); - - imageViewer.DataBind(); - - StringWriter sw = new StringWriter(); - HttpContext.Current.Server.Execute(page, sw, false); - - Dictionary rVal = new Dictionary(); - rVal.Add("html", sw.ToString()); - rVal.Add("mediaId", imageViewer.MediaId.ToString()); - rVal.Add("width", imageViewer.FileWidth.ToString()); - rVal.Add("height", imageViewer.FileHeight.ToString()); - rVal.Add("url", imageViewer.MediaItemPath); - rVal.Add("alt", imageViewer.AltText); - - return rVal; - } - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/controls/Images/UploadMediaImage.ascx b/src/Umbraco.Web/umbraco.presentation/umbraco/controls/Images/UploadMediaImage.ascx deleted file mode 100644 index 5c8cfd3257..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/controls/Images/UploadMediaImage.ascx +++ /dev/null @@ -1,28 +0,0 @@ -<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="UploadMediaImage.ascx.cs" - Inherits="umbraco.controls.Images.UploadMediaImage" %> -<%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %> -<%@ Register TagPrefix="umb" Namespace="ClientDependency.Core.Controls" Assembly="ClientDependency.Core" %> -<%@ Register TagPrefix="ctl" Namespace="umbraco.controls" Assembly="umbraco" %> - - - - - - - - - - - - - - - - - - - - diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/controls/Images/UploadMediaImage.ascx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/controls/Images/UploadMediaImage.ascx.cs deleted file mode 100644 index 24d115c6d6..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/controls/Images/UploadMediaImage.ascx.cs +++ /dev/null @@ -1,115 +0,0 @@ -using System; -using System.Web.UI; -using System.Web.UI.HtmlControls; -using System.Linq; -using System.Xml; -using umbraco.BasePages; -using umbraco.cms.businesslogic.datatype; -using umbraco.interfaces; -using Media = umbraco.cms.businesslogic.media.Media; -using Umbraco.Core; - -namespace umbraco.controls.Images -{ - - /// - /// A control to render out the controls to upload a new image to media. - /// Includes ability to select where in the media you would like it to upload and also supports client - /// callback methods once complete. - /// - public partial class UploadMediaImage : UserControl - { - - public UploadMediaImage() - { - OnClientUpload = ""; - } - - /// - /// The JavaScript method to be invoked once the image is uploaded, the page is rendered and the document is ready. - /// The method will receive a JSON object with the following parameters: - /// - imagePath - /// - thumbnailPath - /// - width - /// - height - /// - id - /// - public string OnClientUpload { get; set; } - - protected IDataType UploadField = DataTypeDefinition.GetByDataTypeId(new Guid(Constants.PropertyEditors.UploadField)).DataType; - - protected override void OnInit(EventArgs e) - { - - base.OnInit(e); - // Get upload field from datafield factory - UploadControl.Controls.Add((Control)UploadField.DataEditor); - } - - protected void Page_Load(object sender, EventArgs e) - { - - ((HtmlInputFile)UploadField.DataEditor).ID = "uploadFile"; - if (!IsPostBack) - { - DataBind(); - } - - - } - - protected void SubmitButton_Click(object sender, EventArgs e) - { - var media = Media.MakeNew(TextBoxTitle.Text, cms.businesslogic.media.MediaType.GetByAlias(Constants.Conventions.MediaTypes.Image), BasePage.Current.getUser(), int.Parse(MediaPickerControl.Value)); - - foreach (var property in media.GenericProperties) - { - if (property.PropertyType.DataTypeDefinition.DataType.Id == UploadField.Id) - { - UploadField.DataTypeDefinitionId = property.PropertyType.DataTypeDefinition.Id; - UploadField.Data.PropertyId = property.Id; - } - } - UploadField.DataEditor.Save(); - //MCH NOTE: After having refactored the legacy api to use the new api under the hood, it is necessary to set the property value and save the media. - var prop = media.GenericProperties.FirstOrDefault(x => x.PropertyType.DataTypeDefinition.DataType.Id == UploadField.Id); - prop.Value = UploadField.Data.Value; - media.Save(); - - pane_upload.Visible = false; - - //this seems real ugly since we apparently already have the properties above (props)... but this data layer is insane and undecipherable:) - string mainImage = media.getProperty(Constants.Conventions.Media.File).Value.ToString(); - string extension = mainImage.Substring(mainImage.LastIndexOf(".") + 1, mainImage.Length - mainImage.LastIndexOf(".") - 1); - var thumbnail = mainImage.Remove(mainImage.Length - extension.Length - 1, extension.Length + 1) + "_thumb." + extension; - string width = media.getProperty(Constants.Conventions.Media.Width).Value.ToString(); - string height = media.getProperty(Constants.Conventions.Media.Height).Value.ToString(); - int id = media.Id; - - feedback.Style.Add("margin-top", "8px"); - feedback.type = uicontrols.Feedback.feedbacktype.success; - if (mainImage.StartsWith("~")) mainImage = mainImage.Substring(1); - if (thumbnail.StartsWith("~")) thumbnail = thumbnail.Substring(1); - feedback.Text += ""; - - if (!string.IsNullOrEmpty(OnClientUpload)) - { - feedback.Text += @" - "; - } - - } - - protected override void OnPreRender(EventArgs e) - { - base.OnPreRender(e); - - ((HtmlInputFile)UploadField.DataEditor).Attributes.Add("onChange", "uploader_" + this.ClientID + ".validateImage();"); - } - } -} \ No newline at end of file diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/controls/Images/UploadMediaImage.ascx.designer.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/controls/Images/UploadMediaImage.ascx.designer.cs deleted file mode 100644 index 0ecc358f57..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/controls/Images/UploadMediaImage.ascx.designer.cs +++ /dev/null @@ -1,109 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:2.0.50727.4200 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace umbraco.controls.Images -{ - - - public partial class UploadMediaImage { - - /// - /// JsInclude1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::ClientDependency.Core.Controls.JsInclude JsInclude1; - - /// - /// pane_upload control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.Pane pane_upload; - - /// - /// pp_name control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.PropertyPanel pp_name; - - /// - /// TextBoxTitle control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.TextBox TextBoxTitle; - - /// - /// pp_file control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.PropertyPanel pp_file; - - /// - /// UploadControl control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.PlaceHolder UploadControl; - - /// - /// pp_target control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.PropertyPanel pp_target; - - /// - /// pp_button control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.PropertyPanel pp_button; - - /// - /// SubmitButton control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Button SubmitButton; - - /// - /// feedback control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.Feedback feedback; - - protected global::umbraco.controls.ContentPicker MediaPickerControl; - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/controls/passwordChanger.ascx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/controls/passwordChanger.ascx.cs deleted file mode 100644 index c7e5aedc5a..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/controls/passwordChanger.ascx.cs +++ /dev/null @@ -1,151 +0,0 @@ -using System; -using System.Configuration.Provider; -using System.Data; -using System.Configuration; -using System.Collections; -using System.Web; -using System.Web.Security; -using System.Web.UI; -using System.Web.UI.WebControls; -using System.Web.UI.WebControls.WebParts; -using System.Web.UI.HtmlControls; -using Umbraco.Core; -using Umbraco.Core.Security; -using Umbraco.Web.Models; - -namespace umbraco.controls -{ - public partial class passwordChanger : UserControl - { - public string MembershipProviderName { get; set; } - - protected MembershipProvider Provider - { - get { return Membership.Providers[MembershipProviderName]; } - } - - private bool? _showOldPassword; - - /// - /// Determines whether to show the old password field or not - /// - internal protected bool ShowOldPassword - { - get - { - if (_showOldPassword.HasValue == false) - { - var umbProvider = Provider as MembershipProviderBase; - if (umbProvider != null && umbProvider.AllowManuallyChangingPassword) - { - _showOldPassword = false; - } - else - { - _showOldPassword = Provider.EnablePasswordRetrieval == false; - } - } - return _showOldPassword.Value; - } - internal set { _showOldPassword = value; } - } - - public bool IsChangingPassword - { - get - { - var convertAttempt = IsChangingPasswordField.Value.TryConvertTo(); - return convertAttempt.Success && convertAttempt.Result; - } - } - - private readonly ChangingPasswordModel _model = new ChangingPasswordModel(); - - public ChangingPasswordModel ChangingPasswordModel - { - get - { - _model.NewPassword = umbPasswordChanger_passwordNew.Text; - _model.OldPassword = umbPasswordChanger_passwordCurrent.Text; - _model.Reset = ResetPasswordCheckBox.Checked; - return _model; - } - } - - [Obsolete("Use the ChangingPasswordModel instead")] - public string Password - { - get { return ChangingPasswordModel.NewPassword; } - } - - protected override void OnLoad(EventArgs e) - { - base.OnLoad(e); - - if (Membership.Providers[MembershipProviderName] == null) - { - throw new ProviderException("The membership provider " + MembershipProviderName + " was not found"); - } - - //TODO: WE need to support this! - requires UI updates, etc... - if (Provider.RequiresQuestionAndAnswer) - { - throw new NotSupportedException("Currently the user editor does not support providers that have RequiresQuestionAndAnswer specified"); - } - } - - /// - /// umbPasswordChanger_passwordNew control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.TextBox umbPasswordChanger_passwordNew; - - /// - /// umbPasswordChanger_passwordNewConfirm control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.TextBox umbPasswordChanger_passwordNewConfirm; - - /// - /// CompareValidator1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.CompareValidator ConfirmPasswordValidator; - - /// - /// IsChangingPassword control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.HiddenField IsChangingPasswordField; - - /// - /// ResetPasswordCheckBox control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.CheckBox ResetPasswordCheckBox; - - /// - /// umbPasswordChanger_passwordCurrent control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.TextBox umbPasswordChanger_passwordCurrent; - } -} \ No newline at end of file diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/create/DLRScripting.ascx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/create/DLRScripting.ascx.cs deleted file mode 100644 index 1b8a29ee56..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/create/DLRScripting.ascx.cs +++ /dev/null @@ -1,185 +0,0 @@ -using System; -using System.Collections; -using System.Configuration; -using System.Data; -using System.Linq; -using System.Web; -using System.Web.Security; -using System.Web.UI; -using System.Web.UI.HtmlControls; -using System.Web.UI.WebControls; -using System.Web.UI.WebControls.WebParts; -using System.Xml.Linq; -using Umbraco.Core; -using Umbraco.Core.IO; -using Umbraco.Web.UI; -using umbraco.cms.businesslogic.macro; -using umbraco.scripting; -using umbraco.BasePages; - -namespace umbraco.presentation.create -{ - public partial class DLRScripting : System.Web.UI.UserControl - { - protected System.Web.UI.WebControls.ListBox nodeType; - - protected void Page_Load(object sender, System.EventArgs e) - { - sbmt.Text = ui.Text("create"); - if (!Page.IsPostBack) - { - foreach (MacroEngineLanguage lang in MacroEngineFactory.GetSupportedUILanguages()) - { - filetype.Items.Add(new ListItem(string.Format(".{0} ({1})", lang.Extension.ToLowerInvariant(), lang.EngineName), lang.Extension)); - } - filetype.SelectedIndex = 0; - } - LoadTemplates(template, filetype.SelectedValue); - } - - protected void MacroExistsValidator_OnServerValidate(object source, ServerValidateEventArgs args) - { - if (createMacro.Checked) - { - //TODO: Shouldn't this use our string functions to create the alias ? - var fileName = rename.Text + "." + filetype.SelectedValue; - var name = fileName - .Substring(0, (fileName.LastIndexOf('.') + 1)).Trim('.') - .SplitPascalCasing().ToFirstUpperInvariant(); - - var macro = ApplicationContext.Current.Services.MacroService.GetByAlias(name); - if (macro != null) - { - args.IsValid = false; - } - } - } - - protected void sbmt_Click(object sender, System.EventArgs e) - { - if (Page.IsValid) - { - var createMacroVal = 0; - if (createMacro.Checked) - createMacroVal = 1; - - var returnUrl = LegacyDialogHandler.Create( - new HttpContextWrapper(Context), - BasePage.Current.getUser(), - helper.Request("nodeType"), - createMacroVal, - template.SelectedValue + "|||" + rename.Text + "." + filetype.SelectedValue); - - BasePage.Current.ClientTools - .ChangeContentFrameUrl(returnUrl) - .ChildNodeCreated() - .CloseModalWindow(); - } - } - - public void loadTemplates(object sender, EventArgs e) - { - LoadTemplates(template, filetype.SelectedValue); - } - - private void LoadTemplates(ListBox list, string scriptType) - { - string path = SystemDirectories.Umbraco + "/scripting/templates/" + scriptType + "/"; - string abPath = IOHelper.MapPath(path); - list.Items.Clear(); - - // always add the option of an empty one - list.Items.Add(scriptType == "cshtml" - ? new ListItem("Empty template", "cshtml/EmptyTemplate.cshtml") - : new ListItem("Empty template", "")); - - if (System.IO.Directory.Exists(abPath)) - { - string extension = "." + scriptType; - - //Already adding Empty Template as the first item, so don't add it again - foreach (System.IO.FileInfo fi in new System.IO.DirectoryInfo(abPath).GetFiles("*" + extension).Where(fi => fi.Name != "EmptyTemplate.cshtml")) - { - string filename = System.IO.Path.GetFileName(fi.FullName); - - var liText = filename.Replace(extension, "").SplitPascalCasing().ToFirstUpperInvariant(); - list.Items.Add(new ListItem(liText, scriptType + "/" + filename)); - } - } - } - - protected global::System.Web.UI.WebControls.CustomValidator MacroExistsValidator; - - /// - /// rename control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.TextBox rename; - - /// - /// RequiredFieldValidator1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator1; - - /// - /// UpdatePanel1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.UpdatePanel UpdatePanel1; - - /// - /// filetype control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.ListBox filetype; - - /// - /// template control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.ListBox template; - - /// - /// createMacro control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.CheckBox createMacro; - - /// - /// sbmt control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Button sbmt; - - /// - /// Textbox1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.TextBox Textbox1; - } -} \ No newline at end of file diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/create/DLRScriptingTasks.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/create/DLRScriptingTasks.cs deleted file mode 100644 index fd13010167..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/create/DLRScriptingTasks.cs +++ /dev/null @@ -1,97 +0,0 @@ -using System; -using System.IO; -using Umbraco.Core.IO; -using Umbraco.Core.Logging; -using Umbraco.Core; -using Umbraco.Web.UI; -using Umbraco.Core.Logging; -using umbraco.BusinessLogic; - -namespace umbraco -{ - public class DLRScriptingTasks : LegacyDialogTask - { - - public override bool PerformSave() - { - var template = Alias.Substring(0, Alias.IndexOf("|||")).Trim(); - var fileName = Alias.Substring(Alias.IndexOf("|||") + 3, Alias.Length - Alias.IndexOf("|||") - 3).Replace(" ", ""); - - if (!fileName.Contains(".")) - fileName = Alias + ".py"; - - var scriptContent = ""; - if (!string.IsNullOrEmpty(template)) - { - var templateFile = System.IO.File.OpenText(IOHelper.MapPath(SystemDirectories.Umbraco + "/scripting/templates/" + template)); - scriptContent = templateFile.ReadToEnd(); - templateFile.Close(); - } - - var abFileName = IOHelper.MapPath(SystemDirectories.MacroScripts + "/" + fileName); - - if (!System.IO.File.Exists(abFileName)) - { - if (fileName.Contains("/")) //if there's a / create the folder structure for it - { - var folders = fileName.Split("/".ToCharArray()); - var basePath = IOHelper.MapPath(SystemDirectories.MacroScripts); - for (var i = 0; i < folders.Length - 1; i++) - { - basePath = System.IO.Path.Combine(basePath, folders[i]); - System.IO.Directory.CreateDirectory(basePath); - } - } - - var abFileFolder = Path.GetDirectoryName(abFileName); - if (string.IsNullOrWhiteSpace(abFileFolder) == false) - if (Directory.Exists(abFileFolder) == false) - Directory.CreateDirectory(abFileFolder); - - var scriptWriter = System.IO.File.CreateText(abFileName); - scriptWriter.Write(scriptContent); - scriptWriter.Flush(); - scriptWriter.Close(); - - if (ParentID == 1) - { - var name = fileName - .Substring(0, (fileName.LastIndexOf('.') + 1)).Trim('.') - .SplitPascalCasing().ToFirstUpperInvariant(); - cms.businesslogic.macro.Macro m = cms.businesslogic.macro.Macro.MakeNew(name); - m.ScriptingFile = fileName; - m.Save(); - } - } - - _returnUrl = string.Format(SystemDirectories.Umbraco + "/developer/python/editPython.aspx?file={0}", fileName); - return true; - } - - public override bool PerformDelete() - { - var path = IOHelper.MapPath(SystemDirectories.MacroScripts + "/" + Alias.TrimStart('/')); - try - { - System.IO.File.Delete(path); - } - catch (Exception ex) - { - LogHelper.Error(string.Format("Could not remove DLR file {0} - User {1}", Alias, User.Id), ex); - } - return true; - } - - private string _returnUrl = ""; - - public override string ReturnUrl - { - get { return _returnUrl; } - } - - public override string AssignedApp - { - get { return DefaultApps.developer.ToString(); } - } - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/create/PartialViewMacrosTasks.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/create/PartialViewMacrosTasks.cs deleted file mode 100644 index 9d1926bee4..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/create/PartialViewMacrosTasks.cs +++ /dev/null @@ -1,22 +0,0 @@ -using Umbraco.Core.CodeAnnotations; -using umbraco.BusinessLogic; - -namespace umbraco -{ - /// - /// The UI 'tasks' for the create dialog and delete processes - /// - [UmbracoWillObsolete("http://issues.umbraco.org/issue/U4-1373", "This will one day be removed when we overhaul the create process")] - public class PartialViewMacroTasks : PartialViewTasksBase - { - public override string AssignedApp - { - get { return DefaultApps.developer.ToString(); } - } - - protected override bool IsPartialViewMacro - { - get { return true; } - } - } -} \ No newline at end of file diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/create/PartialViewTasks.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/create/PartialViewTasks.cs deleted file mode 100644 index 326479ee34..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/create/PartialViewTasks.cs +++ /dev/null @@ -1,17 +0,0 @@ -using Umbraco.Core.CodeAnnotations; -using umbraco.BusinessLogic; - -namespace umbraco -{ - /// - /// The UI 'tasks' for the create dialog and delete processes - /// - [UmbracoWillObsolete("http://issues.umbraco.org/issue/U4-1373", "This will one day be removed when we overhaul the create process")] - public class PartialViewTasks : PartialViewTasksBase - { - public override string AssignedApp - { - get { return DefaultApps.settings.ToString(); } - } - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/create/PartialViewTasksBase.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/create/PartialViewTasksBase.cs deleted file mode 100644 index 9f810c01b8..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/create/PartialViewTasksBase.cs +++ /dev/null @@ -1,103 +0,0 @@ -using System; -using System.IO; -using System.Web; -using Umbraco.Core.CodeAnnotations; -using Umbraco.Core.Configuration; -using Umbraco.Core.IO; -using Umbraco.Core.Models; -using Umbraco.Core.Services; -using Umbraco.Web; -using Umbraco.Web.UI; -using umbraco.BasePages; -using Umbraco.Core; - -namespace umbraco -{ - /// - /// The base UI 'tasks' for the create dialog and delete processes - /// - [UmbracoWillObsolete("http://issues.umbraco.org/issue/U4-1373", "This will one day be removed when we overhaul the create process")] - public abstract class PartialViewTasksBase : LegacyDialogTask - { - private string _returnUrl = string.Empty; - - public override string ReturnUrl - { - get { return _returnUrl; } - } - - protected virtual string EditViewFile - { - get { return "Settings/Views/EditView.aspx"; } - } - - protected virtual bool IsPartialViewMacro - { - get { return false; } - } - - public override bool PerformSave() - { - var pipesIndex = Alias.IndexOf("|||", StringComparison.Ordinal); - var snippetName = Alias.Substring(0, pipesIndex).Trim(); - var fileName = Alias.Substring(pipesIndex + 3, Alias.Length - pipesIndex - 3); - if (fileName.ToLowerInvariant().EndsWith(".cshtml") == false) - { - fileName += ".cshtml"; - } - - var model = new PartialView(IsPartialViewMacro ? PartialViewType.PartialViewMacro : PartialViewType.PartialView, fileName); - var fileService = (FileService)ApplicationContext.Current.Services.FileService; - var macroService = ApplicationContext.Current.Services.MacroService; - - if (IsPartialViewMacro == false) - { - var attempt = fileService.CreatePartialView(model, snippetName, User.Id); - _returnUrl = string.Format("settings/views/EditView.aspx?treeType=partialViews&file={0}", HttpUtility.UrlEncode(model.Path.TrimStart('/').Replace("\\", "/"))); - return attempt.Success; - } - else - { - - var attempt = fileService.CreatePartialViewMacro(model, /*ParentID == 1,*/ snippetName, User.Id); - // if ParentId = 0 then that means that the "Create macro" checkbox was OFF, so don't try to create an actual macro - // See PartialViewMacro.ascx.cs and PartialView.ascx.cs: SubmitButton_Click - if (attempt && ParentID != 0) - { - //The partial view path to be saved with the macro must be a fully qualified virtual path - var virtualPath = string.Format("{0}/{1}/{2}", SystemDirectories.MvcViews, "MacroPartials", attempt.Result.Path); - macroService.Save(new Macro(attempt.Result.Alias, attempt.Result.Alias) { ScriptPath = virtualPath }); - } - - _returnUrl = string.Format("settings/views/EditView.aspx?treeType=partialViewMacros&file={0}", HttpUtility.UrlEncode(model.Path.TrimStart('/').Replace("\\", "/"))); - return attempt.Success; - } - - } - - public override bool PerformDelete() - { - var fileService = (FileService)ApplicationContext.Current.Services.FileService; - - if (IsPartialViewMacro == false) - { - if (Alias.Contains(".") == false) - { - //there is no extension so we'll assume it's a folder - fileService.DeletePartialViewFolder(Alias.TrimStart('/')); - return true; - } - return fileService.DeletePartialView(Alias.TrimStart('/'), User.Id); - } - - if (Alias.Contains(".") == false) - { - //there is no extension so we'll assume it's a folder - fileService.DeletePartialViewMacroFolder(Alias.TrimStart('/')); - return true; - } - return fileService.DeletePartialViewMacro(Alias.TrimStart('/'), User.Id); - } - - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/create/ScriptTasks.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/create/ScriptTasks.cs deleted file mode 100644 index 876fd6d343..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/create/ScriptTasks.cs +++ /dev/null @@ -1,76 +0,0 @@ -using Umbraco.Core.IO; -using Umbraco.Web.UI; -using Umbraco.Core; -using Umbraco.Core.Logging; -using Umbraco.Core.Models; -using umbraco.BusinessLogic; -using umbraco.BasePages; - -namespace umbraco -{ - public class ScriptTasks : LegacyDialogTask - { - - public override bool PerformSave() - { - var scriptFileAr = Alias.Split('\u00A4'); - - var fileName = scriptFileAr[0]; - var fileType = scriptFileAr[1]; - - var createFolder = ParentID; - - if (createFolder == 1) - { - ApplicationContext.Current.Services.FileService.CreateScriptFolder(fileName); - return true; - } - - // remove file extension - if (fileName.ToLowerInvariant().EndsWith(fileType.ToLowerInvariant())) - { - fileName = fileName.Substring(0, - fileName.ToLowerInvariant().LastIndexOf(fileType.ToLowerInvariant(), System.StringComparison.Ordinal) - 1); - } - - var scriptPath = fileName + "." + fileType; - var found = ApplicationContext.Current.Services.FileService.GetScriptByName(scriptPath); - if (found != null) - { - _returnUrl = string.Format("settings/scripts/editScript.aspx?file={0}", scriptPath.TrimStart('/')); - return true; - } - var script = new Script(fileName + "." + fileType); - ApplicationContext.Current.Services.FileService.SaveScript(script); - _returnUrl = string.Format("settings/scripts/editScript.aspx?file={0}", scriptPath.TrimStart('/')); - return true; - } - - public override bool PerformDelete() - { - if (Alias.Contains(".") == false) - { - //there is no extension so we'll assume it's a folder - ApplicationContext.Current.Services.FileService.DeleteScriptFolder(Alias.TrimStart('/')); - } - else - { - ApplicationContext.Current.Services.FileService.DeleteScript(Alias.TrimStart('/'), User.Id); - } - - return true; - } - - private string _returnUrl = ""; - - public override string ReturnUrl - { - get { return _returnUrl; } - } - - public override string AssignedApp - { - get { return DefaultApps.settings.ToString(); } - } - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/create/script.ascx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/create/script.ascx.cs deleted file mode 100644 index 68bb6582e2..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/create/script.ascx.cs +++ /dev/null @@ -1,125 +0,0 @@ -using System; -using System.Data; -using System.Configuration; -using System.Collections; -using System.Linq; -using System.Web; -using System.Web.Security; -using System.Web.UI; -using System.Web.UI.WebControls; -using System.Web.UI.WebControls.WebParts; -using System.Web.UI.HtmlControls; -using Umbraco.Core; -using Umbraco.Core.Configuration; -using Umbraco.Web.UI; -using umbraco.cms.helpers; -using umbraco.BasePages; -using Umbraco.Core.IO; - -namespace umbraco.presentation.umbraco.create -{ - public partial class script : System.Web.UI.UserControl - { - protected override void OnLoad(EventArgs e) - { - base.OnLoad(e); - sbmt.Text = ui.Text("create"); - - // Enable new item in folders to place items in that folder. - if (Request["nodeType"] == "scriptsFolder") - rename.Text = Request["nodeId"].EnsureEndsWith('/'); - } - - protected void SubmitClick(object sender, System.EventArgs e) - { - int createFolder = 0; - if (scriptType.SelectedValue == "") - { - createFolder = 1; - ContainsValidator.Enabled = true; - Page.Validate(); - } - - if (Page.IsValid) - { - string returnUrl = LegacyDialogHandler.Create( - new HttpContextWrapper(Context), - BasePage.Current.getUser(), - helper.Request("nodeType"), - createFolder, - rename.Text + '\u00A4' + scriptType.SelectedValue); - - BasePage.Current.ClientTools - .ChangeContentFrameUrl(returnUrl) - .ReloadActionNode(false, true) - .CloseModalWindow(); - - } - } - - override protected void OnInit(EventArgs e) - { - base.OnInit(e); - - ContainsValidator.Enabled = false; - - string[] fileTypes = UmbracoConfig.For.UmbracoSettings().Content.ScriptFileTypes.ToArray(); - - scriptType.Items.Add(new ListItem(ui.Text("folder"), "")); - scriptType.Items.FindByText(ui.Text("folder")).Selected = true; - - foreach (string str in fileTypes) - { - scriptType.Items.Add(new ListItem("." + str + " file", str)); - } - } - - /// - /// rename control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.TextBox rename; - - /// - /// RequiredFieldValidator1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator1; - protected global::System.Web.UI.WebControls.RegularExpressionValidator EndsWithValidator; - protected global::System.Web.UI.WebControls.RegularExpressionValidator ContainsValidator; - - /// - /// scriptType control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.ListBox scriptType; - - /// - /// CreateMacroCheckBox control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.CheckBox CreateMacroCheckBox; - - /// - /// sbmt control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Button sbmt; - - } -} \ No newline at end of file diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/create/templateTasks.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/create/templateTasks.cs deleted file mode 100644 index 8c1cab8e78..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/create/templateTasks.cs +++ /dev/null @@ -1,57 +0,0 @@ -using System; -using System.Data; -using System.Web.Security; -using Umbraco.Core; -using Umbraco.Core.Configuration; -using Umbraco.Web.UI; -using umbraco.BusinessLogic; -using umbraco.DataLayer; -using umbraco.BasePages; -using Umbraco.Core.IO; -using umbraco.cms.businesslogic.member; - -namespace umbraco -{ - public class templateTasks : LegacyDialogTask - { - public override bool PerformSave() - { - var masterId = ParentID; - - var editor = "settings/editTemplate.aspx"; - if (UmbracoConfig.For.UmbracoSettings().Templates.DefaultRenderingEngine == RenderingEngine.Mvc) - editor = "settings/views/editView.aspx"; - - if (masterId > 0) - { - var id = cms.businesslogic.template.Template.MakeNew(Alias, User, new cms.businesslogic.template.Template(masterId)).Id; - _returnUrl = string.Format("{1}?treeType=templates&templateID={0}", id, editor); - } - else - { - var id = cms.businesslogic.template.Template.MakeNew(Alias, User).Id; - _returnUrl = string.Format("{1}?treeType=templates&templateID={0}", id, editor); - - } - return true; - } - - public override bool PerformDelete() - { - new cms.businesslogic.template.Template(ParentID).delete(); - return false; - } - - private string _returnUrl = ""; - - public override string ReturnUrl - { - get { return _returnUrl; } - } - - public override string AssignedApp - { - get { return DefaultApps.settings.ToString(); } - } - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/create/userTasks.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/create/userTasks.cs deleted file mode 100644 index f62915cfb1..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/create/userTasks.cs +++ /dev/null @@ -1,82 +0,0 @@ -using System; -using System.Data; -using System.Web.Security; -using Umbraco.Core.Configuration; -using Umbraco.Core.Logging; -using Umbraco.Web.UI; -using umbraco.BusinessLogic; -using Umbraco.Core.Security; -using umbraco.DataLayer; -using umbraco.BasePages; -using Umbraco.Core.IO; -using umbraco.cms.businesslogic.member; - -namespace umbraco -{ - public class userTasks : LegacyDialogTask - { - private string _returnUrl = ""; - - public override string ReturnUrl - { - get { return _returnUrl; } - } - - public override string AssignedApp - { - get { return DefaultApps.users.ToString(); } - } - - public override bool PerformSave() - { - // Hot damn HACK > user is allways UserType with id = 1 = administrator ??? - // temp password deleted by NH - //BusinessLogic.User.MakeNew(Alias, Alias, "", BusinessLogic.UserType.GetUserType(1)); - //return true; - - var provider = MembershipProviderExtensions.GetUsersMembershipProvider(); - - var status = MembershipCreateStatus.ProviderError; - try - { - // Password is auto-generated. They are they required to change the password by editing the user information. - - var password = Membership.GeneratePassword( - provider.MinRequiredPasswordLength, - provider.MinRequiredNonAlphanumericCharacters); - - var parts = Alias.Split(new[] {'|'}, StringSplitOptions.RemoveEmptyEntries); - if (parts.Length != 2) - { - return false; - } - var login = parts[0]; - var email = parts[1]; - - var u = provider.CreateUser( - login, password, email.Trim().ToLower(), "", "", true, null, out status); - - if (u == null) - { - return false; - } - - _returnUrl = string.Format("users/EditUser.aspx?id={0}", u.ProviderUserKey); - - return status == MembershipCreateStatus.Success; - } - catch (Exception ex) - { - LogHelper.Error(string.Format("Failed to create the user. Error from provider: {0}", status.ToString()), ex); - return false; - } - } - - public override bool PerformDelete() - { - var u = User.GetUser(ParentID); - u.disable(); - return true; - } - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dashboard/LatestEdits.ascx b/src/Umbraco.Web/umbraco.presentation/umbraco/dashboard/LatestEdits.ascx deleted file mode 100644 index 48ad25fec3..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/dashboard/LatestEdits.ascx +++ /dev/null @@ -1,14 +0,0 @@ -<%@ Control Language="c#" AutoEventWireup="True" Codebehind="LatestEdits.ascx.cs" Inherits="dashboardUtilities.LatestEdits" %> -<%@ Register TagPrefix="umb" Namespace="ClientDependency.Core.Controls" Assembly="ClientDependency.Core" %> - - - -
    -

    <%=umbraco.ui.Text("defaultdialogs", "lastEdited")%>

    - Umbraco - - - <%# PrintNodeName(DataBinder.Eval(Container.DataItem, "NodeId"), DataBinder.Eval(Container.DataItem, "datestamp")) %> - - -
    diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dashboard/LatestEdits.ascx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/dashboard/LatestEdits.ascx.cs deleted file mode 100644 index fe2dc67250..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/dashboard/LatestEdits.ascx.cs +++ /dev/null @@ -1,68 +0,0 @@ -using umbraco.BusinessLogic; -using System; -using Umbraco.Core.IO; -using umbraco.cms.businesslogic.web; - -namespace dashboardUtilities -{ - /// - /// Summary description for LatestEdits. - /// - public partial class LatestEdits : System.Web.UI.UserControl - { - - // Find current user - private System.Collections.ArrayList printedIds = new System.Collections.ArrayList(); - private int count = 0; - public int MaxRecords { get; set; } - - protected void Page_Load(object sender, EventArgs e) - { - if (MaxRecords == 0) - MaxRecords = 30; - - Repeater1.DataSource = Log.GetLogReader(User.GetCurrent(), LogTypes.Save, DateTime.Now.Subtract(new TimeSpan(7,0,0,0,0)), MaxRecords); - Repeater1.DataBind(); - } - - public string PrintNodeName(object NodeId, object Date) - { - if (!printedIds.Contains(NodeId) && count < MaxRecords) - { - printedIds.Add(NodeId); - try - { - Document d = new Document(int.Parse(NodeId.ToString())); - count++; - return - " " + d.Text + " - " + umbraco.ui.Text("general", "edited", User.GetCurrent()) + " " + umbraco.library.ShortDateWithTimeAndGlobal(DateTime.Parse(Date.ToString()).ToString(), umbraco.ui.Culture(User.GetCurrent())) + ""; - } - catch { - return ""; - } - - } else - return ""; - } - - #region Web Form Designer generated code - override protected void OnInit(EventArgs e) - { - // - // CODEGEN: This call is required by the ASP.NET Web Form Designer. - // - InitializeComponent(); - base.OnInit(e); - } - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - - } - #endregion - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dashboard/LatestEdits.ascx.designer.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/dashboard/LatestEdits.ascx.designer.cs deleted file mode 100644 index b605e86eff..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/dashboard/LatestEdits.ascx.designer.cs +++ /dev/null @@ -1,24 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace dashboardUtilities { - - - public partial class LatestEdits { - - /// - /// Repeater1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Repeater Repeater1; - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dashboard/MediaDashboardFolderBrowser.ascx b/src/Umbraco.Web/umbraco.presentation/umbraco/dashboard/MediaDashboardFolderBrowser.ascx deleted file mode 100644 index f4094b4455..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/dashboard/MediaDashboardFolderBrowser.ascx +++ /dev/null @@ -1,4 +0,0 @@ -<%@ Control Language="C#" AutoEventWireup="true" %> -<%@ Register TagPrefix="umb" Namespace="Umbraco.Web.UI.Controls" Assembly="umbraco" %> - - \ No newline at end of file diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Macros/assemblyBrowser.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Macros/assemblyBrowser.aspx.cs index d186d9ef50..273318cbff 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Macros/assemblyBrowser.aspx.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Macros/assemblyBrowser.aspx.cs @@ -19,6 +19,7 @@ using Umbraco.Core.PropertyEditors; using umbraco.BusinessLogic; using System.Collections.Generic; using MacroProperty = umbraco.cms.businesslogic.macro.MacroProperty; +using UserControl = System.Web.UI.UserControl; namespace umbraco.developer { diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/developer/RelationTypes/RelationTypesWebService.asmx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/developer/RelationTypes/RelationTypesWebService.asmx.cs index 2b775ed797..2b5965d2f3 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/developer/RelationTypes/RelationTypesWebService.asmx.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/developer/RelationTypes/RelationTypesWebService.asmx.cs @@ -1,10 +1,11 @@ using System.Web.Services; using Umbraco.Core; +using Umbraco.Core.Models; using Umbraco.Web; namespace umbraco.cms.presentation.developer.RelationTypes { - /// + /// /// Webservice to delete relation types, this allows deletion via a javacscript call hooked into the tree UI /// [WebService(Namespace = "http://tempuri.org/")] @@ -22,7 +23,7 @@ namespace umbraco.cms.presentation.developer.RelationTypes { var user = UmbracoContext.Current.Security.CurrentUser; - if (user.UserType.Name == "Administrators") + if (user.IsAdmin()) { var relationService = ApplicationContext.Current.Services.RelationService; var relationType = relationService.GetRelationTypeById(relationTypeId); diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/developer/autoDoc.aspx b/src/Umbraco.Web/umbraco.presentation/umbraco/developer/autoDoc.aspx deleted file mode 100644 index 5fb02ef834..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/developer/autoDoc.aspx +++ /dev/null @@ -1,23 +0,0 @@ -<%@ Page language="c#" Codebehind="autoDoc.aspx.cs" AutoEventWireup="True" Inherits="umbraco.developer.autoDoc" %> - - - - autoDoc - - - - - - - -
    - -
    - - diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/developer/autoDoc.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/developer/autoDoc.aspx.cs deleted file mode 100644 index 3484a4504e..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/developer/autoDoc.aspx.cs +++ /dev/null @@ -1,57 +0,0 @@ -using System; -using System.Collections; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Web; -using System.Web.SessionState; -using System.Web.UI; -using System.Web.UI.WebControls; -using System.Web.UI.HtmlControls; -using System.Linq; -using umbraco.BusinessLogic; - -namespace umbraco.developer -{ - /// - /// Summary description for autoDoc. - /// - public partial class autoDoc : BasePages.UmbracoEnsuredPage - { - public autoDoc() - { - CurrentApp = DefaultApps.developer.ToString(); - } - - protected void Page_Load(object sender, EventArgs e) - { - // Put user code to initialize the page here - foreach(var dt in cms.businesslogic.web.DocumentType.GetAllAsList()) - { - LabelDoc.Text += - "

    " + dt.Text + "

    Id: " + dt.Id.ToString() + ", Alias: " + dt.Alias + ")

    "; - if (dt.PropertyTypes.Count > 0) - LabelDoc.Text += "

    Property Types:

    "; - foreach (var pt in dt.PropertyTypes) - LabelDoc.Text += - "

    " + pt.Id.ToString() + ", " + pt.Alias + ", " + pt.Name + "

    "; - if (dt.getVirtualTabs.Length > 0) - LabelDoc.Text += "

    Tabs:

    "; - foreach (var t in dt.getVirtualTabs.ToList()) - LabelDoc.Text += - "

    " + t.Id.ToString() + ", " + t.Caption + "

    "; - if (dt.AllowedChildContentTypeIDs.Length > 0) - LabelDoc.Text += "

    Allowed children:

    "; - foreach (var child in dt.AllowedChildContentTypeIDs.ToList()) - { - var contentType = new cms.businesslogic.ContentType(child); - LabelDoc.Text += - "

    " + contentType.Id.ToString() + ", " + contentType.Text + "

    "; - } - - LabelDoc.Text += "
    "; - } - } - - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/developer/autoDoc.aspx.designer.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/developer/autoDoc.aspx.designer.cs deleted file mode 100644 index 5ace170f12..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/developer/autoDoc.aspx.designer.cs +++ /dev/null @@ -1,17 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:2.0.50727.42 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace umbraco.developer { - - public partial class autoDoc { - protected System.Web.UI.HtmlControls.HtmlForm Form1; - protected System.Web.UI.WebControls.Label LabelDoc; - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/AssignDomain.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/AssignDomain.aspx.cs deleted file mode 100644 index 0507a6e321..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/AssignDomain.aspx.cs +++ /dev/null @@ -1,270 +0,0 @@ -using System; -using System.Globalization; -using System.Web.UI.WebControls; -using Umbraco.Web; -using umbraco.BasePages; -using umbraco.BusinessLogic; -using umbraco.cms.businesslogic.language; -using umbraco.cms.businesslogic.web; - -namespace umbraco.dialogs -{ - /// - /// Summary description for AssignDomain. - /// - public partial class AssignDomain : UmbracoEnsuredPage - { - private int _currentId; - private int _editDomain; - - public AssignDomain() - { - CurrentApp = DefaultApps.content.ToString(); - } - - protected void Page_Load(object sender, EventArgs e) - { - _currentId = Request.GetItemAs("id"); - prop_domain.Text = ui.Text("assignDomain", "domain", UmbracoUser); - prop_lang.Text = ui.Text("general", "language", UmbracoUser); - pane_addnew.Text = ui.Text("assignDomain", "addNew", UmbracoUser); - pane_edit.Text = ui.Text("assignDomain", "orEdit", UmbracoUser); - - if (Request.GetItemAsString("editDomain").Trim() != "") - { - _editDomain = Request.GetItemAs("editDomain"); - } - - if (Request.GetItemAsString("delDomain").Trim() != "") - { - var d = new Domain(Request.GetItemAs("delDomain")); - FeedBackMessage.type = uicontrols.Feedback.feedbacktype.success; - FeedBackMessage.Text = ui.Text("assignDomain", "domainDeleted", d.Name, UmbracoUser); - d.Delete(); - UpdateDomainList(); - } - - if (!IsPostBack) - { - // Add caption to button - ok.Text = ui.Text("assignDomain", "addNew", UmbracoUser); - - var selectedLanguage = -1; - - // Maybe add editing info - not the best way this is made ;-) - if (_editDomain > 0) - { - var d = new Domain(_editDomain); - selectedLanguage = d.Language.id; - DomainName.Text = d.Name.StartsWith("*") ? "*" : d.Name; - ok.Text = ui.Text("general", "update", UmbracoUser); - } - - // Add caption to language validator - LanguageValidator.ErrorMessage = ui.Text("defaultdialogs", "requiredField", UmbracoUser) + "
    "; - DomainValidator.ErrorMessage = ui.Text("defaultdialogs", "requiredField", UmbracoUser); - - DomainValidator2.ErrorMessage = ui.Text("assignDomain", "invalidDomain", UmbracoUser); - //DomainValidator2.ValidationExpression = @"^(?i:http[s]?://)?([-\w]+(\.[-\w]+)*)(:\d+)?(/[-\w]*)?$"; - DomainValidator2.ValidationExpression = @"^(\*|((?i:http[s]?://)?([-\w]+(\.[-\w]+)*)(:\d+)?(/[-\w]*)?))$"; - - Languages.Items.Add(new ListItem(ui.Text("general", "choose", UmbracoUser), "")); - foreach (var l in Language.GetAllAsList()) - { - var li = new ListItem(); - li.Text = l.FriendlyName; - li.Value = l.id.ToString(CultureInfo.InvariantCulture); - if (selectedLanguage == l.id) - li.Selected = true; - Languages.Items.Add(li); - } - } - - UpdateDomainList(); - } - - private void UpdateDomainList() - { - - var domainList = Domain.GetDomainsById(_currentId); - - if (domainList.Length > 0) - { - allDomains.Text = ""; - - foreach (var d in domainList) - { - var name = d.Name.StartsWith("*") ? "*" : d.Name; - allDomains.Text += ""; - } - - allDomains.Text += "
    " + name + "(" + d.Language.CultureAlias + ")" + ui.Text("edit") + "" + ui.Text("delete") + "
    "; - pane_edit.Visible = true; - } - else - { - pane_edit.Visible = false; - } - } - - protected void SaveDomain(object sender, EventArgs e) - { - if (Page.IsValid) - { - if (_editDomain > 0) - { - var d = new Domain(_editDomain); - d.Language = new Language(int.Parse(Languages.SelectedValue)); - d.Name = DomainName.Text.ToLower(); - FeedBackMessage.type = uicontrols.Feedback.feedbacktype.success; - FeedBackMessage.Text = ui.Text("assignDomain", "domainUpdated", DomainName.Text, UmbracoUser); - d.Save(); - - DomainName.Text = ""; - Languages.SelectedIndex = 0; - UpdateDomainList(); - - //this is probably the worst webform I've ever seen... - Response.Redirect("AssignDomain.aspx?id=" + _currentId.ToString()); - } - else - { - // have to handle wildcard - var domainName = DomainName.Text.Trim(); - domainName = domainName == "*" ? ("*" + _currentId.ToString(CultureInfo.InvariantCulture)) : domainName; - - if (!Domain.Exists(domainName.ToLower())) - { - Domain.MakeNew(domainName, _currentId, int.Parse(Languages.SelectedValue)); - FeedBackMessage.Text = ui.Text("assignDomain", "domainCreated", domainName, UmbracoUser); - FeedBackMessage.type = uicontrols.Feedback.feedbacktype.success; - - DomainName.Text = ""; - Languages.SelectedIndex = 0; - UpdateDomainList(); - - //this is probably the worst webform I've ever seen... - Response.Redirect("AssignDomain.aspx?id=" + _currentId.ToString()); - } - else - { - FeedBackMessage.Text = ui.Text("assignDomain", "domainExists", DomainName.Text.Trim(), UmbracoUser); - FeedBackMessage.type = uicontrols.Feedback.feedbacktype.error; - } - } - } - } - - /// - /// FeedBackMessage control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.Feedback FeedBackMessage; - - /// - /// pane_addnew control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.Pane pane_addnew; - - /// - /// prop_domain control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.PropertyPanel prop_domain; - - /// - /// DomainName control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.TextBox DomainName; - - /// - /// DomainValidator control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.RequiredFieldValidator DomainValidator; - - /// - /// DomainValidator2 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.RegularExpressionValidator DomainValidator2; - - /// - /// prop_lang control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.PropertyPanel prop_lang; - - /// - /// Languages control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.DropDownList Languages; - - /// - /// LanguageValidator control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.RequiredFieldValidator LanguageValidator; - - /// - /// ok control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Button ok; - - /// - /// pane_edit control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.Pane pane_edit; - - /// - /// allDomains control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Literal allDomains; - } -} \ No newline at end of file diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/RegexWs.aspx b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/RegexWs.aspx deleted file mode 100644 index 6dd0954156..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/RegexWs.aspx +++ /dev/null @@ -1,56 +0,0 @@ -<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="../masterpages/umbracoDialog.Master" CodeBehind="RegexWs.aspx.cs" Inherits="umbraco.presentation.dialogs.RegexWs" %> -<%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %> -<%@ Register TagPrefix="umb" Namespace="ClientDependency.Core.Controls" Assembly="ClientDependency.Core" %> - - - - - - - -

    - <%= umbraco.ui.Text("defaultdialogs", "regexSearchHelp")%> -

    -
    - - - -
    - - -
    -

    -

    - -

    -

    -

    -

    -
    -
    -
    -
    -
    -
    -
    - - -
    - - - - - - - \ No newline at end of file diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/RegexWs.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/RegexWs.aspx.cs deleted file mode 100644 index 935ffd129c..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/RegexWs.aspx.cs +++ /dev/null @@ -1,67 +0,0 @@ -using System; -using System.Data; -using System.Configuration; -using System.Collections; -using System.Web; -using System.Web.Security; -using System.Web.UI; -using System.Web.UI.WebControls; -using System.Web.UI.WebControls.WebParts; -using System.Web.UI.HtmlControls; - -namespace umbraco.presentation.dialogs { - public partial class RegexWs : BasePages.UmbracoEnsuredPage { - private DataSet ds = new DataSet(); - - public RegexWs() - { - CurrentApp = BusinessLogic.DefaultApps.settings.ToString(); - - } - - protected void Page_Load(object sender, EventArgs e) { - pp_search.Text = ui.Text("general", "search"); - bt_search.Text = ui.Text("general", "search"); - } - - protected void findRegex(object sender, EventArgs e) { - regexPanel.Visible = true; - - try { - - ds.Tables.Clear(); - - webservices.RegexComWebservice regexLib = new global::umbraco.presentation.webservices.RegexComWebservice(); - ds = regexLib.listRegExp(searchField.Text, "", 0, 10); - - results.DataSource = ds; - results.DataBind(); - - regexLib.Dispose(); - ds.Clear(); - ds.Dispose(); - } catch{ - Literal err = new Literal(); - err.Text = "

    " + ui.Text("defaultdialogs", "regexSearchError") + "

    "; - regexPanel.Controls.Clear(); - regexPanel.Controls.Add(err); - } - } - - protected void onRegexBind(object sender, RepeaterItemEventArgs e) { - if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem) { - DataRowView drw = (DataRowView)e.Item.DataItem; - - Literal _header = (Literal)e.Item.FindControl("header"); - Literal _desc = (Literal)e.Item.FindControl("desc"); - Literal _regex = (Literal)e.Item.FindControl("regex"); - - _header.Text = "" + drw["Title"].ToString() + ""; - _desc.Text = drw["description"].ToString(); - _regex.Text = drw["expression"].ToString().Trim(); - - } - } - - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/RegexWs.aspx.designer.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/RegexWs.aspx.designer.cs deleted file mode 100644 index 8a3748704b..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/RegexWs.aspx.designer.cs +++ /dev/null @@ -1,79 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:2.0.50727.4200 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace umbraco.presentation.dialogs { - - - public partial class RegexWs { - - /// - /// JsInclude1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::ClientDependency.Core.Controls.JsInclude JsInclude1; - - /// - /// pane1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.Pane pane1; - - /// - /// pp_search control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.PropertyPanel pp_search; - - /// - /// searchField control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.TextBox searchField; - - /// - /// bt_search control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Button bt_search; - - /// - /// regexPanel control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Panel regexPanel; - - /// - /// results control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Repeater results; - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/about.aspx b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/about.aspx deleted file mode 100644 index 63e967296d..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/about.aspx +++ /dev/null @@ -1,33 +0,0 @@ -<%@ Register Namespace="umbraco" TagPrefix="umb" Assembly="umbraco" %> -<%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %> - -<%@ Page Language="c#" MasterPageFile="../masterpages/umbracoDialog.Master" Codebehind="about.aspx.cs" AutoEventWireup="True" Inherits="umbraco.dialogs.about" %> - - - - -
    - - - -

    - Umbraco v
    -
    - Copyright 2001 - - - Umbraco / Niels Hartvig
    - Developed by the Umbraco Core - Team
    -
    - - Umbraco is licensed under the open source license MIT
    -
    - Visit umbraco.org - for more information.
    -
    - Dedicated to Gry, August, Villum and Oliver!
    -

    -
    -
    - diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/about.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/about.aspx.cs deleted file mode 100644 index a30cb1eb7b..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/about.aspx.cs +++ /dev/null @@ -1,41 +0,0 @@ -using System; -using System.Globalization; -using Umbraco.Core; -using Umbraco.Core.Configuration; - -namespace umbraco.dialogs -{ - /// - /// Summary description for about. - /// - public partial class about : BasePages.UmbracoEnsuredPage - { - - protected void Page_Load(object sender, EventArgs e) - { - // Put user code to initialize the page here - thisYear.Text = DateTime.Now.Year.ToString(CultureInfo.InvariantCulture); - version.Text = UmbracoVersion.GetSemanticVersion().ToSemanticString(); - } - - #region Web Form Designer generated code - override protected void OnInit(EventArgs e) - { - // - // CODEGEN: This call is required by the ASP.NET Web Form Designer. - // - InitializeComponent(); - base.OnInit(e); - } - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - - } - #endregion - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/about.aspx.designer.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/about.aspx.designer.cs deleted file mode 100644 index 526ec5e833..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/about.aspx.designer.cs +++ /dev/null @@ -1,33 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace umbraco.dialogs { - - - public partial class about { - - /// - /// version control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Literal version; - - /// - /// thisYear control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Literal thisYear; - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/cruds.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/cruds.aspx.cs deleted file mode 100644 index 3808547db1..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/cruds.aspx.cs +++ /dev/null @@ -1,218 +0,0 @@ -using System; -using System.Collections; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Web; -using System.Web.SessionState; -using System.Web.UI; -using System.Web.UI.WebControls; -using System.Web.UI.HtmlControls; -using System.Collections.Generic; -using Umbraco.Core; -using Umbraco.Web; -using umbraco.cms.businesslogic; - -namespace umbraco.dialogs -{ - /// - /// Summary description for cruds. - /// - public partial class cruds : BasePages.UmbracoEnsuredPage - { - - public cruds() - { - CurrentApp = BusinessLogic.DefaultApps.content.ToString(); - - } - - private readonly Dictionary _permissions = new Dictionary(); - private CMSNode _node; - - protected void Page_Load(object sender, EventArgs e) - { - Button1.Text = ui.Text("update"); - pane_form.Text = ui.Text("actions", "SetPermissionsForThePage",_node.Text); - } - - override protected void OnInit(EventArgs e) - { - base.OnInit(e); - - _node = new CMSNode(Request.GetItemAs("id")); - - var ht = new HtmlTable(); - ht.Attributes.Add("class", "table"); - - var names = new HtmlTableRow(); - - var corner = new HtmlTableCell("th"); - corner.Style.Add("border", "none"); - names.Cells.Add(corner); - - foreach (var a in ActionsResolver.Current.Actions) - { - if (a.CanBePermissionAssigned == false) continue; - - var permissionRow = new HtmlTableRow(); - var label = new HtmlTableCell - { - InnerText = ui.Text("actions", a.Alias) - }; - permissionRow.Cells.Add(label); - _permissions.Add(a.Alias, permissionRow); - } - - ht.Rows.Add(names); - - foreach (var u in BusinessLogic.User.getAll()) - { - // Not disabled users and not system account - if (u.Disabled == false && u.Id > 0) - { - var hc = new HtmlTableCell("th") - { - InnerText = u.Name - }; - hc.Style.Add("text-align", "center"); - hc.Style.Add("border", "none"); - names.Cells.Add(hc); - - foreach (var a in ActionsResolver.Current.Actions) - { - var chk = new CheckBox - { - //Each checkbox is named with the user _ permission alias so we can parse - ID = u.Id + "_" + a.Letter - }; - - if (a.CanBePermissionAssigned == false) continue; - - if (u.GetPermissions(_node.Path).IndexOf(a.Letter) > -1) - { - chk.Checked = true; - } - - var cell = new HtmlTableCell(); - cell.Style.Add("text-align", "center"); - cell.Controls.Add(chk); - - _permissions[a.Alias].Cells.Add(cell); - } - } - } - - //add all collected rows - foreach (var perm in _permissions.Values) - { - ht.Rows.Add(perm); - } - - PlaceHolder1.Controls.Add(ht); - } - - - protected void Button1_Click(object sender, EventArgs e) - { - //get non disabled, non admin users and project to a dictionary, - // the string (value) portion will store the array of chars = their permissions - var usersPermissions = BusinessLogic.User.getAll() - .Where(user => user.Disabled == false && user.Id > 0) - .ToDictionary(user => user, user => ""); - - //iterate over each row which equals: - // * a certain permission and the user's who will be allowed/denied that permission - foreach (var row in _permissions) - { - //iterate each cell that is not the first cell (which is the permission header cell) - for (var i = 1; i < row.Value.Cells.Count; i++) - { - var currCell = row.Value.Cells[i]; - //there's only one control per cell = the check box - var chk = (CheckBox)currCell.Controls[0]; - //if it's checked then append the permissions - if (chk.Checked) - { - //now we will parse the checkbox ID which is the userId_permissionAlias - var split = chk.ID.Split(new[] { '_' }, StringSplitOptions.RemoveEmptyEntries); - //get the reference to the user - var user = usersPermissions.Keys.Single(x => x.Id == int.Parse(split[0])); - //get the char permission - var permAlias = split[1]; - //now append that char permission to the user - usersPermissions[user] += permAlias; - } - } - } - - // Loop through the users and update their permissions - foreach (var user in usersPermissions) - { - //default to "-" for whatever reason (was here before so we'll leave it) - var cruds = "-"; - if (user.Value.IsNullOrWhiteSpace() == false) - { - cruds = user.Value; - } - BusinessLogic.Permission.UpdateCruds(user.Key, _node, cruds); - } - - // Update feedback message - //FeedBackMessage.Text = "
    " + ui.Text("rights") + " " + ui.Text("ok") + "
    "; - feedback1.type = uicontrols.Feedback.feedbacktype.success; - feedback1.Text = ui.Text("rights") + " " + ui.Text("ok"); - PlaceHolder1.Visible = false; - panel_buttons.Visible = false; - - - } - - /// - /// pane_form control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.Pane pane_form; - - /// - /// feedback1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.Feedback feedback1; - - /// - /// PlaceHolder1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.PlaceHolder PlaceHolder1; - - /// - /// panel_buttons control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.HtmlControls.HtmlGenericControl panel_buttons; - - /// - /// Button1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Button Button1; - - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/emptyTrashcan.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/emptyTrashcan.aspx.cs deleted file mode 100644 index 998a171d71..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/emptyTrashcan.aspx.cs +++ /dev/null @@ -1,66 +0,0 @@ -using System; -using System.Web.UI; -using Umbraco.Core; -using Umbraco.Web; -using umbraco.BasePages; -using umbraco.cms.businesslogic; - -namespace umbraco.presentation.dialogs -{ - public partial class emptyTrashcan : UmbracoEnsuredPage - { - private RecycleBin.RecycleBinType? _binType; - protected RecycleBin.RecycleBinType BinType - { - get - { - if (_binType == null) - { - _binType = Enum.Parse(Request.GetItemAsString("type"), true); - } - return _binType.Value; - } - } - - protected override void OnInit(EventArgs e) - { - base.OnInit(e); - - var recycleBinType = helper.Request("type"); - if (ValidateUserApp(recycleBinType) == false) - { - throw new InvalidOperationException("The user does not have access to the requested app"); - } - } - - protected void Page_Load(object sender, EventArgs e) - { - } - - protected override void OnPreRender(EventArgs e) - { - base.OnPreRender(e); - - ScriptManager.GetCurrent(Page).Services.Add(new ServiceReference("../webservices/trashcan.asmx")); - ScriptManager.GetCurrent(Page).Services.Add(new ServiceReference("../webservices/legacyAjaxCalls.asmx")); - } - - /// - /// pane_form control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.Pane pane_form; - - /// - /// progbar control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.ProgressBar progbar; - } -} \ No newline at end of file diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/imageViewer.aspx b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/imageViewer.aspx deleted file mode 100644 index e169462379..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/imageViewer.aspx +++ /dev/null @@ -1,14 +0,0 @@ -<%@ Page Language="c#" CodeBehind="imageViewer.aspx.cs" AutoEventWireup="True" Inherits="umbraco.dialogs.imageViewer" %> - - - - - imageViewer - - -
    - - -
    - - diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/imageViewer.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/imageViewer.aspx.cs deleted file mode 100644 index f7f129dbed..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/imageViewer.aspx.cs +++ /dev/null @@ -1,93 +0,0 @@ -using System; -using System.Collections; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Web; -using System.Web.SessionState; -using System.Web.UI; -using System.Web.UI.WebControls; -using System.Web.UI.HtmlControls; - -using System.IO; -using umbraco.BusinessLogic; -using Umbraco.Core.IO; -using Umbraco.Core; - -namespace umbraco.dialogs -{ - [Obsolete("Use the ImageViewer user control instead")] - public partial class imageViewer : BasePages.UmbracoEnsuredPage - { - - public imageViewer() - { - CurrentApp = DefaultApps.media.ToString(); - } - - protected void Page_Load(object sender, EventArgs e) - { - //Response.Write(umbraco.helper.Request("id")); - //Response.End(); - // Put user code to initialize the page here - if (Request.QueryString["id"] != null) - { - if (Request.QueryString["id"] != "") - { - //TODO: fix Nasty FAST'N'CANELINE HACK. .. - var mediaId = int.Parse(Request.QueryString["id"]); - - image.Controls.Clear(); - var fileWidth = 0; - var fileHeight = 0; - var fileName = "/blank.gif"; - var altText = ""; - - try - { - var m = new cms.businesslogic.media.Media(mediaId); - - // TODO: Remove "Magic strings" from code. - try - { - fileName = m.getProperty("fileName").Value.ToString(); - } - catch - { - try - { - fileName = m.getProperty(Constants.Conventions.Media.File).Value.ToString(); - } - catch - { - fileName = m.getProperty("file").Value.ToString(); - } - } - - altText = m.Text; - try - { - fileWidth = int.Parse(m.getProperty(Constants.Conventions.Media.Width).Value.ToString()); - fileHeight = int.Parse(m.getProperty(Constants.Conventions.Media.Height).Value.ToString()); - } - catch - { - - } - var fileNameOrg = fileName; - var ext = fileNameOrg.Substring(fileNameOrg.LastIndexOf(".") + 1, fileNameOrg.Length - fileNameOrg.LastIndexOf(".") - 1); - var fileNameThumb = SystemDirectories.Root + fileNameOrg.Replace("." + ext, "_thumb." + ext); - image.Controls.Add(new LiteralControl("")); - } - catch - { - } - - image.Controls.Add(new LiteralControl("")); - - } - } - } - - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/imageViewer.aspx.designer.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/imageViewer.aspx.designer.cs deleted file mode 100644 index d7711e22ce..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/imageViewer.aspx.designer.cs +++ /dev/null @@ -1,34 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:2.0.50727.4200 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace umbraco.dialogs { - - - public partial class imageViewer { - - /// - /// Form1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.HtmlControls.HtmlForm Form1; - - /// - /// image control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.PlaceHolder image; - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/insertMacro.aspx b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/insertMacro.aspx deleted file mode 100644 index e34536f1b0..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/insertMacro.aspx +++ /dev/null @@ -1,102 +0,0 @@ -<%@ Page Language="c#" MasterPageFile="../masterpages/umbracoPage.Master" ValidateRequest="false" Codebehind="insertMacro.aspx.cs" AutoEventWireup="True" - Inherits="umbraco.dialogs.insertMacro" Trace="false" %> -<%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %> - - - - - - - " /> - - <%if (Request["macroID"] != null || Request["macroAlias"] != null) {%> - - " /> - " /> - -
    - - - -
    -

    - " onclick="updateMacro()" /> -   or   - <%=umbraco.ui.Text("general", "cancel", this.getUser())%> -

    - <%} else {%> - - - - - - -

    - " /> -   or   - <%=umbraco.ui.Text("general", "cancel", this.getUser())%> -

    - - <%}%> -
    \ No newline at end of file diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/insertMacro.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/insertMacro.aspx.cs deleted file mode 100644 index defeb9276c..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/insertMacro.aspx.cs +++ /dev/null @@ -1,125 +0,0 @@ -using System; -using System.Collections; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Web; -using System.Web.SessionState; -using System.Web.UI; -using System.Web.UI.WebControls; -using System.Web.UI.HtmlControls; - -using System.Reflection; -using Umbraco.Core.IO; -using umbraco.BusinessLogic; -using umbraco.DataLayer; -using umbraco.businesslogic.Exceptions; - -namespace umbraco.dialogs -{ - /// - /// Summary description for insertMacro. - /// - public partial class insertMacro : BasePages.UmbracoEnsuredPage - { - protected Button Button1; - - protected override void OnInit(EventArgs e) - { - base.OnInit(e); - - //this could be used for media or content so we need to at least validate that the user has access to one or the other - if (!ValidateUserApp(DefaultApps.content.ToString()) && !ValidateUserApp(DefaultApps.media.ToString())) - throw new UserAuthorizationException("The current user doesn't have access to the section/app"); - } - - protected void Page_Load(object sender, EventArgs e) - { - pane_edit.Text = ui.Text("general", "edit", this.getUser()) + " " + ui.Text("general", "macro", this.getUser()); - pane_insert.Text = ui.Text("general", "insert", this.getUser()) + " " + ui.Text("general", "macro", this.getUser()); - - if (Request["macroID"] != null || Request["macroAlias"] != null) - { - // Put user code to initialize the page here - cms.businesslogic.macro.Macro m; - if (helper.Request("macroID") != "") - m = new cms.businesslogic.macro.Macro(int.Parse(helper.Request("macroID"))); - else - m = cms.businesslogic.macro.Macro.GetByAlias(helper.Request("macroAlias")); - - foreach (var mp in m.Properties) { - - var macroAssembly = mp.Type.Assembly; - var macroType = mp.Type.Type; - try - { - - var assembly = Assembly.LoadFrom(IOHelper.MapPath(SystemDirectories.Bin + "/" + macroAssembly + ".dll")); - - Type type = assembly.GetType(macroAssembly + "." + macroType); - var typeInstance = Activator.CreateInstance(type) as interfaces.IMacroGuiRendering; - if (typeInstance != null) - { - var control = Activator.CreateInstance(type) as Control; - control.ID = mp.Alias; - if (Request[mp.Alias] != null) - { - if (Request[mp.Alias] != "") - { - type.GetProperty("Value").SetValue(control, Convert.ChangeType(Request[mp.Alias], type.GetProperty("Value").PropertyType), null); - } - } - - // register alias - var pp = new uicontrols.PropertyPanel(); - pp.Text = mp.Name; - pp.Controls.Add(control); - - macroProperties.Controls.Add(pp); - - /* - macroProperties.Controls.Add(new LiteralControl("")); - macroProperties.Controls.Add(new LiteralControl("" + mp.Name + "")); - macroProperties.Controls.Add(control); - macroProperties.Controls.Add(new LiteralControl("")); - */ - } - else - { - Trace.Warn("umbEditContent", "Type doesn't exist or is not umbraco.interfaces.DataFieldI ('" + macroAssembly + "." + macroType + "')"); - } - - } - catch (Exception fieldException) - { - Trace.Warn("umbEditContent", "Error creating type '" + macroAssembly + "." + macroType + "'", fieldException); - } - } - } - else - { - IRecordsReader macroRenderings; - if (helper.Request("editor") != "") - { - const string query = "select macroAlias, macroName from cmsMacro where macroUseInEditor = 1 order by macroName"; - using (var sqlHelper = BusinessLogic.Application.SqlHelper) - using (var renderings = sqlHelper.ExecuteReader(query)) - macroRenderings = renderings; - } - else - { - const string query = "select macroAlias, macroName from cmsMacro order by macroName"; - using (var sqlHelper = BusinessLogic.Application.SqlHelper) - using (var renderings = sqlHelper.ExecuteReader(query)) - macroRenderings = renderings; - } - - macroAlias.DataSource = macroRenderings; - macroAlias.DataValueField = "macroAlias"; - macroAlias.DataTextField = "macroName"; - macroAlias.DataBind(); - macroRenderings.Close(); - } - } - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/insertMacro.aspx.designer.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/insertMacro.aspx.designer.cs deleted file mode 100644 index 232f192919..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/insertMacro.aspx.designer.cs +++ /dev/null @@ -1,51 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace umbraco.dialogs { - - - public partial class insertMacro { - - /// - /// pane_edit control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.Pane pane_edit; - - /// - /// macroProperties control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.PlaceHolder macroProperties; - - /// - /// pane_insert control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.Pane pane_insert; - - /// - /// macroAlias control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.ListBox macroAlias; - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/insertTable.aspx b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/insertTable.aspx deleted file mode 100644 index 3943cae364..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/insertTable.aspx +++ /dev/null @@ -1,290 +0,0 @@ -<%@ Page language="c#" Codebehind="insertTable.aspx.cs" AutoEventWireup="True" Inherits="umbraco.dialogs.insertTable" %> - - - - Insert Table - - - - - - - - - -

    <%=umbraco.ui.Text("defaultdialogs", "inserttable", this.getUser())%>

    -
    - <%=umbraco.ui.Text("general", "size", this.getUser())%> -
    - - - - - - - - - - - - -
    - <%=umbraco.ui.Text("defaultdialogs", "tableColumns", this.getUser())%> - - -
    - <%=umbraco.ui.Text("defaultdialogs", "tableRows", this.getUser())%> - - -
    -
    - <%=umbraco.ui.Text("general", "layout", this.getUser())%> -
    - - - - - - - - - - - - - - - - - - - - - -
    - <%=umbraco.ui.Text("general", "justify", this.getUser())%> - - - <%=umbraco.ui.Text("general", "width", this.getUser())%> - - -
    - <%=umbraco.ui.Text("general", "innerMargin", this.getUser())%> - - - <%=umbraco.ui.Text("general", "height", this.getUser())%> - - -
    - <%=umbraco.ui.Text("general", "cellMargin", this.getUser())%> - - -   - -   -
    -
    - <%=umbraco.ui.Text("general", "design", this.getUser())%> -
    - - - - - - - -
    - <%=umbraco.ui.Text("general", "border", this.getUser())%> - - - - <%=umbraco.ui.Text("buttons", "styleChoose", this.getUser())%> - - -
    -   - ')) window.close();" value="<%=umbraco.ui.Text("cancel")%>">   - "> - - diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/insertTable.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/insertTable.aspx.cs deleted file mode 100644 index faff5e311c..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/insertTable.aspx.cs +++ /dev/null @@ -1,62 +0,0 @@ -using System; -using System.Collections; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Web; -using System.Web.SessionState; -using System.Web.UI; -using System.Web.UI.WebControls; -using System.Web.UI.HtmlControls; - -namespace umbraco.dialogs -{ - /// - /// Summary description for insertTable. - /// - public partial class insertTable : BasePages.UmbracoEnsuredPage - { - public insertTable() - { - CurrentApp = BusinessLogic.DefaultApps.content.ToString(); - - } - - protected void Page_Load(object sender, System.EventArgs e) - { - // Put user code to initialize the page here - if (cms.businesslogic.web.StyleSheet.GetAll().Length > 0) - { - cms.businesslogic.web.StyleSheet s = cms.businesslogic.web.StyleSheet.GetAll()[0]; - - foreach (cms.businesslogic.web.StylesheetProperty sp in s.Properties) - { - tableClass.Items.Add(new ListItem(sp.Text,sp.Alias.Replace(".",""))); - } - - tableClass.Items.Insert(0, new System.Web.UI.WebControls.ListItem(ui.Text("general", "choose", base.getUser()), "")); - } - - } - - #region Web Form Designer generated code - override protected void OnInit(EventArgs e) - { - // - // CODEGEN: This call is required by the ASP.NET Web Form Designer. - // - InitializeComponent(); - base.OnInit(e); - } - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - - } - #endregion - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/insertTable.aspx.designer.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/insertTable.aspx.designer.cs deleted file mode 100644 index 240ec98f6f..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/insertTable.aspx.designer.cs +++ /dev/null @@ -1,33 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace umbraco.dialogs { - - - public partial class insertTable { - - /// - /// tableForm control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.HtmlControls.HtmlForm tableForm; - - /// - /// tableClass control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.DropDownList tableClass; - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/mediaPicker.aspx b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/mediaPicker.aspx deleted file mode 100644 index a1620e6c2a..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/mediaPicker.aspx +++ /dev/null @@ -1,97 +0,0 @@ -<%@ Page Language="C#" MasterPageFile="../masterpages/umbracoDialog.Master" AutoEventWireup="true" - CodeBehind="mediaPicker.aspx.cs" Inherits="umbraco.presentation.umbraco.dialogs.mediaPicker" %> - -<%@ Register TagPrefix="ui" Namespace="umbraco.uicontrols" Assembly="controls" %> -<%@ Register TagPrefix="umb" Namespace="ClientDependency.Core.Controls" Assembly="ClientDependency.Core" %> -<%@ Register TagPrefix="umb2" TagName="Tree" Src="../controls/Tree/TreeControl.ascx" %> -<%@ Register TagPrefix="umb3" TagName="Image" Src="../controls/Images/ImageViewer.ascx" %> -<%@ Register TagName="MediaUpload" TagPrefix="umb4" Src="../controls/Images/UploadMediaImage.ascx" %> - - - - - - - - - - - <%--when a node is selected, the id will be stored in this field--%> - - - - -
    - - - - - - - -
    -

    - " style="width: 60px; - color: gray" disabled="disabled" id="submitbutton" /> - - <%# umbraco.ui.Text("or") %> - <%#umbraco.ui.Text("cancel") %> -

    -
    diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/mediaPicker.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/mediaPicker.aspx.cs deleted file mode 100644 index 0b30058780..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/mediaPicker.aspx.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; -using umbraco.BasePages; - -namespace umbraco.presentation.umbraco.dialogs -{ - public partial class mediaPicker : UmbracoEnsuredPage - { - protected void Page_Load(object sender, EventArgs e) - { - if (!IsPostBack) - DataBind(); - - } - - protected override void OnInit(EventArgs e) - { - uicontrols.TabPage tp = tv_options.NewTabPage(ui.Text("choose")); - tp.HasMenu = false; - tp.Controls.Add(pane_select); - - uicontrols.TabPage tp2 = tv_options.NewTabPage(ui.Text("create") + " " + ui.Text("new")); - tp2.HasMenu = false; - tp2.Controls.Add(pane_upload); - - base.OnInit(e); - } - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/mediaPicker.aspx.designer.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/mediaPicker.aspx.designer.cs deleted file mode 100644 index e1342377a4..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/mediaPicker.aspx.designer.cs +++ /dev/null @@ -1,79 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ -using System; - -namespace umbraco.presentation.umbraco.dialogs { - - [Obsolete("This is no longer used and will be removed in future versions")] - public partial class mediaPicker { - - /// - /// pane_src control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.Pane pane_src; - - /// - /// ImageViewer control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.controls.Images.ImageViewer ImageViewer; - - /// - /// tv_options control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.TabView tv_options; - - /// - /// pane_select control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.Pane pane_select; - - /// - /// DialogTree control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.controls.Tree.TreeControl DialogTree; - - /// - /// pane_upload control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Panel pane_upload; - - /// - /// MediaUploader control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.controls.Images.UploadMediaImage MediaUploader; - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/moveOrCopy.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/moveOrCopy.aspx.cs index c7ae70e246..f8fc1d3ea3 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/moveOrCopy.aspx.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/moveOrCopy.aspx.cs @@ -9,7 +9,6 @@ using Umbraco.Core.IO; using Umbraco.Core.Models; using umbraco.BasePages; using System.Linq; -using umbraco.cms.presentation.user; using umbraco.interfaces; using Umbraco.Web; using Umbraco.Core; @@ -137,10 +136,9 @@ namespace umbraco.dialogs /// private bool CheckPermissions(IContentBase node, IAction currentAction) { - var currUserPermissions = new UserPermissions(CurrentUser); - var lstCurrUserActions = currUserPermissions.GetExistingNodePermission(node.Id); - - return lstCurrUserActions.Contains(currentAction); + var userService = ApplicationContext.Current.Services.UserService; + var currUserPermissions = userService.GetPermissions(UmbracoContext.Current.Security.CurrentUser, node.Id).GetAllPermissions(); + return currUserPermissions != null && currUserPermissions.Contains(currentAction.Letter.ToString(CultureInfo.InvariantCulture)); } private void HandleDocumentTypeCopy() diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/notifications.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/notifications.aspx.cs index 97dc8d84d3..70137da920 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/notifications.aspx.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/notifications.aspx.cs @@ -1,5 +1,6 @@ using System; using System.Collections; +using System.Globalization; using System.Web.UI; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls; @@ -49,7 +50,7 @@ namespace umbraco.dialogs { CheckBox c = new CheckBox(); - c.ID = a.Letter.ToString(); + c.ID = a.Letter.ToString(CultureInfo.InvariantCulture); if (base.getUser().GetNotifications(node.Path).IndexOf(a.Letter) > -1) c.Checked = true; diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/publish.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/publish.aspx.cs deleted file mode 100644 index 255c61cbe8..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/publish.aspx.cs +++ /dev/null @@ -1,240 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Collections.Generic; -using System.Web.UI; -using System.Web.UI.WebControls; -using Umbraco.Core.Logging; -using umbraco.cms.businesslogic.web; -using umbraco.BusinessLogic; -using Umbraco.Core.Logging; -using umbraco.BasePages; - -namespace umbraco.dialogs -{ - /// - /// Summary description for publish. - /// - [Obsolete("This is no longer used whatsoever and will be removed from the codebase")] - public partial class publish : UmbracoEnsuredPage - { - protected Literal total; - - private int _nodeId; - private int _nodesPublished = 0; - private readonly List _documents = new List(); - public static string pageName = ""; - - public publish() - { - CurrentApp = DefaultApps.content.ToString(); - } - - protected void Page_Load(object sender, EventArgs e) - { - _nodeId = int.Parse(helper.Request("id")); - var d = new cms.businesslogic.web.Document(_nodeId); - pageName = d.Text; - - if (d.Level > 1 && d.PathPublished == false) - { - TheForm.Visible = false; - theEnd.Visible = true; - feedbackMsg.type = uicontrols.Feedback.feedbacktype.notice; - feedbackMsg.Text = ui.Text("publish", "contentPublishedFailedByParent", d.Text, getUser()) + "

    " + ui.Text("closeThisWindow") + ""; - - return; - } - - // add control prefix to variable for support with masterpages - var prefix = PublishUnpublishedItems.ClientID.Replace(PublishUnpublishedItems.ID, ""); - masterPagePrefix.Text = prefix; - - // by default we only count the published ones - var totalNodesToPublish = cms.businesslogic.web.Document.CountSubs(_nodeId, true); - try - { - Application.Lock(); - // We add both all nodes and only published nodes to the application variables so we can ajax query depending on checkboxes - Application["publishTotalAll" + _nodeId.ToString()] = cms.businesslogic.CMSNode.CountSubs(_nodeId).ToString(); - Application["publishTotal" + _nodeId.ToString()] = totalNodesToPublish.ToString(); - Application["publishDone" + _nodeId.ToString()] = "0"; - } - finally - { - Application.UnLock(); - } - total.Text = totalNodesToPublish.ToString(); - - // Put user code to initialize the page here - if (!IsPostBack) - { - // Add caption to checkbox - PublishAll.Text = ui.Text("publish", "publishAll", d.Text, getUser()); - ok.Text = ui.Text("content", "publish", getUser()); - ok.Attributes.Add("style", "width: 60px"); - ok.Attributes.Add("onClick", "startPublication();"); - - // Add checkbox event, so the publish unpublished childs gets enabled - PublishUnpublishedItems.LabelAttributes.Add("disabled", "true"); - PublishUnpublishedItems.LabelAttributes.Add("id", "publishUnpublishedItemsLabel"); - PublishUnpublishedItems.InputAttributes.Add("disabled", "true"); - PublishAll.InputAttributes.Add("onclick", "togglePublishingModes(this)"); - } - else - { - - if (PublishAll.Checked) - { - _nodesPublished = 0; - - DoPublishSubs(d); - - Application.Lock(); - Application["publishTotal" + _nodeId.ToString()] = 0; - Application.UnLock(); - - feedbackMsg.type = uicontrols.Feedback.feedbacktype.success; - - feedbackMsg.Text = ui.Text("publish", "nodePublishAll", d.Text, getUser()) + "

    " + ui.Text("closeThisWindow") + ""; - - ClientTools.ReloadActionNode(true, true); - - Application.Lock(); - - Application["publishTotal" + _nodeId.ToString()] = null; - Application["publishDone" + _nodeId.ToString()] = null; - Application.UnLock(); - } - else - { - if (d.PublishWithResult(getUser())) - { - feedbackMsg.type = uicontrols.Feedback.feedbacktype.success; - feedbackMsg.Text = ui.Text("publish", "nodePublish", d.Text, getUser()) + "

    " + ui.Text("closeThisWindow") + ""; - } - else { - feedbackMsg.type = uicontrols.Feedback.feedbacktype.notice; - feedbackMsg.Text = ui.Text("publish", "contentPublishedFailedByEvent", d.Text, getUser()) + "

    " + ui.Text("closeThisWindow") + ""; - } - ClientTools.ReloadActionNode(true, false); - } - - TheForm.Visible = false; - theEnd.Visible = true; - } - } - - private void DoPublishSubs(cms.businesslogic.web.Document d) - { - if (d.Published || PublishUnpublishedItems.Checked) - { - if (d.PublishWithResult(UmbracoUser)) - { - - - _nodesPublished++; - Application.Lock(); - Application["publishDone" + _nodeId.ToString()] = _nodesPublished.ToString(); - Application.UnLock(); - foreach (var dc in d.Children) - { - DoPublishSubs(dc); - } - } - else - { - LogHelper.Warn("Publishing failed due to event cancelling the publishing for document " + d.Id); - } - } - } - - protected override void OnPreRender(EventArgs e) - { - base.OnPreRender(e); - - ScriptManager.GetCurrent(Page).Services.Add(new ServiceReference("../webservices/publication.asmx")); - ScriptManager.GetCurrent(Page).Services.Add(new ServiceReference("../webservices/legacyAjaxCalls.asmx")); - } - - ///

    - /// masterPagePrefix control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Literal masterPagePrefix; - - /// - /// JsInclude1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::ClientDependency.Core.Controls.JsInclude JsInclude1; - - /// - /// TheForm control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Panel TheForm; - - /// - /// PublishAll control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.CheckBox PublishAll; - - /// - /// PublishUnpublishedItems control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.CheckBox PublishUnpublishedItems; - - /// - /// ok control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Button ok; - - /// - /// ProgBar1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.ProgressBar ProgBar1; - - /// - /// theEnd control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Panel theEnd; - - /// - /// feedbackMsg control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.Feedback feedbackMsg; - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/sendToTranslation.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/sendToTranslation.aspx.cs index c02baaaa7b..a310764498 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/sendToTranslation.aspx.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/sendToTranslation.aspx.cs @@ -1,4 +1,5 @@ using System; +using System.Linq; using System.Data; using System.Configuration; using System.Collections; @@ -70,7 +71,7 @@ namespace umbraco.presentation.dialogs // Translators foreach (var u in BusinessLogic.User.getAll()) - if (u.UserType.Alias.ToLower() == "translator" || UserHasTranslatePermission(u, _currentPage)) + if (u.GetGroups().Select(x => x.ToLower()).Contains("translators") || UserHasTranslatePermission(u, _currentPage)) translator.Items.Add(new ListItem(u.Name, u.Id.ToString())); if (translator.Items.Count == 0) { diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/uploadImage.aspx b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/uploadImage.aspx deleted file mode 100644 index f72dba32d0..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/uploadImage.aspx +++ /dev/null @@ -1,28 +0,0 @@ -<%@ Page Language="c#" MasterPageFile="../masterpages/umbracoDialog.Master" CodeBehind="uploadImage.aspx.cs" - AutoEventWireup="True" Inherits="umbraco.dialogs.uploadImage" %> - -<%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %> -<%@ Register TagName="MediaUpload" TagPrefix="umb" Src="../controls/Images/UploadMediaImage.ascx" %> - - - - - - - - - diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/uploadImage.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/uploadImage.aspx.cs deleted file mode 100644 index f5b9415f85..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/uploadImage.aspx.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System; -using System.Collections; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Web; -using System.Web.SessionState; -using System.Web.UI; -using System.Web.UI.WebControls; -using System.Web.UI.HtmlControls; - -using System.Xml; -using umbraco.BusinessLogic; -using Umbraco.Core.IO; - -namespace umbraco.dialogs -{ - [Obsolete("Use the UploadMediaImage control instead")] - public partial class uploadImage : BasePages.UmbracoEnsuredPage - { - public uploadImage() - { - CurrentApp = DefaultApps.media.ToString(); - } - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/uploadImage.aspx.designer.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/uploadImage.aspx.designer.cs deleted file mode 100644 index b34a3851bf..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/uploadImage.aspx.designer.cs +++ /dev/null @@ -1,25 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:2.0.50727.4200 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace umbraco.dialogs { - - - public partial class uploadImage { - - /// - /// MediaUploader control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.controls.Images.UploadMediaImage MediaUploader; - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/helpRedirect.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/helpRedirect.aspx.cs deleted file mode 100644 index b09ef1565f..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/helpRedirect.aspx.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System; -using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; - -namespace umbraco.presentation.umbraco -{ - - - public partial class helpRedirect : System.Web.UI.Page - { - protected void Page_Load(object sender, EventArgs e) - { - Help help = new Help(UmbracoSettings.HelpPages); - - HelpPage requestedHelpPage = new HelpPage - { - Application = Request.QueryString["Application"], - ApplicationUrl = Request.QueryString["ApplicationUrl"], - Language = Request.QueryString["Language"], - UserType = Request.QueryString["UserType"] - }; - - Response.Redirect(help.ResolveHelpUrl(requestedHelpPage)); - } - } -} \ No newline at end of file diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/js/language.aspx b/src/Umbraco.Web/umbraco.presentation/umbraco/js/language.aspx deleted file mode 100644 index ce4cc6ede9..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/js/language.aspx +++ /dev/null @@ -1 +0,0 @@ -<%@ Page language="c#" Codebehind="language.aspx.cs" AutoEventWireup="True" Inherits="umbraco.js.language" %> diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/js/language.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/js/language.aspx.cs deleted file mode 100644 index 3d38d897d3..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/js/language.aspx.cs +++ /dev/null @@ -1,60 +0,0 @@ -using System; -using System.Text; -using System.Xml; -using umbraco.BasePages; -using umbraco.BusinessLogic; - -namespace umbraco.js -{ - [Obsolete("This is no longer used and will be removed from the codebase in future versions")] - public partial class language : BasePage - { - protected void Page_Load(object sender, EventArgs e) - { - Response.ContentType = "application/json"; - string lang = "en"; - if(ValidateCurrentUser()){ - lang = UmbracoUser.Language; - } - - XmlDocument all = ui.getLanguageFile(lang); - - if(all == null) - return; - - StringBuilder sb = new StringBuilder(); - - foreach(XmlNode x in all.DocumentElement.ChildNodes) - { - if(x == null) - continue; - - for (int i = 0; i < x.ChildNodes.Count; i++) - { - sb.Append("\n"); - - XmlNode key = x.ChildNodes[i]; - if (key.FirstChild == null || string.IsNullOrEmpty(key.FirstChild.Value)) - continue; - - XmlNode n1 = x.Attributes.GetNamedItem("alias"); - if (n1 == null) - continue; - XmlNode n2 = key.Attributes.GetNamedItem("alias"); - if (n2 == null) - continue; - string _tempKey = string.Format("{0}_{1}", n1.Value, n2.Value); - - // we need to remove linie breaks as they can't break js - string tmpStr = key.FirstChild.Value.Replace("\\", "\\\\").Replace("\"", "'").Replace("\t", "").Replace("\r", "").Replace("\n", ""); - - sb.Append("\"" + _tempKey + "\": \"" + tmpStr + "\","); - - } - } - var f = "{" + sb.ToString().Trim().Trim(',').Trim() + "}"; - Response.Write(f); - } - - } -} \ No newline at end of file diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/js/language.aspx.designer.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/js/language.aspx.designer.cs deleted file mode 100644 index 41417754ea..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/js/language.aspx.designer.cs +++ /dev/null @@ -1,15 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:2.0.50727.42 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace umbraco.js { - - public partial class language { - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/js/language.aspx.resx b/src/Umbraco.Web/umbraco.presentation/umbraco/js/language.aspx.resx deleted file mode 100644 index dd0ea4d8e3..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/js/language.aspx.resx +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 1.0.0.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/InsertAnchor.aspx b/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/InsertAnchor.aspx deleted file mode 100644 index b3b8a9b198..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/InsertAnchor.aspx +++ /dev/null @@ -1,41 +0,0 @@ -<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="InsertAnchor.aspx.cs" Inherits="umbraco.presentation.umbraco.plugins.tinymce3.InsertAnchor" %> -<%@ Register TagPrefix="umb" Namespace="ClientDependency.Core.Controls" Assembly="ClientDependency.Core" %> -<%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %> - - - - <%= umbraco.ui.Text("insertAnchor") %> - - - - - - - - - - - - - - -
    - - - - - -
    <%= umbraco.ui.Text("name") %>:
    - -
    -
    - " /> -
    - -
    - " onclick="tinyMCEPopup.close();" /> -
    -
    -
    - - diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/InsertAnchor.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/InsertAnchor.aspx.cs deleted file mode 100644 index 0b50bb9b72..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/InsertAnchor.aspx.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; -using umbraco.BusinessLogic; -using umbraco.businesslogic.Exceptions; - -namespace umbraco.presentation.umbraco.plugins.tinymce3 -{ - public partial class InsertAnchor : BasePages.UmbracoEnsuredPage - { - - protected override void OnInit(EventArgs e) - { - base.OnInit(e); - - //this could be used for media or content so we need to at least validate that the user has access to one or the other - if (!ValidateUserApp(DefaultApps.content.ToString()) && !ValidateUserApp(DefaultApps.media.ToString())) - throw new UserAuthorizationException("The current user doesn't have access to the section/app"); - } - - protected override void OnLoad(EventArgs e) - { - base.OnLoad(e); - ClientLoader.DataBind(); - } - - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/InsertAnchor.aspx.designer.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/InsertAnchor.aspx.designer.cs deleted file mode 100644 index 8b94002a14..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/InsertAnchor.aspx.designer.cs +++ /dev/null @@ -1,42 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace umbraco.presentation.umbraco.plugins.tinymce3 { - - - public partial class InsertAnchor { - - /// - /// ClientLoader control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.UmbracoClientDependencyLoader ClientLoader; - - /// - /// JsInclude4 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::ClientDependency.Core.Controls.JsInclude JsInclude4; - - /// - /// JsInclude1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::ClientDependency.Core.Controls.JsInclude JsInclude1; - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/SpellChecker.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/SpellChecker.cs deleted file mode 100644 index 87599b4445..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/SpellChecker.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Web; - -// NB: This class was moved out of the client tinymce folder to aid with upgrades -// but we'll keep the old namespace to make things easier for now (MB) -namespace umbraco.presentation.umbraco_client.tinymce3.plugins.spellchecker -{ - /// - /// Base class for a spellchecker for TinyMCE - /// - public abstract class SpellChecker - { - /// - /// Checks all the words submitted - /// - /// The language. - /// The words. - /// - public abstract SpellCheckerResult CheckWords(string language, string[] words); - /// - /// Gets the suggestions for a single word - /// - /// The language. - /// The word. - /// - public abstract SpellCheckerResult GetSuggestions(string language, string word); - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/SpellCheckerInput.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/SpellCheckerInput.cs deleted file mode 100644 index f4cdb38080..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/SpellCheckerInput.cs +++ /dev/null @@ -1,80 +0,0 @@ - -using System.IO; -using System; -using System.Web.Script.Serialization; -using System.Collections.Generic; - -// NB: This class was moved out of the client tinymce folder to aid with upgrades -// but we'll keep the old namespace to make things easier for now (MB) -namespace umbraco.presentation.umbraco_client.tinymce3.plugins.spellchecker -{ - /// - /// Object representation of the input from TinyMCE's spellchecker plugin - /// - public class SpellCheckerInput - { - private SpellCheckerInput() - { - Words = new List(); - } - - /// - /// Gets or sets the id from TinyMCE - /// - /// The id. - public string Id { get; set; } - /// - /// Gets or sets the spellchecking method. eg: checkWords, getSuggestions - /// - /// The method. - public string Method { get; set; } - /// - /// Gets or sets the language used by the content - /// - /// The language. - public string Language { get; set; } - /// - /// Gets or sets the words which are to be spell checked - /// - /// The words. - public List Words { get; set; } - - - /// - /// Parses the specified stream into the object - /// - /// The stream. - /// - public static SpellCheckerInput Parse(StreamReader inputStream) - { - if (inputStream == null) - { - throw new ArgumentNullException("stream"); - } - if (inputStream.EndOfStream) - { - throw new ArgumentException("Stream end reached before we started!"); - } - var jsonString = inputStream.ReadLine(); - var deserialized = (Dictionary)new JavaScriptSerializer().DeserializeObject(jsonString); - - var input = new SpellCheckerInput(); - input.Id = (string)deserialized["id"]; - input.Method = (string)deserialized["method"]; - input.Language = (string)((object[])deserialized["params"])[0]; - if (((object[])deserialized["params"])[1] is string) - { - input.Words.Add((string)((object[])deserialized["params"])[1]); - } - else - { - var words = ((object[])((object[])deserialized["params"])[1]); - foreach (var word in words) - { - input.Words.Add((string)word); - } - } - return input; - } - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/SpellCheckerResult.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/SpellCheckerResult.cs deleted file mode 100644 index 1372629cf8..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/SpellCheckerResult.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Web; - -// NB: This class was moved out of the client tinymce folder to aid with upgrades -// but we'll keep the old namespace to make things easier for now (MB) -namespace umbraco.presentation.umbraco_client.tinymce3.plugins.spellchecker -{ - /// - /// Object which will be returned to TinyMCE from the spellchecker - /// - public class SpellCheckerResult - { - public SpellCheckerResult() - { - result = new List(); - } - - /// - /// Gets or sets the spellcheck words - /// - /// The result. - public List result { get; set; } - /// - /// Gets or sets the id of the initial request - /// - /// The id. - public string id { get; set; } - /// - /// Gets or sets the error details if there was a problem when performing the spellcheck - /// - /// The error. - public string error { get; set; } - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/insertChar.aspx b/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/insertChar.aspx deleted file mode 100644 index 3341ce4bf1..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/insertChar.aspx +++ /dev/null @@ -1,64 +0,0 @@ -<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="insertChar.aspx.cs" Inherits="umbraco.presentation.umbraco.plugins.tinymce3.insertChar" %> -<%@ Register TagPrefix="umb" Namespace="ClientDependency.Core.Controls" Assembly="ClientDependency.Core" %> -<%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %> - - - - - <%= umbraco.ui.Text("insertCharacter")%> - - - - - - - - - - - - - - - - - - - - - - - -
    - - - - - - - - - -
     
     
    -
    - - - - - - - - - - - - - - - - -
    HTML-Code
     
     
    NUM-Code
     
    -
    - - - diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/insertChar.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/insertChar.aspx.cs deleted file mode 100644 index 6b81b2c129..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/insertChar.aspx.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; -using umbraco.BusinessLogic; -using umbraco.businesslogic.Exceptions; - -namespace umbraco.presentation.umbraco.plugins.tinymce3 -{ - public partial class insertChar : BasePages.UmbracoEnsuredPage - { - protected override void OnInit(EventArgs e) - { - base.OnInit(e); - - //this could be used for media or content so we need to at least validate that the user has access to one or the other - if (!ValidateUserApp(DefaultApps.content.ToString()) && !ValidateUserApp(DefaultApps.media.ToString())) - throw new UserAuthorizationException("The current user doesn't have access to the section/app"); - } - - protected override void OnLoad(EventArgs e) - { - base.OnLoad(e); - ClientLoader.DataBind(); - } - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/insertChar.aspx.designer.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/insertChar.aspx.designer.cs deleted file mode 100644 index fc3cc23f13..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/insertChar.aspx.designer.cs +++ /dev/null @@ -1,42 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace umbraco.presentation.umbraco.plugins.tinymce3 { - - - public partial class insertChar { - - /// - /// ClientLoader control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.UmbracoClientDependencyLoader ClientLoader; - - /// - /// JsInclude4 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::ClientDependency.Core.Controls.JsInclude JsInclude4; - - /// - /// JsInclude1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::ClientDependency.Core.Controls.JsInclude JsInclude1; - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/insertImage.aspx b/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/insertImage.aspx deleted file mode 100644 index 7c4a878ee5..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/insertImage.aspx +++ /dev/null @@ -1,202 +0,0 @@ -<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="insertImage.aspx.cs" Inherits="umbraco.presentation.plugins.tinymce3.insertImage" %> -<%@ Register TagPrefix="ui" Namespace="umbraco.uicontrols" Assembly="controls" %> -<%@ Register TagPrefix="umb" Namespace="ClientDependency.Core.Controls" Assembly="ClientDependency.Core" %> -<%@ Register TagPrefix="umb2" TagName="Tree" Src="../../controls/Tree/TreeControl.ascx" %> -<%@ Register TagPrefix="umb3" TagName="Image" Src="../../controls/Images/ImageViewer.ascx" %> -<%@ Register TagName="MediaUpload" TagPrefix="umb4" Src="../../controls/Images/UploadMediaImage.ascx" %> -<%@ Register TagPrefix="umbClient" Namespace="Umbraco.Web.UI.Bundles" %> - - - - - {#advimage_dlg.dialog_title} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - - - - - - - - - - - - - - : - : - - - - -
    - - - - -
    - - <%--Manual initialization is set to true because the tree doesn't load properly in some browsers in this TinyMCE window--%> - - -
    -
    - - - -
    - -

    - or {#cancel} -

    - - - - - diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/insertImage.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/insertImage.aspx.cs deleted file mode 100644 index 9a392b36e0..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/insertImage.aspx.cs +++ /dev/null @@ -1,57 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; -using umbraco.BusinessLogic; -using umbraco.businesslogic.Exceptions; - -namespace umbraco.presentation.plugins.tinymce3 -{ - public partial class insertImage : BasePages.UmbracoEnsuredPage - { - protected uicontrols.TabView tbv = new uicontrols.TabView(); - - - protected void Page_Load(object sender, EventArgs e) - { - ClientLoader.DataBind(); - - pp_src.Text = ui.Text("url"); - pp_title.Text = ui.Text("name"); - pp_dimensions.Text = ui.Text("dimensions"); - - pane_src.Style.Add("height", "105px"); - - lt_heightLabel.Text = ui.Text("height"); - lt_widthLabel.Text = ui.Text("width"); - - Title = ui.Text("insertimage"); - - // Put user code to initialize the page here - var tp = tv_options.NewTabPage(ui.Text("choose")); - tp.HasMenu = false; - tp.Controls.Add(pane_select); - - var tp2 = tv_options.NewTabPage(ui.Text("create") + " " + ui.Text("new")); - tp2.HasMenu = false; - tp2.Controls.Add(pane_upload); - } - - - protected override void OnInit(EventArgs e) - { - tbv.ID = "tabview1"; - tbv.AutoResize = false; - tbv.Width = 500; - tbv.Height = 290; - - //this could be used for media or content so we need to at least validate that the user has access to one or the other - if (!ValidateUserApp(DefaultApps.content.ToString()) && !ValidateUserApp(DefaultApps.media.ToString())) - throw new UserAuthorizationException("The current user doesn't have access to the section/app"); - - base.OnInit(e); - } - - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/insertImage.aspx.designer.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/insertImage.aspx.designer.cs deleted file mode 100644 index 1ffa914459..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/insertImage.aspx.designer.cs +++ /dev/null @@ -1,222 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace umbraco.presentation.plugins.tinymce3 { - - - public partial class insertImage { - - /// - /// ClientLoader control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.UmbracoClientDependencyLoader ClientLoader; - - /// - /// JsInclude9 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::ClientDependency.Core.Controls.JsInclude JsInclude9; - - /// - /// JsInclude8 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::ClientDependency.Core.Controls.JsInclude JsInclude8; - - /// - /// JsInclude4 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::ClientDependency.Core.Controls.JsInclude JsInclude4; - - /// - /// JsInclude5 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::ClientDependency.Core.Controls.JsInclude JsInclude5; - - /// - /// JsInclude6 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::ClientDependency.Core.Controls.JsInclude JsInclude6; - - /// - /// JsInclude7 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::ClientDependency.Core.Controls.JsInclude JsInclude7; - - /// - /// JsInclude2 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::ClientDependency.Core.Controls.JsInclude JsInclude2; - - /// - /// JsInclude1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::ClientDependency.Core.Controls.JsInclude JsInclude1; - - /// - /// Form1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.HtmlControls.HtmlForm Form1; - - /// - /// ScriptManager1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.ScriptManager ScriptManager1; - - /// - /// pane_src control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.Pane pane_src; - - /// - /// ImageViewer control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.UserControl ImageViewer; - - /// - /// pp_src control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.PropertyPanel pp_src; - - /// - /// pp_title control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.PropertyPanel pp_title; - - /// - /// pp_dimensions control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.PropertyPanel pp_dimensions; - - /// - /// lt_widthLabel control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Literal lt_widthLabel; - - /// - /// lt_heightLabel control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Literal lt_heightLabel; - - /// - /// tv_options control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.TabView tv_options; - - /// - /// pane_select control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.Pane pane_select; - - /// - /// DialogTree control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.UserControl DialogTree; - - /// - /// pane_upload control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Panel pane_upload; - - /// - /// MediaUploader control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.controls.Images.UploadMediaImage MediaUploader; - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/insertLink.aspx b/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/insertLink.aspx deleted file mode 100644 index 8f0a32ca16..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/insertLink.aspx +++ /dev/null @@ -1,148 +0,0 @@ -<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="insertLink.aspx.cs" Inherits="umbraco.presentation.plugins.tinymce3.insertLink" %> -<%@ Register TagPrefix="umb" Namespace="ClientDependency.Core.Controls" Assembly="ClientDependency.Core" %> -<%@ Register TagPrefix="ui" Namespace="umbraco.uicontrols" Assembly="controls" %> -<%@ Register Src="../../controls/Tree/TreeControl.ascx" TagName="TreeControl" TagPrefix="umbraco" %> -<%@ Register TagPrefix="umbClient" Namespace="Umbraco.Web.UI.Bundles" %> - - - - - - - {#advlink_dlg.title} - - - - - - - - - - - - - - - - - - - - - - - -
    - - - - - - - - - - - - - - - - - -
    -
    - -
    - -
    -
    -
    -
    - -
    - - - -
    - -
    -
    - -
    - -
    -
    - -
    -

    - or cancel -

    - - - - - - diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/insertLink.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/insertLink.aspx.cs deleted file mode 100644 index 57e7166681..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/insertLink.aspx.cs +++ /dev/null @@ -1,64 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; -using Umbraco.Core; -using umbraco.BusinessLogic; -using umbraco.businesslogic.Exceptions; - -namespace umbraco.presentation.plugins.tinymce3 -{ - public partial class insertLink : BasePages.UmbracoEnsuredPage - { - protected override void OnInit(EventArgs e) - { - base.OnInit(e); - - //this could be used for media or content so we need to at least validate that the user has access to one or the other - if (!ValidateUserApp(DefaultApps.content.ToString()) && !ValidateUserApp(DefaultApps.media.ToString())) - throw new UserAuthorizationException("The current user doesn't have access to the section/app"); - } - - protected void Page_Load(object sender, System.EventArgs e) - { - ClientLoader.DataBind(); - - uicontrols.TabPage tp = tv_options.NewTabPage(ui.Text("content")); - tp.HasMenu = false; - tp.Controls.Add(pane_content); - - - if (CurrentUser.GetApplications().Find(t => t.alias == Constants.Applications.Media) != null) - { - uicontrols.TabPage tp2 = tv_options.NewTabPage(ui.Text("media")); - tp2.HasMenu = false; - tp2.Controls.Add(pane_media); - } else - { - pane_media.Visible = false; - } - - - } - - protected override void Render(HtmlTextWriter writer) - { - // clear form action - Page.Form.Attributes.Add("onsubmit", "insertAction();return false;"); - // Page.Form.Action = "#"; - // this context item is needed to prevent the urlrewriterformwriter class to change the action - // HttpContext.Current.Items["UrlRewriterFormWriterDisableAction"] = "true"; - // HttpContext.Current.Items["ActionAlreadyWritten"] = "true"; - - base.Render(writer); - } - - public User GetUser() - { - return base.getUser(); - } - - - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/insertLink.aspx.designer.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/insertLink.aspx.designer.cs deleted file mode 100644 index 6377250720..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/insertLink.aspx.designer.cs +++ /dev/null @@ -1,150 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace umbraco.presentation.plugins.tinymce3 { - - - public partial class insertLink { - - /// - /// Head1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.HtmlControls.HtmlHead Head1; - - /// - /// ClientLoader control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.UmbracoClientDependencyLoader ClientLoader; - - /// - /// JsInclude1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::ClientDependency.Core.Controls.JsInclude JsInclude1; - - /// - /// JsInclude3 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::ClientDependency.Core.Controls.JsInclude JsInclude3; - - /// - /// JsInclude4 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::ClientDependency.Core.Controls.JsInclude JsInclude4; - - /// - /// JsInclude5 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::ClientDependency.Core.Controls.JsInclude JsInclude5; - - /// - /// pane_url control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.Pane pane_url; - - /// - /// PropertyPanel1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.PropertyPanel PropertyPanel1; - - /// - /// PropertyPanel2 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.PropertyPanel PropertyPanel2; - - /// - /// PropertyPanel3 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.PropertyPanel PropertyPanel3; - - /// - /// tv_options control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.TabView tv_options; - - /// - /// pane_content control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.Pane pane_content; - - /// - /// TreeControl2 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.UserControl TreeControl2; - - /// - /// pane_media control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.Pane pane_media; - - /// - /// TreeControl1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.UserControl TreeControl1; - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/insertMacro.aspx b/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/insertMacro.aspx deleted file mode 100644 index 49f12277e2..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/insertMacro.aspx +++ /dev/null @@ -1,159 +0,0 @@ -<%@ Page Language="c#" ValidateRequest="false" CodeBehind="insertMacro.aspx.cs" AutoEventWireup="True" - Inherits="umbraco.presentation.tinymce3.insertMacro" Trace="false" %> - -<%@ Register TagPrefix="ui" Namespace="umbraco.uicontrols" Assembly="controls" %> -<%@ Register TagPrefix="umb" Namespace="ClientDependency.Core.Controls" Assembly="ClientDependency.Core" %> -<%@ Register TagPrefix="asp" Namespace="System.Web.UI" Assembly="System.Web" %> -<%@ Register TagPrefix="umbClient" Namespace="Umbraco.Web.UI.Bundles" %> - - - - {#advlink_dlg.title} - - - - - - - - - - - - - - - - - - - -
    - - - - " /> - <%if (Request["umb_macroID"] != null || Request["umb_macroAlias"] != null) - {%> - " /> - " /> - <% }%> - -
    - -
    -
    - -

    - - - or - <%=umbraco.ui.Text("general", "cancel", this.getUser())%> -

    -
    - - - - - - -

    - " /> - or - <%=umbraco.ui.Text("general", "cancel", this.getUser())%> -

    -
    - -
    - - - diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/insertMacro.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/insertMacro.aspx.cs deleted file mode 100644 index 8edb4fced0..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/insertMacro.aspx.cs +++ /dev/null @@ -1,230 +0,0 @@ -using System; -using System.Collections; -using System.Data; -using System.Reflection; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; -using Umbraco.Core.IO; -using umbraco.BasePages; -using umbraco.BusinessLogic; -using umbraco.businesslogic.Exceptions; -using umbraco.cms.businesslogic.macro; -using umbraco.interfaces; -using umbraco.DataLayer; - -namespace umbraco.presentation.tinymce3 -{ - /// - /// Summary description for insertMacro. - /// - public partial class insertMacro : UmbracoEnsuredPage - { - protected Button Button1; - private readonly ArrayList _dataFields = new ArrayList(); - public Macro m; - private string _scriptOnLoad = ""; - - protected override void OnInit(EventArgs e) - { - base.OnInit(e); - - //this could be used for media or content so we need to at least validate that the user has access to one or the other - if (!ValidateUserApp(DefaultApps.content.ToString()) && !ValidateUserApp(DefaultApps.media.ToString())) - throw new UserAuthorizationException("The current user doesn't have access to the section/app"); - } - - protected override void OnPreRender(EventArgs e) - { - base.OnPreRender(e); - - if (!string.IsNullOrEmpty(_scriptOnLoad)) - { - jQueryReady.Text = _scriptOnLoad; - } - } - - protected void Page_Load(object sender, EventArgs e) - { - ClientLoader.DataBind(); - - _scriptOnLoad = ""; - - var reqMacroId = Request["umb_macroID"]; - var reqMacroAlias = Request["umb_macroAlias"]; - var ignoreForm = string.IsNullOrEmpty(Request["class"]); - - pane_insert.Text = ui.Text("insertMacro"); - Page.Title = ui.Text("insertMacro"); - - if (!string.IsNullOrEmpty(reqMacroId) || !string.IsNullOrEmpty(reqMacroAlias)) - { - - pane_edit.Visible = true; - pane_insert.Visible = false; - edit_buttons.Visible = true; - insert_buttons.Visible = false; - - // Put user code to initialize the page here - if (!string.IsNullOrEmpty(reqMacroId)) - { - m = new Macro(int.Parse(reqMacroId)); - } - else - { - m = new Macro(reqMacroAlias); - } - - pane_edit.Text = ui.Text("edit") + " " + m.Name; - Page.Title = ui.Text("edit") + " " + m.Name; - - if (m.Properties.Length == 0) - { - - if (ignoreForm) - { - renderMacro_Click(null, EventArgs.Empty); - } - else - { - var fb = new Literal(); - fb.Text = "

    " + ui.Text("macroDoesNotHaveProperties") + "

    " + ui.Text("closeThisWindow") + ""; - macroProperties.Controls.Add(fb); - edit_buttons.Visible = false; - } - - } - else - { - foreach (var mp in m.Properties) - { - - var macroAssembly = mp.Type.Assembly; - var macroType = mp.Type.Type; - try - { - var assembly = Assembly.LoadFrom(IOHelper.MapPath(SystemDirectories.Bin + "/" + macroAssembly + ".dll")); - - var type = assembly.GetType(macroAssembly + "." + macroType); - var typeInstance = Activator.CreateInstance(type) as IMacroGuiRendering; - if (typeInstance != null) - { - var control = Activator.CreateInstance(type) as Control; - control.ID = mp.Alias; - - if (!IsPostBack) - { - string propertyValue = Request["umb_" + mp.Alias]; - if (propertyValue != null) - { - // replace linebreaks and quotes - propertyValue = - propertyValue.Replace("\\r", "\r").Replace("\\n", "\n").Replace("\\\"", "\""); - - // check encoding - propertyValue = HttpUtility.UrlDecode(propertyValue); - - if (propertyValue != "") - { - type.GetProperty("Value").SetValue(control, - Convert.ChangeType( - propertyValue, - type.GetProperty("Value").PropertyType), - null); - } - } - } - - - var pp = new uicontrols.PropertyPanel(); - pp.Text = mp.Name; - pp.Controls.Add(control); - _scriptOnLoad += "\t\tregisterAlias('" + control.ID + "');\n"; - macroProperties.Controls.Add(pp); - - _dataFields.Add(control); - - - } - else - { - Trace.Warn("umbEditContent", - "Type doesn't exist or is not umbraco.interfaces.DataFieldI ('" + macroAssembly + - "." + macroType + "')"); - } - } - catch (Exception fieldException) - { - Trace.Warn("umbEditContent", "Error creating type '" + macroAssembly + "." + macroType + "'", - fieldException); - } - } - } - } - else - { - IRecordsReader macroRenderings; - if (Request["editor"] != "") - { - const string query = "select macroAlias, macroName from cmsMacro where macroUseInEditor = 1 order by macroName"; - using (var sqlHelper = BusinessLogic.Application.SqlHelper) - using (var renderings = sqlHelper.ExecuteReader(query)) - macroRenderings = renderings; - } - else - { - const string query = "select macroAlias, macroName from cmsMacro order by macroName"; - using (var sqlHelper = BusinessLogic.Application.SqlHelper) - using (var renderings = sqlHelper.ExecuteReader(query)) - macroRenderings = renderings; - } - - umb_macroAlias.DataSource = macroRenderings; - umb_macroAlias.DataValueField = "macroAlias"; - umb_macroAlias.DataTextField = "macroName"; - umb_macroAlias.DataBind(); - macroRenderings.Close(); - } - } - - - protected void renderMacro_Click(object sender, EventArgs e) - { - var pageId = int.Parse(Request["umbPageId"]); - - var macroAttributes = string.Format("macroAlias=\"{0}\"", m.Alias); - - var pageVersion = new Guid(Request["umbVersionId"]); - - var attributes = new Hashtable { { "macroAlias", m.Alias } }; - - foreach (Control c in _dataFields) - { - try - { - var ic = (IMacroGuiRendering)c; - attributes.Add(c.ID.ToLower(), ic.Value); - macroAttributes += string.Format(" {0}=\"{1}\"", c.ID, ic.Value.Replace("\"", "\\\"").Replace("\n", "\\n").Replace("\r", "\\r")); - } - catch - { - } - } - - HttpContext.Current.Items["macrosAdded"] = 0; - HttpContext.Current.Items["pageID"] = pageId.ToString(); - - var div = macro.renderMacroStartTag(attributes, pageId, pageVersion).Replace("\\", "\\\\").Replace("'", "\\'"); - - var macroContent = macro.MacroContentByHttp(pageId, pageVersion, attributes).Replace("\\", "\\\\").Replace("'", "\\'").Replace("/", "\\/").Replace("\n", "\\n"); - - if (macroContent.Length > 0 && macroContent.ToLower().IndexOf(" -1) - macroContent = "Macro rendering contains script code
    This macro won\\'t be rendered in the editor because it contains script code. It will render correct during runtime."; - - div += macroContent; - div += macro.renderMacroEndTag(); - - _scriptOnLoad += string.Format("\t\tumbracoEditMacroDo('{0}', '{1}', '{2}');\n", macroAttributes.Replace("'", "\\'"), m.Name.Replace("'", "\\'"), div); - } - } -} \ No newline at end of file diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/insertMacro.aspx.designer.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/insertMacro.aspx.designer.cs deleted file mode 100644 index fa9f711345..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/insertMacro.aspx.designer.cs +++ /dev/null @@ -1,177 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace umbraco.presentation.tinymce3 { - - - public partial class insertMacro { - - ///

    - /// ClientLoader control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.UmbracoClientDependencyLoader ClientLoader; - - /// - /// JsInclude8 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::ClientDependency.Core.Controls.JsInclude JsInclude8; - - /// - /// JsInclude1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::ClientDependency.Core.Controls.JsInclude JsInclude1; - - /// - /// JsInclude3 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::ClientDependency.Core.Controls.JsInclude JsInclude3; - - /// - /// JsInclude4 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::ClientDependency.Core.Controls.JsInclude JsInclude4; - - /// - /// JsInclude5 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::ClientDependency.Core.Controls.JsInclude JsInclude5; - - /// - /// Form1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.HtmlControls.HtmlForm Form1; - - /// - /// ScriptManager1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.ScriptManager ScriptManager1; - - /// - /// pane_edit control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.Pane pane_edit; - - /// - /// macroProperties control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.PlaceHolder macroProperties; - - /// - /// edit_buttons control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Panel edit_buttons; - - /// - /// bt_renderMacro control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Button bt_renderMacro; - - /// - /// pane_insert control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.Pane pane_insert; - - /// - /// pp_selectMacro control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.PropertyPanel pp_selectMacro; - - /// - /// umb_macroAlias control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.DropDownList umb_macroAlias; - - /// - /// insert_buttons control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Panel insert_buttons; - - /// - /// renderHolder control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.PlaceHolder renderHolder; - - /// - /// jQueryReady control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Literal jQueryReady; - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/settings/editTemplate.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/settings/editTemplate.aspx.cs deleted file mode 100644 index 5aea269523..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/settings/editTemplate.aspx.cs +++ /dev/null @@ -1,356 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Web.UI; -using System.Web.UI.WebControls; -using Umbraco.Core; -using Umbraco.Core.Configuration; -using Umbraco.Core.IO; -using umbraco.BasePages; -using umbraco.BusinessLogic; - -using umbraco.cms.businesslogic.template; -using umbraco.cms.presentation.Trees; -using umbraco.DataLayer; -using umbraco.uicontrols; -using System.Linq; - -namespace umbraco.cms.presentation.settings -{ - /// - /// Summary description for editTemplate. - /// - public partial class editTemplate : UmbracoEnsuredPage - { - private Template _template; - public MenuButton SaveButton; - - public editTemplate() - { - CurrentApp = DefaultApps.settings.ToString(); - } - - protected override void OnPreRender(EventArgs e) - { - base.OnPreRender(e); - - ScriptManager.GetCurrent(Page).Services.Add( - new ServiceReference(IOHelper.ResolveUrl(SystemDirectories.WebServices + "/codeEditorSave.asmx"))); - ScriptManager.GetCurrent(Page).Services.Add( - new ServiceReference(IOHelper.ResolveUrl(SystemDirectories.WebServices + "/legacyAjaxCalls.asmx"))); - } - - protected string TemplateTreeSyncPath { get; private set; } - - protected void Page_Load(object sender, EventArgs e) - { - MasterTemplate.Attributes.Add("onchange", "changeMasterPageFile()"); - TemplateTreeSyncPath = "-1,init," + _template.Path.Replace("-1,", ""); - - if (!IsPostBack) - { - MasterTemplate.Items.Add(new ListItem(ui.Text("none"), "0")); - foreach (Template t in Template.GetAllAsList()) - { - if (t.Id != _template.Id) - { - var li = new ListItem(t.Text, t.Id.ToString()); - li.Attributes.Add("id", t.Alias.Replace(" ", "")); - MasterTemplate.Items.Add(li); - } - } - - NameTxt.Text = _template.GetRawText(); - AliasTxt.Text = _template.Alias; - editorSource.Text = _template.Design; - - try - { - if (_template.MasterTemplate > 0) - MasterTemplate.SelectedValue = _template.MasterTemplate.ToString(); - } - catch (Exception ex) - { - } - - ClientTools - .SetActiveTreeType(Constants.Trees.Templates) - .SyncTree(TemplateTreeSyncPath, false); - - LoadScriptingTemplates(); - LoadMacros(); - } - } - - protected override void OnInit(EventArgs e) - { - _template = new Template(int.Parse(Request.QueryString["templateID"])); - // - // CODEGEN: This call is required by the ASP.NET Web Form Designer. - // - InitializeComponent(); - base.OnInit(e); - Panel1.hasMenu = true; - - var editor = Panel1.NewTabPage(ui.Text("template")); - editor.Controls.Add(Pane8); - - var props = Panel1.NewTabPage(ui.Text("properties")); - props.Controls.Add(Pane7); - - SaveButton = Panel1.Menu.NewButton(); - SaveButton.Text = ui.Text("save"); - SaveButton.ButtonType = MenuButtonType.Primary; - SaveButton.ID = "save"; - SaveButton.CssClass = "client-side"; - - Panel1.Text = ui.Text("edittemplate"); - pp_name.Text = ui.Text("name", UmbracoUser); - pp_alias.Text = ui.Text("alias", UmbracoUser); - pp_masterTemplate.Text = ui.Text("mastertemplate", UmbracoUser); - - - // Editing buttons - MenuIconI umbField = editorSource.Menu.NewIcon(); - umbField.ImageURL = UmbracoPath + "/images/editor/insField.gif"; - umbField.OnClickCommand = - ClientTools.Scripts.OpenModalWindow( - IOHelper.ResolveUrl(SystemDirectories.Umbraco) + "/dialogs/umbracoField.aspx?objectId=" + - editorSource.ClientID + "&tagName=UMBRACOGETDATA", ui.Text("template", "insertPageField"), 640, 550); - umbField.AltText = ui.Text("template", "insertPageField"); - - - // TODO: Update icon - MenuIconI umbDictionary = editorSource.Menu.NewIcon(); - umbDictionary.ImageURL = GlobalSettings.Path + "/images/editor/dictionaryItem.gif"; - umbDictionary.OnClickCommand = - ClientTools.Scripts.OpenModalWindow( - IOHelper.ResolveUrl(SystemDirectories.Umbraco) + "/dialogs/umbracoField.aspx?objectId=" + - editorSource.ClientID + "&tagName=UMBRACOGETDICTIONARY", ui.Text("template", "insertDictionaryItem"), - 640, 550); - umbDictionary.AltText = "Insert umbraco dictionary item"; - - editorSource.Menu.NewElement("div", "splitButtonMacroPlaceHolder", "sbPlaceHolder", 40); - - if (UmbracoConfig.For.UmbracoSettings().Templates.UseAspNetMasterPages) - { - MenuIconI umbContainer = editorSource.Menu.NewIcon(); - umbContainer.ImageURL = UmbracoPath + "/images/editor/masterpagePlaceHolder.gif"; - umbContainer.AltText = ui.Text("template", "insertContentAreaPlaceHolder"); - umbContainer.OnClickCommand = - ClientTools.Scripts.OpenModalWindow( - IOHelper.ResolveUrl(SystemDirectories.Umbraco) + - "/dialogs/insertMasterpagePlaceholder.aspx?&id=" + _template.Id, - ui.Text("template", "insertContentAreaPlaceHolder"), 470, 320); - - MenuIconI umbContent = editorSource.Menu.NewIcon(); - umbContent.ImageURL = UmbracoPath + "/images/editor/masterpageContent.gif"; - umbContent.AltText = ui.Text("template", "insertContentArea"); - umbContent.OnClickCommand = - ClientTools.Scripts.OpenModalWindow( - IOHelper.ResolveUrl(SystemDirectories.Umbraco) + "/dialogs/insertMasterpageContent.aspx?id=" + - _template.Id, ui.Text("template", "insertContentArea"), 470, 300); - } - - - //Spit button - editorSource.Menu.InsertSplitter(); - editorSource.Menu.NewElement("div", "splitButtonPlaceHolder", "sbPlaceHolder", 40); - - // Help - editorSource.Menu.InsertSplitter(); - - MenuIconI helpIcon = editorSource.Menu.NewIcon(); - helpIcon.OnClickCommand = - ClientTools.Scripts.OpenModalWindow( - IOHelper.ResolveUrl(SystemDirectories.Umbraco) + "/settings/modals/showumbracotags.aspx?alias=" + - _template.Alias, ui.Text("template", "quickGuide"), 600, 580); - helpIcon.ImageURL = UmbracoPath + "/images/editor/help.png"; - helpIcon.AltText = ui.Text("template", "quickGuide"); - } - - - private void LoadScriptingTemplates() - { - string path = SystemDirectories.Umbraco + "/scripting/templates/cshtml/"; - string abPath = IOHelper.MapPath(path); - - var files = new List>(); - - if (Directory.Exists(abPath)) - { - string extension = ".cshtml"; - - foreach (FileInfo fi in new DirectoryInfo(abPath).GetFiles("*" + extension)) - { - string filename = Path.GetFileName(fi.FullName); - - files.Add(new KeyValuePair( - filename, - filename.Replace(extension, "").SplitPascalCasing().ToFirstUpperInvariant() - )); - } - } - - rpt_codeTemplates.DataSource = files; - rpt_codeTemplates.DataBind(); - } - - private void LoadMacros() - { - using (var sqlHelper = BusinessLogic.Application.SqlHelper) - using (IRecordsReader macroRenderings = - sqlHelper.ExecuteReader("select id, macroAlias, macroName from cmsMacro order by macroName")) - { - rpt_macros.DataSource = macroRenderings; - rpt_macros.DataBind(); - } - } - - public string DoesMacroHaveSettings(string macroId) - { - using (var sqlHelper = BusinessLogic.Application.SqlHelper) - if ( - sqlHelper.ExecuteScalar(string.Format("select 1 from cmsMacroProperty where macro = {0}", macroId)) == - 1) - return "1"; - else - return "0"; - } - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - } - - /// - /// CssInclude1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::ClientDependency.Core.Controls.CssInclude CssInclude1; - - /// - /// JsInclude control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::ClientDependency.Core.Controls.JsInclude JsInclude; - - /// - /// Panel1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.TabView Panel1; - - /// - /// Pane7 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.Pane Pane7; - protected global::umbraco.uicontrols.Pane Pane8; - - /// - /// pp_name control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.PropertyPanel pp_name; - - /// - /// NameTxt control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.TextBox NameTxt; - - /// - /// pp_alias control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.PropertyPanel pp_alias; - - /// - /// AliasTxt control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.TextBox AliasTxt; - - /// - /// pp_masterTemplate control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.PropertyPanel pp_masterTemplate; - - /// - /// MasterTemplate control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.DropDownList MasterTemplate; - - /// - /// pp_source control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.PropertyPanel pp_source; - - /// - /// editorSource control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.CodeArea editorSource; - - /// - /// rpt_codeTemplates control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Repeater rpt_codeTemplates; - - /// - /// rpt_macros control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Repeater rpt_macros; - } -} \ No newline at end of file diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/settings/scripts/editScript.aspx b/src/Umbraco.Web/umbraco.presentation/umbraco/settings/scripts/editScript.aspx deleted file mode 100644 index 089f28ea47..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/settings/scripts/editScript.aspx +++ /dev/null @@ -1,59 +0,0 @@ -<%@ Page Language="C#" MasterPageFile="../../masterpages/umbracoPage.Master" AutoEventWireup="true" - CodeBehind="editScript.aspx.cs" Inherits="umbraco.cms.presentation.settings.scripts.editScript" - ValidateRequest="False" %> - -<%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/settings/scripts/editScript.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/settings/scripts/editScript.aspx.cs deleted file mode 100644 index 8cd9082b5b..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/settings/scripts/editScript.aspx.cs +++ /dev/null @@ -1,149 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Web; -using System.Web.SessionState; -using System.Web.UI; -using System.Web.UI.WebControls; -using System.Web.UI.HtmlControls; -using System.IO; -using Umbraco.Core; -using Umbraco.Core.Configuration; -using Umbraco.Core.IO; -using umbraco.cms.presentation.Trees; -using System.Linq; -using umbraco.cms.helpers; -using umbraco.uicontrols; - -namespace umbraco.cms.presentation.settings.scripts -{ - public partial class editScript : BasePages.UmbracoEnsuredPage - { - public editScript() - { - CurrentApp = BusinessLogic.DefaultApps.settings.ToString(); - - } - protected System.Web.UI.HtmlControls.HtmlForm Form1; - protected uicontrols.TabView Panel1; - protected System.Web.UI.WebControls.TextBox NameTxt; - protected uicontrols.Pane Pane7; - protected uicontrols.Pane Pane8; - - protected System.Web.UI.WebControls.Literal lttPath; - protected System.Web.UI.WebControls.Literal editorJs; - protected umbraco.uicontrols.CodeArea editorSource; - protected umbraco.uicontrols.PropertyPanel pp_name; - protected umbraco.uicontrols.PropertyPanel pp_path; - - protected MenuButton SaveButton; - - private string filename; - protected string ScriptTreeSyncPath { get; private set; } - - protected override void OnLoad(EventArgs e) - { - base.OnLoad(e); - - // get the script, ensure it exists (not null) and validate (because - // the file service ensures that it loads scripts from the proper location - // but does not seem to validate extensions?) - in case of an error, - // throw - that's what we did anyways. - - // also scrapping the code that added .cshtml and .vbhtml extensions, and - // ~/Views directory - we're not using editScript.aspx for views anymore. - - var svce = ApplicationContext.Current.Services.FileService; - var script = svce.GetScriptByName(filename); - if (script == null) // not found - throw new FileNotFoundException("Could not find file '" + filename + "'."); - - lttPath.Text = "" + script.VirtualPath + ""; - editorSource.Text = script.Content; - ScriptTreeSyncPath = DeepLink.GetTreePathFromFilePath(filename); - - // name derives from filename, clean for xss - NameTxt.Text = filename.CleanForXss('\\', '/'); - - Panel1.Text = ui.Text("editscript", base.getUser()); - pp_name.Text = ui.Text("name", base.getUser()); - pp_path.Text = ui.Text("path", base.getUser()); - - if (IsPostBack == false) - { - ClientTools - .SetActiveTreeType(TreeDefinitionCollection.Instance.FindTree().Tree.Alias) - .SyncTree(ScriptTreeSyncPath, false); - } - } - - override protected void OnInit(EventArgs e) - { - base.OnInit(e); - - filename = Request.QueryString["file"].Replace('\\', '/').TrimStart('/'); - - //need to change the editor type if it is XML - if (filename.EndsWith("xml")) - editorSource.CodeBase = uicontrols.CodeArea.EditorType.XML; - else if (filename.EndsWith("master")) - editorSource.CodeBase = uicontrols.CodeArea.EditorType.HTML; - - - var editor = Panel1.NewTabPage(ui.Text("settings","script")); - editor.Controls.Add(Pane7); - - var props = Panel1.NewTabPage(ui.Text("properties")); - props.Controls.Add(Pane8); - - - SaveButton = Panel1.Menu.NewButton(); - SaveButton.Text = ui.Text("save"); - SaveButton.ButtonType = MenuButtonType.Primary; - SaveButton.ID = "save"; - SaveButton.CssClass = "client-side"; - - if (editorSource.CodeBase == uicontrols.CodeArea.EditorType.HTML) - { - // Editing buttons - Panel1.Menu.InsertSplitter(); - uicontrols.MenuIconI umbField = Panel1.Menu.NewIcon(); - umbField.ImageURL = UmbracoPath + "/images/editor/insField.gif"; - umbField.OnClickCommand = BasePages.ClientTools.Scripts.OpenModalWindow(IOHelper.ResolveUrl(SystemDirectories.Umbraco) + "/dialogs/umbracoField.aspx?objectId=" + editorSource.ClientID + "&tagName=UMBRACOGETDATA", ui.Text("template", "insertPageField"), 640, 550); - umbField.AltText = ui.Text("template", "insertPageField"); - - // TODO: Update icon - uicontrols.MenuIconI umbDictionary = Panel1.Menu.NewIcon(); - umbDictionary.ImageURL = GlobalSettings.Path + "/images/editor/dictionaryItem.gif"; - umbDictionary.OnClickCommand = BasePages.ClientTools.Scripts.OpenModalWindow(IOHelper.ResolveUrl(SystemDirectories.Umbraco) + "/dialogs/umbracoField.aspx?objectId=" + editorSource.ClientID + "&tagName=UMBRACOGETDICTIONARY", ui.Text("template", "insertDictionaryItem"), 640, 550); - umbDictionary.AltText = "Insert umbraco dictionary item"; - - uicontrols.MenuIconI umbMacro = Panel1.Menu.NewIcon(); - umbMacro.ImageURL = UmbracoPath + "/images/editor/insMacro.gif"; - umbMacro.AltText = ui.Text("template", "insertMacro"); - umbMacro.OnClickCommand = BasePages.ClientTools.Scripts.OpenModalWindow(IOHelper.ResolveUrl(SystemDirectories.Umbraco) + "/dialogs/editMacro.aspx?objectId=" + editorSource.ClientID, ui.Text("template", "insertMacro"), 470, 530); - - // Help - Panel1.Menu.InsertSplitter(); - - uicontrols.MenuIconI helpIcon = Panel1.Menu.NewIcon(); - helpIcon.OnClickCommand = umbraco.BasePages.ClientTools.Scripts.OpenModalWindow(Umbraco.Core.IO.IOHelper.ResolveUrl(Umbraco.Core.IO.SystemDirectories.Umbraco) + "/settings/modals/showumbracotags.aspx?alias=", ui.Text("template", "quickGuide"), 600, 580); - helpIcon.ImageURL = UmbracoPath + "/images/editor/help.png"; - helpIcon.AltText = ui.Text("template", "quickGuide"); - - } - - } - - protected override void OnPreRender(EventArgs e) - { - base.OnPreRender(e); - ScriptManager.GetCurrent(Page).Services.Add(new ServiceReference("../webservices/codeEditorSave.asmx")); - ScriptManager.GetCurrent(Page).Services.Add(new ServiceReference("../webservices/legacyAjaxCalls.asmx")); - } - - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/templateControls/Item.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/templateControls/Item.cs index 6d0465f693..346008bda3 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/templateControls/Item.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/templateControls/Item.cs @@ -1,6 +1,7 @@ using System; using System.Collections; using System.ComponentModel; +using System.Globalization; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; @@ -304,7 +305,7 @@ namespace umbraco.presentation.templateControls protected virtual bool FieldEditableWithUserPermissions() { BusinessLogic.User u = helper.GetCurrentUmbracoUser(); - return u != null && u.GetPermissions(PageElements["path"].ToString()).Contains(ActionUpdate.Instance.Letter.ToString()); + return u != null && u.GetPermissions(PageElements["path"].ToString()).Contains(ActionUpdate.Instance.Letter.ToString(CultureInfo.InvariantCulture)); } #endregion diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/users/EditUser.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/users/EditUser.aspx.cs deleted file mode 100644 index 91a8677c81..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/users/EditUser.aspx.cs +++ /dev/null @@ -1,635 +0,0 @@ -using System; -using System.Collections; -using System.Configuration.Provider; -using System.Globalization; -using System.IO; -using System.Linq; -using System.Web; -using System.Web.Security; -using System.Web.UI; -using System.Web.UI.HtmlControls; -using System.Web.UI.WebControls; -using System.Xml; -using Umbraco.Core.Configuration; -using Umbraco.Core.Logging; -using Umbraco.Core.Security; -using Umbraco.Web; -using Umbraco.Web.Models; -using Umbraco.Web.Security; -using umbraco.BasePages; -using umbraco.BusinessLogic; -using umbraco.businesslogic.Exceptions; -using umbraco.cms.businesslogic.media; -using umbraco.cms.businesslogic.web; -using umbraco.controls; -using umbraco.presentation.channels.businesslogic; -using umbraco.uicontrols; -using umbraco.providers; -using umbraco.cms.presentation.Trees; -using Umbraco.Core.IO; -using Umbraco.Core; -using Umbraco.Core.Models; -using Umbraco.Core.Services; -using PropertyType = umbraco.cms.businesslogic.propertytype.PropertyType; -using System.Text.RegularExpressions; -using System.Text; - -namespace umbraco.cms.presentation.user -{ - /// - /// Summary description for EditUser. - /// - public partial class EditUser : UmbracoEnsuredPage - { - public EditUser() - { - CurrentApp = DefaultApps.users.ToString(); - } - protected HtmlTable macroProperties; - protected TextBox uname = new TextBox() { ID = "uname" }; - protected RequiredFieldValidator unameValidator = new RequiredFieldValidator(); - protected TextBox lname = new TextBox() { ID = "lname" }; - protected RequiredFieldValidator lnameValidator = new RequiredFieldValidator(); - protected CustomValidator lnameCustomValidator = new CustomValidator(); - protected PlaceHolder passw = new PlaceHolder(); - protected CheckBoxList lapps = new CheckBoxList(); - protected TextBox email = new TextBox() { ID = "email" }; - protected RequiredFieldValidator emailValidator = new RequiredFieldValidator(); - protected CustomValidator emailCustomValidator = new CustomValidator(); - protected DropDownList userType = new DropDownList(); - protected DropDownList userLanguage = new DropDownList(); - protected CheckBox NoConsole = new CheckBox(); - protected CheckBox Disabled = new CheckBox(); - - protected ContentPicker mediaPicker = new ContentPicker(); - protected ContentPicker contentPicker = new ContentPicker(); - - protected TextBox cName = new TextBox(); - protected CheckBox cFulltree = new CheckBox(); - protected DropDownList cDocumentType = new DropDownList(); - protected DropDownList cDescription = new DropDownList(); - protected DropDownList cCategories = new DropDownList(); - protected DropDownList cExcerpt = new DropDownList(); - protected ContentPicker cMediaPicker = new ContentPicker(); - protected ContentPicker cContentPicker = new ContentPicker(); - protected CustomValidator sectionValidator = new CustomValidator(); - - protected Pane pp = new Pane(); - - private User u; - - private MembershipHelper _membershipHelper; - - private MembershipProvider BackOfficeProvider - { - get { return global::Umbraco.Core.Security.MembershipProviderExtensions.GetUsersMembershipProvider(); } - } - - protected void Page_Load(object sender, EventArgs e) - { - _membershipHelper = new MembershipHelper(UmbracoContext.Current); - int UID = int.Parse(Request.QueryString["id"]); - u = BusinessLogic.User.GetUser(UID); - - //the true admin can only edit the true admin - if (u.Id == 0 && CurrentUser.Id != 0) - { - throw new Exception("Only the root user can edit the 'root' user (id:0)"); - } - - //only another admin can edit another admin (who is not the true admin) - if (u.IsAdmin() && CurrentUser.IsAdmin() == false) - { - throw new Exception("Admin users can only be edited by admins"); - } - - // Populate usertype list - foreach (UserType ut in UserType.getAll) - { - if (CurrentUser.IsAdmin() || ut.Alias != "admin") - { - ListItem li = new ListItem(ui.Text("user", ut.Name.ToLower(), UmbracoUser), ut.Id.ToString()); - if (ut.Id == u.UserType.Id) - li.Selected = true; - - userType.Items.Add(li); - } - } - - var userCulture = UserExtensions.GetUserCulture(u.Language, Services.TextService); - - // Populate ui language lsit - foreach (var lang in Services.TextService.GetSupportedCultures()) - { - var regionCode = Services.TextService.ConvertToRegionCodeFromSupportedCulture(lang); - - var li = new ListItem(lang.DisplayName, regionCode); - - if (Equals(lang, userCulture)) - li.Selected = true; - - userLanguage.Items.Add(li); - } - - // Console access and disabling - NoConsole.Checked = u.NoConsole; - Disabled.Checked = u.Disabled; - - PlaceHolder medias = new PlaceHolder(); - mediaPicker.AppAlias = Constants.Applications.Media; - mediaPicker.TreeAlias = "media"; - - if (u.StartMediaId > 0) - mediaPicker.Value = u.StartMediaId.ToString(); - else - mediaPicker.Value = "-1"; - - medias.Controls.Add(mediaPicker); - - PlaceHolder content = new PlaceHolder(); - contentPicker.AppAlias = Constants.Applications.Content; - contentPicker.TreeAlias = "content"; - - if (u.StartNodeId > 0) - contentPicker.Value = u.StartNodeId.ToString(); - else - contentPicker.Value = "-1"; - - content.Controls.Add(contentPicker); - - // Add password changer - var passwordChanger = (passwordChanger)LoadControl(SystemDirectories.Umbraco + "/controls/passwordChanger.ascx"); - passwordChanger.MembershipProviderName = UmbracoSettings.DefaultBackofficeProvider; - - //Add a custom validation message for the password changer - var passwordValidation = new CustomValidator - { - ID = "PasswordChangerValidator" - }; - var validatorContainer = new HtmlGenericControl("div") - { - Visible = false, - EnableViewState = false - }; - validatorContainer.Attributes["class"] = "alert alert-error"; - validatorContainer.Style.Add(HtmlTextWriterStyle.MarginTop, "10px"); - validatorContainer.Style.Add(HtmlTextWriterStyle.Width, "300px"); - var validatorContainer2 = new HtmlGenericControl("p"); - validatorContainer.Controls.Add(validatorContainer2); - validatorContainer2.Controls.Add(passwordValidation); - passw.Controls.Add(passwordChanger); - passw.Controls.Add(validatorContainer); - - var validationSummary = new ValidationSummary - { - ID = "validationSummary", - DisplayMode = ValidationSummaryDisplayMode.BulletList, - CssClass = "error" - }; - - pp.addProperty(validationSummary); - - pp.addProperty(ui.Text("user", "username", UmbracoUser), uname, unameValidator); - pp.addProperty(ui.Text("user", "loginname", UmbracoUser), lname, lnameValidator, lnameCustomValidator); - pp.addProperty(ui.Text("user", "password", UmbracoUser), passw); - - pp.addProperty(ui.Text("general", "email", UmbracoUser), email, emailValidator, emailCustomValidator); - pp.addProperty(ui.Text("user", "usertype", UmbracoUser), userType); - pp.addProperty(ui.Text("user", "language", UmbracoUser), userLanguage); - - //Media / content root nodes - Pane ppNodes = new Pane(); - ppNodes.addProperty(ui.Text("user", "startnode", UmbracoUser), content); - ppNodes.addProperty(ui.Text("user", "mediastartnode", UmbracoUser), medias); - - //Generel umrbaco access - Pane ppAccess = new Pane(); - ppAccess.addProperty(ui.Text("user", "noConsole", UmbracoUser), NoConsole); - ppAccess.addProperty(ui.Text("user", "disabled", UmbracoUser), Disabled); - - //access to which modules... - Pane ppModules = new Pane(); - ppModules.addProperty(ui.Text("user", "modules", UmbracoUser), lapps); - ppModules.addProperty(" ", sectionValidator); - - TabPage userInfo = UserTabs.NewTabPage(u.Name); - - userInfo.Controls.Add(pp); - - userInfo.Controls.Add(ppAccess); - userInfo.Controls.Add(ppNodes); - - userInfo.Controls.Add(ppModules); - - userInfo.HasMenu = true; - - var save = userInfo.Menu.NewButton(); - save.Click += SaveUser_Click; - save.ID = "save"; - save.ToolTip = ui.Text("save"); - save.Text = ui.Text("save"); - save.ButtonType = MenuButtonType.Primary; - - sectionValidator.ServerValidate += SectionValidator_OnServerValidate; - sectionValidator.ControlToValidate = lapps.ID; - sectionValidator.ErrorMessage = ui.Text("errorHandling", "errorMandatoryWithoutTab", ui.Text("user", "modules", UmbracoUser), UmbracoUser); - sectionValidator.CssClass = "error"; - sectionValidator.Style.Add("color", "red"); - - unameValidator.ControlToValidate = uname.ID; - unameValidator.Display = ValidatorDisplay.Dynamic; - unameValidator.ErrorMessage = ui.Text("defaultdialogs", "requiredField", UmbracoUser); - unameValidator.CssClass = "error"; - unameValidator.Style.Add("color", "red"); - unameValidator.Style.Add("margin-left", "5px"); - unameValidator.Style.Add("line-height", "28px"); - - lnameValidator.ControlToValidate = lname.ID; - lnameValidator.Display = ValidatorDisplay.Dynamic; - lnameValidator.ErrorMessage = ui.Text("defaultdialogs", "requiredField", UmbracoUser); - lnameValidator.CssClass = "error"; - lnameValidator.Style.Add("color", "red"); - lnameValidator.Style.Add("margin-left", "5px"); - lnameValidator.Style.Add("line-height", "28px"); - - lnameCustomValidator.ServerValidate += LnameCustomValidator_OnServerValidate; - lnameCustomValidator.Display = ValidatorDisplay.Dynamic; - lnameCustomValidator.ControlToValidate = lname.ID; - var localizedLname = ui.Text("user", "loginname", UmbracoUser); - lnameCustomValidator.ErrorMessage = ui.Text("errorHandling", "errorExistsWithoutTab", localizedLname, UmbracoUser); - lnameCustomValidator.CssClass = "error"; - lnameCustomValidator.Style.Add("color", "red"); - lnameCustomValidator.Style.Add("margin-left", "5px"); - lnameCustomValidator.Style.Add("line-height", "28px"); - - emailValidator.ControlToValidate = email.ID; - emailValidator.Display = ValidatorDisplay.Dynamic; - emailValidator.ErrorMessage = ui.Text("defaultdialogs", "requiredField", UmbracoUser); - emailValidator.CssClass = "error"; - emailValidator.Style.Add("color", "red"); - emailValidator.Style.Add("margin-left", "5px"); - emailValidator.Style.Add("line-height", "28px"); - - emailCustomValidator.ServerValidate += EmailCustomValidator_OnServerValidate; - emailCustomValidator.Display = ValidatorDisplay.Dynamic; - emailCustomValidator.ControlToValidate = email.ID; - var localizedEmail = ui.Text("general", "email", UmbracoUser); - emailCustomValidator.ErrorMessage = ui.Text("errorHandling", "errorRegExpWithoutTab", localizedEmail, UmbracoUser); - emailCustomValidator.CssClass = "error"; - emailCustomValidator.Style.Add("color", "red"); - emailCustomValidator.Style.Add("margin-left", "5px"); - emailCustomValidator.Style.Add("line-height", "28px"); - - SetupForm(); - SetupChannel(); - - ClientTools - .SetActiveTreeType(TreeDefinitionCollection.Instance.FindTree().Tree.Alias) - .SyncTree(UID.ToString(), IsPostBack); - } - - private void LnameCustomValidator_OnServerValidate(object source, ServerValidateEventArgs args) - { - var usersWithLoginName = ApplicationContext.Services.UserService.GetByUsername(lname.Text); - args.IsValid = usersWithLoginName == null || usersWithLoginName.Id == u.Id; - } - - private void EmailCustomValidator_OnServerValidate(object source, ServerValidateEventArgs args) - { - args.IsValid = MembershipProviderBase.IsEmailValid(email.Text.Trim()); - } - - private void SectionValidator_OnServerValidate(object source, ServerValidateEventArgs args) - { - args.IsValid = false; - - if (lapps.SelectedIndex >= 0) - args.IsValid = true; - } - - private void SetupChannel() - { - Channel userChannel; - try - { - userChannel = - new Channel(u.Id); - } - catch - { - userChannel = new Channel(); - } - - // Populate dropdowns - var allContentTypes = Services.ContentTypeService.GetAllContentTypes().ToList(); - foreach (var dt in allContentTypes) - { - cDocumentType.Items.Add(new ListItem(dt.Name, dt.Alias)); - } - - // populate fields - var fields = new ArrayList(); - cDescription.ID = "cDescription"; - cCategories.ID = "cCategories"; - cExcerpt.ID = "cExcerpt"; - cDescription.Items.Add(new ListItem(ui.Text("choose"), "")); - cCategories.Items.Add(new ListItem(ui.Text("choose"), "")); - cExcerpt.Items.Add(new ListItem(ui.Text("choose"), "")); - - foreach (var pt in allContentTypes.SelectMany(x => x.PropertyTypes).OrderBy(x => x.Name)) - { - if (fields.Contains(pt.Alias) == false) - { - cDescription.Items.Add(new ListItem(string.Format("{0} ({1})", pt.Name, pt.Alias), pt.Alias)); - cCategories.Items.Add(new ListItem(string.Format("{0} ({1})", pt.Name, pt.Alias), pt.Alias)); - cExcerpt.Items.Add(new ListItem(string.Format("{0} ({1})", pt.Name, pt.Alias), pt.Alias)); - fields.Add(pt.Alias); - } - } - - // Handle content and media pickers - - PlaceHolder medias = new PlaceHolder(); - cMediaPicker.AppAlias = Constants.Applications.Media; - cMediaPicker.TreeAlias = "media"; - - if (userChannel.MediaFolder > 0) - cMediaPicker.Value = userChannel.MediaFolder.ToString(); - else - cMediaPicker.Value = "-1"; - - medias.Controls.Add(cMediaPicker); - - PlaceHolder content = new PlaceHolder(); - cContentPicker.AppAlias = Constants.Applications.Content; - cContentPicker.TreeAlias = "content"; - - if (userChannel.StartNode > 0) - cContentPicker.Value = userChannel.StartNode.ToString(); - else - cContentPicker.Value = "-1"; - - content.Controls.Add(cContentPicker); - - - // Setup the panes - Pane ppInfo = new Pane(); - ppInfo.addProperty(ui.Text("name", UmbracoUser), cName); - ppInfo.addProperty(ui.Text("user", "startnode", UmbracoUser), content); - ppInfo.addProperty(ui.Text("user", "searchAllChildren", UmbracoUser), cFulltree); - ppInfo.addProperty(ui.Text("user", "mediastartnode", UmbracoUser), medias); - - Pane ppFields = new Pane(); - ppFields.addProperty(ui.Text("user", "documentType", UmbracoUser), cDocumentType); - ppFields.addProperty(ui.Text("user", "descriptionField", UmbracoUser), cDescription); - ppFields.addProperty(ui.Text("user", "categoryField", UmbracoUser), cCategories); - ppFields.addProperty(ui.Text("user", "excerptField", UmbracoUser), cExcerpt); - - - TabPage channelInfo = UserTabs.NewTabPage(ui.Text("user", "contentChannel", UmbracoUser)); - - channelInfo.Controls.Add(ppInfo); - channelInfo.Controls.Add(ppFields); - - - if (!IsPostBack) - { - cName.Text = userChannel.Name; - cDescription.SelectedValue = userChannel.FieldDescriptionAlias; - cCategories.SelectedValue = userChannel.FieldCategoriesAlias; - cExcerpt.SelectedValue = userChannel.FieldExcerptAlias; - cDocumentType.SelectedValue = userChannel.DocumentTypeAlias; - cFulltree.Checked = userChannel.FullTree; - } - } - - /// - /// Setups the form. - /// - private void SetupForm() - { - - if (!IsPostBack) - { - MembershipUser user = BackOfficeProvider.GetUser(u.LoginName, false); - uname.Text = u.Name; - lname.Text = (user == null) ? u.LoginName : user.UserName; - email.Text = (user == null) ? u.Email : user.Email; - - contentPicker.Value = u.StartNodeId.ToString(CultureInfo.InvariantCulture); - mediaPicker.Value = u.StartMediaId.ToString(CultureInfo.InvariantCulture); - - // get the current users applications - string currentUserApps = ";"; - foreach (Application a in CurrentUser.Applications) - currentUserApps += a.alias + ";"; - - Application[] uapps = u.Applications; - foreach (Application app in BusinessLogic.Application.getAll()) - { - if (CurrentUser.IsAdmin() || currentUserApps.Contains(";" + app.alias + ";")) - { - ListItem li = new ListItem(ui.Text("sections", app.alias), app.alias); - if (!IsPostBack) foreach (Application tmp in uapps) if (app.alias == tmp.alias) li.Selected = true; - lapps.Items.Add(li); - } - } - } - } - - protected override void OnInit(EventArgs e) - { - base.OnInit(e); - - //lapps.SelectionMode = ListSelectionMode.Multiple; - lapps.RepeatLayout = RepeatLayout.Flow; - lapps.RepeatDirection = RepeatDirection.Vertical; - } - - protected override void OnPreRender(EventArgs e) - { - base.OnPreRender(e); - - ScriptManager.GetCurrent(Page).Services.Add(new ServiceReference("../webservices/CMSNode.asmx")); - // ScriptManager.GetCurrent(Page).Services.Add(new ServiceReference("../webservices/legacyAjaxCalls.asmx")); - - } - - /// - /// This handles changing the password - /// - /// - /// - /// - private void ChangePassword(passwordChanger passwordChangerControl, MembershipUser membershipUser, CustomValidator passwordChangerValidator) - { - if (passwordChangerControl.IsChangingPassword) - { - //SD: not sure why this check is here but must have been for some reason at some point? - if (string.IsNullOrEmpty(passwordChangerControl.ChangingPasswordModel.NewPassword) == false) - { - // make sure password is not empty - if (string.IsNullOrEmpty(u.Password)) u.Password = "default"; - } - - var changePasswordModel = passwordChangerControl.ChangingPasswordModel; - - //now do the actual change - var changePassResult = _membershipHelper.ChangePassword( - membershipUser.UserName, changePasswordModel, BackOfficeProvider); - - if (changePassResult.Success) - { - //if it is successful, we need to show the generated password if there was one, so set - //that back on the control - passwordChangerControl.ChangingPasswordModel.GeneratedPassword = changePassResult.Result.ResetPassword; - } - else - { - passwordChangerValidator.IsValid = false; - passwordChangerValidator.ErrorMessage = changePassResult.Result.ChangeError.ErrorMessage; - passw.Controls[1].Visible = true; - } - - } - } - - /// - /// Handles the Click event of the saveUser control. - /// - /// The source of the event. - /// The instance containing the event data. - private void SaveUser_Click(object sender, EventArgs e) - { - if (base.IsValid) - { - try - { - var membershipUser = BackOfficeProvider.GetUser(u.LoginName, false); - if (membershipUser == null) - { - throw new ProviderException("Could not find user in the membership provider with login name " + u.LoginName); - } - - var passwordChangerControl = (passwordChanger)passw.Controls[0]; - var passwordChangerValidator = (CustomValidator)passw.Controls[1].Controls[0].Controls[0]; - - //perform the changing password logic - ChangePassword(passwordChangerControl, membershipUser, passwordChangerValidator); - - //update the membership provider - UpdateMembershipProvider(membershipUser); - - //update the Umbraco user properties - even though we are updating some of these properties in the membership provider that is - // ok since the membership provider might be storing these details someplace totally different! But we want to keep our UI in sync. - u.Name = uname.Text.Trim(); - u.Language = userLanguage.SelectedValue; - u.UserType = UserType.GetUserType(int.Parse(userType.SelectedValue)); - u.Email = email.Text.Trim(); - u.LoginName = lname.Text; - u.Disabled = Disabled.Checked; - u.NoConsole = NoConsole.Checked; - - int startNode; - if (int.TryParse(contentPicker.Value, out startNode) == false) - { - //set to default if nothing is choosen - if (u.StartNodeId > 0) - startNode = u.StartNodeId; - else - startNode = -1; - } - u.StartNodeId = startNode; - - - int mstartNode; - if (int.TryParse(mediaPicker.Value, out mstartNode) == false) - { - //set to default if nothing is choosen - if (u.StartMediaId > 0) - mstartNode = u.StartMediaId; - else - mstartNode = -1; - } - u.StartMediaId = mstartNode; - - u.ClearApplications(); - foreach (ListItem li in lapps.Items) - { - if (li.Selected) u.AddApplication(li.Value); - } - - u.Save(); - - // save data - if (cName.Text != "") - { - Channel c; - try - { - c = new Channel(u.Id); - } - catch - { - c = new Channel(); - c.User = u; - } - - c.Name = cName.Text; - c.FullTree = cFulltree.Checked; - c.StartNode = int.Parse(cContentPicker.Value); - c.MediaFolder = int.Parse(cMediaPicker.Value); - c.FieldCategoriesAlias = cCategories.SelectedValue; - c.FieldDescriptionAlias = cDescription.SelectedValue; - c.FieldExcerptAlias = cExcerpt.SelectedValue; - c.DocumentTypeAlias = cDocumentType.SelectedValue; - - // - c.MediaTypeAlias = Constants.Conventions.MediaTypes.Image; // [LK:2013-03-22] This was previously lowercase; unsure if using const will cause an issue. - c.MediaTypeFileProperty = Constants.Conventions.Media.File; - c.ImageSupport = true; - - c.Save(); - - } - - ClientTools.ShowSpeechBubble(speechBubbleIcon.save, ui.Text("speechBubbles", "editUserSaved", UmbracoUser), ""); - } - catch (Exception ex) - { - ClientTools.ShowSpeechBubble(speechBubbleIcon.error, ui.Text("speechBubbles", "editUserError", UmbracoUser), ""); - LogHelper.Error("Exception", ex); - } - } - else - { - ClientTools.ShowSpeechBubble(speechBubbleIcon.error, - ui.Text("speechBubbles", "validationFailedHeader", UmbracoUser), - ui.Text("speechBubbles", "validationFailedMessage", UmbracoUser)); - } - } - - private void UpdateMembershipProvider(MembershipUser membershipUser) - { - //SD: This check must be here for some reason but apparently we don't want to try to - // update when the AD provider is active. - if ((BackOfficeProvider is ActiveDirectoryMembershipProvider) == false) - { - var membershipHelper = new MembershipHelper(ApplicationContext, new HttpContextWrapper(Context)); - //set the writable properties that we are editing - membershipHelper.UpdateMember(membershipUser, BackOfficeProvider, - email.Text.Trim(), - Disabled.Checked == false); - } - } - - /// - /// UserTabs control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected TabView UserTabs; - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/users/EditUserType.aspx b/src/Umbraco.Web/umbraco.presentation/umbraco/users/EditUserType.aspx deleted file mode 100644 index d8671f0596..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/users/EditUserType.aspx +++ /dev/null @@ -1,27 +0,0 @@ -<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="EditUserType.aspx.cs" MasterPageFile="../masterpages/umbracoPage.Master" - Inherits="umbraco.cms.presentation.user.EditUserType" %> - -<%@ Register TagPrefix="cc2" Namespace="umbraco.uicontrols" Assembly="controls" %> - - - - - - - - - - - - - - - - - - - diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/users/EditUserType.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/users/EditUserType.aspx.cs deleted file mode 100644 index b6796e45fa..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/users/EditUserType.aspx.cs +++ /dev/null @@ -1,121 +0,0 @@ -using System; -using System.Data; -using System.Configuration; -using System.Collections; -using System.Web; -using System.Web.Security; -using System.Web.UI; -using System.Web.UI.WebControls; -using System.Web.UI.WebControls.WebParts; -using System.Web.UI.HtmlControls; -using umbraco.BasePages; -using System.Collections.Generic; -using umbraco.interfaces; -using umbraco.BusinessLogic.Actions; -using umbraco.BusinessLogic; -using umbraco.uicontrols; -using umbraco.cms.presentation.Trees; -using Umbraco.Core.IO; - -namespace umbraco.cms.presentation.user -{ - public partial class EditUserType : UmbracoEnsuredPage - { - public EditUserType() - { - CurrentApp = BusinessLogic.DefaultApps.users.ToString(); - } - protected void Page_Load(object sender, EventArgs e) - { - pnlUmbraco.Text = umbraco.ui.Text("usertype", base.getUser()); - - var save = pnlUmbraco.Menu.NewButton(); - save.Click += save_Click; - save.ID = "save"; - save.ToolTip = ui.Text("save"); - save.Text = ui.Text("save"); - - pp_alias.Text = umbraco.ui.Text("usertype", base.getUser()) + " " + umbraco.ui.Text("alias", base.getUser()); - pp_name.Text = umbraco.ui.Text("usertype", base.getUser()) + " " + umbraco.ui.Text("name", base.getUser()); - - pp_rights.Text = umbraco.ui.Text("default", base.getUser()) + " " + umbraco.ui.Text("rights", base.getUser()); - - //ensure we have a query string - if (string.IsNullOrEmpty(Request.QueryString["id"])) - return; - //ensuer it is an integer - if (!int.TryParse(Request.QueryString["id"], out m_userTypeID)) - return; - - if (!IsPostBack) - { - BindActions(); - - ClientTools - .SetActiveTreeType(TreeDefinitionCollection.Instance.FindTree().Tree.Alias) - .SyncTree(m_userTypeID.ToString(), false); - } - - } - - void save_Click(object sender, EventArgs e) - { - UserType userType = CurrentUserType; - userType.Name = txtUserTypeName.Text; - string actions = ""; - - foreach (ListItem li in cbl_rights.Items) { - if (li.Selected) - actions += li.Value; - } - - userType.DefaultPermissions = actions; - userType.Save(); - - ClientTools.ShowSpeechBubble(speechBubbleIcon.save, ui.Text("speechBubbles", "editUserTypeSaved", base.getUser()), ""); - } - - protected List CurrentUserTypeActions - { - get - { - if (m_userTypeActions == null) - m_userTypeActions = umbraco.BusinessLogic.Actions.Action.FromString(CurrentUserType.DefaultPermissions); - return m_userTypeActions; - } - } - - protected UserType CurrentUserType - { - get - { - if (m_userType == null) - m_userType = UserType.GetUserType(m_userTypeID); - return m_userType; - } - } - private UserType m_userType; - private List m_userTypeActions; - private int m_userTypeID; - - private void BindActions() - { - lblUserTypeAlias.Text = CurrentUserType.Alias; - txtUserTypeName.Text = CurrentUserType.Name; - hidUserTypeID.Value = CurrentUserType.Id.ToString(); - - foreach (IAction ai in global::umbraco.BusinessLogic.Actions.Action.GetPermissionAssignable()) { - - ListItem li = new ListItem(umbraco.ui.Text(ai.Alias, base.getUser()), ai.Letter.ToString()); - - if(CurrentUserTypeActions.Contains(ai)) - li.Selected = true; - - cbl_rights.Items.Add(li); - } - } - - - - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/users/EditUserType.aspx.designer.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/users/EditUserType.aspx.designer.cs deleted file mode 100644 index ac1fddb9ec..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/users/EditUserType.aspx.designer.cs +++ /dev/null @@ -1,105 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace umbraco.cms.presentation.user { - - - public partial class EditUserType { - - /// - /// pnlUmbraco control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.UmbracoPanel pnlUmbraco; - - /// - /// pnl1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.Pane pnl1; - - /// - /// hidUserTypeID control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.HiddenField hidUserTypeID; - - /// - /// pp_name control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.PropertyPanel pp_name; - - /// - /// txtUserTypeName control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.TextBox txtUserTypeName; - - /// - /// pp_alias control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.PropertyPanel pp_alias; - - /// - /// lblUserTypeAlias control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Label lblUserTypeAlias; - - /// - /// pnl2 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.Pane pnl2; - - /// - /// pp_rights control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.PropertyPanel pp_rights; - - /// - /// cbl_rights control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.CheckBoxList cbl_rights; - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/users/NodePermissions.ascx b/src/Umbraco.Web/umbraco.presentation/umbraco/users/NodePermissions.ascx deleted file mode 100644 index 64b6717579..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/users/NodePermissions.ascx +++ /dev/null @@ -1,35 +0,0 @@ -<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="NodePermissions.ascx.cs" Inherits="umbraco.cms.presentation.user.NodePermissions" %> -

    - <%=umbraco.ui.Text("user", "permissionSelectedPages")%> -
    - -

    - - -

    - - - - -

    -
    - - - - -
      - - -
    • - /> - -
    • -
      - -
    - -
    \ No newline at end of file diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/users/NodePermissions.ascx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/users/NodePermissions.ascx.cs deleted file mode 100644 index 26a601a9ac..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/users/NodePermissions.ascx.cs +++ /dev/null @@ -1,145 +0,0 @@ -using System; -using System.Data; -using System.Configuration; -using System.Collections; -using System.Web; -using System.Web.Security; -using System.Web.UI; -using System.Web.UI.WebControls; -using System.Web.UI.WebControls.WebParts; -using System.Web.UI.HtmlControls; -using umbraco.BusinessLogic.Actions; -using System.Collections.Generic; -using umbraco.interfaces; -using System.Drawing; -using umbraco.BusinessLogic; -using umbraco.BasePages; - -namespace umbraco.cms.presentation.user -{ - - /// - /// An object to display the current permissions for a user and a node. - /// - public partial class NodePermissions : System.Web.UI.UserControl - { - - protected override void OnInit(EventArgs e) { - base.OnInit(e); - } - - protected void Page_Load(object sender, EventArgs e) - { - DataBind(); - } - - private User m_umbracoUser; - private int[] m_nodeID = {-1}; - private UserPermissions m_userPermissions; - private string m_clientItemChecked = "void(0);"; - - public int UserID - { - get { return m_umbracoUser.Id; } - set - { - m_umbracoUser = BusinessLogic.User.GetUser(value); - m_userPermissions = new UserPermissions(m_umbracoUser); - } - } - - private bool m_viewOnly = false; - public bool ViewOnly { - get { return m_viewOnly; } - set { m_viewOnly = value; } - } - - public int[] NodeID - { - get { return m_nodeID; } - set { m_nodeID = value; } - } - - /// - /// The JavaScript method to call when a node is checked. The method will receive a comma separated list of node IDs that are checked. - /// - public string OnClientItemChecked - { - get { return m_clientItemChecked; } - set { m_clientItemChecked = value; } - } - - public override void DataBind() - { - base.DataBind(); - - - if (m_umbracoUser == null) - throw new ArgumentNullException("No User specified"); - - //get the logged in user's permissions - UserPermissions currUserPermissions = new UserPermissions(UmbracoEnsuredPage.CurrentUser); - - //lookup permissions for last node selected - int selectedNodeId = m_nodeID[m_nodeID.Length - 1]; - - List lstCurrUserActions = currUserPermissions.GetExistingNodePermission(selectedNodeId); - List lstLookupUserActions = m_userPermissions.GetExistingNodePermission(selectedNodeId); - - List lstAllActions = umbraco.BusinessLogic.Actions.Action.GetPermissionAssignable(); - - //no node is selected, disable the check boxes - if (m_nodeID[0] == -1) - { - ShowMessage("No node selected"); - return; - } - - //ensure the current user has access to assign permissions. - //if their actions list is null then it means that the node is not published. - if (lstCurrUserActions == null || lstCurrUserActions.Contains(ActionRights.Instance)) - BindExistingPermissions(lstAllActions, lstLookupUserActions); - else - ShowMessage("You do not have access to assign permissions to this node"); - - string names = ""; - foreach (int id in m_nodeID) { - if(id > 0) - names += new cms.businesslogic.web.Document(id).Text + ", "; - } - - lt_names.Text = names.Trim().Trim(','); - } - - private void ShowMessage(string msg) - { - lblMessage.Visible = true; - lblMessage.Text = msg; - - } - - private void BindExistingPermissions(List allActions, List userActions) - { - - List assignedPermissions = new List(); - foreach (umbraco.interfaces.IAction a in allActions) - { - AssignedPermission p = new AssignedPermission(); - p.Permission = a; - p.HasPermission = (userActions != null ? userActions.Contains(a) : false); - assignedPermissions.Add(p); - } - - rptPermissionsList.DataSource = assignedPermissions; - rptPermissionsList.DataBind(); - - } - - protected struct AssignedPermission - { - public IAction Permission; - public bool HasPermission; - } - - } -} \ No newline at end of file diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/users/NodePermissions.ascx.designer.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/users/NodePermissions.ascx.designer.cs deleted file mode 100644 index c981de682b..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/users/NodePermissions.ascx.designer.cs +++ /dev/null @@ -1,51 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace umbraco.cms.presentation.user { - - - public partial class NodePermissions { - - /// - /// lt_names control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Literal lt_names; - - /// - /// pnlReplaceChildren control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Panel pnlReplaceChildren; - - /// - /// lblMessage control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Label lblMessage; - - /// - /// rptPermissionsList control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Repeater rptPermissionsList; - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/users/PermissionEditor.aspx b/src/Umbraco.Web/umbraco.presentation/umbraco/users/PermissionEditor.aspx deleted file mode 100644 index 75b5d6e66a..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/users/PermissionEditor.aspx +++ /dev/null @@ -1,47 +0,0 @@ -<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="../masterpages/umbracoPage.Master" CodeBehind="PermissionEditor.aspx.cs" Inherits="umbraco.cms.presentation.user.PermissionEditor" %> -<%@ Import Namespace="Umbraco.Web" %> -<%@ Register Src="../controls/Tree/TreeControl.ascx" TagName="TreeControl" TagPrefix="umbraco" %> -<%@ Register Src="NodePermissions.ascx" TagName="NodePermissions" TagPrefix="user" %> -<%@ Register TagPrefix="ui" Namespace="umbraco.uicontrols" Assembly="controls" %> -<%@ Register TagPrefix="umb" Namespace="ClientDependency.Core.Controls" Assembly="ClientDependency.Core" %> - - - - - - - - - - - -
    - -
    - -
    - -
    - - - -
    -
    - - -
    diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/users/PermissionEditor.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/users/PermissionEditor.aspx.cs deleted file mode 100644 index ae98eb5c2c..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/users/PermissionEditor.aspx.cs +++ /dev/null @@ -1,108 +0,0 @@ -using System; -using System.Data; -using System.Configuration; -using System.Collections; -using System.Web; -using System.Web.Security; -using System.Web.UI; -using System.Web.UI.WebControls; -using System.Web.UI.WebControls.WebParts; -using System.Web.UI.HtmlControls; -using System.Xml; -using System.IO; -using Umbraco.Core; -using umbraco; -using umbraco.BusinessLogic; -using System.Collections.Generic; -using umbraco.BasePages; -using umbraco.BusinessLogic.Actions; -using umbraco.interfaces; -using umbraco.cms.presentation.Trees; -using System.Xml.XPath; -using Umbraco.Core.IO; - -namespace umbraco.cms.presentation.user -{ - - public partial class PermissionEditor : UmbracoEnsuredPage - { - public PermissionEditor() - { - CurrentApp = BusinessLogic.DefaultApps.users.ToString(); - - } - - protected override void OnInit(EventArgs e) - { - base.OnInit(e); - - if (!IsPostBack) - { - JTree.App = Constants.Applications.Content; - JTree.ShowContextMenu = false; - JTree.IsDialog = true; - } - } - - protected void Page_Load(object sender, EventArgs e) - { - if (string.IsNullOrEmpty(Request.QueryString["id"])) - return; - - CheckUser(Request.QueryString["id"]); - - var save = pnlUmbraco.Menu.NewButton(); - save.ID = "btnSave"; - save.ButtonType = uicontrols.MenuButtonType.Primary; - save.OnClientClick = "SavePermissions(); return false;"; - save.Text = ui.Text("save"); - save.ToolTip = ui.Text("save"); - - - nodePermissions.UserID = Convert.ToInt32(Request.QueryString["id"]); - pnlUmbraco.Text = ui.Text("user", "userPermissions"); - pnl1.Text = ui.Text("user", "permissionSelectPages"); - - if (!IsPostBack) - { - ClientTools cTools = new ClientTools(this); - cTools.SetActiveTreeType(TreeDefinitionCollection.Instance.FindTree().Tree.Alias) - .SyncTree(Request.QueryString["id"], false); - } - } - - /// - /// Since Umbraco stores users in cache, we'll use this method to retrieve our user object by the selected id - /// - protected umbraco.BusinessLogic.User UmbracoUser - { - get - { - return BusinessLogic.User.GetUser(Convert.ToInt32(Request.QueryString["id"])); - } - } - - /// - /// Makes sure the user exists with the id specified - /// - /// - private void CheckUser(string strID) - { - int id; - bool parsed = false; - umbraco.BusinessLogic.User oUser = null; - if (parsed = int.TryParse(strID, out id)) - oUser = umbraco.BusinessLogic.User.GetUser(id); - - if (oUser == null || oUser.UserType == null || !parsed) - throw new Exception("No user found with id: " + strID); - } - - - protected override void OnPreRender(EventArgs e) { - base.OnPreRender(e); - ScriptManager.GetCurrent(Page).Services.Add(new ServiceReference(SystemDirectories.Umbraco + "/users/PermissionsHandler.asmx")); - } - - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/users/PermissionEditor.aspx.designer.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/users/PermissionEditor.aspx.designer.cs deleted file mode 100644 index e0c1494dd4..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/users/PermissionEditor.aspx.designer.cs +++ /dev/null @@ -1,78 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace umbraco.cms.presentation.user { - - - public partial class PermissionEditor { - - /// - /// CssInclude2 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::ClientDependency.Core.Controls.CssInclude CssInclude2; - - /// - /// CssInclude1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::ClientDependency.Core.Controls.CssInclude CssInclude1; - - /// - /// JsInclude1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::ClientDependency.Core.Controls.JsInclude JsInclude1; - - /// - /// pnlUmbraco control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.UmbracoPanel pnlUmbraco; - - /// - /// pnl1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.Pane pnl1; - - /// - /// JTree control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.controls.Tree.TreeControl JTree; - - /// - /// nodePermissions control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.cms.presentation.user.NodePermissions nodePermissions; - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/users/PermissionsHandler.asmx b/src/Umbraco.Web/umbraco.presentation/umbraco/users/PermissionsHandler.asmx deleted file mode 100644 index 274efb0789..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/users/PermissionsHandler.asmx +++ /dev/null @@ -1 +0,0 @@ -<%@ WebService Language="C#" CodeBehind="PermissionsHandler.asmx.cs" Class="umbraco.cms.presentation.user.PermissionsHandler" %> diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/users/PermissionsHandler.asmx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/users/PermissionsHandler.asmx.cs deleted file mode 100644 index 7813e7e5cb..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/users/PermissionsHandler.asmx.cs +++ /dev/null @@ -1,93 +0,0 @@ -using System; -using System.Data; -using System.Web; -using System.Collections; -using System.Web.Services; -using System.Web.Services.Protocols; -using System.ComponentModel; -using System.Web.Script.Services; -using System.Web.UI; -using System.IO; -using System.Reflection; -using System.Web.UI.HtmlControls; -using umbraco.BasePages; -using System.Collections.Generic; -using umbraco.interfaces; -using umbraco.BusinessLogic.Actions; -using Umbraco.Core.IO; - -namespace umbraco.cms.presentation.user -{ - /// - /// Summary description for PermissionsHandler - /// - [WebService(Namespace = "http://tempuri.org/")] - [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] - [ToolboxItem(false)] - [ScriptService] - public class PermissionsHandler : System.Web.Services.WebService - { - - /// - /// Loads the NodePermissions UserControl with the appropriate properties, renders the contents and returns the output html. - /// - /// - /// - /// - [WebMethod] - public string GetNodePermissions(int userID, string nodes) - { - Authorize(); - - Page page = new Page(); - - string path = SystemDirectories.Umbraco + "/users/NodePermissions.ascx"; - NodePermissions nodePermissions = page.LoadControl(path) as NodePermissions; - - nodePermissions.UserID = userID; - nodePermissions.NodeID = toIntArray(nodes); - nodePermissions.ID = "nodePermissions"; - - page.Controls.Add(nodePermissions); - StringWriter sw = new StringWriter(); - HttpContext.Current.Server.Execute(page, sw, false); - return sw.ToString(); - } - - - - - [WebMethod] - public string SaveNodePermissions(int userID, string nodes, string permissions, bool replaceChild) - { - Authorize(); - - UserPermissions uPermissions = new UserPermissions(BusinessLogic.User.GetUser(userID)); - List actions = umbraco.BusinessLogic.Actions.Action.FromString(permissions); - uPermissions.SaveNewPermissions(toIntArray(nodes), actions, replaceChild); - - return GetNodePermissions(userID, nodes); - } - - private void Authorize() - { - if (!BasePage.ValidateUserContextID(BasePage.umbracoUserContextID)) - throw new Exception("Client authorization failed. User is not logged in"); - - } - - private int[] toIntArray(string nodeIds) { - - string[] s_nodes = nodeIds.Split(','); - int[] i_nodes = new int[s_nodes.Length]; - - for (int i = 0; i < s_nodes.Length; i++) { - i_nodes[i] = int.Parse(s_nodes[i]); - } - - return i_nodes; - - } - - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/users/UserPermissions.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/users/UserPermissions.cs deleted file mode 100644 index 33818d43df..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/users/UserPermissions.cs +++ /dev/null @@ -1,149 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Xml; -using System.IO; -using System.Collections; -using System.Web.UI.WebControls; -using System.Data.SqlClient; -using System.Data; -using Umbraco.Core; -using Umbraco.Web; -using Umbraco.Web.Security; -using umbraco; -using umbraco.BusinessLogic; -using System.Web; -using umbraco.BusinessLogic.Actions; -using umbraco.DataLayer; -using umbraco.cms.businesslogic; -using umbraco.interfaces; -using umbraco.BasePages; -using umbraco.cms.businesslogic.web; - -namespace umbraco.cms.presentation.user -{ - /// - /// Provides umbraco user permission functionality on various nodes. Only nodes that are published are queried via the cache. - /// - public class UserPermissions - { - readonly User _user; - - public UserPermissions(User user) - { - _user = user; - } - - /// - /// saves new permissions with the parameters supplied - /// - /// - /// - /// - public void SaveNewPermissions(int[] nodeIDs, List actions, bool replaceChildren) - { - //ensure permissions that are permission assignable - var permissions = actions.FindAll(a => (a.CanBePermissionAssigned)); - - //ensure that only the nodes that the user has permissions to update are updated - var lstNoPermissions = new List(); - foreach (var nodeId in nodeIDs) - { - var nodeActions = UmbracoContext.Current.UmbracoUser.GetPermissions(GetNodePath(nodeId)); - var lstActions = BusinessLogic.Actions.Action.FromString(nodeActions); - if (lstActions == null || !lstActions.Contains(ActionRights.Instance)) - lstNoPermissions.Add(nodeId); - } - //remove the nodes that the user doesn't have permission to update - var lstNodeIDs = new List(); - lstNodeIDs.AddRange(nodeIDs); - foreach (var noPermission in lstNoPermissions) - lstNodeIDs.Remove(noPermission); - nodeIDs = lstNodeIDs.ToArray(); - - //get the complete list of node ids that this change will affect - var allNodes = new List(); - if (replaceChildren) - { - foreach (var nodeId in nodeIDs) - { - allNodes.Add(nodeId); - allNodes.AddRange(FindChildNodes(nodeId)); - } - } - else - { - allNodes.AddRange(nodeIDs); - } - - //if permissions are to be assigned, then assign them - if (permissions.Count > 0) - { - ApplicationContext.Current.Services.UserService.ReplaceUserPermissions( - _user.Id, permissions.Select(x => x.Letter), allNodes.ToArray()); - } - else - { - //If there are NO permissions for this node, we need to assign the ActionNull permission otherwise - //the node will inherit from it's parent. - ApplicationContext.Current.Services.UserService.ReplaceUserPermissions( - _user.Id, new[] { ActionNull.Instance.Letter }, allNodes.ToArray()); - } - - } - - /// - /// Returns the current user permissions for the node specified - /// - /// - /// - public List GetExistingNodePermission(int nodeId) - { - var path = GetNodePath(nodeId); - if (path != "") - { - //get the user and their permissions - string permissions = _user.GetPermissions(path); - return umbraco.BusinessLogic.Actions.Action.FromString(permissions); - } - return null; - } - - /// - /// gets path attribute for node id passed - /// - /// - /// - private static string GetNodePath(int iNodeId) - { - if (Document.IsDocument(iNodeId)) - { - var doc = new Document(iNodeId); - return doc.Path; - } - - return ""; - } - - /// - /// Finds all child node IDs - /// - /// - /// - private static IEnumerable FindChildNodes(int nodeId) - { - var docs = Document.GetChildrenForTree(nodeId); - var nodeIds = new List(); - foreach (var doc in docs) - { - nodeIds.Add(doc.Id); - if (doc.HasChildren) - { - nodeIds.AddRange(FindChildNodes(doc.Id)); - } - } - return nodeIds; - } - } -} \ No newline at end of file diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/users/UserTypeTasks.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/users/UserTypeTasks.cs deleted file mode 100644 index 0a8e02341a..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/users/UserTypeTasks.cs +++ /dev/null @@ -1,52 +0,0 @@ -using System; -using System.Data; -using System.Configuration; -using System.Web; -using System.Web.Security; -using System.Web.UI; -using System.Web.UI.WebControls; -using System.Web.UI.WebControls.WebParts; -using System.Web.UI.HtmlControls; -using Umbraco.Web.UI; -using umbraco.interfaces; -using umbraco.BusinessLogic; - -namespace umbraco.cms.presentation.user -{ - public class UserTypeTasks : LegacyDialogTask - { - public override bool PerformSave() - { - try - { - var u = UserType.MakeNew(Alias, "", Alias); - _returnUrl = string.Format("users/EditUserType.aspx?id={0}", u.Id); - return true; - } - catch - { - return false; - } - } - - public override bool PerformDelete() - { - var userType = UserType.GetUserType(ParentID); - if (userType == null) - return false; - userType.Delete(); - return true; - } - - private string _returnUrl = ""; - public override string ReturnUrl - { - get { return _returnUrl; } - } - - public override string AssignedApp - { - get { return DefaultApps.users.ToString(); } - } - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/Developer.asmx b/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/Developer.asmx deleted file mode 100644 index 2ca307ed10..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/Developer.asmx +++ /dev/null @@ -1 +0,0 @@ -<%@ WebService Language="c#" Codebehind="Developer.asmx.cs" Class="umbraco.webservices.Developer" %> diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/Developer.asmx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/Developer.asmx.cs deleted file mode 100644 index 6d579d6fc9..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/Developer.asmx.cs +++ /dev/null @@ -1,81 +0,0 @@ -using System.Globalization; -using System.Web.Services; -using System.Xml; -using Umbraco.Core; -using Umbraco.Web.WebServices; -using umbraco.BusinessLogic; -using umbraco.presentation.webservices; - -namespace umbraco.webservices -{ - /// - /// Summary description for Developer. - /// - [WebService(Namespace="http://umbraco.org/webservices/")] - public class Developer : UmbracoAuthorizedWebService - { - - [WebMethod] - public string BootStrapTidy(string html, string ContextID) - { - //pretty sure this is legacy and it used to throw an exception so we'll continue to do the same - //true = throw if invalid - AuthorizeRequest(true); - - return cms.helpers.xhtml.BootstrapTidy(html); - } - - [WebMethod] - public XmlNode GetMacros(string Login, string Password) - { - if (ValidateCredentials(Login, Password) - && UserHasAppAccess(DefaultApps.developer.ToString(), Login)) - { - var xmlDoc = new XmlDocument(); - var macros = xmlDoc.CreateElement("macros"); - foreach (var m in cms.businesslogic.macro.Macro.GetAll()) - { - var mXml = xmlDoc.CreateElement("macro"); - mXml.Attributes.Append(XmlHelper.AddAttribute(xmlDoc, "id", m.Id.ToString(CultureInfo.InvariantCulture))); - mXml.Attributes.Append(XmlHelper.AddAttribute(xmlDoc, "alias", m.Alias)); - mXml.Attributes.Append(XmlHelper.AddAttribute(xmlDoc, "name", m.Name)); - macros.AppendChild(mXml); - } - return macros; - } - return null; - } - - [WebMethod] - public XmlNode GetMacro(int Id, string Login, string Password) - { - if (ValidateCredentials(Login, Password) - && UserHasAppAccess(DefaultApps.developer.ToString(), Login)) - { - var xmlDoc = new XmlDocument(); - var macro = xmlDoc.CreateElement("macro"); - var m = new cms.businesslogic.macro.Macro(Id); - macro.Attributes.Append(XmlHelper.AddAttribute(xmlDoc, "id", m.Id.ToString(CultureInfo.InvariantCulture))); - macro.Attributes.Append(XmlHelper.AddAttribute(xmlDoc, "refreshRate", m.RefreshRate.ToString(CultureInfo.InvariantCulture))); - macro.Attributes.Append(XmlHelper.AddAttribute(xmlDoc, "useInEditor", m.UseInEditor.ToString())); - macro.Attributes.Append(XmlHelper.AddAttribute(xmlDoc, "alias", m.Alias)); - macro.Attributes.Append(XmlHelper.AddAttribute(xmlDoc, "name", m.Name)); - macro.Attributes.Append(XmlHelper.AddAttribute(xmlDoc, "assembly", m.Assembly)); - macro.Attributes.Append(XmlHelper.AddAttribute(xmlDoc, "type", m.Type)); - macro.Attributes.Append(XmlHelper.AddAttribute(xmlDoc, "xslt", m.Xslt)); - var properties = xmlDoc.CreateElement("properties"); - foreach (var mp in m.Properties) - { - var pXml = xmlDoc.CreateElement("property"); - pXml.Attributes.Append(XmlHelper.AddAttribute(xmlDoc, "alias", mp.Alias)); - pXml.Attributes.Append(XmlHelper.AddAttribute(xmlDoc, "name", mp.Name)); - pXml.Attributes.Append(XmlHelper.AddAttribute(xmlDoc, "public", true.ToString())); - properties.AppendChild(pXml); - } - macro.AppendChild(properties); - return macro; - } - return null; - } - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/MediaUploader.ashx b/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/MediaUploader.ashx deleted file mode 100644 index 3dab7a3f91..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/MediaUploader.ashx +++ /dev/null @@ -1 +0,0 @@ -<%@ WebHandler Language="C#" CodeBehind="MediaUploader.ashx.cs" Class="umbraco.presentation.umbraco.webservices.MediaUploader" %> diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/MediaUploader.ashx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/MediaUploader.ashx.cs deleted file mode 100644 index 54ab4aa12d..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/MediaUploader.ashx.cs +++ /dev/null @@ -1,399 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Configuration; -using System.IO; -using System.Linq; -using System.Web; -using System.Web.Configuration; -using System.Web.Script.Serialization; -using System.Web.Security; -using System.Web.UI; -using System.Xml; -using System.Xml.Serialization; -using Umbraco.Core.Configuration; -using Umbraco.Core.Logging; -using umbraco.BasePages; -using umbraco.BusinessLogic; -using umbraco.businesslogic.Exceptions; -using umbraco.cms.businesslogic.media; -using Umbraco.Core; -using Umbraco.Core.Security; - -namespace umbraco.presentation.umbraco.webservices -{ - [Obsolete("This should no longer be used, use the WebApi methods to upload media")] - public class MediaUploader : IHttpHandler - { - protected User AuthenticatedUser { get; set; } - - public bool IsReusable - { - get { return false; } - } - - public void ProcessRequest(HttpContext context) - { - MediaResponse response = null; - - var action = context.Request["action"]; - - if (IsValidRequest(context) && !string.IsNullOrEmpty(action)) - { - switch (action.ToLower()) - { - case "config": - response = ProcessConfigRequest(context); - break; - case "folderlist": - response = ProcessFolderListRequest(context); - break; - case "upload": - response = ProcessUploadRequest(context); - break; - } - } - - // Set success flag - if (response != null) - response.success = true; - else - response = new MediaResponse { success = false }; - - context.Response.Clear(); - context.Response.Charset = "UTF-8"; - context.Response.Cache.SetCacheability(HttpCacheability.NoCache); - context.Response.Cache.SetAllowResponseInBrowserHistory(true); - - var format = context.Request["format"]; - switch (format) - { - case "json": - // Format as JSON - // Weirdly, this should be set to text/html to make it respond as json according to: - // http://stackoverflow.com/questions/6934393/resource-interpreted-as-document-but-transferred-with-mime-type-application-jso - context.Response.ContentType = @"text/html"; - - context.Response.Write(new JavaScriptSerializer().Serialize(response)); - - break; - default: - // Format as XML - context.Response.ContentType = @"text/xml"; - - var serializer = new XmlSerializer(response.GetType()); - serializer.Serialize(context.Response.OutputStream, response); - - break; - } - - - context.Response.End(); - } - - public ConfigResponse ProcessConfigRequest(HttpContext context) - { - return new ConfigResponse - { - displayName = new User(context.Request["username"]).Name, - umbracoPath = VirtualPathUtility.ToAbsolute(GlobalSettings.Path), - maxRequestLength = GetMaxRequestLength() - }; - } - - public FolderListResponse ProcessFolderListRequest(HttpContext context) - { - var response = new FolderListResponse - { - folder = new FolderListItem() - }; - - var startMediaId = AuthenticatedUser.StartMediaId; - if (startMediaId < 1) - { - response.folder.id = -1; - response.folder.name = "Media"; - - CreateMediaTree(Media.GetRootMedias(), response.folder); - } - else - { - var root = new Media(startMediaId); - - response.folder.id = root.Id; - response.folder.name = root.Text; - - CreateMediaTree(root.Children, response.folder); - } - - return response; - } - - public UploadResponse ProcessUploadRequest(HttpContext context) - { - int parentNodeId; - if (int.TryParse(context.Request["parentNodeId"], out parentNodeId) && context.Request.Files.Count > 0) - { - try - { - var parentNode = new Media(parentNodeId); - // Check FilePath - if (!string.IsNullOrEmpty(context.Request["path"])) - { - var pathParts = context.Request["path"].Trim('/').Split('/'); - - foreach (var pathPart in pathParts.Where(part => string.IsNullOrWhiteSpace(part) == false)) - parentNode = GetOrCreateFolder(parentNode, pathPart); - - parentNodeId = parentNode.Id; - } - - // Check whether to replace existing - bool parsed; - var replaceExisting = (context.Request["replaceExisting"] == "1" || (bool.TryParse(context.Request["replaceExisting"], out parsed) && parsed)); - - // loop through uploaded files - for (var j = 0; j < context.Request.Files.Count; j++) - { - // get the current file - var uploadFile = context.Request.Files[j]; - - //Are we allowed to upload this? - var ext = uploadFile.FileName.Substring(uploadFile.FileName.LastIndexOf('.') + 1).ToLower(); - if (UmbracoConfig.For.UmbracoSettings().Content.DisallowedUploadFiles.Contains(ext)) - { - LogHelper.Warn("Cannot upload file " + uploadFile.FileName + ", it is not approved in `disallowedUploadFiles` in ~/config/UmbracoSettings.config"); - continue; - } - - using (var inputStream = uploadFile.InputStream) - { - // if there was a file uploded - if (uploadFile.ContentLength > 0) - { - // Ensure we get the filename without the path in IE in intranet mode - // http://stackoverflow.com/questions/382464/httppostedfile-filename-different-from-ie - var fileName = uploadFile.FileName; - if (fileName.LastIndexOf(@"\") > 0) - fileName = fileName.Substring(fileName.LastIndexOf(@"\") + 1); - - fileName = Umbraco.Core.IO.IOHelper.SafeFileName(fileName); - - var postedMediaFile = new PostedMediaFile - { - FileName = fileName, - DisplayName = context.Request["name"], - ContentType = uploadFile.ContentType, - ContentLength = uploadFile.ContentLength, - InputStream = inputStream, - ReplaceExisting = replaceExisting - }; - - // Get concrete MediaFactory - var factory = MediaFactory.GetMediaFactory(parentNodeId, postedMediaFile, AuthenticatedUser); - - // Handle media Item - var media = factory.HandleMedia(parentNodeId, postedMediaFile, AuthenticatedUser); - } - } - } - - var scripts = new ClientTools(new Page()); - scripts.SyncTree(parentNode.Path, true); - - // log succes - LogHelper.Info(string.Format("Success uploading to parent {0}", parentNodeId)); - } - catch (Exception e) - { - // log error - LogHelper.Error(string.Format("Error uploading to parent {0}", parentNodeId), e); - } - } - else - { - // log error - LogHelper.Warn(string.Format("Parent node id is in incorrect format: {0}", parentNodeId)); - } - - return new UploadResponse(); - } - - #region Helper Methods - - private bool IsValidRequest(HttpContext context) - { - // check for secure connection - if (GlobalSettings.UseSSL && !context.Request.IsSecureConnection) - throw new UserAuthorizationException("This installation requires a secure connection (via SSL). Please update the URL to include https://"); - - var username = context.Request["username"]; - var password = context.Request["password"]; - var ticket = context.Request["ticket"]; - - var isValid = false; - - if (!string.IsNullOrEmpty(username) && !string.IsNullOrEmpty(password)) - { - var mp = MembershipProviderExtensions.GetUsersMembershipProvider(); - if (mp != null && mp.ValidateUser(username, password)) - { - var user = new User(username); - isValid = user.Applications.Any(app => app.alias == Constants.Applications.Media); - - if (isValid) - AuthenticatedUser = user; - } - } - else if (!string.IsNullOrEmpty(username) && !string.IsNullOrEmpty(ticket)) - { - var t = FormsAuthentication.Decrypt(ticket); - var user = new User(username); - - if (t != null) - isValid = user.LoginName.ToLower() == t.Name.ToLower() && user.Applications.Any(app => app.alias == Constants.Applications.Media); - - if (isValid) - AuthenticatedUser = user; - } - else - { - var usr = User.GetCurrent(); - - if (BasePage.ValidateUserContextID(BasePage.umbracoUserContextID) && usr != null) - { - //The user is valid based on their cookies, but is the request valid? We need to validate - // against CSRF here. We'll do this by ensuring that the request contains a token which will - // be equal to the decrypted version of the current user's user context id. - var token = context.Request["__reqver"]; - if (token.IsNullOrWhiteSpace() == false) - { - //try decrypting it - try - { - var decrypted = token.DecryptWithMachineKey(); - //now check if it matches - if (decrypted == BasePage.umbracoUserContextID) - { - isValid = true; - AuthenticatedUser = usr; - } - } - catch - { - //couldn't decrypt, so it's invalid - } - - } - } - } - - return isValid; - } - - private void CreateMediaTree(IEnumerable nodes, FolderListItem folder) - { - foreach (var media in nodes.Where(media => media != null && media.ContentType != null && media.ContentType.Alias == Constants.Conventions.MediaTypes.Folder)) - { - var subFolder = new FolderListItem - { - id = media.Id, - name = media.Text - }; - - if (media.HasChildren) - { - CreateMediaTree(media.Children, subFolder); - } - - folder.folders.Add(subFolder); - } - } - - private int GetMaxRequestLength() - { - var appSetting = Convert.ToInt32(ConfigurationManager.AppSettings["DesktopMediaUploaderMaxRequestLength"]); - if (appSetting > 0) - return appSetting; - - var configXml = new XmlDocument { PreserveWhitespace = true }; - configXml.Load(HttpContext.Current.Server.MapPath("/web.config")); - - var requestLimitsNode = configXml.SelectSingleNode("//configuration/system.webServer/security/requestFiltering/requestLimits"); - if (requestLimitsNode != null) - { - if (requestLimitsNode.Attributes != null && requestLimitsNode.Attributes["maxAllowedContentLength"] != null) - { - var maxAllowedContentLength = Convert.ToInt32(requestLimitsNode.Attributes["maxAllowedContentLength"].Value); - if (maxAllowedContentLength > 0) - return maxAllowedContentLength; - } - } - - var httpRuntime = ConfigurationManager.GetSection("system.web/httpRuntime") as HttpRuntimeSection; - - return httpRuntime == null ? 4096 : httpRuntime.MaxRequestLength; - } - - private Media GetOrCreateFolder(Media parent, string name) - { - var children = parent.Id == -1 ? Media.GetRootMedias() : parent.Children; - if (children.Length > 0) - { - foreach (var node in children.Where(node => node.Text.ToLower() == name.ToLower())) - { - return node; - } - } - - var media = Media.MakeNew(name, MediaType.GetByAlias(Constants.Conventions.MediaTypes.Folder), User.GetUser(0), parent.Id); - media.sortOrder = 0; - media.Save(); - - return media; - } - - #endregion - } - - public class MediaResponse - { - [XmlAttribute] - public bool success { get; set; } - } - - [XmlRoot("response")] - public class ConfigResponse : MediaResponse - { - public string displayName { get; set; } - public string umbracoPath { get; set; } - public int maxRequestLength { get; set; } - } - - [XmlRoot("response")] - public class FolderListResponse : MediaResponse - { - public FolderListItem folder { get; set; } - } - - [XmlType("folder")] - public class FolderListItem - { - [XmlAttribute] - public int id { get; set; } - - [XmlAttribute] - public string name { get; set; } - - [XmlElement("folder")] - public List folders { get; set; } - - public FolderListItem() - { - folders = new List(); - } - } - - [XmlRoot("response")] - public class UploadResponse : MediaResponse - { } -} \ No newline at end of file diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/Settings.asmx b/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/Settings.asmx deleted file mode 100644 index 0b2a13a854..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/Settings.asmx +++ /dev/null @@ -1 +0,0 @@ -<%@ WebService Language="c#" Codebehind="Settings.asmx.cs" Class="umbraco.webservices.Settings" %> diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/Settings.asmx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/Settings.asmx.cs deleted file mode 100644 index d33e9b842e..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/Settings.asmx.cs +++ /dev/null @@ -1,40 +0,0 @@ -using System; -using System.Collections; -using System.ComponentModel; -using System.Data; -using System.Diagnostics; -using System.Web; -using System.Web.Services; -using System.Linq; -using System.Xml; -using Umbraco.Core; -using Umbraco.Web.WebServices; -using umbraco.BusinessLogic; - -namespace umbraco.webservices -{ - - public class Settings : UmbracoAuthorizedWebService - { - - [WebMethod] - public XmlNode GetTabs(string ContextID, int ContentTypeId) - { - if (!AuthorizeRequest(DefaultApps.settings.ToString())) - { - var xmlDoc = new XmlDocument(); - var tabs = xmlDoc.CreateElement("tabs"); - foreach (var t in new cms.businesslogic.ContentType(ContentTypeId).getVirtualTabs.ToList()) - { - var mXml = xmlDoc.CreateElement("tab"); - mXml.Attributes.Append(XmlHelper.AddAttribute(xmlDoc, "id", t.Id.ToString())); - mXml.Attributes.Append(XmlHelper.AddAttribute(xmlDoc, "caption", t.Caption)); - tabs.AppendChild(mXml); - } - return tabs; - } - - return null; - } - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/UltimatePickerAutoCompleteHandler.ashx b/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/UltimatePickerAutoCompleteHandler.ashx deleted file mode 100644 index 9b5b98a9b8..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/UltimatePickerAutoCompleteHandler.ashx +++ /dev/null @@ -1 +0,0 @@ -<%@ WebHandler Language="C#" CodeBehind="UltimatePickerAutoCompleteHandler.ashx.cs" Class="umbraco.presentation.umbraco.webservices.UltimatePickerAutoCompleteHandler" %> diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/UltimatePickerAutoCompleteHandler.ashx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/UltimatePickerAutoCompleteHandler.ashx.cs deleted file mode 100644 index 8d2acf4f8f..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/UltimatePickerAutoCompleteHandler.ashx.cs +++ /dev/null @@ -1,163 +0,0 @@ -using System; -using System.Linq; -using System.Web; -using System.Web.Services; -using Umbraco.Web.WebServices; -using umbraco.BasePages; -using umbraco.BusinessLogic; -using umbraco.cms.businesslogic.web; -using umbraco.cms.businesslogic; - -namespace umbraco.presentation.umbraco.webservices -{ - /// - /// Summary description for $codebehindclassname$ - /// - [WebService(Namespace = "http://tempuri.org/")] - [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] - public class UltimatePickerAutoCompleteHandler : UmbracoAuthorizedHttpHandler - { - - private int _nodeCount; - private int _counter; - private string[] _output; - private string _prefix; - - public override void ProcessRequest(HttpContext context) - { - if (BasePage.ValidateUserContextID(BasePage.umbracoUserContextID) == false) - throw new Exception("Client authorization failed. User is not logged in"); - - //user must be allowed to see content or media - if (AuthorizeRequest(DefaultApps.content.ToString()) == false && AuthorizeRequest(DefaultApps.media.ToString()) == false) - return; - - context.Response.ContentType = "text/plain"; - - _prefix = context.Request.QueryString["q"]; - - var parentNodeId = Convert.ToInt32(context.Request.QueryString["id"]); - var showGrandChildren = Convert.ToBoolean(context.Request.QueryString["showchildren"]); - - var documentAliasFilter = context.Request.QueryString["filter"]; - var documentAliasFilters = documentAliasFilter.Split(",".ToCharArray()); - - var parent = new CMSNode(parentNodeId); - - _nodeCount = 0; - - //store children array here because iterating over an Array property object is very inneficient. - var children = parent.Children; - foreach (CMSNode child in children) - { - NodeChildrenCount(child, showGrandChildren, documentAliasFilters); - } - - _output = new string[_nodeCount]; - _counter = 0; - int level = 1; - - foreach (CMSNode child in children) - { - AddNode(child, level, showGrandChildren, documentAliasFilters); - } - - foreach (var item in _output) - { - context.Response.Write(item + Environment.NewLine); - } - } - - private bool ValidNode(string nodeText) - { - return nodeText.Length >= _prefix.Length && nodeText.Substring(0, _prefix.Length).ToLower() == _prefix.ToLower(); - } - - private void NodeChildrenCount(CMSNode node, bool countChildren, string[] documentAliasFilters) - { - if (documentAliasFilters.Length > 0) - { - foreach (var filter in documentAliasFilters) - { - var trimmedFilter = filter.TrimStart(" ".ToCharArray()); - trimmedFilter = trimmedFilter.TrimEnd(" ".ToCharArray()); - - if ((new Document(node.Id).ContentType.Alias == trimmedFilter || trimmedFilter == string.Empty) && ValidNode(node.Text)) - { - _nodeCount += 1; - } - } - } - else - { - if (ValidNode(node.Text)) - { - _nodeCount += 1; - } - } - - if (countChildren) - { - //store children array here because iterating over an Array property object is very inneficient. - var children = node.Children; - foreach (CMSNode child in children) - { - NodeChildrenCount(child, countChildren, documentAliasFilters); - } - } - - } - - private void AddNode(CMSNode node, int level, bool showGrandChildren, string[] documentAliasFilters) - { - var preText = string.Empty; - - for (var i = 1; i < level; i++) - { - preText += "- "; - } - - if (documentAliasFilters.Length > 0) - { - foreach (var filter in documentAliasFilters) - { - var trimmedFilter = filter.TrimStart(" ".ToCharArray()); - trimmedFilter = trimmedFilter.TrimEnd(" ".ToCharArray()); - - if ((new Document(node.Id).ContentType.Alias == trimmedFilter || trimmedFilter == string.Empty) && ValidNode(node.Text)) - { - _output[_counter] = preText + node.Text + " [" + node.Id + "]"; - _counter++; - } - - } - } - else - { - if (ValidNode(node.Text)) - { - _output[_counter] = preText + node.Text + " [" + node.Id + "]"; - _counter++; - } - } - - if (showGrandChildren) - { - if (node.HasChildren) - { - //store children array here because iterating over an Array property object is very inneficient. - var children = node.Children; - foreach (CMSNode child in children) - { - AddNode(child, level + 1, showGrandChildren, documentAliasFilters); - } - } - } - } - - public override bool IsReusable - { - get { return false; } - } - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/templates.asmx b/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/templates.asmx deleted file mode 100644 index 318840e4f7..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/templates.asmx +++ /dev/null @@ -1 +0,0 @@ -<%@ WebService Language="c#" Codebehind="templates.asmx.cs" Class="umbraco.webservices.templates" %> diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/templates.asmx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/templates.asmx.cs deleted file mode 100644 index b790c5d225..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/templates.asmx.cs +++ /dev/null @@ -1,113 +0,0 @@ -using System; -using System.Collections; -using System.ComponentModel; -using System.Data; -using System.Diagnostics; -using System.Web; -using System.Web.Services; -using System.Xml; -using System.Web.Script.Services; -using Umbraco.Core; -using Umbraco.Core.IO; -using Umbraco.Web.WebServices; -using umbraco.BusinessLogic; -using umbraco.presentation.webservices; - -namespace umbraco.webservices -{ - /// - /// Summary description for templates. - /// - [WebService(Namespace="http://umbraco.org/webservices/")] - [ScriptService] - public class templates : UmbracoAuthorizedWebService - { - - [WebMethod] - public XmlNode GetTemplates(string Login, string Password) - { - if (ValidateCredentials(Login, Password) && UserHasAppAccess(DefaultApps.settings.ToString(), Login)) - { - var xmlDoc = new XmlDocument(); - xmlDoc.LoadXml(""); - foreach (cms.businesslogic.template.Template t in cms.businesslogic.template.Template.GetAllAsList()) - { - var tt = xmlDoc.CreateElement("template"); - tt.Attributes.Append(XmlHelper.AddAttribute(xmlDoc, "id", t.Id.ToString())); - tt.Attributes.Append(XmlHelper.AddAttribute(xmlDoc, "name", t.Text)); - xmlDoc.DocumentElement.AppendChild(tt); - } - return xmlDoc.DocumentElement; - } - return null; - } - - [WebMethod] - public XmlNode GetTemplate(int Id, string Login, string Password) - { - if (ValidateCredentials(Login, Password) && UserHasAppAccess(DefaultApps.settings.ToString(), Login)) - { - var t = new cms.businesslogic.template.Template(Id); - var xmlDoc = new XmlDocument(); - var tXml = xmlDoc.CreateElement("template"); - tXml.Attributes.Append(XmlHelper.AddAttribute(xmlDoc, "id", t.Id.ToString())); - tXml.Attributes.Append(XmlHelper.AddAttribute(xmlDoc, "master", t.MasterTemplate.ToString())); - tXml.Attributes.Append(XmlHelper.AddAttribute(xmlDoc, "name", t.Text)); - tXml.AppendChild(XmlHelper.AddCDataNode(xmlDoc, "design", t.Design)); - return tXml; - } - return null; - } - - [WebMethod] - public bool UpdateTemplate(int Id, int Master, string Design, string Login, string Password) - { - if (ValidateCredentials(Login, Password) && UserHasAppAccess(DefaultApps.settings.ToString(), Login)) - { - try - { - var t = new cms.businesslogic.template.Template(Id) - { - MasterTemplate = Master, - Design = Design - }; - //ensure events are raised - t.Save(); - return true; - } - catch (ArgumentException) - { - return false; - } - } - return false; - } - - [WebMethod] - [ScriptMethod] - public string GetCodeSnippet(object templateId) - { - //NOTE: The legacy code threw an exception so will continue to do that. - AuthorizeRequest(DefaultApps.settings.ToString(), true); - - var snippetPath = SystemDirectories.Umbraco + "/scripting/templates/cshtml/"; - var filePath = IOHelper.MapPath(snippetPath + templateId); - - //Directory check.. only allow files in script dir and below to be edited - if (filePath.StartsWith(IOHelper.MapPath(snippetPath))) - { - var templateFile = - System.IO.File.OpenText(filePath); - var content = templateFile.ReadToEnd(); - templateFile.Close(); - return content; - } - else - { - throw new ArgumentException("Couldn't open snippet - Illegal path"); - - } - } - - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/trashcan.asmx b/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/trashcan.asmx deleted file mode 100644 index f075057517..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/trashcan.asmx +++ /dev/null @@ -1 +0,0 @@ -<%@ WebService Language="C#" CodeBehind="trashcan.asmx.cs" Class="umbraco.presentation.webservices.trashcan" %> diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/trashcan.asmx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/trashcan.asmx.cs deleted file mode 100644 index f1bdd6d3d5..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/trashcan.asmx.cs +++ /dev/null @@ -1,73 +0,0 @@ -using System; -using System.Web.Script.Services; -using System.Web.Services; -using System.ComponentModel; -using Umbraco.Web.WebServices; -using umbraco.BasePages; -using umbraco.BusinessLogic; -using umbraco.cms.businesslogic; - -namespace umbraco.presentation.webservices -{ - /// - /// Summary description for trashcan - /// - [WebService(Namespace = "http://umbraco.org/webservices")] - [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] - [ToolboxItem(false)] - [ScriptService] - public class trashcan : UmbracoAuthorizedWebService - { - [WebMethod] - public void EmptyTrashcan(RecycleBin.RecycleBinType type) - { - //validate against the app type! - switch (type) - { - case RecycleBin.RecycleBinType.Content: - if (!AuthorizeRequest(DefaultApps.content.ToString())) return; - break; - case RecycleBin.RecycleBinType.Media: - if (!AuthorizeRequest(DefaultApps.media.ToString())) return; - break; - default: - throw new ArgumentOutOfRangeException("type"); - } - - //TODO: This will never work in LB scenarios - Application["trashcanEmptyLeft"] = RecycleBin.Count(type).ToString(); - emptyTrashCanDo(type); - } - - [WebMethod] - public string GetTrashStatus() - { - //TODO: This will never work in LB scenarios - - if (AuthorizeRequest()) - { - return Application["trashcanEmptyLeft"] != null - ? Application["trashcanEmptyLeft"].ToString() - : ""; - } - - return "-"; - - } - - private void emptyTrashCanDo(RecycleBin.RecycleBinType type) - { - var trashCan = new RecycleBin(type); - - var callback = new Action(x => - { - Application.Lock(); - Application["trashcanEmptyLeft"] = x.ToString(); - Application.UnLock(); - }); - - trashCan.CallTheGarbageMan(callback); - - } - } -} diff --git a/src/UmbracoExamine/app.config b/src/UmbracoExamine/app.config index 2928c2785f..9e5cd3c155 100644 --- a/src/UmbracoExamine/app.config +++ b/src/UmbracoExamine/app.config @@ -16,19 +16,19 @@ - + - + - + - + diff --git a/src/umbraco.MacroEngines/app.config b/src/umbraco.MacroEngines/app.config index 457c804e51..f9c36a3865 100644 --- a/src/umbraco.MacroEngines/app.config +++ b/src/umbraco.MacroEngines/app.config @@ -28,19 +28,19 @@ - + - + - + - + diff --git a/src/umbraco.businesslogic/BasePages/BasePage.cs b/src/umbraco.businesslogic/BasePages/BasePage.cs index b1f58d0745..916f1e8d9f 100644 --- a/src/umbraco.businesslogic/BasePages/BasePage.cs +++ b/src/umbraco.businesslogic/BasePages/BasePage.cs @@ -16,13 +16,14 @@ using Umbraco.Core.Services; using umbraco.BusinessLogic; using umbraco.DataLayer; using Umbraco.Core; +using Umbraco.Core.Models; using Umbraco.Core.Security; namespace umbraco.BasePages { /// /// umbraco.BasePages.BasePage is the default page type for the umbraco backend. - /// The basepage keeps track of the current user and the page context. But does not + /// The basepage keeps track of the current user and the page context. But does not /// Restrict access to the page itself. /// The keep the page secure, the umbracoEnsuredPage class should be used instead /// @@ -32,7 +33,7 @@ namespace umbraco.BasePages private User _user; private bool _userisValidated = false; private ClientTools _clientTools; - + /// /// The path to the umbraco root folder /// @@ -55,7 +56,7 @@ namespace umbraco.BasePages protected static ISqlHelper SqlHelper { get { return BusinessLogic.Application.SqlHelper; } - } + } /// /// Returns the current ApplicationContext @@ -82,7 +83,7 @@ namespace umbraco.BasePages } /// - /// Returns the current BasePage for the current request. + /// Returns the current BasePage for the current request. /// This assumes that the current page is a BasePage, otherwise, returns null; /// [Obsolete("Should use the Umbraco.Web.UmbracoContext.Current singleton instead to access common methods and properties")] @@ -92,9 +93,9 @@ namespace umbraco.BasePages { var page = HttpContext.Current.CurrentHandler as BasePage; if (page != null) return page; - //the current handler is not BasePage but people might be expecting this to be the case if they + //the current handler is not BasePage but people might be expecting this to be the case if they // are using this singleton accesor... which is legacy code now and shouldn't be used. When people - // start using Umbraco.Web.UI.Pages.BasePage then this will not be the case! So, we'll just return a + // start using Umbraco.Web.UI.Pages.BasePage then this will not be the case! So, we'll just return a // new instance of BasePage as a hack to make it work. if (HttpContext.Current.Items["umbraco.BasePages.BasePage"] == null) { @@ -185,7 +186,7 @@ namespace umbraco.BasePages var identity = HttpContext.Current.GetCurrentIdentity( //DO NOT AUTO-AUTH UNLESS THE CURRENT HANDLER IS WEBFORMS! // Without this check, anything that is using this legacy API, like ui.Text will - // automatically log the back office user in even if it is a front-end request (if there is + // automatically log the back office user in even if it is a front-end request (if there is // a back office user logged in. This can cause problems becaues the identity is changing mid // request. For example: http://issues.umbraco.org/issue/U4-4010 HttpContext.Current.CurrentHandler is Page); @@ -216,7 +217,7 @@ namespace umbraco.BasePages var identity = HttpContext.Current.GetCurrentIdentity( //DO NOT AUTO-AUTH UNLESS THE CURRENT HANDLER IS WEBFORMS! // Without this check, anything that is using this legacy API, like ui.Text will - // automatically log the back office user in even if it is a front-end request (if there is + // automatically log the back office user in even if it is a front-end request (if there is // a back office user logged in. This can cause problems becaues the identity is changing mid // request. For example: http://issues.umbraco.org/issue/U4-4010 HttpContext.Current.CurrentHandler is Page); @@ -233,7 +234,7 @@ namespace umbraco.BasePages { var ticket = HttpContext.Current.GetUmbracoAuthTicket(); if (ticket.Expired) return 0; - var ticks = ticket.Expiration.Ticks - DateTime.Now.Ticks; + var ticks = ticket.Expiration.Ticks - DateTime.Now.Ticks; return ticks; } @@ -250,7 +251,7 @@ namespace umbraco.BasePages var identity = HttpContext.Current.GetCurrentIdentity( //DO NOT AUTO-AUTH UNLESS THE CURRENT HANDLER IS WEBFORMS! // Without this check, anything that is using this legacy API, like ui.Text will - // automatically log the back office user in even if it is a front-end request (if there is + // automatically log the back office user in even if it is a front-end request (if there is // a back office user logged in. This can cause problems becaues the identity is changing mid // request. For example: http://issues.umbraco.org/issue/U4-4010 HttpContext.Current.CurrentHandler is Page); @@ -278,7 +279,7 @@ namespace umbraco.BasePages public static void RenewLoginTimeout() { - HttpContext.Current.RenewUmbracoAuthTicket(); + HttpContext.Current.RenewUmbracoAuthTicket(); } /// @@ -292,10 +293,9 @@ namespace umbraco.BasePages Id = u.Id, AllowedApplications = u.GetApplications().Select(x => x.alias).ToArray(), RealName = u.Name, - //currently we only have one user type! - Roles = new[] { u.UserType.Alias }, - StartContentNode = u.StartNodeId, - StartMediaNode = u.StartMediaId, + Roles = u.GetGroups(), + StartContentNodes = u.UserEntity.CalculateContentStartNodeIds(ApplicationContext.Current.Services.EntityService), + StartMediaNodes = u.UserEntity.CalculateMediaStartNodeIds(ApplicationContext.Current.Services.EntityService), Username = u.LoginName, Culture = ui.Culture(u) @@ -342,7 +342,7 @@ namespace umbraco.BasePages } //[Obsolete("Use ClientTools instead")] - //public void reloadParentNode() + //public void reloadParentNode() //{ // ClientTools.ReloadParentNode(true); //} @@ -379,7 +379,7 @@ namespace umbraco.BasePages { base.OnInit(e); - //This must be set on each page to mitigate CSRF attacks which ensures that this unique token + //This must be set on each page to mitigate CSRF attacks which ensures that this unique token // is added to the viewstate of each request if (umbracoUserContextID.IsNullOrWhiteSpace() == false) { diff --git a/src/umbraco.businesslogic/UmbracoSettings.cs b/src/umbraco.businesslogic/UmbracoSettings.cs index dea58ab3ae..cbae1650d7 100644 --- a/src/umbraco.businesslogic/UmbracoSettings.cs +++ b/src/umbraco.businesslogic/UmbracoSettings.cs @@ -447,7 +447,7 @@ namespace umbraco /// /// Gets HelpPage configurations. - /// A help page configuration specify language, user type, application, application url and + /// A help page configuration specify language, user groups, application, application url and /// the target help page url. /// public static XmlNode HelpPages diff --git a/src/umbraco.businesslogic/User.cs b/src/umbraco.businesslogic/User.cs index 93354d9ee3..dcac5a0caf 100644 --- a/src/umbraco.businesslogic/User.cs +++ b/src/umbraco.businesslogic/User.cs @@ -1,19 +1,13 @@ using System; using System.Collections; -using System.Web.Caching; using Umbraco.Core; -using Umbraco.Core.Cache; using Umbraco.Core.Logging; using Umbraco.Core.Models; using Umbraco.Core.Models.Membership; -using Umbraco.Core.Models.Rdbms; - -using Umbraco.Core.Persistence.Querying; -using Umbraco.Core.Persistence.Repositories; -using umbraco.DataLayer; using System.Collections.Generic; using System.Linq; -using System.Runtime.CompilerServices; +using umbraco.DataLayer; +using Umbraco.Core.Persistence.Querying; namespace umbraco.BusinessLogic { @@ -316,24 +310,6 @@ namespace umbraco.BusinessLogic } } - /// - /// Gets or sets the type of the user. - /// - /// The type of the user. - public UserType UserType - { - get - { - if (_lazyId.HasValue) SetupUser(_lazyId.Value); - return new UserType(UserEntity.UserType); - } - set - { - UserEntity.UserType = value.UserTypeItem; - } - } - - /// /// Gets all users /// @@ -450,10 +426,9 @@ namespace umbraco.BusinessLogic /// The full name. /// The login name. /// The password. - /// The user type. - public static User MakeNew(string name, string lname, string passw, UserType ut) + public static User MakeNew(string name, string lname, string passw) { - var user = new Umbraco.Core.Models.Membership.User(name, "", lname, passw, ut.UserTypeItem); + var user = new Umbraco.Core.Models.Membership.User(name, "", lname, passw); ApplicationContext.Current.Services.UserService.Save(user); var u = new User(user); @@ -470,10 +445,9 @@ namespace umbraco.BusinessLogic /// The lname. /// The passw. /// The email. - /// The ut. - public static User MakeNew(string name, string lname, string passw, string email, UserType ut) + public static User MakeNew(string name, string lname, string passw, string email) { - var user = new Umbraco.Core.Models.Membership.User(name, email, lname, passw, ut.UserTypeItem); + var user = new Umbraco.Core.Models.Membership.User(name, email, lname, passw); ApplicationContext.Current.Services.UserService.Save(user); var u = new User(user); @@ -490,8 +464,7 @@ namespace umbraco.BusinessLogic /// The name. /// The lname. /// The email. - /// The ut. - public static void Update(int id, string name, string lname, string email, UserType ut) + public static void Update(int id, string name, string lname, string email) { if (EnsureUniqueLoginName(lname, GetUser(id)) == false) throw new Exception(String.Format("A user with the login '{0}' already exists", lname)); @@ -501,11 +474,10 @@ namespace umbraco.BusinessLogic found.Name = name; found.Username = lname; found.Email = email; - found.UserType = ut.UserTypeItem; ApplicationContext.Current.Services.UserService.Save(found); } - public static void Update(int id, string name, string lname, string email, bool disabled, bool noConsole, UserType ut) + public static void Update(int id, string name, string lname, string email, bool disabled, bool noConsole) { if (EnsureUniqueLoginName(lname, GetUser(id)) == false) throw new Exception(String.Format("A user with the login '{0}' already exists", lname)); @@ -515,7 +487,6 @@ namespace umbraco.BusinessLogic found.Name = name; found.Username = lname; found.Email = email; - found.UserType = ut.UserTypeItem; found.IsApproved = disabled == false; found.IsLockedOut = noConsole; ApplicationContext.Current.Services.UserService.Save(found); @@ -593,32 +564,15 @@ namespace umbraco.BusinessLogic /// /// Gets the users permissions based on a nodes path /// - /// The path. + /// The path. /// - public string GetPermissions(string Path) + public string GetPermissions(string path) { if (_lazyId.HasValue) SetupUser(_lazyId.Value); - var defaultPermissions = UserType.DefaultPermissions; - - var cachedPermissions = ApplicationContext.Current.Services.UserService.GetPermissions(UserEntity) - .ToArray(); - - // NH 4.7.1 changing default permission behavior to default to User Type permissions IF no specific permissions has been - // set for the current node - var nodeId = Path.Contains(",") ? int.Parse(Path.Substring(Path.LastIndexOf(",", StringComparison.Ordinal) + 1)) : int.Parse(Path); - if (cachedPermissions.Any(x => x.EntityId == nodeId)) - { - var found = cachedPermissions.First(x => x.EntityId == nodeId); - return string.Join("", found.AssignedPermissions); - } - - // exception to everything. If default cruds is empty and we're on root node; allow browse of root node - if (string.IsNullOrEmpty(defaultPermissions) && Path == "-1") - defaultPermissions = "F"; - - // else return default user type cruds - return defaultPermissions; + var userService = ApplicationContext.Current.Services.UserService; + return string.Join("", + userService.GetPermissionsForPath(UserEntity, path).GetAllPermissions()); } /// @@ -690,58 +644,35 @@ namespace umbraco.BusinessLogic } /// - /// Clears the list of applications the user has access to, ensure to call Save afterwords + /// Clears the list of groups the user is in, ensure to call Save afterwords /// - public void ClearApplications() + public void ClearGroups() { if (_lazyId.HasValue) SetupUser(_lazyId.Value); - foreach (var s in UserEntity.AllowedSections.ToArray()) - { - UserEntity.RemoveAllowedSection(s); - } + UserEntity.ClearGroups(); } /// - /// Clears the list of applications the user has access to. + /// Adds a group to the list of groups for the user, ensure to call Save() afterwords /// - [Obsolete("This method will implicitly cause a database save and will reset the current user's dirty property, do not use this method, use the ClearApplications method instead and then call Save() when you are done performing all user changes to persist the chagnes in one transaction")] - public void clearApplications() + public void AddGroup(string groupAlias) { if (_lazyId.HasValue) SetupUser(_lazyId.Value); - - foreach (var s in UserEntity.AllowedSections.ToArray()) - { - UserEntity.RemoveAllowedSection(s); - } - - //For backwards compatibility this requires an implicit save - ApplicationContext.Current.Services.UserService.Save(UserEntity); + var group = ApplicationContext.Current.Services.UserService.GetUserGroupByAlias(groupAlias); + if (group != null) + UserEntity.AddGroup(group.ToReadOnlyGroup()); } - + /// - /// Adds a application to the list of allowed applications, ensure to call Save() afterwords + /// Returns the assigned user group aliases for the user /// - /// - public void AddApplication(string appAlias) + /// + public string[] GetGroups() { if (_lazyId.HasValue) SetupUser(_lazyId.Value); - UserEntity.AddAllowedSection(appAlias); + return UserEntity.Groups.Select(x => x.Alias).ToArray(); } - /// - /// Adds a application to the list of allowed applications - /// - /// The app alias. - [Obsolete("This method will implicitly cause a multiple database saves and will reset the current user's dirty property, do not use this method, use the AddApplication method instead and then call Save() when you are done performing all user changes to persist the chagnes in one transaction")] - public void addApplication(string AppAlias) - { - if (_lazyId.HasValue) SetupUser(_lazyId.Value); - - UserEntity.AddAllowedSection(AppAlias); - - //For backwards compatibility this requires an implicit save - ApplicationContext.Current.Services.UserService.Save(UserEntity); - } /// /// Gets or sets a value indicating whether the user has access to the Umbraco back end. @@ -776,39 +707,32 @@ namespace umbraco.BusinessLogic UserEntity.IsApproved = value == false; } } - - /// - /// - /// Gets or sets the start content node id. - /// - /// The start node id. + + [Obsolete("This should not be used, it will return invalid data because a user can have multiple start nodes, this will only return the first")] public int StartNodeId { get { if (_lazyId.HasValue) SetupUser(_lazyId.Value); - return UserEntity.StartContentId; + return UserEntity.StartContentIds == null || UserEntity.StartContentIds.Length == 0 ? -1 : UserEntity.StartContentIds[0]; } set { - UserEntity.StartContentId = value; + UserEntity.StartContentIds = new int[] { value }; } } - /// - /// Gets or sets the start media id. - /// - /// The start media id. + [Obsolete("This should not be used, it will return invalid data because a user can have multiple start nodes, this will only return the first")] public int StartMediaId { get { if (_lazyId.HasValue) SetupUser(_lazyId.Value); - return UserEntity.StartMediaId; + return UserEntity.StartMediaIds == null || UserEntity.StartMediaIds.Length == 0 ? -1 : UserEntity.StartMediaIds[0]; } set { - UserEntity.StartMediaId = value; + UserEntity.StartMediaIds = new int[] { value }; } } diff --git a/src/umbraco.businesslogic/UserType.cs b/src/umbraco.businesslogic/UserType.cs deleted file mode 100644 index b7bc2b9675..0000000000 --- a/src/umbraco.businesslogic/UserType.cs +++ /dev/null @@ -1,259 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Data; -using System.Globalization; -using System.Linq; -using System.Runtime.CompilerServices; -using System.Web; -using System.Web.Caching; -using Umbraco.Core; -using Umbraco.Core.Cache; -using Umbraco.Core.Events; -using umbraco.DataLayer; - -namespace umbraco.BusinessLogic -{ - /// - /// Represents a umbraco Usertype - /// - [Obsolete("Use the UserService instead")] - public class UserType - { - - internal Umbraco.Core.Models.Membership.IUserType UserTypeItem; - - /// - /// Creates a new empty instance of a UserType - /// - public UserType() - { - UserTypeItem = new Umbraco.Core.Models.Membership.UserType(); - } - - internal UserType(Umbraco.Core.Models.Membership.IUserType userType) - { - UserTypeItem = userType; - } - - /// - /// Creates a new instance of a UserType and attempts to - /// load it's values from the database cache. - /// - /// - /// If the UserType is not found in the existing ID list, then this object - /// will remain an empty object - /// - /// The UserType id to find - public UserType(int id) - { - this.LoadByPrimaryKey(id); - } - - /// - /// Initializes a new instance of the class. - /// - /// The user type id. - /// The name. - public UserType(int id, string name) - { - UserTypeItem = new Umbraco.Core.Models.Membership.UserType(); - UserTypeItem.Id = id; - UserTypeItem.Name = name; - } - - /// - /// Creates a new instance of UserType with all parameters - /// - /// - /// - /// - /// - public UserType(int id, string name, string defaultPermissions, string alias) - { - UserTypeItem = new Umbraco.Core.Models.Membership.UserType(); - UserTypeItem.Id = id; - UserTypeItem.Name = name; - UserTypeItem.Alias = alias; - UserTypeItem.Permissions = defaultPermissions.ToCharArray().Select(x => x.ToString(CultureInfo.InvariantCulture)); - } - - /// - /// The cache storage for all user types - /// - private static List UserTypes - { - get - { - return ApplicationContext.Current.Services.UserService.GetAllUserTypes() - .Select(x => new UserType(x)) - .ToList(); - } - } - - #region Public Properties - /// - /// Gets or sets the user type alias. - /// - public string Alias - { - get { return UserTypeItem.Alias; } - set { UserTypeItem.Alias = value; } - } - - /// - /// Gets the name of the user type. - /// - public string Name - { - get { return UserTypeItem.Name; } - set { UserTypeItem.Name = value; } - } - - /// - /// Gets the id the user type - /// - public int Id - { - get { return UserTypeItem.Id; } - } - - /// - /// Gets the default permissions of the user type - /// - public string DefaultPermissions - { - get { return UserTypeItem.Permissions == null ? string.Empty : string.Join("", UserTypeItem.Permissions); } - set { UserTypeItem.Permissions = value.ToCharArray().Select(x => x.ToString(CultureInfo.InvariantCulture)); } - } - - /// - /// Returns an array of UserTypes - /// - [Obsolete("Use the GetAll method instead")] - public static UserType[] getAll - { - get { return GetAllUserTypes().ToArray(); } - } - #endregion - - /// - /// Saves this instance. - /// - public void Save() - { - //ensure that this object has an ID specified (it exists in the database) - if (UserTypeItem.HasIdentity == false) - throw new Exception("The current UserType object does not exist in the database. New UserTypes should be created with the MakeNew method"); - - ApplicationContext.Current.Services.UserService.SaveUserType(UserTypeItem); - - //raise event - OnUpdated(this, new EventArgs()); - } - - /// - /// Deletes this instance. - /// - public void Delete() - { - //ensure that this object has an ID specified (it exists in the database) - if (UserTypeItem.HasIdentity == false) - throw new Exception("The current UserType object does not exist in the database. New UserTypes should be created with the MakeNew method"); - - ApplicationContext.Current.Services.UserService.DeleteUserType(UserTypeItem); - - //raise event - OnDeleted(this, new EventArgs()); - } - - /// - /// Load the data for the current UserType by it's id - /// - /// - /// Returns true if the UserType id was found - /// and the data was loaded, false if it wasn't - public bool LoadByPrimaryKey(int id) - { - UserTypeItem = ApplicationContext.Current.Services.UserService.GetUserTypeById(id); - return UserTypeItem != null; - } - - /// - /// Creates a new user type - /// - /// - /// - /// - public static UserType MakeNew(string name, string defaultPermissions, string alias) - { - //ensure that the current alias does not exist - //get the id for the new user type - var existing = UserTypes.Find(ut => (ut.Alias == alias)); - - if (existing != null) - throw new Exception("The UserType alias specified already exists"); - - var userType = new Umbraco.Core.Models.Membership.UserType - { - Alias = alias, - Name = name, - Permissions = defaultPermissions.ToCharArray().Select(x => x.ToString(CultureInfo.InvariantCulture)) - }; - ApplicationContext.Current.Services.UserService.SaveUserType(userType); - - var legacy = new UserType(userType); - - //raise event - OnNew(legacy, new EventArgs()); - - return legacy; - } - - /// - /// Gets the user type with the specied ID - /// - /// The id. - /// - public static UserType GetUserType(int id) - { - return UserTypes.Find(ut => (ut.Id == id)); - } - - /// - /// Returns all UserType's - /// - /// - public static List GetAllUserTypes() - { - return UserTypes; - } - - internal static event TypedEventHandler New; - private static void OnNew(UserType userType, EventArgs args) - { - if (New != null) - { - New(userType, args); - } - } - - internal static event TypedEventHandler Deleted; - private static void OnDeleted(UserType userType, EventArgs args) - { - if (Deleted != null) - { - Deleted(userType, args); - } - } - - internal static event TypedEventHandler Updated; - private static void OnUpdated(UserType userType, EventArgs args) - { - if (Updated != null) - { - Updated(userType, args); - } - } - - } -} \ No newline at end of file diff --git a/src/umbraco.businesslogic/app.config b/src/umbraco.businesslogic/app.config index 2928c2785f..9e5cd3c155 100644 --- a/src/umbraco.businesslogic/app.config +++ b/src/umbraco.businesslogic/app.config @@ -16,19 +16,19 @@ - + - + - + - + diff --git a/src/umbraco.businesslogic/packages.config b/src/umbraco.businesslogic/packages.config index 29ca6a8471..a0d22029af 100644 --- a/src/umbraco.businesslogic/packages.config +++ b/src/umbraco.businesslogic/packages.config @@ -1,10 +1,11 @@  + - + \ No newline at end of file diff --git a/src/umbraco.businesslogic/umbraco.businesslogic.csproj b/src/umbraco.businesslogic/umbraco.businesslogic.csproj index 86996480f2..71e3475b7b 100644 --- a/src/umbraco.businesslogic/umbraco.businesslogic.csproj +++ b/src/umbraco.businesslogic/umbraco.businesslogic.csproj @@ -114,9 +114,11 @@ ..\packages\AutoMapper.3.3.1\lib\net40\AutoMapper.Net4.dll True - - ..\packages\Microsoft.Owin.3.0.1\lib\net45\Microsoft.Owin.dll - True + + ..\packages\Microsoft.AspNet.Identity.Core.2.2.1\lib\net45\Microsoft.AspNet.Identity.Core.dll + + + ..\packages\Microsoft.Owin.3.1.0\lib\net45\Microsoft.Owin.dll ..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll @@ -242,9 +244,6 @@ Code - - Code - Code diff --git a/src/umbraco.cms/Actions/Action.cs b/src/umbraco.cms/Actions/Action.cs index 3a5503d714..81c78ade1b 100644 --- a/src/umbraco.cms/Actions/Action.cs +++ b/src/umbraco.cms/Actions/Action.cs @@ -1,6 +1,7 @@ using System; using System.Collections; using System.Collections.Generic; +using System.Globalization; using System.Web; using System.Reflection; using Umbraco.Core; @@ -150,7 +151,7 @@ namespace umbraco.BusinessLogic.Actions /// public static string ToString(List actions) { - string[] strMenu = Array.ConvertAll(actions.ToArray(), delegate(IAction a) { return (a.Letter.ToString()); }); + string[] strMenu = Array.ConvertAll(actions.ToArray(), delegate(IAction a) { return (a.Letter.ToString(CultureInfo.InvariantCulture)); }); return string.Join("", strMenu); } diff --git a/src/umbraco.cms/Actions/ActionAssignDomain.cs b/src/umbraco.cms/Actions/ActionAssignDomain.cs index c8af09b345..0722152e74 100644 --- a/src/umbraco.cms/Actions/ActionAssignDomain.cs +++ b/src/umbraco.cms/Actions/ActionAssignDomain.cs @@ -1,14 +1,17 @@ using System; using umbraco.interfaces; using umbraco.BasePages; +using Umbraco.Core; +using Umbraco.Core.CodeAnnotations; namespace umbraco.BusinessLogic.Actions { /// /// This action is invoked when a domain is being assigned to a document /// - public class ActionAssignDomain : IAction - { + [ActionMetadata(Constants.Conventions.PermissionCategories.AdministrationCategory)] + public class ActionAssignDomain : IAction + { //create singleton #pragma warning disable 612,618 private static readonly ActionAssignDomain m_instance = new ActionAssignDomain(); @@ -82,7 +85,8 @@ namespace umbraco.BusinessLogic.Actions { return true; } - } - #endregion - } + } + #endregion + + } } diff --git a/src/umbraco.cms/Actions/ActionAudit.cs b/src/umbraco.cms/Actions/ActionAudit.cs index 1e45ac1fbf..e16e0d8565 100644 --- a/src/umbraco.cms/Actions/ActionAudit.cs +++ b/src/umbraco.cms/Actions/ActionAudit.cs @@ -1,13 +1,16 @@ using System; using umbraco.interfaces; using umbraco.BasePages; +using Umbraco.Core; +using Umbraco.Core.CodeAnnotations; namespace umbraco.BusinessLogic.Actions -{ - /// - /// This action is invoked upon viewing audittrailing on a document - /// - public class ActionAudit : IAction +{ + /// + /// This action is invoked upon viewing audittrailing on a document + /// + [ActionMetadata(Constants.Conventions.PermissionCategories.AdministrationCategory)] + public class ActionAudit : IAction { //create singleton #pragma warning disable 612,618 @@ -82,8 +85,9 @@ namespace umbraco.BusinessLogic.Actions { return true; } - } - - #endregion - } + } + + #endregion + + } } diff --git a/src/umbraco.cms/Actions/ActionBrowse.cs b/src/umbraco.cms/Actions/ActionBrowse.cs index 7d44842f18..497f64efbe 100644 --- a/src/umbraco.cms/Actions/ActionBrowse.cs +++ b/src/umbraco.cms/Actions/ActionBrowse.cs @@ -1,65 +1,69 @@ using System; using umbraco.interfaces; using umbraco.BasePages; +using Umbraco.Core; +using Umbraco.Core.CodeAnnotations; namespace umbraco.BusinessLogic.Actions -{ - /// - /// This action is used as a security constraint that grants a user the ability to view nodes in a tree - /// that has permissions applied to it. - /// - /// - /// This action should not be invoked. It is used as the minimum required permission to view nodes in the content tree. By - /// granting a user this permission, the user is able to see the node in the tree but not edit the document. This may be used by other trees - /// that support permissions in the future. - /// - public class ActionBrowse : IAction - { - //create singleton - private static readonly ActionBrowse instance = new ActionBrowse(); - private ActionBrowse() { } - public static ActionBrowse Instance - { - get { return instance; } - } - - #region IAction Members - - public char Letter - { - get { return 'F'; } - } - - public bool ShowInNotifier - { - get { return false; } - } - - public bool CanBePermissionAssigned - { - get { return true; } - } - - public string Icon - { - get { return ""; } - } - - public string Alias - { - get { return "browse"; } - } - - public string JsFunctionName - { - get { return ""; } - } - - public string JsSource - { - get { return ""; } - } - - #endregion - } +{ + /// + /// This action is used as a security constraint that grants a user the ability to view nodes in a tree + /// that has permissions applied to it. + /// + /// + /// This action should not be invoked. It is used as the minimum required permission to view nodes in the content tree. By + /// granting a user this permission, the user is able to see the node in the tree but not edit the document. This may be used by other trees + /// that support permissions in the future. + /// + [ActionMetadata(Constants.Conventions.PermissionCategories.ContentCategory)] + public class ActionBrowse : IAction + { + //create singleton + private static readonly ActionBrowse instance = new ActionBrowse(); + private ActionBrowse() { } + public static ActionBrowse Instance + { + get { return instance; } + } + + #region IAction Members + + public char Letter + { + get { return 'F'; } + } + + public bool ShowInNotifier + { + get { return false; } + } + + public bool CanBePermissionAssigned + { + get { return true; } + } + + public string Icon + { + get { return ""; } + } + + public string Alias + { + get { return "browse"; } + } + + public string JsFunctionName + { + get { return ""; } + } + + public string JsSource + { + get { return ""; } + } + + #endregion + + } } diff --git a/src/umbraco.cms/Actions/ActionChangeDocType.cs b/src/umbraco.cms/Actions/ActionChangeDocType.cs index aff2b45697..ef817aa997 100644 --- a/src/umbraco.cms/Actions/ActionChangeDocType.cs +++ b/src/umbraco.cms/Actions/ActionChangeDocType.cs @@ -1,12 +1,15 @@ using System; using umbraco.interfaces; using umbraco.BasePages; +using Umbraco.Core; +using Umbraco.Core.CodeAnnotations; namespace umbraco.BusinessLogic.Actions { /// /// This action is invoked when the document type of a piece of content is changed /// + [ActionMetadata(Constants.Conventions.PermissionCategories.AdministrationCategory)] public class ActionChangeDocType : IAction { //create singleton @@ -90,5 +93,6 @@ namespace umbraco.BusinessLogic.Actions } } #endregion + } } diff --git a/src/umbraco.cms/Actions/ActionCopy.cs b/src/umbraco.cms/Actions/ActionCopy.cs index 506c854475..4455165362 100644 --- a/src/umbraco.cms/Actions/ActionCopy.cs +++ b/src/umbraco.cms/Actions/ActionCopy.cs @@ -1,13 +1,16 @@ using System; using umbraco.interfaces; using umbraco.BasePages; +using Umbraco.Core; +using Umbraco.Core.CodeAnnotations; namespace umbraco.BusinessLogic.Actions -{ - /// - /// This action is invoked when copying a document, media, member - /// - public class ActionCopy : IAction +{ + /// + /// This action is invoked when copying a document, media, member + /// + [ActionMetadata(Constants.Conventions.PermissionCategories.StructureCategory)] + public class ActionCopy : IAction { //create singleton #pragma warning disable 612,618 @@ -88,7 +91,8 @@ namespace umbraco.BusinessLogic.Actions return true; } - } - #endregion - } + } + #endregion + + } } diff --git a/src/umbraco.cms/Actions/ActionCreateBlueprintFromContent.cs b/src/umbraco.cms/Actions/ActionCreateBlueprintFromContent.cs index 43ce768b03..b905f96d84 100644 --- a/src/umbraco.cms/Actions/ActionCreateBlueprintFromContent.cs +++ b/src/umbraco.cms/Actions/ActionCreateBlueprintFromContent.cs @@ -4,9 +4,12 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using umbraco.interfaces; +using Umbraco.Core; +using Umbraco.Core.CodeAnnotations; namespace umbraco.businesslogic.Actions { + [ActionMetadata(Constants.Conventions.PermissionCategories.ContentCategory)] public class ActionCreateBlueprintFromContent : IAction { private static readonly ActionCreateBlueprintFromContent instance = new ActionCreateBlueprintFromContent(); @@ -31,5 +34,6 @@ namespace umbraco.businesslogic.Actions Icon = "blueprint"; Alias = "createblueprint"; } + } } diff --git a/src/umbraco.cms/Actions/ActionDelete.cs b/src/umbraco.cms/Actions/ActionDelete.cs index 68f9dbc463..f79d945a5c 100644 --- a/src/umbraco.cms/Actions/ActionDelete.cs +++ b/src/umbraco.cms/Actions/ActionDelete.cs @@ -1,13 +1,16 @@ using System; using umbraco.interfaces; using umbraco.BasePages; +using Umbraco.Core; +using Umbraco.Core.CodeAnnotations; namespace umbraco.BusinessLogic.Actions -{ - /// - /// This action is invoked when a document, media, member is deleted - /// - public class ActionDelete : IAction +{ + /// + /// This action is invoked when a document, media, member is deleted + /// + [ActionMetadata(Constants.Conventions.PermissionCategories.ContentCategory)] + public class ActionDelete : IAction { //create singleton #pragma warning disable 612,618 @@ -82,7 +85,8 @@ namespace umbraco.BusinessLogic.Actions { return true; } - } - #endregion - } + } + #endregion + + } } diff --git a/src/umbraco.cms/Actions/ActionDisable.cs b/src/umbraco.cms/Actions/ActionDisable.cs index e89a39ea46..d72e618df2 100644 --- a/src/umbraco.cms/Actions/ActionDisable.cs +++ b/src/umbraco.cms/Actions/ActionDisable.cs @@ -1,6 +1,7 @@ using System; using umbraco.interfaces; using umbraco.BasePages; +using Umbraco.Core; namespace umbraco.BusinessLogic.Actions { @@ -86,7 +87,8 @@ namespace umbraco.BusinessLogic.Actions return false; } - } - #endregion - } + } + #endregion + + } } diff --git a/src/umbraco.cms/Actions/ActionEmptyTranscan.cs b/src/umbraco.cms/Actions/ActionEmptyTranscan.cs index c28c775d53..d6b4a8fed9 100644 --- a/src/umbraco.cms/Actions/ActionEmptyTranscan.cs +++ b/src/umbraco.cms/Actions/ActionEmptyTranscan.cs @@ -1,6 +1,7 @@ using System; using umbraco.interfaces; using umbraco.BasePages; +using Umbraco.Core; namespace umbraco.BusinessLogic.Actions { @@ -80,8 +81,9 @@ namespace umbraco.BusinessLogic.Actions { return false; } - } - - #endregion - } + } + + #endregion + + } } diff --git a/src/umbraco.cms/Actions/ActionExport.cs b/src/umbraco.cms/Actions/ActionExport.cs index 1b48b617a9..b71d6a1142 100644 --- a/src/umbraco.cms/Actions/ActionExport.cs +++ b/src/umbraco.cms/Actions/ActionExport.cs @@ -1,6 +1,7 @@ using System; using umbraco.interfaces; using umbraco.BasePages; +using Umbraco.Core; namespace umbraco.BusinessLogic.Actions { @@ -82,8 +83,9 @@ namespace umbraco.BusinessLogic.Actions { return false; } - } - - #endregion - } + } + + #endregion + + } } diff --git a/src/umbraco.cms/Actions/ActionImport.cs b/src/umbraco.cms/Actions/ActionImport.cs index 85ccd10c2d..cdbfd3469c 100644 --- a/src/umbraco.cms/Actions/ActionImport.cs +++ b/src/umbraco.cms/Actions/ActionImport.cs @@ -1,6 +1,7 @@ using System; using umbraco.interfaces; using umbraco.BasePages; +using Umbraco.Core; namespace umbraco.BusinessLogic.Actions { @@ -82,8 +83,8 @@ namespace umbraco.BusinessLogic.Actions { return false; } - } - - #endregion - } + } + + #endregion + } } diff --git a/src/umbraco.cms/Actions/ActionMove.cs b/src/umbraco.cms/Actions/ActionMove.cs index fd642e6b68..84f24211b0 100644 --- a/src/umbraco.cms/Actions/ActionMove.cs +++ b/src/umbraco.cms/Actions/ActionMove.cs @@ -1,13 +1,16 @@ using System; using umbraco.interfaces; using umbraco.BasePages; +using Umbraco.Core; +using Umbraco.Core.CodeAnnotations; namespace umbraco.BusinessLogic.Actions -{ - /// - /// This action is invoked upon creation of a document, media, member - /// - public class ActionMove : IAction +{ + /// + /// This action is invoked upon creation of a document, media, member + /// + [ActionMetadata(Constants.Conventions.PermissionCategories.StructureCategory)] + public class ActionMove : IAction { //create singleton #pragma warning disable 612,618 @@ -88,7 +91,7 @@ namespace umbraco.BusinessLogic.Actions return true; } - } - #endregion - } + } + #endregion + } } diff --git a/src/umbraco.cms/Actions/ActionNew.cs b/src/umbraco.cms/Actions/ActionNew.cs index 567015c45a..6524a3b722 100644 --- a/src/umbraco.cms/Actions/ActionNew.cs +++ b/src/umbraco.cms/Actions/ActionNew.cs @@ -1,13 +1,16 @@ using System; using umbraco.interfaces; using umbraco.BasePages; +using Umbraco.Core; +using Umbraco.Core.CodeAnnotations; namespace umbraco.BusinessLogic.Actions -{ - /// - /// This action is invoked upon creation of a document - /// - public class ActionNew : IAction +{ + /// + /// This action is invoked upon creation of a document + /// + [ActionMetadata(Constants.Conventions.PermissionCategories.ContentCategory)] + public class ActionNew : IAction { //create singleton private static readonly ActionNew InnerInstance = new ActionNew(); @@ -80,8 +83,9 @@ namespace umbraco.BusinessLogic.Actions { return true; } - } - - #endregion - } + } + + #endregion + + } } diff --git a/src/umbraco.cms/Actions/ActionNewFolder.cs b/src/umbraco.cms/Actions/ActionNewFolder.cs index a812842890..04c47dcfca 100644 --- a/src/umbraco.cms/Actions/ActionNewFolder.cs +++ b/src/umbraco.cms/Actions/ActionNewFolder.cs @@ -1,6 +1,7 @@ using System; using umbraco.interfaces; using umbraco.BasePages; +using Umbraco.Core; namespace umbraco.BusinessLogic.Actions { @@ -83,8 +84,9 @@ namespace umbraco.BusinessLogic.Actions { return false; } - } - - #endregion - } + } + + #endregion + + } } diff --git a/src/umbraco.cms/Actions/ActionNotify.cs b/src/umbraco.cms/Actions/ActionNotify.cs index be1f32055d..349ec0e93d 100644 --- a/src/umbraco.cms/Actions/ActionNotify.cs +++ b/src/umbraco.cms/Actions/ActionNotify.cs @@ -1,6 +1,7 @@ using System; using umbraco.interfaces; using umbraco.BasePages; +using Umbraco.Core; namespace umbraco.BusinessLogic.Actions { @@ -84,7 +85,8 @@ namespace umbraco.BusinessLogic.Actions { return false; } - } - #endregion - } + } + #endregion + + } } diff --git a/src/umbraco.cms/Actions/ActionPackage.cs b/src/umbraco.cms/Actions/ActionPackage.cs index 2da54f93bb..6c5d9b83ad 100644 --- a/src/umbraco.cms/Actions/ActionPackage.cs +++ b/src/umbraco.cms/Actions/ActionPackage.cs @@ -1,6 +1,7 @@ using System; using umbraco.interfaces; using umbraco.BasePages; +using Umbraco.Core; namespace umbraco.BusinessLogic.Actions { @@ -82,8 +83,9 @@ namespace umbraco.BusinessLogic.Actions { return false; } - } - - #endregion - } + } + + #endregion + + } } diff --git a/src/umbraco.cms/Actions/ActionProtect.cs b/src/umbraco.cms/Actions/ActionProtect.cs index 166e4b656c..ea3336a836 100644 --- a/src/umbraco.cms/Actions/ActionProtect.cs +++ b/src/umbraco.cms/Actions/ActionProtect.cs @@ -1,13 +1,16 @@ using System; using umbraco.interfaces; using umbraco.BasePages; +using Umbraco.Core; +using Umbraco.Core.CodeAnnotations; namespace umbraco.BusinessLogic.Actions -{ - /// - /// This action is invoked when a document is protected or unprotected - /// - public class ActionProtect : IAction +{ + /// + /// This action is invoked when a document is protected or unprotected + /// + [ActionMetadata(Constants.Conventions.PermissionCategories.AdministrationCategory)] + public class ActionProtect : IAction { //create singleton #pragma warning disable 612,618 diff --git a/src/umbraco.cms/Actions/ActionPublish.cs b/src/umbraco.cms/Actions/ActionPublish.cs index d53a37d5ba..c5b09651c0 100644 --- a/src/umbraco.cms/Actions/ActionPublish.cs +++ b/src/umbraco.cms/Actions/ActionPublish.cs @@ -1,13 +1,16 @@ using System; using umbraco.interfaces; using umbraco.BasePages; +using Umbraco.Core; +using Umbraco.Core.CodeAnnotations; namespace umbraco.BusinessLogic.Actions -{ - /// - /// This action is invoked when a document is being published - /// - public class ActionPublish : IAction +{ + /// + /// This action is invoked when a document is being published + /// + [ActionMetadata(Constants.Conventions.PermissionCategories.ContentCategory)] + public class ActionPublish : IAction { //create singleton #pragma warning disable 612,618 diff --git a/src/umbraco.cms/Actions/ActionRights.cs b/src/umbraco.cms/Actions/ActionRights.cs index eb56829843..ca99ae02b1 100644 --- a/src/umbraco.cms/Actions/ActionRights.cs +++ b/src/umbraco.cms/Actions/ActionRights.cs @@ -1,13 +1,16 @@ using System; using umbraco.interfaces; using umbraco.BasePages; +using Umbraco.Core; +using Umbraco.Core.CodeAnnotations; namespace umbraco.BusinessLogic.Actions -{ - /// - /// This action is invoked when rights are changed on a document - /// - public class ActionRights : IAction +{ + /// + /// This action is invoked when rights are changed on a document + /// + [ActionMetadata(Constants.Conventions.PermissionCategories.ContentCategory)] + public class ActionRights : IAction { //create singleton #pragma warning disable 612,618 diff --git a/src/umbraco.cms/Actions/ActionRollback.cs b/src/umbraco.cms/Actions/ActionRollback.cs index 474f920703..e5139fc817 100644 --- a/src/umbraco.cms/Actions/ActionRollback.cs +++ b/src/umbraco.cms/Actions/ActionRollback.cs @@ -1,13 +1,16 @@ using System; using umbraco.interfaces; using umbraco.BasePages; +using Umbraco.Core; +using Umbraco.Core.CodeAnnotations; namespace umbraco.BusinessLogic.Actions -{ - /// - /// This action is invoked when copying a document is being rolled back - /// - public class ActionRollback : IAction +{ + /// + /// This action is invoked when copying a document is being rolled back + /// + [ActionMetadata(Constants.Conventions.PermissionCategories.AdministrationCategory)] + public class ActionRollback : IAction { //create singleton #pragma warning disable 612,618 diff --git a/src/umbraco.cms/Actions/ActionSendToTranslate.cs b/src/umbraco.cms/Actions/ActionSendToTranslate.cs index cd7ec135cc..050482fe30 100644 --- a/src/umbraco.cms/Actions/ActionSendToTranslate.cs +++ b/src/umbraco.cms/Actions/ActionSendToTranslate.cs @@ -1,13 +1,16 @@ using System; using umbraco.interfaces; using umbraco.BasePages; +using Umbraco.Core; +using Umbraco.Core.CodeAnnotations; namespace umbraco.BusinessLogic.Actions -{ - /// - /// This action is invoked when a send to translate request occurs - /// - public class ActionSendToTranslate : IAction +{ + /// + /// This action is invoked when a send to translate request occurs + /// + [ActionMetadata(Constants.Conventions.PermissionCategories.ContentCategory)] + public class ActionSendToTranslate : IAction { //create singleton #pragma warning disable 612,618 diff --git a/src/umbraco.cms/Actions/ActionSort.cs b/src/umbraco.cms/Actions/ActionSort.cs index 7ece758c28..448100faeb 100644 --- a/src/umbraco.cms/Actions/ActionSort.cs +++ b/src/umbraco.cms/Actions/ActionSort.cs @@ -1,13 +1,16 @@ using System; using umbraco.interfaces; using umbraco.BasePages; +using Umbraco.Core; +using Umbraco.Core.CodeAnnotations; namespace umbraco.BusinessLogic.Actions -{ - /// - /// This action is invoked when children to a document, media, member is being sorted - /// - public class ActionSort : IAction +{ + /// + /// This action is invoked when children to a document, media, member is being sorted + /// + [ActionMetadata(Constants.Conventions.PermissionCategories.StructureCategory)] + public class ActionSort : IAction { //create singleton #pragma warning disable 612,618 diff --git a/src/umbraco.cms/Actions/ActionToPublish.cs b/src/umbraco.cms/Actions/ActionToPublish.cs index c2c6ee96c1..264dc716b0 100644 --- a/src/umbraco.cms/Actions/ActionToPublish.cs +++ b/src/umbraco.cms/Actions/ActionToPublish.cs @@ -1,13 +1,16 @@ using System; using umbraco.interfaces; using umbraco.BasePages; +using Umbraco.Core; +using Umbraco.Core.CodeAnnotations; namespace umbraco.BusinessLogic.Actions -{ - /// - /// This action is invoked when children to a document is being sent to published (by an editor without publishrights) - /// - public class ActionToPublish : IAction +{ + /// + /// This action is invoked when children to a document is being sent to published (by an editor without publishrights) + /// + [ActionMetadata(Constants.Conventions.PermissionCategories.ContentCategory)] + public class ActionToPublish : IAction { //create singleton #pragma warning disable 612,618 diff --git a/src/umbraco.cms/Actions/ActionTranslate.cs b/src/umbraco.cms/Actions/ActionTranslate.cs index 8e7064fa7d..9ad944f791 100644 --- a/src/umbraco.cms/Actions/ActionTranslate.cs +++ b/src/umbraco.cms/Actions/ActionTranslate.cs @@ -1,13 +1,16 @@ using System; using umbraco.interfaces; using umbraco.BasePages; +using Umbraco.Core; +using Umbraco.Core.CodeAnnotations; namespace umbraco.BusinessLogic.Actions -{ - /// - /// This action is invoked when a translation occurs - /// - public class ActionTranslate : IAction +{ + /// + /// This action is invoked when a translation occurs + /// + [ActionMetadata(Constants.Conventions.PermissionCategories.AdministrationCategory)] + public class ActionTranslate : IAction { //create singleton #pragma warning disable 612,618 diff --git a/src/umbraco.cms/Actions/ActionUpdate.cs b/src/umbraco.cms/Actions/ActionUpdate.cs index 9f48335d1d..44cbf742ab 100644 --- a/src/umbraco.cms/Actions/ActionUpdate.cs +++ b/src/umbraco.cms/Actions/ActionUpdate.cs @@ -1,13 +1,16 @@ using System; using umbraco.interfaces; using umbraco.BasePages; +using Umbraco.Core; +using Umbraco.Core.CodeAnnotations; namespace umbraco.BusinessLogic.Actions -{ - /// - /// This action is invoked when copying a document or media - /// - public class ActionUpdate : IAction +{ + /// + /// This action is invoked when copying a document or media + /// + [ActionMetadata(Constants.Conventions.PermissionCategories.ContentCategory)] + public class ActionUpdate : IAction { //create singleton #pragma warning disable 612,618 diff --git a/src/umbraco.cms/app.config b/src/umbraco.cms/app.config index 2928c2785f..9e5cd3c155 100644 --- a/src/umbraco.cms/app.config +++ b/src/umbraco.cms/app.config @@ -16,19 +16,19 @@ - + - + - + - + diff --git a/src/umbraco.cms/businesslogic/CMSNode.cs b/src/umbraco.cms/businesslogic/CMSNode.cs index 3c28005cc9..53b15f318d 100644 --- a/src/umbraco.cms/businesslogic/CMSNode.cs +++ b/src/umbraco.cms/businesslogic/CMSNode.cs @@ -307,11 +307,12 @@ namespace umbraco.cms.businesslogic if (parent != null) { IEnumerable permissions = Permission.GetNodePermissions(parent); + var userService = ApplicationContext.Current.Services.UserService; foreach (Permission p in permissions) { - Permission.MakeNew(User.GetUser(p.UserId), retVal, p.PermissionId); + var userGroup = userService.GetUserGroupById(p.UserGroupId); + Permission.MakeNew(userGroup, retVal, p.PermissionId); } - } //event diff --git a/src/umbraco.cms/businesslogic/Permission.cs b/src/umbraco.cms/businesslogic/Permission.cs index 1a598452fe..32daa3df50 100644 --- a/src/umbraco.cms/businesslogic/Permission.cs +++ b/src/umbraco.cms/businesslogic/Permission.cs @@ -9,20 +9,20 @@ using Umbraco.Core.Events; using umbraco.DataLayer; using umbraco.cms.businesslogic; using System.Collections.Generic; +using System.ComponentModel; using Umbraco.Core.Models.Membership; using Umbraco.Core.Services; using DeleteEventArgs = umbraco.cms.businesslogic.DeleteEventArgs; namespace umbraco.BusinessLogic { - /// - /// Summary description for Permission. - /// + [Obsolete("This is no longer used and will be removed in future versions, use the IUserService to manage permissions for Users")] + [EditorBrowsable(EditorBrowsableState.Never)] public class Permission { public int NodeId { get; private set; } - public int UserId { get; private set; } + public int UserGroupId { get; private set; } public char PermissionId { get; private set; } /// @@ -30,26 +30,10 @@ namespace umbraco.BusinessLogic /// private Permission() { } - public static void MakeNew(User User, CMSNode Node, char PermissionKey) + public static void MakeNew(IUserGroup userGroup, CMSNode node, char permissionKey) { - MakeNew(User, Node, PermissionKey, true); - } - - private static void MakeNew(User user, IEnumerable nodes, char permissionKey, bool raiseEvents) - { - var asArray = nodes.ToArray(); - - ApplicationContext.Current.Services.UserService.AssignUserPermission(user.Id, permissionKey, asArray.Select(x => x.Id).ToArray()); - - if (raiseEvents) - { - OnNew(new UserPermission(user, asArray, new[] { permissionKey }), new NewEventArgs()); - } - } - - private static void MakeNew(User User, CMSNode Node, char PermissionKey, bool raiseEvents) - { - MakeNew(User, new[] {Node}, PermissionKey, raiseEvents); + ApplicationContext.Current.Services.UserService.AssignUserGroupPermission( + userGroup.Id, permissionKey, node.Id); } /// @@ -67,7 +51,6 @@ namespace umbraco.BusinessLogic { NodeId = entityPermission.EntityId, PermissionId = assignedPermission[0], - UserId = entityPermission.UserId }); } @@ -90,49 +73,38 @@ namespace umbraco.BusinessLogic { NodeId = entityPermission.EntityId, PermissionId = assignedPermission[0], - UserId = entityPermission.UserId + UserGroupId = entityPermission.UserGroupId, }); } /// - /// Delets all permissions for the node/user combination + /// Delets all permissions for the node/user group combination /// - /// + /// /// - public static void DeletePermissions(User user, CMSNode node) + public static void DeletePermissions(IUserGroup userGroup, CMSNode node) { - DeletePermissions(user, node, true); - } - - internal static void DeletePermissions(User user, CMSNode node, bool raiseEvents) - { - ApplicationContext.Current.Services.UserService.RemoveUserPermissions(user.Id, node.Id); - if (raiseEvents) - { - OnDeleted(new UserPermission(user, node, null), new DeleteEventArgs()); - } + ApplicationContext.Current.Services.UserService.RemoveUserGroupPermissions(userGroup.Id, node.Id); } /// - /// deletes all permissions for the user + /// deletes all permissions for the user group /// - /// - public static void DeletePermissions(User user) + /// + public static void DeletePermissions(IUserGroup userGroup) { - ApplicationContext.Current.Services.UserService.RemoveUserPermissions(user.Id); - - OnDeleted(new UserPermission(user, Enumerable.Empty(), null), new DeleteEventArgs()); + ApplicationContext.Current.Services.UserService.RemoveUserGroupPermissions(userGroup.Id); + } - public static void DeletePermissions(int iUserID, int[] iNodeIDs) + public static void DeletePermissions(int userGroupId, int[] iNodeIDs) { - ApplicationContext.Current.Services.UserService.RemoveUserPermissions(iUserID, iNodeIDs); - - OnDeleted(new UserPermission(iUserID, iNodeIDs), new DeleteEventArgs()); + ApplicationContext.Current.Services.UserService.RemoveUserGroupPermissions(userGroupId, iNodeIDs); + } - public static void DeletePermissions(int iUserID, int iNodeID) + public static void DeletePermissions(int userGroupId, int iNodeID) { - DeletePermissions(iUserID, new[] { iNodeID }); + DeletePermissions(userGroupId, new[] { iNodeID }); } /// @@ -143,112 +115,17 @@ namespace umbraco.BusinessLogic { ApplicationContext.Current.Services.ContentService.RemoveContentPermissions(node.Id); - OnDeleted(new UserPermission(null, node, null), new DeleteEventArgs()); } - public static void UpdateCruds(User user, CMSNode node, string permissions) + public static void UpdateCruds(IUserGroup userGroup, CMSNode node, string permissions) { - ApplicationContext.Current.Services.UserService.ReplaceUserPermissions( - user.Id, + ApplicationContext.Current.Services.UserService.ReplaceUserGroupPermissions( + userGroup.Id, permissions.ToCharArray(), node.Id); - - OnUpdated(new UserPermission(user, node, permissions.ToCharArray()), new SaveEventArgs()); - } - - internal static event TypedEventHandler Deleted; - private static void OnDeleted(UserPermission permission, DeleteEventArgs args) - { - if (Deleted != null) - { - Deleted(permission, args); - } - } - - internal static event TypedEventHandler Updated; - private static void OnUpdated(UserPermission permission, SaveEventArgs args) - { - if (Updated != null) - { - Updated(permission, args); - } - } - - internal static event TypedEventHandler New; - private static void OnNew(UserPermission permission, NewEventArgs args) - { - if (New != null) - { - New(permission, args); - } + } } - internal class UserPermission - { - private int? _userId; - private readonly int[] _nodeIds; - - internal UserPermission(int userId) - { - _userId = userId; - } - - internal UserPermission(int userId, IEnumerable nodeIds) - { - _userId = userId; - _nodeIds = nodeIds.ToArray(); - } - - internal UserPermission(User user, CMSNode node, char[] permissionKeys) - { - User = user; - Nodes = new[] { node }; - PermissionKeys = permissionKeys; - } - - internal UserPermission(User user, IEnumerable nodes, char[] permissionKeys) - { - User = user; - Nodes = nodes; - PermissionKeys = permissionKeys; - } - - internal int UserId - { - get - { - if (_userId.HasValue) - { - return _userId.Value; - } - if (User != null) - { - return User.Id; - } - return -1; - } - } - - internal IEnumerable NodeIds - { - get - { - if (_nodeIds != null) - { - return _nodeIds; - } - if (Nodes != null) - { - return Nodes.Select(x => x.Id); - } - return Enumerable.Empty(); - } - } - - internal User User { get; private set; } - internal IEnumerable Nodes { get; private set; } - internal char[] PermissionKeys { get; private set; } - } } \ No newline at end of file diff --git a/src/umbraco.cms/helpers/DeepLink.cs b/src/umbraco.cms/helpers/DeepLink.cs index 9c401ea87a..ac0fdce5b7 100644 --- a/src/umbraco.cms/helpers/DeepLink.cs +++ b/src/umbraco.cms/helpers/DeepLink.cs @@ -90,11 +90,7 @@ namespace umbraco.cms.helpers editorUrl = "settings/editMediaType.aspx"; idKey = "id"; break; - case DeepLinkType.RazorScript: - section = Constants.Applications.Developer; - editorUrl = "developer/python/editPython.aspx"; - idKey = "file"; - break; + case DeepLinkType.Template: section = Constants.Applications.Settings; editorUrl = "settings/editTemplate.aspx"; diff --git a/src/umbraco.controls/app.config b/src/umbraco.controls/app.config index 2928c2785f..9e5cd3c155 100644 --- a/src/umbraco.controls/app.config +++ b/src/umbraco.controls/app.config @@ -16,19 +16,19 @@ - + - + - + - + diff --git a/src/umbraco.datalayer/app.config b/src/umbraco.datalayer/app.config index 9bec1bdd87..5d31bd6363 100644 --- a/src/umbraco.datalayer/app.config +++ b/src/umbraco.datalayer/app.config @@ -16,19 +16,19 @@ - + - + - + - + diff --git a/src/umbraco.editorControls/app.config b/src/umbraco.editorControls/app.config index 9de76a47e4..44be20ff86 100644 --- a/src/umbraco.editorControls/app.config +++ b/src/umbraco.editorControls/app.config @@ -33,19 +33,19 @@ - + - + - + - + diff --git a/src/umbraco.editorControls/tinyMCE3/TinyMCE.cs b/src/umbraco.editorControls/tinyMCE3/TinyMCE.cs index fcae44b113..cf6fba9e43 100644 --- a/src/umbraco.editorControls/tinyMCE3/TinyMCE.cs +++ b/src/umbraco.editorControls/tinyMCE3/TinyMCE.cs @@ -1,5 +1,6 @@ using System; using System.Collections; +using System.Linq; using System.Text.RegularExpressions; using System.Web; using System.Web.UI; @@ -136,8 +137,8 @@ namespace umbraco.editorControls.tinyMCE3 config.Add("plugins", _plugins); // Check advanced settings - if (UmbracoEnsuredPage.CurrentUser != null && ("," + _advancedUsers + ",").IndexOf("," + UmbracoEnsuredPage.CurrentUser.UserType.Id + ",") > - -1) + var advancedUserGroupNames = _advancedUsers.Split(','); + if (UmbracoEnsuredPage.CurrentUser != null && advancedUserGroupNames.Intersect(UmbracoEnsuredPage.CurrentUser.GetGroups()).Any()) config.Add("umbraco_advancedMode", "true"); else config.Add("umbraco_advancedMode", "false"); diff --git a/src/umbraco.editorControls/tinymce/tinyMCEPreValueConfigurator.cs b/src/umbraco.editorControls/tinymce/tinyMCEPreValueConfigurator.cs index bc7382b873..8ccac6c330 100644 --- a/src/umbraco.editorControls/tinymce/tinyMCEPreValueConfigurator.cs +++ b/src/umbraco.editorControls/tinymce/tinyMCEPreValueConfigurator.cs @@ -1,15 +1,15 @@ using System; -using System.Collections.Generic; -using System.Text; using System.Collections; using System.Web.UI; using System.Web.UI.WebControls; - using umbraco.BusinessLogic; using umbraco.DataLayer; +using Umbraco.Core; namespace umbraco.editorControls.tinymce { + + [Obsolete("IDataType and all other references to the legacy property editors are no longer used this will be removed from the codebase in future versions")] public class tinyMCEPreValueConfigurator : System.Web.UI.WebControls.PlaceHolder, interfaces.IDataPrevalue { @@ -183,10 +183,11 @@ namespace umbraco.editorControls.tinymce } // add users - foreach (BusinessLogic.UserType ut in BusinessLogic.UserType.getAll) + var userService = ApplicationContext.Current.Services.UserService; + foreach (var ug in userService.GetAllUserGroups()) { - ListItem li = new ListItem(ut.Name, ut.Id.ToString()); - if (("," + _advancedUsers + ",").IndexOf("," + ut.Id.ToString() + ",") > -1) + ListItem li = new ListItem(ug.Name, ug.Id.ToString()); + if (("," + _advancedUsers + ",").IndexOf("," + ug.Id + ",") > -1) li.Selected = true; _advancedUsersList.Items.Add(li); diff --git a/src/umbraco.presentation.targets b/src/umbraco.presentation.targets index 2a33705d6f..6eb87ad9fa 100644 --- a/src/umbraco.presentation.targets +++ b/src/umbraco.presentation.targets @@ -58,6 +58,10 @@ $(MSBuildExtensionsPath)\Microsoft\VisualStudio\v15.0\Web\Microsoft.Web.Publishing.Tasks.dll + + + + $(VSWherePath)\Microsoft\VisualStudio\v15.0\Web\Microsoft.Web.Publishing.Tasks.dll